Skip to main content

StdUtils

bitcoinjs-lib v0.2.9-beta.16


bitcoinjs-lib / StdUtils

Class: StdUtils

Defined in: packages/scrypt-ts-btc/src/smart-contract/builtin-libs/stdUtils.ts:7

The contract library class. To write a contract library, extend this class as such:

Example​

class YourSmartContractLib extends SmartContractLib {
// your library functions code here
}

Extends​

Constructors​

new StdUtils()​

new StdUtils(...args): StdUtils

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

Parameters​

args​

...SupportedParamType[]

Returns​

StdUtils

Inherited from​

SmartContractLib.constructor

Library​

checkInt32()​

static checkInt32(i, b): boolean

Defined in: packages/scrypt-ts-btc/src/smart-contract/builtin-libs/stdUtils.ts:17

Checks if a ByteString is equivalent to a number

Parameters​

i​

Int32

a number

b​

ByteString

a ByteString

Returns​

boolean

true if success

Onchain​

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