@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
|
@@ -38,7 +38,6 @@ export function toBitcoinOutputRaw({
|
|
|
38
38
|
outputIndex,
|
|
39
39
|
blockHeight,
|
|
40
40
|
address,
|
|
41
|
-
isChange,
|
|
42
41
|
path,
|
|
43
42
|
value,
|
|
44
43
|
rbf,
|
|
@@ -48,7 +47,6 @@ export function toBitcoinOutputRaw({
|
|
|
48
47
|
outputIndex,
|
|
49
48
|
blockHeight,
|
|
50
49
|
address,
|
|
51
|
-
isChange ? 1 : 0,
|
|
52
50
|
path,
|
|
53
51
|
value.toString(),
|
|
54
52
|
rbf ? 1 : 0,
|
|
@@ -59,7 +57,6 @@ export function fromBitcoinOutputRaw([
|
|
|
59
57
|
outputIndex,
|
|
60
58
|
blockHeight,
|
|
61
59
|
address,
|
|
62
|
-
isChange,
|
|
63
60
|
path,
|
|
64
61
|
value,
|
|
65
62
|
rbf,
|
|
@@ -69,7 +66,6 @@ export function fromBitcoinOutputRaw([
|
|
|
69
66
|
outputIndex,
|
|
70
67
|
blockHeight: blockHeight || undefined,
|
|
71
68
|
address: address || undefined,
|
|
72
|
-
isChange: !!isChange,
|
|
73
69
|
path: path || undefined,
|
|
74
70
|
value: new BigNumber(value),
|
|
75
71
|
rbf: !!rbf,
|
|
@@ -80,7 +76,6 @@ export function toBitcoinResourcesRaw(
|
|
|
80
76
|
): BitcoinResourcesRaw {
|
|
81
77
|
return {
|
|
82
78
|
utxos: r.utxos.map(toBitcoinOutputRaw),
|
|
83
|
-
serializedData: r.serializedData,
|
|
84
79
|
};
|
|
85
80
|
}
|
|
86
81
|
export function fromBitcoinResourcesRaw(
|
|
@@ -88,6 +83,5 @@ export function fromBitcoinResourcesRaw(
|
|
|
88
83
|
): BitcoinResources {
|
|
89
84
|
return {
|
|
90
85
|
utxos: r.utxos.map(fromBitcoinOutputRaw),
|
|
91
|
-
serializedData: r.serializedData,
|
|
92
86
|
};
|
|
93
87
|
}
|
|
@@ -10,7 +10,8 @@ import { pickSiblings } from "../../bot/specs";
|
|
|
10
10
|
import { bitcoinPickingStrategy } from "./types";
|
|
11
11
|
import type { MutationSpec, AppSpec } from "../../bot/types";
|
|
12
12
|
import { LowerThanMinimumRelayFee } from "../../errors";
|
|
13
|
-
import { getMinRelayFee
|
|
13
|
+
import { getMinRelayFee } from "./fees";
|
|
14
|
+
import { isChangeOutput, getUTXOStatus } from "./transaction";
|
|
14
15
|
import { DeviceModelId } from "@ledgerhq/devices";
|
|
15
16
|
type Arg = Partial<{
|
|
16
17
|
minimalAmount: BigNumber;
|
|
@@ -52,8 +53,8 @@ const genericTest = ({
|
|
|
52
53
|
}) => {
|
|
53
54
|
// workaround for buggy explorer behavior (nodes desync)
|
|
54
55
|
invariant(
|
|
55
|
-
Date.now() - operation.date >
|
|
56
|
-
"operation time to be older than
|
|
56
|
+
Date.now() - operation.date > 20000,
|
|
57
|
+
"operation time to be older than 20s"
|
|
57
58
|
);
|
|
58
59
|
// balance move
|
|
59
60
|
expect(account.balance.toString()).toBe(
|
|
@@ -80,12 +81,8 @@ const genericTest = ({
|
|
|
80
81
|
? operation.senders
|
|
81
82
|
: txInputs.map((t) => t.address).filter(Boolean),
|
|
82
83
|
recipients: txOutputs
|
|
83
|
-
|
|
84
|
-
.
|
|
85
|
-
/*/ WITH <<<<<<<<<<<<<<<<<<<<<<<<<
|
|
86
|
-
.filter((o) => o.address && !o.isChange)
|
|
87
|
-
//*/
|
|
88
|
-
.map((o) => o.address)
|
|
84
|
+
.filter((o) => !isChangeOutput(o))
|
|
85
|
+
.map((t) => t.address)
|
|
89
86
|
.filter(Boolean),
|
|
90
87
|
})
|
|
91
88
|
);
|
|
@@ -270,7 +267,6 @@ const bitcoin: AppSpec<Transaction> = {
|
|
|
270
267
|
model: DeviceModelId.nanoS,
|
|
271
268
|
appName: "Bitcoin",
|
|
272
269
|
},
|
|
273
|
-
testTimeout: 5 * 60 * 1000,
|
|
274
270
|
test: genericTest,
|
|
275
271
|
mutations: bitcoinLikeMutations(),
|
|
276
272
|
};
|
|
@@ -282,13 +278,12 @@ const bitcoinTestnet: AppSpec<Transaction> = {
|
|
|
282
278
|
model: DeviceModelId.nanoS,
|
|
283
279
|
appName: "Bitcoin Test",
|
|
284
280
|
},
|
|
285
|
-
testTimeout: 5 * 60 * 1000,
|
|
286
281
|
test: genericTest,
|
|
287
282
|
mutations: bitcoinLikeMutations({
|
|
288
283
|
targetAccountSize: 8,
|
|
289
284
|
minimalAmount: parseCurrencyUnit(
|
|
290
285
|
getCryptoCurrencyById("bitcoin_testnet").units[0],
|
|
291
|
-
"0.
|
|
286
|
+
"0.0001"
|
|
292
287
|
),
|
|
293
288
|
}),
|
|
294
289
|
};
|
|
@@ -300,7 +295,6 @@ const bitcoinGold: AppSpec<Transaction> = {
|
|
|
300
295
|
model: DeviceModelId.nanoS,
|
|
301
296
|
appName: "BitcoinGold",
|
|
302
297
|
},
|
|
303
|
-
testTimeout: 5 * 60 * 1000,
|
|
304
298
|
test: genericTest,
|
|
305
299
|
mutations: bitcoinLikeMutations(),
|
|
306
300
|
};
|
|
@@ -316,7 +310,6 @@ const bitcoinCash: AppSpec<Transaction> = {
|
|
|
316
310
|
model: DeviceModelId.nanoS,
|
|
317
311
|
appName: "BitcoinCash",
|
|
318
312
|
},
|
|
319
|
-
testTimeout: 5 * 60 * 1000,
|
|
320
313
|
test: genericTest,
|
|
321
314
|
mutations: bitcoinLikeMutations({
|
|
322
315
|
targetAccountSize: 5,
|
|
@@ -340,7 +333,6 @@ const peercoin: AppSpec<Transaction> = {
|
|
|
340
333
|
model: DeviceModelId.nanoS,
|
|
341
334
|
appName: "Peercoin",
|
|
342
335
|
},
|
|
343
|
-
testTimeout: 5 * 60 * 1000,
|
|
344
336
|
test: genericTest,
|
|
345
337
|
mutations: bitcoinLikeMutations(),
|
|
346
338
|
};
|
|
@@ -352,7 +344,6 @@ const pivx: AppSpec<Transaction> = {
|
|
|
352
344
|
model: DeviceModelId.nanoS,
|
|
353
345
|
appName: "PivX",
|
|
354
346
|
},
|
|
355
|
-
testTimeout: 5 * 60 * 1000,
|
|
356
347
|
test: genericTest,
|
|
357
348
|
mutations: bitcoinLikeMutations(),
|
|
358
349
|
};
|
|
@@ -364,7 +355,6 @@ const qtum: AppSpec<Transaction> = {
|
|
|
364
355
|
model: DeviceModelId.nanoS,
|
|
365
356
|
appName: "Qtum",
|
|
366
357
|
},
|
|
367
|
-
testTimeout: 5 * 60 * 1000,
|
|
368
358
|
test: genericTest,
|
|
369
359
|
mutations: bitcoinLikeMutations(),
|
|
370
360
|
};
|
|
@@ -376,7 +366,17 @@ const stakenet: AppSpec<Transaction> = {
|
|
|
376
366
|
model: DeviceModelId.nanoS,
|
|
377
367
|
appName: "XSN",
|
|
378
368
|
},
|
|
379
|
-
|
|
369
|
+
test: genericTest,
|
|
370
|
+
mutations: bitcoinLikeMutations(),
|
|
371
|
+
};
|
|
372
|
+
const stratis: AppSpec<Transaction> = {
|
|
373
|
+
name: "Stratis",
|
|
374
|
+
currency: getCryptoCurrencyById("stratis"),
|
|
375
|
+
dependency: "Bitcoin",
|
|
376
|
+
appQuery: {
|
|
377
|
+
model: DeviceModelId.nanoS,
|
|
378
|
+
appName: "Stratis",
|
|
379
|
+
},
|
|
380
380
|
test: genericTest,
|
|
381
381
|
mutations: bitcoinLikeMutations(),
|
|
382
382
|
};
|
|
@@ -388,7 +388,6 @@ const vertcoin: AppSpec<Transaction> = {
|
|
|
388
388
|
model: DeviceModelId.nanoS,
|
|
389
389
|
appName: "Vertcoin",
|
|
390
390
|
},
|
|
391
|
-
testTimeout: 5 * 60 * 1000,
|
|
392
391
|
test: genericTest,
|
|
393
392
|
mutations: bitcoinLikeMutations(),
|
|
394
393
|
};
|
|
@@ -400,7 +399,6 @@ const viacoin: AppSpec<Transaction> = {
|
|
|
400
399
|
model: DeviceModelId.nanoS,
|
|
401
400
|
appName: "Viacoin",
|
|
402
401
|
},
|
|
403
|
-
testTimeout: 5 * 60 * 1000,
|
|
404
402
|
test: genericTest,
|
|
405
403
|
mutations: bitcoinLikeMutations(),
|
|
406
404
|
};
|
|
@@ -412,7 +410,6 @@ const dash: AppSpec<Transaction> = {
|
|
|
412
410
|
model: DeviceModelId.nanoS,
|
|
413
411
|
appName: "Dash",
|
|
414
412
|
},
|
|
415
|
-
testTimeout: 5 * 60 * 1000,
|
|
416
413
|
test: genericTest,
|
|
417
414
|
mutations: bitcoinLikeMutations({
|
|
418
415
|
targetAccountSize: 5,
|
|
@@ -430,7 +427,6 @@ const dogecoin: AppSpec<Transaction> = {
|
|
|
430
427
|
model: DeviceModelId.nanoS,
|
|
431
428
|
appName: "Dogecoin",
|
|
432
429
|
},
|
|
433
|
-
testTimeout: 5 * 60 * 1000,
|
|
434
430
|
test: genericTest,
|
|
435
431
|
mutations: bitcoinLikeMutations({
|
|
436
432
|
targetAccountSize: 5,
|
|
@@ -448,7 +444,6 @@ const zcash: AppSpec<Transaction> = {
|
|
|
448
444
|
model: DeviceModelId.nanoS,
|
|
449
445
|
appName: "Zcash",
|
|
450
446
|
},
|
|
451
|
-
testTimeout: 5 * 60 * 1000,
|
|
452
447
|
test: genericTest,
|
|
453
448
|
mutations: bitcoinLikeMutations({
|
|
454
449
|
minimalAmount: parseCurrencyUnit(
|
|
@@ -465,7 +460,6 @@ const zencash: AppSpec<Transaction> = {
|
|
|
465
460
|
model: DeviceModelId.nanoS,
|
|
466
461
|
appName: "Horizen",
|
|
467
462
|
},
|
|
468
|
-
testTimeout: 5 * 60 * 1000,
|
|
469
463
|
test: genericTest,
|
|
470
464
|
mutations: bitcoinLikeMutations({
|
|
471
465
|
minimalAmount: parseCurrencyUnit(
|
|
@@ -482,7 +476,6 @@ const digibyte: AppSpec<Transaction> = {
|
|
|
482
476
|
model: DeviceModelId.nanoS,
|
|
483
477
|
appName: "Digibyte",
|
|
484
478
|
},
|
|
485
|
-
testTimeout: 5 * 60 * 1000,
|
|
486
479
|
test: genericTest,
|
|
487
480
|
mutations: bitcoinLikeMutations({
|
|
488
481
|
targetAccountSize: 5,
|
|
@@ -500,7 +493,6 @@ const komodo: AppSpec<Transaction> = {
|
|
|
500
493
|
model: DeviceModelId.nanoS,
|
|
501
494
|
appName: "Komodo",
|
|
502
495
|
},
|
|
503
|
-
testTimeout: 5 * 60 * 1000,
|
|
504
496
|
test: genericTest,
|
|
505
497
|
mutations: bitcoinLikeMutations({
|
|
506
498
|
minimalAmount: parseCurrencyUnit(
|
|
@@ -517,7 +509,6 @@ const litecoin: AppSpec<Transaction> = {
|
|
|
517
509
|
model: DeviceModelId.nanoS,
|
|
518
510
|
appName: "Litecoin",
|
|
519
511
|
},
|
|
520
|
-
testTimeout: 5 * 60 * 1000,
|
|
521
512
|
test: genericTest,
|
|
522
513
|
mutations: bitcoinLikeMutations({
|
|
523
514
|
targetAccountSize: 5,
|
|
@@ -527,7 +518,22 @@ const litecoin: AppSpec<Transaction> = {
|
|
|
527
518
|
),
|
|
528
519
|
}),
|
|
529
520
|
};
|
|
530
|
-
|
|
521
|
+
const stealthcoin: AppSpec<Transaction> = {
|
|
522
|
+
name: "Stealth",
|
|
523
|
+
currency: getCryptoCurrencyById("stealthcoin"),
|
|
524
|
+
dependency: "Bitcoin",
|
|
525
|
+
appQuery: {
|
|
526
|
+
model: DeviceModelId.nanoS,
|
|
527
|
+
appName: "Stealth",
|
|
528
|
+
},
|
|
529
|
+
test: genericTest,
|
|
530
|
+
mutations: bitcoinLikeMutations({
|
|
531
|
+
minimalAmount: parseCurrencyUnit(
|
|
532
|
+
getCryptoCurrencyById("stealthcoin").units[0],
|
|
533
|
+
"0.1"
|
|
534
|
+
),
|
|
535
|
+
}),
|
|
536
|
+
};
|
|
531
537
|
export default {
|
|
532
538
|
bitcoin,
|
|
533
539
|
bitcoinTestnet,
|
|
@@ -542,6 +548,8 @@ export default {
|
|
|
542
548
|
pivx,
|
|
543
549
|
qtum,
|
|
544
550
|
stakenet,
|
|
551
|
+
stealthcoin,
|
|
552
|
+
stratis,
|
|
545
553
|
vertcoin,
|
|
546
554
|
viacoin,
|
|
547
555
|
zcash,
|
|
@@ -2,7 +2,7 @@ import type { DeviceAction } from "../../bot/types";
|
|
|
2
2
|
import type { Transaction } from "./types";
|
|
3
3
|
import { formatCurrencyUnit } from "../../currencies";
|
|
4
4
|
import { deviceActionFlow } from "../../bot/specs";
|
|
5
|
-
import { perCoinLogic } from "./
|
|
5
|
+
import { perCoinLogic } from "./transaction";
|
|
6
6
|
const acceptTransaction: DeviceAction<Transaction, any> = deviceActionFlow({
|
|
7
7
|
steps: [
|
|
8
8
|
{
|
|
@@ -19,7 +19,7 @@ import vertcoin from "./datasets/vertcoin";
|
|
|
19
19
|
import viacoin from "./datasets/viacoin";
|
|
20
20
|
import zcash from "./datasets/zcash";
|
|
21
21
|
const dataset: DatasetTest<Transaction> = {
|
|
22
|
-
implementations: ["
|
|
22
|
+
implementations: ["libcore", "mock"],
|
|
23
23
|
currencies: {
|
|
24
24
|
bitcoin_cash,
|
|
25
25
|
bitcoin_gold,
|
|
@@ -25,102 +25,6 @@ import { formatCurrencyUnit } from "../../currencies";
|
|
|
25
25
|
import type { CryptoCurrencyIds } from "../../types";
|
|
26
26
|
import { libcoreAmountToBigNumber } from "../../libcore/buildBigNumber";
|
|
27
27
|
|
|
28
|
-
const fromFeeItemsRaw = (fir: FeeItemsRaw): FeeItems => ({
|
|
29
|
-
items: fir.items.map((fi) => ({
|
|
30
|
-
key: fi.key,
|
|
31
|
-
speed: fi.speed,
|
|
32
|
-
feePerByte: new BigNumber(fi.feePerByte),
|
|
33
|
-
})),
|
|
34
|
-
defaultFeePerByte: new BigNumber(fir.defaultFeePerByte),
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
const toFeeItemsRaw = (fir: FeeItems): FeeItemsRaw => ({
|
|
38
|
-
items: fir.items.map((fi) => ({
|
|
39
|
-
key: fi.key,
|
|
40
|
-
speed: fi.speed,
|
|
41
|
-
feePerByte: fi.feePerByte.toString(),
|
|
42
|
-
})),
|
|
43
|
-
defaultFeePerByte: fir.defaultFeePerByte.toString(),
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
export const fromTransactionRaw = (tr: TransactionRaw): Transaction => {
|
|
47
|
-
const common = fromTransactionCommonRaw(tr);
|
|
48
|
-
return {
|
|
49
|
-
...common,
|
|
50
|
-
rbf: tr.rbf,
|
|
51
|
-
utxoStrategy: tr.utxoStrategy,
|
|
52
|
-
family: tr.family,
|
|
53
|
-
feePerByte: tr.feePerByte ? new BigNumber(tr.feePerByte) : null,
|
|
54
|
-
networkInfo: tr.networkInfo && {
|
|
55
|
-
family: tr.networkInfo.family,
|
|
56
|
-
feeItems: fromFeeItemsRaw(tr.networkInfo.feeItems),
|
|
57
|
-
},
|
|
58
|
-
feesStrategy: tr.feesStrategy,
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
export const toTransactionRaw = (t: Transaction): TransactionRaw => {
|
|
62
|
-
const common = toTransactionCommonRaw(t);
|
|
63
|
-
return {
|
|
64
|
-
...common,
|
|
65
|
-
rbf: t.rbf,
|
|
66
|
-
utxoStrategy: t.utxoStrategy,
|
|
67
|
-
family: t.family,
|
|
68
|
-
feePerByte: t.feePerByte ? t.feePerByte.toString() : null,
|
|
69
|
-
networkInfo: t.networkInfo && {
|
|
70
|
-
family: t.networkInfo.family,
|
|
71
|
-
feeItems: toFeeItemsRaw(t.networkInfo.feeItems),
|
|
72
|
-
},
|
|
73
|
-
feesStrategy: t.feesStrategy,
|
|
74
|
-
};
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
const formatNetworkInfo = (
|
|
78
|
-
networkInfo:
|
|
79
|
-
| {
|
|
80
|
-
feeItems: FeeItems;
|
|
81
|
-
}
|
|
82
|
-
| null
|
|
83
|
-
| undefined
|
|
84
|
-
) => {
|
|
85
|
-
if (!networkInfo) return "network info not loaded";
|
|
86
|
-
return `network fees: ${networkInfo.feeItems.items
|
|
87
|
-
.map((i) => i.key + "=" + i.feePerByte.toString())
|
|
88
|
-
.join(", ")}`;
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
export const formatTransaction = (t: Transaction, account: Account): string => {
|
|
92
|
-
const n = getEnv("DEBUG_UTXO_DISPLAY");
|
|
93
|
-
const { excludeUTXOs, strategy, pickUnconfirmedRBF } = t.utxoStrategy;
|
|
94
|
-
const displayAll = excludeUTXOs.length <= n;
|
|
95
|
-
return `
|
|
96
|
-
SEND ${
|
|
97
|
-
t.useAllAmount
|
|
98
|
-
? "MAX"
|
|
99
|
-
: formatCurrencyUnit(getAccountUnit(account), t.amount, {
|
|
100
|
-
showCode: true,
|
|
101
|
-
disableRounding: true,
|
|
102
|
-
})
|
|
103
|
-
}
|
|
104
|
-
TO ${t.recipient}
|
|
105
|
-
with feePerByte=${
|
|
106
|
-
t.feePerByte ? t.feePerByte.toString() : "?"
|
|
107
|
-
} (${formatNetworkInfo(t.networkInfo)})
|
|
108
|
-
${[
|
|
109
|
-
Object.keys(bitcoinPickingStrategy).find(
|
|
110
|
-
(k) => bitcoinPickingStrategy[k] === strategy
|
|
111
|
-
),
|
|
112
|
-
pickUnconfirmedRBF && "pick-unconfirmed",
|
|
113
|
-
t.rbf && "RBF-enabled",
|
|
114
|
-
]
|
|
115
|
-
.filter(Boolean)
|
|
116
|
-
.join(" ")}${excludeUTXOs
|
|
117
|
-
.slice(0, displayAll ? excludeUTXOs.length : n)
|
|
118
|
-
.map((utxo) => `\nexclude ${utxo.hash} @${utxo.outputIndex}`)
|
|
119
|
-
.join("")}`;
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
// TODO vvvvv DEPRECATED, TO BE REMOVED vvvvv
|
|
123
|
-
|
|
124
28
|
function bchExplicit(str: string): string {
|
|
125
29
|
const explicit = str.includes(":") ? str : "bitcoincash:" + str;
|
|
126
30
|
|
|
@@ -254,7 +158,6 @@ export async function parseBitcoinOutput(
|
|
|
254
158
|
outputIndex,
|
|
255
159
|
blockHeight,
|
|
256
160
|
address,
|
|
257
|
-
isChange: false,
|
|
258
161
|
path,
|
|
259
162
|
value,
|
|
260
163
|
rbf,
|
|
@@ -298,8 +201,100 @@ export function isChangeOutput(output: BitcoinOutput): boolean {
|
|
|
298
201
|
const p = output.path.split("/");
|
|
299
202
|
return p[p.length - 2] === "1";
|
|
300
203
|
}
|
|
301
|
-
// ==============================================================================
|
|
302
204
|
|
|
205
|
+
const fromFeeItemsRaw = (fir: FeeItemsRaw): FeeItems => ({
|
|
206
|
+
items: fir.items.map((fi) => ({
|
|
207
|
+
key: fi.key,
|
|
208
|
+
speed: fi.speed,
|
|
209
|
+
feePerByte: new BigNumber(fi.feePerByte),
|
|
210
|
+
})),
|
|
211
|
+
defaultFeePerByte: new BigNumber(fir.defaultFeePerByte),
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
const toFeeItemsRaw = (fir: FeeItems): FeeItemsRaw => ({
|
|
215
|
+
items: fir.items.map((fi) => ({
|
|
216
|
+
key: fi.key,
|
|
217
|
+
speed: fi.speed,
|
|
218
|
+
feePerByte: fi.feePerByte.toString(),
|
|
219
|
+
})),
|
|
220
|
+
defaultFeePerByte: fir.defaultFeePerByte.toString(),
|
|
221
|
+
});
|
|
222
|
+
|
|
223
|
+
export const fromTransactionRaw = (tr: TransactionRaw): Transaction => {
|
|
224
|
+
const common = fromTransactionCommonRaw(tr);
|
|
225
|
+
return {
|
|
226
|
+
...common,
|
|
227
|
+
rbf: tr.rbf,
|
|
228
|
+
utxoStrategy: tr.utxoStrategy,
|
|
229
|
+
family: tr.family,
|
|
230
|
+
feePerByte: tr.feePerByte ? new BigNumber(tr.feePerByte) : null,
|
|
231
|
+
networkInfo: tr.networkInfo && {
|
|
232
|
+
family: tr.networkInfo.family,
|
|
233
|
+
feeItems: fromFeeItemsRaw(tr.networkInfo.feeItems),
|
|
234
|
+
},
|
|
235
|
+
feesStrategy: tr.feesStrategy,
|
|
236
|
+
};
|
|
237
|
+
};
|
|
238
|
+
export const toTransactionRaw = (t: Transaction): TransactionRaw => {
|
|
239
|
+
const common = toTransactionCommonRaw(t);
|
|
240
|
+
return {
|
|
241
|
+
...common,
|
|
242
|
+
rbf: t.rbf,
|
|
243
|
+
utxoStrategy: t.utxoStrategy,
|
|
244
|
+
family: t.family,
|
|
245
|
+
feePerByte: t.feePerByte ? t.feePerByte.toString() : null,
|
|
246
|
+
networkInfo: t.networkInfo && {
|
|
247
|
+
family: t.networkInfo.family,
|
|
248
|
+
feeItems: toFeeItemsRaw(t.networkInfo.feeItems),
|
|
249
|
+
},
|
|
250
|
+
feesStrategy: t.feesStrategy,
|
|
251
|
+
};
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
const formatNetworkInfo = (
|
|
255
|
+
networkInfo:
|
|
256
|
+
| {
|
|
257
|
+
feeItems: FeeItems;
|
|
258
|
+
}
|
|
259
|
+
| null
|
|
260
|
+
| undefined
|
|
261
|
+
) => {
|
|
262
|
+
if (!networkInfo) return "network info not loaded";
|
|
263
|
+
return `network fees: ${networkInfo.feeItems.items
|
|
264
|
+
.map((i) => i.key + "=" + i.feePerByte.toString())
|
|
265
|
+
.join(", ")}`;
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
export const formatTransaction = (t: Transaction, account: Account): string => {
|
|
269
|
+
const n = getEnv("DEBUG_UTXO_DISPLAY");
|
|
270
|
+
const { excludeUTXOs, strategy, pickUnconfirmedRBF } = t.utxoStrategy;
|
|
271
|
+
const displayAll = excludeUTXOs.length <= n;
|
|
272
|
+
return `
|
|
273
|
+
SEND ${
|
|
274
|
+
t.useAllAmount
|
|
275
|
+
? "MAX"
|
|
276
|
+
: formatCurrencyUnit(getAccountUnit(account), t.amount, {
|
|
277
|
+
showCode: true,
|
|
278
|
+
disableRounding: true,
|
|
279
|
+
})
|
|
280
|
+
}
|
|
281
|
+
TO ${t.recipient}
|
|
282
|
+
with feePerByte=${
|
|
283
|
+
t.feePerByte ? t.feePerByte.toString() : "?"
|
|
284
|
+
} (${formatNetworkInfo(t.networkInfo)})
|
|
285
|
+
${[
|
|
286
|
+
Object.keys(bitcoinPickingStrategy).find(
|
|
287
|
+
(k) => bitcoinPickingStrategy[k] === strategy
|
|
288
|
+
),
|
|
289
|
+
pickUnconfirmedRBF && "pick-unconfirmed",
|
|
290
|
+
t.rbf && "RBF-enabled",
|
|
291
|
+
]
|
|
292
|
+
.filter(Boolean)
|
|
293
|
+
.join(" ")}${excludeUTXOs
|
|
294
|
+
.slice(0, displayAll ? excludeUTXOs.length : n)
|
|
295
|
+
.map((utxo) => `\nexclude ${utxo.hash} @${utxo.outputIndex}`)
|
|
296
|
+
.join("")}`;
|
|
297
|
+
};
|
|
303
298
|
export default {
|
|
304
299
|
fromTransactionRaw,
|
|
305
300
|
toTransactionRaw,
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import type { BigNumber } from "bignumber.js";
|
|
2
|
-
import type { SerializedAccount as WalletSerializedAccount } from "./wallet-btc";
|
|
3
|
-
|
|
4
2
|
import type {
|
|
5
3
|
TransactionCommon,
|
|
6
4
|
TransactionCommonRaw,
|
|
@@ -11,8 +9,43 @@ import type {
|
|
|
11
9
|
CoreDerivationPath,
|
|
12
10
|
Spec,
|
|
13
11
|
} from "../../libcore/types";
|
|
12
|
+
export type BitcoinInput = {
|
|
13
|
+
address: string | null | undefined;
|
|
14
|
+
value: BigNumber | null | undefined;
|
|
15
|
+
previousTxHash: string | null | undefined;
|
|
16
|
+
previousOutputIndex: number;
|
|
17
|
+
};
|
|
18
|
+
export type BitcoinInputRaw = [
|
|
19
|
+
string | null | undefined,
|
|
20
|
+
string | null | undefined,
|
|
21
|
+
string | null | undefined,
|
|
22
|
+
number
|
|
23
|
+
];
|
|
24
|
+
export type BitcoinOutput = {
|
|
25
|
+
hash: string;
|
|
26
|
+
outputIndex: number;
|
|
27
|
+
blockHeight: number | null | undefined;
|
|
28
|
+
address: string | null | undefined;
|
|
29
|
+
path: string | null | undefined;
|
|
30
|
+
value: BigNumber;
|
|
31
|
+
rbf: boolean;
|
|
32
|
+
};
|
|
33
|
+
export type BitcoinOutputRaw = [
|
|
34
|
+
string,
|
|
35
|
+
number,
|
|
36
|
+
number | null | undefined,
|
|
37
|
+
string | null | undefined,
|
|
38
|
+
string | null | undefined,
|
|
39
|
+
string,
|
|
40
|
+
number // rbf 0/1 for compression
|
|
41
|
+
];
|
|
42
|
+
export type BitcoinResources = {
|
|
43
|
+
utxos: BitcoinOutput[];
|
|
44
|
+
};
|
|
45
|
+
export type BitcoinResourcesRaw = {
|
|
46
|
+
utxos: BitcoinOutputRaw[];
|
|
47
|
+
};
|
|
14
48
|
|
|
15
|
-
//* TODO REPLACE <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
|
16
49
|
declare class CoreBitcoinLikeInput {
|
|
17
50
|
getPreviousTransaction(): Promise<string>;
|
|
18
51
|
getPreviousTxHash(): Promise<string | null | undefined>;
|
|
@@ -97,93 +130,6 @@ export type CoreOperationSpecifics = {
|
|
|
97
130
|
export type CoreCurrencySpecifics = {
|
|
98
131
|
getBitcoinLikeNetworkParameters(): Promise<CoreBitcoinLikeNetworkParameters>;
|
|
99
132
|
};
|
|
100
|
-
/*/ WITH >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
|
101
|
-
export type CoreStatics = Record<string, never>;
|
|
102
|
-
export type CoreAccountSpecifics = Record<string, never>;
|
|
103
|
-
export type CoreOperationSpecifics = Record<string, never>;
|
|
104
|
-
export type CoreCurrencySpecifics = Record<string, never>;
|
|
105
|
-
//*/ // ====================================================
|
|
106
|
-
|
|
107
|
-
export type BitcoinInput = {
|
|
108
|
-
address: string | null | undefined;
|
|
109
|
-
value: BigNumber | null | undefined;
|
|
110
|
-
previousTxHash: string | null | undefined;
|
|
111
|
-
previousOutputIndex: number;
|
|
112
|
-
};
|
|
113
|
-
export type BitcoinInputRaw = [
|
|
114
|
-
string | null | undefined,
|
|
115
|
-
string | null | undefined,
|
|
116
|
-
string | null | undefined,
|
|
117
|
-
number
|
|
118
|
-
];
|
|
119
|
-
export type BitcoinOutput = {
|
|
120
|
-
hash: string;
|
|
121
|
-
outputIndex: number;
|
|
122
|
-
blockHeight: number | null | undefined;
|
|
123
|
-
address: string | null | undefined;
|
|
124
|
-
isChange: boolean;
|
|
125
|
-
path: string | null | undefined; // TODO DEPRECATED, TO BE REMOVED
|
|
126
|
-
value: BigNumber;
|
|
127
|
-
rbf: boolean;
|
|
128
|
-
};
|
|
129
|
-
export type BitcoinOutputRaw = [
|
|
130
|
-
string,
|
|
131
|
-
number,
|
|
132
|
-
number | null | undefined,
|
|
133
|
-
string | null | undefined,
|
|
134
|
-
number,
|
|
135
|
-
string | null | undefined, // TODO DEPRECATED, TO BE REMOVED
|
|
136
|
-
string,
|
|
137
|
-
number // rbf 0/1 for compression
|
|
138
|
-
];
|
|
139
|
-
export type BitcoinResources = {
|
|
140
|
-
utxos: BitcoinOutput[];
|
|
141
|
-
serializedData?: WalletSerializedAccount; // TODO '?' TO BE REMOVED
|
|
142
|
-
};
|
|
143
|
-
export type BitcoinResourcesRaw = {
|
|
144
|
-
utxos: BitcoinOutputRaw[];
|
|
145
|
-
serializedData?: WalletSerializedAccount; // TODO '?' TO BE REMOVED
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
export const BitcoinLikeFeePolicy = Object.freeze({
|
|
149
|
-
PER_BYTE: "PER_BYTE",
|
|
150
|
-
PER_KBYTE: "PER_KBYTE",
|
|
151
|
-
});
|
|
152
|
-
|
|
153
|
-
export const BitcoinLikeSigHashType = Object.freeze({
|
|
154
|
-
SIGHASH_ALL: 0x01,
|
|
155
|
-
SIGHASH_NONE: 0x02,
|
|
156
|
-
SIGHASH_SINGLE: 0x03,
|
|
157
|
-
SIGHASH_FORKID: 0x40,
|
|
158
|
-
SIGHASH_ANYONECANPAY: 0x80,
|
|
159
|
-
});
|
|
160
|
-
|
|
161
|
-
// TODO maybe not all fields are useful
|
|
162
|
-
export type BitcoinLikeNetworkParameters = {
|
|
163
|
-
// Name of the network.
|
|
164
|
-
identifier: string;
|
|
165
|
-
// Version of the Pay To Public Hash standard.
|
|
166
|
-
P2PKHVersion: Buffer;
|
|
167
|
-
// Version of the Pay To Script Hash standard.
|
|
168
|
-
P2SHVersion: Buffer;
|
|
169
|
-
// Version of the Extended Public Key standard.
|
|
170
|
-
xpubVersion: Buffer;
|
|
171
|
-
// Policy to use when expressing fee amount, values in BitcoinLikeFeePolicy
|
|
172
|
-
feePolicy: string;
|
|
173
|
-
// Minimal amount a UTXO should have before being considered BTC dust.
|
|
174
|
-
dustAmount: BigNumber;
|
|
175
|
-
// Constant prefix to prepend all signature messages.
|
|
176
|
-
messagePrefix: string;
|
|
177
|
-
// Are transactions encoded with timestamp?
|
|
178
|
-
usesTimestampedTransaction: boolean;
|
|
179
|
-
// Delay applied to all timestamps. Used to debounce transactions.
|
|
180
|
-
timestampDelay: BigNumber;
|
|
181
|
-
// Bitcoin signature flag indicating what part of a transaction a signature signs, values in BitcoinLikeSigHashType
|
|
182
|
-
sigHash: number;
|
|
183
|
-
// Addition BIPs enabled for this network.
|
|
184
|
-
additionalBIPs: string[];
|
|
185
|
-
};
|
|
186
|
-
|
|
187
133
|
export type FeeItem = {
|
|
188
134
|
key: string;
|
|
189
135
|
speed: string;
|
|
@@ -217,6 +163,7 @@ export const bitcoinPickingStrategy = {
|
|
|
217
163
|
};
|
|
218
164
|
export type BitcoinPickingStrategy =
|
|
219
165
|
typeof bitcoinPickingStrategy[keyof typeof bitcoinPickingStrategy];
|
|
166
|
+
// FIXME the UtxoStrategy level should be flattened back in Transaction
|
|
220
167
|
export type UtxoStrategy = {
|
|
221
168
|
strategy: BitcoinPickingStrategy;
|
|
222
169
|
pickUnconfirmedRBF: boolean;
|
|
@@ -239,8 +186,6 @@ export type TransactionRaw = TransactionCommonRaw & {
|
|
|
239
186
|
feePerByte: string | null | undefined;
|
|
240
187
|
networkInfo: NetworkInfoRaw | null | undefined;
|
|
241
188
|
};
|
|
242
|
-
|
|
243
|
-
//* TODO REPLACE <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
|
244
189
|
export const reflect = (
|
|
245
190
|
declare: (arg0: string, arg1: Spec) => void
|
|
246
191
|
): {
|
|
@@ -370,6 +315,3 @@ export const reflect = (
|
|
|
370
315
|
},
|
|
371
316
|
};
|
|
372
317
|
};
|
|
373
|
-
/*/ WITH >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
|
374
|
-
export const reflect = (_declare: any): void => {};
|
|
375
|
-
//*/ // ====================================================
|