@ledgerhq/coin-evm 5.2.0-nightly.20260829020445 → 5.2.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/.oxlintrc.json +19 -7
- package/CHANGELOG.md +16 -26
- package/LICENSE +194 -0
- package/jest.config.js +11 -27
- package/jest.integ.config.js +4 -14
- package/knip.json +31 -0
- package/lib/abis/index.d.ts +5 -5
- package/lib/abis/index.d.ts.map +1 -1
- package/lib/abis/index.js +4 -2
- package/lib/abis/index.js.map +1 -1
- package/lib/adapters/blockOperations.d.ts +4 -4
- package/lib/adapters/blockOperations.d.ts.map +1 -1
- package/lib/adapters/blockOperations.js +13 -11
- package/lib/adapters/blockOperations.js.map +1 -1
- package/lib/adapters/etherscan.d.ts +4 -4
- package/lib/adapters/etherscan.d.ts.map +1 -1
- package/lib/adapters/etherscan.js +42 -40
- package/lib/adapters/etherscan.js.map +1 -1
- package/lib/adapters/index.d.ts +3 -3
- package/lib/adapters/index.d.ts.map +1 -1
- package/lib/adapters/index.js +3 -1
- package/lib/adapters/index.js.map +1 -1
- package/lib/adapters/ledger.d.ts +2 -2
- package/lib/adapters/ledger.d.ts.map +1 -1
- package/lib/adapters/ledger.js +24 -22
- package/lib/adapters/ledger.js.map +1 -1
- package/lib/adapters/nonValueTransferCallTypes.d.ts.map +1 -1
- package/lib/adapters/nonValueTransferCallTypes.js +3 -1
- package/lib/adapters/nonValueTransferCallTypes.js.map +1 -1
- package/lib/api/index.d.ts +4 -4
- package/lib/api/index.d.ts.map +1 -1
- package/lib/api/index.js +9 -7
- package/lib/api/index.js.map +1 -1
- package/lib/config.d.ts +16 -16
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js +6 -4
- package/lib/config.js.map +1 -1
- package/lib/constants.d.ts.map +1 -1
- package/lib/constants.js +5 -5
- package/lib/constants.js.map +1 -1
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +56 -54
- package/lib/errors.js.map +1 -1
- package/lib/internalTxSources.d.ts +3 -3
- package/lib/internalTxSources.d.ts.map +1 -1
- package/lib/internalTxSources.js +13 -11
- package/lib/internalTxSources.js.map +1 -1
- package/lib/logic/broadcast.d.ts +2 -2
- package/lib/logic/broadcast.d.ts.map +1 -1
- package/lib/logic/broadcast.js +2 -0
- package/lib/logic/broadcast.js.map +1 -1
- package/lib/logic/combine.d.ts +1 -1
- package/lib/logic/combine.d.ts.map +1 -1
- package/lib/logic/combine.js +10 -8
- package/lib/logic/combine.js.map +1 -1
- package/lib/logic/common.d.ts +4 -4
- package/lib/logic/common.d.ts.map +1 -1
- package/lib/logic/common.js +19 -17
- package/lib/logic/common.js.map +1 -1
- package/lib/logic/computeGasLimit.d.ts.map +1 -1
- package/lib/logic/computeGasLimit.js +2 -0
- package/lib/logic/computeGasLimit.js.map +1 -1
- package/lib/logic/craftTransaction.d.ts +2 -2
- package/lib/logic/craftTransaction.d.ts.map +1 -1
- package/lib/logic/craftTransaction.js +6 -4
- 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/craftTransactionData.js +3 -1
- package/lib/logic/craftTransactionData.js.map +1 -1
- package/lib/logic/estimateFees.d.ts +3 -3
- package/lib/logic/estimateFees.d.ts.map +1 -1
- package/lib/logic/estimateFees.js +18 -16
- package/lib/logic/estimateFees.js.map +1 -1
- package/lib/logic/evmUnit.d.ts +1 -1
- package/lib/logic/evmUnit.d.ts.map +1 -1
- package/lib/logic/evmUnit.js +88 -86
- package/lib/logic/evmUnit.js.map +1 -1
- package/lib/logic/getBalance.d.ts +2 -2
- package/lib/logic/getBalance.d.ts.map +1 -1
- package/lib/logic/getBalance.js +10 -8
- package/lib/logic/getBalance.js.map +1 -1
- package/lib/logic/getBlock.d.ts +2 -2
- package/lib/logic/getBlock.d.ts.map +1 -1
- package/lib/logic/getBlock.js +16 -14
- package/lib/logic/getBlock.js.map +1 -1
- package/lib/logic/getBlockInfo.d.ts +2 -2
- package/lib/logic/getBlockInfo.d.ts.map +1 -1
- package/lib/logic/getBlockInfo.js +2 -0
- package/lib/logic/getBlockInfo.js.map +1 -1
- package/lib/logic/getErc20Data.d.ts.map +1 -1
- package/lib/logic/getErc20Data.js +6 -4
- package/lib/logic/getErc20Data.js.map +1 -1
- package/lib/logic/getNextSequence.d.ts +1 -1
- package/lib/logic/getNextSequence.d.ts.map +1 -1
- package/lib/logic/getNextSequence.js +3 -1
- package/lib/logic/getNextSequence.js.map +1 -1
- package/lib/logic/getStakes.d.ts +2 -2
- package/lib/logic/getStakes.d.ts.map +1 -1
- package/lib/logic/getStakes.js +2 -0
- package/lib/logic/getStakes.js.map +1 -1
- package/lib/logic/index.d.ts +12 -12
- package/lib/logic/index.d.ts.map +1 -1
- package/lib/logic/index.js +2 -0
- package/lib/logic/index.js.map +1 -1
- package/lib/logic/internalTransactionsFetcher.d.ts +4 -4
- package/lib/logic/internalTransactionsFetcher.d.ts.map +1 -1
- package/lib/logic/internalTransactionsFetcher.js +14 -12
- package/lib/logic/internalTransactionsFetcher.js.map +1 -1
- package/lib/logic/lastBlock.d.ts +2 -2
- package/lib/logic/lastBlock.d.ts.map +1 -1
- package/lib/logic/lastBlock.js +3 -1
- package/lib/logic/lastBlock.js.map +1 -1
- package/lib/logic/listOperations.d.ts +2 -2
- package/lib/logic/listOperations.d.ts.map +1 -1
- package/lib/logic/listOperations.js +42 -40
- package/lib/logic/listOperations.js.map +1 -1
- package/lib/logic/rootTraceDedup.d.ts +1 -1
- package/lib/logic/rootTraceDedup.d.ts.map +1 -1
- package/lib/logic/rootTraceDedup.js +5 -3
- package/lib/logic/rootTraceDedup.js.map +1 -1
- package/lib/logic/validateAddress.d.ts +1 -1
- package/lib/logic/validateAddress.d.ts.map +1 -1
- package/lib/logic/validateAddress.js +3 -1
- package/lib/logic/validateAddress.js.map +1 -1
- package/lib/logic/validateIntent.d.ts +2 -2
- package/lib/logic/validateIntent.d.ts.map +1 -1
- package/lib/logic/validateIntent.js +42 -43
- package/lib/logic/validateIntent.js.map +1 -1
- package/lib/logic.d.ts +2 -2
- package/lib/logic.d.ts.map +1 -1
- package/lib/logic.js +9 -7
- package/lib/logic.js.map +1 -1
- package/lib/network/explorer/etherscan.d.ts +7 -7
- package/lib/network/explorer/etherscan.d.ts.map +1 -1
- package/lib/network/explorer/etherscan.js +46 -44
- 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 +10 -8
- package/lib/network/explorer/index.js.map +1 -1
- package/lib/network/explorer/ledger.d.ts +3 -3
- package/lib/network/explorer/ledger.d.ts.map +1 -1
- package/lib/network/explorer/ledger.js +10 -8
- package/lib/network/explorer/ledger.js.map +1 -1
- package/lib/network/explorer/none.d.ts +2 -2
- package/lib/network/explorer/none.d.ts.map +1 -1
- package/lib/network/explorer/none.js +2 -0
- package/lib/network/explorer/none.js.map +1 -1
- package/lib/network/explorer/types.d.ts +4 -4
- package/lib/network/explorer/types.d.ts.map +1 -1
- package/lib/network/explorer/types.js +5 -3
- package/lib/network/explorer/types.js.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 +3 -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 +12 -10
- package/lib/network/gasTracker/ledger.js.map +1 -1
- package/lib/network/gasTracker/types.d.ts +3 -3
- package/lib/network/gasTracker/types.d.ts.map +1 -1
- package/lib/network/gasTracker/types.js +3 -1
- package/lib/network/gasTracker/types.js.map +1 -1
- package/lib/network/node/gethCallTracerToTraceBlockItems.d.ts +1 -1
- package/lib/network/node/gethCallTracerToTraceBlockItems.d.ts.map +1 -1
- package/lib/network/node/gethCallTracerToTraceBlockItems.js +26 -24
- package/lib/network/node/gethCallTracerToTraceBlockItems.js.map +1 -1
- package/lib/network/node/index.d.ts +2 -2
- package/lib/network/node/index.d.ts.map +1 -1
- package/lib/network/node/index.js +5 -3
- package/lib/network/node/index.js.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 +36 -34
- package/lib/network/node/ledger.js.map +1 -1
- package/lib/network/node/rpc.common.d.ts +3 -3
- package/lib/network/node/rpc.common.d.ts.map +1 -1
- package/lib/network/node/rpc.common.js +117 -114
- package/lib/network/node/rpc.common.js.map +1 -1
- package/lib/network/node/rpc.d.ts +1 -1
- package/lib/network/node/rpc.d.ts.map +1 -1
- package/lib/network/node/rpc.errors.d.ts.map +1 -1
- package/lib/network/node/rpc.errors.js +14 -12
- package/lib/network/node/rpc.errors.js.map +1 -1
- package/lib/network/node/rpc.js +2 -0
- package/lib/network/node/rpc.js.map +1 -1
- package/lib/network/node/rpc.native.d.ts +3 -3
- package/lib/network/node/rpc.native.d.ts.map +1 -1
- package/lib/network/node/rpc.native.js +3 -1
- package/lib/network/node/rpc.native.js.map +1 -1
- package/lib/network/node/types.d.ts +10 -10
- package/lib/network/node/types.d.ts.map +1 -1
- package/lib/network/node/types.js +14 -12
- package/lib/network/node/types.js.map +1 -1
- package/lib/network/withRetries.d.ts.map +1 -1
- package/lib/network/withRetries.js +2 -0
- package/lib/network/withRetries.js.map +1 -1
- package/lib/staking/abis.d.ts +6 -6
- package/lib/staking/abis.d.ts.map +1 -1
- package/lib/staking/abis.js +6 -4
- package/lib/staking/abis.js.map +1 -1
- package/lib/staking/contracts.d.ts +1 -1
- package/lib/staking/contracts.d.ts.map +1 -1
- package/lib/staking/contracts.js +79 -77
- package/lib/staking/contracts.js.map +1 -1
- package/lib/staking/detectOperationType.d.ts +2 -2
- package/lib/staking/detectOperationType.d.ts.map +1 -1
- package/lib/staking/detectOperationType.js +19 -17
- package/lib/staking/detectOperationType.js.map +1 -1
- package/lib/staking/encoder.d.ts +2 -2
- package/lib/staking/encoder.d.ts.map +1 -1
- package/lib/staking/encoder.js +2 -0
- package/lib/staking/encoder.js.map +1 -1
- package/lib/staking/fetchers.d.ts +1 -1
- package/lib/staking/fetchers.d.ts.map +1 -1
- package/lib/staking/fetchers.js +27 -25
- package/lib/staking/fetchers.js.map +1 -1
- package/lib/staking/index.d.ts +11 -11
- package/lib/staking/index.d.ts.map +1 -1
- package/lib/staking/index.js +2 -0
- package/lib/staking/index.js.map +1 -1
- package/lib/staking/logic.d.ts +3 -3
- package/lib/staking/logic.d.ts.map +1 -1
- package/lib/staking/logic.js +9 -7
- package/lib/staking/logic.js.map +1 -1
- package/lib/staking/operations/celo.d.ts +1 -1
- package/lib/staking/operations/celo.d.ts.map +1 -1
- package/lib/staking/operations/celo.js +3 -1
- package/lib/staking/operations/celo.js.map +1 -1
- package/lib/staking/operations/index.d.ts +2 -2
- package/lib/staking/operations/index.d.ts.map +1 -1
- package/lib/staking/operations/index.js +9 -7
- package/lib/staking/operations/index.js.map +1 -1
- package/lib/staking/operations/monad.d.ts +1 -1
- package/lib/staking/operations/monad.d.ts.map +1 -1
- package/lib/staking/operations/monad.js +2 -0
- package/lib/staking/operations/monad.js.map +1 -1
- package/lib/staking/operations/sei.d.ts +1 -1
- package/lib/staking/operations/sei.d.ts.map +1 -1
- package/lib/staking/operations/sei.js +3 -1
- package/lib/staking/operations/sei.js.map +1 -1
- package/lib/staking/operations/somnia.d.ts +1 -1
- package/lib/staking/operations/somnia.d.ts.map +1 -1
- package/lib/staking/operations/somnia.js +3 -1
- package/lib/staking/operations/somnia.js.map +1 -1
- package/lib/staking/operations/types.d.ts.map +1 -1
- package/lib/staking/operations/types.js +2 -0
- package/lib/staking/operations/types.js.map +1 -1
- package/lib/staking/operations/zero_gravity.d.ts +1 -1
- package/lib/staking/operations/zero_gravity.d.ts.map +1 -1
- package/lib/staking/operations/zero_gravity.js +2 -0
- package/lib/staking/operations/zero_gravity.js.map +1 -1
- package/lib/staking/prepareIntents.d.ts +2 -2
- package/lib/staking/prepareIntents.d.ts.map +1 -1
- package/lib/staking/prepareIntents.js +22 -20
- package/lib/staking/prepareIntents.js.map +1 -1
- package/lib/staking/redelegations.d.ts +2 -3
- package/lib/staking/redelegations.d.ts.map +1 -1
- package/lib/staking/redelegations.js +23 -21
- package/lib/staking/redelegations.js.map +1 -1
- package/lib/staking/rewards.d.ts +1 -1
- package/lib/staking/rewards.d.ts.map +1 -1
- package/lib/staking/rewards.js +8 -6
- package/lib/staking/rewards.js.map +1 -1
- package/lib/staking/rewardsFromReceipt.d.ts +3 -3
- package/lib/staking/rewardsFromReceipt.d.ts.map +1 -1
- package/lib/staking/rewardsFromReceipt.js +9 -7
- package/lib/staking/rewardsFromReceipt.js.map +1 -1
- package/lib/staking/transactionData.d.ts +1 -1
- package/lib/staking/transactionData.d.ts.map +1 -1
- package/lib/staking/transactionData.js +5 -3
- package/lib/staking/transactionData.js.map +1 -1
- package/lib/staking/validators/index.d.ts +4 -4
- package/lib/staking/validators/index.d.ts.map +1 -1
- package/lib/staking/validators/index.js +13 -11
- package/lib/staking/validators/index.js.map +1 -1
- package/lib/staking/validators/monad.d.ts +7 -8
- package/lib/staking/validators/monad.d.ts.map +1 -1
- package/lib/staking/validators/monad.js +51 -49
- package/lib/staking/validators/monad.js.map +1 -1
- package/lib/staking/validators/monadResolver.d.ts +2 -2
- package/lib/staking/validators/monadResolver.d.ts.map +1 -1
- package/lib/staking/validators/monadResolver.js +11 -9
- package/lib/staking/validators/monadResolver.js.map +1 -1
- package/lib/staking/validators/sei.d.ts +1 -1
- package/lib/staking/validators/sei.d.ts.map +1 -1
- package/lib/staking/validators/sei.js +9 -7
- package/lib/staking/validators/sei.js.map +1 -1
- package/lib/staking/validators/somnia.d.ts +4 -4
- package/lib/staking/validators/somnia.d.ts.map +1 -1
- package/lib/staking/validators/somnia.js +34 -32
- package/lib/staking/validators/somnia.js.map +1 -1
- package/lib/staking/validators/types.d.ts +3 -3
- package/lib/staking/validators/types.d.ts.map +1 -1
- package/lib/staking/validators/types.js +2 -0
- package/lib/staking/validators/types.js.map +1 -1
- package/lib/staking/validators/zero_gravity.d.ts +4 -4
- package/lib/staking/validators/zero_gravity.d.ts.map +1 -1
- package/lib/staking/validators/zero_gravity.js +55 -55
- package/lib/staking/validators/zero_gravity.js.map +1 -1
- package/lib/supportedFeatures.d.ts +1 -1
- package/lib/supportedFeatures.d.ts.map +1 -1
- package/lib/supportedFeatures.js +3 -1
- package/lib/supportedFeatures.js.map +1 -1
- package/lib/types/assets.d.ts +2 -2
- package/lib/types/assets.d.ts.map +1 -1
- package/lib/types/assets.js +3 -1
- package/lib/types/assets.js.map +1 -1
- package/lib/types/editTransaction.d.ts +1 -1
- package/lib/types/editTransaction.d.ts.map +1 -1
- package/lib/types/editTransaction.js +2 -0
- package/lib/types/editTransaction.js.map +1 -1
- package/lib/types/etherscan.d.ts.map +1 -1
- package/lib/types/etherscan.js +2 -4
- package/lib/types/etherscan.js.map +1 -1
- package/lib/types/index.d.ts +6 -6
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/index.js +3 -1
- package/lib/types/index.js.map +1 -1
- package/lib/types/ledger.d.ts.map +1 -1
- package/lib/types/ledger.js +2 -0
- package/lib/types/ledger.js.map +1 -1
- package/lib/types/staking.d.ts +10 -10
- package/lib/types/staking.d.ts.map +1 -1
- package/lib/types/staking.js +2 -0
- package/lib/types/staking.js.map +1 -1
- package/lib/types/transaction.d.ts +2 -2
- package/lib/types/transaction.d.ts.map +1 -1
- package/lib/types/transaction.js +2 -0
- package/lib/types/transaction.js.map +1 -1
- package/lib/utils.d.ts +4 -4
- package/lib/utils.d.ts.map +1 -1
- package/lib/utils.js +45 -43
- package/lib/utils.js.map +1 -1
- package/lib-es/abis/index.d.ts +5 -5
- package/lib-es/abis/index.d.ts.map +1 -1
- package/lib-es/abis/index.js +7 -5
- package/lib-es/abis/index.js.map +1 -1
- package/lib-es/adapters/blockOperations.d.ts +4 -4
- package/lib-es/adapters/blockOperations.d.ts.map +1 -1
- package/lib-es/adapters/blockOperations.js +16 -14
- package/lib-es/adapters/blockOperations.js.map +1 -1
- package/lib-es/adapters/etherscan.d.ts +4 -4
- package/lib-es/adapters/etherscan.d.ts.map +1 -1
- package/lib-es/adapters/etherscan.js +49 -47
- package/lib-es/adapters/etherscan.js.map +1 -1
- package/lib-es/adapters/index.d.ts +3 -3
- package/lib-es/adapters/index.d.ts.map +1 -1
- package/lib-es/adapters/index.js +5 -3
- package/lib-es/adapters/index.js.map +1 -1
- package/lib-es/adapters/ledger.d.ts +2 -2
- package/lib-es/adapters/ledger.d.ts.map +1 -1
- package/lib-es/adapters/ledger.js +27 -25
- package/lib-es/adapters/ledger.js.map +1 -1
- package/lib-es/adapters/nonValueTransferCallTypes.d.ts.map +1 -1
- package/lib-es/adapters/nonValueTransferCallTypes.js +3 -1
- package/lib-es/adapters/nonValueTransferCallTypes.js.map +1 -1
- package/lib-es/api/index.d.ts +4 -4
- package/lib-es/api/index.d.ts.map +1 -1
- package/lib-es/api/index.js +15 -13
- package/lib-es/api/index.js.map +1 -1
- package/lib-es/config.d.ts +16 -16
- package/lib-es/config.d.ts.map +1 -1
- package/lib-es/config.js +8 -6
- package/lib-es/config.js.map +1 -1
- package/lib-es/constants.d.ts.map +1 -1
- package/lib-es/constants.js +5 -5
- package/lib-es/constants.js.map +1 -1
- package/lib-es/errors.d.ts.map +1 -1
- package/lib-es/errors.js +56 -54
- package/lib-es/errors.js.map +1 -1
- package/lib-es/internalTxSources.d.ts +3 -3
- package/lib-es/internalTxSources.d.ts.map +1 -1
- package/lib-es/internalTxSources.js +13 -11
- package/lib-es/internalTxSources.js.map +1 -1
- package/lib-es/logic/broadcast.d.ts +2 -2
- package/lib-es/logic/broadcast.d.ts.map +1 -1
- package/lib-es/logic/broadcast.js +3 -1
- package/lib-es/logic/broadcast.js.map +1 -1
- package/lib-es/logic/combine.d.ts +1 -1
- package/lib-es/logic/combine.d.ts.map +1 -1
- package/lib-es/logic/combine.js +11 -9
- package/lib-es/logic/combine.js.map +1 -1
- package/lib-es/logic/common.d.ts +4 -4
- package/lib-es/logic/common.d.ts.map +1 -1
- package/lib-es/logic/common.js +27 -25
- package/lib-es/logic/common.js.map +1 -1
- package/lib-es/logic/computeGasLimit.d.ts.map +1 -1
- package/lib-es/logic/computeGasLimit.js +2 -0
- package/lib-es/logic/computeGasLimit.js.map +1 -1
- package/lib-es/logic/craftTransaction.d.ts +2 -2
- package/lib-es/logic/craftTransaction.d.ts.map +1 -1
- package/lib-es/logic/craftTransaction.js +12 -10
- 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/craftTransactionData.js +4 -2
- package/lib-es/logic/craftTransactionData.js.map +1 -1
- package/lib-es/logic/estimateFees.d.ts +3 -3
- package/lib-es/logic/estimateFees.d.ts.map +1 -1
- package/lib-es/logic/estimateFees.js +27 -25
- package/lib-es/logic/estimateFees.js.map +1 -1
- package/lib-es/logic/evmUnit.d.ts +1 -1
- package/lib-es/logic/evmUnit.d.ts.map +1 -1
- package/lib-es/logic/evmUnit.js +88 -86
- package/lib-es/logic/evmUnit.js.map +1 -1
- package/lib-es/logic/getBalance.d.ts +2 -2
- package/lib-es/logic/getBalance.d.ts.map +1 -1
- package/lib-es/logic/getBalance.js +13 -11
- package/lib-es/logic/getBalance.js.map +1 -1
- package/lib-es/logic/getBlock.d.ts +2 -2
- package/lib-es/logic/getBlock.d.ts.map +1 -1
- package/lib-es/logic/getBlock.js +24 -22
- package/lib-es/logic/getBlock.js.map +1 -1
- package/lib-es/logic/getBlockInfo.d.ts +2 -2
- package/lib-es/logic/getBlockInfo.d.ts.map +1 -1
- package/lib-es/logic/getBlockInfo.js +3 -1
- package/lib-es/logic/getBlockInfo.js.map +1 -1
- package/lib-es/logic/getErc20Data.d.ts.map +1 -1
- package/lib-es/logic/getErc20Data.js +8 -6
- package/lib-es/logic/getErc20Data.js.map +1 -1
- package/lib-es/logic/getNextSequence.d.ts +1 -1
- package/lib-es/logic/getNextSequence.d.ts.map +1 -1
- package/lib-es/logic/getNextSequence.js +4 -2
- package/lib-es/logic/getNextSequence.js.map +1 -1
- package/lib-es/logic/getStakes.d.ts +2 -2
- package/lib-es/logic/getStakes.d.ts.map +1 -1
- package/lib-es/logic/getStakes.js +3 -1
- package/lib-es/logic/getStakes.js.map +1 -1
- package/lib-es/logic/index.d.ts +12 -12
- package/lib-es/logic/index.d.ts.map +1 -1
- package/lib-es/logic/index.js +14 -12
- package/lib-es/logic/index.js.map +1 -1
- package/lib-es/logic/internalTransactionsFetcher.d.ts +4 -4
- package/lib-es/logic/internalTransactionsFetcher.d.ts.map +1 -1
- package/lib-es/logic/internalTransactionsFetcher.js +20 -18
- package/lib-es/logic/internalTransactionsFetcher.js.map +1 -1
- package/lib-es/logic/lastBlock.d.ts +2 -2
- package/lib-es/logic/lastBlock.d.ts.map +1 -1
- package/lib-es/logic/lastBlock.js +4 -2
- package/lib-es/logic/lastBlock.js.map +1 -1
- package/lib-es/logic/listOperations.d.ts +2 -2
- package/lib-es/logic/listOperations.d.ts.map +1 -1
- package/lib-es/logic/listOperations.js +43 -41
- package/lib-es/logic/listOperations.js.map +1 -1
- package/lib-es/logic/rootTraceDedup.d.ts +1 -1
- package/lib-es/logic/rootTraceDedup.d.ts.map +1 -1
- package/lib-es/logic/rootTraceDedup.js +5 -3
- package/lib-es/logic/rootTraceDedup.js.map +1 -1
- package/lib-es/logic/validateAddress.d.ts +1 -1
- package/lib-es/logic/validateAddress.d.ts.map +1 -1
- package/lib-es/logic/validateAddress.js +4 -2
- package/lib-es/logic/validateAddress.js.map +1 -1
- package/lib-es/logic/validateIntent.d.ts +2 -2
- package/lib-es/logic/validateIntent.d.ts.map +1 -1
- package/lib-es/logic/validateIntent.js +52 -53
- package/lib-es/logic/validateIntent.js.map +1 -1
- package/lib-es/logic.d.ts +2 -2
- package/lib-es/logic.d.ts.map +1 -1
- package/lib-es/logic.js +10 -8
- package/lib-es/logic.js.map +1 -1
- package/lib-es/network/explorer/etherscan.d.ts +7 -7
- package/lib-es/network/explorer/etherscan.d.ts.map +1 -1
- package/lib-es/network/explorer/etherscan.js +55 -53
- 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 +14 -12
- package/lib-es/network/explorer/index.js.map +1 -1
- package/lib-es/network/explorer/ledger.d.ts +3 -3
- package/lib-es/network/explorer/ledger.d.ts.map +1 -1
- package/lib-es/network/explorer/ledger.js +16 -14
- package/lib-es/network/explorer/ledger.js.map +1 -1
- package/lib-es/network/explorer/none.d.ts +2 -2
- package/lib-es/network/explorer/none.d.ts.map +1 -1
- package/lib-es/network/explorer/none.js +3 -1
- package/lib-es/network/explorer/none.js.map +1 -1
- package/lib-es/network/explorer/types.d.ts +4 -4
- package/lib-es/network/explorer/types.d.ts.map +1 -1
- package/lib-es/network/explorer/types.js +5 -3
- package/lib-es/network/explorer/types.js.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 +4 -2
- 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 +17 -15
- package/lib-es/network/gasTracker/ledger.js.map +1 -1
- package/lib-es/network/gasTracker/types.d.ts +3 -3
- package/lib-es/network/gasTracker/types.d.ts.map +1 -1
- package/lib-es/network/gasTracker/types.js +3 -1
- package/lib-es/network/gasTracker/types.js.map +1 -1
- package/lib-es/network/node/gethCallTracerToTraceBlockItems.d.ts +1 -1
- package/lib-es/network/node/gethCallTracerToTraceBlockItems.d.ts.map +1 -1
- package/lib-es/network/node/gethCallTracerToTraceBlockItems.js +26 -24
- package/lib-es/network/node/gethCallTracerToTraceBlockItems.js.map +1 -1
- package/lib-es/network/node/index.d.ts +2 -2
- package/lib-es/network/node/index.d.ts.map +1 -1
- package/lib-es/network/node/index.js +9 -7
- package/lib-es/network/node/index.js.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 +47 -45
- package/lib-es/network/node/ledger.js.map +1 -1
- package/lib-es/network/node/rpc.common.d.ts +3 -3
- package/lib-es/network/node/rpc.common.d.ts.map +1 -1
- package/lib-es/network/node/rpc.common.js +130 -127
- package/lib-es/network/node/rpc.common.js.map +1 -1
- package/lib-es/network/node/rpc.d.ts +1 -1
- package/lib-es/network/node/rpc.d.ts.map +1 -1
- package/lib-es/network/node/rpc.errors.d.ts.map +1 -1
- package/lib-es/network/node/rpc.errors.js +14 -12
- package/lib-es/network/node/rpc.errors.js.map +1 -1
- package/lib-es/network/node/rpc.js +3 -1
- package/lib-es/network/node/rpc.js.map +1 -1
- package/lib-es/network/node/rpc.native.d.ts +3 -3
- package/lib-es/network/node/rpc.native.d.ts.map +1 -1
- package/lib-es/network/node/rpc.native.js +5 -3
- package/lib-es/network/node/rpc.native.js.map +1 -1
- package/lib-es/network/node/types.d.ts +10 -10
- package/lib-es/network/node/types.d.ts.map +1 -1
- package/lib-es/network/node/types.js +14 -12
- package/lib-es/network/node/types.js.map +1 -1
- package/lib-es/network/withRetries.d.ts.map +1 -1
- package/lib-es/network/withRetries.js +3 -1
- package/lib-es/network/withRetries.js.map +1 -1
- package/lib-es/staking/abis.d.ts +6 -6
- package/lib-es/staking/abis.d.ts.map +1 -1
- package/lib-es/staking/abis.js +10 -8
- package/lib-es/staking/abis.js.map +1 -1
- package/lib-es/staking/contracts.d.ts +1 -1
- package/lib-es/staking/contracts.d.ts.map +1 -1
- package/lib-es/staking/contracts.js +84 -82
- package/lib-es/staking/contracts.js.map +1 -1
- package/lib-es/staking/detectOperationType.d.ts +2 -2
- package/lib-es/staking/detectOperationType.d.ts.map +1 -1
- package/lib-es/staking/detectOperationType.js +22 -20
- package/lib-es/staking/detectOperationType.js.map +1 -1
- package/lib-es/staking/encoder.d.ts +2 -2
- package/lib-es/staking/encoder.d.ts.map +1 -1
- package/lib-es/staking/encoder.js +4 -2
- package/lib-es/staking/encoder.js.map +1 -1
- package/lib-es/staking/fetchers.d.ts +1 -1
- package/lib-es/staking/fetchers.d.ts.map +1 -1
- package/lib-es/staking/fetchers.js +38 -36
- package/lib-es/staking/fetchers.js.map +1 -1
- package/lib-es/staking/index.d.ts +11 -11
- package/lib-es/staking/index.d.ts.map +1 -1
- package/lib-es/staking/index.js +12 -10
- package/lib-es/staking/index.js.map +1 -1
- package/lib-es/staking/logic.d.ts +3 -3
- package/lib-es/staking/logic.d.ts.map +1 -1
- package/lib-es/staking/logic.js +13 -11
- package/lib-es/staking/logic.js.map +1 -1
- package/lib-es/staking/operations/celo.d.ts +1 -1
- package/lib-es/staking/operations/celo.d.ts.map +1 -1
- package/lib-es/staking/operations/celo.js +3 -1
- package/lib-es/staking/operations/celo.js.map +1 -1
- package/lib-es/staking/operations/index.d.ts +2 -2
- package/lib-es/staking/operations/index.d.ts.map +1 -1
- package/lib-es/staking/operations/index.js +13 -11
- package/lib-es/staking/operations/index.js.map +1 -1
- package/lib-es/staking/operations/monad.d.ts +1 -1
- package/lib-es/staking/operations/monad.d.ts.map +1 -1
- package/lib-es/staking/operations/monad.js +2 -0
- package/lib-es/staking/operations/monad.js.map +1 -1
- package/lib-es/staking/operations/sei.d.ts +1 -1
- package/lib-es/staking/operations/sei.d.ts.map +1 -1
- package/lib-es/staking/operations/sei.js +5 -3
- package/lib-es/staking/operations/sei.js.map +1 -1
- package/lib-es/staking/operations/somnia.d.ts +1 -1
- package/lib-es/staking/operations/somnia.d.ts.map +1 -1
- package/lib-es/staking/operations/somnia.js +3 -1
- package/lib-es/staking/operations/somnia.js.map +1 -1
- package/lib-es/staking/operations/types.d.ts.map +1 -1
- package/lib-es/staking/operations/types.js +2 -0
- package/lib-es/staking/operations/types.js.map +1 -1
- package/lib-es/staking/operations/zero_gravity.d.ts +1 -1
- package/lib-es/staking/operations/zero_gravity.d.ts.map +1 -1
- package/lib-es/staking/operations/zero_gravity.js +2 -0
- package/lib-es/staking/operations/zero_gravity.js.map +1 -1
- package/lib-es/staking/prepareIntents.d.ts +2 -2
- package/lib-es/staking/prepareIntents.d.ts.map +1 -1
- package/lib-es/staking/prepareIntents.js +28 -26
- package/lib-es/staking/prepareIntents.js.map +1 -1
- package/lib-es/staking/redelegations.d.ts +2 -3
- package/lib-es/staking/redelegations.d.ts.map +1 -1
- package/lib-es/staking/redelegations.js +28 -26
- package/lib-es/staking/redelegations.js.map +1 -1
- package/lib-es/staking/rewards.d.ts +1 -1
- package/lib-es/staking/rewards.d.ts.map +1 -1
- package/lib-es/staking/rewards.js +13 -11
- package/lib-es/staking/rewards.js.map +1 -1
- package/lib-es/staking/rewardsFromReceipt.d.ts +3 -3
- package/lib-es/staking/rewardsFromReceipt.d.ts.map +1 -1
- package/lib-es/staking/rewardsFromReceipt.js +11 -9
- package/lib-es/staking/rewardsFromReceipt.js.map +1 -1
- package/lib-es/staking/transactionData.d.ts +1 -1
- package/lib-es/staking/transactionData.d.ts.map +1 -1
- package/lib-es/staking/transactionData.js +11 -9
- package/lib-es/staking/transactionData.js.map +1 -1
- package/lib-es/staking/validators/index.d.ts +4 -4
- package/lib-es/staking/validators/index.d.ts.map +1 -1
- package/lib-es/staking/validators/index.js +19 -17
- package/lib-es/staking/validators/index.js.map +1 -1
- package/lib-es/staking/validators/monad.d.ts +7 -8
- package/lib-es/staking/validators/monad.d.ts.map +1 -1
- package/lib-es/staking/validators/monad.js +60 -58
- package/lib-es/staking/validators/monad.js.map +1 -1
- package/lib-es/staking/validators/monadResolver.d.ts +2 -2
- package/lib-es/staking/validators/monadResolver.d.ts.map +1 -1
- package/lib-es/staking/validators/monadResolver.js +15 -13
- package/lib-es/staking/validators/monadResolver.js.map +1 -1
- package/lib-es/staking/validators/sei.d.ts +1 -1
- package/lib-es/staking/validators/sei.d.ts.map +1 -1
- package/lib-es/staking/validators/sei.js +11 -9
- package/lib-es/staking/validators/sei.js.map +1 -1
- package/lib-es/staking/validators/somnia.d.ts +4 -4
- package/lib-es/staking/validators/somnia.d.ts.map +1 -1
- package/lib-es/staking/validators/somnia.js +42 -40
- package/lib-es/staking/validators/somnia.js.map +1 -1
- package/lib-es/staking/validators/types.d.ts +3 -3
- package/lib-es/staking/validators/types.d.ts.map +1 -1
- package/lib-es/staking/validators/types.js +2 -0
- package/lib-es/staking/validators/types.js.map +1 -1
- package/lib-es/staking/validators/zero_gravity.d.ts +4 -4
- package/lib-es/staking/validators/zero_gravity.d.ts.map +1 -1
- package/lib-es/staking/validators/zero_gravity.js +62 -62
- package/lib-es/staking/validators/zero_gravity.js.map +1 -1
- package/lib-es/supportedFeatures.d.ts +1 -1
- package/lib-es/supportedFeatures.d.ts.map +1 -1
- package/lib-es/supportedFeatures.js +3 -1
- package/lib-es/supportedFeatures.js.map +1 -1
- package/lib-es/types/assets.d.ts +2 -2
- package/lib-es/types/assets.d.ts.map +1 -1
- package/lib-es/types/assets.js +3 -1
- package/lib-es/types/assets.js.map +1 -1
- package/lib-es/types/editTransaction.d.ts +1 -1
- package/lib-es/types/editTransaction.d.ts.map +1 -1
- package/lib-es/types/editTransaction.js +2 -0
- package/lib-es/types/editTransaction.js.map +1 -1
- package/lib-es/types/etherscan.d.ts.map +1 -1
- package/lib-es/types/etherscan.js +2 -4
- package/lib-es/types/etherscan.js.map +1 -1
- package/lib-es/types/index.d.ts +6 -6
- package/lib-es/types/index.d.ts.map +1 -1
- package/lib-es/types/index.js +8 -6
- package/lib-es/types/index.js.map +1 -1
- package/lib-es/types/ledger.d.ts.map +1 -1
- package/lib-es/types/ledger.js +2 -0
- package/lib-es/types/ledger.js.map +1 -1
- package/lib-es/types/staking.d.ts +10 -10
- package/lib-es/types/staking.d.ts.map +1 -1
- package/lib-es/types/staking.js +2 -0
- package/lib-es/types/staking.js.map +1 -1
- package/lib-es/types/transaction.d.ts +2 -2
- package/lib-es/types/transaction.d.ts.map +1 -1
- package/lib-es/types/transaction.js +2 -0
- package/lib-es/types/transaction.js.map +1 -1
- package/lib-es/utils.d.ts +4 -4
- package/lib-es/utils.d.ts.map +1 -1
- package/lib-es/utils.js +48 -46
- package/lib-es/utils.js.map +1 -1
- package/package.json +16 -15
- package/src/abis/index.ts +9 -6
- package/src/abis/monad.abi.json +177 -177
- package/src/adapters/blockOperations.test.ts +422 -419
- package/src/adapters/blockOperations.ts +71 -68
- package/src/adapters/etherscan.test.ts +1509 -1514
- package/src/adapters/etherscan.ts +164 -161
- package/src/adapters/index.ts +6 -3
- package/src/adapters/ledger.test.ts +877 -885
- package/src/adapters/ledger.ts +82 -79
- package/src/adapters/nonValueTransferCallTypes.ts +4 -1
- package/src/api/getBlock.integ.test.ts +91 -88
- package/src/api/index.arbitrum.integ.test.ts +40 -37
- package/src/api/index.arc_testnet.integ.test.ts +68 -65
- package/src/api/index.avalanche_c_chain_fuji.integ.test.ts +35 -32
- package/src/api/index.cronos.integ.test.ts +45 -42
- package/src/api/index.fantom.integ.test.ts +50 -47
- package/src/api/index.flare.integ.test.ts +28 -25
- package/src/api/index.integ.test.ts +689 -686
- package/src/api/index.linea.integ.test.ts +54 -51
- package/src/api/index.monad_testnet.integ.test.ts +29 -26
- package/src/api/index.optimism.integ.test.ts +42 -41
- package/src/api/index.rsk.integ.test.ts +32 -29
- package/src/api/index.shape.integ.test.ts +31 -28
- package/src/api/index.test.ts +76 -75
- package/src/api/index.ts +42 -39
- package/src/config.ts +65 -62
- package/src/constants.ts +6 -5
- package/src/errors.ts +87 -84
- package/src/fixtures/context.fixtures.ts +9 -6
- package/src/fixtures/etherscan.fixtures.ts +281 -278
- package/src/fixtures/ledger.fixtures.ts +86 -83
- package/src/internalTxSources.test.ts +60 -57
- package/src/internalTxSources.ts +29 -26
- package/src/logic/broadcast.integ.test.ts +31 -28
- package/src/logic/broadcast.test.ts +48 -45
- package/src/logic/broadcast.ts +13 -10
- package/src/logic/broadcastSource.test.ts +51 -48
- package/src/logic/combine.test.ts +70 -67
- package/src/logic/combine.ts +20 -17
- package/src/logic/common.test.ts +207 -204
- package/src/logic/common.ts +70 -67
- package/src/logic/computeGasLimit.test.ts +69 -66
- package/src/logic/computeGasLimit.ts +23 -20
- package/src/logic/craftTransaction.test.ts +259 -256
- package/src/logic/craftTransaction.ts +37 -34
- package/src/logic/craftTransactionData.test.ts +23 -20
- package/src/logic/craftTransactionData.ts +8 -5
- package/src/logic/estimateFees.test.ts +300 -297
- package/src/logic/estimateFees.ts +81 -78
- package/src/logic/evmUnit.ts +91 -88
- package/src/logic/getBalance.test.ts +191 -187
- package/src/logic/getBalance.ts +60 -58
- package/src/logic/getBlock.test.ts +679 -676
- package/src/logic/getBlock.ts +96 -93
- package/src/logic/getBlockInfo.test.ts +83 -80
- package/src/logic/getBlockInfo.ts +13 -10
- package/src/logic/getErc20Data.test.ts +17 -14
- package/src/logic/getErc20Data.ts +11 -8
- package/src/logic/getNextSequence.test.ts +27 -24
- package/src/logic/getNextSequence.ts +9 -6
- package/src/logic/getStakes.test.ts +123 -120
- package/src/logic/getStakes.ts +15 -12
- package/src/logic/index.ts +15 -12
- package/src/logic/internalTransactionsFetcher.test.ts +148 -145
- package/src/logic/internalTransactionsFetcher.ts +57 -54
- package/src/logic/lastBlock.test.ts +59 -56
- package/src/logic/lastBlock.ts +11 -8
- package/src/logic/listOperations.test.ts +1206 -1203
- package/src/logic/listOperations.ts +114 -109
- package/src/logic/rootTraceDedup.ts +15 -12
- package/src/logic/validateAddress.test.ts +50 -47
- package/src/logic/validateAddress.ts +9 -6
- package/src/logic/validateIntent.test.ts +744 -741
- package/src/logic/validateIntent.ts +182 -182
- package/src/logic.test.ts +113 -110
- package/src/logic.ts +22 -19
- package/src/network/explorer/etherscan.test.ts +1132 -1133
- package/src/network/explorer/etherscan.ts +280 -279
- package/src/network/explorer/index.test.ts +59 -56
- package/src/network/explorer/index.ts +22 -19
- package/src/network/explorer/ledger.test.ts +287 -289
- package/src/network/explorer/ledger.ts +70 -67
- package/src/network/explorer/none.ts +9 -6
- package/src/network/explorer/types.test.ts +19 -16
- package/src/network/explorer/types.ts +25 -22
- package/src/network/gasTracker/index.test.ts +20 -17
- package/src/network/gasTracker/index.ts +10 -7
- package/src/network/gasTracker/ledger.test.ts +136 -133
- package/src/network/gasTracker/ledger.ts +41 -38
- package/src/network/gasTracker/types.test.ts +13 -10
- package/src/network/gasTracker/types.ts +16 -13
- package/src/network/node/gethCallTracerToTraceBlockItems.test.ts +119 -116
- package/src/network/node/gethCallTracerToTraceBlockItems.ts +96 -93
- package/src/network/node/index.memoization.test.ts +41 -38
- package/src/network/node/index.test.ts +34 -31
- package/src/network/node/index.ts +25 -22
- package/src/network/node/ledger.test.ts +386 -386
- package/src/network/node/ledger.ts +163 -160
- package/src/network/node/node.fixtures.ts +5 -2
- package/src/network/node/resources/flare-0x36ffc39-debug-trace-block-call-tracer.json +570 -570
- package/src/network/node/rpc.common.ts +320 -318
- package/src/network/node/rpc.errors.ts +36 -33
- package/src/network/node/rpc.native.ts +6 -3
- package/src/network/node/rpc.test.ts +948 -939
- package/src/network/node/rpc.ts +4 -1
- package/src/network/node/types.test.ts +16 -13
- package/src/network/node/types.ts +127 -124
- package/src/network/withRetries.ts +9 -6
- package/src/staking/abis.test.ts +139 -136
- package/src/staking/abis.ts +24 -21
- package/src/staking/contracts.test.ts +18 -15
- package/src/staking/contracts.ts +118 -115
- package/src/staking/detectOperationType.test.ts +113 -110
- package/src/staking/detectOperationType.ts +59 -56
- package/src/staking/encoder.test.ts +177 -174
- package/src/staking/encoder.ts +22 -19
- package/src/staking/fetchers.ts +108 -105
- package/src/staking/index.ts +14 -11
- package/src/staking/logic.test.ts +165 -172
- package/src/staking/logic.ts +48 -46
- package/src/staking/operations/celo.ts +7 -4
- package/src/staking/operations/index.test.ts +183 -180
- package/src/staking/operations/index.ts +29 -26
- package/src/staking/operations/monad.ts +6 -3
- package/src/staking/operations/sei.ts +12 -9
- package/src/staking/operations/somnia.ts +8 -5
- package/src/staking/operations/types.ts +21 -18
- package/src/staking/operations/zero_gravity.ts +6 -3
- package/src/staking/prepareIntents.test.ts +127 -124
- package/src/staking/prepareIntents.ts +76 -73
- package/src/staking/redelegations.test.ts +334 -333
- package/src/staking/redelegations.ts +167 -164
- package/src/staking/rewards.test.ts +119 -116
- package/src/staking/rewards.ts +44 -41
- package/src/staking/rewardsFromReceipt.test.ts +93 -90
- package/src/staking/rewardsFromReceipt.ts +44 -41
- package/src/staking/transactionData.test.ts +159 -156
- package/src/staking/transactionData.ts +28 -28
- package/src/staking/validators/index.ts +68 -65
- package/src/staking/validators/monad.test.ts +426 -428
- package/src/staking/validators/monad.ts +263 -261
- package/src/staking/validators/monadResolver.ts +39 -36
- package/src/staking/validators/sei.ts +36 -33
- package/src/staking/validators/somnia.test.ts +253 -250
- package/src/staking/validators/somnia.ts +167 -164
- package/src/staking/validators/types.ts +9 -6
- package/src/staking/validators/zero_gravity.test.ts +271 -268
- package/src/staking/validators/zero_gravity.ts +151 -156
- package/src/staking/validators.integ.test.ts +26 -23
- package/src/staking/validators.test.ts +225 -222
- package/src/supportedFeatures.ts +6 -3
- package/src/types/assets.ts +6 -3
- package/src/types/editTransaction.ts +4 -1
- package/src/types/etherscan.ts +106 -103
- package/src/types/index.ts +9 -6
- package/src/types/ledger.ts +61 -58
- package/src/types/staking.ts +91 -88
- package/src/types/transaction.ts +37 -34
- package/src/utils.test.ts +135 -132
- package/src/utils.ts +144 -141
- package/tsconfig.build.json +3 -11
- package/tsconfig.json +2 -11
- package/.unimportedrc.json +0 -40
- package/LICENSE.txt +0 -21
package/.oxlintrc.json
CHANGED
|
@@ -2,17 +2,29 @@
|
|
|
2
2
|
"$schema": "../../../node_modules/oxlint/configuration_schema.json",
|
|
3
3
|
"extends": ["../.oxlintrc.json"],
|
|
4
4
|
"rules": {
|
|
5
|
-
"typescript/explicit-function-return-type": "error"
|
|
5
|
+
"typescript/explicit-function-return-type": "error",
|
|
6
|
+
"typescript/consistent-type-assertions": "warn",
|
|
7
|
+
"typescript/no-explicit-any": "warn",
|
|
8
|
+
"typescript/consistent-type-imports": "warn",
|
|
9
|
+
"typescript/no-empty-function": "warn",
|
|
10
|
+
"eslint/no-empty-function": "warn",
|
|
11
|
+
"import/consistent-type-specifier-style": "warn"
|
|
6
12
|
},
|
|
7
13
|
"overrides": [
|
|
8
14
|
{
|
|
9
|
-
"files": [
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"**/*.integ.test.{ts,tsx}"
|
|
13
|
-
],
|
|
15
|
+
"files": ["src/**/*.test.{ts,tsx}", "src/**/__tests__/**", "**/*.integ.test.{ts,tsx}"],
|
|
16
|
+
"env": { "jest": true },
|
|
17
|
+
"plugins": ["jest"],
|
|
14
18
|
"rules": {
|
|
15
|
-
"typescript/explicit-function-return-type": "off"
|
|
19
|
+
"typescript/explicit-function-return-type": "off",
|
|
20
|
+
"typescript/consistent-type-assertions": "warn",
|
|
21
|
+
"typescript/no-explicit-any": "warn",
|
|
22
|
+
"typescript/consistent-type-imports": "warn",
|
|
23
|
+
"jest/no-standalone-expect": "warn",
|
|
24
|
+
"jest/valid-expect": "warn",
|
|
25
|
+
"jest/no-restricted-matchers": "warn",
|
|
26
|
+
"jest/require-to-throw-message": "warn",
|
|
27
|
+
"jest/expect-expect": "warn"
|
|
16
28
|
}
|
|
17
29
|
}
|
|
18
30
|
]
|
package/CHANGELOG.md
CHANGED
|
@@ -1,37 +1,27 @@
|
|
|
1
1
|
# @ledgerhq/coin-evm
|
|
2
2
|
|
|
3
|
-
## 5.2.0
|
|
3
|
+
## 5.2.0
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
7
|
-
- [#
|
|
7
|
+
- [#838](https://github.com/LedgerHQ/coin-modules/pull/838) [`3758271`](https://github.com/LedgerHQ/coin-modules/commit/3758271d1e06950b4d41c5f6222067611e3ed7f8) Thanks [@henri-ly](https://github.com/henri-ly)! - Import the `coin-evm` module from `ledger-live` with its full git history (1152 commits).
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
The module arrives already conforming to `CoinModuleApi` (ADR-025) and the ADR-022 authoring
|
|
10
|
+
type: `createApi(currencyId: string)` returns the precise object shape that `satisfies
|
|
11
|
+
CoinModuleImpl` infers, so no bridge or Ledger-Wallet surface came across. Wiring changes only —
|
|
12
|
+
dependency specifiers repointed at this workspace, build/test configs rebased on the
|
|
13
|
+
`libs/coin-modules` shared bases, and `.unimportedrc.json` replaced by `knip.json`.
|
|
10
14
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
- [#21168](https://github.com/LedgerHQ/ledger-live/pull/21168) [`83b019e`](https://github.com/LedgerHQ/ledger-live/commit/83b019e128b59a289a28184e58c33b108cd3f188) Thanks [@cted-ledger](https://github.com/cted-ledger)! - Adopt the coin-module authoring type, dropping the hand-written "not supported" stubs.
|
|
14
|
-
|
|
15
|
-
`createApi` now returns its object with `satisfies CoinModuleImpl<EvmConfigInfo, MemoNotSupported, BufferTxData>` — which keeps the precise shape, so a caller sees exactly which methods exist — and omits `craftRawTransaction`, `register`, `getStakes` and `getRewards` instead of giving each a `throw new Error("… is not supported")`.
|
|
16
|
-
|
|
17
|
-
Staking is partial rather than absent, which is why the capabilities are per-method: `getValidators` stays and serves the validator list, while no staking position or reward event is read here.
|
|
18
|
-
|
|
19
|
-
Consumers see no change. They reach the module through a resolver that applies the framework's `withDefaults`, which supplies every omitted capability, so the same call still raises the same `"<method> is not supported"` error — and `supports(method)` now reports which capabilities are real.
|
|
20
|
-
|
|
21
|
-
- [#21015](https://github.com/LedgerHQ/ledger-live/pull/21015) [`2c70999`](https://github.com/LedgerHQ/ledger-live/commit/2c709990d3569bc50504822ce90c9e9024210312) Thanks [@YazhuEth](https://github.com/YazhuEth)! - fix(coin-framework): follow the listOperations cursor so account history is no longer truncated to one page
|
|
22
|
-
|
|
23
|
-
getAccountShape called listOperations once and discarded the returned `next`, so any account with
|
|
24
|
-
more operations than one explorer page never received the rest, and no later sync recovered the
|
|
25
|
-
tail: the walk is newest-first and `minHeight` only ever moves forward, so the pages below the
|
|
26
|
-
first were lost for good.
|
|
27
|
-
|
|
28
|
-
It now walks the cursor chain within a sync, treating a falsy cursor as end of stream. The walk is
|
|
29
|
-
unbounded — only a module that cannot progress ends it early: an empty page, or a cursor already
|
|
30
|
-
followed (a repeat, or a longer cycle). The `extra.pagingToken` resume read is removed:
|
|
31
|
-
nothing could ever write it, and `minHeight` is the resume position across syncs.
|
|
15
|
+
Two behaviours already present in the imported source but not yet released from `ledger-live`
|
|
16
|
+
ship with this version:
|
|
32
17
|
|
|
33
|
-
|
|
34
|
-
|
|
18
|
+
- `listOperations` cursor handling: the Ledger explorer's `fetchPaginatedOpsWithRetries` appends
|
|
19
|
+
each batch in place instead of rebuilding the whole accumulator (`[...previous, ...batch]`) once
|
|
20
|
+
per page, so account history is no longer truncated to a single explorer page.
|
|
21
|
+
- EVM NFT activation is driven by the `supportedTokens` config field instead of `isNFTActive` and
|
|
22
|
+
the `showNfts` boolean. `EvmConfig.showNfts` is replaced by `supportedTokens: ("erc721" |
|
|
23
|
+
"erc1155")[]`, so each NFT standard is enabled independently and coin-evm no longer depends on
|
|
24
|
+
`@ledgerhq/ledger-wallet-framework/nft`.
|
|
35
25
|
|
|
36
26
|
## 5.1.0
|
|
37
27
|
|
package/LICENSE
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship made available under
|
|
36
|
+
the License, as indicated by a copyright notice that is included in
|
|
37
|
+
or attached to the work (an example is provided in the Appendix below).
|
|
38
|
+
|
|
39
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
40
|
+
form, that is based on (or derived from) the Work and for which the
|
|
41
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
42
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
43
|
+
of this License, Derivative Works shall not include works that remain
|
|
44
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
45
|
+
the Work and Derivative Works thereof.
|
|
46
|
+
|
|
47
|
+
"Contribution" shall mean, as submitted to the Licensor for inclusion
|
|
48
|
+
in the Work by the copyright owner or by an individual or Legal Entity
|
|
49
|
+
authorized to submit on behalf of the copyright owner. For the purposes
|
|
50
|
+
of this definition, "submitted" means any form of electronic, verbal,
|
|
51
|
+
or written communication sent to the Licensor or its representatives,
|
|
52
|
+
including but not limited to communication on electronic mailing lists,
|
|
53
|
+
source code control systems, and issue tracking systems that are managed
|
|
54
|
+
by, or on behalf of, the Licensor for the purpose of discussing and
|
|
55
|
+
improving the Work, but excluding communication that is conspicuously
|
|
56
|
+
marked or designated in writing by the copyright owner as "Not a
|
|
57
|
+
Contribution."
|
|
58
|
+
|
|
59
|
+
"Contributor" shall mean Licensor and any Legal Entity on behalf of
|
|
60
|
+
whom a Contribution has been received by the Licensor and included
|
|
61
|
+
within the Work.
|
|
62
|
+
|
|
63
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
64
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
65
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
66
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
67
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
68
|
+
Work and such Derivative Works in Source or Object form.
|
|
69
|
+
|
|
70
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
71
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
72
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
73
|
+
(except as stated in this section) patent license to make, have made,
|
|
74
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
75
|
+
where such license applies only to those patent claims licensable
|
|
76
|
+
by such Contributor that are necessarily infringed by their
|
|
77
|
+
Contribution(s) alone or by the combination of their Contribution(s)
|
|
78
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
79
|
+
institute patent litigation against any entity (including a cross-claim
|
|
80
|
+
or counterclaim in a lawsuit) alleging that the Work or any
|
|
81
|
+
Contribution embodied within the Work constitutes direct or
|
|
82
|
+
contributory patent infringement, then any patent licenses granted to
|
|
83
|
+
You under this License for that Work shall terminate as of the date
|
|
84
|
+
such litigation is filed.
|
|
85
|
+
|
|
86
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
87
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
88
|
+
modifications, and in Source or Object form, provided that You
|
|
89
|
+
meet the following conditions:
|
|
90
|
+
|
|
91
|
+
(a) You must give any other recipients of the Work or Derivative
|
|
92
|
+
Works a copy of this License; and
|
|
93
|
+
|
|
94
|
+
(b) You must cause any modified files to carry prominent notices
|
|
95
|
+
stating that You changed the files; and
|
|
96
|
+
|
|
97
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
98
|
+
that You distribute, all copyright, patent, trademark, and
|
|
99
|
+
attribution notices from the Source form of the Work,
|
|
100
|
+
excluding those notices that do not pertain to any part of
|
|
101
|
+
the Derivative Works; and
|
|
102
|
+
|
|
103
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
104
|
+
distribution, You must include a readable copy of the
|
|
105
|
+
attribution notices contained within such NOTICE file, in
|
|
106
|
+
at least one of the following places: within a NOTICE text
|
|
107
|
+
file distributed as part of the Derivative Works; within
|
|
108
|
+
the Source form or documentation, if provided along with the
|
|
109
|
+
Derivative Works; or, within a display generated by the
|
|
110
|
+
Derivative Works, if and wherever such third-party notices
|
|
111
|
+
normally appear. The contents of the NOTICE file are for
|
|
112
|
+
informational purposes only and do not modify the License.
|
|
113
|
+
You may add Your own attribution notices within Derivative
|
|
114
|
+
Works that You distribute, alongside or in addition to the
|
|
115
|
+
NOTICE text from the Work, provided that such additional
|
|
116
|
+
attribution notices cannot be construed as modifying the
|
|
117
|
+
License.
|
|
118
|
+
|
|
119
|
+
You may add Your own license statement for Your modifications and
|
|
120
|
+
may provide additional grant of rights to use, copy, modify, merge,
|
|
121
|
+
publish, distribute, sublicense, and/or sell copies of the Software,
|
|
122
|
+
and to permit persons to whom the Software is furnished to do so,
|
|
123
|
+
subject to the following conditions.
|
|
124
|
+
|
|
125
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
126
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
127
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
128
|
+
this License, without any additional terms or conditions.
|
|
129
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
130
|
+
the terms of any separate license agreement you may have executed
|
|
131
|
+
with Licensor regarding such Contributions.
|
|
132
|
+
|
|
133
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
134
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
135
|
+
except as required for reasonable and customary use in describing the
|
|
136
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
137
|
+
|
|
138
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
139
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
140
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
141
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
142
|
+
implied, including, without limitation, any conditions of TITLE,
|
|
143
|
+
NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR
|
|
144
|
+
PURPOSE. You are solely responsible for determining the
|
|
145
|
+
appropriateness of using or redistributing the Work and assume any
|
|
146
|
+
risks associated with Your exercise of permissions under this License.
|
|
147
|
+
|
|
148
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
149
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
150
|
+
unless required by applicable law (such as deliberate and grossly
|
|
151
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
152
|
+
liable to You for damages, including any direct, indirect, special,
|
|
153
|
+
incidental, or exemplary damages of any character arising as a
|
|
154
|
+
result of this License or out of the use or inability to use the
|
|
155
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
156
|
+
work stoppage, computer failure or malfunction, or all other
|
|
157
|
+
commercial damages or losses), even if such Contributor has been
|
|
158
|
+
advised of the possibility of such damages.
|
|
159
|
+
|
|
160
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
161
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
162
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
163
|
+
or other liability obligations and/or rights consistent with this
|
|
164
|
+
License. However, in accepting such obligations, You may act only
|
|
165
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
166
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
167
|
+
defend, and hold each Contributor harmless for any liability
|
|
168
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
169
|
+
of your accepting any such warranty or additional liability.
|
|
170
|
+
|
|
171
|
+
END OF TERMS AND CONDITIONS
|
|
172
|
+
|
|
173
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
174
|
+
|
|
175
|
+
To apply the Apache License to your work, attach the following
|
|
176
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
177
|
+
replaced with your own identifying information. (Don't include
|
|
178
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
179
|
+
comment syntax for the format in use. Please also include a
|
|
180
|
+
"NOTICE" file with your copyright notice as a separate file.
|
|
181
|
+
|
|
182
|
+
Copyright 2024 LEDGER SAS
|
|
183
|
+
|
|
184
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
185
|
+
you may not use this file except in compliance with the License.
|
|
186
|
+
You may obtain a copy of the License at
|
|
187
|
+
|
|
188
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
189
|
+
|
|
190
|
+
Unless required by applicable law or agreed to in writing, software
|
|
191
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
192
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
193
|
+
implied. See the License for the specific language governing
|
|
194
|
+
permissions and limitations under the License.
|
package/jest.config.js
CHANGED
|
@@ -1,31 +1,15 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: © 2024 LEDGER SAS
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
const base = require("../jest.config.base");
|
|
5
|
+
|
|
1
6
|
module.exports = {
|
|
7
|
+
...base,
|
|
2
8
|
passWithNoTests: true,
|
|
3
|
-
collectCoverageFrom: [
|
|
4
|
-
"src/**/*.ts",
|
|
5
|
-
"!src/**/*.test.ts",
|
|
6
|
-
"!src/**/*.spec.ts",
|
|
7
|
-
"!src/test/**/*.ts",
|
|
8
|
-
],
|
|
9
|
-
coverageReporters: ["json", ["lcov", { file: "lcov.info", projectRoot: "../../../" }], "text"],
|
|
10
|
-
testEnvironment: "node",
|
|
11
|
-
testPathIgnorePatterns: ["lib/", "lib-es/", ".*\\.(integ|integration)\\.test\\.ts"],
|
|
12
|
-
transform: {
|
|
13
|
-
"^.+\\.(ts|tsx)$": [
|
|
14
|
-
"@swc/jest",
|
|
15
|
-
{
|
|
16
|
-
jsc: {
|
|
17
|
-
target: "esnext",
|
|
18
|
-
},
|
|
19
|
-
module: {
|
|
20
|
-
type: "commonjs",
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
],
|
|
24
|
-
},
|
|
25
9
|
setupFilesAfterEnv: ["jest-expect-message", "dotenv/config"],
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
10
|
+
// Imported from ledger-live with a pre-existing handle leak: some suites leave
|
|
11
|
+
// sockets/timers behind, so jest never returns on its own in CI (the Unit Tests job
|
|
12
|
+
// ran 36 min without finishing). forceExit ends the run once tests are done.
|
|
13
|
+
forceExit: true,
|
|
14
|
+
maxWorkers: 2,
|
|
31
15
|
};
|
package/jest.integ.config.js
CHANGED
|
@@ -1,18 +1,8 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: © 2024 LEDGER SAS
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
1
4
|
/** @type {import('jest').Config} */
|
|
2
5
|
module.exports = {
|
|
3
|
-
|
|
4
|
-
testRegex: ".integ.test.ts$",
|
|
5
|
-
testPathIgnorePatterns: ["lib/", "lib-es/"],
|
|
6
|
+
...require("../jest.integ.config.base"),
|
|
6
7
|
testTimeout: 90_000,
|
|
7
|
-
forceExit: true,
|
|
8
|
-
transform: {
|
|
9
|
-
"^.+\\.(t|j)sx?$": [
|
|
10
|
-
"@swc/jest",
|
|
11
|
-
{
|
|
12
|
-
jsc: {
|
|
13
|
-
target: "esnext",
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
],
|
|
17
|
-
},
|
|
18
8
|
};
|
package/knip.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://unpkg.com/knip@5.34.1/schema.json",
|
|
3
|
+
"entry": [
|
|
4
|
+
"src/abis/index.ts",
|
|
5
|
+
"src/api/index.ts",
|
|
6
|
+
"src/config.ts",
|
|
7
|
+
"src/constants.ts",
|
|
8
|
+
"src/errors.ts",
|
|
9
|
+
"src/logic.ts",
|
|
10
|
+
"src/logic/combine.ts",
|
|
11
|
+
"src/logic/craftTransaction.ts",
|
|
12
|
+
"src/logic/getErc20Data.ts",
|
|
13
|
+
"src/logic/index.ts",
|
|
14
|
+
"src/logic/validateAddress.ts",
|
|
15
|
+
"src/network/gasTracker/index.ts",
|
|
16
|
+
"src/network/gasTracker/types.ts",
|
|
17
|
+
"src/network/node/index.ts",
|
|
18
|
+
"src/network/node/rpc.common.ts",
|
|
19
|
+
"src/network/node/rpc.native.ts",
|
|
20
|
+
"src/network/node/types.ts",
|
|
21
|
+
"src/staking/index.ts",
|
|
22
|
+
"src/staking/redelegations.ts",
|
|
23
|
+
"src/supportedFeatures.ts",
|
|
24
|
+
"src/types/editTransaction.ts",
|
|
25
|
+
"src/types/index.ts",
|
|
26
|
+
"src/types/staking.ts",
|
|
27
|
+
"src/utils.ts"
|
|
28
|
+
],
|
|
29
|
+
"project": ["src/**/*.ts"],
|
|
30
|
+
"ignoreDependencies": ["@ledgerhq/coin-module-framework"]
|
|
31
|
+
}
|
package/lib/abis/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import OPTIMISM_GAS_PRICE_ORACLE_ABI from
|
|
5
|
-
import SCROLL_GAS_PRICE_ORACLE_ABI from
|
|
1
|
+
import ERC20_ABI from './erc20.abi.json';
|
|
2
|
+
import ERC721_ABI from './erc721.abi.json';
|
|
3
|
+
import ERC1155_ABI from './erc1155.abi.json';
|
|
4
|
+
import OPTIMISM_GAS_PRICE_ORACLE_ABI from './optimismGasPriceOracle.abi.json';
|
|
5
|
+
import SCROLL_GAS_PRICE_ORACLE_ABI from './scrollGasPriceOracle.abi.json';
|
|
6
6
|
export { ERC20_ABI, ERC721_ABI, ERC1155_ABI, OPTIMISM_GAS_PRICE_ORACLE_ABI, SCROLL_GAS_PRICE_ORACLE_ABI, };
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/abis/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/abis/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/abis/index.ts"],"names":[],"mappings":"AAGA,OAAO,SAAS,MAAM,kBAAkB,CAAA;AACxC,OAAO,UAAU,MAAM,mBAAmB,CAAA;AAC1C,OAAO,WAAW,MAAM,oBAAoB,CAAA;AAC5C,OAAO,6BAA6B,MAAM,mCAAmC,CAAA;AAC7E,OAAO,2BAA2B,MAAM,iCAAiC,CAAA;AAEzE,OAAO,EACL,SAAS,EACT,UAAU,EACV,WAAW,EACX,6BAA6B,EAC7B,2BAA2B,GAC5B,CAAA"}
|
package/lib/abis/index.js
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
// SPDX-FileCopyrightText: © 2026 LEDGER SAS
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
4
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
5
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
6
|
};
|
|
5
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
8
|
exports.SCROLL_GAS_PRICE_ORACLE_ABI = exports.OPTIMISM_GAS_PRICE_ORACLE_ABI = exports.ERC1155_ABI = exports.ERC721_ABI = exports.ERC20_ABI = void 0;
|
|
7
|
-
const erc1155_abi_json_1 = __importDefault(require("./erc1155.abi.json"));
|
|
8
|
-
exports.ERC1155_ABI = erc1155_abi_json_1.default;
|
|
9
9
|
const erc20_abi_json_1 = __importDefault(require("./erc20.abi.json"));
|
|
10
10
|
exports.ERC20_ABI = erc20_abi_json_1.default;
|
|
11
11
|
const erc721_abi_json_1 = __importDefault(require("./erc721.abi.json"));
|
|
12
12
|
exports.ERC721_ABI = erc721_abi_json_1.default;
|
|
13
|
+
const erc1155_abi_json_1 = __importDefault(require("./erc1155.abi.json"));
|
|
14
|
+
exports.ERC1155_ABI = erc1155_abi_json_1.default;
|
|
13
15
|
const optimismGasPriceOracle_abi_json_1 = __importDefault(require("./optimismGasPriceOracle.abi.json"));
|
|
14
16
|
exports.OPTIMISM_GAS_PRICE_ORACLE_ABI = optimismGasPriceOracle_abi_json_1.default;
|
|
15
17
|
const scrollGasPriceOracle_abi_json_1 = __importDefault(require("./scrollGasPriceOracle.abi.json"));
|
package/lib/abis/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/abis/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/abis/index.ts"],"names":[],"mappings":";AAAA,4CAA4C;AAC5C,sCAAsC;;;;;;AAEtC,sEAAwC;AAOtC,oBAPK,wBAAS,CAOL;AANX,wEAA0C;AAOxC,qBAPK,yBAAU,CAOL;AANZ,0EAA4C;AAO1C,sBAPK,0BAAW,CAOL;AANb,wGAA6E;AAO3E,wCAPK,yCAA6B,CAOL;AAN/B,oGAAyE;AAOvE,sCAPK,uCAA2B,CAOL"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { BlockOperation } from
|
|
2
|
-
import { TransactionInfo, TraceBlockItem } from
|
|
3
|
-
import { LedgerExplorerOperation } from
|
|
1
|
+
import type { BlockOperation } from '@ledgerhq/coin-module-framework/api/index';
|
|
2
|
+
import { TransactionInfo, TraceBlockItem } from '../network/node/types';
|
|
3
|
+
import { LedgerExplorerOperation } from '../types';
|
|
4
4
|
/**
|
|
5
5
|
* Extract BlockOperations from an RPC transaction.
|
|
6
6
|
* This extracts native transfers from the transaction value field and ERC20 transfers from logs.
|
|
7
7
|
*/
|
|
8
|
-
export declare function rpcTransactionToBlockOperations(tx: Pick<TransactionInfo,
|
|
8
|
+
export declare function rpcTransactionToBlockOperations(tx: Pick<TransactionInfo, 'from' | 'value' | 'to' | 'erc20Transfers'>): BlockOperation[];
|
|
9
9
|
/**
|
|
10
10
|
* Converts trace_block items to BlockOperations grouped by transaction hash.
|
|
11
11
|
* Only includes internal calls with native value transfer (value > 0) and no error.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blockOperations.d.ts","sourceRoot":"","sources":["../../src/adapters/blockOperations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"blockOperations.d.ts","sourceRoot":"","sources":["../../src/adapters/blockOperations.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAEV,cAAc,EAEf,MAAM,2CAA2C,CAAA;AAClD,OAAO,EAAE,eAAe,EAAE,cAAc,EAA0B,MAAM,uBAAuB,CAAA;AAC/F,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAA;AAyClD;;;GAGG;AACH,wBAAgB,+BAA+B,CAC7C,EAAE,EAAE,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,gBAAgB,CAAC,GACpE,cAAc,EAAE,CAqBlB;AA+BD;;;GAGG;AACH,wBAAgB,iCAAiC,CAC/C,KAAK,EAAE,cAAc,EAAE,GACtB,GAAG,CAAC,MAAM,EAAE,cAAc,EAAE,CAAC,CAyB/B;AAED,wBAAgB,kCAAkC,CAChD,QAAQ,EAAE,uBAAuB,GAChC,cAAc,EAAE,CAiElB"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
// SPDX-FileCopyrightText: © 2026 LEDGER SAS
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
5
|
exports.rpcTransactionToBlockOperations = rpcTransactionToBlockOperations;
|
|
4
6
|
exports.traceBlockItemsToOperationsByHash = traceBlockItemsToOperationsByHash;
|
|
@@ -11,11 +13,11 @@ const nonValueTransferCallTypes_1 = require("./nonValueTransferCallTypes");
|
|
|
11
13
|
* Creates two operations: one for the sender (negative amount) and one for the receiver (positive amount).
|
|
12
14
|
*/
|
|
13
15
|
function addTransferOperations(operations, from, to, asset, amount) {
|
|
14
|
-
const encodedFrom = from ? (0, utils_1.safeEncodeEIP55)(from) :
|
|
15
|
-
const encodedTo = to ? (0, utils_1.safeEncodeEIP55)(to) :
|
|
16
|
+
const encodedFrom = from ? (0, utils_1.safeEncodeEIP55)(from) : '';
|
|
17
|
+
const encodedTo = to ? (0, utils_1.safeEncodeEIP55)(to) : '';
|
|
16
18
|
if (encodedFrom) {
|
|
17
19
|
const op = {
|
|
18
|
-
type:
|
|
20
|
+
type: 'transfer',
|
|
19
21
|
address: encodedFrom,
|
|
20
22
|
...(encodedTo ? { peer: encodedTo } : {}),
|
|
21
23
|
asset,
|
|
@@ -25,7 +27,7 @@ function addTransferOperations(operations, from, to, asset, amount) {
|
|
|
25
27
|
}
|
|
26
28
|
if (encodedTo) {
|
|
27
29
|
const op = {
|
|
28
|
-
type:
|
|
30
|
+
type: 'transfer',
|
|
29
31
|
address: encodedTo,
|
|
30
32
|
...(encodedFrom ? { peer: encodedFrom } : {}),
|
|
31
33
|
asset,
|
|
@@ -43,7 +45,7 @@ function rpcTransactionToBlockOperations(tx) {
|
|
|
43
45
|
// Native value transfer
|
|
44
46
|
const value = BigInt(tx.value);
|
|
45
47
|
if (value > 0n) {
|
|
46
|
-
addTransferOperations(operations, tx.from, tx.to, { type:
|
|
48
|
+
addTransferOperations(operations, tx.from, tx.to, { type: 'native' }, value);
|
|
47
49
|
}
|
|
48
50
|
// ERC20 transfers extracted from receipt logs
|
|
49
51
|
for (const transfer of tx.erc20Transfers) {
|
|
@@ -90,7 +92,7 @@ function traceBlockItemsToOperationsByHash(items) {
|
|
|
90
92
|
const actionFields = extractActionFields(item);
|
|
91
93
|
if (actionFields) {
|
|
92
94
|
const ops = [];
|
|
93
|
-
addTransferOperations(ops, actionFields.from, actionFields.to, { type:
|
|
95
|
+
addTransferOperations(ops, actionFields.from, actionFields.to, { type: 'native' }, actionFields.value);
|
|
94
96
|
const hash = actionFields.hash;
|
|
95
97
|
let arr = byHash.get(hash);
|
|
96
98
|
if (arr === undefined) {
|
|
@@ -105,23 +107,23 @@ function traceBlockItemsToOperationsByHash(items) {
|
|
|
105
107
|
function ledgerTransactionToBlockOperations(ledgerTx) {
|
|
106
108
|
const operations = [];
|
|
107
109
|
if (ledgerTx.value && BigInt(ledgerTx.value) > 0n) {
|
|
108
|
-
addTransferOperations(operations, ledgerTx.from, ledgerTx.to, { type:
|
|
110
|
+
addTransferOperations(operations, ledgerTx.from, ledgerTx.to, { type: 'native' }, BigInt(ledgerTx.value));
|
|
109
111
|
}
|
|
110
112
|
// Extract ERC20 token transfers
|
|
111
113
|
for (const event of ledgerTx.transfer_events) {
|
|
112
114
|
const contract = (0, utils_1.safeEncodeEIP55)(event.contract);
|
|
113
|
-
addTransferOperations(operations, event.from, event.to, { type:
|
|
115
|
+
addTransferOperations(operations, event.from, event.to, { type: 'erc20', assetReference: contract }, BigInt(event.count));
|
|
114
116
|
}
|
|
115
117
|
// Extract ERC721 NFT transfers
|
|
116
118
|
for (const event of ledgerTx.erc721_transfer_events) {
|
|
117
119
|
const contract = (0, utils_1.safeEncodeEIP55)(event.contract);
|
|
118
|
-
addTransferOperations(operations, event.sender, event.receiver, { type:
|
|
120
|
+
addTransferOperations(operations, event.sender, event.receiver, { type: 'erc721', assetReference: contract }, 1n);
|
|
119
121
|
}
|
|
120
122
|
// Extract ERC1155 NFT transfers
|
|
121
123
|
for (const event of ledgerTx.erc1155_transfer_events) {
|
|
122
124
|
const contract = (0, utils_1.safeEncodeEIP55)(event.contract);
|
|
123
125
|
for (const transfer of event.transfers) {
|
|
124
|
-
addTransferOperations(operations, event.sender, event.receiver, { type:
|
|
126
|
+
addTransferOperations(operations, event.sender, event.receiver, { type: 'erc1155', assetReference: contract }, BigInt(transfer.value));
|
|
125
127
|
}
|
|
126
128
|
}
|
|
127
129
|
// Extract internal transactions
|
|
@@ -131,7 +133,7 @@ function ledgerTransactionToBlockOperations(ledgerTx) {
|
|
|
131
133
|
}
|
|
132
134
|
const value = BigInt(action.value);
|
|
133
135
|
if (value > 0n) {
|
|
134
|
-
addTransferOperations(operations, action.from, action.to, { type:
|
|
136
|
+
addTransferOperations(operations, action.from, action.to, { type: 'native' }, value);
|
|
135
137
|
}
|
|
136
138
|
}
|
|
137
139
|
return operations;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blockOperations.js","sourceRoot":"","sources":["../../src/adapters/blockOperations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"blockOperations.js","sourceRoot":"","sources":["../../src/adapters/blockOperations.ts"],"names":[],"mappings":";AAAA,4CAA4C;AAC5C,sCAAsC;;AAqDtC,0EAuBC;AAmCD,8EA2BC;AAED,gFAmEC;AAxMD,iDAA+F;AAE/F,oCAA0C;AAC1C,2EAA2E;AAE3E;;;GAGG;AACH,SAAS,qBAAqB,CAC5B,UAA4B,EAC5B,IAAmB,EACnB,EAAsB,EACtB,KAAgB,EAChB,MAAc;IAEd,MAAM,WAAW,GAAG,IAAI,CAAC,CAAC,CAAC,IAAA,uBAAe,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC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I,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,KAAK,CAAC,CAAA;QACtF,CAAC;IACH,CAAC;IAED,OAAO,UAAU,CAAA;AACnB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import type { EtherscanERC1155Event, EtherscanERC20Event, EtherscanERC721Event, EtherscanInternalTransaction, EtherscanOperation } from '../types';
|
|
2
|
+
import type { BlockOperation } from '@ledgerhq/coin-module-framework/api/index';
|
|
3
|
+
import type { MemoNotSupported, Operation } from '@ledgerhq/coin-module-framework/api/types';
|
|
4
|
+
import BigNumber from 'bignumber.js';
|
|
5
5
|
/**
|
|
6
6
|
* Helper to safely convert a value to BigNumber, defaulting to 0 if invalid.
|
|
7
7
|
* Some explorers (e.g., Blockscout on Optimism) may return empty strings or
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"etherscan.d.ts","sourceRoot":"","sources":["../../src/adapters/etherscan.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"etherscan.d.ts","sourceRoot":"","sources":["../../src/adapters/etherscan.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,4BAA4B,EAC5B,kBAAkB,EACnB,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EACV,cAAc,EAEf,MAAM,2CAA2C,CAAA;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,2CAA2C,CAAA;AAC5F,OAAO,SAAS,MAAM,cAAc,CAAA;AAQpC;;;;GAIG;AACH,eAAO,MAAM,aAAa,GAAI,OAAO,MAAM,GAAG,SAAS,KAAG,SAMzD,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,GAAI,IAAI;IAAE,SAAS,CAAC,EAAE,MAAM,CAA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