Function standardPrincipalCVFromAddress

  • Converts stx address in to StandardPrincipalCV clarity type

    Parameters

    Returns StandardPrincipalCV

    returns instance of type StandardPrincipalCV

    Example

     import { standardPrincipalCVFromAddress, Address  } from '@stacks/transactions';

    const address: Address = {
    type: 0,
    version: 22,
    hash160: 'a5d9d331000f5b79578ce56bd157f29a9056f0d6'
    };

    const principalCV = standardPrincipalCVFromAddress(address);
    // { type: 5, address: { type: 0, version: 22, hash160: 'a5d9d331000f5b79578ce56bd157f29a9056f0d6' } }

    See

    clarity test cases for more examples

Generated using TypeDoc