Function contractPrincipalCVFromAddress

  • Create ContractPrincipalCV from Address type

    Parameters

    Returns ContractPrincipalCV

    returns instance of type ContractPrincipalCV

    Example

     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 } }

    See

    clarity test cases for more examples

Generated using TypeDoc