diff --git a/src/runtime/composeTxOptions.ts b/src/runtime/composeTxOptions.ts index 7ff2fe5..961bb2c 100644 --- a/src/runtime/composeTxOptions.ts +++ b/src/runtime/composeTxOptions.ts @@ -14,26 +14,25 @@ import type { ParameterObjOfDescriptor, } from "./contractBase"; -type PostCondition = - | FungiblePostCondition - | StxPostCondition - | FungiblePostConditionWire - | STXPostConditionWire; +type PostConditionPlain = FungiblePostCondition | StxPostCondition; +type PostConditionWire = FungiblePostConditionWire | STXPostConditionWire; +type PostCondition = PostConditionPlain | PostConditionWire; -export interface ContractCallOptions { +export interface ContractCallOptions { contractAddress: string; contractName: string; functionName: string; functionArgs: ClarityValue[]; anchorMode: AnchorMode; postConditionMode: PostConditionMode; - postConditions?: PostCondition[]; + postConditions?: PC[]; } export type ComposeTxOptionsFn = < T extends StringOnly, F extends StringOnly, - Descriptor extends Contracts[T][F] + Descriptor extends Contracts[T][F], + PC extends PostCondition >( contractName: T, functionName: F, @@ -42,9 +41,9 @@ export type ComposeTxOptionsFn = < : never, options?: { deployerAddress?: string; - postConditions?: PostCondition[]; + postConditions?: PC[]; } -) => ContractCallOptions; +) => ContractCallOptions; export const composeTxOptionsFactory = (