{"record":{"id":"30feb9d149e141b1","repo":"FuelLabs/fuels-ts","slug":"invalid-receipt-type","errorCode":"INVALID_RECEIPT_TYPE","errorMessage":"Invalid receipt type: ${receiptType}.","messagePattern":"Invalid receipt type: (.+?)\\.","errorType":"validation","errorClass":"FuelError","httpStatus":null,"severity":"error","filePath":"packages/account/src/providers/utils/serialization.ts","lineNumber":465,"sourceCode":"      const contractId = hexOrZero(receipt.id || receipt.contractId);\n      const subId = hexOrZero(receipt.subId);\n      const assetId = getMintedAssetId(contractId, subId);\n\n      const burnReceipt: ReceiptBurn = {\n        type: ReceiptType.Burn,\n        subId,\n        contractId,\n        assetId,\n        val: bn(receipt.val),\n        pc: bn(receipt.pc),\n        is: bn(receipt.is),\n      };\n\n      return burnReceipt;\n    }\n\n    default:\n      throw new FuelError(ErrorCode.INVALID_RECEIPT_TYPE, `Invalid receipt type: ${receiptType}.`);\n  }\n};\n\nexport const deserializeInput = (input: InputJson) => {\n  let parsedInput: TransactionRequestInput;\n\n  switch (input.type) {\n    case 'InputCoin':\n      parsedInput = {\n        type: InputType.Coin,\n        id: input.utxoId,\n        amount: bn(input.amount),\n        assetId: input.assetId,\n        owner: input.owner,\n        txPointer: `0x${input.txPointer}`,\n        witnessIndex: Number(input.coinWitnessIndex),\n        predicate: input.predicate,\n        predicateData: input.predicateData,","sourceCodeStart":447,"sourceCodeEnd":483,"githubUrl":"https://github.com/FuelLabs/fuels-ts/blob/b3f37c91aca4aa9d5e4c0d3967f66237190826ea/packages/account/src/providers/utils/serialization.ts#L447-L483","documentation":"Thrown by `deserializeReceipt()` (utils/serialization.ts) when the receipt's `receiptType` does not match any known receipt kind handled by the switch (call, return, returnData, panic, revert, log, logData, transfer, transferOut, scriptResult, messageOut, mint, burn, etc.). The default branch guards against an unknown receipt shape so downstream summary code never processes an undefined receipt.","triggerScenarios":"Deserializing transaction receipts during `getTransactionSummary` when the node returns a receipt whose `receiptType` is not recognized by the installed SDK. Reached from the receipts map in get-transaction-summary.ts.","commonSituations":"Node/SDK version skew: the node emits a new receipt type the client SDK does not know; corrupted receipt payload; decoding receipts from a transaction produced by a newer protocol version.","solutions":["Upgrade @fuel-ts packages to a version compatible with the connected node.","Verify the provider points to a node whose protocol version the SDK supports.","If unavoidable, pre-filter receipts to known types before summary assembly (requires forking the helper)."],"exampleFix":"// no direct caller fix; alignment is the resolution\n// before: getTransactionSummary throws on unknown receipt type\n// after: upgrade @fuel-ts/account to match node version\n//   pnpm up @fuel-ts/account@latest","handlingStrategy":"try-catch","validationCode":"null","typeGuard":"null","tryCatchPattern":"import { ErrorCode } from '@fuel-ts/errors';\ntry {\n  await getTransactionSummary({ id, provider });\n} catch (e) {\n  if (e.code === ErrorCode.INVALID_RECEIPT_TYPE) { /* upgrade SDK or report node version skew */ }\n  else throw e;\n}","preventionTips":["Keep @fuel-ts packages aligned with the connected node version.","Verify provider URL targets a compatible node.","Pre-filter receipts to known types only if you fork the helper."],"tags":["receipt","decoding","serialization","version-compat","summary"],"backgroundTag":null,"analyzedSha":"b3f37c91aca4aa9d5e4c0d3967f66237190826ea","analyzedAt":"2026-08-12T20:30:56.448Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}