StdUtils
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
Inherited from
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
a number
b
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
artifact
static
artifact:Artifact
Defined in: packages/scrypt-ts-btc/src/smart-contract/smartContractLib.ts:15
Inherited from
stateType?
static
optional
stateType:string
Defined in: packages/scrypt-ts-btc/src/smart-contract/smartContractLib.ts:16
Inherited from
loadArtifact()
static
loadArtifact(artifact
): typeofSmartContractLib
Defined in: packages/scrypt-ts-btc/src/smart-contract/smartContractLib.ts:18
Parameters
artifact
Returns
typeof SmartContractLib