docs: more fixes.
This commit is contained in:
parent
b65a72b299
commit
2fb7c29781
40
README.md
40
README.md
@ -561,7 +561,7 @@ entire linked list.
|
|||||||
`isSuperMajority`).
|
`isSuperMajority`).
|
||||||
- __isUpgraded(version)__ - Check if block version upgrades the blockchain
|
- __isUpgraded(version)__ - Check if block version upgrades the blockchain
|
||||||
(calls `isSuperMajority`).
|
(calls `isSuperMajority`).
|
||||||
_ __isSuperMajority(version, required)__ - Calculate if the last
|
- __isSuperMajority(version, required)__ - Calculate if the last
|
||||||
`majorityWindow` blocks are of `version`.
|
`majorityWindow` blocks are of `version`.
|
||||||
- __toJSON()__ - Return serialized ChainBlock in JSON format.
|
- __toJSON()__ - Return serialized ChainBlock in JSON format.
|
||||||
- __toRaw()__ - Return serialized ChainBlock in binary ChainDB format.
|
- __toRaw()__ - Return serialized ChainBlock in binary ChainDB format.
|
||||||
@ -1235,17 +1235,17 @@ Usage: `bcoin.tx([options], [block])`
|
|||||||
- __output(options), output(output), output(address, value)__ - Add an output to the
|
- __output(options), output(output), output(address, value)__ - Add an output to the
|
||||||
transaction.
|
transaction.
|
||||||
- `options` can be in the form of:
|
- `options` can be in the form of:
|
||||||
{
|
{
|
||||||
value: [satoshis/big number],
|
value: [satoshis/big number],
|
||||||
script: [deserialized script],
|
script: [deserialized script],
|
||||||
address: [pubkey address or scripthash address],
|
address: [pubkey address or scripthash address],
|
||||||
keys: [array of keys],
|
keys: [array of keys],
|
||||||
m: [m value],
|
m: [m value],
|
||||||
n: [n value],
|
n: [n value],
|
||||||
flags: [nulldata],
|
flags: [nulldata],
|
||||||
scripthash: [true or false],
|
scripthash: [true or false],
|
||||||
lock: [locktime for checklocktimeverify]
|
lock: [locktime for checklocktimeverify]
|
||||||
}
|
}
|
||||||
- __scriptOutput(index/output, options)__ - Compile an output script for the
|
- __scriptOutput(index/output, options)__ - Compile an output script for the
|
||||||
output based on the same options `output()` handles.
|
output based on the same options `output()` handles.
|
||||||
- __signatureHash(index/input, s, type)__ - Return the to-be-signed hash of the
|
- __signatureHash(index/input, s, type)__ - Return the to-be-signed hash of the
|
||||||
@ -1267,14 +1267,14 @@ Usage: `bcoin.tx([options], [block])`
|
|||||||
total value required for the transaction. A hard `fee` can be passed in
|
total value required for the transaction. A hard `fee` can be passed in
|
||||||
(satoshis/big number) which will skip the fee calculation. Calculates the
|
(satoshis/big number) which will skip the fee calculation. Calculates the
|
||||||
necessary change. Returns an object in the form of:
|
necessary change. Returns an object in the form of:
|
||||||
{
|
{
|
||||||
inputs: [array in inputs to add],
|
inputs: [array in inputs to add],
|
||||||
change: [change in satoshis (big number)],
|
change: [change in satoshis (big number)],
|
||||||
cost: [total cost minus fee in satoshis (big number)],
|
cost: [total cost minus fee in satoshis (big number)],
|
||||||
fee: [fee for transaction in satoshis (big number)],
|
fee: [fee for transaction in satoshis (big number)],
|
||||||
total: [total cost including fee in satoshis (big number)],
|
total: [total cost including fee in satoshis (big number)],
|
||||||
kb: [total kb for fee calculation]
|
kb: [total kb for fee calculation]
|
||||||
}
|
}
|
||||||
`inputs` will be `null` if not enough funds were available.
|
`inputs` will be `null` if not enough funds were available.
|
||||||
__NOTE:__ `getUnspent()` should only be called once all outputs have been added.
|
__NOTE:__ `getUnspent()` should only be called once all outputs have been added.
|
||||||
- __fillUnspent(unspent, [changeAddress], [fee])__ - Calls `getUnspent()` and
|
- __fillUnspent(unspent, [changeAddress], [fee])__ - Calls `getUnspent()` and
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user