PostCondition

Union type representing the three kinds of post-conditions: STX, fungible token, and non-fungible token.


Usage

import { Pc, PostCondition } from '@stacks/transactions';

// Build post conditions with the Pc builder
const stxPc: PostCondition = Pc.principal('STB44HYPYAT2BB2QE513NSP81HTMYWBJP02HPGK6')
  .willSendEq(10000)
  .ustx();

const ftPc: PostCondition = Pc.principal('STB44HYPYAT2BB2QE513NSP81HTMYWBJP02HPGK6')
  .willSendGte(100)
  .ft('ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.token', 'token-name');

Reference Linkarrow-up-right


Definition

type PostCondition = StxPostCondition | FungiblePostCondition | NonFungiblePostCondition;

StxPostCondition


FungiblePostCondition


NonFungiblePostCondition

Last updated

Was this helpful?