Associated: Utilizing bitcore to create a transaction with two addresses and alter deal with
I want to create a transaction from addresses A and B sending to handle C
Within the above query I get slightly confused (it appears like hes doing one transaction that sends from addresses A and B to addresses C and D receiving change at deal with E) as a result of it appears like he’s signing it with the 2 receiving addresses!
Normally once I create and signal a tx with Bitcore I signal it with the sending deal with’s non-public key not the receiving deal with (in my case the receiving deal with could be a consumer I don’t personally know)
The bitcore docs say:
To ship a transaction to a multisig deal with, the API is identical as
within the above instance. To spend outputs that require a number of signatures, the method wants additional data: the general public keys of the signers that may unlock that output.
var multiSigTx = new Transaction()
.from(utxo, publicKeys, threshold)
.change(deal with)
.signal(myKeys);
var serialized = multiSigTx.toObject();
The 2 components to this that confuse me are:
- Bitcore quote – To ship a transaction to a multisig deal with…
Is that this totally different from a daily deal with? I discover that the instance is missing .to(deal with, quantity)
- Why is Richard from the associated query signing with the receiving deal with’s non-public keys?
Logically should not my desired motion look one thing like this?:
var transaction=new Bitcore.Transaction()
.payment(payment)
.from([output_A,output_B])
.to(pubkey_C,satoshis-fee)
.change(address_A) //do not unfastened the change
.signal([privatekey_A,privatekey_B]);
output_A is from deal with A and output_B is from deal with B (each my addresses)