Update TransactionBuilder name
This commit is contained in:
parent
9ec3af712a
commit
2a7eba9f6b
|
@ -128,7 +128,7 @@ Check the list of all supported RPC call at [RpcClient.js](RpcClient.js)
|
||||||
## Creating and sending a Transaction through P2P
|
## Creating and sending a Transaction through P2P
|
||||||
|
|
||||||
The fee of the transaction can be given in `opts` or it will be determined
|
The fee of the transaction can be given in `opts` or it will be determined
|
||||||
by the transaction size. Documentation on the paramets of `TransactionBuilder`
|
by the transaction size. Documentation on the parameters of `TransactionBuilder`
|
||||||
can be found on the source file.
|
can be found on the source file.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
@ -177,9 +177,9 @@ peerman.on('connect', function() {
|
||||||
if (conn) {
|
if (conn) {
|
||||||
var outs = [{address:toAddress, amount:amt}];
|
var outs = [{address:toAddress, amount:amt}];
|
||||||
var opts = {remainderOut: {address: changeAddressString}};
|
var opts = {remainderOut: {address: changeAddressString}};
|
||||||
var Builder = bitcore.TransactionBuilder;
|
var TransactionBuilder = bitcore.TransactionBuilder;
|
||||||
|
|
||||||
var tx = new Builder(opts)
|
var tx = new TransactionBuilder(opts)
|
||||||
.setUnspent(Unspent)
|
.setUnspent(Unspent)
|
||||||
.setOutputs(outs)
|
.setOutputs(outs)
|
||||||
.sign(keys)
|
.sign(keys)
|
||||||
|
|
Loading…
Reference in New Issue