@ledgerhq/live-common 21.5.1-btcjs.3 → 21.7.1
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/lib/__tests__/test-helpers/bridge.js +2 -2
- package/lib/__tests__/test-helpers/bridge.js.map +1 -1
- package/lib/account/addAccounts.d.ts.map +1 -1
- package/lib/account/addAccounts.js +1 -2
- package/lib/account/addAccounts.js.map +1 -1
- package/lib/account/formatters.js +2 -2
- package/lib/account/formatters.js.map +1 -1
- package/lib/account/support.d.ts.map +1 -1
- package/lib/account/support.js +1 -24
- package/lib/account/support.js.map +1 -1
- package/lib/api/explorerConfig/index.d.ts.map +1 -1
- package/lib/api/explorerConfig/index.js +0 -43
- package/lib/api/explorerConfig/index.js.map +1 -1
- package/lib/bot/engine.js +1 -1
- package/lib/bot/index.d.ts +1 -2
- package/lib/bot/index.d.ts.map +1 -1
- package/lib/bot/index.js +38 -21
- package/lib/bot/index.js.map +1 -1
- package/lib/bot/test.bot.js +1 -4
- package/lib/bot/test.bot.js.map +1 -1
- package/lib/bridge/jsHelpers.d.ts +2 -6
- package/lib/bridge/jsHelpers.d.ts.map +1 -1
- package/lib/bridge/jsHelpers.js +9 -22
- package/lib/bridge/jsHelpers.js.map +1 -1
- package/lib/cross.d.ts.map +1 -1
- package/lib/cross.js +2 -28
- package/lib/cross.js.map +1 -1
- package/lib/env.d.ts +10 -5
- package/lib/env.d.ts.map +1 -1
- package/lib/env.js +5 -0
- package/lib/env.js.map +1 -1
- package/lib/env.react.d.ts +1 -1
- package/lib/env.react.d.ts.map +1 -1
- package/lib/exchange/swap/getKYCStatus.d.ts.map +1 -1
- package/lib/exchange/swap/getKYCStatus.js +11 -5
- package/lib/exchange/swap/getKYCStatus.js.map +1 -1
- package/lib/exchange/swap/mock.d.ts +2 -1
- package/lib/exchange/swap/mock.d.ts.map +1 -1
- package/lib/exchange/swap/mock.js +15 -1
- package/lib/exchange/swap/mock.js.map +1 -1
- package/lib/families/bitcoin/account.d.ts.map +1 -1
- package/lib/families/bitcoin/account.js +2 -3
- package/lib/families/bitcoin/account.js.map +1 -1
- package/lib/families/bitcoin/datasets/bitcoin.js +6 -6
- package/lib/families/bitcoin/datasets/bitcoin.js.map +1 -1
- package/lib/families/bitcoin/datasets/litecoin.js +3 -3
- package/lib/families/bitcoin/datasets/litecoin.js.map +1 -1
- package/lib/families/bitcoin/serialization.d.ts +2 -2
- package/lib/families/bitcoin/serialization.d.ts.map +1 -1
- package/lib/families/bitcoin/serialization.js +4 -8
- package/lib/families/bitcoin/serialization.js.map +1 -1
- package/lib/families/bitcoin/specs.d.ts +2 -0
- package/lib/families/bitcoin/specs.d.ts.map +1 -1
- package/lib/families/bitcoin/specs.js +34 -28
- package/lib/families/bitcoin/specs.js.map +1 -1
- package/lib/families/bitcoin/speculos-deviceActions.js +2 -2
- package/lib/families/bitcoin/speculos-deviceActions.js.map +1 -1
- package/lib/families/bitcoin/test-dataset.js +1 -1
- package/lib/families/bitcoin/test-dataset.js.map +1 -1
- package/lib/families/bitcoin/transaction.d.ts +3 -3
- package/lib/families/bitcoin/transaction.d.ts.map +1 -1
- package/lib/families/bitcoin/transaction.js +61 -64
- package/lib/families/bitcoin/transaction.js.map +1 -1
- package/lib/families/bitcoin/types.d.ts +36 -66
- package/lib/families/bitcoin/types.d.ts.map +1 -1
- package/lib/families/bitcoin/types.js +1 -16
- package/lib/families/bitcoin/types.js.map +1 -1
- package/lib/families/crypto_org/js-synchronisation.d.ts.map +1 -1
- package/lib/families/crypto_org/js-synchronisation.js +5 -13
- package/lib/families/crypto_org/js-synchronisation.js.map +1 -1
- package/lib/families/elrond/js-synchronisation.d.ts.map +1 -1
- package/lib/families/elrond/js-synchronisation.js +4 -12
- package/lib/families/elrond/js-synchronisation.js.map +1 -1
- package/lib/families/elrond/logic.js +22 -3
- package/lib/families/elrond/logic.js.map +1 -1
- package/lib/families/elrond/test-dataset.d.ts.map +1 -1
- package/lib/families/elrond/test-dataset.js +79 -76
- package/lib/families/elrond/test-dataset.js.map +1 -1
- package/lib/families/ethereum/synchronisation.d.ts.map +1 -1
- package/lib/families/ethereum/synchronisation.js +5 -14
- package/lib/families/ethereum/synchronisation.js.map +1 -1
- package/lib/families/ethereum/test-dataset.d.ts.map +1 -1
- package/lib/families/ethereum/test-dataset.js +2 -3
- package/lib/families/ethereum/test-dataset.js.map +1 -1
- package/lib/families/polkadot/js-synchronisation.d.ts.map +1 -1
- package/lib/families/polkadot/js-synchronisation.js +4 -12
- package/lib/families/polkadot/js-synchronisation.js.map +1 -1
- package/lib/families/stellar/js-synchronization.d.ts.map +1 -1
- package/lib/families/stellar/js-synchronization.js +4 -12
- package/lib/families/stellar/js-synchronization.js.map +1 -1
- package/lib/families/tezos/synchronisation.d.ts.map +1 -1
- package/lib/families/tezos/synchronisation.js +7 -19
- package/lib/families/tezos/synchronisation.js.map +1 -1
- package/lib/generated/bridge/js.d.ts +0 -4
- package/lib/generated/bridge/js.d.ts.map +1 -1
- package/lib/generated/bridge/js.js +18 -20
- package/lib/generated/bridge/js.js.map +1 -1
- package/lib/generated/specs.d.ts +2 -0
- package/lib/generated/specs.d.ts.map +1 -1
- package/lib/migrations/accounts-dataset.d.ts.map +1 -1
- package/lib/migrations/accounts-dataset.js +2 -4
- package/lib/migrations/accounts-dataset.js.map +1 -1
- package/lib/migrations/accounts.d.ts.map +1 -1
- package/lib/migrations/accounts.js +0 -17
- package/lib/migrations/accounts.js.map +1 -1
- package/lib/mock/account.d.ts.map +1 -1
- package/lib/mock/account.js +1 -2
- package/lib/mock/account.js.map +1 -1
- package/lib/network.d.ts +3 -1
- package/lib/network.d.ts.map +1 -1
- package/lib/network.js +2 -13
- package/lib/network.js.map +1 -1
- package/package.json +2 -30
- package/src/.DS_Store +0 -0
- package/src/__tests__/.DS_Store +0 -0
- package/src/__tests__/__snapshots__/.DS_Store +0 -0
- package/src/__tests__/__snapshots__/all.libcore.ts.snap +27169 -487
- package/src/__tests__/__snapshots__/portfolio.v2.ts.snap +0 -3
- package/src/__tests__/test-helpers/bridge.ts +2 -2
- package/src/account/addAccounts.ts +1 -2
- package/src/account/formatters.ts +2 -2
- package/src/account/support.ts +1 -24
- package/src/api/explorerConfig/index.ts +4 -35
- package/src/bot/engine.ts +1 -1
- package/src/bot/index.ts +25 -10
- package/src/bot/test.bot.ts +1 -6
- package/src/bridge/jsHelpers.ts +8 -37
- package/src/cross.ts +2 -30
- package/src/env.ts +5 -0
- package/src/exchange/swap/getKYCStatus.ts +5 -1
- package/src/exchange/swap/mock.ts +11 -0
- package/src/families/bitcoin/account.ts +1 -2
- package/src/families/bitcoin/datasets/bitcoin.ts +6 -6
- package/src/families/bitcoin/datasets/litecoin.ts +6 -6
- package/src/families/bitcoin/serialization.ts +0 -6
- package/src/families/bitcoin/specs.ts +36 -28
- package/src/families/bitcoin/speculos-deviceActions.ts +1 -1
- package/src/families/bitcoin/test-dataset.ts +1 -1
- package/src/families/bitcoin/transaction.ts +93 -98
- package/src/families/bitcoin/types.ts +37 -95
- package/src/families/crypto_org/js-synchronisation.ts +4 -22
- package/src/families/elrond/js-synchronisation.ts +3 -11
- package/src/families/elrond/logic.ts +1 -1
- package/src/families/elrond/test-dataset.ts +89 -84
- package/src/families/ethereum/synchronisation.ts +4 -13
- package/src/families/ethereum/test-dataset.ts +2 -3
- package/src/families/polkadot/js-synchronisation.ts +3 -11
- package/src/families/stellar/js-synchronization.ts +4 -12
- package/src/families/tezos/synchronisation.ts +3 -15
- package/src/generated/bridge/js.ts +0 -3
- package/src/migrations/accounts-dataset.ts +0 -3
- package/src/migrations/accounts.ts +0 -18
- package/src/mock/account.ts +0 -2
- package/src/network.ts +9 -10
- package/lib/__tests__/families/bitcoin/logic.d.ts +0 -2
- package/lib/__tests__/families/bitcoin/logic.d.ts.map +0 -1
- package/lib/__tests__/families/bitcoin/logic.js +0 -39
- package/lib/__tests__/families/bitcoin/logic.js.map +0 -1
- package/lib/__tests__/families/bitcoin/wallet-btc/bitcoin.test.d.ts +0 -2
- package/lib/__tests__/families/bitcoin/wallet-btc/bitcoin.test.d.ts.map +0 -1
- package/lib/__tests__/families/bitcoin/wallet-btc/bitcoin.test.js +0 -85
- package/lib/__tests__/families/bitcoin/wallet-btc/bitcoin.test.js.map +0 -1
- package/lib/__tests__/families/bitcoin/wallet-btc/utils.test.d.ts +0 -2
- package/lib/__tests__/families/bitcoin/wallet-btc/utils.test.d.ts.map +0 -1
- package/lib/__tests__/families/bitcoin/wallet-btc/utils.test.js +0 -134
- package/lib/__tests__/families/bitcoin/wallet-btc/utils.test.js.map +0 -1
- package/lib/__tests__/families/bitcoin/wallet-btc/wallet.estimateMaxSpendable.test.d.ts +0 -2
- package/lib/__tests__/families/bitcoin/wallet-btc/wallet.estimateMaxSpendable.test.d.ts.map +0 -1
- package/lib/__tests__/families/bitcoin/wallet-btc/wallet.estimateMaxSpendable.test.js +0 -119
- package/lib/__tests__/families/bitcoin/wallet-btc/wallet.estimateMaxSpendable.test.js.map +0 -1
- package/lib/__tests__/families/bitcoin/wallet-btc/wallet.integration.test.d.ts +0 -2
- package/lib/__tests__/families/bitcoin/wallet-btc/wallet.integration.test.d.ts.map +0 -1
- package/lib/__tests__/families/bitcoin/wallet-btc/wallet.integration.test.js +0 -196
- package/lib/__tests__/families/bitcoin/wallet-btc/wallet.integration.test.js.map +0 -1
- package/lib/__tests__/families/bitcoin/wallet-btc/xpub.pickingStrategies.integration.test.d.ts +0 -2
- package/lib/__tests__/families/bitcoin/wallet-btc/xpub.pickingStrategies.integration.test.d.ts.map +0 -1
- package/lib/__tests__/families/bitcoin/wallet-btc/xpub.pickingStrategies.integration.test.js +0 -376
- package/lib/__tests__/families/bitcoin/wallet-btc/xpub.pickingStrategies.integration.test.js.map +0 -1
- package/lib/__tests__/families/bitcoin/wallet-btc/xpub.reorg.integration.test.d.ts +0 -2
- package/lib/__tests__/families/bitcoin/wallet-btc/xpub.reorg.integration.test.d.ts.map +0 -1
- package/lib/__tests__/families/bitcoin/wallet-btc/xpub.reorg.integration.test.js +0 -250
- package/lib/__tests__/families/bitcoin/wallet-btc/xpub.reorg.integration.test.js.map +0 -1
- package/lib/__tests__/families/bitcoin/wallet-btc/xpub.synced.unit.test.d.ts +0 -2
- package/lib/__tests__/families/bitcoin/wallet-btc/xpub.synced.unit.test.d.ts.map +0 -1
- package/lib/__tests__/families/bitcoin/wallet-btc/xpub.synced.unit.test.js +0 -128
- package/lib/__tests__/families/bitcoin/wallet-btc/xpub.synced.unit.test.js.map +0 -1
- package/lib/__tests__/families/bitcoin/wallet-btc/xpub.syncing.integration.test.d.ts +0 -2
- package/lib/__tests__/families/bitcoin/wallet-btc/xpub.syncing.integration.test.d.ts.map +0 -1
- package/lib/__tests__/families/bitcoin/wallet-btc/xpub.syncing.integration.test.js +0 -396
- package/lib/__tests__/families/bitcoin/wallet-btc/xpub.syncing.integration.test.js.map +0 -1
- package/lib/__tests__/families/bitcoin/wallet-btc/xpub.txs.NP2WPKH.integration.test.d.ts +0 -2
- package/lib/__tests__/families/bitcoin/wallet-btc/xpub.txs.NP2WPKH.integration.test.d.ts.map +0 -1
- package/lib/__tests__/families/bitcoin/wallet-btc/xpub.txs.NP2WPKH.integration.test.js +0 -286
- package/lib/__tests__/families/bitcoin/wallet-btc/xpub.txs.NP2WPKH.integration.test.js.map +0 -1
- package/lib/__tests__/families/bitcoin/wallet-btc/xpub.txs.P2WPKH.integration.test.d.ts +0 -2
- package/lib/__tests__/families/bitcoin/wallet-btc/xpub.txs.P2WPKH.integration.test.d.ts.map +0 -1
- package/lib/__tests__/families/bitcoin/wallet-btc/xpub.txs.P2WPKH.integration.test.js +0 -276
- package/lib/__tests__/families/bitcoin/wallet-btc/xpub.txs.P2WPKH.integration.test.js.map +0 -1
- package/lib/__tests__/families/bitcoin/wallet-btc/xpub.txs.integration.test.d.ts +0 -2
- package/lib/__tests__/families/bitcoin/wallet-btc/xpub.txs.integration.test.d.ts.map +0 -1
- package/lib/__tests__/families/bitcoin/wallet-btc/xpub.txs.integration.test.js +0 -414
- package/lib/__tests__/families/bitcoin/wallet-btc/xpub.txs.integration.test.js.map +0 -1
- package/lib/__tests__/families/bitcoin/wallet-btc/xpub.txs.litecoin.test.d.ts +0 -2
- package/lib/__tests__/families/bitcoin/wallet-btc/xpub.txs.litecoin.test.d.ts.map +0 -1
- package/lib/__tests__/families/bitcoin/wallet-btc/xpub.txs.litecoin.test.js +0 -269
- package/lib/__tests__/families/bitcoin/wallet-btc/xpub.txs.litecoin.test.js.map +0 -1
- package/lib/families/bitcoin/bridge/js.d.ts +0 -8
- package/lib/families/bitcoin/bridge/js.d.ts.map +0 -1
- package/lib/families/bitcoin/bridge/js.js +0 -149
- package/lib/families/bitcoin/bridge/js.js.map +0 -1
- package/lib/families/bitcoin/cache.d.ts +0 -28
- package/lib/families/bitcoin/cache.d.ts.map +0 -1
- package/lib/families/bitcoin/cache.js +0 -109
- package/lib/families/bitcoin/cache.js.map +0 -1
- package/lib/families/bitcoin/getAccountNetworkInfo.d.ts +0 -6
- package/lib/families/bitcoin/getAccountNetworkInfo.d.ts.map +0 -1
- package/lib/families/bitcoin/getAccountNetworkInfo.js +0 -124
- package/lib/families/bitcoin/getAccountNetworkInfo.js.map +0 -1
- package/lib/families/bitcoin/getAccountNetworkInfo.test.d.ts +0 -2
- package/lib/families/bitcoin/getAccountNetworkInfo.test.d.ts.map +0 -1
- package/lib/families/bitcoin/getAccountNetworkInfo.test.js +0 -71
- package/lib/families/bitcoin/getAccountNetworkInfo.test.js.map +0 -1
- package/lib/families/bitcoin/js-broadcast.d.ts +0 -11
- package/lib/families/bitcoin/js-broadcast.d.ts.map +0 -1
- package/lib/families/bitcoin/js-broadcast.js +0 -73
- package/lib/families/bitcoin/js-broadcast.js.map +0 -1
- package/lib/families/bitcoin/js-buildTransaction.d.ts +0 -5
- package/lib/families/bitcoin/js-buildTransaction.d.ts.map +0 -1
- package/lib/families/bitcoin/js-buildTransaction.js +0 -106
- package/lib/families/bitcoin/js-buildTransaction.js.map +0 -1
- package/lib/families/bitcoin/js-createTransaction.d.ts +0 -9
- package/lib/families/bitcoin/js-createTransaction.d.ts.map +0 -1
- package/lib/families/bitcoin/js-createTransaction.js +0 -27
- package/lib/families/bitcoin/js-createTransaction.js.map +0 -1
- package/lib/families/bitcoin/js-estimateMaxSpendable.d.ts +0 -15
- package/lib/families/bitcoin/js-estimateMaxSpendable.d.ts.map +0 -1
- package/lib/families/bitcoin/js-estimateMaxSpendable.js +0 -95
- package/lib/families/bitcoin/js-estimateMaxSpendable.js.map +0 -1
- package/lib/families/bitcoin/js-getFeesForTransaction.d.ts +0 -26
- package/lib/families/bitcoin/js-getFeesForTransaction.d.ts.map +0 -1
- package/lib/families/bitcoin/js-getFeesForTransaction.js +0 -100
- package/lib/families/bitcoin/js-getFeesForTransaction.js.map +0 -1
- package/lib/families/bitcoin/js-getTransactionStatus.d.ts +0 -5
- package/lib/families/bitcoin/js-getTransactionStatus.d.ts.map +0 -1
- package/lib/families/bitcoin/js-getTransactionStatus.js +0 -131
- package/lib/families/bitcoin/js-getTransactionStatus.js.map +0 -1
- package/lib/families/bitcoin/js-prepareTransaction.d.ts +0 -5
- package/lib/families/bitcoin/js-prepareTransaction.d.ts.map +0 -1
- package/lib/families/bitcoin/js-prepareTransaction.js +0 -80
- package/lib/families/bitcoin/js-prepareTransaction.js.map +0 -1
- package/lib/families/bitcoin/js-signOperation.d.ts +0 -10
- package/lib/families/bitcoin/js-signOperation.d.ts.map +0 -1
- package/lib/families/bitcoin/js-signOperation.js +0 -212
- package/lib/families/bitcoin/js-signOperation.js.map +0 -1
- package/lib/families/bitcoin/js-synchronisation.d.ts +0 -10
- package/lib/families/bitcoin/js-synchronisation.d.ts.map +0 -1
- package/lib/families/bitcoin/js-synchronisation.js +0 -431
- package/lib/families/bitcoin/js-synchronisation.js.map +0 -1
- package/lib/families/bitcoin/logic.d.ts +0 -34
- package/lib/families/bitcoin/logic.d.ts.map +0 -1
- package/lib/families/bitcoin/logic.js +0 -290
- package/lib/families/bitcoin/logic.js.map +0 -1
- package/lib/families/bitcoin/networks.d.ts +0 -3
- package/lib/families/bitcoin/networks.d.ts.map +0 -1
- package/lib/families/bitcoin/networks.js +0 -379
- package/lib/families/bitcoin/networks.js.map +0 -1
- package/lib/families/bitcoin/wallet-btc/account.d.ts +0 -35
- package/lib/families/bitcoin/wallet-btc/account.d.ts.map +0 -1
- package/lib/families/bitcoin/wallet-btc/account.js +0 -3
- package/lib/families/bitcoin/wallet-btc/account.js.map +0 -1
- package/lib/families/bitcoin/wallet-btc/crypto/base.d.ts +0 -19
- package/lib/families/bitcoin/wallet-btc/crypto/base.d.ts.map +0 -1
- package/lib/families/bitcoin/wallet-btc/crypto/base.js +0 -136
- package/lib/families/bitcoin/wallet-btc/crypto/base.js.map +0 -1
- package/lib/families/bitcoin/wallet-btc/crypto/bitcoin.d.ts +0 -10
- package/lib/families/bitcoin/wallet-btc/crypto/bitcoin.d.ts.map +0 -1
- package/lib/families/bitcoin/wallet-btc/crypto/bitcoin.js +0 -177
- package/lib/families/bitcoin/wallet-btc/crypto/bitcoin.js.map +0 -1
- package/lib/families/bitcoin/wallet-btc/crypto/bitcoincash.d.ts +0 -16
- package/lib/families/bitcoin/wallet-btc/crypto/bitcoincash.d.ts.map +0 -1
- package/lib/families/bitcoin/wallet-btc/crypto/bitcoincash.js +0 -84
- package/lib/families/bitcoin/wallet-btc/crypto/bitcoincash.js.map +0 -1
- package/lib/families/bitcoin/wallet-btc/crypto/bitcoingold.d.ts +0 -8
- package/lib/families/bitcoin/wallet-btc/crypto/bitcoingold.d.ts.map +0 -1
- package/lib/families/bitcoin/wallet-btc/crypto/bitcoingold.js +0 -36
- package/lib/families/bitcoin/wallet-btc/crypto/bitcoingold.js.map +0 -1
- package/lib/families/bitcoin/wallet-btc/crypto/dash.d.ts +0 -8
- package/lib/families/bitcoin/wallet-btc/crypto/dash.d.ts.map +0 -1
- package/lib/families/bitcoin/wallet-btc/crypto/dash.js +0 -44
- package/lib/families/bitcoin/wallet-btc/crypto/dash.js.map +0 -1
- package/lib/families/bitcoin/wallet-btc/crypto/digibyte.d.ts +0 -9
- package/lib/families/bitcoin/wallet-btc/crypto/digibyte.d.ts.map +0 -1
- package/lib/families/bitcoin/wallet-btc/crypto/digibyte.js +0 -56
- package/lib/families/bitcoin/wallet-btc/crypto/digibyte.js.map +0 -1
- package/lib/families/bitcoin/wallet-btc/crypto/doge.d.ts +0 -8
- package/lib/families/bitcoin/wallet-btc/crypto/doge.d.ts.map +0 -1
- package/lib/families/bitcoin/wallet-btc/crypto/doge.js +0 -36
- package/lib/families/bitcoin/wallet-btc/crypto/doge.js.map +0 -1
- package/lib/families/bitcoin/wallet-btc/crypto/factory.d.ts +0 -3
- package/lib/families/bitcoin/wallet-btc/crypto/factory.d.ts.map +0 -1
- package/lib/families/bitcoin/wallet-btc/crypto/factory.js +0 -130
- package/lib/families/bitcoin/wallet-btc/crypto/factory.js.map +0 -1
- package/lib/families/bitcoin/wallet-btc/crypto/index.d.ts +0 -18
- package/lib/families/bitcoin/wallet-btc/crypto/index.d.ts.map +0 -1
- package/lib/families/bitcoin/wallet-btc/crypto/index.js +0 -45
- package/lib/families/bitcoin/wallet-btc/crypto/index.js.map +0 -1
- package/lib/families/bitcoin/wallet-btc/crypto/komodo.d.ts +0 -8
- package/lib/families/bitcoin/wallet-btc/crypto/komodo.d.ts.map +0 -1
- package/lib/families/bitcoin/wallet-btc/crypto/komodo.js +0 -39
- package/lib/families/bitcoin/wallet-btc/crypto/komodo.js.map +0 -1
- package/lib/families/bitcoin/wallet-btc/crypto/litecoin.d.ts +0 -19
- package/lib/families/bitcoin/wallet-btc/crypto/litecoin.d.ts.map +0 -1
- package/lib/families/bitcoin/wallet-btc/crypto/litecoin.js +0 -135
- package/lib/families/bitcoin/wallet-btc/crypto/litecoin.js.map +0 -1
- package/lib/families/bitcoin/wallet-btc/crypto/peercoin.d.ts +0 -8
- package/lib/families/bitcoin/wallet-btc/crypto/peercoin.d.ts.map +0 -1
- package/lib/families/bitcoin/wallet-btc/crypto/peercoin.js +0 -38
- package/lib/families/bitcoin/wallet-btc/crypto/peercoin.js.map +0 -1
- package/lib/families/bitcoin/wallet-btc/crypto/pivx.d.ts +0 -8
- package/lib/families/bitcoin/wallet-btc/crypto/pivx.d.ts.map +0 -1
- package/lib/families/bitcoin/wallet-btc/crypto/pivx.js +0 -40
- package/lib/families/bitcoin/wallet-btc/crypto/pivx.js.map +0 -1
- package/lib/families/bitcoin/wallet-btc/crypto/qtum.d.ts +0 -8
- package/lib/families/bitcoin/wallet-btc/crypto/qtum.d.ts.map +0 -1
- package/lib/families/bitcoin/wallet-btc/crypto/qtum.js +0 -36
- package/lib/families/bitcoin/wallet-btc/crypto/qtum.js.map +0 -1
- package/lib/families/bitcoin/wallet-btc/crypto/stakenet.d.ts +0 -8
- package/lib/families/bitcoin/wallet-btc/crypto/stakenet.d.ts.map +0 -1
- package/lib/families/bitcoin/wallet-btc/crypto/stakenet.js +0 -40
- package/lib/families/bitcoin/wallet-btc/crypto/stakenet.js.map +0 -1
- package/lib/families/bitcoin/wallet-btc/crypto/stealth.d.ts +0 -8
- package/lib/families/bitcoin/wallet-btc/crypto/stealth.d.ts.map +0 -1
- package/lib/families/bitcoin/wallet-btc/crypto/stealth.js +0 -40
- package/lib/families/bitcoin/wallet-btc/crypto/stealth.js.map +0 -1
- package/lib/families/bitcoin/wallet-btc/crypto/stratis.d.ts +0 -8
- package/lib/families/bitcoin/wallet-btc/crypto/stratis.d.ts.map +0 -1
- package/lib/families/bitcoin/wallet-btc/crypto/stratis.js +0 -37
- package/lib/families/bitcoin/wallet-btc/crypto/stratis.js.map +0 -1
- package/lib/families/bitcoin/wallet-btc/crypto/types.d.ts +0 -15
- package/lib/families/bitcoin/wallet-btc/crypto/types.d.ts.map +0 -1
- package/lib/families/bitcoin/wallet-btc/crypto/types.js +0 -3
- package/lib/families/bitcoin/wallet-btc/crypto/types.js.map +0 -1
- package/lib/families/bitcoin/wallet-btc/crypto/via.d.ts +0 -8
- package/lib/families/bitcoin/wallet-btc/crypto/via.d.ts.map +0 -1
- package/lib/families/bitcoin/wallet-btc/crypto/via.js +0 -36
- package/lib/families/bitcoin/wallet-btc/crypto/via.js.map +0 -1
- package/lib/families/bitcoin/wallet-btc/crypto/vtc.d.ts +0 -8
- package/lib/families/bitcoin/wallet-btc/crypto/vtc.d.ts.map +0 -1
- package/lib/families/bitcoin/wallet-btc/crypto/vtc.js +0 -36
- package/lib/families/bitcoin/wallet-btc/crypto/vtc.js.map +0 -1
- package/lib/families/bitcoin/wallet-btc/crypto/zec.d.ts +0 -18
- package/lib/families/bitcoin/wallet-btc/crypto/zec.d.ts.map +0 -1
- package/lib/families/bitcoin/wallet-btc/crypto/zec.js +0 -72
- package/lib/families/bitcoin/wallet-btc/crypto/zec.js.map +0 -1
- package/lib/families/bitcoin/wallet-btc/crypto/zen.d.ts +0 -18
- package/lib/families/bitcoin/wallet-btc/crypto/zen.d.ts.map +0 -1
- package/lib/families/bitcoin/wallet-btc/crypto/zen.js +0 -97
- package/lib/families/bitcoin/wallet-btc/crypto/zen.js.map +0 -1
- package/lib/families/bitcoin/wallet-btc/explorer/index.d.ts +0 -31
- package/lib/families/bitcoin/wallet-btc/explorer/index.d.ts.map +0 -1
- package/lib/families/bitcoin/wallet-btc/explorer/index.js +0 -393
- package/lib/families/bitcoin/wallet-btc/explorer/index.js.map +0 -1
- package/lib/families/bitcoin/wallet-btc/explorer/types.d.ts +0 -13
- package/lib/families/bitcoin/wallet-btc/explorer/types.d.ts.map +0 -1
- package/lib/families/bitcoin/wallet-btc/explorer/types.js +0 -3
- package/lib/families/bitcoin/wallet-btc/explorer/types.js.map +0 -1
- package/lib/families/bitcoin/wallet-btc/index.d.ts +0 -15
- package/lib/families/bitcoin/wallet-btc/index.d.ts.map +0 -1
- package/lib/families/bitcoin/wallet-btc/index.js +0 -80
- package/lib/families/bitcoin/wallet-btc/index.js.map +0 -1
- package/lib/families/bitcoin/wallet-btc/pickingstrategies/CoinSelect.d.ts +0 -13
- package/lib/families/bitcoin/wallet-btc/pickingstrategies/CoinSelect.d.ts.map +0 -1
- package/lib/families/bitcoin/wallet-btc/pickingstrategies/CoinSelect.js +0 -237
- package/lib/families/bitcoin/wallet-btc/pickingstrategies/CoinSelect.js.map +0 -1
- package/lib/families/bitcoin/wallet-btc/pickingstrategies/DeepFirst.d.ts +0 -13
- package/lib/families/bitcoin/wallet-btc/pickingstrategies/DeepFirst.d.ts.map +0 -1
- package/lib/families/bitcoin/wallet-btc/pickingstrategies/DeepFirst.js +0 -146
- package/lib/families/bitcoin/wallet-btc/pickingstrategies/DeepFirst.js.map +0 -1
- package/lib/families/bitcoin/wallet-btc/pickingstrategies/Merge.d.ts +0 -13
- package/lib/families/bitcoin/wallet-btc/pickingstrategies/Merge.d.ts.map +0 -1
- package/lib/families/bitcoin/wallet-btc/pickingstrategies/Merge.js +0 -146
- package/lib/families/bitcoin/wallet-btc/pickingstrategies/Merge.js.map +0 -1
- package/lib/families/bitcoin/wallet-btc/pickingstrategies/types.d.ts +0 -23
- package/lib/families/bitcoin/wallet-btc/pickingstrategies/types.d.ts.map +0 -1
- package/lib/families/bitcoin/wallet-btc/pickingstrategies/types.js +0 -13
- package/lib/families/bitcoin/wallet-btc/pickingstrategies/types.js.map +0 -1
- package/lib/families/bitcoin/wallet-btc/storage/index.d.ts +0 -58
- package/lib/families/bitcoin/wallet-btc/storage/index.d.ts.map +0 -1
- package/lib/families/bitcoin/wallet-btc/storage/index.js +0 -228
- package/lib/families/bitcoin/wallet-btc/storage/index.js.map +0 -1
- package/lib/families/bitcoin/wallet-btc/storage/mock.d.ts +0 -58
- package/lib/families/bitcoin/wallet-btc/storage/mock.d.ts.map +0 -1
- package/lib/families/bitcoin/wallet-btc/storage/mock.js +0 -228
- package/lib/families/bitcoin/wallet-btc/storage/mock.js.map +0 -1
- package/lib/families/bitcoin/wallet-btc/storage/types.d.ts +0 -63
- package/lib/families/bitcoin/wallet-btc/storage/types.d.ts.map +0 -1
- package/lib/families/bitcoin/wallet-btc/storage/types.js +0 -3
- package/lib/families/bitcoin/wallet-btc/storage/types.js.map +0 -1
- package/lib/families/bitcoin/wallet-btc/types.d.ts +0 -25
- package/lib/families/bitcoin/wallet-btc/types.d.ts.map +0 -1
- package/lib/families/bitcoin/wallet-btc/types.js +0 -10
- package/lib/families/bitcoin/wallet-btc/types.js.map +0 -1
- package/lib/families/bitcoin/wallet-btc/utils/eventemitter.d.ts +0 -6
- package/lib/families/bitcoin/wallet-btc/utils/eventemitter.d.ts.map +0 -1
- package/lib/families/bitcoin/wallet-btc/utils/eventemitter.js +0 -64
- package/lib/families/bitcoin/wallet-btc/utils/eventemitter.js.map +0 -1
- package/lib/families/bitcoin/wallet-btc/utils.d.ts +0 -12
- package/lib/families/bitcoin/wallet-btc/utils.d.ts.map +0 -1
- package/lib/families/bitcoin/wallet-btc/utils.js +0 -166
- package/lib/families/bitcoin/wallet-btc/utils.js.map +0 -1
- package/lib/families/bitcoin/wallet-btc/wallet.d.ts +0 -73
- package/lib/families/bitcoin/wallet-btc/wallet.d.ts.map +0 -1
- package/lib/families/bitcoin/wallet-btc/wallet.js +0 -464
- package/lib/families/bitcoin/wallet-btc/wallet.js.map +0 -1
- package/lib/families/bitcoin/wallet-btc/xpub.d.ts +0 -55
- package/lib/families/bitcoin/wallet-btc/xpub.d.ts.map +0 -1
- package/lib/families/bitcoin/wallet-btc/xpub.js +0 -585
- package/lib/families/bitcoin/wallet-btc/xpub.js.map +0 -1
- package/lib/mock/Btc.d.ts +0 -16
- package/lib/mock/Btc.d.ts.map +0 -1
- package/lib/mock/Btc.js +0 -104
- package/lib/mock/Btc.js.map +0 -1
- package/src/__tests__/families/bitcoin/logic.ts +0 -40
- package/src/__tests__/families/bitcoin/wallet-btc/bitcoin.test.ts +0 -83
- package/src/__tests__/families/bitcoin/wallet-btc/utils.test.ts +0 -210
- package/src/__tests__/families/bitcoin/wallet-btc/wallet.estimateMaxSpendable.test.ts +0 -56
- package/src/__tests__/families/bitcoin/wallet-btc/wallet.integration.test.ts +0 -107
- package/src/__tests__/families/bitcoin/wallet-btc/xpub.pickingStrategies.integration.test.ts +0 -366
- package/src/__tests__/families/bitcoin/wallet-btc/xpub.reorg.integration.test.ts +0 -135
- package/src/__tests__/families/bitcoin/wallet-btc/xpub.synced.unit.test.ts +0 -74
- package/src/__tests__/families/bitcoin/wallet-btc/xpub.syncing.integration.test.ts +0 -330
- package/src/__tests__/families/bitcoin/wallet-btc/xpub.txs.NP2WPKH.integration.test.ts +0 -193
- package/src/__tests__/families/bitcoin/wallet-btc/xpub.txs.P2WPKH.integration.test.ts +0 -183
- package/src/__tests__/families/bitcoin/wallet-btc/xpub.txs.integration.test.ts +0 -294
- package/src/__tests__/families/bitcoin/wallet-btc/xpub.txs.litecoin.test.ts +0 -167
- package/src/families/bitcoin/bridge/js.ts +0 -76
- package/src/families/bitcoin/cache.ts +0 -76
- package/src/families/bitcoin/getAccountNetworkInfo.test.ts +0 -27
- package/src/families/bitcoin/getAccountNetworkInfo.ts +0 -61
- package/src/families/bitcoin/js-broadcast.ts +0 -26
- package/src/families/bitcoin/js-buildTransaction.ts +0 -57
- package/src/families/bitcoin/js-createTransaction.ts +0 -27
- package/src/families/bitcoin/js-estimateMaxSpendable.ts +0 -36
- package/src/families/bitcoin/js-getFeesForTransaction.ts +0 -59
- package/src/families/bitcoin/js-getTransactionStatus.ts +0 -118
- package/src/families/bitcoin/js-prepareTransaction.ts +0 -35
- package/src/families/bitcoin/js-signOperation.ts +0 -164
- package/src/families/bitcoin/js-synchronisation.ts +0 -388
- package/src/families/bitcoin/logic.ts +0 -251
- package/src/families/bitcoin/networks.ts +0 -360
- package/src/families/bitcoin/wallet-btc/account.ts +0 -42
- package/src/families/bitcoin/wallet-btc/crypto/base.ts +0 -131
- package/src/families/bitcoin/wallet-btc/crypto/bitcoin.ts +0 -147
- package/src/families/bitcoin/wallet-btc/crypto/bitcoincash.ts +0 -78
- package/src/families/bitcoin/wallet-btc/crypto/bitcoingold.ts +0 -13
- package/src/families/bitcoin/wallet-btc/crypto/dash.ts +0 -21
- package/src/families/bitcoin/wallet-btc/crypto/digibyte.ts +0 -34
- package/src/families/bitcoin/wallet-btc/crypto/doge.ts +0 -13
- package/src/families/bitcoin/wallet-btc/crypto/factory.ts +0 -106
- package/src/families/bitcoin/wallet-btc/crypto/index.ts +0 -17
- package/src/families/bitcoin/wallet-btc/crypto/komodo.ts +0 -16
- package/src/families/bitcoin/wallet-btc/crypto/litecoin.ts +0 -113
- package/src/families/bitcoin/wallet-btc/crypto/peercoin.ts +0 -15
- package/src/families/bitcoin/wallet-btc/crypto/pivx.ts +0 -17
- package/src/families/bitcoin/wallet-btc/crypto/qtum.ts +0 -13
- package/src/families/bitcoin/wallet-btc/crypto/stakenet.ts +0 -17
- package/src/families/bitcoin/wallet-btc/crypto/stealth.ts +0 -17
- package/src/families/bitcoin/wallet-btc/crypto/stratis.ts +0 -14
- package/src/families/bitcoin/wallet-btc/crypto/types.ts +0 -42
- package/src/families/bitcoin/wallet-btc/crypto/via.ts +0 -13
- package/src/families/bitcoin/wallet-btc/crypto/vtc.ts +0 -13
- package/src/families/bitcoin/wallet-btc/crypto/zec.ts +0 -85
- package/src/families/bitcoin/wallet-btc/crypto/zen.ts +0 -112
- package/src/families/bitcoin/wallet-btc/explorer/index.ts +0 -305
- package/src/families/bitcoin/wallet-btc/explorer/types.ts +0 -20
- package/src/families/bitcoin/wallet-btc/index.ts +0 -54
- package/src/families/bitcoin/wallet-btc/pickingstrategies/CoinSelect.ts +0 -229
- package/src/families/bitcoin/wallet-btc/pickingstrategies/DeepFirst.ts +0 -81
- package/src/families/bitcoin/wallet-btc/pickingstrategies/Merge.ts +0 -81
- package/src/families/bitcoin/wallet-btc/pickingstrategies/types.ts +0 -41
- package/src/families/bitcoin/wallet-btc/storage/index.ts +0 -186
- package/src/families/bitcoin/wallet-btc/storage/mock.ts +0 -186
- package/src/families/bitcoin/wallet-btc/storage/types.ts +0 -66
- package/src/families/bitcoin/wallet-btc/types.ts +0 -26
- package/src/families/bitcoin/wallet-btc/utils/eventemitter.ts +0 -9
- package/src/families/bitcoin/wallet-btc/utils.ts +0 -153
- package/src/families/bitcoin/wallet-btc/wallet.ts +0 -396
- package/src/families/bitcoin/wallet-btc/xpub.ts +0 -470
- package/src/mock/Btc.ts +0 -47
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import type { Account } from "../../types";
|
|
2
|
-
import { encodeAccountId } from "../../account";
|
|
3
2
|
import type { GetAccountShape } from "../../bridge/jsHelpers";
|
|
4
3
|
import { makeSync, makeScanAccounts, mergeOps } from "../../bridge/jsHelpers";
|
|
5
4
|
import { getAccount, getOperations } from "./api";
|
|
6
5
|
|
|
7
6
|
const getAccountShape: GetAccountShape = async (info) => {
|
|
8
|
-
const { address, initialAccount, currency
|
|
7
|
+
const { id, address, initialAccount, currency } = info;
|
|
9
8
|
const oldOperations = initialAccount?.operations || [];
|
|
10
9
|
const {
|
|
11
10
|
blockHeight,
|
|
@@ -15,36 +14,19 @@ const getAccountShape: GetAccountShape = async (info) => {
|
|
|
15
14
|
unbondingBalance,
|
|
16
15
|
commissions,
|
|
17
16
|
} = await getAccount(address, currency.id);
|
|
18
|
-
const accountId = encodeAccountId({
|
|
19
|
-
type: "js",
|
|
20
|
-
version: "2",
|
|
21
|
-
currencyId: currency.id,
|
|
22
|
-
xpubOrAddress: address,
|
|
23
|
-
derivationMode,
|
|
24
|
-
});
|
|
25
17
|
// Merge new operations with the previously synced ones
|
|
26
18
|
let startAt = 0;
|
|
27
19
|
let maxIteration = 20;
|
|
28
20
|
let operations = oldOperations;
|
|
29
|
-
let newOperations = await getOperations(
|
|
30
|
-
accountId,
|
|
31
|
-
address,
|
|
32
|
-
startAt++,
|
|
33
|
-
currency.id
|
|
34
|
-
);
|
|
21
|
+
let newOperations = await getOperations(id, address, startAt++, currency.id);
|
|
35
22
|
|
|
36
23
|
do {
|
|
37
24
|
operations = mergeOps(operations, newOperations);
|
|
38
|
-
newOperations = await getOperations(
|
|
39
|
-
accountId,
|
|
40
|
-
address,
|
|
41
|
-
startAt++,
|
|
42
|
-
currency.id
|
|
43
|
-
);
|
|
25
|
+
newOperations = await getOperations(id, address, startAt++, currency.id);
|
|
44
26
|
} while (--maxIteration && newOperations.length != 0);
|
|
45
27
|
|
|
46
28
|
const shape = {
|
|
47
|
-
id
|
|
29
|
+
id,
|
|
48
30
|
balance,
|
|
49
31
|
spendableBalance: balance,
|
|
50
32
|
operationsCount: operations.length,
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
import type { Account } from "../../types";
|
|
2
|
-
import { encodeAccountId } from "../../account";
|
|
3
2
|
import type { GetAccountShape } from "../../bridge/jsHelpers";
|
|
4
3
|
import { makeSync, makeScanAccounts, mergeOps } from "../../bridge/jsHelpers";
|
|
5
4
|
import { getAccount, getOperations } from "./api";
|
|
6
5
|
|
|
7
6
|
const getAccountShape: GetAccountShape = async (info) => {
|
|
8
|
-
const { address, initialAccount
|
|
9
|
-
const accountId = encodeAccountId({
|
|
10
|
-
type: "js",
|
|
11
|
-
version: "2",
|
|
12
|
-
currencyId: currency.id,
|
|
13
|
-
xpubOrAddress: address,
|
|
14
|
-
derivationMode,
|
|
15
|
-
});
|
|
7
|
+
const { id, address, initialAccount } = info;
|
|
16
8
|
const oldOperations = initialAccount?.operations || [];
|
|
17
9
|
// Needed for incremental synchronisation
|
|
18
10
|
const startAt =
|
|
@@ -22,10 +14,10 @@ const getAccountShape: GetAccountShape = async (info) => {
|
|
|
22
14
|
// get the current account balance state depending your api implementation
|
|
23
15
|
const { blockHeight, balance, nonce } = await getAccount(address);
|
|
24
16
|
// Merge new operations with the previously synced ones
|
|
25
|
-
const newOperations = await getOperations(
|
|
17
|
+
const newOperations = await getOperations(id, address, startAt);
|
|
26
18
|
const operations = mergeOps(oldOperations, newOperations);
|
|
27
19
|
const shape = {
|
|
28
|
-
id
|
|
20
|
+
id,
|
|
29
21
|
balance,
|
|
30
22
|
spendableBalance: balance,
|
|
31
23
|
operationsCount: operations.length,
|
|
@@ -5,101 +5,106 @@ import {
|
|
|
5
5
|
NotEnoughBalance,
|
|
6
6
|
InvalidAddress,
|
|
7
7
|
} from "@ledgerhq/errors";
|
|
8
|
-
import type { DatasetTest } from "../../types";
|
|
8
|
+
import type { DatasetTest, CurrenciesData } from "../../types";
|
|
9
9
|
import type { Transaction } from "./types";
|
|
10
10
|
const TEST_ADDRESS =
|
|
11
11
|
"erd1vgfp3g7azqjx4wsmtt7067m0l62v3psmqzr24j6xvywj2tlz0gesvyzsq2";
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
13
|
+
const elrond: CurrenciesData<Transaction> = {
|
|
14
|
+
scanAccounts: [
|
|
15
|
+
{
|
|
16
|
+
name: "elrond seed 1",
|
|
17
|
+
apdus: `
|
|
18
|
+
=> ed030000080000000000000000
|
|
19
|
+
<= 3e6572643176676670336737617a716a783477736d7474373036376d306c3632763370736d717a7232346a36787679776a32746c7a3067657376797a7371329000
|
|
20
|
+
=> ed030000080000000080000000
|
|
21
|
+
<= 3e6572643176676670336737617a716a783477736d7474373036376d306c3632763370736d717a7232346a36787679776a32746c7a3067657376797a7371329000
|
|
22
|
+
=> ed030000080000000080000001
|
|
23
|
+
<= 3e65726431706d33676a65326c6d643576796c6463767579366a7078676465347261706a70756a76756a6b65653661376a77327a6d6834747172653739367a9000
|
|
24
|
+
`,
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
accounts: [
|
|
28
|
+
{
|
|
29
|
+
raw: {
|
|
30
|
+
id: `js:2:elrond:${TEST_ADDRESS}:`,
|
|
31
|
+
seedIdentifier: `${TEST_ADDRESS}`,
|
|
32
|
+
name: "Elrond 1",
|
|
33
|
+
derivationMode: "",
|
|
34
|
+
index: 0,
|
|
35
|
+
freshAddress: `${TEST_ADDRESS}`,
|
|
36
|
+
freshAddressPath: "44'/508'/0'/0/0'",
|
|
37
|
+
freshAddresses: [],
|
|
38
|
+
blockHeight: 0,
|
|
39
|
+
operations: [],
|
|
40
|
+
pendingOperations: [],
|
|
41
|
+
currencyId: "elrond",
|
|
42
|
+
unitMagnitude: 10,
|
|
43
|
+
lastSyncDate: "",
|
|
44
|
+
balance: "299569965",
|
|
45
|
+
},
|
|
46
|
+
transactions: [
|
|
17
47
|
{
|
|
18
|
-
name: "
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
48
|
+
name: "recipient and sender must not be the same",
|
|
49
|
+
transaction: fromTransactionRaw({
|
|
50
|
+
family: "elrond",
|
|
51
|
+
recipient: `${TEST_ADDRESS}`,
|
|
52
|
+
amount: "100000000",
|
|
53
|
+
mode: "send",
|
|
54
|
+
fees: null,
|
|
55
|
+
}),
|
|
56
|
+
expectedStatus: {
|
|
57
|
+
amount: new BigNumber("100000000"),
|
|
58
|
+
errors: {
|
|
59
|
+
recipient: new InvalidAddressBecauseDestinationIsAlsoSource(),
|
|
60
|
+
},
|
|
61
|
+
warnings: {},
|
|
62
|
+
},
|
|
27
63
|
},
|
|
28
|
-
],
|
|
29
|
-
accounts: [
|
|
30
64
|
{
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
pendingOperations: [],
|
|
43
|
-
currencyId: "elrond",
|
|
44
|
-
unitMagnitude: 10,
|
|
45
|
-
lastSyncDate: "",
|
|
46
|
-
balance: "299569965",
|
|
47
|
-
},
|
|
48
|
-
transactions: [
|
|
49
|
-
{
|
|
50
|
-
name: "recipient and sender must not be the same",
|
|
51
|
-
transaction: fromTransactionRaw({
|
|
52
|
-
family: "elrond",
|
|
53
|
-
recipient: `${TEST_ADDRESS}`,
|
|
54
|
-
amount: "100000000",
|
|
55
|
-
mode: "send",
|
|
56
|
-
fees: null,
|
|
57
|
-
}),
|
|
58
|
-
expectedStatus: {
|
|
59
|
-
amount: new BigNumber("100000000"),
|
|
60
|
-
errors: {
|
|
61
|
-
recipient: new InvalidAddressBecauseDestinationIsAlsoSource(),
|
|
62
|
-
},
|
|
63
|
-
warnings: {},
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
name: "Not a valid address",
|
|
68
|
-
transaction: fromTransactionRaw({
|
|
69
|
-
family: "elrond",
|
|
70
|
-
recipient: "elrondinv",
|
|
71
|
-
amount: "100000000",
|
|
72
|
-
mode: "send",
|
|
73
|
-
fees: null,
|
|
74
|
-
}),
|
|
75
|
-
expectedStatus: {
|
|
76
|
-
errors: {
|
|
77
|
-
recipient: new InvalidAddress(),
|
|
78
|
-
},
|
|
79
|
-
warnings: {},
|
|
80
|
-
},
|
|
65
|
+
name: "Not a valid address",
|
|
66
|
+
transaction: fromTransactionRaw({
|
|
67
|
+
family: "elrond",
|
|
68
|
+
recipient: "elrondinv",
|
|
69
|
+
amount: "100000000",
|
|
70
|
+
mode: "send",
|
|
71
|
+
fees: null,
|
|
72
|
+
}),
|
|
73
|
+
expectedStatus: {
|
|
74
|
+
errors: {
|
|
75
|
+
recipient: new InvalidAddress(),
|
|
81
76
|
},
|
|
82
|
-
{
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
77
|
+
warnings: {},
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: "Not enough balance",
|
|
82
|
+
transaction: fromTransactionRaw({
|
|
83
|
+
family: "elrond",
|
|
84
|
+
recipient:
|
|
85
|
+
"erd1frj909pfums4m8aza596595l9pl56crwdj077vs2aqcw6ynl28wsfkw9rd",
|
|
86
|
+
amount: "1000000000000000000000000",
|
|
87
|
+
mode: "send",
|
|
88
|
+
fees: null,
|
|
89
|
+
}),
|
|
90
|
+
expectedStatus: {
|
|
91
|
+
errors: {
|
|
92
|
+
amount: new NotEnoughBalance(),
|
|
98
93
|
},
|
|
99
|
-
|
|
94
|
+
warnings: {},
|
|
95
|
+
},
|
|
100
96
|
},
|
|
101
97
|
],
|
|
102
98
|
},
|
|
99
|
+
],
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
const dataset: DatasetTest<Transaction> = {
|
|
103
|
+
implementations: ["js"],
|
|
104
|
+
currencies: {
|
|
105
|
+
// FIXME: temporarily disabled until a solution is found for an inconstency between two sync
|
|
106
|
+
// elrond,
|
|
103
107
|
},
|
|
104
108
|
};
|
|
109
|
+
|
|
105
110
|
export default dataset;
|
|
@@ -14,7 +14,6 @@ import {
|
|
|
14
14
|
emptyHistoryCache,
|
|
15
15
|
} from "../../account";
|
|
16
16
|
import { listTokensForCryptoCurrency } from "../../currencies";
|
|
17
|
-
import { encodeAccountId } from "../../account";
|
|
18
17
|
import type { Operation, TokenAccount, Account } from "../../types";
|
|
19
18
|
import { API, apiForCurrency, Tx } from "../../api/Ethereum";
|
|
20
19
|
import { digestTokenAccounts, prepareTokenAccounts } from "./modules";
|
|
@@ -23,16 +22,10 @@ export const getAccountShape: GetAccountShape = async (
|
|
|
23
22
|
infoInput,
|
|
24
23
|
{ blacklistedTokenIds }
|
|
25
24
|
) => {
|
|
26
|
-
const { currency, initialAccount
|
|
25
|
+
const { currency, initialAccount } = infoInput;
|
|
27
26
|
let { address } = infoInput;
|
|
28
27
|
address = eip55.encode(address);
|
|
29
|
-
const
|
|
30
|
-
type: "js",
|
|
31
|
-
version: "2",
|
|
32
|
-
currencyId: currency.id,
|
|
33
|
-
xpubOrAddress: address,
|
|
34
|
-
derivationMode,
|
|
35
|
-
});
|
|
28
|
+
const info = { ...infoInput, address };
|
|
36
29
|
const api = apiForCurrency(currency);
|
|
37
30
|
const initialStableOperations = initialAccount
|
|
38
31
|
? stableOperations(initialAccount)
|
|
@@ -63,7 +56,6 @@ export const getAccountShape: GetAccountShape = async (
|
|
|
63
56
|
if (!pullFromBlockHash && txs.length === 0) {
|
|
64
57
|
log("ethereum", "no ops on " + address);
|
|
65
58
|
return {
|
|
66
|
-
id: accountId,
|
|
67
59
|
balance: new BigNumber(0),
|
|
68
60
|
subAccounts: [],
|
|
69
61
|
blockHeight,
|
|
@@ -72,7 +64,7 @@ export const getAccountShape: GetAccountShape = async (
|
|
|
72
64
|
|
|
73
65
|
const balance = await balanceP;
|
|
74
66
|
// transform transactions into operations
|
|
75
|
-
let newOps = flatMap(txs, txToOps(
|
|
67
|
+
let newOps = flatMap(txs, txToOps(info));
|
|
76
68
|
// extracting out the sub operations by token account
|
|
77
69
|
const perTokenAccountIdOperations = {};
|
|
78
70
|
newOps.forEach((op) => {
|
|
@@ -93,7 +85,7 @@ export const getAccountShape: GetAccountShape = async (
|
|
|
93
85
|
// in case of coming from libcore, we need to converge to new ids
|
|
94
86
|
const { token } = decodeTokenAccountId(a.id);
|
|
95
87
|
if (!token) return;
|
|
96
|
-
const id = encodeTokenAccountId(
|
|
88
|
+
const id = encodeTokenAccountId(infoInput.id, token);
|
|
97
89
|
subAccountsExisting[id] = a;
|
|
98
90
|
});
|
|
99
91
|
const subAccountsExistingIds = Object.keys(subAccountsExisting);
|
|
@@ -159,7 +151,6 @@ export const getAccountShape: GetAccountShape = async (
|
|
|
159
151
|
}));
|
|
160
152
|
const operations = mergeOps(initialStableOperations, newOps);
|
|
161
153
|
const accountShape: Partial<Account> = {
|
|
162
|
-
id: accountId,
|
|
163
154
|
operations,
|
|
164
155
|
balance,
|
|
165
156
|
subAccounts,
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from "@ledgerhq/errors";
|
|
9
9
|
import { fromTransactionRaw } from "./transaction";
|
|
10
10
|
import type { Transaction } from "./types";
|
|
11
|
-
|
|
11
|
+
import ethereumScanAccounts1 from "./datasets/ethereum.scanAccounts.1";
|
|
12
12
|
import ethereum_classic from "./datasets/ethereum_classic";
|
|
13
13
|
import { syncAccount } from "../../__tests__/test-helpers/bridge";
|
|
14
14
|
export const ethereum1: AccountRaw = {
|
|
@@ -39,8 +39,7 @@ const dataset: DatasetTest<Transaction> = {
|
|
|
39
39
|
implementations: ["mock", "js"],
|
|
40
40
|
currencies: {
|
|
41
41
|
ethereum: {
|
|
42
|
-
scanAccounts: [],
|
|
43
|
-
// scanAccounts: [ethereumScanAccounts1],
|
|
42
|
+
scanAccounts: [ethereumScanAccounts1],
|
|
44
43
|
accounts: [
|
|
45
44
|
{
|
|
46
45
|
implementations: ["js"],
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import type { Account } from "../../types";
|
|
2
|
-
import { encodeAccountId } from "../../account";
|
|
3
2
|
import type { GetAccountShape } from "../../bridge/jsHelpers";
|
|
4
3
|
import { makeSync, makeScanAccounts, mergeOps } from "../../bridge/jsHelpers";
|
|
5
4
|
import { getAccount, getOperations } from "./api";
|
|
6
5
|
|
|
7
6
|
const getAccountShape: GetAccountShape = async (info) => {
|
|
8
|
-
const { address, initialAccount
|
|
7
|
+
const { id, address, initialAccount } = info;
|
|
9
8
|
const oldOperations = initialAccount?.operations || [];
|
|
10
9
|
const startAt = oldOperations.length
|
|
11
10
|
? (oldOperations[0].blockHeight || 0) + 1
|
|
@@ -24,17 +23,10 @@ const getAccountShape: GetAccountShape = async (info) => {
|
|
|
24
23
|
nominations,
|
|
25
24
|
numSlashingSpans,
|
|
26
25
|
} = await getAccount(address);
|
|
27
|
-
const
|
|
28
|
-
type: "js",
|
|
29
|
-
version: "2",
|
|
30
|
-
currencyId: currency.id,
|
|
31
|
-
xpubOrAddress: address,
|
|
32
|
-
derivationMode,
|
|
33
|
-
});
|
|
34
|
-
const newOperations = await getOperations(accountId, address, startAt);
|
|
26
|
+
const newOperations = await getOperations(id, address, startAt);
|
|
35
27
|
const operations = mergeOps(oldOperations, newOperations);
|
|
36
28
|
const shape = {
|
|
37
|
-
id
|
|
29
|
+
id,
|
|
38
30
|
balance,
|
|
39
31
|
spendableBalance,
|
|
40
32
|
operationsCount: operations.length,
|
|
@@ -1,18 +1,10 @@
|
|
|
1
|
+
import { makeScanAccounts, makeSync, mergeOps } from "../../bridge/jsHelpers";
|
|
1
2
|
import type { Account } from "../../types";
|
|
2
|
-
import { encodeAccountId } from "../../account";
|
|
3
3
|
import type { GetAccountShape } from "../../bridge/jsHelpers";
|
|
4
|
-
import { makeScanAccounts, makeSync, mergeOps } from "../../bridge/jsHelpers";
|
|
5
4
|
import { fetchAccount, fetchOperations } from "./api";
|
|
6
5
|
|
|
7
6
|
const getAccountShape: GetAccountShape = async (info) => {
|
|
8
|
-
const { address, initialAccount
|
|
9
|
-
const accountId = encodeAccountId({
|
|
10
|
-
type: "js",
|
|
11
|
-
version: "2",
|
|
12
|
-
currencyId: currency.id,
|
|
13
|
-
xpubOrAddress: address,
|
|
14
|
-
derivationMode,
|
|
15
|
-
});
|
|
7
|
+
const { id, address, initialAccount } = info;
|
|
16
8
|
const oldOperations = initialAccount?.operations || [];
|
|
17
9
|
const startAt = oldOperations.length
|
|
18
10
|
? (oldOperations[0].blockHeight || 0) + 1
|
|
@@ -20,10 +12,10 @@ const getAccountShape: GetAccountShape = async (info) => {
|
|
|
20
12
|
const { blockHeight, balance, spendableBalance } = await fetchAccount(
|
|
21
13
|
address
|
|
22
14
|
);
|
|
23
|
-
const newOperations = await fetchOperations(
|
|
15
|
+
const newOperations = await fetchOperations(id, address, startAt);
|
|
24
16
|
const operations = mergeOps(oldOperations, newOperations);
|
|
25
17
|
const shape = {
|
|
26
|
-
id
|
|
18
|
+
id,
|
|
27
19
|
balance,
|
|
28
20
|
spendableBalance,
|
|
29
21
|
operationsCount: operations.length,
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import invariant from "invariant";
|
|
3
3
|
import { BigNumber } from "bignumber.js";
|
|
4
4
|
import { log } from "@ledgerhq/logs";
|
|
5
|
-
import { encodeAccountId } from "../../account";
|
|
6
5
|
import { mergeOps } from "../../bridge/jsHelpers";
|
|
7
6
|
import type { GetAccountShape } from "../../bridge/jsHelpers";
|
|
8
7
|
import { encodeOperationId } from "../../operation";
|
|
@@ -39,14 +38,7 @@ function restorePublicKey(
|
|
|
39
38
|
}
|
|
40
39
|
|
|
41
40
|
export const getAccountShape: GetAccountShape = async (infoInput) => {
|
|
42
|
-
const { address, initialAccount, rest
|
|
43
|
-
const accountId = encodeAccountId({
|
|
44
|
-
type: "js",
|
|
45
|
-
version: "2",
|
|
46
|
-
currencyId: currency.id,
|
|
47
|
-
xpubOrAddress: address,
|
|
48
|
-
derivationMode,
|
|
49
|
-
});
|
|
41
|
+
const { address, initialAccount, rest } = infoInput;
|
|
50
42
|
|
|
51
43
|
const initialStableOperations = initialAccount
|
|
52
44
|
? initialAccount.operations
|
|
@@ -72,7 +64,6 @@ export const getAccountShape: GetAccountShape = async (infoInput) => {
|
|
|
72
64
|
|
|
73
65
|
if (apiAccount.type === "empty") {
|
|
74
66
|
return {
|
|
75
|
-
id: accountId,
|
|
76
67
|
blockHeight,
|
|
77
68
|
lastSyncDate: new Date(),
|
|
78
69
|
};
|
|
@@ -96,14 +87,11 @@ export const getAccountShape: GetAccountShape = async (infoInput) => {
|
|
|
96
87
|
const balance = new BigNumber(apiAccount.balance);
|
|
97
88
|
const subAccounts = [];
|
|
98
89
|
|
|
99
|
-
const newOps: any[] = apiOperations
|
|
100
|
-
.map(txToOp({ address, accountId }))
|
|
101
|
-
.filter(Boolean);
|
|
90
|
+
const newOps: any[] = apiOperations.map(txToOp(infoInput)).filter(Boolean);
|
|
102
91
|
|
|
103
92
|
const operations = mergeOps(initialStableOperations, newOps);
|
|
104
93
|
|
|
105
94
|
const accountShape = {
|
|
106
|
-
id: accountId,
|
|
107
95
|
operations,
|
|
108
96
|
balance,
|
|
109
97
|
subAccounts,
|
|
@@ -117,7 +105,7 @@ export const getAccountShape: GetAccountShape = async (infoInput) => {
|
|
|
117
105
|
};
|
|
118
106
|
|
|
119
107
|
const txToOp =
|
|
120
|
-
({ address, accountId }) =>
|
|
108
|
+
({ address, id: accountId }) =>
|
|
121
109
|
(tx: APIOperation): Operation | null | undefined => {
|
|
122
110
|
let type;
|
|
123
111
|
let maybeValue;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import bitcoin from "../../families/bitcoin/bridge/js";
|
|
2
|
-
|
|
3
1
|
import crypto_org from "../../families/crypto_org/bridge/js";
|
|
4
2
|
|
|
5
3
|
import elrond from "../../families/elrond/bridge/js";
|
|
@@ -20,7 +18,6 @@ import tron from "../../families/tron/bridge/js";
|
|
|
20
18
|
|
|
21
19
|
|
|
22
20
|
export default {
|
|
23
|
-
bitcoin,
|
|
24
21
|
crypto_org,
|
|
25
22
|
elrond,
|
|
26
23
|
ethereum,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { SerializedAccount as WalletSerializedAccount } from "../families/bitcoin/wallet-btc";
|
|
2
1
|
import { fromAccountRaw } from "../account";
|
|
3
2
|
import type { Account, AccountRaw } from "../types";
|
|
4
3
|
|
|
@@ -27,7 +26,6 @@ const accounts: Account[] = [
|
|
|
27
26
|
xpub: "xpub6DACJs4ZgE67HEu53j2osRtw51wfJybJ88ccVQnHpmjqr9XJfMYXn6Fxt3u772FonuWfqYUrb9Z9wxe2S9pTzxGDiQZDk1cMPiDH2S5HjYa",
|
|
28
27
|
bitcoinResources: {
|
|
29
28
|
utxos: [],
|
|
30
|
-
serializedData: {} as WalletSerializedAccount,
|
|
31
29
|
},
|
|
32
30
|
swapHistory: [
|
|
33
31
|
{
|
|
@@ -90,7 +88,6 @@ const accounts: Account[] = [
|
|
|
90
88
|
xpub: "Ltub2Zx1tbqWB7AbC4fb7aWgsuyXBm2qt97gzG5av4PHAjdAhvdZQFHS7nmcScgtAvpgcGAkVQQvR9BXwu54ny6Yqwst4KQAnyD1Yx6VezNf1S8",
|
|
91
89
|
bitcoinResources: {
|
|
92
90
|
utxos: [],
|
|
93
|
-
serializedData: {} as WalletSerializedAccount,
|
|
94
91
|
},
|
|
95
92
|
swapHistory: [
|
|
96
93
|
{
|
|
@@ -16,24 +16,6 @@ function sameSwap(a: SwapOperation, b: SwapOperation) {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
export const implicitMigration = (accounts: Account[]): Account[] => {
|
|
19
|
-
// TODO Need this for BTC-JS?
|
|
20
|
-
/*
|
|
21
|
-
// this infer the next account id following ongoing libcore->js migration
|
|
22
|
-
function targetBitcoinJSaccountId(a: AccountLike) {
|
|
23
|
-
if (a.type === "Account") {
|
|
24
|
-
const decoded = decodeAccountId(a.id);
|
|
25
|
-
if (decoded.type !== "libcore") {
|
|
26
|
-
return a.id;
|
|
27
|
-
}
|
|
28
|
-
if (decoded.currencyId !== "bitcoin") {
|
|
29
|
-
return a.id;
|
|
30
|
-
}
|
|
31
|
-
return `js:2:${decoded.currencyId}:${a.freshAddress}:${decoded.derivationMode}`;
|
|
32
|
-
}
|
|
33
|
-
return a.id;
|
|
34
|
-
}
|
|
35
|
-
*/
|
|
36
|
-
|
|
37
19
|
// this infer the next account id following ongoing libcore->js migration
|
|
38
20
|
function targetEthereumJSaccountId(a: AccountLike) {
|
|
39
21
|
if (a.type === "Account") {
|
package/src/mock/account.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import Prando from "prando";
|
|
2
2
|
import { BigNumber } from "bignumber.js";
|
|
3
|
-
import type { SerializedAccount as WalletSerializedAccount } from "../families/bitcoin/wallet-btc";
|
|
4
3
|
import {
|
|
5
4
|
listCryptoCurrencies,
|
|
6
5
|
listTokensForCryptoCurrency,
|
|
@@ -413,7 +412,6 @@ export function genAccount(
|
|
|
413
412
|
if (currency.family === "bitcoin") {
|
|
414
413
|
account.bitcoinResources = {
|
|
415
414
|
utxos: [],
|
|
416
|
-
serializedData: {} as WalletSerializedAccount,
|
|
417
415
|
};
|
|
418
416
|
}
|
|
419
417
|
|
package/src/network.ts
CHANGED
|
@@ -44,10 +44,12 @@ export const responseInterceptor = (
|
|
|
44
44
|
return response;
|
|
45
45
|
};
|
|
46
46
|
|
|
47
|
-
export const errorInterceptor = (
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
export const errorInterceptor = (
|
|
48
|
+
error: {
|
|
49
|
+
config: ExtendedXHRConfig;
|
|
50
|
+
} & AxiosError<any>
|
|
51
|
+
) => {
|
|
52
|
+
const { url, method = "", metadata } = error.config;
|
|
51
53
|
const { startTime = 0 } = metadata || {};
|
|
52
54
|
|
|
53
55
|
let errorToThrow;
|
|
@@ -108,12 +110,9 @@ const makeError = (msg, status, url, method) => {
|
|
|
108
110
|
const getErrorMessage = (
|
|
109
111
|
data: Record<string, any>
|
|
110
112
|
): string | null | undefined => {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
return getErrorMessage(data.errors[0]);
|
|
115
|
-
}
|
|
116
|
-
return data.message || data.error_message || data.error || data.msg;
|
|
113
|
+
return (
|
|
114
|
+
data.cause || data.error_message || data.error || data.message || data.msg
|
|
115
|
+
);
|
|
117
116
|
};
|
|
118
117
|
|
|
119
118
|
const extractErrorMessage = (raw: string): string | undefined => {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logic.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/families/bitcoin/logic.ts"],"names":[],"mappings":""}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
exports.__esModule = true;
|
|
3
|
-
var currencies_1 = require("../../../currencies");
|
|
4
|
-
var logic_1 = require("../../../families/bitcoin/logic");
|
|
5
|
-
var errors_1 = require("@ledgerhq/errors");
|
|
6
|
-
describe("Test isValidRecipient", function () {
|
|
7
|
-
function t(address, currencyId, expectValid) {
|
|
8
|
-
var currency = (0, currencies_1.getCryptoCurrencyById)(currencyId);
|
|
9
|
-
if (expectValid) {
|
|
10
|
-
return expect((0, logic_1.isValidRecipient)({ currency: currency, recipient: address })).resolves.toBeNull();
|
|
11
|
-
}
|
|
12
|
-
else {
|
|
13
|
-
return expect((0, logic_1.isValidRecipient)({ currency: currency, recipient: address })).rejects.toBeInstanceOf(errors_1.InvalidAddress);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
test("Fail on non-existing currency", function () {
|
|
17
|
-
t("bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4", "ontology", false);
|
|
18
|
-
});
|
|
19
|
-
test("Fail on mainnet addr on bitcoin_testnet", function () {
|
|
20
|
-
t("bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4", "bitcoin_testnet", false);
|
|
21
|
-
});
|
|
22
|
-
test("Success on valid address", function () {
|
|
23
|
-
t("bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4", "bitcoin", true);
|
|
24
|
-
});
|
|
25
|
-
test("Success on valid qtum address", function () {
|
|
26
|
-
t("xCREYTgvdk3XzFNpdXkj35fZX4hJK2Ckpd", "qtum", true);
|
|
27
|
-
});
|
|
28
|
-
test("Fail on invalid qtum address", function () {
|
|
29
|
-
t("xCREYTgvdk3XzFNpdXkj35fZX4hJK2Ckpe", "qtum", false);
|
|
30
|
-
});
|
|
31
|
-
test("Fail on invalid bch address", function () {
|
|
32
|
-
t("qr6m7j9njldwwzlg9v7v53unlr4jkmx6eylep8ekg3", "bitcoin_cash", false);
|
|
33
|
-
});
|
|
34
|
-
// TODO Enable once fixed in wallet-btc
|
|
35
|
-
test.skip("Success on valid bch address", function () {
|
|
36
|
-
t("qr6m7j9njldwwzlg9v7v53unlr4jkmx6eylep8ekg2", "bitcoin_cash", true);
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
//# sourceMappingURL=logic.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logic.js","sourceRoot":"","sources":["../../../../src/__tests__/families/bitcoin/logic.ts"],"names":[],"mappings":";;AAAA,kDAA4D;AAC5D,yDAAmE;AACnE,2CAAkD;AAElD,QAAQ,CAAC,uBAAuB,EAAE;IAChC,SAAS,CAAC,CAAC,OAAe,EAAE,UAAkB,EAAE,WAAoB;QAClE,IAAM,QAAQ,GAAG,IAAA,kCAAqB,EAAC,UAAU,CAAC,CAAC;QACnD,IAAI,WAAW,EAAE;YACf,OAAO,MAAM,CACX,IAAA,wBAAgB,EAAC,EAAE,QAAQ,UAAA,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CACnD,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC;SACvB;aAAM;YACL,OAAO,MAAM,CACX,IAAA,wBAAgB,EAAC,EAAE,QAAQ,UAAA,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CACnD,CAAC,OAAO,CAAC,cAAc,CAAC,uBAAc,CAAC,CAAC;SAC1C;IACH,CAAC;IACD,IAAI,CAAC,+BAA+B,EAAE;QACpC,CAAC,CAAC,4CAA4C,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;IACrE,CAAC,CAAC,CAAC;IACH,IAAI,CAAC,yCAAyC,EAAE;QAC9C,CAAC,CAAC,4CAA4C,EAAE,iBAAiB,EAAE,KAAK,CAAC,CAAC;IAC5E,CAAC,CAAC,CAAC;IACH,IAAI,CAAC,0BAA0B,EAAE;QAC/B,CAAC,CAAC,4CAA4C,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;IACnE,CAAC,CAAC,CAAC;IACH,IAAI,CAAC,+BAA+B,EAAE;QACpC,CAAC,CAAC,oCAAoC,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IACxD,CAAC,CAAC,CAAC;IACH,IAAI,CAAC,8BAA8B,EAAE;QACnC,CAAC,CAAC,oCAAoC,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IACzD,CAAC,CAAC,CAAC;IACH,IAAI,CAAC,6BAA6B,EAAE;QAClC,CAAC,CAAC,4CAA4C,EAAE,cAAc,EAAE,KAAK,CAAC,CAAC;IACzE,CAAC,CAAC,CAAC;IACH,uCAAuC;IACvC,IAAI,CAAC,IAAI,CAAC,8BAA8B,EAAE;QACxC,CAAC,CAAC,4CAA4C,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IACxE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bitcoin.test.d.ts","sourceRoot":"","sources":["../../../../../src/__tests__/families/bitcoin/wallet-btc/bitcoin.test.ts"],"names":[],"mappings":""}
|