{
 "format": "zoobc-conformance-vectors/1",
 "edition": "0.6.1",
 "chapter": "03",
 "license": "CC BY 4.0, ZooBC Foundation",
 "cases": [
  {
   "id": "03-1-v3",
   "chapter": "03",
   "section": "1",
   "title": "A version-3 SendZBC envelope",
   "kind": "tx-envelope",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "version": "3",
    "timestamp": "1793509627",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "fee": "5000000",
    "survival": "0",
    "expiry": "7200",
    "body": "00e1f50500000000",
    "escrow_approver": "",
    "escrow_commission": "0",
    "escrow_timeout": "0",
    "escrow_instruction": "",
    "message": ""
   },
   "expected": {
    "unsigned": "0100000003fbc8e66a00000000000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f215200000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67404b4c00000000000000000000000000201c00000800000000e1f505000000000200000000000000",
    "length": "125"
   }
  },
  {
   "id": "03-1-v2-escrow",
   "chapter": "03",
   "section": "1",
   "title": "A version-2 SendZBC with survival, an escrow and a message",
   "kind": "tx-envelope",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "version": "2",
    "timestamp": "1793509627",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "fee": "5000000",
    "survival": "10000000",
    "expiry": "0",
    "body": "00e1f50500000000",
    "escrow_approver": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "escrow_commission": "1000",
    "escrow_timeout": "1793516827",
    "escrow_instruction": "release on delivery",
    "message": "68656c6c6f207a6f6f6263"
   },
   "expected": {
    "unsigned": "0100000002fbc8e66a00000000000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f215200000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67404b4c000000000080969800000000000800000000e1f5050000000000000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67e8030000000000001be5e66a000000001300000072656c65617365206f6e2064656c6976657279000b00000068656c6c6f207a6f6f6263",
    "length": "204"
   }
  },
  {
   "id": "03-1-v2-sign",
   "chapter": "03",
   "section": "1",
   "title": "Sign the version-2 envelope",
   "kind": "tx-sign",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "genesis": "e003e4e3557ef19f0519bd345009dea7fb43b3445eaa043920c5dc23b3302871",
    "seed": "51bae95d58f32304a5c9d894819989a4fb04da6115d9a43612a026e7a5dd5d96",
    "unsigned": "0100000002fbc8e66a00000000000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f215200000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67404b4c000000000080969800000000000800000000e1f5050000000000000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67e8030000000000001be5e66a000000001300000072656c65617365206f6e2064656c6976657279000b00000068656c6c6f207a6f6f6263"
   },
   "expected": {
    "digest": "a462239f2e42c8c727edd68641fb3a8c07203a7d5f336f6b8864cae5566ec001",
    "signature": "9912c7472a9f2098d9ddd7a837829584fee1b16076a053b2448fdb81a56c862fb1dd7187ee46f61ab68b10730035196663bdbfe8238fbe8fb396e9919f5adc03",
    "hash": "4c337c698be6890c83c2f073c37440b653954c6a37ad304c0c726f2b9e02ab08"
   }
  },
  {
   "id": "03-1-empty-recipient",
   "chapter": "03",
   "section": "1",
   "title": "An envelope with an empty recipient (type 3, 77 bytes)",
   "kind": "tx-envelope",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "3",
    "version": "1",
    "timestamp": "1700000003",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "",
    "fee": "1000000",
    "survival": "0",
    "expiry": "0",
    "body": "deadbeef",
    "escrow_approver": "",
    "escrow_commission": "0",
    "escrow_timeout": "0",
    "escrow_instruction": "",
    "message": ""
   },
   "expected": {
    "unsigned": "030000000103f1536500000000000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f21520200000040420f000000000004000000deadbeef0200000000000000",
    "length": "77"
   },
   "note": "The chapter leaves the sender open; this case uses the test sender."
  },
  {
   "id": "03-3-bare-sender",
   "chapter": "03",
   "section": "3",
   "title": "A bare 32-byte sender is refused",
   "kind": "tx-envelope",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "version": "3",
    "timestamp": "1793509627",
    "sender": "5e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "fee": "5000000",
    "survival": "0",
    "expiry": "7200",
    "body": "00e1f50500000000",
    "escrow_approver": "",
    "escrow_commission": "0",
    "escrow_timeout": "0",
    "escrow_instruction": "",
    "message": ""
   },
   "expected": {
    "error": "accounts are typed: a bare 32-byte key is not an account on this chain"
   }
  },
  {
   "id": "03-11-parse-signed",
   "chapter": "03",
   "section": "11",
   "title": "Read the signed version-3 envelope back",
   "kind": "tx-parse",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "bytes": "0100000003fbc8e66a00000000000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f215200000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67404b4c00000000000000000000000000201c00000800000000e1f505000000000200000000000000f0fc0b0500bad022ba97a355c6cb6f809ab8f79852039744a670dbdc8b090ef838db33715abfdad302f13236caecc7b1f27e486bfef56d716060a9bee363a406",
    "signed": "true"
   },
   "expected": {
    "type": "1",
    "version": "3",
    "timestamp": "1793509627",
    "fee": "5000000",
    "length": "189"
   }
  },
  {
   "id": "03-11-too-short",
   "chapter": "03",
   "section": "11",
   "title": "28 bytes are too short",
   "kind": "tx-parse",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "bytes": "0100000003fbc8e66a00000000000000005e8eb28dccaa94a992f716",
    "signed": "false"
   },
   "expected": {
    "error": "Transaction bytes too short"
   }
  },
  {
   "id": "03-11-cut-survival",
   "chapter": "03",
   "section": "11",
   "title": "Cut inside the survival field",
   "kind": "tx-parse",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "bytes": "0100000003fbc8e66a00000000000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f215200000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67404b4c000000000000000000000000",
    "signed": "false"
   },
   "expected": {
    "error": "Unexpected end of bytes (survival)"
   }
  },
  {
   "id": "03-11-no-signature",
   "chapter": "03",
   "section": "11",
   "title": "The unsigned bytes read with a signature expected",
   "kind": "tx-parse",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "bytes": "0100000003fbc8e66a00000000000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f215200000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67404b4c00000000000000000000000000201c00000800000000e1f505000000000200000000000000",
    "signed": "true"
   },
   "expected": {
    "error": "Unexpected end of bytes (signature)"
   }
  },
  {
   "id": "03-6-short-body",
   "chapter": "03",
   "section": "6",
   "title": "A body length of 9 followed by 8 bytes",
   "kind": "tx-parse",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "bytes": "0100000003fbc8e66a00000000000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f215200000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67404b4c00000000000000000000000000201c00000900000000e1f50500000000",
    "signed": "false"
   },
   "expected": {
    "error": "Unexpected end of bytes (body)"
   }
  },
  {
   "id": "03-1-v3-sign",
   "chapter": "03",
   "section": "1",
   "title": "Sign the version-3 envelope: signature and hash",
   "kind": "tx-sign",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "genesis": "e003e4e3557ef19f0519bd345009dea7fb43b3445eaa043920c5dc23b3302871",
    "seed": "51bae95d58f32304a5c9d894819989a4fb04da6115d9a43612a026e7a5dd5d96",
    "unsigned": "0100000003fbc8e66a00000000000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f215200000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67404b4c00000000000000000000000000201c00000800000000e1f505000000000200000000000000"
   },
   "expected": {
    "signature": "f0fc0b0500bad022ba97a355c6cb6f809ab8f79852039744a670dbdc8b090ef838db33715abfdad302f13236caecc7b1f27e486bfef56d716060a9bee363a406",
    "hash": "058c3078711492773af075a3b4dd07b44a7e17bd3b3ea985f64677af96a4e467"
   }
  },
  {
   "id": "03-2-type-258",
   "chapter": "03",
   "section": "2",
   "title": "Type 258 is written as 02010000",
   "kind": "03-type-id",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "258"
   },
   "expected": {
    "bytes": "02010000",
    "group": "2",
    "subtype": "1"
   }
  },
  {
   "id": "03-2-type-770",
   "chapter": "03",
   "section": "2",
   "title": "Type 770 is written as 02030000",
   "kind": "03-type-id",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "770"
   },
   "expected": {
    "bytes": "02030000",
    "group": "2",
    "subtype": "3"
   }
  },
  {
   "id": "03-2-type-309",
   "chapter": "03",
   "section": "2",
   "title": "Type 309 is written as 35010000",
   "kind": "03-type-id",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "309"
   },
   "expected": {
    "bytes": "35010000",
    "group": "53",
    "subtype": "1"
   }
  },
  {
   "id": "03-2-type-60",
   "chapter": "03",
   "section": "2",
   "title": "Type 60 is written as 3c000000",
   "kind": "03-type-id",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "60"
   },
   "expected": {
    "bytes": "3c000000",
    "group": "60",
    "subtype": "0"
   }
  },
  {
   "id": "03-2-type-61",
   "chapter": "03",
   "section": "2",
   "title": "Type 61 is written as 3d000000",
   "kind": "03-type-id",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "61"
   },
   "expected": {
    "bytes": "3d000000",
    "group": "61",
    "subtype": "0"
   }
  },
  {
   "id": "03-2-type-62",
   "chapter": "03",
   "section": "2",
   "title": "Type 62 is written as 3e000000",
   "kind": "03-type-id",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "62"
   },
   "expected": {
    "bytes": "3e000000",
    "group": "62",
    "subtype": "0"
   }
  },
  {
   "id": "03-2-type-257",
   "chapter": "03",
   "section": "2",
   "title": "Type 257 is written as 01010000",
   "kind": "03-type-id",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "257"
   },
   "expected": {
    "bytes": "01010000",
    "group": "1",
    "subtype": "1"
   }
  },
  {
   "id": "03-2-type-267",
   "chapter": "03",
   "section": "2",
   "title": "Type 267 is written as 0b010000",
   "kind": "03-type-id",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "267"
   },
   "expected": {
    "bytes": "0b010000",
    "group": "11",
    "subtype": "1"
   }
  },
  {
   "id": "03-2-type-297",
   "chapter": "03",
   "section": "2",
   "title": "Type 297 is written as 29010000",
   "kind": "03-type-id",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "297"
   },
   "expected": {
    "bytes": "29010000",
    "group": "41",
    "subtype": "1"
   }
  },
  {
   "id": "03-2-retired-53",
   "chapter": "03",
   "section": "2",
   "title": "An envelope of type 53 (CancelLongevity) is refused on every chain",
   "kind": "03-envelope-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "53",
    "version": "3",
    "timestamp": "1793509627",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "fee": "5000000",
    "survival": "0",
    "expiry": "7200",
    "body": "00e1f50500000000",
    "escrow_approver": "",
    "escrow_commission": "0",
    "escrow_timeout": "0",
    "escrow_instruction": "",
    "message": ""
   },
   "expected": {
    "error": "Transaction type 53 is retired from height 0"
   }
  },
  {
   "id": "03-2-parse-999",
   "chapter": "03",
   "section": "2",
   "title": "An envelope of the unknown type 999 still parses (the body is opaque)",
   "kind": "tx-parse",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "bytes": "e703000003fbc8e66a00000000000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f215200000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67404b4c00000000000000000000000000201c00000800000000e1f505000000000200000000000000f0fc0b0500bad022ba97a355c6cb6f809ab8f79852039744a670dbdc8b090ef838db33715abfdad302f13236caecc7b1f27e486bfef56d716060a9bee363a406",
    "signed": "true"
   },
   "expected": {
    "type": "999",
    "version": "3",
    "timestamp": "1793509627",
    "fee": "5000000",
    "length": "189"
   }
  },
  {
   "id": "03-2-unknown-999",
   "chapter": "03",
   "section": "2",
   "title": "Validation refuses the unknown type 999 once the fee check has passed",
   "kind": "03-envelope-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "999",
    "version": "3",
    "timestamp": "1793509627",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "fee": "5000000",
    "survival": "0",
    "expiry": "7200",
    "body": "00e1f50500000000",
    "escrow_approver": "",
    "escrow_commission": "0",
    "escrow_timeout": "0",
    "escrow_instruction": "",
    "message": ""
   },
   "expected": {
    "error": "Unknown transaction type: 999"
   }
  },
  {
   "id": "03-3-bare-sender-check",
   "chapter": "03",
   "section": "3",
   "title": "A bare 32-byte sender is the first refusal of validation",
   "kind": "03-envelope-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "version": "3",
    "timestamp": "1793509627",
    "sender": "5e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "fee": "5000000",
    "survival": "0",
    "expiry": "7200",
    "body": "00e1f50500000000",
    "escrow_approver": "",
    "escrow_commission": "0",
    "escrow_timeout": "0",
    "escrow_instruction": "",
    "message": ""
   },
   "expected": {
    "error": "accounts are typed: a bare 32-byte key is not an account on this chain"
   }
  },
  {
   "id": "03-3-recipient-type-99",
   "chapter": "03",
   "section": "3",
   "title": "A SendZBC to a recipient of the unknown type 99 is refused",
   "kind": "03-envelope-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "version": "3",
    "timestamp": "1793509627",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "63000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "fee": "5000000",
    "survival": "0",
    "expiry": "7200",
    "body": "00e1f50500000000",
    "escrow_approver": "",
    "escrow_commission": "0",
    "escrow_timeout": "0",
    "escrow_instruction": "",
    "message": ""
   },
   "expected": {
    "error": "Recipient address: Invalid account address type"
   }
  },
  {
   "id": "03-3-missing-recipient",
   "chapter": "03",
   "section": "3",
   "title": "A SendZBC with an empty recipient is refused",
   "kind": "03-envelope-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "version": "3",
    "timestamp": "1793509627",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "",
    "fee": "5000000",
    "survival": "0",
    "expiry": "7200",
    "body": "00e1f50500000000",
    "escrow_approver": "",
    "escrow_commission": "0",
    "escrow_timeout": "0",
    "escrow_instruction": "",
    "message": ""
   },
   "expected": {
    "error": "Missing recipient address"
   }
  },
  {
   "id": "03-3-short-sender",
   "chapter": "03",
   "section": "3",
   "title": "A 20-byte sender is refused",
   "kind": "03-envelope-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "version": "3",
    "timestamp": "1793509627",
    "sender": "000000005e8eb28dccaa94a992f7169fa6796620",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "fee": "5000000",
    "survival": "0",
    "expiry": "7200",
    "body": "00e1f50500000000",
    "escrow_approver": "",
    "escrow_commission": "0",
    "escrow_timeout": "0",
    "escrow_instruction": "",
    "message": ""
   },
   "expected": {
    "error": "Invalid sender address size"
   }
  },
  {
   "id": "03-3-full-key-recipient",
   "chapter": "03",
   "section": "3",
   "title": "A SendZBC whose recipient is a 68-byte full-key form is refused",
   "kind": "03-envelope-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "version": "3",
    "timestamp": "1793509627",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "0400000079be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",
    "fee": "5000000",
    "survival": "0",
    "expiry": "7200",
    "body": "00e1f50500000000",
    "escrow_approver": "",
    "escrow_commission": "0",
    "escrow_timeout": "0",
    "escrow_instruction": "",
    "message": ""
   },
   "expected": {
    "error": "a full-key account form (an Ethereum or Tron key, a Bitcoin key) is not an account: no transaction can be sent from it; name the 20-byte address (rule canonical_account_forms)"
   },
   "note": "A parsed envelope cannot carry this form (the parser reads the 20-byte form of type 4); the proto's named fields can."
  },
  {
   "id": "03-3-eth-recipient",
   "chapter": "03",
   "section": "3",
   "title": "The same SendZBC to the 24-byte Ethereum account of that key passes",
   "kind": "03-envelope-check",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "version": "3",
    "timestamp": "1793509627",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "040000007e5f4552091a69125d5dfcb7b8c2659029395bdf",
    "fee": "5000000",
    "survival": "0",
    "expiry": "7200",
    "body": "00e1f50500000000",
    "escrow_approver": "",
    "escrow_commission": "0",
    "escrow_timeout": "0",
    "escrow_instruction": "",
    "message": ""
   },
   "expected": {
    "verdict": "passes the envelope checks"
   }
  },
  {
   "id": "03-3-full-key-approver",
   "chapter": "03",
   "section": "3",
   "title": "An escrow approver in a full-key form is refused the same way",
   "kind": "03-envelope-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "version": "2",
    "timestamp": "1793509627",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "fee": "5000000",
    "survival": "10000000",
    "expiry": "0",
    "body": "00e1f50500000000",
    "escrow_approver": "050000000279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",
    "escrow_commission": "1000",
    "escrow_timeout": "1793516827",
    "escrow_instruction": "release on delivery",
    "message": "68656c6c6f207a6f6f6263"
   },
   "expected": {
    "error": "a full-key account form (an Ethereum or Tron key, a Bitcoin key) is not an account: no transaction can be sent from it; name the 20-byte address (rule canonical_account_forms)"
   }
  },
  {
   "id": "03-4-v3-valid",
   "chapter": "03",
   "section": "4",
   "title": "The version-3 envelope passes the envelope checks",
   "kind": "03-envelope-check",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "version": "3",
    "timestamp": "1793509627",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "fee": "5000000",
    "survival": "0",
    "expiry": "7200",
    "body": "00e1f50500000000",
    "escrow_approver": "",
    "escrow_commission": "0",
    "escrow_timeout": "0",
    "escrow_instruction": "",
    "message": ""
   },
   "expected": {
    "verdict": "passes the envelope checks"
   }
  },
  {
   "id": "03-4-v2-valid",
   "chapter": "03",
   "section": "4",
   "title": "The version-2 envelope (survival of exactly the minimum deposit) passes",
   "kind": "03-envelope-check",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "version": "2",
    "timestamp": "1793509627",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "fee": "5000000",
    "survival": "10000000",
    "expiry": "0",
    "body": "00e1f50500000000",
    "escrow_approver": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "escrow_commission": "1000",
    "escrow_timeout": "1793516827",
    "escrow_instruction": "release on delivery",
    "message": "68656c6c6f207a6f6f6263"
   },
   "expected": {
    "verdict": "passes the envelope checks"
   }
  },
  {
   "id": "03-4-expiry-cap",
   "chapter": "03",
   "section": "4",
   "title": "A version-3 expiry of 90,000 s is over the cap",
   "kind": "03-envelope-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "version": "3",
    "timestamp": "1793509627",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "fee": "5000000",
    "survival": "0",
    "expiry": "90000",
    "body": "00e1f50500000000",
    "escrow_approver": "",
    "escrow_commission": "0",
    "escrow_timeout": "0",
    "escrow_instruction": "",
    "message": ""
   },
   "expected": {
    "error": "Expiry above the cap of 86400 s"
   }
  },
  {
   "id": "03-4-v1-survival",
   "chapter": "03",
   "section": "4",
   "title": "A version-1 transaction with a survival is refused",
   "kind": "03-envelope-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "version": "1",
    "timestamp": "1793509627",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "fee": "5000000",
    "survival": "10000000",
    "expiry": "0",
    "body": "00e1f50500000000",
    "escrow_approver": "",
    "escrow_commission": "0",
    "escrow_timeout": "0",
    "escrow_instruction": "",
    "message": ""
   },
   "expected": {
    "error": "A version-1 transaction carries no survival; use transaction version 2"
   }
  },
  {
   "id": "03-4-survival-dust",
   "chapter": "03",
   "section": "4",
   "title": "A survival below the minimum deposit is refused",
   "kind": "03-envelope-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "version": "3",
    "timestamp": "1793509627",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "fee": "5000000",
    "survival": "9999999",
    "expiry": "7200",
    "body": "00e1f50500000000",
    "escrow_approver": "",
    "escrow_commission": "0",
    "escrow_timeout": "0",
    "escrow_instruction": "",
    "message": ""
   },
   "expected": {
    "error": "Survival below the minimum deposit of 10000000 units (0 means none)"
   }
  },
  {
   "id": "03-4-survival-negative",
   "chapter": "03",
   "section": "4",
   "title": "A negative survival is refused",
   "kind": "03-envelope-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "version": "3",
    "timestamp": "1793509627",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "fee": "5000000",
    "survival": "-1",
    "expiry": "7200",
    "body": "00e1f50500000000",
    "escrow_approver": "",
    "escrow_commission": "0",
    "escrow_timeout": "0",
    "escrow_instruction": "",
    "message": ""
   },
   "expected": {
    "error": "Survival must not be negative"
   }
  },
  {
   "id": "03-4-version-4",
   "chapter": "03",
   "section": "4",
   "title": "Version 4 is not a transaction version",
   "kind": "03-envelope-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "version": "4",
    "timestamp": "1793509627",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "fee": "5000000",
    "survival": "0",
    "expiry": "7200",
    "body": "00e1f50500000000",
    "escrow_approver": "",
    "escrow_commission": "0",
    "escrow_timeout": "0",
    "escrow_instruction": "",
    "message": ""
   },
   "expected": {
    "error": "Invalid transaction version"
   }
  },
  {
   "id": "03-4-json-v2-expiry",
   "chapter": "03",
   "section": "4",
   "title": "A version-2 JSON submission with expiry 5 is refused before the hash",
   "kind": "03-json-submit",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "json": "{\"version\":2,\"timestamp\":1793509627,\"sender_account_address\":\"000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152\",\"recipient_account_address\":\"00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67\",\"transaction_type\":1,\"fee\":5000000,\"survival\":10000000,\"expiry\":5,\"transaction_body_bytes\":\"00e1f50500000000\",\"signature\":\"f0fc0b0500bad022ba97a355c6cb6f809ab8f79852039744a670dbdc8b090ef838db33715abfdad302f13236caecc7b1f27e486bfef56d716060a9bee363a406\"}"
   },
   "expected": {
    "error": "expiry needs transaction version 3: a version-2 transaction carries no expiry (its signed bytes have no place for one)"
   }
  },
  {
   "id": "03-4-json-expiry-90000",
   "chapter": "03",
   "section": "4",
   "title": "A version-3 JSON submission with expiry 90,000 is refused before the hash",
   "kind": "03-json-submit",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "json": "{\"version\":3,\"timestamp\":1793509627,\"sender_account_address\":\"000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152\",\"recipient_account_address\":\"00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67\",\"transaction_type\":1,\"fee\":5000000,\"survival\":0,\"expiry\":90000,\"transaction_body_bytes\":\"00e1f50500000000\",\"signature\":\"f0fc0b0500bad022ba97a355c6cb6f809ab8f79852039744a670dbdc8b090ef838db33715abfdad302f13236caecc7b1f27e486bfef56d716060a9bee363a406\"}"
   },
   "expected": {
    "error": "expiry must be between 0 and 86400 seconds"
   }
  },
  {
   "id": "03-5-v3-window",
   "chapter": "03",
   "section": "5",
   "title": "The version-3 envelope may be carried until 7,200 s after its timestamp",
   "kind": "03-timestamp-window",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "version": "3",
    "timestamp": "1793509627",
    "expiry": "7200",
    "block_timestamp": "1793516827",
    "block_height": "1"
   },
   "expected": {
    "window": "7200",
    "last_block_timestamp": "1793516827",
    "verdict": "valid"
   }
  },
  {
   "id": "03-5-v3-window-over",
   "chapter": "03",
   "section": "5",
   "title": "One second later the block would carry an expired transaction",
   "kind": "03-timestamp-window",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "version": "3",
    "timestamp": "1793509627",
    "expiry": "7200",
    "block_timestamp": "1793516828",
    "block_height": "1"
   },
   "expected": {
    "window": "7200",
    "verdict": "Block contains an expired transaction"
   }
  },
  {
   "id": "03-5-v2-window",
   "chapter": "03",
   "section": "5",
   "title": "The version-2 envelope may be carried until 3,600 s after its timestamp",
   "kind": "03-timestamp-window",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "version": "2",
    "timestamp": "1793509627",
    "expiry": "0",
    "block_timestamp": "1793513227",
    "block_height": "1"
   },
   "expected": {
    "window": "3600",
    "last_block_timestamp": "1793513227",
    "verdict": "valid"
   }
  },
  {
   "id": "03-5-v2-window-over",
   "chapter": "03",
   "section": "5",
   "title": "A block stamped one second later carrying it is invalid",
   "kind": "03-timestamp-window",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "version": "2",
    "timestamp": "1793509627",
    "expiry": "0",
    "block_timestamp": "1793513228",
    "block_height": "1"
   },
   "expected": {
    "window": "3600",
    "verdict": "Block contains an expired transaction"
   }
  },
  {
   "id": "03-5-future",
   "chapter": "03",
   "section": "5",
   "title": "The version-3 envelope in a block stamped 3,601 s before it is refused",
   "kind": "03-timestamp-window",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "version": "3",
    "timestamp": "1793509627",
    "expiry": "7200",
    "block_timestamp": "1793506026",
    "block_height": "1"
   },
   "expected": {
    "verdict": "Block contains a transaction dated more than 3600 s after the block"
   }
  },
  {
   "id": "03-5-zero-timestamp",
   "chapter": "03",
   "section": "5",
   "title": "A timestamp of 0 is refused",
   "kind": "03-envelope-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "version": "3",
    "timestamp": "0",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "fee": "5000000",
    "survival": "0",
    "expiry": "7200",
    "body": "00e1f50500000000",
    "escrow_approver": "",
    "escrow_commission": "0",
    "escrow_timeout": "0",
    "escrow_instruction": "",
    "message": ""
   },
   "expected": {
    "error": "Invalid transaction timestamp"
   }
  },
  {
   "id": "03-6-body-65537",
   "chapter": "03",
   "section": "6",
   "title": "A body of 65,537 bytes is refused",
   "kind": "03-envelope-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "version": "3",
    "timestamp": "1793509627",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "fee": "5000000",
    "survival": "0",
    "expiry": "7200",
    "body": "00e1f50500000000",
    "escrow_approver": "",
    "escrow_commission": "0",
    "escrow_timeout": "0",
    "escrow_instruction": "",
    "message": "",
    "body_size": "65537"
   },
   "expected": {
    "error": "Transaction body exceeds maximum length of 65536"
   }
  },
  {
   "id": "03-7-escrow-past-timeout",
   "chapter": "03",
   "section": "7",
   "title": "An escrow whose timeout is not after the transaction's timestamp is refused",
   "kind": "03-envelope-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "version": "2",
    "timestamp": "1793509627",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "fee": "5000000",
    "survival": "10000000",
    "expiry": "0",
    "body": "00e1f50500000000",
    "escrow_approver": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "escrow_commission": "1000",
    "escrow_timeout": "1793509627",
    "escrow_instruction": "release on delivery",
    "message": "68656c6c6f207a6f6f6263"
   },
   "expected": {
    "error": "Escrow timeout must be a future Unix timestamp (now + lock duration); got 1793509627 <= tx time 1793509627"
   }
  },
  {
   "id": "03-7-escrow-commission-negative",
   "chapter": "03",
   "section": "7",
   "title": "The version-2 escrow part with commission ffffffffffffffff (-1) is refused",
   "kind": "03-envelope-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "version": "2",
    "timestamp": "1793509627",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "fee": "5000000",
    "survival": "10000000",
    "expiry": "0",
    "body": "00e1f50500000000",
    "escrow_approver": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "escrow_commission": "-1",
    "escrow_timeout": "1793516827",
    "escrow_instruction": "release on delivery",
    "message": "68656c6c6f207a6f6f6263"
   },
   "expected": {
    "error": "Escrow commission cannot be negative"
   }
  },
  {
   "id": "03-7-escrow-wrong-type",
   "chapter": "03",
   "section": "7",
   "title": "An escrow on a dataset transaction is refused",
   "kind": "03-envelope-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "3",
    "version": "2",
    "timestamp": "1793509627",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "",
    "fee": "5000000",
    "survival": "10000000",
    "expiry": "0",
    "body": "00e1f50500000000",
    "escrow_approver": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "escrow_commission": "1000",
    "escrow_timeout": "1793516827",
    "escrow_instruction": "release on delivery",
    "message": "68656c6c6f207a6f6f6263"
   },
   "expected": {
    "error": "Escrow is only supported for SendZBC and TransferToken transactions"
   }
  },
  {
   "id": "03-8-null-byte",
   "chapter": "03",
   "section": "8",
   "title": "A plain message with a zero byte is refused",
   "kind": "03-envelope-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "version": "3",
    "timestamp": "1793509627",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "fee": "5000000",
    "survival": "0",
    "expiry": "7200",
    "body": "00e1f50500000000",
    "escrow_approver": "",
    "escrow_commission": "0",
    "escrow_timeout": "0",
    "escrow_instruction": "",
    "message": "680069"
   },
   "expected": {
    "error": "Message contains null bytes"
   }
  },
  {
   "id": "03-8-plain-257",
   "chapter": "03",
   "section": "8",
   "title": "A plain message of 257 bytes is refused",
   "kind": "03-envelope-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "version": "3",
    "timestamp": "1793509627",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "fee": "5000000",
    "survival": "0",
    "expiry": "7200",
    "body": "00e1f50500000000",
    "escrow_approver": "",
    "escrow_commission": "0",
    "escrow_timeout": "0",
    "escrow_instruction": "",
    "message": "6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"
   },
   "expected": {
    "error": "Message exceeds maximum length of 256"
   }
  },
  {
   "id": "03-8-plain-256",
   "chapter": "03",
   "section": "8",
   "title": "A plain message of 256 bytes is accepted",
   "kind": "03-envelope-check",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "version": "3",
    "timestamp": "1793509627",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "fee": "5000000",
    "survival": "0",
    "expiry": "7200",
    "body": "00e1f50500000000",
    "escrow_approver": "",
    "escrow_commission": "0",
    "escrow_timeout": "0",
    "escrow_instruction": "",
    "message": "61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"
   },
   "expected": {
    "verdict": "passes the envelope checks"
   }
  },
  {
   "id": "03-8-encrypted-321",
   "chapter": "03",
   "section": "8",
   "title": "An encrypted (ZBE1) message of 321 bytes is refused",
   "kind": "03-envelope-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "version": "3",
    "timestamp": "1793509627",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "fee": "5000000",
    "survival": "0",
    "expiry": "7200",
    "body": "00e1f50500000000",
    "escrow_approver": "",
    "escrow_commission": "0",
    "escrow_timeout": "0",
    "escrow_instruction": "",
    "message": "5a4245310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
   },
   "expected": {
    "error": "Encrypted message too large"
   }
  },
  {
   "id": "03-8-encrypted-320",
   "chapter": "03",
   "section": "8",
   "title": "An encrypted (ZBE1) message of 320 bytes with zero bytes is accepted",
   "kind": "03-envelope-check",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "version": "3",
    "timestamp": "1793509627",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "fee": "5000000",
    "survival": "0",
    "expiry": "7200",
    "body": "00e1f50500000000",
    "escrow_approver": "",
    "escrow_commission": "0",
    "escrow_timeout": "0",
    "escrow_instruction": "",
    "message": "5a42453100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
   },
   "expected": {
    "verdict": "passes the envelope checks"
   }
  },
  {
   "id": "03-9-siglen-0",
   "chapter": "03",
   "section": "9",
   "title": "The signature of a native sender is read as 64",
   "kind": "03-signature-length",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "sender_type": "0"
   },
   "expected": {
    "length": "64"
   }
  },
  {
   "id": "03-9-siglen-11",
   "chapter": "03",
   "section": "9",
   "title": "The signature of a Solana sender is read as 64",
   "kind": "03-signature-length",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "sender_type": "11"
   },
   "expected": {
    "length": "64"
   }
  },
  {
   "id": "03-9-siglen-12",
   "chapter": "03",
   "section": "9",
   "title": "The signature of a Polkadot sender is read as 64",
   "kind": "03-signature-length",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "sender_type": "12"
   },
   "expected": {
    "length": "64"
   }
  },
  {
   "id": "03-9-siglen-4",
   "chapter": "03",
   "section": "9",
   "title": "The signature of an Ethereum sender is read as 65",
   "kind": "03-signature-length",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "sender_type": "4"
   },
   "expected": {
    "length": "65"
   }
  },
  {
   "id": "03-9-siglen-15",
   "chapter": "03",
   "section": "9",
   "title": "The signature of a Tron sender is read as 65",
   "kind": "03-signature-length",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "sender_type": "15"
   },
   "expected": {
    "length": "65"
   }
  },
  {
   "id": "03-9-siglen-13",
   "chapter": "03",
   "section": "9",
   "title": "The signature of a Cardano sender is read as 98",
   "kind": "03-signature-length",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "sender_type": "13"
   },
   "expected": {
    "length": "98"
   }
  },
  {
   "id": "03-9-siglen-16",
   "chapter": "03",
   "section": "9",
   "title": "The signature of a Tezos sender is read as 98",
   "kind": "03-signature-length",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "sender_type": "16"
   },
   "expected": {
    "length": "98"
   }
  },
  {
   "id": "03-9-siglen-3",
   "chapter": "03",
   "section": "9",
   "title": "The signature of an Estonia eID sender is read as 96",
   "kind": "03-signature-length",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "sender_type": "3"
   },
   "expected": {
    "length": "96"
   }
  },
  {
   "id": "03-9-siglen-1",
   "chapter": "03",
   "section": "9",
   "title": "The signature of a Bitcoin sender is read as all remaining bytes",
   "kind": "03-signature-length",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "sender_type": "1"
   },
   "expected": {
    "length": "all remaining bytes"
   }
  },
  {
   "id": "03-9-siglen-5",
   "chapter": "03",
   "section": "9",
   "title": "The signature of a P2PKH sender is read as all remaining bytes",
   "kind": "03-signature-length",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "sender_type": "5"
   },
   "expected": {
    "length": "all remaining bytes"
   }
  },
  {
   "id": "03-9-siglen-6",
   "chapter": "03",
   "section": "9",
   "title": "The signature of a P2SH sender is read as all remaining bytes",
   "kind": "03-signature-length",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "sender_type": "6"
   },
   "expected": {
    "length": "all remaining bytes"
   }
  },
  {
   "id": "03-9-siglen-7",
   "chapter": "03",
   "section": "9",
   "title": "The signature of a P2WPKH sender is read as all remaining bytes",
   "kind": "03-signature-length",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "sender_type": "7"
   },
   "expected": {
    "length": "all remaining bytes"
   }
  },
  {
   "id": "03-9-siglen-8",
   "chapter": "03",
   "section": "9",
   "title": "The signature of a P2WSH sender is read as all remaining bytes",
   "kind": "03-signature-length",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "sender_type": "8"
   },
   "expected": {
    "length": "all remaining bytes"
   }
  },
  {
   "id": "03-9-siglen-14",
   "chapter": "03",
   "section": "9",
   "title": "The signature of a Ripple sender is read as all remaining bytes",
   "kind": "03-signature-length",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "sender_type": "14"
   },
   "expected": {
    "length": "all remaining bytes"
   }
  },
  {
   "id": "03-9-siglen-9",
   "chapter": "03",
   "section": "9",
   "title": "The signature of a Taproot sender is read as all remaining bytes",
   "kind": "03-signature-length",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "sender_type": "9"
   },
   "expected": {
    "length": "all remaining bytes"
   }
  },
  {
   "id": "03-9-siglen-2",
   "chapter": "03",
   "section": "9",
   "title": "The signature of the empty type is read as 64",
   "kind": "03-signature-length",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "sender_type": "2"
   },
   "expected": {
    "length": "64"
   }
  },
  {
   "id": "03-9-siglen-10",
   "chapter": "03",
   "section": "9",
   "title": "The signature of a dataset address is read as 64",
   "kind": "03-signature-length",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "sender_type": "10"
   },
   "expected": {
    "length": "64"
   }
  },
  {
   "id": "03-9-siglen-99",
   "chapter": "03",
   "section": "9",
   "title": "The signature of an unknown type is read as 64",
   "kind": "03-signature-length",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "sender_type": "99"
   },
   "expected": {
    "length": "64"
   }
  },
  {
   "id": "03-9-tron-178",
   "chapter": "03",
   "section": "9",
   "title": "A Tron sender's signed envelope is 178 bytes and parses back with its 65 signature bytes",
   "kind": "tx-parse",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "bytes": "0100000003fbc8e66a000000000f000000682a115d32d5f6c7c0ac3d74c48099a8d83526f400000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67404b4c00000000000000000000000000201c00000800000000e1f50500000000020000000000000001e8100696bd1d8b9a2516000796c47de37534f8ba082ced211e6b7db7b7fb8d1574799329c0f40c76b79c8221baf5d7ecbfcc55fa435700f40570a473bded631b",
    "signed": "true"
   },
   "expected": {
    "type": "1",
    "version": "3",
    "length": "178",
    "signature": "01e8100696bd1d8b9a2516000796c47de37534f8ba082ced211e6b7db7b7fb8d1574799329c0f40c76b79c8221baf5d7ecbfcc55fa435700f40570a473bded631b",
    "hash": "d77c9fc92e39bcb4bcac6cab1d5f02f53994dab5f5d2f589a1287777aeae4f37"
   }
  },
  {
   "id": "03-9-tron-177",
   "chapter": "03",
   "section": "9",
   "title": "The same envelope cut to 177 bytes",
   "kind": "tx-parse",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "bytes": "0100000003fbc8e66a000000000f000000682a115d32d5f6c7c0ac3d74c48099a8d83526f400000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67404b4c00000000000000000000000000201c00000800000000e1f50500000000020000000000000001e8100696bd1d8b9a2516000796c47de37534f8ba082ced211e6b7db7b7fb8d1574799329c0f40c76b79c8221baf5d7ecbfcc55fa435700f40570a473bded63",
    "signed": "true"
   },
   "expected": {
    "error": "Unexpected end of bytes (signature)"
   }
  },
  {
   "id": "03-9-ripple-212",
   "chapter": "03",
   "section": "9",
   "title": "A Ripple sender with a compressed key: 113 + 99 = 212 bytes, the last 99 the signature",
   "kind": "tx-parse",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "bytes": "0100000003fbc8e66a000000000e0000007607d55d98d18578c275d413da80a77d529a369300000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67404b4c00000000000000000000000000201c00000800000000e1f5050000000002000000000000002100030d0fdb91231f43aa7416753deddd09c461b7db68d65441bff3e0fc4d3610cdf901e8100696bd1d8b9a2516000796c47de37534f8ba082ced211e6b7db7b7fb8d7bd5900a90925153988895cc14d912487353d78e33ce4b44c0ed83146f9ffbc0",
    "signed": "true"
   },
   "expected": {
    "length": "212",
    "signature": "2100030d0fdb91231f43aa7416753deddd09c461b7db68d65441bff3e0fc4d3610cdf901e8100696bd1d8b9a2516000796c47de37534f8ba082ced211e6b7db7b7fb8d7bd5900a90925153988895cc14d912487353d78e33ce4b44c0ed83146f9ffbc0",
    "hash": "f4bad83e78648a1d57a05e9dc4a3b5a3531d187712ed0a4938dec025b9fb4f7e"
   }
  },
  {
   "id": "03-9-ripple-244",
   "chapter": "03",
   "section": "9",
   "title": "With an uncompressed key: 244 bytes, the last 131 the signature",
   "kind": "tx-parse",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "bytes": "0100000003fbc8e66a000000000e0000007607d55d98d18578c275d413da80a77d529a369300000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67404b4c00000000000000000000000000201c00000800000000e1f5050000000002000000000000004100040d0fdb91231f43aa7416753deddd09c461b7db68d65441bff3e0fc4d3610cdf9b3115082421f9ae5992350fadc69371bbdd93e92544149e312ef860376f39b4f01e8100696bd1d8b9a2516000796c47de37534f8ba082ced211e6b7db7b7fb8d7bd5900a90925153988895cc14d912487353d78e33ce4b44c0ed83146f9ffbc0",
    "signed": "true"
   },
   "expected": {
    "length": "244",
    "signature": "4100040d0fdb91231f43aa7416753deddd09c461b7db68d65441bff3e0fc4d3610cdf9b3115082421f9ae5992350fadc69371bbdd93e92544149e312ef860376f39b4f01e8100696bd1d8b9a2516000796c47de37534f8ba082ced211e6b7db7b7fb8d7bd5900a90925153988895cc14d912487353d78e33ce4b44c0ed83146f9ffbc0"
   }
  },
  {
   "id": "03-9-taproot-65",
   "chapter": "03",
   "section": "9",
   "title": "A Taproot sender followed by 65 bytes: all 65 parse as the signature",
   "kind": "tx-parse",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "bytes": "0100000003fbc8e66a00000000090000000d0fdb91231f43aa7416753deddd09c461b7db68d65441bff3e0fc4d3610cdf900000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67404b4c00000000000000000000000000201c00000800000000e1f50500000000020000000000000001e8100696bd1d8b9a2516000796c47de37534f8ba082ced211e6b7db7b7fb8d1574799329c0f40c76b79c8221baf5d7ecbfcc55fa435700f40570a473bded631b",
    "signed": "true"
   },
   "expected": {
    "length": "190",
    "signature": "01e8100696bd1d8b9a2516000796c47de37534f8ba082ced211e6b7db7b7fb8d1574799329c0f40c76b79c8221baf5d7ecbfcc55fa435700f40570a473bded631b"
   }
  },
  {
   "id": "03-9-taproot-65-verify",
   "chapter": "03",
   "section": "9",
   "title": "The Taproot verifier then refuses the 65 bytes",
   "kind": "02-verify",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "payload": "1ca35831c3eb645739a67034bacebe0a8a95b7ffde0c8656f6fcb58dbe11be1b",
    "signature": "01e8100696bd1d8b9a2516000796c47de37534f8ba082ced211e6b7db7b7fb8d1574799329c0f40c76b79c8221baf5d7ecbfcc55fa435700f40570a473bded631b",
    "address": "090000000d0fdb91231f43aa7416753deddd09c461b7db68d65441bff3e0fc4d3610cdf9"
   },
   "expected": {
    "error": "Invalid signature size for account type"
   }
  },
  {
   "id": "03-9-estonia-96",
   "chapter": "03",
   "section": "9",
   "title": "An Estonia eID sender is read with a 96-byte signature",
   "kind": "tx-parse",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "bytes": "0100000003fbc8e66a0000000003000000111111111111111111111111111111111111111111111111111111111111111100000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67404b4c00000000000000000000000000201c00000800000000e1f505000000000200000000000000222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222",
    "signed": "true"
   },
   "expected": {
    "length": "221",
    "signature": "222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222"
   }
  },
  {
   "id": "03-10-json-v3",
   "chapter": "03",
   "section": "10",
   "title": "The JSON submission of the version-3 envelope",
   "kind": "03-json-submit",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "json": "{\"version\":3,\"timestamp\":1793509627,\"sender_account_address\":\"000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152\",\"recipient_account_address\":\"00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67\",\"transaction_type\":1,\"fee\":5000000,\"survival\":0,\"expiry\":7200,\"transaction_body_bytes\":\"00e1f50500000000\",\"signature\":\"f0fc0b0500bad022ba97a355c6cb6f809ab8f79852039744a670dbdc8b090ef838db33715abfdad302f13236caecc7b1f27e486bfef56d716060a9bee363a406\"}"
   },
   "expected": {
    "unsigned": "0100000003fbc8e66a00000000000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f215200000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67404b4c00000000000000000000000000201c00000800000000e1f505000000000200000000000000",
    "length": "125",
    "hash": "058c3078711492773af075a3b4dd07b44a7e17bd3b3ea985f64677af96a4e467"
   }
  },
  {
   "id": "03-10-json-bare",
   "chapter": "03",
   "section": "10",
   "title": "The same JSON with a bare 32-byte sender is refused",
   "kind": "03-json-submit",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "json": "{\"version\":3,\"timestamp\":1793509627,\"sender_account_address\":\"5e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152\",\"recipient_account_address\":\"00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67\",\"transaction_type\":1,\"fee\":5000000,\"survival\":0,\"expiry\":7200,\"transaction_body_bytes\":\"00e1f50500000000\",\"signature\":\"f0fc0b0500bad022ba97a355c6cb6f809ab8f79852039744a670dbdc8b090ef838db33715abfdad302f13236caecc7b1f27e486bfef56d716060a9bee363a406\"}"
   },
   "expected": {
    "error": "Invalid transaction: accounts are typed: a bare 32-byte key is not an account on this chain"
   }
  },
  {
   "id": "03-10-json-fee-float",
   "chapter": "03",
   "section": "10",
   "title": "A fee written as a float is refused by name",
   "kind": "03-json-submit",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "json": "{\"version\":3,\"timestamp\":1793509627,\"sender_account_address\":\"000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152\",\"recipient_account_address\":\"00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67\",\"transaction_type\":1,\"fee\":5000000.0,\"survival\":0,\"expiry\":7200,\"transaction_body_bytes\":\"00e1f50500000000\",\"signature\":\"f0fc0b0500bad022ba97a355c6cb6f809ab8f79852039744a670dbdc8b090ef838db33715abfdad302f13236caecc7b1f27e486bfef56d716060a9bee363a406\"}"
   },
   "expected": {
    "error": "field 'fee' must be an integer"
   }
  },
  {
   "id": "03-10-json-odd-hex",
   "chapter": "03",
   "section": "10",
   "title": "A signature with an odd number of hex digits is refused",
   "kind": "03-json-submit",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "json": "{\"version\":3,\"timestamp\":1793509627,\"sender_account_address\":\"000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152\",\"recipient_account_address\":\"00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67\",\"transaction_type\":1,\"fee\":5000000,\"survival\":0,\"expiry\":7200,\"transaction_body_bytes\":\"00e1f50500000000\",\"signature\":\"f0fc0b0500bad022ba97a355c6cb6f809ab8f79852039744a670dbdc8b090ef838db33715abfdad302f13236caecc7b1f27e486bfef56d716060a9bee363a40\"}"
   },
   "expected": {
    "error": "field 'signature' must be an even number of hex characters"
   }
  },
  {
   "id": "03-10-json-no-signature",
   "chapter": "03",
   "section": "10",
   "title": "A submission without a signature is refused",
   "kind": "03-json-submit",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "json": "{\"version\":1,\"timestamp\":1793509627,\"transaction_type\":1}"
   },
   "expected": {
    "error": "field 'signature' is required"
   }
  },
  {
   "id": "03-11-parse-v2",
   "chapter": "03",
   "section": "11",
   "title": "Read the unsigned version-2 envelope back",
   "kind": "tx-parse",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "bytes": "0100000002fbc8e66a00000000000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f215200000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67404b4c000000000080969800000000000800000000e1f5050000000000000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67e8030000000000001be5e66a000000001300000072656c65617365206f6e2064656c6976657279000b00000068656c6c6f207a6f6f6263",
    "signed": "false"
   },
   "expected": {
    "type": "1",
    "version": "2",
    "timestamp": "1793509627",
    "fee": "5000000",
    "length": "204"
   }
  },
  {
   "id": "03-11-parse-empty-recipient",
   "chapter": "03",
   "section": "11",
   "title": "Read the 77-byte envelope with an empty recipient back",
   "kind": "tx-parse",
   "validity": "valid",
   "source": "computed",
   "inputs": {
    "bytes": "030000000103f1536500000000000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f21520200000040420f000000000004000000deadbeef0200000000000000",
    "signed": "false"
   },
   "expected": {
    "type": "3",
    "version": "1",
    "timestamp": "1700000003",
    "fee": "1000000",
    "length": "77"
   }
  },
  {
   "id": "03-12-first-bare",
   "chapter": "03",
   "section": "12",
   "title": "A bare sender and an expiry on a version-2 transaction: the bare sender is refused first",
   "kind": "03-envelope-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "version": "2",
    "timestamp": "1793509627",
    "sender": "5e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "fee": "5000000",
    "survival": "10000000",
    "expiry": "5",
    "body": "00e1f50500000000",
    "escrow_approver": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "escrow_commission": "1000",
    "escrow_timeout": "1793516827",
    "escrow_instruction": "release on delivery",
    "message": "68656c6c6f207a6f6f6263"
   },
   "expected": {
    "error": "accounts are typed: a bare 32-byte key is not an account on this chain"
   }
  },
  {
   "id": "03-12-first-expiry",
   "chapter": "03",
   "section": "12",
   "title": "A typed sender and an expiry on a version-2 transaction: the expiry is refused",
   "kind": "03-envelope-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "version": "2",
    "timestamp": "1793509627",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "fee": "5000000",
    "survival": "10000000",
    "expiry": "5",
    "body": "00e1f50500000000",
    "escrow_approver": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "escrow_commission": "1000",
    "escrow_timeout": "1793516827",
    "escrow_instruction": "release on delivery",
    "message": "68656c6c6f207a6f6f6263"
   },
   "expected": {
    "error": "A version-2 transaction carries no expiry; use transaction version 3"
   }
  },
  {
   "id": "03-12-fee-zero",
   "chapter": "03",
   "section": "12",
   "title": "The version-3 envelope with fee 0 from an ordinary sender",
   "kind": "03-envelope-check",
   "validity": "invalid",
   "source": "computed",
   "inputs": {
    "type": "1",
    "version": "3",
    "timestamp": "1793509627",
    "sender": "000000005e8eb28dccaa94a992f7169fa67966207d96aa55df7d24d2d6ec1f538c9f2152",
    "recipient": "00000000fd4472bbdec43b919aa37b9b3366a3318f2902a753a15f5fd6d43c44b5121b67",
    "fee": "0",
    "survival": "0",
    "expiry": "7200",
    "body": "00e1f50500000000",
    "escrow_approver": "",
    "escrow_commission": "0",
    "escrow_timeout": "0",
    "escrow_instruction": "",
    "message": ""
   },
   "expected": {
    "error": "Transaction fee too low"
   }
  }
 ]
}
