Skip to main content

StateLib

bitcoinjs-lib v0.2.9-beta.16


bitcoinjs-lib / StateLib

Class: StateLib\<T>

Defined in: packages/scrypt-ts-btc/src/smart-contract/builtin-libs/stateLib.ts:11

Library for computing the hash of a state.

Onchain

Extends

Type Parameters

T extends StructObject

Constructors

new StateLib()

new StateLib\<T>(...args): StateLib\<T>

Defined in: packages/scrypt-ts-btc/src/smart-contract/smartContractLib.ts:29

Parameters

args

...SupportedParamType[]

Returns

StateLib\<T>

Inherited from

SmartContractLib.constructor

Other

args

args: any[] = []

Defined in: packages/scrypt-ts-btc/src/smart-contract/smartContractLib.ts:28

Inherited from

SmartContractLib.args


artifact

static artifact: Artifact

Defined in: packages/scrypt-ts-btc/src/smart-contract/smartContractLib.ts:15

Inherited from

SmartContractLib.artifact


stateType?

static optional stateType: string

Defined in: packages/scrypt-ts-btc/src/smart-contract/smartContractLib.ts:16

Inherited from

SmartContractLib.stateType


loadArtifact()

static loadArtifact(artifact): typeof SmartContractLib

Defined in: packages/scrypt-ts-btc/src/smart-contract/smartContractLib.ts:18

Parameters

artifact

Artifact

Returns

typeof SmartContractLib

Inherited from

SmartContractLib.loadArtifact

State

stateHash()

static stateHash\<ST>(this, state): Ripemd160

Defined in: packages/scrypt-ts-btc/src/smart-contract/builtin-libs/stateLib.ts:19

Calculate the hash of the state object

Type Parameters

ST extends StructObject

Parameters

this

(...args) => StateLib\<ST>

state

ST

the state object

Returns

Ripemd160

the hash byte string of the state object

Onchain