@ledgerhq/coin-module-framework 5.0.0 → 7.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.
- package/CHANGELOG.md +29 -0
- package/lib/api/types.d.ts +59 -21
- package/lib/api/types.d.ts.map +1 -1
- package/lib/config.d.ts +21 -0
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js.map +1 -1
- package/lib-es/api/types.d.ts +59 -21
- package/lib-es/api/types.d.ts.map +1 -1
- package/lib-es/config.d.ts +21 -0
- package/lib-es/config.d.ts.map +1 -1
- package/lib-es/config.js.map +1 -1
- package/package.json +1 -1
- package/src/api/types.ts +80 -19
- package/src/config.ts +23 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# @ledgerhq/coin-module-framework
|
|
2
2
|
|
|
3
|
+
## 7.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#780](https://github.com/LedgerHQ/coin-modules/pull/780) [`2a4b35f`](https://github.com/LedgerHQ/coin-modules/commit/2a4b35fdb887cbe684f2e0862fd7123834b8718e) Thanks [@francois-guerin-ledger](https://github.com/francois-guerin-ledger)! - chore(framework): update `combine` method to take a signature list as parameter
|
|
8
|
+
|
|
9
|
+
## 6.0.0
|
|
10
|
+
|
|
11
|
+
### Major Changes
|
|
12
|
+
|
|
13
|
+
- [#770](https://github.com/LedgerHQ/coin-modules/pull/770) [`1367938`](https://github.com/LedgerHQ/coin-modules/commit/136793888c492f6bbb34cb0e90801268c55ef338) Thanks [@qperrot](https://github.com/qperrot)! - feat!: thread a mandatory `Context` (config + logger) through the coin module API (ADR-019)
|
|
14
|
+
|
|
15
|
+
Introduces `Context<T>` and `Logger` in `@ledgerhq/coin-module-framework/config`, where
|
|
16
|
+
`Context.config` is an async config accessor (`(currencyId?) => Promise<T>`). **Breaking changes:**
|
|
17
|
+
|
|
18
|
+
- Every `CoinModuleApi` method (including `getAccountInfo`) now takes a **mandatory `context` as its
|
|
19
|
+
first argument**, and all non-mandatory parameters are grouped into a single trailing `options`
|
|
20
|
+
object (e.g. `getBalance(context, address, options?)`, `craftTransaction(context, intent, { customFees })`,
|
|
21
|
+
`combine(context, tx, signature, { pubkey })`, `getStakes(context, address, { cursor })`).
|
|
22
|
+
- `CoinModuleApi` gains a **mandatory first type parameter `ConfigType`**
|
|
23
|
+
(`CoinModuleApi<ConfigType, MemoType?, TxDataType?>`).
|
|
24
|
+
- `createApi()` no longer takes a config argument; the caller builds the `Context` (config accessor
|
|
25
|
+
- logger) and passes it to each method.
|
|
26
|
+
|
|
27
|
+
Each coin module reads its coin config and logger from the provided context instead of the former
|
|
28
|
+
`getCoinConfig` singleton and the global `log`; internal layers receive the resolved config value
|
|
29
|
+
(not the context) unless they also need the logger. Providing the HTTP client through the context
|
|
30
|
+
remains out of scope.
|
|
31
|
+
|
|
3
32
|
## 5.0.0
|
|
4
33
|
|
|
5
34
|
### Major Changes
|
package/lib/api/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Context, CurrencyConfig } from '../config';
|
|
1
2
|
export type BroadcastConfig = {
|
|
2
3
|
mevProtected: boolean;
|
|
3
4
|
sponsored?: boolean;
|
|
@@ -406,7 +407,7 @@ export type BalanceOptions = {
|
|
|
406
407
|
export type CallParams = Record<string, unknown> | unknown[];
|
|
407
408
|
/** Result of {@link CoinModuleApi.call}. */
|
|
408
409
|
export type CallResult = unknown;
|
|
409
|
-
export type CoinModuleApi<MemoType extends Memo = MemoNotSupported, TxDataType extends TxData = TxDataNotSupported> = {
|
|
410
|
+
export type CoinModuleApi<ConfigType extends CurrencyConfig, MemoType extends Memo = MemoNotSupported, TxDataType extends TxData = TxDataNotSupported> = {
|
|
410
411
|
/**
|
|
411
412
|
* Get the latest block information from the network.
|
|
412
413
|
*
|
|
@@ -415,8 +416,9 @@ export type CoinModuleApi<MemoType extends Memo = MemoNotSupported, TxDataType e
|
|
|
415
416
|
* @returns the latest block metadata (height, hash, time)
|
|
416
417
|
* @see getBlockInfo
|
|
417
418
|
* @see getBlock
|
|
419
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
418
420
|
*/
|
|
419
|
-
lastBlock: () => Promise<BlockInfo>;
|
|
421
|
+
lastBlock: (context: Context<ConfigType>) => Promise<BlockInfo>;
|
|
420
422
|
/**
|
|
421
423
|
* Get block information for a specific block height.
|
|
422
424
|
*
|
|
@@ -428,8 +430,9 @@ export type CoinModuleApi<MemoType extends Memo = MemoNotSupported, TxDataType e
|
|
|
428
430
|
* @param height the block height to query
|
|
429
431
|
* @returns the block metadata (height, hash, time)
|
|
430
432
|
* @throws "not supported" if the blockchain does not support querying historical blocks
|
|
433
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
431
434
|
*/
|
|
432
|
-
getBlockInfo: (height: number) => Promise<BlockInfo>;
|
|
435
|
+
getBlockInfo: (context: Context<ConfigType>, height: number) => Promise<BlockInfo>;
|
|
433
436
|
/**
|
|
434
437
|
* Get a full block with all its transactions.
|
|
435
438
|
*
|
|
@@ -443,8 +446,9 @@ export type CoinModuleApi<MemoType extends Memo = MemoNotSupported, TxDataType e
|
|
|
443
446
|
* @param height the block height to query
|
|
444
447
|
* @returns the complete block with transactions
|
|
445
448
|
* @throws "not supported" if the blockchain does not support querying full blocks
|
|
449
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
446
450
|
*/
|
|
447
|
-
getBlock: (height: number) => Promise<Block>;
|
|
451
|
+
getBlock: (context: Context<ConfigType>, height: number) => Promise<Block>;
|
|
448
452
|
/**
|
|
449
453
|
* Perform a direct, read-only smart-contract call against the underlying node or indexer.
|
|
450
454
|
*
|
|
@@ -460,8 +464,9 @@ export type CoinModuleApi<MemoType extends Memo = MemoNotSupported, TxDataType e
|
|
|
460
464
|
* @param params opaque, network-defined parameters for the read-only call
|
|
461
465
|
* @returns the opaque, network-defined result
|
|
462
466
|
* @throws "not supported" if the network or implementation does not support contract calls
|
|
467
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
463
468
|
*/
|
|
464
|
-
call: (params: CallParams) => Promise<CallResult>;
|
|
469
|
+
call: (context: Context<ConfigType>, params: CallParams) => Promise<CallResult>;
|
|
465
470
|
/**
|
|
466
471
|
* Get the list of validators available on the network.
|
|
467
472
|
* @param cursor a pagination cursor to resume listing (the implementation must guarantee the cursor is not volatile,
|
|
@@ -469,8 +474,11 @@ export type CoinModuleApi<MemoType extends Memo = MemoNotSupported, TxDataType e
|
|
|
469
474
|
* a date or transaction hash).
|
|
470
475
|
* The concrete implementation may return all validators in a single page when the underlying SDK
|
|
471
476
|
* does not provide cursor-based pagination.
|
|
477
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
472
478
|
*/
|
|
473
|
-
getValidators: (
|
|
479
|
+
getValidators: (context: Context<ConfigType>, options?: {
|
|
480
|
+
cursor?: Cursor;
|
|
481
|
+
}) => Promise<Page<Validator>>;
|
|
474
482
|
/**
|
|
475
483
|
* Get the balance(s) for an address/account.
|
|
476
484
|
*
|
|
@@ -484,8 +492,9 @@ export type CoinModuleApi<MemoType extends Memo = MemoNotSupported, TxDataType e
|
|
|
484
492
|
* @returns an array of balances for all assets held by the address
|
|
485
493
|
* @see getStakes
|
|
486
494
|
* @see listOperations
|
|
495
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
487
496
|
*/
|
|
488
|
-
getBalance: (address: string, options?: BalanceOptions) => Promise<Balance[]>;
|
|
497
|
+
getBalance: (context: Context<ConfigType>, address: string, options?: BalanceOptions) => Promise<Balance[]>;
|
|
489
498
|
/**
|
|
490
499
|
* List operations for an address/account.
|
|
491
500
|
*
|
|
@@ -495,8 +504,9 @@ export type CoinModuleApi<MemoType extends Memo = MemoNotSupported, TxDataType e
|
|
|
495
504
|
* @param options see {@link ListOperationsOptions}
|
|
496
505
|
* @returns a page of operations
|
|
497
506
|
* @see getBalance
|
|
507
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
498
508
|
*/
|
|
499
|
-
listOperations: (address: string, options: ListOperationsOptions) => Promise<Page<Operation>>;
|
|
509
|
+
listOperations: (context: Context<ConfigType>, address: string, options: ListOperationsOptions) => Promise<Page<Operation>>;
|
|
500
510
|
/**
|
|
501
511
|
* Get staking positions owned by an address/account.
|
|
502
512
|
*
|
|
@@ -514,8 +524,11 @@ export type CoinModuleApi<MemoType extends Memo = MemoNotSupported, TxDataType e
|
|
|
514
524
|
* a date or transaction hash)
|
|
515
525
|
* @see getBalance
|
|
516
526
|
* @see getRewards
|
|
527
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
517
528
|
*/
|
|
518
|
-
getStakes: (address: string,
|
|
529
|
+
getStakes: (context: Context<ConfigType>, address: string, options?: {
|
|
530
|
+
cursor?: Cursor;
|
|
531
|
+
}) => Promise<Page<Stake>>;
|
|
519
532
|
/**
|
|
520
533
|
* Get staking reward distribution events since address/account inception.
|
|
521
534
|
*
|
|
@@ -538,8 +551,11 @@ export type CoinModuleApi<MemoType extends Memo = MemoNotSupported, TxDataType e
|
|
|
538
551
|
* a date or transaction hash)
|
|
539
552
|
* @see getBalance
|
|
540
553
|
* @see getStakes
|
|
554
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
541
555
|
*/
|
|
542
|
-
getRewards: (address: string,
|
|
556
|
+
getRewards: (context: Context<ConfigType>, address: string, options?: {
|
|
557
|
+
cursor?: Cursor;
|
|
558
|
+
}) => Promise<Page<Reward>>;
|
|
543
559
|
/**
|
|
544
560
|
* Get network-specific account metadata not covered by {@link getBalance}, {@link getStakes} or
|
|
545
561
|
* {@link listOperations} (for example, Tron bandwidth/energy).
|
|
@@ -550,8 +566,9 @@ export type CoinModuleApi<MemoType extends Memo = MemoNotSupported, TxDataType e
|
|
|
550
566
|
* @param address the account address
|
|
551
567
|
* @returns the network-specific account metadata (see {@link AccountInfo})
|
|
552
568
|
* @see getBalance
|
|
569
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
553
570
|
*/
|
|
554
|
-
getAccountInfo?: (address: string) => Promise<AccountInfo>;
|
|
571
|
+
getAccountInfo?: (context: Context<ConfigType>, address: string) => Promise<AccountInfo>;
|
|
555
572
|
/**
|
|
556
573
|
* Craft an unsigned transaction from a transaction intent.
|
|
557
574
|
*
|
|
@@ -562,8 +579,11 @@ export type CoinModuleApi<MemoType extends Memo = MemoNotSupported, TxDataType e
|
|
|
562
579
|
* @param customFees optional custom fees to use instead of the default estimation
|
|
563
580
|
* @returns the crafted transaction with optional blockchain-specific details
|
|
564
581
|
* @see craftRawTransaction
|
|
582
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
565
583
|
*/
|
|
566
|
-
craftTransaction: (transactionIntent: TransactionIntent<MemoType, TxDataType>,
|
|
584
|
+
craftTransaction: (context: Context<ConfigType>, transactionIntent: TransactionIntent<MemoType, TxDataType>, options?: {
|
|
585
|
+
customFees?: FeeEstimation;
|
|
586
|
+
}) => Promise<CraftedTransaction>;
|
|
567
587
|
/**
|
|
568
588
|
* Craft an unsigned transaction from a raw/pre-built transaction.
|
|
569
589
|
*
|
|
@@ -577,8 +597,9 @@ export type CoinModuleApi<MemoType extends Memo = MemoNotSupported, TxDataType e
|
|
|
577
597
|
* @returns the crafted transaction ready for signing
|
|
578
598
|
* @throws "not supported" if the blockchain does not support raw transaction crafting
|
|
579
599
|
* @see craftTransaction
|
|
600
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
580
601
|
*/
|
|
581
|
-
craftRawTransaction: (transaction: string, sender: string, publicKey: string, sequence: bigint) => Promise<CraftedTransaction>;
|
|
602
|
+
craftRawTransaction: (context: Context<ConfigType>, transaction: string, sender: string, publicKey: string, sequence: bigint) => Promise<CraftedTransaction>;
|
|
582
603
|
/**
|
|
583
604
|
* Estimate the fees for a transaction intent.
|
|
584
605
|
*
|
|
@@ -589,8 +610,12 @@ export type CoinModuleApi<MemoType extends Memo = MemoNotSupported, TxDataType e
|
|
|
589
610
|
* (e.g., gas limit, priority fee)
|
|
590
611
|
* @param options optional selection inputs; see {@link EstimateFeesOptions}
|
|
591
612
|
* @returns the estimated fees and optional parameters that can be passed to {@link craftTransaction}
|
|
613
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
592
614
|
*/
|
|
593
|
-
estimateFees: (transactionIntent: TransactionIntent<MemoType, TxDataType>,
|
|
615
|
+
estimateFees: (context: Context<ConfigType>, transactionIntent: TransactionIntent<MemoType, TxDataType>, options?: {
|
|
616
|
+
customFeesParameters?: FeeEstimation['parameters'];
|
|
617
|
+
feeOption?: EstimateFeesOptions;
|
|
618
|
+
}) => Promise<FeeEstimation>;
|
|
594
619
|
/**
|
|
595
620
|
* List the fee-payment options available for a transaction intent — a lightweight availability check
|
|
596
621
|
* (metadata only, no amounts). Price one by passing its `id` as `options.feeOptionId` to
|
|
@@ -607,11 +632,15 @@ export type CoinModuleApi<MemoType extends Memo = MemoNotSupported, TxDataType e
|
|
|
607
632
|
* Combine a crafted transaction with a signature to produce a signed transaction ready for broadcast.
|
|
608
633
|
*
|
|
609
634
|
* @param tx the unsigned/crafted transaction (as returned by {@link craftTransaction})
|
|
610
|
-
* @param signature
|
|
635
|
+
* @param signature ordered list of signatures produced by the hardware wallet — root intent first,
|
|
636
|
+
* nested calls after. Single-signature blockchains must throw if `signature.length !== 1`.
|
|
611
637
|
* @param pubkey the public key used to sign (required for some blockchains to verify/embed in the transaction)
|
|
612
638
|
* @returns the signed transaction ready for {@link broadcast}
|
|
639
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
613
640
|
*/
|
|
614
|
-
combine: (tx: string, signature: string,
|
|
641
|
+
combine: (context: Context<ConfigType>, tx: string, signature: string[], options?: {
|
|
642
|
+
pubkey?: string;
|
|
643
|
+
}) => string | Promise<string>;
|
|
615
644
|
/**
|
|
616
645
|
* Broadcast a signed transaction to the network.
|
|
617
646
|
*
|
|
@@ -619,8 +648,11 @@ export type CoinModuleApi<MemoType extends Memo = MemoNotSupported, TxDataType e
|
|
|
619
648
|
* @param broadcastConfig optional configuration for the broadcast (e.g., retry settings)
|
|
620
649
|
* @returns the transaction hash/digest once successfully submitted to the network
|
|
621
650
|
* @throws if the transaction is rejected by the network (e.g., invalid signature, insufficient funds)
|
|
651
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
622
652
|
*/
|
|
623
|
-
broadcast: (tx: string,
|
|
653
|
+
broadcast: (context: Context<ConfigType>, tx: string, options?: {
|
|
654
|
+
broadcastConfig?: BroadcastConfig;
|
|
655
|
+
}) => Promise<string>;
|
|
624
656
|
/**
|
|
625
657
|
* Validate a transaction intent.
|
|
626
658
|
*
|
|
@@ -628,31 +660,37 @@ export type CoinModuleApi<MemoType extends Memo = MemoNotSupported, TxDataType e
|
|
|
628
660
|
* @param balances current balances of the intent sender
|
|
629
661
|
* @param customFees optional custom fees to use instead of the default estimation
|
|
630
662
|
* @returns additional values the intent has been validated with, and optional errors/warnings
|
|
663
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
631
664
|
*/
|
|
632
|
-
validateIntent: (transactionIntent: TransactionIntent<MemoType, TxDataType>, balances: Balance[],
|
|
665
|
+
validateIntent: (context: Context<ConfigType>, transactionIntent: TransactionIntent<MemoType, TxDataType>, balances: Balance[], options?: {
|
|
666
|
+
customFees?: FeeEstimation;
|
|
667
|
+
}) => Promise<TransactionValidation>;
|
|
633
668
|
/**
|
|
634
669
|
* Get the next sequence number (nonce) for an address
|
|
635
670
|
*
|
|
636
671
|
* @param address the account address
|
|
637
672
|
* @returns the next usable sequence number
|
|
673
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
638
674
|
*/
|
|
639
|
-
getNextSequence: (address: string) => Promise<bigint>;
|
|
675
|
+
getNextSequence: (context: Context<ConfigType>, address: string) => Promise<bigint>;
|
|
640
676
|
/**
|
|
641
677
|
* Validate whether an address is well-formed for the blockchain.
|
|
642
678
|
*
|
|
643
679
|
* @param address the address to validate
|
|
644
680
|
* @param parameters currency-specific validation parameters
|
|
645
681
|
* @returns `true` if the address is valid, `false` otherwise
|
|
682
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
646
683
|
*/
|
|
647
|
-
validateAddress: (address: string, parameters: Partial<AddressValidationCurrencyParameters>) => Promise<boolean>;
|
|
684
|
+
validateAddress: (context: Context<ConfigType>, address: string, parameters: Partial<AddressValidationCurrencyParameters>) => Promise<boolean>;
|
|
648
685
|
/**
|
|
649
686
|
* Get a blockchain specific payload. For Ethereum, it would be a calldata,
|
|
650
687
|
* for Solana, it would be instructions, and so on
|
|
651
688
|
*
|
|
652
689
|
* @param intent transaction intent
|
|
653
690
|
* @returns blockchain-specific {@link TxData} for this module
|
|
691
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
654
692
|
*/
|
|
655
|
-
craftTransactionData: (intent: TransactionIntent<MemoType, TxDataType>) => TxDataType;
|
|
693
|
+
craftTransactionData: (context: Context<ConfigType>, intent: TransactionIntent<MemoType, TxDataType>) => TxDataType;
|
|
656
694
|
};
|
|
657
695
|
export {};
|
|
658
696
|
//# sourceMappingURL=types.d.ts.map
|
package/lib/api/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/api/types.ts"],"names":[],"mappings":"AAIA,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,IA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iBAAiB,CAAC,QAAQ,EAAE,UAAU,CAAC,KAC5C,UAAU,CAAA;CAChB,CAAA"}
|
package/lib/config.d.ts
CHANGED
|
@@ -34,6 +34,27 @@ export type CurrencyConfig = {
|
|
|
34
34
|
[key: string]: unknown;
|
|
35
35
|
};
|
|
36
36
|
export type CoinConfig<T extends CurrencyConfig> = (currencyId?: string) => T;
|
|
37
|
+
/**
|
|
38
|
+
* A logging sink. Coin modules log through this so the concrete logger is injected by the caller via
|
|
39
|
+
* the {@link Context} (e.g. `@ledgerhq/logs`' `log`) rather than hard-wired in the framework.
|
|
40
|
+
*/
|
|
41
|
+
export type Logger = (...args: unknown[]) => void;
|
|
42
|
+
/**
|
|
43
|
+
* Instance-scoped dependencies threaded to the low layers of a coin module (ADR-019).
|
|
44
|
+
*
|
|
45
|
+
* Rather than relying on module-level singletons, everything stateful a coin module needs is
|
|
46
|
+
* provided explicitly through this context: the coin configuration accessor and a logger.
|
|
47
|
+
*
|
|
48
|
+
* The free-form `Record` allows coin-specific specializations to carry extra fields (see ADR-042).
|
|
49
|
+
*
|
|
50
|
+
* Note: an HTTP client is intentionally left out of scope for now and will be added later.
|
|
51
|
+
*/
|
|
52
|
+
export type Context<T extends CurrencyConfig> = {
|
|
53
|
+
/** Resolves the coin configuration (replaces the former `getCoinConfig`). */
|
|
54
|
+
config: (currencyId?: string) => Promise<T>;
|
|
55
|
+
/** The logger to use for all logging in the coin module. */
|
|
56
|
+
logger: Logger;
|
|
57
|
+
} & Record<string, unknown>;
|
|
37
58
|
declare function buildCoinConfig<T extends CurrencyConfig>(): {
|
|
38
59
|
setCoinConfig: (config: CoinConfig<T>) => void;
|
|
39
60
|
getCoinConfig: (currencyId?: string) => T;
|
package/lib/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA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AAS,cAAc,IAAI,CAAC,UAAU,CAAC,EAAE,MAAM,KAAK,CAAC,CAAA;AAE7E;;;GAGG;AACH,MAAM,MAAM,MAAM,GAAG,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAA;AAEjD;;;;;;;;;GASG;AACH,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,cAAc,IAAI;IAC9C,6EAA6E;IAC7E,MAAM,EAAE,CAAC,UAAU,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,CAAA;IAC3C,4DAA4D;IAC5D,MAAM,EAAE,MAAM,CAAA;CACf,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAE3B,iBAAS,eAAe,CAAC,CAAC,SAAS,cAAc;4BAGhB,UAAU,CAAC,CAAC,CAAC,KAAG,IAAI;iCAIf,MAAM,KAAG,CAAC;EAY/C;AAED,eAAe,eAAe,CAAA"}
|
package/lib/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";AAAA,4CAA4C;AAC5C,sCAAsC;;AAGtC,qCAA4C;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";AAAA,4CAA4C;AAC5C,sCAAsC;;AAGtC,qCAA4C;AAgF5C,SAAS,eAAe;IACtB,IAAI,UAAqC,CAAA;IAEzC,MAAM,aAAa,GAAG,CAAC,MAAqB,EAAQ,EAAE;QACpD,UAAU,GAAG,MAAM,CAAA;IACrB,CAAC,CAAA;IAED,MAAM,aAAa,GAAG,CAAC,UAAmB,EAAK,EAAE;QAC/C,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,MAAM,IAAI,0BAAiB,EAAE,CAAA;QAC/B,CAAC;QAED,OAAO,UAAU,CAAC,UAAU,CAAC,CAAA;IAC/B,CAAC,CAAA;IAED,OAAO;QACL,aAAa;QACb,aAAa;KACd,CAAA;AACH,CAAC;AAED,kBAAe,eAAe,CAAA"}
|
package/lib-es/api/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Context, CurrencyConfig } from '../config';
|
|
1
2
|
export type BroadcastConfig = {
|
|
2
3
|
mevProtected: boolean;
|
|
3
4
|
sponsored?: boolean;
|
|
@@ -406,7 +407,7 @@ export type BalanceOptions = {
|
|
|
406
407
|
export type CallParams = Record<string, unknown> | unknown[];
|
|
407
408
|
/** Result of {@link CoinModuleApi.call}. */
|
|
408
409
|
export type CallResult = unknown;
|
|
409
|
-
export type CoinModuleApi<MemoType extends Memo = MemoNotSupported, TxDataType extends TxData = TxDataNotSupported> = {
|
|
410
|
+
export type CoinModuleApi<ConfigType extends CurrencyConfig, MemoType extends Memo = MemoNotSupported, TxDataType extends TxData = TxDataNotSupported> = {
|
|
410
411
|
/**
|
|
411
412
|
* Get the latest block information from the network.
|
|
412
413
|
*
|
|
@@ -415,8 +416,9 @@ export type CoinModuleApi<MemoType extends Memo = MemoNotSupported, TxDataType e
|
|
|
415
416
|
* @returns the latest block metadata (height, hash, time)
|
|
416
417
|
* @see getBlockInfo
|
|
417
418
|
* @see getBlock
|
|
419
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
418
420
|
*/
|
|
419
|
-
lastBlock: () => Promise<BlockInfo>;
|
|
421
|
+
lastBlock: (context: Context<ConfigType>) => Promise<BlockInfo>;
|
|
420
422
|
/**
|
|
421
423
|
* Get block information for a specific block height.
|
|
422
424
|
*
|
|
@@ -428,8 +430,9 @@ export type CoinModuleApi<MemoType extends Memo = MemoNotSupported, TxDataType e
|
|
|
428
430
|
* @param height the block height to query
|
|
429
431
|
* @returns the block metadata (height, hash, time)
|
|
430
432
|
* @throws "not supported" if the blockchain does not support querying historical blocks
|
|
433
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
431
434
|
*/
|
|
432
|
-
getBlockInfo: (height: number) => Promise<BlockInfo>;
|
|
435
|
+
getBlockInfo: (context: Context<ConfigType>, height: number) => Promise<BlockInfo>;
|
|
433
436
|
/**
|
|
434
437
|
* Get a full block with all its transactions.
|
|
435
438
|
*
|
|
@@ -443,8 +446,9 @@ export type CoinModuleApi<MemoType extends Memo = MemoNotSupported, TxDataType e
|
|
|
443
446
|
* @param height the block height to query
|
|
444
447
|
* @returns the complete block with transactions
|
|
445
448
|
* @throws "not supported" if the blockchain does not support querying full blocks
|
|
449
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
446
450
|
*/
|
|
447
|
-
getBlock: (height: number) => Promise<Block>;
|
|
451
|
+
getBlock: (context: Context<ConfigType>, height: number) => Promise<Block>;
|
|
448
452
|
/**
|
|
449
453
|
* Perform a direct, read-only smart-contract call against the underlying node or indexer.
|
|
450
454
|
*
|
|
@@ -460,8 +464,9 @@ export type CoinModuleApi<MemoType extends Memo = MemoNotSupported, TxDataType e
|
|
|
460
464
|
* @param params opaque, network-defined parameters for the read-only call
|
|
461
465
|
* @returns the opaque, network-defined result
|
|
462
466
|
* @throws "not supported" if the network or implementation does not support contract calls
|
|
467
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
463
468
|
*/
|
|
464
|
-
call: (params: CallParams) => Promise<CallResult>;
|
|
469
|
+
call: (context: Context<ConfigType>, params: CallParams) => Promise<CallResult>;
|
|
465
470
|
/**
|
|
466
471
|
* Get the list of validators available on the network.
|
|
467
472
|
* @param cursor a pagination cursor to resume listing (the implementation must guarantee the cursor is not volatile,
|
|
@@ -469,8 +474,11 @@ export type CoinModuleApi<MemoType extends Memo = MemoNotSupported, TxDataType e
|
|
|
469
474
|
* a date or transaction hash).
|
|
470
475
|
* The concrete implementation may return all validators in a single page when the underlying SDK
|
|
471
476
|
* does not provide cursor-based pagination.
|
|
477
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
472
478
|
*/
|
|
473
|
-
getValidators: (
|
|
479
|
+
getValidators: (context: Context<ConfigType>, options?: {
|
|
480
|
+
cursor?: Cursor;
|
|
481
|
+
}) => Promise<Page<Validator>>;
|
|
474
482
|
/**
|
|
475
483
|
* Get the balance(s) for an address/account.
|
|
476
484
|
*
|
|
@@ -484,8 +492,9 @@ export type CoinModuleApi<MemoType extends Memo = MemoNotSupported, TxDataType e
|
|
|
484
492
|
* @returns an array of balances for all assets held by the address
|
|
485
493
|
* @see getStakes
|
|
486
494
|
* @see listOperations
|
|
495
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
487
496
|
*/
|
|
488
|
-
getBalance: (address: string, options?: BalanceOptions) => Promise<Balance[]>;
|
|
497
|
+
getBalance: (context: Context<ConfigType>, address: string, options?: BalanceOptions) => Promise<Balance[]>;
|
|
489
498
|
/**
|
|
490
499
|
* List operations for an address/account.
|
|
491
500
|
*
|
|
@@ -495,8 +504,9 @@ export type CoinModuleApi<MemoType extends Memo = MemoNotSupported, TxDataType e
|
|
|
495
504
|
* @param options see {@link ListOperationsOptions}
|
|
496
505
|
* @returns a page of operations
|
|
497
506
|
* @see getBalance
|
|
507
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
498
508
|
*/
|
|
499
|
-
listOperations: (address: string, options: ListOperationsOptions) => Promise<Page<Operation>>;
|
|
509
|
+
listOperations: (context: Context<ConfigType>, address: string, options: ListOperationsOptions) => Promise<Page<Operation>>;
|
|
500
510
|
/**
|
|
501
511
|
* Get staking positions owned by an address/account.
|
|
502
512
|
*
|
|
@@ -514,8 +524,11 @@ export type CoinModuleApi<MemoType extends Memo = MemoNotSupported, TxDataType e
|
|
|
514
524
|
* a date or transaction hash)
|
|
515
525
|
* @see getBalance
|
|
516
526
|
* @see getRewards
|
|
527
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
517
528
|
*/
|
|
518
|
-
getStakes: (address: string,
|
|
529
|
+
getStakes: (context: Context<ConfigType>, address: string, options?: {
|
|
530
|
+
cursor?: Cursor;
|
|
531
|
+
}) => Promise<Page<Stake>>;
|
|
519
532
|
/**
|
|
520
533
|
* Get staking reward distribution events since address/account inception.
|
|
521
534
|
*
|
|
@@ -538,8 +551,11 @@ export type CoinModuleApi<MemoType extends Memo = MemoNotSupported, TxDataType e
|
|
|
538
551
|
* a date or transaction hash)
|
|
539
552
|
* @see getBalance
|
|
540
553
|
* @see getStakes
|
|
554
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
541
555
|
*/
|
|
542
|
-
getRewards: (address: string,
|
|
556
|
+
getRewards: (context: Context<ConfigType>, address: string, options?: {
|
|
557
|
+
cursor?: Cursor;
|
|
558
|
+
}) => Promise<Page<Reward>>;
|
|
543
559
|
/**
|
|
544
560
|
* Get network-specific account metadata not covered by {@link getBalance}, {@link getStakes} or
|
|
545
561
|
* {@link listOperations} (for example, Tron bandwidth/energy).
|
|
@@ -550,8 +566,9 @@ export type CoinModuleApi<MemoType extends Memo = MemoNotSupported, TxDataType e
|
|
|
550
566
|
* @param address the account address
|
|
551
567
|
* @returns the network-specific account metadata (see {@link AccountInfo})
|
|
552
568
|
* @see getBalance
|
|
569
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
553
570
|
*/
|
|
554
|
-
getAccountInfo?: (address: string) => Promise<AccountInfo>;
|
|
571
|
+
getAccountInfo?: (context: Context<ConfigType>, address: string) => Promise<AccountInfo>;
|
|
555
572
|
/**
|
|
556
573
|
* Craft an unsigned transaction from a transaction intent.
|
|
557
574
|
*
|
|
@@ -562,8 +579,11 @@ export type CoinModuleApi<MemoType extends Memo = MemoNotSupported, TxDataType e
|
|
|
562
579
|
* @param customFees optional custom fees to use instead of the default estimation
|
|
563
580
|
* @returns the crafted transaction with optional blockchain-specific details
|
|
564
581
|
* @see craftRawTransaction
|
|
582
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
565
583
|
*/
|
|
566
|
-
craftTransaction: (transactionIntent: TransactionIntent<MemoType, TxDataType>,
|
|
584
|
+
craftTransaction: (context: Context<ConfigType>, transactionIntent: TransactionIntent<MemoType, TxDataType>, options?: {
|
|
585
|
+
customFees?: FeeEstimation;
|
|
586
|
+
}) => Promise<CraftedTransaction>;
|
|
567
587
|
/**
|
|
568
588
|
* Craft an unsigned transaction from a raw/pre-built transaction.
|
|
569
589
|
*
|
|
@@ -577,8 +597,9 @@ export type CoinModuleApi<MemoType extends Memo = MemoNotSupported, TxDataType e
|
|
|
577
597
|
* @returns the crafted transaction ready for signing
|
|
578
598
|
* @throws "not supported" if the blockchain does not support raw transaction crafting
|
|
579
599
|
* @see craftTransaction
|
|
600
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
580
601
|
*/
|
|
581
|
-
craftRawTransaction: (transaction: string, sender: string, publicKey: string, sequence: bigint) => Promise<CraftedTransaction>;
|
|
602
|
+
craftRawTransaction: (context: Context<ConfigType>, transaction: string, sender: string, publicKey: string, sequence: bigint) => Promise<CraftedTransaction>;
|
|
582
603
|
/**
|
|
583
604
|
* Estimate the fees for a transaction intent.
|
|
584
605
|
*
|
|
@@ -589,8 +610,12 @@ export type CoinModuleApi<MemoType extends Memo = MemoNotSupported, TxDataType e
|
|
|
589
610
|
* (e.g., gas limit, priority fee)
|
|
590
611
|
* @param options optional selection inputs; see {@link EstimateFeesOptions}
|
|
591
612
|
* @returns the estimated fees and optional parameters that can be passed to {@link craftTransaction}
|
|
613
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
592
614
|
*/
|
|
593
|
-
estimateFees: (transactionIntent: TransactionIntent<MemoType, TxDataType>,
|
|
615
|
+
estimateFees: (context: Context<ConfigType>, transactionIntent: TransactionIntent<MemoType, TxDataType>, options?: {
|
|
616
|
+
customFeesParameters?: FeeEstimation['parameters'];
|
|
617
|
+
feeOption?: EstimateFeesOptions;
|
|
618
|
+
}) => Promise<FeeEstimation>;
|
|
594
619
|
/**
|
|
595
620
|
* List the fee-payment options available for a transaction intent — a lightweight availability check
|
|
596
621
|
* (metadata only, no amounts). Price one by passing its `id` as `options.feeOptionId` to
|
|
@@ -607,11 +632,15 @@ export type CoinModuleApi<MemoType extends Memo = MemoNotSupported, TxDataType e
|
|
|
607
632
|
* Combine a crafted transaction with a signature to produce a signed transaction ready for broadcast.
|
|
608
633
|
*
|
|
609
634
|
* @param tx the unsigned/crafted transaction (as returned by {@link craftTransaction})
|
|
610
|
-
* @param signature
|
|
635
|
+
* @param signature ordered list of signatures produced by the hardware wallet — root intent first,
|
|
636
|
+
* nested calls after. Single-signature blockchains must throw if `signature.length !== 1`.
|
|
611
637
|
* @param pubkey the public key used to sign (required for some blockchains to verify/embed in the transaction)
|
|
612
638
|
* @returns the signed transaction ready for {@link broadcast}
|
|
639
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
613
640
|
*/
|
|
614
|
-
combine: (tx: string, signature: string,
|
|
641
|
+
combine: (context: Context<ConfigType>, tx: string, signature: string[], options?: {
|
|
642
|
+
pubkey?: string;
|
|
643
|
+
}) => string | Promise<string>;
|
|
615
644
|
/**
|
|
616
645
|
* Broadcast a signed transaction to the network.
|
|
617
646
|
*
|
|
@@ -619,8 +648,11 @@ export type CoinModuleApi<MemoType extends Memo = MemoNotSupported, TxDataType e
|
|
|
619
648
|
* @param broadcastConfig optional configuration for the broadcast (e.g., retry settings)
|
|
620
649
|
* @returns the transaction hash/digest once successfully submitted to the network
|
|
621
650
|
* @throws if the transaction is rejected by the network (e.g., invalid signature, insufficient funds)
|
|
651
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
622
652
|
*/
|
|
623
|
-
broadcast: (tx: string,
|
|
653
|
+
broadcast: (context: Context<ConfigType>, tx: string, options?: {
|
|
654
|
+
broadcastConfig?: BroadcastConfig;
|
|
655
|
+
}) => Promise<string>;
|
|
624
656
|
/**
|
|
625
657
|
* Validate a transaction intent.
|
|
626
658
|
*
|
|
@@ -628,31 +660,37 @@ export type CoinModuleApi<MemoType extends Memo = MemoNotSupported, TxDataType e
|
|
|
628
660
|
* @param balances current balances of the intent sender
|
|
629
661
|
* @param customFees optional custom fees to use instead of the default estimation
|
|
630
662
|
* @returns additional values the intent has been validated with, and optional errors/warnings
|
|
663
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
631
664
|
*/
|
|
632
|
-
validateIntent: (transactionIntent: TransactionIntent<MemoType, TxDataType>, balances: Balance[],
|
|
665
|
+
validateIntent: (context: Context<ConfigType>, transactionIntent: TransactionIntent<MemoType, TxDataType>, balances: Balance[], options?: {
|
|
666
|
+
customFees?: FeeEstimation;
|
|
667
|
+
}) => Promise<TransactionValidation>;
|
|
633
668
|
/**
|
|
634
669
|
* Get the next sequence number (nonce) for an address
|
|
635
670
|
*
|
|
636
671
|
* @param address the account address
|
|
637
672
|
* @returns the next usable sequence number
|
|
673
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
638
674
|
*/
|
|
639
|
-
getNextSequence: (address: string) => Promise<bigint>;
|
|
675
|
+
getNextSequence: (context: Context<ConfigType>, address: string) => Promise<bigint>;
|
|
640
676
|
/**
|
|
641
677
|
* Validate whether an address is well-formed for the blockchain.
|
|
642
678
|
*
|
|
643
679
|
* @param address the address to validate
|
|
644
680
|
* @param parameters currency-specific validation parameters
|
|
645
681
|
* @returns `true` if the address is valid, `false` otherwise
|
|
682
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
646
683
|
*/
|
|
647
|
-
validateAddress: (address: string, parameters: Partial<AddressValidationCurrencyParameters>) => Promise<boolean>;
|
|
684
|
+
validateAddress: (context: Context<ConfigType>, address: string, parameters: Partial<AddressValidationCurrencyParameters>) => Promise<boolean>;
|
|
648
685
|
/**
|
|
649
686
|
* Get a blockchain specific payload. For Ethereum, it would be a calldata,
|
|
650
687
|
* for Solana, it would be instructions, and so on
|
|
651
688
|
*
|
|
652
689
|
* @param intent transaction intent
|
|
653
690
|
* @returns blockchain-specific {@link TxData} for this module
|
|
691
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
654
692
|
*/
|
|
655
|
-
craftTransactionData: (intent: TransactionIntent<MemoType, TxDataType>) => TxDataType;
|
|
693
|
+
craftTransactionData: (context: Context<ConfigType>, intent: TransactionIntent<MemoType, TxDataType>) => TxDataType;
|
|
656
694
|
};
|
|
657
695
|
export {};
|
|
658
696
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/api/types.ts"],"names":[],"mappings":"AAIA,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,EAAE,OAAO,CAAA;IAEvB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,SAAS,GACjB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,IAAI,CAAA;CAAE,GAC9C;IACE,IAAI,EAAE,MAAM,CAAA;IACZ,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,UAAU,CAAC,EAAE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E,OAAO,CAAC,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"}
|
package/lib-es/config.d.ts
CHANGED
|
@@ -34,6 +34,27 @@ export type CurrencyConfig = {
|
|
|
34
34
|
[key: string]: unknown;
|
|
35
35
|
};
|
|
36
36
|
export type CoinConfig<T extends CurrencyConfig> = (currencyId?: string) => T;
|
|
37
|
+
/**
|
|
38
|
+
* A logging sink. Coin modules log through this so the concrete logger is injected by the caller via
|
|
39
|
+
* the {@link Context} (e.g. `@ledgerhq/logs`' `log`) rather than hard-wired in the framework.
|
|
40
|
+
*/
|
|
41
|
+
export type Logger = (...args: unknown[]) => void;
|
|
42
|
+
/**
|
|
43
|
+
* Instance-scoped dependencies threaded to the low layers of a coin module (ADR-019).
|
|
44
|
+
*
|
|
45
|
+
* Rather than relying on module-level singletons, everything stateful a coin module needs is
|
|
46
|
+
* provided explicitly through this context: the coin configuration accessor and a logger.
|
|
47
|
+
*
|
|
48
|
+
* The free-form `Record` allows coin-specific specializations to carry extra fields (see ADR-042).
|
|
49
|
+
*
|
|
50
|
+
* Note: an HTTP client is intentionally left out of scope for now and will be added later.
|
|
51
|
+
*/
|
|
52
|
+
export type Context<T extends CurrencyConfig> = {
|
|
53
|
+
/** Resolves the coin configuration (replaces the former `getCoinConfig`). */
|
|
54
|
+
config: (currencyId?: string) => Promise<T>;
|
|
55
|
+
/** The logger to use for all logging in the coin module. */
|
|
56
|
+
logger: Logger;
|
|
57
|
+
} & Record<string, unknown>;
|
|
37
58
|
declare function buildCoinConfig<T extends CurrencyConfig>(): {
|
|
38
59
|
setCoinConfig: (config: CoinConfig<T>) => void;
|
|
39
60
|
getCoinConfig: (currencyId?: string) => T;
|
package/lib-es/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAGrD,KAAK,YAAY,GACb;IACE,IAAI,EAAE,QAAQ,CAAA;IACd,QAAQ,CAAC,EAAE,aAAa,EAAE,CAAA;CAC3B,GACD;IACE,IAAI,EAAE,mBAAmB,CAAA;IACzB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,GACD;IACE,IAAI,EAAE,WAAW,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;CACb,GACD;IACE,IAAI,EAAE,qBAAqB,CAAA;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EACH,SAAS,GACT,MAAM,GACN,eAAe,GACf,kBAAkB,GAClB,MAAM,GACN,SAAS,GACT,gBAAgB,GAChB,kBAAkB,GAClB,SAAS,GACT,0BAA0B,CAAA;CAC/B,GACD;IACE,IAAI,EAAE,oBAAo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A"}
|
package/lib-es/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,sCAAsC;AAGtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,sCAAsC;AAGtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAgF5C,SAAS,eAAe;IACtB,IAAI,UAAqC,CAAA;IAEzC,MAAM,aAAa,GAAG,CAAC,MAAqB,EAAQ,EAAE;QACpD,UAAU,GAAG,MAAM,CAAA;IACrB,CAAC,CAAA;IAED,MAAM,aAAa,GAAG,CAAC,UAAmB,EAAK,EAAE;QAC/C,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,MAAM,IAAI,iBAAiB,EAAE,CAAA;QAC/B,CAAC;QAED,OAAO,UAAU,CAAC,UAAU,CAAC,CAAA;IAC/B,CAAC,CAAA;IAED,OAAO;QACL,aAAa;QACb,aAAa;KACd,CAAA;AACH,CAAC;AAED,eAAe,eAAe,CAAA"}
|
package/package.json
CHANGED
package/src/api/types.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: © 2024 LEDGER SAS
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
+
import type { Context, CurrencyConfig } from '../config'
|
|
5
|
+
|
|
4
6
|
// NOTE: from types-live
|
|
5
7
|
export type BroadcastConfig = {
|
|
6
8
|
mevProtected: boolean
|
|
@@ -534,6 +536,7 @@ export type CallParams = Record<string, unknown> | unknown[]
|
|
|
534
536
|
export type CallResult = unknown
|
|
535
537
|
|
|
536
538
|
export type CoinModuleApi<
|
|
539
|
+
ConfigType extends CurrencyConfig,
|
|
537
540
|
MemoType extends Memo = MemoNotSupported,
|
|
538
541
|
TxDataType extends TxData = TxDataNotSupported,
|
|
539
542
|
> = {
|
|
@@ -547,8 +550,9 @@ export type CoinModuleApi<
|
|
|
547
550
|
* @returns the latest block metadata (height, hash, time)
|
|
548
551
|
* @see getBlockInfo
|
|
549
552
|
* @see getBlock
|
|
553
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
550
554
|
*/
|
|
551
|
-
lastBlock: () => Promise<BlockInfo>
|
|
555
|
+
lastBlock: (context: Context<ConfigType>) => Promise<BlockInfo>
|
|
552
556
|
|
|
553
557
|
/**
|
|
554
558
|
* Get block information for a specific block height.
|
|
@@ -561,8 +565,9 @@ export type CoinModuleApi<
|
|
|
561
565
|
* @param height the block height to query
|
|
562
566
|
* @returns the block metadata (height, hash, time)
|
|
563
567
|
* @throws "not supported" if the blockchain does not support querying historical blocks
|
|
568
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
564
569
|
*/
|
|
565
|
-
getBlockInfo: (height: number) => Promise<BlockInfo>
|
|
570
|
+
getBlockInfo: (context: Context<ConfigType>, height: number) => Promise<BlockInfo>
|
|
566
571
|
|
|
567
572
|
/**
|
|
568
573
|
* Get a full block with all its transactions.
|
|
@@ -577,8 +582,9 @@ export type CoinModuleApi<
|
|
|
577
582
|
* @param height the block height to query
|
|
578
583
|
* @returns the complete block with transactions
|
|
579
584
|
* @throws "not supported" if the blockchain does not support querying full blocks
|
|
585
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
580
586
|
*/
|
|
581
|
-
getBlock: (height: number) => Promise<Block>
|
|
587
|
+
getBlock: (context: Context<ConfigType>, height: number) => Promise<Block>
|
|
582
588
|
|
|
583
589
|
/**
|
|
584
590
|
* Perform a direct, read-only smart-contract call against the underlying node or indexer.
|
|
@@ -595,8 +601,9 @@ export type CoinModuleApi<
|
|
|
595
601
|
* @param params opaque, network-defined parameters for the read-only call
|
|
596
602
|
* @returns the opaque, network-defined result
|
|
597
603
|
* @throws "not supported" if the network or implementation does not support contract calls
|
|
604
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
598
605
|
*/
|
|
599
|
-
call: (params: CallParams) => Promise<CallResult>
|
|
606
|
+
call: (context: Context<ConfigType>, params: CallParams) => Promise<CallResult>
|
|
600
607
|
|
|
601
608
|
/**
|
|
602
609
|
* Get the list of validators available on the network.
|
|
@@ -605,8 +612,12 @@ export type CoinModuleApi<
|
|
|
605
612
|
* a date or transaction hash).
|
|
606
613
|
* The concrete implementation may return all validators in a single page when the underlying SDK
|
|
607
614
|
* does not provide cursor-based pagination.
|
|
615
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
608
616
|
*/
|
|
609
|
-
getValidators: (
|
|
617
|
+
getValidators: (
|
|
618
|
+
context: Context<ConfigType>,
|
|
619
|
+
options?: { cursor?: Cursor }
|
|
620
|
+
) => Promise<Page<Validator>>
|
|
610
621
|
|
|
611
622
|
// account read API
|
|
612
623
|
|
|
@@ -623,8 +634,13 @@ export type CoinModuleApi<
|
|
|
623
634
|
* @returns an array of balances for all assets held by the address
|
|
624
635
|
* @see getStakes
|
|
625
636
|
* @see listOperations
|
|
637
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
626
638
|
*/
|
|
627
|
-
getBalance: (
|
|
639
|
+
getBalance: (
|
|
640
|
+
context: Context<ConfigType>,
|
|
641
|
+
address: string,
|
|
642
|
+
options?: BalanceOptions
|
|
643
|
+
) => Promise<Balance[]>
|
|
628
644
|
|
|
629
645
|
/**
|
|
630
646
|
* List operations for an address/account.
|
|
@@ -635,8 +651,13 @@ export type CoinModuleApi<
|
|
|
635
651
|
* @param options see {@link ListOperationsOptions}
|
|
636
652
|
* @returns a page of operations
|
|
637
653
|
* @see getBalance
|
|
654
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
638
655
|
*/
|
|
639
|
-
listOperations: (
|
|
656
|
+
listOperations: (
|
|
657
|
+
context: Context<ConfigType>,
|
|
658
|
+
address: string,
|
|
659
|
+
options: ListOperationsOptions
|
|
660
|
+
) => Promise<Page<Operation>>
|
|
640
661
|
|
|
641
662
|
/**
|
|
642
663
|
* Get staking positions owned by an address/account.
|
|
@@ -655,8 +676,13 @@ export type CoinModuleApi<
|
|
|
655
676
|
* a date or transaction hash)
|
|
656
677
|
* @see getBalance
|
|
657
678
|
* @see getRewards
|
|
679
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
658
680
|
*/
|
|
659
|
-
getStakes: (
|
|
681
|
+
getStakes: (
|
|
682
|
+
context: Context<ConfigType>,
|
|
683
|
+
address: string,
|
|
684
|
+
options?: { cursor?: Cursor }
|
|
685
|
+
) => Promise<Page<Stake>>
|
|
660
686
|
|
|
661
687
|
/**
|
|
662
688
|
* Get staking reward distribution events since address/account inception.
|
|
@@ -680,8 +706,13 @@ export type CoinModuleApi<
|
|
|
680
706
|
* a date or transaction hash)
|
|
681
707
|
* @see getBalance
|
|
682
708
|
* @see getStakes
|
|
709
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
683
710
|
*/
|
|
684
|
-
getRewards: (
|
|
711
|
+
getRewards: (
|
|
712
|
+
context: Context<ConfigType>,
|
|
713
|
+
address: string,
|
|
714
|
+
options?: { cursor?: Cursor }
|
|
715
|
+
) => Promise<Page<Reward>>
|
|
685
716
|
|
|
686
717
|
/**
|
|
687
718
|
* Get network-specific account metadata not covered by {@link getBalance}, {@link getStakes} or
|
|
@@ -693,8 +724,9 @@ export type CoinModuleApi<
|
|
|
693
724
|
* @param address the account address
|
|
694
725
|
* @returns the network-specific account metadata (see {@link AccountInfo})
|
|
695
726
|
* @see getBalance
|
|
727
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
696
728
|
*/
|
|
697
|
-
getAccountInfo?: (address: string) => Promise<AccountInfo>
|
|
729
|
+
getAccountInfo?: (context: Context<ConfigType>, address: string) => Promise<AccountInfo>
|
|
698
730
|
|
|
699
731
|
// transaction API
|
|
700
732
|
|
|
@@ -708,10 +740,12 @@ export type CoinModuleApi<
|
|
|
708
740
|
* @param customFees optional custom fees to use instead of the default estimation
|
|
709
741
|
* @returns the crafted transaction with optional blockchain-specific details
|
|
710
742
|
* @see craftRawTransaction
|
|
743
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
711
744
|
*/
|
|
712
745
|
craftTransaction: (
|
|
746
|
+
context: Context<ConfigType>,
|
|
713
747
|
transactionIntent: TransactionIntent<MemoType, TxDataType>,
|
|
714
|
-
customFees?: FeeEstimation
|
|
748
|
+
options?: { customFees?: FeeEstimation }
|
|
715
749
|
) => Promise<CraftedTransaction>
|
|
716
750
|
|
|
717
751
|
/**
|
|
@@ -727,8 +761,10 @@ export type CoinModuleApi<
|
|
|
727
761
|
* @returns the crafted transaction ready for signing
|
|
728
762
|
* @throws "not supported" if the blockchain does not support raw transaction crafting
|
|
729
763
|
* @see craftTransaction
|
|
764
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
730
765
|
*/
|
|
731
766
|
craftRawTransaction: (
|
|
767
|
+
context: Context<ConfigType>,
|
|
732
768
|
transaction: string,
|
|
733
769
|
sender: string,
|
|
734
770
|
publicKey: string,
|
|
@@ -745,11 +781,15 @@ export type CoinModuleApi<
|
|
|
745
781
|
* (e.g., gas limit, priority fee)
|
|
746
782
|
* @param options optional selection inputs; see {@link EstimateFeesOptions}
|
|
747
783
|
* @returns the estimated fees and optional parameters that can be passed to {@link craftTransaction}
|
|
784
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
748
785
|
*/
|
|
749
786
|
estimateFees: (
|
|
787
|
+
context: Context<ConfigType>,
|
|
750
788
|
transactionIntent: TransactionIntent<MemoType, TxDataType>,
|
|
751
|
-
|
|
752
|
-
|
|
789
|
+
options?: {
|
|
790
|
+
customFeesParameters?: FeeEstimation['parameters']
|
|
791
|
+
feeOption?: EstimateFeesOptions
|
|
792
|
+
}
|
|
753
793
|
) => Promise<FeeEstimation>
|
|
754
794
|
|
|
755
795
|
/**
|
|
@@ -771,11 +811,18 @@ export type CoinModuleApi<
|
|
|
771
811
|
* Combine a crafted transaction with a signature to produce a signed transaction ready for broadcast.
|
|
772
812
|
*
|
|
773
813
|
* @param tx the unsigned/crafted transaction (as returned by {@link craftTransaction})
|
|
774
|
-
* @param signature
|
|
814
|
+
* @param signature ordered list of signatures produced by the hardware wallet — root intent first,
|
|
815
|
+
* nested calls after. Single-signature blockchains must throw if `signature.length !== 1`.
|
|
775
816
|
* @param pubkey the public key used to sign (required for some blockchains to verify/embed in the transaction)
|
|
776
817
|
* @returns the signed transaction ready for {@link broadcast}
|
|
818
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
777
819
|
*/
|
|
778
|
-
combine: (
|
|
820
|
+
combine: (
|
|
821
|
+
context: Context<ConfigType>,
|
|
822
|
+
tx: string,
|
|
823
|
+
signature: string[],
|
|
824
|
+
options?: { pubkey?: string }
|
|
825
|
+
) => string | Promise<string>
|
|
779
826
|
|
|
780
827
|
/**
|
|
781
828
|
* Broadcast a signed transaction to the network.
|
|
@@ -784,8 +831,13 @@ export type CoinModuleApi<
|
|
|
784
831
|
* @param broadcastConfig optional configuration for the broadcast (e.g., retry settings)
|
|
785
832
|
* @returns the transaction hash/digest once successfully submitted to the network
|
|
786
833
|
* @throws if the transaction is rejected by the network (e.g., invalid signature, insufficient funds)
|
|
834
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
787
835
|
*/
|
|
788
|
-
broadcast: (
|
|
836
|
+
broadcast: (
|
|
837
|
+
context: Context<ConfigType>,
|
|
838
|
+
tx: string,
|
|
839
|
+
options?: { broadcastConfig?: BroadcastConfig }
|
|
840
|
+
) => Promise<string>
|
|
789
841
|
|
|
790
842
|
/**
|
|
791
843
|
* Validate a transaction intent.
|
|
@@ -794,11 +846,13 @@ export type CoinModuleApi<
|
|
|
794
846
|
* @param balances current balances of the intent sender
|
|
795
847
|
* @param customFees optional custom fees to use instead of the default estimation
|
|
796
848
|
* @returns additional values the intent has been validated with, and optional errors/warnings
|
|
849
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
797
850
|
*/
|
|
798
851
|
validateIntent: (
|
|
852
|
+
context: Context<ConfigType>,
|
|
799
853
|
transactionIntent: TransactionIntent<MemoType, TxDataType>,
|
|
800
854
|
balances: Balance[],
|
|
801
|
-
customFees?: FeeEstimation
|
|
855
|
+
options?: { customFees?: FeeEstimation }
|
|
802
856
|
) => Promise<TransactionValidation>
|
|
803
857
|
|
|
804
858
|
/**
|
|
@@ -806,8 +860,9 @@ export type CoinModuleApi<
|
|
|
806
860
|
*
|
|
807
861
|
* @param address the account address
|
|
808
862
|
* @returns the next usable sequence number
|
|
863
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
809
864
|
*/
|
|
810
|
-
getNextSequence: (address: string) => Promise<bigint>
|
|
865
|
+
getNextSequence: (context: Context<ConfigType>, address: string) => Promise<bigint>
|
|
811
866
|
|
|
812
867
|
/**
|
|
813
868
|
* Validate whether an address is well-formed for the blockchain.
|
|
@@ -815,8 +870,10 @@ export type CoinModuleApi<
|
|
|
815
870
|
* @param address the address to validate
|
|
816
871
|
* @param parameters currency-specific validation parameters
|
|
817
872
|
* @returns `true` if the address is valid, `false` otherwise
|
|
873
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
818
874
|
*/
|
|
819
875
|
validateAddress: (
|
|
876
|
+
context: Context<ConfigType>,
|
|
820
877
|
address: string,
|
|
821
878
|
parameters: Partial<AddressValidationCurrencyParameters>
|
|
822
879
|
) => Promise<boolean>
|
|
@@ -827,6 +884,10 @@ export type CoinModuleApi<
|
|
|
827
884
|
*
|
|
828
885
|
* @param intent transaction intent
|
|
829
886
|
* @returns blockchain-specific {@link TxData} for this module
|
|
887
|
+
* @param context the {@link Context} carrying the coin config accessor and logger
|
|
830
888
|
*/
|
|
831
|
-
craftTransactionData: (
|
|
889
|
+
craftTransactionData: (
|
|
890
|
+
context: Context<ConfigType>,
|
|
891
|
+
intent: TransactionIntent<MemoType, TxDataType>
|
|
892
|
+
) => TxDataType
|
|
832
893
|
}
|
package/src/config.ts
CHANGED
|
@@ -59,6 +59,29 @@ export type CurrencyConfig = {
|
|
|
59
59
|
|
|
60
60
|
export type CoinConfig<T extends CurrencyConfig> = (currencyId?: string) => T
|
|
61
61
|
|
|
62
|
+
/**
|
|
63
|
+
* A logging sink. Coin modules log through this so the concrete logger is injected by the caller via
|
|
64
|
+
* the {@link Context} (e.g. `@ledgerhq/logs`' `log`) rather than hard-wired in the framework.
|
|
65
|
+
*/
|
|
66
|
+
export type Logger = (...args: unknown[]) => void
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Instance-scoped dependencies threaded to the low layers of a coin module (ADR-019).
|
|
70
|
+
*
|
|
71
|
+
* Rather than relying on module-level singletons, everything stateful a coin module needs is
|
|
72
|
+
* provided explicitly through this context: the coin configuration accessor and a logger.
|
|
73
|
+
*
|
|
74
|
+
* The free-form `Record` allows coin-specific specializations to carry extra fields (see ADR-042).
|
|
75
|
+
*
|
|
76
|
+
* Note: an HTTP client is intentionally left out of scope for now and will be added later.
|
|
77
|
+
*/
|
|
78
|
+
export type Context<T extends CurrencyConfig> = {
|
|
79
|
+
/** Resolves the coin configuration (replaces the former `getCoinConfig`). */
|
|
80
|
+
config: (currencyId?: string) => Promise<T>
|
|
81
|
+
/** The logger to use for all logging in the coin module. */
|
|
82
|
+
logger: Logger
|
|
83
|
+
} & Record<string, unknown>
|
|
84
|
+
|
|
62
85
|
function buildCoinConfig<T extends CurrencyConfig>() {
|
|
63
86
|
let coinConfig: CoinConfig<T> | undefined
|
|
64
87
|
|