@trezor/connect 10.0.0-alpha.1 → 10.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/CHANGELOG.md +112 -63
- package/README.md +2 -2
- package/lib/api/applyFlags.d.ts +20 -0
- package/lib/api/applyFlags.js +38 -0
- package/lib/api/applySettings.d.ts +20 -0
- package/lib/api/applySettings.js +57 -0
- package/lib/api/authenticateDevice.d.ts +25 -0
- package/lib/api/authenticateDevice.js +195 -0
- package/lib/api/authorizeCoinjoin.d.ts +11 -0
- package/lib/api/authorizeCoinjoin.js +44 -0
- package/lib/api/backupDevice.d.ts +19 -0
- package/lib/api/backupDevice.js +39 -0
- package/lib/api/bitcoin/TransactionComposer.d.ts +46 -0
- package/lib/api/bitcoin/TransactionComposer.js +147 -0
- package/lib/api/bitcoin/createPendingTx.d.ts +37 -0
- package/lib/api/bitcoin/createPendingTx.js +55 -0
- package/lib/api/bitcoin/enhanceSignTx.d.ts +2 -0
- package/lib/api/bitcoin/enhanceSignTx.js +23 -0
- package/lib/api/bitcoin/index.d.ts +9 -0
- package/lib/api/bitcoin/index.js +9 -0
- package/lib/api/bitcoin/inputs.d.ts +4 -0
- package/lib/api/bitcoin/inputs.js +63 -0
- package/lib/api/bitcoin/outputs.d.ts +5 -0
- package/lib/api/bitcoin/outputs.js +128 -0
- package/lib/api/bitcoin/refTx.d.ts +23 -0
- package/lib/api/bitcoin/refTx.js +249 -0
- package/lib/api/bitcoin/signtx.d.ts +30 -0
- package/lib/api/bitcoin/signtx.js +229 -0
- package/lib/api/bitcoin/signtxLegacy.d.ts +10 -0
- package/lib/api/bitcoin/signtxLegacy.js +186 -0
- package/lib/api/bitcoin/signtxVerify.d.ts +12 -0
- package/lib/api/bitcoin/signtxVerify.js +95 -0
- package/lib/api/bitcoin/transactionBytes.d.ts +3 -0
- package/lib/api/bitcoin/transactionBytes.js +65 -0
- package/lib/api/bleUnpair.d.ts +11 -0
- package/lib/api/bleUnpair.js +37 -0
- package/lib/api/blockchainDisconnect.d.ts +16 -0
- package/lib/api/blockchainDisconnect.js +37 -0
- package/lib/api/blockchainEstimateFee.d.ts +16 -0
- package/lib/api/blockchainEstimateFee.js +102 -0
- package/lib/api/blockchainEvmRpcCall.d.ts +19 -0
- package/lib/api/blockchainEvmRpcCall.js +57 -0
- package/lib/api/blockchainGetAccountBalanceHistory.d.ts +16 -0
- package/lib/api/blockchainGetAccountBalanceHistory.js +60 -0
- package/lib/api/blockchainGetContractInfo.d.ts +16 -0
- package/lib/api/blockchainGetContractInfo.js +46 -0
- package/lib/api/blockchainGetCurrentFiatRates.d.ts +20 -0
- package/lib/api/blockchainGetCurrentFiatRates.js +49 -0
- package/lib/api/blockchainGetFiatRatesForTimestamps.d.ts +23 -0
- package/lib/api/blockchainGetFiatRatesForTimestamps.js +55 -0
- package/lib/api/blockchainGetInfo.d.ts +15 -0
- package/lib/api/blockchainGetInfo.js +37 -0
- package/lib/api/blockchainGetTransactions.d.ts +18 -0
- package/lib/api/blockchainGetTransactions.js +47 -0
- package/lib/api/blockchainSetCustomBackend.d.ts +17 -0
- package/lib/api/blockchainSetCustomBackend.js +43 -0
- package/lib/api/blockchainSubscribe.d.ts +19 -0
- package/lib/api/blockchainSubscribe.js +66 -0
- package/lib/api/blockchainSubscribeFiatRates.d.ts +19 -0
- package/lib/api/blockchainSubscribeFiatRates.js +43 -0
- package/lib/api/blockchainUnsubscribe.d.ts +19 -0
- package/lib/api/blockchainUnsubscribe.js +66 -0
- package/lib/api/blockchainUnsubscribeFiatRates.d.ts +17 -0
- package/lib/api/blockchainUnsubscribeFiatRates.js +37 -0
- package/lib/api/blockchainValidateEvmRpcUrl.d.ts +17 -0
- package/lib/api/blockchainValidateEvmRpcUrl.js +54 -0
- package/lib/api/cancelCoinjoinAuthorization.d.ts +11 -0
- package/lib/api/cancelCoinjoinAuthorization.js +33 -0
- package/lib/api/cardano/api/cardanoComposeTransaction.d.ts +10 -0
- package/lib/api/cardano/api/cardanoComposeTransaction.js +84 -0
- package/lib/api/cardano/api/cardanoGetAddress.d.ts +34 -0
- package/lib/api/cardano/api/cardanoGetAddress.js +130 -0
- package/lib/api/cardano/api/cardanoGetNativeScriptHash.d.ts +12 -0
- package/lib/api/cardano/api/cardanoGetNativeScriptHash.js +66 -0
- package/lib/api/cardano/api/cardanoGetPublicKey.d.ts +22 -0
- package/lib/api/cardano/api/cardanoGetPublicKey.js +92 -0
- package/lib/api/cardano/api/cardanoSignMessage.d.ts +22 -0
- package/lib/api/cardano/api/cardanoSignMessage.js +90 -0
- package/lib/api/cardano/api/cardanoSignTransaction.d.ts +81 -0
- package/lib/api/cardano/api/cardanoSignTransaction.js +301 -0
- package/lib/api/cardano/api/index.d.ts +6 -0
- package/lib/api/cardano/api/index.js +6 -0
- package/lib/api/cardano/cardanoAddressParameters.d.ts +6 -0
- package/lib/api/cardano/cardanoAddressParameters.js +79 -0
- package/lib/api/cardano/cardanoAuxiliaryData.d.ts +4 -0
- package/lib/api/cardano/cardanoAuxiliaryData.js +74 -0
- package/lib/api/cardano/cardanoCertificate.d.ts +13 -0
- package/lib/api/cardano/cardanoCertificate.js +142 -0
- package/lib/api/cardano/cardanoInputs.d.ts +25 -0
- package/lib/api/cardano/cardanoInputs.js +39 -0
- package/lib/api/cardano/cardanoOutputs.d.ts +40 -0
- package/lib/api/cardano/cardanoOutputs.js +70 -0
- package/lib/api/cardano/cardanoTokenBundle.d.ts +12 -0
- package/lib/api/cardano/cardanoUtils.d.ts +17 -0
- package/lib/api/cardano/cardanoUtils.js +100 -0
- package/lib/api/cardano/cardanoWitnesses.d.ts +4 -0
- package/lib/api/changeLanguage.d.ts +18 -0
- package/lib/api/changeLanguage.js +49 -0
- package/lib/api/changePin.d.ts +11 -0
- package/lib/api/changePin.js +27 -0
- package/lib/api/changeWipeCode.d.ts +11 -0
- package/lib/api/changeWipeCode.js +29 -0
- package/lib/api/cipherKeyValue.d.ts +17 -0
- package/lib/api/cipherKeyValue.js +58 -0
- package/lib/api/common/AbstractMiscGetAddress.d.ts +37 -0
- package/lib/api/common/AbstractMiscGetAddress.js +126 -0
- package/lib/api/common/Discovery.d.ts +33 -0
- package/lib/api/common/Discovery.js +119 -0
- package/lib/api/common/paramsValidator.d.ts +24 -0
- package/lib/api/common/paramsValidator.js +136 -0
- package/lib/api/common/requestExistingAccounts.d.ts +14 -0
- package/lib/api/common/requestExistingAccounts.js +20 -0
- package/lib/api/composeTransaction.d.ts +36 -0
- package/lib/api/composeTransaction.js +404 -0
- package/lib/api/discoverAccounts.d.ts +40 -0
- package/lib/api/discoverAccounts.js +360 -0
- package/lib/api/ethereum/api/ethereumGetAddress.d.ts +30 -0
- package/lib/api/ethereum/api/ethereumGetAddress.js +150 -0
- package/lib/api/ethereum/api/ethereumGetPublicKey.d.ts +52 -0
- package/lib/api/ethereum/api/ethereumGetPublicKey.js +100 -0
- package/lib/api/ethereum/api/ethereumSignMessage.d.ts +27 -0
- package/lib/api/ethereum/api/ethereumSignMessage.js +64 -0
- package/lib/api/ethereum/api/ethereumSignTransaction.d.ts +83 -0
- package/lib/api/ethereum/api/ethereumSignTransaction.js +148 -0
- package/lib/api/ethereum/api/ethereumSignTypedData.d.ts +117 -0
- package/lib/api/ethereum/api/ethereumSignTypedData.js +203 -0
- package/lib/api/ethereum/api/ethereumVerifyMessage.d.ts +12 -0
- package/lib/api/ethereum/api/ethereumVerifyMessage.js +35 -0
- package/lib/api/ethereum/api/index.d.ts +6 -0
- package/lib/api/ethereum/api/index.js +6 -0
- package/lib/api/ethereum/ethereumDefinitions.d.ts +53 -0
- package/lib/api/ethereum/ethereumDefinitions.js +135 -0
- package/lib/api/ethereum/ethereumSignTx.d.ts +16 -0
- package/lib/api/ethereum/ethereumSignTx.js +144 -0
- package/lib/api/ethereum/ethereumSignTypedData.d.ts +32 -0
- package/lib/api/ethereum/ethereumSignTypedData.js +175 -0
- package/lib/api/evoluGetDelegatedIdentityKey.d.ts +14 -0
- package/lib/api/evoluGetDelegatedIdentityKey.js +29 -0
- package/lib/api/evoluGetNode.d.ts +13 -0
- package/lib/api/evoluGetNode.js +29 -0
- package/lib/api/evoluSignRegistrationRequest.d.ts +16 -0
- package/lib/api/evoluSignRegistrationRequest.js +33 -0
- package/lib/api/firmware/calculateFirmwareHash.d.ts +18 -0
- package/lib/api/firmware/calculateXPubHash.d.ts +14 -0
- package/lib/api/firmware/calculateXPubHash.js +16 -0
- package/lib/api/firmware/getBinary.d.ts +14 -0
- package/lib/api/firmware/getBinary.js +33 -0
- package/lib/api/firmware/index.d.ts +6 -0
- package/lib/api/firmware/index.js +6 -0
- package/lib/api/firmware/modifyFirmware.d.ts +3 -0
- package/lib/api/firmware/parseFirmwareHeaders.d.ts +4 -0
- package/lib/api/firmware/uploadFirmware.d.ts +27 -0
- package/lib/api/firmware/uploadFirmware.js +99 -0
- package/lib/api/firmware/verifyEntropy.d.ts +25 -0
- package/lib/api/firmware/verifyEntropy.js +110 -0
- package/lib/api/getAccountInfo.d.ts +21 -0
- package/lib/api/getAccountInfo.js +253 -0
- package/lib/api/getAddress.d.ts +45 -0
- package/lib/api/getAddress.js +153 -0
- package/lib/api/getCoinInfo.d.ts +148 -0
- package/lib/api/getCoinInfo.js +25 -0
- package/lib/api/getDeviceState.d.ts +8 -0
- package/lib/api/getDeviceState.js +18 -0
- package/lib/api/getFeatures.d.ts +71 -0
- package/lib/api/getFeatures.js +22 -0
- package/lib/api/getFirmwareHash.d.ts +11 -0
- package/lib/api/getFirmwareHash.js +29 -0
- package/lib/api/getNonce.d.ts +10 -0
- package/lib/api/getNonce.js +18 -0
- package/lib/api/getOwnershipId.d.ts +17 -0
- package/lib/api/getOwnershipId.js +88 -0
- package/lib/api/getOwnershipProof.d.ts +17 -0
- package/lib/api/getOwnershipProof.js +95 -0
- package/lib/api/getPublicKey.d.ts +54 -0
- package/lib/api/getPublicKey.js +106 -0
- package/lib/api/getSettings.d.ts +24 -0
- package/lib/api/getSettings.js +21 -0
- package/lib/api/index.d.ts +62 -0
- package/lib/api/index.js +62 -0
- package/lib/api/loadDevice.d.ts +16 -0
- package/lib/api/loadDevice.js +46 -0
- package/lib/api/monero/api/index.d.ts +4 -0
- package/lib/api/monero/api/index.js +4 -0
- package/lib/api/monero/api/moneroGetAddress.d.ts +32 -0
- package/lib/api/monero/api/moneroGetAddress.js +117 -0
- package/lib/api/monero/api/moneroGetWatchKey.d.ts +14 -0
- package/lib/api/monero/api/moneroGetWatchKey.js +45 -0
- package/lib/api/monero/api/moneroKeyImageSync.d.ts +17 -0
- package/lib/api/monero/api/moneroKeyImageSync.js +128 -0
- package/lib/api/monero/api/moneroSignTransaction.d.ts +17 -0
- package/lib/api/monero/api/moneroSignTransaction.js +218 -0
- package/lib/api/nostr/nostrGetPublicKey.d.ts +15 -0
- package/lib/api/nostr/nostrGetPublicKey.js +38 -0
- package/lib/api/nostr/nostrSignEvent.d.ts +13 -0
- package/lib/api/nostr/nostrSignEvent.js +36 -0
- package/lib/api/pingDevice.d.ts +11 -0
- package/lib/api/pingDevice.js +29 -0
- package/lib/api/pushTransaction.d.ts +19 -0
- package/lib/api/pushTransaction.js +39 -0
- package/lib/api/recoveryDevice.d.ts +20 -0
- package/lib/api/recoveryDevice.js +52 -0
- package/lib/api/requestLogin.d.ts +14 -0
- package/lib/api/requestLogin.js +53 -0
- package/lib/api/resetDevice.d.ts +22 -0
- package/lib/api/resetDevice.js +133 -0
- package/lib/api/ripple/api/index.d.ts +2 -0
- package/lib/api/ripple/api/index.js +2 -0
- package/lib/api/ripple/api/rippleGetAddress.d.ts +17 -0
- package/lib/api/ripple/api/rippleGetAddress.js +22 -0
- package/lib/api/ripple/api/rippleSignTransaction.d.ts +13 -0
- package/lib/api/ripple/api/rippleSignTransaction.js +52 -0
- package/lib/api/selectAccount.d.ts +15 -0
- package/lib/api/selectAccount.js +42 -0
- package/lib/api/setBrightness.d.ts +12 -0
- package/lib/api/setBrightness.js +28 -0
- package/lib/api/setBusy.d.ts +11 -0
- package/lib/api/setBusy.js +31 -0
- package/lib/api/showDeviceTutorial.d.ts +11 -0
- package/lib/api/showDeviceTutorial.js +21 -0
- package/lib/api/signMessage.d.ts +25 -0
- package/lib/api/signMessage.js +75 -0
- package/lib/api/signTransaction.d.ts +199 -0
- package/lib/api/signTransaction.js +331 -0
- package/lib/api/solana/api/index.d.ts +4 -0
- package/lib/api/solana/api/index.js +4 -0
- package/lib/api/solana/api/solanaComposeTransaction.d.ts +33 -0
- package/lib/api/solana/api/solanaComposeTransaction.js +73 -0
- package/lib/api/solana/api/solanaGetAddress.d.ts +17 -0
- package/lib/api/solana/api/solanaGetAddress.js +22 -0
- package/lib/api/solana/api/solanaGetPublicKey.d.ts +32 -0
- package/lib/api/solana/api/solanaGetPublicKey.js +86 -0
- package/lib/api/solana/api/solanaSignTransaction.d.ts +41 -0
- package/lib/api/solana/api/solanaSignTransaction.js +204 -0
- package/lib/api/solana/solanaDefinitions.d.ts +9 -0
- package/lib/api/solana/solanaDefinitions.js +33 -0
- package/lib/api/stellar/api/index.d.ts +2 -0
- package/lib/api/stellar/api/index.js +2 -0
- package/lib/api/stellar/api/stellarGetAddress.d.ts +17 -0
- package/lib/api/stellar/api/stellarGetAddress.js +22 -0
- package/lib/api/stellar/api/stellarSignTransaction.d.ts +20 -0
- package/lib/api/stellar/api/stellarSignTransaction.js +65 -0
- package/lib/api/stellar/stellarSignTx.d.ts +7 -0
- package/lib/api/stellar/stellarSignTx.js +183 -0
- package/lib/api/telemetryGet.d.ts +14 -0
- package/lib/api/telemetryGet.js +26 -0
- package/lib/api/tezos/api/index.d.ts +3 -0
- package/lib/api/tezos/api/index.js +3 -0
- package/lib/api/tezos/api/tezosGetAddress.d.ts +17 -0
- package/lib/api/tezos/api/tezosGetAddress.js +22 -0
- package/lib/api/tezos/api/tezosGetPublicKey.d.ts +28 -0
- package/lib/api/tezos/api/tezosGetPublicKey.js +84 -0
- package/lib/api/tezos/api/tezosSignTransaction.d.ts +14 -0
- package/lib/api/tezos/api/tezosSignTransaction.js +30 -0
- package/lib/api/tezos/tezosSignTx.d.ts +71 -0
- package/lib/api/tezos/tezosSignTx.js +204 -0
- package/lib/api/thpGetCredentials.d.ts +13 -0
- package/lib/api/thpGetCredentials.js +30 -0
- package/lib/api/thpRemoveCredentials.d.ts +15 -0
- package/lib/api/thpRemoveCredentials.js +44 -0
- package/lib/api/tron/api/index.d.ts +3 -0
- package/lib/api/tron/api/index.js +3 -0
- package/lib/api/tron/api/tronComposeTransaction.d.ts +17 -0
- package/lib/api/tron/api/tronComposeTransaction.js +52 -0
- package/lib/api/tron/api/tronGetAddress.d.ts +17 -0
- package/lib/api/tron/api/tronGetAddress.js +22 -0
- package/lib/api/tron/api/tronSignTransaction.d.ts +20 -0
- package/lib/api/tron/api/tronSignTransaction.js +137 -0
- package/lib/api/tron/tronEncode.d.ts +11 -0
- package/lib/api/tron/tronEncode.js +157 -0
- package/lib/api/tron/tronProtobuf.d.ts +5 -0
- package/lib/api/unlockPath.d.ts +12 -0
- package/lib/api/unlockPath.js +33 -0
- package/lib/api/verifyMessage.d.ts +16 -0
- package/lib/api/verifyMessage.js +46 -0
- package/lib/api/wipeDevice.d.ts +21 -0
- package/lib/api/wipeDevice.js +49 -0
- package/lib/backend/BackendManager.d.ts +30 -0
- package/lib/backend/BackendManager.js +145 -0
- package/lib/backend/Blockchain.d.ts +81 -0
- package/lib/backend/Blockchain.js +235 -0
- package/lib/backend/BlockchainLink.d.ts +10 -0
- package/lib/backend/BlockchainLink.js +19 -0
- package/lib/backend/fees/BitcoinFeeLevels.d.ts +19 -0
- package/lib/backend/fees/BitcoinFeeLevels.js +44 -0
- package/lib/backend/fees/EthereumFeeLevels.d.ts +17 -0
- package/lib/backend/fees/EthereumFeeLevels.js +63 -0
- package/lib/backend/fees/MiscFeeLevels.d.ts +18 -0
- package/lib/backend/fees/MiscFeeLevels.js +30 -0
- package/lib/backend/fees/index.d.ts +5 -0
- package/lib/backend/fees/index.js +31 -0
- package/lib/core/AbstractMethod.d.ts +63 -0
- package/lib/core/AbstractMethod.js +189 -0
- package/lib/core/index.d.ts +29 -0
- package/lib/core/index.js +805 -0
- package/lib/core/method.d.ts +3 -0
- package/lib/core/method.js +19 -0
- package/lib/core/method.native.d.ts +2 -0
- package/lib/core/method.native.js +29 -0
- package/lib/core/onCallFirmwareUpdate.d.ts +42 -0
- package/lib/core/onCallFirmwareUpdate.js +436 -0
- package/lib/data/coinInfo.d.ts +101 -0
- package/lib/data/coinInfo.js +195 -0
- package/lib/data/config.d.ts +8 -0
- package/lib/data/config.js +273 -0
- package/lib/data/defaultFeeLevels.d.ts +18 -0
- package/lib/data/defaultFeeLevels.js +200 -0
- package/lib/data/enabledNetworksStore.d.ts +5 -0
- package/lib/data/enabledNetworksStore.js +20 -0
- package/lib/data/firmwareInfo.d.ts +55 -0
- package/lib/data/firmwareInfo.js +413 -0
- package/lib/data/firmwareReleaseStore.d.ts +10 -0
- package/lib/data/firmwareReleaseStore.js +16 -0
- package/lib/data/localFirmwareStore.d.ts +3 -0
- package/lib/data/protobufLoader.d.ts +1 -0
- package/lib/data/protobufLoader.js +30 -0
- package/lib/data/settingsStore.d.ts +6 -0
- package/lib/data/settingsStore.js +21 -0
- package/lib/device/Device.d.ts +259 -0
- package/lib/device/Device.js +765 -0
- package/lib/device/DeviceCommands.d.ts +87 -0
- package/lib/device/DeviceCommands.js +248 -0
- package/lib/device/DeviceCurrentSession.d.ts +750 -0
- package/lib/device/DeviceCurrentSession.js +239 -0
- package/lib/device/DeviceList.d.ts +75 -0
- package/lib/device/DeviceList.js +243 -0
- package/lib/device/TransportList.d.ts +3 -0
- package/lib/device/TransportList.js +13 -0
- package/lib/device/TransportManager.d.ts +33 -0
- package/lib/device/TransportManager.js +144 -0
- package/lib/device/calculateRevisionForDevice.d.ts +10 -0
- package/lib/device/calculateRevisionForDevice.js +19 -0
- package/lib/device/checkFirmwareRevision.d.ts +22 -0
- package/lib/device/checkFirmwareRevision.js +104 -0
- package/lib/device/resolveDescriptorForTaproot.d.ts +17 -0
- package/lib/device/resolveDescriptorForTaproot.js +27 -0
- package/lib/device/thp/handshake.d.ts +3 -0
- package/lib/device/thp/handshake.js +100 -0
- package/lib/device/thp/index.d.ts +5 -0
- package/lib/device/thp/index.js +65 -0
- package/lib/device/thp/pairing.d.ts +16 -0
- package/lib/device/thp/pairing.js +242 -0
- package/lib/device/thp/session.d.ts +2 -0
- package/lib/device/thp/session.js +27 -0
- package/lib/device/thp/thpCall.d.ts +31 -0
- package/lib/device/thp/thpCall.js +58 -0
- package/lib/device/validateMessageSize.d.ts +2 -0
- package/lib/device/validateMessageSize.js +9 -0
- package/lib/device/workflow/changeLanguage.d.ts +18 -0
- package/lib/device/workflow/changeLanguage.js +62 -0
- package/lib/device/workflow/checkFirmwareHash.d.ts +12 -0
- package/lib/device/workflow/checkFirmwareHash.js +86 -0
- package/lib/device/workflow/checkFirmwareHashWithRetries.d.ts +8 -0
- package/lib/device/workflow/checkFirmwareHashWithRetries.js +36 -0
- package/lib/device/workflow/handshake.d.ts +13 -0
- package/lib/device/workflow/handshake.js +55 -0
- package/lib/device/workflow/trezorPushNotification.d.ts +5 -0
- package/lib/device/workflow/trezorPushNotification.js +73 -0
- package/lib/device/workflow/validateState.d.ts +2 -0
- package/lib/device/workflow/validateState.js +152 -0
- package/lib/events/ui-promise.d.ts +20 -0
- package/lib/exports.d.ts +3 -0
- package/lib/exports.js +3 -0
- package/lib/impl/core-in-module.d.ts +33 -0
- package/lib/impl/core-in-module.js +194 -0
- package/lib/index.browser.d.ts +7 -0
- package/lib/index.browser.js +34 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.js +15 -0
- package/lib/types/idevice.d.ts +110 -0
- package/lib/types/typed-call-provider.d.ts +29 -0
- package/lib/types/workflow.d.ts +16 -0
- package/lib/utils/accountUtils.d.ts +10 -0
- package/lib/utils/accountUtils.js +90 -0
- package/lib/utils/addressUtils.d.ts +2 -0
- package/lib/utils/assetUtils.d.ts +13 -0
- package/lib/utils/assetUtils.js +55 -0
- package/lib/utils/assets.browser.d.ts +1 -0
- package/lib/utils/assets.browser.js +1 -0
- package/lib/utils/assets.d.ts +2 -0
- package/lib/utils/assets.js +13 -0
- package/lib/utils/assets.native.d.ts +2 -0
- package/lib/utils/assets.native.js +23 -0
- package/lib/utils/assetsTypes.d.ts +5 -0
- package/lib/utils/buildOutputDescriptor.d.ts +20 -0
- package/lib/utils/deviceFeaturesUtils.d.ts +7 -0
- package/lib/utils/deviceFeaturesUtils.js +109 -0
- package/lib/utils/ethereumUtils.d.ts +3 -0
- package/lib/utils/firmwareReleaseConfigUtils.d.ts +19 -0
- package/lib/utils/firmwareReleaseConfigUtils.js +131 -0
- package/lib/utils/firmwareUtils.d.ts +15 -0
- package/lib/utils/firmwareUtils.js +57 -0
- package/lib/utils/formatUtils.d.ts +13 -0
- package/lib/utils/formatUtils.js +45 -0
- package/lib/utils/hdnodeUtils.d.ts +6 -0
- package/lib/utils/hdnodeUtils.js +62 -0
- package/lib/utils/pathUtils.d.ts +1 -0
- package/lib/utils/pathUtils.js +1 -0
- package/lib/utils/paymentRequest.d.ts +8 -0
- package/lib/utils/paymentRequest.js +25 -0
- package/lib/utils/uiPromiseManager.d.ts +8 -0
- package/lib/workers/workers.browser.d.ts +10 -0
- package/lib/workers/workers.browser.js +16 -0
- package/lib/workers/workers.d.ts +10 -0
- package/lib/workers/workers.js +8 -0
- package/lib/workers/workers.native.d.ts +7 -0
- package/lib/workers/workers.native.js +7 -0
- package/package.json +57 -59
- package/libESM/api/applyFlags.d.mts +0 -20
- package/libESM/api/applyFlags.mjs +0 -36
- package/libESM/api/applySettings.d.mts +0 -20
- package/libESM/api/applySettings.mjs +0 -55
- package/libESM/api/authenticateDevice.d.mts +0 -9
- package/libESM/api/authenticateDevice.mjs +0 -108
- package/libESM/api/authorizeCoinjoin.d.mts +0 -11
- package/libESM/api/authorizeCoinjoin.mjs +0 -44
- package/libESM/api/backupDevice.d.mts +0 -19
- package/libESM/api/backupDevice.mjs +0 -36
- package/libESM/api/bitcoin/TransactionComposer.d.mts +0 -46
- package/libESM/api/bitcoin/TransactionComposer.mjs +0 -139
- package/libESM/api/bitcoin/createPendingTx.d.mts +0 -33
- package/libESM/api/bitcoin/createPendingTx.mjs +0 -54
- package/libESM/api/bitcoin/enhanceSignTx.d.mts +0 -2
- package/libESM/api/bitcoin/enhanceSignTx.mjs +0 -23
- package/libESM/api/bitcoin/index.d.mts +0 -9
- package/libESM/api/bitcoin/index.mjs +0 -9
- package/libESM/api/bitcoin/inputs.d.mts +0 -6
- package/libESM/api/bitcoin/inputs.mjs +0 -75
- package/libESM/api/bitcoin/outputs.d.mts +0 -5
- package/libESM/api/bitcoin/outputs.mjs +0 -128
- package/libESM/api/bitcoin/refTx.d.mts +0 -17
- package/libESM/api/bitcoin/refTx.mjs +0 -252
- package/libESM/api/bitcoin/signtx.d.mts +0 -22
- package/libESM/api/bitcoin/signtx.mjs +0 -213
- package/libESM/api/bitcoin/signtxLegacy.d.mts +0 -3
- package/libESM/api/bitcoin/signtxLegacy.mjs +0 -179
- package/libESM/api/bitcoin/signtxVerify.d.mts +0 -12
- package/libESM/api/bitcoin/signtxVerify.mjs +0 -86
- package/libESM/api/bitcoin/transactionBytes.d.mts +0 -3
- package/libESM/api/bitcoin/transactionBytes.mjs +0 -65
- package/libESM/api/bleUnpair.d.mts +0 -11
- package/libESM/api/bleUnpair.mjs +0 -35
- package/libESM/api/blockchainDisconnect.d.mts +0 -16
- package/libESM/api/blockchainDisconnect.mjs +0 -39
- package/libESM/api/blockchainEstimateFee.d.mts +0 -14
- package/libESM/api/blockchainEstimateFee.mjs +0 -106
- package/libESM/api/blockchainEvmRpcCall.d.mts +0 -17
- package/libESM/api/blockchainEvmRpcCall.mjs +0 -61
- package/libESM/api/blockchainGetAccountBalanceHistory.d.mts +0 -14
- package/libESM/api/blockchainGetAccountBalanceHistory.mjs +0 -64
- package/libESM/api/blockchainGetContractInfo.d.mts +0 -14
- package/libESM/api/blockchainGetContractInfo.mjs +0 -50
- package/libESM/api/blockchainGetCurrentFiatRates.d.mts +0 -18
- package/libESM/api/blockchainGetCurrentFiatRates.mjs +0 -53
- package/libESM/api/blockchainGetFiatRatesForTimestamps.d.mts +0 -21
- package/libESM/api/blockchainGetFiatRatesForTimestamps.mjs +0 -59
- package/libESM/api/blockchainGetInfo.d.mts +0 -13
- package/libESM/api/blockchainGetInfo.mjs +0 -41
- package/libESM/api/blockchainGetTransactions.d.mts +0 -15
- package/libESM/api/blockchainGetTransactions.mjs +0 -47
- package/libESM/api/blockchainSetCustomBackend.d.mts +0 -13
- package/libESM/api/blockchainSetCustomBackend.mjs +0 -41
- package/libESM/api/blockchainSubscribe.d.mts +0 -17
- package/libESM/api/blockchainSubscribe.mjs +0 -68
- package/libESM/api/blockchainSubscribeFiatRates.d.mts +0 -17
- package/libESM/api/blockchainSubscribeFiatRates.mjs +0 -47
- package/libESM/api/blockchainUnsubscribe.d.mts +0 -17
- package/libESM/api/blockchainUnsubscribe.mjs +0 -68
- package/libESM/api/blockchainUnsubscribeFiatRates.d.mts +0 -15
- package/libESM/api/blockchainUnsubscribeFiatRates.mjs +0 -41
- package/libESM/api/blockchainValidateEvmRpcUrl.d.mts +0 -17
- package/libESM/api/blockchainValidateEvmRpcUrl.mjs +0 -54
- package/libESM/api/cancelCoinjoinAuthorization.d.mts +0 -11
- package/libESM/api/cancelCoinjoinAuthorization.mjs +0 -31
- package/libESM/api/cardano/api/cardanoComposeTransaction.d.mts +0 -10
- package/libESM/api/cardano/api/cardanoComposeTransaction.mjs +0 -79
- package/libESM/api/cardano/api/cardanoGetAddress.d.mts +0 -30
- package/libESM/api/cardano/api/cardanoGetAddress.mjs +0 -116
- package/libESM/api/cardano/api/cardanoGetNativeScriptHash.d.mts +0 -12
- package/libESM/api/cardano/api/cardanoGetNativeScriptHash.mjs +0 -66
- package/libESM/api/cardano/api/cardanoGetPublicKey.d.mts +0 -20
- package/libESM/api/cardano/api/cardanoGetPublicKey.mjs +0 -72
- package/libESM/api/cardano/api/cardanoSignMessage.d.mts +0 -27
- package/libESM/api/cardano/api/cardanoSignMessage.mjs +0 -96
- package/libESM/api/cardano/api/cardanoSignTransaction.d.mts +0 -81
- package/libESM/api/cardano/api/cardanoSignTransaction.mjs +0 -298
- package/libESM/api/cardano/api/index.d.mts +0 -6
- package/libESM/api/cardano/api/index.mjs +0 -6
- package/libESM/api/cardano/cardanoAddressParameters.d.mts +0 -6
- package/libESM/api/cardano/cardanoAddressParameters.mjs +0 -79
- package/libESM/api/cardano/cardanoAuxiliaryData.d.mts +0 -4
- package/libESM/api/cardano/cardanoAuxiliaryData.mjs +0 -74
- package/libESM/api/cardano/cardanoCertificate.d.mts +0 -13
- package/libESM/api/cardano/cardanoCertificate.mjs +0 -142
- package/libESM/api/cardano/cardanoInputs.d.mts +0 -25
- package/libESM/api/cardano/cardanoInputs.mjs +0 -39
- package/libESM/api/cardano/cardanoOutputs.d.mts +0 -40
- package/libESM/api/cardano/cardanoOutputs.mjs +0 -70
- package/libESM/api/cardano/cardanoTokenBundle.d.mts +0 -12
- package/libESM/api/cardano/cardanoUtils.d.mts +0 -9
- package/libESM/api/cardano/cardanoUtils.mjs +0 -101
- package/libESM/api/cardano/cardanoWitnesses.d.mts +0 -4
- package/libESM/api/changeLanguage.d.mts +0 -18
- package/libESM/api/changeLanguage.mjs +0 -47
- package/libESM/api/changePin.d.mts +0 -11
- package/libESM/api/changePin.mjs +0 -25
- package/libESM/api/changeWipeCode.d.mts +0 -11
- package/libESM/api/changeWipeCode.mjs +0 -27
- package/libESM/api/cipherKeyValue.d.mts +0 -15
- package/libESM/api/cipherKeyValue.mjs +0 -51
- package/libESM/api/common/AbstractMiscGetAddress.d.mts +0 -35
- package/libESM/api/common/AbstractMiscGetAddress.mjs +0 -102
- package/libESM/api/common/Discovery.d.mts +0 -33
- package/libESM/api/common/Discovery.mjs +0 -116
- package/libESM/api/common/paramsValidator.d.mts +0 -23
- package/libESM/api/common/paramsValidator.mjs +0 -134
- package/libESM/api/common/requestExistingAccounts.d.mts +0 -9
- package/libESM/api/common/requestExistingAccounts.mjs +0 -20
- package/libESM/api/composeTransaction.d.mts +0 -36
- package/libESM/api/composeTransaction.mjs +0 -386
- package/libESM/api/discoverAccounts.d.mts +0 -38
- package/libESM/api/discoverAccounts.mjs +0 -363
- package/libESM/api/ethereum/api/ethereumGetAddress.d.mts +0 -28
- package/libESM/api/ethereum/api/ethereumGetAddress.mjs +0 -135
- package/libESM/api/ethereum/api/ethereumGetPublicKey.d.mts +0 -48
- package/libESM/api/ethereum/api/ethereumGetPublicKey.mjs +0 -90
- package/libESM/api/ethereum/api/ethereumSignMessage.d.mts +0 -27
- package/libESM/api/ethereum/api/ethereumSignMessage.mjs +0 -64
- package/libESM/api/ethereum/api/ethereumSignTransaction.d.mts +0 -83
- package/libESM/api/ethereum/api/ethereumSignTransaction.mjs +0 -148
- package/libESM/api/ethereum/api/ethereumSignTypedData.d.mts +0 -116
- package/libESM/api/ethereum/api/ethereumSignTypedData.mjs +0 -202
- package/libESM/api/ethereum/api/ethereumVerifyMessage.d.mts +0 -12
- package/libESM/api/ethereum/api/ethereumVerifyMessage.mjs +0 -33
- package/libESM/api/ethereum/api/index.d.mts +0 -6
- package/libESM/api/ethereum/api/index.mjs +0 -6
- package/libESM/api/ethereum/ethereumDefinitions.d.mts +0 -46
- package/libESM/api/ethereum/ethereumDefinitions.mjs +0 -103
- package/libESM/api/ethereum/ethereumSignTx.d.mts +0 -20
- package/libESM/api/ethereum/ethereumSignTx.mjs +0 -131
- package/libESM/api/ethereum/ethereumSignTypedData.d.mts +0 -32
- package/libESM/api/ethereum/ethereumSignTypedData.mjs +0 -169
- package/libESM/api/evoluGetDelegatedIdentityKey.d.mts +0 -14
- package/libESM/api/evoluGetDelegatedIdentityKey.mjs +0 -26
- package/libESM/api/evoluGetNode.d.mts +0 -13
- package/libESM/api/evoluGetNode.mjs +0 -27
- package/libESM/api/evoluSignRegistrationRequest.d.mts +0 -15
- package/libESM/api/evoluSignRegistrationRequest.mjs +0 -31
- package/libESM/api/firmware/calculateFirmwareHash.d.mts +0 -13
- package/libESM/api/firmware/calculateXPubHash.d.mts +0 -10
- package/libESM/api/firmware/calculateXPubHash.mjs +0 -14
- package/libESM/api/firmware/getBinary.d.mts +0 -10
- package/libESM/api/firmware/getBinary.mjs +0 -33
- package/libESM/api/firmware/index.d.mts +0 -6
- package/libESM/api/firmware/index.mjs +0 -6
- package/libESM/api/firmware/modifyFirmware.d.mts +0 -3
- package/libESM/api/firmware/parseFirmwareHeaders.d.mts +0 -4
- package/libESM/api/firmware/uploadFirmware.d.mts +0 -19
- package/libESM/api/firmware/uploadFirmware.mjs +0 -99
- package/libESM/api/firmware/verifyEntropy.d.mts +0 -18
- package/libESM/api/firmware/verifyEntropy.mjs +0 -107
- package/libESM/api/getAccountInfo.d.mts +0 -94
- package/libESM/api/getAccountInfo.mjs +0 -385
- package/libESM/api/getAddress.d.mts +0 -39
- package/libESM/api/getAddress.mjs +0 -142
- package/libESM/api/getCoinInfo.d.mts +0 -148
- package/libESM/api/getCoinInfo.mjs +0 -29
- package/libESM/api/getDeviceState.d.mts +0 -8
- package/libESM/api/getDeviceState.mjs +0 -16
- package/libESM/api/getFeatures.d.mts +0 -70
- package/libESM/api/getFeatures.mjs +0 -20
- package/libESM/api/getFirmwareHash.d.mts +0 -11
- package/libESM/api/getFirmwareHash.mjs +0 -27
- package/libESM/api/getNonce.d.mts +0 -10
- package/libESM/api/getNonce.mjs +0 -16
- package/libESM/api/getOwnershipId.d.mts +0 -15
- package/libESM/api/getOwnershipId.mjs +0 -79
- package/libESM/api/getOwnershipProof.d.mts +0 -15
- package/libESM/api/getOwnershipProof.mjs +0 -86
- package/libESM/api/getPublicKey.d.mts +0 -50
- package/libESM/api/getPublicKey.mjs +0 -88
- package/libESM/api/getSettings.d.mts +0 -8
- package/libESM/api/getSettings.mjs +0 -15
- package/libESM/api/index.d.mts +0 -59
- package/libESM/api/index.mjs +0 -59
- package/libESM/api/loadDevice.d.mts +0 -16
- package/libESM/api/loadDevice.mjs +0 -44
- package/libESM/api/monero/api/index.d.mts +0 -4
- package/libESM/api/monero/api/index.mjs +0 -4
- package/libESM/api/monero/api/moneroGetAddress.d.mts +0 -30
- package/libESM/api/monero/api/moneroGetAddress.mjs +0 -109
- package/libESM/api/monero/api/moneroGetWatchKey.d.mts +0 -14
- package/libESM/api/monero/api/moneroGetWatchKey.mjs +0 -44
- package/libESM/api/monero/api/moneroKeyImageSync.d.mts +0 -17
- package/libESM/api/monero/api/moneroKeyImageSync.mjs +0 -127
- package/libESM/api/monero/api/moneroSignTransaction.d.mts +0 -17
- package/libESM/api/monero/api/moneroSignTransaction.mjs +0 -202
- package/libESM/api/pingDevice.d.mts +0 -11
- package/libESM/api/pingDevice.mjs +0 -27
- package/libESM/api/pushTransaction.d.mts +0 -17
- package/libESM/api/pushTransaction.mjs +0 -42
- package/libESM/api/recoveryDevice.d.mts +0 -20
- package/libESM/api/recoveryDevice.mjs +0 -50
- package/libESM/api/requestLogin.d.mts +0 -14
- package/libESM/api/requestLogin.mjs +0 -48
- package/libESM/api/resetDevice.d.mts +0 -22
- package/libESM/api/resetDevice.mjs +0 -131
- package/libESM/api/ripple/api/index.d.mts +0 -2
- package/libESM/api/ripple/api/index.mjs +0 -2
- package/libESM/api/ripple/api/rippleGetAddress.d.mts +0 -15
- package/libESM/api/ripple/api/rippleGetAddress.mjs +0 -22
- package/libESM/api/ripple/api/rippleSignTransaction.d.mts +0 -13
- package/libESM/api/ripple/api/rippleSignTransaction.mjs +0 -52
- package/libESM/api/setBrightness.d.mts +0 -12
- package/libESM/api/setBrightness.mjs +0 -26
- package/libESM/api/setBusy.d.mts +0 -11
- package/libESM/api/setBusy.mjs +0 -32
- package/libESM/api/showDeviceTutorial.d.mts +0 -11
- package/libESM/api/showDeviceTutorial.mjs +0 -21
- package/libESM/api/signMessage.d.mts +0 -25
- package/libESM/api/signMessage.mjs +0 -71
- package/libESM/api/signTransaction.d.mts +0 -197
- package/libESM/api/signTransaction.mjs +0 -334
- package/libESM/api/solana/api/index.d.mts +0 -4
- package/libESM/api/solana/api/index.mjs +0 -4
- package/libESM/api/solana/api/solanaComposeTransaction.d.mts +0 -31
- package/libESM/api/solana/api/solanaComposeTransaction.mjs +0 -76
- package/libESM/api/solana/api/solanaGetAddress.d.mts +0 -15
- package/libESM/api/solana/api/solanaGetAddress.mjs +0 -22
- package/libESM/api/solana/api/solanaGetPublicKey.d.mts +0 -28
- package/libESM/api/solana/api/solanaGetPublicKey.mjs +0 -67
- package/libESM/api/solana/api/solanaSignTransaction.d.mts +0 -41
- package/libESM/api/solana/api/solanaSignTransaction.mjs +0 -203
- package/libESM/api/solana/solanaDefinitions.d.mts +0 -7
- package/libESM/api/solana/solanaDefinitions.mjs +0 -33
- package/libESM/api/stellar/api/index.d.mts +0 -2
- package/libESM/api/stellar/api/index.mjs +0 -2
- package/libESM/api/stellar/api/stellarGetAddress.d.mts +0 -15
- package/libESM/api/stellar/api/stellarGetAddress.mjs +0 -22
- package/libESM/api/stellar/api/stellarSignTransaction.d.mts +0 -26
- package/libESM/api/stellar/api/stellarSignTransaction.mjs +0 -66
- package/libESM/api/stellar/stellarSignTx.d.mts +0 -7
- package/libESM/api/stellar/stellarSignTx.mjs +0 -191
- package/libESM/api/telemetryGet.d.mts +0 -14
- package/libESM/api/telemetryGet.mjs +0 -24
- package/libESM/api/tezos/api/index.d.mts +0 -3
- package/libESM/api/tezos/api/index.mjs +0 -3
- package/libESM/api/tezos/api/tezosGetAddress.d.mts +0 -15
- package/libESM/api/tezos/api/tezosGetAddress.mjs +0 -22
- package/libESM/api/tezos/api/tezosGetPublicKey.d.mts +0 -24
- package/libESM/api/tezos/api/tezosGetPublicKey.mjs +0 -66
- package/libESM/api/tezos/api/tezosSignTransaction.d.mts +0 -14
- package/libESM/api/tezos/api/tezosSignTransaction.mjs +0 -30
- package/libESM/api/tezos/tezosSignTx.d.mts +0 -71
- package/libESM/api/tezos/tezosSignTx.mjs +0 -204
- package/libESM/api/thpGetCredentials.d.mts +0 -13
- package/libESM/api/thpGetCredentials.mjs +0 -28
- package/libESM/api/thpRemoveCredentials.d.mts +0 -15
- package/libESM/api/thpRemoveCredentials.mjs +0 -42
- package/libESM/api/tron/api/index.d.mts +0 -3
- package/libESM/api/tron/api/index.mjs +0 -3
- package/libESM/api/tron/api/tronComposeTransaction.d.mts +0 -17
- package/libESM/api/tron/api/tronComposeTransaction.mjs +0 -51
- package/libESM/api/tron/api/tronGetAddress.d.mts +0 -15
- package/libESM/api/tron/api/tronGetAddress.mjs +0 -20
- package/libESM/api/tron/api/tronSignTransaction.d.mts +0 -19
- package/libESM/api/tron/api/tronSignTransaction.mjs +0 -129
- package/libESM/api/tron/tronEncode.d.mts +0 -12
- package/libESM/api/tron/tronEncode.mjs +0 -77
- package/libESM/api/tron/tronProtobuf.d.mts +0 -5
- package/libESM/api/unlockPath.d.mts +0 -12
- package/libESM/api/unlockPath.mjs +0 -31
- package/libESM/api/verifyMessage.d.mts +0 -16
- package/libESM/api/verifyMessage.mjs +0 -46
- package/libESM/api/wipeDevice.d.mts +0 -21
- package/libESM/api/wipeDevice.mjs +0 -47
- package/libESM/backend/BackendManager.d.mts +0 -24
- package/libESM/backend/BackendManager.mjs +0 -137
- package/libESM/backend/Blockchain.d.mts +0 -81
- package/libESM/backend/Blockchain.mjs +0 -232
- package/libESM/backend/BlockchainLink.d.mts +0 -9
- package/libESM/backend/BlockchainLink.mjs +0 -13
- package/libESM/backend/fees/BitcoinFeeLevels.d.mts +0 -19
- package/libESM/backend/fees/BitcoinFeeLevels.mjs +0 -43
- package/libESM/backend/fees/EthereumFeeLevels.d.mts +0 -17
- package/libESM/backend/fees/EthereumFeeLevels.mjs +0 -52
- package/libESM/backend/fees/MiscFeeLevels.d.mts +0 -18
- package/libESM/backend/fees/MiscFeeLevels.mjs +0 -25
- package/libESM/backend/fees/index.d.mts +0 -5
- package/libESM/backend/fees/index.mjs +0 -30
- package/libESM/core/AbstractMethod.d.mts +0 -65
- package/libESM/core/AbstractMethod.mjs +0 -153
- package/libESM/core/index.d.mts +0 -27
- package/libESM/core/index.mjs +0 -795
- package/libESM/core/method.d.mts +0 -3
- package/libESM/core/method.mjs +0 -19
- package/libESM/core/method.native.d.mts +0 -2
- package/libESM/core/method.native.mjs +0 -29
- package/libESM/core/onCallFirmwareUpdate.d.mts +0 -39
- package/libESM/core/onCallFirmwareUpdate.mjs +0 -436
- package/libESM/data/coinInfo.d.mts +0 -374
- package/libESM/data/coinInfo.mjs +0 -183
- package/libESM/data/config.d.mts +0 -8
- package/libESM/data/config.mjs +0 -265
- package/libESM/data/defaultFeeLevels.d.mts +0 -18
- package/libESM/data/defaultFeeLevels.mjs +0 -174
- package/libESM/data/firmwareInfo.d.mts +0 -41
- package/libESM/data/firmwareInfo.mjs +0 -411
- package/libESM/data/firmwareReleaseStore.d.mts +0 -10
- package/libESM/data/firmwareReleaseStore.mjs +0 -16
- package/libESM/data/localFirmwareStore.d.mts +0 -3
- package/libESM/data/protobufLoader.d.mts +0 -1
- package/libESM/data/protobufLoader.mjs +0 -29
- package/libESM/data/settingsStore.d.mts +0 -6
- package/libESM/data/settingsStore.mjs +0 -21
- package/libESM/device/Device.d.mts +0 -237
- package/libESM/device/Device.mjs +0 -729
- package/libESM/device/DeviceCommands.d.mts +0 -77
- package/libESM/device/DeviceCommands.mjs +0 -245
- package/libESM/device/DeviceCurrentSession.d.mts +0 -3208
- package/libESM/device/DeviceCurrentSession.mjs +0 -240
- package/libESM/device/DeviceList.d.mts +0 -68
- package/libESM/device/DeviceList.mjs +0 -246
- package/libESM/device/TransportList.d.mts +0 -9
- package/libESM/device/TransportList.mjs +0 -41
- package/libESM/device/TransportManager.d.mts +0 -30
- package/libESM/device/TransportManager.mjs +0 -142
- package/libESM/device/calculateRevisionForDevice.d.mts +0 -7
- package/libESM/device/calculateRevisionForDevice.mjs +0 -19
- package/libESM/device/checkFirmwareRevision.d.mts +0 -12
- package/libESM/device/checkFirmwareRevision.mjs +0 -75
- package/libESM/device/resolveDescriptorForTaproot.d.mts +0 -14
- package/libESM/device/resolveDescriptorForTaproot.mjs +0 -25
- package/libESM/device/thp/handshake.d.mts +0 -3
- package/libESM/device/thp/handshake.mjs +0 -100
- package/libESM/device/thp/index.d.mts +0 -5
- package/libESM/device/thp/index.mjs +0 -65
- package/libESM/device/thp/pairing.d.mts +0 -16
- package/libESM/device/thp/pairing.mjs +0 -237
- package/libESM/device/thp/session.d.mts +0 -2
- package/libESM/device/thp/session.mjs +0 -27
- package/libESM/device/thp/thpCall.d.mts +0 -40
- package/libESM/device/thp/thpCall.mjs +0 -58
- package/libESM/device/validateMessageSize.d.mts +0 -2
- package/libESM/device/validateMessageSize.mjs +0 -9
- package/libESM/device/workflow/changeLanguage.d.mts +0 -14
- package/libESM/device/workflow/changeLanguage.mjs +0 -59
- package/libESM/device/workflow/checkFirmwareHash.d.mts +0 -9
- package/libESM/device/workflow/checkFirmwareHash.mjs +0 -86
- package/libESM/device/workflow/checkFirmwareHashWithRetries.d.mts +0 -8
- package/libESM/device/workflow/checkFirmwareHashWithRetries.mjs +0 -36
- package/libESM/device/workflow/handshake.d.mts +0 -9
- package/libESM/device/workflow/handshake.mjs +0 -55
- package/libESM/device/workflow/trezorPushNotification.d.mts +0 -2
- package/libESM/device/workflow/trezorPushNotification.mjs +0 -73
- package/libESM/device/workflow/validateState.d.mts +0 -2
- package/libESM/device/workflow/validateState.mjs +0 -153
- package/libESM/events/ui-promise.d.mts +0 -22
- package/libESM/exports.d.mts +0 -3
- package/libESM/exports.mjs +0 -3
- package/libESM/impl/core-in-module.d.mts +0 -27
- package/libESM/impl/core-in-module.mjs +0 -173
- package/libESM/index.browser.d.mts +0 -9
- package/libESM/index.browser.mjs +0 -50
- package/libESM/index.d.mts +0 -6
- package/libESM/index.mjs +0 -32
- package/libESM/index.renderer.d.mts +0 -6
- package/libESM/index.renderer.mjs +0 -19
- package/libESM/tsconfig.libESM.tsbuildinfo +0 -1
- package/libESM/types/idevice.d.mts +0 -109
- package/libESM/types/typed-call-provider.d.mts +0 -29
- package/libESM/types/workflow.d.mts +0 -16
- package/libESM/utils/accountUtils.d.mts +0 -10
- package/libESM/utils/accountUtils.mjs +0 -83
- package/libESM/utils/addressUtils.d.mts +0 -2
- package/libESM/utils/assetUtils.d.mts +0 -13
- package/libESM/utils/assetUtils.mjs +0 -56
- package/libESM/utils/assets.browser.d.mts +0 -1
- package/libESM/utils/assets.browser.mjs +0 -1
- package/libESM/utils/assets.d.mts +0 -2
- package/libESM/utils/assets.mjs +0 -13
- package/libESM/utils/assets.native.d.mts +0 -2
- package/libESM/utils/assets.native.mjs +0 -23
- package/libESM/utils/assetsTypes.d.mts +0 -5
- package/libESM/utils/buildOutputDescriptor.d.mts +0 -12
- package/libESM/utils/deviceFeaturesUtils.d.mts +0 -7
- package/libESM/utils/deviceFeaturesUtils.mjs +0 -109
- package/libESM/utils/ethereumUtils.d.mts +0 -3
- package/libESM/utils/firmwareReleaseConfigUtils.d.mts +0 -19
- package/libESM/utils/firmwareReleaseConfigUtils.mjs +0 -131
- package/libESM/utils/firmwareUtils.d.mts +0 -13
- package/libESM/utils/firmwareUtils.mjs +0 -54
- package/libESM/utils/formatUtils.d.mts +0 -15
- package/libESM/utils/formatUtils.mjs +0 -45
- package/libESM/utils/hdnodeUtils.d.mts +0 -6
- package/libESM/utils/hdnodeUtils.mjs +0 -62
- package/libESM/utils/pathUtils.d.mts +0 -17
- package/libESM/utils/pathUtils.mjs +0 -141
- package/libESM/utils/paymentRequest.d.mts +0 -8
- package/libESM/utils/paymentRequest.mjs +0 -25
- package/libESM/utils/uiPromiseManager.d.mts +0 -8
- package/libESM/workers/workers.browser.d.mts +0 -10
- package/libESM/workers/workers.browser.mjs +0 -16
- package/libESM/workers/workers.d.mts +0 -10
- package/libESM/workers/workers.mjs +0 -8
- package/libESM/workers/workers.native.d.mts +0 -7
- package/libESM/workers/workers.native.mjs +0 -7
- /package/{libESM/api/cardano/cardanoTokenBundle.mjs → lib/api/cardano/cardanoTokenBundle.js} +0 -0
- /package/{libESM/api/cardano/cardanoWitnesses.mjs → lib/api/cardano/cardanoWitnesses.js} +0 -0
- /package/{libESM/api/firmware/calculateFirmwareHash.mjs → lib/api/firmware/calculateFirmwareHash.js} +0 -0
- /package/{libESM/api/firmware/modifyFirmware.mjs → lib/api/firmware/modifyFirmware.js} +0 -0
- /package/{libESM/api/firmware/parseFirmwareHeaders.mjs → lib/api/firmware/parseFirmwareHeaders.js} +0 -0
- /package/{libESM/api/tron/tronProtobuf.mjs → lib/api/tron/tronProtobuf.js} +0 -0
- /package/{libESM/data/localFirmwareStore.mjs → lib/data/localFirmwareStore.js} +0 -0
- /package/{libESM/events/ui-promise.mjs → lib/events/ui-promise.js} +0 -0
- /package/{libESM/types/idevice.mjs → lib/types/idevice.js} +0 -0
- /package/{libESM/types/typed-call-provider.mjs → lib/types/typed-call-provider.js} +0 -0
- /package/{libESM/types/workflow.mjs → lib/types/workflow.js} +0 -0
- /package/{libESM/utils/addressUtils.mjs → lib/utils/addressUtils.js} +0 -0
- /package/{libESM/utils/assetsTypes.mjs → lib/utils/assetsTypes.js} +0 -0
- /package/{libESM/utils/buildOutputDescriptor.mjs → lib/utils/buildOutputDescriptor.js} +0 -0
- /package/{libESM/utils/ethereumUtils.mjs → lib/utils/ethereumUtils.js} +0 -0
- /package/{libESM/utils/uiPromiseManager.mjs → lib/utils/uiPromiseManager.js} +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CoinInfo } from '@trezor/connect-common';
|
|
2
|
+
export declare const formatAmount: (n: string, coinInfo: CoinInfo) => string;
|
|
3
|
+
export declare const hasHexPrefix: (str: string) => boolean;
|
|
4
|
+
export declare const stripHexPrefix: (str: string) => string;
|
|
5
|
+
export declare const addHexPrefix: (str: string) => `0x${string}`;
|
|
6
|
+
export declare const isHexString: (value: string) => false | RegExpMatchArray | null;
|
|
7
|
+
export declare const messageToBuffer: (message: string) => Buffer<ArrayBuffer>;
|
|
8
|
+
export declare const messageToHex: (message: string) => string;
|
|
9
|
+
export declare const hexToText: (hex: string) => string;
|
|
10
|
+
export declare const deepTransform: <V>(transform: (str: string) => V) => <T>(value: T) => DeepTransformed<T, V>;
|
|
11
|
+
type DeepTransformed<T, V> = T extends string ? V : T extends (infer U)[] ? DeepTransformed<U, V>[] : T extends object ? { [K in keyof T]: DeepTransformed<T[K], V> } : T;
|
|
12
|
+
export declare const sanitizeString: (value?: string) => string | undefined;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { BigNumber } from "@trezor/utils/lib/bigNumber.js";
|
|
2
|
+
export const formatAmount = (n, coinInfo) => `${new BigNumber(n).div(10 ** coinInfo.decimals).toString(10)} ${coinInfo.shortcut}`;
|
|
3
|
+
export const hasHexPrefix = str => str.slice(0, 2).toLowerCase() === '0x';
|
|
4
|
+
export const stripHexPrefix = str => hasHexPrefix(str) ? str.slice(2) : str;
|
|
5
|
+
export const addHexPrefix = str => str !== undefined && !hasHexPrefix(str) ? `0x${str}` : str;
|
|
6
|
+
export const isHexString = value => typeof value === 'string' && value.match(/^(0x|0X)?[0-9A-Fa-f]*$/);
|
|
7
|
+
export const messageToBuffer = message => {
|
|
8
|
+
if (isHexString(message)) {
|
|
9
|
+
let clean = stripHexPrefix(message);
|
|
10
|
+
if (clean.length % 2 !== 0) {
|
|
11
|
+
clean = `0${clean}`;
|
|
12
|
+
}
|
|
13
|
+
return Buffer.from(clean, 'hex');
|
|
14
|
+
} else {
|
|
15
|
+
return Buffer.from(message, 'utf8');
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
export const messageToHex = message => messageToBuffer(message).toString('hex');
|
|
19
|
+
export const hexToText = hex => {
|
|
20
|
+
const text = messageToBuffer(hex).toString('utf8');
|
|
21
|
+
return /[\uFFFD]/.test(text) ? hex : text;
|
|
22
|
+
};
|
|
23
|
+
export const deepTransform = transform => {
|
|
24
|
+
const recursion = value => {
|
|
25
|
+
if (typeof value === 'string') {
|
|
26
|
+
return transform(value);
|
|
27
|
+
}
|
|
28
|
+
if (Array.isArray(value)) {
|
|
29
|
+
return value.map(recursion);
|
|
30
|
+
}
|
|
31
|
+
if (value && typeof value === 'object') {
|
|
32
|
+
return Object.entries(value).reduce((obj, [k, v]) => ({
|
|
33
|
+
...obj,
|
|
34
|
+
[k]: recursion(v)
|
|
35
|
+
}), {});
|
|
36
|
+
}
|
|
37
|
+
return value;
|
|
38
|
+
};
|
|
39
|
+
return recursion;
|
|
40
|
+
};
|
|
41
|
+
export const sanitizeString = value => {
|
|
42
|
+
if (typeof value === 'string') {
|
|
43
|
+
return value.replace(/[\u2018\u2019]/g, "'");
|
|
44
|
+
}
|
|
45
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { PROTO } from '@trezor/connect-common';
|
|
2
|
+
import type { Network } from '@trezor/utxo-lib';
|
|
3
|
+
export declare const convertXpub: (xpub: string, originalNetwork?: Network, requestedNetwork?: Network) => string;
|
|
4
|
+
export declare function xpubDerive<PK extends PROTO.PublicKey | PROTO.EthereumPublicKey>(xpub: PK, childXPub: PK, suffix: number, network?: Network, _requestedNetwork?: Network): PK;
|
|
5
|
+
export declare const xpubToHDNodeType: (xpub: string, network: Network) => PROTO.HDNodeType;
|
|
6
|
+
export declare const convertMultisigPubKey: <T extends PROTO.TxInputType | PROTO.TxOutputType>(network: Network, utxo: T) => T;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { ERRORS } from "@trezor/connect-common/lib/constants/index.js";
|
|
2
|
+
import { bip32 } from "@trezor/utxo-lib";
|
|
3
|
+
const pubNode2bjsNode = (node, network) => {
|
|
4
|
+
const chainCode = Buffer.from(node.chain_code, 'hex');
|
|
5
|
+
const publicKey = Buffer.from(node.public_key, 'hex');
|
|
6
|
+
const res = bip32.fromPublicKey(publicKey, chainCode, network);
|
|
7
|
+
res.__DEPTH = node.depth;
|
|
8
|
+
res.__INDEX = node.child_num;
|
|
9
|
+
res.__PARENT_FINGERPRINT = node.fingerprint;
|
|
10
|
+
return res;
|
|
11
|
+
};
|
|
12
|
+
export const convertXpub = (xpub, originalNetwork, requestedNetwork) => {
|
|
13
|
+
const node = bip32.fromBase58(xpub, originalNetwork);
|
|
14
|
+
if (requestedNetwork) {
|
|
15
|
+
node.network = requestedNetwork;
|
|
16
|
+
}
|
|
17
|
+
return node.toBase58();
|
|
18
|
+
};
|
|
19
|
+
const pubKey2bjsNode = (key, network) => {
|
|
20
|
+
const keyNode = key.node;
|
|
21
|
+
const bjsNode = pubNode2bjsNode(keyNode, network);
|
|
22
|
+
const bjsXpub = bjsNode.toBase58();
|
|
23
|
+
const keyXpub = convertXpub(key.xpub, network);
|
|
24
|
+
if (bjsXpub !== keyXpub) {
|
|
25
|
+
throw ERRORS.TypedError('Runtime', `pubKey2bjsNode: Invalid public key transmission detected. Key: ${bjsXpub}, Received: ${keyXpub}`);
|
|
26
|
+
}
|
|
27
|
+
return bjsNode;
|
|
28
|
+
};
|
|
29
|
+
const checkDerivation = (parBjsNode, childBjsNode, suffix) => {
|
|
30
|
+
const derivedChildBjsNode = parBjsNode.derive(suffix);
|
|
31
|
+
const derivedXpub = derivedChildBjsNode.toBase58();
|
|
32
|
+
const compXpub = childBjsNode.toBase58();
|
|
33
|
+
if (derivedXpub !== compXpub) {
|
|
34
|
+
throw ERRORS.TypedError('Runtime', `checkDerivation: Invalid child cross-check public key. Derived: ${derivedXpub}, Received: ${compXpub}`);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
export function xpubDerive(xpub, childXPub, suffix, network, _requestedNetwork) {
|
|
38
|
+
const resNode = pubKey2bjsNode(xpub, network);
|
|
39
|
+
const childNode = pubKey2bjsNode(childXPub, network);
|
|
40
|
+
checkDerivation(resNode, childNode, suffix);
|
|
41
|
+
return xpub;
|
|
42
|
+
}
|
|
43
|
+
export const xpubToHDNodeType = (xpub, network) => {
|
|
44
|
+
const hd = bip32.fromBase58(xpub, network);
|
|
45
|
+
return {
|
|
46
|
+
depth: hd.depth,
|
|
47
|
+
child_num: hd.index,
|
|
48
|
+
fingerprint: hd.parentFingerprint,
|
|
49
|
+
public_key: hd.publicKey.toString('hex'),
|
|
50
|
+
chain_code: hd.chainCode.toString('hex')
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
export const convertMultisigPubKey = (network, utxo) => {
|
|
54
|
+
if ('multisig' in utxo && utxo.multisig?.pubkeys) {
|
|
55
|
+
utxo.multisig.pubkeys.forEach(pk => {
|
|
56
|
+
if (typeof pk.node === 'string') {
|
|
57
|
+
pk.node = xpubToHDNodeType(pk.node, network);
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
return utxo;
|
|
62
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@trezor/connect-common/lib/utils/pathUtils';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@trezor/connect-common/lib/utils/pathUtils.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { MessagesSchema as PROTO } from '@trezor/protobuf';
|
|
2
|
+
export declare const PAYMENT_REQUEST_AMOUNT_BYTES: {
|
|
3
|
+
readonly DEFAULT: 8;
|
|
4
|
+
readonly EVM: 32;
|
|
5
|
+
};
|
|
6
|
+
export declare const encodePaymentRequestAmount: <T extends {
|
|
7
|
+
amount?: PROTO.PaymentRequest["amount"];
|
|
8
|
+
}>(paymentRequest: T, bytesLength: number) => T;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ERRORS } from "@trezor/connect-common/lib/constants/index.js";
|
|
2
|
+
import { formatBigUintToLE } from "@trezor/utils/lib/formatBigUintToLE.js";
|
|
3
|
+
export const PAYMENT_REQUEST_AMOUNT_BYTES = {
|
|
4
|
+
DEFAULT: 8,
|
|
5
|
+
EVM: 32
|
|
6
|
+
};
|
|
7
|
+
export const encodePaymentRequestAmount = (paymentRequest, bytesLength) => {
|
|
8
|
+
if (paymentRequest.amount === undefined) {
|
|
9
|
+
return paymentRequest;
|
|
10
|
+
}
|
|
11
|
+
if (typeof paymentRequest.amount !== 'string' || !/^\d+$/.test(paymentRequest.amount)) {
|
|
12
|
+
throw ERRORS.TypedError('Method_InvalidParameter', 'Invalid PaymentRequest.amount: expected a decimal string in subunits');
|
|
13
|
+
}
|
|
14
|
+
try {
|
|
15
|
+
return {
|
|
16
|
+
...paymentRequest,
|
|
17
|
+
amount: formatBigUintToLE({
|
|
18
|
+
value: paymentRequest.amount,
|
|
19
|
+
bytesLength
|
|
20
|
+
})
|
|
21
|
+
};
|
|
22
|
+
} catch (error) {
|
|
23
|
+
throw ERRORS.TypedError('Method_InvalidParameter', `Invalid PaymentRequest.amount: ${error instanceof Error ? error.message : String(error)}`);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { UiPromiseCreator, UiPromiseResponse } from "../events/ui-promise.js";
|
|
2
|
+
export declare const createUiPromiseManager: () => {
|
|
3
|
+
exists: (type: UiPromiseResponse["type"]) => boolean;
|
|
4
|
+
create: UiPromiseCreator;
|
|
5
|
+
resolve: (event: UiPromiseResponse) => boolean;
|
|
6
|
+
rejectAll: (error: Error) => void;
|
|
7
|
+
clear: () => void;
|
|
8
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { BaseWorker } from '@trezor/blockchain-link/lib/workers/baseWorker';
|
|
2
|
+
type WorkerAsyncImporter = () => Promise<BaseWorker<unknown>>;
|
|
3
|
+
declare const BlockbookWorker: () => Worker;
|
|
4
|
+
declare const BlockfrostWorker: () => Worker;
|
|
5
|
+
declare const RippleWorker: () => Worker;
|
|
6
|
+
declare const StellarWorker: () => Worker;
|
|
7
|
+
declare const SolanaWorker: WorkerAsyncImporter;
|
|
8
|
+
declare const ElectrumWorker: undefined;
|
|
9
|
+
declare const EvmRpcWorker: WorkerAsyncImporter;
|
|
10
|
+
export { BlockbookWorker, RippleWorker, BlockfrostWorker, ElectrumWorker, SolanaWorker, StellarWorker, EvmRpcWorker };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const BlockbookWorker = () => new Worker(new URL('@trezor/blockchain-link/src/workers/blockbook', import.meta.url), {
|
|
2
|
+
type: 'module'
|
|
3
|
+
});
|
|
4
|
+
const BlockfrostWorker = () => new Worker(new URL('@trezor/blockchain-link/src/workers/blockfrost', import.meta.url), {
|
|
5
|
+
type: 'module'
|
|
6
|
+
});
|
|
7
|
+
const RippleWorker = () => new Worker(new URL('@trezor/blockchain-link/src/workers/ripple', import.meta.url), {
|
|
8
|
+
type: 'module'
|
|
9
|
+
});
|
|
10
|
+
const StellarWorker = () => new Worker(new URL('@trezor/blockchain-link/src/workers/stellar', import.meta.url), {
|
|
11
|
+
type: 'module'
|
|
12
|
+
});
|
|
13
|
+
const SolanaWorker = () => import("@trezor/blockchain-link/lib/workers/solana").then(w => w.default());
|
|
14
|
+
const ElectrumWorker = undefined;
|
|
15
|
+
const EvmRpcWorker = () => import("@trezor/blockchain-link/lib/workers/evm-rpc").then(w => w.default());
|
|
16
|
+
export { BlockbookWorker, RippleWorker, BlockfrostWorker, ElectrumWorker, SolanaWorker, StellarWorker, EvmRpcWorker };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { BaseWorker } from '@trezor/blockchain-link/lib/workers/baseWorker';
|
|
2
|
+
type WorkerAsyncImporter = () => Promise<BaseWorker<unknown>>;
|
|
3
|
+
declare const BlockbookWorker: WorkerAsyncImporter;
|
|
4
|
+
declare const RippleWorker: WorkerAsyncImporter;
|
|
5
|
+
declare const BlockfrostWorker: WorkerAsyncImporter;
|
|
6
|
+
declare const ElectrumWorker: WorkerAsyncImporter;
|
|
7
|
+
declare const SolanaWorker: WorkerAsyncImporter;
|
|
8
|
+
declare const StellarWorker: WorkerAsyncImporter;
|
|
9
|
+
declare const EvmRpcWorker: WorkerAsyncImporter;
|
|
10
|
+
export { BlockbookWorker, RippleWorker, BlockfrostWorker, ElectrumWorker, SolanaWorker, StellarWorker, EvmRpcWorker };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
const BlockbookWorker = () => import("@trezor/blockchain-link/lib/workers/blockbook").then(w => w.default());
|
|
2
|
+
const RippleWorker = () => import("@trezor/blockchain-link/lib/workers/ripple").then(w => w.default());
|
|
3
|
+
const BlockfrostWorker = () => import("@trezor/blockchain-link/lib/workers/blockfrost").then(w => w.default());
|
|
4
|
+
const ElectrumWorker = () => import("@trezor/blockchain-link/lib/workers/electrum").then(w => w.default());
|
|
5
|
+
const SolanaWorker = () => import("@trezor/blockchain-link/lib/workers/solana").then(w => w.default());
|
|
6
|
+
const StellarWorker = () => import("@trezor/blockchain-link/lib/workers/stellar").then(w => w.default());
|
|
7
|
+
const EvmRpcWorker = () => import("@trezor/blockchain-link/lib/workers/evm-rpc").then(w => w.default());
|
|
8
|
+
export { BlockbookWorker, RippleWorker, BlockfrostWorker, ElectrumWorker, SolanaWorker, StellarWorker, EvmRpcWorker };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import BlockbookWorker from '@trezor/blockchain-link/lib/workers/blockbook';
|
|
2
|
+
import BlockfrostWorker from '@trezor/blockchain-link/lib/workers/blockfrost';
|
|
3
|
+
import ElectrumWorker from '@trezor/blockchain-link/lib/workers/electrum';
|
|
4
|
+
import RippleWorker from '@trezor/blockchain-link/lib/workers/ripple';
|
|
5
|
+
import SolanaWorker from '@trezor/blockchain-link/lib/workers/solana';
|
|
6
|
+
import StellarWorker from '@trezor/blockchain-link/lib/workers/stellar';
|
|
7
|
+
export { BlockbookWorker, RippleWorker, BlockfrostWorker, ElectrumWorker, SolanaWorker, StellarWorker };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import BlockbookWorker from "@trezor/blockchain-link/lib/workers/blockbook/index.js";
|
|
2
|
+
import BlockfrostWorker from "@trezor/blockchain-link/lib/workers/blockfrost/index.js";
|
|
3
|
+
import ElectrumWorker from "@trezor/blockchain-link/lib/workers/electrum/index.js";
|
|
4
|
+
import RippleWorker from "@trezor/blockchain-link/lib/workers/ripple/index.js";
|
|
5
|
+
import SolanaWorker from "@trezor/blockchain-link/lib/workers/solana/index.js";
|
|
6
|
+
import StellarWorker from "@trezor/blockchain-link/lib/workers/stellar/index.js";
|
|
7
|
+
export { BlockbookWorker, RippleWorker, BlockfrostWorker, ElectrumWorker, SolanaWorker, StellarWorker };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trezor/connect",
|
|
3
|
-
"version": "10.0.0-
|
|
3
|
+
"version": "10.0.0-beta.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"author": "Trezor <info@trezor.io>",
|
|
6
6
|
"homepage": "https://github.com/trezor/trezor-suite/tree/develop/packages/connect",
|
|
@@ -19,15 +19,15 @@
|
|
|
19
19
|
"javascript"
|
|
20
20
|
],
|
|
21
21
|
"sideEffects": false,
|
|
22
|
-
"main": "./
|
|
22
|
+
"main": "./lib/index.js",
|
|
23
23
|
"browser": {
|
|
24
|
-
"./
|
|
25
|
-
"./
|
|
26
|
-
"./
|
|
27
|
-
"./
|
|
28
|
-
"./
|
|
29
|
-
"./
|
|
30
|
-
"./
|
|
24
|
+
"./lib/index.js": "./lib/index.browser.js",
|
|
25
|
+
"./lib/utils/assets.js": "./lib/utils/assets.browser.js",
|
|
26
|
+
"./lib/workers/workers.js": "./lib/workers/workers.browser.js",
|
|
27
|
+
"./lib/data/*": "./lib/data/*",
|
|
28
|
+
"./lib/exports.js": "./lib/exports.js",
|
|
29
|
+
"./lib/impl/*": "./lib/impl/*",
|
|
30
|
+
"./lib/utils/*": "./lib/utils/*"
|
|
31
31
|
},
|
|
32
32
|
"react-native": {
|
|
33
33
|
"./src/index": "./src/index.ts",
|
|
@@ -36,43 +36,43 @@
|
|
|
36
36
|
"./src/workers/workers": "./src/workers/workers.native.ts"
|
|
37
37
|
},
|
|
38
38
|
"publishConfig": {
|
|
39
|
-
"main": "./
|
|
40
|
-
"types": "./
|
|
39
|
+
"main": "./lib/index.js",
|
|
40
|
+
"types": "./lib/index.d.ts",
|
|
41
41
|
"exports": {
|
|
42
42
|
".": {
|
|
43
|
-
"types": "./
|
|
44
|
-
"default": "./
|
|
43
|
+
"types": "./lib/index.d.ts",
|
|
44
|
+
"default": "./lib/index.js"
|
|
45
45
|
},
|
|
46
|
-
"./
|
|
46
|
+
"./lib/*": "./lib/*"
|
|
47
47
|
},
|
|
48
48
|
"browser": {
|
|
49
|
-
"./
|
|
50
|
-
"./
|
|
51
|
-
"./
|
|
52
|
-
"./
|
|
53
|
-
"./
|
|
54
|
-
"./
|
|
55
|
-
"./
|
|
49
|
+
"./lib/index.js": "./lib/index.browser.js",
|
|
50
|
+
"./lib/utils/assets.js": "./lib/utils/assets.browser.js",
|
|
51
|
+
"./lib/workers/workers.js": "./lib/workers/workers.browser.js",
|
|
52
|
+
"./lib/data/*": "./lib/data/*",
|
|
53
|
+
"./lib/exports.js": "./lib/exports.js",
|
|
54
|
+
"./lib/impl/*": "./lib/impl/*",
|
|
55
|
+
"./lib/utils/*": "./lib/utils/*"
|
|
56
56
|
},
|
|
57
57
|
"react-native": {
|
|
58
|
-
"./
|
|
59
|
-
"./
|
|
60
|
-
"./
|
|
61
|
-
"./
|
|
62
|
-
"./
|
|
63
|
-
"./
|
|
64
|
-
"./
|
|
58
|
+
"./lib/index.js": "./lib/index.js",
|
|
59
|
+
"./lib/utils/assets.js": "./lib/utils/assets.native.js",
|
|
60
|
+
"./lib/workers/workers.js": "./lib/workers/workers.native.js",
|
|
61
|
+
"./lib/data/*": "./lib/data/*",
|
|
62
|
+
"./lib/exports.js": "./lib/exports.js",
|
|
63
|
+
"./lib/impl/*": "./lib/impl/*",
|
|
64
|
+
"./lib/utils/*": "./lib/utils/*"
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
67
|
"files": [
|
|
68
|
-
"
|
|
68
|
+
"lib/",
|
|
69
69
|
"CHANGELOG.md"
|
|
70
70
|
],
|
|
71
71
|
"scripts": {
|
|
72
72
|
"test:unit": "jest --version && jest",
|
|
73
73
|
"depcheck": "yarn g:depcheck",
|
|
74
74
|
"type-check": "yarn g:tsc --build",
|
|
75
|
-
"build:lib": "yarn g:rimraf ./
|
|
75
|
+
"build:lib": "yarn g:rimraf ./lib && yarn g:tsc --build tsconfig.lib.json && ../../scripts/publish/replace-imports.sh ./lib",
|
|
76
76
|
"version:prerelease": "yarn g:tsx scripts/bump-version.ts prerelease",
|
|
77
77
|
"version:patch": "yarn g:tsx scripts/bump-version.ts patch",
|
|
78
78
|
"version:prepatch": "yarn g:tsx scripts/bump-version.ts prepatch",
|
|
@@ -85,51 +85,49 @@
|
|
|
85
85
|
},
|
|
86
86
|
"dependencies": {
|
|
87
87
|
"@bufbuild/protobuf": "^2.11.0",
|
|
88
|
-
"@ethereumjs/common": "^10.1.1",
|
|
89
|
-
"@ethereumjs/tx": "^10.1.1",
|
|
90
|
-
"@fivebinaries/coin-selection": "3.0.0",
|
|
91
88
|
"@noble/hashes": "^2.0.1",
|
|
92
89
|
"@scure/base": "^2.0.0",
|
|
93
90
|
"@scure/bip39": "^1.5.1",
|
|
94
|
-
"@trezor/blockchain-link": "10.0.0-
|
|
95
|
-
"@trezor/blockchain-link-types": "10.0.0-
|
|
96
|
-
"@trezor/
|
|
97
|
-
"@trezor/connect-
|
|
98
|
-
"@trezor/
|
|
99
|
-
"@trezor/
|
|
100
|
-
"@trezor/device-
|
|
101
|
-
"@trezor/
|
|
102
|
-
"@trezor/
|
|
103
|
-
"@trezor/
|
|
104
|
-
"@trezor/
|
|
105
|
-
"@trezor/
|
|
106
|
-
"@trezor/
|
|
107
|
-
"@trezor/utils": "10.0.0-
|
|
108
|
-
"@trezor/
|
|
109
|
-
"
|
|
91
|
+
"@trezor/blockchain-link": "10.0.0-beta.1",
|
|
92
|
+
"@trezor/blockchain-link-types": "10.0.0-beta.1",
|
|
93
|
+
"@trezor/connect-common": "10.0.0-beta.1",
|
|
94
|
+
"@trezor/connect-data": "10.0.0-beta.1",
|
|
95
|
+
"@trezor/crypto-utils": "10.0.0-beta.1",
|
|
96
|
+
"@trezor/device-authenticity": "10.0.0-beta.1",
|
|
97
|
+
"@trezor/device-utils": "10.0.0-beta.1",
|
|
98
|
+
"@trezor/network-cardano": "10.0.0-beta.1",
|
|
99
|
+
"@trezor/network-solana": "10.0.0-beta.1",
|
|
100
|
+
"@trezor/network-stellar": "10.0.0-beta.1",
|
|
101
|
+
"@trezor/network-tron": "10.0.0-beta.1",
|
|
102
|
+
"@trezor/protobuf": "10.0.0-beta.1",
|
|
103
|
+
"@trezor/protocol": "10.0.0-beta.1",
|
|
104
|
+
"@trezor/schema-utils": "10.0.0-beta.1",
|
|
105
|
+
"@trezor/transport-common": "10.0.0-beta.1",
|
|
106
|
+
"@trezor/transport-web": "10.0.0-beta.1",
|
|
107
|
+
"@trezor/type-utils": "10.0.0-beta.1",
|
|
108
|
+
"@trezor/utils": "10.0.0-beta.1",
|
|
109
|
+
"@trezor/utxo-lib": "10.0.0-beta.1",
|
|
110
110
|
"cross-fetch": "^4.1.0",
|
|
111
111
|
"jws": "^4.0.1",
|
|
112
|
-
"viem": "^2.
|
|
112
|
+
"viem": "^2.54.1"
|
|
113
113
|
},
|
|
114
114
|
"devDependencies": {
|
|
115
|
-
"@babel/preset-typescript": "^7.
|
|
115
|
+
"@babel/preset-typescript": "^7.29.7",
|
|
116
116
|
"@trezor/eslint": "1.0.0",
|
|
117
117
|
"@trezor/trezor-user-env-link": "1.0.2",
|
|
118
118
|
"@types/jws": "^3.2.11",
|
|
119
119
|
"@types/node": "22.13.10",
|
|
120
120
|
"@types/w3c-web-usb": "^1.0.14",
|
|
121
|
-
"@vitest/browser-playwright": "^4.1.
|
|
121
|
+
"@vitest/browser-playwright": "^4.1.9",
|
|
122
122
|
"crypto-browserify": "3.12.1",
|
|
123
123
|
"jest": "29.7.0",
|
|
124
|
-
"node-fetch": "^3.3.2",
|
|
125
124
|
"process": "^0.11.10",
|
|
126
125
|
"stream-browserify": "^3.0.0",
|
|
127
126
|
"tsx": "^4.21.0",
|
|
128
127
|
"vite-plugin-node-polyfills": "^0.26.0",
|
|
129
128
|
"vite-plugin-wasm": "^3.6.0",
|
|
130
|
-
"vitest": "^4.1.
|
|
129
|
+
"vitest": "^4.1.9",
|
|
131
130
|
"vm-browserify": "^1.1.2",
|
|
132
|
-
"web3-utils": "^4.3.3",
|
|
133
131
|
"ws": "^8.20.0"
|
|
134
132
|
},
|
|
135
133
|
"peerDependencies": {
|
|
@@ -137,10 +135,10 @@
|
|
|
137
135
|
},
|
|
138
136
|
"exports": {
|
|
139
137
|
".": {
|
|
140
|
-
"types": "./
|
|
141
|
-
"default": "./
|
|
138
|
+
"types": "./lib/index.d.ts",
|
|
139
|
+
"default": "./lib/index.js"
|
|
142
140
|
},
|
|
143
|
-
"./
|
|
141
|
+
"./lib/*": "./lib/*"
|
|
144
142
|
},
|
|
145
|
-
"types": "./
|
|
143
|
+
"types": "./lib/index.d.ts"
|
|
146
144
|
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { type MethodPermission } from '@trezor/connect-common';
|
|
2
|
-
import { MessagesSchema as PROTO } from '@trezor/protobuf';
|
|
3
|
-
import type { MethodMessage } from '../core/AbstractMethod';
|
|
4
|
-
import { AbstractMethod } from '../core/AbstractMethod';
|
|
5
|
-
export default class ApplyFlags extends AbstractMethod<'applyFlags', PROTO.ApplyFlags> {
|
|
6
|
-
constructor(message: MethodMessage<'applyFlags'>);
|
|
7
|
-
get requiredPermissions(): MethodPermission[];
|
|
8
|
-
init(): void;
|
|
9
|
-
get confirmation(): {
|
|
10
|
-
view: "device-management";
|
|
11
|
-
customConfirmButton: {
|
|
12
|
-
className: string;
|
|
13
|
-
label: string;
|
|
14
|
-
};
|
|
15
|
-
label: string;
|
|
16
|
-
};
|
|
17
|
-
run(): Promise<{
|
|
18
|
-
message: string;
|
|
19
|
-
}>;
|
|
20
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { MessagesSchema as PROTO } from "@trezor/protobuf";
|
|
2
|
-
import { Assert } from "@trezor/schema-utils";
|
|
3
|
-
import { AbstractMethod } from "../core/AbstractMethod.mjs";
|
|
4
|
-
export default class ApplyFlags extends AbstractMethod {
|
|
5
|
-
constructor(message) {
|
|
6
|
-
const {
|
|
7
|
-
payload
|
|
8
|
-
} = message;
|
|
9
|
-
Assert(PROTO.ApplyFlags, payload);
|
|
10
|
-
const params = {
|
|
11
|
-
flags: payload.flags
|
|
12
|
-
};
|
|
13
|
-
super(message, params);
|
|
14
|
-
this.useDeviceState = false;
|
|
15
|
-
this.skipFinalReload = false;
|
|
16
|
-
}
|
|
17
|
-
get requiredPermissions() {
|
|
18
|
-
return ['management'];
|
|
19
|
-
}
|
|
20
|
-
init() {}
|
|
21
|
-
get confirmation() {
|
|
22
|
-
return {
|
|
23
|
-
view: 'device-management',
|
|
24
|
-
customConfirmButton: {
|
|
25
|
-
className: 'confirm',
|
|
26
|
-
label: 'Proceed'
|
|
27
|
-
},
|
|
28
|
-
label: 'Do you really want to apply flags?'
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
async run() {
|
|
32
|
-
const cmd = this.getDevice().getCommands();
|
|
33
|
-
const response = await cmd.typedCall('ApplyFlags', 'Success', this.params);
|
|
34
|
-
return response.message;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { type MethodPermission } from '@trezor/connect-common';
|
|
2
|
-
import type { MessagesSchema as PROTO } from '@trezor/protobuf';
|
|
3
|
-
import type { MethodMessage } from '../core/AbstractMethod';
|
|
4
|
-
import { AbstractMethod } from '../core/AbstractMethod';
|
|
5
|
-
export default class ApplySettings extends AbstractMethod<'applySettings', PROTO.ApplySettings> {
|
|
6
|
-
constructor(message: MethodMessage<'applySettings'>);
|
|
7
|
-
get requiredPermissions(): MethodPermission[];
|
|
8
|
-
init(): void;
|
|
9
|
-
get confirmation(): {
|
|
10
|
-
view: "device-management";
|
|
11
|
-
customConfirmButton: {
|
|
12
|
-
className: string;
|
|
13
|
-
label: string;
|
|
14
|
-
};
|
|
15
|
-
label: string;
|
|
16
|
-
};
|
|
17
|
-
run(): Promise<{
|
|
18
|
-
message: string;
|
|
19
|
-
}>;
|
|
20
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { ApplySettings as ApplySettingsSchema } from "@trezor/connect-common";
|
|
2
|
-
import { Assert } from "@trezor/schema-utils";
|
|
3
|
-
import { AbstractMethod } from "../core/AbstractMethod.mjs";
|
|
4
|
-
export default class ApplySettings extends AbstractMethod {
|
|
5
|
-
constructor(message) {
|
|
6
|
-
const {
|
|
7
|
-
payload
|
|
8
|
-
} = message;
|
|
9
|
-
Assert(ApplySettingsSchema, payload);
|
|
10
|
-
const params = {
|
|
11
|
-
...payload,
|
|
12
|
-
_passphrase_source: payload.passphrase_source
|
|
13
|
-
};
|
|
14
|
-
super(message, params);
|
|
15
|
-
this.useDeviceState = false;
|
|
16
|
-
this.skipFinalReload = false;
|
|
17
|
-
}
|
|
18
|
-
get requiredPermissions() {
|
|
19
|
-
return ['management'];
|
|
20
|
-
}
|
|
21
|
-
init() {}
|
|
22
|
-
get confirmation() {
|
|
23
|
-
return {
|
|
24
|
-
view: 'device-management',
|
|
25
|
-
customConfirmButton: {
|
|
26
|
-
className: 'confirm',
|
|
27
|
-
label: 'Proceed'
|
|
28
|
-
},
|
|
29
|
-
label: 'Do you really want to change device settings?'
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
async run() {
|
|
33
|
-
const device = this.getDevice();
|
|
34
|
-
const cmd = device.getCommands();
|
|
35
|
-
const homescreenBytes = this.params.homescreen ? Buffer.from(this.params.homescreen, 'hex') : undefined;
|
|
36
|
-
if (device.atLeast('2.9.0') && homescreenBytes) {
|
|
37
|
-
this.params.homescreen = undefined;
|
|
38
|
-
this.params.homescreen_length = homescreenBytes.length;
|
|
39
|
-
}
|
|
40
|
-
if (homescreenBytes !== undefined) {
|
|
41
|
-
device.startPiggybackAck();
|
|
42
|
-
}
|
|
43
|
-
let response = await cmd.typedCall('ApplySettings', ['DataChunkRequest', 'Success'], this.params);
|
|
44
|
-
while (response.type !== 'Success') {
|
|
45
|
-
const start = response.message.data_offset;
|
|
46
|
-
const end = start + response.message.data_length;
|
|
47
|
-
const data_chunk = homescreenBytes?.subarray(start, end).toString('hex') || '';
|
|
48
|
-
response = await cmd.typedCall('DataChunkAck', ['DataChunkRequest', 'Success'], {
|
|
49
|
-
data_chunk
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
await device.stopPiggybackAck();
|
|
53
|
-
return response.message;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { MethodPermission } from '@trezor/connect-common';
|
|
2
|
-
import { AuthenticateDeviceParams } from '@trezor/device-authenticity';
|
|
3
|
-
import type { MethodMessage } from '../core/AbstractMethod';
|
|
4
|
-
import { AbstractMethod } from '../core/AbstractMethod';
|
|
5
|
-
export default class AuthenticateDevice extends AbstractMethod<'authenticateDevice', AuthenticateDeviceParams> {
|
|
6
|
-
constructor(message: MethodMessage<'authenticateDevice'>);
|
|
7
|
-
get requiredPermissions(): MethodPermission[];
|
|
8
|
-
run(): Promise<import("@trezor/device-authenticity/libESM/types").ResultsToValidate>;
|
|
9
|
-
}
|