{"id":22243711,"url":"https://github.com/kompendium-ano/factom-ruby-client","last_synced_at":"2025-07-28T01:33:11.280Z","repository":{"id":91351539,"uuid":"219352193","full_name":"kompendium-ano/factom-ruby-client","owner":"kompendium-ano","description":"Ruby JSON-RPC client for the Factom protocol","archived":false,"fork":false,"pushed_at":"2020-05-17T06:18:02.000Z","size":202,"stargazers_count":9,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-26T15:02:47.438Z","etag":null,"topics":["factom","factom-blockchain","factom-protocol","json-rpc-client","ruby"],"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/kompendium-ano.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-03T19:14:47.000Z","updated_at":"2021-04-08T16:37:03.000Z","dependencies_parsed_at":"2023-03-13T17:46:40.031Z","dependency_job_id":null,"html_url":"https://github.com/kompendium-ano/factom-ruby-client","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/kompendium-ano/factom-ruby-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kompendium-ano%2Ffactom-ruby-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kompendium-ano%2Ffactom-ruby-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kompendium-ano%2Ffactom-ruby-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kompendium-ano%2Ffactom-ruby-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kompendium-ano","download_url":"https://codeload.github.com/kompendium-ano/factom-ruby-client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kompendium-ano%2Ffactom-ruby-client/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267451078,"owners_count":24089292,"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","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["factom","factom-blockchain","factom-protocol","json-rpc-client","ruby"],"created_at":"2024-12-03T04:28:39.274Z","updated_at":"2025-07-28T01:33:11.265Z","avatar_url":"https://github.com/kompendium-ano.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ruby JSON-RPC client for Factom API\n\n[![Build Status](https://travis-ci.com/kompendium-llc/factom-ruby-client.svg?branch=master)](https://travis-ci.com/kompendium-llc/factom-ruby-client)\n[![Coverage Status](https://camo.githubusercontent.com/e952701cdf1177e284bbc22087860757252ebb6f/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f7a656e646672616d65776f726b2f7a656e642d636f6e6669672f62616467652e7376673f6272616e63683d646576656c6f70)](https://coveralls.io/github/kompendium-llc/factom-ruby-client?branch=master)\n[![Gem](https://img.shields.io/gem/v/factom-rb.svg?style=flat)](http://rubygems.org/gems/factom-rb \"View this project in Rubygems\")\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/kompendium-llc/factom-ruby-client/blob/master/LICENSE)\n\nA JSON-RPC Ruby client for the Factom protocol. Each response has special ADT(algebraic data type) that automatically converted from JSON response and suitable for further usage in business logic. All responses are available in [Response](https://github.com/kompendium-llc/factom-ruby-client/tree/master/lib/Response) directory along with convinient converters.\n\n* [Installation](#installation)\n* [Config](#config)\n* [Usage](#usage)\n* [Development](#development)\n* [Contribute](#contribute)\n\n## Installation\n\n**Ruby Gem**:\n```bash\ngem install factom-rb\n```\n\n**Git**:\n```bash\ngit clone https://github.com/kompendium-llc/factom-ruby.git\n```\n\n## Config\n\nYou can set multiple types of connections not only local but a remote one.\n\n```ruby\n    # Change default node url or ports\n    require_relative './factom-ruby/lib/config'\n    config = Config.new\n\n    config.setHost(\"https://factomd.net\")\n    config.setPort(8000)\n    config.setWalletdPort(8009)\n```\n\n## Usage\n\nAs a result of each response you'll get a unique structure that available for use in business logic right away.\n\n#### Retreiving a balance\n```ruby\n    require_relative './factom-ruby/lib/Factomd/FactomBalance'\n    balance = FactomBalance.new(config)\n\n    # get ec address balance\n    result = balance.getECAddressBalance \"EC2dTBH2Nc9t9Y7RFD3FYMN5ottoPeHdk6xqUWEc6eHVoBPj6CmH\"\n    puts result\n```\n\n#### Reading Entry Data\n```ruby\n    require_relative './factom-ruby/lib/Factomd/ReadFactomChain'\n\n    rdChain = ReadFactomChain.new(config)\n    readChain = rdChain.readChainEntry \"b11bb4e1dacea726224c05bf863092ba02d301de55c08039f381e6e0ad1cef0d\"\n    puts readChain\n```\n\n####  Writing an Entry\n```ruby\n    require_relative './factom-ruby/lib/FactomWalletd/Compose'\n    require_relative './factom-ruby/lib/Factomd/Chains'\n\n    compose = Compose.new(config)\n    puts(compose.composeEntry(\"48e0c94d00bf14d89ab10044075a370e1f55bcb28b2ff16206d865e192827645\",\"EC2DKSYyRcNWf7RS963VFYgMExo1824HVeCfQ9PGPmNzwrcmgm2r\"))\n\n    chains = Chains.new(config)\n\n    commitEntry = chains.commitEntry(\"00016dcfd0983146e5259a21586d887816878126d2e1dd28d446a11d6ab7987f4dc78f2e4e5c17d763ad62244461094efc15bd4f1b2a899e01037416545862d9990806e17e5fe246310ceacb573703b7a8e7f59e11351a23ad48bc22062ff28246748e90231e980bfe58514d89325855ba189f585c259aaaa4b7a420b3c6704fe692cdd49cc4a962e1fe07569bb35841e98b2aae647aff2c163f67722d51024a28e7f05635d07b61f0093a50289281b4a22bb1dc65bfe4a7ecb74f7bff9c58c580c48943c86b9a0e\")\n    puts commitEntry\n\n    revealChain = chains.revealEntry \"007E18CCC911F057FB111C7570778F6FDC51E189F35A6E6DA683EC2A264443531F000E0005746573745A0005746573745A48656C6C6F20466163746F6D21\"\n    puts revealChain\n```\n\n#### Block Height and Current Minute\n```ruby\n    require_relative './factom-ruby/lib/Factomd/Factoid'\n    require_relative './factom-ruby/lib/Factomd/Chains'\n\n    factoid = Factoid.new(config)\n    heights = factoid.heights\n    puts heights\n\n    chains = Chains.new(config)\n    currentMinute = chains.currentMinute\n    puts currentMinute\n```\n\n#### Sending A Transaction\n```ruby\n    require_relative './factom-ruby/lib/Factomd/Transaction'\n    txn = Transaction.new(config)\n    data = [\n        \"txname\" =\u003e \"test1\",\n        \"inputAddress\" =\u003e \"FA2jK2HcLnRdS94dEcU27rF3meoJfpUcZPSinpb7AwQvPRY6RL1Q\",\n        \"inputAmount\" =\u003e 1000012000,\n        \"outputAddress\" =\u003e \"FA2yeHMMJR6rpjRYGe3Q4ogThHUmByk3WLhTjQDvPrxDoTYF8BbC\",\n        \"outputAmount\" =\u003e 1000000000\n    ]\n    rs = txn.sendTransaction data\n    puts rs\n```\n\n#### Accessing fields by key\n``` ruby\n    debug = Debug.new(config)\n\n    # eg. holdingQueue\n    response = debug.holdingQueue\n    p response.result.Messages\n```\n\n## Testing\n```ruby\n    ruby tests/Factomd.test.rb\n    ruby tests/FactomWalletd.test.rb\n    ruby tests/Debug.test.rb\n```\n## Development\nPlease, feel free to contribute, fork the repo and submit PR. To contribute to the `factom-ruby-client` library, clone the repository, create a feature branch and submit a PRfor review.\n\nAdditional support for the Factom Protocol or library usage can be found on [discord](https://discord.gg/mYmcQM2)\n\n## Learn\n- [Accessing the Factom blockchain from different programming languages](https://medium.com/kompendium-developments/accessing-factom-blockchain-from-different-programming-languages-7f09030efe16)\n- [Building simple blockchain game with Factom](https://medium.com/kompendium-developments/accessing-factom-blockchain-from-different-programming-languages-7f09030efe16)\n\n## Contributions\n\nThe Library developed by Kompendium, LLC in partnership with Kelecorix, Inc and Sergey Bushnyak for the good of the Factom community. While we see the usage of the libraries over the months, the Factom community decided not to support this work in the form of a grant either upfront or as backpay on multiple occasions ([1](https://factomize.com/forums/threads/kompendium-12-back-pay-two-factom-community-sdks-client-libraries-php-ruby.4802/), [2](https://factomize.com/forums/threads/kompendium-12-back-pay-ruby-haskell-client-libraries-for-the-factom-blockchain.2740/), [3](https://factomize.com/forums/threads/back-pay-development-of-4-json-rpc-client-libraries-to-the-factom-community.2513/))\n  \nIf you're an active user or find it useful we strongly encourage you to support our efforts and ensure long maintenance by contributing a small donation to one of the following cryptocurrency addresses:\n  \nBTC: 39oVXpsgsyW8ZgzsnX3sV7HLdtXWfT96qN  \nETH: 0x9cDBA6bb44772259B3A3fb89cf233A147a720f34  \nFCT: FA38cwer93mmPw1HxjScLmK1yF9iJTu5P87T2vdkbuLovm2YXyss  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkompendium-ano%2Ffactom-ruby-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkompendium-ano%2Ffactom-ruby-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkompendium-ano%2Ffactom-ruby-client/lists"}