StateLib
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
Other
args
args:
any[] =[]
Defined in: packages/scrypt-ts-btc/src/smart-contract/smartContractLib.ts:28
Inherited from
artifact
staticartifact:Artifact
Defined in: packages/scrypt-ts-btc/src/smart-contract/smartContractLib.ts:15
Inherited from
stateType?
staticoptionalstateType:string
Defined in: packages/scrypt-ts-btc/src/smart-contract/smartContractLib.ts:16
Inherited from
loadArtifact()
staticloadArtifact(artifact): typeofSmartContractLib
Defined in: packages/scrypt-ts-btc/src/smart-contract/smartContractLib.ts:18
Parameters
artifact
Returns
typeof SmartContractLib
Inherited from
State
stateHash()
staticstateHash\<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
the hash byte string of the state object