From 7aa0fa865e1b19dd48492c1645ffa1bbdf5f971c Mon Sep 17 00:00:00 2001 From: Chris Troutner Date: Wed, 22 Sep 2021 15:40:23 -0700 Subject: [PATCH] fix(decodeOpReturn): Fixed api docs --- src/raw-transactions.js | 3 +++ src/slp/utils.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/raw-transactions.js b/src/raw-transactions.js index 80923ce..067595c 100644 --- a/src/raw-transactions.js +++ b/src/raw-transactions.js @@ -319,6 +319,9 @@ class RawTransactions { const inputTxid = vin.txid const inputVout = vin.vout + // TODO: Coinbase TXs have no input transaction. Figure out how to + // handle this corner case. + // Get the TX details for the input, in order to retrieve the address of // the sender. const txDetailsParent = await this.getRawTransaction(inputTxid, true) diff --git a/src/slp/utils.js b/src/slp/utils.js index 55fd0dc..e1a4003 100644 --- a/src/slp/utils.js +++ b/src/slp/utils.js @@ -921,7 +921,7 @@ class Utils { * const txid = * "266844d53e46bbd7dd37134688dffea6e54d944edff27a0add63dd0908839bc1" * - * const data = await slp.Utils.decodeOpReturn2(txid) + * const data = await bchjs.SLP.Utils.decodeOpReturn(txid) * * console.log(`Decoded OP_RETURN data: ${JSON.stringify(data,null,2)}`) * } catch (error) {