File tree Expand file tree Collapse file tree 5 files changed +2060
-0
lines changed
Expand file tree Collapse file tree 5 files changed +2060
-0
lines changed Original file line number Diff line number Diff line change @@ -161,6 +161,29 @@ export const STRUCT_FRIENDLY_OPTIONS: CodecOptions = {
161161 mapsAsObjects : true
162162} as const
163163
164+ /**
165+ * Cardano Node compatible CBOR encoding options for PlutusData
166+ *
167+ * Uses definite-length encoding for arrays and maps, matching the format
168+ * produced by CML's `to_cardano_node_format().to_cbor_hex()`.
169+ *
170+ * Note: The on-chain format uses indefinite-length (AIKEN_DEFAULT_OPTIONS),
171+ * but this option is useful for testing compatibility with tools that
172+ * expect definite-length encoding.
173+ *
174+ * @since 2.0.0
175+ * @category constants
176+ */
177+ export const CARDANO_NODE_DATA_OPTIONS : CodecOptions = {
178+ mode : "custom" ,
179+ useIndefiniteArrays : false ,
180+ useIndefiniteMaps : false ,
181+ useDefiniteForEmpty : true ,
182+ sortMapKeys : false ,
183+ useMinimalEncoding : true ,
184+ mapsAsObjects : false
185+ } as const
186+
164187const DEFAULT_OPTIONS : CodecOptions = {
165188 mode : "custom" ,
166189 useIndefiniteArrays : false ,
Original file line number Diff line number Diff line change @@ -106,6 +106,7 @@ export * as TransactionOutput from "./TransactionOutput.js"
106106export * as TransactionWitnessSet from "./TransactionWitnessSet.js"
107107export * as TSchema from "./TSchema.js"
108108export * as UnitInterval from "./UnitInterval.js"
109+ export * as UPLC from "./uplc/index.js"
109110export * as Url from "./Url.js"
110111export * as Value from "./Value.js"
111112export * as VKey from "./VKey.js"
You can’t perform that action at this time.
0 commit comments