Skip to main content

TransactionResponse

scrypt-ts / TransactionResponse

Interface: TransactionResponse

Hierarchy

Table of contents

Properties

Methods

Properties

_estimateSize

_estimateSize: number

Inherited from

Transaction._estimateSize

Defined in

node_modules/bsv/index.d.ts:963


hash

Readonly hash: string

Inherited from

Transaction.hash

Defined in

node_modules/bsv/index.d.ts:904


id

Readonly id: string

Inherited from

Transaction.id

Defined in

node_modules/bsv/index.d.ts:903


inputAmount

Readonly inputAmount: number

Inherited from

Transaction.inputAmount

Defined in

node_modules/bsv/index.d.ts:905


inputs

inputs: Input[]

Inherited from

Transaction.inputs

Defined in

node_modules/bsv/index.d.ts:901


nLockTime

nLockTime: number

Inherited from

Transaction.nLockTime

Defined in

node_modules/bsv/index.d.ts:908


nid

nid: string

Inherited from

Transaction.nid

Defined in

node_modules/bsv/index.d.ts:907


outputAmount

Readonly outputAmount: number

Inherited from

Transaction.outputAmount

Defined in

node_modules/bsv/index.d.ts:906


outputs

outputs: Output[]

Inherited from

Transaction.outputs

Defined in

node_modules/bsv/index.d.ts:902

Methods

_estimateFee

_estimateFee(): number

Returns

number

Inherited from

Transaction._estimateFee

Defined in

node_modules/bsv/index.d.ts:962


_getUnspentValue

_getUnspentValue(): number

Returns

number

Inherited from

Transaction._getUnspentValue

Defined in

node_modules/bsv/index.d.ts:961


addData

addData(value): TransactionResponse

Parameters

NameType
valuestring | Buffer

Returns

TransactionResponse

Inherited from

Transaction.addData

Defined in

node_modules/bsv/index.d.ts:933


addDummyInput

addDummyInput(script, satoshis): TransactionResponse

Parameters

NameType
scriptScript
satoshisnumber

Returns

TransactionResponse

Inherited from

Transaction.addDummyInput

Defined in

node_modules/bsv/index.d.ts:987


addInput

addInput(input, outputScript?, satoshis?): TransactionResponse

Parameters

NameType
inputInput
outputScript?string | Script
satoshis?number

Returns

TransactionResponse

Inherited from

Transaction.addInput

Defined in

node_modules/bsv/index.d.ts:927


addInputFromPrevTx

addInputFromPrevTx(prevTx, outputIndex?): TransactionResponse

Parameters

NameType
prevTxTransaction
outputIndex?number

Returns

TransactionResponse

Inherited from

Transaction.addInputFromPrevTx

Defined in

node_modules/bsv/index.d.ts:986


addOutput

addOutput(output): TransactionResponse

Parameters

NameType
outputOutput

Returns

TransactionResponse

Inherited from

Transaction.addOutput

Defined in

node_modules/bsv/index.d.ts:932


applySignature

applySignature(sig): TransactionResponse

Parameters

NameType
sigObject
sig.inputIndexnumber
sig.publicKeyPublicKey
sig.signatureSignature
sig.sigtypenumber

Returns

TransactionResponse

Inherited from

Transaction.applySignature

Defined in

node_modules/bsv/index.d.ts:925


change

change(address): TransactionResponse

Parameters

NameType
addressstring | Address

Returns

TransactionResponse

Inherited from

Transaction.change

Defined in

node_modules/bsv/index.d.ts:918


checkFeeRate

checkFeeRate(feePerKb?): boolean

Parameters

NameType
feePerKb?number

Returns

boolean

Inherited from

Transaction.checkFeeRate

Defined in

node_modules/bsv/index.d.ts:982


dummyChange

dummyChange(): TransactionResponse

Returns

TransactionResponse

Inherited from

Transaction.dummyChange

Defined in

node_modules/bsv/index.d.ts:988


enableRBF

enableRBF(): TransactionResponse

Returns

TransactionResponse

Inherited from

Transaction.enableRBF

Defined in

node_modules/bsv/index.d.ts:947


fee

fee(amount): TransactionResponse

Parameters

NameType
amountnumber

Returns

