{"id":20354268,"url":"https://github.com/moneytrackio/tezos_client","last_synced_at":"2025-04-12T02:33:19.447Z","repository":{"id":36610233,"uuid":"144690606","full_name":"moneytrackio/tezos_client","owner":"moneytrackio","description":"Ruby client for the Tezos blockchain","archived":false,"fork":false,"pushed_at":"2024-02-07T16:51:05.000Z","size":978,"stargazers_count":18,"open_issues_count":6,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-02-07T17:56:47.988Z","etag":null,"topics":["blockchain","liquidity","ruby","ruby-gem","smartpy","tezos","tezos-client"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moneytrackio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2018-08-14T08:21:51.000Z","updated_at":"2023-01-21T02:45:22.000Z","dependencies_parsed_at":"2024-01-31T16:13:29.409Z","dependency_job_id":"0e3ede6d-9678-42f9-9ed0-73983845e785","html_url":"https://github.com/moneytrackio/tezos_client","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moneytrackio%2Ftezos_client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moneytrackio%2Ftezos_client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moneytrackio%2Ftezos_client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moneytrackio%2Ftezos_client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moneytrackio","download_url":"https://codeload.github.com/moneytrackio/tezos_client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224703871,"owners_count":17355711,"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":["blockchain","liquidity","ruby","ruby-gem","smartpy","tezos","tezos-client"],"created_at":"2024-11-14T23:08:01.556Z","updated_at":"2024-11-14T23:08:02.196Z","avatar_url":"https://github.com/moneytrackio.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TezosClient\n\n[![Maintainability](https://api.codeclimate.com/v1/badges/54ab3bbbdc10c1faf933/maintainability)](https://codeclimate.com/github/moneytrackio/tezos_client/maintainability)\n\n[![Build Status](https://travis-ci.org/moneytrackio/tezos_client.svg?branch=master)](https://travis-ci.org/moneytrackio/tezos_client)\n\nTezos Client interacts with Tezos nodes using RPC commands.\n\n## Requirements\n\nTezos client requires SmartPy to be installed in order to work properly.\nTo install it on Linux, you can basically follow the steps coded in travis-script folder.\n\n## Dependency\n\n### michelson-to-micheline\n```bash\nsudo apt-get install nodejs\nnpm i -g michelson-to-micheline\n```\n\n### SmartPy\n[SmartPy](https://smartpy.io/releases/20210317-bc925bb73dc885ac2b4dde9689e805d9b0bc6125/)\n\n```bash\nsh \u003c(curl -s https://smartpy.io/releases/20210317-bc925bb73dc885ac2b4dde9689e805d9b0bc6125/cli/install.sh)\nexport PATH=$PATH:$HOME/smartpy-cli/\n```\n\n### TypeScript (for dev)\n```bash\nnpm install -g typescript\n```\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem \"tezos_client\"\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install tezos_client\n\n## Usage\n\n### Generate Tezos key pairs\n\nGenerate a perfectly random key pair:\n\n```ruby\nclient = TezosClient.new\nkey = subject.generate_key\n          expect(key[:address]).to eq \"tz1RfnzRopJXH32SSDap2wMYGULBAnmHxdP1\"\n# =\u003e {\n#       secret_key: \"edsk4T2fHv5RLL3VSXHz82SQiyFx7vZ4wwtA2u67AvAaw5yqNEvuU2\",\n#       public_key: \"edpkuncp7KSVhV57Qg7odwhMFcnAHnNrMppbitBPKBfvdg6fFVeNjr\",\n#       address: \"tz1a97x7GAvMDyrwwKTLQo131CoidXyUef48\"\n#    }\n```\n\nGenerate a key pair from a seed and a BIP 44 Path:\n\n```ruby\nkey = subject.generate_key(wallet_seed: \"000102030405060708090a0b0c0d0e0f\", path: \"m/44'/1729'/0'/0'/0'\")\n          expect(key[:address]).to eq \"tz1RfnzRopJXH32SSDap2wMYGULBAnmHxdP1\"\n# =\u003e {\n#       secret_key: \"edsk4T2fHv5RLL3VSXHz82SQiyFx7vZ4wwtA2u67AvAaw5yqNEvuU2\",\n#       public_key: \"edpkuncp7KSVhV57Qg7odwhMFcnAHnNrMppbitBPKBfvdg6fFVeNjr\",\n#       address: \"tz1a97x7GAvMDyrwwKTLQo131CoidXyUef48\"\n#    }\n```\nGenerate a key pair from a BIP-39 mnemonic sentence and a BIP 44 Path:\n\n```ruby\nkey = subject.generate_key(\n          mnemonic: \"below dove cushion divide future artefact orange congress maple fiscal flower enable\",\n          path: \"m/44'/1729'/0'/0'/0'\")\n          expect(key[:address]).to eq \"tz1RfnzRopJXH32SSDap2wMYGULBAnmHxdP1\"\n# =\u003e {\n#       secret_key: \"edsk4T2fHv5RLL3VSXHz82SQiyFx7vZ4wwtA2u67AvAaw5yqNEvuU2\",\n#       public_key: \"edpkuncp7KSVhV57Qg7odwhMFcnAHnNrMppbitBPKBfvdg6fFVeNjr\",\n#       address: \"tz1a97x7GAvMDyrwwKTLQo131CoidXyUef48\"\n#    }\n```\n\n\n### Transfer funds\n\n```ruby\nclient = TezosClient.new\n\nclient.transfer(\n    amount: 1,\n    from: \"tz1ZWiiPXowuhN1UqNGVTrgNyf5tdxp4XUUq\",\n    to: \"tz1ZWiiPXowuhN1UqNGVTrgNyf5tdxp4XUUq\",\n    secret_key: \"edsk4EcqupPmaebat5mP57ZQ3zo8NDkwv8vQmafdYZyeXxrSc72pjN\"\n  )\n```\n\n### Call a contract\n\n```ruby\nclient = TezosClient.new\nclient.transfer(\n    amount: 5,\n    from: \"tz1ZWiiPXowuhN1UqNGVTrgNyf5tdxp4XUUq\",\n    to: \"KT1MZTrMDPB42P9yvjf7Cy8Lkjxjj4jetbCt\",\n    secret_key: \"edsk4EcqupPmaebat5mP57ZQ3zo8NDkwv8vQmafdYZyeXxrSc72pjN\",\n    parameters: '\"pro\"'\n  )\n```\n\n### Originate a contract written in SmartPy\n\n```ruby\nscript = File.expand_path(\"./spec/fixtures/demo.py\")\nsource = \"tz1ZWiiPXowuhN1UqNGVTrgNyf5tdxp4XUUq\"\nsecret_key = \"edsk4EcqupPmaebat5mP57ZQ3zo8NDkwv8vQmafdYZyeXxrSc72pjN\"\namount = 0\ninit_params = \"MyContract()\"\nclient = TezosClient.new\n\nres = client.originate_contract(\n    from: source,\n    amount: amount,\n    script: script,\n    secret_key: secret_key,\n    init_params: init_params\n  )\n\nputs \"Origination operation: #{res[:operation_id]}\"\nputs \"Contract address: #{res[:originated_contract]}\"\n```\n\n### Call a contract written in SmartPy\n\n```ruby\nTezosClient.new.call_contract(\n  from: \"tz1ZWiiPXowuhN1UqNGVTrgNyf5tdxp4XUUq\",\n  secret_key: \"edsk4EcqupPmaebat5mP57ZQ3zo8NDkwv8vQmafdYZyeXxrSc72pjN\",\n  to: \"KT1STzq9p2tfW3K4RdoM9iYd1htJ4QcJ8Njs\",\n  amount: 0,\n  entrypoint: \"myEntryPoint\",\n  params: { int: 1 },\n  params_type: :micheline\n)\n```\n\n\n## Options\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/tezos_client. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the TezosClient project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/tezos_client/blob/master/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoneytrackio%2Ftezos_client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoneytrackio%2Ftezos_client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoneytrackio%2Ftezos_client/lists"}