@marcuspuchalla/nachos 0.1.3 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/CHANGELOG.md +75 -0
  2. package/dist/{chunk-PTWN7K3Y.cjs → chunk-3Z45RBZP.cjs} +469 -244
  3. package/dist/chunk-3Z45RBZP.cjs.map +1 -0
  4. package/dist/{chunk-2MTLSQ7E.js → chunk-EDXZTSIA.js} +224 -166
  5. package/dist/chunk-EDXZTSIA.js.map +1 -0
  6. package/dist/{chunk-R62CQQNI.cjs → chunk-HMUA5KLG.cjs} +239 -181
  7. package/dist/chunk-HMUA5KLG.cjs.map +1 -0
  8. package/dist/{chunk-ZDZ2B5PE.js → chunk-JESIF5IF.js} +7 -3
  9. package/dist/chunk-JESIF5IF.js.map +1 -0
  10. package/dist/{chunk-5A5T56JB.js → chunk-LWNWC2O7.js} +442 -217
  11. package/dist/chunk-LWNWC2O7.js.map +1 -0
  12. package/dist/{chunk-PD72MVTX.cjs → chunk-P6A2OOIY.cjs} +7 -3
  13. package/dist/chunk-P6A2OOIY.cjs.map +1 -0
  14. package/dist/encoder/index.cjs +14 -14
  15. package/dist/encoder/index.d.cts +5 -4
  16. package/dist/encoder/index.d.ts +5 -4
  17. package/dist/encoder/index.js +2 -2
  18. package/dist/index.cjs +58 -39
  19. package/dist/index.cjs.map +1 -1
  20. package/dist/index.d.cts +40 -21
  21. package/dist/index.d.ts +40 -21
  22. package/dist/index.js +37 -17
  23. package/dist/index.js.map +1 -1
  24. package/dist/metafile-cjs.json +1 -1
  25. package/dist/metafile-esm.json +1 -1
  26. package/dist/parser/index.cjs +21 -21
  27. package/dist/parser/index.d.cts +4 -2
  28. package/dist/parser/index.d.ts +4 -2
  29. package/dist/parser/index.js +2 -2
  30. package/dist/{types-DvNlfbKB.d.cts → types-eG2qalpr.d.cts} +27 -1
  31. package/dist/{types-DvNlfbKB.d.ts → types-eG2qalpr.d.ts} +27 -1
  32. package/dist/{useCborSimpleEncoder-TVxzNJ_9.d.ts → useCborSimpleEncoder-CamvS-_N.d.ts} +7 -3
  33. package/dist/{useCborSimpleEncoder-ButVU988.d.cts → useCborSimpleEncoder-DXgPx62d.d.cts} +7 -3
  34. package/dist/{useCborTag-xV2Pz2VY.d.ts → useCborTag-D4d7xG3-.d.cts} +9 -4
  35. package/dist/{useCborTag-Cs1CZuXZ.d.cts → useCborTag-TYst1KR6.d.ts} +9 -4
  36. package/package.json +1 -1
  37. package/src/__tests__/audit-fixes.test.ts +141 -0
  38. package/src/__tests__/public-api.test.ts +153 -0
  39. package/src/__tests__/roundtrip.test.ts +5 -6
  40. package/src/encoder/__tests__/cbor-collection-encoder.test.ts +103 -5
  41. package/src/encoder/__tests__/cbor-encoder-errors.test.ts +40 -5
  42. package/src/encoder/__tests__/cbor-simple-encoder.test.ts +126 -0
  43. package/src/encoder/composables/useCborCollectionEncoder.ts +30 -26
  44. package/src/encoder/composables/useCborEncoder.ts +40 -0
  45. package/src/encoder/composables/useCborSimpleEncoder.ts +40 -9
  46. package/src/encoder/types.ts +9 -4
  47. package/src/encoder/utils.ts +33 -1
  48. package/src/index.ts +39 -20
  49. package/src/parser/__tests__/buffer-native-parsing.test.ts +338 -0
  50. package/src/parser/__tests__/cbor-map-duplicate-keys.test.ts +97 -7
  51. package/src/parser/__tests__/cbor-security-dos-protection.test.ts +164 -31
  52. package/src/parser/__tests__/cbor-standard-tags.test.ts +75 -7
  53. package/src/parser/__tests__/cbor-tag-reparse-fix.test.ts +268 -0
  54. package/src/parser/__tests__/utils-errors.test.ts +11 -3
  55. package/src/parser/composables/useCborCollection.ts +51 -45
  56. package/src/parser/composables/useCborDiagnostic.ts +28 -0
  57. package/src/parser/composables/useCborFloat.ts +2 -1
  58. package/src/parser/composables/useCborInteger.ts +24 -10
  59. package/src/parser/composables/useCborParser.ts +448 -208
  60. package/src/parser/composables/useCborTag.ts +53 -38
  61. package/src/parser/types.ts +32 -1
  62. package/src/parser/utils.ts +52 -0
  63. package/dist/chunk-2MTLSQ7E.js.map +0 -1
  64. package/dist/chunk-5A5T56JB.js.map +0 -1
  65. package/dist/chunk-PD72MVTX.cjs.map +0 -1
  66. package/dist/chunk-PTWN7K3Y.cjs.map +0 -1
  67. package/dist/chunk-R62CQQNI.cjs.map +0 -1
  68. package/dist/chunk-ZDZ2B5PE.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/parser/types.ts","../src/parser/composables/useCborStringTypes.ts"],"names":["CborMajorType","CborAdditionalInfo","CborSimpleValue","CborTag"],"mappings":";;;AA8FO,IAAM,cAAA,GAAyC;AAAA,EACpD,YAAA,EAAc,KAAK,IAAA,GAAO,IAAA;AAAA;AAAA,EAC1B,aAAA,EAAe,MAAM,IAAA,GAAO,IAAA;AAAA;AAAA,EAC5B,iBAAiB,IAAA,GAAO,IAAA;AAAA;AAAA,EACxB,cAAA,EAAgB,GAAA;AAAA,EAChB,UAAA,EAAY,GAAA;AAAA,EACZ,QAAA,EAAU,GAAA;AAAA;AAAA,EACV,WAAA,EAAa,GAAA;AAAA;AAAA,EACb,cAAA,EAAgB,IAAA;AAAA;AAAA,EAChB,YAAA,EAAc;AAAA;AAChB;AAKO,IAAM,eAAA,GAA0C;AAAA,EACrD,MAAA,EAAQ,KAAA;AAAA,EACR,iBAAA,EAAmB,KAAA;AAAA,EACnB,eAAA,EAAiB,IAAA;AAAA;AAAA;AAAA,EAGjB,aAAA,EAAe,MAAA;AAAA,EACf,kBAAA,EAAoB,KAAA;AAAA,EACpB,qBAAA,EAAuB,KAAA;AAAA,EACvB,oBAAA,EAAsB,KAAA;AAAA,EACtB,uBAAA,EAAyB,KAAA;AAAA,EACzB,WAAA,EAAa,cAAA;AAAA,EACb,iBAAA,EAAmB,IAAA;AAAA,EACnB,MAAA,EAAQ;AACV;AAgHO,IAAM,iBAAA,GAAoB,OAAO,iBAAiB;AAOlD,IAAM,kBAAA,GAAqB,OAAO,iBAAiB;AAuFnD,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A;AAEA,EAAA,OAAO;AAAA,IACL,MAAA;AAAA,IACA,YAAA;AAAA,IACA,QAAA;AAAA,IACA;AAAA,GACF;AACF","file":"chunk-P6A2OOIY.cjs","sourcesContent":["/**\n * CBOR Parser Type Definitions\n * Following RFC 8949 specification\n */\n\n/**\n * Parser resource limits for DoS protection\n */\nexport interface ParserLimits {\n /** Maximum input size in bytes (default: 10 MB) */\n maxInputSize?: number\n /** Maximum output size in bytes (default: 100 MB) */\n maxOutputSize?: number\n /** Maximum string length in bytes (default: 1 MB) */\n maxStringLength?: number\n /** Maximum array length (default: 10,000) */\n maxArrayLength?: number\n /** Maximum map size (default: 10,000) */\n maxMapSize?: number\n /** Maximum nesting depth for arrays/maps (default: 100) */\n maxDepth?: number\n /** Maximum tag nesting depth (default: 100) - Prevents RUSTSEC-2019-0025 */\n maxTagDepth?: number\n /** Maximum bignum size in bytes for tags 2/3 (default: 1024 bytes = 8192 bits) - Prevents CVE-2020-28491 */\n maxBignumBytes?: number\n /** Maximum parse time in milliseconds (default: 1000) */\n maxParseTime?: number\n}\n\n/**\n * Duplicate map key handling modes\n * Following RFC 8949 Section 5.6 guidance\n */\nexport type DupMapKeyMode = 'allow' | 'warn' | 'reject'\n\n/**\n * Map key ordering for canonical/deterministic encoding and validation.\n *\n * - 'length-first': RFC 7049 Section 3.9 \"Old Canonical CBOR\" — shorter encoded\n * keys sort first, ties broken bytewise. This is what Cardano CIP-21 mandates\n * for transaction serialization, and is the default in this library.\n * - 'bytewise': RFC 8949 Section 4.2.1 \"Core Deterministic Encoding\" — pure\n * bytewise lexicographic order of the encoded keys (the modern generic default).\n *\n * @see https://cips.cardano.org/cip/CIP-21\n * @see https://www.rfc-editor.org/rfc/rfc8949.html#section-4.2.1\n */\nexport type MapKeyOrder = 'length-first' | 'bytewise'\n\n/**\n * Parser options for controlling behavior\n */\nexport interface ParseOptions {\n /** Enable strict Cardano mode (all validations) */\n strict?: boolean\n /** Validate canonical encoding (shortest form, sorted maps) */\n validateCanonical?: boolean\n /** Allow indefinite-length encoding (false in strict mode) */\n allowIndefinite?: boolean\n /**\n * Duplicate map key handling (RFC 8949 Section 5.6)\n * - 'allow': Allow duplicates (default, permissive)\n * - 'warn': Warn on duplicates but continue parsing\n * - 'reject': Throw error on duplicate keys (strict mode)\n */\n dupMapKeyMode?: DupMapKeyMode\n /** Validate UTF-8 strictly (reject overlongs) */\n validateUtf8Strict?: boolean\n /** Validate set uniqueness (Tag 258 - reject duplicates) */\n validateSetUniqueness?: boolean\n /** Validate semantic tag constraints (Tag 4, Tag 5 array structure) */\n validateTagSemantics?: boolean\n /** Validate Plutus constructor semantics (Tags 102, 121-127, 1280-1400) */\n validatePlutusSemantics?: boolean\n /**\n * Map key ordering enforced when validateCanonical is set.\n * Defaults to 'length-first' (Cardano CIP-21 / RFC 7049 Section 3.9).\n * Use 'bytewise' for RFC 8949 Section 4.2.1 core deterministic order.\n */\n mapKeyOrder?: MapKeyOrder\n /**\n * Reject trailing bytes after the top-level data item (well-formedness).\n * Defaults to true for backward compatibility (decode returns bytesRead so\n * callers can detect leftover data); automatically false-tightened, i.e. set\n * to reject, in strict mode. Set explicitly to override.\n */\n allowTrailingData?: boolean\n /** Resource limits */\n limits?: ParserLimits\n}\n\n/**\n * Default resource limits for parser\n */\nexport const DEFAULT_LIMITS: Required<ParserLimits> = {\n maxInputSize: 10 * 1024 * 1024, // 10 MB\n maxOutputSize: 100 * 1024 * 1024, // 100 MB\n maxStringLength: 1024 * 1024, // 1 MB\n maxArrayLength: 10000,\n maxMapSize: 10000,\n maxDepth: 100, // Collection nesting depth (increased for compatibility)\n maxTagDepth: 100, // Tag nesting depth (RUSTSEC-2019-0025 mitigation)\n maxBignumBytes: 1024, // 1 KB = 8192 bits (CVE-2020-28491 mitigation)\n maxParseTime: 1000 // 1 second\n}\n\n/**\n * Default parse options\n */\nexport const DEFAULT_OPTIONS: Required<ParseOptions> = {\n strict: false,\n validateCanonical: false,\n allowIndefinite: true,\n // Default to 'warn' so duplicate keys are never silently collapsed in the Map\n // view. Duplicates remain byte-perfect for round-trips via ALL_ENTRIES_SYMBOL.\n dupMapKeyMode: 'warn',\n validateUtf8Strict: false,\n validateSetUniqueness: false,\n validateTagSemantics: false,\n validatePlutusSemantics: false,\n mapKeyOrder: 'length-first',\n allowTrailingData: true,\n limits: DEFAULT_LIMITS\n}\n\n/**\n * Parsing context that tracks state during CBOR decoding\n */\nexport interface CborContext {\n /** Raw byte buffer */\n buffer: Uint8Array\n /** Current byte offset */\n offset: number\n /** Source map entries for visualization */\n sourceMap: SourceMapEntry[]\n /** Current nesting depth for arrays/maps (for limit checking) */\n currentDepth?: number\n /** Current tag nesting depth (for tag limit checking) */\n currentTagDepth?: number\n /** Parse start time (for timeout checking) */\n startTime?: number\n /** Bytes allocated (for output size tracking) */\n bytesAllocated?: number\n /** Parser options */\n options?: ParseOptions\n}\n\n/**\n * Result of parsing a CBOR value\n */\nexport interface ParseResult {\n /** Decoded CBOR value */\n value: CborValue\n /** Number of bytes consumed */\n bytesRead: number\n}\n\n/**\n * Parse result with source mapping information\n */\nexport interface ParseResultWithMap extends ParseResult {\n /** Source map for hex/JSON linking */\n sourceMap: SourceMapEntry[]\n}\n\n/**\n * Source map entry for bi-directional visualization\n */\nexport interface SourceMapEntry {\n /** JSON Pointer path (RFC 6901) */\n path: string\n /** Starting byte offset */\n start: number\n /** Ending byte offset (exclusive) */\n end: number\n /** CBOR major type (0-7) */\n majorType: number\n /** Human-readable type description */\n type: string\n /** Parent entry path (for nested structures like tags) */\n parent?: string\n /** Child entry paths (for container types) */\n children?: string[]\n /** Whether this entry represents a header (initial byte + length info) */\n isHeader?: boolean\n /** Whether this entry represents content (payload data) */\n isContent?: boolean\n /** Byte offset where header ends and content begins */\n headerEnd?: number\n /** JSON Pointer path to the content portion (for split header/content entries) */\n contentPath?: string\n}\n\n/**\n * CBOR byte string (can be definite or indefinite length)\n */\nexport interface CborByteString {\n readonly type: 'cbor-byte-string'\n readonly bytes: Uint8Array\n readonly chunks?: Uint8Array[] // Original chunks for indefinite byte strings\n [INDEFINITE_SYMBOL]?: boolean\n}\n\n/**\n * CBOR text string (can be definite or indefinite length)\n */\nexport interface CborTextString {\n readonly type: 'cbor-text-string'\n readonly text: string\n readonly chunks?: string[] // Original chunks for indefinite text strings\n [INDEFINITE_SYMBOL]?: boolean\n}\n\n/**\n * All possible CBOR values\n */\nexport type CborValue =\n | number\n | bigint\n | string\n | boolean\n | null\n | undefined\n | Uint8Array\n | CborByteString\n | CborTextString\n | CborValue[]\n | CborMap\n | TaggedValue\n | SimpleValue\n\n/**\n * Symbol to mark arrays/maps as indefinite-length encoded\n * This allows round-trip preservation of encoding style\n */\nexport const INDEFINITE_SYMBOL = Symbol('cbor.indefinite')\n\n/**\n * Symbol used to store all map entries including duplicates\n * This allows byte-perfect round-trip when CBOR maps have duplicate keys\n * Stores: Array<[key: CborValue, value: CborValue]>\n */\nexport const ALL_ENTRIES_SYMBOL = Symbol('cbor.allEntries')\n\n/**\n * CBOR map type (Map with any CBOR value as keys)\n *\n * Uses JavaScript Map to preserve key types (integers, Uint8Arrays, etc.)\n * This is essential for:\n * - Cardano transactions (use integer keys 0-18)\n * - Round-trip encoding (must preserve exact key types)\n * - CBOR specification compliance (maps can have any type as keys)\n *\n * @example\n * ```typescript\n * // Cardano transaction body\n * new Map([\n * [0, inputs], // Integer key\n * [1, outputs], // Integer key\n * [2, 1000000] // Integer key (fee)\n * ])\n * ```\n */\nexport type CborMap = Map<CborValue, CborValue> & { [INDEFINITE_SYMBOL]?: boolean }\n\n/**\n * CBOR array type with optional indefinite-length marker\n */\nexport type CborArray = CborValue[] & { [INDEFINITE_SYMBOL]?: boolean }\n\n/**\n * Tagged CBOR value (Major Type 6)\n */\nexport interface TaggedValue {\n tag: number\n value: CborValue\n plutus?: PlutusConstr // Decoded Plutus constructor (for tags 102, 121-127, 1280-1400)\n}\n\n/**\n * Simple CBOR value (Major Type 7, unassigned simple values)\n */\nexport interface SimpleValue {\n simpleValue: number\n}\n\n/**\n * Plutus Data types for Cardano smart contracts\n */\nexport type PlutusData =\n | PlutusConstr\n | PlutusMap\n | PlutusList\n | PlutusInt\n | PlutusBytes\n\n/**\n * Plutus Constructor (algebraic data type)\n */\nexport interface PlutusConstr {\n constructor: number\n fields: PlutusData[]\n}\n\n/**\n * Plutus Map (key-value pairs)\n */\nexport interface PlutusMap {\n entries: Array<[PlutusData, PlutusData]>\n}\n\n/**\n * Plutus List (sequential collection)\n */\nexport type PlutusList = PlutusData[]\n\n/**\n * Plutus Integer (arbitrary precision)\n */\nexport type PlutusInt = number | bigint\n\n/**\n * Plutus Bytes (bounded byte string, max 64 bytes)\n */\nexport type PlutusBytes = Uint8Array\n\n/**\n * CBOR Major Types (0-7)\n */\nexport enum CborMajorType {\n UNSIGNED_INT = 0,\n NEGATIVE_INT = 1,\n BYTE_STRING = 2,\n TEXT_STRING = 3,\n ARRAY = 4,\n MAP = 5,\n TAG = 6,\n SIMPLE = 7\n}\n\n/**\n * Additional Information values\n */\nexport enum CborAdditionalInfo {\n DIRECT = 23, // Values 0-23\n ONE_BYTE = 24, // 1 byte follows\n TWO_BYTES = 25, // 2 bytes follow\n FOUR_BYTES = 26, // 4 bytes follow\n EIGHT_BYTES = 27, // 8 bytes follow\n INDEFINITE = 31 // Indefinite length\n}\n\n/**\n * Simple values (Major Type 7)\n */\nexport enum CborSimpleValue {\n FALSE = 20,\n TRUE = 21,\n NULL = 22,\n UNDEFINED = 23,\n FLOAT16 = 25,\n FLOAT32 = 26,\n FLOAT64 = 27,\n BREAK = 31\n}\n\n/**\n * Common semantic tags\n */\nexport enum CborTag {\n DATE_TIME_STRING = 0,\n EPOCH_DATE_TIME = 1,\n POSITIVE_BIGNUM = 2,\n NEGATIVE_BIGNUM = 3,\n DECIMAL_FRACTION = 4,\n BIGFLOAT = 5,\n BASE64URL = 21,\n BASE64 = 22,\n BASE16 = 23,\n CBOR_ENCODED = 24,\n URI = 32,\n BASE64URL_NO_PAD = 33,\n BASE64_NO_PAD = 34,\n REGEXP = 35,\n MIME_MESSAGE = 36\n}\n\n/**\n * Parse error types\n */\nexport interface ParseError {\n type: 'INVALID_HEX' | 'UNEXPECTED_EOF' | 'INVALID_CBOR' | 'UNSUPPORTED_TYPE'\n message: string\n offset?: number\n}\n\n/**\n * Result type for operations that can fail\n */\nexport type Result<T, E> =\n | { success: true; value: T }\n | { success: false; error: E }\n","/**\n * CBOR String Type Helpers\n * Composables for working with CborByteString and CborTextString\n */\n\nimport type { CborByteString, CborTextString } from '../types'\nimport { INDEFINITE_SYMBOL } from '../types'\n\n/**\n * Composable for creating and working with CBOR byte strings\n */\nexport function useCborByteString() {\n /**\n * Create a CBOR byte string\n *\n * @param bytes - The byte data\n * @param indefinite - Whether this was encoded with indefinite length\n * @param chunks - Original chunks for indefinite byte strings\n * @returns CborByteString object\n */\n const create = (bytes: Uint8Array, indefinite = false, chunks?: Uint8Array[]): CborByteString => {\n const result: CborByteString = {\n type: 'cbor-byte-string',\n bytes,\n ...(chunks && { chunks })\n }\n\n if (indefinite) {\n (result as any)[INDEFINITE_SYMBOL] = true\n }\n\n return result\n }\n\n /**\n * Check if a byte string was encoded with indefinite length\n */\n const isIndefinite = (value: CborByteString | Uint8Array): boolean => {\n return (value as any)[INDEFINITE_SYMBOL] === true\n }\n\n /**\n * Extract raw bytes from a CborByteString or Uint8Array\n */\n const toBytes = (value: CborByteString | Uint8Array): Uint8Array => {\n if (value instanceof Uint8Array) {\n return value\n }\n return value.bytes\n }\n\n /**\n * Check if a value is a CborByteString\n */\n const isCborByteString = (value: any): value is CborByteString => {\n return typeof value === 'object' &&\n value !== null &&\n value.type === 'cbor-byte-string' &&\n value.bytes instanceof Uint8Array\n }\n\n return {\n create,\n isIndefinite,\n toBytes,\n isCborByteString\n }\n}\n\n/**\n * Composable for creating and working with CBOR text strings\n */\nexport function useCborTextString() {\n /**\n * Create a CBOR text string\n *\n * @param text - The text data\n * @param indefinite - Whether this was encoded with indefinite length\n * @param chunks - Original chunks for indefinite text strings\n * @returns CborTextString object\n */\n const create = (text: string, indefinite = false, chunks?: string[]): CborTextString => {\n const result: CborTextString = {\n type: 'cbor-text-string',\n text,\n ...(chunks && { chunks })\n }\n\n if (indefinite) {\n (result as any)[INDEFINITE_SYMBOL] = true\n }\n\n return result\n }\n\n /**\n * Check if a text string was encoded with indefinite length\n */\n const isIndefinite = (value: CborTextString | string): boolean => {\n return (value as any)[INDEFINITE_SYMBOL] === true\n }\n\n /**\n * Extract raw string from a CborTextString or string\n */\n const toString = (value: CborTextString | string): string => {\n if (typeof value === 'string') {\n return value\n }\n return value.text\n }\n\n /**\n * Check if a value is a CborTextString\n */\n const isCborTextString = (value: any): value is CborTextString => {\n return typeof value === 'object' &&\n value !== null &&\n value.type === 'cbor-text-string' &&\n typeof value.text === 'string'\n }\n\n return {\n create,\n isIndefinite,\n toString,\n isCborTextString\n }\n}\n"]}
@@ -1,57 +1,57 @@
1
1
  'use strict';
2
2
 
3
- var chunkR62CQQNI_cjs = require('../chunk-R62CQQNI.cjs');
4
- require('../chunk-PD72MVTX.cjs');
3
+ var chunkHMUA5KLG_cjs = require('../chunk-HMUA5KLG.cjs');
4
+ require('../chunk-P6A2OOIY.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "DEFAULT_ENCODE_OPTIONS", {
9
9
  enumerable: true,
10
- get: function () { return chunkR62CQQNI_cjs.DEFAULT_ENCODE_OPTIONS; }
10
+ get: function () { return chunkHMUA5KLG_cjs.DEFAULT_ENCODE_OPTIONS; }
11
11
  });
