@ledgerhq/coin-module-framework 2.1.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/.eslintrc.js +3 -0
  2. package/.unimportedrc.json +17 -5
  3. package/CHANGELOG.md +16 -0
  4. package/LICENSE +194 -0
  5. package/jest-global-setup.js +3 -0
  6. package/jest.config.js +3 -1
  7. package/lib/api/errors.d.ts.map +1 -1
  8. package/lib/api/errors.js +2 -0
  9. package/lib/api/errors.js.map +1 -1
  10. package/lib/api/getBalance/rejectBalanceOptions.d.ts.map +1 -1
  11. package/lib/api/getBalance/rejectBalanceOptions.js +2 -0
  12. package/lib/api/getBalance/rejectBalanceOptions.js.map +1 -1
  13. package/lib/api/index.d.ts.map +1 -1
  14. package/lib/api/index.js +6 -4
  15. package/lib/api/index.js.map +1 -1
  16. package/lib/api/types.d.ts +14 -6
  17. package/lib/api/types.d.ts.map +1 -1
  18. package/lib/api/types.js +2 -0
  19. package/lib/api/types.js.map +1 -1
  20. package/lib/config.d.ts.map +1 -1
  21. package/lib/config.js +2 -0
  22. package/lib/config.js.map +1 -1
  23. package/lib/currencies/BigNumberToLocaleString.d.ts.map +1 -1
  24. package/lib/currencies/BigNumberToLocaleString.js +2 -0
  25. package/lib/currencies/BigNumberToLocaleString.js.map +1 -1
  26. package/lib/currencies/formatCurrencyUnit.d.ts.map +1 -1
  27. package/lib/currencies/formatCurrencyUnit.js +2 -0
  28. package/lib/currencies/formatCurrencyUnit.js.map +1 -1
  29. package/lib/currencies/index.d.ts.map +1 -1
  30. package/lib/currencies/index.js +2 -0
  31. package/lib/currencies/index.js.map +1 -1
  32. package/lib/currencies/localeUtility.d.ts.map +1 -1
  33. package/lib/currencies/localeUtility.js +2 -0
  34. package/lib/currencies/localeUtility.js.map +1 -1
  35. package/lib/currencies/parseCurrencyUnit.d.ts.map +1 -1
  36. package/lib/currencies/parseCurrencyUnit.js +2 -0
  37. package/lib/currencies/parseCurrencyUnit.js.map +1 -1
  38. package/lib/errors.d.ts.map +1 -1
  39. package/lib/errors.js +2 -0
  40. package/lib/errors.js.map +1 -1
  41. package/lib/features/types.d.ts.map +1 -1
  42. package/lib/features/types.js +2 -0
  43. package/lib/features/types.js.map +1 -1
  44. package/lib/index.d.ts.map +1 -1
  45. package/lib/index.js +2 -0
  46. package/lib/index.js.map +1 -1
  47. package/lib/logic/craftTransactionData.d.ts +3 -0
  48. package/lib/logic/craftTransactionData.d.ts.map +1 -0
  49. package/lib/logic/craftTransactionData.js +10 -0
  50. package/lib/logic/craftTransactionData.js.map +1 -0
  51. package/lib/test/utils.d.ts.map +1 -1
  52. package/lib/test/utils.js +2 -0
  53. package/lib/test/utils.js.map +1 -1
  54. package/lib/utils.d.ts.map +1 -1
  55. package/lib/utils.js +2 -0
  56. package/lib/utils.js.map +1 -1
  57. package/lib-es/api/errors.d.ts.map +1 -1
  58. package/lib-es/api/errors.js +2 -0
  59. package/lib-es/api/errors.js.map +1 -1
  60. package/lib-es/api/getBalance/rejectBalanceOptions.d.ts.map +1 -1
  61. package/lib-es/api/getBalance/rejectBalanceOptions.js +2 -0
  62. package/lib-es/api/getBalance/rejectBalanceOptions.js.map +1 -1
  63. package/lib-es/api/index.d.ts.map +1 -1
  64. package/lib-es/api/index.js +2 -0
  65. package/lib-es/api/index.js.map +1 -1
  66. package/lib-es/api/types.d.ts +14 -6
  67. package/lib-es/api/types.d.ts.map +1 -1
  68. package/lib-es/api/types.js +2 -0
  69. package/lib-es/api/types.js.map +1 -1
  70. package/lib-es/config.d.ts.map +1 -1
  71. package/lib-es/config.js +2 -0
  72. package/lib-es/config.js.map +1 -1
  73. package/lib-es/currencies/BigNumberToLocaleString.d.ts.map +1 -1
  74. package/lib-es/currencies/BigNumberToLocaleString.js +2 -0
  75. package/lib-es/currencies/BigNumberToLocaleString.js.map +1 -1
  76. package/lib-es/currencies/formatCurrencyUnit.d.ts.map +1 -1
  77. package/lib-es/currencies/formatCurrencyUnit.js +2 -0
  78. package/lib-es/currencies/formatCurrencyUnit.js.map +1 -1
  79. package/lib-es/currencies/index.d.ts.map +1 -1
  80. package/lib-es/currencies/index.js +2 -0
  81. package/lib-es/currencies/index.js.map +1 -1
  82. package/lib-es/currencies/localeUtility.d.ts.map +1 -1
  83. package/lib-es/currencies/localeUtility.js +2 -0
  84. package/lib-es/currencies/localeUtility.js.map +1 -1
  85. package/lib-es/currencies/parseCurrencyUnit.d.ts.map +1 -1
  86. package/lib-es/currencies/parseCurrencyUnit.js +2 -0
  87. package/lib-es/currencies/parseCurrencyUnit.js.map +1 -1
  88. package/lib-es/errors.d.ts.map +1 -1
  89. package/lib-es/errors.js +2 -0
  90. package/lib-es/errors.js.map +1 -1
  91. package/lib-es/features/types.d.ts.map +1 -1
  92. package/lib-es/features/types.js +2 -0
  93. package/lib-es/features/types.js.map +1 -1
  94. package/lib-es/index.d.ts.map +1 -1
  95. package/lib-es/index.js +2 -0
  96. package/lib-es/index.js.map +1 -1
  97. package/lib-es/logic/craftTransactionData.d.ts +3 -0
  98. package/lib-es/logic/craftTransactionData.d.ts.map +1 -0
  99. package/lib-es/logic/craftTransactionData.js +7 -0
  100. package/lib-es/logic/craftTransactionData.js.map +1 -0
  101. package/lib-es/test/utils.d.ts.map +1 -1
  102. package/lib-es/test/utils.js +2 -0
  103. package/lib-es/test/utils.js.map +1 -1
  104. package/lib-es/utils.d.ts.map +1 -1
  105. package/lib-es/utils.js +2 -0
  106. package/lib-es/utils.js.map +1 -1
  107. package/package.json +4 -4
  108. package/src/api/errors.ts +3 -0
  109. package/src/api/getBalance/rejectBalanceOptions.test.ts +3 -0
  110. package/src/api/getBalance/rejectBalanceOptions.ts +3 -0
  111. package/src/api/index.ts +3 -0
  112. package/src/api/types.ts +18 -6
  113. package/src/config.ts +3 -0
  114. package/src/currencies/BigNumberToLocaleString.test.ts +3 -0
  115. package/src/currencies/BigNumberToLocaleString.ts +3 -0
  116. package/src/currencies/formatCurrencyUnit.test.ts +3 -0
  117. package/src/currencies/formatCurrencyUnit.ts +3 -0
  118. package/src/currencies/index.ts +3 -0
  119. package/src/currencies/localeUtility.test.ts +3 -0
  120. package/src/currencies/localeUtility.ts +3 -0
  121. package/src/currencies/parseCurrencyUnit.test.ts +3 -0
  122. package/src/currencies/parseCurrencyUnit.ts +3 -0
  123. package/src/errors.ts +3 -0
  124. package/src/features/types.ts +3 -0
  125. package/src/index.ts +3 -0
  126. package/src/logic/craftTransactionData.test.ts +11 -0
  127. package/src/logic/craftTransactionData.ts +9 -0
  128. package/src/test/utils.ts +3 -0
  129. package/src/utils.test.ts +3 -0
  130. package/src/utils.ts +3 -0
  131. package/lib/setup.d.ts +0 -2
  132. package/lib/setup.d.ts.map +0 -1
  133. package/lib/setup.js +0 -6
  134. package/lib/setup.js.map +0 -1
  135. package/lib-es/setup.d.ts +0 -2
  136. package/lib-es/setup.d.ts.map +0 -1
  137. package/lib-es/setup.js +0 -4
  138. package/lib-es/setup.js.map +0 -1
  139. package/src/setup.ts +0 -4
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,qBAAqB,CACnC,SAAgC,EAChC,YAAgB;IAEhB,IAAI,SAAS,IAAI,IAAI,EAAE,CAAC;QACtB,OAAO,MAAM,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC,CAAA;IACpC,CAAC;IACD,OAAO,YAAiB,CAAA;AAC1B,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,EAAqB;IAC3D,OAAO,EAAE,CAAC,UAAU,KAAK,aAAa,CAAA;AACxC,CAAC;AAED,MAAM,UAAU,0BAA0B,CAAC,EAAqB;IAC9D,OAAO,EAAE,CAAC,UAAU,KAAK,SAAS,CAAA;AACpC,CAAC"}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,sCAAsC;AAKtC,MAAM,UAAU,qBAAqB,CACnC,SAAgC,EAChC,YAAgB;IAEhB,IAAI,SAAS,IAAI,IAAI,EAAE,CAAC;QACtB,OAAO,MAAM,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC,CAAA;IACpC,CAAC;IACD,OAAO,YAAiB,CAAA;AAC1B,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,EAAqB;IAC3D,OAAO,EAAE,CAAC,UAAU,KAAK,aAAa,CAAA;AACxC,CAAC;AAED,MAAM,UAAU,0BAA0B,CAAC,EAAqB;IAC9D,OAAO,EAAE,CAAC,UAAU,KAAK,SAAS,CAAA;AACpC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/coin-module-framework",
3
- "version": "2.1.0",
3
+ "version": "3.0.0",
4
4
  "description": "Ledger framework for Coin integration",
