Suggest that users use `.toObject()` for tx serialization

This commit is contained in:
Esteban Ordano 2015-02-04 10:44:14 -03:00
parent 8686e5b101
commit 68015bfb58
1 changed files with 1 additions and 3 deletions

View File

@ -56,15 +56,13 @@ To send a transaction to a multisig address, the API is the same as in the above
.change(address) .change(address)
.sign(myKeys); .sign(myKeys);
var serialized = multiSigTx.serialize(); var serialized = multiSigTx.toObject();
``` ```
This can be serialized and sent to another party, to complete with the needed signatures: This can be serialized and sent to another party, to complete with the needed signatures:
```javascript ```javascript
var multiSigTx = new Transaction(serialized) var multiSigTx = new Transaction(serialized)
.from(utxo, publicKeys, threshold) // provide info about the multisig output
// (lost on serialization)
.sign(anotherSetOfKeys); .sign(anotherSetOfKeys);
assert(multiSigTx.isFullySigned()); assert(multiSigTx.isFullySigned());