utxo – create an utility which constructs a transaction utilizing `bcoin` (javascript)?

0
92


This can be a very sophisticated query. bcoin already has a built-in pockets that may do all of those operations for you. There’s a well-documented RESTful HTTP API you’ll be able to learn by right here: http://bcoin.io/api-docs/ to get an concept of what is obtainable. You may also write your individual pockets utility utilizing the bcoin object lessons instantly.

Very broadly nevertheless, this is some suggestions which may curiosity you:

  • Allow Deal with indexing. This can be a function that isn’t at present obtainable in bitcoind but (to date I feel solely indexing by transaction ID is supported). That is switched on with indexAddress: true in bcoin.conf or --index-address on the command line. The handle index will allow you to request the transactions related to a particular handle: http://bcoin.io/api-docs/#get-tx-by-address

  • You’ll want to course of that transaction knowledge and possibly cross-check the UTXO set (so what has been spent already) with the API name http://bcoin.io/api-docs/#get-coin-by-outpoint

  • Take a look at the MTX and Coin objects to assemble a transaction from the UTXO you get well. Now we have a number of guides on transaction dealing with, possibly learn by this: http://bcoin.io/guides/working-with-txs.html

  • Signing transactions with personal keys: I am undecided how your utility will work however it sounds just like the customers must signal the TX themselves?

I recomend you learn by the bcoin API docs and the guides (and naturally, the codebase!). And simply give attention to the default pockets course of for coin choice, transaction composition, signing, and personal key dealing with.

LEAVE A REPLY

Please enter your comment!
Please enter your name here