{"id":18002387,"url":"https://github.com/jaeyson/ex_banking","last_synced_at":"2025-04-04T08:15:33.705Z","repository":{"id":48115746,"uuid":"515517385","full_name":"jaeyson/ex_banking","owner":"jaeyson","description":"test from yolo","archived":false,"fork":false,"pushed_at":"2022-07-25T23:56:19.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-09T19:19:25.806Z","etag":null,"topics":["elixir"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jaeyson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-19T09:23:49.000Z","updated_at":"2023-01-24T05:24:37.000Z","dependencies_parsed_at":"2022-09-13T13:21:20.893Z","dependency_job_id":null,"html_url":"https://github.com/jaeyson/ex_banking","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaeyson%2Fex_banking","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaeyson%2Fex_banking/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaeyson%2Fex_banking/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaeyson%2Fex_banking/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaeyson","download_url":"https://codeload.github.com/jaeyson/ex_banking/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247142074,"owners_count":20890653,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elixir"],"created_at":"2024-10-29T23:21:28.004Z","updated_at":"2025-04-04T08:15:32.299Z","avatar_url":"https://github.com/jaeyson.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ExBanking\n\n[//]: # \"Badges\"\n[![Actions Status][actions badge]][actions]\n\n[//]: # \"Links\"\n[actions]: https://github.com/jaeyson/ex_banking/actions\n\n[//]: # \"Image sources\"\n[actions badge]: https://github.com/jaeyson/ex_banking/actions/workflows/ci.yml/badge.svg\n\nTo simulate local nodes talking to each other and making transactions:\n\n```elixir\n# node1\n# iex --sname node1@localhost -S mix\n\n# then add users\niex\u003e ExBanking.create_user(\"test\")\n:ok\n\niex\u003e ExBanking.deposit(\"test\", 1.2589, \"usd\")\n{:ok, 1.26}\n```\n\nThen another node connects:\n\n```elixir\n# node2 (new)\n# iex --sname node2@localhost -S mix\n\n# connects to node1\niex\u003e State.connect_node(:node1@localhost)\n\niex\u003e ExBanking.create_user(\"node2\")\n:ok\n\niex\u003e ExBanking.deposit(\"node2\", 10, \"usd\")\n{:ok, 10.0}\n\niex\u003e ExBanking.send(\"node2\", \"test\", 10, \"usd\")\n{:ok 0.0, 11.26}\n\niex\u003e ExBanking.get_balance(\"test\", \"usd\")\n{:ok, 11.26}\n\niex\u003e ExBanking.get_balance(\"node2\", \"usd\")\n{:ok, 0.0}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaeyson%2Fex_banking","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaeyson%2Fex_banking","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaeyson%2Fex_banking/lists"}