Open thackerronak opened 5 years ago
Currently bitcore-lib has a different format for utxos than what comes from bitcore-node.
Here's an example of the mapping you can use to convert them to bitcore-lib's format
@micahriggan Yes, we have to convert it. Thanks for the quick update.
I'm sorry but I can't seem to figure out what you mean by converting!
This is the result I get for utxos:
{ utxos:
[ { txid: '2c0c11c6b1a0f255e89007bbe3321f5abfc6b694188003549c5908c2282b96e2',
vout: 0,
amount: 0.00012,
satoshis: 12000,
height: 591319,
confirmations: 159 },
{ txid: '1e5489246102f067fa4616cd01a7e6b2865693bdcf08094daf41b58a9b0db43c',
vout: 0,
amount: 0.0001,
satoshis: 10000,
height: 591314,
confirmations: 164 } ],
legacyAddress: '148p6kJmK8w5hw1zTqMVQSqrEh4kuCEkd5',
cashAddress: 'bitcoincash:qq3x9xhu3h35l0fz05sju0q87rwrzl3t3c03km3qf4',
slpAddress: 'simpleledger:qq3x9xhu3h35l0fz05sju0q87rwrzl3t3cr2aqyqht',
scriptPubKey: '76a91422629afc8de34fbd227d212e3c07f0dc317e2b8e88ac' }
and I get the "Invalid TXID in object" error.
I guess my question is: how do I convert this? not the code, but what to match to what?
getting error while creating transaction.