Post-Conditions
A unique security mechanism on Stacks to protect user funds
What are post-conditions?
Simple example
import { request } from '@stacks/connect'
import type { TransactionResult } from '@stacks/connect/dist/types/methods'
import { Pc } from '@stacks/transactions'
let postCond_1 = Pc.principal('ST11V9ZN6E6VG72SHMAVM9GDE30VD3VGW5Q1W9WX3')
.willSendEq(1)
.ft('ST1F7QA2MDF17S807EPA36TSS8AMEFY4KA9TVGWXT.sbtc-token', 'sbtc-token')
let result: TransactionResult = await request('stx_callContract', {
// ...
postConditions: [postCond_1],
postConditionMode: 'deny',
// ...
})1
2
3
How post-conditions appear to the user


Additional Resources
Last updated
Was this helpful?