value to be converted to ContractPrincipalCV clarity 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 } }
Generated using TypeDoc
Create ContractPrincipalCV from Address type