@ledgerhq/coin-module-framework 8.0.0 → 8.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 (113) hide show
  1. package/CHANGELOG.md +106 -0
  2. package/lib/api/impl.d.ts +74 -0
  3. package/lib/api/impl.d.ts.map +1 -0
  4. package/lib/api/impl.js +60 -0
  5. package/lib/api/impl.js.map +1 -0
  6. package/lib/api/index.d.ts +4 -0
  7. package/lib/api/index.d.ts.map +1 -1
  8. package/lib/api/index.js +4 -0
  9. package/lib/api/index.js.map +1 -1
  10. package/lib/api/notSupported.d.ts +14 -0
  11. package/lib/api/notSupported.d.ts.map +1 -1
  12. package/lib/api/notSupported.js +31 -2
  13. package/lib/api/notSupported.js.map +1 -1
  14. package/lib/api/notSupportedApi.d.ts +37 -0
  15. package/lib/api/notSupportedApi.d.ts.map +1 -0
  16. package/lib/api/notSupportedApi.js +68 -0
  17. package/lib/api/notSupportedApi.js.map +1 -0
  18. package/lib/api/types.d.ts +4 -0
  19. package/lib/api/types.d.ts.map +1 -1
  20. package/lib/api/withDefaults.d.ts +31 -0
  21. package/lib/api/withDefaults.d.ts.map +1 -0
  22. package/lib/api/withDefaults.js +57 -0
  23. package/lib/api/withDefaults.js.map +1 -0
  24. package/lib/api/wrappers/index.d.ts +17 -0
  25. package/lib/api/wrappers/index.d.ts.map +1 -0
  26. package/lib/api/wrappers/index.js +35 -0
  27. package/lib/api/wrappers/index.js.map +1 -0
  28. package/lib/api/wrappers/instrumenter.d.ts +27 -0
  29. package/lib/api/wrappers/instrumenter.d.ts.map +1 -0
  30. package/lib/api/wrappers/instrumenter.js +46 -0
  31. package/lib/api/wrappers/instrumenter.js.map +1 -0
  32. package/lib/api/wrappers/withLogging.d.ts +11 -0
  33. package/lib/api/wrappers/withLogging.d.ts.map +1 -0
  34. package/lib/api/wrappers/withLogging.js +40 -0
  35. package/lib/api/wrappers/withLogging.js.map +1 -0
  36. package/lib/api/wrappers/withTracing.d.ts +18 -0
  37. package/lib/api/wrappers/withTracing.d.ts.map +1 -0
  38. package/lib/api/wrappers/withTracing.js +40 -0
  39. package/lib/api/wrappers/withTracing.js.map +1 -0
  40. package/lib/test-utils/capabilities.d.ts +44 -0
  41. package/lib/test-utils/capabilities.d.ts.map +1 -0
  42. package/lib/test-utils/capabilities.js +44 -0
  43. package/lib/test-utils/capabilities.js.map +1 -0
  44. package/lib/test-utils/helpers.d.ts +1 -1
  45. package/lib/test-utils/helpers.d.ts.map +1 -1
  46. package/lib/test-utils/helpers.js +15 -0
  47. package/lib/test-utils/helpers.js.map +1 -1
  48. package/lib-es/api/impl.d.ts +74 -0
  49. package/lib-es/api/impl.d.ts.map +1 -0
  50. package/lib-es/api/impl.js +57 -0
  51. package/lib-es/api/impl.js.map +1 -0
  52. package/lib-es/api/index.d.ts +4 -0
  53. package/lib-es/api/index.d.ts.map +1 -1
  54. package/lib-es/api/index.js +4 -0
  55. package/lib-es/api/index.js.map +1 -1
  56. package/lib-es/api/notSupported.d.ts +14 -0
  57. package/lib-es/api/notSupported.d.ts.map +1 -1
  58. package/lib-es/api/notSupported.js +30 -2
  59. package/lib-es/api/notSupported.js.map +1 -1
  60. package/lib-es/api/notSupportedApi.d.ts +37 -0
  61. package/lib-es/api/notSupportedApi.d.ts.map +1 -0
  62. package/lib-es/api/notSupportedApi.js +65 -0
  63. package/lib-es/api/notSupportedApi.js.map +1 -0
  64. package/lib-es/api/types.d.ts +4 -0
  65. package/lib-es/api/types.d.ts.map +1 -1
  66. package/lib-es/api/withDefaults.d.ts +31 -0
  67. package/lib-es/api/withDefaults.d.ts.map +1 -0
  68. package/lib-es/api/withDefaults.js +54 -0
  69. package/lib-es/api/withDefaults.js.map +1 -0
  70. package/lib-es/api/wrappers/index.d.ts +17 -0
  71. package/lib-es/api/wrappers/index.d.ts.map +1 -0
  72. package/lib-es/api/wrappers/index.js +19 -0
  73. package/lib-es/api/wrappers/index.js.map +1 -0
  74. package/lib-es/api/wrappers/instrumenter.d.ts +27 -0
  75. package/lib-es/api/wrappers/instrumenter.d.ts.map +1 -0
  76. package/lib-es/api/wrappers/instrumenter.js +43 -0
  77. package/lib-es/api/wrappers/instrumenter.js.map +1 -0
  78. package/lib-es/api/wrappers/withLogging.d.ts +11 -0
  79. package/lib-es/api/wrappers/withLogging.d.ts.map +1 -0
  80. package/lib-es/api/wrappers/withLogging.js +37 -0
  81. package/lib-es/api/wrappers/withLogging.js.map +1 -0
  82. package/lib-es/api/wrappers/withTracing.d.ts +18 -0
  83. package/lib-es/api/wrappers/withTracing.d.ts.map +1 -0
  84. package/lib-es/api/wrappers/withTracing.js +37 -0
  85. package/lib-es/api/wrappers/withTracing.js.map +1 -0
  86. package/lib-es/test-utils/capabilities.d.ts +44 -0
  87. package/lib-es/test-utils/capabilities.d.ts.map +1 -0
  88. package/lib-es/test-utils/capabilities.js +41 -0
  89. package/lib-es/test-utils/capabilities.js.map +1 -0
  90. package/lib-es/test-utils/helpers.d.ts +1 -1
  91. package/lib-es/test-utils/helpers.d.ts.map +1 -1
  92. package/lib-es/test-utils/helpers.js +1 -0
  93. package/lib-es/test-utils/helpers.js.map +1 -1
  94. package/package.json +1 -1
  95. package/src/api/impl.test.ts +83 -0
  96. package/src/api/impl.ts +112 -0
  97. package/src/api/index.ts +4 -0
  98. package/src/api/notSupported.ts +32 -2
  99. package/src/api/notSupportedApi.test.ts +67 -0
  100. package/src/api/notSupportedApi.ts +74 -0
  101. package/src/api/types.ts +4 -0
  102. package/src/api/withDefaults.test.ts +190 -0
  103. package/src/api/withDefaults.ts +87 -0
  104. package/src/api/wrappers/index.ts +20 -0
  105. package/src/api/wrappers/instrumenter.test.ts +123 -0
  106. package/src/api/wrappers/instrumenter.ts +58 -0
  107. package/src/api/wrappers/withLogging.test.ts +137 -0
  108. package/src/api/wrappers/withLogging.ts +47 -0
  109. package/src/api/wrappers/withTracing.test.ts +125 -0
  110. package/src/api/wrappers/withTracing.ts +56 -0
  111. package/src/test-utils/capabilities.test.ts +108 -0
  112. package/src/test-utils/capabilities.ts +93 -0
  113. package/src/test-utils/helpers.ts +2 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,111 @@
