@midnightntwrk/compact-js 0.0.0-stage → 4.0.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 (233) hide show
  1. package/LICENSE +14 -0
  2. package/README.md +158 -2
  3. package/dist/dts/effect/CompactContext.d.ts +20 -0
  4. package/dist/dts/effect/CompactContext.d.ts.map +1 -0
  5. package/dist/dts/effect/CompactRuntime.d.ts +76 -0
  6. package/dist/dts/effect/CompactRuntime.d.ts.map +1 -0
  7. package/dist/dts/effect/CompiledContract.d.ts +107 -0
  8. package/dist/dts/effect/CompiledContract.d.ts.map +1 -0
  9. package/dist/dts/effect/Contract.d.ts +154 -0
  10. package/dist/dts/effect/Contract.d.ts.map +1 -0
  11. package/dist/dts/effect/ContractConfigurationError.d.ts +54 -0
  12. package/dist/dts/effect/ContractConfigurationError.d.ts.map +1 -0
  13. package/dist/dts/effect/ContractEventStore.d.ts +167 -0
  14. package/dist/dts/effect/ContractEventStore.d.ts.map +1 -0
  15. package/dist/dts/effect/ContractEventValidationError.d.ts +34 -0
  16. package/dist/dts/effect/ContractEventValidationError.d.ts.map +1 -0
  17. package/dist/dts/effect/ContractEventValidator.d.ts +18 -0
  18. package/dist/dts/effect/ContractEventValidator.d.ts.map +1 -0
  19. package/dist/dts/effect/ContractExecutable.d.ts +99 -0
  20. package/dist/dts/effect/ContractExecutable.d.ts.map +1 -0
  21. package/dist/dts/effect/ContractExecutableRuntime.d.ts +4 -0
  22. package/dist/dts/effect/ContractExecutableRuntime.d.ts.map +1 -0
  23. package/dist/dts/effect/ContractKeyLocation.d.ts +55 -0
  24. package/dist/dts/effect/ContractKeyLocation.d.ts.map +1 -0
  25. package/dist/dts/effect/ContractLog.d.ts +273 -0
  26. package/dist/dts/effect/ContractLog.d.ts.map +1 -0
  27. package/dist/dts/effect/ContractRuntimeError.d.ts +34 -0
  28. package/dist/dts/effect/ContractRuntimeError.d.ts.map +1 -0
  29. package/dist/dts/effect/Ledger.d.ts +104 -0
  30. package/dist/dts/effect/Ledger.d.ts.map +1 -0
  31. package/dist/dts/effect/MalformedHexPrefixError.d.ts +37 -0
  32. package/dist/dts/effect/MalformedHexPrefixError.d.ts.map +1 -0
  33. package/dist/dts/effect/ZKConfiguration.d.ts +52 -0
  34. package/dist/dts/effect/ZKConfiguration.d.ts.map +1 -0
  35. package/dist/dts/effect/ZKConfigurationReadError.d.ts +45 -0
  36. package/dist/dts/effect/ZKConfigurationReadError.d.ts.map +1 -0
  37. package/dist/dts/effect/ZKManifest.d.ts +50 -0
  38. package/dist/dts/effect/ZKManifest.d.ts.map +1 -0
  39. package/dist/dts/effect/ZKManifestError.d.ts +34 -0
  40. package/dist/dts/effect/ZKManifestError.d.ts.map +1 -0
  41. package/dist/dts/effect/index.d.ts +22 -0
  42. package/dist/dts/effect/index.d.ts.map +1 -0
  43. package/dist/dts/effect/internal/boundary.d.ts +35 -0
  44. package/dist/dts/effect/internal/boundary.d.ts.map +1 -0
  45. package/dist/dts/effect/internal/compactContext.d.ts +29 -0
  46. package/dist/dts/effect/internal/compactContext.d.ts.map +1 -0
  47. package/dist/dts/effect/internal/contractEventsSurface.d.ts +43 -0
  48. package/dist/dts/effect/internal/contractEventsSurface.d.ts.map +1 -0
  49. package/dist/dts/effect/internal/era/v8Executable.d.ts +65 -0
  50. package/dist/dts/effect/internal/era/v8Executable.d.ts.map +1 -0
  51. package/dist/dts/effect/internal/era/v8Ledger.d.ts +76 -0
  52. package/dist/dts/effect/internal/era/v8Ledger.d.ts.map +1 -0
  53. package/dist/dts/effect/internal/era/v8Runtime.d.ts +26 -0
  54. package/dist/dts/effect/internal/era/v8Runtime.d.ts.map +1 -0
  55. package/dist/dts/effect/internal/era/v9Executable.d.ts +65 -0
  56. package/dist/dts/effect/internal/era/v9Executable.d.ts.map +1 -0
  57. package/dist/dts/effect/internal/era/v9Ledger.d.ts +76 -0
  58. package/dist/dts/effect/internal/era/v9Ledger.d.ts.map +1 -0
  59. package/dist/dts/effect/internal/era/v9Runtime.d.ts +15 -0
  60. package/dist/dts/effect/internal/era/v9Runtime.d.ts.map +1 -0
  61. package/dist/dts/effect/internal/era.d.ts +117 -0
  62. package/dist/dts/effect/internal/era.d.ts.map +1 -0
  63. package/dist/dts/effect/internal/eraFreeSurface.d.ts +49 -0
  64. package/dist/dts/effect/internal/eraFreeSurface.d.ts.map +1 -0
  65. package/dist/dts/effect/internal/eraNeutralSurface.d.ts +35 -0
  66. package/dist/dts/effect/internal/eraNeutralSurface.d.ts.map +1 -0
  67. package/dist/dts/effect/internal/executable.d.ts +371 -0
  68. package/dist/dts/effect/internal/executable.d.ts.map +1 -0
  69. package/dist/dts/effect/internal/ledger/binding.d.ts +2 -0
  70. package/dist/dts/effect/internal/ledger/binding.d.ts.map +1 -0
  71. package/dist/dts/effect/internal/ledger/conformance.d.ts +2 -0
  72. package/dist/dts/effect/internal/ledger/conformance.d.ts.map +1 -0
  73. package/dist/dts/effect/internal/ledger/conversions.d.ts +167 -0
  74. package/dist/dts/effect/internal/ledger/conversions.d.ts.map +1 -0
  75. package/dist/dts/effect/internal/ledger/current.d.ts +8 -0
  76. package/dist/dts/effect/internal/ledger/current.d.ts.map +1 -0
  77. package/dist/dts/effect/internal/ledger/v8.d.ts +100 -0
  78. package/dist/dts/effect/internal/ledger/v8.d.ts.map +1 -0
  79. package/dist/dts/effect/internal/ledger/v9.d.ts +66 -0
  80. package/dist/dts/effect/internal/ledger/v9.d.ts.map +1 -0
  81. package/dist/dts/effect/internal/runtime/binding.d.ts +2 -0
  82. package/dist/dts/effect/internal/runtime/binding.d.ts.map +1 -0
  83. package/dist/dts/effect/internal/runtime/conformance.d.ts +2 -0
  84. package/dist/dts/effect/internal/runtime/conformance.d.ts.map +1 -0
  85. package/dist/dts/effect/internal/runtime/current.d.ts +11 -0
  86. package/dist/dts/effect/internal/runtime/current.d.ts.map +1 -0
  87. package/dist/dts/effect/internal/runtime/execution.d.ts +176 -0
  88. package/dist/dts/effect/internal/runtime/execution.d.ts.map +1 -0
  89. package/dist/dts/effect/internal/runtime/v0_16.d.ts +169 -0
  90. package/dist/dts/effect/internal/runtime/v0_16.d.ts.map +1 -0
  91. package/dist/dts/effect/internal/runtime/v0_21.d.ts +81 -0
  92. package/dist/dts/effect/internal/runtime/v0_21.d.ts.map +1 -0
  93. package/dist/dts/effect/internal/typeAssertions.d.ts +2 -0
  94. package/dist/dts/effect/internal/typeAssertions.d.ts.map +1 -0
  95. package/dist/dts/index.d.ts +7 -0
  96. package/dist/dts/index.d.ts.map +1 -0
  97. package/dist/dts/v8/effect.d.ts +50 -0
  98. package/dist/dts/v8/effect.d.ts.map +1 -0
  99. package/dist/dts/v8/index.d.ts +10 -0
  100. package/dist/dts/v8/index.d.ts.map +1 -0
  101. package/dist/dts/v9/effect.d.ts +28 -0
  102. package/dist/dts/v9/effect.d.ts.map +1 -0
  103. package/dist/dts/v9/index.d.ts +16 -0
  104. package/dist/dts/v9/index.d.ts.map +1 -0
  105. package/dist/esm/effect/CompactContext.js +16 -0
  106. package/dist/esm/effect/CompactContext.js.map +1 -0
  107. package/dist/esm/effect/CompactRuntime.js +44 -0
  108. package/dist/esm/effect/CompactRuntime.js.map +1 -0
  109. package/dist/esm/effect/CompiledContract.js +102 -0
  110. package/dist/esm/effect/CompiledContract.js.map +1 -0
  111. package/dist/esm/effect/Contract.js +40 -0
  112. package/dist/esm/effect/Contract.js.map +1 -0
  113. package/dist/esm/effect/ContractConfigurationError.js +41 -0
  114. package/dist/esm/effect/ContractConfigurationError.js.map +1 -0
  115. package/dist/esm/effect/ContractEventStore.js +150 -0
  116. package/dist/esm/effect/ContractEventStore.js.map +1 -0
  117. package/dist/esm/effect/ContractEventValidationError.js +40 -0
  118. package/dist/esm/effect/ContractEventValidationError.js.map +1 -0
  119. package/dist/esm/effect/ContractEventValidator.js +49 -0
  120. package/dist/esm/effect/ContractEventValidator.js.map +1 -0
  121. package/dist/esm/effect/ContractExecutable.js +50 -0
  122. package/dist/esm/effect/ContractExecutable.js.map +1 -0
  123. package/dist/esm/effect/ContractExecutableRuntime.js +17 -0
  124. package/dist/esm/effect/ContractExecutableRuntime.js.map +1 -0
  125. package/dist/esm/effect/ContractKeyLocation.js +67 -0
  126. package/dist/esm/effect/ContractKeyLocation.js.map +1 -0
  127. package/dist/esm/effect/ContractLog.js +268 -0
  128. package/dist/esm/effect/ContractLog.js.map +1 -0
  129. package/dist/esm/effect/ContractRuntimeError.js +40 -0
  130. package/dist/esm/effect/ContractRuntimeError.js.map +1 -0
  131. package/dist/esm/effect/Ledger.js +115 -0
  132. package/dist/esm/effect/Ledger.js.map +1 -0
  133. package/dist/esm/effect/MalformedHexPrefixError.js +43 -0
  134. package/dist/esm/effect/MalformedHexPrefixError.js.map +1 -0
  135. package/dist/esm/effect/ZKConfiguration.js +23 -0
  136. package/dist/esm/effect/ZKConfiguration.js.map +1 -0
  137. package/dist/esm/effect/ZKConfigurationReadError.js +46 -0
  138. package/dist/esm/effect/ZKConfigurationReadError.js.map +1 -0
  139. package/dist/esm/effect/ZKManifest.js +286 -0
  140. package/dist/esm/effect/ZKManifest.js.map +1 -0
  141. package/dist/esm/effect/ZKManifestError.js +40 -0
  142. package/dist/esm/effect/ZKManifestError.js.map +1 -0
  143. package/dist/esm/effect/index.js +36 -0
  144. package/dist/esm/effect/index.js.map +1 -0
  145. package/dist/esm/effect/internal/boundary.js +61 -0
  146. package/dist/esm/effect/internal/boundary.js.map +1 -0
  147. package/dist/esm/effect/internal/compactContext.js +52 -0
  148. package/dist/esm/effect/internal/compactContext.js.map +1 -0
  149. package/dist/esm/effect/internal/contractEventsSurface.js +57 -0
  150. package/dist/esm/effect/internal/contractEventsSurface.js.map +1 -0
  151. package/dist/esm/effect/internal/era/v8Executable.js +31 -0
  152. package/dist/esm/effect/internal/era/v8Executable.js.map +1 -0
  153. package/dist/esm/effect/internal/era/v8Ledger.js +85 -0
  154. package/dist/esm/effect/internal/era/v8Ledger.js.map +1 -0
  155. package/dist/esm/effect/internal/era/v8Runtime.js +39 -0
  156. package/dist/esm/effect/internal/era/v8Runtime.js.map +1 -0
  157. package/dist/esm/effect/internal/era/v9Executable.js +31 -0
  158. package/dist/esm/effect/internal/era/v9Executable.js.map +1 -0
  159. package/dist/esm/effect/internal/era/v9Ledger.js +83 -0
  160. package/dist/esm/effect/internal/era/v9Ledger.js.map +1 -0
  161. package/dist/esm/effect/internal/era/v9Runtime.js +28 -0
  162. package/dist/esm/effect/internal/era/v9Runtime.js.map +1 -0
  163. package/dist/esm/effect/internal/era.js +16 -0
  164. package/dist/esm/effect/internal/era.js.map +1 -0
  165. package/dist/esm/effect/internal/eraFreeSurface.js +63 -0
  166. package/dist/esm/effect/internal/eraFreeSurface.js.map +1 -0
  167. package/dist/esm/effect/internal/eraNeutralSurface.js +49 -0
  168. package/dist/esm/effect/internal/eraNeutralSurface.js.map +1 -0
  169. package/dist/esm/effect/internal/executable.js +531 -0
  170. package/dist/esm/effect/internal/executable.js.map +1 -0
  171. package/dist/esm/effect/internal/ledger/binding.js +20 -0
  172. package/dist/esm/effect/internal/ledger/binding.js.map +1 -0
  173. package/dist/esm/effect/internal/ledger/conformance.js +16 -0
  174. package/dist/esm/effect/internal/ledger/conformance.js.map +1 -0
  175. package/dist/esm/effect/internal/ledger/conversions.js +119 -0
  176. package/dist/esm/effect/internal/ledger/conversions.js.map +1 -0
  177. package/dist/esm/effect/internal/ledger/current.js +22 -0
  178. package/dist/esm/effect/internal/ledger/current.js.map +1 -0
  179. package/dist/esm/effect/internal/ledger/v8.js +101 -0
  180. package/dist/esm/effect/internal/ledger/v8.js.map +1 -0
  181. package/dist/esm/effect/internal/ledger/v9.js +91 -0
  182. package/dist/esm/effect/internal/ledger/v9.js.map +1 -0
  183. package/dist/esm/effect/internal/runtime/binding.js +16 -0
  184. package/dist/esm/effect/internal/runtime/binding.js.map +1 -0
  185. package/dist/esm/effect/internal/runtime/conformance.js +16 -0
  186. package/dist/esm/effect/internal/runtime/conformance.js.map +1 -0
  187. package/dist/esm/effect/internal/runtime/current.js +25 -0
  188. package/dist/esm/effect/internal/runtime/current.js.map +1 -0
  189. package/dist/esm/effect/internal/runtime/execution.js +16 -0
  190. package/dist/esm/effect/internal/runtime/execution.js.map +1 -0
  191. package/dist/esm/effect/internal/runtime/v0_16.js +178 -0
  192. package/dist/esm/effect/internal/runtime/v0_16.js.map +1 -0
  193. package/dist/esm/effect/internal/runtime/v0_21.js +129 -0
  194. package/dist/esm/effect/internal/runtime/v0_21.js.map +1 -0
  195. package/dist/esm/effect/internal/typeAssertions.js +16 -0
  196. package/dist/esm/effect/internal/typeAssertions.js.map +1 -0
  197. package/dist/esm/index.js +21 -0
  198. package/dist/esm/index.js.map +1 -0
  199. package/dist/esm/package.json +4 -0
  200. package/dist/esm/v8/effect.js +64 -0
  201. package/dist/esm/v8/effect.js.map +1 -0
  202. package/dist/esm/v8/index.js +24 -0
  203. package/dist/esm/v8/index.js.map +1 -0
  204. package/dist/esm/v9/effect.js +47 -0
  205. package/dist/esm/v9/effect.js.map +1 -0
  206. package/dist/esm/v9/index.js +30 -0
  207. package/dist/esm/v9/index.js.map +1 -0
  208. package/effect/CompactContext/package.json +5 -0
  209. package/effect/CompactRuntime/package.json +5 -0
  210. package/effect/CompiledContract/package.json +5 -0
  211. package/effect/Contract/package.json +5 -0
  212. package/effect/ContractConfigurationError/package.json +5 -0
  213. package/effect/ContractEventStore/package.json +5 -0
  214. package/effect/ContractEventValidationError/package.json +5 -0
  215. package/effect/ContractEventValidator/package.json +5 -0
  216. package/effect/ContractExecutable/package.json +5 -0
  217. package/effect/ContractExecutableRuntime/package.json +5 -0
  218. package/effect/ContractKeyLocation/package.json +5 -0
  219. package/effect/ContractLog/package.json +5 -0
  220. package/effect/ContractRuntimeError/package.json +5 -0
  221. package/effect/Ledger/package.json +5 -0
  222. package/effect/MalformedHexPrefixError/package.json +5 -0
  223. package/effect/ZKConfiguration/package.json +5 -0
  224. package/effect/ZKConfigurationReadError/package.json +5 -0
  225. package/effect/ZKManifest/package.json +5 -0
  226. package/effect/ZKManifestError/package.json +5 -0
  227. package/effect/index/package.json +5 -0
  228. package/effect/package.json +5 -0
  229. package/package.json +220 -4
  230. package/v8/effect/package.json +5 -0
  231. package/v8/package.json +5 -0
  232. package/v9/effect/package.json +5 -0
  233. package/v9/package.json +5 -0
