View UTXO

Overview

You can view the unspent transaction output (UTXO) for any wallet containing UTXO-based coins. This is helpful, because a certain amount of UTXO is included on every outgoing transaction to cover blockchain fees. Therefore, the available UTXO in your wallet is impacted by the UTXO locked to transactions pending approval.

Prerequisites

Steps

  • SDK
  • API
1 2 3 4 wallet.unspents().then(function (unspents) { // print unspents console.dir(unspents); });

Step Result

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 { "coin": "tbtc", "unspents": [ { "id": "003f688cc349f1fca8ac5ffa21671ca911b6ef351085c60733ed8c2ebf162cb8:2", "address": "2MsKxhhkDo5WaLaYRGA9Cr3iSQPyXsu6Fi2", "value": 0, "valueString": "2000000", "blockHeight": 0, "date": "2017-03-25T23:01:40.248Z", "coinbase": true, "wallet": "59cd72485007a239fb00282ed480da1f", "fromWallet": "59cd72485007a239fb00282ed480da1f", "chain": 0, "index": 0, "redeemScript": "522102f1e990044d2a8be43d5b500bbdcb36277b97a4b07e01c5101ae8ec1568bfd6532103dab7dc82f2fc8c28200c1bdeca9c4cf181e0ca257395829cbd599395048afb57210205422e711827d8356f2fb75334d863941dd7eb45bd5788fa231dc5fa755135b653ae", "witnessScript": "52210351311cd81144e6cbdba561d24dfc22644cb02d053339d4beace03231b3be4f372103a8d0c1a375b9ee1a2411f9f8e18373be7f228b18260f63bbfca48809170ed08b2103c3bd8bd074657bbe9ee6714b31a4a54b6fd5b5cda0e1030122f9bf46b5034f6b53ae", "isSegwit": true } ] }

See Also

API Reference: Get Unspents