12
12
  Object.defineProperty(exports, "bytesToHex", {
13
13
  enumerable: true,
14
- get: function () { return chunkR62CQQNI_cjs.bytesToHex; }
14
+ get: function () { return chunkHMUA5KLG_cjs.bytesToHex; }
15
15
  });
16
16
  Object.defineProperty(exports, "compareBytes", {
17
17
  enumerable: true,
18
- get: function () { return chunkR62CQQNI_cjs.compareBytes; }
18
+ get: function () { return chunkHMUA5KLG_cjs.compareBytes; }
19
19
  });
20
20
  Object.defineProperty(exports, "concatenateUint8Arrays", {
21
21
  enumerable: true,
22
- get: function () { return chunkR62CQQNI_cjs.concatenateUint8Arrays; }
22
+ get: function () { return chunkHMUA5KLG_cjs.concatenateUint8Arrays; }
23
23
  });
24
24
  Object.defineProperty(exports, "useCborCollectionEncoder", {
25
25
  enumerable: true,
26
- get: function () { return chunkR62CQQNI_cjs.useCborCollectionEncoder; }
26
+ get: function () { return chunkHMUA5KLG_cjs.useCborCollectionEncoder; }
27
27
  });
28
28
  Object.defineProperty(exports, "useCborEncoder", {
29
29
  enumerable: true,
30
- get: function () { return chunkR62CQQNI_cjs.useCborEncoder; }
30
+ get: function () { return chunkHMUA5KLG_cjs.useCborEncoder; }
31
31
  });
