{"id":17749286,"url":"https://github.com/philipqnguyen/cardano_explorer","last_synced_at":"2025-05-13T01:06:03.751Z","repository":{"id":62555120,"uuid":"117053300","full_name":"philipqnguyen/cardano_explorer","owner":"philipqnguyen","description":"A Ruby API wrapper to query the Cardano SL Explorer","archived":false,"fork":false,"pushed_at":"2018-01-25T00:44:19.000Z","size":32,"stargazers_count":10,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-03T18:05:26.911Z","etag":null,"topics":["api-client","api-wrapper","cardano","cardano-explorer","ruby"],"latest_commit_sha":null,"homepage":null,"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/philipqnguyen.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-11T05:13:47.000Z","updated_at":"2023-10-20T16:42:23.000Z","dependencies_parsed_at":"2022-11-03T05:30:32.707Z","dependency_job_id":null,"html_url":"https://github.com/philipqnguyen/cardano_explorer","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philipqnguyen%2Fcardano_explorer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philipqnguyen%2Fcardano_explorer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philipqnguyen%2Fcardano_explorer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philipqnguyen%2Fcardano_explorer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/philipqnguyen","download_url":"https://codeload.github.com/philipqnguyen/cardano_explorer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253487709,"owners_count":21916148,"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":["api-client","api-wrapper","cardano","cardano-explorer","ruby"],"created_at":"2024-10-26T11:06:56.943Z","updated_at":"2025-05-13T01:06:03.713Z","avatar_url":"https://github.com/philipqnguyen.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/philipqnguyen/cardano_explorer.svg?branch=master)](https://travis-ci.org/philipqnguyen/cardano_explorer)\n\n# Cardano Explorer\n\nA Ruby gem that wraps the Cardano SL Explorer API. At the moment, you can\nretrieve summary information on addresses, transactions, and blocks.\n\nAuthor: [Philip Q Nguyen](https://github.com/philipqnguyen) \u003cbr\u003e\nCopyright: Copyright (c) 2018 Philip Q Nguyen \u003cbr\u003e\nLicense: [MIT](http://creativecommons.org/licenses/MIT) \u003cbr\u003e\nInfo: https://github.com/philipqnguyen/cardano_explorer \u003cbr\u003e\nBugs: https://github.com/philipqnguyen/cardano_explorer/issues\n\nIf this is useful to you, consider donating Cardano to:\n`DdzFFzCqrhspCkE7nghFTDKLuVqwXEzYkqzTaZLCZbrKKQEs3Ygy4f6BeP4U6SPLh8yPU4PFpGoBdZejjKG3ksigtkcirrpZusiwzvBy`\n\n## Installation\n\n### Manual:\n\nRun `gem install cardano_explorer`\n\n### Project with Bundler or with Rails\n\nInside your Gemfile add:\n\n```ruby\n# Gemfile\ngem 'cardano_explorer'\n```\n\nThen run `bundle install`\n\n## Usage\n\n### Address\n\nFind a summary detailing the balance of an Address along with other info.\n\n```ruby\naddress_id = 'Ae2tdPwUPEZKmwoy3AU3cXb5Chnasj6mvVNxV1H11997q3VW5ihbSfQwGpm'\naddress = CardanoExplorer::Address.find address_id\naddress.summary #=\u003e\n#  {\n#    {\n#      \"caAddress\"=\u003e\"Ae2tdPwUPEZKmwoy3AU3cXb5Chnasj6mvVNxV1H11997q3VW5ihbSfQwGpm\",\n#      \"caType\"=\u003e\"CPubKeyAddress\",\n#      \"caTxNum\"=\u003e0,\n#      \"caBalance\"=\u003e{\"getCoin\"=\u003e\"0\"},\n#      \"caTxList\"=\u003e[]\n#    }\n#  }\n```\n\n### Transaction\n\nFind a summary of a Transaction.\n\n```ruby\ntransaction_id = '7012fcaabcbc1be16afdaf754125c93e9216058321d4777c13c251d0cb5067fa'\ntransaction = CardanoExplorer::Transaction.find transaction_id\ntransaction.summary #=\u003e\n# {\n#   \"ctsId\" =\u003e \"7012fcaabcbc1be16afdaf754125c93e9216058321d4777c13c251d0cb5067fa\",\n#   \"ctsTxTimeIssued\" =\u003e 1515795491,\n#   \"ctsBlockTimeIssued\" =\u003e 1515795491,\n#   \"ctsBlockHeight\" =\u003e 479560,\n#   \"ctsBlockEpoch\" =\u003e 22,\n#   \"ctsBlockSlot\" =\u003e 4420,\n#   \"ctsBlockHash\" =\u003e \"c9b5db7073b66c19b11549474539578ace4b087a9f80f3a7663e40ffa9795656\",\n#   \"ctsRelayedBy\" =\u003e nil,\n#   \"ctsTotalInput\" =\u003e {\n#     \"getCoin\" =\u003e \"309998772700\"\n#   },\n#   \"ctsTotalOutput\" =\u003e {\n#     \"getCoin\" =\u003e \"309998601630\"\n#   },\n#   \"ctsFees\" =\u003e {\n#     \"getCoin\" =\u003e \"171070\"\n#   },\n#   \"ctsInputs\" =\u003e [\n#     [\n#       \"DdzFFzCqrht7nTVwRaq3p5xxhY8bSWPADVi2SrdVdCogncJgEPdMt1w64aujDBZb6P8G7VaqP5zFJx5iiCkYggaF8v8YRyWujTaEFDrK\",\n#       {\n#         \"getCoin\" =\u003e \"309998772700\"\n#       }\n#     ]\n#   ],\n#   \"ctsOutputs\" =\u003e [\n#     [\n#       \"DdzFFzCqrhtDEqHLUE6NLxTqQvB5Wh8bcCoUjNUxYbvo3zR8fQBvDU6Q8HNJENAqMvCdCYzbWEgiJ1ijWDYfNGL7fo7ayutic3x4hyrE\",\n#       {\n#         \"getCoin\" =\u003e \"308997601630\"\n#       }\n#     ],\n#     [\n#       \"DdzFFzCqrhsnLSqJSwcxFM6CndnsUYESBoXkr8zrTqjXq4uzaeh6spni6bUbZXLAHBjbfCh9YzJN7xyHUV4XTqkg9ivP5NURE9kHF9U6\",\n#       {\n#         \"getCoin\" =\u003e \"1001000000\"\n#       }\n#     ]\n#   ]\n# }\n```\n\nGet the latest transactions.\n\n```ruby\nCardanoExplorer::Transaction.latest #=\u003e\n# [\n#   #\u003cCardanoExplorer::Transaction:0x00000001b39808 @hash=\"d5a71c0a0e59d57d17c2e3466447fdd58e312dd99c0e3d07682b9796ce7aec69\"\u003e,\n#   #\u003cCardanoExplorer::Transaction:0x00000001b397e0 @hash=\"fb91a2d4943e70cd85c65d036962ba915544a5d963d26f4cd3ea8d9eb55d3040\"\u003e,\n#   ...\n#  ]\n```\n\nEach of these is an instance of `CardanoExplorer::Transaction` with its methods.\n\n```ruby\ntransactions = CardanoExplorer::Transaction.latest\ntransactions.first.summary #=\u003e\n# {\n#   \"ctsId\" =\u003e \"7012fcaabcbc1be16afdaf754125c93e9216058321d4777c13c251d0cb5067fa\",\n#   \"ctsTxTimeIssued\" =\u003e 1515795491,\n#   \"ctsBlockTimeIssued\" =\u003e 1515795491,\n#    ...\n# }\n```\n\n### Block\n\nFind a summary of a Block.\n\n```ruby\nblock_id = 'd3fdc8c8ea4050cc87a21cb73110d54e3ec92f8ae76941e8a1957ed6e6a7e0b0'\nblock = CardanoExplorer::Block.find block_id\nblock.summary #=\u003e\n# {\n#   'cbsEntry' =\u003e {\n#     'cbeEpoch' =\u003e 0,\n#     'cbeSlot' =\u003e 29,\n#     'cbeBlkHash' =\u003e 'd3fdc8c8ea4050cc87a21cb73110d54e3ec92f8ae76941e8a1957ed6e6a7e0b0',\n#     'cbeTimeIssued' =\u003e 1506203671,\n#     'cbeTxNum' =\u003e 0,\n#     'cbeTotalSent' =\u003e {\n#       'getCoin' =\u003e '0'\n#     },\n#     'cbeSize' =\u003e 667,\n#     'cbeBlockLead' =\u003e '6c9e14978b9d6629b8703f4f25e9df6ed4814b930b8403b0d45350ea',\n#     'cbeFees' =\u003e {\n#       'getCoin' =\u003e '0'\n#     }\n#   },\n#   'cbsPrevHash' =\u003e '35837ea76e42d5f0bc3309127c9deb92e87d449ffc7d864d5eee3cbd63b2574a',\n#   'cbsNextHash' =\u003e 'bfd2d6b38a6e16e5710d5e6eedefaf30fe7e15753a4cb9e8da95d0a9b10525c5',\n#   'cbsMerkleRoot' =\u003e '0e5751c026e543b2e8ab2eb06099daa1d1e5df47778f7787faab45cdf12fe3a8'\n# }\n```\n\n### Genesis\n\nGet a summary of the genesis block\n\n```ruby\ngenesis = CardanoExplorer::Genesis.new\ngenesis.summary #=\u003e\n# {\n#   'cgsNumTotal' =\u003e 14505,\n#   'cgsNumRedeemed' =\u003e 12535,\n#   'cgsNumNotRedeemed' =\u003e 1970,\n#   'cgsRedeemedAmountTotal' =\u003e {\n#     'getCoin' =\u003e '29083491488000000'\n#   },\n#   'cgsNonRedeemedAmountTotal' =\u003e {\n#     'getCoin' =\u003e '2028993257000000'\n# }\n```\n\nGet the total pages of the genesis block\n\n```ruby\ngenesis = CardanoExplorer::Genesis.new\ngenesis.pages_total #=\u003e 1451\n```\n## Notes\n\n**Denominations**: The quantity of ADA coins is in denominations of Lovelaces.\n1 ADA == 1,000,000 Lovelaces. Learn more about denominations here:\nhttps://cardanodocs.com/cardano/monetary-policy/#treasury-and-fees\n\n## Configuring\n\nYou can change the root url like so:\n\n```ruby\nCardanoExplorer.configuration do |config|\n  config.root_url = 'https://cardanoexplorer.com' # This is the default\nend\n```\n\n## Contributing\n\nIssues and pull requests are welcome on GitHub at https://github.com/philipqnguyen/cardano_explorer. 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## Development and testing\n\nAfter checking out the repo, run `bundle install` to install dependencies. Then, run `bundle exec rake` to run the tests. You can also run `bundle console` for an interactive prompt that will allow you to experiment.\n\n## Releasing\n\nTo 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## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilipqnguyen%2Fcardano_explorer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphilipqnguyen%2Fcardano_explorer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilipqnguyen%2Fcardano_explorer/lists"}