OwnerUtils
@opcat-labs/cat-sdk / OwnerUtils
Class: OwnerUtils
Defined in: packages/cat-sdk/src/contracts/utils/ownerUtils.ts:14
The owner utilities for the CAT contracts
Onchain
Extends
SmartContractLib
Constructors
new OwnerUtils()
new OwnerUtils(...
args):OwnerUtils
Defined in: node_modules/@opcat-labs/scrypt-ts-opcat/dist/types/smart-contract/smartContractLib.d.ts:18
Parameters
args
...SupportedParamType[]
Returns
Inherited from
SmartContractLib.constructor
Properties
args
args:
any[]
Defined in: node_modules/@opcat-labs/scrypt-ts-opcat/dist/types/smart-contract/smartContractLib.d.ts:17
Inherited from
SmartContractLib.args
artifact
staticartifact:Artifact
Defined in: node_modules/@opcat-labs/scrypt-ts-opcat/dist/types/smart-contract/smartContractLib.d.ts:14
Inherited from
SmartContractLib.artifact
stateType?
staticoptionalstateType:string
Defined in: node_modules/@opcat-labs/scrypt-ts-opcat/dist/types/smart-contract/smartContractLib.d.ts:15
Inherited from
SmartContractLib.stateType
Methods
checkOwnerAddr()
staticcheckOwnerAddr(ownerAddr):void
Defined in: packages/cat-sdk/src/contracts/utils/ownerUtils.ts:42
Parameters
ownerAddr
ByteString
Returns
void
checkPubKey()
staticcheckPubKey(pubKey):void
Defined in: packages/cat-sdk/src/contracts/utils/ownerUtils.ts:37
Parameters
pubKey
ByteString
Returns
void
checkUserOwner()
staticcheckUserOwner(pubKey,ownerAddr):void
Defined in: packages/cat-sdk/src/contracts/utils/ownerUtils.ts:32
Check if the user public key matches the owner's address
Parameters
pubKey
ByteString
user public key
ownerAddr
ByteString
owner address
Returns
void
loadArtifact()
staticloadArtifact(artifact): typeofSmartContractLib
Defined in: node_modules/@opcat-labs/scrypt-ts-opcat/dist/types/smart-contract/smartContractLib.d.ts:16
Parameters
artifact
Artifact
Returns
typeof SmartContractLib
Inherited from
SmartContractLib.loadArtifact
serialize()
staticserialize(ownerAddr):ByteString
Defined in: packages/cat-sdk/src/contracts/utils/ownerUtils.ts:51
Parameters
ownerAddr
ByteString
Returns
ByteString
toLockingScript()
statictoLockingScript(pubKey):ByteString
Defined in: packages/cat-sdk/src/contracts/utils/ownerUtils.ts:21
Convert public key to P2PKH locking script
Parameters
pubKey
ByteString
user public key
Returns
ByteString
locking script