Sunday, December 22, 2024

Create transaction and so forth

Please clarify to me what must be the process for working with a bitcoin-cli / RPC pockets.

For instance:

  1. Create a pockets
  2. Get a brand new tackle
  3. Sending BTC: making a transaction, signing a transaction, sending a transaction or some else?

Making a pockets
——————–

All the things is kind of clear right here, we use:

curl --data-binary '{"jsonrpc": "2.0", "id": "curltest", "technique": "createwallet", "params": {"wallet_name":"WalletName", "avoid_reuse":true , "descriptors":true, "load_on_startup":true}}' -H 'content-type: textual content/plain;' http://127.0.0.1:8332/

or

bitcoin-cli -named createwallet wallet_name=descriptors avoid_reuse=true descriptors=true load_on_startup=true

Getting a brand new tackle
————————

Right here we use getnewaddress, and the questions start: if we use deriveaddresses, then we get a number of addresses. What do these addresses check with, what number of of them can I obtain?

From the documentation:

Arguments:
1. descriptor (string, required) The descriptor.
2. vary (numeric or array, optionally available) If a ranged descriptor is used, this specifies the top or the vary (in [begin,end] notation) to derive.

What’s finish equal to? How can I discover out?

Sending BTC
————–

There are a number of methods:

I acquired the transaction Id, what ought to I do after that? Use createrawtransaction, then signrawtransactionwithwallet, after which sendrawtransaction? Or one thing else?

Thanks.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles