From 858b5c696bb0d6003e304b78b87e2ffa21fa28d4 Mon Sep 17 00:00:00 2001
From: Jessie Mongeon <133128541+jessiemongeon1@users.noreply.github.com>
Date: Thu, 30 Jan 2025 10:04:22 -0600
Subject: [PATCH 1/3] Update runes.mdx
---
.../multi-chain/bitcoin/using-btc/runes.mdx | 58 ++++++++++---------
1 file changed, 32 insertions(+), 26 deletions(-)
diff --git a/docs/developer-docs/multi-chain/bitcoin/using-btc/runes.mdx b/docs/developer-docs/multi-chain/bitcoin/using-btc/runes.mdx
index 5dc075de01..6586125eb0 100644
--- a/docs/developer-docs/multi-chain/bitcoin/using-btc/runes.mdx
+++ b/docs/developer-docs/multi-chain/bitcoin/using-btc/runes.mdx
@@ -8,15 +8,13 @@ import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";
-
-
-Bitcoin Runes are a type of fungible asset deployed on the Bitcoin network. Runes are not reliant on the [Ordinals protocol](ordinals.mdx) like other Bitcoin asset standards such as BRC-20 and SRC-20. Runes are designed to be an efficient and simple asset that utilizes Bitcoin's UTXO model and the `OP_RETURN` opcode. Although Runes aren't reliant on Ordinals, the Rune protocol was created and implemented by the same creator, and is part of the same open source project that Ordinals are.
+Bitcoin Runes are a type of fungible asset deployed on the Bitcoin network. Runes are not reliant on the [Ordinals protocol](ordinals.mdx) like other Bitcoin asset standards such as BRC-20 and SRC-20. Runes are designed to be an efficient and simple asset that utilizes Bitcoin's UTXO model and the `OP_RETURN` opcode. Although Runes aren't reliant on Ordinals, the Rune protocol was created and implemented by the same creator and is part of the same open source project that Ordinals are.
The UTXO transaction model enables each transaction's output to hold information and be treated as digital currency. To initiate a transaction, you must use those outputs as your transaction's input. For Runes specifically, each UTXO can hold a different amount or type of Rune, simplifying the management of tokens on Bitcoin.
-The Bitcoin opcode `OP_RETURN` enables additional information to be attached to a Bitcoin transaction, up to 80 bytes of data. Runes use this `OP_RETURN` value to store the token's data, such as name, symbol, commands, or ID. This token data is referred to as the 'Runestone'.
+The Bitcoin opcode `OP_RETURN` enables additional information to be attached to a Bitcoin transaction, up to 80 bytes of data. Runes use this `OP_RETURN` value to store the token's data, such as name, symbol, commands, or ID. This token data is referred to as the 'Runestone.'
-Creating a Rune is done through a process called 'etching', which refers to submitting a transaction to the Bitcoin network that specifies the Rune's data in the `OP_RETURN` output of a transaction. Once a Rune has been etched, it can be minted through open or closed mints. Open minting allows anyone to mint an instance of the Rune through a mint transaction, while closed minting refers to a set of requirements that must be met in order for the Rune to be minted. When a Rune is initially etched, the creator can set aside a portion of the Runes for themselves before others are minted.
+Creating a Rune is done through a process called 'etching,' which refers to submitting a transaction to the Bitcoin network that specifies the Rune's data in the `OP_RETURN` output of a transaction. Once a Rune has been etched, it can be minted through open or closed mints. Open minting allows anyone to mint an instance of the Rune through a mint transaction, while closed minting refers to a set of requirements that must be met in order for the Rune to be minted. When a Rune is initially etched, the creator can set aside a portion of the Runes for themselves before others are minted.
## Runes on ICP
@@ -79,31 +77,39 @@ pub async fn etch_rune(mut args: EtchingArgs) -> (String, String) {
## Querying Rune information
-To query information about a Rune, you can specify a query call that returns the Rune information for a given UTXO. Here is an example using the Rust [Ordinals crate](https://crates.io/crates/ordinals/0.0.1):
-
-:::info
-The Rust Ordinals crate is not created or maintained by DFINITY. The ICP management canister does not currently provide endpoints to query Ordinal data.
-:::
+To query information about a Rune, you can use the [Runes Indexer canister](https://github.com/octopus-network/runes-indexer) created by [Omnity Network](https://omnity.network/). The Runes Indexer canister can be used to fetch Rune information, etching information for a specific Rune, and Rune balances. For example, to query data about a Rune using the Rune's name, you can make the following call to the Runes Indexer's `get_rune` method:
-```rust
-#[query]
-pub fn get_runes_by_utxo(txid: String, vout: u32) -> Result, OrdError> {
- let k = OutPoint::store(OutPoint {
- txid: Txid::from_str(&txid).map_err(|e| OrdError::Params(e.to_string()))?,
- vout,
- });
- let v =
- crate::outpoint_to_rune_balances(|b| b.get(&k).map(|v| v.deref().iter().map(|i| *i).collect()))
- .unwrap_or_default();
- Ok(v)
-}
+```
+dfx canister call runes-indexer get_rune '("HOPE•YOU•GET•RICH")' --ic
+# Returns:
+(
+ opt record {
+ confirmations = 39_825 : nat32;
+ mints = 81_000 : nat;
+ terms = opt record {
+ cap = opt (81_000 : nat);
+ height = record { opt (840_001 : nat64); opt (844_609 : nat64) };
+ offset = record { null; null };
+ amount = opt (10_000_000 : nat);
+ };
+ etching = "d66de939cb3ddb4d94f0949612e06e7a84d4d0be381d0220e2903aad68135969";
+ turbo = true;
+ premine = 0 : nat;
+ divisibility = 2 : nat8;
+ spaced_rune = "HOPE•YOU•GET•RICH";
+ number = 431 : nat64;
+ timestamp = 1_713_571_767 : nat64;
+ block = 840_000 : nat64;
+ burned = 48_537_380 : nat;
+ rune_id = "840000:846";
+ symbol = opt "🧧";
+ },
+)
```
-
- View the full example.
-
+[View the full API reference](https://github.com/octopus-network/runes-indexer?tab=readme-ov-file#api-reference) for more information.
## Resources
-- [Runes example canister](https://github.com/octopus-network/ord-canister/tree/master)
+- [Runes Indexer canister](https://github.com/octopus-network/runes-indexer)
From 5b8ba84477667717815f9d039d1a1bdba5bd16b0 Mon Sep 17 00:00:00 2001
From: Jessie Mongeon <133128541+jessiemongeon1@users.noreply.github.com>
Date: Thu, 30 Jan 2025 15:48:10 -0600
Subject: [PATCH 2/3] Update
docs/developer-docs/multi-chain/bitcoin/using-btc/runes.mdx
Co-authored-by: Jennifer K. Tran <38402540+jennifertrin@users.noreply.github.com>
---
docs/developer-docs/multi-chain/bitcoin/using-btc/runes.mdx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/developer-docs/multi-chain/bitcoin/using-btc/runes.mdx b/docs/developer-docs/multi-chain/bitcoin/using-btc/runes.mdx
index 6586125eb0..28dba6a4c5 100644
--- a/docs/developer-docs/multi-chain/bitcoin/using-btc/runes.mdx
+++ b/docs/developer-docs/multi-chain/bitcoin/using-btc/runes.mdx
@@ -8,7 +8,7 @@ import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";
-Bitcoin Runes are a type of fungible asset deployed on the Bitcoin network. Runes are not reliant on the [Ordinals protocol](ordinals.mdx) like other Bitcoin asset standards such as BRC-20 and SRC-20. Runes are designed to be an efficient and simple asset that utilizes Bitcoin's UTXO model and the `OP_RETURN` opcode. Although Runes aren't reliant on Ordinals, the Rune protocol was created and implemented by the same creator and is part of the same open source project that Ordinals are.
+Bitcoin Runes are a type of fungible asset deployed on the Bitcoin network. Runes are not reliant on the [Ordinals protocol](ordinals.mdx) unlike other Bitcoin asset standards such as BRC-20 and SRC-20. Runes are designed to be an efficient and simple asset that utilizes Bitcoin's UTXO model and the `OP_RETURN` opcode. Although Runes aren't reliant on Ordinals, the Rune protocol was created and implemented by the same creator and is part of the same open source project that Ordinals are.
The UTXO transaction model enables each transaction's output to hold information and be treated as digital currency. To initiate a transaction, you must use those outputs as your transaction's input. For Runes specifically, each UTXO can hold a different amount or type of Rune, simplifying the management of tokens on Bitcoin.
From 48855294f0c3acf975be61e60dc385c7fb95b736 Mon Sep 17 00:00:00 2001
From: Jessie Mongeon <133128541+jessiemongeon1@users.noreply.github.com>
Date: Fri, 31 Jan 2025 09:18:47 -0600
Subject: [PATCH 3/3] Update runes.mdx
---
docs/developer-docs/multi-chain/bitcoin/using-btc/runes.mdx | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/docs/developer-docs/multi-chain/bitcoin/using-btc/runes.mdx b/docs/developer-docs/multi-chain/bitcoin/using-btc/runes.mdx
index 28dba6a4c5..b1993c3245 100644
--- a/docs/developer-docs/multi-chain/bitcoin/using-btc/runes.mdx
+++ b/docs/developer-docs/multi-chain/bitcoin/using-btc/runes.mdx
@@ -81,7 +81,11 @@ To query information about a Rune, you can use the [Runes Indexer canister](http
```
dfx canister call runes-indexer get_rune '("HOPE•YOU•GET•RICH")' --ic
-# Returns:
+```
+
+Returns:
+
+```json
(
opt record {
confirmations = 39_825 : nat32;