PostCondition
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');
// Staking post condition
const stakingPc: PostCondition = Pc.principal('STB44HYPYAT2BB2QE513NSP81HTMYWBJP02HPGK6')
.willSendLte(1000000)
.ustxToLock();
// PoX post condition
const poxPc: PostCondition = Pc.principal(
'STB44HYPYAT2BB2QE513NSP81HTMYWBJP02HPGK6'
).willNotPerformPox();Definition
Availability
Member
Available from
StxPostCondition
FungiblePostCondition
NonFungiblePostCondition
StakingPostCondition
PoxPostCondition
Comparator
Meaning
Last updated
Was this helpful?