Issuing Multisig outputs with bitcoin-cli: step by step guide
As a multisignature portfolio user (MS), the expenses of funds in the descriptor’s portfolio are crucial for the efficient management of assets. In this article, we will lead you through the process of using Bitcoin-Cli to issue Multisig results in the financing transaction.
Preliminary requirements
- You have a descriptor portfolio with many addresses and multisignatures listed.
- You have created a
TX1
financing transaction, which includes the amounts of expenses desired for each address.
Step 1: Create a financing transaction with descriptor results
To create a financing transaction, you can use the following Bitcoin-Cli command:
`Bash
Bitcoind -Getest -quiet -Server = 0.0.0.0: 8332 -config = native -atadir =/path/directory -txindex = 0 txout <-wlalet -file>
Replacedescriptor.conf
).
This will create a new Financing Transaction in Reotest mode. You can check if the transaction has been created by checking the exit of the “Regg” console:
`Bash
Regitest
Step 2: Get the amounts of expenses for each address
In order to spend funds from the descriptor's portfolio, you must get the amounts of expenses for each address. You can do this using the following command:
Bash
Bitcoind -Getest -quiet -Server = 0.0.0.0: 8332 -config = native -deadir =/path/directory -txindex = 0 txout <-deskryptor -wallet -file> | JQ '. Psable_amountts [] ''
This will reveal a series of amounts of expenses for each address in the financing transaction.
Step 3: Create a Descriptor with Descriptors Multisig
To use Multisig outputs, you must create a descriptor portfolio containing multiSig descriptors. You can do this using the following command:
Bash
Bitcoind -Getest -quiet -Server = 0.0.0.0: 8332 -config = native -deadir =/path/directory -txindex = 0 txout <-deskryptor -wallet -file> | JQ '. Multisig_dicritors [] '
This will lead a series of multisig descriptors for each address in the financing transaction.
Step 4: I spend funds from the descriptor's portfolio
Now that you have the amounts of expenses and descriptors Multisig, you can use bitcoin-cli to spend funds from the descriptor's portfolio. You can do this using the following command:
Bash
Bitcoind -gtest -quiet -Server = 0.0.0.0: 8332 -config = native -deadir =/path/directory -txindex = 0 txout <-deskryptor -wallet -file> | Bitcoin -Cli -gtest -quiet -Server = 0.0.0: 8332 -config = native -dedir =/path/director -txindex = 0 output
Replaceabbreviation of the financing transaction you have created before.
Examples of use
Suppose you have a portfolio of the descriptor descriptor.
`Json
[[[[[
{
"Address": "Addr1",
"Multisig_index": 2,
"Jels_amountts": [
{"Sum": 100},
{"Sum": 200}
]
},
{
"Address": "Addr2",
"Multisig_index": 3,
"Jels_amountts": [
{"Sum": 50},
{"Sum": 75}
]
}
]
And theTX1financing transaction, which includes the desired amounts of expenses:
` Json
{
“Txid”: “1234567890ABCDEF”,
“Vout”: [1, 2],
“Points”: [
{
“Prevoy”: null,
“Kmant_n”: {“n”: 100},
“Scriptsig”: [{“pubkey”: {“hash”: “12 …”}}, {“pubkey”: {“hash”: “13 …”, {“pubkey”: {“hash” : “14 …”}}],
“Quot_out”: {“n”: 200}
},
{
“Prevoy”: null,
“Calm_n”: {“n”: 50},
“Scriptsig”: [{“pubkey”: {“hash”: “12 …”}}, {“pubkey”: {“hash”: “13 …”, {“pubkey”: {“hash” : “14 …
Deixe um comentário