type IntCV = { readonly type: "int" readonly value: bigint }; type UIntCV = { readonly type: "uint" readonly value: bigint }; type BooleanCV = TrueCV | FalseCV; type TrueCV = { readonly type: "true" }; type FalseCV = { readonly type: "false" }; type BufferCV = { readonly type: "buffer" readonly value: string }; type NoneCV = { readonly type: "none" }; type SomeCV = { readonly type: "some" readonly value: ClarityValue }; type ResponseOkCV = { readonly type: "ok" readonly value: ClarityValue }; type ResponseErrorCV = { readonly type: "err" readonly value: ClarityValue }; type StandardPrincipalCV = { readonly type: "address" readonly value: string }; type ContractPrincipalCV = { readonly type: "contract" readonly value: string }; type ListCV = { type: "list" value: ClarityValue[] }; type TupleData = { [key: string]: ClarityValue }; type TupleCV = { type: "tuple" value: TupleData }; type StringAsciiCV = { readonly type: "ascii" readonly value: string }; type StringUtf8CV = { readonly type: "utf8" readonly value: string }; type ClarityValue = IntCV | UIntCV | BooleanCV | BufferCV | NoneCV | SomeCV | ResponseOkCV | ResponseErrorCV | StandardPrincipalCV | ContractPrincipalCV | ListCV | TupleCV | StringAsciiCV | StringUtf8CV; type FungibleComparator = "eq" | "gt" | "gte" | "lt" | "lte"; type NonFungibleComparator = "sent" | "not-sent" | "maybe-sent"; type StxPostCondition = { type: "stx-postcondition" address: string condition: FungibleComparator amount: string | bigint | number }; type FtPostCondition = { type: "ft-postcondition" address: string condition: FungibleComparator asset: string amount: string | bigint | number }; type NftPostCondition = { type: "nft-postcondition" address: string condition: NonFungibleComparator asset: string assetId: ClarityValue }; type StakingPostCondition = { type: "staking-postcondition" address: string condition: FungibleComparator amount: string | bigint | number }; type PoxComparator = "will-not-perform" | "may-perform" | "will-perform"; type PoxPostCondition = { type: "pox-postcondition" address: string condition: PoxComparator }; type PostCondition = StxPostCondition | FtPostCondition | NftPostCondition | StakingPostCondition | PoxPostCondition; /** Serialized PC hex is accepted anywhere a `PostCondition` object is. */ type PostConditionInput = PostCondition | string; type PostConditionMode = "allow" | "deny" | "originator"; declare const Pc: { principal(address: string) origin() fromHex: (hex: string) => PostCondition }; declare const PoxConditionCode: { readonly WillNotPerform: 0x30 readonly MayPerform: 0x31 readonly WillPerform: 0x32 }; type PoxConditionCode = (typeof PoxConditionCode)[keyof typeof PoxConditionCode]; type PostConditionWire = StxPostConditionWire | FtPostConditionWire | NftPostConditionWire | StakingPostConditionWire | PoxPostConditionWire; type StxPostConditionWire = { type: "stx" principal: PostConditionPrincipalWire conditionCode: number amount: bigint }; type FtPostConditionWire = { type: "ft" principal: PostConditionPrincipalWire asset: AssetInfoWire conditionCode: number amount: bigint }; type NftPostConditionWire = { type: "nft" principal: PostConditionPrincipalWire asset: AssetInfoWire conditionCode: number assetId: ClarityValue }; type StakingPostConditionWire = { type: "staking" principal: PostConditionPrincipalWire conditionCode: number amount: bigint }; type PoxPostConditionWire = { type: "pox" principal: PostConditionPrincipalWire conditionCode: PoxConditionCode }; type PostConditionPrincipalWire = { type: "origin" } | { type: "standard" address: string } | { type: "contract" address: string contractName: string }; type AssetInfoWire = { address: string contractName: string assetName: string }; type IntegerType = number | string | bigint | Uint8Array; /** Parse a PC amount; throw if outside the u64 the wire can carry. */ declare function parsePostConditionAmount(amount: IntegerType): bigint; declare function wireToPostCondition(wire: PostConditionWire): PostCondition; /** Decode a serialized post-condition (stacks.js `Pc.fromHex`). */ declare function fromHex2(hex: string): PostCondition; /** Encode a post-condition to hex (stacks.js `postConditionToHex`). */ declare function postConditionToHex(pc: PostCondition): string; export { wireToPostCondition, postConditionToHex, parsePostConditionAmount, fromHex2 as fromHex, StxPostCondition, StakingPostCondition, PoxPostCondition, PoxComparator, PostConditionMode, PostConditionInput, PostCondition, Pc, NonFungibleComparator, NftPostCondition, FungibleComparator, FtPostCondition };