@@ -0,0 +1,34 @@
1
+ declare const TypeId: unique symbol;
2
+ type TypeId = typeof TypeId;
3
+ declare const ZKManifestError_base: new <A extends Record<string, any>>(args: import("effect/Types").Simplify<A>) => import("effect/Cause").YieldableError & Record<typeof TypeId, typeof TypeId> & {
4
+ readonly _tag: "ZKManifestError";
5
+ } & Readonly<A>;
6
+ /**
7
+ * An error that occurred while parsing a ZK artifact manifest.
8
+ *
9
+ * @category errors
10
+ */
11
+ export declare class ZKManifestError extends ZKManifestError_base<{
12
+ /** A displayable message. */
13
+ readonly message: string;
14
+ /** Indicates a more specific cause of the error. */
15
+ readonly cause?: unknown;
16
+ }> {
17
+ }
18
+ /**
19
+ * Determines if a value is a ZK manifest error.
20
+ *
21
+ * @param msg The value to check.
22
+ * @returns `true` if `msg` is a {@link ZKManifestError}; `false` otherwise.
23
+ *
24
+ * @category guards
25
+ */
26
+ export declare const isManifestError: (msg: unknown) => msg is ZKManifestError;
27
+ /**
28
+ * Creates a new {@link ZKManifestError}.
29
+ *
30
+ * @category constructors
31
+ */
32
+ export declare const make: (message: string, cause?: unknown) => ZKManifestError;
33
+ export {};
34
+ //# sourceMappingURL=ZKManifestError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ZKManifestError.d.ts","sourceRoot":"","sources":["../../../src/effect/ZKManifestError.ts"],"names":[],"mappings":"AAkBA,QAAA,MAAM,MAAM,EAAE,OAAO,MAAwD,CAAC;AAC9E,KAAK,MAAM,GAAG,OAAO,MAAM,CAAC;;;;AAE5B;;;;GAIG;AACH,qBAAa,eAAgB,SAAQ,qBAA6C;IAChF,6BAA6B;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,oDAAoD;IACpD,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;CAAG;AAEL;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,GAAI,KAAK,OAAO,KAAG,GAAG,IAAI,eAA2C,CAAC;AAElG;;;;GAIG;AACH,eAAO,MAAM,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,KAAK,eAChB,CAAC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * The unsuffixed `/effect` entry, which targets whichever era this build is bound to — ledger 9
3
+ * today.
4
+ *
5
+ * @remarks
6
+ * Composed from the two capability levels rather than listing modules directly, so that an
7
+ * era-scoped entry can take only the levels its runtime line supports
8
+ * (midnight-sdk#387/#388):
9
+ *
10
+ * - `eraNeutralSurface` — everything any bound era can provide.
11
+ * - `contractEventsSurface` — contract events, which are era-impossible below ledger 9 (see that
12
+ * module for why) and so are absent from an older era's entry rather than present and failing
13
+ * at run time.
14
+ *
15
+ * The composed surface is identical to what this entry exported before the split;
16
+ * `LedgerEra.test.ts` pins both that equivalence and the split itself. When the bound era
17
+ * advances past a level, drop the corresponding line here — do not re-add modules individually,
18
+ * or the levels stop describing the eras.
19
+ */
20
+ export * from './internal/contractEventsSurface.js';
21
+ export * from './internal/eraNeutralSurface.js';
22
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/effect/index.ts"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;;;;;GAkBG;AACH,cAAc,qCAAqC,CAAC;AACpD,cAAc,iCAAiC,CAAC"}
@@ -0,0 +1,35 @@
1
+ import { Effect } from 'effect';
2
+ import * as ContractRuntimeError from '../ContractRuntimeError.js';
3
+ /**
4
+ * Wraps a call across a WASM boundary so that a rejection becomes a typed failure rather than a
5
+ * defect.
6
+ *
7
+ * @remarks
8
+ * Both era seams need this, and it lives above both rather than in either. The dependency between
9
+ * the facades runs one way — `Ledger` imports `CompactRuntime` (it is where the two era-paired
10
+ * halves meet), not the reverse — so a wrapper owned by `Ledger` would make `CompactRuntime`'s
11
+ * import of it a cycle. Owning it in `CompactRuntime` would not cycle, but it would route every
12
+ * *ledger* rejection through the runtime facade and make the runtime seam load-bearing for the
13
+ * ledger one, which is the layering the two-seam split exists to avoid. Each facade re-exports it
14
+ * under the name that documents its own package's failure mode — `Ledger.tryConvert` and
15
+ * `CompactRuntime.tryRuntime` — so there is exactly one copy of the boundary handling.
16
+ *
17
+ * Every ledger and compact-runtime binding signals rejection by throwing. A throw evaluated in an
18
+ * `Effect.gen` body (or a bare `Effect.map` callback) is a defect, and a defect escapes the
19
+ * caller's declared error channel: a dApp's `catchAll` over `ContractExecutionError` never sees
20
+ * it, and the CLI — which runs with `disableErrorReporting` — exits non-zero printing nothing at
21
+ * all.
22
+ *
23
+ * `evaluate` is constrained to a synchronous thunk. `Effect.try` does not await, so an `async`
24
+ * thunk would infer `A = Promise<X>`: the effect *succeeds* carrying a pending promise, the
25
+ * rejection never reaches the error channel, and the caller gets an unhandled rejection plus a
26
+ * `Promise` where a value was expected — the very defect this function exists to prevent, arrived
27
+ * at through the wrapper meant to stop it. Use `Effect.tryPromise` for an async boundary call.
28
+ *
29
+ * @param message A message describing the operation, used as the failure's message.
30
+ * @param evaluate A synchronous thunk that performs the boundary call.
31
+ * @returns An `Effect` that yields the result of `evaluate`, failing with a
32
+ * {@link ContractRuntimeError.ContractRuntimeError} if the boundary rejects it.
33
+ */
34
+ export declare const tryBoundary: <A>(message: string, evaluate: () => A extends PromiseLike<unknown> ? never : A) => Effect.Effect<A, ContractRuntimeError.ContractRuntimeError>;
35
+ //# sourceMappingURL=boundary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"boundary.d.ts","sourceRoot":"","sources":["../../../../src/effect/internal/boundary.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,KAAK,oBAAoB,MAAM,4BAA4B,CAAC;AAEnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAUH,eAAO,MAAM,WAAW,EAAE,CAAC,CAAC,EAC1B,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,CAAC,SAAS,WAAW,CAAC,OAAO,CAAC,GAAG,KAAK,GAAG,CAAC,KACvD,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,oBAAoB,CAAC,oBAAoB,CAI3D,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { Effect, type Types } from 'effect';
2
+ import type * as CompactContext from '../CompactContext.js';
3
+ import type { CompiledContract } from '../CompiledContract.js';
4
+ import { type Contract } from '../Contract.js';
5
+ import * as ContractRuntimeError from '../ContractRuntimeError.js';
6
+ export declare const TypeId: unique symbol;
7
+ export type TypeId = typeof TypeId;
8
+ export interface Context<C extends Contract.Any> extends CompactContext.Witnesses<C>, CompactContext.CompiledAssetsPath {
9
+ readonly ctor: Types.Ctor<C>;
10
+ }
11
+ export declare const getContractContext: <C extends Contract<PS>, PS>(compiledContract: CompiledContract<C, PS>) => Types.Simplify<Required<Context<C>>>;
12
+ /**
13
+ * Instantiates the compactc-generated contract class from a {@link CompiledContract}.
14
+ *
15
+ * @remarks
16
+ * `Effect.try`, not `Effect.sync`, and the declared error channel is load-bearing. The generated
17
+ * constructor **throws** a `CompactError` when the supplied witnesses are missing, misspelled or
18
+ * not functions — an ordinary mistake in a hand-written `contract.config.ts`, not an invariant
19
+ * breach. Under `Effect.sync` that throw became a *defect* on an effect declared `Effect<C>`: it
20
+ * passed `ContractExecutable`'s `ContractExecutionError` channel, passed any consumer's `catchAll`
21
+ * over it, and in the CLI — which runs with `disableErrorReporting` — produced exit 1 with no
22
+ * output at all. The `Effect.mapError` that sat at the call site looked like the guard and could
23
+ * never fire, because it was mapping a `never`.
24
+ *
25
+ * The message names the contract and points at the witnesses, since those are the one part of a
26
+ * `CompiledContract` the caller supplies.
27
+ */
28
+ export declare const createContract: <C extends Contract<PS>, PS>(compiledContract: CompiledContract<C, PS>) => Effect.Effect<C, ContractRuntimeError.ContractRuntimeError>;
29
+ //# sourceMappingURL=compactContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compactContext.d.ts","sourceRoot":"","sources":["../../../../src/effect/internal/compactContext.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,MAAM,EAAE,KAAK,KAAK,EAAE,MAAM,QAAQ,CAAC;AAE5C,OAAO,KAAK,KAAK,cAAc,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,oBAAoB,MAAM,4BAA4B,CAAC;AASnE,eAAO,MAAM,MAAM,eAAW,CAAC;AAC/B,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC;AAEnC,MAAM,WAAW,OAAO,CAAC,CAAC,SAAS,QAAQ,CAAC,GAAG,CAC7C,SAAQ,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,cAAc,CAAC,kBAAkB;IACpE,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;CAC9B;AAEH,eAAO,MAAM,kBAAkB,EAAE,CAAC,CAAC,SAAS,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,EAC1D,gBAAgB,EAAE,gBAAgB,CAAC,CAAC,EAAE,EAAE,CAAC,KACtC,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CACU,CAAC;AAEnD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,cAAc,EAAE,CAAC,CAAC,SAAS,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,EACtD,gBAAgB,EAAE,gBAAgB,CAAC,CAAC,EAAE,EAAE,CAAC,KACtC,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,oBAAoB,CAAC,oBAAoB,CAgB3D,CAAC"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * The **ledger 9 and later** half of the `/effect` surface: contract events.
3
+ *
4
+ * @remarks
5
+ * Kept separate from `eraNeutralSurface.ts` because contract events are era-impossible below
6
+ * ledger 9, not merely unimplemented there:
7
+ *
8
+ * - compact-runtime 0.16 has no `LogEvent` type and accumulates nothing on its circuit context,
9
+ * so there is no value for these modules to be built on.
10
+ * - The VM-level `log` gather op *does* exist under onchain-runtime-v3, but its payload is a bare
11
+ * `EncodedStateValue`, against onchain-runtime-v4's `{ version, eventType, data }`, and it
12
+ * carries no emitting-contract address. Events on ledger 8 would have to be rebuilt against a
13
+ * different payload, not bound — so these types could not describe them even if a value existed.
14
+ *
15
+ * The gate is **the omission itself**: an era entry that cannot support events does not compose
16
+ * this module, which is what #388 means by a member being absent rather than runtime-failing.
17
+ *
18
+ * It is *not* structural, and an earlier version of this note claimed otherwise — that "every
19
+ * module re-exported here reaches `LogEvent` through the compact-runtime seam, so composing this
20
+ * barrel on an era whose runtime line lacks it fails the build". Composing it on `/v8/effect`
21
+ * compiles cleanly; that was verified rather than assumed. Three of the four modules name no
22
+ * runtime type at all, and the fourth (`ContractLog`) reached the *bound* facade rather than a
23
+ * binding argument — so on an older era the barrel would have compiled and handed back the wrong
24
+ * era's events, which is the opposite of a gate.
25
+ *
26
+ * `CallTreeRuntimeBinding` (`internal/runtime/binding.ts`) is the type-level gate that backs the
27
+ * omission up: `internal/runtime/conformance.ts` asserts 0.21 satisfies it and **0.16 does not**, so
28
+ * a line that cannot accumulate events cannot claim it.
29
+ *
30
+ * These modules are era-free in their own right. `ContractLog` used to take `LogEvent` from the
31
+ * bound facade — which would have made an era-pinned entry's decoder follow `current.ts` — and now
32
+ * reads the structural minimum it decodes, recovering the caller's own event type by inference. So
33
+ * composing this barrel on a later era is correct by construction rather than by coincidence.
34
+ *
35
+ * Internal by design, for the same reasons as its era-neutral sibling — and, like it, without an
36
+ * internal-marker JSDoc tag, which `stripInternal` would apply to the first export below (see
37
+ * `eraFreeSurface.ts`).
38
+ */
39
+ export * as ContractEventStore from '../ContractEventStore.js';
40
+ export * as ContractEventValidationError from '../ContractEventValidationError.js';
41
+ export * from '../ContractEventValidator.js';
42
+ export * as ContractLog from '../ContractLog.js';
43
+ //# sourceMappingURL=contractEventsSurface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contractEventsSurface.d.ts","sourceRoot":"","sources":["../../../../src/effect/internal/contractEventsSurface.ts"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,OAAO,KAAK,kBAAkB,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,4BAA4B,MAAM,oCAAoC,CAAC;AACnF,cAAc,8BAA8B,CAAC;AAC7C,OAAO,KAAK,WAAW,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Contract execution pinned to the **ledger 8 / compact-runtime 0.16** era pair.
3
+ *
4
+ * @remarks
5
+ * `internal/executable.ts` applied to this era's two facades, exactly as `effect/ContractExecutable.ts`
6
+ * applies it to the bound era's. Every era-varying type below therefore resolves to ledger 8's and
7
+ * 0.16's shapes as a consequence of the two arguments — `CircuitContext.contractState` is the 0.16
8
+ * contract state, `MaintenanceResult.maintenanceUpdate` is ledger 8's — with no second declaration
9
+ * to keep in step (midnight-sdk#387/#388).
10
+ *
11
+ * The era's *capabilities* come from the same place. `createExecutionContext` on the 0.16 binding
12
+ * rejects a cross-contract state provider rather than ignoring it, and its `readExecution`
13
+ * instantiates the event list as `never[]`, so `CallResult.events` here is statically empty: a
14
+ * ledger 8 consumer cannot ask for what this era cannot do, and does not have to know why.
15
+ */
16
+ import type * as Contract from '../../Contract.js';
17
+ import * as Internal from '../executable.js';
18
+ import * as Ledger from './v8Ledger.js';
19
+ import * as Runtime from './v8Runtime.js';
20
+ type EraLedger = typeof Ledger;
21
+ type EraRuntime = typeof Runtime;
22
+ /** An executable form of a Compact compiled contract, bound to ledger 8. */
23
+ export interface ContractExecutable<in out C extends Contract.Contract<PS>, PS, out E = never, out R = never> extends Internal.ContractExecutable<EraLedger, EraRuntime, C, PS, E, R> {
24
+ }
25
+ export declare namespace ContractExecutable {
26
+ type Context = Internal.Context;
27
+ type ContractContext = Internal.ContractContext<EraLedger, EraRuntime>;
28
+ type CircuitContext<PS> = Internal.CircuitContext<EraLedger, EraRuntime, PS>;
29
+ type GasCost = Internal.GasCost;
30
+ type DeployResultPublic = Internal.DeployResultPublic<EraLedger, EraRuntime>;
31
+ type DeployResultPrivate<PS> = Internal.DeployResultPrivate<EraLedger, EraRuntime, PS>;
32
+ type DeployResult<PS> = Internal.DeployResult<EraLedger, EraRuntime, PS>;
33
+ type PartitionedTranscript = Internal.PartitionedTranscript<EraLedger, EraRuntime>;
34
+ type CallPartitionInputs = Internal.CallPartitionInputs<EraLedger, EraRuntime>;
35
+ type ContractCallPublic = Internal.ContractCallPublic<EraLedger, EraRuntime>;
36
+ type ContractCallPrivate = Internal.ContractCallPrivate<EraLedger, EraRuntime>;
37
+ type ContractCall = Internal.ContractCall<EraLedger, EraRuntime>;
38
+ type CallResult<C extends Contract.Contract<PS>, PS, K extends Contract.ProvableCircuitId<C>> = Internal.CallResult<EraLedger, EraRuntime, C, PS, K>;
39
+ type MaintenanceResultPublic = Internal.MaintenanceResultPublic<EraLedger, EraRuntime>;
40
+ type MaintenanceResultPrivate = Internal.MaintenanceResultPrivate;
41
+ type MaintenanceResult = Internal.MaintenanceResult<EraLedger, EraRuntime>;
42
+ }
43
+ /**
44
+ * An error occurred while executing a constructor, or a circuit, of an executable contract.
45
+ *
46
+ * @category errors
47
+ */
48
+ export type ContractExecutionError = Internal.ContractExecutionError;
49
+ /**
50
+ * Takes a Compact compiled contract, and makes it executable against ledger 8.
51
+ *
52
+ * @category constructors
53
+ */
54
+ export declare const make: <C extends Contract.Contract<PS, Contract.Witnesses<PS>>, PS>(compiledContract: import("../../CompiledContract.js").CompiledContract<C, PS, never>) => Internal.ContractExecutable<typeof Ledger, typeof Runtime, C, PS, Internal.ContractExecutionError, Internal.Context>;
55
+ /**
56
+ * Provides a layer to the executable contract.
57
+ *
58
+ * @category combinators
59
+ */
60
+ export declare const provide: {
61
+ <LA, LE, LR>(layer: import("effect/Layer").Layer<LA, LE, LR>): <C extends Contract.Contract<PS, Contract.Witnesses<PS>>, PS, E, Rq>(self: Internal.ContractExecutable<typeof Ledger, typeof Runtime, C, PS, E, Rq>) => Internal.ContractExecutable<typeof Ledger, typeof Runtime, C, PS, LE | E, LR | Exclude<Rq, LA>>;
62
+ <C extends Contract.Contract<PS, Contract.Witnesses<PS>>, PS, E, Rq, LA, LE, LR>(self: Internal.ContractExecutable<typeof Ledger, typeof Runtime, C, PS, E, Rq>, layer: import("effect/Layer").Layer<LA, LE, LR>): Internal.ContractExecutable<typeof Ledger, typeof Runtime, C, PS, E | LE, LR | Exclude<Rq, LA>>;
63
+ };
64
+ export {};
65
+ //# sourceMappingURL=v8Executable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v8Executable.d.ts","sourceRoot":"","sources":["../../../../../src/effect/internal/era/v8Executable.ts"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,KAAK,QAAQ,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAE1C,KAAK,SAAS,GAAG,OAAO,MAAM,CAAC;AAC/B,KAAK,UAAU,GAAG,OAAO,OAAO,CAAC;AAIjC,4EAA4E;AAE5E,MAAM,WAAW,kBAAkB,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,SAAS,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC,GAAG,KAAK,EAAE,GAAG,CAAC,CAAC,GAAG,KAAK,CAC1G,SAAQ,QAAQ,CAAC,kBAAkB,CAAC,SAAS,EAAE,UAAU,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC;CAAG;AAE5E,MAAM,CAAC,OAAO,WAAW,kBAAkB,CAAC;IAC1C,KAAY,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;IAEvC,KAAY,eAAe,GAAG,QAAQ,CAAC,eAAe,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IAC9E,KAAY,cAAc,CAAC,EAAE,IAAI,QAAQ,CAAC,cAAc,CAAC,SAAS,EAAE,UAAU,EAAE,EAAE,CAAC,CAAC;IACpF,KAAY,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;IAEvC,KAAY,kBAAkB,GAAG,QAAQ,CAAC,kBAAkB,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IACpF,KAAY,mBAAmB,CAAC,EAAE,IAAI,QAAQ,CAAC,mBAAmB,CAAC,SAAS,EAAE,UAAU,EAAE,EAAE,CAAC,CAAC;IAC9F,KAAY,YAAY,CAAC,EAAE,IAAI,QAAQ,CAAC,YAAY,CAAC,SAAS,EAAE,UAAU,EAAE,EAAE,CAAC,CAAC;IAEhF,KAAY,qBAAqB,GAAG,QAAQ,CAAC,qBAAqB,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IAC1F,KAAY,mBAAmB,GAAG,QAAQ,CAAC,mBAAmB,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IACtF,KAAY,kBAAkB,GAAG,QAAQ,CAAC,kBAAkB,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IACpF,KAAY,mBAAmB,GAAG,QAAQ,CAAC,mBAAmB,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IACtF,KAAY,YAAY,GAAG,QAAQ,CAAC,YAAY,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IAExE,KAAY,UAAU,CACpB,CAAC,SAAS,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,EAC/B,EAAE,EACF,CAAC,SAAS,QAAQ,CAAC,iBAAiB,CAAC,CAAC,CAAC,IACrC,QAAQ,CAAC,UAAU,CAAC,SAAS,EAAE,UAAU,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;IAEzD,KAAY,uBAAuB,GAAG,QAAQ,CAAC,uBAAuB,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IAC9F,KAAY,wBAAwB,GAAG,QAAQ,CAAC,wBAAwB,CAAC;IACzE,KAAY,iBAAiB,GAAG,QAAQ,CAAC,iBAAiB,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;CACnF;AAED;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG,QAAQ,CAAC,sBAAsB,CAAC;AAErE;;;;GAIG;AACH,eAAO,MAAM,IAAI,6QAAkB,CAAC;AAEpC;;;;GAIG;AACH,eAAO,MAAM,OAAO;;;CAAqB,CAAC"}
@@ -0,0 +1,76 @@
1
+ /**
2
+ * The **ledger 8** `Ledger` facade — pinned to that era, independent of `current.ts`.
3
+ *
4
+ * @remarks
5
+ * The twin of `effect/Ledger.ts`, which instantiates the same conversions factory against whatever
6
+ * `current.ts` binds. This module instead pins ledger 8 and its paired compact-runtime 0.16 line,
7
+ * so `/v8/effect` genuinely *selects* an era rather than labelling the build's one bound era
8
+ * (midnight-sdk#387/#388).
9
+ *
10
+ * Both facades exist at once, which is the property that makes an era-suffixed subpath meaningful:
11
+ * `test/era8/LedgerEightFacade.test.ts` exercises this pair while the default test project
12
+ * exercises the ledger 9 pair.
13
+ *
14
+ * The duplication against `Ledger.ts` is deliberate and thin — a curated type re-export list plus
15
+ * one factory call. The *bodies* live in `internal/ledger/conversions.ts` and are shared; only the
16
+ * era binding differs. A type re-export cannot come from a factory, which is why there is a module
17
+ * per era rather than one parameterised module.
18
+ *
19
+ * This docblock carries no internal-marker JSDoc tag. A module docblock attaches to the file's
20
+ * first statement — here the `effect` import — so under `stripInternal` the marker deleted that
21
+ * import from the emitted typings while every conversion below went on returning an
22
+ * `Effect.Effect<…>`, leaving the published `.d.ts` naming a namespace it no longer imports.
23
+ * This is the `Ledger` of `/v8/effect`, so the damage landed on a headline entry. Privacy
24
+ * comes from `package.json` `exports` blocking `./effect/internal/*` instead. See
25
+ * `internal/boundary.ts` for why this note does not spell the tag out.
26
+ */
27
+ import { Effect } from 'effect';
28
+ import * as ContractRuntimeError from '../../ContractRuntimeError.js';
29
+ import * as V8 from '../ledger/v8.js';
30
+ import * as V0_16 from '../runtime/v0_16.js';
31
+ export { type Era } from '../era.js';
32
+ export { tryConvert } from '../ledger/conversions.js';
33
+ export * from '../ledger/v8.js';
34
+ /** Converts a runtime `ContractState` to ledger 8's. @category conversions */
35
+ export declare const fromRuntimeContractState: (contractState: V0_16.ContractState) => Effect.Effect<V8.ContractState, ContractRuntimeError.ContractRuntimeError, never>;
36
+ /** Converts a ledger 8 `ContractState` to the paired runtime's. @category conversions */
37
+ export declare const toRuntimeContractState: (contractState: V8.ContractState) => Effect.Effect<V0_16.ContractState, ContractRuntimeError.ContractRuntimeError, never>;
38
+ /** Deserializes ledger-serialized bytes into a ledger 8 `ContractState`. @category conversions */
39
+ export declare const contractStateFromBytes: (bytes: Uint8Array) => Effect.Effect<V8.ContractState, ContractRuntimeError.ContractRuntimeError, never>;
40
+ /** Deserializes ledger-serialized bytes into ledger 8 `LedgerParameters`. @category conversions */
41
+ export declare const parametersFromBytes: (bytes: Uint8Array) => Effect.Effect<V8.LedgerParameters, ContractRuntimeError.ContractRuntimeError, never>;
42
+ /** Converts a runtime `ContractMaintenanceAuthority` to ledger 8's. @category conversions */
43
+ export declare const fromRuntimeMaintenanceAuthority: (authority: import("compact-runtime-ledger8").ContractMaintenanceAuthority) => Effect.Effect<import("@midnightntwrk/ledger-v8").ContractMaintenanceAuthority, ContractRuntimeError.ContractRuntimeError, never>;
44
+ /** Converts a runtime `StateValue` to ledger 8's via the shared binary encoding. @category conversions */
45
+ export declare const fromRuntimeStateValue: (value: {
46
+ encode(): unknown;
47
+ }) => Effect.Effect<V8.StateValue, ContractRuntimeError.ContractRuntimeError, never>;
48
+ /** Converts a runtime `QueryContext` to ledger 8's. @category conversions */
49
+ export declare const fromRuntimeQueryContext: (queryContext: {
50
+ readonly state: {
51
+ readonly state: {
52
+ encode(): unknown;
53
+ };
54
+ };
55
+ readonly address: unknown;
56
+ block: unknown;
57
+ effects: unknown;
58
+ }) => Effect.Effect<V8.QueryContext, ContractRuntimeError.ContractRuntimeError, never>;
59
+ /**
60
+ * Adapts a platform-js signing key to ledger 8's `SigningKey`.
61
+ *
62
+ * @remarks
63
+ * Returns a **bare hex string**, not the `{ tag, value }` pair the ledger 9 facade returns: this
64
+ * era has no tagged-key concept. An ECDSA key is rejected rather than coerced, because it has no
65
+ * representation here at all.
66
+ *
67
+ * @category conversions
68
+ */
69
+ export declare const fromPlatformSigningKey: (signingKey: import("@midnight-ntwrk/platform-js/effect/SigningKey").SigningKey, contractState?: V0_16.ContractState | undefined) => import("effect/Either").Either<string, import("../../ContractConfigurationError.js").ContractConfigurationError>;
70
+ /**
71
+ * Resolves the `ContractOperation` for a circuit from a ledger 8 contract state, failing if absent.
72
+ *
73
+ * @category conversions
74
+ */
75
+ export declare const operationForCircuit: (contractState: V8.ContractState, circuitId: string, contractAddress: string) => Effect.Effect<V8.ContractOperation, ContractRuntimeError.ContractRuntimeError>;
76
+ //# sourceMappingURL=v8Ledger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v8Ledger.d.ts","sourceRoot":"","sources":["../../../../../src/effect/internal/era/v8Ledger.ts"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,KAAK,oBAAoB,MAAM,+BAA+B,CAAC;AAEtE,OAAO,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,KAAK,KAAK,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,cAAc,iBAAiB,CAAC;AAOhC,8EAA8E;AAC9E,eAAO,MAAM,wBAAwB,2HAAuC,CAAC;AAE7E,yFAAyF;AACzF,eAAO,MAAM,sBAAsB,2HAAqC,CAAC;AAEzE,kGAAkG;AAClG,eAAO,MAAM,sBAAsB,0GAAqC,CAAC;AAEzE,mGAAmG;AACnG,eAAO,MAAM,mBAAmB,6GAAkC,CAAC;AAEnE,6FAA6F;AAC7F,eAAO,MAAM,+BAA+B,iNAA8C,CAAC;AAE3F,0GAA0G;AAC1G,eAAO,MAAM,qBAAqB;;oFAAoC,CAAC;AAEvE,6EAA6E;AAC7E,eAAO,MAAM,uBAAuB;;;;;;;;;sFAAsC,CAAC;AAE3E;;;;;;;;;GASG;AACH,eAAO,MAAM,sBAAsB,uPAAqC,CAAC;AAEzE;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,CAChC,aAAa,EAAE,EAAE,CAAC,aAAa,EAC/B,SAAS,EAAE,MAAM,EACjB,eAAe,EAAE,MAAM,KACpB,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,oBAAoB,CAe/E,CAAC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * The **compact-runtime 0.16** facade — the runtime half of the ledger 8 era, pinned rather than
3
+ * resolved through `current.ts`.
4
+ *
5
+ * @remarks
6
+ * The twin of `effect/CompactRuntime.ts`, and the runtime-side counterpart of
7
+ * {@link v8Ledger}: an era-pinned entry needs its own instance of *both* seams, or the entry names
8
+ * one era and hands back another's objects.
9
+ *
10
+ * The binding alone is not the facade. `internal/runtime/v0_16.ts` is a curated re-export of the
11
+ * 0.16 package, and every one of those names signals rejection by throwing across the WASM
12
+ * boundary — so an entry that exported the binding directly would be the one place in the package
13
+ * where a rejection becomes a defect instead of a typed failure. That is not a stylistic gap: a
14
+ * defect escapes the caller's declared error channel, so a dApp's `catchAll` over
15
+ * `ContractExecutionError` never sees it and the CLI (running with `disableErrorReporting`) exits
16
+ * non-zero printing nothing at all. Adding {@link tryRuntime} here is what makes `/v8/effect` offer
17
+ * the same failure contract as the unsuffixed entry.
18
+ *
19
+ * One function object backs every alias — `Ledger.tryConvert`, `CompactRuntime.tryRuntime`, and
20
+ * both eras' — because they all re-export `internal/boundary.ts`. The era 8 facade test asserts
21
+ * that identity rather than just the presence of a function.
22
+ */
23
+ export { tryBoundary as tryRuntime } from '../boundary.js';
24
+ export { type RuntimeLine } from '../era.js';
25
+ export * from '../runtime/v0_16.js';
26
+ //# sourceMappingURL=v8Runtime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v8Runtime.d.ts","sourceRoot":"","sources":["../../../../../src/effect/internal/era/v8Runtime.ts"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAE,WAAW,IAAI,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Contract execution pinned to the **ledger 9 / compact-runtime 0.21** era pair.
3
+ *
4
+ * @remarks
5
+ * `internal/executable.ts` applied to this era's two facades, exactly as `effect/ContractExecutable.ts`
6
+ * applies it to the bound era's. Every era-varying type below therefore resolves to ledger 9's and
7
+ * 0.21's shapes as a consequence of the two arguments — `CircuitContext.contractState` is the 0.21
8
+ * contract state, `MaintenanceResult.maintenanceUpdate` is ledger 9's — with no second declaration
9
+ * to keep in step (midnight-sdk#387/#388).
10
+ *
11
+ * The era's *capabilities* come from the same place, and here they are the full set: 0.21's
12
+ * `createExecutionContext` accepts a cross-contract state provider, and its `readExecution` returns
13
+ * a real `LogEvent` list, so `CallResult.events` and multi-entry `calls` are reachable from this
14
+ * entry and statically absent from the ledger 8 one.
15
+ */
16
+ import type * as Contract from '../../Contract.js';
17
+ import * as Internal from '../executable.js';
18
+ import * as Ledger from './v9Ledger.js';
19
+ import * as Runtime from './v9Runtime.js';
20
+ type EraLedger = typeof Ledger;
21
+ type EraRuntime = typeof Runtime;
22
+ /** An executable form of a Compact compiled contract, bound to ledger 9. */
23
+ export interface ContractExecutable<in out C extends Contract.Contract<PS>, PS, out E = never, out R = never> extends Internal.ContractExecutable<EraLedger, EraRuntime, C, PS, E, R> {
24
+ }
25
+ export declare namespace ContractExecutable {
26
+ type Context = Internal.Context;
27
+ type ContractContext = Internal.ContractContext<EraLedger, EraRuntime>;
28
+ type CircuitContext<PS> = Internal.CircuitContext<EraLedger, EraRuntime, PS>;
29
+ type GasCost = Internal.GasCost;
30
+ type DeployResultPublic = Internal.DeployResultPublic<EraLedger, EraRuntime>;
31
+ type DeployResultPrivate<PS> = Internal.DeployResultPrivate<EraLedger, EraRuntime, PS>;
32
+ type DeployResult<PS> = Internal.DeployResult<EraLedger, EraRuntime, PS>;
33
+ type PartitionedTranscript = Internal.PartitionedTranscript<EraLedger, EraRuntime>;
34
+ type CallPartitionInputs = Internal.CallPartitionInputs<EraLedger, EraRuntime>;
35
+ type ContractCallPublic = Internal.ContractCallPublic<EraLedger, EraRuntime>;
36
+ type ContractCallPrivate = Internal.ContractCallPrivate<EraLedger, EraRuntime>;
37
+ type ContractCall = Internal.ContractCall<EraLedger, EraRuntime>;
38
+ type CallResult<C extends Contract.Contract<PS>, PS, K extends Contract.ProvableCircuitId<C>> = Internal.CallResult<EraLedger, EraRuntime, C, PS, K>;
39
+ type MaintenanceResultPublic = Internal.MaintenanceResultPublic<EraLedger, EraRuntime>;
40
+ type MaintenanceResultPrivate = Internal.MaintenanceResultPrivate;
41
+ type MaintenanceResult = Internal.MaintenanceResult<EraLedger, EraRuntime>;
42
+ }
43
+ /**
44
+ * An error occurred while executing a constructor, or a circuit, of an executable contract.
45
+ *
46
+ * @category errors
47
+ */
48
+ export type ContractExecutionError = Internal.ContractExecutionError;
49
+ /**
50
+ * Takes a Compact compiled contract, and makes it executable against ledger 9.
51
+ *
52
+ * @category constructors
53
+ */
54
+ export declare const make: <C extends Contract.Contract<PS, Contract.Witnesses<PS>>, PS>(compiledContract: import("../../CompiledContract.js").CompiledContract<C, PS, never>) => Internal.ContractExecutable<typeof Ledger, typeof Runtime, C, PS, Internal.ContractExecutionError, Internal.Context>;
55
+ /**
56
+ * Provides a layer to the executable contract.
57
+ *
58
+ * @category combinators
59
+ */
60
+ export declare const provide: {
61
+ <LA, LE, LR>(layer: import("effect/Layer").Layer<LA, LE, LR>): <C extends Contract.Contract<PS, Contract.Witnesses<PS>>, PS, E, Rq>(self: Internal.ContractExecutable<typeof Ledger, typeof Runtime, C, PS, E, Rq>) => Internal.ContractExecutable<typeof Ledger, typeof Runtime, C, PS, LE | E, LR | Exclude<Rq, LA>>;
62
+ <C extends Contract.Contract<PS, Contract.Witnesses<PS>>, PS, E, Rq, LA, LE, LR>(self: Internal.ContractExecutable<typeof Ledger, typeof Runtime, C, PS, E, Rq>, layer: import("effect/Layer").Layer<LA, LE, LR>): Internal.ContractExecutable<typeof Ledger, typeof Runtime, C, PS, E | LE, LR | Exclude<Rq, LA>>;
63
+ };
64
+ export {};
65
+ //# sourceMappingURL=v9Executable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v9Executable.d.ts","sourceRoot":"","sources":["../../../../../src/effect/internal/era/v9Executable.ts"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,KAAK,QAAQ,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAE1C,KAAK,SAAS,GAAG,OAAO,MAAM,CAAC;AAC/B,KAAK,UAAU,GAAG,OAAO,OAAO,CAAC;AAIjC,4EAA4E;AAE5E,MAAM,WAAW,kBAAkB,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,SAAS,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC,GAAG,KAAK,EAAE,GAAG,CAAC,CAAC,GAAG,KAAK,CAC1G,SAAQ,QAAQ,CAAC,kBAAkB,CAAC,SAAS,EAAE,UAAU,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC;CAAG;AAE5E,MAAM,CAAC,OAAO,WAAW,kBAAkB,CAAC;IAC1C,KAAY,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;IAEvC,KAAY,eAAe,GAAG,QAAQ,CAAC,eAAe,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IAC9E,KAAY,cAAc,CAAC,EAAE,IAAI,QAAQ,CAAC,cAAc,CAAC,SAAS,EAAE,UAAU,EAAE,EAAE,CAAC,CAAC;IACpF,KAAY,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;IAEvC,KAAY,kBAAkB,GAAG,QAAQ,CAAC,kBAAkB,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IACpF,KAAY,mBAAmB,CAAC,EAAE,IAAI,QAAQ,CAAC,mBAAmB,CAAC,SAAS,EAAE,UAAU,EAAE,EAAE,CAAC,CAAC;IAC9F,KAAY,YAAY,CAAC,EAAE,IAAI,QAAQ,CAAC,YAAY,CAAC,SAAS,EAAE,UAAU,EAAE,EAAE,CAAC,CAAC;IAEhF,KAAY,qBAAqB,GAAG,QAAQ,CAAC,qBAAqB,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IAC1F,KAAY,mBAAmB,GAAG,QAAQ,CAAC,mBAAmB,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IACtF,KAAY,kBAAkB,GAAG,QAAQ,CAAC,kBAAkB,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IACpF,KAAY,mBAAmB,GAAG,QAAQ,CAAC,mBAAmB,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IACtF,KAAY,YAAY,GAAG,QAAQ,CAAC,YAAY,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IAExE,KAAY,UAAU,CACpB,CAAC,SAAS,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,EAC/B,EAAE,EACF,CAAC,SAAS,QAAQ,CAAC,iBAAiB,CAAC,CAAC,CAAC,IACrC,QAAQ,CAAC,UAAU,CAAC,SAAS,EAAE,UAAU,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;IAEzD,KAAY,uBAAuB,GAAG,QAAQ,CAAC,uBAAuB,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IAC9F,KAAY,wBAAwB,GAAG,QAAQ,CAAC,wBAAwB,CAAC;IACzE,KAAY,iBAAiB,GAAG,QAAQ,CAAC,iBAAiB,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;CACnF;AAED;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG,QAAQ,CAAC,sBAAsB,CAAC;AAErE;;;;GAIG;AACH,eAAO,MAAM,IAAI,6QAAkB,CAAC;AAEpC;;;;GAIG;AACH,eAAO,MAAM,OAAO;;;CAAqB,CAAC"}
@@ -0,0 +1,76 @@
1
+ /**
2
+ * The **ledger 9** `Ledger` facade — pinned to that era, independent of `current.ts`.
3
+ *
4
+ * @remarks
5
+ * The twin of `v8Ledger.ts`, and the reason `/v9/effect` is now an era-pinned entry rather than a
6
+ * second name for the build's bound era. Previously `/v9` re-exported `effect/Ledger.ts`, which
7
+ * resolves `internal/ledger/current.ts`; repointing that at a later era therefore turned `/v9` into
8
+ * an entry for *that* era, with no build error and no failing test — the `/v9`-versus-root parity
9
+ * checks compared an alias against its own target, so they passed by construction. Binding v9 here
10
+ * makes the suffix mean what it says (midnight-sdk#388).
11
+ *
12
+ * `effect/Ledger.ts` keeps its role: it is the facade for the **unsuffixed** entry, which is
13
+ * deliberately "whatever era this build bound". The two agree today and are expected to diverge the
14
+ * first time `current.ts` advances — that divergence is the point, not a defect.
15
+ *
16
+ * Both halves of the era pair are passed to one conversions factory, so a mismatched pair is a
17
+ * construction error rather than a run-time surprise. The bodies live in
18
+ * `internal/ledger/conversions.ts` and are shared with every other era; only the binding differs.
19
+ *
20
+ * This docblock carries no internal-marker JSDoc tag. A module docblock attaches to the file's
21
+ * first statement — here the `effect` import — so under `stripInternal` the marker deleted that
22
+ * import from the emitted typings while every conversion below went on returning an
23
+ * `Effect.Effect<…>`, leaving the published `.d.ts` naming a namespace it no longer imports.
24
+ * This is the `Ledger` of `/v9/effect`, so the damage landed on a headline entry. Privacy
25
+ * comes from `package.json` `exports` blocking `./effect/internal/*` instead. See
26
+ * `internal/boundary.ts` for why this note does not spell the tag out.
27
+ */
28
+ import { Effect } from 'effect';
29
+ import * as ContractRuntimeError from '../../ContractRuntimeError.js';
30
+ import * as V9 from '../ledger/v9.js';
31
+ import * as V0_21 from '../runtime/v0_21.js';
32
+ export { type Era } from '../era.js';
33
+ export { tryConvert } from '../ledger/conversions.js';
34
+ export * from '../ledger/v9.js';
35
+ /** Converts a runtime `ContractState` to ledger 9's. @category conversions */
36
+ export declare const fromRuntimeContractState: (contractState: V0_21.ContractState) => Effect.Effect<V9.ContractState, ContractRuntimeError.ContractRuntimeError, never>;
37
+ /** Converts a ledger 9 `ContractState` to the paired runtime's. @category conversions */
38
+ export declare const toRuntimeContractState: (contractState: V9.ContractState) => Effect.Effect<V0_21.ContractState, ContractRuntimeError.ContractRuntimeError, never>;
39
+ /** Deserializes ledger-serialized bytes into a ledger 9 `ContractState`. @category conversions */
40
+ export declare const contractStateFromBytes: (bytes: Uint8Array) => Effect.Effect<V9.ContractState, ContractRuntimeError.ContractRuntimeError, never>;
41
+ /** Deserializes ledger-serialized bytes into ledger 9 `LedgerParameters`. @category conversions */
42
+ export declare const parametersFromBytes: (bytes: Uint8Array) => Effect.Effect<V9.LedgerParameters, ContractRuntimeError.ContractRuntimeError, never>;
43
+ /** Converts a runtime `ContractMaintenanceAuthority` to ledger 9's. @category conversions */
44
+ export declare const fromRuntimeMaintenanceAuthority: (authority: V0_21.ContractMaintenanceAuthority) => Effect.Effect<V9.ContractMaintenanceAuthority, ContractRuntimeError.ContractRuntimeError, never>;
45
+ /** Converts a runtime `StateValue` to ledger 9's via the shared binary encoding. @category conversions */
46
+ export declare const fromRuntimeStateValue: (value: {
47
+ encode(): unknown;
48
+ }) => Effect.Effect<V9.StateValue, ContractRuntimeError.ContractRuntimeError, never>;
49
+ /** Converts a runtime `QueryContext` to ledger 9's. @category conversions */
50
+ export declare const fromRuntimeQueryContext: (queryContext: {
51
+ readonly state: {
52
+ readonly state: {
53
+ encode(): unknown;
54
+ };
55
+ };
56
+ readonly address: unknown;
57
+ block: unknown;
58
+ effects: unknown;
59
+ }) => Effect.Effect<V9.QueryContext, ContractRuntimeError.ContractRuntimeError, never>;
60
+ /**
61
+ * Adapts a platform-js signing key to ledger 9's `SigningKey`.
62
+ *
63
+ * @remarks
64
+ * Returns the `{ tag, value }` pair this era tags keys with, and accepts every scheme in the era's
65
+ * CMA allowlist — unlike ledger 8, which has no tagged-key concept and only BIP-340.
66
+ *
67
+ * @category conversions
68
+ */
69
+ export declare const fromPlatformSigningKey: (signingKey: import("@midnight-ntwrk/platform-js/effect/SigningKey").SigningKey, contractState?: V0_21.ContractState | undefined) => import("effect/Either").Either<V9.SigningKey, import("../../ContractConfigurationError.js").ContractConfigurationError>;
70
+ /**
71
+ * Resolves the `ContractOperation` for a circuit from a ledger 9 contract state, failing if absent.
72
+ *
73
+ * @category conversions
74
+ */
75
+ export declare const operationForCircuit: (contractState: V9.ContractState, circuitId: string, contractAddress: string) => Effect.Effect<V9.ContractOperation, ContractRuntimeError.ContractRuntimeError>;
76
+ //# sourceMappingURL=v9Ledger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v9Ledger.d.ts","sourceRoot":"","sources":["../../../../../src/effect/internal/era/v9Ledger.ts"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,KAAK,oBAAoB,MAAM,+BAA+B,CAAC;AAEtE,OAAO,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,KAAK,KAAK,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,cAAc,iBAAiB,CAAC;AAKhC,8EAA8E;AAC9E,eAAO,MAAM,wBAAwB,2HAAuC,CAAC;AAE7E,yFAAyF;AACzF,eAAO,MAAM,sBAAsB,2HAAqC,CAAC;AAEzE,kGAAkG;AAClG,eAAO,MAAM,sBAAsB,0GAAqC,CAAC;AAEzE,mGAAmG;AACnG,eAAO,MAAM,mBAAmB,6GAAkC,CAAC;AAEnE,6FAA6F;AAC7F,eAAO,MAAM,+BAA+B,qJAA8C,CAAC;AAE3F,0GAA0G;AAC1G,eAAO,MAAM,qBAAqB;;oFAAoC,CAAC;AAEvE,6EAA6E;AAC7E,eAAO,MAAM,uBAAuB;;;;;;;;;sFAAsC,CAAC;AAE3E;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,8PAAqC,CAAC;AAEzE;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,CAChC,aAAa,EAAE,EAAE,CAAC,aAAa,EAC/B,SAAS,EAAE,MAAM,EACjB,eAAe,EAAE,MAAM,KACpB,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,oBAAoB,CAe/E,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * The **compact-runtime 0.21** facade — the runtime half of the ledger 9 era, pinned rather than
3
+ * resolved through `current.ts`.
4
+ *
5
+ * @remarks
6
+ * The ledger 9 twin of {@link v8Runtime}; see that module for why an era-pinned entry needs a
7
+ * facade rather than the bare binding, and why {@link tryRuntime} is part of what "same public API
8
+ * across eras" means. Pinned rather than re-exporting `effect/CompactRuntime.ts`, for the same
9
+ * reason {@link v9Ledger} does not re-export `effect/Ledger.ts`: that module follows `current.ts`,
10
+ * so `/v9/effect` would silently follow an era swap instead of staying on ledger 9.
11
+ */
12
+ export { tryBoundary as tryRuntime } from '../boundary.js';
13
+ export { type RuntimeLine } from '../era.js';
14
+ export * from '../runtime/v0_21.js';
15
+ //# sourceMappingURL=v9Runtime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v9Runtime.d.ts","sourceRoot":"","sources":["../../../../../src/effect/internal/era/v9Runtime.ts"],"names":[],"mappings":"AAeA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,WAAW,IAAI,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,cAAc,qBAAqB,CAAC"}