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()
staticcheckInt32(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
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