5
5
  "keywords": [
6
6
  "Ledger",
@@ -49,19 +49,19 @@
49
49
  },
50
50
  "./package.json": "./package.json"
51
51
  },
52
+ "author": "LEDGER SAS",
52
53
  "license": "Apache-2.0",
53
54
  "dependencies": {
54
55
  "bignumber.js": "^9.1.2"
55
56
  },
56
57
  "peerDependencies": {
57
- "@ledgerhq/errors": "^6.33.0",
58
- "@ledgerhq/live-env": "^2.31.0"
58
+ "@ledgerhq/errors": "^6.33.0"
59
59
  },
60
60
  "devDependencies": {
61
61
  "@types/node": "^24.0.0",
62
62
  "@types/jest": "^30.0.0",
63
63
  "cross-env": "^7.0.3",
64
- "jest": "^30.2.0",
64
+ "jest": "30.2.0",
65
65
  "@swc/jest": "0.2.39",
66
66
  "@swc/core": "1.15.11"
67
67
  },
package/src/api/errors.ts CHANGED
@@ -1,3 +1,6 @@
1
+ // SPDX-FileCopyrightText: © 2024 LEDGER SAS
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
1
4
  export class IncorrectTypeError extends Error {
2
5
  constructor(message?: string) {
3
6
  super(`IncorrectType: ${message}`)
@@ -1,3 +1,6 @@
1
+ // SPDX-FileCopyrightText: © 2024 LEDGER SAS
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
1
4
  import { InvalidParameterError } from '@ledgerhq/errors'
2
5
  import { BalanceOptions } from '../types'
3
6
  import { rejectBalanceOptions } from './rejectBalanceOptions'
@@ -1,3 +1,6 @@
1
+ // SPDX-FileCopyrightText: © 2024 LEDGER SAS
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
1
4
  import { InvalidParameterError } from '@ledgerhq/errors'
2
5
  import { Balance, BalanceOptions } from '../types'
3
6
 
package/src/api/index.ts CHANGED
@@ -1,3 +1,6 @@
1
+ // SPDX-FileCopyrightText: © 2024 LEDGER SAS
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
1
4
  /**
2
5
  * Module related to all API exposition constraints and helper.
3
6
  * One consumer of this API is Alpaca.
package/src/api/types.ts CHANGED
@@ -1,3 +1,6 @@
1
+ // SPDX-FileCopyrightText: © 2024 LEDGER SAS
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
1
4
  // NOTE: from types-live
2
5
  export type BroadcastConfig = {
3
6
  mevProtected: boolean
@@ -187,7 +190,7 @@ export type Account = {
187
190
  /**
188
191
  * A component of an account/address balance, for a single asset.
189
192
  *
190
- * @see AlpacaApi#getBalance
193
+ * @see CoinModuleApi#getBalance
191
194
  */
192
195
  export type Balance = {
193
196
  /** The balance value, in base unit of {@link asset} (always positive). */
@@ -217,7 +220,7 @@ export type StakeState =
217
220
  * as several {@link Stake}.
218
221
  *
219
222
  * @see Reward
220
- * @see AlpacaApi#getStakes
223
+ * @see CoinModuleApi#getStakes
221
224
  */
222
225
  export type Stake = {
223
226
  /** An immutable, globally unique id of the stake. Depending on the blockchain, it could simply be the account address,
@@ -260,7 +263,7 @@ export type Stake = {
260
263
  * A staking reward distribution event.
261
264
  *
262
265
  * @see Stake
263
- * @see AlpacaApi#getRewards
266
+ * @see CoinModuleApi#getRewards
264
267
  */
265
268
  export type Reward = {
266
269
  /** {@link Stake#uid} via which this reward was obtained. */
@@ -396,7 +399,7 @@ export type FeeEstimation = {
396
399
  parameters?: Record<string, unknown>
397
400
  }
398
401
 
399
- /** Response of {@link AlpacaApi#craftTransaction}. */
402
+ /** Response of {@link CoinModuleApi#craftTransaction}. */
400
403
  export type CraftedTransaction = {
401
404
  /** The serialized transaction (encoding is blockchain dependent). */
402
405
  transaction: string
@@ -413,7 +416,7 @@ export type Page<T> = {
413
416
  next?: Cursor | undefined
414
417
  }
415
418
 
416
- /** Options for {@link AlpacaApi#listOperations}. */
419
+ /** Options for {@link CoinModuleApi#listOperations}. */
417
420
  export type ListOperationsOptions = {
418
421
  /**
419
422
  * The minimum block height for which to fetch operations (inclusive).
@@ -491,7 +494,7 @@ export type BalanceOptions = {
491
494
  includeAssets?: (asset: AssetInfo) => Promise<boolean>
492
495
  }
493
496
 
494
- export type AlpacaApi<
497
+ export type CoinModuleApi<
495
498
  MemoType extends Memo = MemoNotSupported,
496
499
  TxDataType extends TxData = TxDataNotSupported,
497
500
  > = {
@@ -730,4 +733,13 @@ export type AlpacaApi<
730
733
  address: string,
731
734
  parameters: Partial<AddressValidationCurrencyParameters>
732
735
  ) => Promise<boolean>
736
+
737
+ /**
738
+ * Get a blockchain specific payload. For Ethereum, it would be a calldata,
739
+ * for Solana, it would be instructions, and so on
740
+ *
741
+ * @param intent transaction intent
742
+ * @returns blockchain-specific {@link TxData} for this module
743
+ */
744
+ craftTransactionData: (intent: TransactionIntent<MemoType, TxDataType>) => TxDataType
733
745
  }
package/src/config.ts CHANGED
@@ -1,3 +1,6 @@
1
+ // SPDX-FileCopyrightText: © 2024 LEDGER SAS
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
1
4
  import { MissingCoinConfig } from './errors'
2
5
  import type { FeatureConfig } from './features/types'
3
6
 
@@ -1,3 +1,6 @@
1
+ // SPDX-FileCopyrightText: © 2024 LEDGER SAS
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
1
4
  // Forked from @ledgerhq/live-currency-format/src/BigNumberToLocaleString.test.ts
2
5
  import { BigNumber } from 'bignumber.js'
3
6
  import { toLocaleString } from './BigNumberToLocaleString'
@@ -1,3 +1,6 @@
1
+ // SPDX-FileCopyrightText: © 2024 LEDGER SAS
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
1
4
  // Forked from @ledgerhq/live-currency-format/src/BigNumberToLocaleString.ts
2
5
  import { BigNumber } from 'bignumber.js'
3
6
  import { getSeparators } from './localeUtility'
@@ -1,3 +1,6 @@
1
+ // SPDX-FileCopyrightText: © 2024 LEDGER SAS
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
1
4
  // Forked from @ledgerhq/live-currency-format/src/formatCurrencyUnit.test.ts
2
5
  // Snapshot tests using @ledgerhq/cryptoassets removed (not available in this repo)
3
6
  import { formatCurrencyUnit, formatCurrencyUnitFragment } from './formatCurrencyUnit'
@@ -1,3 +1,6 @@
1
+ // SPDX-FileCopyrightText: © 2024 LEDGER SAS
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
1
4
  // Forked from @ledgerhq/live-currency-format/src/formatCurrencyUnit.ts
2
5
  import { BigNumber } from 'bignumber.js'
3
6
  import { getSeparators } from './localeUtility'
@@ -1,3 +1,6 @@
1
+ // SPDX-FileCopyrightText: © 2024 LEDGER SAS
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
1
4
  export { parseCurrencyUnit } from './parseCurrencyUnit'
2
5
  export {
3
6
  formatCurrencyUnit,
@@ -1,3 +1,6 @@
1
+ // SPDX-FileCopyrightText: © 2024 LEDGER SAS
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
1
4
  // Forked from @ledgerhq/live-currency-format/src/localeUtility.test.ts
2
5
  import { getSeparators } from './localeUtility'
3
6
 
@@ -1,3 +1,6 @@
1
+ // SPDX-FileCopyrightText: © 2024 LEDGER SAS
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
1
4
  // Forked from @ledgerhq/live-currency-format/src/localeUtility.ts
2
5
  const memoize = <T extends (arg: string) => ReturnType<T>>(fn: T): T => {
3
6
  const cache: Record<string, ReturnType<T>> = {}
@@ -1,3 +1,6 @@
1
+ // SPDX-FileCopyrightText: © 2024 LEDGER SAS
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
1
4
  // Forked from @ledgerhq/live-currency-format/src/parseCurrencyUnit.test.ts
2
5
  import { BigNumber } from 'bignumber.js'
3
6
  import type { Unit } from '../api/types'
@@ -1,3 +1,6 @@
1
+ // SPDX-FileCopyrightText: © 2024 LEDGER SAS
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
1
4
  // Forked from @ledgerhq/live-currency-format/src/parseCurrencyUnit.ts
2
5
  import type { Unit } from '../api/types'
3
6
  import { BigNumber } from 'bignumber.js'
package/src/errors.ts CHANGED
@@ -1,3 +1,6 @@
1
+ // SPDX-FileCopyrightText: © 2024 LEDGER SAS
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
1
4
  import { createCustomErrorClass } from '@ledgerhq/errors'
2
5
 
3
6
  /** When a coin-module has no CoinConfig setted */
@@ -1,3 +1,6 @@
1
+ // SPDX-FileCopyrightText: © 2024 LEDGER SAS
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
1
4
  /**
2
5
  * Feature IDs as defined in https://ledgerhq.atlassian.net/wiki/spaces/CF/pages/6125551933/Coin+modules+-+ADR-003+-+Features+support
3
6
  * These represent the capabilities/features a coin module can support
package/src/index.ts CHANGED
@@ -1,3 +1,6 @@
1
+ // SPDX-FileCopyrightText: © 2024 LEDGER SAS
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
1
4
  import * as api from './api'
2
5
 
3
6
  export default {
@@ -0,0 +1,11 @@
1
+ // SPDX-FileCopyrightText: © 2024 LEDGER SAS
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ import { TransactionIntent } from '../api'
5
+ import { craftTransactionData } from './craftTransactionData'
6
+
7
+ describe('craftTransactionData', () => {
8
+ it('should return not supported tx data', () => {
9
+ expect(craftTransactionData({} as unknown as TransactionIntent)).toEqual({ type: 'none' })
10
+ })
11
+ })
@@ -0,0 +1,9 @@
1
+ // SPDX-FileCopyrightText: © 2024 LEDGER SAS
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ import { TransactionIntent, TxDataNotSupported } from '../api/types'
5
+
6
+ export function craftTransactionData(intent: TransactionIntent): TxDataNotSupported {
7
+ void intent
8
+ return { type: 'none' }
9
+ }
package/src/test/utils.ts CHANGED
@@ -1,3 +1,6 @@
1
+ // SPDX-FileCopyrightText: © 2024 LEDGER SAS
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
1
4
  /**
2
5
  * Recursively makes all properties optional.
3
6
  * Arrays keep their element type (but each element is deeply partial).
package/src/utils.test.ts CHANGED
@@ -1,3 +1,6 @@
1
+ // SPDX-FileCopyrightText: © 2024 LEDGER SAS
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
1
4
  import BigNumber from 'bignumber.js'
2
5
  import { fromBigNumberToBigInt } from './utils'
3
6
 
package/src/utils.ts CHANGED
@@ -1,3 +1,6 @@
1
+ // SPDX-FileCopyrightText: © 2024 LEDGER SAS
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
1
4
  import BigNumber from 'bignumber.js'
2
5
  import { SendTransactionIntent, StakingTransactionIntent, TransactionIntent } from './api'
3
6
 
package/lib/setup.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=setup.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":""}
package/lib/setup.js DELETED
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const bignumber_js_1 = require("bignumber.js");
4
- const live_env_1 = require("@ledgerhq/live-env");
5
- bignumber_js_1.BigNumber.set({ DECIMAL_PLACES: (0, live_env_1.getEnv)('BIG_NUMBER_DECIMAL_PLACES') });
6
- //# sourceMappingURL=setup.js.map
package/lib/setup.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"setup.js","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":";;AAAA,+CAAwC;AACxC,iDAA2C;AAE3C,wBAAS,CAAC,GAAG,CAAC,EAAE,cAAc,EAAE,IAAA,iBAAM,EAAC,2BAA2B,CAAC,EAAE,CAAC,CAAA"}
package/lib-es/setup.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=setup.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":""}
package/lib-es/setup.js DELETED
@@ -1,4 +0,0 @@
1
- import { BigNumber } from 'bignumber.js';
2
- import { getEnv } from '@ledgerhq/live-env';
3
- BigNumber.set({ DECIMAL_PLACES: getEnv('BIG_NUMBER_DECIMAL_PLACES') });
4
- //# sourceMappingURL=setup.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"setup.js","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAE3C,SAAS,CAAC,GAAG,CAAC,EAAE,cAAc,EAAE,MAAM,CAAC,2BAA2B,CAAC,EAAE,CAAC,CAAA"}
package/src/setup.ts DELETED
@@ -1,4 +0,0 @@
1
- import { BigNumber } from 'bignumber.js'
2
- import { getEnv } from '@ledgerhq/live-env'
3
-
4
- BigNumber.set({ DECIMAL_PLACES: getEnv('BIG_NUMBER_DECIMAL_PLACES') })