Multisig Expenses Outings with Bitcoin-Cli: A Step by Step Guide
As a multisignature portfolio user (MS), the spending funds for your descriptor portfolio are crucial to effectively manage your assets. In this article, we will guide you throughout the process of using Bitcoin-Cli to spend multisig outings in a financial transaction.
Prerequisite
- You have a portfolio description with several addresses and multisignations activated.
- You have created a «TX1» Financing Transaction which includes the desired expenditure amounts for each address.
Step 1: Create a Financing Transaction with the Description Outputs
To create a financial transaction, you can use the following Bitcoin Command:
`bash
Bitcoind -Regtet -quist -Cquerver = 0.0.0.0: 8332 -CONFIG = Native -Datadir = / Path / To / Directory -Thinx = 0 Txout
'
Replaceby the access path to your description Wallet file (for Example,
Descriptor.conf).
This will create a new Financing Transaction in Regtest Mode. You can check that the transaction has been created by checking the output of the "Regtest" console:
bash
Regteset
'
Step 2: Get the Expense Amounts for Each Address
To spend funds from your description Portfolio, you must get the spending amounts for each address. You can do this using the following command:
bash
Bitcoind -Regtet -quist -Cquerver = 0.0.0.0.0: 8332 -Config = Native -Datadir = / Path / To / Directory -Thindex = 0 Txout
'
This will release a table of expenditure amounts for each address of the financial transaction.
Step 3: Create A Wallet File Description With Multisig Descriptors
To use multisig outputs, you need to create a description portfolio file that includes multisig descriptors. You can do this using the following command:
bash
Bitcoind -Regtet -quist -Cquerver = 0.0.0.0.0: 8332 -Config = Native -Datadir = / Path / To / Directory -Thindex = 0 Txout
'
This will release a table of multisig descriptions for each address of the Financing Transaction.
Step 4: Spend The Funds of Your Description Portfolio
Now that you have spending amounts and multisig descriptors, you can use Bitcoin-Cli to spend funds from your description Portfolio. You can do this using the following command:
bash
Bitcoind -Regtet -quist -Cquerver = 0.0.0.0.0: 8332 -Config = Native -Datadir = / Path / To / Directory -Thindex = 0 Txout
'
Replace "
Example of Use Cases
Suppose you have a description.conf Description Portfolio File which includes the following Multisig Descriptors:
`Json
[
{
"Address": "Addr1",
"Multisig_index": 2,
"expense_amount": [
{"Amount": 100},
{"Amount": 200}
]]]]
},
{
"Address": "Addr2",
"Multisig_index": 3,
"expense_amount": [
{"Amount": 50},
{"Amount": 75}
]]]]
}
]]]]
'
And a “TX1” Financing Transaction which includes the desired expenditure amount:
` Json
{
«TXID»: «1234567890ABCDEF»,
«Vout»: [1, 2],
«Outpoints»: [
{
«Prevout»: null,
«quantity_n»: {«n»: 100},
«Scriptsig»: [{«Pubkey»: {«Hash»: «12 …»}}, {«Pubkey»: {«Hash»: «13 …»}}, {«Pubkey»: {» Hash «:» 14 … «}}],
«quantity_out»: {«n»: 200}
},
{
«Prevout»: null,
«quantity_n»: {«n»: 50},
«Scriptsig»: [{«Pubkey»: {«Hash»: «12 …»}}, {«Pubkey»: {«Hash»: «13 …»}}, {«Pubkey»: {» Hash «:» 14 …