From 2b918432fd760e13344b6ebffbe22540aed834ea Mon Sep 17 00:00:00 2001 From: raphjaph Date: Mon, 23 Dec 2024 19:51:29 +0100 Subject: [PATCH] Amend --- docs/src/inscriptions/recursion.md | 44 ++++++++++++++++++++++-------- src/index.rs | 16 +++-------- 2 files changed, 36 insertions(+), 24 deletions(-) diff --git a/docs/src/inscriptions/recursion.md b/docs/src/inscriptions/recursion.md index d2007fafbf..ec86670faa 100644 --- a/docs/src/inscriptions/recursion.md +++ b/docs/src/inscriptions/recursion.md @@ -3231,36 +3231,56 @@ curl -s -H "Accept: application/json" \ } ``` -Server running with runes and inscriptions index: +Server running with runes, inscriptions and sats index: ```bash curl -s -H "Accept: application/json" \ - http://0.0.0.0:80/r/utxo/4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b:0 + http://0.0.0.0:80/r/utxo/626860df36c1047194866c6812f04c15ab84f3690e7cc06fd600c841f1943e05:0 ``` ```json { "inscriptions": [], - "runes": {}, - "sat_ranges": null, - "value": 5000000000 + "runes": { + "UNCOMMON•GOODS": { + "amount": 6845, + "divisibility": 0, + "symbol": "⧉" + } + }, + "sat_ranges": [ + [ + 1905800627509113, + 1905800627509443 + ] + ], + "value": 330 } ``` -Multiple assets in output with server running with runes, inscriptions and sats -index: +Multiple assets in output with server running with runes and inscriptions index +but no sats index. +sats index: ```bash curl -s -H "Accept: application/json" \ - http://0.0.0.0:80/r/utxo/ + http://0.0.0.0:80/r/utxo/626860df36c1047194866c6812f04c15ab84f3690e7cc06fd600c841f1943e05:0 ``` ```json { - "inscriptions": [], // TODO - "runes": {}, // TODO - "sat_ranges": [], // TODO - "value": 5000000000 + "inscriptions": [ + "6fb976ab49dcec017f1e201e84395983204ae1a7c2abf7ced0a85d692e442799i0" + ], + "runes": { + "UNCOMMON•GOODS": { + "amount": 6845, + "divisibility": 0, + "symbol": "⧉" + } + }, + "sat_ranges": null, + "value": 330 } ``` diff --git a/src/index.rs b/src/index.rs index 5fcc2ae130..16122a6ee8 100644 --- a/src/index.rs +++ b/src/index.rs @@ -2371,19 +2371,11 @@ impl Index { return Ok(None); }; - let inscriptions = self.get_inscriptions_for_output(outpoint)?; - - let runes = self.get_rune_balances_for_output(outpoint)?; - - let sat_ranges = self.list(outpoint)?; - - let value = utxo_entry.value().parse(self).total_value(); - Ok(Some(api::UtxoRecursive { - inscriptions, - runes, - sat_ranges, - value, + inscriptions: self.get_inscriptions_for_output(outpoint)?, + runes: self.get_rune_balances_for_output(outpoint)?, + sat_ranges: self.list(outpoint)?, + value: utxo_entry.value().parse(self).total_value(), })) }