TransactionResponse

Inherited from

Transaction.fee

Defined in

node_modules/bsv/index.d.ts:919


feePerKb

feePerKb(amount): TransactionResponse

Parameters

NameType
amountnumber

Returns

TransactionResponse

Inherited from

Transaction.feePerKb

Defined in

node_modules/bsv/index.d.ts:920


from

from(utxos): TransactionResponse

Parameters

NameType
utxosIUnspentOutput | IUnspentOutput[]

Returns

TransactionResponse

Inherited from

Transaction.from

Defined in

node_modules/bsv/index.d.ts:912


fromBuffer

fromBuffer(buffer): TransactionResponse

Parameters

NameType
bufferBuffer

Returns

TransactionResponse

Inherited from

Transaction.fromBuffer

Defined in

node_modules/bsv/index.d.ts:916


fromString

fromString(rawTxHex): TransactionResponse

Parameters

NameType
rawTxHexstring

Returns

TransactionResponse

Inherited from

Transaction.fromString

Defined in

node_modules/bsv/index.d.ts:915


getChangeAddress

getChangeAddress(): Address

Returns

Address

Inherited from

Transaction.getChangeAddress

Defined in

node_modules/bsv/index.d.ts:940


getChangeAmount

getChangeAmount(): number

Returns

number

Inherited from

Transaction.getChangeAmount

Defined in

node_modules/bsv/index.d.ts:980


getChangeOutput

getChangeOutput(): Output

Returns

Output

Inherited from

Transaction.getChangeOutput

Defined in

node_modules/bsv/index.d.ts:939


getEstimateFee

getEstimateFee(): number

Returns

number

Inherited from

Transaction.getEstimateFee

Defined in

node_modules/bsv/index.d.ts:981


getFee

getFee(): number

Returns

number

Inherited from

Transaction.getFee

Defined in

node_modules/bsv/index.d.ts:938


getInputAmount

getInputAmount(inputIndex): number

Parameters

NameType
inputIndexnumber

Returns

number

Inherited from

Transaction.getInputAmount

Defined in

node_modules/bsv/index.d.ts:1003


getLockTime

getLockTime(): number | Date

Returns

number | Date

Inherited from

Transaction.getLockTime

Defined in

node_modules/bsv/index.d.ts:941


getOutputAmount

getOutputAmount(outputIndex): number

Parameters

NameType
outputIndexnumber

Returns

number

Inherited from

Transaction.getOutputAmount

Defined in

node_modules/bsv/index.d.ts:1004


getPreimage

getPreimage(inputIndex, sigtype?, isLowS?): string

Parameters

NameType
inputIndexnumber
sigtype?number
isLowS?boolean

Returns

string

Inherited from

Transaction.getPreimage

Defined in

node_modules/bsv/index.d.ts:985


getSerializationError

getSerializationError(opts?): any

Parameters

NameType
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

NameType
inputIndexnumber
privateKey?PrivateKey | PrivateKey[]
sigtype?number

Returns

string | string[]

Inherited from

Transaction.getSignature

Defined in

node_modules/bsv/index.d.ts:984


hasWitnesses

hasWitnesses(): boolean

Returns

boolean

Inherited from

Transaction.hasWitnesses

Defined in

node_modules/bsv/index.d.ts:937


inspect

inspect(): string

Returns

string

Inherited from

Transaction.inspect

Defined in

node_modules/bsv/index.d.ts:950


isCoinbase

isCoinbase(): boolean

Returns

boolean

Inherited from

Transaction.isCoinbase

Defined in

node_modules/bsv/index.d.ts:945


isFullySigned

isFullySigned(): boolean

Returns

boolean

Inherited from

Transaction.isFullySigned

Defined in

node_modules/bsv/index.d.ts:957


isRBF

isRBF(): boolean

Returns

boolean

Inherited from

Transaction.isRBF

Defined in

node_modules/bsv/index.d.ts:948


isSealed

isSealed(): boolean

Returns

boolean

Inherited from

Transaction.isSealed

Defined in

node_modules/bsv/index.d.ts:979


lockUntilBlockHeight

lockUntilBlockHeight(height): TransactionResponse

Parameters

NameType
heightnumber

Returns

TransactionResponse