1
1
  # @ledgerhq/coin-module-framework
2
2
 
3
+ ## 8.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#826](https://github.com/LedgerHQ/coin-modules/pull/826) [`2ec4aa4`](https://github.com/LedgerHQ/coin-modules/commit/2ec4aa48b23168e3fb846928435c1f5110b8153e) Thanks [@cted-ledger](https://github.com/cted-ledger)! - Add `CoinModuleImpl` authoring type — modules may now declare only the methods they implement; optional capabilities (`getBlock`, `getBlockInfo`, `getStakes`, `getRewards`, `getValidators`, `call`, `craftRawTransaction`, `register`, `getNextSequence`, `validateIntent`, `validateAddress`, `getAccountInfo`) may be omitted. The consumer contract `CoinModuleApi` is unchanged.
8
+
9
+ The method sets are published as lists with their types derived from them — `optionalApiKeys` / `OptionalApiKey`, `requiredApiKeys` / `RequiredApiKey`, and `apiMethodKeys` / `ApiMethodKey` for the contract as a whole — so the types and any runtime iteration over them share one source. A compile-time guard holds `apiMethodKeys` to the contract: a method added to `CoinModuleApi` without being listed fails to compile, so nothing that iterates the list can silently skip it.
10
+
11
+ - [#826](https://github.com/LedgerHQ/coin-modules/pull/826) [`2ec4aa4`](https://github.com/LedgerHQ/coin-modules/commit/2ec4aa48b23168e3fb846928435c1f5110b8153e) Thanks [@cted-ledger](https://github.com/cted-ledger)! - Add `withDefaults()` framework adapter: widens a `CoinModuleImpl` authoring value to the
12
+ full `CoinModuleApi` consumer contract by backfilling every omitted capability method with
13
+ a default, and exposes a `supports(method)` introspection helper.
14
+
15
+ The default depends on the method: `getAccountInfo` is backfilled with a `{ type: 'none' }`
16
+ sentinel, because a chain having no extra account metadata is an answer rather than a missing
17
+ capability (ADR-045); every other capability is backfilled with `notSupported(name)`, which
18
+ throws `"<name> is not supported"`. Since the sentinel is always supplied, the returned type
19
+ narrows `getAccountInfo` to required — callers reach it without a non-null assertion and read its
20
+ `type` to tell a real answer from the sentinel.
21
+
22
+ Members the authoring object carries beyond the API surface are preserved, in the returned
23
+ **type** as well as at runtime. Consumers that hand out an intersection — Ledger Live's resolve
24
+ point returns `CoinModuleApi & BridgeApi` — therefore keep the non-API half without a cast.
25
+
26
+ `notSupported()` now tags the stub it builds, and the new `isNotSupportedStub()` predicate
27
+ exposes that check. `withDefaults` treats a tagged stub as an omitted method, so
28
+ `supports()` reports a capability as available only when a real implementation was
29
+ supplied — a module that still fills the slot with `notSupported()` is reported as
30
+ unsupported. Behavior is unchanged in both cases (the same "not supported" error is
31
+ thrown). Only stubs built by `notSupported()` are detectable; an inline hand-rolled
32
+ `throw` cannot be told apart from an implementation.
33
+
34
+ - [#826](https://github.com/LedgerHQ/coin-modules/pull/826) [`2ec4aa4`](https://github.com/LedgerHQ/coin-modules/commit/2ec4aa48b23168e3fb846928435c1f5110b8153e) Thanks [@cted-ledger](https://github.com/cted-ledger)! - Add `capabilityReport()` to `@ledgerhq/coin-module-framework/test-utils`: a module's
35
+ unimplemented capabilities, as a consumer sees them through `withDefaults`, returned as data
36
+ for a single expectation.
37
+
38
+ ```ts
39
+ await expect(capabilityReport(createApi(), context)).resolves.toEqual({
40
+ unsupported: [
41
+ "call",
42
+ "craftRawTransaction",
43
+ "getRewards",
44
+ "getValidators",
45
+ "register",
46
+ ],
47
+ inconsistent: [],
48
+ });
49
+ ```
50
+
51
+ That one expectation covers what a module's api test used to spell out method by method: each
52
+ capability is absent, reaching it raises `"<name> is not supported"`, and `supports()` agrees.
53
+ `toEqual` makes it exhaustive — implementing a capability, or dropping one, changes the list, so
54
+ the test notices instead of silently still passing.
55
+
56
+ It reads a module authored either way: a `CoinModuleImpl` that omits its capabilities, or a
57
+ value built by spreading `notSupportedApi()`. Both are "not implemented" as far as `supports()`
58
+ is concerned, which is what this observes.
59
+
60
+ Only the capabilities `supports()` reports absent are ever invoked, so a real implementation is
61
+ never called and the report never reaches the network. `getAccountInfo` is excluded: per ADR-045
62
+ its default is the `{ type: "none" }` sentinel rather than an error. `inconsistent` is a canary —
63
+ it fills only if a capability reported absent does not raise its error, so it is expected empty.
64
+
65
+ The helper carries no assertion library: it returns data and the caller asserts.
66
+
67
+ - [#826](https://github.com/LedgerHQ/coin-modules/pull/826) [`2ec4aa4`](https://github.com/LedgerHQ/coin-modules/commit/2ec4aa48b23168e3fb846928435c1f5110b8153e) Thanks [@cted-ledger](https://github.com/cted-ledger)! - Add `withLogging()` and `withTracing()` composable wrappers: each takes a `CoinModuleApi`
68
+ and returns a `CoinModuleApi` with identical generics, applying cross-cutting instrumentation
69
+ (logging via `context.logger`, or tracing via a caller-supplied `Tracer`) at the consumer
70
+ layer. Composition `withLogging(withTracing(api, t))` is supported. Also exports
71
+ `instrumentApi` for building additional wrappers.
72
+
73
+ They live in their own `api/wrappers/` folder, separate from the core framework, and are
74
+ re-exported from `api/index` — a consumer that wants no instrumentation never reaches them.
75
+
76
+ `instrumentApi` wraps the contract's own method list (`apiMethodKeys`) eagerly, without a
77
+ Proxy or reflection: what gets instrumented is readable from the source, each method is
78
+ wrapped and bound once so nothing is allocated on the call path, and reading the same method
79
+ twice yields the same reference — a method stays usable as a dependency key.
80
+
81
+ Both wrappers preserve members the wrapped object carries beyond the API surface, in the
82
+ returned **type** as well as at runtime, so wrapping a `CoinModuleApi & BridgeApi` keeps the
83
+ non-API half reachable without a cast. Those extra members are copied over uninstrumented:
84
+ the wrapper reaches only what the contract declares.
85
+
86
+ - [#826](https://github.com/LedgerHQ/coin-modules/pull/826) [`2ec4aa4`](https://github.com/LedgerHQ/coin-modules/commit/2ec4aa48b23168e3fb846928435c1f5110b8153e) Thanks [@cted-ledger](https://github.com/cted-ledger)! - Add `notSupportedApi()`: a full `CoinModuleApi` whose every capability is a tagged
87
+ "not supported" stub. A module can spread it and override what its chain supports, so it
88
+ satisfies the complete contract directly instead of declaring a `CoinModuleImpl` and being
89
+ widened by `withDefaults`.
90
+
91
+ The two authoring styles interoperate rather than compete. Because the stubs are tagged,
92
+ a value built this way still reports the truth through `withDefaults`'s `supports()` — a
93
+ spread stub counts as an omitted method, not as an implementation — so a module may be
94
+ authored either way and reports the same capabilities to a consumer.
95
+
96
+ It is also what a module can use when it does not implement everything the authoring type
97
+ requires: a read-only module, or a chain with no crafting path. `getAccountInfo` resolves
98
+ the ADR-045 `{ type: 'none' }` sentinel rather than throwing, and `listFeeOptions` is left
99
+ absent, both matching `withDefaults`.
100
+
101
+ ## 8.1.0
102
+
103
+ ### Minor Changes
104
+
105
+ - [#810](https://github.com/LedgerHQ/coin-modules/pull/810) [`1517f0d`](https://github.com/LedgerHQ/coin-modules/commit/1517f0dda03d4714cb31ac5315a6ea387a84bd51) Thanks [@shazzzam](https://github.com/shazzzam)! - Extend `FeeEstimation` with optional `originalValue` and `savings` fields.
106
+
107
+ `originalValue` holds the standard on-chain burn cost when an alternative fee option (e.g. Tronify energy rental) was priced; `savings` is the non-negative difference — clamped to `0n` when the alternative costs more than the standard burn. Both fields are optional and backwards-compatible — existing `estimateFees` implementations that return `{ value }` are unaffected.
108
+
3
109
  ## 8.0.0
4
110
 
5
111
  ### Major Changes
@@ -0,0 +1,74 @@
1
+ import type { CurrencyConfig } from '../config';
2
+ import type { CoinModuleApi, Memo, MemoNotSupported, TxData, TxDataNotSupported } from './types';
3
+ /**
4
+ * Methods a CoinModuleImpl author may omit when the chain does not support them.
5
+ * The framework's `withDefaults` fills the gaps before the consumer receives the
6
+ * object as a full {@link CoinModuleApi}.
7
+ *
8
+ * Block — getBlock, getBlockInfo (many chains throw "not supported")
9
+ * Staking — getStakes, getRewards, (à la carte; a module may ship getStakes
10
+ * getValidators without getValidators)
11
+ * SmartContract— call (optional escape-hatch)
12
+ * RawCrafting — craftRawTransaction (not all chains accept externally-built txs)
13
+ * Enrollment — register (optional indexer backend)
14
+ * Sequence — getNextSequence (some chains have no sequence/nonce concept)
15
+ * Validation — validateIntent, (some chains cannot fully validate intents
16
+ * validateAddress or addresses without a network round-trip)
17
+ * AccountInfo — getAccountInfo (chain-specific account metadata; absent means
18
+ * "nothing to report", not "unsupported")
19
+ */
20
+ export declare const optionalApiKeys: readonly ["getBlock", "getBlockInfo", "getStakes", "getRewards", "getValidators", "call", "craftRawTransaction", "register", "getNextSequence", "validateIntent", "validateAddress", "getAccountInfo"];
21
+ /**
22
+ * A method name that a {@link CoinModuleImpl} author may omit.
23
+ *
24
+ * Derived from {@link optionalApiKeys} so the type and the runtime list used by
25
+ * `withDefaults` cannot drift apart.
26
+ */
27
+ export type OptionalApiKey = (typeof optionalApiKeys)[number];
28
+ /**
29
+ * Methods every {@link CoinModuleImpl} author must implement: the minimum a chain has to
30
+ * expose for the module to be usable at all. Complement of {@link optionalApiKeys}.
31
+ */
32
+ export declare const requiredApiKeys: readonly ["lastBlock", "getBalance", "listOperations", "craftTransaction", "estimateFees", "combine", "broadcast", "craftTransactionData"];
33
+ /** A method name a {@link CoinModuleImpl} author must implement. */
34
+ export type RequiredApiKey = (typeof requiredApiKeys)[number];
35
+ /**
36
+ * Every method the {@link CoinModuleApi} contract declares.
37
+ *
38
+ * Wrappers iterate this list to instrument an API without reflecting over the object at
39
+ * runtime, so what they touch is fixed and readable rather than "whatever is a function".
40
+ * `listFeeOptions` is neither required nor omittable — the contract itself declares it
41
+ * optional and `withDefaults` does not backfill it — hence its place here and nowhere else.
42
+ */
43
+ export declare const apiMethodKeys: readonly ["lastBlock", "getBalance", "listOperations", "craftTransaction", "estimateFees", "combine", "broadcast", "craftTransactionData", "getBlock", "getBlockInfo", "getStakes", "getRewards", "getValidators", "call", "craftRawTransaction", "register", "getNextSequence", "validateIntent", "validateAddress", "getAccountInfo", "listFeeOptions"];
44
+ /** A method name declared by the {@link CoinModuleApi} contract. */
45
+ export type ApiMethodKey = (typeof apiMethodKeys)[number];
46
+ /**
47
+ * Compile-time guard: {@link apiMethodKeys} must name every method of the contract.
48
+ *
49
+ * Add a method to {@link CoinModuleApi} without listing it and `Unlisted` stops being
50
+ * `never`, which this alias rejects — so a wrapper can never silently skip a new method.
51
+ */
52
+ type AssertNever<T extends never> = T;
53
+ export type ApiMethodKeysAreExhaustive = AssertNever<Exclude<keyof CoinModuleApi<CurrencyConfig>, ApiMethodKey>>;
54
+ /**
55
+ * Authoring type for a coin-module implementation.
56
+ *
57
+ * Declare your module's `createApi` return type as `CoinModuleImpl<…>` instead of
58
+ * `CoinModuleApi<…>`. Any method in the optional set (see source) may be omitted;
59
+ * the framework's `withDefaults` wrapper will supply the "not supported" stub before
60
+ * handing the object to consumers.
61
+ *
62
+ * The consumer/full contract ({@link CoinModuleApi}) is structurally unchanged —
63
+ * it remains the required type at every call site.
64
+ *
65
+ * Generic parameters are identical to {@link CoinModuleApi}:
66
+ * - `ConfigType` — the coin-specific config shape
67
+ * - `MemoType` — memo variant (defaults to {@link MemoNotSupported})
68
+ * - `TxDataType` — transaction data variant (defaults to {@link TxDataNotSupported})
69
+ *
70
+ * @see CoinModuleApi — the full consumer/runtime contract (unchanged)
71
+ */
72
+ export type CoinModuleImpl<ConfigType extends CurrencyConfig, MemoType extends Memo = MemoNotSupported, TxDataType extends TxData = TxDataNotSupported> = Omit<CoinModuleApi<ConfigType, MemoType, TxDataType>, OptionalApiKey> & Partial<Pick<CoinModuleApi<ConfigType, MemoType, TxDataType>, OptionalApiKey>>;
73
+ export {};
74
+ //# sourceMappingURL=impl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"impl.d.ts","sourceRoot":"","sources":["../../src/api/impl.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAEhG;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,eAAe,wMAalB,CAAA;AAEV;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAA;AAE7D;;;GAGG;AACH,eAAO,MAAM,eAAe,4IASlB,CAAA;AAEV,oEAAoE;AACpE,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAA;AAE7D;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,2VAAsE,CAAA;AAEhG,oEAAoE;AACpE,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAA;AAEzD;;;;;GAKG;AACH,KAAK,WAAW,CAAC,CAAC,SAAS,KAAK,IAAI,CAAC,CAAA;AACrC,MAAM,MAAM,0BAA0B,GAAG,WAAW,CAClD,OAAO,CAAC,MAAM,aAAa,CAAC,cAAc,CAAC,EAAE,YAAY,CAAC,CAC3D,CAAA;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,cAAc,CACxB,UAAU,SAAS,cAAc,EACjC,QAAQ,SAAS,IAAI,GAAG,gBAAgB,EACxC,UAAU,SAAS,MAAM,GAAG,kBAAkB,IAC5C,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,QAAQ,EAAE,UAAU,CAAC,EAAE,cAAc,CAAC,GACvE,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,QAAQ,EAAE,UAAU,CAAC,EAAE,cAAc,CAAC,CAAC,CAAA"}
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ // SPDX-FileCopyrightText: © 2024 LEDGER SAS
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.apiMethodKeys = exports.requiredApiKeys = exports.optionalApiKeys = void 0;
6
+ /**
7
+ * Methods a CoinModuleImpl author may omit when the chain does not support them.
8
+ * The framework's `withDefaults` fills the gaps before the consumer receives the
9
+ * object as a full {@link CoinModuleApi}.
10
+ *
11
+ * Block — getBlock, getBlockInfo (many chains throw "not supported")
12
+ * Staking — getStakes, getRewards, (à la carte; a module may ship getStakes
13
+ * getValidators without getValidators)
14
+ * SmartContract— call (optional escape-hatch)
15
+ * RawCrafting — craftRawTransaction (not all chains accept externally-built txs)
16
+ * Enrollment — register (optional indexer backend)
17
+ * Sequence — getNextSequence (some chains have no sequence/nonce concept)
18
+ * Validation — validateIntent, (some chains cannot fully validate intents
19
+ * validateAddress or addresses without a network round-trip)
20
+ * AccountInfo — getAccountInfo (chain-specific account metadata; absent means
21
+ * "nothing to report", not "unsupported")
22
+ */
23
+ exports.optionalApiKeys = [
24
+ 'getBlock',
25
+ 'getBlockInfo',
26
+ 'getStakes',
27
+ 'getRewards',
28
+ 'getValidators',
29
+ 'call',
30
+ 'craftRawTransaction',
31
+ 'register',
32
+ 'getNextSequence',
33
+ 'validateIntent',
34
+ 'validateAddress',
35
+ 'getAccountInfo',
36
+ ];
37
+ /**
38
+ * Methods every {@link CoinModuleImpl} author must implement: the minimum a chain has to
39
+ * expose for the module to be usable at all. Complement of {@link optionalApiKeys}.
40
+ */
41
+ exports.requiredApiKeys = [
42
+ 'lastBlock',
43
+ 'getBalance',
44
+ 'listOperations',
45
+ 'craftTransaction',
46
+ 'estimateFees',
47
+ 'combine',
48
+ 'broadcast',
49
+ 'craftTransactionData',
50
+ ];
51
+ /**
52
+ * Every method the {@link CoinModuleApi} contract declares.
53
+ *
54
+ * Wrappers iterate this list to instrument an API without reflecting over the object at
55
+ * runtime, so what they touch is fixed and readable rather than "whatever is a function".
56
+ * `listFeeOptions` is neither required nor omittable — the contract itself declares it
57
+ * optional and `withDefaults` does not backfill it — hence its place here and nowhere else.
58
+ */
59
+ exports.apiMethodKeys = [...exports.requiredApiKeys, ...exports.optionalApiKeys, 'listFeeOptions'];
60
+ //# sourceMappingURL=impl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"impl.js","sourceRoot":"","sources":["../../src/api/impl.ts"],"names":[],"mappings":";AAAA,4CAA4C;AAC5C,sCAAsC;;;AAKtC;;;;;;;;;;;;;;;;GAgBG;AACU,QAAA,eAAe,GAAG;IAC7B,UAAU;IACV,cAAc;IACd,WAAW;IACX,YAAY;IACZ,eAAe;IACf,MAAM;IACN,qBAAqB;IACrB,UAAU;IACV,iBAAiB;IACjB,gBAAgB;IAChB,iBAAiB;IACjB,gBAAgB;CACR,CAAA;AAUV;;;GAGG;AACU,QAAA,eAAe,GAAG;IAC7B,WAAW;IACX,YAAY;IACZ,gBAAgB;IAChB,kBAAkB;IAClB,cAAc;IACd,SAAS;IACT,WAAW;IACX,sBAAsB;CACd,CAAA;AAKV;;;;;;;GAOG;AACU,QAAA,aAAa,GAAG,CAAC,GAAG,uBAAe,EAAE,GAAG,uBAAe,EAAE,gBAAgB,CAAU,CAAA"}
@@ -4,5 +4,9 @@
4
4
  */
5
5
  export * from './errors';
6
6
  export * from './notSupported';
7
+ export * from './notSupportedApi';
7
8
  export * from './types';
9
+ export * from './impl';
10
+ export * from './withDefaults';
11
+ export * from './wrappers/index';
8
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAGA;;;GAGG;AAEH,cAAc,UAAU,CAAA;AACxB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,SAAS,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAGA;;;GAGG;AAEH,cAAc,UAAU,CAAA;AACxB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA;AACjC,cAAc,SAAS,CAAA;AACvB,cAAc,QAAQ,CAAA;AACtB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA"}
package/lib/api/index.js CHANGED
@@ -22,5 +22,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
22
22
  */
23
23
  __exportStar(require("./errors"), exports);
24
24
  __exportStar(require("./notSupported"), exports);
25
+ __exportStar(require("./notSupportedApi"), exports);
25
26
  __exportStar(require("./types"), exports);
27
+ __exportStar(require("./impl"), exports);
28
+ __exportStar(require("./withDefaults"), exports);
29
+ __exportStar(require("./wrappers/index"), exports);
26
30
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":";AAAA,4CAA4C;AAC5C,sCAAsC;;;;;;;;;;;;;;;;AAEtC;;;GAGG;AAEH,2CAAwB;AACxB,iDAA8B;AAC9B,0CAAuB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":";AAAA,4CAA4C;AAC5C,sCAAsC;;;;;;;;;;;;;;;;AAEtC;;;GAGG;AAEH,2CAAwB;AACxB,iDAA8B;AAC9B,oDAAiC;AACjC,0CAAuB;AACvB,yCAAsB;AACtB,iDAA8B;AAC9B,mDAAgC"}
@@ -2,8 +2,22 @@
2
2
  * Build a {@link CoinModuleApi} method stub that always throws a standardized
3
3
  * "not supported" error. Use it for optional API methods a module does not implement.
4
4
  *
5
+ * The returned function is tagged so the framework can tell it apart from a real
6
+ * implementation — see {@link isNotSupportedStub}.
7
+ *
5
8
  * @param name the API method name, used in the error message
6
9
  * @returns a function that throws `"<name> is not supported"` when invoked
7
10
  */
8
11
  export declare const notSupported: (name: string) => () => never;
12
+ /**
13
+ * Tells whether a value is a stub produced by {@link notSupported}, i.e. a placeholder
14
+ * rather than a real implementation.
15
+ *
16
+ * **Limitation** — only stubs built by {@link notSupported} are detectable. A module that
17
+ * hand-rolls `() => { throw new Error('x is not supported') }` inline is indistinguishable
18
+ * from a real implementation, because whether a function throws cannot be known without
19
+ * calling it. Modules should therefore either omit an unsupported method entirely (the
20
+ * migrated shape) or build its stub with {@link notSupported}.
21
+ */
22
+ export declare function isNotSupportedStub(value: unknown): boolean;
9
23
  //# sourceMappingURL=notSupported.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"notSupported.d.ts","sourceRoot":"","sources":["../../src/api/notSupported.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,WAAS,KAEjD,CAAA"}
1
+ {"version":3,"file":"notSupported.d.ts","sourceRoot":"","sources":["../../src/api/notSupported.ts"],"names":[],"mappings":"AAYA;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,WACtB,KAKlB,CAAA;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAE1D"}
@@ -3,15 +3,44 @@
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.notSupported = void 0;
6
+ exports.isNotSupportedStub = isNotSupportedStub;
7
+ /**
8
+ * Marks a function as a framework-built "not supported" stub.
9
+ *
10
+ * `Symbol.for` (the global registry) is used deliberately: in a monorepo the framework
11
+ * may be present as more than one physical module instance, and a locally-scoped symbol
12
+ * would not match across them.
13
+ */
14
+ const NOT_SUPPORTED_STUB = Symbol.for('@ledgerhq/coin-module-framework:notSupportedStub');
6
15
  /**
7
16
  * Build a {@link CoinModuleApi} method stub that always throws a standardized
8
17
  * "not supported" error. Use it for optional API methods a module does not implement.
9
18
  *
19
+ * The returned function is tagged so the framework can tell it apart from a real
20
+ * implementation — see {@link isNotSupportedStub}.
21
+ *
10
22
  * @param name the API method name, used in the error message
11
23
  * @returns a function that throws `"<name> is not supported"` when invoked
12
24
  */
13
- const notSupported = (name) => () => {
14
- throw new Error(`${name} is not supported`);
25
+ const notSupported = (name) => {
26
+ const stub = () => {
27
+ throw new Error(`${name} is not supported`);
28
+ };
29
+ Object.defineProperty(stub, NOT_SUPPORTED_STUB, { value: true, enumerable: false });
30
+ return stub;
15
31
  };
16
32
  exports.notSupported = notSupported;
33
+ /**
34
+ * Tells whether a value is a stub produced by {@link notSupported}, i.e. a placeholder
35
+ * rather than a real implementation.
36
+ *
37
+ * **Limitation** — only stubs built by {@link notSupported} are detectable. A module that
38
+ * hand-rolls `() => { throw new Error('x is not supported') }` inline is indistinguishable
39
+ * from a real implementation, because whether a function throws cannot be known without
40
+ * calling it. Modules should therefore either omit an unsupported method entirely (the
41
+ * migrated shape) or build its stub with {@link notSupported}.
42
+ */
43
+ function isNotSupportedStub(value) {
44
+ return typeof value === 'function' && NOT_SUPPORTED_STUB in value;
45
+ }
17
46
  //# sourceMappingURL=notSupported.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"notSupported.js","sourceRoot":"","sources":["../../src/api/notSupported.ts"],"names":[],"mappings":";AAAA,4CAA4C;AAC5C,sCAAsC;;;AAEtC;;;;;;GAMG;AACI,MAAM,YAAY,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,GAAU,EAAE;IACxD,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,mBAAmB,CAAC,CAAA;AAC7C,CAAC,CAAA;AAFY,QAAA,YAAY,gBAExB"}
1
+ {"version":3,"file":"notSupported.js","sourceRoot":"","sources":["../../src/api/notSupported.ts"],"names":[],"mappings":";AAAA,4CAA4C;AAC5C,sCAAsC;;;AAuCtC,gDAEC;AAvCD;;;;;;GAMG;AACH,MAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAAC,kDAAkD,CAAC,CAAA;AAEzF;;;;;;;;;GASG;AACI,MAAM,YAAY,GAAG,CAAC,IAAY,EAAE,EAAE;IAC3C,MAAM,IAAI,GAAG,GAAU,EAAE;QACvB,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,mBAAmB,CAAC,CAAA;IAC7C,CAAC,CAAA;IACD,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,kBAAkB,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,CAAA;IACnF,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AANY,QAAA,YAAY,gBAMxB;AAED;;;;;;;;;GASG;AACH,SAAgB,kBAAkB,CAAC,KAAc;IAC/C,OAAO,OAAO,KAAK,KAAK,UAAU,IAAI,kBAAkB,IAAI,KAAK,CAAA;AACnE,CAAC"}
@@ -0,0 +1,37 @@
1
+ import type { CurrencyConfig } from '../config';
2
+ import type { CoinModuleApi, Memo, MemoNotSupported, TxData, TxDataNotSupported } from './types';
3
+ /**
4
+ * A full {@link CoinModuleApi} whose every capability is a "not supported" stub.
5
+ *
6
+ * Spread it and override what the chain does support, for a module that would rather
7
+ * satisfy the complete contract directly than declare a `CoinModuleImpl` and be widened by
8
+ * `withDefaults`:
9
+ *
10
+ * ```ts
11
+ * export function createApi() {
12
+ * return {
13
+ * ...notSupportedApi<MyConfig>(),
14
+ * lastBlock, getBalance, listOperations,
15
+ * } satisfies CoinModuleApi<MyConfig>
16
+ * }
17
+ * ```
18
+ *
19
+ * The two styles interoperate rather than compete, because the stubs are tagged: a value
20
+ * built this way still tells the truth through `withDefaults`'s `supports()`, which treats a
21
+ * tagged stub as an omitted method rather than as an implementation. So a module may be
22
+ * authored either way, wrapped either way, and reports the same capabilities.
23
+ *
24
+ * It is also what a module can use when it does not implement everything the authoring type
25
+ * requires — a read-only module, or a chain with no crafting path. The contract is satisfied
26
+ * statically, and what the chain does not do stays visible at the definition site.
27
+ *
28
+ * `getAccountInfo` is the one method that does not throw: per ADR-045 a chain carrying no
29
+ * extra account metadata is an answer, not a missing capability, so it resolves the
30
+ * `{ type: 'none' }` sentinel — the same default `withDefaults` supplies. `listFeeOptions` is
31
+ * left absent, likewise matching `withDefaults`.
32
+ *
33
+ * The return type is the contract itself, so a method added to `CoinModuleApi` makes this
34
+ * fail to compile until it is covered here.
35
+ */
36
+ export declare function notSupportedApi<ConfigType extends CurrencyConfig, MemoType extends Memo = MemoNotSupported, TxDataType extends TxData = TxDataNotSupported>(): CoinModuleApi<ConfigType, MemoType, TxDataType>;
37
+ //# sourceMappingURL=notSupportedApi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notSupportedApi.d.ts","sourceRoot":"","sources":["../../src/api/notSupportedApi.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAGhG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,eAAe,CAC7B,UAAU,SAAS,cAAc,EACjC,QAAQ,SAAS,IAAI,GAAG,gBAAgB,EACxC,UAAU,SAAS,MAAM,GAAG,kBAAkB,KAC3C,aAAa,CAAC,UAAU,EAAE,QAAQ,EAAE,UAAU,CAAC,CA6BnD"}
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ // SPDX-FileCopyrightText: © 2026 LEDGER SAS
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.notSupportedApi = notSupportedApi;
6
+ const notSupported_1 = require("./notSupported");
7
+ /**
8
+ * A full {@link CoinModuleApi} whose every capability is a "not supported" stub.
9
+ *
10
+ * Spread it and override what the chain does support, for a module that would rather
11
+ * satisfy the complete contract directly than declare a `CoinModuleImpl` and be widened by
12
+ * `withDefaults`:
13
+ *
14
+ * ```ts
15
+ * export function createApi() {
16
+ * return {
17
+ * ...notSupportedApi<MyConfig>(),
18
+ * lastBlock, getBalance, listOperations,
19
+ * } satisfies CoinModuleApi<MyConfig>
20
+ * }
21
+ * ```
22
+ *
23
+ * The two styles interoperate rather than compete, because the stubs are tagged: a value
24
+ * built this way still tells the truth through `withDefaults`'s `supports()`, which treats a
25
+ * tagged stub as an omitted method rather than as an implementation. So a module may be
26
+ * authored either way, wrapped either way, and reports the same capabilities.
27
+ *
28
+ * It is also what a module can use when it does not implement everything the authoring type
29
+ * requires — a read-only module, or a chain with no crafting path. The contract is satisfied
30
+ * statically, and what the chain does not do stays visible at the definition site.
31
+ *
32
+ * `getAccountInfo` is the one method that does not throw: per ADR-045 a chain carrying no
33
+ * extra account metadata is an answer, not a missing capability, so it resolves the
34
+ * `{ type: 'none' }` sentinel — the same default `withDefaults` supplies. `listFeeOptions` is
35
+ * left absent, likewise matching `withDefaults`.
36
+ *
37
+ * The return type is the contract itself, so a method added to `CoinModuleApi` makes this
38
+ * fail to compile until it is covered here.
39
+ */
40
+ function notSupportedApi() {
41
+ return {
42
+ // Required by the authoring type — a module spreading this one must override them to
43
+ // be functional at all; they are stubbed here so the contract is satisfied statically.
44
+ lastBlock: (0, notSupported_1.notSupported)('lastBlock'),
45
+ getBalance: (0, notSupported_1.notSupported)('getBalance'),
46
+ listOperations: (0, notSupported_1.notSupported)('listOperations'),
47
+ craftTransaction: (0, notSupported_1.notSupported)('craftTransaction'),
48
+ estimateFees: (0, notSupported_1.notSupported)('estimateFees'),
49
+ combine: (0, notSupported_1.notSupported)('combine'),
50
+ broadcast: (0, notSupported_1.notSupported)('broadcast'),
51
+ craftTransactionData: (0, notSupported_1.notSupported)('craftTransactionData'),
52
+ // Optional capabilities.
53
+ getBlock: (0, notSupported_1.notSupported)('getBlock'),
54
+ getBlockInfo: (0, notSupported_1.notSupported)('getBlockInfo'),
55
+ getStakes: (0, notSupported_1.notSupported)('getStakes'),
56
+ getRewards: (0, notSupported_1.notSupported)('getRewards'),
57
+ getValidators: (0, notSupported_1.notSupported)('getValidators'),
58
+ call: (0, notSupported_1.notSupported)('call'),
59
+ craftRawTransaction: (0, notSupported_1.notSupported)('craftRawTransaction'),
60
+ register: (0, notSupported_1.notSupported)('register'),
61
+ getNextSequence: (0, notSupported_1.notSupported)('getNextSequence'),
62
+ validateIntent: (0, notSupported_1.notSupported)('validateIntent'),
63
+ validateAddress: (0, notSupported_1.notSupported)('validateAddress'),
64
+ // Not a capability: absent metadata is an answer (ADR-045).
65
+ getAccountInfo: () => Promise.resolve({ type: 'none' }),
66
+ };
67
+ }
68
+ //# sourceMappingURL=notSupportedApi.js.map
@@ -0,0 +1 @@
1
+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C;QAEhD,4DAA4D;QAC5D,cAAc,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;KACxD,CAAA;AACH,CAAC"}
@@ -305,6 +305,10 @@ export type TransactionValidation = {
305
305
  };
306
306
  export type FeeEstimation = {
307
307
  value: bigint;
308
+ /** Standard burn cost for comparison display (present when an alternative fee option was priced). */
309
+ originalValue?: bigint;
310
+ /** max(0, originalValue - value); 0n when the alternative fee option costs more than the standard burn. */
311
+ savings?: bigint;
308
312
  parameters?: Record<string, unknown>;
309
313
  };
310
314
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/api/types.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAGxD,MAAM,MAAM,eAAe,GAAG;IAC5B,YAAY,EAAE,OAAO,CAAA;IACrB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,MAAM,CAAC,EAAE,iBAAiB,CAAA;CAC3B,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAE9B,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,aAAa,GAAG,MAAM,CAAA;IAElD,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,SAAS,GAAG;IACtB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IAIZ,IAAI,EAAE,IAAI,CAAA;IACV,MAAM,CAAC,EAAE,WAAW,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,EAAE,QAAQ,GAAG,MAAM,CAAC,CAAA;AAG5D,MAAM,MAAM,IAAI,GAAG;IAEjB,IAAI,EAAE,MAAM,CAAA;IAEZ,IAAI,EAAE,MAAM,CAAA;IAEZ,SAAS,EAAE,MAAM,CAAA;IAEjB,aAAa,CAAC,EAA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AC,UAAU,CAAC,EAC5B,iBAAiB,EAAE,iBAAiB,CAAC,QAAQ,EAAE,UAAU,CAAC,EAC1D,QAAQ,EAAE,OAAO,EAAE,EACnB,OAAO,CAAC,EAAE;QAAE,UAAU,CAAC,EAAE,aAAa,CAAA;KAAE,KACrC,OAAO,CAAC,qBAAqB,CAAC,CAAA;IAEnC;;;;;;OAMG;IACH,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;IAEnF;;;;;;;OAOG;IACH,eAAe,EAAE,CACf,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,EAC5B,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,OAAO,CAAC,mCAAmC,CAAC,KACrD,OAAO,CAAC,OAAO,CAAC,CAAA;IAErB;;;;;;;OAOG;IACH,oBAAoB,EAAE,CACpB,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,EAC5B,MAAM,EAAE,iBAAiB,CAAC,QAAQ,EAAE,UAAU,CAAC,KAC5C,UAAU,CAAA;CAChB,CAAA"}
@@ -0,0 +1,31 @@
1
+ import type { CurrencyConfig } from '../config';
2
+ import type { CoinModuleImpl, OptionalApiKey } from './impl';
3
+ import type { CoinModuleApi, Memo, MemoNotSupported, TxData, TxDataNotSupported } from './types';
4
+ /**
5
+ * What {@link withDefaults} returns: the full consumer contract, plus `supports()`.
6
+ *
7
+ * `getAccountInfo` is narrowed to required. It is the one managed capability that
8
+ * {@link CoinModuleApi} itself declares optional, and `withDefaults` always supplies it — so
9
+ * callers can invoke it without a non-null assertion, and read `type` to tell a real answer from
10
+ * the `{ type: 'none' }` sentinel.
11
+ */
12
+ export type WithDefaultsResult<ConfigType extends CurrencyConfig, MemoType extends Memo = MemoNotSupported, TxDataType extends TxData = TxDataNotSupported> = CoinModuleApi<ConfigType, MemoType, TxDataType> & Required<Pick<CoinModuleApi<ConfigType, MemoType, TxDataType>, 'getAccountInfo'>> & {
13
+ supports: (method: OptionalApiKey) => boolean;
14
+ };
15
+ /**
16
+ * Widens a {@link CoinModuleImpl} authoring value to the full {@link CoinModuleApi}
17
+ * consumer contract by backfilling the capability methods the author omitted, and attaches
18
+ * a `supports()` introspection helper.
19
+ *
20
+ * Default per omitted method:
21
+ * - `getAccountInfo` → a `{ type: 'none' }` sentinel (ADR-045): having no extra account
22
+ * metadata is an answer, so callers get one instead of an exception.
23
+ * - every other capability → `notSupported(name)`, which throws `"<name> is not supported"`.
24
+ *
25
+ * Properties the authoring object carries beyond the API surface are preserved.
26
+ *
27
+ * A capability method is considered implemented only when the author supplied a real
28
+ * function — a `notSupported()` stub is treated as if the method had been omitted.
29
+ */
30
+ export declare function withDefaults<ConfigType extends CurrencyConfig, MemoType extends Memo = MemoNotSupported, TxDataType extends TxData = TxDataNotSupported, Extra extends object = Record<never, never>>(impl: CoinModuleImpl<ConfigType, MemoType, TxDataType> & Extra): WithDefaultsResult<ConfigType, MemoType, TxDataType> & Extra;
31
+ //# sourceMappingURL=withDefaults.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"withDefaults.d.ts","sourceRoot":"","sources":["../../src/api/withDefaults.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAA;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAIhG;;;;;;;GAOG;AACH,MAAM,MAAM,kBAAkB,CAC5B,UAAU,SAAS,cAAc,EACjC,QAAQ,SAAS,IAAI,GAAG,gBAAgB,EACxC,UAAU,SAAS,MAAM,GAAG,kBAAkB,IAC5C,aAAa,CAAC,UAAU,EAAE,QAAQ,EAAE,UAAU,CAAC,GACjD,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,QAAQ,EAAE,UAAU,CAAC,EAAE,gBAAgB,CAAC,CAAC,GAAG;IAClF,QAAQ,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,OAAO,CAAA;CAC9C,CAAA;AAaH;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,YAAY,CAC1B,UAAU,SAAS,cAAc,EACjC,QAAQ,SAAS,IAAI,GAAG,gBAAgB,EACxC,UAAU,SAAS,MAAM,GAAG,kBAAkB,EAC9C,KAAK,SAAS,MAAM,GAAG,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,EAE3C,IAAI,EAAE,cAAc,CAAC,UAAU,EAAE,QAAQ,EAAE,UAAU,CAAC,GAAG,KAAK,GAC7D,kBAAkB,CAAC,UAAU,EAAE,QAAQ,EAAE,UAAU,CAAC,GAAG,KAAK,CA2B9D"}