@trezor/connect 9.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +50 -0
- package/README.md +38 -0
- package/lib/api/applyFlags.d.ts +8 -0
- package/lib/api/applyFlags.js +37 -0
- package/lib/api/applySettings.d.ts +8 -0
- package/lib/api/applySettings.js +57 -0
- package/lib/api/authorizeCoinJoin.d.ts +7 -0
- package/lib/api/authorizeCoinJoin.js +45 -0
- package/lib/api/backupDevice.d.ts +7 -0
- package/lib/api/backupDevice.js +31 -0
- package/lib/api/binance/binanceSignTx.d.ts +6 -0
- package/lib/api/binance/binanceSignTx.js +91 -0
- package/lib/api/binanceGetAddress.d.ts +22 -0
- package/lib/api/binanceGetAddress.js +126 -0
- package/lib/api/binanceGetPublicKey.d.ts +10 -0
- package/lib/api/binanceGetPublicKey.js +72 -0
- package/lib/api/binanceSignTransaction.d.ts +12 -0
- package/lib/api/binanceSignTransaction.js +31 -0
- package/lib/api/bitcoin/Fees.d.ts +15 -0
- package/lib/api/bitcoin/Fees.js +175 -0
- package/lib/api/bitcoin/TransactionComposer.d.ts +36 -0
- package/lib/api/bitcoin/TransactionComposer.js +150 -0
- package/lib/api/bitcoin/__fixtures__/inputs.d.ts +112 -0
- package/lib/api/bitcoin/__fixtures__/inputs.js +102 -0
- package/lib/api/bitcoin/__fixtures__/signtxVerify.d.ts +147 -0
- package/lib/api/bitcoin/__fixtures__/signtxVerify.js +216 -0
- package/lib/api/bitcoin/enhanceSignTx.d.ts +4 -0
- package/lib/api/bitcoin/enhanceSignTx.js +63 -0
- package/lib/api/bitcoin/index.d.ts +10 -0
- package/lib/api/bitcoin/index.js +13 -0
- package/lib/api/bitcoin/inputs.d.ts +8 -0
- package/lib/api/bitcoin/inputs.js +60 -0
- package/lib/api/bitcoin/outputs.d.ts +8 -0
- package/lib/api/bitcoin/outputs.js +115 -0
- package/lib/api/bitcoin/refTx.d.ts +11 -0
- package/lib/api/bitcoin/refTx.js +220 -0
- package/lib/api/bitcoin/signtx.d.ts +25 -0
- package/lib/api/bitcoin/signtx.js +164 -0
- package/lib/api/bitcoin/signtxLegacy.d.ts +4 -0
- package/lib/api/bitcoin/signtxLegacy.js +136 -0
- package/lib/api/bitcoin/signtxVerify.d.ts +8 -0
- package/lib/api/bitcoin/signtxVerify.js +130 -0
- package/lib/api/blockchainDisconnect.d.ts +13 -0
- package/lib/api/blockchainDisconnect.js +34 -0
- package/lib/api/blockchainEstimateFee.d.ts +12 -0
- package/lib/api/blockchainEstimateFee.js +70 -0
- package/lib/api/blockchainGetAccountBalanceHistory.d.ts +12 -0
- package/lib/api/blockchainGetAccountBalanceHistory.js +41 -0
- package/lib/api/blockchainGetCurrentFiatRates.d.ts +15 -0
- package/lib/api/blockchainGetCurrentFiatRates.js +33 -0
- package/lib/api/blockchainGetFiatRatesForTimestamps.d.ts +17 -0
- package/lib/api/blockchainGetFiatRatesForTimestamps.js +33 -0
- package/lib/api/blockchainGetTransactions.d.ts +12 -0
- package/lib/api/blockchainGetTransactions.js +33 -0
- package/lib/api/blockchainSetCustomBackend.d.ts +11 -0
- package/lib/api/blockchainSetCustomBackend.js +38 -0
- package/lib/api/blockchainSubscribe.d.ts +14 -0
- package/lib/api/blockchainSubscribe.js +38 -0
- package/lib/api/blockchainSubscribeFiatRates.d.ts +14 -0
- package/lib/api/blockchainSubscribeFiatRates.js +33 -0
- package/lib/api/blockchainUnsubscribe.d.ts +14 -0
- package/lib/api/blockchainUnsubscribe.js +38 -0
- package/lib/api/blockchainUnsubscribeFiatRates.d.ts +13 -0
- package/lib/api/blockchainUnsubscribeFiatRates.js +29 -0
- package/lib/api/cardano/cardanoAddressParameters.d.ts +8 -0
- package/lib/api/cardano/cardanoAddressParameters.js +100 -0
- package/lib/api/cardano/cardanoAuxiliaryData.d.ts +6 -0
- package/lib/api/cardano/cardanoAuxiliaryData.js +51 -0
- package/lib/api/cardano/cardanoCertificate.d.ts +14 -0
- package/lib/api/cardano/cardanoCertificate.js +149 -0
- package/lib/api/cardano/cardanoInputs.d.ts +13 -0
- package/lib/api/cardano/cardanoInputs.js +34 -0
- package/lib/api/cardano/cardanoOutputs.d.ts +8 -0
- package/lib/api/cardano/cardanoOutputs.js +38 -0
- package/lib/api/cardano/cardanoTokenBundle.d.ts +8 -0
- package/lib/api/cardano/cardanoTokenBundle.js +36 -0
- package/lib/api/cardano/cardanoWitnesses.d.ts +5 -0
- package/lib/api/cardano/cardanoWitnesses.js +48 -0
- package/lib/api/cardanoGetAddress.d.ts +23 -0
- package/lib/api/cardanoGetAddress.js +158 -0
- package/lib/api/cardanoGetNativeScriptHash.d.ts +12 -0
- package/lib/api/cardanoGetNativeScriptHash.js +79 -0
- package/lib/api/cardanoGetPublicKey.d.ts +10 -0
- package/lib/api/cardanoGetPublicKey.js +78 -0
- package/lib/api/cardanoSignTransaction.d.ts +48 -0
- package/lib/api/cardanoSignTransaction.js +283 -0
- package/lib/api/changePin.d.ts +7 -0
- package/lib/api/changePin.js +22 -0
- package/lib/api/cipherKeyValue.d.ts +8 -0
- package/lib/api/cipherKeyValue.js +56 -0
- package/lib/api/common/Discovery.d.ts +35 -0
- package/lib/api/common/Discovery.js +113 -0
- package/lib/api/common/__fixtures__/paramsValidator.d.ts +596 -0
- package/lib/api/common/__fixtures__/paramsValidator.js +355 -0
- package/lib/api/common/paramsValidator.d.ts +14 -0
- package/lib/api/common/paramsValidator.js +140 -0
- package/lib/api/composeTransaction.d.ts +33 -0
- package/lib/api/composeTransaction.js +270 -0
- package/lib/api/customMessage.d.ts +13 -0
- package/lib/api/customMessage.js +56 -0
- package/lib/api/eos/eosSignTx.d.ts +17 -0
- package/lib/api/eos/eosSignTx.js +347 -0
- package/lib/api/eosGetPublicKey.d.ts +10 -0
- package/lib/api/eosGetPublicKey.js +73 -0
- package/lib/api/eosSignTransaction.d.ts +16 -0
- package/lib/api/eosSignTransaction.js +36 -0
- package/lib/api/ethereum/__fixtures__/ethereumSignTypedData.d.ts +225 -0
- package/lib/api/ethereum/__fixtures__/ethereumSignTypedData.js +341 -0
- package/lib/api/ethereum/ethereumSignTx.d.ts +13 -0
- package/lib/api/ethereum/ethereumSignTx.js +92 -0
- package/lib/api/ethereum/ethereumSignTypedData.d.ts +9 -0
- package/lib/api/ethereum/ethereumSignTypedData.js +120 -0
- package/lib/api/ethereumGetAddress.d.ts +28 -0
- package/lib/api/ethereumGetAddress.js +133 -0
- package/lib/api/ethereumGetPublicKey.d.ts +15 -0
- package/lib/api/ethereumGetPublicKey.js +79 -0
- package/lib/api/ethereumSignMessage.d.ts +7 -0
- package/lib/api/ethereumSignMessage.js +41 -0
- package/lib/api/ethereumSignTransaction.d.ts +20 -0
- package/lib/api/ethereumSignTransaction.js +82 -0
- package/lib/api/ethereumSignTypedData.d.ts +14 -0
- package/lib/api/ethereumSignTypedData.js +151 -0
- package/lib/api/ethereumVerifyMessage.d.ts +7 -0
- package/lib/api/ethereumVerifyMessage.js +34 -0
- package/lib/api/firmware/getBinary.d.ts +20 -0
- package/lib/api/firmware/getBinary.js +37 -0
- package/lib/api/firmware/modifyFirmware.d.ts +6 -0
- package/lib/api/firmware/modifyFirmware.js +18 -0
- package/lib/api/firmwareUpdate.d.ts +15 -0
- package/lib/api/firmwareUpdate.js +89 -0
- package/lib/api/getAccountInfo.d.ts +98 -0
- package/lib/api/getAccountInfo.js +326 -0
- package/lib/api/getAddress.d.ts +28 -0
- package/lib/api/getAddress.js +152 -0
- package/lib/api/getCoinInfo.d.ts +11 -0
- package/lib/api/getCoinInfo.js +27 -0
- package/lib/api/getDeviceState.d.ts +8 -0
- package/lib/api/getDeviceState.js +15 -0
- package/lib/api/getFeatures.d.ts +6 -0
- package/lib/api/getFeatures.js +18 -0
- package/lib/api/getOwnershipId.d.ts +10 -0
- package/lib/api/getOwnershipId.js +75 -0
- package/lib/api/getOwnershipProof.d.ts +14 -0
- package/lib/api/getOwnershipProof.js +86 -0
- package/lib/api/getPublicKey.d.ts +15 -0
- package/lib/api/getPublicKey.js +84 -0
- package/lib/api/getSettings.d.ts +6 -0
- package/lib/api/getSettings.js +16 -0
- package/lib/api/index.d.ts +64 -0
- package/lib/api/index.js +134 -0
- package/lib/api/management/uploadFirmware.d.ts +6 -0
- package/lib/api/management/uploadFirmware.js +49 -0
- package/lib/api/nem/nemSignTx.d.ts +4 -0
- package/lib/api/nem/nemSignTx.js +139 -0
- package/lib/api/nemGetAddress.d.ts +22 -0
- package/lib/api/nemGetAddress.js +144 -0
- package/lib/api/nemSignTransaction.d.ts +7 -0
- package/lib/api/nemSignTransaction.js +29 -0
- package/lib/api/pushTransaction.d.ts +14 -0
- package/lib/api/pushTransaction.js +40 -0
- package/lib/api/rebootToBootloader.d.ts +8 -0
- package/lib/api/rebootToBootloader.js +43 -0
- package/lib/api/recoveryDevice.d.ts +8 -0
- package/lib/api/recoveryDevice.js +57 -0
- package/lib/api/requestLogin.d.ts +12 -0
- package/lib/api/requestLogin.js +63 -0
- package/lib/api/resetDevice.d.ts +9 -0
- package/lib/api/resetDevice.js +59 -0
- package/lib/api/rippleGetAddress.d.ts +22 -0
- package/lib/api/rippleGetAddress.js +126 -0
- package/lib/api/rippleSignTransaction.d.ts +10 -0
- package/lib/api/rippleSignTransaction.js +54 -0
- package/lib/api/setProxy.d.ts +8 -0
- package/lib/api/setProxy.js +26 -0
- package/lib/api/signMessage.d.ts +7 -0
- package/lib/api/signMessage.js +51 -0
- package/lib/api/signTransaction.d.ts +21 -0
- package/lib/api/signTransaction.js +146 -0
- package/lib/api/stellar/stellarSignTx.d.ts +5 -0
- package/lib/api/stellar/stellarSignTx.js +198 -0
- package/lib/api/stellarGetAddress.d.ts +22 -0
- package/lib/api/stellarGetAddress.js +126 -0
- package/lib/api/stellarSignTransaction.d.ts +23 -0
- package/lib/api/stellarSignTransaction.js +62 -0
- package/lib/api/tezos/tezosSignTx.d.ts +4 -0
- package/lib/api/tezos/tezosSignTx.js +237 -0
- package/lib/api/tezosGetAddress.d.ts +22 -0
- package/lib/api/tezosGetAddress.js +126 -0
- package/lib/api/tezosGetPublicKey.d.ts +10 -0
- package/lib/api/tezosGetPublicKey.js +72 -0
- package/lib/api/tezosSignTransaction.d.ts +7 -0
- package/lib/api/tezosSignTransaction.js +30 -0
- package/lib/api/verifyMessage.d.ts +7 -0
- package/lib/api/verifyMessage.js +47 -0
- package/lib/api/wipeDevice.d.ts +8 -0
- package/lib/api/wipeDevice.js +41 -0
- package/lib/backend/BlockchainLink.d.ts +75 -0
- package/lib/backend/BlockchainLink.js +298 -0
- package/lib/constants/cardano.d.ts +9 -0
- package/lib/constants/cardano.js +14 -0
- package/lib/constants/errors.d.ts +49 -0
- package/lib/constants/errors.js +62 -0
- package/lib/constants/index.d.ts +6 -0
- package/lib/constants/index.js +10 -0
- package/lib/constants/nem.d.ts +22 -0
- package/lib/constants/nem.js +28 -0
- package/lib/constants/network.d.ts +13 -0
- package/lib/constants/network.js +15 -0
- package/lib/core/AbstractMethod.d.ts +59 -0
- package/lib/core/AbstractMethod.js +159 -0
- package/lib/core/index.d.ts +16 -0
- package/lib/core/index.js +671 -0
- package/lib/core/method.d.ts +6 -0
- package/lib/core/method.js +19 -0
- package/lib/data/DataManager.d.ts +31 -0
- package/lib/data/DataManager.js +98 -0
- package/lib/data/coinInfo.d.ts +37 -0
- package/lib/data/coinInfo.js +278 -0
- package/lib/data/config.d.ts +98 -0
- package/lib/data/config.js +201 -0
- package/lib/data/connectSettings.d.ts +6 -0
- package/lib/data/connectSettings.js +150 -0
- package/lib/data/firmwareInfo.d.ts +11 -0
- package/lib/data/firmwareInfo.js +148 -0
- package/lib/data/transportInfo.d.ts +4 -0
- package/lib/data/transportInfo.js +29 -0
- package/lib/data/udevInfo.d.ts +3 -0
- package/lib/data/udevInfo.js +21 -0
- package/lib/data/version.d.ts +3 -0
- package/lib/data/version.js +7 -0
- package/lib/device/AbortController.d.ts +21 -0
- package/lib/device/AbortController.js +40 -0
- package/lib/device/DescriptorStream.d.ts +28 -0
- package/lib/device/DescriptorStream.js +139 -0
- package/lib/device/Device.d.ts +105 -0
- package/lib/device/Device.js +527 -0
- package/lib/device/DeviceCommands.d.ts +63 -0
- package/lib/device/DeviceCommands.js +465 -0
- package/lib/device/DeviceList.d.ts +76 -0
- package/lib/device/DeviceList.js +411 -0
- package/lib/events/blockchain.d.ts +56 -0
- package/lib/events/blockchain.js +18 -0
- package/lib/events/call.d.ts +41 -0
- package/lib/events/call.js +14 -0
- package/lib/events/core.d.ts +20 -0
- package/lib/events/core.js +28 -0
- package/lib/events/device.d.ts +40 -0
- package/lib/events/device.js +28 -0
- package/lib/events/iframe.d.ts +39 -0
- package/lib/events/iframe.js +18 -0
- package/lib/events/index.d.ts +62 -0
- package/lib/events/index.js +21 -0
- package/lib/events/popup.d.ts +51 -0
- package/lib/events/popup.js +22 -0
- package/lib/events/transport.d.ts +62 -0
- package/lib/events/transport.js +21 -0
- package/lib/events/ui-promise.d.ts +12 -0
- package/lib/events/ui-promise.js +3 -0
- package/lib/events/ui-request.d.ts +180 -0
- package/lib/events/ui-request.js +50 -0
- package/lib/events/ui-response.d.ts +97 -0
- package/lib/events/ui-response.js +25 -0
- package/lib/exports.d.ts +5 -0
- package/lib/exports.js +10 -0
- package/lib/factory.d.ts +20 -0
- package/lib/factory.js +122 -0
- package/lib/index-browser.d.ts +4 -0
- package/lib/index-browser.js +29 -0
- package/lib/index.d.ts +11 -0
- package/lib/index.js +236 -0
- package/lib/types/account.d.ts +37 -0
- package/lib/types/account.js +3 -0
- package/lib/types/api/applyFlags.d.ts +4 -0
- package/lib/types/api/applyFlags.js +3 -0
- package/lib/types/api/applySettings.d.ts +4 -0
- package/lib/types/api/applySettings.js +3 -0
- package/lib/types/api/authorizeCoinJoin.d.ts +14 -0
- package/lib/types/api/authorizeCoinJoin.js +3 -0
- package/lib/types/api/backupDevice.d.ts +4 -0
- package/lib/types/api/backupDevice.js +3 -0
- package/lib/types/api/binanceGetAddress.d.ts +4 -0
- package/lib/types/api/binanceGetAddress.js +3 -0
- package/lib/types/api/binanceGetPublicKey.d.ts +4 -0
- package/lib/types/api/binanceGetPublicKey.js +3 -0
- package/lib/types/api/binanceSignTransaction.d.ts +31 -0
- package/lib/types/api/binanceSignTransaction.js +3 -0
- package/lib/types/api/blockchainDisconnect.d.ts +5 -0
- package/lib/types/api/blockchainDisconnect.js +3 -0
- package/lib/types/api/blockchainEstimateFee.d.ts +29 -0
- package/lib/types/api/blockchainEstimateFee.js +3 -0
- package/lib/types/api/blockchainGetAccountBalanceHistory.d.ts +4 -0
- package/lib/types/api/blockchainGetAccountBalanceHistory.js +3 -0
- package/lib/types/api/blockchainGetCurrentFiatRates.d.ts +4 -0
- package/lib/types/api/blockchainGetCurrentFiatRates.js +3 -0
- package/lib/types/api/blockchainGetFiatRatesForTimestamps.d.ts +4 -0
- package/lib/types/api/blockchainGetFiatRatesForTimestamps.js +3 -0
- package/lib/types/api/blockchainGetTransactions.d.ts +7 -0
- package/lib/types/api/blockchainGetTransactions.js +3 -0
- package/lib/types/api/blockchainSetCustomBackend.d.ts +7 -0
- package/lib/types/api/blockchainSetCustomBackend.js +3 -0
- package/lib/types/api/blockchainSubscribe.d.ts +7 -0
- package/lib/types/api/blockchainSubscribe.js +3 -0
- package/lib/types/api/blockchainSubscribeFiatRates.d.ts +7 -0
- package/lib/types/api/blockchainSubscribeFiatRates.js +3 -0
- package/lib/types/api/blockchainUnsubscribe.d.ts +5 -0
- package/lib/types/api/blockchainUnsubscribe.js +3 -0
- package/lib/types/api/blockchainUnsubscribeFiatRates.d.ts +5 -0
- package/lib/types/api/blockchainUnsubscribeFiatRates.js +3 -0
- package/lib/types/api/cancel.d.ts +2 -0
- package/lib/types/api/cancel.js +3 -0
- package/lib/types/api/cardanoGetAddress.d.ts +35 -0
- package/lib/types/api/cardanoGetAddress.js +3 -0
- package/lib/types/api/cardanoGetNativeScriptHash.d.ts +21 -0
- package/lib/types/api/cardanoGetNativeScriptHash.js +3 -0
- package/lib/types/api/cardanoGetPublicKey.d.ts +16 -0
- package/lib/types/api/cardanoGetPublicKey.js +3 -0
- package/lib/types/api/cardanoSignTransaction.d.ts +130 -0
- package/lib/types/api/cardanoSignTransaction.js +3 -0
- package/lib/types/api/changePin.d.ts +4 -0
- package/lib/types/api/changePin.js +3 -0
- package/lib/types/api/cipherKeyValue.d.ts +17 -0
- package/lib/types/api/cipherKeyValue.js +3 -0
- package/lib/types/api/composeTransaction.d.ts +92 -0
- package/lib/types/api/composeTransaction.js +3 -0
- package/lib/types/api/customMessage.d.ts +12 -0
- package/lib/types/api/customMessage.js +3 -0
- package/lib/types/api/disableWebUSB.d.ts +2 -0
- package/lib/types/api/disableWebUSB.js +3 -0
- package/lib/types/api/dispose.d.ts +2 -0
- package/lib/types/api/dispose.js +3 -0
- package/lib/types/api/eosGetPublicKey.d.ts +14 -0
- package/lib/types/api/eosGetPublicKey.js +3 -0
- package/lib/types/api/eosSignTransaction.d.ts +111 -0
- package/lib/types/api/eosSignTransaction.js +3 -0
- package/lib/types/api/ethereumGetAddress.d.ts +4 -0
- package/lib/types/api/ethereumGetAddress.js +3 -0
- package/lib/types/api/ethereumGetPublicKey.d.ts +5 -0
- package/lib/types/api/ethereumGetPublicKey.js +3 -0
- package/lib/types/api/ethereumSignMessage.d.ts +9 -0
- package/lib/types/api/ethereumSignMessage.js +3 -0
- package/lib/types/api/ethereumSignTransaction.d.ts +40 -0
- package/lib/types/api/ethereumSignTransaction.js +3 -0
- package/lib/types/api/ethereumSignTypedData.d.ts +42 -0
- package/lib/types/api/ethereumSignTypedData.js +3 -0
- package/lib/types/api/ethereumVerifyMessage.d.ts +10 -0
- package/lib/types/api/ethereumVerifyMessage.js +3 -0
- package/lib/types/api/firmwareUpdate.d.ts +14 -0
- package/lib/types/api/firmwareUpdate.js +3 -0
- package/lib/types/api/getAccountInfo.d.ts +14 -0
- package/lib/types/api/getAccountInfo.js +3 -0
- package/lib/types/api/getAddress.d.ts +13 -0
- package/lib/types/api/getAddress.js +3 -0
- package/lib/types/api/getCoinInfo.d.ts +4 -0
- package/lib/types/api/getCoinInfo.js +3 -0
- package/lib/types/api/getDeviceState.d.ts +6 -0
- package/lib/types/api/getDeviceState.js +3 -0
- package/lib/types/api/getFeatures.d.ts +4 -0
- package/lib/types/api/getFeatures.js +3 -0
- package/lib/types/api/getOwnershipId.d.ts +15 -0
- package/lib/types/api/getOwnershipId.js +3 -0
- package/lib/types/api/getOwnershipProof.d.ts +19 -0
- package/lib/types/api/getOwnershipProof.js +3 -0
- package/lib/types/api/getPublicKey.d.ts +19 -0
- package/lib/types/api/getPublicKey.js +3 -0
- package/lib/types/api/getSettings.d.ts +4 -0
- package/lib/types/api/getSettings.js +3 -0
- package/lib/types/api/index.d.ts +149 -0
- package/lib/types/api/index.js +3 -0
- package/lib/types/api/init.d.ts +5 -0
- package/lib/types/api/init.js +3 -0
- package/lib/types/api/manifest.d.ts +3 -0
- package/lib/types/api/manifest.js +3 -0
- package/lib/types/api/nemGetAddress.d.ts +7 -0
- package/lib/types/api/nemGetAddress.js +3 -0
- package/lib/types/api/nemSignTransaction.d.ts +92 -0
- package/lib/types/api/nemSignTransaction.js +3 -0
- package/lib/types/api/off.d.ts +11 -0
- package/lib/types/api/off.js +3 -0
- package/lib/types/api/on.d.ts +14 -0
- package/lib/types/api/on.js +3 -0
- package/lib/types/api/pushTransaction.d.ts +10 -0
- package/lib/types/api/pushTransaction.js +3 -0
- package/lib/types/api/rebootToBootloader.d.ts +4 -0
- package/lib/types/api/rebootToBootloader.js +3 -0
- package/lib/types/api/recoveryDevice.d.ts +7 -0
- package/lib/types/api/recoveryDevice.js +3 -0
- package/lib/types/api/removeAllListeners.d.ts +3 -0
- package/lib/types/api/removeAllListeners.js +3 -0
- package/lib/types/api/renderWebUSBButton.d.ts +2 -0
- package/lib/types/api/renderWebUSBButton.js +3 -0
- package/lib/types/api/requestLogin.d.ts +20 -0
- package/lib/types/api/requestLogin.js +3 -0
- package/lib/types/api/resetDevice.d.ts +16 -0
- package/lib/types/api/resetDevice.js +3 -0
- package/lib/types/api/rippleGetAddress.d.ts +4 -0
- package/lib/types/api/rippleGetAddress.js +3 -0
- package/lib/types/api/rippleSignTransaction.d.ts +23 -0
- package/lib/types/api/rippleSignTransaction.js +3 -0
- package/lib/types/api/setProxy.d.ts +9 -0
- package/lib/types/api/setProxy.js +3 -0
- package/lib/types/api/signMessage.d.ts +11 -0
- package/lib/types/api/signMessage.js +3 -0
- package/lib/types/api/signTransaction.d.ts +70 -0
- package/lib/types/api/signTransaction.js +3 -0
- package/lib/types/api/stellarGetAddress.d.ts +4 -0
- package/lib/types/api/stellarGetAddress.js +3 -0
- package/lib/types/api/stellarSignTransaction.d.ts +182 -0
- package/lib/types/api/stellarSignTransaction.js +3 -0
- package/lib/types/api/tezosGetAddress.d.ts +4 -0
- package/lib/types/api/tezosGetAddress.js +3 -0
- package/lib/types/api/tezosGetPublicKey.d.ts +4 -0
- package/lib/types/api/tezosGetPublicKey.js +3 -0
- package/lib/types/api/tezosSignTransaction.d.ts +61 -0
- package/lib/types/api/tezosSignTransaction.js +3 -0
- package/lib/types/api/uiResponse.d.ts +3 -0
- package/lib/types/api/uiResponse.js +3 -0
- package/lib/types/api/verifyMessage.d.ts +11 -0
- package/lib/types/api/verifyMessage.js +3 -0
- package/lib/types/api/wipeDevice.d.ts +4 -0
- package/lib/types/api/wipeDevice.js +3 -0
- package/lib/types/coinInfo.d.ts +79 -0
- package/lib/types/coinInfo.js +3 -0
- package/lib/types/device.d.ts +92 -0
- package/lib/types/device.js +3 -0
- package/lib/types/firmware.d.ts +36 -0
- package/lib/types/firmware.js +3 -0
- package/lib/types/index.d.ts +15 -0
- package/lib/types/index.js +11 -0
- package/lib/types/params.d.ts +56 -0
- package/lib/types/params.js +3 -0
- package/lib/types/settings.d.ts +34 -0
- package/lib/types/settings.js +3 -0
- package/lib/types/utils.d.ts +15 -0
- package/lib/types/utils.js +3 -0
- package/lib/utils/__fixtures__/accountUtils.d.ts +4 -0
- package/lib/utils/__fixtures__/accountUtils.js +32 -0
- package/lib/utils/__fixtures__/addressUtils.d.ts +10 -0
- package/lib/utils/__fixtures__/addressUtils.js +214 -0
- package/lib/utils/__fixtures__/ethereumUtils.d.ts +3 -0
- package/lib/utils/__fixtures__/ethereumUtils.js +20 -0
- package/lib/utils/__fixtures__/formatUtils.d.ts +3 -0
- package/lib/utils/__fixtures__/formatUtils.js +15 -0
- package/lib/utils/__fixtures__/hdnodeUtils.d.ts +186 -0
- package/lib/utils/__fixtures__/hdnodeUtils.js +206 -0
- package/lib/utils/accountUtils.d.ts +11 -0
- package/lib/utils/accountUtils.js +99 -0
- package/lib/utils/addressUtils.d.ts +3 -0
- package/lib/utils/addressUtils.js +32 -0
- package/lib/utils/assets-browser.d.ts +2 -0
- package/lib/utils/assets-browser.js +21 -0
- package/lib/utils/assets.d.ts +2 -0
- package/lib/utils/assets.js +28 -0
- package/lib/utils/bip39.d.ts +3 -0
- package/lib/utils/bip39.js +2053 -0
- package/lib/utils/browserUtils.d.ts +21 -0
- package/lib/utils/browserUtils.js +100 -0
- package/lib/utils/bufferUtils.d.ts +3 -0
- package/lib/utils/bufferUtils.js +11 -0
- package/lib/utils/debug.d.ts +24 -0
- package/lib/utils/debug.js +90 -0
- package/lib/utils/deferred.d.ts +18 -0
- package/lib/utils/deferred.js +66 -0
- package/lib/utils/deviceFeaturesUtils.d.ts +6 -0
- package/lib/utils/deviceFeaturesUtils.js +115 -0
- package/lib/utils/ethereumUtils.d.ts +3 -0
- package/lib/utils/ethereumUtils.js +12 -0
- package/lib/utils/firmwareUtils.d.ts +7 -0
- package/lib/utils/firmwareUtils.js +28 -0
- package/lib/utils/formatUtils.d.ts +8 -0
- package/lib/utils/formatUtils.js +57 -0
- package/lib/utils/hdnodeUtils.d.ts +8 -0
- package/lib/utils/hdnodeUtils.js +80 -0
- package/lib/utils/interactionTimeout.d.ts +10 -0
- package/lib/utils/interactionTimeout.js +34 -0
- package/lib/utils/objectUtils.d.ts +10 -0
- package/lib/utils/objectUtils.js +37 -0
- package/lib/utils/pathUtils.d.ts +20 -0
- package/lib/utils/pathUtils.js +159 -0
- package/lib/utils/promiseUtils.d.ts +2 -0
- package/lib/utils/promiseUtils.js +8 -0
- package/lib/utils/urlUtils.d.ts +5 -0
- package/lib/utils/urlUtils.js +27 -0
- package/lib/utils/versionUtils.d.ts +6 -0
- package/lib/utils/versionUtils.js +72 -0
- package/lib/utils/windowsUtils.d.ts +2 -0
- package/lib/utils/windowsUtils.js +6 -0
- package/lib/workers/RNUsbPlugin.d.ts +31 -0
- package/lib/workers/RNUsbPlugin.js +65 -0
- package/lib/workers/workers-browser.d.ts +8 -0
- package/lib/workers/workers-browser.js +19 -0
- package/lib/workers/workers-react-native.d.ts +8 -0
- package/lib/workers/workers-react-native.js +19 -0
- package/lib/workers/workers.d.ts +10 -0
- package/lib/workers/workers.js +17 -0
- package/package.json +62 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { UI_EVENT } from './ui-request';
|
|
2
|
+
import type { ConnectSettings } from '../types';
|
|
3
|
+
import type { MessageFactoryFn } from '../types/utils';
|
|
4
|
+
export declare const IFRAME: {
|
|
5
|
+
readonly BOOTSTRAP: "iframe-bootstrap";
|
|
6
|
+
readonly LOADED: "iframe-loaded";
|
|
7
|
+
readonly INIT: "iframe-init";
|
|
8
|
+
readonly ERROR: "iframe-error";
|
|
9
|
+
readonly CALL: "iframe-call";
|
|
10
|
+
};
|
|
11
|
+
export interface IFrameError {
|
|
12
|
+
type: typeof IFRAME.ERROR;
|
|
13
|
+
payload: {
|
|
14
|
+
error: string;
|
|
15
|
+
code?: string;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export interface IFrameLoaded {
|
|
19
|
+
type: typeof IFRAME.LOADED;
|
|
20
|
+
payload: {
|
|
21
|
+
useBroadcastChannel: boolean;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export interface IFrameInit {
|
|
25
|
+
type: typeof IFRAME.INIT;
|
|
26
|
+
payload: {
|
|
27
|
+
settings: ConnectSettings;
|
|
28
|
+
extension?: string;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export declare type IFrameEvent = {
|
|
32
|
+
type: typeof IFRAME.BOOTSTRAP;
|
|
33
|
+
payload?: typeof undefined;
|
|
34
|
+
} | IFrameLoaded | IFrameInit | IFrameError;
|
|
35
|
+
export declare type IFrameEventMessage = IFrameEvent & {
|
|
36
|
+
event: typeof UI_EVENT;
|
|
37
|
+
};
|
|
38
|
+
export declare const createIFrameMessage: MessageFactoryFn<typeof UI_EVENT, IFrameEvent>;
|
|
39
|
+
//# sourceMappingURL=iframe.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createIFrameMessage = exports.IFRAME = void 0;
|
|
4
|
+
const ui_request_1 = require("./ui-request");
|
|
5
|
+
exports.IFRAME = {
|
|
6
|
+
BOOTSTRAP: 'iframe-bootstrap',
|
|
7
|
+
LOADED: 'iframe-loaded',
|
|
8
|
+
INIT: 'iframe-init',
|
|
9
|
+
ERROR: 'iframe-error',
|
|
10
|
+
CALL: 'iframe-call',
|
|
11
|
+
};
|
|
12
|
+
const createIFrameMessage = (type, payload) => ({
|
|
13
|
+
event: ui_request_1.UI_EVENT,
|
|
14
|
+
type,
|
|
15
|
+
payload,
|
|
16
|
+
});
|
|
17
|
+
exports.createIFrameMessage = createIFrameMessage;
|
|
18
|
+
//# sourceMappingURL=iframe.js.map
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export * from './blockchain';
|
|
2
|
+
export * from './call';
|
|
3
|
+
export * from './core';
|
|
4
|
+
export * from './device';
|
|
5
|
+
export * from './iframe';
|
|
6
|
+
export * from './popup';
|
|
7
|
+
export * from './transport';
|
|
8
|
+
export * from './ui-promise';
|
|
9
|
+
export * from './ui-request';
|
|
10
|
+
export * from './ui-response';
|
|
11
|
+
export declare const UI: {
|
|
12
|
+
readonly RECEIVE_PERMISSION: "ui-receive_permission";
|
|
13
|
+
readonly RECEIVE_CONFIRMATION: "ui-receive_confirmation";
|
|
14
|
+
readonly RECEIVE_PIN: "ui-receive_pin";
|
|
15
|
+
readonly RECEIVE_PASSPHRASE: "ui-receive_passphrase";
|
|
16
|
+
readonly RECEIVE_DEVICE: "ui-receive_device";
|
|
17
|
+
readonly RECEIVE_ACCOUNT: "ui-receive_account";
|
|
18
|
+
readonly RECEIVE_FEE: "ui-receive_fee";
|
|
19
|
+
readonly RECEIVE_WORD: "ui-receive_word";
|
|
20
|
+
readonly INVALID_PASSPHRASE_ACTION: "ui-invalid_passphrase_action";
|
|
21
|
+
readonly CHANGE_SETTINGS: "ui-change_settings";
|
|
22
|
+
readonly CUSTOM_MESSAGE_RESPONSE: "ui-custom_response";
|
|
23
|
+
readonly LOGIN_CHALLENGE_RESPONSE: "ui-login_challenge_response";
|
|
24
|
+
readonly TRANSPORT: "ui-no_transport";
|
|
25
|
+
readonly BOOTLOADER: "ui-device_bootloader_mode";
|
|
26
|
+
readonly NOT_IN_BOOTLOADER: "ui-device_not_in_bootloader_mode";
|
|
27
|
+
readonly REQUIRE_MODE: "ui-device_require_mode";
|
|
28
|
+
readonly INITIALIZE: "ui-device_not_initialized";
|
|
29
|
+
readonly SEEDLESS: "ui-device_seedless";
|
|
30
|
+
readonly FIRMWARE_OLD: "ui-device_firmware_old";
|
|
31
|
+
readonly FIRMWARE_OUTDATED: "ui-device_firmware_outdated";
|
|
32
|
+
readonly FIRMWARE_NOT_SUPPORTED: "ui-device_firmware_unsupported";
|
|
33
|
+
readonly FIRMWARE_NOT_COMPATIBLE: "ui-device_firmware_not_compatible";
|
|
34
|
+
readonly FIRMWARE_NOT_INSTALLED: "ui-device_firmware_not_installed";
|
|
35
|
+
readonly FIRMWARE_PROGRESS: "ui-firmware-progress";
|
|
36
|
+
readonly DEVICE_NEEDS_BACKUP: "ui-device_needs_backup";
|
|
37
|
+
readonly REQUEST_UI_WINDOW: "ui-request_window";
|
|
38
|
+
readonly CLOSE_UI_WINDOW: "ui-close_window";
|
|
39
|
+
readonly REQUEST_PERMISSION: "ui-request_permission";
|
|
40
|
+
readonly REQUEST_CONFIRMATION: "ui-request_confirmation";
|
|
41
|
+
readonly REQUEST_PIN: "ui-request_pin";
|
|
42
|
+
readonly INVALID_PIN: "ui-invalid_pin";
|
|
43
|
+
readonly REQUEST_PASSPHRASE: "ui-request_passphrase";
|
|
44
|
+
readonly REQUEST_PASSPHRASE_ON_DEVICE: "ui-request_passphrase_on_device";
|
|
45
|
+
readonly INVALID_PASSPHRASE: "ui-invalid_passphrase";
|
|
46
|
+
readonly CONNECT: "ui-connect";
|
|
47
|
+
readonly LOADING: "ui-loading";
|
|
48
|
+
readonly SET_OPERATION: "ui-set_operation";
|
|
49
|
+
readonly SELECT_DEVICE: "ui-select_device";
|
|
50
|
+
readonly SELECT_ACCOUNT: "ui-select_account";
|
|
51
|
+
readonly SELECT_FEE: "ui-select_fee";
|
|
52
|
+
readonly UPDATE_CUSTOM_FEE: "ui-update_custom_fee";
|
|
53
|
+
readonly INSUFFICIENT_FUNDS: "ui-insufficient_funds";
|
|
54
|
+
readonly REQUEST_BUTTON: "ui-button";
|
|
55
|
+
readonly REQUEST_WORD: "ui-request_word";
|
|
56
|
+
readonly LOGIN_CHALLENGE_REQUEST: "ui-login_challenge_request";
|
|
57
|
+
readonly CUSTOM_MESSAGE_REQUEST: "ui-custom_request";
|
|
58
|
+
readonly BUNDLE_PROGRESS: "ui-bundle_progress";
|
|
59
|
+
readonly ADDRESS_VALIDATION: "ui-address_validation";
|
|
60
|
+
readonly IFRAME_FAILURE: "ui-iframe_failure";
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UI = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const ui_request_1 = require("./ui-request");
|
|
6
|
+
const ui_response_1 = require("./ui-response");
|
|
7
|
+
(0, tslib_1.__exportStar)(require("./blockchain"), exports);
|
|
8
|
+
(0, tslib_1.__exportStar)(require("./call"), exports);
|
|
9
|
+
(0, tslib_1.__exportStar)(require("./core"), exports);
|
|
10
|
+
(0, tslib_1.__exportStar)(require("./device"), exports);
|
|
11
|
+
(0, tslib_1.__exportStar)(require("./iframe"), exports);
|
|
12
|
+
(0, tslib_1.__exportStar)(require("./popup"), exports);
|
|
13
|
+
(0, tslib_1.__exportStar)(require("./transport"), exports);
|
|
14
|
+
(0, tslib_1.__exportStar)(require("./ui-promise"), exports);
|
|
15
|
+
(0, tslib_1.__exportStar)(require("./ui-request"), exports);
|
|
16
|
+
(0, tslib_1.__exportStar)(require("./ui-response"), exports);
|
|
17
|
+
exports.UI = {
|
|
18
|
+
...ui_request_1.UI_REQUEST,
|
|
19
|
+
...ui_response_1.UI_RESPONSE,
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { UI_EVENT } from './ui-request';
|
|
2
|
+
import type { TransportInfo } from './transport';
|
|
3
|
+
import type { ConnectSettings } from '../types';
|
|
4
|
+
import type { MessageFactoryFn } from '../types/utils';
|
|
5
|
+
export declare const POPUP: {
|
|
6
|
+
readonly BOOTSTRAP: "popup-bootstrap";
|
|
7
|
+
readonly LOADED: "popup-loaded";
|
|
8
|
+
readonly INIT: "popup-init";
|
|
9
|
+
readonly ERROR: "popup-error";
|
|
10
|
+
readonly EXTENSION_USB_PERMISSIONS: "open-usb-permissions";
|
|
11
|
+
readonly HANDSHAKE: "popup-handshake";
|
|
12
|
+
readonly CLOSED: "popup-closed";
|
|
13
|
+
readonly CANCEL_POPUP_REQUEST: "ui-cancel-popup-request";
|
|
14
|
+
readonly CLOSE_WINDOW: "window.close";
|
|
15
|
+
};
|
|
16
|
+
export interface PopupInit {
|
|
17
|
+
type: typeof POPUP.INIT;
|
|
18
|
+
payload: {
|
|
19
|
+
settings: ConnectSettings;
|
|
20
|
+
useBroadcastChannel: boolean;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export interface PopupHandshake {
|
|
24
|
+
type: typeof POPUP.HANDSHAKE;
|
|
25
|
+
payload: {
|
|
26
|
+
settings: ConnectSettings;
|
|
27
|
+
method?: string;
|
|
28
|
+
transport?: TransportInfo;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export interface PopupError {
|
|
32
|
+
type: typeof POPUP.ERROR;
|
|
33
|
+
payload: {
|
|
34
|
+
error: string;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export interface PopupClosedMessage {
|
|
38
|
+
type: typeof POPUP.CLOSED;
|
|
39
|
+
payload: {
|
|
40
|
+
error: any;
|
|
41
|
+
} | null;
|
|
42
|
+
}
|
|
43
|
+
export declare type PopupEvent = {
|
|
44
|
+
type: typeof POPUP.LOADED | typeof POPUP.CANCEL_POPUP_REQUEST;
|
|
45
|
+
payload?: typeof undefined;
|
|
46
|
+
} | PopupInit | PopupHandshake | PopupError | PopupClosedMessage;
|
|
47
|
+
export declare type PopupEventMessage = PopupEvent & {
|
|
48
|
+
event: typeof UI_EVENT;
|
|
49
|
+
};
|
|
50
|
+
export declare const createPopupMessage: MessageFactoryFn<typeof UI_EVENT, PopupEvent>;
|
|
51
|
+
//# sourceMappingURL=popup.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createPopupMessage = exports.POPUP = void 0;
|
|
4
|
+
const ui_request_1 = require("./ui-request");
|
|
5
|
+
exports.POPUP = {
|
|
6
|
+
BOOTSTRAP: 'popup-bootstrap',
|
|
7
|
+
LOADED: 'popup-loaded',
|
|
8
|
+
INIT: 'popup-init',
|
|
9
|
+
ERROR: 'popup-error',
|
|
10
|
+
EXTENSION_USB_PERMISSIONS: 'open-usb-permissions',
|
|
11
|
+
HANDSHAKE: 'popup-handshake',
|
|
12
|
+
CLOSED: 'popup-closed',
|
|
13
|
+
CANCEL_POPUP_REQUEST: 'ui-cancel-popup-request',
|
|
14
|
+
CLOSE_WINDOW: 'window.close',
|
|
15
|
+
};
|
|
16
|
+
const createPopupMessage = (type, payload) => ({
|
|
17
|
+
event: ui_request_1.UI_EVENT,
|
|
18
|
+
type,
|
|
19
|
+
payload,
|
|
20
|
+
});
|
|
21
|
+
exports.createPopupMessage = createPopupMessage;
|
|
22
|
+
//# sourceMappingURL=popup.js.map
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { MessageFactoryFn } from '../types/utils';
|
|
2
|
+
export declare const TRANSPORT_EVENT = "TRANSPORT_EVENT";
|
|
3
|
+
export declare const TRANSPORT: {
|
|
4
|
+
readonly START: "transport-start";
|
|
5
|
+
readonly ERROR: "transport-error";
|
|
6
|
+
readonly UPDATE: "transport-update";
|
|
7
|
+
readonly STREAM: "transport-stream";
|
|
8
|
+
readonly REQUEST: "transport-request_device";
|
|
9
|
+
readonly DISABLE_WEBUSB: "transport-disable_webusb";
|
|
10
|
+
readonly START_PENDING: "transport-start_pending";
|
|
11
|
+
};
|
|
12
|
+
export interface BridgeInfo {
|
|
13
|
+
version: number[];
|
|
14
|
+
directory: string;
|
|
15
|
+
packages: {
|
|
16
|
+
name: string;
|
|
17
|
+
platform: string[];
|
|
18
|
+
url: string;
|
|
19
|
+
signature?: string;
|
|
20
|
+
preferred?: boolean;
|
|
21
|
+
}[];
|
|
22
|
+
changelog: string;
|
|
23
|
+
}
|
|
24
|
+
export interface UdevInfo {
|
|
25
|
+
directory: string;
|
|
26
|
+
packages: {
|
|
27
|
+
name: string;
|
|
28
|
+
platform: string[];
|
|
29
|
+
url: string;
|
|
30
|
+
signature?: string;
|
|
31
|
+
preferred?: boolean;
|
|
32
|
+
}[];
|
|
33
|
+
}
|
|
34
|
+
export interface TransportInfo {
|
|
35
|
+
type: string;
|
|
36
|
+
version: string;
|
|
37
|
+
outdated: boolean;
|
|
38
|
+
bridge?: BridgeInfo;
|
|
39
|
+
udev?: UdevInfo;
|
|
40
|
+
}
|
|
41
|
+
export declare type TransportEvent = {
|
|
42
|
+
type: typeof TRANSPORT.START;
|
|
43
|
+
payload: TransportInfo;
|
|
44
|
+
} | {
|
|
45
|
+
type: typeof TRANSPORT.ERROR;
|
|
46
|
+
payload: {
|
|
47
|
+
error: string;
|
|
48
|
+
code?: string;
|
|
49
|
+
bridge?: BridgeInfo;
|
|
50
|
+
udev?: UdevInfo;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
export interface TransportDisableWebUSB {
|
|
54
|
+
type: typeof TRANSPORT.DISABLE_WEBUSB;
|
|
55
|
+
payload?: undefined;
|
|
56
|
+
}
|
|
57
|
+
export declare type TransportEventMessage = TransportEvent & {
|
|
58
|
+
event: typeof TRANSPORT_EVENT;
|
|
59
|
+
};
|
|
60
|
+
export declare type TransportEventListenerFn = (type: typeof TRANSPORT_EVENT, cb: (event: TransportEventMessage) => void) => void;
|
|
61
|
+
export declare const createTransportMessage: MessageFactoryFn<typeof TRANSPORT_EVENT, TransportEvent>;
|
|
62
|
+
//# sourceMappingURL=transport.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createTransportMessage = exports.TRANSPORT = exports.TRANSPORT_EVENT = void 0;
|
|
4
|
+
const errors_1 = require("../constants/errors");
|
|
5
|
+
exports.TRANSPORT_EVENT = 'TRANSPORT_EVENT';
|
|
6
|
+
exports.TRANSPORT = {
|
|
7
|
+
START: 'transport-start',
|
|
8
|
+
ERROR: 'transport-error',
|
|
9
|
+
UPDATE: 'transport-update',
|
|
10
|
+
STREAM: 'transport-stream',
|
|
11
|
+
REQUEST: 'transport-request_device',
|
|
12
|
+
DISABLE_WEBUSB: 'transport-disable_webusb',
|
|
13
|
+
START_PENDING: 'transport-start_pending',
|
|
14
|
+
};
|
|
15
|
+
const createTransportMessage = (type, payload) => ({
|
|
16
|
+
event: exports.TRANSPORT_EVENT,
|
|
17
|
+
type,
|
|
18
|
+
payload: 'error' in payload ? (0, errors_1.serializeError)(payload) : payload,
|
|
19
|
+
});
|
|
20
|
+
exports.createTransportMessage = createTransportMessage;
|
|
21
|
+
//# sourceMappingURL=transport.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { DEVICE } from './device';
|
|
2
|
+
import type { Device } from '../device/Device';
|
|
3
|
+
import type { UiResponseEvent } from './ui-response';
|
|
4
|
+
import type { Deferred } from '../utils/deferred';
|
|
5
|
+
export declare type UiPromiseResponse = UiResponseEvent | {
|
|
6
|
+
type: typeof DEVICE.DISCONNECT;
|
|
7
|
+
payload?: undefined;
|
|
8
|
+
};
|
|
9
|
+
export declare type UiPromise<T extends UiPromiseResponse['type']> = Deferred<Extract<UiPromiseResponse, {
|
|
10
|
+
type: T;
|
|
11
|
+
}>, T, Device>;
|
|
12
|
+
//# sourceMappingURL=ui-promise.d.ts.map
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import type { PROTO } from '../constants';
|
|
2
|
+
import type { TransportDisableWebUSB } from './transport';
|
|
3
|
+
import type { Device, CoinInfo, BitcoinNetworkInfo } from '../types';
|
|
4
|
+
import type { DiscoveryAccountType, DiscoveryAccount, SelectFeeLevel } from '../types/account';
|
|
5
|
+
import type { MessageFactoryFn } from '../types/utils';
|
|
6
|
+
import type { DeviceButtonRequest } from './device';
|
|
7
|
+
export declare const UI_EVENT = "UI_EVENT";
|
|
8
|
+
export declare const UI_REQUEST: {
|
|
9
|
+
readonly TRANSPORT: "ui-no_transport";
|
|
10
|
+
readonly BOOTLOADER: "ui-device_bootloader_mode";
|
|
11
|
+
readonly NOT_IN_BOOTLOADER: "ui-device_not_in_bootloader_mode";
|
|
12
|
+
readonly REQUIRE_MODE: "ui-device_require_mode";
|
|
13
|
+
readonly INITIALIZE: "ui-device_not_initialized";
|
|
14
|
+
readonly SEEDLESS: "ui-device_seedless";
|
|
15
|
+
readonly FIRMWARE_OLD: "ui-device_firmware_old";
|
|
16
|
+
readonly FIRMWARE_OUTDATED: "ui-device_firmware_outdated";
|
|
17
|
+
readonly FIRMWARE_NOT_SUPPORTED: "ui-device_firmware_unsupported";
|
|
18
|
+
readonly FIRMWARE_NOT_COMPATIBLE: "ui-device_firmware_not_compatible";
|
|
19
|
+
readonly FIRMWARE_NOT_INSTALLED: "ui-device_firmware_not_installed";
|
|
20
|
+
readonly FIRMWARE_PROGRESS: "ui-firmware-progress";
|
|
21
|
+
readonly DEVICE_NEEDS_BACKUP: "ui-device_needs_backup";
|
|
22
|
+
readonly REQUEST_UI_WINDOW: "ui-request_window";
|
|
23
|
+
readonly CLOSE_UI_WINDOW: "ui-close_window";
|
|
24
|
+
readonly REQUEST_PERMISSION: "ui-request_permission";
|
|
25
|
+
readonly REQUEST_CONFIRMATION: "ui-request_confirmation";
|
|
26
|
+
readonly REQUEST_PIN: "ui-request_pin";
|
|
27
|
+
readonly INVALID_PIN: "ui-invalid_pin";
|
|
28
|
+
readonly REQUEST_PASSPHRASE: "ui-request_passphrase";
|
|
29
|
+
readonly REQUEST_PASSPHRASE_ON_DEVICE: "ui-request_passphrase_on_device";
|
|
30
|
+
readonly INVALID_PASSPHRASE: "ui-invalid_passphrase";
|
|
31
|
+
readonly CONNECT: "ui-connect";
|
|
32
|
+
readonly LOADING: "ui-loading";
|
|
33
|
+
readonly SET_OPERATION: "ui-set_operation";
|
|
34
|
+
readonly SELECT_DEVICE: "ui-select_device";
|
|
35
|
+
readonly SELECT_ACCOUNT: "ui-select_account";
|
|
36
|
+
readonly SELECT_FEE: "ui-select_fee";
|
|
37
|
+
readonly UPDATE_CUSTOM_FEE: "ui-update_custom_fee";
|
|
38
|
+
readonly INSUFFICIENT_FUNDS: "ui-insufficient_funds";
|
|
39
|
+
readonly REQUEST_BUTTON: "ui-button";
|
|
40
|
+
readonly REQUEST_WORD: "ui-request_word";
|
|
41
|
+
readonly LOGIN_CHALLENGE_REQUEST: "ui-login_challenge_request";
|
|
42
|
+
readonly CUSTOM_MESSAGE_REQUEST: "ui-custom_request";
|
|
43
|
+
readonly BUNDLE_PROGRESS: "ui-bundle_progress";
|
|
44
|
+
readonly ADDRESS_VALIDATION: "ui-address_validation";
|
|
45
|
+
readonly IFRAME_FAILURE: "ui-iframe_failure";
|
|
46
|
+
};
|
|
47
|
+
export interface UiRequestWithoutPayload {
|
|
48
|
+
type: typeof UI_REQUEST.LOADING | typeof UI_REQUEST.REQUEST_UI_WINDOW | typeof UI_REQUEST.IFRAME_FAILURE | typeof UI_REQUEST.TRANSPORT | typeof UI_REQUEST.INSUFFICIENT_FUNDS | typeof UI_REQUEST.CLOSE_UI_WINDOW | typeof UI_REQUEST.LOGIN_CHALLENGE_REQUEST;
|
|
49
|
+
payload?: typeof undefined;
|
|
50
|
+
}
|
|
51
|
+
export declare type UiRequestDeviceAction = {
|
|
52
|
+
type: typeof UI_REQUEST.REQUEST_PIN;
|
|
53
|
+
payload: {
|
|
54
|
+
device: Device;
|
|
55
|
+
type?: PROTO.PinMatrixRequestType;
|
|
56
|
+
};
|
|
57
|
+
} | {
|
|
58
|
+
type: typeof UI_REQUEST.REQUEST_WORD;
|
|
59
|
+
payload: {
|
|
60
|
+
device: Device;
|
|
61
|
+
type: PROTO.WordRequestType;
|
|
62
|
+
};
|
|
63
|
+
} | {
|
|
64
|
+
type: typeof UI_REQUEST.INVALID_PIN | typeof UI_REQUEST.REQUEST_PASSPHRASE_ON_DEVICE | typeof UI_REQUEST.REQUEST_PASSPHRASE | typeof UI_REQUEST.INVALID_PASSPHRASE;
|
|
65
|
+
payload: {
|
|
66
|
+
device: Device;
|
|
67
|
+
type?: typeof undefined;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
export interface UiRequestButtonData {
|
|
71
|
+
type: 'address';
|
|
72
|
+
serializedPath: string;
|
|
73
|
+
address: string;
|
|
74
|
+
}
|
|
75
|
+
export interface UiRequestButton {
|
|
76
|
+
type: typeof UI_REQUEST.REQUEST_BUTTON;
|
|
77
|
+
payload: DeviceButtonRequest['payload'] & {
|
|
78
|
+
data?: UiRequestButtonData;
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
export interface UiRequestAddressValidation {
|
|
82
|
+
type: typeof UI_REQUEST.ADDRESS_VALIDATION;
|
|
83
|
+
payload: UiRequestButtonData | undefined;
|
|
84
|
+
}
|
|
85
|
+
export interface UiRequestSetOperation {
|
|
86
|
+
type: typeof UI_REQUEST.SET_OPERATION;
|
|
87
|
+
payload: string;
|
|
88
|
+
}
|
|
89
|
+
export interface UiRequestPermission {
|
|
90
|
+
type: typeof UI_REQUEST.REQUEST_PERMISSION;
|
|
91
|
+
payload: {
|
|
92
|
+
permissions: string[];
|
|
93
|
+
device: Device;
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
export interface UiRequestConfirmation {
|
|
97
|
+
type: typeof UI_REQUEST.REQUEST_CONFIRMATION;
|
|
98
|
+
payload: {
|
|
99
|
+
view: string;
|
|
100
|
+
label?: string;
|
|
101
|
+
customConfirmButton?: {
|
|
102
|
+
className: string;
|
|
103
|
+
label: string;
|
|
104
|
+
};
|
|
105
|
+
customCancelButton?: {
|
|
106
|
+
className: string;
|
|
107
|
+
label: string;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
export interface UiRequestSelectDevice {
|
|
112
|
+
type: typeof UI_REQUEST.SELECT_DEVICE;
|
|
113
|
+
payload: {
|
|
114
|
+
devices: Device[];
|
|
115
|
+
webusb: boolean;
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
export interface UiRequestUnexpectedDeviceMode {
|
|
119
|
+
type: typeof UI_REQUEST.BOOTLOADER | typeof UI_REQUEST.NOT_IN_BOOTLOADER | typeof UI_REQUEST.INITIALIZE | typeof UI_REQUEST.SEEDLESS | typeof UI_REQUEST.DEVICE_NEEDS_BACKUP;
|
|
120
|
+
payload: Device;
|
|
121
|
+
}
|
|
122
|
+
export interface FirmwareException {
|
|
123
|
+
type: typeof UI_REQUEST.FIRMWARE_OLD | typeof UI_REQUEST.FIRMWARE_OUTDATED | typeof UI_REQUEST.FIRMWARE_NOT_SUPPORTED | typeof UI_REQUEST.FIRMWARE_NOT_COMPATIBLE | typeof UI_REQUEST.FIRMWARE_NOT_INSTALLED;
|
|
124
|
+
payload: Device;
|
|
125
|
+
}
|
|
126
|
+
export interface UiRequestSelectAccount {
|
|
127
|
+
type: typeof UI_REQUEST.SELECT_ACCOUNT;
|
|
128
|
+
payload: {
|
|
129
|
+
type: 'start' | 'progress' | 'end';
|
|
130
|
+
coinInfo: CoinInfo;
|
|
131
|
+
accountTypes?: DiscoveryAccountType[];
|
|
132
|
+
defaultAccountType?: DiscoveryAccountType;
|
|
133
|
+
accounts?: DiscoveryAccount[];
|
|
134
|
+
preventEmpty?: boolean;
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
export interface UiRequestSelectFee {
|
|
138
|
+
type: typeof UI_REQUEST.SELECT_FEE;
|
|
139
|
+
payload: {
|
|
140
|
+
coinInfo: BitcoinNetworkInfo;
|
|
141
|
+
feeLevels: SelectFeeLevel[];
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
export interface UpdateCustomFee {
|
|
145
|
+
type: typeof UI_REQUEST.UPDATE_CUSTOM_FEE;
|
|
146
|
+
payload: {
|
|
147
|
+
coinInfo: BitcoinNetworkInfo;
|
|
148
|
+
feeLevels: SelectFeeLevel[];
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
export interface BundleProgress<R> {
|
|
152
|
+
type: typeof UI_REQUEST.BUNDLE_PROGRESS;
|
|
153
|
+
payload: {
|
|
154
|
+
progress: number;
|
|
155
|
+
response: R;
|
|
156
|
+
error?: string;
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
export interface FirmwareProgress {
|
|
160
|
+
type: typeof UI_REQUEST.FIRMWARE_PROGRESS;
|
|
161
|
+
payload: {
|
|
162
|
+
device: Device;
|
|
163
|
+
progress: number;
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
export interface UiRequestCustomMessage {
|
|
167
|
+
type: typeof UI_REQUEST.CUSTOM_MESSAGE_REQUEST;
|
|
168
|
+
payload: {
|
|
169
|
+
type: string;
|
|
170
|
+
message: object;
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
export declare type UiEvent = UiRequestWithoutPayload | UiRequestDeviceAction | UiRequestButton | UiRequestPermission | UiRequestConfirmation | UiRequestSelectDevice | UiRequestUnexpectedDeviceMode | UiRequestSelectAccount | UiRequestSelectFee | UpdateCustomFee | BundleProgress<any> | FirmwareProgress | FirmwareException | UiRequestAddressValidation | UiRequestCustomMessage | UiRequestSetOperation | TransportDisableWebUSB;
|
|
174
|
+
export declare type UiEventMessage = UiEvent & {
|
|
175
|
+
event: typeof UI_EVENT;
|
|
176
|
+
};
|
|
177
|
+
export declare type ProgressEventListenerFn = <R>(type: typeof UI_REQUEST.BUNDLE_PROGRESS, cb: (event: BundleProgress<R>['payload']) => void) => void;
|
|
178
|
+
export declare type UiEventListenerFn = (type: typeof UI_EVENT, cb: (event: UiEventMessage) => void) => void;
|
|
179
|
+
export declare const createUiMessage: MessageFactoryFn<typeof UI_EVENT, UiEvent>;
|
|
180
|
+
//# sourceMappingURL=ui-request.d.ts.map
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createUiMessage = exports.UI_REQUEST = exports.UI_EVENT = void 0;
|
|
4
|
+
exports.UI_EVENT = 'UI_EVENT';
|
|
5
|
+
exports.UI_REQUEST = {
|
|
6
|
+
TRANSPORT: 'ui-no_transport',
|
|
7
|
+
BOOTLOADER: 'ui-device_bootloader_mode',
|
|
8
|
+
NOT_IN_BOOTLOADER: 'ui-device_not_in_bootloader_mode',
|
|
9
|
+
REQUIRE_MODE: 'ui-device_require_mode',
|
|
10
|
+
INITIALIZE: 'ui-device_not_initialized',
|
|
11
|
+
SEEDLESS: 'ui-device_seedless',
|
|
12
|
+
FIRMWARE_OLD: 'ui-device_firmware_old',
|
|
13
|
+
FIRMWARE_OUTDATED: 'ui-device_firmware_outdated',
|
|
14
|
+
FIRMWARE_NOT_SUPPORTED: 'ui-device_firmware_unsupported',
|
|
15
|
+
FIRMWARE_NOT_COMPATIBLE: 'ui-device_firmware_not_compatible',
|
|
16
|
+
FIRMWARE_NOT_INSTALLED: 'ui-device_firmware_not_installed',
|
|
17
|
+
FIRMWARE_PROGRESS: 'ui-firmware-progress',
|
|
18
|
+
DEVICE_NEEDS_BACKUP: 'ui-device_needs_backup',
|
|
19
|
+
REQUEST_UI_WINDOW: 'ui-request_window',
|
|
20
|
+
CLOSE_UI_WINDOW: 'ui-close_window',
|
|
21
|
+
REQUEST_PERMISSION: 'ui-request_permission',
|
|
22
|
+
REQUEST_CONFIRMATION: 'ui-request_confirmation',
|
|
23
|
+
REQUEST_PIN: 'ui-request_pin',
|
|
24
|
+
INVALID_PIN: 'ui-invalid_pin',
|
|
25
|
+
REQUEST_PASSPHRASE: 'ui-request_passphrase',
|
|
26
|
+
REQUEST_PASSPHRASE_ON_DEVICE: 'ui-request_passphrase_on_device',
|
|
27
|
+
INVALID_PASSPHRASE: 'ui-invalid_passphrase',
|
|
28
|
+
CONNECT: 'ui-connect',
|
|
29
|
+
LOADING: 'ui-loading',
|
|
30
|
+
SET_OPERATION: 'ui-set_operation',
|
|
31
|
+
SELECT_DEVICE: 'ui-select_device',
|
|
32
|
+
SELECT_ACCOUNT: 'ui-select_account',
|
|
33
|
+
SELECT_FEE: 'ui-select_fee',
|
|
34
|
+
UPDATE_CUSTOM_FEE: 'ui-update_custom_fee',
|
|
35
|
+
INSUFFICIENT_FUNDS: 'ui-insufficient_funds',
|
|
36
|
+
REQUEST_BUTTON: 'ui-button',
|
|
37
|
+
REQUEST_WORD: 'ui-request_word',
|
|
38
|
+
LOGIN_CHALLENGE_REQUEST: 'ui-login_challenge_request',
|
|
39
|
+
CUSTOM_MESSAGE_REQUEST: 'ui-custom_request',
|
|
40
|
+
BUNDLE_PROGRESS: 'ui-bundle_progress',
|
|
41
|
+
ADDRESS_VALIDATION: 'ui-address_validation',
|
|
42
|
+
IFRAME_FAILURE: 'ui-iframe_failure',
|
|
43
|
+
};
|
|
44
|
+
const createUiMessage = (type, payload) => ({
|
|
45
|
+
event: exports.UI_EVENT,
|
|
46
|
+
type,
|
|
47
|
+
payload,
|
|
48
|
+
});
|
|
49
|
+
exports.createUiMessage = createUiMessage;
|
|
50
|
+
//# sourceMappingURL=ui-request.js.map
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { POPUP } from './popup';
|
|
2
|
+
import { UI_EVENT } from './ui-request';
|
|
3
|
+
import type { Device } from '../types/device';
|
|
4
|
+
import type { MessageFactoryFn } from '../types/utils';
|
|
5
|
+
export declare const UI_RESPONSE: {
|
|
6
|
+
readonly RECEIVE_PERMISSION: "ui-receive_permission";
|
|
7
|
+
readonly RECEIVE_CONFIRMATION: "ui-receive_confirmation";
|
|
8
|
+
readonly RECEIVE_PIN: "ui-receive_pin";
|
|
9
|
+
readonly RECEIVE_PASSPHRASE: "ui-receive_passphrase";
|
|
10
|
+
readonly RECEIVE_DEVICE: "ui-receive_device";
|
|
11
|
+
readonly RECEIVE_ACCOUNT: "ui-receive_account";
|
|
12
|
+
readonly RECEIVE_FEE: "ui-receive_fee";
|
|
13
|
+
readonly RECEIVE_WORD: "ui-receive_word";
|
|
14
|
+
readonly INVALID_PASSPHRASE_ACTION: "ui-invalid_passphrase_action";
|
|
15
|
+
readonly CHANGE_SETTINGS: "ui-change_settings";
|
|
16
|
+
readonly CUSTOM_MESSAGE_RESPONSE: "ui-custom_response";
|
|
17
|
+
readonly LOGIN_CHALLENGE_RESPONSE: "ui-login_challenge_response";
|
|
18
|
+
};
|
|
19
|
+
export interface UiResponsePopupHandshake {
|
|
20
|
+
type: typeof POPUP.HANDSHAKE;
|
|
21
|
+
payload?: typeof undefined;
|
|
22
|
+
}
|
|
23
|
+
export interface UiResponsePermission {
|
|
24
|
+
type: typeof UI_RESPONSE.RECEIVE_PERMISSION;
|
|
25
|
+
payload: {
|
|
26
|
+
granted: boolean;
|
|
27
|
+
remember: boolean;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export interface UiResponseConfirmation {
|
|
31
|
+
type: typeof UI_RESPONSE.RECEIVE_CONFIRMATION;
|
|
32
|
+
payload: boolean;
|
|
33
|
+
}
|
|
34
|
+
export interface UiResponseDevice {
|
|
35
|
+
type: typeof UI_RESPONSE.RECEIVE_DEVICE;
|
|
36
|
+
payload: {
|
|
37
|
+
device: Device;
|
|
38
|
+
remember?: boolean;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export interface UiResponsePin {
|
|
42
|
+
type: typeof UI_RESPONSE.RECEIVE_PIN;
|
|
43
|
+
payload: string;
|
|
44
|
+
}
|
|
45
|
+
export interface UiResponseWord {
|
|
46
|
+
type: typeof UI_RESPONSE.RECEIVE_WORD;
|
|
47
|
+
payload: string;
|
|
48
|
+
}
|
|
49
|
+
export interface UiResponsePassphrase {
|
|
50
|
+
type: typeof UI_RESPONSE.RECEIVE_PASSPHRASE;
|
|
51
|
+
payload: {
|
|
52
|
+
save: boolean;
|
|
53
|
+
value: string;
|
|
54
|
+
passphraseOnDevice?: boolean;
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
export interface UiResponsePassphraseAction {
|
|
58
|
+
type: typeof UI_RESPONSE.INVALID_PASSPHRASE_ACTION;
|
|
59
|
+
payload: boolean;
|
|
60
|
+
}
|
|
61
|
+
export interface UiResponseAccount {
|
|
62
|
+
type: typeof UI_RESPONSE.RECEIVE_ACCOUNT;
|
|
63
|
+
payload: number;
|
|
64
|
+
}
|
|
65
|
+
export interface UiResponseFee {
|
|
66
|
+
type: typeof UI_RESPONSE.RECEIVE_FEE;
|
|
67
|
+
payload: {
|
|
68
|
+
type: 'compose-custom';
|
|
69
|
+
value: string;
|
|
70
|
+
} | {
|
|
71
|
+
type: 'change-account';
|
|
72
|
+
} | {
|
|
73
|
+
type: 'send';
|
|
74
|
+
value: string;
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
export interface UiResponseCustomMessage {
|
|
78
|
+
type: typeof UI_RESPONSE.CUSTOM_MESSAGE_RESPONSE;
|
|
79
|
+
payload: {
|
|
80
|
+
type: string;
|
|
81
|
+
message: any;
|
|
82
|
+
params?: any;
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
export interface UiResponseLoginChallenge {
|
|
86
|
+
type: typeof UI_RESPONSE.LOGIN_CHALLENGE_RESPONSE;
|
|
87
|
+
payload: {
|
|
88
|
+
challengeHidden: string;
|
|
89
|
+
challengeVisual: string;
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
export declare type UiResponseEvent = UiResponsePopupHandshake | UiResponsePermission | UiResponseConfirmation | UiResponseDevice | UiResponsePin | UiResponseWord | UiResponsePassphrase | UiResponsePassphraseAction | UiResponseAccount | UiResponseFee | UiResponseLoginChallenge | UiResponseCustomMessage;
|
|
93
|
+
export declare type UiResponseMessage = UiResponseEvent & {
|
|
94
|
+
event: typeof UI_EVENT;
|
|
95
|
+
};
|
|
96
|
+
export declare const createUiResponse: MessageFactoryFn<typeof UI_EVENT, UiResponseEvent>;
|
|
97
|
+
//# sourceMappingURL=ui-response.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createUiResponse = exports.UI_RESPONSE = void 0;
|
|
4
|
+
const ui_request_1 = require("./ui-request");
|
|
5
|
+
exports.UI_RESPONSE = {
|
|
6
|
+
RECEIVE_PERMISSION: 'ui-receive_permission',
|
|
7
|
+
RECEIVE_CONFIRMATION: 'ui-receive_confirmation',
|
|
8
|
+
RECEIVE_PIN: 'ui-receive_pin',
|
|
9
|
+
RECEIVE_PASSPHRASE: 'ui-receive_passphrase',
|
|
10
|
+
RECEIVE_DEVICE: 'ui-receive_device',
|
|
11
|
+
RECEIVE_ACCOUNT: 'ui-receive_account',
|
|
12
|
+
RECEIVE_FEE: 'ui-receive_fee',
|
|
13
|
+
RECEIVE_WORD: 'ui-receive_word',
|
|
14
|
+
INVALID_PASSPHRASE_ACTION: 'ui-invalid_passphrase_action',
|
|
15
|
+
CHANGE_SETTINGS: 'ui-change_settings',
|
|
16
|
+
CUSTOM_MESSAGE_RESPONSE: 'ui-custom_response',
|
|
17
|
+
LOGIN_CHALLENGE_RESPONSE: 'ui-login_challenge_response',
|
|
18
|
+
};
|
|
19
|
+
const createUiResponse = (type, payload) => ({
|
|
20
|
+
event: ui_request_1.UI_EVENT,
|
|
21
|
+
type,
|
|
22
|
+
payload,
|
|
23
|
+
});
|
|
24
|
+
exports.createUiResponse = createUiResponse;
|
|
25
|
+
//# sourceMappingURL=ui-response.js.map
|