@ledgerhq/coin-framework 5.8.0-nightly.2 → 5.8.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.
@@ -1,4 +1,4 @@
1
1
 
2
- > @ledgerhq/coin-framework@5.7.1-nightly.1 build /home/runner/work/ledger-live/ledger-live/libs/coin-framework
2
+ > @ledgerhq/coin-framework@5.8.0 build /home/runner/work/ledger-live/ledger-live/libs/coin-framework
3
3
  > tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es
4
4
 
package/CHANGELOG.md CHANGED
@@ -1,31 +1,41 @@
1
1
  # @ledgerhq/coin-framework
2
2
 
3
- ## 5.8.0-nightly.2
3
+ ## 5.8.0
4
4
 
5
5
  ### Minor Changes
6
6
 
7
- - [#11154](https://github.com/LedgerHQ/ledger-live/pull/11154) [`5bb2111`](https://github.com/LedgerHQ/ledger-live/commit/5bb2111d6a0c84cd0d6508bbf33d184bc89f9da3) Thanks [@qperrot](https://github.com/qperrot)! - Remove generic type for token assets
7
+ - [#10838](https://github.com/LedgerHQ/ledger-live/pull/10838) [`d5f6793`](https://github.com/LedgerHQ/ledger-live/commit/d5f6793c6ae52178e93a19efc75931994bf930a8) Thanks [@jnicoulaud-ledger](https://github.com/jnicoulaud-ledger)! - [coin-modules][ALPACA] add getBlock to coin-framework API, implement it for SUI
8
+
9
+ - [#10992](https://github.com/LedgerHQ/ledger-live/pull/10992) [`132af3d`](https://github.com/LedgerHQ/ledger-live/commit/132af3db5863fb6e54587dd53d4db7b0ec19259e) Thanks [@Moustafa-Koterba](https://github.com/Moustafa-Koterba)! - Add CoinFmk setup function
8
10
 
9
11
  ### Patch Changes
10
12
 
11
- - Updated dependencies [[`b5cbffa`](https://github.com/LedgerHQ/ledger-live/commit/b5cbffac207569027e241db761a6aa70b3b1b636)]:
12
- - @ledgerhq/cryptoassets@13.23.0-nightly.1
13
+ - Updated dependencies [[`4eee376`](https://github.com/LedgerHQ/ledger-live/commit/4eee3767b513dfb58a156cf2ce8086e31a7d55bf), [`72c2a6c`](https://github.com/LedgerHQ/ledger-live/commit/72c2a6c91cfee66fac3505774ba16049fba1c0cf), [`6312f3a`](https://github.com/LedgerHQ/ledger-live/commit/6312f3a039e3018dfd78d231fa91ecf8fc82a118), [`8423a9f`](https://github.com/LedgerHQ/ledger-live/commit/8423a9fbba0d54d18ff35c0519a82829fc8042e0), [`6792990`](https://github.com/LedgerHQ/ledger-live/commit/6792990d8130ec297192bb7d6b98aef024e81dfa)]:
14
+ - @ledgerhq/types-live@6.79.0
15
+ - @ledgerhq/cryptoassets@13.23.0
16
+ - @ledgerhq/types-cryptoassets@7.24.0
13
17
 
14
- ## 5.7.1-nightly.1
18
+ ## 5.8.0-next.1
15
19
 
16
20
  ### Patch Changes
17
21
 
18
- - Updated dependencies [[`b9debdf`](https://github.com/LedgerHQ/ledger-live/commit/b9debdfbc822e9f5dc0b26619208f94bbd788777)]:
19
- - @ledgerhq/live-env@2.13.0-nightly.0
20
- - @ledgerhq/cryptoassets@13.22.1-nightly.0
21
- - @ledgerhq/live-network@2.0.14-nightly.0
22
+ - Updated dependencies [[`8423a9f`](https://github.com/LedgerHQ/ledger-live/commit/8423a9fbba0d54d18ff35c0519a82829fc8042e0)]:
23
+ - @ledgerhq/types-live@6.79.0-next.1
24
+
25
+ ## 5.8.0-next.0
26
+
27
+ ### Minor Changes
28
+
29
+ - [#10838](https://github.com/LedgerHQ/ledger-live/pull/10838) [`d5f6793`](https://github.com/LedgerHQ/ledger-live/commit/d5f6793c6ae52178e93a19efc75931994bf930a8) Thanks [@jnicoulaud-ledger](https://github.com/jnicoulaud-ledger)! - [coin-modules][ALPACA] add getBlock to coin-framework API, implement it for SUI
22
30
 
23
- ## 5.7.1-nightly.0
31
+ - [#10992](https://github.com/LedgerHQ/ledger-live/pull/10992) [`132af3d`](https://github.com/LedgerHQ/ledger-live/commit/132af3db5863fb6e54587dd53d4db7b0ec19259e) Thanks [@Moustafa-Koterba](https://github.com/Moustafa-Koterba)! - Add CoinFmk setup function
24
32
 
25
33
  ### Patch Changes
26
34
 
27
- - Updated dependencies [[`6312f3a`](https://github.com/LedgerHQ/ledger-live/commit/6312f3a039e3018dfd78d231fa91ecf8fc82a118)]:
28
- - @ledgerhq/types-live@6.78.1-nightly.0
35
+ - Updated dependencies [[`4eee376`](https://github.com/LedgerHQ/ledger-live/commit/4eee3767b513dfb58a156cf2ce8086e31a7d55bf), [`72c2a6c`](https://github.com/LedgerHQ/ledger-live/commit/72c2a6c91cfee66fac3505774ba16049fba1c0cf), [`6312f3a`](https://github.com/LedgerHQ/ledger-live/commit/6312f3a039e3018dfd78d231fa91ecf8fc82a118), [`6792990`](https://github.com/LedgerHQ/ledger-live/commit/6792990d8130ec297192bb7d6b98aef024e81dfa)]:
36
+ - @ledgerhq/types-live@6.79.0-next.0
37
+ - @ledgerhq/cryptoassets@13.23.0-next.0
38
+ - @ledgerhq/types-cryptoassets@7.24.0-next.0
29
39
 
30
40
  ## 5.7.0
31
41
 
@@ -6,14 +6,13 @@ export type BlockInfo = {
6
6
  time?: Date;
7
7
  parent?: BlockInfo;
8
8
  };
9
- export type AssetInfo = {
9
+ type TokenInfoCommon = Record<string, unknown>;
10
+ export type Asset<TokenInfo extends TokenInfoCommon = never> = {
10
11
  type: "native";
11
- } | {
12
- type: string;
13
- assetReference?: string;
14
- assetOwner?: string;
15
- };
16
- export type Operation<MemoType extends Memo = MemoNotSupported> = {
12
+ } | (TokenInfo extends never ? TokenInfo : {
13
+ type: "token";
14
+ } & TokenInfo);
15
+ export type Operation<AssetInfo extends Asset<TokenInfoCommon> = Asset<TokenInfoCommon>, MemoType extends Memo = MemoNotSupported> = {
17
16
  id: string;
18
17
  type: string;
19
18
  senders: string[];
@@ -47,7 +46,7 @@ export type Transaction = {
47
46
  /**
48
47
  * A block along with its {@link BlockTransaction}, not specific to a particular account/address.
49
48
  */
50
- export type Block = {
49
+ export type Block<AssetType extends Asset<TokenInfoCommon>> = {
51
50
  /** The block metadata. */
52
51
  info: BlockInfo;
53
52
  /**
@@ -56,12 +55,12 @@ export type Block = {
56
55
  * It should include at least all transactions where an EOA is involved, however it is OK to ignore other types of
57
56
  * transactions that cannot cause balance changes (eg: validator vote transactions on Solana).
58
57
  */
59
- transactions: BlockTransaction[];
58
+ transactions: BlockTransaction<AssetType>[];
60
59
  };
61
60
  /**
62
61
  * A transaction belonging to a {@link Block}, not specific to a particular account/address.
63
62
  */
64
- export type BlockTransaction = {
63
+ export type BlockTransaction<AssetType extends Asset<TokenInfoCommon>> = {
65
64
  /** The transaction hash/digest (globally unique identifier). */
66
65
  hash: string;
67
66
  /** If the transaction has been failed, fees have been paid but other balance changes are not effective.*/
@@ -74,7 +73,7 @@ export type BlockTransaction = {
74
73
  *
75
74
  * Note that fees are accounted for separately, so operations must not represent fees.
76
75
  */
77
- operations: BlockOperation[];
76
+ operations: BlockOperation<AssetType>[];
78
77
  /** Network specific details for this transaction. */
79
78
  details?: Record<string, unknown>;
80
79
  /** The fee amount paid for this transaction, in base unit of the network native coin, always positive or zero. */
@@ -83,9 +82,9 @@ export type BlockTransaction = {
83
82
  feesPayer: string;
84
83
  };
85
84
  /** An operation belonging to a {@link BlockTransaction}. */
86
- export type BlockOperation = TransferBlockOperation | OtherBlockOperation;
85
+ export type BlockOperation<AssetType extends Asset<TokenInfoCommon>> = TransferBlockOperation<AssetType> | OtherBlockOperation;
87
86
  /** A asset transfer that occurred in a {@link BlockTransaction}. */
88
- export type TransferBlockOperation = {
87
+ export type TransferBlockOperation<AssetType extends Asset<TokenInfoCommon>> = {
89
88
  /** Operation type discriminator. */
90
89
  type: "transfer";
91
90
  /** The impacted address (can be sender or recipient based on signum of <code>amount</code>}. */
@@ -93,7 +92,7 @@ export type TransferBlockOperation = {
93
92
  /** The peer participant in the transfer (optional as it may be not known). */
94
93
  peer?: string;
95
94
  /** The transferred asset. */
96
- asset: AssetInfo;
95
+ asset: AssetType;
97
96
  /**
98
97
  * The signed amount of the transfer, i.e. impact of the transfer on <code>address</code> balance (positive for
99
98
  * incoming, negative for outgoing).
@@ -114,7 +113,7 @@ export type Account = {
114
113
  balance: bigint;
115
114
  currencyUnit: Unit;
116
115
  };
117
- export type Balance = {
116
+ export type Balance<AssetInfo extends Asset<TokenInfoCommon>> = {
118
117
  value: bigint;
119
118
  locked?: bigint;
120
119
  asset: AssetInfo;
@@ -141,7 +140,7 @@ export interface TypedMapMemo<KindToValueMap extends Record<string, unknown>> ex
141
140
  type MaybeMemo<MemoType extends Memo> = MemoType extends MemoNotSupported ? {} : {
142
141
  memo: MemoType;
143
142
  };
144
- export type TransactionIntent<MemoType extends Memo = MemoNotSupported> = {
143
+ export type TransactionIntent<AssetInfo extends Asset<TokenInfoCommon>, MemoType extends Memo = MemoNotSupported> = {
145
144
  type: string;
146
145
  sender: string;
147
146
  senderPublicKey?: string;
@@ -175,21 +174,21 @@ export type AccountInfo = {
175
174
  ownerCount: number;
176
175
  sequence: number;
177
176
  };
178
- export type AlpacaApi<MemoType extends Memo = MemoNotSupported> = {
177
+ export type AlpacaApi<AssetInfo extends Asset<TokenInfoCommon>, MemoType extends Memo = MemoNotSupported> = {
179
178
  broadcast: (tx: string, broadcastConfig?: BroadcastConfig) => Promise<string>;
180
179
  combine: (tx: string, signature: string, pubkey?: string) => string | Promise<string>;
181
- estimateFees: (transactionIntent: TransactionIntent<MemoType>) => Promise<FeeEstimation>;
182
- craftTransaction: (transactionIntent: TransactionIntent<MemoType>, customFees?: bigint) => Promise<string>;
183
- getBalance: (address: string) => Promise<Balance[]>;
180
+ estimateFees: (transactionIntent: TransactionIntent<AssetInfo, MemoType>) => Promise<FeeEstimation>;
181
+ craftTransaction: (transactionIntent: TransactionIntent<AssetInfo, MemoType>, customFees?: bigint) => Promise<string>;
182
+ getBalance: (address: string) => Promise<Balance<AssetInfo>[]>;
184
183
  lastBlock: () => Promise<BlockInfo>;
185
184
  getBlockInfo: (height: number) => Promise<BlockInfo>;
186
- getBlock: (height: number) => Promise<Block>;
187
- listOperations: (address: string, pagination: Pagination) => Promise<[Operation[], string]>;
185
+ getBlock: (height: number) => Promise<Block<AssetInfo>>;
186
+ listOperations: (address: string, pagination: Pagination) => Promise<[Operation<AssetInfo>[], string]>;
188
187
  };
189
188
  export type BridgeApi = {
190
189
  validateIntent: (account: Account, transaction: Transaction) => Promise<TransactionValidation>;
191
190
  getAccountInfo: (address: string) => Promise<AccountInfo>;
192
191
  };
193
- export type Api<MemoType extends Memo = MemoNotSupported> = AlpacaApi<MemoType> & BridgeApi;
192
+ export type Api<AssetInfo extends Asset<TokenInfoCommon>, MemoType extends Memo = MemoNotSupported> = AlpacaApi<AssetInfo, MemoType> & BridgeApi;
194
193
  export {};
195
194
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/api/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,MAAM,MAAM,SAAS,GAAG;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IAId,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,SAAS,GACjB;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,GAClB;IACE,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAGN,MAAM,MAAM,SAAS,CAAC,QAAQ,SAAS,IAAI,GAAG,gBAAgB,IAAI;IAChE,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IAEb,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,EAAE,MAAM,EAAE,CAAC;IAErB,KAAK,EAAE,MAAM,CAAC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ACd,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,UAAU,KACnB,OAAO,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC;CAChD,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,cAAc,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,KAAK,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAE/F,cAAc,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC;CAC3D,CAAC;AAEF,MAAM,MAAM,GAAG,CACb,SAAS,SAAS,KAAK,CAAC,eAAe,CAAC,EACxC,QAAQ,SAAS,IAAI,GAAG,gBAAgB,IACtC,SAAS,CAAC,SAAS,EAAE,QAAQ,CAAC,GAAG,SAAS,CAAC"}
@@ -6,14 +6,13 @@ export type BlockInfo = {
6
6
  time?: Date;
7
7
  parent?: BlockInfo;
8
8
  };
9
- export type AssetInfo = {
9
+ type TokenInfoCommon = Record<string, unknown>;
10
+ export type Asset<TokenInfo extends TokenInfoCommon = never> = {
10
11
  type: "native";
11
- } | {
12
- type: string;
13
- assetReference?: string;
14
- assetOwner?: string;
15
- };
16
- export type Operation<MemoType extends Memo = MemoNotSupported> = {
12
+ } | (TokenInfo extends never ? TokenInfo : {
13
+ type: "token";
14
+ } & TokenInfo);
15
+ export type Operation<AssetInfo extends Asset<TokenInfoCommon> = Asset<TokenInfoCommon>, MemoType extends Memo = MemoNotSupported> = {
17
16
  id: string;
18
17
  type: string;
19
18
  senders: string[];
@@ -47,7 +46,7 @@ export type Transaction = {
47
46
  /**
48
47
  * A block along with its {@link BlockTransaction}, not specific to a particular account/address.
49
48
  */
50
- export type Block = {
49
+ export type Block<AssetType extends Asset<TokenInfoCommon>> = {
51
50
  /** The block metadata. */
52
51
  info: BlockInfo;
53
52
  /**
@@ -56,12 +55,12 @@ export type Block = {
56
55
  * It should include at least all transactions where an EOA is involved, however it is OK to ignore other types of
57
56
  * transactions that cannot cause balance changes (eg: validator vote transactions on Solana).
58
57
  */
59
- transactions: BlockTransaction[];
58
+ transactions: BlockTransaction<AssetType>[];
60
59
  };
61
60
  /**
62
61
  * A transaction belonging to a {@link Block}, not specific to a particular account/address.
63
62
  */
64
- export type BlockTransaction = {
63
+ export type BlockTransaction<AssetType extends Asset<TokenInfoCommon>> = {
65
64
  /** The transaction hash/digest (globally unique identifier). */
66
65
  hash: string;
67
66
  /** If the transaction has been failed, fees have been paid but other balance changes are not effective.*/
@@ -74,7 +73,7 @@ export type BlockTransaction = {
74
73
  *
75
74
  * Note that fees are accounted for separately, so operations must not represent fees.
76
75
  */
77
- operations: BlockOperation[];
76
+ operations: BlockOperation<AssetType>[];
78
77
  /** Network specific details for this transaction. */
79
78
  details?: Record<string, unknown>;
80
79
  /** The fee amount paid for this transaction, in base unit of the network native coin, always positive or zero. */
@@ -83,9 +82,9 @@ export type BlockTransaction = {
83
82
  feesPayer: string;
84
83
  };
85
84
  /** An operation belonging to a {@link BlockTransaction}. */
86
- export type BlockOperation = TransferBlockOperation | OtherBlockOperation;
85
+ export type BlockOperation<AssetType extends Asset<TokenInfoCommon>> = TransferBlockOperation<AssetType> | OtherBlockOperation;
87
86
  /** A asset transfer that occurred in a {@link BlockTransaction}. */
88
- export type TransferBlockOperation = {
87
+ export type TransferBlockOperation<AssetType extends Asset<TokenInfoCommon>> = {
89
88
  /** Operation type discriminator. */
90
89
  type: "transfer";
91
90
  /** The impacted address (can be sender or recipient based on signum of <code>amount</code>}. */
@@ -93,7 +92,7 @@ export type TransferBlockOperation = {
93
92
  /** The peer participant in the transfer (optional as it may be not known). */
94
93
  peer?: string;
95
94
  /** The transferred asset. */
96
- asset: AssetInfo;
95
+ asset: AssetType;
97
96
  /**
98
97
  * The signed amount of the transfer, i.e. impact of the transfer on <code>address</code> balance (positive for
99
98
  * incoming, negative for outgoing).
@@ -114,7 +113,7 @@ export type Account = {
114
113
  balance: bigint;
115
114
  currencyUnit: Unit;
116
115
  };
117
- export type Balance = {
116
+ export type Balance<AssetInfo extends Asset<TokenInfoCommon>> = {
118
117
  value: bigint;
119
118
  locked?: bigint;
120
119
  asset: AssetInfo;
@@ -141,7 +140,7 @@ export interface TypedMapMemo<KindToValueMap extends Record<string, unknown>> ex
141
140
  type MaybeMemo<MemoType extends Memo> = MemoType extends MemoNotSupported ? {} : {
142
141
  memo: MemoType;
143
142
  };
144
- export type TransactionIntent<MemoType extends Memo = MemoNotSupported> = {
143
+ export type TransactionIntent<AssetInfo extends Asset<TokenInfoCommon>, MemoType extends Memo = MemoNotSupported> = {
145
144
  type: string;
146
145
  sender: string;
147
146
  senderPublicKey?: string;
@@ -175,21 +174,21 @@ export type AccountInfo = {
175
174
  ownerCount: number;
176
175
  sequence: number;
177
176
  };
178
- export type AlpacaApi<MemoType extends Memo = MemoNotSupported> = {
177
+ export type AlpacaApi<AssetInfo extends Asset<TokenInfoCommon>, MemoType extends Memo = MemoNotSupported> = {
179
178
  broadcast: (tx: string, broadcastConfig?: BroadcastConfig) => Promise<string>;
180
179
  combine: (tx: string, signature: string, pubkey?: string) => string | Promise<string>;
181
- estimateFees: (transactionIntent: TransactionIntent<MemoType>) => Promise<FeeEstimation>;
182
- craftTransaction: (transactionIntent: TransactionIntent<MemoType>, customFees?: bigint) => Promise<string>;
183
- getBalance: (address: string) => Promise<Balance[]>;
180
+ estimateFees: (transactionIntent: TransactionIntent<AssetInfo, MemoType>) => Promise<FeeEstimation>;
181
+ craftTransaction: (transactionIntent: TransactionIntent<AssetInfo, MemoType>, customFees?: bigint) => Promise<string>;
182
+ getBalance: (address: string) => Promise<Balance<AssetInfo>[]>;
184
183
  lastBlock: () => Promise<BlockInfo>;
185
184
  getBlockInfo: (height: number) => Promise<BlockInfo>;
186
- getBlock: (height: number) => Promise<Block>;
187
- listOperations: (address: string, pagination: Pagination) => Promise<[Operation[], string]>;
185
+ getBlock: (height: number) => Promise<Block<AssetInfo>>;
186
+ listOperations: (address: string, pagination: Pagination) => Promise<[Operation<AssetInfo>[], string]>;
188
187
  };
189
188
  export type BridgeApi = {
190
189
  validateIntent: (account: Account, transaction: Transaction) => Promise<TransactionValidation>;
191
190
  getAccountInfo: (address: string) => Promise<AccountInfo>;
192
191
  };
193
- export type Api<MemoType extends Memo = MemoNotSupported> = AlpacaApi<MemoType> & BridgeApi;
192
+ export type Api<AssetInfo extends Asset<TokenInfoCommon>, MemoType extends Memo = MemoNotSupported> = AlpacaApi<AssetInfo, MemoType> & BridgeApi;
194
193
  export {};
195
194
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/api/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,MAAM,MAAM,SAAS,GAAG;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IAId,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,SAAS,GACjB;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,GAClB;IACE,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAGN,MAAM,MAAM,SAAS,CAAC,QAAQ,SAAS,IAAI,GAAG,gBAAgB,IAAI;IAChE,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IAEb,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,EAAE,MAAM,EAAE,CAAC;IAErB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,SAAS,CAAC;IAEjB;;;;OAIG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;IAE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CAAC,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC;CAChD,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,cAAc,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,KAAK,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAE/F,cAAc,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC;CAC3D,CAAC;AAEF,MAAM,MAAM,GAAG,CACb,SAAS,SAAS,KAAK,CAAC,eAAe,CAAC,EACxC,QAAQ,SAAS,IAAI,GAAG,gBAAgB,IACtC,SAAS,CAAC,SAAS,EAAE,QAAQ,CAAC,GAAG,SAAS,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/coin-framework",
3
- "version": "5.8.0-nightly.2",
3
+ "version": "5.8.0",
4
4
  "description": "Ledger framework for Coin integration",
5
5
  "keywords": [
6
6
  "Ledger",
@@ -93,14 +93,14 @@
93
93
  "rxjs": "^7.8.1",
94
94
  "uuid": "11.1.0",
95
95
  "axios": "1.7.7",
96
- "@ledgerhq/cryptoassets": "^13.23.0-nightly.1",
96
+ "@ledgerhq/cryptoassets": "^13.23.0",
97
97
  "@ledgerhq/devices": "8.4.8",
98
98
  "@ledgerhq/errors": "^6.23.0",
99
- "@ledgerhq/live-env": "^2.13.0-nightly.0",
100
- "@ledgerhq/live-network": "^2.0.14-nightly.0",
99
+ "@ledgerhq/live-env": "^2.12.0",
100
+ "@ledgerhq/live-network": "^2.0.13",
101
101
  "@ledgerhq/logs": "^6.13.0",
102
- "@ledgerhq/types-cryptoassets": "^7.24.0-nightly.0",
103
- "@ledgerhq/types-live": "^6.78.1-nightly.0",
102
+ "@ledgerhq/types-cryptoassets": "^7.24.0",
103
+ "@ledgerhq/types-live": "^6.79.0",
104
104
  "@ledgerhq/live-config": "^3.1.0"
105
105
  },
106
106
  "devDependencies": {
package/src/api/types.ts CHANGED
@@ -11,16 +11,16 @@ export type BlockInfo = {
11
11
  parent?: BlockInfo;
12
12
  };
13
13
 
14
- export type AssetInfo =
14
+ type TokenInfoCommon = Record<string, unknown>;
15
+ // TODO add a `token: string` field to the pagination if we really need to support pagination (which is not the case for now)
16
+ export type Asset<TokenInfo extends TokenInfoCommon = never> =
15
17
  | { type: "native" }
16
- | {
17
- type: string; // token, coin, fungible_asset, trc10, trc20, erc20, erc721, erc1155, etc.
18
- assetReference?: string; // contract address (trc20), tokenId (trc10),, etc
19
- assetOwner?: string;
20
- };
21
-
22
- // NOTE: CoreOperation
23
- export type Operation<MemoType extends Memo = MemoNotSupported> = {
18
+ | (TokenInfo extends never ? TokenInfo : { type: "token" } & TokenInfo);
19
+
20
+ export type Operation<
21
+ AssetInfo extends Asset<TokenInfoCommon> = Asset<TokenInfoCommon>,
22
+ MemoType extends Memo = MemoNotSupported,
23
+ > = {
24
24
  id: string;
25
25
  type: string;
26
26
 
@@ -61,7 +61,7 @@ export type Transaction = {
61
61
  /**
62
62
  * A block along with its {@link BlockTransaction}, not specific to a particular account/address.
63
63
  */
64
- export type Block = {
64
+ export type Block<AssetType extends Asset<TokenInfoCommon>> = {
65
65
  /** The block metadata. */
66
66
  info: BlockInfo;
67
67
 
@@ -71,13 +71,13 @@ export type Block = {
71
71
  * It should include at least all transactions where an EOA is involved, however it is OK to ignore other types of
72
72
  * transactions that cannot cause balance changes (eg: validator vote transactions on Solana).
73
73
  */
74
- transactions: BlockTransaction[];
74
+ transactions: BlockTransaction<AssetType>[];
75
75
  };
76
76
 
77
77
  /**
78
78
  * A transaction belonging to a {@link Block}, not specific to a particular account/address.
79
79
  */
80
- export type BlockTransaction = {
80
+ export type BlockTransaction<AssetType extends Asset<TokenInfoCommon>> = {
81
81
  /** The transaction hash/digest (globally unique identifier). */
82
82
  hash: string;
83
83
 
@@ -92,7 +92,7 @@ export type BlockTransaction = {
92
92
  *
93
93
  * Note that fees are accounted for separately, so operations must not represent fees.
94
94
  */
95
- operations: BlockOperation[];
95
+ operations: BlockOperation<AssetType>[];
96
96
 
97
97
  /** Network specific details for this transaction. */
98
98
  details?: Record<string, unknown>;
@@ -105,10 +105,12 @@ export type BlockTransaction = {
105
105
  };
106
106
 
107
107
  /** An operation belonging to a {@link BlockTransaction}. */
108
- export type BlockOperation = TransferBlockOperation | OtherBlockOperation;
108
+ export type BlockOperation<AssetType extends Asset<TokenInfoCommon>> =
109
+ | TransferBlockOperation<AssetType>
110
+ | OtherBlockOperation;
109
111
 
110
112
  /** A asset transfer that occurred in a {@link BlockTransaction}. */
111
- export type TransferBlockOperation = {
113
+ export type TransferBlockOperation<AssetType extends Asset<TokenInfoCommon>> = {
112
114
  /** Operation type discriminator. */
113
115
  type: "transfer";
114
116
 
@@ -119,7 +121,7 @@ export type TransferBlockOperation = {
119
121
  peer?: string;
120
122
 
121
123
  /** The transferred asset. */
122
- asset: AssetInfo;
124
+ asset: AssetType;
123
125
 
124
126
  /**
125
127
  * The signed amount of the transfer, i.e. impact of the transfer on <code>address</code> balance (positive for
@@ -145,7 +147,7 @@ export type Account = {
145
147
  currencyUnit: Unit;
146
148
  };
147
149
 
148
- export type Balance = {
150
+ export type Balance<AssetInfo extends Asset<TokenInfoCommon>> = {
149
151
  value: bigint;
150
152
  locked?: bigint;
151
153
  asset: AssetInfo;
@@ -181,7 +183,10 @@ export interface TypedMapMemo<KindToValueMap extends Record<string, unknown>> ex
181
183
  // eslint-disable-next-line @typescript-eslint/ban-types
182
184
  type MaybeMemo<MemoType extends Memo> = MemoType extends MemoNotSupported ? {} : { memo: MemoType };
183
185
 
184
- export type TransactionIntent<MemoType extends Memo = MemoNotSupported> = {
186
+ export type TransactionIntent<
187
+ AssetInfo extends Asset<TokenInfoCommon>,
188
+ MemoType extends Memo = MemoNotSupported,
189
+ > = {
185
190
  type: string;
186
191
  sender: string;
187
192
  senderPublicKey?: string;
@@ -225,19 +230,27 @@ export type AccountInfo = {
225
230
  sequence: number;
226
231
  };
227
232
 
228
- export type AlpacaApi<MemoType extends Memo = MemoNotSupported> = {
233
+ export type AlpacaApi<
234
+ AssetInfo extends Asset<TokenInfoCommon>,
235
+ MemoType extends Memo = MemoNotSupported,
236
+ > = {
229
237
  broadcast: (tx: string, broadcastConfig?: BroadcastConfig) => Promise<string>;
230
238
  combine: (tx: string, signature: string, pubkey?: string) => string | Promise<string>;
231
- estimateFees: (transactionIntent: TransactionIntent<MemoType>) => Promise<FeeEstimation>;
239
+ estimateFees: (
240
+ transactionIntent: TransactionIntent<AssetInfo, MemoType>,
241
+ ) => Promise<FeeEstimation>;
232
242
  craftTransaction: (
233
- transactionIntent: TransactionIntent<MemoType>,
243
+ transactionIntent: TransactionIntent<AssetInfo, MemoType>,
234
244
  customFees?: bigint,
235
245
  ) => Promise<string>;
236
- getBalance: (address: string) => Promise<Balance[]>;
246
+ getBalance: (address: string) => Promise<Balance<AssetInfo>[]>;
237
247
  lastBlock: () => Promise<BlockInfo>;
238
248
  getBlockInfo: (height: number) => Promise<BlockInfo>;
239
- getBlock: (height: number) => Promise<Block>;
240
- listOperations: (address: string, pagination: Pagination) => Promise<[Operation[], string]>;
249
+ getBlock: (height: number) => Promise<Block<AssetInfo>>;
250
+ listOperations: (
251
+ address: string,
252
+ pagination: Pagination,
253
+ ) => Promise<[Operation<AssetInfo>[], string]>;
241
254
  };
242
255
 
243
256
  export type BridgeApi = {
@@ -246,4 +259,7 @@ export type BridgeApi = {
246
259
  getAccountInfo: (address: string) => Promise<AccountInfo>;
247
260
  };
248
261
 
249
- export type Api<MemoType extends Memo = MemoNotSupported> = AlpacaApi<MemoType> & BridgeApi;
262
+ export type Api<
263
+ AssetInfo extends Asset<TokenInfoCommon>,
264
+ MemoType extends Memo = MemoNotSupported,
265
+ > = AlpacaApi<AssetInfo, MemoType> & BridgeApi;
@@ -32,8 +32,6 @@ exports[`formatCurrencyUnit with custom options with locale de-DE should correct
32
32
 
33
33
  exports[`formatCurrencyUnit with custom options with locale de-DE should correctly format Base unit (ETH) 1`] = `"0,012345678900000000- -ETH"`;
34
34
 
35
- exports[`formatCurrencyUnit with custom options with locale de-DE should correctly format Berachain unit (BERA) 1`] = `"0,012345678900000000- -BERA"`;
36
-
37
35
  exports[`formatCurrencyUnit with custom options with locale de-DE should correctly format Binance Smart Chain unit (BNB) 1`] = `"0,012345678900000000- -BNB"`;
38
36
 
39
37
  exports[`formatCurrencyUnit with custom options with locale de-DE should correctly format BinanceBeaconChain unit (BNB) 1`] = `"12.345.678.900,000000- -BNB"`;
@@ -150,8 +148,6 @@ exports[`formatCurrencyUnit with custom options with locale de-DE should correct
150
148
 
151
149
  exports[`formatCurrencyUnit with custom options with locale de-DE should correctly format Hycon unit (HYCON) 1`] = `"123.456.789,00000000- -HYCON"`;
152
150
 
153
- exports[`formatCurrencyUnit with custom options with locale de-DE should correctly format HyperEVM unit (HYPE) 1`] = `"0,012345678900000000- -HYPE"`;
154
-
155
151
  exports[`formatCurrencyUnit with custom options with locale de-DE should correctly format ICON Berlin Testnet unit (ICX) 1`] = `"0,012345678900000000- -ICX"`;
156
152
 
157
153
  exports[`formatCurrencyUnit with custom options with locale de-DE should correctly format ICON unit (ICX) 1`] = `"0,012345678900000000- -ICX"`;
@@ -268,8 +264,6 @@ exports[`formatCurrencyUnit with custom options with locale de-DE should correct
268
264
 
269
265
  exports[`formatCurrencyUnit with custom options with locale de-DE should correctly format Rootstock unit (RBTC) 1`] = `"0,012345678900000000- -RBTC"`;
270
266
 
271
- exports[`formatCurrencyUnit with custom options with locale de-DE should correctly format SEI Network EVM unit (SEI) 1`] = `"0,012345678900000000- -SEI"`;
272
-
273
267
  exports[`formatCurrencyUnit with custom options with locale de-DE should correctly format Scroll Sepolia unit (ETH) 1`] = `"0,012345678900000000- -ETH"`;
274
268
 
275
269
  exports[`formatCurrencyUnit with custom options with locale de-DE should correctly format Scroll unit (ETH) 1`] = `"0,012345678900000000- -ETH"`;
@@ -388,8 +382,6 @@ exports[`formatCurrencyUnit with custom options with locale en-US should correct
388
382
 
389
383
  exports[`formatCurrencyUnit with custom options with locale en-US should correctly format Base unit (ETH) 1`] = `"0.012345678900000000- -ETH"`;
390
384
 
391
- exports[`formatCurrencyUnit with custom options with locale en-US should correctly format Berachain unit (BERA) 1`] = `"0.012345678900000000- -BERA"`;
392
-
393
385
  exports[`formatCurrencyUnit with custom options with locale en-US should correctly format Binance Smart Chain unit (BNB) 1`] = `"0.012345678900000000- -BNB"`;
394
386
 
395
387
  exports[`formatCurrencyUnit with custom options with locale en-US should correctly format BinanceBeaconChain unit (BNB) 1`] = `"12,345,678,900.000000- -BNB"`;
@@ -506,8 +498,6 @@ exports[`formatCurrencyUnit with custom options with locale en-US should correct
506
498
 
507
499
  exports[`formatCurrencyUnit with custom options with locale en-US should correctly format Hycon unit (HYCON) 1`] = `"123,456,789.00000000- -HYCON"`;
508
500
 
509
- exports[`formatCurrencyUnit with custom options with locale en-US should correctly format HyperEVM unit (HYPE) 1`] = `"0.012345678900000000- -HYPE"`;
510
-
511
501
  exports[`formatCurrencyUnit with custom options with locale en-US should correctly format ICON Berlin Testnet unit (ICX) 1`] = `"0.012345678900000000- -ICX"`;
512
502
 
513
503
  exports[`formatCurrencyUnit with custom options with locale en-US should correctly format ICON unit (ICX) 1`] = `"0.012345678900000000- -ICX"`;
@@ -624,8 +614,6 @@ exports[`formatCurrencyUnit with custom options with locale en-US should correct
624
614
 
625
615
  exports[`formatCurrencyUnit with custom options with locale en-US should correctly format Rootstock unit (RBTC) 1`] = `"0.012345678900000000- -RBTC"`;
626
616
 
627
- exports[`formatCurrencyUnit with custom options with locale en-US should correctly format SEI Network EVM unit (SEI) 1`] = `"0.012345678900000000- -SEI"`;
628
-
629
617
  exports[`formatCurrencyUnit with custom options with locale en-US should correctly format Scroll Sepolia unit (ETH) 1`] = `"0.012345678900000000- -ETH"`;
630
618
 
631
619
  exports[`formatCurrencyUnit with custom options with locale en-US should correctly format Scroll unit (ETH) 1`] = `"0.012345678900000000- -ETH"`;
@@ -744,8 +732,6 @@ exports[`formatCurrencyUnit with custom options with locale es-ES should correct
744
732
 
745
733
  exports[`formatCurrencyUnit with custom options with locale es-ES should correctly format Base unit (ETH) 1`] = `"0,012345678900000000- -ETH"`;
746
734
 
747
- exports[`formatCurrencyUnit with custom options with locale es-ES should correctly format Berachain unit (BERA) 1`] = `"0,012345678900000000- -BERA"`;
748
-
749
735
  exports[`formatCurrencyUnit with custom options with locale es-ES should correctly format Binance Smart Chain unit (BNB) 1`] = `"0,012345678900000000- -BNB"`;
750
736
 
751
737
  exports[`formatCurrencyUnit with custom options with locale es-ES should correctly format BinanceBeaconChain unit (BNB) 1`] = `"12.345.678.900,000000- -BNB"`;
@@ -862,8 +848,6 @@ exports[`formatCurrencyUnit with custom options with locale es-ES should correct
862
848
 
863
849
  exports[`formatCurrencyUnit with custom options with locale es-ES should correctly format Hycon unit (HYCON) 1`] = `"123.456.789,00000000- -HYCON"`;
864
850
 
865
- exports[`formatCurrencyUnit with custom options with locale es-ES should correctly format HyperEVM unit (HYPE) 1`] = `"0,012345678900000000- -HYPE"`;
866
-
867
851
  exports[`formatCurrencyUnit with custom options with locale es-ES should correctly format ICON Berlin Testnet unit (ICX) 1`] = `"0,012345678900000000- -ICX"`;
868
852
 
869
853
  exports[`formatCurrencyUnit with custom options with locale es-ES should correctly format ICON unit (ICX) 1`] = `"0,012345678900000000- -ICX"`;
@@ -980,8 +964,6 @@ exports[`formatCurrencyUnit with custom options with locale es-ES should correct
980
964
 
981
965
  exports[`formatCurrencyUnit with custom options with locale es-ES should correctly format Rootstock unit (RBTC) 1`] = `"0,012345678900000000- -RBTC"`;
982
966
 
983
- exports[`formatCurrencyUnit with custom options with locale es-ES should correctly format SEI Network EVM unit (SEI) 1`] = `"0,012345678900000000- -SEI"`;
984
-
985
967
  exports[`formatCurrencyUnit with custom options with locale es-ES should correctly format Scroll Sepolia unit (ETH) 1`] = `"0,012345678900000000- -ETH"`;
986
968
 
987
969
  exports[`formatCurrencyUnit with custom options with locale es-ES should correctly format Scroll unit (ETH) 1`] = `"0,012345678900000000- -ETH"`;
@@ -1100,8 +1082,6 @@ exports[`formatCurrencyUnit with custom options with locale fr-FR should correct
1100
1082
 
1101
1083
  exports[`formatCurrencyUnit with custom options with locale fr-FR should correctly format Base unit (ETH) 1`] = `"0,012345678900000000- -ETH"`;
1102
1084
 
1103
- exports[`formatCurrencyUnit with custom options with locale fr-FR should correctly format Berachain unit (BERA) 1`] = `"0,012345678900000000- -BERA"`;
1104
-
1105
1085
  exports[`formatCurrencyUnit with custom options with locale fr-FR should correctly format Binance Smart Chain unit (BNB) 1`] = `"0,012345678900000000- -BNB"`;
1106
1086
 
1107
1087
  exports[`formatCurrencyUnit with custom options with locale fr-FR should correctly format BinanceBeaconChain unit (BNB) 1`] = `"12 345 678 900,000000- -BNB"`;
@@ -1218,8 +1198,6 @@ exports[`formatCurrencyUnit with custom options with locale fr-FR should correct
1218
1198
 
1219
1199
  exports[`formatCurrencyUnit with custom options with locale fr-FR should correctly format Hycon unit (HYCON) 1`] = `"123 456 789,00000000- -HYCON"`;
1220
1200
 
1221
- exports[`formatCurrencyUnit with custom options with locale fr-FR should correctly format HyperEVM unit (HYPE) 1`] = `"0,012345678900000000- -HYPE"`;
1222
-
1223
1201
  exports[`formatCurrencyUnit with custom options with locale fr-FR should correctly format ICON Berlin Testnet unit (ICX) 1`] = `"0,012345678900000000- -ICX"`;
1224
1202
 
1225
1203
  exports[`formatCurrencyUnit with custom options with locale fr-FR should correctly format ICON unit (ICX) 1`] = `"0,012345678900000000- -ICX"`;
@@ -1336,8 +1314,6 @@ exports[`formatCurrencyUnit with custom options with locale fr-FR should correct
1336
1314
 
1337
1315
  exports[`formatCurrencyUnit with custom options with locale fr-FR should correctly format Rootstock unit (RBTC) 1`] = `"0,012345678900000000- -RBTC"`;
1338
1316
 
1339
- exports[`formatCurrencyUnit with custom options with locale fr-FR should correctly format SEI Network EVM unit (SEI) 1`] = `"0,012345678900000000- -SEI"`;
1340
-
1341
1317
  exports[`formatCurrencyUnit with custom options with locale fr-FR should correctly format Scroll Sepolia unit (ETH) 1`] = `"0,012345678900000000- -ETH"`;
1342
1318
 
1343
1319
  exports[`formatCurrencyUnit with custom options with locale fr-FR should correctly format Scroll unit (ETH) 1`] = `"0,012345678900000000- -ETH"`;
@@ -1456,8 +1432,6 @@ exports[`formatCurrencyUnit with custom options with locale ja-JP should correct
1456
1432
 
1457
1433
  exports[`formatCurrencyUnit with custom options with locale ja-JP should correctly format Base unit (ETH) 1`] = `"0.012345678900000000- -ETH"`;
1458
1434
 
1459
- exports[`formatCurrencyUnit with custom options with locale ja-JP should correctly format Berachain unit (BERA) 1`] = `"0.012345678900000000- -BERA"`;
1460
-
1461
1435
  exports[`formatCurrencyUnit with custom options with locale ja-JP should correctly format Binance Smart Chain unit (BNB) 1`] = `"0.012345678900000000- -BNB"`;
1462
1436
 
1463
1437
  exports[`formatCurrencyUnit with custom options with locale ja-JP should correctly format BinanceBeaconChain unit (BNB) 1`] = `"12,345,678,900.000000- -BNB"`;
@@ -1574,8 +1548,6 @@ exports[`formatCurrencyUnit with custom options with locale ja-JP should correct
1574
1548
 
1575
1549
  exports[`formatCurrencyUnit with custom options with locale ja-JP should correctly format Hycon unit (HYCON) 1`] = `"123,456,789.00000000- -HYCON"`;
1576
1550
 
1577
- exports[`formatCurrencyUnit with custom options with locale ja-JP should correctly format HyperEVM unit (HYPE) 1`] = `"0.012345678900000000- -HYPE"`;
1578
-
1579
1551
  exports[`formatCurrencyUnit with custom options with locale ja-JP should correctly format ICON Berlin Testnet unit (ICX) 1`] = `"0.012345678900000000- -ICX"`;
1580
1552
 
1581
1553
  exports[`formatCurrencyUnit with custom options with locale ja-JP should correctly format ICON unit (ICX) 1`] = `"0.012345678900000000- -ICX"`;
@@ -1692,8 +1664,6 @@ exports[`formatCurrencyUnit with custom options with locale ja-JP should correct
1692
1664
 
1693
1665
  exports[`formatCurrencyUnit with custom options with locale ja-JP should correctly format Rootstock unit (RBTC) 1`] = `"0.012345678900000000- -RBTC"`;
1694
1666
 
1695
- exports[`formatCurrencyUnit with custom options with locale ja-JP should correctly format SEI Network EVM unit (SEI) 1`] = `"0.012345678900000000- -SEI"`;
1696
-
1697
1667
  exports[`formatCurrencyUnit with custom options with locale ja-JP should correctly format Scroll Sepolia unit (ETH) 1`] = `"0.012345678900000000- -ETH"`;
1698
1668
 
1699
1669
  exports[`formatCurrencyUnit with custom options with locale ja-JP should correctly format Scroll unit (ETH) 1`] = `"0.012345678900000000- -ETH"`;
@@ -1812,8 +1782,6 @@ exports[`formatCurrencyUnit with custom options with locale ko-KR should correct
1812
1782
 
1813
1783
  exports[`formatCurrencyUnit with custom options with locale ko-KR should correctly format Base unit (ETH) 1`] = `"0.012345678900000000- -ETH"`;
1814
1784
 
1815
- exports[`formatCurrencyUnit with custom options with locale ko-KR should correctly format Berachain unit (BERA) 1`] = `"0.012345678900000000- -BERA"`;
1816
-
1817
1785
  exports[`formatCurrencyUnit with custom options with locale ko-KR should correctly format Binance Smart Chain unit (BNB) 1`] = `"0.012345678900000000- -BNB"`;
1818
1786
 
1819
1787
  exports[`formatCurrencyUnit with custom options with locale ko-KR should correctly format BinanceBeaconChain unit (BNB) 1`] = `"12,345,678,900.000000- -BNB"`;
@@ -1930,8 +1898,6 @@ exports[`formatCurrencyUnit with custom options with locale ko-KR should correct
1930
1898
 
1931
1899
  exports[`formatCurrencyUnit with custom options with locale ko-KR should correctly format Hycon unit (HYCON) 1`] = `"123,456,789.00000000- -HYCON"`;
1932
1900
 
1933
- exports[`formatCurrencyUnit with custom options with locale ko-KR should correctly format HyperEVM unit (HYPE) 1`] = `"0.012345678900000000- -HYPE"`;
1934
-
1935
1901
  exports[`formatCurrencyUnit with custom options with locale ko-KR should correctly format ICON Berlin Testnet unit (ICX) 1`] = `"0.012345678900000000- -ICX"`;
1936
1902
 
1937
1903
  exports[`formatCurrencyUnit with custom options with locale ko-KR should correctly format ICON unit (ICX) 1`] = `"0.012345678900000000- -ICX"`;
@@ -2048,8 +2014,6 @@ exports[`formatCurrencyUnit with custom options with locale ko-KR should correct
2048
2014
 
2049
2015
  exports[`formatCurrencyUnit with custom options with locale ko-KR should correctly format Rootstock unit (RBTC) 1`] = `"0.012345678900000000- -RBTC"`;
2050
2016
 
2051
- exports[`formatCurrencyUnit with custom options with locale ko-KR should correctly format SEI Network EVM unit (SEI) 1`] = `"0.012345678900000000- -SEI"`;
2052
-
2053
2017
  exports[`formatCurrencyUnit with custom options with locale ko-KR should correctly format Scroll Sepolia unit (ETH) 1`] = `"0.012345678900000000- -ETH"`;
2054
2018
 
2055
2019
  exports[`formatCurrencyUnit with custom options with locale ko-KR should correctly format Scroll unit (ETH) 1`] = `"0.012345678900000000- -ETH"`;
@@ -2168,8 +2132,6 @@ exports[`formatCurrencyUnit with custom options with locale pt-BR should correct
2168
2132
 
2169
2133
  exports[`formatCurrencyUnit with custom options with locale pt-BR should correctly format Base unit (ETH) 1`] = `"0,012345678900000000- -ETH"`;
2170
2134
 
2171
- exports[`formatCurrencyUnit with custom options with locale pt-BR should correctly format Berachain unit (BERA) 1`] = `"0,012345678900000000- -BERA"`;
2172
-
2173
2135
  exports[`formatCurrencyUnit with custom options with locale pt-BR should correctly format Binance Smart Chain unit (BNB) 1`] = `"0,012345678900000000- -BNB"`;
2174
2136
 
2175
2137
  exports[`formatCurrencyUnit with custom options with locale pt-BR should correctly format BinanceBeaconChain unit (BNB) 1`] = `"12.345.678.900,000000- -BNB"`;
@@ -2286,8 +2248,6 @@ exports[`formatCurrencyUnit with custom options with locale pt-BR should correct
2286
2248
 
2287
2249
  exports[`formatCurrencyUnit with custom options with locale pt-BR should correctly format Hycon unit (HYCON) 1`] = `"123.456.789,00000000- -HYCON"`;
2288
2250
 
2289
- exports[`formatCurrencyUnit with custom options with locale pt-BR should correctly format HyperEVM unit (HYPE) 1`] = `"0,012345678900000000- -HYPE"`;
2290
-
2291
2251
  exports[`formatCurrencyUnit with custom options with locale pt-BR should correctly format ICON Berlin Testnet unit (ICX) 1`] = `"0,012345678900000000- -ICX"`;
2292
2252
 
2293
2253
  exports[`formatCurrencyUnit with custom options with locale pt-BR should correctly format ICON unit (ICX) 1`] = `"0,012345678900000000- -ICX"`;
@@ -2404,8 +2364,6 @@ exports[`formatCurrencyUnit with custom options with locale pt-BR should correct
2404
2364
 
2405
2365
  exports[`formatCurrencyUnit with custom options with locale pt-BR should correctly format Rootstock unit (RBTC) 1`] = `"0,012345678900000000- -RBTC"`;
2406
2366
 
2407
- exports[`formatCurrencyUnit with custom options with locale pt-BR should correctly format SEI Network EVM unit (SEI) 1`] = `"0,012345678900000000- -SEI"`;
2408
-
2409
2367
  exports[`formatCurrencyUnit with custom options with locale pt-BR should correctly format Scroll Sepolia unit (ETH) 1`] = `"0,012345678900000000- -ETH"`;
2410
2368
 
2411
2369
  exports[`formatCurrencyUnit with custom options with locale pt-BR should correctly format Scroll unit (ETH) 1`] = `"0,012345678900000000- -ETH"`;
@@ -2524,8 +2482,6 @@ exports[`formatCurrencyUnit with custom options with locale ru-RU should correct
2524
2482
 
2525
2483
  exports[`formatCurrencyUnit with custom options with locale ru-RU should correctly format Base unit (ETH) 1`] = `"0,012345678900000000- -ETH"`;
2526
2484
 
2527
- exports[`formatCurrencyUnit with custom options with locale ru-RU should correctly format Berachain unit (BERA) 1`] = `"0,012345678900000000- -BERA"`;
2528
-
2529
2485
  exports[`formatCurrencyUnit with custom options with locale ru-RU should correctly format Binance Smart Chain unit (BNB) 1`] = `"0,012345678900000000- -BNB"`;
2530
2486
 
2531
2487
  exports[`formatCurrencyUnit with custom options with locale ru-RU should correctly format BinanceBeaconChain unit (BNB) 1`] = `"12 345 678 900,000000- -BNB"`;
@@ -2642,8 +2598,6 @@ exports[`formatCurrencyUnit with custom options with locale ru-RU should correct
2642
2598
 
2643
2599
  exports[`formatCurrencyUnit with custom options with locale ru-RU should correctly format Hycon unit (HYCON) 1`] = `"123 456 789,00000000- -HYCON"`;
2644
2600
 
2645
- exports[`formatCurrencyUnit with custom options with locale ru-RU should correctly format HyperEVM unit (HYPE) 1`] = `"0,012345678900000000- -HYPE"`;
2646
-
2647
2601
  exports[`formatCurrencyUnit with custom options with locale ru-RU should correctly format ICON Berlin Testnet unit (ICX) 1`] = `"0,012345678900000000- -ICX"`;
2648
2602
 
2649
2603
  exports[`formatCurrencyUnit with custom options with locale ru-RU should correctly format ICON unit (ICX) 1`] = `"0,012345678900000000- -ICX"`;
@@ -2760,8 +2714,6 @@ exports[`formatCurrencyUnit with custom options with locale ru-RU should correct
2760
2714
 
2761
2715
  exports[`formatCurrencyUnit with custom options with locale ru-RU should correctly format Rootstock unit (RBTC) 1`] = `"0,012345678900000000- -RBTC"`;
2762
2716
 
2763
- exports[`formatCurrencyUnit with custom options with locale ru-RU should correctly format SEI Network EVM unit (SEI) 1`] = `"0,012345678900000000- -SEI"`;
2764
-
2765
2717
  exports[`formatCurrencyUnit with custom options with locale ru-RU should correctly format Scroll Sepolia unit (ETH) 1`] = `"0,012345678900000000- -ETH"`;
2766
2718
 
2767
2719
  exports[`formatCurrencyUnit with custom options with locale ru-RU should correctly format Scroll unit (ETH) 1`] = `"0,012345678900000000- -ETH"`;
@@ -2880,8 +2832,6 @@ exports[`formatCurrencyUnit with custom options with locale tr-TR should correct
2880
2832
 
2881
2833
  exports[`formatCurrencyUnit with custom options with locale tr-TR should correctly format Base unit (ETH) 1`] = `"0,012345678900000000- -ETH"`;
2882
2834
 
2883
- exports[`formatCurrencyUnit with custom options with locale tr-TR should correctly format Berachain unit (BERA) 1`] = `"0,012345678900000000- -BERA"`;
2884
-
2885
2835
  exports[`formatCurrencyUnit with custom options with locale tr-TR should correctly format Binance Smart Chain unit (BNB) 1`] = `"0,012345678900000000- -BNB"`;
2886
2836
 
2887
2837
  exports[`formatCurrencyUnit with custom options with locale tr-TR should correctly format BinanceBeaconChain unit (BNB) 1`] = `"12.345.678.900,000000- -BNB"`;
@@ -2998,8 +2948,6 @@ exports[`formatCurrencyUnit with custom options with locale tr-TR should correct
2998
2948
 
2999
2949
  exports[`formatCurrencyUnit with custom options with locale tr-TR should correctly format Hycon unit (HYCON) 1`] = `"123.456.789,00000000- -HYCON"`;
3000
2950
 
3001
- exports[`formatCurrencyUnit with custom options with locale tr-TR should correctly format HyperEVM unit (HYPE) 1`] = `"0,012345678900000000- -HYPE"`;
3002
-
3003
2951
  exports[`formatCurrencyUnit with custom options with locale tr-TR should correctly format ICON Berlin Testnet unit (ICX) 1`] = `"0,012345678900000000- -ICX"`;
3004
2952
 
3005
2953
  exports[`formatCurrencyUnit with custom options with locale tr-TR should correctly format ICON unit (ICX) 1`] = `"0,012345678900000000- -ICX"`;
@@ -3116,8 +3064,6 @@ exports[`formatCurrencyUnit with custom options with locale tr-TR should correct
3116
3064
 
3117
3065
  exports[`formatCurrencyUnit with custom options with locale tr-TR should correctly format Rootstock unit (RBTC) 1`] = `"0,012345678900000000- -RBTC"`;
3118
3066
 
3119
- exports[`formatCurrencyUnit with custom options with locale tr-TR should correctly format SEI Network EVM unit (SEI) 1`] = `"0,012345678900000000- -SEI"`;
3120
-
3121
3067
  exports[`formatCurrencyUnit with custom options with locale tr-TR should correctly format Scroll Sepolia unit (ETH) 1`] = `"0,012345678900000000- -ETH"`;
3122
3068
 
3123
3069
  exports[`formatCurrencyUnit with custom options with locale tr-TR should correctly format Scroll unit (ETH) 1`] = `"0,012345678900000000- -ETH"`;
@@ -3236,8 +3182,6 @@ exports[`formatCurrencyUnit with custom options with locale zh-CN should correct
3236
3182
 
3237
3183
  exports[`formatCurrencyUnit with custom options with locale zh-CN should correctly format Base unit (ETH) 1`] = `"0.012345678900000000- -ETH"`;
3238
3184
 
3239
- exports[`formatCurrencyUnit with custom options with locale zh-CN should correctly format Berachain unit (BERA) 1`] = `"0.012345678900000000- -BERA"`;
3240
-
3241
3185
  exports[`formatCurrencyUnit with custom options with locale zh-CN should correctly format Binance Smart Chain unit (BNB) 1`] = `"0.012345678900000000- -BNB"`;
3242
3186
 
3243
3187
  exports[`formatCurrencyUnit with custom options with locale zh-CN should correctly format BinanceBeaconChain unit (BNB) 1`] = `"12,345,678,900.000000- -BNB"`;
@@ -3354,8 +3298,6 @@ exports[`formatCurrencyUnit with custom options with locale zh-CN should correct
3354
3298
 
3355
3299
  exports[`formatCurrencyUnit with custom options with locale zh-CN should correctly format Hycon unit (HYCON) 1`] = `"123,456,789.00000000- -HYCON"`;
3356
3300
 
3357
- exports[`formatCurrencyUnit with custom options with locale zh-CN should correctly format HyperEVM unit (HYPE) 1`] = `"0.012345678900000000- -HYPE"`;
3358
-
3359
3301
  exports[`formatCurrencyUnit with custom options with locale zh-CN should correctly format ICON Berlin Testnet unit (ICX) 1`] = `"0.012345678900000000- -ICX"`;
3360
3302
 
3361
3303
  exports[`formatCurrencyUnit with custom options with locale zh-CN should correctly format ICON unit (ICX) 1`] = `"0.012345678900000000- -ICX"`;
@@ -3472,8 +3414,6 @@ exports[`formatCurrencyUnit with custom options with locale zh-CN should correct
3472
3414
 
3473
3415
  exports[`formatCurrencyUnit with custom options with locale zh-CN should correctly format Rootstock unit (RBTC) 1`] = `"0.012345678900000000- -RBTC"`;
3474
3416
 
3475
- exports[`formatCurrencyUnit with custom options with locale zh-CN should correctly format SEI Network EVM unit (SEI) 1`] = `"0.012345678900000000- -SEI"`;
3476
-
3477
3417
  exports[`formatCurrencyUnit with custom options with locale zh-CN should correctly format Scroll Sepolia unit (ETH) 1`] = `"0.012345678900000000- -ETH"`;
3478
3418
 
3479
3419
  exports[`formatCurrencyUnit with custom options with locale zh-CN should correctly format Scroll unit (ETH) 1`] = `"0.012345678900000000- -ETH"`;
@@ -3592,8 +3532,6 @@ exports[`formatCurrencyUnit with default options should correctly format Base Se
3592
3532
 
3593
3533
  exports[`formatCurrencyUnit with default options should correctly format Base unit (ETH) 1`] = `"0.0123456"`;
3594
3534
 
3595
- exports[`formatCurrencyUnit with default options should correctly format Berachain unit (BERA) 1`] = `"0.0123456"`;
3596
-
3597
3535
  exports[`formatCurrencyUnit with default options should correctly format Binance Smart Chain unit (BNB) 1`] = `"0.0123456"`;
3598
3536
 
3599
3537
  exports[`formatCurrencyUnit with default options should correctly format BinanceBeaconChain unit (BNB) 1`] = `"12,345,678,900"`;
@@ -3710,8 +3648,6 @@ exports[`formatCurrencyUnit with default options should correctly format Horizen
3710
3648
 
3711
3649
  exports[`formatCurrencyUnit with default options should correctly format Hycon unit (HYCON) 1`] = `"123,456,789"`;
3712
3650
 
3713
- exports[`formatCurrencyUnit with default options should correctly format HyperEVM unit (HYPE) 1`] = `"0.0123456"`;
3714
-
3715
3651
  exports[`formatCurrencyUnit with default options should correctly format ICON Berlin Testnet unit (ICX) 1`] = `"0.0123456"`;
3716
3652
 
3717
3653
  exports[`formatCurrencyUnit with default options should correctly format ICON unit (ICX) 1`] = `"0.0123456"`;
@@ -3828,8 +3764,6 @@ exports[`formatCurrencyUnit with default options should correctly format Rise un
3828
3764
 
3829
3765
  exports[`formatCurrencyUnit with default options should correctly format Rootstock unit (RBTC) 1`] = `"0.0123456"`;
3830
3766
 
3831
- exports[`formatCurrencyUnit with default options should correctly format SEI Network EVM unit (SEI) 1`] = `"0.0123456"`;
3832
-
3833
3767
  exports[`formatCurrencyUnit with default options should correctly format Scroll Sepolia unit (ETH) 1`] = `"0.0123456"`;
3834
3768
 
3835
3769
  exports[`formatCurrencyUnit with default options should correctly format Scroll unit (ETH) 1`] = `"0.0123456"`;