32
32
  Object.defineProperty(exports, "useCborIntegerEncoder", {
33
33
  enumerable: true,
34
- get: function () { return chunkR62CQQNI_cjs.useCborIntegerEncoder; }
34
+ get: function () { return chunkHMUA5KLG_cjs.useCborIntegerEncoder; }
35
35
  });
36
36
  Object.defineProperty(exports, "useCborSimpleEncoder", {
37
37
  enumerable: true,
38
- get: function () { return chunkR62CQQNI_cjs.useCborSimpleEncoder; }
38
+ get: function () { return chunkHMUA5KLG_cjs.useCborSimpleEncoder; }
39
39
  });
40
40
  Object.defineProperty(exports, "useCborStringEncoder", {
41
41
  enumerable: true,
42
- get: function () { return chunkR62CQQNI_cjs.useCborStringEncoder; }
42
+ get: function () { return chunkHMUA5KLG_cjs.useCborStringEncoder; }
43
43
  });
44
44
  Object.defineProperty(exports, "useCborTagEncoder", {
45
45
  enumerable: true,
46
- get: function () { return chunkR62CQQNI_cjs.useCborTagEncoder; }
46
+ get: function () { return chunkHMUA5KLG_cjs.useCborTagEncoder; }
47
47
  });
48
48
  Object.defineProperty(exports, "writeBigUint", {
49
49
  enumerable: true,
50
- get: function () { return chunkR62CQQNI_cjs.writeBigUint; }
50
+ get: function () { return chunkHMUA5KLG_cjs.writeBigUint; }
51
51
  });
