@ledgerhq/live-common 27.0.0 → 27.1.0-next.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__/families/bitcoin/wallet-btc/xpub.syncing.integration.test.js +2 -2
- package/lib/__tests__/test-helpers/environment.d.ts +2 -0
- package/lib/__tests__/test-helpers/environment.d.ts.map +1 -0
- package/lib/__tests__/test-helpers/environment.js +107 -0
- package/lib/__tests__/test-helpers/environment.js.map +1 -0
- package/lib/__tests__/test-helpers/setup.d.ts +1 -1
- package/lib/__tests__/test-helpers/setup.d.ts.map +1 -1
- package/lib/__tests__/test-helpers/setup.js +1 -101
- package/lib/__tests__/test-helpers/setup.js.map +1 -1
- package/lib/account/serialization.d.ts +2 -0
- package/lib/account/serialization.d.ts.map +1 -1
- package/lib/account/serialization.js +105 -47
- package/lib/account/serialization.js.map +1 -1
- package/lib/apps/support.d.ts.map +1 -1
- package/lib/apps/support.js +1 -0
- package/lib/apps/support.js.map +1 -1
- package/lib/bot/bot-test-context.d.ts +3 -0
- package/lib/bot/bot-test-context.d.ts.map +1 -0
- package/lib/bot/bot-test-context.js +26 -0
- package/lib/bot/bot-test-context.js.map +1 -0
- package/lib/bot/bot-test-context.test.d.ts +2 -0
- package/lib/bot/bot-test-context.test.d.ts.map +1 -0
- package/lib/bot/bot-test-context.test.js +41 -0
- package/lib/bot/bot-test-context.test.js.map +1 -0
- package/lib/bot/cli.d.ts +2 -0
- package/lib/bot/cli.d.ts.map +1 -0
- package/lib/bot/cli.js +14 -0
- package/lib/bot/cli.js.map +1 -0
- package/lib/bot/engine.d.ts +5 -5
- package/lib/bot/engine.d.ts.map +1 -1
- package/lib/bot/engine.js +161 -112
- package/lib/bot/engine.js.map +1 -1
- package/lib/bot/formatters.d.ts +2 -2
- package/lib/bot/formatters.d.ts.map +1 -1
- package/lib/bot/formatters.js +41 -15
- package/lib/bot/formatters.js.map +1 -1
- package/lib/bot/index.d.ts +1 -1
- package/lib/bot/index.d.ts.map +1 -1
- package/lib/bot/index.js +90 -15
- package/lib/bot/index.js.map +1 -1
- package/lib/bot/specs.d.ts +2 -1
- package/lib/bot/specs.d.ts.map +1 -1
- package/lib/bot/specs.js +13 -9
- package/lib/bot/specs.js.map +1 -1
- package/lib/bot/types.d.ts +5 -2
- package/lib/bot/types.d.ts.map +1 -1
- package/lib/countervalues/logic.integration.test.js +65 -0
- package/lib/countervalues/logic.integration.test.js.map +1 -1
- package/lib/countervalues/modules/weth.d.ts.map +1 -1
- package/lib/countervalues/modules/weth.js +5 -10
- package/lib/countervalues/modules/weth.js.map +1 -1
- package/lib/currencies/sortByMarketcap.d.ts +0 -2
- package/lib/currencies/sortByMarketcap.d.ts.map +1 -1
- package/lib/currencies/sortByMarketcap.js +3 -17
- package/lib/currencies/sortByMarketcap.js.map +1 -1
- package/lib/currencies/sortByMarketcap.test.js +0 -5
- package/lib/currencies/sortByMarketcap.test.js.map +1 -1
- package/lib/env.js +1 -1
- package/lib/families/algorand/specs.d.ts.map +1 -1
- package/lib/families/algorand/specs.js +18 -10
- package/lib/families/algorand/specs.js.map +1 -1
- package/lib/families/algorand/speculos-deviceActions.d.ts +1 -4
- package/lib/families/algorand/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/algorand/speculos-deviceActions.js +25 -8
- package/lib/families/algorand/speculos-deviceActions.js.map +1 -1
- package/lib/families/bitcoin/bridge/mock.d.ts.map +1 -1
- package/lib/families/bitcoin/bridge/mock.js +6 -1
- package/lib/families/bitcoin/bridge/mock.js.map +1 -1
- package/lib/families/bitcoin/datasets/bitcoin_cash.d.ts.map +1 -1
- package/lib/families/bitcoin/datasets/bitcoin_cash.js +1 -1
- package/lib/families/bitcoin/datasets/bitcoin_cash.js.map +1 -1
- package/lib/families/bitcoin/datasets/dash.d.ts.map +1 -1
- package/lib/families/bitcoin/datasets/dash.js +1 -1
- package/lib/families/bitcoin/datasets/dash.js.map +1 -1
- package/lib/families/bitcoin/datasets/decred.d.ts.map +1 -1
- package/lib/families/bitcoin/datasets/decred.js +1 -1
- package/lib/families/bitcoin/datasets/decred.js.map +1 -1
- package/lib/families/bitcoin/datasets/digibyte.d.ts.map +1 -1
- package/lib/families/bitcoin/datasets/digibyte.js +8 -2
- package/lib/families/bitcoin/datasets/digibyte.js.map +1 -1
- package/lib/families/bitcoin/datasets/dogecoin.d.ts.map +1 -1
- package/lib/families/bitcoin/datasets/dogecoin.js +1 -1
- package/lib/families/bitcoin/datasets/dogecoin.js.map +1 -1
- package/lib/families/bitcoin/datasets/komodo.js +1 -1
- package/lib/families/bitcoin/datasets/komodo.js.map +1 -1
- package/lib/families/bitcoin/datasets/litecoin.d.ts.map +1 -1
- package/lib/families/bitcoin/datasets/litecoin.js +8 -2
- package/lib/families/bitcoin/datasets/litecoin.js.map +1 -1
- package/lib/families/bitcoin/datasets/peercoin.js +1 -1
- package/lib/families/bitcoin/datasets/peercoin.js.map +1 -1
- package/lib/families/bitcoin/datasets/pivx.js +1 -1
- package/lib/families/bitcoin/datasets/pivx.js.map +1 -1
- package/lib/families/bitcoin/datasets/qtum.js +1 -1
- package/lib/families/bitcoin/datasets/qtum.js.map +1 -1
- package/lib/families/bitcoin/datasets/stakenet.d.ts.map +1 -1
- package/lib/families/bitcoin/datasets/stakenet.js +1 -1
- package/lib/families/bitcoin/datasets/stakenet.js.map +1 -1
- package/lib/families/bitcoin/datasets/vertcoin.d.ts.map +1 -1
- package/lib/families/bitcoin/datasets/vertcoin.js +1 -1
- package/lib/families/bitcoin/datasets/vertcoin.js.map +1 -1
- package/lib/families/bitcoin/datasets/viacoin.d.ts.map +1 -1
- package/lib/families/bitcoin/datasets/viacoin.js +1 -1
- package/lib/families/bitcoin/datasets/viacoin.js.map +1 -1
- package/lib/families/bitcoin/datasets/zcash.d.ts.map +1 -1
- package/lib/families/bitcoin/datasets/zcash.js +1 -1
- package/lib/families/bitcoin/datasets/zcash.js.map +1 -1
- package/lib/families/bitcoin/datasets/zencash.d.ts.map +1 -1
- package/lib/families/bitcoin/datasets/zencash.js +1 -1
- package/lib/families/bitcoin/datasets/zencash.js.map +1 -1
- package/lib/families/bitcoin/platformAdapter.test.d.ts +2 -0
- package/lib/families/bitcoin/platformAdapter.test.d.ts.map +1 -0
- package/lib/families/bitcoin/platformAdapter.test.js +48 -0
- package/lib/families/bitcoin/platformAdapter.test.js.map +1 -0
- package/lib/families/bitcoin/specs.d.ts.map +1 -1
- package/lib/families/bitcoin/specs.js +62 -24
- package/lib/families/bitcoin/specs.js.map +1 -1
- package/lib/families/bitcoin/speculos-deviceActions.d.ts +1 -4
- package/lib/families/bitcoin/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/bitcoin/speculos-deviceActions.js +2 -4
- package/lib/families/bitcoin/speculos-deviceActions.js.map +1 -1
- package/lib/families/cardano/js-estimateMaxSpendable.js +1 -1
- package/lib/families/cardano/js-estimateMaxSpendable.js.map +1 -1
- package/lib/families/cardano/specs.d.ts.map +1 -1
- package/lib/families/cardano/specs.js +19 -8
- package/lib/families/cardano/specs.js.map +1 -1
- package/lib/families/cardano/speculos-deviceActions.d.ts +1 -4
- package/lib/families/cardano/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/cardano/speculos-deviceActions.js +2 -2
- package/lib/families/cardano/speculos-deviceActions.js.map +1 -1
- package/lib/families/celo/api/hubble.d.ts +6 -1
- package/lib/families/celo/api/hubble.d.ts.map +1 -1
- package/lib/families/celo/api/hubble.js +135 -13
- package/lib/families/celo/api/hubble.js.map +1 -1
- package/lib/families/celo/api/index.d.ts +1 -1
- package/lib/families/celo/api/index.d.ts.map +1 -1
- package/lib/families/celo/api/index.js +2 -1
- package/lib/families/celo/api/index.js.map +1 -1
- package/lib/families/celo/api/sdk.d.ts +22 -0
- package/lib/families/celo/api/sdk.d.ts.map +1 -1
- package/lib/families/celo/api/sdk.js +168 -1
- package/lib/families/celo/api/sdk.js.map +1 -1
- package/lib/families/celo/bridge/js.d.ts.map +1 -1
- package/lib/families/celo/bridge/js.js +4 -42
- package/lib/families/celo/bridge/js.js.map +1 -1
- package/lib/families/celo/cli-transaction.d.ts +12 -2
- package/lib/families/celo/cli-transaction.d.ts.map +1 -1
- package/lib/families/celo/cli-transaction.js +38 -4
- package/lib/families/celo/cli-transaction.js.map +1 -1
- package/lib/families/celo/datasets/celo.scanAccounts.1.d.ts +1 -0
- package/lib/families/celo/datasets/celo.scanAccounts.1.d.ts.map +1 -1
- package/lib/families/celo/datasets/celo.scanAccounts.1.js +298 -2
- package/lib/families/celo/datasets/celo.scanAccounts.1.js.map +1 -1
- package/lib/families/celo/errors.d.ts +2 -0
- package/lib/families/celo/errors.d.ts.map +1 -0
- package/lib/families/celo/errors.js +6 -0
- package/lib/families/celo/errors.js.map +1 -0
- package/lib/families/celo/js-buildTransaction.d.ts +2 -3
- package/lib/families/celo/js-buildTransaction.d.ts.map +1 -1
- package/lib/families/celo/js-buildTransaction.js +194 -19
- package/lib/families/celo/js-buildTransaction.js.map +1 -1
- package/lib/families/celo/js-createTransaction.d.ts.map +1 -1
- package/lib/families/celo/js-createTransaction.js +3 -1
- package/lib/families/celo/js-createTransaction.js.map +1 -1
- package/lib/families/celo/js-estimateMaxSpendable.d.ts.map +1 -1
- package/lib/families/celo/js-estimateMaxSpendable.js.map +1 -1
- package/lib/families/celo/js-getFeesForTransaction.d.ts +2 -3
- package/lib/families/celo/js-getFeesForTransaction.d.ts.map +1 -1
- package/lib/families/celo/js-getFeesForTransaction.js +137 -10
- package/lib/families/celo/js-getFeesForTransaction.js.map +1 -1
- package/lib/families/celo/js-getTransactionStatus.d.ts +2 -3
- package/lib/families/celo/js-getTransactionStatus.d.ts.map +1 -1
- package/lib/families/celo/js-getTransactionStatus.js +97 -41
- package/lib/families/celo/js-getTransactionStatus.js.map +1 -1
- package/lib/families/celo/js-prepareTransaction.d.ts +2 -3
- package/lib/families/celo/js-prepareTransaction.d.ts.map +1 -1
- package/lib/families/celo/js-prepareTransaction.js +8 -3
- package/lib/families/celo/js-prepareTransaction.js.map +1 -1
- package/lib/families/celo/js-signOperation.d.ts.map +1 -1
- package/lib/families/celo/js-signOperation.js +17 -3
- package/lib/families/celo/js-signOperation.js.map +1 -1
- package/lib/families/celo/js-synchronisation.d.ts.map +1 -1
- package/lib/families/celo/js-synchronisation.js +51 -6
- package/lib/families/celo/js-synchronisation.js.map +1 -1
- package/lib/families/celo/logic.d.ts +21 -0
- package/lib/families/celo/logic.d.ts.map +1 -0
- package/lib/families/celo/logic.js +132 -0
- package/lib/families/celo/logic.js.map +1 -0
- package/lib/families/celo/preload.d.ts +10 -0
- package/lib/families/celo/preload.d.ts.map +1 -0
- package/lib/families/celo/preload.js +118 -0
- package/lib/families/celo/preload.js.map +1 -0
- package/lib/families/celo/react.d.ts +4 -0
- package/lib/families/celo/react.d.ts.map +1 -0
- package/lib/families/celo/react.js +47 -0
- package/lib/families/celo/react.js.map +1 -0
- package/lib/families/celo/serialization.d.ts +4 -0
- package/lib/families/celo/serialization.d.ts.map +1 -0
- package/lib/families/celo/serialization.js +55 -0
- package/lib/families/celo/serialization.js.map +1 -0
- package/lib/families/celo/specs/createActivateVoteMutation.d.ts +4 -0
- package/lib/families/celo/specs/createActivateVoteMutation.d.ts.map +1 -0
- package/lib/families/celo/specs/createActivateVoteMutation.js +38 -0
- package/lib/families/celo/specs/createActivateVoteMutation.js.map +1 -0
- package/lib/families/celo/specs/createLockMutation.d.ts +4 -0
- package/lib/families/celo/specs/createLockMutation.d.ts.map +1 -0
- package/lib/families/celo/specs/createLockMutation.js +40 -0
- package/lib/families/celo/specs/createLockMutation.js.map +1 -0
- package/lib/families/celo/specs/createRegisterAccountMutation.d.ts +4 -0
- package/lib/families/celo/specs/createRegisterAccountMutation.d.ts.map +1 -0
- package/lib/families/celo/specs/createRegisterAccountMutation.js +31 -0
- package/lib/families/celo/specs/createRegisterAccountMutation.js.map +1 -0
- package/lib/families/celo/specs/createRevokeVoteMutation.d.ts +4 -0
- package/lib/families/celo/specs/createRevokeVoteMutation.d.ts.map +1 -0
- package/lib/families/celo/specs/createRevokeVoteMutation.js +39 -0
- package/lib/families/celo/specs/createRevokeVoteMutation.js.map +1 -0
- package/lib/families/celo/specs/createSendMutation.d.ts +5 -0
- package/lib/families/celo/specs/createSendMutation.d.ts.map +1 -0
- package/lib/families/celo/specs/createSendMutation.js +44 -0
- package/lib/families/celo/specs/createSendMutation.js.map +1 -0
- package/lib/families/celo/specs/createUnlockMutation.d.ts +4 -0
- package/lib/families/celo/specs/createUnlockMutation.d.ts.map +1 -0
- package/lib/families/celo/specs/createUnlockMutation.js +37 -0
- package/lib/families/celo/specs/createUnlockMutation.js.map +1 -0
- package/lib/families/celo/specs/createVoteMutation.d.ts +4 -0
- package/lib/families/celo/specs/createVoteMutation.d.ts.map +1 -0
- package/lib/families/celo/specs/createVoteMutation.js +51 -0
- package/lib/families/celo/specs/createVoteMutation.js.map +1 -0
- package/lib/families/celo/specs/createWithdrawMutation.d.ts +4 -0
- package/lib/families/celo/specs/createWithdrawMutation.d.ts.map +1 -0
- package/lib/families/celo/specs/createWithdrawMutation.js +36 -0
- package/lib/families/celo/specs/createWithdrawMutation.js.map +1 -0
- package/lib/families/celo/specs/index.d.ts +9 -0
- package/lib/families/celo/specs/index.d.ts.map +1 -0
- package/lib/families/celo/specs/index.js +25 -0
- package/lib/families/celo/specs/index.js.map +1 -0
- package/lib/families/celo/specs.d.ts +1 -1
- package/lib/families/celo/specs.d.ts.map +1 -1
- package/lib/families/celo/specs.js +22 -37
- package/lib/families/celo/specs.js.map +1 -1
- package/lib/families/celo/speculos-deviceActions.d.ts +1 -4
- package/lib/families/celo/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/celo/speculos-deviceActions.js +24 -4
- package/lib/families/celo/speculos-deviceActions.js.map +1 -1
- package/lib/families/celo/transaction.d.ts.map +1 -1
- package/lib/families/celo/transaction.js +8 -6
- package/lib/families/celo/transaction.js.map +1 -1
- package/lib/families/celo/types.d.ts +102 -1
- package/lib/families/celo/types.d.ts.map +1 -1
- package/lib/families/celo/validators.d.ts +3 -0
- package/lib/families/celo/validators.d.ts.map +1 -0
- package/lib/families/celo/validators.js +6 -0
- package/lib/families/celo/validators.js.map +1 -0
- package/lib/families/cosmos/specs.d.ts.map +1 -1
- package/lib/families/cosmos/specs.js +41 -25
- package/lib/families/cosmos/specs.js.map +1 -1
- package/lib/families/cosmos/speculos-deviceActions.d.ts +1 -4
- package/lib/families/cosmos/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/cosmos/speculos-deviceActions.js +2 -4
- package/lib/families/cosmos/speculos-deviceActions.js.map +1 -1
- package/lib/families/crypto_org/specs.d.ts.map +1 -1
- package/lib/families/crypto_org/specs.js +3 -0
- package/lib/families/crypto_org/specs.js.map +1 -1
- package/lib/families/crypto_org/speculos-deviceActions.d.ts +1 -4
- package/lib/families/crypto_org/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/crypto_org/speculos-deviceActions.js +2 -2
- package/lib/families/crypto_org/speculos-deviceActions.js.map +1 -1
- package/lib/families/elrond/specs.d.ts.map +1 -1
- package/lib/families/elrond/specs.js +15 -2
- package/lib/families/elrond/specs.js.map +1 -1
- package/lib/families/elrond/speculos-deviceActions.d.ts +1 -4
- package/lib/families/elrond/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/elrond/speculos-deviceActions.js +2 -4
- package/lib/families/elrond/speculos-deviceActions.js.map +1 -1
- package/lib/families/ethereum/platformAdapter.test.d.ts +2 -0
- package/lib/families/ethereum/platformAdapter.test.d.ts.map +1 -0
- package/lib/families/ethereum/platformAdapter.test.js +88 -0
- package/lib/families/ethereum/platformAdapter.test.js.map +1 -0
- package/lib/families/ethereum/specs.d.ts.map +1 -1
- package/lib/families/ethereum/specs.js +36 -12
- package/lib/families/ethereum/specs.js.map +1 -1
- package/lib/families/ethereum/speculos-deviceActions.d.ts +1 -4
- package/lib/families/ethereum/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/ethereum/speculos-deviceActions.js +2 -4
- package/lib/families/ethereum/speculos-deviceActions.js.map +1 -1
- package/lib/families/filecoin/specs.d.ts.map +1 -1
- package/lib/families/filecoin/specs.js +2 -0
- package/lib/families/filecoin/specs.js.map +1 -1
- package/lib/families/filecoin/speculos-deviceActions.d.ts +1 -4
- package/lib/families/filecoin/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/filecoin/speculos-deviceActions.js +2 -2
- package/lib/families/filecoin/speculos-deviceActions.js.map +1 -1
- package/lib/families/hedera/specs.d.ts.map +1 -1
- package/lib/families/hedera/specs.js +11 -3
- package/lib/families/hedera/specs.js.map +1 -1
- package/lib/families/hedera/speculos-deviceActions.d.ts +1 -4
- package/lib/families/hedera/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/hedera/speculos-deviceActions.js +4 -4
- package/lib/families/hedera/speculos-deviceActions.js.map +1 -1
- package/lib/families/osmosis/specs.d.ts.map +1 -1
- package/lib/families/osmosis/specs.js +13 -5
- package/lib/families/osmosis/specs.js.map +1 -1
- package/lib/families/osmosis/speculos-deviceActions.d.ts +1 -4
- package/lib/families/osmosis/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/osmosis/speculos-deviceActions.js +2 -4
- package/lib/families/osmosis/speculos-deviceActions.js.map +1 -1
- package/lib/families/polkadot/platformAdapter.test.d.ts +2 -0
- package/lib/families/polkadot/platformAdapter.test.d.ts.map +1 -0
- package/lib/families/polkadot/platformAdapter.test.js +51 -0
- package/lib/families/polkadot/platformAdapter.test.js.map +1 -0
- package/lib/families/polkadot/specs.d.ts.map +1 -1
- package/lib/families/polkadot/specs.js +12 -1
- package/lib/families/polkadot/specs.js.map +1 -1
- package/lib/families/polkadot/speculos-deviceActions.d.ts +1 -4
- package/lib/families/polkadot/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/polkadot/speculos-deviceActions.js +2 -4
- package/lib/families/polkadot/speculos-deviceActions.js.map +1 -1
- package/lib/families/ripple/platformAdapter.test.d.ts +2 -0
- package/lib/families/ripple/platformAdapter.test.d.ts.map +1 -0
- package/lib/families/ripple/platformAdapter.test.js +51 -0
- package/lib/families/ripple/platformAdapter.test.js.map +1 -0
- package/lib/families/ripple/specs.d.ts.map +1 -1
- package/lib/families/ripple/specs.js +9 -4
- package/lib/families/ripple/specs.js.map +1 -1
- package/lib/families/ripple/speculos-deviceActions.d.ts +1 -4
- package/lib/families/ripple/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/ripple/speculos-deviceActions.js +2 -4
- package/lib/families/ripple/speculos-deviceActions.js.map +1 -1
- package/lib/families/solana/api/chain/instruction/token/types.d.ts +2 -2
- package/lib/families/solana/specs.d.ts.map +1 -1
- package/lib/families/solana/specs.js +29 -11
- package/lib/families/solana/specs.js.map +1 -1
- package/lib/families/solana/speculos-deviceActions.d.ts +0 -5
- package/lib/families/solana/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/solana/speculos-deviceActions.js +0 -4
- package/lib/families/solana/speculos-deviceActions.js.map +1 -1
- package/lib/families/stellar/api/horizon.d.ts.map +1 -1
- package/lib/families/stellar/api/horizon.js +15 -10
- package/lib/families/stellar/api/horizon.js.map +1 -1
- package/lib/families/stellar/specs.d.ts.map +1 -1
- package/lib/families/stellar/specs.js +30 -12
- package/lib/families/stellar/specs.js.map +1 -1
- package/lib/families/stellar/speculos-deviceActions.d.ts +1 -4
- package/lib/families/stellar/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/stellar/speculos-deviceActions.js +2 -4
- package/lib/families/stellar/speculos-deviceActions.js.map +1 -1
- package/lib/families/tezos/bakers.whitelist-default.d.ts.map +1 -1
- package/lib/families/tezos/bakers.whitelist-default.js +1 -1
- package/lib/families/tezos/bakers.whitelist-default.js.map +1 -1
- package/lib/families/tezos/specs.d.ts.map +1 -1
- package/lib/families/tezos/specs.js +2 -0
- package/lib/families/tezos/specs.js.map +1 -1
- package/lib/families/tezos/speculos-deviceActions.d.ts +1 -4
- package/lib/families/tezos/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/tezos/speculos-deviceActions.js +2 -2
- package/lib/families/tezos/speculos-deviceActions.js.map +1 -1
- package/lib/families/tron/specs.d.ts.map +1 -1
- package/lib/families/tron/specs.js +49 -17
- package/lib/families/tron/specs.js.map +1 -1
- package/lib/families/tron/speculos-deviceActions.d.ts +1 -4
- package/lib/families/tron/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/tron/speculos-deviceActions.js +2 -4
- package/lib/families/tron/speculos-deviceActions.js.map +1 -1
- package/lib/generated/cli-transaction.d.ts +12 -2
- package/lib/generated/cli-transaction.d.ts.map +1 -1
- package/lib/hw/getGenuineCheckFromDeviceId.d.ts +22 -0
- package/lib/hw/getGenuineCheckFromDeviceId.d.ts.map +1 -0
- package/lib/hw/getGenuineCheckFromDeviceId.js +49 -0
- package/lib/hw/getGenuineCheckFromDeviceId.js.map +1 -0
- package/lib/hw/getGenuineCheckFromDeviceId.test.d.ts +2 -0
- package/lib/hw/getGenuineCheckFromDeviceId.test.d.ts.map +1 -0
- package/lib/hw/getGenuineCheckFromDeviceId.test.js +84 -0
- package/lib/hw/getGenuineCheckFromDeviceId.test.js.map +1 -0
- package/lib/hw/getLatestAvailableFirmwareFromDeviceId.d.ts +17 -0
- package/lib/hw/getLatestAvailableFirmwareFromDeviceId.d.ts.map +1 -0
- package/lib/hw/getLatestAvailableFirmwareFromDeviceId.js +27 -0
- package/lib/hw/getLatestAvailableFirmwareFromDeviceId.js.map +1 -0
- package/lib/hw/hooks/useGenuineCheck.d.ts +34 -0
- package/lib/hw/hooks/useGenuineCheck.d.ts.map +1 -0
- package/lib/hw/hooks/useGenuineCheck.js +115 -0
- package/lib/hw/hooks/useGenuineCheck.js.map +1 -0
- package/lib/hw/hooks/useGenuineCheck.test.d.ts +2 -0
- package/lib/hw/hooks/useGenuineCheck.test.d.ts.map +1 -0
- package/lib/hw/hooks/useGenuineCheck.test.js +316 -0
- package/lib/hw/hooks/useGenuineCheck.test.js.map +1 -0
- package/lib/hw/hooks/useGetLatestAvailableFirmware.d.ts +29 -0
- package/lib/hw/hooks/useGetLatestAvailableFirmware.d.ts.map +1 -0
- package/lib/hw/hooks/useGetLatestAvailableFirmware.js +72 -0
- package/lib/hw/hooks/useGetLatestAvailableFirmware.js.map +1 -0
- package/lib/hw/hooks/useGetLatestAvailableFirmware.test.d.ts +2 -0
- package/lib/hw/hooks/useGetLatestAvailableFirmware.test.d.ts.map +1 -0
- package/lib/hw/hooks/useGetLatestAvailableFirmware.test.js +155 -0
- package/lib/hw/hooks/useGetLatestAvailableFirmware.test.js.map +1 -0
- package/lib/load/speculos.d.ts +1 -0
- package/lib/load/speculos.d.ts.map +1 -1
- package/lib/load/speculos.js +2 -1
- package/lib/load/speculos.js.map +1 -1
- package/lib/mock/fixtures/cryptoCurrencies.d.ts +5 -0
- package/lib/mock/fixtures/cryptoCurrencies.d.ts.map +1 -0
- package/lib/mock/fixtures/cryptoCurrencies.js +91 -0
- package/lib/mock/fixtures/cryptoCurrencies.js.map +1 -0
- package/lib/operation.d.ts.map +1 -1
- package/lib/operation.js +6 -0
- package/lib/operation.js.map +1 -1
- package/lib/platform/converters.test.js +44 -218
- package/lib/platform/converters.test.js.map +1 -1
- package/lib/platform/logic.d.ts +44 -0
- package/lib/platform/logic.d.ts.map +1 -1
- package/lib/platform/logic.js +147 -1
- package/lib/platform/logic.js.map +1 -1
- package/lib/platform/logic.test.d.ts +2 -0
- package/lib/platform/logic.test.d.ts.map +1 -0
- package/lib/platform/logic.test.js +903 -0
- package/lib/platform/logic.test.js.map +1 -0
- package/lib/platform/react.d.ts +6 -0
- package/lib/platform/react.d.ts.map +1 -1
- package/lib/platform/react.js +6 -0
- package/lib/platform/react.js.map +1 -1
- package/lib/platform/tracking.d.ts +1 -1
- package/lib/platform/tracking.d.ts.map +1 -1
- package/lib/platform/tracking.test.js +14 -41
- package/lib/platform/tracking.test.js.map +1 -1
- package/lib/reconciliation.d.ts.map +1 -1
- package/lib/reconciliation.js +39 -10
- package/lib/reconciliation.js.map +1 -1
- package/package.json +5 -7
- package/src/__tests__/families/bitcoin/wallet-btc/xpub.syncing.integration.test.ts +2 -2
- package/src/__tests__/test-helpers/environment.ts +91 -0
- package/src/__tests__/test-helpers/setup.ts +2 -91
- package/src/account/serialization.ts +125 -66
- package/src/apps/support.ts +1 -0
- package/src/bot/bot-test-context.test.ts +37 -0
- package/src/bot/bot-test-context.ts +24 -0
- package/src/bot/cli.ts +18 -0
- package/src/bot/engine.ts +109 -73
- package/src/bot/formatters.ts +40 -14
- package/src/bot/index.ts +124 -18
- package/src/bot/specs.ts +10 -5
- package/src/bot/types.ts +7 -3
- package/src/countervalues/logic.integration.test.ts +50 -0
- package/src/countervalues/modules/weth.ts +9 -12
- package/src/currencies/__snapshots__/sortByMarketcap.test.ts.snap +59 -1
- package/src/currencies/sortByMarketcap.test.ts +1 -12
- package/src/currencies/sortByMarketcap.ts +2 -22
- package/src/env.ts +1 -1
- package/src/families/algorand/__snapshots__/bridge.integration.test.ts.snap +733 -8
- package/src/families/algorand/specs.ts +26 -16
- package/src/families/algorand/speculos-deviceActions.ts +31 -10
- package/src/families/bitcoin/__snapshots__/bridge.integration.test.ts.snap +43309 -7957
- package/src/families/bitcoin/bridge/mock.ts +7 -1
- package/src/families/bitcoin/datasets/bitcoin_cash.ts +73 -13
- package/src/families/bitcoin/datasets/dash.ts +29 -17
- package/src/families/bitcoin/datasets/decred.ts +42 -12
- package/src/families/bitcoin/datasets/digibyte.ts +9 -3
- package/src/families/bitcoin/datasets/dogecoin.ts +29 -17
- package/src/families/bitcoin/datasets/komodo.ts +22 -22
- package/src/families/bitcoin/datasets/litecoin.ts +9 -3
- package/src/families/bitcoin/datasets/peercoin.ts +17 -17
- package/src/families/bitcoin/datasets/pivx.ts +17 -17
- package/src/families/bitcoin/datasets/qtum.ts +40 -40
- package/src/families/bitcoin/datasets/stakenet.ts +56 -26
- package/src/families/bitcoin/datasets/vertcoin.ts +43 -55
- package/src/families/bitcoin/datasets/viacoin.ts +35 -23
- package/src/families/bitcoin/datasets/zcash.ts +78 -12
- package/src/families/bitcoin/datasets/zencash.ts +56 -10
- package/src/families/bitcoin/platformAdapter.test.ts +58 -0
- package/src/families/bitcoin/specs.ts +81 -41
- package/src/families/bitcoin/speculos-deviceActions.ts +68 -69
- package/src/families/cardano/js-estimateMaxSpendable.ts +1 -1
- package/src/families/cardano/specs.ts +28 -11
- package/src/families/cardano/speculos-deviceActions.ts +65 -66
- package/src/families/celo/__snapshots__/bridge.integration.test.ts.snap +134 -857
- package/src/families/celo/api/hubble.ts +113 -16
- package/src/families/celo/api/index.ts +1 -1
- package/src/families/celo/api/sdk.ts +88 -0
- package/src/families/celo/bridge/js.ts +2 -3
- package/src/families/celo/cli-transaction.ts +46 -2
- package/src/families/celo/datasets/celo.scanAccounts.1.ts +365 -5
- package/src/families/celo/errors.ts +5 -0
- package/src/families/celo/js-buildTransaction.ts +173 -20
- package/src/families/celo/js-createTransaction.ts +2 -0
- package/src/families/celo/js-estimateMaxSpendable.ts +2 -2
- package/src/families/celo/js-getFeesForTransaction.ts +118 -19
- package/src/families/celo/js-getTransactionStatus.ts +72 -17
- package/src/families/celo/js-prepareTransaction.ts +13 -7
- package/src/families/celo/js-signOperation.ts +22 -5
- package/src/families/celo/js-synchronisation.ts +32 -0
- package/src/families/celo/logic.ts +184 -0
- package/src/families/celo/preload.ts +78 -0
- package/src/families/celo/react.ts +35 -0
- package/src/families/celo/serialization.ts +61 -0
- package/src/families/celo/specs/createActivateVoteMutation.ts +44 -0
- package/src/families/celo/specs/createLockMutation.ts +46 -0
- package/src/families/celo/specs/createRegisterAccountMutation.ts +34 -0
- package/src/families/celo/specs/createRevokeVoteMutation.ts +43 -0
- package/src/families/celo/specs/createSendMutation.ts +44 -0
- package/src/families/celo/specs/createUnlockMutation.ts +44 -0
- package/src/families/celo/specs/createVoteMutation.ts +67 -0
- package/src/families/celo/specs/createWithdrawMutation.ts +44 -0
- package/src/families/celo/specs/index.ts +8 -0
- package/src/families/celo/specs.ts +34 -34
- package/src/families/celo/speculos-deviceActions.ts +63 -45
- package/src/families/celo/transaction.ts +12 -4
- package/src/families/celo/types.ts +113 -0
- package/src/families/celo/validators.ts +2 -0
- package/src/families/cosmos/__snapshots__/bridge.integration.test.ts.snap +246 -5
- package/src/families/cosmos/specs.ts +44 -28
- package/src/families/cosmos/speculos-deviceActions.ts +82 -83
- package/src/families/crypto_org/specs.ts +3 -0
- package/src/families/crypto_org/speculos-deviceActions.ts +58 -59
- package/src/families/elrond/specs.ts +21 -4
- package/src/families/elrond/speculos-deviceActions.ts +41 -42
- package/src/families/ethereum/__snapshots__/bridge.integration.test.ts.snap +90 -90
- package/src/families/ethereum/platformAdapter.test.ts +112 -0
- package/src/families/ethereum/specs.ts +47 -23
- package/src/families/ethereum/speculos-deviceActions.ts +93 -95
- package/src/families/filecoin/specs.ts +2 -1
- package/src/families/filecoin/speculos-deviceActions.ts +61 -62
- package/src/families/hedera/__snapshots__/bridge.integration.test.ts.snap +57 -2
- package/src/families/hedera/specs.ts +13 -5
- package/src/families/hedera/speculos-deviceActions.ts +59 -60
- package/src/families/osmosis/specs.ts +15 -7
- package/src/families/osmosis/speculos-deviceActions.ts +82 -83
- package/src/families/polkadot/platformAdapter.test.ts +61 -0
- package/src/families/polkadot/specs.ts +20 -2
- package/src/families/polkadot/speculos-deviceActions.ts +83 -82
- package/src/families/ripple/platformAdapter.test.ts +54 -0
- package/src/families/ripple/specs.ts +14 -7
- package/src/families/ripple/speculos-deviceActions.ts +72 -73
- package/src/families/solana/specs.ts +33 -14
- package/src/families/solana/speculos-deviceActions.ts +0 -5
- package/src/families/stellar/api/horizon.ts +10 -6
- package/src/families/stellar/specs.ts +37 -19
- package/src/families/stellar/speculos-deviceActions.ts +85 -87
- package/src/families/tezos/bakers.whitelist-default.ts +0 -1
- package/src/families/tezos/specs.ts +2 -0
- package/src/families/tezos/speculos-deviceActions.ts +76 -77
- package/src/families/tron/specs.ts +67 -30
- package/src/families/tron/speculos-deviceActions.ts +81 -84
- package/src/hw/getGenuineCheckFromDeviceId.test.ts +98 -0
- package/src/hw/getGenuineCheckFromDeviceId.ts +61 -0
- package/src/hw/getLatestAvailableFirmwareFromDeviceId.ts +37 -0
- package/src/hw/hooks/useGenuineCheck.test.ts +232 -0
- package/src/hw/hooks/useGenuineCheck.ts +138 -0
- package/src/hw/hooks/useGetLatestAvailableFirmware.test.ts +111 -0
- package/src/hw/hooks/useGetLatestAvailableFirmware.ts +90 -0
- package/src/load/speculos.ts +2 -0
- package/src/mock/fixtures/cryptoCurrencies.ts +88 -0
- package/src/operation.ts +6 -0
- package/src/platform/converters.test.ts +49 -282
- package/src/platform/logic.test.ts +756 -0
- package/src/platform/logic.ts +285 -0
- package/src/platform/react.ts +6 -0
- package/src/platform/tracking.test.ts +6 -7
- package/src/platform/tracking.ts +1 -1
- package/src/reconciliation.ts +88 -43
- package/lib/bot/test.bot.d.ts +0 -2
- package/lib/bot/test.bot.d.ts.map +0 -1
- package/lib/bot/test.bot.js +0 -62
- package/lib/bot/test.bot.js.map +0 -1
- package/lib/generated/speculos-deviceActions.d.ts +0 -56
- package/lib/generated/speculos-deviceActions.d.ts.map +0 -1
- package/lib/generated/speculos-deviceActions.js +0 -42
- package/lib/generated/speculos-deviceActions.js.map +0 -1
- package/src/bot/test.bot.ts +0 -21
- package/src/generated/speculos-deviceActions.ts +0 -37
package/src/platform/logic.ts
CHANGED
|
@@ -1,4 +1,289 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Account,
|
|
3
|
+
AccountLike,
|
|
4
|
+
Operation,
|
|
5
|
+
SignedOperation,
|
|
6
|
+
TransactionCommon,
|
|
7
|
+
} from "@ledgerhq/types-live";
|
|
8
|
+
|
|
9
|
+
import {
|
|
10
|
+
accountToPlatformAccount,
|
|
11
|
+
getPlatformTransactionSignFlowInfos,
|
|
12
|
+
} from "./converters";
|
|
13
|
+
import {
|
|
14
|
+
RawPlatformTransaction,
|
|
15
|
+
RawPlatformSignedTransaction,
|
|
16
|
+
} from "./rawTypes";
|
|
17
|
+
import {
|
|
18
|
+
deserializePlatformTransaction,
|
|
19
|
+
deserializePlatformSignedTransaction,
|
|
20
|
+
} from "./serializers";
|
|
21
|
+
import type { TrackFunction } from "./tracking";
|
|
22
|
+
import { AppManifest } from "./types";
|
|
23
|
+
import { isTokenAccount, getMainAccount, isAccount } from "../account/index";
|
|
24
|
+
import { getAccountBridge } from "../bridge/index";
|
|
25
|
+
import { Transaction } from "../generated/types";
|
|
26
|
+
import { MessageData } from "../hw/signMessage/types";
|
|
27
|
+
import { prepareMessageToSign } from "../hw/signMessage/index";
|
|
28
|
+
|
|
1
29
|
export function translateContent(content: any, locale = "en"): string {
|
|
2
30
|
if (!content || typeof content !== "object") return content;
|
|
3
31
|
return content[locale] || content.en;
|
|
4
32
|
}
|
|
33
|
+
|
|
34
|
+
export type WebPlatformContext = {
|
|
35
|
+
manifest: AppManifest;
|
|
36
|
+
accounts: AccountLike[];
|
|
37
|
+
tracking: Record<string, TrackFunction>;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
function getParentAccount(
|
|
41
|
+
account: AccountLike,
|
|
42
|
+
fromAccounts: AccountLike[]
|
|
43
|
+
): Account | null {
|
|
44
|
+
return isTokenAccount(account)
|
|
45
|
+
? (fromAccounts.find((a) => a.id === account.parentId) as Account)
|
|
46
|
+
: null;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function receiveOnAccountLogic(
|
|
50
|
+
{ manifest, accounts, tracking }: WebPlatformContext,
|
|
51
|
+
accountId: string,
|
|
52
|
+
uiNavigation: (
|
|
53
|
+
account: AccountLike,
|
|
54
|
+
parentAccount: Account | null,
|
|
55
|
+
accountAddress: string
|
|
56
|
+
) => Promise<string>
|
|
57
|
+
): Promise<string> {
|
|
58
|
+
tracking.platformReceiveRequested(manifest);
|
|
59
|
+
|
|
60
|
+
const account = accounts.find((account) => account.id === accountId);
|
|
61
|
+
|
|
62
|
+
if (!account) {
|
|
63
|
+
tracking.platformReceiveFail(manifest);
|
|
64
|
+
return Promise.reject(new Error("Account required"));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const parentAccount = getParentAccount(account, accounts);
|
|
68
|
+
const accountAddress = accountToPlatformAccount(
|
|
69
|
+
account,
|
|
70
|
+
parentAccount ?? undefined //FIXME-STP
|
|
71
|
+
).address;
|
|
72
|
+
|
|
73
|
+
return uiNavigation(account, parentAccount, accountAddress);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function signTransactionLogic(
|
|
77
|
+
{ manifest, accounts, tracking }: WebPlatformContext,
|
|
78
|
+
accountId: string,
|
|
79
|
+
transaction: RawPlatformTransaction,
|
|
80
|
+
uiNavigation: (
|
|
81
|
+
account: AccountLike,
|
|
82
|
+
parentAccount: Account | null,
|
|
83
|
+
signFlowInfos: {
|
|
84
|
+
canEditFees: boolean;
|
|
85
|
+
hasFeesProvided: boolean;
|
|
86
|
+
liveTx: Partial<Transaction>;
|
|
87
|
+
}
|
|
88
|
+
) => Promise<RawPlatformSignedTransaction>
|
|
89
|
+
): Promise<RawPlatformSignedTransaction> {
|
|
90
|
+
tracking.platformSignTransactionRequested(manifest);
|
|
91
|
+
|
|
92
|
+
if (!transaction) {
|
|
93
|
+
tracking.platformSignTransactionFail(manifest);
|
|
94
|
+
return Promise.reject(new Error("Transaction required"));
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
const platformTransaction = deserializePlatformTransaction(transaction);
|
|
98
|
+
const account = accounts.find((account) => account.id === accountId);
|
|
99
|
+
|
|
100
|
+
if (!account) {
|
|
101
|
+
tracking.platformSignTransactionFail(manifest);
|
|
102
|
+
return Promise.reject(new Error("Account required"));
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
const parentAccount = getParentAccount(account, accounts);
|
|
106
|
+
|
|
107
|
+
if (
|
|
108
|
+
(isTokenAccount(account)
|
|
109
|
+
? parentAccount?.currency.family
|
|
110
|
+
: account.currency.family) !== platformTransaction.family
|
|
111
|
+
) {
|
|
112
|
+
return Promise.reject(
|
|
113
|
+
new Error("Transaction family not matching account currency family")
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const { canEditFees, liveTx, hasFeesProvided } =
|
|
118
|
+
getPlatformTransactionSignFlowInfos(platformTransaction);
|
|
119
|
+
|
|
120
|
+
return uiNavigation(account, parentAccount, {
|
|
121
|
+
canEditFees,
|
|
122
|
+
liveTx,
|
|
123
|
+
hasFeesProvided,
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export function broadcastTransactionLogic(
|
|
128
|
+
{ manifest, accounts, tracking }: WebPlatformContext,
|
|
129
|
+
accountId: string,
|
|
130
|
+
signedTransaction: RawPlatformSignedTransaction,
|
|
131
|
+
uiNavigation: (
|
|
132
|
+
account: AccountLike,
|
|
133
|
+
parentAccount: Account | null,
|
|
134
|
+
signedOperation: SignedOperation
|
|
135
|
+
) => Promise<string>
|
|
136
|
+
): Promise<string> {
|
|
137
|
+
if (!signedTransaction) {
|
|
138
|
+
tracking.platformBroadcastFail(manifest);
|
|
139
|
+
return Promise.reject(new Error("Transaction required"));
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
const account = accounts.find((account) => account.id === accountId);
|
|
143
|
+
if (!account) {
|
|
144
|
+
tracking.platformBroadcastFail(manifest);
|
|
145
|
+
return Promise.reject(new Error("Account required"));
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
const parentAccount = getParentAccount(account, accounts);
|
|
149
|
+
|
|
150
|
+
const signedOperation = deserializePlatformSignedTransaction(
|
|
151
|
+
signedTransaction,
|
|
152
|
+
accountId
|
|
153
|
+
);
|
|
154
|
+
|
|
155
|
+
return uiNavigation(account, parentAccount, signedOperation);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export type CompleteExchangeRequest = {
|
|
159
|
+
provider: string;
|
|
160
|
+
fromAccountId: string;
|
|
161
|
+
toAccountId: string;
|
|
162
|
+
transaction: RawPlatformTransaction;
|
|
163
|
+
binaryPayload: string;
|
|
164
|
+
signature: string;
|
|
165
|
+
feesStrategy: string;
|
|
166
|
+
exchangeType: number;
|
|
167
|
+
};
|
|
168
|
+
export type CompleteExchangeUiRequest = {
|
|
169
|
+
provider: string;
|
|
170
|
+
exchange: {
|
|
171
|
+
fromAccount: AccountLike;
|
|
172
|
+
fromParentAccount: Account | null;
|
|
173
|
+
toAccount?: AccountLike;
|
|
174
|
+
toParentAccount: Account | null;
|
|
175
|
+
};
|
|
176
|
+
transaction: TransactionCommon;
|
|
177
|
+
binaryPayload: string;
|
|
178
|
+
signature: string;
|
|
179
|
+
feesStrategy: string;
|
|
180
|
+
exchangeType: number;
|
|
181
|
+
};
|
|
182
|
+
export function completeExchangeLogic(
|
|
183
|
+
{ manifest, accounts, tracking }: WebPlatformContext,
|
|
184
|
+
{
|
|
185
|
+
provider,
|
|
186
|
+
fromAccountId,
|
|
187
|
+
toAccountId,
|
|
188
|
+
transaction,
|
|
189
|
+
binaryPayload,
|
|
190
|
+
signature,
|
|
191
|
+
feesStrategy,
|
|
192
|
+
exchangeType,
|
|
193
|
+
}: CompleteExchangeRequest,
|
|
194
|
+
uiNavigation: (request: CompleteExchangeUiRequest) => Promise<Operation>
|
|
195
|
+
): Promise<Operation> {
|
|
196
|
+
tracking.platformCompleteExchangeRequested(manifest);
|
|
197
|
+
|
|
198
|
+
// Nb get a hold of the actual accounts, and parent accounts
|
|
199
|
+
const fromAccount = accounts.find((a) => a.id === fromAccountId);
|
|
200
|
+
|
|
201
|
+
const toAccount = accounts.find((a) => a.id === toAccountId);
|
|
202
|
+
|
|
203
|
+
if (!fromAccount) {
|
|
204
|
+
return Promise.reject();
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
if (exchangeType === 0x00 && !toAccount) {
|
|
208
|
+
// if we do a swap, a destination account must be provided
|
|
209
|
+
return Promise.reject();
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
const fromParentAccount = getParentAccount(fromAccount, accounts);
|
|
213
|
+
const toParentAccount = toAccount
|
|
214
|
+
? getParentAccount(toAccount, accounts)
|
|
215
|
+
: null;
|
|
216
|
+
const exchange = {
|
|
217
|
+
fromAccount,
|
|
218
|
+
fromParentAccount,
|
|
219
|
+
toAccount,
|
|
220
|
+
toParentAccount,
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
const accountBridge = getAccountBridge(fromAccount, fromParentAccount);
|
|
224
|
+
const mainFromAccount = getMainAccount(fromAccount, fromParentAccount);
|
|
225
|
+
|
|
226
|
+
if (transaction.family !== mainFromAccount.currency.family) {
|
|
227
|
+
return Promise.reject(
|
|
228
|
+
new Error("Account and transaction must be from the same family")
|
|
229
|
+
);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
const platformTransaction = deserializePlatformTransaction(transaction);
|
|
233
|
+
const { liveTx: liveTransaction } =
|
|
234
|
+
getPlatformTransactionSignFlowInfos(platformTransaction);
|
|
235
|
+
|
|
236
|
+
let processedTransaction = accountBridge.createTransaction(mainFromAccount);
|
|
237
|
+
processedTransaction = accountBridge.updateTransaction(
|
|
238
|
+
{
|
|
239
|
+
...processedTransaction,
|
|
240
|
+
recipient: liveTransaction.recipient,
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
...liveTransaction,
|
|
244
|
+
feesStrategy,
|
|
245
|
+
}
|
|
246
|
+
);
|
|
247
|
+
|
|
248
|
+
return uiNavigation({
|
|
249
|
+
provider,
|
|
250
|
+
exchange,
|
|
251
|
+
transaction: processedTransaction,
|
|
252
|
+
binaryPayload,
|
|
253
|
+
signature,
|
|
254
|
+
feesStrategy,
|
|
255
|
+
exchangeType,
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
export function signMessageLogic(
|
|
260
|
+
{ manifest, accounts, tracking }: WebPlatformContext,
|
|
261
|
+
accountId: string,
|
|
262
|
+
message: string,
|
|
263
|
+
uiNavigation: (
|
|
264
|
+
account: AccountLike,
|
|
265
|
+
message: MessageData | null
|
|
266
|
+
) => Promise<string>
|
|
267
|
+
): Promise<string> {
|
|
268
|
+
tracking.platformSignMessageRequested(manifest);
|
|
269
|
+
|
|
270
|
+
const account = accounts.find((account) => account.id === accountId);
|
|
271
|
+
if (account === undefined) {
|
|
272
|
+
tracking.platformSignMessageFail(manifest);
|
|
273
|
+
return Promise.reject(new Error("account not found"));
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
let formattedMessage: MessageData | null;
|
|
277
|
+
try {
|
|
278
|
+
if (isAccount(account)) {
|
|
279
|
+
formattedMessage = prepareMessageToSign(account, message);
|
|
280
|
+
} else {
|
|
281
|
+
throw new Error("account provided should be the main one");
|
|
282
|
+
}
|
|
283
|
+
} catch (error) {
|
|
284
|
+
tracking.platformSignMessageFail(manifest);
|
|
285
|
+
return Promise.reject(error);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
return uiNavigation(account, formattedMessage);
|
|
289
|
+
}
|
package/src/platform/react.ts
CHANGED
|
@@ -20,6 +20,12 @@ import {
|
|
|
20
20
|
import { getParentAccount } from "../account";
|
|
21
21
|
import { listCurrencies } from "../currencies";
|
|
22
22
|
|
|
23
|
+
/**
|
|
24
|
+
* TODO: we might want to use "searchParams.append" instead of "searchParams.set"
|
|
25
|
+
* to handle duplicated query params (example: "?foo=bar&foo=baz")
|
|
26
|
+
*
|
|
27
|
+
* We can also use the stringify method of qs (https://github.com/ljharb/qs#stringifying)
|
|
28
|
+
*/
|
|
23
29
|
export function usePlatformUrl(
|
|
24
30
|
manifest: AppManifest,
|
|
25
31
|
params: { background: string; text: string; loadDate?: Date },
|
|
@@ -2,7 +2,7 @@ import trackingWrapper from "./tracking";
|
|
|
2
2
|
import { AppManifest } from "./types";
|
|
3
3
|
|
|
4
4
|
describe("trackingWrapper", () => {
|
|
5
|
-
|
|
5
|
+
test.each([
|
|
6
6
|
{
|
|
7
7
|
method: "platformLoad",
|
|
8
8
|
message: "Platform Load",
|
|
@@ -107,10 +107,9 @@ describe("trackingWrapper", () => {
|
|
|
107
107
|
method: "platformSignMessageUserRefused",
|
|
108
108
|
message: "Platform sign message user refused",
|
|
109
109
|
},
|
|
110
|
-
]
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
it(`calls once inner trackPlatform function ${method} with event named: ${message}`, () => {
|
|
110
|
+
])(
|
|
111
|
+
"calls once inner trackPlatform function $method with event named: $message",
|
|
112
|
+
({ method, message }) => {
|
|
114
113
|
// Given
|
|
115
114
|
const appManifest = appManifestFixture();
|
|
116
115
|
const mockedTrack = jest.fn();
|
|
@@ -127,8 +126,8 @@ describe("trackingWrapper", () => {
|
|
|
127
126
|
},
|
|
128
127
|
null
|
|
129
128
|
);
|
|
130
|
-
}
|
|
131
|
-
|
|
129
|
+
}
|
|
130
|
+
);
|
|
132
131
|
});
|
|
133
132
|
|
|
134
133
|
function appManifestFixture(name = "live-app"): AppManifest {
|
package/src/platform/tracking.ts
CHANGED
package/src/reconciliation.ts
CHANGED
|
@@ -20,17 +20,24 @@ import {
|
|
|
20
20
|
fromCosmosResourcesRaw,
|
|
21
21
|
fromBitcoinResourcesRaw,
|
|
22
22
|
fromAlgorandResourcesRaw,
|
|
23
|
+
fromCardanoResourceRaw,
|
|
23
24
|
fromPolkadotResourcesRaw,
|
|
24
25
|
fromTezosResourcesRaw,
|
|
25
26
|
fromElrondResourcesRaw,
|
|
26
27
|
fromCryptoOrgResourcesRaw,
|
|
27
28
|
fromSolanaResourcesRaw,
|
|
29
|
+
fromCeloResourcesRaw,
|
|
28
30
|
fromNFTRaw,
|
|
29
|
-
|
|
31
|
+
toTronResourcesRaw,
|
|
32
|
+
toCosmosResourcesRaw,
|
|
33
|
+
toAlgorandResourcesRaw,
|
|
34
|
+
toCardanoResourceRaw,
|
|
35
|
+
toPolkadotResourcesRaw,
|
|
36
|
+
toTezosResourcesRaw,
|
|
37
|
+
toElrondResourcesRaw,
|
|
30
38
|
toCryptoOrgResourcesRaw,
|
|
31
39
|
toSolanaResourcesRaw,
|
|
32
|
-
|
|
33
|
-
toTronResourcesRaw,
|
|
40
|
+
toCeloResourcesRaw,
|
|
34
41
|
} from "./account";
|
|
35
42
|
import consoleWarnExpectToEqual from "./consoleWarnExpectToEqual";
|
|
36
43
|
import { AlgorandAccount, AlgorandAccountRaw } from "./families/algorand/types";
|
|
@@ -46,6 +53,7 @@ import { PolkadotAccount, PolkadotAccountRaw } from "./families/polkadot/types";
|
|
|
46
53
|
import { SolanaAccount, SolanaAccountRaw } from "./families/solana/types";
|
|
47
54
|
import { TezosAccount, TezosAccountRaw } from "./families/tezos/types";
|
|
48
55
|
import { TronAccount, TronAccountRaw } from "./families/tron/types";
|
|
56
|
+
import { CeloAccount, CeloAccountRaw } from "./families/celo/types";
|
|
49
57
|
|
|
50
58
|
// aim to build operations with the minimal diff & call to coin implementation possible
|
|
51
59
|
export async function minimalOperationsBuilder<CO>(
|
|
@@ -288,6 +296,13 @@ export function patchAccount(
|
|
|
288
296
|
}
|
|
289
297
|
}
|
|
290
298
|
|
|
299
|
+
// TODO This will be reworked to belong in each coin family
|
|
300
|
+
// Temporary logic to patch resources for each coin is:
|
|
301
|
+
// - there is raw data to patch from
|
|
302
|
+
// AND
|
|
303
|
+
// - there is no current account data
|
|
304
|
+
// OR
|
|
305
|
+
// - current account data is different
|
|
291
306
|
switch (account.currency.family) {
|
|
292
307
|
case "tron":
|
|
293
308
|
{
|
|
@@ -295,10 +310,11 @@ export function patchAccount(
|
|
|
295
310
|
const tronUpdatedRaw = updatedRaw as TronAccountRaw;
|
|
296
311
|
if (
|
|
297
312
|
tronUpdatedRaw.tronResources &&
|
|
298
|
-
!
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
313
|
+
(!tronAcc.tronResources ||
|
|
314
|
+
!areSameResources(
|
|
315
|
+
toTronResourcesRaw(tronAcc.tronResources),
|
|
316
|
+
tronUpdatedRaw.tronResources
|
|
317
|
+
))
|
|
302
318
|
) {
|
|
303
319
|
(next as TronAccount).tronResources = fromTronResourcesRaw(
|
|
304
320
|
tronUpdatedRaw.tronResources
|
|
@@ -312,10 +328,11 @@ export function patchAccount(
|
|
|
312
328
|
const cosmosUpdatedRaw = updatedRaw as CosmosAccountRaw;
|
|
313
329
|
if (
|
|
314
330
|
cosmosUpdatedRaw.cosmosResources &&
|
|
315
|
-
!
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
331
|
+
(!cosmosAcc.cosmosResources ||
|
|
332
|
+
!areSameResources(
|
|
333
|
+
toCosmosResourcesRaw(cosmosAcc.cosmosResources),
|
|
334
|
+
cosmosUpdatedRaw.cosmosResources
|
|
335
|
+
))
|
|
319
336
|
) {
|
|
320
337
|
(next as CosmosAccount).cosmosResources = fromCosmosResourcesRaw(
|
|
321
338
|
cosmosUpdatedRaw.cosmosResources
|
|
@@ -328,10 +345,12 @@ export function patchAccount(
|
|
|
328
345
|
const cosmosAcc = account as CosmosAccount;
|
|
329
346
|
const cosmosUpdatedRaw = updatedRaw as CosmosAccountRaw;
|
|
330
347
|
if (
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
348
|
+
cosmosUpdatedRaw.cosmosResources &&
|
|
349
|
+
(!cosmosAcc.cosmosResources ||
|
|
350
|
+
!areSameResources(
|
|
351
|
+
toCosmosResourcesRaw(cosmosAcc.cosmosResources),
|
|
352
|
+
cosmosUpdatedRaw.cosmosResources
|
|
353
|
+
))
|
|
335
354
|
) {
|
|
336
355
|
(next as CosmosAccount).cosmosResources = fromCosmosResourcesRaw(
|
|
337
356
|
cosmosUpdatedRaw.cosmosResources
|
|
@@ -345,10 +364,11 @@ export function patchAccount(
|
|
|
345
364
|
const algorandUpdatedRaw = updatedRaw as AlgorandAccountRaw;
|
|
346
365
|
if (
|
|
347
366
|
algorandUpdatedRaw.algorandResources &&
|
|
348
|
-
!
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
367
|
+
(!algorandAcc.algorandResources ||
|
|
368
|
+
!areSameResources(
|
|
369
|
+
toAlgorandResourcesRaw(algorandAcc.algorandResources),
|
|
370
|
+
algorandUpdatedRaw.algorandResources
|
|
371
|
+
))
|
|
352
372
|
) {
|
|
353
373
|
(next as AlgorandAccount).algorandResources = fromAlgorandResourcesRaw(
|
|
354
374
|
algorandUpdatedRaw.algorandResources
|
|
@@ -370,10 +390,11 @@ export function patchAccount(
|
|
|
370
390
|
const polkadotUpdatedRaw = updatedRaw as PolkadotAccountRaw;
|
|
371
391
|
if (
|
|
372
392
|
polkadotUpdatedRaw.polkadotResources &&
|
|
373
|
-
!
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
393
|
+
(!polkadotAcc.polkadotResources ||
|
|
394
|
+
!areSameResources(
|
|
395
|
+
toPolkadotResourcesRaw(polkadotAcc.polkadotResources),
|
|
396
|
+
polkadotUpdatedRaw.polkadotResources
|
|
397
|
+
))
|
|
377
398
|
) {
|
|
378
399
|
(next as PolkadotAccount).polkadotResources = fromPolkadotResourcesRaw(
|
|
379
400
|
polkadotUpdatedRaw.polkadotResources
|
|
@@ -387,10 +408,11 @@ export function patchAccount(
|
|
|
387
408
|
const tezosUpdatedRaw = updatedRaw as TezosAccountRaw;
|
|
388
409
|
if (
|
|
389
410
|
tezosUpdatedRaw.tezosResources &&
|
|
390
|
-
!
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
411
|
+
(!tezosAcc.tezosResources ||
|
|
412
|
+
!areSameResources(
|
|
413
|
+
toTezosResourcesRaw(tezosAcc.tezosResources),
|
|
414
|
+
tezosUpdatedRaw.tezosResources
|
|
415
|
+
))
|
|
394
416
|
) {
|
|
395
417
|
(next as TezosAccount).tezosResources = fromTezosResourcesRaw(
|
|
396
418
|
tezosUpdatedRaw.tezosResources
|
|
@@ -404,10 +426,11 @@ export function patchAccount(
|
|
|
404
426
|
const elrondUpdatedRaw = updatedRaw as ElrondAccountRaw;
|
|
405
427
|
if (
|
|
406
428
|
elrondUpdatedRaw.elrondResources &&
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
429
|
+
(!elrondAcc.elrondResources ||
|
|
430
|
+
!areSameResources(
|
|
431
|
+
toElrondResourcesRaw(elrondAcc.elrondResources),
|
|
432
|
+
elrondUpdatedRaw.elrondResources
|
|
433
|
+
))
|
|
411
434
|
) {
|
|
412
435
|
(next as ElrondAccount).elrondResources = fromElrondResourcesRaw(
|
|
413
436
|
elrondUpdatedRaw.elrondResources
|
|
@@ -421,10 +444,11 @@ export function patchAccount(
|
|
|
421
444
|
const cardanoUpdatedRaw = updatedRaw as CardanoAccountRaw;
|
|
422
445
|
if (
|
|
423
446
|
cardanoUpdatedRaw.cardanoResources &&
|
|
424
|
-
!
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
447
|
+
(!cardanoAcc.cardanoResources ||
|
|
448
|
+
!areSameResources(
|
|
449
|
+
toCardanoResourceRaw(cardanoAcc.cardanoResources),
|
|
450
|
+
cardanoUpdatedRaw.cardanoResources
|
|
451
|
+
))
|
|
428
452
|
) {
|
|
429
453
|
(next as CardanoAccount).cardanoResources = fromCardanoResourceRaw(
|
|
430
454
|
cardanoUpdatedRaw.cardanoResources
|
|
@@ -438,10 +462,11 @@ export function patchAccount(
|
|
|
438
462
|
const cryptoOrgUpdatedRaw = updatedRaw as CryptoOrgAccountRaw;
|
|
439
463
|
if (
|
|
440
464
|
cryptoOrgUpdatedRaw.cryptoOrgResources &&
|
|
441
|
-
!
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
465
|
+
(!cryptoOrgAcc.cryptoOrgResources ||
|
|
466
|
+
!areSameResources(
|
|
467
|
+
toCryptoOrgResourcesRaw(cryptoOrgAcc.cryptoOrgResources),
|
|
468
|
+
cryptoOrgUpdatedRaw.cryptoOrgResources
|
|
469
|
+
))
|
|
445
470
|
) {
|
|
446
471
|
(next as CryptoOrgAccount).cryptoOrgResources =
|
|
447
472
|
fromCryptoOrgResourcesRaw(cryptoOrgUpdatedRaw.cryptoOrgResources);
|
|
@@ -455,10 +480,11 @@ export function patchAccount(
|
|
|
455
480
|
|
|
456
481
|
if (
|
|
457
482
|
solanaUpdatedRaw.solanaResources &&
|
|
458
|
-
!
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
483
|
+
(!solanaAcc.solanaResources ||
|
|
484
|
+
!areSameResources(
|
|
485
|
+
toSolanaResourcesRaw(solanaAcc.solanaResources),
|
|
486
|
+
solanaUpdatedRaw.solanaResources
|
|
487
|
+
))
|
|
462
488
|
) {
|
|
463
489
|
(next as SolanaAccount).solanaResources = fromSolanaResourcesRaw(
|
|
464
490
|
solanaUpdatedRaw.solanaResources
|
|
@@ -467,6 +493,25 @@ export function patchAccount(
|
|
|
467
493
|
}
|
|
468
494
|
break;
|
|
469
495
|
}
|
|
496
|
+
case "celo": {
|
|
497
|
+
const celoAcc = account as CeloAccount;
|
|
498
|
+
const celoUpdatedRaw = updatedRaw as CeloAccountRaw;
|
|
499
|
+
|
|
500
|
+
if (
|
|
501
|
+
celoUpdatedRaw.celoResources &&
|
|
502
|
+
(!celoAcc.celoResources ||
|
|
503
|
+
!areSameResources(
|
|
504
|
+
toCeloResourcesRaw(celoAcc.celoResources),
|
|
505
|
+
celoUpdatedRaw.celoResources
|
|
506
|
+
))
|
|
507
|
+
) {
|
|
508
|
+
(next as CeloAccount).celoResources = fromCeloResourcesRaw(
|
|
509
|
+
celoUpdatedRaw.celoResources
|
|
510
|
+
);
|
|
511
|
+
changed = true;
|
|
512
|
+
}
|
|
513
|
+
break;
|
|
514
|
+
}
|
|
470
515
|
}
|
|
471
516
|
|
|
472
517
|
const nfts = updatedRaw?.nfts?.map(fromNFTRaw);
|
package/lib/bot/test.bot.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test.bot.d.ts","sourceRoot":"","sources":["../../src/bot/test.bot.ts"],"names":[],"mappings":"AAAA,OAAO,iCAAiC,CAAC"}
|
package/lib/bot/test.bot.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
exports.__esModule = true;
|
|
39
|
-
require("../__tests__/test-helpers/setup");
|
|
40
|
-
var _1 = require(".");
|
|
41
|
-
jest.setTimeout(110 * 60 * 1000);
|
|
42
|
-
var _a = process.env, BOT_FILTER_CURRENCY = _a.BOT_FILTER_CURRENCY, BOT_FILTER_FAMILY = _a.BOT_FILTER_FAMILY;
|
|
43
|
-
test("bot", function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
44
|
-
var arg;
|
|
45
|
-
return __generator(this, function (_a) {
|
|
46
|
-
switch (_a.label) {
|
|
47
|
-
case 0:
|
|
48
|
-
arg = {};
|
|
49
|
-
if (BOT_FILTER_CURRENCY) {
|
|
50
|
-
arg.currency = BOT_FILTER_CURRENCY;
|
|
51
|
-
}
|
|
52
|
-
if (BOT_FILTER_FAMILY) {
|
|
53
|
-
arg.family = BOT_FILTER_FAMILY;
|
|
54
|
-
}
|
|
55
|
-
return [4 /*yield*/, (0, _1.bot)(arg)];
|
|
56
|
-
case 1:
|
|
57
|
-
_a.sent();
|
|
58
|
-
return [2 /*return*/];
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
}); });
|
|
62
|
-
//# sourceMappingURL=test.bot.js.map
|
package/lib/bot/test.bot.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test.bot.js","sourceRoot":"","sources":["../../src/bot/test.bot.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAyC;AACzC,sBAAwB;AAExB,IAAI,CAAC,UAAU,CAAC,GAAG,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC;AAC3B,IAAA,KAA6C,OAAO,CAAC,GAAG,EAAtD,mBAAmB,yBAAA,EAAE,iBAAiB,uBAAgB,CAAC;AAC/D,IAAI,CAAC,KAAK,EAAE;;;;;gBACJ,GAAG,GAGL,EAAE,CAAC;gBAEP,IAAI,mBAAmB,EAAE;oBACvB,GAAG,CAAC,QAAQ,GAAG,mBAAmB,CAAC;iBACpC;gBAED,IAAI,iBAAiB,EAAE;oBACrB,GAAG,CAAC,MAAM,GAAG,iBAAiB,CAAC;iBAChC;gBAED,qBAAM,IAAA,MAAG,EAAC,GAAG,CAAC,EAAA;;gBAAd,SAAc,CAAC;;;;KAChB,CAAC,CAAC"}
|