{"id":26301249,"url":"https://github.com/octopus-network/runes-indexer","last_synced_at":"2025-03-15T07:05:10.883Z","repository":{"id":255882268,"uuid":"811241466","full_name":"octopus-network/runes-indexer","owner":"octopus-network","description":"An ICP canister for indexing RUNE UTXOs on bitcoin.","archived":false,"fork":false,"pushed_at":"2025-01-15T22:45:10.000Z","size":906,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-16T00:25:24.392Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","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/octopus-network.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":"2024-06-06T08:05:27.000Z","updated_at":"2025-01-15T22:45:11.000Z","dependencies_parsed_at":"2024-09-07T17:22:06.264Z","dependency_job_id":"20215b70-d580-4afc-89a5-beece82a09b4","html_url":"https://github.com/octopus-network/runes-indexer","commit_stats":null,"previous_names":["octopus-network/ord-canister","octopus-network/runes-indexer"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octopus-network%2Frunes-indexer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octopus-network%2Frunes-indexer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octopus-network%2Frunes-indexer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octopus-network%2Frunes-indexer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/octopus-network","download_url":"https://codeload.github.com/octopus-network/runes-indexer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243695544,"owners_count":20332629,"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":[],"created_at":"2025-03-15T07:01:34.284Z","updated_at":"2025-03-15T07:05:10.876Z","avatar_url":"https://github.com/octopus-network.png","language":"Rust","funding_links":[],"categories":["Chain Fusion"],"sub_categories":["Bitcoin"],"readme":"# Runes Indexer (formerly Ord Canister)\n\n![GitHub License](https://img.shields.io/github/license/octopus-network/runes-indexer)\n![Crates.io Version](https://img.shields.io/crates/v/runes-indexer-interface)\n\n\nAn onchain runes indexer on the Internet Computer\n\n## Overview\n\nRunes Indexer is a canister deployed on the [IC](https://internetcomputer.org/) that continuously fetches Bitcoin blocks through [HTTPS outcalls](https://internetcomputer.org/https-outcalls) from Bitcoin RPC. The blocks are verified using IC's [Bitcoin integration](https://internetcomputer.org/docs/current/references/bitcoin-how-it-works). Once verified, the indexer parses and indexes runes information within each block. The implementation aligns with [ord 0.22.1](https://github.com/ordinals/ord/releases/tag/0.22.1).\n\n**Deployment Status:**\n- New Mainnet Deployment: [`kzrva-ziaaa-aaaar-qamyq-cai`](https://dashboard.internetcomputer.org/canister/kzrva-ziaaa-aaaar-qamyq-cai) (Maintained by [Omnity Network](https://omnity.network/))\n\n## Repository Components\n\nThe repository consists of two main components:\n\n### canister\nThe core implementation of the runes indexer that:\n- Fetches blocks via RPC\n- Validates blocks\n- Indexes rune information\n- Handles blockchain reorgs\n- Provides query interfaces for services\n\n### interface\nProvides Rust type definitions for interacting with the Runes Indexer canister. These types enable both Rust applications and other canisters to handle API responses in a type-safe manner.\n\n## API Reference\n\nThe Runes Indexer canister provides several query methods to access indexed rune data. All methods are query calls, which means they are fast and do not consume cycles.\n\n### get_latest_block\nReturns the latest indexed block height and hash.\n\nType signature:\n```candid\nget_latest_block : () -\u003e (nat32, text) query;\n```\n\nParameters:\n- None\n\nReturns:\n- `nat32`: The block height\n- `text`: The block hash\n\nExample:\n```bash\ndfx canister call runes-indexer get_latest_block --ic\n# Returns:\n(\n  879_823 : nat32,\n  \"00000000000000000001aa3e25bf07fee9bacb44e78506b158f6928fd41331d2\",\n)\n```\n\n### get_etching\nRetrieves the rune_id that was etched in a specific transaction.\n\nType signature:\n```candid\nget_etching : (text) -\u003e (opt GetEtchingResult) query;\n```\n\nParameters:\n- `text`: Transaction ID (txid)\n\nReturns:\n- `opt GetEtchingResult`: Optional record containing:\n  - `confirmations`: `nat32` - Number of confirmations\n  - `rune_id`: `text` - The etched rune identifier\n\nExample:\n```bash\ndfx canister call runes-indexer get_etching '(\"d66de939cb3ddb4d94f0949612e06e7a84d4d0be381d0220e2903aad68135969\")' --ic\n# Returns:\n(opt record {\n  confirmations = 39_825 : nat32;\n  rune_id = \"840000:846\"\n})\n```\n\n### get_rune\nRetrieves detailed information about a rune using its spaced rune name.\n\nType signature:\n```candid\nget_rune : (text) -\u003e (opt RuneEntry) query;\n```\n\nParameters:\n- `text`: Spaced rune name (e.g., \"HOPE•YOU•GET•RICH\")\n\nReturns:\n- `opt RuneEntry`: Optional record containing comprehensive rune information:\n  - `confirmations`: `nat32` - Number of confirmations\n  - `rune_id`: `text` - Unique rune identifier\n\nExample:\n```bash\ndfx canister call runes-indexer get_rune '(\"HOPE•YOU•GET•RICH\")' --ic\n# Returns:\n(\n  opt record {\n    confirmations = 39_825 : nat32;\n    mints = 81_000 : nat;\n    terms = opt record {\n      cap = opt (81_000 : nat);\n      height = record { opt (840_001 : nat64); opt (844_609 : nat64) };\n      offset = record { null; null };\n      amount = opt (10_000_000 : nat);\n    };\n    etching = \"d66de939cb3ddb4d94f0949612e06e7a84d4d0be381d0220e2903aad68135969\";\n    turbo = true;\n    premine = 0 : nat;\n    divisibility = 2 : nat8;\n    spaced_rune = \"HOPE•YOU•GET•RICH\";\n    number = 431 : nat64;\n    timestamp = 1_713_571_767 : nat64;\n    block = 840_000 : nat64;\n    burned = 48_537_380 : nat;\n    rune_id = \"840000:846\";\n    symbol = opt \"🧧\";\n  },\n)\n```\n\n### get_rune_by_id\nSimilar to `get_rune`, but uses the rune_id as identifier instead of the spaced rune name.\n\nType signature:\n```candid\nget_rune_by_id : (text) -\u003e (opt RuneEntry) query;\n```\n\nParameters:\n- `text`: Rune ID (e.g., \"840000:846\")\n\nReturns:\n- Same as `get_rune`\n\n### get_rune_balances_for_outputs\nRetrieves rune balances for a list of transaction outputs.\n\nType signature:\n```candid\nget_rune_balances_for_outputs : (vec text) -\u003e (Result) query;\n```\n\nParameters:\n- `vec text`: Array of outpoints in format \"txid:vout\"\n\nReturns:\n- `Result`: Variant containing either:\n  - `Ok`: Vector of optional rune balance records:\n    - `confirmations`: `nat32`\n    - `divisibility`: `nat8`\n    - `amount`: `nat`\n    - `rune_id`: `text`\n    - `symbol`: `opt text`\n  - `Err`: Error information if the query fails\n\nExample:\n```bash\ndfx canister call runes-indexer get_rune_balances_for_outputs '(vec {\n  \"8f6ebbc114872da3ba105ce702e4793bacc1cf199940f217b38c0bd8d9bfda3a:0\";\n  \"f43158badf8866da0b859de4bffe73c2a910996310927c72431cf486e25dd3ab:1\"\n})' --ic\n# Returns:\n(\n  variant {\n    Ok = vec {\n      opt vec {\n        record {\n          confirmations = 112 : nat32;\n          divisibility = 2 : nat8;\n          amount = 19_000_000 : nat;\n          rune_id = \"840000:846\";\n          symbol = opt \"🧧\";\n        };\n      };\n      opt vec {\n        record {\n          confirmations = 61 : nat32;\n          divisibility = 2 : nat8;\n          amount = 2_092_100 : nat;\n          rune_id = \"840000:846\";\n          symbol = opt \"🧧\";\n        };\n      };\n    }\n  },\n)\n```\n\n## Local Development\nRefer to [development-guide.md](./development-guide.md)\n\n## License\n[MIT](LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foctopus-network%2Frunes-indexer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foctopus-network%2Frunes-indexer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foctopus-network%2Frunes-indexer/lists"}