From 8a51d4e3146e644fd1e60afa900ac6f79102661a Mon Sep 17 00:00:00 2001 From: c4605 Date: Fri, 14 Mar 2025 12:38:42 +0100 Subject: [PATCH] feat: support @stacks/transaction v6 post condition types --- src/runtime/composeTxOptions.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/runtime/composeTxOptions.ts b/src/runtime/composeTxOptions.ts index 9f2fac8..7ff2fe5 100644 --- a/src/runtime/composeTxOptions.ts +++ b/src/runtime/composeTxOptions.ts @@ -2,9 +2,10 @@ import { AnchorMode, type ClarityValue, type FungiblePostCondition, - type PostCondition, + type FungiblePostConditionWire, PostConditionMode, type StxPostCondition, + type STXPostConditionWire, } from "@stacks/transactions"; import type { StringOnly } from "../utils/helpers"; import type { @@ -13,6 +14,12 @@ import type { ParameterObjOfDescriptor, } from "./contractBase"; +type PostCondition = + | FungiblePostCondition + | StxPostCondition + | FungiblePostConditionWire + | STXPostConditionWire; + export interface ContractCallOptions { contractAddress: string; contractName: string; @@ -35,7 +42,7 @@ export type ComposeTxOptionsFn = < : never, options?: { deployerAddress?: string; - postConditions?: (FungiblePostCondition | StxPostCondition)[]; + postConditions?: PostCondition[]; } ) => ContractCallOptions;