{
  "version": 3,
  "sources": ["../src/transactions/types.ts", "../src/transactions/wire/serialize.ts", "../src/transactions/wire/deserialize.ts", "../src/postconditions/convert.ts"],
  "sourcesContent": [
    "import type { ClarityValue } from \"../clarity/types.ts\";\n\n// Auth types\nexport const AuthType = {\n\tStandard: 0x04,\n\tSponsored: 0x05,\n} as const;\nexport type AuthType = (typeof AuthType)[keyof typeof AuthType];\n\n// Payload types\nexport const PayloadType = {\n\tTokenTransfer: 0x00,\n\tSmartContract: 0x01,\n\tContractCall: 0x02,\n\tPoisonMicroblock: 0x03,\n\tCoinbase: 0x04,\n\tCoinbaseToAltRecipient: 0x05,\n\tVersionedSmartContract: 0x06,\n\tTenureChange: 0x07,\n\tNakamotoCoinbase: 0x08,\n} as const;\nexport type PayloadType = (typeof PayloadType)[keyof typeof PayloadType];\n\n// Clarity version\nexport const ClarityVersion = {\n\tClarity1: 1,\n\tClarity2: 2,\n\tClarity3: 3,\n\tClarity4: 4,\n\tClarity5: 5,\n\tClarity6: 6, // SIP-044, Epoch 4.0\n} as const;\nexport type ClarityVersion =\n\t(typeof ClarityVersion)[keyof typeof ClarityVersion];\n\n// Anchor mode (deprecated post-Nakamoto, but needed for wire format)\nexport const AnchorMode = {\n\tOnChainOnly: 0x01,\n\tOffChainOnly: 0x02,\n\tAny: 0x03,\n} as const;\nexport type AnchorMode = (typeof AnchorMode)[keyof typeof AnchorMode];\n\n// Post condition mode\nexport const PostConditionModeWire = {\n\tAllow: 0x01,\n\tDeny: 0x02,\n\tOriginator: 0x03, // SIP-040, Epoch 3.4\n} as const;\nexport type PostConditionModeWire =\n\t(typeof PostConditionModeWire)[keyof typeof PostConditionModeWire];\n\n// Address hash modes\nexport const AddressHashMode = {\n\tP2PKH: 0x00,\n\tP2SH: 0x01,\n\tP2WPKH: 0x02,\n\tP2WSH: 0x03,\n\tP2SH_NonSequential: 0x05, // SIP-027\n\tP2WSH_P2SH_NonSequential: 0x07, // SIP-027\n} as const;\nexport type AddressHashMode =\n\t(typeof AddressHashMode)[keyof typeof AddressHashMode];\n\n// Pub key encoding\nexport const PubKeyEncoding = {\n\tCompressed: 0x00,\n\tUncompressed: 0x01,\n} as const;\nexport type PubKeyEncoding =\n\t(typeof PubKeyEncoding)[keyof typeof PubKeyEncoding];\n\n// Fungible condition codes (wire format)\nexport const FungibleConditionCode = {\n\tEqual: 0x01,\n\tGreater: 0x02,\n\tGreaterEqual: 0x03,\n\tLess: 0x04,\n\tLessEqual: 0x05,\n} as const;\n\n// Non-fungible condition codes (wire format)\nexport const NonFungibleConditionCode = {\n\tSends: 0x10,\n\tDoesNotSend: 0x11,\n\tMaybeSent: 0x12, // SIP-040, Epoch 3.4\n} as const;\n\n// PoX condition codes (wire format, SIP-045)\nexport const PoxConditionCode = {\n\tWillNotPerform: 0x30,\n\tMayPerform: 0x31,\n\tWillPerform: 0x32,\n} as const;\nexport type PoxConditionCode =\n\t(typeof PoxConditionCode)[keyof typeof PoxConditionCode];\n\n// Post condition principal types\nexport const PostConditionPrincipalId = {\n\tOrigin: 0x01,\n\tStandard: 0x02,\n\tContract: 0x03,\n} as const;\n\n// Post condition asset types\nexport const AssetType = {\n\tSTX: 0x00,\n\tFungible: 0x01,\n\tNonFungible: 0x02,\n\tStaking: 0x03, // SIP-045\n\tPox: 0x04, // SIP-045\n} as const;\n\n// Auth field types\nexport const AuthFieldType = {\n\tPublicKeyCompressed: 0x00,\n\tPublicKeyUncompressed: 0x01,\n\tSignatureCompressed: 0x02,\n\tSignatureUncompressed: 0x03,\n} as const;\n\nexport const RECOVERABLE_ECDSA_SIG_LENGTH_BYTES = 65;\nexport const MEMO_MAX_LENGTH_BYTES = 34;\nexport const MAX_STRING_LENGTH_BYTES = 128;\nexport const COINBASE_BYTES_LENGTH = 32;\nexport const VRF_PROOF_BYTES_LENGTH = 80;\nexport const MICROBLOCK_HEADER_BYTES_LENGTH = 132; // 1 + 2 + 32 + 32 + 65\n\n// Tenure change cause\nexport const TenureChangeCause = {\n\tBlockFound: 0x00,\n\tExtended: 0x01,\n\tExtendedRuntime: 0x02,\n\tExtendedReadCount: 0x03,\n\tExtendedReadLength: 0x04,\n\tExtendedWriteCount: 0x05,\n\tExtendedWriteLength: 0x06,\n} as const;\nexport type TenureChangeCause =\n\t(typeof TenureChangeCause)[keyof typeof TenureChangeCause];\n\n// Token transfer payload\nexport type TokenTransferPayload = {\n\tpayloadType: typeof PayloadType.TokenTransfer;\n\trecipient: ClarityValue; // PrincipalCV\n\tamount: bigint;\n\tmemo: string;\n};\n\n// Contract call payload\nexport type ContractCallPayload = {\n\tpayloadType: typeof PayloadType.ContractCall;\n\tcontractAddress: string;\n\tcontractName: string;\n\tfunctionName: string;\n\tfunctionArgs: ClarityValue[];\n};\n\n// Smart contract deploy payload\nexport type SmartContractPayload = {\n\tpayloadType:\n\t\t| typeof PayloadType.SmartContract\n\t\t| typeof PayloadType.VersionedSmartContract;\n\tclarityVersion?: ClarityVersion;\n\tcontractName: string;\n\tcodeBody: string;\n};\n\n// Coinbase payload (appears in every pre-Nakamoto block)\nexport type CoinbasePayload = {\n\tpayloadType: typeof PayloadType.Coinbase;\n\tcoinbaseBuffer: string; // 32 bytes hex\n};\n\n// Coinbase to alt recipient payload\nexport type CoinbaseToAltRecipientPayload = {\n\tpayloadType: typeof PayloadType.CoinbaseToAltRecipient;\n\tcoinbaseBuffer: string; // 32 bytes hex\n\trecipient: ClarityValue; // PrincipalCV\n};\n\n// Poison microblock payload\nexport type PoisonMicroblockPayload = {\n\tpayloadType: typeof PayloadType.PoisonMicroblock;\n\theader1: string; // 132 bytes hex (raw microblock header)\n\theader2: string; // 132 bytes hex (raw microblock header)\n};\n\n// Tenure change payload (Nakamoto)\nexport type TenureChangePayload = {\n\tpayloadType: typeof PayloadType.TenureChange;\n\ttenureConsensusHash: string; // 20 bytes hex\n\tprevTenureConsensusHash: string; // 20 bytes hex\n\tburnViewConsensusHash: string; // 20 bytes hex\n\tpreviousTenureEnd: string; // 32 bytes hex\n\tpreviousTenureBlocks: number; // u32\n\tcause: TenureChangeCause;\n\tpubkeyHash: string; // 20 bytes hex\n};\n\n// Nakamoto coinbase payload\nexport type NakamotoCoinbasePayload = {\n\tpayloadType: typeof PayloadType.NakamotoCoinbase;\n\tcoinbaseBuffer: string; // 32 bytes hex\n\trecipient: ClarityValue | null; // Optional PrincipalCV\n\tvrfProof: string; // 80 bytes hex\n};\n\nexport type TransactionPayload =\n\t| TokenTransferPayload\n\t| ContractCallPayload\n\t| SmartContractPayload\n\t| CoinbasePayload\n\t| CoinbaseToAltRecipientPayload\n\t| PoisonMicroblockPayload\n\t| TenureChangePayload\n\t| NakamotoCoinbasePayload;\n\n// Spending condition\nexport type SingleSigSpendingCondition = {\n\thashMode: typeof AddressHashMode.P2PKH | typeof AddressHashMode.P2WPKH;\n\tsigner: string; // hash160 hex\n\tnonce: bigint;\n\tfee: bigint;\n\tkeyEncoding: PubKeyEncoding;\n\tsignature: string; // 65-byte recoverable sig hex\n};\n\nexport type TransactionAuthField = {\n\tpubKeyEncoding: PubKeyEncoding;\n\ttype: \"publicKey\" | \"signature\";\n\tdata: string; // hex\n};\n\nexport type MultiSigHashMode =\n\t| typeof AddressHashMode.P2SH\n\t| typeof AddressHashMode.P2WSH\n\t| typeof AddressHashMode.P2SH_NonSequential\n\t| typeof AddressHashMode.P2WSH_P2SH_NonSequential;\n\nexport type MultiSigSpendingCondition = {\n\thashMode: MultiSigHashMode;\n\tsigner: string;\n\tnonce: bigint;\n\tfee: bigint;\n\tfields: TransactionAuthField[];\n\tsignaturesRequired: number;\n};\n\nexport type SpendingCondition =\n\t| SingleSigSpendingCondition\n\t| MultiSigSpendingCondition;\n\nexport type StandardAuthorization = {\n\tauthType: typeof AuthType.Standard;\n\tspendingCondition: SpendingCondition;\n};\n\nexport type SponsoredAuthorization = {\n\tauthType: typeof AuthType.Sponsored;\n\tspendingCondition: SpendingCondition;\n\tsponsorSpendingCondition: SpendingCondition;\n};\n\nexport type Authorization = StandardAuthorization | SponsoredAuthorization;\n\n// Full transaction\nexport type StacksTransaction = {\n\tversion: number;\n\tchainId: number;\n\tauth: Authorization;\n\tanchorMode: AnchorMode;\n\tpostConditionMode: PostConditionModeWire;\n\tpostConditions: PostConditionWire[];\n\tpayload: TransactionPayload;\n\t/** Multi-sig signer metadata — not part of the wire format, preserved\n\t *  through serialize/deserialize round-trip for auto-detection. */\n\t_multisig?: { publicKeys: string[] };\n};\n\n// Wire post condition types\nexport type PostConditionWire =\n\t| StxPostConditionWire\n\t| FtPostConditionWire\n\t| NftPostConditionWire\n\t| StakingPostConditionWire\n\t| PoxPostConditionWire;\n\nexport type StxPostConditionWire = {\n\ttype: \"stx\";\n\tprincipal: PostConditionPrincipalWire;\n\tconditionCode: number;\n\tamount: bigint;\n};\n\nexport type FtPostConditionWire = {\n\ttype: \"ft\";\n\tprincipal: PostConditionPrincipalWire;\n\tasset: AssetInfoWire;\n\tconditionCode: number;\n\tamount: bigint;\n};\n\nexport type NftPostConditionWire = {\n\ttype: \"nft\";\n\tprincipal: PostConditionPrincipalWire;\n\tasset: AssetInfoWire;\n\tconditionCode: number;\n\tassetId: ClarityValue;\n};\n\n// SIP-045: gates stake/register-for-bond/stake-update; same shape as STX\nexport type StakingPostConditionWire = {\n\ttype: \"staking\";\n\tprincipal: PostConditionPrincipalWire;\n\tconditionCode: number;\n\tamount: bigint;\n};\n\n// SIP-045: gates non-locking PoX state changes (unstake, announce-l1-early-exit, …); no amount\nexport type PoxPostConditionWire = {\n\ttype: \"pox\";\n\tprincipal: PostConditionPrincipalWire;\n\tconditionCode: PoxConditionCode;\n};\n\nexport type PostConditionPrincipalWire =\n\t| { type: \"origin\" }\n\t| { type: \"standard\"; address: string }\n\t| { type: \"contract\"; address: string; contractName: string };\n\nexport type AssetInfoWire = {\n\taddress: string;\n\tcontractName: string;\n\tassetName: string;\n};\n",
    "import { serializeCVBytes } from \"../../clarity/serialize.ts\";\nimport { c32addressDecode } from \"../../utils/c32.ts\";\nimport {\n\tasciiToBytes,\n\tbytesToHex,\n\tconcatBytes,\n\thexToBytes,\n\tintToBytes,\n\tintToHex,\n\tutf8ToBytes,\n\twriteUInt8,\n\twriteUInt16BE,\n\twriteUInt32BE,\n} from \"../../utils/encoding.ts\";\nimport {\n\ttype AssetInfoWire,\n\tAssetType,\n\tAuthType,\n\ttype Authorization,\n\ttype CoinbasePayload,\n\ttype CoinbaseToAltRecipientPayload,\n\tMEMO_MAX_LENGTH_BYTES,\n\ttype MultiSigSpendingCondition,\n\ttype NakamotoCoinbasePayload,\n\tPayloadType,\n\ttype PoisonMicroblockPayload,\n\tPostConditionPrincipalId,\n\ttype PostConditionPrincipalWire,\n\ttype PostConditionWire,\n\ttype SingleSigSpendingCondition,\n\ttype SpendingCondition,\n\ttype StacksTransaction,\n\ttype TenureChangePayload as TenureChangePayloadType,\n\ttype TransactionAuthField,\n\ttype TransactionPayload,\n} from \"../types.ts\";\n\n// Address serialization: version (1 byte) + hash160 (20 bytes)\nfunction serializeAddress(c32Address: string): Uint8Array {\n\tconst [version, hash160] = c32addressDecode(c32Address);\n\treturn concatBytes(new Uint8Array([version]), hexToBytes(hash160));\n}\n\n// LP string: length prefix (n bytes) + content bytes\nfunction serializeLPString(str: string, prefixBytes = 1): Uint8Array {\n\tconst content = utf8ToBytes(str);\n\tconst prefix = hexToBytes(intToHex(content.byteLength, prefixBytes));\n\treturn concatBytes(prefix, content);\n}\n\n// LP string for code body (4-byte prefix)\nfunction serializeLPStringLong(str: string): Uint8Array {\n\treturn serializeLPString(str, 4);\n}\n\n// Memo: flat 34-byte field (no length prefix) per SIP-005\nfunction serializeMemo(memo: string): Uint8Array {\n\tconst content = asciiToBytes(memo);\n\tconst padded = new Uint8Array(MEMO_MAX_LENGTH_BYTES);\n\tpadded.set(content.slice(0, MEMO_MAX_LENGTH_BYTES));\n\treturn padded;\n}\n\nfunction serializeSpendingCondition(condition: SpendingCondition): Uint8Array {\n\tconst parts: Uint8Array[] = [\n\t\twriteUInt8(condition.hashMode),\n\t\thexToBytes(condition.signer), // 20 bytes\n\t\tintToBytes(condition.nonce, 8),\n\t\tintToBytes(condition.fee, 8),\n\t];\n\n\tif (\"signature\" in condition) {\n\t\t// Single sig\n\t\tconst sc = condition as SingleSigSpendingCondition;\n\t\tparts.push(writeUInt8(sc.keyEncoding));\n\t\tparts.push(hexToBytes(sc.signature)); // 65 bytes\n\t} else {\n\t\t// Multi sig\n\t\tconst mc = condition as MultiSigSpendingCondition;\n\t\t// Fields as LP list\n\t\tparts.push(writeUInt32BE(mc.fields.length));\n\t\tfor (const field of mc.fields) {\n\t\t\tparts.push(serializeAuthField(field));\n\t\t}\n\t\tparts.push(writeUInt16BE(mc.signaturesRequired));\n\t}\n\n\treturn concatBytes(...parts);\n}\n\nfunction serializeAuthField(field: TransactionAuthField): Uint8Array {\n\tif (field.type === \"publicKey\") {\n\t\tconst typeId = field.pubKeyEncoding === 0x00 ? 0x00 : 0x01;\n\t\treturn concatBytes(writeUInt8(typeId), hexToBytes(field.data));\n\t}\n\tconst typeId = field.pubKeyEncoding === 0x00 ? 0x02 : 0x03;\n\treturn concatBytes(writeUInt8(typeId), hexToBytes(field.data));\n}\n\nfunction serializeAuthorization(auth: Authorization): Uint8Array {\n\tconst parts: Uint8Array[] = [writeUInt8(auth.authType)];\n\tparts.push(serializeSpendingCondition(auth.spendingCondition));\n\tif (auth.authType === AuthType.Sponsored) {\n\t\tparts.push(serializeSpendingCondition(auth.sponsorSpendingCondition));\n\t}\n\treturn concatBytes(...parts);\n}\n\nfunction serializePrincipal(principal: PostConditionPrincipalWire): Uint8Array {\n\tswitch (principal.type) {\n\t\tcase \"origin\":\n\t\t\treturn writeUInt8(PostConditionPrincipalId.Origin);\n\t\tcase \"standard\":\n\t\t\treturn concatBytes(\n\t\t\t\twriteUInt8(PostConditionPrincipalId.Standard),\n\t\t\t\tserializeAddress(principal.address),\n\t\t\t);\n\t\tcase \"contract\":\n\t\t\treturn concatBytes(\n\t\t\t\twriteUInt8(PostConditionPrincipalId.Contract),\n\t\t\t\tserializeAddress(principal.address),\n\t\t\t\tserializeLPString(principal.contractName),\n\t\t\t);\n\t}\n}\n\nfunction serializeAssetInfo(asset: AssetInfoWire): Uint8Array {\n\treturn concatBytes(\n\t\tserializeAddress(asset.address),\n\t\tserializeLPString(asset.contractName),\n\t\tserializeLPString(asset.assetName),\n\t);\n}\n\nexport function serializePostConditionWire(pc: PostConditionWire): Uint8Array {\n\t// Wire order: asset_type first, then principal (per SIP-005)\n\tconst parts: Uint8Array[] = [];\n\n\tswitch (pc.type) {\n\t\tcase \"stx\":\n\t\t\tparts.push(writeUInt8(AssetType.STX));\n\t\t\tparts.push(serializePrincipal(pc.principal));\n\t\t\tparts.push(writeUInt8(pc.conditionCode));\n\t\t\tparts.push(intToBytes(pc.amount, 8));\n\t\t\tbreak;\n\t\tcase \"ft\":\n\t\t\tparts.push(writeUInt8(AssetType.Fungible));\n\t\t\tparts.push(serializePrincipal(pc.principal));\n\t\t\tparts.push(serializeAssetInfo(pc.asset));\n\t\t\tparts.push(writeUInt8(pc.conditionCode));\n\t\t\tparts.push(intToBytes(pc.amount, 8));\n\t\t\tbreak;\n\t\tcase \"nft\":\n\t\t\tparts.push(writeUInt8(AssetType.NonFungible));\n\t\t\tparts.push(serializePrincipal(pc.principal));\n\t\t\tparts.push(serializeAssetInfo(pc.asset));\n\t\t\tparts.push(serializeCVBytes(pc.assetId));\n\t\t\tparts.push(writeUInt8(pc.conditionCode));\n\t\t\tbreak;\n\t\tcase \"staking\":\n\t\t\t// SIP-045: same body as STX (fungible condition code + amount)\n\t\t\tparts.push(writeUInt8(AssetType.Staking));\n\t\t\tparts.push(serializePrincipal(pc.principal));\n\t\t\tparts.push(writeUInt8(pc.conditionCode));\n\t\t\tparts.push(intToBytes(pc.amount, 8));\n\t\t\tbreak;\n\t\tcase \"pox\":\n\t\t\t// SIP-045: PoX condition code only, no amount\n\t\t\tparts.push(writeUInt8(AssetType.Pox));\n\t\t\tparts.push(serializePrincipal(pc.principal));\n\t\t\tparts.push(writeUInt8(pc.conditionCode));\n\t\t\tbreak;\n\t}\n\n\treturn concatBytes(...parts);\n}\n\nfunction serializePostConditions(pcs: PostConditionWire[]): Uint8Array {\n\tconst parts: Uint8Array[] = [writeUInt32BE(pcs.length)];\n\tfor (const pc of pcs) parts.push(serializePostConditionWire(pc));\n\treturn concatBytes(...parts);\n}\n\nexport function serializePayload(payload: TransactionPayload): Uint8Array {\n\tconst parts: Uint8Array[] = [writeUInt8(payload.payloadType)];\n\n\tswitch (payload.payloadType) {\n\t\tcase PayloadType.TokenTransfer:\n\t\t\tparts.push(serializeCVBytes(payload.recipient));\n\t\t\tparts.push(intToBytes(payload.amount, 8));\n\t\t\tparts.push(serializeMemo(payload.memo));\n\t\t\tbreak;\n\n\t\tcase PayloadType.ContractCall:\n\t\t\tparts.push(serializeAddress(payload.contractAddress));\n\t\t\tparts.push(serializeLPString(payload.contractName));\n\t\t\tparts.push(serializeLPString(payload.functionName));\n\t\t\tparts.push(writeUInt32BE(payload.functionArgs.length));\n\t\t\tfor (const arg of payload.functionArgs) {\n\t\t\t\tparts.push(serializeCVBytes(arg));\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase PayloadType.SmartContract:\n\t\t\tparts.push(serializeLPString(payload.contractName));\n\t\t\tparts.push(serializeLPStringLong(payload.codeBody));\n\t\t\tbreak;\n\n\t\tcase PayloadType.VersionedSmartContract:\n\t\t\tparts.push(writeUInt8(payload.clarityVersion ?? 2));\n\t\t\tparts.push(serializeLPString(payload.contractName));\n\t\t\tparts.push(serializeLPStringLong(payload.codeBody));\n\t\t\tbreak;\n\n\t\tcase PayloadType.Coinbase:\n\t\t\tparts.push(hexToBytes((payload as CoinbasePayload).coinbaseBuffer));\n\t\t\tbreak;\n\n\t\tcase PayloadType.CoinbaseToAltRecipient: {\n\t\t\tconst cbAlt = payload as CoinbaseToAltRecipientPayload;\n\t\t\tparts.push(hexToBytes(cbAlt.coinbaseBuffer));\n\t\t\tparts.push(serializeCVBytes(cbAlt.recipient));\n\t\t\tbreak;\n\t\t}\n\n\t\tcase PayloadType.PoisonMicroblock: {\n\t\t\tconst pm = payload as PoisonMicroblockPayload;\n\t\t\tparts.push(hexToBytes(pm.header1));\n\t\t\tparts.push(hexToBytes(pm.header2));\n\t\t\tbreak;\n\t\t}\n\n\t\tcase PayloadType.TenureChange: {\n\t\t\tconst tc = payload as TenureChangePayloadType;\n\t\t\tparts.push(hexToBytes(tc.tenureConsensusHash));\n\t\t\tparts.push(hexToBytes(tc.prevTenureConsensusHash));\n\t\t\tparts.push(hexToBytes(tc.burnViewConsensusHash));\n\t\t\tparts.push(hexToBytes(tc.previousTenureEnd));\n\t\t\tparts.push(writeUInt32BE(tc.previousTenureBlocks));\n\t\t\tparts.push(writeUInt8(tc.cause));\n\t\t\tparts.push(hexToBytes(tc.pubkeyHash));\n\t\t\tbreak;\n\t\t}\n\n\t\tcase PayloadType.NakamotoCoinbase: {\n\t\t\tconst nc = payload as NakamotoCoinbasePayload;\n\t\t\tparts.push(hexToBytes(nc.coinbaseBuffer));\n\t\t\tif (nc.recipient) {\n\t\t\t\tparts.push(serializeCVBytes({ type: \"some\", value: nc.recipient }));\n\t\t\t} else {\n\t\t\t\tparts.push(serializeCVBytes({ type: \"none\" }));\n\t\t\t}\n\t\t\tparts.push(hexToBytes(nc.vrfProof));\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn concatBytes(...parts);\n}\n\n// Memoization cache: transactions are immutable in practice (fields are set\n// once during build/signing), so the serialized bytes for a given transaction\n// object never change. The signing flow serializes the same object several\n// times (txid, sighash, sponsor sighash); caching avoids that redundant work.\n// Any in-place mutation MUST call clearTxCache — see setUnsignedFee.\nconst _txCache = new WeakMap<StacksTransaction, Uint8Array>();\n\n/** Invalidate the memoized serialization of a mutated transaction */\nexport function clearTxCache(tx: StacksTransaction): void {\n\t_txCache.delete(tx);\n}\n\nexport function serializeTransaction(tx: StacksTransaction): Uint8Array {\n\tconst cached = _txCache.get(tx);\n\tif (cached) return cached;\n\tconst bytes = concatBytes(\n\t\twriteUInt8(tx.version),\n\t\twriteUInt32BE(tx.chainId),\n\t\tserializeAuthorization(tx.auth),\n\t\twriteUInt8(tx.anchorMode),\n\t\twriteUInt8(tx.postConditionMode),\n\t\tserializePostConditions(tx.postConditions),\n\t\tserializePayload(tx.payload),\n\t);\n\t_txCache.set(tx, bytes);\n\treturn bytes;\n}\n\nexport function serializeTransactionHex(tx: StacksTransaction): string {\n\treturn bytesToHex(serializeTransaction(tx));\n}\n\n/** Serialize a transaction, returning the wire bytes plus the out-of-band\n *  `_multisig` metadata so callers can preserve it across a round-trip\n *  (the wire format itself does not carry it). */\nexport function serializeTransactionWithMeta(tx: StacksTransaction): {\n\tbytes: Uint8Array;\n\t_multisig?: { publicKeys: string[] };\n} {\n\treturn { bytes: serializeTransaction(tx), _multisig: tx._multisig };\n}\n",
    "import {\n\treadAddress,\n\treadCV,\n\treadLPString,\n} from \"../../clarity/deserialize.ts\";\nimport type { ClarityValue } from \"../../clarity/types.ts\";\nimport { BytesReader } from \"../../utils/bytes-reader.ts\";\nimport {\n\tbytesToAscii,\n\tbytesToHex,\n\thexToBytes,\n\twithout0x,\n} from \"../../utils/encoding.ts\";\nimport {\n\tAddressHashMode,\n\ttype AnchorMode,\n\ttype AssetInfoWire,\n\tAssetType,\n\tAuthType,\n\ttype Authorization,\n\tCOINBASE_BYTES_LENGTH,\n\ttype ClarityVersion,\n\tMEMO_MAX_LENGTH_BYTES,\n\tMICROBLOCK_HEADER_BYTES_LENGTH,\n\tPayloadType,\n\ttype PostConditionModeWire,\n\tPostConditionPrincipalId,\n\ttype PostConditionPrincipalWire,\n\ttype PostConditionWire,\n\ttype PoxConditionCode,\n\tRECOVERABLE_ECDSA_SIG_LENGTH_BYTES,\n\ttype SpendingCondition,\n\ttype StacksTransaction,\n\ttype TenureChangeCause,\n\ttype TransactionAuthField,\n\ttype TransactionPayload,\n\tVRF_PROOF_BYTES_LENGTH,\n} from \"../types.ts\";\n\nfunction readSpendingCondition(r: BytesReader): SpendingCondition {\n\tconst hashMode = r.readUInt8();\n\tconst signer = bytesToHex(r.readBytes(20));\n\tconst nonce = r.readBigUInt64BE();\n\tconst fee = r.readBigUInt64BE();\n\n\tif (\n\t\thashMode === AddressHashMode.P2PKH ||\n\t\thashMode === AddressHashMode.P2WPKH\n\t) {\n\t\tconst keyEncoding = r.readUInt8();\n\t\tconst signature = bytesToHex(\n\t\t\tr.readBytes(RECOVERABLE_ECDSA_SIG_LENGTH_BYTES),\n\t\t);\n\t\treturn {\n\t\t\thashMode,\n\t\t\tsigner,\n\t\t\tnonce,\n\t\t\tfee,\n\t\t\tkeyEncoding,\n\t\t\tsignature,\n\t\t} as SpendingCondition;\n\t}\n\n\tconst fieldCount = r.readUInt32BE();\n\tconst fields: TransactionAuthField[] = [];\n\tfor (let i = 0; i < fieldCount; i++) {\n\t\tconst fieldType = r.readUInt8();\n\t\tif (fieldType <= 0x01) {\n\t\t\tconst keyLen = fieldType === 0x00 ? 33 : 65;\n\t\t\tfields.push({\n\t\t\t\ttype: \"publicKey\",\n\t\t\t\tpubKeyEncoding: fieldType as 0x00 | 0x01,\n\t\t\t\tdata: bytesToHex(r.readBytes(keyLen)),\n\t\t\t});\n\t\t} else {\n\t\t\tfields.push({\n\t\t\t\ttype: \"signature\",\n\t\t\t\tpubKeyEncoding: (fieldType === 0x02 ? 0x00 : 0x01) as 0x00 | 0x01,\n\t\t\t\tdata: bytesToHex(r.readBytes(RECOVERABLE_ECDSA_SIG_LENGTH_BYTES)),\n\t\t\t});\n\t\t}\n\t}\n\tconst signaturesRequired = r.readUInt16BE();\n\n\treturn {\n\t\thashMode,\n\t\tsigner,\n\t\tnonce,\n\t\tfee,\n\t\tfields,\n\t\tsignaturesRequired,\n\t} as SpendingCondition;\n}\n\nfunction readAuthorization(r: BytesReader): Authorization {\n\tconst authType = r.readUInt8();\n\tconst spendingCondition = readSpendingCondition(r);\n\n\tif (authType === AuthType.Standard) {\n\t\treturn { authType: AuthType.Standard, spendingCondition };\n\t}\n\n\tconst sponsorSpendingCondition = readSpendingCondition(r);\n\treturn {\n\t\tauthType: AuthType.Sponsored,\n\t\tspendingCondition,\n\t\tsponsorSpendingCondition,\n\t};\n}\n\nfunction readAssetInfo(r: BytesReader): AssetInfoWire {\n\treturn {\n\t\taddress: readAddress(r),\n\t\tcontractName: readLPString(r),\n\t\tassetName: readLPString(r),\n\t};\n}\n\nfunction readPostConditionPrincipal(\n\tr: BytesReader,\n): PostConditionPrincipalWire {\n\tconst type = r.readUInt8();\n\tswitch (type) {\n\t\tcase PostConditionPrincipalId.Origin:\n\t\t\treturn { type: \"origin\" };\n\t\tcase PostConditionPrincipalId.Standard:\n\t\t\treturn { type: \"standard\", address: readAddress(r) };\n\t\tcase PostConditionPrincipalId.Contract:\n\t\t\treturn {\n\t\t\t\ttype: \"contract\",\n\t\t\t\taddress: readAddress(r),\n\t\t\t\tcontractName: readLPString(r),\n\t\t\t};\n\t\tdefault:\n\t\t\t// Some legacy transactions may have unexpected principal types.\n\t\t\t// Treat as origin to allow deserialization to continue.\n\t\t\treturn { type: \"origin\" };\n\t}\n}\n\nfunction readPostCondition(r: BytesReader): PostConditionWire {\n\t// Wire order: asset_type, then principal (per SIP-005 and stacks.js)\n\tconst assetType = r.readUInt8();\n\tconst principal = readPostConditionPrincipal(r);\n\tswitch (assetType) {\n\t\tcase AssetType.STX:\n\t\t\treturn {\n\t\t\t\ttype: \"stx\",\n\t\t\t\tprincipal,\n\t\t\t\tconditionCode: r.readUInt8(),\n\t\t\t\tamount: r.readBigUInt64BE(),\n\t\t\t};\n\t\tcase AssetType.Fungible:\n\t\t\treturn {\n\t\t\t\ttype: \"ft\",\n\t\t\t\tprincipal,\n\t\t\t\tasset: readAssetInfo(r),\n\t\t\t\tconditionCode: r.readUInt8(),\n\t\t\t\tamount: r.readBigUInt64BE(),\n\t\t\t};\n\t\tcase AssetType.NonFungible:\n\t\t\treturn {\n\t\t\t\ttype: \"nft\",\n\t\t\t\tprincipal,\n\t\t\t\tasset: readAssetInfo(r),\n\t\t\t\tassetId: readCV(r),\n\t\t\t\tconditionCode: r.readUInt8(),\n\t\t\t};\n\t\tcase AssetType.Staking:\n\t\t\treturn {\n\t\t\t\ttype: \"staking\",\n\t\t\t\tprincipal,\n\t\t\t\tconditionCode: r.readUInt8(),\n\t\t\t\tamount: r.readBigUInt64BE(),\n\t\t\t};\n\t\tcase AssetType.Pox:\n\t\t\treturn {\n\t\t\t\ttype: \"pox\",\n\t\t\t\tprincipal,\n\t\t\t\tconditionCode: r.readUInt8() as PoxConditionCode,\n\t\t\t};\n\t\tdefault:\n\t\t\tthrow new Error(\n\t\t\t\t`Unknown post-condition asset type: 0x${assetType.toString(16).padStart(2, \"0\")}`,\n\t\t\t);\n\t}\n}\n\nfunction readPostConditions(r: BytesReader): PostConditionWire[] {\n\tconst count = r.readUInt32BE();\n\tconst pcs: PostConditionWire[] = [];\n\tfor (let i = 0; i < count; i++) {\n\t\ttry {\n\t\t\tpcs.push(readPostCondition(r));\n\t\t} catch (e) {\n\t\t\tif (\n\t\t\t\te instanceof Error &&\n\t\t\t\te.message.startsWith(\"Unknown post-condition asset type:\")\n\t\t\t) {\n\t\t\t\tthrow new Error(`${e.message} (post-condition ${i + 1}/${count})`);\n\t\t\t}\n\t\t\tthrow e;\n\t\t}\n\t}\n\treturn pcs;\n}\n\nfunction readPayload(r: BytesReader): TransactionPayload {\n\tconst payloadType = r.readUInt8();\n\n\tswitch (payloadType) {\n\t\tcase PayloadType.TokenTransfer: {\n\t\t\tconst recipient = readCV(r);\n\t\t\tconst amount = r.readBigUInt64BE();\n\t\t\t// Memo is a flat 34-byte field (no length prefix) per SIP-005\n\t\t\tconst memoBytes = r.readBytes(MEMO_MAX_LENGTH_BYTES);\n\t\t\tconst memo = bytesToAscii(memoBytes).replace(/\\0+$/, \"\");\n\t\t\treturn {\n\t\t\t\tpayloadType: PayloadType.TokenTransfer,\n\t\t\t\trecipient,\n\t\t\t\tamount,\n\t\t\t\tmemo,\n\t\t\t};\n\t\t}\n\t\tcase PayloadType.ContractCall: {\n\t\t\tconst contractAddress = readAddress(r);\n\t\t\tconst contractName = readLPString(r);\n\t\t\tconst functionName = readLPString(r);\n\t\t\tconst numArgs = r.readUInt32BE();\n\t\t\tconst functionArgs: ClarityValue[] = [];\n\t\t\tfor (let i = 0; i < numArgs; i++) functionArgs.push(readCV(r));\n\t\t\treturn {\n\t\t\t\tpayloadType: PayloadType.ContractCall,\n\t\t\t\tcontractAddress,\n\t\t\t\tcontractName,\n\t\t\t\tfunctionName,\n\t\t\t\tfunctionArgs,\n\t\t\t};\n\t\t}\n\t\tcase PayloadType.SmartContract: {\n\t\t\tconst contractName = readLPString(r);\n\t\t\tconst codeBody = readLPString(r, 4);\n\t\t\treturn { payloadType: PayloadType.SmartContract, contractName, codeBody };\n\t\t}\n\t\tcase PayloadType.VersionedSmartContract: {\n\t\t\tconst clarityVersion = r.readUInt8() as ClarityVersion;\n\t\t\tconst contractName = readLPString(r);\n\t\t\tconst codeBody = readLPString(r, 4);\n\t\t\treturn {\n\t\t\t\tpayloadType: PayloadType.VersionedSmartContract,\n\t\t\t\tclarityVersion,\n\t\t\t\tcontractName,\n\t\t\t\tcodeBody,\n\t\t\t};\n\t\t}\n\t\tcase PayloadType.Coinbase: {\n\t\t\tconst coinbaseBuffer = bytesToHex(r.readBytes(COINBASE_BYTES_LENGTH));\n\t\t\treturn { payloadType: PayloadType.Coinbase, coinbaseBuffer };\n\t\t}\n\t\tcase PayloadType.CoinbaseToAltRecipient: {\n\t\t\tconst coinbaseBuffer = bytesToHex(r.readBytes(COINBASE_BYTES_LENGTH));\n\t\t\tconst recipient = readCV(r);\n\t\t\treturn {\n\t\t\t\tpayloadType: PayloadType.CoinbaseToAltRecipient,\n\t\t\t\tcoinbaseBuffer,\n\t\t\t\trecipient,\n\t\t\t};\n\t\t}\n\t\tcase PayloadType.PoisonMicroblock: {\n\t\t\tconst header1 = bytesToHex(r.readBytes(MICROBLOCK_HEADER_BYTES_LENGTH));\n\t\t\tconst header2 = bytesToHex(r.readBytes(MICROBLOCK_HEADER_BYTES_LENGTH));\n\t\t\treturn { payloadType: PayloadType.PoisonMicroblock, header1, header2 };\n\t\t}\n\t\tcase PayloadType.TenureChange: {\n\t\t\tconst tenureConsensusHash = bytesToHex(r.readBytes(20));\n\t\t\tconst prevTenureConsensusHash = bytesToHex(r.readBytes(20));\n\t\t\tconst burnViewConsensusHash = bytesToHex(r.readBytes(20));\n\t\t\tconst previousTenureEnd = bytesToHex(r.readBytes(32));\n\t\t\tconst previousTenureBlocks = r.readUInt32BE();\n\t\t\tconst cause = r.readUInt8() as TenureChangeCause;\n\t\t\tconst pubkeyHash = bytesToHex(r.readBytes(20));\n\t\t\treturn {\n\t\t\t\tpayloadType: PayloadType.TenureChange,\n\t\t\t\ttenureConsensusHash,\n\t\t\t\tprevTenureConsensusHash,\n\t\t\t\tburnViewConsensusHash,\n\t\t\t\tpreviousTenureEnd,\n\t\t\t\tpreviousTenureBlocks,\n\t\t\t\tcause,\n\t\t\t\tpubkeyHash,\n\t\t\t};\n\t\t}\n\t\tcase PayloadType.NakamotoCoinbase: {\n\t\t\tconst coinbaseBuffer = bytesToHex(r.readBytes(COINBASE_BYTES_LENGTH));\n\t\t\tconst optionalCV = readCV(r);\n\t\t\tconst recipient =\n\t\t\t\toptionalCV.type === \"none\"\n\t\t\t\t\t? null\n\t\t\t\t\t: optionalCV.type === \"some\"\n\t\t\t\t\t\t? optionalCV.value\n\t\t\t\t\t\t: optionalCV;\n\t\t\tconst vrfProof = bytesToHex(r.readBytes(VRF_PROOF_BYTES_LENGTH));\n\t\t\treturn {\n\t\t\t\tpayloadType: PayloadType.NakamotoCoinbase,\n\t\t\t\tcoinbaseBuffer,\n\t\t\t\trecipient,\n\t\t\t\tvrfProof,\n\t\t\t};\n\t\t}\n\t\tdefault:\n\t\t\tthrow new Error(`Unknown payload type: ${payloadType}`);\n\t}\n}\n\nexport function deserializePostConditionWire(\n\tinput: string | Uint8Array,\n): PostConditionWire {\n\tconst bytes =\n\t\ttypeof input === \"string\" ? hexToBytes(without0x(input)) : input;\n\treturn readPostCondition(new BytesReader(bytes));\n}\n\nexport function deserializeTransaction(\n\tinput: string | Uint8Array,\n\tmeta?: { _multisig?: { publicKeys: string[] } },\n): StacksTransaction {\n\tconst bytes =\n\t\ttypeof input === \"string\" ? hexToBytes(without0x(input)) : input;\n\tconst r = new BytesReader(bytes);\n\n\tconst tx: StacksTransaction = {\n\t\tversion: r.readUInt8(),\n\t\tchainId: r.readUInt32BE(),\n\t\tauth: readAuthorization(r),\n\t\tanchorMode: r.readUInt8() as AnchorMode,\n\t\tpostConditionMode: r.readUInt8() as PostConditionModeWire,\n\t\tpostConditions: readPostConditions(r),\n\t\tpayload: readPayload(r),\n\t};\n\tif (meta?._multisig) {\n\t\ttx._multisig = meta._multisig;\n\t}\n\treturn tx;\n}\n",
    "import {\n\tFungibleConditionCode,\n\tNonFungibleConditionCode,\n\ttype PostConditionPrincipalWire,\n\ttype PostConditionWire,\n\tPoxConditionCode,\n} from \"../transactions/types.ts\";\nimport { deserializePostConditionWire } from \"../transactions/wire/deserialize.ts\";\nimport { serializePostConditionWire } from \"../transactions/wire/serialize.ts\";\nimport { parseContractId } from \"../utils/address.ts\";\nimport {\n\ttype IntegerType,\n\tbytesToHex,\n\tintToBigInt,\n} from \"../utils/encoding.ts\";\nimport type {\n\tFungibleComparator,\n\tNonFungibleComparator,\n\tPostCondition,\n\tPoxComparator,\n} from \"./types.ts\";\n\nconst MAX_U64 = 18446744073709551615n; // 2^64 - 1\n\n/** Parse a PC amount; throw if outside the u64 the wire can carry. */\nexport function parsePostConditionAmount(amount: IntegerType): bigint {\n\tconst value = intToBigInt(amount);\n\tif (value < 0n || value > MAX_U64) {\n\t\tthrow new RangeError(\n\t\t\t`Post-condition amount must be between 0 and ${MAX_U64} (u64 max), received: ${value}`,\n\t\t);\n\t}\n\treturn value;\n}\n\nexport const FUNGIBLE_CODE_MAP: Record<FungibleComparator, number> = {\n\teq: FungibleConditionCode.Equal,\n\tgt: FungibleConditionCode.Greater,\n\tgte: FungibleConditionCode.GreaterEqual,\n\tlt: FungibleConditionCode.Less,\n\tlte: FungibleConditionCode.LessEqual,\n};\n\nconst FUNGIBLE_CODE_REVERSE: Record<number, FungibleComparator> = {\n\t[FungibleConditionCode.Equal]: \"eq\",\n\t[FungibleConditionCode.Greater]: \"gt\",\n\t[FungibleConditionCode.GreaterEqual]: \"gte\",\n\t[FungibleConditionCode.Less]: \"lt\",\n\t[FungibleConditionCode.LessEqual]: \"lte\",\n};\n\nexport const NFT_CODE_MAP: Record<NonFungibleComparator, number> = {\n\tsent: NonFungibleConditionCode.Sends,\n\t\"not-sent\": NonFungibleConditionCode.DoesNotSend,\n\t\"maybe-sent\": NonFungibleConditionCode.MaybeSent,\n};\n\nconst NFT_CODE_REVERSE: Record<number, NonFungibleComparator> = {\n\t[NonFungibleConditionCode.Sends]: \"sent\",\n\t[NonFungibleConditionCode.DoesNotSend]: \"not-sent\",\n\t[NonFungibleConditionCode.MaybeSent]: \"maybe-sent\",\n};\n\nexport const POX_CODE_MAP: Record<PoxComparator, PoxConditionCode> = {\n\t\"will-not-perform\": PoxConditionCode.WillNotPerform,\n\t\"may-perform\": PoxConditionCode.MayPerform,\n\t\"will-perform\": PoxConditionCode.WillPerform,\n};\n\nconst POX_CODE_REVERSE: Record<number, PoxComparator> = {\n\t[PoxConditionCode.WillNotPerform]: \"will-not-perform\",\n\t[PoxConditionCode.MayPerform]: \"may-perform\",\n\t[PoxConditionCode.WillPerform]: \"will-perform\",\n};\n\nexport function resolvePrincipal(address: string): PostConditionPrincipalWire {\n\tif (address === \"origin\") return { type: \"origin\" };\n\tconst [addr, name] = address.split(\".\");\n\tif (name) {\n\t\t// biome-ignore lint/style/noNonNullAssertion: split yields address when name is present\n\t\treturn { type: \"contract\", address: addr!, contractName: name };\n\t}\n\t// biome-ignore lint/style/noNonNullAssertion: address is the whole string\n\treturn { type: \"standard\", address: addr! };\n}\n\nfunction principalToString(principal: PostConditionPrincipalWire): string {\n\tif (principal.type === \"origin\") return \"origin\";\n\tif (principal.type === \"contract\") {\n\t\treturn `${principal.address}.${principal.contractName}`;\n\t}\n\treturn principal.address;\n}\n\nfunction assetToString(asset: {\n\taddress: string;\n\tcontractName: string;\n\tassetName: string;\n}): string {\n\treturn `${asset.address}.${asset.contractName}::${asset.assetName}`;\n}\n\nfunction parseAsset(asset: string): {\n\taddress: string;\n\tcontractName: string;\n\tassetName: string;\n} {\n\tconst [contractId, tokenName] = asset.split(\"::\");\n\t// biome-ignore lint/style/noNonNullAssertion: callers validate `::` form\n\tconst [addr, name] = parseContractId(contractId!);\n\t// biome-ignore lint/style/noNonNullAssertion: split of `addr.contract::token`\n\treturn { address: addr, contractName: name, assetName: tokenName! };\n}\n\nexport function convertPostCondition(pc: PostCondition): PostConditionWire {\n\tswitch (pc.type) {\n\t\tcase \"stx-postcondition\":\n\t\t\treturn {\n\t\t\t\ttype: \"stx\",\n\t\t\t\tprincipal: resolvePrincipal(pc.address),\n\t\t\t\tconditionCode: FUNGIBLE_CODE_MAP[pc.condition],\n\t\t\t\tamount: parsePostConditionAmount(pc.amount),\n\t\t\t};\n\t\tcase \"ft-postcondition\":\n\t\t\treturn {\n\t\t\t\ttype: \"ft\",\n\t\t\t\tprincipal: resolvePrincipal(pc.address),\n\t\t\t\tasset: parseAsset(pc.asset),\n\t\t\t\tconditionCode: FUNGIBLE_CODE_MAP[pc.condition],\n\t\t\t\tamount: parsePostConditionAmount(pc.amount),\n\t\t\t};\n\t\tcase \"nft-postcondition\":\n\t\t\treturn {\n\t\t\t\ttype: \"nft\",\n\t\t\t\tprincipal: resolvePrincipal(pc.address),\n\t\t\t\tasset: parseAsset(pc.asset),\n\t\t\t\tconditionCode: NFT_CODE_MAP[pc.condition],\n\t\t\t\tassetId: pc.assetId,\n\t\t\t};\n\t\tcase \"staking-postcondition\":\n\t\t\treturn {\n\t\t\t\ttype: \"staking\",\n\t\t\t\tprincipal: resolvePrincipal(pc.address),\n\t\t\t\tconditionCode: FUNGIBLE_CODE_MAP[pc.condition],\n\t\t\t\tamount: parsePostConditionAmount(pc.amount),\n\t\t\t};\n\t\tcase \"pox-postcondition\":\n\t\t\treturn {\n\t\t\t\ttype: \"pox\",\n\t\t\t\tprincipal: resolvePrincipal(pc.address),\n\t\t\t\tconditionCode: POX_CODE_MAP[pc.condition],\n\t\t\t};\n\t}\n}\n\nexport function wireToPostCondition(wire: PostConditionWire): PostCondition {\n\tswitch (wire.type) {\n\t\tcase \"stx\":\n\t\t\treturn {\n\t\t\t\ttype: \"stx-postcondition\",\n\t\t\t\taddress: principalToString(wire.principal),\n\t\t\t\tcondition: fungibleName(wire.conditionCode),\n\t\t\t\tamount: wire.amount.toString(),\n\t\t\t};\n\t\tcase \"ft\":\n\t\t\treturn {\n\t\t\t\ttype: \"ft-postcondition\",\n\t\t\t\taddress: principalToString(wire.principal),\n\t\t\t\tcondition: fungibleName(wire.conditionCode),\n\t\t\t\tamount: wire.amount.toString(),\n\t\t\t\tasset: assetToString(wire.asset),\n\t\t\t};\n\t\tcase \"nft\":\n\t\t\treturn {\n\t\t\t\ttype: \"nft-postcondition\",\n\t\t\t\taddress: principalToString(wire.principal),\n\t\t\t\tcondition: nftName(wire.conditionCode),\n\t\t\t\tasset: assetToString(wire.asset),\n\t\t\t\tassetId: wire.assetId,\n\t\t\t};\n\t\tcase \"staking\":\n\t\t\treturn {\n\t\t\t\ttype: \"staking-postcondition\",\n\t\t\t\taddress: principalToString(wire.principal),\n\t\t\t\tcondition: fungibleName(wire.conditionCode),\n\t\t\t\tamount: wire.amount.toString(),\n\t\t\t};\n\t\tcase \"pox\":\n\t\t\treturn {\n\t\t\t\ttype: \"pox-postcondition\",\n\t\t\t\taddress: principalToString(wire.principal),\n\t\t\t\tcondition: poxName(wire.conditionCode),\n\t\t\t};\n\t}\n}\n\nfunction fungibleName(code: number): FungibleComparator {\n\tconst name = FUNGIBLE_CODE_REVERSE[code];\n\tif (!name) throw new Error(`Unknown fungible post-condition code: ${code}`);\n\treturn name;\n}\n\nfunction nftName(code: number): NonFungibleComparator {\n\tconst name = NFT_CODE_REVERSE[code];\n\tif (!name) throw new Error(`Unknown nft post-condition code: ${code}`);\n\treturn name;\n}\n\nfunction poxName(code: number): PoxComparator {\n\tconst name = POX_CODE_REVERSE[code];\n\tif (!name) throw new Error(`Unknown pox post-condition code: ${code}`);\n\treturn name;\n}\n\n/** Decode a serialized post-condition (stacks.js `Pc.fromHex`). */\nexport function fromHex(hex: string): PostCondition {\n\treturn wireToPostCondition(deserializePostConditionWire(hex));\n}\n\n/** Encode a post-condition to hex (stacks.js `postConditionToHex`). */\nexport function postConditionToHex(pc: PostCondition): string {\n\treturn bytesToHex(serializePostConditionWire(convertPostCondition(pc)));\n}\n"
  ],
  "mappings": ";AAGO,IAAM,WAAW;AAAA,EACvB,UAAU;AAAA,EACV,WAAW;AACZ;AAIO,IAAM,cAAc;AAAA,EAC1B,eAAe;AAAA,EACf,eAAe;AAAA,EACf,cAAc;AAAA,EACd,kBAAkB;AAAA,EAClB,UAAU;AAAA,EACV,wBAAwB;AAAA,EACxB,wBAAwB;AAAA,EACxB,cAAc;AAAA,EACd,kBAAkB;AACnB;AAIO,IAAM,iBAAiB;AAAA,EAC7B,UAAU;AAAA,EACV,UAAU;AAAA,EACV,UAAU;AAAA,EACV,UAAU;AAAA,EACV,UAAU;AAAA,EACV,UAAU;AACX;AAKO,IAAM,aAAa;AAAA,EACzB,aAAa;AAAA,EACb,cAAc;AAAA,EACd,KAAK;AACN;AAIO,IAAM,wBAAwB;AAAA,EACpC,OAAO;AAAA,EACP,MAAM;AAAA,EACN,YAAY;AACb;AAKO,IAAM,kBAAkB;AAAA,EAC9B,OAAO;AAAA,EACP,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,oBAAoB;AAAA,EACpB,0BAA0B;AAC3B;AAKO,IAAM,iBAAiB;AAAA,EAC7B,YAAY;AAAA,EACZ,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