@ledgerhq/coin-evm 5.3.1 → 5.3.2
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/.oxlintrc.json +2 -12
- package/CHANGELOG.md +6 -0
- package/lib/adapters/blockOperations.d.ts +2 -2
- package/lib/adapters/blockOperations.d.ts.map +1 -1
- package/lib/adapters/blockOperations.js.map +1 -1
- package/lib/api/index.d.ts +1 -1
- package/lib/api/index.d.ts.map +1 -1
- package/lib/config.d.ts +1 -1
- package/lib/config.d.ts.map +1 -1
- package/lib/logic/combine.d.ts +2 -1
- package/lib/logic/combine.d.ts.map +1 -1
- package/lib/logic/combine.js.map +1 -1
- package/lib/logic/common.d.ts +2 -1
- package/lib/logic/common.d.ts.map +1 -1
- package/lib/logic/common.js.map +1 -1
- package/lib/logic/craftTransaction.d.ts +1 -1
- package/lib/logic/craftTransaction.d.ts.map +1 -1
- package/lib/logic/craftTransaction.js.map +1 -1
- package/lib/logic/craftTransactionData.d.ts +1 -1
- package/lib/logic/craftTransactionData.d.ts.map +1 -1
- package/lib/logic/estimateFees.d.ts +1 -1
- package/lib/logic/estimateFees.d.ts.map +1 -1
- package/lib/logic/estimateFees.js.map +1 -1
- package/lib/logic/getBalance.d.ts +1 -1
- package/lib/logic/getBalance.d.ts.map +1 -1
- package/lib/logic/getBalance.js.map +1 -1
- package/lib/logic/getBlock.d.ts +1 -1
- package/lib/logic/getBlock.d.ts.map +1 -1
- package/lib/logic/getBlock.js.map +1 -1
- package/lib/logic/getStakes.d.ts +1 -1
- package/lib/logic/getStakes.d.ts.map +1 -1
- package/lib/logic/internalTransactionsFetcher.d.ts +1 -1
- package/lib/logic/internalTransactionsFetcher.d.ts.map +1 -1
- package/lib/logic/internalTransactionsFetcher.js.map +1 -1
- package/lib/logic/validateIntent.d.ts +1 -1
- package/lib/logic/validateIntent.d.ts.map +1 -1
- package/lib/logic/validateIntent.js.map +1 -1
- package/lib/logic.d.ts +1 -1
- package/lib/logic.d.ts.map +1 -1
- package/lib/network/explorer/etherscan.d.ts +4 -4
- package/lib/network/explorer/etherscan.d.ts.map +1 -1
- package/lib/network/explorer/etherscan.js.map +1 -1
- package/lib/network/explorer/index.d.ts +2 -2
- package/lib/network/explorer/index.d.ts.map +1 -1
- package/lib/network/explorer/index.js.map +1 -1
- package/lib/network/explorer/ledger.d.ts +2 -2
- package/lib/network/explorer/ledger.d.ts.map +1 -1
- package/lib/network/explorer/ledger.js.map +1 -1
- package/lib/network/explorer/none.d.ts +1 -1
- package/lib/network/explorer/none.d.ts.map +1 -1
- package/lib/network/explorer/none.js.map +1 -1
- package/lib/network/explorer/types.d.ts +1 -1
- package/lib/network/explorer/types.d.ts.map +1 -1
- package/lib/network/gasTracker/index.d.ts +2 -2
- package/lib/network/gasTracker/index.d.ts.map +1 -1
- package/lib/network/gasTracker/index.js.map +1 -1
- package/lib/network/gasTracker/ledger.d.ts +3 -3
- package/lib/network/gasTracker/ledger.d.ts.map +1 -1
- package/lib/network/gasTracker/ledger.js.map +1 -1
- package/lib/network/gasTracker/types.d.ts +2 -2
- package/lib/network/gasTracker/types.d.ts.map +1 -1
- package/lib/network/node/ledger.d.ts +2 -2
- package/lib/network/node/ledger.d.ts.map +1 -1
- package/lib/network/node/ledger.js.map +1 -1
- package/lib/network/node/rpc.common.d.ts +1 -1
- package/lib/network/node/rpc.common.d.ts.map +1 -1
- package/lib/network/node/rpc.common.js.map +1 -1
- package/lib/network/node/types.d.ts +3 -3
- package/lib/network/node/types.d.ts.map +1 -1
- package/lib/staking/validators/monad.d.ts +2 -1
- package/lib/staking/validators/monad.d.ts.map +1 -1
- package/lib/staking/validators/monad.js.map +1 -1
- package/lib/staking/validators/monadResolver.d.ts +2 -1
- package/lib/staking/validators/monadResolver.d.ts.map +1 -1
- package/lib/staking/validators/monadResolver.js.map +1 -1
- package/lib/staking/validators/somnia.d.ts.map +1 -1
- package/lib/staking/validators/somnia.js.map +1 -1
- package/lib/staking/validators/zero_gravity.d.ts.map +1 -1
- package/lib/staking/validators/zero_gravity.js.map +1 -1
- package/lib/types/assets.d.ts +1 -1
- package/lib/types/assets.d.ts.map +1 -1
- package/lib/types/transaction.d.ts +1 -1
- package/lib/types/transaction.d.ts.map +1 -1
- package/lib-es/adapters/blockOperations.d.ts +2 -2
- package/lib-es/adapters/blockOperations.d.ts.map +1 -1
- package/lib-es/adapters/blockOperations.js.map +1 -1
- package/lib-es/api/index.d.ts +1 -1
- package/lib-es/api/index.d.ts.map +1 -1
- package/lib-es/config.d.ts +1 -1
- package/lib-es/config.d.ts.map +1 -1
- package/lib-es/logic/combine.d.ts +2 -1
- package/lib-es/logic/combine.d.ts.map +1 -1
- package/lib-es/logic/combine.js.map +1 -1
- package/lib-es/logic/common.d.ts +2 -1
- package/lib-es/logic/common.d.ts.map +1 -1
- package/lib-es/logic/common.js +1 -1
- package/lib-es/logic/common.js.map +1 -1
- package/lib-es/logic/craftTransaction.d.ts +1 -1
- package/lib-es/logic/craftTransaction.d.ts.map +1 -1
- package/lib-es/logic/craftTransaction.js.map +1 -1
- package/lib-es/logic/craftTransactionData.d.ts +1 -1
- package/lib-es/logic/craftTransactionData.d.ts.map +1 -1
- package/lib-es/logic/estimateFees.d.ts +1 -1
- package/lib-es/logic/estimateFees.d.ts.map +1 -1
- package/lib-es/logic/estimateFees.js.map +1 -1
- package/lib-es/logic/getBalance.d.ts +1 -1
- package/lib-es/logic/getBalance.d.ts.map +1 -1
- package/lib-es/logic/getBalance.js.map +1 -1
- package/lib-es/logic/getBlock.d.ts +1 -1
- package/lib-es/logic/getBlock.d.ts.map +1 -1
- package/lib-es/logic/getBlock.js.map +1 -1
- package/lib-es/logic/getStakes.d.ts +1 -1
- package/lib-es/logic/getStakes.d.ts.map +1 -1
- package/lib-es/logic/internalTransactionsFetcher.d.ts +1 -1
- package/lib-es/logic/internalTransactionsFetcher.d.ts.map +1 -1
- package/lib-es/logic/internalTransactionsFetcher.js.map +1 -1
- package/lib-es/logic/validateIntent.d.ts +1 -1
- package/lib-es/logic/validateIntent.d.ts.map +1 -1
- package/lib-es/logic/validateIntent.js.map +1 -1
- package/lib-es/logic.d.ts +1 -1
- package/lib-es/logic.d.ts.map +1 -1
- package/lib-es/network/explorer/etherscan.d.ts +4 -4
- package/lib-es/network/explorer/etherscan.d.ts.map +1 -1
- package/lib-es/network/explorer/etherscan.js.map +1 -1
- package/lib-es/network/explorer/index.d.ts +2 -2
- package/lib-es/network/explorer/index.d.ts.map +1 -1
- package/lib-es/network/explorer/index.js.map +1 -1
- package/lib-es/network/explorer/ledger.d.ts +2 -2
- package/lib-es/network/explorer/ledger.d.ts.map +1 -1
- package/lib-es/network/explorer/ledger.js.map +1 -1
- package/lib-es/network/explorer/none.d.ts +1 -1
- package/lib-es/network/explorer/none.d.ts.map +1 -1
- package/lib-es/network/explorer/none.js.map +1 -1
- package/lib-es/network/explorer/types.d.ts +1 -1
- package/lib-es/network/explorer/types.d.ts.map +1 -1
- package/lib-es/network/gasTracker/index.d.ts +2 -2
- package/lib-es/network/gasTracker/index.d.ts.map +1 -1
- package/lib-es/network/gasTracker/index.js.map +1 -1
- package/lib-es/network/gasTracker/ledger.d.ts +3 -3
- package/lib-es/network/gasTracker/ledger.d.ts.map +1 -1
- package/lib-es/network/gasTracker/ledger.js +1 -1
- package/lib-es/network/gasTracker/ledger.js.map +1 -1
- package/lib-es/network/gasTracker/types.d.ts +2 -2
- package/lib-es/network/gasTracker/types.d.ts.map +1 -1
- package/lib-es/network/node/ledger.d.ts +2 -2
- package/lib-es/network/node/ledger.d.ts.map +1 -1
- package/lib-es/network/node/ledger.js.map +1 -1
- package/lib-es/network/node/rpc.common.d.ts +1 -1
- package/lib-es/network/node/rpc.common.d.ts.map +1 -1
- package/lib-es/network/node/rpc.common.js +1 -1
- package/lib-es/network/node/rpc.common.js.map +1 -1
- package/lib-es/network/node/types.d.ts +3 -3
- package/lib-es/network/node/types.d.ts.map +1 -1
- package/lib-es/staking/validators/monad.d.ts +2 -1
- package/lib-es/staking/validators/monad.d.ts.map +1 -1
- package/lib-es/staking/validators/monad.js.map +1 -1
- package/lib-es/staking/validators/monadResolver.d.ts +2 -1
- package/lib-es/staking/validators/monadResolver.d.ts.map +1 -1
- package/lib-es/staking/validators/monadResolver.js.map +1 -1
- package/lib-es/staking/validators/somnia.d.ts.map +1 -1
- package/lib-es/staking/validators/somnia.js.map +1 -1
- package/lib-es/staking/validators/zero_gravity.d.ts.map +1 -1
- package/lib-es/staking/validators/zero_gravity.js.map +1 -1
- package/lib-es/types/assets.d.ts +1 -1
- package/lib-es/types/assets.d.ts.map +1 -1
- package/lib-es/types/transaction.d.ts +1 -1
- package/lib-es/types/transaction.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/adapters/blockOperations.test.ts +2 -2
- package/src/adapters/blockOperations.ts +3 -2
- package/src/adapters/etherscan.test.ts +7 -7
- package/src/adapters/ledger.test.ts +2 -2
- package/src/api/getBlock.integ.test.ts +1 -1
- package/src/api/index.fantom.integ.test.ts +1 -1
- package/src/api/index.flare.integ.test.ts +1 -1
- package/src/api/index.integ.test.ts +248 -153
- package/src/api/index.linea.integ.test.ts +1 -1
- package/src/api/index.optimism.integ.test.ts +1 -1
- package/src/api/index.shape.integ.test.ts +1 -1
- package/src/api/index.ts +1 -1
- package/src/config.ts +1 -1
- package/src/fixtures/ledger.fixtures.ts +1 -1
- package/src/internalTxSources.test.ts +3 -6
- package/src/logic/combine.test.ts +2 -2
- package/src/logic/combine.ts +2 -1
- package/src/logic/common.test.ts +3 -3
- package/src/logic/common.ts +2 -7
- package/src/logic/craftTransaction.test.ts +4 -3
- package/src/logic/craftTransaction.ts +3 -2
- package/src/logic/craftTransactionData.test.ts +1 -1
- package/src/logic/craftTransactionData.ts +1 -1
- package/src/logic/estimateFees.ts +6 -3
- package/src/logic/getBalance.test.ts +1 -1
- package/src/logic/getBalance.ts +4 -3
- package/src/logic/getBlock.test.ts +8 -7
- package/src/logic/getBlock.ts +3 -2
- package/src/logic/getBlockInfo.test.ts +1 -3
- package/src/logic/getStakes.test.ts +2 -2
- package/src/logic/getStakes.ts +1 -1
- package/src/logic/internalTransactionsFetcher.test.ts +4 -6
- package/src/logic/internalTransactionsFetcher.ts +1 -1
- package/src/logic/lastBlock.test.ts +2 -1
- package/src/logic/listOperations.test.ts +3 -2
- package/src/logic/validateIntent.test.ts +2 -1
- package/src/logic/validateIntent.ts +4 -2
- package/src/logic.ts +1 -1
- package/src/network/explorer/etherscan.test.ts +1 -1
- package/src/network/explorer/etherscan.ts +12 -10
- package/src/network/explorer/index.test.ts +1 -1
- package/src/network/explorer/index.ts +2 -2
- package/src/network/explorer/ledger.test.ts +2 -1
- package/src/network/explorer/ledger.ts +3 -2
- package/src/network/explorer/none.ts +2 -1
- package/src/network/explorer/types.ts +1 -1
- package/src/network/gasTracker/index.test.ts +1 -1
- package/src/network/gasTracker/index.ts +2 -2
- package/src/network/gasTracker/ledger.test.ts +10 -17
- package/src/network/gasTracker/ledger.ts +5 -7
- package/src/network/gasTracker/types.ts +2 -2
- package/src/network/node/index.memoization.test.ts +1 -1
- package/src/network/node/ledger.ts +6 -5
- package/src/network/node/rpc.common.ts +14 -14
- package/src/network/node/rpc.test.ts +4 -10
- package/src/network/node/types.ts +3 -3
- package/src/staking/detectOperationType.test.ts +1 -1
- package/src/staking/encoder.test.ts +1 -1
- package/src/staking/operations/index.test.ts +1 -1
- package/src/staking/redelegations.test.ts +23 -15
- package/src/staking/rewards.test.ts +6 -2
- package/src/staking/rewardsFromReceipt.test.ts +1 -1
- package/src/staking/transactionData.test.ts +2 -2
- package/src/staking/validators/monad.ts +2 -1
- package/src/staking/validators/monadResolver.ts +2 -1
- package/src/staking/validators/somnia.ts +2 -1
- package/src/staking/validators/zero_gravity.ts +2 -1
- package/src/staking/validators.test.ts +7 -2
- package/src/types/assets.ts +1 -1
- package/src/types/transaction.ts +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
4
|
import type { EvmConfigInfo } from '../config'
|
|
5
|
-
import {
|
|
5
|
+
import type {
|
|
6
6
|
BufferTxData,
|
|
7
7
|
MemoNotSupported,
|
|
8
8
|
TransactionIntent,
|
|
@@ -542,7 +542,8 @@ describe('craftTransaction', () => {
|
|
|
542
542
|
await expect(
|
|
543
543
|
craftTransaction(context, 'sei_evm', {
|
|
544
544
|
transactionIntent: {
|
|
545
|
-
type: 'staking',
|
|
545
|
+
type: 'staking-legacy',
|
|
546
|
+
intentType: 'staking',
|
|
546
547
|
sender: '0x1234567890abcdef1234567890abcdef12345678',
|
|
547
548
|
recipient: '0x000000000000000000000000000000000001005',
|
|
548
549
|
valAddress: 'validator123',
|
|
@@ -551,7 +552,7 @@ describe('craftTransaction', () => {
|
|
|
551
552
|
mode: 'unsupported_operation',
|
|
552
553
|
} as any,
|
|
553
554
|
})
|
|
554
|
-
).rejects.toThrow()
|
|
555
|
+
).rejects.toThrow('Invalid staking operation: unsupported_operation')
|
|
555
556
|
})
|
|
556
557
|
})
|
|
557
558
|
})
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
4
|
import type { EvmContext } from '../config'
|
|
5
|
-
import {
|
|
5
|
+
import type {
|
|
6
6
|
BufferTxData,
|
|
7
7
|
CraftedTransaction,
|
|
8
8
|
FeeEstimation,
|
|
@@ -10,7 +10,8 @@ import {
|
|
|
10
10
|
MemoNotSupported,
|
|
11
11
|
TransactionIntent,
|
|
12
12
|
} from '@ledgerhq/coin-module-framework/api/types'
|
|
13
|
-
import {
|
|
13
|
+
import type { TransactionLike } from 'ethers'
|
|
14
|
+
import { Transaction } from 'ethers'
|
|
14
15
|
import { GasEstimationError } from '../errors'
|
|
15
16
|
import { getNodeApi } from '../network/node'
|
|
16
17
|
import { TransactionTypes } from '../types'
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: © 2026 LEDGER SAS
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
+
import type { EvmConfigInfo } from '../config'
|
|
5
|
+
import type { EvmContext } from '../config'
|
|
6
|
+
import type { ApiFeeData, ApiGasOptions, FeeData, GasOptions } from '../types'
|
|
4
7
|
import type {
|
|
5
8
|
BufferTxData,
|
|
6
9
|
FeeEstimation,
|
|
@@ -8,14 +11,14 @@ import type {
|
|
|
8
11
|
MemoNotSupported,
|
|
9
12
|
TransactionIntent,
|
|
10
13
|
} from '@ledgerhq/coin-module-framework/api/index'
|
|
14
|
+
import type { TransactionLike } from 'ethers'
|
|
11
15
|
import BigNumber from 'bignumber.js'
|
|
12
|
-
import { Transaction
|
|
13
|
-
import { EvmConfigInfo, type EvmContext } from '../config'
|
|
16
|
+
import { Transaction } from 'ethers'
|
|
14
17
|
import { getAdditionalLayer2Fees } from '../logic'
|
|
15
18
|
import { getGasTracker } from '../network/gasTracker'
|
|
16
19
|
import { getNodeApi } from '../network/node'
|
|
17
20
|
import { STAKING_CONTRACTS } from '../staking'
|
|
18
|
-
import {
|
|
21
|
+
import { TransactionTypes } from '../types'
|
|
19
22
|
import { isEthAddress, isStakingIntent } from '../utils'
|
|
20
23
|
import { getTransactionType, prepareUnsignedTxParams } from './common'
|
|
21
24
|
import { getNextSequence } from './getNextSequence'
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
4
|
import type { EvmConfigInfo, EvmContext } from '../config'
|
|
5
|
-
import { AssetInfo } from '@ledgerhq/coin-module-framework/api/types'
|
|
5
|
+
import type { AssetInfo } from '@ledgerhq/coin-module-framework/api/types'
|
|
6
6
|
import BigNumber from 'bignumber.js'
|
|
7
7
|
import { createMockEvmContext } from '../fixtures/context.fixtures'
|
|
8
8
|
import { getExplorerApi } from '../network/explorer'
|
package/src/logic/getBalance.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: © 2026 LEDGER SAS
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
+
import type { EvmConfigInfo } from '../config'
|
|
5
|
+
import type { EvmContext } from '../config'
|
|
6
|
+
import type { ExplorerApi } from '../network/explorer/types'
|
|
7
|
+
import type { NodeApi } from '../network/node/types'
|
|
4
8
|
import type {
|
|
5
9
|
Balance,
|
|
6
10
|
AssetInfo,
|
|
@@ -8,11 +12,8 @@ import type {
|
|
|
8
12
|
MemoNotSupported,
|
|
9
13
|
Operation,
|
|
10
14
|
} from '@ledgerhq/coin-module-framework/api/types'
|
|
11
|
-
import { EvmConfigInfo, type EvmContext } from '../config'
|
|
12
15
|
import { getExplorerApi } from '../network/explorer'
|
|
13
|
-
import { ExplorerApi } from '../network/explorer/types'
|
|
14
16
|
import { getNodeApi } from '../network/node'
|
|
15
|
-
import { NodeApi } from '../network/node/types'
|
|
16
17
|
import { STAKING_CONFIG } from '../staking'
|
|
17
18
|
import { getStakes } from './getStakes'
|
|
18
19
|
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: © 2026 LEDGER SAS
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
-
import type {
|
|
5
|
-
import {
|
|
6
|
-
import { UnsupportedRpcMethodError } from '../errors'
|
|
7
|
-
import { getInternalTransactionsByBlock } from '../network/explorer/etherscan'
|
|
8
|
-
import { getNodeApi } from '../network/node'
|
|
9
|
-
import {
|
|
4
|
+
import type { EvmCoinConfig } from '../config'
|
|
5
|
+
import type {
|
|
10
6
|
BlockByHeightResult,
|
|
11
7
|
BlockReceiptInfo,
|
|
12
8
|
ERC20Transfer,
|
|
@@ -15,7 +11,12 @@ import {
|
|
|
15
11
|
TraceBlockItem,
|
|
16
12
|
TransactionInfo,
|
|
17
13
|
} from '../network/node/types'
|
|
18
|
-
import { EtherscanInternalTransaction } from '../types'
|
|
14
|
+
import type { EtherscanInternalTransaction } from '../types'
|
|
15
|
+
import type { BlockOperation } from '@ledgerhq/coin-module-framework/api/index'
|
|
16
|
+
import { createContext, internalTxSourcesFromList, setCoinConfig } from '../config'
|
|
17
|
+
import { UnsupportedRpcMethodError } from '../errors'
|
|
18
|
+
import { getInternalTransactionsByBlock } from '../network/explorer/etherscan'
|
|
19
|
+
import { getNodeApi } from '../network/node'
|
|
19
20
|
import { safeEncodeEIP55 } from '../utils'
|
|
20
21
|
import { getBlock } from './getBlock'
|
|
21
22
|
import { dropRootTraceDuplicates } from './rootTraceDedup'
|
package/src/logic/getBlock.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: © 2026 LEDGER SAS
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
+
import type { EvmContext } from '../config'
|
|
5
|
+
import type { BlockReceiptInfo, PrefetchedBlockTransaction } from '../network/node/types'
|
|
4
6
|
import type {
|
|
5
7
|
Block,
|
|
6
8
|
BlockInfo,
|
|
@@ -11,10 +13,9 @@ import type {
|
|
|
11
13
|
import { promiseAllBatched } from '@ledgerhq/coin-module-framework/promises'
|
|
12
14
|
import { log } from '@ledgerhq/logs'
|
|
13
15
|
import { rpcTransactionToBlockOperations } from '../adapters/blockOperations'
|
|
14
|
-
import { DEFAULT_INTERNAL_TX_SOURCES
|
|
16
|
+
import { DEFAULT_INTERNAL_TX_SOURCES } from '../config'
|
|
15
17
|
import { UnsupportedRpcMethodError } from '../errors'
|
|
16
18
|
import { getNodeApi } from '../network/node'
|
|
17
|
-
import { BlockReceiptInfo, PrefetchedBlockTransaction } from '../network/node/types'
|
|
18
19
|
import { buildSmartContractDetails, safeEncodeEIP55 } from '../utils'
|
|
19
20
|
import { createInternalTransactionsFetcher } from './internalTransactionsFetcher'
|
|
20
21
|
import { dropRootTraceDuplicates } from './rootTraceDedup'
|
|
@@ -114,9 +114,7 @@ describe('getBlockInfo', () => {
|
|
|
114
114
|
const result = await getBlockInfo(context, '', 100)
|
|
115
115
|
|
|
116
116
|
expect(result.time).toBeInstanceOf(Date)
|
|
117
|
-
expect(result.parent).
|
|
118
|
-
expect(result.parent?.height).toBe(99)
|
|
119
|
-
expect(result.parent?.hash).toBe('0xparent')
|
|
117
|
+
expect(result.parent).toMatchObject({ height: 99, hash: '0xparent' })
|
|
120
118
|
})
|
|
121
119
|
})
|
|
122
120
|
})
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
4
|
import type { EvmConfigInfo } from '../config'
|
|
5
|
-
import { JsonRpcProvider } from 'ethers'
|
|
5
|
+
import type { JsonRpcProvider } from 'ethers'
|
|
6
6
|
import { createMockEvmContext } from '../fixtures/context.fixtures'
|
|
7
7
|
import { withApi } from '../network/node/rpc.common'
|
|
8
8
|
import { encodeStakingData, decodeStakingResult } from '../staking/encoder'
|
|
@@ -44,7 +44,7 @@ describe('EVM Staking - getStakes', () => {
|
|
|
44
44
|
|
|
45
45
|
beforeEach(() => {
|
|
46
46
|
jest.clearAllMocks()
|
|
47
|
-
jest.spyOn(console, 'error').mockImplementation(() =>
|
|
47
|
+
jest.spyOn(console, 'error').mockImplementation(() => undefined)
|
|
48
48
|
})
|
|
49
49
|
|
|
50
50
|
it('should return stake objects with positive amounts for supported currencies', async () => {
|
package/src/logic/getStakes.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
4
|
import type { EvmContext } from '../config'
|
|
5
|
-
import { Page, Stake, StakesOptions } from '@ledgerhq/coin-module-framework/api/types'
|
|
5
|
+
import type { Page, Stake, StakesOptions } from '@ledgerhq/coin-module-framework/api/types'
|
|
6
6
|
import { STAKING_CONTRACTS, STAKING_CONFIG } from '../staking'
|
|
7
7
|
|
|
8
8
|
export const getStakes = async (
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: © 2026 LEDGER SAS
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
+
import type { EvmConfigInfo } from '../config'
|
|
5
|
+
import type { SourceFetcher } from './internalTransactionsFetcher'
|
|
4
6
|
import type { BlockOperation } from '@ledgerhq/coin-module-framework/api/index'
|
|
5
|
-
import {
|
|
7
|
+
import { internalTxSourcesFromList } from '../config'
|
|
6
8
|
import { SourceUnavailableError } from '../errors'
|
|
7
9
|
import { getInternalTransactionsByBlock } from '../network/explorer/etherscan'
|
|
8
10
|
import { mockNodeApi } from '../network/node/node.fixtures'
|
|
9
|
-
import {
|
|
10
|
-
composeInternalTxsFetcher,
|
|
11
|
-
makeSourceFetchers,
|
|
12
|
-
type SourceFetcher,
|
|
13
|
-
} from './internalTransactionsFetcher'
|
|
11
|
+
import { composeInternalTxsFetcher, makeSourceFetchers } from './internalTransactionsFetcher'
|
|
14
12
|
|
|
15
13
|
jest.mock('../network/explorer/etherscan', () => ({
|
|
16
14
|
getInternalTransactionsByBlock: jest.fn().mockResolvedValue([]),
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
import type { EvmConfigInfo } from '../config'
|
|
5
5
|
import type { InternalTxSource } from '../internalTxSources'
|
|
6
|
+
import type { NodeApi } from '../network/node/types'
|
|
6
7
|
import type { BlockOperation } from '@ledgerhq/coin-module-framework/api/index'
|
|
7
8
|
import { log } from '@ledgerhq/logs'
|
|
8
9
|
import { traceBlockItemsToOperationsByHash } from '../adapters/blockOperations'
|
|
@@ -10,7 +11,6 @@ import { internalTxsToOperationsByHash } from '../adapters/etherscan'
|
|
|
10
11
|
import { SourceUnavailableError } from '../errors'
|
|
11
12
|
import { getInternalTransactionsByBlock } from '../network/explorer/etherscan'
|
|
12
13
|
import { isEtherscanLikeExplorerConfig } from '../network/explorer/types'
|
|
13
|
-
import { NodeApi } from '../network/node/types'
|
|
14
14
|
|
|
15
15
|
export type InternalTxsByHash = Map<string, BlockOperation[]>
|
|
16
16
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: © 2026 LEDGER SAS
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
-
import { BlockFinalizationTag
|
|
4
|
+
import type { BlockFinalizationTag } from '../config'
|
|
5
|
+
import type { EvmConfigInfo } from '../config'
|
|
5
6
|
import { createMockEvmContext } from '../fixtures/context.fixtures'
|
|
6
7
|
import { getNodeApi } from '../network/node'
|
|
7
8
|
import { mockNodeApi } from '../network/node/node.fixtures'
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: © 2026 LEDGER SAS
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
+
import type { EvmConfigInfo } from '../config'
|
|
5
|
+
import type { EvmContext } from '../config'
|
|
6
|
+
import type { ExplorerApi } from '../network/explorer/types'
|
|
4
7
|
import type { MemoNotSupported, Operation } from '@ledgerhq/coin-module-framework/api/types'
|
|
5
8
|
import BigNumber from 'bignumber.js'
|
|
6
|
-
import { EvmConfigInfo, type EvmContext } from '../config'
|
|
7
9
|
import { createMockEvmContext } from '../fixtures/context.fixtures'
|
|
8
10
|
import etherscanExplorer from '../network/explorer/etherscan'
|
|
9
11
|
import ledgerExplorer from '../network/explorer/ledger'
|
|
10
|
-
import { ExplorerApi } from '../network/explorer/types'
|
|
11
12
|
import { listOperations } from './listOperations'
|
|
12
13
|
|
|
13
14
|
describe('listOperations', () => {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: © 2026 LEDGER SAS
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
+
import type { EvmCoinConfig } from '../config'
|
|
4
5
|
import type {
|
|
5
6
|
BufferTxData,
|
|
6
7
|
MemoNotSupported,
|
|
@@ -16,7 +17,7 @@ import {
|
|
|
16
17
|
RecipientRequired,
|
|
17
18
|
} from '@ledgerhq/coin-module-framework/errors'
|
|
18
19
|
import BigNumber from 'bignumber.js'
|
|
19
|
-
import { createContext,
|
|
20
|
+
import { createContext, setCoinConfig } from '../config'
|
|
20
21
|
import {
|
|
21
22
|
ClaimRewardsFeesWarning,
|
|
22
23
|
ETHAddressNonEIP,
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: © 2026 LEDGER SAS
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
+
import type { EvmConfigInfo } from '../config'
|
|
5
|
+
import type { EvmContext } from '../config'
|
|
6
|
+
import type { StakingOperation } from '../types'
|
|
4
7
|
import type {
|
|
5
8
|
AssetInfo,
|
|
6
9
|
Balance,
|
|
@@ -20,7 +23,6 @@ import {
|
|
|
20
23
|
RecipientRequired,
|
|
21
24
|
} from '@ledgerhq/coin-module-framework/errors'
|
|
22
25
|
import BigNumber from 'bignumber.js'
|
|
23
|
-
import { EvmConfigInfo, type EvmContext } from '../config'
|
|
24
26
|
import {
|
|
25
27
|
ClaimRewardsFeesWarning,
|
|
26
28
|
ETHAddressNonEIP,
|
|
@@ -38,7 +40,7 @@ import {
|
|
|
38
40
|
import { getGasTracker } from '../network/gasTracker'
|
|
39
41
|
import { getNodeApi } from '../network/node'
|
|
40
42
|
import { STAKING_CONTRACTS } from '../staking'
|
|
41
|
-
import { isNative,
|
|
43
|
+
import { isNative, TransactionTypes } from '../types'
|
|
42
44
|
import { DEFAULT_GAS_LIMIT, isEthAddress, isStakingIntent } from '../utils'
|
|
43
45
|
import {
|
|
44
46
|
getTransactionType,
|
package/src/logic.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: © 2026 LEDGER SAS
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
+
import type { PagingState } from '../../adapters'
|
|
4
5
|
import type { MemoNotSupported, Operation } from '@ledgerhq/coin-module-framework/api/types'
|
|
5
6
|
import { AssertionError, fail } from 'assert'
|
|
6
7
|
import { delay } from '@ledgerhq/coin-module-framework/promises'
|
|
@@ -13,7 +14,6 @@ import {
|
|
|
13
14
|
etherscanOperationToOperations,
|
|
14
15
|
deserializePagingToken,
|
|
15
16
|
serializePagingToken,
|
|
16
|
-
PagingState,
|
|
17
17
|
} from '../../adapters'
|
|
18
18
|
import { getCoinConfig } from '../../config'
|
|
19
19
|
import { EtherscanAPIError, EtherscanLikeExplorerUsedIncorrectly } from '../../errors'
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: © 2026 LEDGER SAS
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
+
import type { EvmConfigInfo } from '../../config'
|
|
5
|
+
import type {
|
|
6
|
+
EtherscanERC1155Event,
|
|
7
|
+
EtherscanERC20Event,
|
|
8
|
+
EtherscanERC721Event,
|
|
9
|
+
EtherscanInternalTransaction,
|
|
10
|
+
EtherscanOperation,
|
|
11
|
+
} from '../../types'
|
|
12
|
+
import type { ExplorerApi } from './types'
|
|
4
13
|
import type { MemoNotSupported, Operation } from '@ledgerhq/coin-module-framework/api/types'
|
|
14
|
+
import type { AxiosRequestConfig } from 'axios'
|
|
5
15
|
import { delay } from '@ledgerhq/coin-module-framework/promises'
|
|
6
16
|
import { makeLRUCache } from '@ledgerhq/live-network/cache'
|
|
7
17
|
import { log } from '@ledgerhq/logs'
|
|
8
|
-
import axios
|
|
18
|
+
import axios from 'axios'
|
|
9
19
|
import {
|
|
10
20
|
etherscanOperationToOperations,
|
|
11
21
|
etherscanERC20EventToOperations,
|
|
@@ -15,24 +25,16 @@ import {
|
|
|
15
25
|
deserializePagingToken,
|
|
16
26
|
serializePagingToken,
|
|
17
27
|
} from '../../adapters'
|
|
18
|
-
import { EvmConfigInfo } from '../../config'
|
|
19
28
|
import {
|
|
20
29
|
EtherscanAPIError,
|
|
21
30
|
EtherscanLikeExplorerUsedIncorrectly,
|
|
22
31
|
InvalidExplorerResponse,
|
|
23
32
|
} from '../../errors'
|
|
24
33
|
import { enrichRewardOperationsValue } from '../../staking/rewardsFromReceipt'
|
|
25
|
-
import {
|
|
26
|
-
EtherscanERC1155Event,
|
|
27
|
-
EtherscanERC20Event,
|
|
28
|
-
EtherscanERC721Event,
|
|
29
|
-
EtherscanInternalTransaction,
|
|
30
|
-
EtherscanOperation,
|
|
31
|
-
} from '../../types'
|
|
32
34
|
import { nftDisabled } from '../../utils'
|
|
33
35
|
import { withApi } from '../node/rpc.common'
|
|
34
36
|
import { isExternalNodeConfig } from '../node/types'
|
|
35
|
-
import {
|
|
37
|
+
import { isEtherscanLikeExplorerConfig } from './types'
|
|
36
38
|
|
|
37
39
|
export const ETHERSCAN_TIMEOUT = 5000 // 5 seconds between 2 calls
|
|
38
40
|
export const DEFAULT_RETRIES_API = 8
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: © 2026 LEDGER SAS
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
+
import type { EvmConfigInfo } from '../../config'
|
|
4
5
|
import { AssertionError, fail } from 'assert'
|
|
5
|
-
import { EvmConfigInfo } from '../../config'
|
|
6
6
|
import { UnknownExplorer } from '../../errors'
|
|
7
7
|
import etherscanLikeApi from './etherscan'
|
|
8
8
|
import ledgerExplorerApi from './ledger'
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: © 2026 LEDGER SAS
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
-
import { EvmConfigInfo } from '../../config'
|
|
4
|
+
import type { EvmConfigInfo } from '../../config'
|
|
5
|
+
import type { ExplorerApi } from './types'
|
|
5
6
|
import { UnknownExplorer } from '../../errors'
|
|
6
7
|
import etherscanLikeApi from './etherscan'
|
|
7
8
|
import ledgerExplorerApi from './ledger'
|
|
8
9
|
import noExplorerAPI from './none'
|
|
9
|
-
import { ExplorerApi } from './types'
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Switch to select one of the compatible explorer
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: © 2026 LEDGER SAS
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
+
import type { NftStandard } from '../../config'
|
|
4
5
|
import { AssertionError, fail } from 'assert'
|
|
5
6
|
import { delay } from '@ledgerhq/coin-module-framework/promises'
|
|
6
7
|
import axios from 'axios'
|
|
7
8
|
import eip55 from 'eip55'
|
|
8
|
-
import { DEFAULT_LEDGER_EXPLORER_URI, getCoinConfig
|
|
9
|
+
import { DEFAULT_LEDGER_EXPLORER_URI, getCoinConfig } from '../../config'
|
|
9
10
|
import { LedgerExplorerUsedIncorrectly } from '../../errors'
|
|
10
11
|
import {
|
|
11
12
|
coinOperation1,
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: © 2026 LEDGER SAS
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
+
import type { LedgerExplorerOperation } from '../../types'
|
|
5
|
+
import type { ExplorerApi } from './types'
|
|
4
6
|
import type { MemoNotSupported, Operation } from '@ledgerhq/coin-module-framework/api/types'
|
|
5
7
|
import { delay } from '@ledgerhq/coin-module-framework/promises'
|
|
6
8
|
import axios from 'axios'
|
|
@@ -13,9 +15,8 @@ import {
|
|
|
13
15
|
} from '../../adapters/index'
|
|
14
16
|
import { DEFAULT_LEDGER_EXPLORER_URI } from '../../config'
|
|
15
17
|
import { LedgerExplorerUsedIncorrectly } from '../../errors'
|
|
16
|
-
import { LedgerExplorerOperation } from '../../types'
|
|
17
18
|
import { nftEnabled } from '../../utils'
|
|
18
|
-
import {
|
|
19
|
+
import { isLedgerExplorerConfig, NO_TOKEN } from './types'
|
|
19
20
|
|
|
20
21
|
export const DEFAULT_BATCH_SIZE = 10_000
|
|
21
22
|
export const LEDGER_TIMEOUT = 200 // 200ms between 2 calls
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: © 2026 LEDGER SAS
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
-
import { ExplorerApi
|
|
4
|
+
import type { ExplorerApi } from './types'
|
|
5
|
+
import { NO_TOKEN } from './types'
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Returns all operation types from an address
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: © 2026 LEDGER SAS
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
+
import type { EvmConfigInfo } from '../../config'
|
|
4
5
|
import type { MemoNotSupported, Operation } from '@ledgerhq/coin-module-framework/api/types'
|
|
5
|
-
import { EvmConfigInfo } from '../../config'
|
|
6
6
|
|
|
7
7
|
/** Constant representing no pagination token (end of pagination or first page) */
|
|
8
8
|
export const NO_TOKEN = ''
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: © 2026 LEDGER SAS
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
-
import { EvmConfigInfo } from '../../config'
|
|
4
|
+
import type { EvmConfigInfo } from '../../config'
|
|
5
5
|
import { getGasOptions as ledgerGetGasOptions } from './ledger'
|
|
6
6
|
import { getGasTracker } from './index'
|
|
7
7
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: © 2026 LEDGER SAS
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
-
import { EvmConfigInfo } from '../../config'
|
|
4
|
+
import type { EvmConfigInfo } from '../../config'
|
|
5
|
+
import type { GasTrackerApi } from './types'
|
|
5
6
|
import ledgerGasTracker from './ledger'
|
|
6
|
-
import { GasTrackerApi } from './types'
|
|
7
7
|
|
|
8
8
|
export const getGasTracker = (config: EvmConfigInfo): GasTrackerApi | null => {
|
|
9
9
|
switch (config?.gasTracker?.type) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: © 2026 LEDGER SAS
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
+
import type { EvmConfigInfo } from '../../config'
|
|
5
|
+
import type { GasOptions } from '../../types'
|
|
4
6
|
import { AssertionError } from 'assert'
|
|
5
7
|
import network from '@ledgerhq/live-network/network'
|
|
6
8
|
import BigNumber from 'bignumber.js'
|
|
7
|
-
import { EvmConfigInfo } from '../../config'
|
|
8
9
|
import { LedgerGasTrackerUsedIncorrectly, NoGasTrackerFound } from '../../errors'
|
|
9
|
-
import { GasOptions } from '../../types'
|
|
10
10
|
import { getGasOptions } from './ledger'
|
|
11
11
|
|
|
12
12
|
jest.mock('@ledgerhq/live-network/network')
|
|
@@ -96,12 +96,10 @@ describe('EVM Family', () => {
|
|
|
96
96
|
},
|
|
97
97
|
})
|
|
98
98
|
|
|
99
|
-
Object.
|
|
99
|
+
Object.values(gasOptions).forEach((value) => {
|
|
100
100
|
const { maxFeePerGas } = value
|
|
101
101
|
|
|
102
|
-
expect(maxFeePerGas?.isInteger()
|
|
103
|
-
true
|
|
104
|
-
)
|
|
102
|
+
expect(maxFeePerGas?.isInteger()).toBe(true)
|
|
105
103
|
})
|
|
106
104
|
})
|
|
107
105
|
|
|
@@ -129,17 +127,12 @@ describe('EVM Family', () => {
|
|
|
129
127
|
},
|
|
130
128
|
})
|
|
131
129
|
|
|
132
|
-
Object.
|
|
130
|
+
Object.values(gasOptions).forEach((value) => {
|
|
133
131
|
const { maxFeePerGas, maxPriorityFeePerGas, nextBaseFee } = value
|
|
134
132
|
|
|
135
|
-
expect(maxFeePerGas?.isInteger()
|
|
136
|
-
|
|
137
|
-
)
|
|
138
|
-
expect(
|
|
139
|
-
maxPriorityFeePerGas?.isInteger(),
|
|
140
|
-
`${key}:maxPriorityFeePerGas - got ${maxPriorityFeePerGas}`
|
|
141
|
-
).toBe(true)
|
|
142
|
-
expect(nextBaseFee?.isInteger(), `${key}:nextBaseFee - got ${nextBaseFee}`).toBe(true)
|
|
133
|
+
expect(maxFeePerGas?.isInteger()).toBe(true)
|
|
134
|
+
expect(maxPriorityFeePerGas?.isInteger()).toBe(true)
|
|
135
|
+
expect(nextBaseFee?.isInteger()).toBe(true)
|
|
143
136
|
})
|
|
144
137
|
})
|
|
145
138
|
|
|
@@ -249,10 +242,10 @@ describe('EVM Family', () => {
|
|
|
249
242
|
},
|
|
250
243
|
})
|
|
251
244
|
|
|
252
|
-
Object.
|
|
245
|
+
Object.values(gasOptions).forEach((value) => {
|
|
253
246
|
const { gasPrice } = value
|
|
254
247
|
|
|
255
|
-
expect(gasPrice?.isInteger()
|
|
248
|
+
expect(gasPrice?.isInteger()).toBe(true)
|
|
256
249
|
})
|
|
257
250
|
})
|
|
258
251
|
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: © 2026 LEDGER SAS
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
+
import type { EvmConfigInfo } from '../../config'
|
|
5
|
+
import type { GasOptions } from '../../types'
|
|
6
|
+
import type { GasTrackerApi } from './types'
|
|
4
7
|
import network from '@ledgerhq/live-network/network'
|
|
5
8
|
import { BigNumber } from 'bignumber.js'
|
|
6
|
-
import {
|
|
7
|
-
DEFAULT_EIP1559_BASE_FEE_MULTIPLIER,
|
|
8
|
-
DEFAULT_LEDGER_EXPLORER_URI,
|
|
9
|
-
EvmConfigInfo,
|
|
10
|
-
} from '../../config'
|
|
9
|
+
import { DEFAULT_EIP1559_BASE_FEE_MULTIPLIER, DEFAULT_LEDGER_EXPLORER_URI } from '../../config'
|
|
11
10
|
import { LedgerGasTrackerUsedIncorrectly, NoGasTrackerFound } from '../../errors'
|
|
12
|
-
import {
|
|
13
|
-
import { GasTrackerApi, isLedgerGasTracker } from './types'
|
|
11
|
+
import { isLedgerGasTracker } from './types'
|
|
14
12
|
|
|
15
13
|
type GasTracker = {
|
|
16
14
|
compatibilty: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: © 2026 LEDGER SAS
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
-
import { EvmConfigInfo } from '../../config'
|
|
5
|
-
import { GasOptions } from '../../types'
|
|
4
|
+
import type { EvmConfigInfo } from '../../config'
|
|
5
|
+
import type { GasOptions } from '../../types'
|
|
6
6
|
|
|
7
7
|
export type GasTrackerApi = {
|
|
8
8
|
getGasOptions: ({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: © 2026 LEDGER SAS
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
-
import { EvmConfigInfo } from '../../config'
|
|
4
|
+
import type { EvmConfigInfo } from '../../config'
|
|
5
5
|
import { getNodeApi } from './index'
|
|
6
6
|
|
|
7
7
|
const externalNodeConfig = (): EvmConfigInfo =>
|