TransactionResponse
scrypt-ts / TransactionResponse
Interface: TransactionResponse
Hierarchy
↳
TransactionResponse
Table of contents
Properties
Methods
- _estimateFee
- _getUnspentValue
- addData
- addDummyInput
- addInput
- addInputFromPrevTx
- addOutput
- applySignature
- change
- checkFeeRate
- dummyChange
- enableRBF
- fee
- feePerKb
- from
- fromBuffer
- fromString
- getChangeAddress
- getChangeAmount
- getChangeOutput
- getEstimateFee
- getFee
- getInputAmount
- getLockTime
- getOutputAmount
- getPreimage
- getSerializationError
- getSignature
- hasWitnesses
- inspect
- isCoinbase
- isFullySigned
- isRBF
- isSealed
- lockUntilBlockHeight
- lockUntilDate
- prevouts
- seal
- sealAsync
- serialize
- setInputScript
- setInputScriptAsync
- setInputSequence
- setLockTime
- setOutput
- sign
- to
- toBuffer
- toObject
- uncheckedSerialize
- verify
- verifyInputScript
- verifyScript
- verifySignature
Properties
_estimateSize
• _estimateSize: number
Inherited from
Defined in
node_modules/bsv/index.d.ts:963
hash
• Readonly
hash: string
Inherited from
Defined in
node_modules/bsv/index.d.ts:904
id
• Readonly
id: string
Inherited from
Defined in
node_modules/bsv/index.d.ts:903
inputAmount
• Readonly
inputAmount: number
Inherited from
Defined in
node_modules/bsv/index.d.ts:905
inputs
• inputs: Input
[]
Inherited from
Defined in
node_modules/bsv/index.d.ts:901
nLockTime
• nLockTime: number
Inherited from
Defined in
node_modules/bsv/index.d.ts:908
nid
• nid: string
Inherited from
Defined in
node_modules/bsv/index.d.ts:907
outputAmount
• Readonly
outputAmount: number
Inherited from
Defined in
node_modules/bsv/index.d.ts:906
outputs
• outputs: Output
[]
Inherited from
Defined in
node_modules/bsv/index.d.ts:902
Methods
_estimateFee
▸ _estimateFee(): number
Returns
number
Inherited from
Defined in
node_modules/bsv/index.d.ts:962
_getUnspentValue
▸ _getUnspentValue(): number
Returns
number
Inherited from
Defined in
node_modules/bsv/index.d.ts:961
addData
▸ addData(value
): TransactionResponse
Parameters
Name | Type |
---|---|
value | string | Buffer |
Returns
Inherited from
Defined in
node_modules/bsv/index.d.ts:933
addDummyInput
▸ addDummyInput(script
, satoshis
): TransactionResponse
Parameters
Name | Type |
---|---|
script | Script |
satoshis | number |
Returns
Inherited from
Defined in
node_modules/bsv/index.d.ts:987
addInput
▸ addInput(input
, outputScript?
, satoshis?
): TransactionResponse
Parameters
Name | Type |
---|---|
input | Input |
outputScript? | string | Script |
satoshis? | number |
Returns
Inherited from
Defined in
node_modules/bsv/index.d.ts:927
addInputFromPrevTx
▸ addInputFromPrevTx(prevTx
, outputIndex?
): TransactionResponse
Parameters
Name | Type |
---|---|
prevTx | Transaction |
outputIndex? | number |
Returns
Inherited from
Transaction.addInputFromPrevTx
Defined in
node_modules/bsv/index.d.ts:986
addOutput
▸ addOutput(output
): TransactionResponse
Parameters
Name | Type |
---|---|
output | Output |
Returns
Inherited from
Defined in
node_modules/bsv/index.d.ts:932
applySignature
▸ applySignature(sig
): TransactionResponse
Parameters
Name | Type |
---|---|
sig | Object |
sig.inputIndex | number |
sig.publicKey | PublicKey |
sig.signature | Signature |
sig.sigtype | number |
Returns
Inherited from
Defined in
node_modules/bsv/index.d.ts:925
change
▸ change(address
): TransactionResponse
Parameters
Name | Type |
---|---|
address | string | Address |
Returns
Inherited from
Defined in
node_modules/bsv/index.d.ts:918
checkFeeRate
▸ checkFeeRate(feePerKb?
): boolean
Parameters
Name | Type |
---|---|
feePerKb? | number |
Returns
boolean
Inherited from
Defined in
node_modules/bsv/index.d.ts:982
dummyChange
▸ dummyChange(): TransactionResponse
Returns
Inherited from
Defined in
node_modules/bsv/index.d.ts:988
enableRBF
▸ enableRBF(): TransactionResponse
Returns
Inherited from
Defined in
node_modules/bsv/index.d.ts:947
fee
▸ fee(amount
): TransactionResponse
Parameters
Name | Type |
---|---|
amount | number |
Returns
Inherited from
Defined in
node_modules/bsv/index.d.ts:919
feePerKb
▸ feePerKb(amount
): TransactionResponse
Parameters
Name | Type |
---|---|
amount | number |
Returns
Inherited from
Defined in
node_modules/bsv/index.d.ts:920
from
▸ from(utxos
): TransactionResponse
Parameters
Name | Type |
---|---|
utxos | IUnspentOutput | IUnspentOutput [] |
Returns
Inherited from
Defined in
node_modules/bsv/index.d.ts:912
fromBuffer
▸ fromBuffer(buffer
): TransactionResponse
Parameters
Name | Type |
---|---|
buffer | Buffer |
Returns
Inherited from
Defined in
node_modules/bsv/index.d.ts:916
fromString
▸ fromString(rawTxHex
): TransactionResponse
Parameters
Name | Type |
---|---|
rawTxHex | string |
Returns
Inherited from
Defined in
node_modules/bsv/index.d.ts:915
getChangeAddress
▸ getChangeAddress(): Address
Returns
Inherited from
Defined in
node_modules/bsv/index.d.ts:940
getChangeAmount
▸ getChangeAmount(): number
Returns
number
Inherited from
Defined in
node_modules/bsv/index.d.ts:980
getChangeOutput
▸ getChangeOutput(): Output
Returns
Inherited from
Defined in
node_modules/bsv/index.d.ts:939
getEstimateFee
▸ getEstimateFee(): number
Returns
number
Inherited from
Defined in
node_modules/bsv/index.d.ts:981
getFee
▸ getFee(): number
Returns
number
Inherited from
Defined in
node_modules/bsv/index.d.ts:938
getInputAmount
▸ getInputAmount(inputIndex
): number
Parameters
Name | Type |
---|---|
inputIndex | number |
Returns
number
Inherited from
Defined in
node_modules/bsv/index.d.ts:1003
getLockTime
▸ getLockTime(): number
| Date
Returns
number
| Date
Inherited from
Defined in
node_modules/bsv/index.d.ts:941
getOutputAmount
▸ getOutputAmount(outputIndex
): number
Parameters
Name | Type |
---|---|
outputIndex | number |
Returns
number
Inherited from
Defined in
node_modules/bsv/index.d.ts:1004
getPreimage
▸ getPreimage(inputIndex
, sigtype?
, isLowS?
): string
Parameters
Name | Type |
---|---|
inputIndex | number |
sigtype? | number |
isLowS? | boolean |
Returns
string
Inherited from
Defined in
node_modules/bsv/index.d.ts:985
getSerializationError
▸ getSerializationError(opts?
): any
Parameters
Name | Type |
---|---|
opts? | object |
Returns
any
Inherited from
Transaction.getSerializationError
Defined in
node_modules/bsv/index.d.ts:959
getSignature
▸ getSignature(inputIndex
, privateKey?
, sigtype?
): string
| string
[]
Parameters
Name | Type |
---|---|
inputIndex | number |
privateKey? | PrivateKey | PrivateKey [] |
sigtype? | number |
Returns
string
| string
[]
Inherited from
Defined in
node_modules/bsv/index.d.ts:984
hasWitnesses
▸ hasWitnesses(): boolean
Returns
boolean
Inherited from
Defined in
node_modules/bsv/index.d.ts:937
inspect
▸ inspect(): string
Returns
string
Inherited from
Defined in
node_modules/bsv/index.d.ts:950
isCoinbase
▸ isCoinbase(): boolean
Returns
boolean
Inherited from
Defined in
node_modules/bsv/index.d.ts:945
isFullySigned
▸ isFullySigned(): boolean
Returns
boolean
Inherited from
Defined in
node_modules/bsv/index.d.ts:957
isRBF
▸ isRBF(): boolean
Returns
boolean
Inherited from
Defined in
node_modules/bsv/index.d.ts:948
isSealed
▸ isSealed(): boolean
Returns
boolean
Inherited from
Defined in
node_modules/bsv/index.d.ts:979
lockUntilBlockHeight
▸ lockUntilBlockHeight(height
): TransactionResponse
Parameters
Name | Type |
---|---|
height | number |
Returns
Inherited from
Transaction.lockUntilBlockHeight
Defined in
node_modules/bsv/index.d.ts:935
lockUntilDate
▸ lockUntilDate(time
): TransactionResponse
Parameters
Name | Type |
---|---|
time | number | Date |
Returns
Inherited from
Defined in
node_modules/bsv/index.d.ts:934
prevouts
▸ prevouts(): string
Returns
string
Inherited from
Defined in
node_modules/bsv/index.d.ts:983
seal
▸ seal(): TransactionResponse
Returns
Inherited from
Defined in
node_modules/bsv/index.d.ts:977
sealAsync
▸ sealAsync(): Promise
<TransactionResponse
>
Returns
Promise
<TransactionResponse
>
Inherited from
Defined in
node_modules/bsv/index.d.ts:978
serialize
▸ serialize(opts?
): string
Parameters
Name | Type |
---|---|
opts? | object |
Returns
string
Inherited from
Defined in
node_modules/bsv/index.d.ts:951
setInputScript
▸ setInputScript(inputIndex
, unlockingScript
): TransactionResponse
Parameters
Name | Type |
---|---|
inputIndex | number | { inputIndex : number ; isLowS? : boolean ; privateKey? : PrivateKey | PrivateKey [] ; sigtype? : number } |
unlockingScript | Script | (tx : Transaction , outputInPrevTx : Output ) => Script |
Returns
Inherited from
Defined in
node_modules/bsv/index.d.ts:964
setInputScriptAsync
▸ setInputScriptAsync(inputIndex
, callback
): Promise
<TransactionResponse
>
Parameters
Name | Type |
---|---|
inputIndex | number | { inputIndex : number ; isLowS? : boolean ; sigtype? : number } |
callback | (tx : Transaction , outputInPrevTx : Output ) => Promise <Script > |
Returns
Promise
<TransactionResponse
>
Inherited from
Transaction.setInputScriptAsync
Defined in
node_modules/bsv/index.d.ts:970
setInputSequence
▸ setInputSequence(inputIndex
, sequence
): TransactionResponse
Parameters
Name | Type |
---|---|
inputIndex | number |
sequence | number |
Returns
Inherited from
Defined in
node_modules/bsv/index.d.ts:975
setLockTime
▸ setLockTime(t
): TransactionResponse
Parameters
Name | Type |
---|---|
t | number |
Returns
Inherited from
Defined in
node_modules/bsv/index.d.ts:942
setOutput
▸ setOutput(outputIndex
, output
): TransactionResponse
Parameters
Name | Type |
---|---|
outputIndex | number |
output | Output | (tx : Transaction ) => Output |
Returns
Inherited from
Defined in
node_modules/bsv/index.d.ts:976
sign
▸ sign(privateKey
, sigtype?
): TransactionResponse
Parameters
Name | Type |
---|---|
privateKey | string | string [] | PrivateKey | PrivateKey [] |
sigtype? | number |
Returns
Inherited from
Defined in
node_modules/bsv/index.d.ts:921
to
▸ to(address
, amount
): TransactionResponse
Parameters
Name | Type |
---|---|
address | string | Address | Address [] |
amount | number |
Returns
Inherited from
Defined in
node_modules/bsv/index.d.ts:917
toBuffer
▸ toBuffer(): Buffer
Returns
Buffer
Inherited from
Defined in
node_modules/bsv/index.d.ts:955
toObject
▸ toObject(): any
Returns
any
Inherited from
Defined in
node_modules/bsv/index.d.ts:954
uncheckedSerialize
▸ uncheckedSerialize(): string
Returns
string
Inherited from
Transaction.uncheckedSerialize
Defined in
node_modules/bsv/index.d.ts:952
verify
▸ verify(): string
| true
Returns
string
| true
Inherited from
Defined in
node_modules/bsv/index.d.ts:944
verifyInputScript
▸ verifyInputScript(inputIndex
): Object
Deprecated
please use verifyScript
instead
Parameters
Name | Type |
---|---|
inputIndex | number |
Returns
Object
Name | Type |
---|---|
error | string |
failedAt | any |
success | boolean |
Inherited from
Defined in
node_modules/bsv/index.d.ts:993
verifyScript
▸ verifyScript(inputIndex
): Object
Parameters
Name | Type |
---|---|
inputIndex | number |
Returns
Object
Name | Type |
---|---|
error | string |
failedAt | any |
success | boolean |
Inherited from
Defined in
node_modules/bsv/index.d.ts:998
verifySignature
▸ verifySignature(sig
, pubkey
, nin
, subscript
, satoshisBN
, flags
): boolean
Parameters
Name | Type |
---|---|
sig | Signature |
pubkey | PublicKey |
nin | number |
subscript | Script |
satoshisBN | BN |
flags | number |
Returns
boolean
Inherited from
Defined in
node_modules/bsv/index.d.ts:926