@ledgerhq/coin-framework 6.1.0-nightly.3 → 6.1.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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +19 -23
- package/lib/api/types.d.ts +7 -34
- package/lib/api/types.d.ts.map +1 -1
- package/lib-es/api/types.d.ts +7 -34
- package/lib-es/api/types.d.ts.map +1 -1
- package/package.json +9 -9
- package/src/api/types.ts +12 -50
- package/src/currencies/__snapshots__/formatCurrencyUnit.test.ts.snap +22 -22
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
> @ledgerhq/coin-framework@6.1.0
|
|
2
|
+
> @ledgerhq/coin-framework@6.1.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,40 +1,36 @@
|
|
|
1
1
|
# @ledgerhq/coin-framework
|
|
2
2
|
|
|
3
|
-
## 6.1.0
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- Updated dependencies [[`67ec10b`](https://github.com/LedgerHQ/ledger-live/commit/67ec10b773b4a6b512a8a6485940fa0abd41c3ef)]:
|
|
8
|
-
- @ledgerhq/cryptoassets@13.25.0-nightly.3
|
|
9
|
-
|
|
10
|
-
## 6.1.0-nightly.2
|
|
3
|
+
## 6.1.0
|
|
11
4
|
|
|
12
5
|
### Minor Changes
|
|
13
6
|
|
|
14
|
-
- [#
|
|
7
|
+
- [#11016](https://github.com/LedgerHQ/ledger-live/pull/11016) [`a8b4f57`](https://github.com/LedgerHQ/ledger-live/commit/a8b4f57bf7d82e6c2444a65901e927c3c3d64412) Thanks [@jnicoulaud-ledger](https://github.com/jnicoulaud-ledger)! - [coin-modules] add coin-framework staking API + SUI implementation
|
|
15
8
|
|
|
16
9
|
### Patch Changes
|
|
17
10
|
|
|
18
|
-
- Updated dependencies [[`
|
|
19
|
-
- @ledgerhq/
|
|
20
|
-
- @ledgerhq/
|
|
11
|
+
- Updated dependencies [[`75a08cc`](https://github.com/LedgerHQ/ledger-live/commit/75a08cc3061347bae98ddef7ac3cdcd6181ddab5), [`0c8486e`](https://github.com/LedgerHQ/ledger-live/commit/0c8486ea830e9e2abf1dfc5d108117e1db733072), [`354fa83`](https://github.com/LedgerHQ/ledger-live/commit/354fa83c8107cf8e6b56a8b306569ee65980e10c), [`67e2a7c`](https://github.com/LedgerHQ/ledger-live/commit/67e2a7c5a74d000f22684254778dfec5b8b5163d)]:
|
|
12
|
+
- @ledgerhq/live-env@2.14.0
|
|
13
|
+
- @ledgerhq/cryptoassets@13.25.0
|
|
14
|
+
- @ledgerhq/errors@6.24.0
|
|
15
|
+
- @ledgerhq/types-live@6.81.0
|
|
16
|
+
- @ledgerhq/devices@8.5.0
|
|
17
|
+
- @ledgerhq/live-network@2.0.15
|
|
21
18
|
|
|
22
|
-
## 6.0
|
|
19
|
+
## 6.1.0-next.0
|
|
23
20
|
|
|
24
|
-
###
|
|
25
|
-
|
|
26
|
-
- Updated dependencies [[`d41fc9c`](https://github.com/LedgerHQ/ledger-live/commit/d41fc9c458050ef1234c04af9642321c41cecda1)]:
|
|
27
|
-
- @ledgerhq/cryptoassets@13.25.0-nightly.1
|
|
28
|
-
- @ledgerhq/types-live@6.80.0
|
|
21
|
+
### Minor Changes
|
|
29
22
|
|
|
30
|
-
|
|
23
|
+
- [#11016](https://github.com/LedgerHQ/ledger-live/pull/11016) [`a8b4f57`](https://github.com/LedgerHQ/ledger-live/commit/a8b4f57bf7d82e6c2444a65901e927c3c3d64412) Thanks [@jnicoulaud-ledger](https://github.com/jnicoulaud-ledger)! - [coin-modules] add coin-framework staking API + SUI implementation
|
|
31
24
|
|
|
32
25
|
### Patch Changes
|
|
33
26
|
|
|
34
|
-
- Updated dependencies [[`75a08cc`](https://github.com/LedgerHQ/ledger-live/commit/75a08cc3061347bae98ddef7ac3cdcd6181ddab5)]:
|
|
35
|
-
- @ledgerhq/live-env@2.14.0-
|
|
36
|
-
- @ledgerhq/cryptoassets@13.
|
|
37
|
-
- @ledgerhq/
|
|
27
|
+
- Updated dependencies [[`75a08cc`](https://github.com/LedgerHQ/ledger-live/commit/75a08cc3061347bae98ddef7ac3cdcd6181ddab5), [`0c8486e`](https://github.com/LedgerHQ/ledger-live/commit/0c8486ea830e9e2abf1dfc5d108117e1db733072), [`354fa83`](https://github.com/LedgerHQ/ledger-live/commit/354fa83c8107cf8e6b56a8b306569ee65980e10c), [`67e2a7c`](https://github.com/LedgerHQ/ledger-live/commit/67e2a7c5a74d000f22684254778dfec5b8b5163d)]:
|
|
28
|
+
- @ledgerhq/live-env@2.14.0-next.0
|
|
29
|
+
- @ledgerhq/cryptoassets@13.25.0-next.0
|
|
30
|
+
- @ledgerhq/errors@6.24.0-next.0
|
|
31
|
+
- @ledgerhq/types-live@6.81.0-next.0
|
|
32
|
+
- @ledgerhq/devices@8.5.0-next.0
|
|
33
|
+
- @ledgerhq/live-network@2.0.15-next.0
|
|
38
34
|
|
|
39
35
|
## 6.0.0
|
|
40
36
|
|
package/lib/api/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Unit } from "@ledgerhq/types-cryptoassets";
|
|
1
2
|
import { BroadcastConfig } from "@ledgerhq/types-live";
|
|
2
3
|
export type BlockInfo = {
|
|
3
4
|
height: number;
|
|
@@ -5,23 +6,12 @@ export type BlockInfo = {
|
|
|
5
6
|
time?: Date;
|
|
6
7
|
parent?: BlockInfo;
|
|
7
8
|
};
|
|
8
|
-
export type Unit = {
|
|
9
|
-
name: string;
|
|
10
|
-
code: string;
|
|
11
|
-
magnitude: number;
|
|
12
|
-
showAllDigits?: boolean;
|
|
13
|
-
prefixCode?: boolean;
|
|
14
|
-
};
|
|
15
9
|
export type AssetInfo = {
|
|
16
10
|
type: "native";
|
|
17
|
-
name?: string;
|
|
18
|
-
unit?: Unit;
|
|
19
11
|
} | {
|
|
20
12
|
type: string;
|
|
21
13
|
assetReference?: string;
|
|
22
14
|
assetOwner?: string;
|
|
23
|
-
name?: string;
|
|
24
|
-
unit?: Unit;
|
|
25
15
|
};
|
|
26
16
|
export type Operation<MemoType extends Memo = MemoNotSupported> = {
|
|
27
17
|
id: string;
|
|
@@ -41,7 +31,6 @@ export type Operation<MemoType extends Memo = MemoNotSupported> = {
|
|
|
41
31
|
* This can include things like status, error messages, swap info, etc.
|
|
42
32
|
*/
|
|
43
33
|
details?: Record<string, unknown>;
|
|
44
|
-
assetInfo?: AssetInfo;
|
|
45
34
|
tx: {
|
|
46
35
|
hash: string;
|
|
47
36
|
block: BlockInfo;
|
|
@@ -54,9 +43,6 @@ export type Transaction = {
|
|
|
54
43
|
recipient: string;
|
|
55
44
|
amount: bigint;
|
|
56
45
|
fee: bigint;
|
|
57
|
-
networkInfo?: {
|
|
58
|
-
fees?: bigint;
|
|
59
|
-
};
|
|
60
46
|
} & Record<string, unknown>;
|
|
61
47
|
/**
|
|
62
48
|
* A block along with its {@link BlockTransaction}, not specific to a particular account/address.
|
|
@@ -127,7 +113,6 @@ export type Account = {
|
|
|
127
113
|
address: string;
|
|
128
114
|
balance: bigint;
|
|
129
115
|
currencyUnit: Unit;
|
|
130
|
-
spendableBalance: bigint;
|
|
131
116
|
};
|
|
132
117
|
/**
|
|
133
118
|
* A component of an account/address balance, for a single asset.
|
|
@@ -213,11 +198,11 @@ export interface StringMemo<Kind extends string = "text"> extends Memo {
|
|
|
213
198
|
value: string;
|
|
214
199
|
}
|
|
215
200
|
export interface MapMemo<Kind extends string, Value> extends Memo {
|
|
216
|
-
type:
|
|
201
|
+
type: "map";
|
|
217
202
|
memos: Map<Kind, Value>;
|
|
218
203
|
}
|
|
219
204
|
export interface TypedMapMemo<KindToValueMap extends Record<string, unknown>> extends Memo {
|
|
220
|
-
type:
|
|
205
|
+
type: "map";
|
|
221
206
|
memos: Map<keyof KindToValueMap, KindToValueMap[keyof KindToValueMap]>;
|
|
222
207
|
}
|
|
223
208
|
type MaybeMemo<MemoType extends Memo> = MemoType extends MemoNotSupported ? {} : {
|
|
@@ -231,8 +216,6 @@ export type TransactionIntent<MemoType extends Memo = MemoNotSupported> = {
|
|
|
231
216
|
expiration?: number;
|
|
232
217
|
recipient: string;
|
|
233
218
|
amount: bigint;
|
|
234
|
-
fees?: bigint | null | undefined;
|
|
235
|
-
useAllAmount?: boolean;
|
|
236
219
|
asset: AssetInfo;
|
|
237
220
|
sequence?: number;
|
|
238
221
|
feesStrategy?: FeesStrategy;
|
|
@@ -250,9 +233,6 @@ export type FeeEstimation = {
|
|
|
250
233
|
};
|
|
251
234
|
export type Pagination = {
|
|
252
235
|
minHeight: number;
|
|
253
|
-
lastPagingToken?: string;
|
|
254
|
-
pagingToken?: string;
|
|
255
|
-
limit?: number;
|
|
256
236
|
};
|
|
257
237
|
/** A pagination cursor. */
|
|
258
238
|
export type Cursor = string;
|
|
@@ -318,17 +298,10 @@ export type AlpacaApi<MemoType extends Memo = MemoNotSupported> = {
|
|
|
318
298
|
*/
|
|
319
299
|
getRewards: (address: string, cursor?: Cursor) => Promise<Page<Reward>>;
|
|
320
300
|
};
|
|
321
|
-
export type
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
throwIfPendingOperation?: boolean;
|
|
325
|
-
};
|
|
326
|
-
};
|
|
327
|
-
export type BridgeApi<MemoType extends Memo = MemoNotSupported> = {
|
|
328
|
-
validateIntent: (transactionIntent: TransactionIntent<MemoType>) => Promise<TransactionValidation>;
|
|
329
|
-
getSequence: (address: string) => Promise<number>;
|
|
330
|
-
getChainSpecificRules?: () => ChainSpecificRules;
|
|
301
|
+
export type BridgeApi = {
|
|
302
|
+
validateIntent: (account: Account, transaction: Transaction) => Promise<TransactionValidation>;
|
|
303
|
+
getAccountInfo: (address: string) => Promise<AccountInfo>;
|
|
331
304
|
};
|
|
332
|
-
export type Api<MemoType extends Memo = MemoNotSupported> = AlpacaApi<MemoType> & BridgeApi
|
|
305
|
+
export type Api<MemoType extends Memo = MemoNotSupported> = AlpacaApi<MemoType> & BridgeApi;
|
|
333
306
|
export {};
|
|
334
307
|
//# 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":"AAAA,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;
|
|
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;IA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AO,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,KAAK,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC;IAE5F;;;;;;;;;;;;;;OAcG;IACH,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAEtE;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,UAAU,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;CACzE,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,CAAC,QAAQ,SAAS,IAAI,GAAG,gBAAgB,IAAI,SAAS,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC"}
|
package/lib-es/api/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Unit } from "@ledgerhq/types-cryptoassets";
|
|
1
2
|
import { BroadcastConfig } from "@ledgerhq/types-live";
|
|
2
3
|
export type BlockInfo = {
|
|
3
4
|
height: number;
|
|
@@ -5,23 +6,12 @@ export type BlockInfo = {
|
|
|
5
6
|
time?: Date;
|
|
6
7
|
parent?: BlockInfo;
|
|
7
8
|
};
|
|
8
|
-
export type Unit = {
|
|
9
|
-
name: string;
|
|
10
|
-
code: string;
|
|
11
|
-
magnitude: number;
|
|
12
|
-
showAllDigits?: boolean;
|
|
13
|
-
prefixCode?: boolean;
|
|
14
|
-
};
|
|
15
9
|
export type AssetInfo = {
|
|
16
10
|
type: "native";
|
|
17
|
-
name?: string;
|
|
18
|
-
unit?: Unit;
|
|
19
11
|
} | {
|
|
20
12
|
type: string;
|
|
21
13
|
assetReference?: string;
|
|
22
14
|
assetOwner?: string;
|
|
23
|
-
name?: string;
|
|
24
|
-
unit?: Unit;
|
|
25
15
|
};
|
|
26
16
|
export type Operation<MemoType extends Memo = MemoNotSupported> = {
|
|
27
17
|
id: string;
|
|
@@ -41,7 +31,6 @@ export type Operation<MemoType extends Memo = MemoNotSupported> = {
|
|
|
41
31
|
* This can include things like status, error messages, swap info, etc.
|
|
42
32
|
*/
|
|
43
33
|
details?: Record<string, unknown>;
|
|
44
|
-
assetInfo?: AssetInfo;
|
|
45
34
|
tx: {
|
|
46
35
|
hash: string;
|
|
47
36
|
block: BlockInfo;
|
|
@@ -54,9 +43,6 @@ export type Transaction = {
|
|
|
54
43
|
recipient: string;
|
|
55
44
|
amount: bigint;
|
|
56
45
|
fee: bigint;
|
|
57
|
-
networkInfo?: {
|
|
58
|
-
fees?: bigint;
|
|
59
|
-
};
|
|
60
46
|
} & Record<string, unknown>;
|
|
61
47
|
/**
|
|
62
48
|
* A block along with its {@link BlockTransaction}, not specific to a particular account/address.
|
|
@@ -127,7 +113,6 @@ export type Account = {
|
|
|
127
113
|
address: string;
|
|
128
114
|
balance: bigint;
|
|
129
115
|
currencyUnit: Unit;
|
|
130
|
-
spendableBalance: bigint;
|
|
131
116
|
};
|
|
132
117
|
/**
|
|
133
118
|
* A component of an account/address balance, for a single asset.
|
|
@@ -213,11 +198,11 @@ export interface StringMemo<Kind extends string = "text"> extends Memo {
|
|
|
213
198
|
value: string;
|
|
214
199
|
}
|
|
215
200
|
export interface MapMemo<Kind extends string, Value> extends Memo {
|
|
216
|
-
type:
|
|
201
|
+
type: "map";
|
|
217
202
|
memos: Map<Kind, Value>;
|
|
218
203
|
}
|
|
219
204
|
export interface TypedMapMemo<KindToValueMap extends Record<string, unknown>> extends Memo {
|
|
220
|
-
type:
|
|
205
|
+
type: "map";
|
|
221
206
|
memos: Map<keyof KindToValueMap, KindToValueMap[keyof KindToValueMap]>;
|
|
222
207
|
}
|
|
223
208
|
type MaybeMemo<MemoType extends Memo> = MemoType extends MemoNotSupported ? {} : {
|
|
@@ -231,8 +216,6 @@ export type TransactionIntent<MemoType extends Memo = MemoNotSupported> = {
|
|
|
231
216
|
expiration?: number;
|
|
232
217
|
recipient: string;
|
|
233
218
|
amount: bigint;
|
|
234
|
-
fees?: bigint | null | undefined;
|
|
235
|
-
useAllAmount?: boolean;
|
|
236
219
|
asset: AssetInfo;
|
|
237
220
|
sequence?: number;
|
|
238
221
|
feesStrategy?: FeesStrategy;
|
|
@@ -250,9 +233,6 @@ export type FeeEstimation = {
|
|
|
250
233
|
};
|
|
251
234
|
export type Pagination = {
|
|
252
235
|
minHeight: number;
|
|
253
|
-
lastPagingToken?: string;
|
|
254
|
-
pagingToken?: string;
|
|
255
|
-
limit?: number;
|
|
256
236
|
};
|
|
257
237
|
/** A pagination cursor. */
|
|
258
238
|
export type Cursor = string;
|
|
@@ -318,17 +298,10 @@ export type AlpacaApi<MemoType extends Memo = MemoNotSupported> = {
|
|
|
318
298
|
*/
|
|
319
299
|
getRewards: (address: string, cursor?: Cursor) => Promise<Page<Reward>>;
|
|
320
300
|
};
|
|
321
|
-
export type
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
throwIfPendingOperation?: boolean;
|
|
325
|
-
};
|
|
326
|
-
};
|
|
327
|
-
export type BridgeApi<MemoType extends Memo = MemoNotSupported> = {
|
|
328
|
-
validateIntent: (transactionIntent: TransactionIntent<MemoType>) => Promise<TransactionValidation>;
|
|
329
|
-
getSequence: (address: string) => Promise<number>;
|
|
330
|
-
getChainSpecificRules?: () => ChainSpecificRules;
|
|
301
|
+
export type BridgeApi = {
|
|
302
|
+
validateIntent: (account: Account, transaction: Transaction) => Promise<TransactionValidation>;
|
|
303
|
+
getAccountInfo: (address: string) => Promise<AccountInfo>;
|
|
331
304
|
};
|
|
332
|
-
export type Api<MemoType extends Memo = MemoNotSupported> = AlpacaApi<MemoType> & BridgeApi
|
|
305
|
+
export type Api<MemoType extends Memo = MemoNotSupported> = AlpacaApi<MemoType> & BridgeApi;
|
|
333
306
|
export {};
|
|
334
307
|
//# 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,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;
|
|
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,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EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,KAAK,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC;IAE5F;;;;;;;;;;;;;;OAcG;IACH,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAEtE;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,UAAU,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;CACzE,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,CAAC,QAAQ,SAAS,IAAI,GAAG,gBAAgB,IAAI,SAAS,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ledgerhq/coin-framework",
|
|
3
|
-
"version": "6.1.0
|
|
3
|
+
"version": "6.1.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/
|
|
97
|
-
"@ledgerhq/
|
|
98
|
-
"@ledgerhq/
|
|
99
|
-
"@ledgerhq/live-env": "^2.14.0
|
|
100
|
-
"@ledgerhq/live-network": "^2.0.15
|
|
96
|
+
"@ledgerhq/cryptoassets": "^13.25.0",
|
|
97
|
+
"@ledgerhq/devices": "8.5.0",
|
|
98
|
+
"@ledgerhq/errors": "^6.24.0",
|
|
99
|
+
"@ledgerhq/live-env": "^2.14.0",
|
|
100
|
+
"@ledgerhq/live-network": "^2.0.15",
|
|
101
101
|
"@ledgerhq/logs": "^6.13.0",
|
|
102
102
|
"@ledgerhq/types-cryptoassets": "^7.25.0",
|
|
103
|
-
"@ledgerhq/types-live": "^6.81.0
|
|
103
|
+
"@ledgerhq/types-live": "^6.81.0",
|
|
104
104
|
"@ledgerhq/live-config": "^3.1.0"
|
|
105
105
|
},
|
|
106
106
|
"devDependencies": {
|
|
@@ -112,8 +112,8 @@
|
|
|
112
112
|
"jest": "^29.7.0",
|
|
113
113
|
"timemachine": "^0.3.2",
|
|
114
114
|
"ts-jest": "^29.1.1",
|
|
115
|
-
"@ledgerhq/hw-transport-node-speculos": "^6.29.9
|
|
116
|
-
"@ledgerhq/hw-transport-node-speculos-http": "^6.29.9
|
|
115
|
+
"@ledgerhq/hw-transport-node-speculos": "^6.29.9",
|
|
116
|
+
"@ledgerhq/hw-transport-node-speculos-http": "^6.29.9"
|
|
117
117
|
},
|
|
118
118
|
"scripts": {
|
|
119
119
|
"clean": "rm -rf lib lib-es",
|
package/src/api/types.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Unit } from "@ledgerhq/types-cryptoassets";
|
|
1
2
|
import { BroadcastConfig } from "@ledgerhq/types-live";
|
|
2
3
|
|
|
3
4
|
export type BlockInfo = {
|
|
@@ -10,28 +11,12 @@ export type BlockInfo = {
|
|
|
10
11
|
parent?: BlockInfo;
|
|
11
12
|
};
|
|
12
13
|
|
|
13
|
-
// NOTE: from crypto-asset
|
|
14
|
-
export type Unit = {
|
|
15
|
-
// display name of a given unit (example: satoshi)
|
|
16
|
-
name: string;
|
|
17
|
-
// string to use when formatting the unit. like 'BTC' or 'USD'
|
|
18
|
-
code: string;
|
|
19
|
-
// number of digits after the '.'
|
|
20
|
-
magnitude: number;
|
|
21
|
-
// should it always print all digits even if they are 0 (usually: true for fiats, false for cryptos)
|
|
22
|
-
showAllDigits?: boolean;
|
|
23
|
-
// true if the code should prefix amount when formatting
|
|
24
|
-
prefixCode?: boolean;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
14
|
export type AssetInfo =
|
|
28
|
-
| { type: "native"
|
|
15
|
+
| { type: "native" }
|
|
29
16
|
| {
|
|
30
17
|
type: string; // token, coin, fungible_asset, trc10, trc20, erc20, erc721, erc1155, etc.
|
|
31
18
|
assetReference?: string; // contract address (trc20), tokenId (trc10),, etc
|
|
32
19
|
assetOwner?: string;
|
|
33
|
-
name?: string; // e.g., token name, or asset name
|
|
34
|
-
unit?: Unit;
|
|
35
20
|
};
|
|
36
21
|
|
|
37
22
|
// NOTE: CoreOperation
|
|
@@ -57,7 +42,7 @@ export type Operation<MemoType extends Memo = MemoNotSupported> = {
|
|
|
57
42
|
* This can include things like status, error messages, swap info, etc.
|
|
58
43
|
*/
|
|
59
44
|
details?: Record<string, unknown>;
|
|
60
|
-
|
|
45
|
+
|
|
61
46
|
tx: {
|
|
62
47
|
hash: string; // transaction hash
|
|
63
48
|
block: BlockInfo; // block metadata
|
|
@@ -71,9 +56,6 @@ export type Transaction = {
|
|
|
71
56
|
recipient: string;
|
|
72
57
|
amount: bigint;
|
|
73
58
|
fee: bigint;
|
|
74
|
-
networkInfo?: {
|
|
75
|
-
fees?: bigint;
|
|
76
|
-
};
|
|
77
59
|
} & Record<string, unknown>; // Field containing dedicated value for each blockchain
|
|
78
60
|
|
|
79
61
|
/**
|
|
@@ -161,7 +143,6 @@ export type Account = {
|
|
|
161
143
|
address: string;
|
|
162
144
|
balance: bigint;
|
|
163
145
|
currencyUnit: Unit;
|
|
164
|
-
spendableBalance: bigint; // NOTE:: check if we can get rid of this one
|
|
165
146
|
};
|
|
166
147
|
|
|
167
148
|
/**
|
|
@@ -279,12 +260,12 @@ export interface StringMemo<Kind extends string = "text"> extends Memo {
|
|
|
279
260
|
}
|
|
280
261
|
|
|
281
262
|
export interface MapMemo<Kind extends string, Value> extends Memo {
|
|
282
|
-
type:
|
|
263
|
+
type: "map";
|
|
283
264
|
memos: Map<Kind, Value>;
|
|
284
265
|
}
|
|
285
266
|
|
|
286
267
|
export interface TypedMapMemo<KindToValueMap extends Record<string, unknown>> extends Memo {
|
|
287
|
-
type:
|
|
268
|
+
type: "map";
|
|
288
269
|
memos: Map<keyof KindToValueMap, KindToValueMap[keyof KindToValueMap]>;
|
|
289
270
|
}
|
|
290
271
|
|
|
@@ -301,8 +282,6 @@ export type TransactionIntent<MemoType extends Memo = MemoNotSupported> = {
|
|
|
301
282
|
expiration?: number;
|
|
302
283
|
recipient: string;
|
|
303
284
|
amount: bigint;
|
|
304
|
-
fees?: bigint | null | undefined; // Optional, depending on the API
|
|
305
|
-
useAllAmount?: boolean;
|
|
306
285
|
asset: AssetInfo;
|
|
307
286
|
sequence?: number;
|
|
308
287
|
feesStrategy?: FeesStrategy;
|
|
@@ -327,14 +306,8 @@ export type FeeEstimation = {
|
|
|
327
306
|
// for now start is used as a minHeight from which we want to fetch ALL operations
|
|
328
307
|
// limit is unused for now
|
|
329
308
|
// see design document at https://ledgerhq.atlassian.net/wiki/spaces/BE/pages/5446205788/coin-modules+lama-adapter+APIs+refinements
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
minHeight: number;
|
|
333
|
-
lastPagingToken?: string;
|
|
334
|
-
pagingToken?: string;
|
|
335
|
-
limit?: number;
|
|
336
|
-
};
|
|
337
|
-
// NOTE: future proof export type Pagination = Record<string, unknown>;
|
|
309
|
+
export type Pagination = { minHeight: number };
|
|
310
|
+
|
|
338
311
|
/** A pagination cursor. */
|
|
339
312
|
export type Cursor = string;
|
|
340
313
|
|
|
@@ -350,7 +323,6 @@ export type AccountInfo = {
|
|
|
350
323
|
ownerCount: number;
|
|
351
324
|
sequence: number;
|
|
352
325
|
};
|
|
353
|
-
// NOTE: future proof export type Pagination = Record<string, unknown>;
|
|
354
326
|
|
|
355
327
|
export type AlpacaApi<MemoType extends Memo = MemoNotSupported> = {
|
|
356
328
|
broadcast: (tx: string, broadcastConfig?: BroadcastConfig) => Promise<string>;
|
|
@@ -409,20 +381,10 @@ export type AlpacaApi<MemoType extends Memo = MemoNotSupported> = {
|
|
|
409
381
|
getRewards: (address: string, cursor?: Cursor) => Promise<Page<Reward>>;
|
|
410
382
|
};
|
|
411
383
|
|
|
412
|
-
export type
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
};
|
|
417
|
-
};
|
|
418
|
-
|
|
419
|
-
export type BridgeApi<MemoType extends Memo = MemoNotSupported> = {
|
|
420
|
-
validateIntent: (
|
|
421
|
-
transactionIntent: TransactionIntent<MemoType>,
|
|
422
|
-
) => Promise<TransactionValidation>;
|
|
423
|
-
getSequence: (address: string) => Promise<number>;
|
|
424
|
-
getChainSpecificRules?: () => ChainSpecificRules;
|
|
384
|
+
export type BridgeApi = {
|
|
385
|
+
validateIntent: (account: Account, transaction: Transaction) => Promise<TransactionValidation>;
|
|
386
|
+
// TODO: make it available on alpacaApi
|
|
387
|
+
getAccountInfo: (address: string) => Promise<AccountInfo>;
|
|
425
388
|
};
|
|
426
389
|
|
|
427
|
-
export type Api<MemoType extends Memo = MemoNotSupported> = AlpacaApi<MemoType> &
|
|
428
|
-
BridgeApi<MemoType>;
|
|
390
|
+
export type Api<MemoType extends Memo = MemoNotSupported> = AlpacaApi<MemoType> & BridgeApi;
|
|
@@ -24,8 +24,6 @@ exports[`formatCurrencyUnit with custom options with locale de-DE should correct
|
|
|
24
24
|
|
|
25
25
|
exports[`formatCurrencyUnit with custom options with locale de-DE should correctly format Axelar unit (Axelar) 1`] = `"12.345.678.900,000000- -AXL"`;
|
|
26
26
|
|
|
27
|
-
exports[`formatCurrencyUnit with custom options with locale de-DE should correctly format BNB Chain unit (BNB) 1`] = `"0,012345678900000000- -BNB"`;
|
|
28
|
-
|
|
29
27
|
exports[`formatCurrencyUnit with custom options with locale de-DE should correctly format Babylon unit (Babylon) 1`] = `"12.345.678.900,000000- -BABY"`;
|
|
30
28
|
|
|
31
29
|
exports[`formatCurrencyUnit with custom options with locale de-DE should correctly format Banano unit (BANANO) 1`] = `"123.456.789,00000000- -BANANO"`;
|
|
@@ -36,6 +34,8 @@ exports[`formatCurrencyUnit with custom options with locale de-DE should correct
|
|
|
36
34
|
|
|
37
35
|
exports[`formatCurrencyUnit with custom options with locale de-DE should correctly format Berachain unit (BERA) 1`] = `"0,012345678900000000- -BERA"`;
|
|
38
36
|
|
|
37
|
+
exports[`formatCurrencyUnit with custom options with locale de-DE should correctly format Binance Smart Chain unit (BNB) 1`] = `"0,012345678900000000- -BNB"`;
|
|
38
|
+
|
|
39
39
|
exports[`formatCurrencyUnit with custom options with locale de-DE should correctly format BinanceBeaconChain unit (BNB) 1`] = `"12.345.678.900,000000- -BNB"`;
|
|
40
40
|
|
|
41
41
|
exports[`formatCurrencyUnit with custom options with locale de-DE should correctly format Bitcoin Cash unit (bitcoin cash) 1`] = `"123.456.789,00000000- -BCH"`;
|
|
@@ -382,8 +382,6 @@ exports[`formatCurrencyUnit with custom options with locale en-US should correct
|
|
|
382
382
|
|
|
383
383
|
exports[`formatCurrencyUnit with custom options with locale en-US should correctly format Axelar unit (Axelar) 1`] = `"12,345,678,900.000000- -AXL"`;
|
|
384
384
|
|
|
385
|
-
exports[`formatCurrencyUnit with custom options with locale en-US should correctly format BNB Chain unit (BNB) 1`] = `"0.012345678900000000- -BNB"`;
|
|
386
|
-
|
|
387
385
|
exports[`formatCurrencyUnit with custom options with locale en-US should correctly format Babylon unit (Babylon) 1`] = `"12,345,678,900.000000- -BABY"`;
|
|
388
386
|
|
|
389
387
|
exports[`formatCurrencyUnit with custom options with locale en-US should correctly format Banano unit (BANANO) 1`] = `"123,456,789.00000000- -BANANO"`;
|
|
@@ -394,6 +392,8 @@ exports[`formatCurrencyUnit with custom options with locale en-US should correct
|
|
|
394
392
|
|
|
395
393
|
exports[`formatCurrencyUnit with custom options with locale en-US should correctly format Berachain unit (BERA) 1`] = `"0.012345678900000000- -BERA"`;
|
|
396
394
|
|
|
395
|
+
exports[`formatCurrencyUnit with custom options with locale en-US should correctly format Binance Smart Chain unit (BNB) 1`] = `"0.012345678900000000- -BNB"`;
|
|
396
|
+
|
|
397
397
|
exports[`formatCurrencyUnit with custom options with locale en-US should correctly format BinanceBeaconChain unit (BNB) 1`] = `"12,345,678,900.000000- -BNB"`;
|
|
398
398
|
|
|
399
399
|
exports[`formatCurrencyUnit with custom options with locale en-US should correctly format Bitcoin Cash unit (bitcoin cash) 1`] = `"123,456,789.00000000- -BCH"`;
|
|
@@ -740,8 +740,6 @@ exports[`formatCurrencyUnit with custom options with locale es-ES should correct
|
|
|
740
740
|
|
|
741
741
|
exports[`formatCurrencyUnit with custom options with locale es-ES should correctly format Axelar unit (Axelar) 1`] = `"12.345.678.900,000000- -AXL"`;
|
|
742
742
|
|
|
743
|
-
exports[`formatCurrencyUnit with custom options with locale es-ES should correctly format BNB Chain unit (BNB) 1`] = `"0,012345678900000000- -BNB"`;
|
|
744
|
-
|
|
745
743
|
exports[`formatCurrencyUnit with custom options with locale es-ES should correctly format Babylon unit (Babylon) 1`] = `"12.345.678.900,000000- -BABY"`;
|
|
746
744
|
|
|
747
745
|
exports[`formatCurrencyUnit with custom options with locale es-ES should correctly format Banano unit (BANANO) 1`] = `"123.456.789,00000000- -BANANO"`;
|
|
@@ -752,6 +750,8 @@ exports[`formatCurrencyUnit with custom options with locale es-ES should correct
|
|
|
752
750
|
|
|
753
751
|
exports[`formatCurrencyUnit with custom options with locale es-ES should correctly format Berachain unit (BERA) 1`] = `"0,012345678900000000- -BERA"`;
|
|
754
752
|
|
|
753
|
+
exports[`formatCurrencyUnit with custom options with locale es-ES should correctly format Binance Smart Chain unit (BNB) 1`] = `"0,012345678900000000- -BNB"`;
|
|
754
|
+
|
|
755
755
|
exports[`formatCurrencyUnit with custom options with locale es-ES should correctly format BinanceBeaconChain unit (BNB) 1`] = `"12.345.678.900,000000- -BNB"`;
|
|
756
756
|
|
|
757
757
|
exports[`formatCurrencyUnit with custom options with locale es-ES should correctly format Bitcoin Cash unit (bitcoin cash) 1`] = `"123.456.789,00000000- -BCH"`;
|
|
@@ -1098,8 +1098,6 @@ exports[`formatCurrencyUnit with custom options with locale fr-FR should correct
|
|
|
1098
1098
|
|
|
1099
1099
|
exports[`formatCurrencyUnit with custom options with locale fr-FR should correctly format Axelar unit (Axelar) 1`] = `"12 345 678 900,000000- -AXL"`;
|
|
1100
1100
|
|
|
1101
|
-
exports[`formatCurrencyUnit with custom options with locale fr-FR should correctly format BNB Chain unit (BNB) 1`] = `"0,012345678900000000- -BNB"`;
|
|
1102
|
-
|
|
1103
1101
|
exports[`formatCurrencyUnit with custom options with locale fr-FR should correctly format Babylon unit (Babylon) 1`] = `"12 345 678 900,000000- -BABY"`;
|
|
1104
1102
|
|
|
1105
1103
|
exports[`formatCurrencyUnit with custom options with locale fr-FR should correctly format Banano unit (BANANO) 1`] = `"123 456 789,00000000- -BANANO"`;
|
|
@@ -1110,6 +1108,8 @@ exports[`formatCurrencyUnit with custom options with locale fr-FR should correct
|
|
|
1110
1108
|
|
|
1111
1109
|
exports[`formatCurrencyUnit with custom options with locale fr-FR should correctly format Berachain unit (BERA) 1`] = `"0,012345678900000000- -BERA"`;
|
|
1112
1110
|
|
|
1111
|
+
exports[`formatCurrencyUnit with custom options with locale fr-FR should correctly format Binance Smart Chain unit (BNB) 1`] = `"0,012345678900000000- -BNB"`;
|
|
1112
|
+
|
|
1113
1113
|
exports[`formatCurrencyUnit with custom options with locale fr-FR should correctly format BinanceBeaconChain unit (BNB) 1`] = `"12 345 678 900,000000- -BNB"`;
|
|
1114
1114
|
|
|
1115
1115
|
exports[`formatCurrencyUnit with custom options with locale fr-FR should correctly format Bitcoin Cash unit (bitcoin cash) 1`] = `"123 456 789,00000000- -BCH"`;
|
|
@@ -1456,8 +1456,6 @@ exports[`formatCurrencyUnit with custom options with locale ja-JP should correct
|
|
|
1456
1456
|
|
|
1457
1457
|
exports[`formatCurrencyUnit with custom options with locale ja-JP should correctly format Axelar unit (Axelar) 1`] = `"12,345,678,900.000000- -AXL"`;
|
|
1458
1458
|
|
|
1459
|
-
exports[`formatCurrencyUnit with custom options with locale ja-JP should correctly format BNB Chain unit (BNB) 1`] = `"0.012345678900000000- -BNB"`;
|
|
1460
|
-
|
|
1461
1459
|
exports[`formatCurrencyUnit with custom options with locale ja-JP should correctly format Babylon unit (Babylon) 1`] = `"12,345,678,900.000000- -BABY"`;
|
|
1462
1460
|
|
|
1463
1461
|
exports[`formatCurrencyUnit with custom options with locale ja-JP should correctly format Banano unit (BANANO) 1`] = `"123,456,789.00000000- -BANANO"`;
|
|
@@ -1468,6 +1466,8 @@ exports[`formatCurrencyUnit with custom options with locale ja-JP should correct
|
|
|
1468
1466
|
|
|
1469
1467
|
exports[`formatCurrencyUnit with custom options with locale ja-JP should correctly format Berachain unit (BERA) 1`] = `"0.012345678900000000- -BERA"`;
|
|
1470
1468
|
|
|
1469
|
+
exports[`formatCurrencyUnit with custom options with locale ja-JP should correctly format Binance Smart Chain unit (BNB) 1`] = `"0.012345678900000000- -BNB"`;
|
|
1470
|
+
|
|
1471
1471
|
exports[`formatCurrencyUnit with custom options with locale ja-JP should correctly format BinanceBeaconChain unit (BNB) 1`] = `"12,345,678,900.000000- -BNB"`;
|
|
1472
1472
|
|
|
1473
1473
|
exports[`formatCurrencyUnit with custom options with locale ja-JP should correctly format Bitcoin Cash unit (bitcoin cash) 1`] = `"123,456,789.00000000- -BCH"`;
|
|
@@ -1814,8 +1814,6 @@ exports[`formatCurrencyUnit with custom options with locale ko-KR should correct
|
|
|
1814
1814
|
|
|
1815
1815
|
exports[`formatCurrencyUnit with custom options with locale ko-KR should correctly format Axelar unit (Axelar) 1`] = `"12,345,678,900.000000- -AXL"`;
|
|
1816
1816
|
|
|
1817
|
-
exports[`formatCurrencyUnit with custom options with locale ko-KR should correctly format BNB Chain unit (BNB) 1`] = `"0.012345678900000000- -BNB"`;
|
|
1818
|
-
|
|
1819
1817
|
exports[`formatCurrencyUnit with custom options with locale ko-KR should correctly format Babylon unit (Babylon) 1`] = `"12,345,678,900.000000- -BABY"`;
|
|
1820
1818
|
|
|
1821
1819
|
exports[`formatCurrencyUnit with custom options with locale ko-KR should correctly format Banano unit (BANANO) 1`] = `"123,456,789.00000000- -BANANO"`;
|
|
@@ -1826,6 +1824,8 @@ exports[`formatCurrencyUnit with custom options with locale ko-KR should correct
|
|
|
1826
1824
|
|
|
1827
1825
|
exports[`formatCurrencyUnit with custom options with locale ko-KR should correctly format Berachain unit (BERA) 1`] = `"0.012345678900000000- -BERA"`;
|
|
1828
1826
|
|
|
1827
|
+
exports[`formatCurrencyUnit with custom options with locale ko-KR should correctly format Binance Smart Chain unit (BNB) 1`] = `"0.012345678900000000- -BNB"`;
|
|
1828
|
+
|
|
1829
1829
|
exports[`formatCurrencyUnit with custom options with locale ko-KR should correctly format BinanceBeaconChain unit (BNB) 1`] = `"12,345,678,900.000000- -BNB"`;
|
|
1830
1830
|
|
|
1831
1831
|
exports[`formatCurrencyUnit with custom options with locale ko-KR should correctly format Bitcoin Cash unit (bitcoin cash) 1`] = `"123,456,789.00000000- -BCH"`;
|
|
@@ -2172,8 +2172,6 @@ exports[`formatCurrencyUnit with custom options with locale pt-BR should correct
|
|
|
2172
2172
|
|
|
2173
2173
|
exports[`formatCurrencyUnit with custom options with locale pt-BR should correctly format Axelar unit (Axelar) 1`] = `"12.345.678.900,000000- -AXL"`;
|
|
2174
2174
|
|
|
2175
|
-
exports[`formatCurrencyUnit with custom options with locale pt-BR should correctly format BNB Chain unit (BNB) 1`] = `"0,012345678900000000- -BNB"`;
|
|
2176
|
-
|
|
2177
2175
|
exports[`formatCurrencyUnit with custom options with locale pt-BR should correctly format Babylon unit (Babylon) 1`] = `"12.345.678.900,000000- -BABY"`;
|
|
2178
2176
|
|
|
2179
2177
|
exports[`formatCurrencyUnit with custom options with locale pt-BR should correctly format Banano unit (BANANO) 1`] = `"123.456.789,00000000- -BANANO"`;
|
|
@@ -2184,6 +2182,8 @@ exports[`formatCurrencyUnit with custom options with locale pt-BR should correct
|
|
|
2184
2182
|
|
|
2185
2183
|
exports[`formatCurrencyUnit with custom options with locale pt-BR should correctly format Berachain unit (BERA) 1`] = `"0,012345678900000000- -BERA"`;
|
|
2186
2184
|
|
|
2185
|
+
exports[`formatCurrencyUnit with custom options with locale pt-BR should correctly format Binance Smart Chain unit (BNB) 1`] = `"0,012345678900000000- -BNB"`;
|
|
2186
|
+
|
|
2187
2187
|
exports[`formatCurrencyUnit with custom options with locale pt-BR should correctly format BinanceBeaconChain unit (BNB) 1`] = `"12.345.678.900,000000- -BNB"`;
|
|
2188
2188
|
|
|
2189
2189
|
exports[`formatCurrencyUnit with custom options with locale pt-BR should correctly format Bitcoin Cash unit (bitcoin cash) 1`] = `"123.456.789,00000000- -BCH"`;
|
|
@@ -2530,8 +2530,6 @@ exports[`formatCurrencyUnit with custom options with locale ru-RU should correct
|
|
|
2530
2530
|
|
|
2531
2531
|
exports[`formatCurrencyUnit with custom options with locale ru-RU should correctly format Axelar unit (Axelar) 1`] = `"12 345 678 900,000000- -AXL"`;
|
|
2532
2532
|
|
|
2533
|
-
exports[`formatCurrencyUnit with custom options with locale ru-RU should correctly format BNB Chain unit (BNB) 1`] = `"0,012345678900000000- -BNB"`;
|
|
2534
|
-
|
|
2535
2533
|
exports[`formatCurrencyUnit with custom options with locale ru-RU should correctly format Babylon unit (Babylon) 1`] = `"12 345 678 900,000000- -BABY"`;
|
|
2536
2534
|
|
|
2537
2535
|
exports[`formatCurrencyUnit with custom options with locale ru-RU should correctly format Banano unit (BANANO) 1`] = `"123 456 789,00000000- -BANANO"`;
|
|
@@ -2542,6 +2540,8 @@ exports[`formatCurrencyUnit with custom options with locale ru-RU should correct
|
|
|
2542
2540
|
|
|
2543
2541
|
exports[`formatCurrencyUnit with custom options with locale ru-RU should correctly format Berachain unit (BERA) 1`] = `"0,012345678900000000- -BERA"`;
|
|
2544
2542
|
|
|
2543
|
+
exports[`formatCurrencyUnit with custom options with locale ru-RU should correctly format Binance Smart Chain unit (BNB) 1`] = `"0,012345678900000000- -BNB"`;
|
|
2544
|
+
|
|
2545
2545
|
exports[`formatCurrencyUnit with custom options with locale ru-RU should correctly format BinanceBeaconChain unit (BNB) 1`] = `"12 345 678 900,000000- -BNB"`;
|
|
2546
2546
|
|
|
2547
2547
|
exports[`formatCurrencyUnit with custom options with locale ru-RU should correctly format Bitcoin Cash unit (bitcoin cash) 1`] = `"123 456 789,00000000- -BCH"`;
|
|
@@ -2888,8 +2888,6 @@ exports[`formatCurrencyUnit with custom options with locale tr-TR should correct
|
|
|
2888
2888
|
|
|
2889
2889
|
exports[`formatCurrencyUnit with custom options with locale tr-TR should correctly format Axelar unit (Axelar) 1`] = `"12.345.678.900,000000- -AXL"`;
|
|
2890
2890
|
|
|
2891
|
-
exports[`formatCurrencyUnit with custom options with locale tr-TR should correctly format BNB Chain unit (BNB) 1`] = `"0,012345678900000000- -BNB"`;
|
|
2892
|
-
|
|
2893
2891
|
exports[`formatCurrencyUnit with custom options with locale tr-TR should correctly format Babylon unit (Babylon) 1`] = `"12.345.678.900,000000- -BABY"`;
|
|
2894
2892
|
|
|
2895
2893
|
exports[`formatCurrencyUnit with custom options with locale tr-TR should correctly format Banano unit (BANANO) 1`] = `"123.456.789,00000000- -BANANO"`;
|
|
@@ -2900,6 +2898,8 @@ exports[`formatCurrencyUnit with custom options with locale tr-TR should correct
|
|
|
2900
2898
|
|
|
2901
2899
|
exports[`formatCurrencyUnit with custom options with locale tr-TR should correctly format Berachain unit (BERA) 1`] = `"0,012345678900000000- -BERA"`;
|
|
2902
2900
|
|
|
2901
|
+
exports[`formatCurrencyUnit with custom options with locale tr-TR should correctly format Binance Smart Chain unit (BNB) 1`] = `"0,012345678900000000- -BNB"`;
|
|
2902
|
+
|
|
2903
2903
|
exports[`formatCurrencyUnit with custom options with locale tr-TR should correctly format BinanceBeaconChain unit (BNB) 1`] = `"12.345.678.900,000000- -BNB"`;
|
|
2904
2904
|
|
|
2905
2905
|
exports[`formatCurrencyUnit with custom options with locale tr-TR should correctly format Bitcoin Cash unit (bitcoin cash) 1`] = `"123.456.789,00000000- -BCH"`;
|
|
@@ -3246,8 +3246,6 @@ exports[`formatCurrencyUnit with custom options with locale zh-CN should correct
|
|
|
3246
3246
|
|
|
3247
3247
|
exports[`formatCurrencyUnit with custom options with locale zh-CN should correctly format Axelar unit (Axelar) 1`] = `"12,345,678,900.000000- -AXL"`;
|
|
3248
3248
|
|
|
3249
|
-
exports[`formatCurrencyUnit with custom options with locale zh-CN should correctly format BNB Chain unit (BNB) 1`] = `"0.012345678900000000- -BNB"`;
|
|
3250
|
-
|
|
3251
3249
|
exports[`formatCurrencyUnit with custom options with locale zh-CN should correctly format Babylon unit (Babylon) 1`] = `"12,345,678,900.000000- -BABY"`;
|
|
3252
3250
|
|
|
3253
3251
|
exports[`formatCurrencyUnit with custom options with locale zh-CN should correctly format Banano unit (BANANO) 1`] = `"123,456,789.00000000- -BANANO"`;
|
|
@@ -3258,6 +3256,8 @@ exports[`formatCurrencyUnit with custom options with locale zh-CN should correct
|
|
|
3258
3256
|
|
|
3259
3257
|
exports[`formatCurrencyUnit with custom options with locale zh-CN should correctly format Berachain unit (BERA) 1`] = `"0.012345678900000000- -BERA"`;
|
|
3260
3258
|
|
|
3259
|
+
exports[`formatCurrencyUnit with custom options with locale zh-CN should correctly format Binance Smart Chain unit (BNB) 1`] = `"0.012345678900000000- -BNB"`;
|
|
3260
|
+
|
|
3261
3261
|
exports[`formatCurrencyUnit with custom options with locale zh-CN should correctly format BinanceBeaconChain unit (BNB) 1`] = `"12,345,678,900.000000- -BNB"`;
|
|
3262
3262
|
|
|
3263
3263
|
exports[`formatCurrencyUnit with custom options with locale zh-CN should correctly format Bitcoin Cash unit (bitcoin cash) 1`] = `"123,456,789.00000000- -BCH"`;
|
|
@@ -3604,8 +3604,6 @@ exports[`formatCurrencyUnit with default options should correctly format Avalanc
|
|
|
3604
3604
|
|
|
3605
3605
|
exports[`formatCurrencyUnit with default options should correctly format Axelar unit (Axelar) 1`] = `"12,345,678,900"`;
|
|
3606
3606
|
|
|
3607
|
-
exports[`formatCurrencyUnit with default options should correctly format BNB Chain unit (BNB) 1`] = `"0.0123456"`;
|
|
3608
|
-
|
|
3609
3607
|
exports[`formatCurrencyUnit with default options should correctly format Babylon unit (Babylon) 1`] = `"12,345,678,900"`;
|
|
3610
3608
|
|
|
3611
3609
|
exports[`formatCurrencyUnit with default options should correctly format Banano unit (BANANO) 1`] = `"123,456,789"`;
|
|
@@ -3616,6 +3614,8 @@ exports[`formatCurrencyUnit with default options should correctly format Base un
|
|
|
3616
3614
|
|
|
3617
3615
|
exports[`formatCurrencyUnit with default options should correctly format Berachain unit (BERA) 1`] = `"0.0123456"`;
|
|
3618
3616
|
|
|
3617
|
+
exports[`formatCurrencyUnit with default options should correctly format Binance Smart Chain unit (BNB) 1`] = `"0.0123456"`;
|
|
3618
|
+
|
|
3619
3619
|
exports[`formatCurrencyUnit with default options should correctly format BinanceBeaconChain unit (BNB) 1`] = `"12,345,678,900"`;
|
|
3620
3620
|
|
|
3621
3621
|
exports[`formatCurrencyUnit with default options should correctly format Bitcoin Cash unit (bitcoin cash) 1`] = `"123,456,789"`;
|