Bitcoin-com / slp-sdk

Simple Ledger Protocol SDK powered by BITBOX
https://developer.bitcoin.com/slp
MIT License
20 stars 32 forks source link

tokenUtxoDetails() #59

Closed christroutner closed 5 years ago

christroutner commented 5 years ago

A convenience function for the SLP.Util class. Taken an array of UTXO data as input and hydrates it with token metadata. This makes it very easy for wallets to determine if a UTXO is safe to spend as BCH, or if it belongs to a SLP token.

Here is an example output for a UTXO belonging to a simple-send SLP transaction:

{
 "txid": "fde117b1f176b231e2fa9a6cb022e0f7c31c288221df6bcb05f8b7d040ca87cb",
 "vout": 1,
 "amount": 0.00000546,
 "satoshis": 546,
 "height": 596089,
 "confirmations": 748,
 "utxoType": "token",
 "tokenId": "497291b8a1dfe69c8daea50677a3d31a5ef0e9484d8bebb610dac64bbc202fb7",
 "tokenTicker": "TOK-CH",
 "tokenName": "TokyoCash",
 "tokenDocumentUrl": "",
 "tokenDocumentHash": "",
 "decimals": 8,
 "tokenQty": 2
}
cgcardona commented 4 years ago

:tada: This PR is included in version 4.9.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: