@ledgerhq/live-common 34.48.0 → 34.49.0-nightly.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/__tests__/test-helpers/environment.js +1 -0
- package/lib/__tests__/test-helpers/environment.js.map +1 -1
- package/lib/apps/inlineAppInstall.d.ts +1 -3
- package/lib/apps/inlineAppInstall.d.ts.map +1 -1
- package/lib/apps/inlineAppInstall.js +2 -2
- package/lib/apps/inlineAppInstall.js.map +1 -1
- package/lib/apps/react.d.ts +1 -2
- package/lib/apps/react.d.ts.map +1 -1
- package/lib/apps/react.js +2 -2
- package/lib/apps/react.js.map +1 -1
- package/lib/apps/runner.d.ts +2 -4
- package/lib/apps/runner.d.ts.map +1 -1
- package/lib/apps/runner.js +3 -4
- package/lib/apps/runner.js.map +1 -1
- package/lib/bridge/generic-alpaca/accountBridge.d.ts +2 -1
- package/lib/bridge/generic-alpaca/accountBridge.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/accountBridge.js +2 -2
- package/lib/bridge/generic-alpaca/accountBridge.js.map +1 -1
- package/lib/bridge/generic-alpaca/alpaca/index.d.ts +1 -1
- package/lib/bridge/generic-alpaca/alpaca/index.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/alpaca/index.js +10 -6
- package/lib/bridge/generic-alpaca/alpaca/index.js.map +1 -1
- package/lib/bridge/generic-alpaca/alpaca/index.unit.test.js +37 -9
- package/lib/bridge/generic-alpaca/alpaca/index.unit.test.js.map +1 -1
- package/lib/bridge/generic-alpaca/broadcast.js +2 -2
- package/lib/bridge/generic-alpaca/broadcast.js.map +1 -1
- package/lib/bridge/generic-alpaca/createTransaction.d.ts +3 -23
- package/lib/bridge/generic-alpaca/createTransaction.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/createTransaction.js +11 -7
- package/lib/bridge/generic-alpaca/createTransaction.js.map +1 -1
- package/lib/bridge/generic-alpaca/currencyBridge.d.ts +2 -1
- package/lib/bridge/generic-alpaca/currencyBridge.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/currencyBridge.js +3 -2
- package/lib/bridge/generic-alpaca/currencyBridge.js.map +1 -1
- package/lib/bridge/generic-alpaca/estimateMaxSpendable.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/estimateMaxSpendable.js +4 -2
- package/lib/bridge/generic-alpaca/estimateMaxSpendable.js.map +1 -1
- package/lib/bridge/generic-alpaca/getAccountShape.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/getAccountShape.js +5 -5
- package/lib/bridge/generic-alpaca/getAccountShape.js.map +1 -1
- package/lib/bridge/generic-alpaca/getTransactionStatus.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/getTransactionStatus.js +2 -1
- package/lib/bridge/generic-alpaca/getTransactionStatus.js.map +1 -1
- package/lib/bridge/generic-alpaca/prepareTransaction.d.ts +5 -13
- package/lib/bridge/generic-alpaca/prepareTransaction.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/prepareTransaction.js +2 -2
- package/lib/bridge/generic-alpaca/prepareTransaction.js.map +1 -1
- package/lib/bridge/generic-alpaca/signOperation.d.ts +3 -2
- package/lib/bridge/generic-alpaca/signOperation.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/signOperation.js +19 -15
- package/lib/bridge/generic-alpaca/signOperation.js.map +1 -1
- package/lib/bridge/generic-alpaca/signer/Eth.d.ts +8 -0
- package/lib/bridge/generic-alpaca/signer/Eth.d.ts.map +1 -0
- package/lib/bridge/generic-alpaca/signer/Eth.js +51 -0
- package/lib/bridge/generic-alpaca/signer/Eth.js.map +1 -0
- package/lib/bridge/generic-alpaca/signer/index.d.ts +2 -10
- package/lib/bridge/generic-alpaca/signer/index.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/signer/index.js +2 -2
- package/lib/bridge/generic-alpaca/signer/index.js.map +1 -1
- package/lib/bridge/generic-alpaca/signer/signTransaction.d.ts +2 -3
- package/lib/bridge/generic-alpaca/signer/signTransaction.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/signer/signTransaction.js.map +1 -1
- package/lib/bridge/generic-alpaca/signer/types.d.ts +11 -0
- package/lib/bridge/generic-alpaca/signer/types.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/tests/getAccountShape.test.d.ts +2 -0
- package/lib/bridge/generic-alpaca/tests/getAccountShape.test.d.ts.map +1 -0
- package/lib/bridge/generic-alpaca/tests/getAccountShape.test.js +144 -0
- package/lib/bridge/generic-alpaca/tests/getAccountShape.test.js.map +1 -0
- package/lib/bridge/generic-alpaca/tests/prepareTransaction.test.js +2 -0
- package/lib/bridge/generic-alpaca/tests/prepareTransaction.test.js.map +1 -1
- package/lib/bridge/generic-alpaca/tests/signOperation.test.js +5 -4
- package/lib/bridge/generic-alpaca/tests/signOperation.test.js.map +1 -1
- package/lib/bridge/generic-alpaca/types.d.ts +25 -0
- package/lib/bridge/generic-alpaca/types.d.ts.map +1 -0
- package/lib/bridge/generic-alpaca/types.js +3 -0
- package/lib/bridge/generic-alpaca/types.js.map +1 -0
- package/lib/bridge/generic-alpaca/utils.d.ts +4 -8
- package/lib/bridge/generic-alpaca/utils.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/utils.js +15 -1
- package/lib/bridge/generic-alpaca/utils.js.map +1 -1
- package/lib/bridge/generic-alpaca/utils.test.js +21 -0
- package/lib/bridge/generic-alpaca/utils.test.js.map +1 -1
- package/lib/config/sharedConfig.d.ts.map +1 -1
- package/lib/config/sharedConfig.js +30 -28
- package/lib/config/sharedConfig.js.map +1 -1
- package/lib/e2e/data/deviceLabelsData.d.ts +27 -0
- package/lib/e2e/data/deviceLabelsData.d.ts.map +1 -0
- package/lib/e2e/data/deviceLabelsData.js +78 -0
- package/lib/e2e/data/deviceLabelsData.js.map +1 -0
- package/lib/e2e/enum/Account.d.ts +2 -0
- package/lib/e2e/enum/Account.d.ts.map +1 -1
- package/lib/e2e/enum/Account.js +2 -0
- package/lib/e2e/enum/Account.js.map +1 -1
- package/lib/e2e/enum/AppInfos.d.ts +1 -0
- package/lib/e2e/enum/AppInfos.d.ts.map +1 -1
- package/lib/e2e/enum/AppInfos.js +1 -0
- package/lib/e2e/enum/AppInfos.js.map +1 -1
- package/lib/e2e/enum/Currency.d.ts +1 -0
- package/lib/e2e/enum/Currency.d.ts.map +1 -1
- package/lib/e2e/enum/Currency.js +1 -0
- package/lib/e2e/enum/Currency.js.map +1 -1
- package/lib/e2e/enum/DeviceLabels.d.ts +51 -44
- package/lib/e2e/enum/DeviceLabels.d.ts.map +1 -1
- package/lib/e2e/enum/DeviceLabels.js +51 -44
- package/lib/e2e/enum/DeviceLabels.js.map +1 -1
- package/lib/e2e/enum/Network.d.ts +2 -1
- package/lib/e2e/enum/Network.d.ts.map +1 -1
- package/lib/e2e/enum/Network.js +1 -0
- package/lib/e2e/enum/Network.js.map +1 -1
- package/lib/e2e/families/cardano.d.ts.map +1 -1
- package/lib/e2e/families/cardano.js +1 -0
- package/lib/e2e/families/cardano.js.map +1 -1
- package/lib/e2e/families/celo.d.ts +1 -1
- package/lib/e2e/families/celo.d.ts.map +1 -1
- package/lib/e2e/families/celo.js +3 -5
- package/lib/e2e/families/celo.js.map +1 -1
- package/lib/e2e/families/cosmos.d.ts.map +1 -1
- package/lib/e2e/families/cosmos.js +1 -2
- package/lib/e2e/families/cosmos.js.map +1 -1
- package/lib/e2e/families/evm.d.ts.map +1 -1
- package/lib/e2e/families/evm.js +4 -1
- package/lib/e2e/families/evm.js.map +1 -1
- package/lib/e2e/families/kaspa.d.ts +4 -0
- package/lib/e2e/families/kaspa.d.ts.map +1 -0
- package/lib/e2e/families/kaspa.js +23 -0
- package/lib/e2e/families/kaspa.js.map +1 -0
- package/lib/e2e/families/multiversX.d.ts +2 -1
- package/lib/e2e/families/multiversX.d.ts.map +1 -1
- package/lib/e2e/families/multiversX.js +2 -4
- package/lib/e2e/families/multiversX.js.map +1 -1
- package/lib/e2e/families/near.d.ts.map +1 -1
- package/lib/e2e/families/near.js +1 -2
- package/lib/e2e/families/near.js.map +1 -1
- package/lib/e2e/families/osmosis.d.ts.map +1 -1
- package/lib/e2e/families/osmosis.js +1 -3
- package/lib/e2e/families/osmosis.js.map +1 -1
- package/lib/e2e/families/solana.d.ts +2 -1
- package/lib/e2e/families/solana.d.ts.map +1 -1
- package/lib/e2e/families/solana.js +6 -4
- package/lib/e2e/families/solana.js.map +1 -1
- package/lib/e2e/families/tezos.d.ts +2 -1
- package/lib/e2e/families/tezos.d.ts.map +1 -1
- package/lib/e2e/families/tezos.js +7 -5
- package/lib/e2e/families/tezos.js.map +1 -1
- package/lib/e2e/index.d.ts +5 -7
- package/lib/e2e/index.d.ts.map +1 -1
- package/lib/e2e/speculos.d.ts +2 -1
- package/lib/e2e/speculos.d.ts.map +1 -1
- package/lib/e2e/speculos.js +48 -28
- package/lib/e2e/speculos.js.map +1 -1
- package/lib/env.react.d.ts +1 -1
- package/lib/env.react.d.ts.map +1 -1
- package/lib/exchange/providers/swap.d.ts.map +1 -1
- package/lib/exchange/providers/swap.js +15 -0
- package/lib/exchange/providers/swap.js.map +1 -1
- package/lib/exchange/swap/transactionStrategies.d.ts +38 -11
- package/lib/exchange/swap/transactionStrategies.d.ts.map +1 -1
- package/lib/exchange/swap/transactionStrategies.js +93 -47
- package/lib/exchange/swap/transactionStrategies.js.map +1 -1
- package/lib/families/canton/config.d.ts.map +1 -1
- package/lib/families/canton/config.js +3 -5
- package/lib/families/canton/config.js.map +1 -1
- package/lib/families/canton/setup.d.ts.map +1 -1
- package/lib/families/canton/setup.js +5 -5
- package/lib/families/canton/setup.js.map +1 -1
- package/lib/families/evm/config.js +2 -2
- package/lib/families/evm/config.js.map +1 -1
- package/lib/families/kaspa/bridge.integration.test.d.ts +2 -0
- package/lib/families/kaspa/bridge.integration.test.d.ts.map +1 -0
- package/lib/families/kaspa/bridge.integration.test.js +7 -0
- package/lib/families/kaspa/bridge.integration.test.js.map +1 -0
- package/lib/families/kaspa/config.d.ts +3 -0
- package/lib/families/kaspa/config.d.ts.map +1 -0
- package/lib/families/kaspa/config.js +14 -0
- package/lib/families/kaspa/config.js.map +1 -0
- package/lib/families/kaspa/react.d.ts +4 -0
- package/lib/families/kaspa/react.d.ts.map +1 -0
- package/lib/families/kaspa/react.js +18 -0
- package/lib/families/kaspa/react.js.map +1 -0
- package/lib/families/kaspa/setup.d.ts +18 -0
- package/lib/families/kaspa/setup.d.ts.map +1 -0
- package/lib/families/kaspa/setup.js +24 -0
- package/lib/families/kaspa/setup.js.map +1 -0
- package/lib/families/kaspa/types.d.ts +2 -0
- package/lib/families/kaspa/types.d.ts.map +1 -0
- package/lib/families/kaspa/types.js +18 -0
- package/lib/families/kaspa/types.js.map +1 -0
- package/lib/families/solana/bridge/mock-data.d.ts.map +1 -1
- package/lib/families/solana/bridge/mock-data.js +7 -0
- package/lib/families/solana/bridge/mock-data.js.map +1 -1
- package/lib/families/xrp/setup.d.ts +2 -2
- package/lib/featureFlags/defaultFeatures.d.ts +1 -0
- package/lib/featureFlags/defaultFeatures.d.ts.map +1 -1
- package/lib/featureFlags/defaultFeatures.js +6 -2
- package/lib/featureFlags/defaultFeatures.js.map +1 -1
- package/lib/featureFlags/useFeature.d.ts +1 -1
- package/lib/featureFlags/useFeature.d.ts.map +1 -1
- package/lib/generated/bridge/js.d.ts +1 -0
- package/lib/generated/bridge/js.d.ts.map +1 -1
- package/lib/generated/bridge/js.js +24 -22
- package/lib/generated/bridge/js.js.map +1 -1
- package/lib/generated/bridge/mock.d.ts +1 -1
- package/lib/generated/cli-transaction.d.ts +13 -2
- package/lib/generated/cli-transaction.d.ts.map +1 -1
- package/lib/generated/cli-transaction.js +28 -26
- package/lib/generated/cli-transaction.js.map +1 -1
- package/lib/generated/deviceTransactionConfig.d.ts +2 -0
- package/lib/generated/deviceTransactionConfig.d.ts.map +1 -1
- package/lib/generated/deviceTransactionConfig.js +24 -22
- package/lib/generated/deviceTransactionConfig.js.map +1 -1
- package/lib/generated/hw-getAddress.d.ts +1 -0
- package/lib/generated/hw-getAddress.d.ts.map +1 -1
- package/lib/generated/hw-getAddress.js +28 -26
- package/lib/generated/hw-getAddress.js.map +1 -1
- package/lib/generated/platformAdapter.d.ts +1 -1
- package/lib/generated/specs.d.ts +1 -1
- package/lib/generated/transaction.d.ts +11 -3
- package/lib/generated/transaction.d.ts.map +1 -1
- package/lib/generated/transaction.js +28 -26
- package/lib/generated/transaction.js.map +1 -1
- package/lib/generated/types.d.ts +5 -4
- package/lib/generated/types.d.ts.map +1 -1
- package/lib/generated/walletApiAdapter.d.ts +1 -1
- package/lib/hw/actions/app.d.ts.map +1 -1
- package/lib/hw/actions/app.js.map +1 -1
- package/lib/hw/getDeviceNameMaxLength.d.ts.map +1 -1
- package/lib/hw/getDeviceNameMaxLength.js +2 -0
- package/lib/hw/getDeviceNameMaxLength.js.map +1 -1
- package/lib/hw/getDeviceNameMaxLength.test.js +12 -0
- package/lib/hw/getDeviceNameMaxLength.test.js.map +1 -1
- package/lib/modularDrawer/data/entities/interestRateSelectors.d.ts +1 -13
- package/lib/modularDrawer/data/entities/interestRateSelectors.d.ts.map +1 -1
- package/lib/modularDrawer/data/entities/interestRateSelectors.js +2 -17
- package/lib/modularDrawer/data/entities/interestRateSelectors.js.map +1 -1
- package/lib/modularDrawer/data/entities/marketSelectors.d.ts +4 -0
- package/lib/modularDrawer/data/entities/marketSelectors.d.ts.map +1 -0
- package/lib/modularDrawer/data/entities/marketSelectors.js +6 -0
- package/lib/modularDrawer/data/entities/marketSelectors.js.map +1 -0
- package/lib/modularDrawer/data/entities/selectorUtils.d.ts +18 -0
- package/lib/modularDrawer/data/entities/selectorUtils.d.ts.map +1 -0
- package/lib/modularDrawer/data/entities/selectorUtils.js +29 -0
- package/lib/modularDrawer/data/entities/selectorUtils.js.map +1 -0
- package/lib/modularDrawer/data/state-manager/api.d.ts.map +1 -1
- package/lib/modularDrawer/data/state-manager/api.js +3 -2
- package/lib/modularDrawer/data/state-manager/api.js.map +1 -1
- package/lib/modularDrawer/data/state-manager/types.d.ts +1 -0
- package/lib/modularDrawer/data/state-manager/types.d.ts.map +1 -1
- package/lib/modularDrawer/hooks/modules/useLeftMarketTrendModule.d.ts +50 -0
- package/lib/modularDrawer/hooks/modules/useLeftMarketTrendModule.d.ts.map +1 -0
- package/lib/modularDrawer/hooks/modules/useLeftMarketTrendModule.js +49 -0
- package/lib/modularDrawer/hooks/modules/useLeftMarketTrendModule.js.map +1 -0
- package/lib/modularDrawer/hooks/modules/useRightMarketTrendModule.d.ts +56 -0
- package/lib/modularDrawer/hooks/modules/useRightMarketTrendModule.d.ts.map +1 -0
- package/lib/modularDrawer/hooks/modules/useRightMarketTrendModule.js +59 -0
- package/lib/modularDrawer/hooks/modules/useRightMarketTrendModule.js.map +1 -0
- package/lib/modularDrawer/hooks/useAssetsData.d.ts +3 -1
- package/lib/modularDrawer/hooks/useAssetsData.d.ts.map +1 -1
- package/lib/modularDrawer/hooks/useAssetsData.js +6 -3
- package/lib/modularDrawer/hooks/useAssetsData.js.map +1 -1
- package/lib/modularDrawer/hooks/useMarketByCurrencies.d.ts +3 -0
- package/lib/modularDrawer/hooks/useMarketByCurrencies.d.ts.map +1 -0
- package/lib/modularDrawer/hooks/useMarketByCurrencies.js +26 -0
- package/lib/modularDrawer/hooks/useMarketByCurrencies.js.map +1 -0
- package/lib/modularDrawer/hooks/useSearch.d.ts +16 -0
- package/lib/modularDrawer/hooks/useSearch.d.ts.map +1 -0
- package/lib/modularDrawer/hooks/useSearch.js +24 -0
- package/lib/modularDrawer/hooks/useSearch.js.map +1 -0
- package/lib/modularDrawer/modules/createAssetConfiguration.d.ts.map +1 -1
- package/lib/modularDrawer/modules/createAssetConfiguration.js +8 -0
- package/lib/modularDrawer/modules/createAssetConfiguration.js.map +1 -1
- package/lib/modularDrawer/utils/type.d.ts +7 -0
- package/lib/modularDrawer/utils/type.d.ts.map +1 -1
- package/lib/notifications/ServiceStatusProvider/index.d.ts +1 -16
- package/lib/notifications/ServiceStatusProvider/index.d.ts.map +1 -1
- package/lib/notifications/ServiceStatusProvider/index.js +7 -31
- package/lib/notifications/ServiceStatusProvider/index.js.map +1 -1
- package/lib/wallet-api/ACRE/server.d.ts +13 -6
- package/lib/wallet-api/ACRE/server.d.ts.map +1 -1
- package/lib/wallet-api/ACRE/server.js +142 -1
- package/lib/wallet-api/ACRE/server.js.map +1 -1
- package/lib/wallet-api/ACRE/server.test.d.ts +2 -0
- package/lib/wallet-api/ACRE/server.test.d.ts.map +1 -0
- package/lib/wallet-api/ACRE/server.test.js +393 -0
- package/lib/wallet-api/ACRE/server.test.js.map +1 -0
- package/lib/wallet-api/Exchange/server.d.ts.map +1 -1
- package/lib/wallet-api/Exchange/server.js +16 -13
- package/lib/wallet-api/Exchange/server.js.map +1 -1
- package/lib-es/__tests__/test-helpers/environment.js +1 -0
- package/lib-es/__tests__/test-helpers/environment.js.map +1 -1
- package/lib-es/apps/inlineAppInstall.d.ts +1 -3
- package/lib-es/apps/inlineAppInstall.d.ts.map +1 -1
- package/lib-es/apps/inlineAppInstall.js +2 -2
- package/lib-es/apps/inlineAppInstall.js.map +1 -1
- package/lib-es/apps/react.d.ts +1 -2
- package/lib-es/apps/react.d.ts.map +1 -1
- package/lib-es/apps/react.js +2 -2
- package/lib-es/apps/react.js.map +1 -1
- package/lib-es/apps/runner.d.ts +2 -4
- package/lib-es/apps/runner.d.ts.map +1 -1
- package/lib-es/apps/runner.js +3 -4
- package/lib-es/apps/runner.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/accountBridge.d.ts +2 -1
- package/lib-es/bridge/generic-alpaca/accountBridge.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/accountBridge.js +2 -2
- package/lib-es/bridge/generic-alpaca/accountBridge.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/alpaca/index.d.ts +1 -1
- package/lib-es/bridge/generic-alpaca/alpaca/index.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/alpaca/index.js +10 -6
- package/lib-es/bridge/generic-alpaca/alpaca/index.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/alpaca/index.unit.test.js +37 -9
- package/lib-es/bridge/generic-alpaca/alpaca/index.unit.test.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/broadcast.js +2 -2
- package/lib-es/bridge/generic-alpaca/broadcast.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/createTransaction.d.ts +3 -23
- package/lib-es/bridge/generic-alpaca/createTransaction.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/createTransaction.js +10 -6
- package/lib-es/bridge/generic-alpaca/createTransaction.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/currencyBridge.d.ts +2 -1
- package/lib-es/bridge/generic-alpaca/currencyBridge.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/currencyBridge.js +3 -2
- package/lib-es/bridge/generic-alpaca/currencyBridge.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/estimateMaxSpendable.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/estimateMaxSpendable.js +4 -2
- package/lib-es/bridge/generic-alpaca/estimateMaxSpendable.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/getAccountShape.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/getAccountShape.js +5 -5
- package/lib-es/bridge/generic-alpaca/getAccountShape.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/getTransactionStatus.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/getTransactionStatus.js +2 -1
- package/lib-es/bridge/generic-alpaca/getTransactionStatus.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/prepareTransaction.d.ts +5 -13
- package/lib-es/bridge/generic-alpaca/prepareTransaction.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/prepareTransaction.js +2 -2
- package/lib-es/bridge/generic-alpaca/prepareTransaction.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/signOperation.d.ts +3 -2
- package/lib-es/bridge/generic-alpaca/signOperation.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/signOperation.js +19 -15
- package/lib-es/bridge/generic-alpaca/signOperation.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/signer/Eth.d.ts +8 -0
- package/lib-es/bridge/generic-alpaca/signer/Eth.d.ts.map +1 -0
- package/lib-es/bridge/generic-alpaca/signer/Eth.js +47 -0
- package/lib-es/bridge/generic-alpaca/signer/Eth.js.map +1 -0
- package/lib-es/bridge/generic-alpaca/signer/index.d.ts +2 -10
- package/lib-es/bridge/generic-alpaca/signer/index.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/signer/index.js +2 -2
- package/lib-es/bridge/generic-alpaca/signer/index.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/signer/signTransaction.d.ts +2 -3
- package/lib-es/bridge/generic-alpaca/signer/signTransaction.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/signer/signTransaction.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/signer/types.d.ts +11 -0
- package/lib-es/bridge/generic-alpaca/signer/types.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/tests/getAccountShape.test.d.ts +2 -0
- package/lib-es/bridge/generic-alpaca/tests/getAccountShape.test.d.ts.map +1 -0
- package/lib-es/bridge/generic-alpaca/tests/getAccountShape.test.js +139 -0
- package/lib-es/bridge/generic-alpaca/tests/getAccountShape.test.js.map +1 -0
- package/lib-es/bridge/generic-alpaca/tests/prepareTransaction.test.js +2 -0
- package/lib-es/bridge/generic-alpaca/tests/prepareTransaction.test.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/tests/signOperation.test.js +5 -4
- package/lib-es/bridge/generic-alpaca/tests/signOperation.test.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/types.d.ts +25 -0
- package/lib-es/bridge/generic-alpaca/types.d.ts.map +1 -0
- package/lib-es/bridge/generic-alpaca/types.js +2 -0
- package/lib-es/bridge/generic-alpaca/types.js.map +1 -0
- package/lib-es/bridge/generic-alpaca/utils.d.ts +4 -8
- package/lib-es/bridge/generic-alpaca/utils.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/utils.js +13 -0
- package/lib-es/bridge/generic-alpaca/utils.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/utils.test.js +22 -1
- package/lib-es/bridge/generic-alpaca/utils.test.js.map +1 -1
- package/lib-es/config/sharedConfig.d.ts.map +1 -1
- package/lib-es/config/sharedConfig.js +2 -0
- package/lib-es/config/sharedConfig.js.map +1 -1
- package/lib-es/e2e/data/deviceLabelsData.d.ts +27 -0
- package/lib-es/e2e/data/deviceLabelsData.d.ts.map +1 -0
- package/lib-es/e2e/data/deviceLabelsData.js +75 -0
- package/lib-es/e2e/data/deviceLabelsData.js.map +1 -0
- package/lib-es/e2e/enum/Account.d.ts +2 -0
- package/lib-es/e2e/enum/Account.d.ts.map +1 -1
- package/lib-es/e2e/enum/Account.js +2 -0
- package/lib-es/e2e/enum/Account.js.map +1 -1
- package/lib-es/e2e/enum/AppInfos.d.ts +1 -0
- package/lib-es/e2e/enum/AppInfos.d.ts.map +1 -1
- package/lib-es/e2e/enum/AppInfos.js +1 -0
- package/lib-es/e2e/enum/AppInfos.js.map +1 -1
- package/lib-es/e2e/enum/Currency.d.ts +1 -0
- package/lib-es/e2e/enum/Currency.d.ts.map +1 -1
- package/lib-es/e2e/enum/Currency.js +1 -0
- package/lib-es/e2e/enum/Currency.js.map +1 -1
- package/lib-es/e2e/enum/DeviceLabels.d.ts +51 -44
- package/lib-es/e2e/enum/DeviceLabels.d.ts.map +1 -1
- package/lib-es/e2e/enum/DeviceLabels.js +51 -44
- package/lib-es/e2e/enum/DeviceLabels.js.map +1 -1
- package/lib-es/e2e/enum/Network.d.ts +2 -1
- package/lib-es/e2e/enum/Network.d.ts.map +1 -1
- package/lib-es/e2e/enum/Network.js +1 -0
- package/lib-es/e2e/enum/Network.js.map +1 -1
- package/lib-es/e2e/families/cardano.d.ts.map +1 -1
- package/lib-es/e2e/families/cardano.js +1 -0
- package/lib-es/e2e/families/cardano.js.map +1 -1
- package/lib-es/e2e/families/celo.d.ts +1 -1
- package/lib-es/e2e/families/celo.d.ts.map +1 -1
- package/lib-es/e2e/families/celo.js +4 -6
- package/lib-es/e2e/families/celo.js.map +1 -1
- package/lib-es/e2e/families/cosmos.d.ts.map +1 -1
- package/lib-es/e2e/families/cosmos.js +2 -3
- package/lib-es/e2e/families/cosmos.js.map +1 -1
- package/lib-es/e2e/families/evm.d.ts.map +1 -1
- package/lib-es/e2e/families/evm.js +5 -2
- package/lib-es/e2e/families/evm.js.map +1 -1
- package/lib-es/e2e/families/kaspa.d.ts +4 -0
- package/lib-es/e2e/families/kaspa.d.ts.map +1 -0
- package/lib-es/e2e/families/kaspa.js +15 -0
- package/lib-es/e2e/families/kaspa.js.map +1 -0
- package/lib-es/e2e/families/multiversX.d.ts +2 -1
- package/lib-es/e2e/families/multiversX.d.ts.map +1 -1
- package/lib-es/e2e/families/multiversX.js +3 -5
- package/lib-es/e2e/families/multiversX.js.map +1 -1
- package/lib-es/e2e/families/near.d.ts.map +1 -1
- package/lib-es/e2e/families/near.js +2 -3
- package/lib-es/e2e/families/near.js.map +1 -1
- package/lib-es/e2e/families/osmosis.d.ts.map +1 -1
- package/lib-es/e2e/families/osmosis.js +2 -4
- package/lib-es/e2e/families/osmosis.js.map +1 -1
- package/lib-es/e2e/families/solana.d.ts +2 -1
- package/lib-es/e2e/families/solana.d.ts.map +1 -1
- package/lib-es/e2e/families/solana.js +7 -5
- package/lib-es/e2e/families/solana.js.map +1 -1
- package/lib-es/e2e/families/tezos.d.ts +2 -1
- package/lib-es/e2e/families/tezos.d.ts.map +1 -1
- package/lib-es/e2e/families/tezos.js +8 -6
- package/lib-es/e2e/families/tezos.js.map +1 -1
- package/lib-es/e2e/index.d.ts +5 -7
- package/lib-es/e2e/index.d.ts.map +1 -1
- package/lib-es/e2e/speculos.d.ts +2 -1
- package/lib-es/e2e/speculos.d.ts.map +1 -1
- package/lib-es/e2e/speculos.js +46 -27
- package/lib-es/e2e/speculos.js.map +1 -1
- package/lib-es/env.react.d.ts +1 -1
- package/lib-es/env.react.d.ts.map +1 -1
- package/lib-es/exchange/providers/swap.d.ts.map +1 -1
- package/lib-es/exchange/providers/swap.js +15 -0
- package/lib-es/exchange/providers/swap.js.map +1 -1
- package/lib-es/exchange/swap/transactionStrategies.d.ts +38 -11
- package/lib-es/exchange/swap/transactionStrategies.d.ts.map +1 -1
- package/lib-es/exchange/swap/transactionStrategies.js +87 -44
- package/lib-es/exchange/swap/transactionStrategies.js.map +1 -1
- package/lib-es/families/canton/config.d.ts.map +1 -1
- package/lib-es/families/canton/config.js +3 -5
- package/lib-es/families/canton/config.js.map +1 -1
- package/lib-es/families/canton/setup.d.ts.map +1 -1
- package/lib-es/families/canton/setup.js +5 -5
- package/lib-es/families/canton/setup.js.map +1 -1
- package/lib-es/families/evm/config.js +2 -2
- package/lib-es/families/evm/config.js.map +1 -1
- package/lib-es/families/kaspa/bridge.integration.test.d.ts +2 -0
- package/lib-es/families/kaspa/bridge.integration.test.d.ts.map +1 -0
- package/lib-es/families/kaspa/bridge.integration.test.js +5 -0
- package/lib-es/families/kaspa/bridge.integration.test.js.map +1 -0
- package/lib-es/families/kaspa/config.d.ts +3 -0
- package/lib-es/families/kaspa/config.d.ts.map +1 -0
- package/lib-es/families/kaspa/config.js +11 -0
- package/lib-es/families/kaspa/config.js.map +1 -0
- package/lib-es/families/kaspa/react.d.ts +4 -0
- package/lib-es/families/kaspa/react.d.ts.map +1 -0
- package/lib-es/families/kaspa/react.js +14 -0
- package/lib-es/families/kaspa/react.js.map +1 -0
- package/lib-es/families/kaspa/setup.d.ts +18 -0
- package/lib-es/families/kaspa/setup.d.ts.map +1 -0
- package/lib-es/families/kaspa/setup.js +16 -0
- package/lib-es/families/kaspa/setup.js.map +1 -0
- package/lib-es/families/kaspa/types.d.ts +2 -0
- package/lib-es/families/kaspa/types.d.ts.map +1 -0
- package/lib-es/families/kaspa/types.js +2 -0
- package/lib-es/families/kaspa/types.js.map +1 -0
- package/lib-es/families/solana/bridge/mock-data.d.ts.map +1 -1
- package/lib-es/families/solana/bridge/mock-data.js +7 -0
- package/lib-es/families/solana/bridge/mock-data.js.map +1 -1
- package/lib-es/families/xrp/setup.d.ts +2 -2
- package/lib-es/featureFlags/defaultFeatures.d.ts +1 -0
- package/lib-es/featureFlags/defaultFeatures.d.ts.map +1 -1
- package/lib-es/featureFlags/defaultFeatures.js +6 -2
- package/lib-es/featureFlags/defaultFeatures.js.map +1 -1
- package/lib-es/featureFlags/useFeature.d.ts +1 -1
- package/lib-es/featureFlags/useFeature.d.ts.map +1 -1
- package/lib-es/generated/bridge/js.d.ts +1 -0
- package/lib-es/generated/bridge/js.d.ts.map +1 -1
- package/lib-es/generated/bridge/js.js +2 -0
- package/lib-es/generated/bridge/js.js.map +1 -1
- package/lib-es/generated/bridge/mock.d.ts +1 -1
- package/lib-es/generated/cli-transaction.d.ts +13 -2
- package/lib-es/generated/cli-transaction.d.ts.map +1 -1
- package/lib-es/generated/cli-transaction.js +2 -0
- package/lib-es/generated/cli-transaction.js.map +1 -1
- package/lib-es/generated/deviceTransactionConfig.d.ts +2 -0
- package/lib-es/generated/deviceTransactionConfig.d.ts.map +1 -1
- package/lib-es/generated/deviceTransactionConfig.js +2 -0
- package/lib-es/generated/deviceTransactionConfig.js.map +1 -1
- package/lib-es/generated/hw-getAddress.d.ts +1 -0
- package/lib-es/generated/hw-getAddress.d.ts.map +1 -1
- package/lib-es/generated/hw-getAddress.js +2 -0
- package/lib-es/generated/hw-getAddress.js.map +1 -1
- package/lib-es/generated/platformAdapter.d.ts +1 -1
- package/lib-es/generated/specs.d.ts +1 -1
- package/lib-es/generated/transaction.d.ts +11 -3
- package/lib-es/generated/transaction.d.ts.map +1 -1
- package/lib-es/generated/transaction.js +2 -0
- package/lib-es/generated/transaction.js.map +1 -1
- package/lib-es/generated/types.d.ts +5 -4
- package/lib-es/generated/types.d.ts.map +1 -1
- package/lib-es/generated/walletApiAdapter.d.ts +1 -1
- package/lib-es/hw/actions/app.d.ts.map +1 -1
- package/lib-es/hw/actions/app.js.map +1 -1
- package/lib-es/hw/getDeviceNameMaxLength.d.ts.map +1 -1
- package/lib-es/hw/getDeviceNameMaxLength.js +2 -0
- package/lib-es/hw/getDeviceNameMaxLength.js.map +1 -1
- package/lib-es/hw/getDeviceNameMaxLength.test.js +12 -0
- package/lib-es/hw/getDeviceNameMaxLength.test.js.map +1 -1
- package/lib-es/modularDrawer/data/entities/interestRateSelectors.d.ts +1 -13
- package/lib-es/modularDrawer/data/entities/interestRateSelectors.d.ts.map +1 -1
- package/lib-es/modularDrawer/data/entities/interestRateSelectors.js +2 -17
- package/lib-es/modularDrawer/data/entities/interestRateSelectors.js.map +1 -1
- package/lib-es/modularDrawer/data/entities/marketSelectors.d.ts +4 -0
- package/lib-es/modularDrawer/data/entities/marketSelectors.d.ts.map +1 -0
- package/lib-es/modularDrawer/data/entities/marketSelectors.js +3 -0
- package/lib-es/modularDrawer/data/entities/marketSelectors.js.map +1 -0
- package/lib-es/modularDrawer/data/entities/selectorUtils.d.ts +18 -0
- package/lib-es/modularDrawer/data/entities/selectorUtils.d.ts.map +1 -0
- package/lib-es/modularDrawer/data/entities/selectorUtils.js +25 -0
- package/lib-es/modularDrawer/data/entities/selectorUtils.js.map +1 -0
- package/lib-es/modularDrawer/data/state-manager/api.d.ts.map +1 -1
- package/lib-es/modularDrawer/data/state-manager/api.js +3 -2
- package/lib-es/modularDrawer/data/state-manager/api.js.map +1 -1
- package/lib-es/modularDrawer/data/state-manager/types.d.ts +1 -0
- package/lib-es/modularDrawer/data/state-manager/types.d.ts.map +1 -1
- package/lib-es/modularDrawer/hooks/modules/useLeftMarketTrendModule.d.ts +50 -0
- package/lib-es/modularDrawer/hooks/modules/useLeftMarketTrendModule.d.ts.map +1 -0
- package/lib-es/modularDrawer/hooks/modules/useLeftMarketTrendModule.js +22 -0
- package/lib-es/modularDrawer/hooks/modules/useLeftMarketTrendModule.js.map +1 -0
- package/lib-es/modularDrawer/hooks/modules/useRightMarketTrendModule.d.ts +56 -0
- package/lib-es/modularDrawer/hooks/modules/useRightMarketTrendModule.d.ts.map +1 -0
- package/lib-es/modularDrawer/hooks/modules/useRightMarketTrendModule.js +32 -0
- package/lib-es/modularDrawer/hooks/modules/useRightMarketTrendModule.js.map +1 -0
- package/lib-es/modularDrawer/hooks/useAssetsData.d.ts +3 -1
- package/lib-es/modularDrawer/hooks/useAssetsData.d.ts.map +1 -1
- package/lib-es/modularDrawer/hooks/useAssetsData.js +6 -3
- package/lib-es/modularDrawer/hooks/useAssetsData.js.map +1 -1
- package/lib-es/modularDrawer/hooks/useMarketByCurrencies.d.ts +3 -0
- package/lib-es/modularDrawer/hooks/useMarketByCurrencies.d.ts.map +1 -0
- package/lib-es/modularDrawer/hooks/useMarketByCurrencies.js +22 -0
- package/lib-es/modularDrawer/hooks/useMarketByCurrencies.js.map +1 -0
- package/lib-es/modularDrawer/hooks/useSearch.d.ts +16 -0
- package/lib-es/modularDrawer/hooks/useSearch.d.ts.map +1 -0
- package/lib-es/modularDrawer/hooks/useSearch.js +20 -0
- package/lib-es/modularDrawer/hooks/useSearch.js.map +1 -0
- package/lib-es/modularDrawer/modules/createAssetConfiguration.d.ts.map +1 -1
- package/lib-es/modularDrawer/modules/createAssetConfiguration.js +8 -0
- package/lib-es/modularDrawer/modules/createAssetConfiguration.js.map +1 -1
- package/lib-es/modularDrawer/utils/type.d.ts +7 -0
- package/lib-es/modularDrawer/utils/type.d.ts.map +1 -1
- package/lib-es/notifications/ServiceStatusProvider/index.d.ts +1 -16
- package/lib-es/notifications/ServiceStatusProvider/index.d.ts.map +1 -1
- package/lib-es/notifications/ServiceStatusProvider/index.js +7 -31
- package/lib-es/notifications/ServiceStatusProvider/index.js.map +1 -1
- package/lib-es/wallet-api/ACRE/server.d.ts +13 -6
- package/lib-es/wallet-api/ACRE/server.d.ts.map +1 -1
- package/lib-es/wallet-api/ACRE/server.js +140 -2
- package/lib-es/wallet-api/ACRE/server.js.map +1 -1
- package/lib-es/wallet-api/ACRE/server.test.d.ts +2 -0
- package/lib-es/wallet-api/ACRE/server.test.d.ts.map +1 -0
- package/lib-es/wallet-api/ACRE/server.test.js +388 -0
- package/lib-es/wallet-api/ACRE/server.test.js.map +1 -0
- package/lib-es/wallet-api/Exchange/server.d.ts.map +1 -1
- package/lib-es/wallet-api/Exchange/server.js +16 -13
- package/lib-es/wallet-api/Exchange/server.js.map +1 -1
- package/package.json +71 -68
- package/src/__tests__/test-helpers/environment.ts +1 -0
- package/src/apps/inlineAppInstall.ts +1 -4
- package/src/apps/react.ts +1 -3
- package/src/apps/runner.ts +1 -8
- package/src/bridge/generic-alpaca/accountBridge.ts +8 -3
- package/src/bridge/generic-alpaca/alpaca/index.ts +15 -17
- package/src/bridge/generic-alpaca/alpaca/index.unit.test.ts +38 -10
- package/src/bridge/generic-alpaca/broadcast.ts +2 -2
- package/src/bridge/generic-alpaca/createTransaction.ts +13 -24
- package/src/bridge/generic-alpaca/currencyBridge.ts +8 -2
- package/src/bridge/generic-alpaca/estimateMaxSpendable.ts +5 -7
- package/src/bridge/generic-alpaca/getAccountShape.ts +7 -7
- package/src/bridge/generic-alpaca/getTransactionStatus.ts +5 -14
- package/src/bridge/generic-alpaca/prepareTransaction.ts +10 -17
- package/src/bridge/generic-alpaca/signOperation.ts +25 -31
- package/src/bridge/generic-alpaca/signer/Eth.ts +70 -0
- package/src/bridge/generic-alpaca/signer/index.ts +5 -15
- package/src/bridge/generic-alpaca/signer/signTransaction.ts +4 -3
- package/src/bridge/generic-alpaca/signer/types.ts +14 -0
- package/src/bridge/generic-alpaca/tests/getAccountShape.test.ts +173 -0
- package/src/bridge/generic-alpaca/tests/prepareTransaction.test.ts +3 -2
- package/src/bridge/generic-alpaca/tests/signOperation.test.ts +6 -5
- package/src/bridge/generic-alpaca/types.ts +23 -0
- package/src/bridge/generic-alpaca/utils.test.ts +29 -1
- package/src/bridge/generic-alpaca/utils.ts +17 -8
- package/src/config/sharedConfig.ts +2 -0
- package/src/e2e/data/deviceLabelsData.ts +100 -0
- package/src/e2e/enum/Account.ts +14 -0
- package/src/e2e/enum/AppInfos.ts +2 -0
- package/src/e2e/enum/Currency.ts +2 -0
- package/src/e2e/enum/DeviceLabels.ts +51 -44
- package/src/e2e/enum/Network.ts +1 -0
- package/src/e2e/families/cardano.ts +1 -0
- package/src/e2e/families/celo.ts +4 -6
- package/src/e2e/families/cosmos.ts +7 -3
- package/src/e2e/families/evm.ts +12 -2
- package/src/e2e/families/kaspa.ts +17 -0
- package/src/e2e/families/multiversX.ts +4 -5
- package/src/e2e/families/near.ts +8 -3
- package/src/e2e/families/osmosis.ts +2 -4
- package/src/e2e/families/solana.ts +15 -5
- package/src/e2e/families/tezos.ts +10 -6
- package/src/e2e/speculos.ts +67 -28
- package/src/exchange/providers/swap.ts +21 -0
- package/src/exchange/swap/transactionStrategies.ts +121 -73
- package/src/families/canton/config.ts +3 -6
- package/src/families/canton/setup.ts +6 -5
- package/src/families/evm/config.ts +2 -2
- package/src/families/kaspa/__snapshots__/bridge.integration.test.ts.snap +66 -0
- package/src/families/kaspa/bridge.integration.test.ts +5 -0
- package/src/families/kaspa/config.ts +12 -0
- package/src/families/kaspa/react.ts +19 -0
- package/src/families/kaspa/setup.ts +27 -0
- package/src/families/kaspa/types.ts +1 -0
- package/src/families/solana/bridge/mock-data.ts +7 -0
- package/src/featureFlags/defaultFeatures.ts +6 -2
- package/src/generated/bridge/js.ts +2 -0
- package/src/generated/cli-transaction.ts +2 -0
- package/src/generated/deviceTransactionConfig.ts +2 -0
- package/src/generated/hw-getAddress.ts +2 -0
- package/src/generated/transaction.ts +2 -0
- package/src/generated/types.ts +10 -0
- package/src/hw/actions/app.ts +0 -1
- package/src/hw/getDeviceNameMaxLength.test.ts +16 -0
- package/src/hw/getDeviceNameMaxLength.ts +2 -0
- package/src/modularDrawer/data/entities/interestRateSelectors.ts +2 -34
- package/src/modularDrawer/data/entities/marketSelectors.ts +8 -0
- package/src/modularDrawer/data/entities/selectorUtils.ts +42 -0
- package/src/modularDrawer/data/state-manager/api.ts +4 -2
- package/src/modularDrawer/data/state-manager/types.ts +1 -0
- package/src/modularDrawer/hooks/modules/useLeftMarketTrendModule.tsx +36 -0
- package/src/modularDrawer/hooks/modules/useRightMarketTrendModule.tsx +57 -0
- package/src/modularDrawer/hooks/useAssetsData.ts +24 -9
- package/src/modularDrawer/hooks/useMarketByCurrencies.ts +29 -0
- package/src/modularDrawer/hooks/useSearch.ts +52 -0
- package/src/modularDrawer/modules/createAssetConfiguration.ts +10 -0
- package/src/modularDrawer/utils/type.ts +2 -0
- package/src/notifications/ServiceStatusProvider/index.tsx +12 -37
- package/src/wallet-api/ACRE/server.test.ts +470 -0
- package/src/wallet-api/ACRE/server.ts +202 -14
- package/src/wallet-api/Exchange/server.ts +17 -14
- package/lib/exchange/providers/swap.integration.test.d.ts +0 -2
- package/lib/exchange/providers/swap.integration.test.d.ts.map +0 -1
- package/lib/exchange/providers/swap.integration.test.js +0 -201
- package/lib/exchange/providers/swap.integration.test.js.map +0 -1
- package/lib/notifications/ServiceStatusProvider/index.test.d.ts +0 -2
- package/lib/notifications/ServiceStatusProvider/index.test.d.ts.map +0 -1
- package/lib/notifications/ServiceStatusProvider/index.test.js +0 -88
- package/lib/notifications/ServiceStatusProvider/index.test.js.map +0 -1
- package/lib/notifications/ServiceStatusProvider/ledger-components.d.ts +0 -2
- package/lib/notifications/ServiceStatusProvider/ledger-components.d.ts.map +0 -1
- package/lib/notifications/ServiceStatusProvider/ledger-components.js +0 -16
- package/lib/notifications/ServiceStatusProvider/ledger-components.js.map +0 -1
- package/lib-es/exchange/providers/swap.integration.test.d.ts +0 -2
- package/lib-es/exchange/providers/swap.integration.test.d.ts.map +0 -1
- package/lib-es/exchange/providers/swap.integration.test.js +0 -199
- package/lib-es/exchange/providers/swap.integration.test.js.map +0 -1
- package/lib-es/notifications/ServiceStatusProvider/index.test.d.ts +0 -2
- package/lib-es/notifications/ServiceStatusProvider/index.test.d.ts.map +0 -1
- package/lib-es/notifications/ServiceStatusProvider/index.test.js +0 -86
- package/lib-es/notifications/ServiceStatusProvider/index.test.js.map +0 -1
- package/lib-es/notifications/ServiceStatusProvider/ledger-components.d.ts +0 -2
- package/lib-es/notifications/ServiceStatusProvider/ledger-components.d.ts.map +0 -1
- package/lib-es/notifications/ServiceStatusProvider/ledger-components.js +0 -13
- package/lib-es/notifications/ServiceStatusProvider/ledger-components.js.map +0 -1
- package/src/exchange/providers/swap.integration.test.ts +0 -261
- package/src/notifications/ServiceStatusProvider/index.test.ts +0 -102
- package/src/notifications/ServiceStatusProvider/ledger-components.ts +0 -12
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ledgerhq/live-common",
|
3
3
|
"description": "Common ground for the Ledger Live apps",
|
4
|
-
"version": "34.
|
4
|
+
"version": "34.49.0-nightly.0",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
7
7
|
"url": "https://github.com/LedgerHQ/ledger-live.git"
|
@@ -106,7 +106,7 @@
|
|
106
106
|
"@dfinity/agent": "^0.21.0",
|
107
107
|
"@dfinity/candid": "^0.21.0",
|
108
108
|
"@dfinity/principal": "^0.15.6",
|
109
|
-
"@ledgerhq/device-management-kit": "0.
|
109
|
+
"@ledgerhq/device-management-kit": "0.9.0",
|
110
110
|
"@ledgerhq/live-app-sdk": "^0.8.1",
|
111
111
|
"@ledgerhq/wallet-api-client": "^1.10.0",
|
112
112
|
"@ledgerhq/wallet-api-core": "^1.22.0",
|
@@ -138,6 +138,7 @@
|
|
138
138
|
"bip39": "^3.0.4",
|
139
139
|
"bs58": "^4.0.1",
|
140
140
|
"date-fns": "^2.23.0",
|
141
|
+
"ethers": "6.15.0",
|
141
142
|
"expect": "^27.4.6",
|
142
143
|
"fuse.js": "^6.6.2",
|
143
144
|
"i18next": "20.6.1",
|
@@ -165,75 +166,77 @@
|
|
165
166
|
"xstate": "^5.19.2",
|
166
167
|
"yargs": "^17.0.0",
|
167
168
|
"zod": "^3.22.4",
|
168
|
-
"@ledgerhq/coin-algorand": "^0.10.
|
169
|
-
"@ledgerhq/coin-aptos": "^3.3.0",
|
170
|
-
"@ledgerhq/coin-bitcoin": "^0.22.0",
|
171
|
-
"@ledgerhq/coin-canton": "^0.5.0",
|
172
|
-
"@ledgerhq/coin-cardano": "^0.12.
|
173
|
-
"@ledgerhq/coin-casper": "^2.1.
|
174
|
-
"@ledgerhq/coin-celo": "^1.4.0",
|
175
|
-
"@ledgerhq/coin-cosmos": "^0.17.
|
176
|
-
"@ledgerhq/coin-evm": "^2.
|
177
|
-
"@ledgerhq/coin-filecoin": "^1.12.0",
|
178
|
-
"@ledgerhq/coin-framework": "^6.4.0",
|
179
|
-
"@ledgerhq/coin-hedera": "^1.11.
|
180
|
-
"@ledgerhq/coin-icon": "^0.12.
|
181
|
-
"@ledgerhq/coin-internet_computer": "^1.8.
|
182
|
-
"@ledgerhq/coin-
|
183
|
-
"@ledgerhq/coin-
|
184
|
-
"@ledgerhq/coin-
|
185
|
-
"@ledgerhq/coin-
|
186
|
-
"@ledgerhq/coin-
|
187
|
-
"@ledgerhq/coin-
|
188
|
-
"@ledgerhq/coin-
|
189
|
-
"@ledgerhq/coin-
|
190
|
-
"@ledgerhq/coin-
|
191
|
-
"@ledgerhq/coin-
|
192
|
-
"@ledgerhq/coin-
|
193
|
-
"@ledgerhq/coin-
|
194
|
-
"@ledgerhq/coin-
|
195
|
-
"@ledgerhq/
|
196
|
-
"@ledgerhq/
|
197
|
-
"@ledgerhq/
|
198
|
-
"@ledgerhq/
|
169
|
+
"@ledgerhq/coin-algorand": "^0.10.2-nightly.0",
|
170
|
+
"@ledgerhq/coin-aptos": "^3.3.1-nightly.0",
|
171
|
+
"@ledgerhq/coin-bitcoin": "^0.22.1-nightly.0",
|
172
|
+
"@ledgerhq/coin-canton": "^0.5.1-nightly.0",
|
173
|
+
"@ledgerhq/coin-cardano": "^0.12.2-nightly.0",
|
174
|
+
"@ledgerhq/coin-casper": "^2.1.2-nightly.0",
|
175
|
+
"@ledgerhq/coin-celo": "^1.4.1-nightly.0",
|
176
|
+
"@ledgerhq/coin-cosmos": "^0.17.2-nightly.0",
|
177
|
+
"@ledgerhq/coin-evm": "^2.31.0-nightly.0",
|
178
|
+
"@ledgerhq/coin-filecoin": "^1.12.1-nightly.0",
|
179
|
+
"@ledgerhq/coin-framework": "^6.4.1-nightly.0",
|
180
|
+
"@ledgerhq/coin-hedera": "^1.11.2-nightly.0",
|
181
|
+
"@ledgerhq/coin-icon": "^0.12.2-nightly.0",
|
182
|
+
"@ledgerhq/coin-internet_computer": "^1.8.2-nightly.0",
|
183
|
+
"@ledgerhq/coin-kaspa": "^1.1.1-nightly.0",
|
184
|
+
"@ledgerhq/coin-mina": "^1.2.2-nightly.0",
|
185
|
+
"@ledgerhq/coin-multiversx": "^0.5.2-nightly.0",
|
186
|
+
"@ledgerhq/coin-near": "^0.13.2-nightly.0",
|
187
|
+
"@ledgerhq/coin-polkadot": "^6.10.1-nightly.0",
|
188
|
+
"@ledgerhq/coin-solana": "^0.33.1-nightly.0",
|
189
|
+
"@ledgerhq/coin-stacks": "^0.9.2-nightly.0",
|
190
|
+
"@ledgerhq/coin-stellar": "^6.4.1-nightly.0",
|
191
|
+
"@ledgerhq/coin-sui": "^0.13.1-nightly.0",
|
192
|
+
"@ledgerhq/coin-tezos": "^6.5.0-nightly.0",
|
193
|
+
"@ledgerhq/coin-ton": "^0.14.2-nightly.0",
|
194
|
+
"@ledgerhq/coin-tron": "^5.4.1-nightly.0",
|
195
|
+
"@ledgerhq/coin-vechain": "^2.9.2-nightly.0",
|
196
|
+
"@ledgerhq/coin-xrp": "^7.4.1-nightly.0",
|
197
|
+
"@ledgerhq/crypto-icons-ui": "^1.19.0-nightly.1",
|
198
|
+
"@ledgerhq/cryptoassets": "^13.28.1-nightly.0",
|
199
|
+
"@ledgerhq/device-core": "^0.6.4-nightly.0",
|
200
|
+
"@ledgerhq/devices": "8.5.2-nightly.0",
|
199
201
|
"@ledgerhq/errors": "^6.25.0",
|
200
|
-
"@ledgerhq/hw-app-algorand": "^6.31.
|
201
|
-
"@ledgerhq/hw-app-aptos": "^6.34.
|
202
|
-
"@ledgerhq/hw-app-btc": "^10.11.0",
|
203
|
-
"@ledgerhq/hw-app-celo": "^6.34.
|
204
|
-
"@ledgerhq/hw-app-cosmos": "^6.32.
|
205
|
-
"@ledgerhq/hw-app-eth": "^6.45.
|
206
|
-
"@ledgerhq/hw-app-exchange": "^0.13.
|
207
|
-
"@ledgerhq/hw-app-hedera": "^1.2.
|
208
|
-
"@ledgerhq/hw-app-icon": "^1.3.
|
209
|
-
"@ledgerhq/hw-app-
|
210
|
-
"@ledgerhq/hw-app-
|
211
|
-
"@ledgerhq/hw-app-
|
212
|
-
"@ledgerhq/hw-app-
|
202
|
+
"@ledgerhq/hw-app-algorand": "^6.31.7-nightly.0",
|
203
|
+
"@ledgerhq/hw-app-aptos": "^6.34.7-nightly.0",
|
204
|
+
"@ledgerhq/hw-app-btc": "^10.11.1-nightly.0",
|
205
|
+
"@ledgerhq/hw-app-celo": "^6.34.4-nightly.0",
|
206
|
+
"@ledgerhq/hw-app-cosmos": "^6.32.7-nightly.0",
|
207
|
+
"@ledgerhq/hw-app-eth": "^6.45.19-nightly.0",
|
208
|
+
"@ledgerhq/hw-app-exchange": "^0.13.3-nightly.1",
|
209
|
+
"@ledgerhq/hw-app-hedera": "^1.2.7-nightly.0",
|
210
|
+
"@ledgerhq/hw-app-icon": "^1.3.7-nightly.0",
|
211
|
+
"@ledgerhq/hw-app-kaspa": "^1.3.0-nightly.1",
|
212
|
+
"@ledgerhq/hw-app-multiversx": "^6.25.2-nightly.0",
|
213
|
+
"@ledgerhq/hw-app-near": "^6.31.7-nightly.0",
|
214
|
+
"@ledgerhq/hw-app-polkadot": "^6.34.7-nightly.0",
|
215
|
+
"@ledgerhq/hw-app-str": "^7.2.7-nightly.0",
|
213
216
|
"@ledgerhq/hw-app-sui": "^1.4.0",
|
214
|
-
"@ledgerhq/hw-app-tezos": "^6.31.
|
215
|
-
"@ledgerhq/hw-app-trx": "^6.31.
|
216
|
-
"@ledgerhq/hw-app-vet": "^0.5.
|
217
|
-
"@ledgerhq/hw-app-xrp": "^6.32.
|
218
|
-
"@ledgerhq/hw-transport": "^6.31.
|
219
|
-
"@ledgerhq/hw-transport-mocker": "^6.29.
|
220
|
-
"@ledgerhq/ledger-cal-service": "^1.
|
217
|
+
"@ledgerhq/hw-app-tezos": "^6.31.7-nightly.0",
|
218
|
+
"@ledgerhq/hw-app-trx": "^6.31.7-nightly.0",
|
219
|
+
"@ledgerhq/hw-app-vet": "^0.5.17-nightly.0",
|
220
|
+
"@ledgerhq/hw-app-xrp": "^6.32.5-nightly.0",
|
221
|
+
"@ledgerhq/hw-transport": "^6.31.11-nightly.0",
|
222
|
+
"@ledgerhq/hw-transport-mocker": "^6.29.11-nightly.0",
|
223
|
+
"@ledgerhq/ledger-cal-service": "^1.5.0-nightly.0",
|
221
224
|
"@ledgerhq/live-config": "^3.2.0",
|
222
|
-
"@ledgerhq/live-countervalues": "^0.7.
|
223
|
-
"@ledgerhq/live-countervalues-react": "^0.6.0",
|
224
|
-
"@ledgerhq/live-dmk-shared": "^0.12.
|
225
|
-
"@ledgerhq/live-env": "^2.
|
225
|
+
"@ledgerhq/live-countervalues": "^0.7.2-nightly.0",
|
226
|
+
"@ledgerhq/live-countervalues-react": "^0.6.1-nightly.0",
|
227
|
+
"@ledgerhq/live-dmk-shared": "^0.12.4-nightly.1",
|
228
|
+
"@ledgerhq/live-env": "^2.17.0-nightly.0",
|
226
229
|
"@ledgerhq/live-hooks": "0.1.0",
|
227
|
-
"@ledgerhq/live-network": "^2.0.
|
228
|
-
"@ledgerhq/live-nft": "^0.8.
|
230
|
+
"@ledgerhq/live-network": "^2.0.18-nightly.0",
|
231
|
+
"@ledgerhq/live-nft": "^0.8.21-nightly.0",
|
229
232
|
"@ledgerhq/live-promise": "^0.1.1",
|
230
|
-
"@ledgerhq/live-signer-canton": "^0.3.0",
|
231
|
-
"@ledgerhq/live-signer-evm": "^0.7.
|
232
|
-
"@ledgerhq/live-signer-solana": "^0.5.
|
233
|
-
"@ledgerhq/live-wallet": "^0.14.0",
|
234
|
-
"@ledgerhq/speculos-transport": "^0.2.10",
|
233
|
+
"@ledgerhq/live-signer-canton": "^0.3.1-nightly.0",
|
234
|
+
"@ledgerhq/live-signer-evm": "^0.7.6-nightly.0",
|
235
|
+
"@ledgerhq/live-signer-solana": "^0.5.6-nightly.0",
|
236
|
+
"@ledgerhq/live-wallet": "^0.14.1-nightly.0",
|
235
237
|
"@ledgerhq/logs": "^6.13.0",
|
236
|
-
"@ledgerhq/
|
238
|
+
"@ledgerhq/speculos-transport": "^0.2.11-nightly.0",
|
239
|
+
"@ledgerhq/wallet-api-acre-module": "^0.7.0-nightly.0",
|
237
240
|
"@ledgerhq/wallet-api-exchange-module": "^0.16.0"
|
238
241
|
},
|
239
242
|
"devDependencies": {
|
@@ -282,10 +285,10 @@
|
|
282
285
|
"undici": "6.19.2",
|
283
286
|
"uuid": "^8.3.2",
|
284
287
|
"ws": "7",
|
285
|
-
"@ledgerhq/device-react": "^0.2.
|
286
|
-
"@ledgerhq/types-cryptoassets": "^7.
|
288
|
+
"@ledgerhq/device-react": "^0.2.45-nightly.0",
|
289
|
+
"@ledgerhq/types-cryptoassets": "^7.27.0-nightly.0",
|
287
290
|
"@ledgerhq/types-devices": "^6.27.0",
|
288
|
-
"@ledgerhq/types-live": "^6.
|
291
|
+
"@ledgerhq/types-live": "^6.85.0-nightly.0"
|
289
292
|
},
|
290
293
|
"scripts": {
|
291
294
|
"build": "zx ./scripts/build-ts.mjs",
|
@@ -9,7 +9,6 @@ import { runAllWithProgress } from "./runner";
|
|
9
9
|
import { InlineAppInstallEvent } from "./types";
|
10
10
|
import { mergeMap, map, throttleTime } from "rxjs/operators";
|
11
11
|
import { LocalTracer } from "@ledgerhq/logs";
|
12
|
-
import { AppStorageType, StorageProvider } from "../device/use-cases/appDataBackup/types";
|
13
12
|
|
14
13
|
/**
|
15
14
|
* Tries to install a list of apps
|
@@ -26,13 +25,11 @@ const inlineAppInstall = ({
|
|
26
25
|
appNames,
|
27
26
|
onSuccessObs,
|
28
27
|
allowPartialDependencies = false,
|
29
|
-
storage,
|
30
28
|
}: {
|
31
29
|
transport: Transport;
|
32
30
|
appNames: string[];
|
33
31
|
onSuccessObs?: () => Observable<any>;
|
34
32
|
allowPartialDependencies?: boolean;
|
35
|
-
storage?: StorageProvider<AppStorageType>;
|
36
33
|
}): Observable<InlineAppInstallEvent | ConnectAppEvent> => {
|
37
34
|
const tracer = new LocalTracer("hw", {
|
38
35
|
...transport.getTraceContext(),
|
@@ -105,7 +102,7 @@ const inlineAppInstall = ({
|
|
105
102
|
installQueue: state.installQueue,
|
106
103
|
}),
|
107
104
|
maybeSkippedEvent,
|
108
|
-
runAllWithProgress(state, exec
|
105
|
+
runAllWithProgress(state, exec).pipe(
|
109
106
|
throttleTime(100),
|
110
107
|
map(({ globalProgress, itemProgress, installQueue, currentAppOp }) => ({
|
111
108
|
type: "inline-install",
|
package/src/apps/react.ts
CHANGED
@@ -12,14 +12,12 @@ import {
|
|
12
12
|
import { runAppOp } from "./runner";
|
13
13
|
import { App } from "@ledgerhq/types-live";
|
14
14
|
import { useFeatureFlags } from "../featureFlags";
|
15
|
-
import { AppStorageType, StorageProvider } from "../device/use-cases/appDataBackup/types";
|
16
15
|
|
17
16
|
type UseAppsRunnerResult = [State, (arg0: Action) => void];
|
18
17
|
// use for React apps. support dynamic change of the state.
|
19
18
|
export const useAppsRunner = (
|
20
19
|
listResult: ListAppsResult,
|
21
20
|
exec: Exec,
|
22
|
-
storage: StorageProvider<AppStorageType>,
|
23
21
|
appsToRestore?: string[],
|
24
22
|
): UseAppsRunnerResult => {
|
25
23
|
// $FlowFixMe for ledger-live-mobile older react/flow version
|
@@ -36,7 +34,7 @@ export const useAppsRunner = (
|
|
36
34
|
|
37
35
|
useEffect(() => {
|
38
36
|
if (appOp) {
|
39
|
-
const sub = runAppOp({ state, appOp, exec
|
37
|
+
const sub = runAppOp({ state, appOp, exec }).subscribe(event => {
|
40
38
|
dispatch({
|
41
39
|
type: "onRunnerEvent",
|
42
40
|
event,
|
package/src/apps/runner.ts
CHANGED
@@ -13,18 +13,15 @@ import type { Exec, State, AppOp, RunnerEvent, Action } from "./types";
|
|
13
13
|
import { reducer, getActionPlan, getNextAppOp } from "./logic";
|
14
14
|
import { delay } from "../promise";
|
15
15
|
import { getEnv } from "@ledgerhq/live-env";
|
16
|
-
import { AppStorageType, StorageProvider } from "../device/use-cases/appDataBackup/types";
|
17
16
|
|
18
17
|
export const runAppOp = ({
|
19
18
|
state,
|
20
19
|
appOp,
|
21
20
|
exec,
|
22
|
-
storage,
|
23
21
|
}: {
|
24
22
|
state: State;
|
25
23
|
appOp: AppOp;
|
26
24
|
exec: Exec;
|
27
|
-
storage?: StorageProvider<AppStorageType>;
|
28
25
|
}): Observable<RunnerEvent> => {
|
29
26
|
const { appByName, deviceInfo, deviceModel } = state;
|
30
27
|
const app = appByName[appOp.name];
|
@@ -56,7 +53,6 @@ export const runAppOp = ({
|
|
56
53
|
targetId: deviceInfo.targetId,
|
57
54
|
app,
|
58
55
|
modelId: deviceModel.id,
|
59
|
-
...(storage ? { storage } : {}),
|
60
56
|
...(state.skipAppDataBackup ? { skipAppDataBackup: true } : {}),
|
61
57
|
}),
|
62
58
|
).pipe(
|
@@ -99,7 +95,6 @@ type InlineInstallProgress = {
|
|
99
95
|
export const runAllWithProgress = (
|
100
96
|
state: State,
|
101
97
|
exec: Exec,
|
102
|
-
storage?: StorageProvider<AppStorageType>,
|
103
98
|
precision = 100,
|
104
99
|
): Observable<InlineInstallProgress> => {
|
105
100
|
const total = state.uninstallQueue.length + state.installQueue.length;
|
@@ -110,9 +105,7 @@ export const runAllWithProgress = (
|
|
110
105
|
return p;
|
111
106
|
}
|
112
107
|
|
113
|
-
return concat(
|
114
|
-
...getActionPlan(state).map(appOp => runAppOp({ state, appOp, exec, storage })),
|
115
|
-
).pipe(
|
108
|
+
return concat(...getActionPlan(state).map(appOp => runAppOp({ state, appOp, exec }))).pipe(
|
116
109
|
map(event => {
|
117
110
|
if (event.type === "runError") {
|
118
111
|
throw event.error;
|
@@ -14,9 +14,14 @@ import { genericEstimateMaxSpendable } from "./estimateMaxSpendable";
|
|
14
14
|
import { createTransaction } from "./createTransaction";
|
15
15
|
import { genericBroadcast } from "./broadcast";
|
16
16
|
import { genericSignOperation } from "./signOperation";
|
17
|
+
import type { AlpacaSigner } from "./signer/types";
|
17
18
|
|
18
|
-
export function getAlpacaAccountBridge(
|
19
|
-
|
19
|
+
export function getAlpacaAccountBridge(
|
20
|
+
network: string,
|
21
|
+
kind: string,
|
22
|
+
customSigner?: AlpacaSigner,
|
23
|
+
): AccountBridge<any> {
|
24
|
+
const signer = customSigner ?? getSigner(network);
|
20
25
|
return {
|
21
26
|
sync: makeSync({ getAccountShape: genericGetAccountShape(network, kind) }),
|
22
27
|
receive: makeAccountBridgeReceive(getAddressWrapper(signer.getAddress)),
|
@@ -28,5 +33,5 @@ export function getAlpacaAccountBridge(network: string, kind: string): AccountBr
|
|
28
33
|
broadcast: genericBroadcast(network, kind),
|
29
34
|
signOperation: genericSignOperation(network, kind)(signer.context),
|
30
35
|
getSerializedAddressParameters, // NOTE: check wether it should be exposed by coin-module's api instead?
|
31
|
-
} satisfies Partial<AccountBridge<any
|
36
|
+
} satisfies Partial<AccountBridge<any>>;
|
32
37
|
}
|
@@ -2,37 +2,35 @@ import { createApi as createXrpApi } from "@ledgerhq/coin-xrp/api/index";
|
|
2
2
|
import { createApi as createStellarApi } from "@ledgerhq/coin-stellar/api/index";
|
3
3
|
import { createApi as createCantonApi } from "@ledgerhq/coin-canton/api/index";
|
4
4
|
import { createApi as createTronApi } from "@ledgerhq/coin-tron/api/index";
|
5
|
+
import { createApi as createEvmApi } from "@ledgerhq/coin-evm/api/index";
|
5
6
|
import { getCurrencyConfiguration } from "../../../config";
|
6
|
-
import { getCryptoCurrencyById } from "@ledgerhq/cryptoassets/currencies";
|
7
7
|
import { getNetworkAlpacaApi } from "./network/network-alpaca";
|
8
8
|
import { Api } from "@ledgerhq/coin-framework/api/types";
|
9
9
|
import { XrpCoinConfig } from "@ledgerhq/coin-xrp/config";
|
10
10
|
import { StellarCoinConfig } from "@ledgerhq/coin-stellar/config";
|
11
11
|
import { CantonCoinConfig } from "@ledgerhq/coin-canton/config";
|
12
12
|
import { TronCoinConfig } from "@ledgerhq/coin-tron/config";
|
13
|
+
import { EvmConfigInfo } from "@ledgerhq/coin-evm/config";
|
14
|
+
import { findCryptoCurrencyByNetwork } from "../utils";
|
13
15
|
|
14
|
-
export function getAlpacaApi(network, kind): Api<any> {
|
16
|
+
export function getAlpacaApi(network: string, kind: string): Api<any> {
|
15
17
|
if (kind === "local") {
|
16
|
-
|
18
|
+
const currency = findCryptoCurrencyByNetwork(network);
|
19
|
+
switch (currency?.family) {
|
17
20
|
case "xrp":
|
18
|
-
return createXrpApi(
|
19
|
-
getCurrencyConfiguration<XrpCoinConfig>(getCryptoCurrencyById("ripple")),
|
20
|
-
) as Api<any>; // FIXME: createXrpApi returns a strongly typed Api<XrpSender>, fix Api<any> to allow it
|
21
|
+
return createXrpApi(getCurrencyConfiguration<XrpCoinConfig>(currency)) as Api<any>; // FIXME: createXrpApi returns a strongly typed Api<XrpSender>, fix Api<any> to allow it
|
21
22
|
case "stellar":
|
22
|
-
return createStellarApi(
|
23
|
-
getCurrencyConfiguration<StellarCoinConfig>(getCryptoCurrencyById("stellar")),
|
24
|
-
) as Api<any>;
|
23
|
+
return createStellarApi(getCurrencyConfiguration<StellarCoinConfig>(currency)) as Api<any>;
|
25
24
|
case "canton":
|
26
|
-
return createCantonApi(
|
27
|
-
getCurrencyConfiguration<CantonCoinConfig>(
|
28
|
-
getCryptoCurrencyById("canton_network_devnet"),
|
29
|
-
),
|
30
|
-
) as Api<any>;
|
25
|
+
return createCantonApi(getCurrencyConfiguration<CantonCoinConfig>(currency)) as Api<any>;
|
31
26
|
case "tron":
|
32
|
-
return createTronApi(
|
33
|
-
|
27
|
+
return createTronApi(getCurrencyConfiguration<TronCoinConfig>(currency)) as Api<any>;
|
28
|
+
case "evm":
|
29
|
+
return createEvmApi(
|
30
|
+
getCurrencyConfiguration<EvmConfigInfo>(currency),
|
31
|
+
currency.id,
|
34
32
|
) as Api<any>;
|
35
33
|
}
|
36
34
|
}
|
37
|
-
return getNetworkAlpacaApi(network) satisfies Partial<Api<any
|
35
|
+
return getNetworkAlpacaApi(network) satisfies Partial<Api<any>>;
|
38
36
|
}
|
@@ -3,6 +3,7 @@ import * as xrpModule from "@ledgerhq/coin-xrp/api/index";
|
|
3
3
|
import * as stellarModule from "@ledgerhq/coin-stellar/api/index";
|
4
4
|
import * as cantonModule from "@ledgerhq/coin-canton/api/index";
|
5
5
|
import * as tronModule from "@ledgerhq/coin-tron/api/index";
|
6
|
+
import * as evmModule from "@ledgerhq/coin-evm/api/index";
|
6
7
|
import * as config from "../../../config";
|
7
8
|
import * as networkApi from "./network/network-alpaca";
|
8
9
|
import * as cryptoAssets from "@ledgerhq/cryptoassets/currencies";
|
@@ -10,7 +11,7 @@ import * as cryptoAssets from "@ledgerhq/cryptoassets/currencies";
|
|
10
11
|
const mockApiInstance = { mock: "api" };
|
11
12
|
|
12
13
|
jest.mock("@ledgerhq/cryptoassets/currencies", () => ({
|
13
|
-
|
14
|
+
findCryptoCurrencyById: jest.fn(),
|
14
15
|
}));
|
15
16
|
|
16
17
|
jest.mock("../../../config", () => ({
|
@@ -33,18 +34,37 @@ jest.mock("@ledgerhq/coin-tron/api/index", () => ({
|
|
33
34
|
createApi: jest.fn(),
|
34
35
|
}));
|
35
36
|
|
37
|
+
jest.mock("@ledgerhq/coin-evm/api/index", () => ({
|
38
|
+
createApi: jest.fn(),
|
39
|
+
}));
|
40
|
+
|
36
41
|
jest.mock("./network/network-alpaca", () => ({
|
37
42
|
getNetworkAlpacaApi: jest.fn(),
|
38
43
|
}));
|
39
44
|
|
40
45
|
describe("getAlpacaApi", () => {
|
41
|
-
const mockCurrency = { id: "mock-currency" };
|
42
|
-
|
43
46
|
beforeEach(() => {
|
44
47
|
jest.clearAllMocks();
|
45
48
|
|
46
49
|
// Common mocks
|
47
|
-
(cryptoAssets.
|
50
|
+
(cryptoAssets.findCryptoCurrencyById as jest.Mock).mockImplementation(id => {
|
51
|
+
switch (id) {
|
52
|
+
case "ripple":
|
53
|
+
return { family: "xrp" };
|
54
|
+
case "stellar":
|
55
|
+
return { family: "stellar" };
|
56
|
+
case "canton":
|
57
|
+
return { family: "canton" };
|
58
|
+
case "tron":
|
59
|
+
return { family: "tron" };
|
60
|
+
case "ethereum":
|
61
|
+
return { id: "ethereum", family: "evm" };
|
62
|
+
case "sonic":
|
63
|
+
return { id: "sonic", family: "evm" };
|
64
|
+
default:
|
65
|
+
return undefined;
|
66
|
+
}
|
67
|
+
});
|
48
68
|
(config.getCurrencyConfiguration as jest.Mock).mockReturnValue({ config: true });
|
49
69
|
|
50
70
|
// API mocks
|
@@ -52,21 +72,29 @@ describe("getAlpacaApi", () => {
|
|
52
72
|
jest.spyOn(stellarModule, "createApi").mockReturnValue(mockApiInstance as any);
|
53
73
|
jest.spyOn(cantonModule, "createApi").mockReturnValue(mockApiInstance as any);
|
54
74
|
jest.spyOn(tronModule, "createApi").mockReturnValue(mockApiInstance as any);
|
75
|
+
jest.spyOn(evmModule, "createApi").mockReturnValue(mockApiInstance as any);
|
55
76
|
jest.spyOn(networkApi, "getNetworkAlpacaApi").mockReturnValue(mockApiInstance as any);
|
56
77
|
});
|
57
78
|
|
58
79
|
const testCases = [
|
59
|
-
{ network: "xrp", module: xrpModule, label: "XRP" },
|
60
|
-
{ network: "stellar", module: stellarModule, label: "Stellar" },
|
61
|
-
{ network: "tron", module: tronModule, label: "Tron" },
|
62
|
-
{ network: "canton", module: cantonModule, label: "Canton" },
|
80
|
+
{ network: "xrp", module: xrpModule, label: "XRP", params: [{ config: true }] },
|
81
|
+
{ network: "stellar", module: stellarModule, label: "Stellar", params: [{ config: true }] },
|
82
|
+
{ network: "tron", module: tronModule, label: "Tron", params: [{ config: true }] },
|
83
|
+
{ network: "canton", module: cantonModule, label: "Canton", params: [{ config: true }] },
|
84
|
+
{
|
85
|
+
network: "ethereum",
|
86
|
+
module: evmModule,
|
87
|
+
label: "Ethereum",
|
88
|
+
params: [{ config: true }, "ethereum"],
|
89
|
+
},
|
90
|
+
{ network: "sonic", module: evmModule, label: "Sonic", params: [{ config: true }, "sonic"] },
|
63
91
|
];
|
64
92
|
|
65
|
-
testCases.forEach(({ network, module, label }) => {
|
93
|
+
testCases.forEach(({ network, module, label, params }) => {
|
66
94
|
it(`should return ${label} API for network "${network}" and kind "local"`, () => {
|
67
95
|
const result = getAlpacaApi(network, "local");
|
68
96
|
expect(result).toEqual(mockApiInstance);
|
69
|
-
expect(module.createApi).toHaveBeenCalledWith(
|
97
|
+
expect(module.createApi).toHaveBeenCalledWith(...params);
|
70
98
|
});
|
71
99
|
});
|
72
100
|
|
@@ -4,8 +4,8 @@ import { getAlpacaApi } from "./alpaca";
|
|
4
4
|
|
5
5
|
export const genericBroadcast: (network, kind) => AccountBridge<TransactionCommon>["broadcast"] =
|
6
6
|
(network, kind) =>
|
7
|
-
async ({ signedOperation: { signature, operation } }) => {
|
8
|
-
const hash = await getAlpacaApi(
|
7
|
+
async ({ signedOperation: { signature, operation }, account }) => {
|
8
|
+
const hash = await getAlpacaApi(account.currency.id, kind).broadcast(signature);
|
9
9
|
|
10
10
|
return patchOperationWithHash(operation, hash);
|
11
11
|
};
|
@@ -1,29 +1,8 @@
|
|
1
|
-
import { Account, TokenAccount
|
1
|
+
import { Account, TokenAccount } from "@ledgerhq/types-live";
|
2
2
|
import BigNumber from "bignumber.js";
|
3
|
-
import
|
3
|
+
import { GenericTransaction } from "./types";
|
4
4
|
|
5
|
-
export
|
6
|
-
LOW = "LOW",
|
7
|
-
MEDIUM = "MEDIUM",
|
8
|
-
HIGH = "HIGH",
|
9
|
-
}
|
10
|
-
|
11
|
-
export type NetworkInfo = {
|
12
|
-
fees: BigNumber;
|
13
|
-
};
|
14
|
-
|
15
|
-
export function createTransaction(account: Account | TokenAccount): TransactionCommon & {
|
16
|
-
family: string;
|
17
|
-
fees?: BigNumber | null;
|
18
|
-
tag?: number | null | undefined;
|
19
|
-
feeCustomUnit?: Unit | null | undefined;
|
20
|
-
memoType?: string | null;
|
21
|
-
memoValue?: string | null;
|
22
|
-
mode?: "send" | "changeTrust";
|
23
|
-
assetReference?: string;
|
24
|
-
assetOwner?: string;
|
25
|
-
networkInfo?: NetworkInfo | null;
|
26
|
-
} {
|
5
|
+
export function createTransaction(account: Account | TokenAccount): GenericTransaction {
|
27
6
|
const currency =
|
28
7
|
account.type === "TokenAccount" ? account.token.parentCurrency : account.currency;
|
29
8
|
switch (currency.family) {
|
@@ -51,6 +30,16 @@ export function createTransaction(account: Account | TokenAccount): TransactionC
|
|
51
30
|
assetOwner: "",
|
52
31
|
networkInfo: null,
|
53
32
|
};
|
33
|
+
case "evm": {
|
34
|
+
return {
|
35
|
+
mode: "send-eip1559",
|
36
|
+
family: currency.family,
|
37
|
+
amount: new BigNumber(0),
|
38
|
+
recipient: "",
|
39
|
+
useAllAmount: false,
|
40
|
+
feesStrategy: "medium",
|
41
|
+
};
|
42
|
+
}
|
54
43
|
default:
|
55
44
|
throw new Error(`Unsupported currency family: ${currency.family}`);
|
56
45
|
}
|
@@ -2,8 +2,14 @@ import { makeScanAccounts } from "@ledgerhq/coin-framework/bridge/jsHelpers";
|
|
2
2
|
import { CurrencyBridge } from "@ledgerhq/types-live";
|
3
3
|
import { genericGetAccountShape } from "./getAccountShape";
|
4
4
|
import { getSigner } from "./signer";
|
5
|
+
import type { AlpacaSigner } from "./signer/types";
|
5
6
|
|
6
|
-
export function getAlpacaCurrencyBridge(
|
7
|
+
export function getAlpacaCurrencyBridge(
|
8
|
+
network: string,
|
9
|
+
kind: string,
|
10
|
+
customSigner?: AlpacaSigner,
|
11
|
+
): CurrencyBridge {
|
12
|
+
const signer = customSigner ?? getSigner(network);
|
7
13
|
return {
|
8
14
|
preload: () => Promise.resolve({}),
|
9
15
|
hydrate: () => {
|
@@ -11,7 +17,7 @@ export function getAlpacaCurrencyBridge(network: string, kind: string): Currency
|
|
11
17
|
},
|
12
18
|
scanAccounts: makeScanAccounts({
|
13
19
|
getAccountShape: genericGetAccountShape(network, kind),
|
14
|
-
getAddressFn:
|
20
|
+
getAddressFn: signer.getAddress.bind(signer),
|
15
21
|
}),
|
16
22
|
};
|
17
23
|
}
|
@@ -14,8 +14,9 @@ export function genericEstimateMaxSpendable(
|
|
14
14
|
return account.spendableBalance;
|
15
15
|
}
|
16
16
|
const mainAccount = getMainAccount(account, parentAccount);
|
17
|
+
const alpacaApi = getAlpacaApi(mainAccount.currency.id, kind);
|
17
18
|
const draftTransaction = {
|
18
|
-
...createTransaction(account
|
19
|
+
...createTransaction(account),
|
19
20
|
...transaction,
|
20
21
|
amount: mainAccount.spendableBalance,
|
21
22
|
useAllAmount: true,
|
@@ -23,13 +24,10 @@ export function genericEstimateMaxSpendable(
|
|
23
24
|
|
24
25
|
let fees = transaction?.fees;
|
25
26
|
if (transaction?.fees === null || transaction?.fees === undefined) {
|
26
|
-
fees = (
|
27
|
-
|
28
|
-
transactionToIntent(mainAccount, draftTransaction),
|
29
|
-
)
|
30
|
-
).value;
|
27
|
+
fees = (await alpacaApi.estimateFees(transactionToIntent(mainAccount, draftTransaction)))
|
28
|
+
.value;
|
31
29
|
}
|
32
|
-
const { amount } = await
|
30
|
+
const { amount } = await alpacaApi.validateIntent(
|
33
31
|
transactionToIntent(account, { ...draftTransaction }),
|
34
32
|
{ value: transaction?.fees ? BigInt(transaction.fees.toString()) : 0n },
|
35
33
|
);
|
@@ -5,11 +5,12 @@ import { getAlpacaApi } from "./alpaca";
|
|
5
5
|
import { adaptCoreOperationToLiveOperation, extractBalance } from "./utils";
|
6
6
|
import { inferSubOperations } from "@ledgerhq/coin-framework/serialization";
|
7
7
|
import { buildSubAccounts, OperationCommon } from "./buildSubAccounts";
|
8
|
+
import { Pagination } from "@ledgerhq/coin-framework/api/types";
|
8
9
|
|
9
10
|
export function genericGetAccountShape(network: string, kind: string): GetAccountShape {
|
10
11
|
return async (info, syncConfig) => {
|
11
12
|
const { address, initialAccount, currency, derivationMode } = info;
|
12
|
-
const alpacaApi = getAlpacaApi(
|
13
|
+
const alpacaApi = getAlpacaApi(currency.id, kind);
|
13
14
|
|
14
15
|
if (alpacaApi.getChainSpecificRules) {
|
15
16
|
const chainSpecificValidation = alpacaApi.getChainSpecificRules();
|
@@ -41,7 +42,7 @@ export function genericGetAccountShape(network: string, kind: string): GetAccoun
|
|
41
42
|
const lastPagingToken = oldOps[0]?.extra?.pagingToken || "";
|
42
43
|
|
43
44
|
const blockHeight = oldOps.length ? (oldOps[0].blockHeight ?? 0) + 1 : 0;
|
44
|
-
const paginationParams:
|
45
|
+
const paginationParams: Pagination = { minHeight: blockHeight, order: "asc" };
|
45
46
|
if (lastPagingToken) {
|
46
47
|
paginationParams.lastPagingToken = lastPagingToken;
|
47
48
|
}
|
@@ -73,7 +74,7 @@ export function genericGetAccountShape(network: string, kind: string): GetAccoun
|
|
73
74
|
getTokenFromAsset: alpacaApi.getTokenFromAsset,
|
74
75
|
}) || [];
|
75
76
|
|
76
|
-
const
|
77
|
+
const operations = mergedOps.map(op => {
|
77
78
|
const subOperations = inferSubOperations(op.hash, subAccounts);
|
78
79
|
|
79
80
|
return {
|
@@ -85,13 +86,12 @@ export function genericGetAccountShape(network: string, kind: string): GetAccoun
|
|
85
86
|
const res = {
|
86
87
|
id: accountId,
|
87
88
|
xpub: address,
|
88
|
-
blockHeight:
|
89
|
-
operationsWithSubs.length === 0 ? 0 : blockInfo.height || initialAccount?.blockHeight,
|
89
|
+
blockHeight: operations.length === 0 ? 0 : blockInfo.height || initialAccount?.blockHeight,
|
90
90
|
balance: new BigNumber(nativeBalance.toString()),
|
91
91
|
spendableBalance: new BigNumber(spendableBalance.toString()),
|
92
|
-
operations
|
92
|
+
operations,
|
93
93
|
subAccounts,
|
94
|
-
operationsCount:
|
94
|
+
operationsCount: operations.length,
|
95
95
|
};
|
96
96
|
return res;
|
97
97
|
};
|