@ledgerhq/live-common 34.48.0-nightly.2 → 34.48.0-nightly.4
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/createTransaction.d.ts +1 -1
- package/lib/bridge/generic-alpaca/createTransaction.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/createTransaction.js +8 -0
- 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/getAccountShape.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/getAccountShape.js +4 -4
- package/lib/bridge/generic-alpaca/getAccountShape.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/utils.d.ts +2 -0
- 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/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/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/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/index.d.ts +0 -4
- package/lib/e2e/index.d.ts.map +1 -1
- package/lib/e2e/speculos.d.ts.map +1 -1
- package/lib/e2e/speculos.js +12 -0
- package/lib/e2e/speculos.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/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/xrp/setup.d.ts +2 -2
- package/lib/featureFlags/defaultFeatures.d.ts.map +1 -1
- package/lib/featureFlags/defaultFeatures.js +4 -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/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/useAssetsData.d.ts +2 -1
- package/lib/modularDrawer/hooks/useAssetsData.d.ts.map +1 -1
- package/lib/modularDrawer/hooks/useAssetsData.js +2 -1
- package/lib/modularDrawer/hooks/useAssetsData.js.map +1 -1
- 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/createTransaction.d.ts +1 -1
- package/lib-es/bridge/generic-alpaca/createTransaction.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/createTransaction.js +8 -0
- 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/getAccountShape.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/getAccountShape.js +4 -4
- package/lib-es/bridge/generic-alpaca/getAccountShape.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/utils.d.ts +2 -0
- 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/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/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/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/index.d.ts +0 -4
- package/lib-es/e2e/index.d.ts.map +1 -1
- package/lib-es/e2e/speculos.d.ts.map +1 -1
- package/lib-es/e2e/speculos.js +12 -0
- package/lib-es/e2e/speculos.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/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/xrp/setup.d.ts +2 -2
- package/lib-es/featureFlags/defaultFeatures.d.ts.map +1 -1
- package/lib-es/featureFlags/defaultFeatures.js +4 -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/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/useAssetsData.d.ts +2 -1
- package/lib-es/modularDrawer/hooks/useAssetsData.d.ts.map +1 -1
- package/lib-es/modularDrawer/hooks/useAssetsData.js +2 -1
- package/lib-es/modularDrawer/hooks/useAssetsData.js.map +1 -1
- 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 +47 -44
- 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 +13 -18
- package/src/bridge/generic-alpaca/alpaca/index.unit.test.ts +38 -10
- package/src/bridge/generic-alpaca/createTransaction.ts +9 -1
- package/src/bridge/generic-alpaca/currencyBridge.ts +8 -2
- package/src/bridge/generic-alpaca/getAccountShape.ts +4 -5
- 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/utils.test.ts +29 -1
- package/src/bridge/generic-alpaca/utils.ts +15 -0
- package/src/config/sharedConfig.ts +2 -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/Network.ts +1 -0
- package/src/e2e/families/kaspa.ts +17 -0
- package/src/e2e/speculos.ts +12 -0
- package/src/exchange/swap/transactionStrategies.ts +121 -73
- 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/featureFlags/defaultFeatures.ts +4 -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/state-manager/api.ts +4 -2
- package/src/modularDrawer/data/state-manager/types.ts +1 -0
- package/src/modularDrawer/hooks/useAssetsData.ts +3 -0
- package/src/wallet-api/Exchange/server.ts +17 -14
@@ -19,7 +19,7 @@ export function createTransaction(account: Account | TokenAccount): TransactionC
|
|
19
19
|
feeCustomUnit?: Unit | null | undefined;
|
20
20
|
memoType?: string | null;
|
21
21
|
memoValue?: string | null;
|
22
|
-
mode?: "send" | "changeTrust";
|
22
|
+
mode?: "send" | "changeTrust" | "send-legacy" | "send-eip1559";
|
23
23
|
assetReference?: string;
|
24
24
|
assetOwner?: string;
|
25
25
|
networkInfo?: NetworkInfo | null;
|
@@ -51,6 +51,14 @@ export function createTransaction(account: Account | TokenAccount): TransactionC
|
|
51
51
|
assetOwner: "",
|
52
52
|
networkInfo: null,
|
53
53
|
};
|
54
|
+
case "evm": {
|
55
|
+
return {
|
56
|
+
mode: "send-eip1559",
|
57
|
+
family: currency.family,
|
58
|
+
amount: new BigNumber(0),
|
59
|
+
recipient: "",
|
60
|
+
};
|
61
|
+
}
|
54
62
|
default:
|
55
63
|
throw new Error(`Unsupported currency family: ${currency.family}`);
|
56
64
|
}
|
@@ -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
|
}
|
@@ -73,7 +73,7 @@ export function genericGetAccountShape(network: string, kind: string): GetAccoun
|
|
73
73
|
getTokenFromAsset: alpacaApi.getTokenFromAsset,
|
74
74
|
}) || [];
|
75
75
|
|
76
|
-
const
|
76
|
+
const operations = mergedOps.map(op => {
|
77
77
|
const subOperations = inferSubOperations(op.hash, subAccounts);
|
78
78
|
|
79
79
|
return {
|
@@ -85,13 +85,12 @@ export function genericGetAccountShape(network: string, kind: string): GetAccoun
|
|
85
85
|
const res = {
|
86
86
|
id: accountId,
|
87
87
|
xpub: address,
|
88
|
-
blockHeight:
|
89
|
-
operationsWithSubs.length === 0 ? 0 : blockInfo.height || initialAccount?.blockHeight,
|
88
|
+
blockHeight: operations.length === 0 ? 0 : blockInfo.height || initialAccount?.blockHeight,
|
90
89
|
balance: new BigNumber(nativeBalance.toString()),
|
91
90
|
spendableBalance: new BigNumber(spendableBalance.toString()),
|
92
|
-
operations
|
91
|
+
operations,
|
93
92
|
subAccounts,
|
94
|
-
operationsCount:
|
93
|
+
operationsCount: operations.length,
|
95
94
|
};
|
96
95
|
return res;
|
97
96
|
};
|
@@ -0,0 +1,70 @@
|
|
1
|
+
import { filter, firstValueFrom } from "rxjs";
|
2
|
+
import { EvmAddress, EvmSignature, EvmSigner } from "@ledgerhq/coin-evm/types/signer";
|
3
|
+
import { CreateSigner } from "../../setup";
|
4
|
+
import { DeviceManagementKit } from "@ledgerhq/device-management-kit";
|
5
|
+
import { DmkSignerEth, LegacySignerEth } from "@ledgerhq/live-signer-evm";
|
6
|
+
import Transport from "@ledgerhq/hw-transport";
|
7
|
+
import { getEnv } from "@ledgerhq/live-env";
|
8
|
+
import { ResolutionConfig, LoadConfig } from "@ledgerhq/hw-app-eth/lib/services/types";
|
9
|
+
import { Signature } from "ethers";
|
10
|
+
|
11
|
+
export type Signer = {
|
12
|
+
getAddress: (path: string) => Promise<EvmAddress>;
|
13
|
+
signTransaction: (path: string, tx: string) => Promise<string>;
|
14
|
+
};
|
15
|
+
|
16
|
+
const isDmkTransport = (
|
17
|
+
transport: Transport,
|
18
|
+
): transport is Transport & { dmk: DeviceManagementKit; sessionId: string } => {
|
19
|
+
return (
|
20
|
+
"dmk" in transport &&
|
21
|
+
transport.dmk !== undefined &&
|
22
|
+
"sessionId" in transport &&
|
23
|
+
transport.sessionId !== undefined
|
24
|
+
);
|
25
|
+
};
|
26
|
+
|
27
|
+
const createLiveSigner: CreateSigner<EvmSigner> = (transport: Transport) => {
|
28
|
+
if (isDmkTransport(transport)) {
|
29
|
+
return new DmkSignerEth(transport.dmk, transport.sessionId);
|
30
|
+
}
|
31
|
+
|
32
|
+
return new LegacySignerEth(transport);
|
33
|
+
};
|
34
|
+
|
35
|
+
export const createSigner: CreateSigner<Signer> = (transport: Transport) => {
|
36
|
+
const signer = createLiveSigner(transport);
|
37
|
+
|
38
|
+
return {
|
39
|
+
getAddress: signer.getAddress.bind(signer),
|
40
|
+
signTransaction: async (path, tx) => {
|
41
|
+
// Configure type of resolutions necessary for the clear signing
|
42
|
+
const resolutionConfig: ResolutionConfig = {
|
43
|
+
externalPlugins: true,
|
44
|
+
erc20: true,
|
45
|
+
nft: false,
|
46
|
+
uniswapV3: true,
|
47
|
+
};
|
48
|
+
const loadConfig: LoadConfig = {
|
49
|
+
cryptoassetsBaseURL: getEnv("DYNAMIC_CAL_BASE_URL"),
|
50
|
+
nftExplorerBaseURL: getEnv("NFT_METADATA_SERVICE") + "/v1/ethereum",
|
51
|
+
};
|
52
|
+
|
53
|
+
signer.setLoadConfig(loadConfig);
|
54
|
+
|
55
|
+
const observable = signer.clearSignTransaction(path, tx.substring(2), resolutionConfig, true);
|
56
|
+
const event = observable.pipe(
|
57
|
+
filter((event): event is { type: "signer.evm.signed"; value: EvmSignature } => {
|
58
|
+
return event.type === "signer.evm.signed";
|
59
|
+
}),
|
60
|
+
);
|
61
|
+
const { value } = await firstValueFrom(event);
|
62
|
+
|
63
|
+
return Signature.from({
|
64
|
+
r: "0x" + value.r,
|
65
|
+
s: "0x" + value.s,
|
66
|
+
v: typeof value.v === "number" ? value.v : parseInt(value.v, 16),
|
67
|
+
}).serialized;
|
68
|
+
},
|
69
|
+
};
|
70
|
+
};
|
@@ -1,22 +1,12 @@
|
|
1
|
-
import { GetAddressFn } from "@ledgerhq/coin-framework/bridge/getAddressWrapper";
|
2
1
|
import xrpGetAddress from "@ledgerhq/coin-xrp/signer/getAddress";
|
3
2
|
import stellarGetAddress from "@ledgerhq/coin-stellar/signer/getAddress";
|
4
|
-
import { CreateSigner, executeWithSigner } from "../../setup";
|
5
|
-
import Xrp from "@ledgerhq/hw-app-xrp";
|
6
3
|
import Stellar from "@ledgerhq/hw-app-str";
|
7
|
-
|
8
|
-
import Transport from "@ledgerhq/hw-transport";
|
9
4
|
import { signTransaction, stellarSignTransaction } from "./signTransaction";
|
10
|
-
import { SignerContext } from "@ledgerhq/coin-framework/signer";
|
11
|
-
import { SignTransactionOptions } from "./types";
|
12
5
|
import { StrKey } from "@stellar/stellar-sdk";
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
signMessage?: (message: string) => Promise<string>;
|
18
|
-
context: SignerContext<any>;
|
19
|
-
};
|
6
|
+
import { CreateSigner, executeWithSigner } from "../../setup";
|
7
|
+
import Xrp from "@ledgerhq/hw-app-xrp";
|
8
|
+
import Transport from "@ledgerhq/hw-transport";
|
9
|
+
import { AlpacaSigner } from "./types";
|
20
10
|
|
21
11
|
const createSignerXrp: CreateSigner<Xrp> = (transport: Transport) => {
|
22
12
|
return new Xrp(transport);
|
@@ -47,7 +37,7 @@ const createSignerStellar: CreateSigner<Stellar> = (transport: Transport) => {
|
|
47
37
|
|
48
38
|
const signerContextStellar = executeWithSigner(createSignerStellar);
|
49
39
|
|
50
|
-
export function getSigner(network): AlpacaSigner {
|
40
|
+
export function getSigner(network: string): AlpacaSigner {
|
51
41
|
switch (network) {
|
52
42
|
case "ripple":
|
53
43
|
case "xrp": {
|
@@ -1,9 +1,10 @@
|
|
1
1
|
import { SignerContext } from "@ledgerhq/coin-framework/signer";
|
2
|
-
import { XrpSigner } from "@ledgerhq/coin-xrp/index";
|
3
|
-
import { SignTransactionOptions } from "./types";
|
4
2
|
import { StellarSigner } from "@ledgerhq/coin-stellar/types/signer";
|
3
|
+
import { LegacySigner, SignTransactionOptions } from "./types";
|
5
4
|
|
6
|
-
export const signTransaction =
|
5
|
+
export const signTransaction = <Signer extends LegacySigner>(
|
6
|
+
signerContext: SignerContext<Signer>,
|
7
|
+
) => {
|
7
8
|
return async (deviceId: string, { path, rawTxHex }: SignTransactionOptions) => {
|
8
9
|
const signedTx = await signerContext(deviceId, signer =>
|
9
10
|
signer.signTransaction(path, rawTxHex),
|
@@ -1,3 +1,17 @@
|
|
1
|
+
import { GetAddressFn } from "@ledgerhq/coin-framework/bridge/getAddressWrapper";
|
2
|
+
import { SignerContext } from "@ledgerhq/coin-framework/signer";
|
3
|
+
|
4
|
+
export type LegacySigner = {
|
5
|
+
signTransaction: (path: string, rawTxHex: string) => Promise<string>;
|
6
|
+
};
|
7
|
+
|
8
|
+
export type AlpacaSigner<S = unknown> = {
|
9
|
+
getAddress: GetAddressFn;
|
10
|
+
signTransaction?: (deviceId: string, opts: SignTransactionOptions) => Promise<string>;
|
11
|
+
signMessage?: (message: string) => Promise<string>;
|
12
|
+
context: SignerContext<S>;
|
13
|
+
};
|
14
|
+
|
1
15
|
export type SignTransactionOptions = {
|
2
16
|
rawTxHex: string;
|
3
17
|
path: string;
|
@@ -1,8 +1,36 @@
|
|
1
|
-
import {
|
1
|
+
import {
|
2
|
+
adaptCoreOperationToLiveOperation,
|
3
|
+
extractBalance,
|
4
|
+
findCryptoCurrencyByNetwork,
|
5
|
+
} from "./utils";
|
2
6
|
import BigNumber from "bignumber.js";
|
3
7
|
import { Operation as CoreOperation } from "@ledgerhq/coin-framework/api/types";
|
4
8
|
|
5
9
|
describe("Alpaca utils", () => {
|
10
|
+
describe("findCryptoCurrencyByNetwork", () => {
|
11
|
+
it("finds a crypto currency by id", () => {
|
12
|
+
expect(findCryptoCurrencyByNetwork("ethereum")).toMatchObject({
|
13
|
+
id: "ethereum",
|
14
|
+
family: "evm",
|
15
|
+
});
|
16
|
+
});
|
17
|
+
|
18
|
+
it("takes currency remapping into account", () => {
|
19
|
+
expect(findCryptoCurrencyByNetwork("ripple")).toMatchObject({
|
20
|
+
id: "ripple",
|
21
|
+
family: "xrp",
|
22
|
+
});
|
23
|
+
expect(findCryptoCurrencyByNetwork("xrp")).toMatchObject({
|
24
|
+
id: "ripple",
|
25
|
+
family: "xrp",
|
26
|
+
});
|
27
|
+
});
|
28
|
+
|
29
|
+
it("does not find non existing currencies", () => {
|
30
|
+
expect(findCryptoCurrencyByNetwork("non_existing_currency")).toBeUndefined();
|
31
|
+
});
|
32
|
+
});
|
33
|
+
|
6
34
|
describe("extractBalance", () => {
|
7
35
|
it("extracts an existing balance", () => {
|
8
36
|
expect(extractBalance([{ value: 4n, asset: { type: "type1" } }], "type1")).toEqual({
|
@@ -7,6 +7,15 @@ import {
|
|
7
7
|
Operation as CoreOperation,
|
8
8
|
TransactionIntent,
|
9
9
|
} from "@ledgerhq/coin-framework/api/types";
|
10
|
+
import { findCryptoCurrencyById } from "@ledgerhq/cryptoassets/currencies";
|
11
|
+
import { CryptoCurrency } from "@ledgerhq/types-cryptoassets";
|
12
|
+
|
13
|
+
export function findCryptoCurrencyByNetwork(network: string): CryptoCurrency | undefined {
|
14
|
+
const networksRemap = {
|
15
|
+
xrp: "ripple",
|
16
|
+
};
|
17
|
+
return findCryptoCurrencyById(networksRemap[network] ?? network);
|
18
|
+
}
|
10
19
|
|
11
20
|
export function extractBalance(balances: Balance[], type: string): Balance {
|
12
21
|
return (
|
@@ -110,6 +119,12 @@ export function transactionToIntent(
|
|
110
119
|
case "send":
|
111
120
|
transactionType = "send";
|
112
121
|
break;
|
122
|
+
case "send-legacy":
|
123
|
+
transactionType = "send-legacy";
|
124
|
+
break;
|
125
|
+
case "send-eip1559":
|
126
|
+
transactionType = "send-eip1559";
|
127
|
+
break;
|
113
128
|
default:
|
114
129
|
throw new Error(`Unsupported transaction mode: ${transaction.mode}`);
|
115
130
|
}
|
@@ -11,6 +11,7 @@ import { evmConfig } from "../families/evm/config";
|
|
11
11
|
import { fileCoinConfig } from "../families/filecoin/config";
|
12
12
|
import { hederaConfig } from "../families/hedera/config";
|
13
13
|
import { internetComputerConfig } from "../families/internet_computer/config";
|
14
|
+
import { kaspaConfig } from "../families/kaspa/config";
|
14
15
|
import { nearConfig } from "../families/near/config";
|
15
16
|
import { minaConfig } from "../families/mina/config";
|
16
17
|
import { polkadotConfig } from "../families/polkadot/config";
|
@@ -55,6 +56,7 @@ export const liveConfig: ConfigSchema = {
|
|
55
56
|
...fileCoinConfig,
|
56
57
|
...hederaConfig,
|
57
58
|
...internetComputerConfig,
|
59
|
+
...kaspaConfig,
|
58
60
|
...nearConfig,
|
59
61
|
...minaConfig,
|
60
62
|
...polkadotConfig,
|
package/src/e2e/enum/Account.ts
CHANGED
@@ -276,6 +276,20 @@ export class Account {
|
|
276
276
|
0,
|
277
277
|
);
|
278
278
|
|
279
|
+
static readonly KASPA_1 = new Account(
|
280
|
+
Currency.KAS,
|
281
|
+
"KASPA 1",
|
282
|
+
"kaspa:kaspa:qqpqtujclz2usyj7rgmhghfu8e5echrh8t2pkz69tq37uclfrpu3g0w6laqqk",
|
283
|
+
0,
|
284
|
+
);
|
285
|
+
|
286
|
+
static readonly KASPA_2 = new Account(
|
287
|
+
Currency.KAS,
|
288
|
+
"KASPA 2",
|
289
|
+
"kaspa:qrx2agwk93qyjvlcuzz5jy37knt298zupvw2ls05p4te55c29uwuyzzra5qkv",
|
290
|
+
1,
|
291
|
+
);
|
292
|
+
|
279
293
|
static readonly LTC_1 = new Account(
|
280
294
|
Currency.LTC,
|
281
295
|
"Litecoin 1",
|
package/src/e2e/enum/AppInfos.ts
CHANGED
package/src/e2e/enum/Currency.ts
CHANGED
@@ -25,6 +25,8 @@ export class Currency {
|
|
25
25
|
|
26
26
|
static readonly APT = new Currency("Aptos", "APT", "aptos", AppInfos.APTOS, [Network.APTOS]);
|
27
27
|
|
28
|
+
static readonly KAS = new Currency("Kaspa", "KAS", "kaspa", AppInfos.KASPA, [Network.KASPA]);
|
29
|
+
|
28
30
|
static readonly tBTC = new Currency(
|
29
31
|
"Bitcoin Testnet",
|
30
32
|
"𝚝BTC",
|
package/src/e2e/enum/Network.ts
CHANGED
@@ -0,0 +1,17 @@
|
|
1
|
+
import expect from "expect";
|
2
|
+
import { pressBoth, pressUntilTextFound, waitFor, containsSubstringInEvent } from "../speculos";
|
3
|
+
import { DeviceLabels } from "../enum/DeviceLabels";
|
4
|
+
import { Delegate } from "../models/Delegate";
|
5
|
+
|
6
|
+
export async function sendKaspa() {
|
7
|
+
await pressUntilTextFound(DeviceLabels.APPROVE);
|
8
|
+
await pressBoth();
|
9
|
+
}
|
10
|
+
|
11
|
+
export async function delegateKaspa(delegatingAccount: Delegate) {
|
12
|
+
await waitFor(DeviceLabels.REVIEW_OPERATION);
|
13
|
+
const events = await pressUntilTextFound(DeviceLabels.APPROVE);
|
14
|
+
const isAmountCorrect = containsSubstringInEvent(delegatingAccount.amount, events);
|
15
|
+
expect(isAmountCorrect).toBeTruthy();
|
16
|
+
await pressBoth();
|
17
|
+
}
|
package/src/e2e/speculos.ts
CHANGED
@@ -30,6 +30,7 @@ import { sendXRP } from "./families/xrp";
|
|
30
30
|
import { delegateAptos, sendAptos } from "./families/aptos";
|
31
31
|
import { delegateNear } from "./families/near";
|
32
32
|
import { delegateCosmos, sendCosmos } from "./families/cosmos";
|
33
|
+
import { sendKaspa } from "./families/kaspa";
|
33
34
|
import { delegateSolana, sendSolana } from "./families/solana";
|
34
35
|
import { delegateTezos } from "./families/tezos";
|
35
36
|
import { delegateCelo } from "./families/celo";
|
@@ -325,6 +326,14 @@ export const specs: Specs = {
|
|
325
326
|
},
|
326
327
|
dependency: "",
|
327
328
|
},
|
329
|
+
Kaspa: {
|
330
|
+
currency: getCryptoCurrencyById("kaspa"),
|
331
|
+
appQuery: {
|
332
|
+
model: getSpeculosModel(),
|
333
|
+
appName: "Kaspa",
|
334
|
+
},
|
335
|
+
dependency: "",
|
336
|
+
},
|
328
337
|
};
|
329
338
|
|
330
339
|
export async function startSpeculos(
|
@@ -677,6 +686,9 @@ export async function signSendTransaction(tx: Transaction) {
|
|
677
686
|
case Currency.APT:
|
678
687
|
await sendAptos();
|
679
688
|
break;
|
689
|
+
case Currency.KAS:
|
690
|
+
await sendKaspa();
|
691
|
+
break;
|
680
692
|
default:
|
681
693
|
throw new Error(`Unsupported currency: ${currencyName.ticker}`);
|
682
694
|
}
|