unisat-wallet / dev-support

14 stars 11 forks source link

Are all the returned utxos confirmed? #6

Closed sclongyang closed 3 months ago

sclongyang commented 3 months ago

Hello, using the UniSat API:Get non inscription UTXO list by address. The return value of "https://open-api.unisat.io/v1/indexer/address/1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2/utxo-data?cursor=0&size=2" is: { "totalConfirmed": 706, "totalUnconfirmed": 0, "totalUnconfirmedSpend": 0, "utxo": [ { "txid": "f34723ed744ea6b9f134ffdb89fb791dc47da271dd8a637aea7c3fe5e2792721", "vout": 0, "satoshi": 6510, "scriptType": "76a91488ac", "scriptPk": "76a91477bff20c60e522dfaa3350c39b030a5d004e839a88ac", "codeType": 5, "address": "1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2", "height": 835410, "idx": 1926, "isOpInRBF": false, "isSpent": false, "inscriptions": [] } ] } My question is: Are all the UTXOs in the utxo array confirmed? Thank you for your help!

huanniangstudio commented 3 months ago

No, it will include unconfirmed UTXOs. You can determine whether it is unconfirmed by the height field. It is unconfirmed when height == 4194303.

sclongyang commented 3 months ago

thank you ! And why is the strange num 4194303?