Inherited from

Transaction.lockUntilBlockHeight

Defined in

node_modules/bsv/index.d.ts:935


lockUntilDate

lockUntilDate(time): TransactionResponse

Parameters

NameType
timenumber | Date

Returns

TransactionResponse

Inherited from

Transaction.lockUntilDate

Defined in

node_modules/bsv/index.d.ts:934


prevouts

prevouts(): string

Returns

string

Inherited from

Transaction.prevouts

Defined in

node_modules/bsv/index.d.ts:983


seal

seal(): TransactionResponse

Returns

TransactionResponse

Inherited from

Transaction.seal

Defined in

node_modules/bsv/index.d.ts:977


sealAsync

sealAsync(): Promise<TransactionResponse>

Returns

Promise<TransactionResponse>

Inherited from

Transaction.sealAsync

Defined in

node_modules/bsv/index.d.ts:978


serialize

serialize(opts?): string

Parameters

NameType
opts?object

Returns

string

Inherited from

Transaction.serialize

Defined in

node_modules/bsv/index.d.ts:951


setInputScript

setInputScript(inputIndex, unlockingScript): TransactionResponse

Parameters

NameType
inputIndexnumber | { inputIndex: number ; isLowS?: boolean ; privateKey?: PrivateKey | PrivateKey[] ; sigtype?: number }
unlockingScriptScript | (tx: Transaction, outputInPrevTx: Output) => Script

Returns

TransactionResponse

Inherited from

Transaction.setInputScript

Defined in

node_modules/bsv/index.d.ts:964


setInputScriptAsync

setInputScriptAsync(inputIndex, callback): Promise<TransactionResponse>

Parameters

NameType
inputIndexnumber | { 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

NameType
inputIndexnumber
sequencenumber

Returns

TransactionResponse

Inherited from

Transaction.setInputSequence

Defined in

node_modules/bsv/index.d.ts:975


setLockTime

setLockTime(t): TransactionResponse

Parameters

NameType
tnumber

Returns

TransactionResponse

Inherited from

Transaction.setLockTime

Defined in

node_modules/bsv/index.d.ts:942


setOutput

setOutput(outputIndex, output): TransactionResponse

Parameters

NameType
outputIndexnumber
outputOutput | (tx: Transaction) => Output

Returns

TransactionResponse

Inherited from

Transaction.setOutput

Defined in

node_modules/bsv/index.d.ts:976


sign

sign(privateKey, sigtype?): TransactionResponse

Parameters

NameType
privateKeystring | string[] | PrivateKey | PrivateKey[]
sigtype?number

Returns

TransactionResponse

Inherited from

Transaction.sign

Defined in

node_modules/bsv/index.d.ts:921


to

to(address, amount): TransactionResponse

Parameters

NameType
addressstring | Address | Address[]
amountnumber

Returns

TransactionResponse

Inherited from

Transaction.to

Defined in

node_modules/bsv/index.d.ts:917


toBuffer

toBuffer(): Buffer

Returns

Buffer

Inherited from

Transaction.toBuffer

Defined in

node_modules/bsv/index.d.ts:955


toObject

toObject(): any

Returns

any

Inherited from

Transaction.toObject

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

Transaction.verify

Defined in

node_modules/bsv/index.d.ts:944


verifyInputScript

verifyInputScript(inputIndex): Object

Deprecated

please use verifyScript instead

Parameters

NameType
inputIndexnumber

Returns

Object

NameType
errorstring
failedAtany
successboolean

Inherited from

Transaction.verifyInputScript

Defined in

node_modules/bsv/index.d.ts:993


verifyScript

verifyScript(inputIndex): Object

Parameters

NameType
inputIndexnumber

Returns

Object

NameType
errorstring
failedAtany
successboolean

Inherited from

Transaction.verifyScript

Defined in

node_modules/bsv/index.d.ts:998


verifySignature

verifySignature(sig, pubkey, nin, subscript, satoshisBN, flags): boolean

Parameters

NameType
sigSignature
pubkeyPublicKey
ninnumber
subscriptScript
satoshisBNBN
flagsnumber

Returns

boolean

Inherited from

Transaction.verifySignature

Defined in

node_modules/bsv/index.d.ts:926