Create ContractPrincipalCV from Address type
returns instance of type ContractPrincipalCV
import { contractPrincipalCVFromAddress, createLPString, createAddress } from '@stacks/transactions'; const contractAddressCV = contractPrincipalCVFromAddress(createAddress('SP2JXKMSH007NPYAQHKJPQMAQYAD90NQGTVJVQ02B'), createLPString('test')); // { type: 6, address: { type: 0, version: 22, hash160: 'a5d9d331000f5b79578ce56bd157f29a9056f0d6' }, contractName: { type: 2, content: 'test', lengthPrefixBytes: 1, maxLengthBytes: 128 } }
clarity test cases for more examples
value to be converted to ContractPrincipalCV clarity type
Generated using TypeDoc
Create ContractPrincipalCV from Address type
Returns
returns instance of type ContractPrincipalCV
Example
See
clarity test cases for more examples