Skip to main content

SHPreimage

scrypt-ts-opcat v1.0.1


scrypt-ts-opcat / SHPreimage

Type Alias: SHPreimage

SHPreimage: object

Defined in: packages/scrypt-ts-opcat/src/smart-contract/types/structs.ts:67

transaction digest for signature verification,

Type declaration

hashOutputs

hashOutputs: ByteString

32 bytes. hash256(output0(value(8 bytes, little endian) + scriptHash(32 bytes) + dataHash(32 bytes)) + output1 + ... + outputN)

hashPrevouts

hashPrevouts: ByteString

32 bytes. hash256(prevout0 + prevout1 + ... + prevoutN)

hashSequences

hashSequences: ByteString

32 bytes. hash256(sequence0(4 bytes, little endian) + sequence1 + ... + sequenceN)

hashSpentAmounts

hashSpentAmounts: ByteString

32 bytes. hash256(spentAmount0(8 bytes, little endian) + spentAmount1 + ... + spentAmountN)

hashSpentDataHashes

hashSpentDataHashes: ByteString

32 bytes. hash256(spentDataHash0(32 bytes) + spentDataHash1 + ... + spentDataHashN)

hashSpentScriptHashes

hashSpentScriptHashes: ByteString

32 bytes. hash256(spentScriptHash0(32 bytes) + spentScriptHash1 + ... + spentScriptHashN)

inputIndex

inputIndex: UInt32

4 bytes little endian.

nLockTime

nLockTime: UInt32

4 bytes little endian.

nSequence

nSequence: ByteString

4 bytes little endian.

nVersion

nVersion: ByteString

4 bytes. version number of the transaction

sigHashType

sigHashType: UInt32

4 bytes little endian.

spentDataHash

spentDataHash: ByteString

32 bytes. current input's prevout data hash, SHA256

spentScriptHash

spentScriptHash: ByteString

32 bytes. current input's prevout script hash, SHA256

value

value: UInt64

8 bytes little endian. spent amount;

See

BIP341

Onchain