52
52
  Object.defineProperty(exports, "writeUint", {
53
53
  enumerable: true,
54
- get: function () { return chunkR62CQQNI_cjs.writeUint; }
54
+ get: function () { return chunkHMUA5KLG_cjs.writeUint; }
55
55
  });
56
56
  //# sourceMappingURL=index.cjs.map
57
57
  //# sourceMappingURL=index.cjs.map
@@ -1,6 +1,6 @@
1
- import { E as EncodableValue, b as EncodeResult, T as TaggedValue } from '../useCborSimpleEncoder-ButVU988.cjs';
2
- export { D as DEFAULT_ENCODE_OPTIONS, g as EncodeContext, a as EncodeOptions, e as useCborCollectionEncoder, u as useCborEncoder, c as useCborIntegerEncoder, f as useCborSimpleEncoder, d as useCborStringEncoder } from '../useCborSimpleEncoder-ButVU988.cjs';
3
- import '../types-DvNlfbKB.cjs';
1
+ import { E as EncodableValue, b as EncodeResult, T as TaggedValue } from '../useCborSimpleEncoder-DXgPx62d.cjs';
2
+ export { D as DEFAULT_ENCODE_OPTIONS, g as EncodeContext, a as EncodeOptions, e as useCborCollectionEncoder, u as useCborEncoder, c as useCborIntegerEncoder, f as useCborSimpleEncoder, d as useCborStringEncoder } from '../useCborSimpleEncoder-DXgPx62d.cjs';
3
+ import '../types-eG2qalpr.cjs';
4
4
 
5
5
  /**
6
6
  * CBOR Tag Encoder Composable
@@ -57,7 +57,8 @@ declare function bytesToHex(bytes: Uint8Array): string;
57
57
  */
58
58
  declare function concatenateUint8Arrays(arrays: Uint8Array[]): Uint8Array;
59
59
  /**
60
- * Compare two Uint8Arrays bytewise (for canonical map sorting)
60
+ * Compare two Uint8Arrays length-first (RFC 7049 §3.9 / Cardano CIP-21 ordering).
61
+ * Shorter keys sort first; equal-length keys are compared bytewise.
61
62
  */
62
63
  declare function compareBytes(a: Uint8Array, b: Uint8Array): number;
63
64
  /**
@@ -1,6 +1,6 @@
1
- import { E as EncodableValue, b as EncodeResult, T as TaggedValue } from '../useCborSimpleEncoder-TVxzNJ_9.js';
2
- export { D as DEFAULT_ENCODE_OPTIONS, g as EncodeContext, a as EncodeOptions, e as useCborCollectionEncoder, u as useCborEncoder, c as useCborIntegerEncoder, f as useCborSimpleEncoder, d as useCborStringEncoder } from '../useCborSimpleEncoder-TVxzNJ_9.js';
3
- import '../types-DvNlfbKB.js';
1
+ import { E as EncodableValue, b as EncodeResult, T as TaggedValue } from '../useCborSimpleEncoder-CamvS-_N.js';
2
+ export { D as DEFAULT_ENCODE_OPTIONS, g as EncodeContext, a as EncodeOptions, e as useCborCollectionEncoder, u as useCborEncoder, c as useCborIntegerEncoder, f as useCborSimpleEncoder, d as useCborStringEncoder } from '../useCborSimpleEncoder-CamvS-_N.js';
3
+ import '../types-eG2qalpr.js';
4
4
 
5
5
  /**
6
6
  * CBOR Tag Encoder Composable
@@ -57,7 +57,8 @@ declare function bytesToHex(bytes: Uint8Array): string;
57
57
  */
58
58
  declare function concatenateUint8Arrays(arrays: Uint8Array[]): Uint8Array;
59
59
  /**
60
- * Compare two Uint8Arrays bytewise (for canonical map sorting)
60
+ * Compare two Uint8Arrays length-first (RFC 7049 §3.9 / Cardano CIP-21 ordering).
61
+ * Shorter keys sort first; equal-length keys are compared bytewise.
61
62
  */
62
63
  declare function compareBytes(a: Uint8Array, b: Uint8Array): number;
63
64
  /**
@@ -1,4 +1,4 @@
1
- export { DEFAULT_ENCODE_OPTIONS, bytesToHex, compareBytes, concatenateUint8Arrays, useCborCollectionEncoder, useCborEncoder, useCborIntegerEncoder, useCborSimpleEncoder, useCborStringEncoder, useCborTagEncoder, writeBigUint, writeUint } from '../chunk-2MTLSQ7E.js';
2
- import '../chunk-ZDZ2B5PE.js';
1
+ export { DEFAULT_ENCODE_OPTIONS, bytesToHex, compareBytes, concatenateUint8Arrays, useCborCollectionEncoder, useCborEncoder, useCborIntegerEncoder, useCborSimpleEncoder, useCborStringEncoder, useCborTagEncoder, writeBigUint, writeUint } from '../chunk-EDXZTSIA.js';
2
+ import '../chunk-JESIF5IF.js';
3
3
  //# sourceMappingURL=index.js.map
4
4
  //# sourceMappingURL=index.js.map
package/dist/index.cjs CHANGED
@@ -1,10 +1,13 @@
1
1
  'use strict';
2
2
 
3
- var chunkPTWN7K3Y_cjs = require('./chunk-PTWN7K3Y.cjs');
4
- var chunkR62CQQNI_cjs = require('./chunk-R62CQQNI.cjs');
5
- var chunkPD72MVTX_cjs = require('./chunk-PD72MVTX.cjs');
3
+ var chunk3Z45RBZP_cjs = require('./chunk-3Z45RBZP.cjs');
4
+ var chunkHMUA5KLG_cjs = require('./chunk-HMUA5KLG.cjs');
5
+ var chunkP6A2OOIY_cjs = require('./chunk-P6A2OOIY.cjs');
6
6
 
7
7
  // src/parser/composables/useCborDiagnostic.ts
8
+ function isIndefiniteValue(value) {
9
+ return typeof value === "object" && value !== null && value[chunkP6A2OOIY_cjs.INDEFINITE_SYMBOL] === true;
10
+ }
8
11
  function isTaggedValue(value) {
9
12
  return typeof value === "object" && value !== null && "tag" in value && "value" in value && typeof value.tag === "number";
10
13
  }
@@ -70,6 +73,20 @@ function useCborDiagnostic() {
70
73
  if (value instanceof Uint8Array) {
71
74
  return `h'${bytesToHex(value)}'`;
72
75
  }
76
+ if (typeof value === "object" && value !== null && "type" in value) {
77
+ const t = value.type;
78
+ if (t === "cbor-byte-string") {
79
+ const bs = value;
80
+ return isIndefiniteValue(value) ? `(_ h'${bytesToHex(bs.bytes)}')` : `h'${bytesToHex(bs.bytes)}'`;
81
+ }
82
+ if (t === "cbor-text-string") {
83
+ const ts = value;
84
+ return isIndefiniteValue(value) ? `(_ "${escapeString(ts.text)}")` : `"${escapeString(ts.text)}"`;
85
+ }
86
+ }
87
+ if (typeof value === "object" && value !== null && "simpleValue" in value && typeof value.simpleValue === "number") {
88
+ return `simple(${value.simpleValue})`;
89
+ }
73
90
  if (isTaggedValue(value)) {
74
91
  const taggedContent = formatValue(
75
92
  value.value,
@@ -82,6 +99,7 @@ function useCborDiagnostic() {
82
99
  return `${value.tag}(${taggedContent})`;
83
100
  }
84
101
  if (Array.isArray(value)) {
102
+ indefinite = indefinite || isIndefiniteValue(value);
85
103
  if (value.length === 0) {
86
104
  return indefinite ? "[_ ]" : "[]";
87
105
  }
@@ -102,6 +120,7 @@ ${closeIndent}]`;
102
120
  }
103
121
  }
104
122
  if (value instanceof Map) {
123
+ indefinite = indefinite || isIndefiniteValue(value);
105
124
  if (value.size === 0) {
106
125
  return indefinite ? "{_ }" : "{}";
107
126
  }
@@ -411,28 +430,28 @@ var PathBuilder = {
411
430
  };
412
431
 
413
432
  // src/index.ts
414
- function decode(hexString, options) {
415
- const { parse } = chunkPTWN7K3Y_cjs.useCborParser();
416
- return parse(hexString, options);
433
+ function decode(input, options) {
434
+ const { parse } = chunk3Z45RBZP_cjs.useCborParser();
435
+ return parse(input, options);
417
436
  }
418
- function decodeWithSourceMap(hexString, options) {
419
- const { parseWithSourceMap } = chunkPTWN7K3Y_cjs.useCborParser();
420
- return parseWithSourceMap(hexString, options);
437
+ function decodeWithSourceMap(input, options) {
438
+ const { parseWithSourceMap } = chunk3Z45RBZP_cjs.useCborParser();
439
+ return parseWithSourceMap(input, options);
421
440
  }
422
441
  function encode(value, options) {
423
- const { encode: encodeValue } = chunkR62CQQNI_cjs.useCborEncoder(options);
442
+ const { encode: encodeValue } = chunkHMUA5KLG_cjs.useCborEncoder(options);
424
443
  return encodeValue(value);
425
444
  }
426
445
  function encodeToHex(value, options) {
427
- const { encodeToHex: encodeValueToHex } = chunkR62CQQNI_cjs.useCborEncoder(options);
446
+ const { encodeToHex: encodeValueToHex } = chunkHMUA5KLG_cjs.useCborEncoder(options);
428
447
  return encodeValueToHex(value);
429
448
  }
430
449
  function encodeToBytes(value, options) {
431
- const { encodeToBytes: encodeValueToBytes } = chunkR62CQQNI_cjs.useCborEncoder(options);
450
+ const { encodeToBytes: encodeValueToBytes } = chunkHMUA5KLG_cjs.useCborEncoder(options);
432
451
  return encodeValueToBytes(value);
433
452
  }
434
453
  function encodeSequence(values, options) {
435
- const { encodeSequence: encodeSeq } = chunkR62CQQNI_cjs.useCborEncoder(options);
454
+ const { encodeSequence: encodeSeq } = chunkHMUA5KLG_cjs.useCborEncoder(options);
436
455
  return encodeSeq(values);
437
456
  }
438
457
  var CborDecoder = class {
@@ -445,22 +464,22 @@ var CborDecoder = class {
445
464
  this.options = options || {};
446
465
  }
447
466
  /**
448
- * Decode CBOR hex string
467
+ * Decode CBOR data
449
468
  *
450
- * @param hexString - CBOR data as hex string
469
+ * @param input - CBOR data as hex string or Uint8Array
451
470
  * @returns Decoded value and byte count
452
471
  */
453
- decode(hexString) {
454
- return decode(hexString, this.options);
472
+ decode(input) {
473
+ return decode(input, this.options);
455
474
  }
456
475
  /**
457
- * Decode CBOR hex string with source map
476
+ * Decode CBOR data with source map
458
477
  *
459
- * @param hexString - CBOR data as hex string
478
+ * @param input - CBOR data as hex string or Uint8Array
460
479
  * @returns Decoded value, byte count, and source map
461
480
  */
462
- decodeWithSourceMap(hexString) {
463
- return decodeWithSourceMap(hexString, this.options);
481
+ decodeWithSourceMap(input) {
482
+ return decodeWithSourceMap(input, this.options);
464
483
  }
465
484
  };
466
485
  var CborEncoder = class {
@@ -520,75 +539,75 @@ function decodeToDiagnostic(hexString, options) {
520
539
 
521
540
  Object.defineProperty(exports, "useCborCollection", {
522
541
  enumerable: true,
523
- get: function () { return chunkPTWN7K3Y_cjs.useCborCollection; }
542
+ get: function () { return chunk3Z45RBZP_cjs.useCborCollection; }
524
543
  });
525
544
  Object.defineProperty(exports, "useCborFloat", {
526
545
  enumerable: true,
527
- get: function () { return chunkPTWN7K3Y_cjs.useCborFloat; }
546
+ get: function () { return chunk3Z45RBZP_cjs.useCborFloat; }
528
547
  });
529
548
  Object.defineProperty(exports, "useCborInteger", {
530
549
  enumerable: true,
531
- get: function () { return chunkPTWN7K3Y_cjs.useCborInteger; }
550
+ get: function () { return chunk3Z45RBZP_cjs.useCborInteger; }
532
551
  });
533
552
  Object.defineProperty(exports, "useCborParser", {
534
553
  enumerable: true,
535
- get: function () { return chunkPTWN7K3Y_cjs.useCborParser; }
554
+ get: function () { return chunk3Z45RBZP_cjs.useCborParser; }
536
555
  });
537
556
  Object.defineProperty(exports, "useCborString", {
538
557
  enumerable: true,
539
- get: function () { return chunkPTWN7K3Y_cjs.useCborString; }
558
+ get: function () { return chunk3Z45RBZP_cjs.useCborString; }
540
559
  });
541
560
  Object.defineProperty(exports, "useCborTag", {
542
561
  enumerable: true,
543
- get: function () { return chunkPTWN7K3Y_cjs.useCborTag; }
562
+ get: function () { return chunk3Z45RBZP_cjs.useCborTag; }
544
563
  });
545
564
  Object.defineProperty(exports, "DEFAULT_ENCODE_OPTIONS", {
546
565
  enumerable: true,
547
- get: function () { return chunkR62CQQNI_cjs.DEFAULT_ENCODE_OPTIONS; }
566
+ get: function () { return chunkHMUA5KLG_cjs.DEFAULT_ENCODE_OPTIONS; }
548
567
  });
549
568
  Object.defineProperty(exports, "useCborCollectionEncoder", {
550
569
  enumerable: true,
551
- get: function () { return chunkR62CQQNI_cjs.useCborCollectionEncoder; }
570
+ get: function () { return chunkHMUA5KLG_cjs.useCborCollectionEncoder; }
552
571
  });
553
572
  Object.defineProperty(exports, "useCborEncoder", {
554
573
  enumerable: true,
555
- get: function () { return chunkR62CQQNI_cjs.useCborEncoder; }
574
+ get: function () { return chunkHMUA5KLG_cjs.useCborEncoder; }
556
575
  });
557
576
  Object.defineProperty(exports, "useCborIntegerEncoder", {
558
577
  enumerable: true,
559
- get: function () { return chunkR62CQQNI_cjs.useCborIntegerEncoder; }
578
+ get: function () { return chunkHMUA5KLG_cjs.useCborIntegerEncoder; }
560
579
  });
561
580
  Object.defineProperty(exports, "useCborSimpleEncoder", {
562
581
  enumerable: true,
563
- get: function () { return chunkR62CQQNI_cjs.useCborSimpleEncoder; }
582
+ get: function () { return chunkHMUA5KLG_cjs.useCborSimpleEncoder; }
564
583
  });
565
584
  Object.defineProperty(exports, "useCborStringEncoder", {
566
585
  enumerable: true,
567
- get: function () { return chunkR62CQQNI_cjs.useCborStringEncoder; }
586
+ get: function () { return chunkHMUA5KLG_cjs.useCborStringEncoder; }
568
587
  });
569
588
  Object.defineProperty(exports, "CborAdditionalInfo", {
570
589
  enumerable: true,
571
- get: function () { return chunkPD72MVTX_cjs.CborAdditionalInfo; }
590
+ get: function () { return chunkP6A2OOIY_cjs.CborAdditionalInfo; }
572
591
  });
573
592
  Object.defineProperty(exports, "CborMajorType", {
574
593
  enumerable: true,
575
- get: function () { return chunkPD72MVTX_cjs.CborMajorType; }
594
+ get: function () { return chunkP6A2OOIY_cjs.CborMajorType; }
576
595
  });
577
596
  Object.defineProperty(exports, "CborSimpleValue", {
578
597
  enumerable: true,
579
- get: function () { return chunkPD72MVTX_cjs.CborSimpleValue; }
598
+ get: function () { return chunkP6A2OOIY_cjs.CborSimpleValue; }
580
599
  });
581
600
  Object.defineProperty(exports, "CborTag", {
582
601
  enumerable: true,
583
- get: function () { return chunkPD72MVTX_cjs.CborTag; }
602
+ get: function () { return chunkP6A2OOIY_cjs.CborTag; }
584
603
  });
585
604
  Object.defineProperty(exports, "DEFAULT_LIMITS", {
586
605
  enumerable: true,
587
- get: function () { return chunkPD72MVTX_cjs.DEFAULT_LIMITS; }
606
+ get: function () { return chunkP6A2OOIY_cjs.DEFAULT_LIMITS; }
588
607
  });
589
608
  Object.defineProperty(exports, "DEFAULT_OPTIONS", {
590
609
  enumerable: true,
591
- get: function () { return chunkPD72MVTX_cjs.DEFAULT_OPTIONS; }
610
+ get: function () { return chunkP6A2OOIY_cjs.DEFAULT_OPTIONS; }
592
611
  });
593
612
  exports.CborDecoder = CborDecoder;
594
613
  exports.CborEncoder = CborEncoder;