@trezor/connect 10.0.0-beta.1 → 10.0.0-beta.2
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 +56 -9
- package/README.md +4 -2
- package/lib/exports.d.ts +1 -3
- package/lib/exports.js +1 -3
- package/lib/impl/core-in-module-native.d.ts +7 -0
- package/lib/impl/core-in-module-native.js +11 -0
- package/lib/impl/core-in-module-node.d.ts +8 -0
- package/lib/impl/core-in-module-node.js +12 -0
- package/lib/impl/core-in-module-web.d.ts +9 -0
- package/lib/impl/core-in-module-web.js +26 -0
- package/lib/index.browser.js +2 -26
- package/lib/index.js +1 -11
- package/lib/index.native.d.ts +4 -0
- package/lib/index.native.js +5 -0
- package/package.json +16 -67
- package/lib/api/applyFlags.d.ts +0 -20
- package/lib/api/applyFlags.js +0 -38
- package/lib/api/applySettings.d.ts +0 -20
- package/lib/api/applySettings.js +0 -57
- package/lib/api/authenticateDevice.d.ts +0 -25
- package/lib/api/authenticateDevice.js +0 -195
- package/lib/api/authorizeCoinjoin.d.ts +0 -11
- package/lib/api/authorizeCoinjoin.js +0 -44
- package/lib/api/backupDevice.d.ts +0 -19
- package/lib/api/backupDevice.js +0 -39
- package/lib/api/bitcoin/TransactionComposer.d.ts +0 -46
- package/lib/api/bitcoin/TransactionComposer.js +0 -147
- package/lib/api/bitcoin/createPendingTx.d.ts +0 -37
- package/lib/api/bitcoin/createPendingTx.js +0 -55
- package/lib/api/bitcoin/enhanceSignTx.d.ts +0 -2
- package/lib/api/bitcoin/enhanceSignTx.js +0 -23
- package/lib/api/bitcoin/index.d.ts +0 -9
- package/lib/api/bitcoin/index.js +0 -9
- package/lib/api/bitcoin/inputs.d.ts +0 -4
- package/lib/api/bitcoin/inputs.js +0 -63
- package/lib/api/bitcoin/outputs.d.ts +0 -5
- package/lib/api/bitcoin/outputs.js +0 -128
- package/lib/api/bitcoin/refTx.d.ts +0 -23
- package/lib/api/bitcoin/refTx.js +0 -249
- package/lib/api/bitcoin/signtx.d.ts +0 -30
- package/lib/api/bitcoin/signtx.js +0 -229
- package/lib/api/bitcoin/signtxLegacy.d.ts +0 -10
- package/lib/api/bitcoin/signtxLegacy.js +0 -186
- package/lib/api/bitcoin/signtxVerify.d.ts +0 -12
- package/lib/api/bitcoin/signtxVerify.js +0 -95
- package/lib/api/bitcoin/transactionBytes.d.ts +0 -3
- package/lib/api/bitcoin/transactionBytes.js +0 -65
- package/lib/api/bleUnpair.d.ts +0 -11
- package/lib/api/bleUnpair.js +0 -37
- package/lib/api/blockchainDisconnect.d.ts +0 -16
- package/lib/api/blockchainDisconnect.js +0 -37
- package/lib/api/blockchainEstimateFee.d.ts +0 -16
- package/lib/api/blockchainEstimateFee.js +0 -102
- package/lib/api/blockchainEvmRpcCall.d.ts +0 -19
- package/lib/api/blockchainEvmRpcCall.js +0 -57
- package/lib/api/blockchainGetAccountBalanceHistory.d.ts +0 -16
- package/lib/api/blockchainGetAccountBalanceHistory.js +0 -60
- package/lib/api/blockchainGetContractInfo.d.ts +0 -16
- package/lib/api/blockchainGetContractInfo.js +0 -46
- package/lib/api/blockchainGetCurrentFiatRates.d.ts +0 -20
- package/lib/api/blockchainGetCurrentFiatRates.js +0 -49
- package/lib/api/blockchainGetFiatRatesForTimestamps.d.ts +0 -23
- package/lib/api/blockchainGetFiatRatesForTimestamps.js +0 -55
- package/lib/api/blockchainGetInfo.d.ts +0 -15
- package/lib/api/blockchainGetInfo.js +0 -37
- package/lib/api/blockchainGetTransactions.d.ts +0 -18
- package/lib/api/blockchainGetTransactions.js +0 -47
- package/lib/api/blockchainSetCustomBackend.d.ts +0 -17
- package/lib/api/blockchainSetCustomBackend.js +0 -43
- package/lib/api/blockchainSubscribe.d.ts +0 -19
- package/lib/api/blockchainSubscribe.js +0 -66
- package/lib/api/blockchainSubscribeFiatRates.d.ts +0 -19
- package/lib/api/blockchainSubscribeFiatRates.js +0 -43
- package/lib/api/blockchainUnsubscribe.d.ts +0 -19
- package/lib/api/blockchainUnsubscribe.js +0 -66
- package/lib/api/blockchainUnsubscribeFiatRates.d.ts +0 -17
- package/lib/api/blockchainUnsubscribeFiatRates.js +0 -37
- package/lib/api/blockchainValidateEvmRpcUrl.d.ts +0 -17
- package/lib/api/blockchainValidateEvmRpcUrl.js +0 -54
- package/lib/api/cancelCoinjoinAuthorization.d.ts +0 -11
- package/lib/api/cancelCoinjoinAuthorization.js +0 -33
- package/lib/api/cardano/api/cardanoComposeTransaction.d.ts +0 -10
- package/lib/api/cardano/api/cardanoComposeTransaction.js +0 -84
- package/lib/api/cardano/api/cardanoGetAddress.d.ts +0 -34
- package/lib/api/cardano/api/cardanoGetAddress.js +0 -130
- package/lib/api/cardano/api/cardanoGetNativeScriptHash.d.ts +0 -12
- package/lib/api/cardano/api/cardanoGetNativeScriptHash.js +0 -66
- package/lib/api/cardano/api/cardanoGetPublicKey.d.ts +0 -22
- package/lib/api/cardano/api/cardanoGetPublicKey.js +0 -92
- package/lib/api/cardano/api/cardanoSignMessage.d.ts +0 -22
- package/lib/api/cardano/api/cardanoSignMessage.js +0 -90
- package/lib/api/cardano/api/cardanoSignTransaction.d.ts +0 -81
- package/lib/api/cardano/api/cardanoSignTransaction.js +0 -301
- package/lib/api/cardano/api/index.d.ts +0 -6
- package/lib/api/cardano/api/index.js +0 -6
- package/lib/api/cardano/cardanoAddressParameters.d.ts +0 -6
- package/lib/api/cardano/cardanoAddressParameters.js +0 -79
- package/lib/api/cardano/cardanoAuxiliaryData.d.ts +0 -4
- package/lib/api/cardano/cardanoAuxiliaryData.js +0 -74
- package/lib/api/cardano/cardanoCertificate.d.ts +0 -13
- package/lib/api/cardano/cardanoCertificate.js +0 -142
- package/lib/api/cardano/cardanoInputs.d.ts +0 -25
- package/lib/api/cardano/cardanoInputs.js +0 -39
- package/lib/api/cardano/cardanoOutputs.d.ts +0 -40
- package/lib/api/cardano/cardanoOutputs.js +0 -70
- package/lib/api/cardano/cardanoTokenBundle.d.ts +0 -12
- package/lib/api/cardano/cardanoTokenBundle.js +0 -21
- package/lib/api/cardano/cardanoUtils.d.ts +0 -17
- package/lib/api/cardano/cardanoUtils.js +0 -100
- package/lib/api/cardano/cardanoWitnesses.d.ts +0 -4
- package/lib/api/cardano/cardanoWitnesses.js +0 -47
- package/lib/api/changeLanguage.d.ts +0 -18
- package/lib/api/changeLanguage.js +0 -49
- package/lib/api/changePin.d.ts +0 -11
- package/lib/api/changePin.js +0 -27
- package/lib/api/changeWipeCode.d.ts +0 -11
- package/lib/api/changeWipeCode.js +0 -29
- package/lib/api/cipherKeyValue.d.ts +0 -17
- package/lib/api/cipherKeyValue.js +0 -58
- package/lib/api/common/AbstractMiscGetAddress.d.ts +0 -37
- package/lib/api/common/AbstractMiscGetAddress.js +0 -126
- package/lib/api/common/Discovery.d.ts +0 -33
- package/lib/api/common/Discovery.js +0 -119
- package/lib/api/common/paramsValidator.d.ts +0 -24
- package/lib/api/common/paramsValidator.js +0 -136
- package/lib/api/common/requestExistingAccounts.d.ts +0 -14
- package/lib/api/common/requestExistingAccounts.js +0 -20
- package/lib/api/composeTransaction.d.ts +0 -36
- package/lib/api/composeTransaction.js +0 -404
- package/lib/api/discoverAccounts.d.ts +0 -40
- package/lib/api/discoverAccounts.js +0 -360
- package/lib/api/ethereum/api/ethereumGetAddress.d.ts +0 -30
- package/lib/api/ethereum/api/ethereumGetAddress.js +0 -150
- package/lib/api/ethereum/api/ethereumGetPublicKey.d.ts +0 -52
- package/lib/api/ethereum/api/ethereumGetPublicKey.js +0 -100
- package/lib/api/ethereum/api/ethereumSignMessage.d.ts +0 -27
- package/lib/api/ethereum/api/ethereumSignMessage.js +0 -64
- package/lib/api/ethereum/api/ethereumSignTransaction.d.ts +0 -83
- package/lib/api/ethereum/api/ethereumSignTransaction.js +0 -148
- package/lib/api/ethereum/api/ethereumSignTypedData.d.ts +0 -117
- package/lib/api/ethereum/api/ethereumSignTypedData.js +0 -203
- package/lib/api/ethereum/api/ethereumVerifyMessage.d.ts +0 -12
- package/lib/api/ethereum/api/ethereumVerifyMessage.js +0 -35
- package/lib/api/ethereum/api/index.d.ts +0 -6
- package/lib/api/ethereum/api/index.js +0 -6
- package/lib/api/ethereum/ethereumDefinitions.d.ts +0 -53
- package/lib/api/ethereum/ethereumDefinitions.js +0 -135
- package/lib/api/ethereum/ethereumSignTx.d.ts +0 -16
- package/lib/api/ethereum/ethereumSignTx.js +0 -144
- package/lib/api/ethereum/ethereumSignTypedData.d.ts +0 -32
- package/lib/api/ethereum/ethereumSignTypedData.js +0 -175
- package/lib/api/evoluGetDelegatedIdentityKey.d.ts +0 -14
- package/lib/api/evoluGetDelegatedIdentityKey.js +0 -29
- package/lib/api/evoluGetNode.d.ts +0 -13
- package/lib/api/evoluGetNode.js +0 -29
- package/lib/api/evoluSignRegistrationRequest.d.ts +0 -16
- package/lib/api/evoluSignRegistrationRequest.js +0 -33
- package/lib/api/firmware/calculateFirmwareHash.d.ts +0 -18
- package/lib/api/firmware/calculateFirmwareHash.js +0 -56
- package/lib/api/firmware/calculateXPubHash.d.ts +0 -14
- package/lib/api/firmware/calculateXPubHash.js +0 -16
- package/lib/api/firmware/getBinary.d.ts +0 -14
- package/lib/api/firmware/getBinary.js +0 -33
- package/lib/api/firmware/index.d.ts +0 -6
- package/lib/api/firmware/index.js +0 -6
- package/lib/api/firmware/modifyFirmware.d.ts +0 -3
- package/lib/api/firmware/modifyFirmware.js +0 -13
- package/lib/api/firmware/parseFirmwareHeaders.d.ts +0 -4
- package/lib/api/firmware/parseFirmwareHeaders.js +0 -26
- package/lib/api/firmware/uploadFirmware.d.ts +0 -27
- package/lib/api/firmware/uploadFirmware.js +0 -99
- package/lib/api/firmware/verifyEntropy.d.ts +0 -25
- package/lib/api/firmware/verifyEntropy.js +0 -110
- package/lib/api/getAccountInfo.d.ts +0 -21
- package/lib/api/getAccountInfo.js +0 -253
- package/lib/api/getAddress.d.ts +0 -45
- package/lib/api/getAddress.js +0 -153
- package/lib/api/getCoinInfo.d.ts +0 -148
- package/lib/api/getCoinInfo.js +0 -25
- package/lib/api/getDeviceState.d.ts +0 -8
- package/lib/api/getDeviceState.js +0 -18
- package/lib/api/getFeatures.d.ts +0 -71
- package/lib/api/getFeatures.js +0 -22
- package/lib/api/getFirmwareHash.d.ts +0 -11
- package/lib/api/getFirmwareHash.js +0 -29
- package/lib/api/getNonce.d.ts +0 -10
- package/lib/api/getNonce.js +0 -18
- package/lib/api/getOwnershipId.d.ts +0 -17
- package/lib/api/getOwnershipId.js +0 -88
- package/lib/api/getOwnershipProof.d.ts +0 -17
- package/lib/api/getOwnershipProof.js +0 -95
- package/lib/api/getPublicKey.d.ts +0 -54
- package/lib/api/getPublicKey.js +0 -106
- package/lib/api/getSettings.d.ts +0 -24
- package/lib/api/getSettings.js +0 -21
- package/lib/api/index.d.ts +0 -62
- package/lib/api/index.js +0 -62
- package/lib/api/loadDevice.d.ts +0 -16
- package/lib/api/loadDevice.js +0 -46
- package/lib/api/monero/api/index.d.ts +0 -4
- package/lib/api/monero/api/index.js +0 -4
- package/lib/api/monero/api/moneroGetAddress.d.ts +0 -32
- package/lib/api/monero/api/moneroGetAddress.js +0 -117
- package/lib/api/monero/api/moneroGetWatchKey.d.ts +0 -14
- package/lib/api/monero/api/moneroGetWatchKey.js +0 -45
- package/lib/api/monero/api/moneroKeyImageSync.d.ts +0 -17
- package/lib/api/monero/api/moneroKeyImageSync.js +0 -128
- package/lib/api/monero/api/moneroSignTransaction.d.ts +0 -17
- package/lib/api/monero/api/moneroSignTransaction.js +0 -218
- package/lib/api/nostr/nostrGetPublicKey.d.ts +0 -15
- package/lib/api/nostr/nostrGetPublicKey.js +0 -38
- package/lib/api/nostr/nostrSignEvent.d.ts +0 -13
- package/lib/api/nostr/nostrSignEvent.js +0 -36
- package/lib/api/pingDevice.d.ts +0 -11
- package/lib/api/pingDevice.js +0 -29
- package/lib/api/pushTransaction.d.ts +0 -19
- package/lib/api/pushTransaction.js +0 -39
- package/lib/api/recoveryDevice.d.ts +0 -20
- package/lib/api/recoveryDevice.js +0 -52
- package/lib/api/requestLogin.d.ts +0 -14
- package/lib/api/requestLogin.js +0 -53
- package/lib/api/resetDevice.d.ts +0 -22
- package/lib/api/resetDevice.js +0 -133
- package/lib/api/ripple/api/index.d.ts +0 -2
- package/lib/api/ripple/api/index.js +0 -2
- package/lib/api/ripple/api/rippleGetAddress.d.ts +0 -17
- package/lib/api/ripple/api/rippleGetAddress.js +0 -22
- package/lib/api/ripple/api/rippleSignTransaction.d.ts +0 -13
- package/lib/api/ripple/api/rippleSignTransaction.js +0 -52
- package/lib/api/selectAccount.d.ts +0 -15
- package/lib/api/selectAccount.js +0 -42
- package/lib/api/setBrightness.d.ts +0 -12
- package/lib/api/setBrightness.js +0 -28
- package/lib/api/setBusy.d.ts +0 -11
- package/lib/api/setBusy.js +0 -31
- package/lib/api/showDeviceTutorial.d.ts +0 -11
- package/lib/api/showDeviceTutorial.js +0 -21
- package/lib/api/signMessage.d.ts +0 -25
- package/lib/api/signMessage.js +0 -75
- package/lib/api/signTransaction.d.ts +0 -199
- package/lib/api/signTransaction.js +0 -331
- package/lib/api/solana/api/index.d.ts +0 -4
- package/lib/api/solana/api/index.js +0 -4
- package/lib/api/solana/api/solanaComposeTransaction.d.ts +0 -33
- package/lib/api/solana/api/solanaComposeTransaction.js +0 -73
- package/lib/api/solana/api/solanaGetAddress.d.ts +0 -17
- package/lib/api/solana/api/solanaGetAddress.js +0 -22
- package/lib/api/solana/api/solanaGetPublicKey.d.ts +0 -32
- package/lib/api/solana/api/solanaGetPublicKey.js +0 -86
- package/lib/api/solana/api/solanaSignTransaction.d.ts +0 -41
- package/lib/api/solana/api/solanaSignTransaction.js +0 -204
- package/lib/api/solana/solanaDefinitions.d.ts +0 -9
- package/lib/api/solana/solanaDefinitions.js +0 -33
- package/lib/api/stellar/api/index.d.ts +0 -2
- package/lib/api/stellar/api/index.js +0 -2
- package/lib/api/stellar/api/stellarGetAddress.d.ts +0 -17
- package/lib/api/stellar/api/stellarGetAddress.js +0 -22
- package/lib/api/stellar/api/stellarSignTransaction.d.ts +0 -20
- package/lib/api/stellar/api/stellarSignTransaction.js +0 -65
- package/lib/api/stellar/stellarSignTx.d.ts +0 -7
- package/lib/api/stellar/stellarSignTx.js +0 -183
- package/lib/api/telemetryGet.d.ts +0 -14
- package/lib/api/telemetryGet.js +0 -26
- package/lib/api/tezos/api/index.d.ts +0 -3
- package/lib/api/tezos/api/index.js +0 -3
- package/lib/api/tezos/api/tezosGetAddress.d.ts +0 -17
- package/lib/api/tezos/api/tezosGetAddress.js +0 -22
- package/lib/api/tezos/api/tezosGetPublicKey.d.ts +0 -28
- package/lib/api/tezos/api/tezosGetPublicKey.js +0 -84
- package/lib/api/tezos/api/tezosSignTransaction.d.ts +0 -14
- package/lib/api/tezos/api/tezosSignTransaction.js +0 -30
- package/lib/api/tezos/tezosSignTx.d.ts +0 -71
- package/lib/api/tezos/tezosSignTx.js +0 -204
- package/lib/api/thpGetCredentials.d.ts +0 -13
- package/lib/api/thpGetCredentials.js +0 -30
- package/lib/api/thpRemoveCredentials.d.ts +0 -15
- package/lib/api/thpRemoveCredentials.js +0 -44
- package/lib/api/tron/api/index.d.ts +0 -3
- package/lib/api/tron/api/index.js +0 -3
- package/lib/api/tron/api/tronComposeTransaction.d.ts +0 -17
- package/lib/api/tron/api/tronComposeTransaction.js +0 -52
- package/lib/api/tron/api/tronGetAddress.d.ts +0 -17
- package/lib/api/tron/api/tronGetAddress.js +0 -22
- package/lib/api/tron/api/tronSignTransaction.d.ts +0 -20
- package/lib/api/tron/api/tronSignTransaction.js +0 -137
- package/lib/api/tron/tronEncode.d.ts +0 -11
- package/lib/api/tron/tronEncode.js +0 -157
- package/lib/api/tron/tronProtobuf.d.ts +0 -5
- package/lib/api/tron/tronProtobuf.js +0 -28
- package/lib/api/unlockPath.d.ts +0 -12
- package/lib/api/unlockPath.js +0 -33
- package/lib/api/verifyMessage.d.ts +0 -16
- package/lib/api/verifyMessage.js +0 -46
- package/lib/api/wipeDevice.d.ts +0 -21
- package/lib/api/wipeDevice.js +0 -49
- package/lib/backend/BackendManager.d.ts +0 -30
- package/lib/backend/BackendManager.js +0 -145
- package/lib/backend/Blockchain.d.ts +0 -81
- package/lib/backend/Blockchain.js +0 -235
- package/lib/backend/BlockchainLink.d.ts +0 -10
- package/lib/backend/BlockchainLink.js +0 -19
- package/lib/backend/fees/BitcoinFeeLevels.d.ts +0 -19
- package/lib/backend/fees/BitcoinFeeLevels.js +0 -44
- package/lib/backend/fees/EthereumFeeLevels.d.ts +0 -17
- package/lib/backend/fees/EthereumFeeLevels.js +0 -63
- package/lib/backend/fees/MiscFeeLevels.d.ts +0 -18
- package/lib/backend/fees/MiscFeeLevels.js +0 -30
- package/lib/backend/fees/index.d.ts +0 -5
- package/lib/backend/fees/index.js +0 -31
- package/lib/core/AbstractMethod.d.ts +0 -63
- package/lib/core/AbstractMethod.js +0 -189
- package/lib/core/index.d.ts +0 -29
- package/lib/core/index.js +0 -805
- package/lib/core/method.d.ts +0 -3
- package/lib/core/method.js +0 -19
- package/lib/core/method.native.d.ts +0 -2
- package/lib/core/method.native.js +0 -29
- package/lib/core/onCallFirmwareUpdate.d.ts +0 -42
- package/lib/core/onCallFirmwareUpdate.js +0 -436
- package/lib/data/coinInfo.d.ts +0 -101
- package/lib/data/coinInfo.js +0 -195
- package/lib/data/config.d.ts +0 -8
- package/lib/data/config.js +0 -273
- package/lib/data/defaultFeeLevels.d.ts +0 -18
- package/lib/data/defaultFeeLevels.js +0 -200
- package/lib/data/enabledNetworksStore.d.ts +0 -5
- package/lib/data/enabledNetworksStore.js +0 -20
- package/lib/data/firmwareInfo.d.ts +0 -55
- package/lib/data/firmwareInfo.js +0 -413
- package/lib/data/firmwareReleaseStore.d.ts +0 -10
- package/lib/data/firmwareReleaseStore.js +0 -16
- package/lib/data/localFirmwareStore.d.ts +0 -3
- package/lib/data/localFirmwareStore.js +0 -8
- package/lib/data/protobufLoader.d.ts +0 -1
- package/lib/data/protobufLoader.js +0 -30
- package/lib/data/settingsStore.d.ts +0 -6
- package/lib/data/settingsStore.js +0 -21
- package/lib/device/Device.d.ts +0 -259
- package/lib/device/Device.js +0 -765
- package/lib/device/DeviceCommands.d.ts +0 -87
- package/lib/device/DeviceCommands.js +0 -248
- package/lib/device/DeviceCurrentSession.d.ts +0 -750
- package/lib/device/DeviceCurrentSession.js +0 -239
- package/lib/device/DeviceList.d.ts +0 -75
- package/lib/device/DeviceList.js +0 -243
- package/lib/device/TransportList.d.ts +0 -3
- package/lib/device/TransportList.js +0 -13
- package/lib/device/TransportManager.d.ts +0 -33
- package/lib/device/TransportManager.js +0 -144
- package/lib/device/calculateRevisionForDevice.d.ts +0 -10
- package/lib/device/calculateRevisionForDevice.js +0 -19
- package/lib/device/checkFirmwareRevision.d.ts +0 -22
- package/lib/device/checkFirmwareRevision.js +0 -104
- package/lib/device/resolveDescriptorForTaproot.d.ts +0 -17
- package/lib/device/resolveDescriptorForTaproot.js +0 -27
- package/lib/device/thp/handshake.d.ts +0 -3
- package/lib/device/thp/handshake.js +0 -100
- package/lib/device/thp/index.d.ts +0 -5
- package/lib/device/thp/index.js +0 -65
- package/lib/device/thp/pairing.d.ts +0 -16
- package/lib/device/thp/pairing.js +0 -242
- package/lib/device/thp/session.d.ts +0 -2
- package/lib/device/thp/session.js +0 -27
- package/lib/device/thp/thpCall.d.ts +0 -31
- package/lib/device/thp/thpCall.js +0 -58
- package/lib/device/validateMessageSize.d.ts +0 -2
- package/lib/device/validateMessageSize.js +0 -9
- package/lib/device/workflow/changeLanguage.d.ts +0 -18
- package/lib/device/workflow/changeLanguage.js +0 -62
- package/lib/device/workflow/checkFirmwareHash.d.ts +0 -12
- package/lib/device/workflow/checkFirmwareHash.js +0 -86
- package/lib/device/workflow/checkFirmwareHashWithRetries.d.ts +0 -8
- package/lib/device/workflow/checkFirmwareHashWithRetries.js +0 -36
- package/lib/device/workflow/handshake.d.ts +0 -13
- package/lib/device/workflow/handshake.js +0 -55
- package/lib/device/workflow/trezorPushNotification.d.ts +0 -5
- package/lib/device/workflow/trezorPushNotification.js +0 -73
- package/lib/device/workflow/validateState.d.ts +0 -2
- package/lib/device/workflow/validateState.js +0 -152
- package/lib/events/ui-promise.d.ts +0 -20
- package/lib/events/ui-promise.js +0 -1
- package/lib/impl/core-in-module.d.ts +0 -33
- package/lib/impl/core-in-module.js +0 -194
- package/lib/types/idevice.d.ts +0 -110
- package/lib/types/idevice.js +0 -1
- package/lib/types/typed-call-provider.d.ts +0 -29
- package/lib/types/typed-call-provider.js +0 -1
- package/lib/types/workflow.d.ts +0 -16
- package/lib/types/workflow.js +0 -1
- package/lib/utils/accountUtils.d.ts +0 -10
- package/lib/utils/accountUtils.js +0 -90
- package/lib/utils/addressUtils.d.ts +0 -2
- package/lib/utils/addressUtils.js +0 -24
- package/lib/utils/assetUtils.d.ts +0 -13
- package/lib/utils/assetUtils.js +0 -55
- package/lib/utils/assets.browser.d.ts +0 -1
- package/lib/utils/assets.browser.js +0 -1
- package/lib/utils/assets.d.ts +0 -2
- package/lib/utils/assets.js +0 -13
- package/lib/utils/assets.native.d.ts +0 -2
- package/lib/utils/assets.native.js +0 -23
- package/lib/utils/assetsTypes.d.ts +0 -5
- package/lib/utils/assetsTypes.js +0 -1
- package/lib/utils/buildOutputDescriptor.d.ts +0 -20
- package/lib/utils/buildOutputDescriptor.js +0 -67
- package/lib/utils/deviceFeaturesUtils.d.ts +0 -7
- package/lib/utils/deviceFeaturesUtils.js +0 -109
- package/lib/utils/ethereumUtils.d.ts +0 -3
- package/lib/utils/ethereumUtils.js +0 -7
- package/lib/utils/firmwareReleaseConfigUtils.d.ts +0 -19
- package/lib/utils/firmwareReleaseConfigUtils.js +0 -131
- package/lib/utils/firmwareUtils.d.ts +0 -15
- package/lib/utils/firmwareUtils.js +0 -57
- package/lib/utils/formatUtils.d.ts +0 -13
- package/lib/utils/formatUtils.js +0 -45
- package/lib/utils/hdnodeUtils.d.ts +0 -6
- package/lib/utils/hdnodeUtils.js +0 -62
- package/lib/utils/pathUtils.d.ts +0 -1
- package/lib/utils/pathUtils.js +0 -1
- package/lib/utils/paymentRequest.d.ts +0 -8
- package/lib/utils/paymentRequest.js +0 -25
- package/lib/utils/uiPromiseManager.d.ts +0 -8
- package/lib/utils/uiPromiseManager.js +0 -51
- package/lib/workers/workers.browser.d.ts +0 -10
- package/lib/workers/workers.browser.js +0 -16
- package/lib/workers/workers.d.ts +0 -10
- package/lib/workers/workers.js +0 -8
- package/lib/workers/workers.native.d.ts +0 -7
- package/lib/workers/workers.native.js +0 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,20 +1,67 @@
|
|
|
1
1
|
> **Upgrading from Connect 9?**
|
|
2
2
|
>
|
|
3
|
-
> - [Migration guide: Connect 9 → 10](https://connect.trezor.io/10.0.0-beta.
|
|
4
|
-
> - [New Connect flow in Trezor Suite](https://connect.trezor.io/10.0.0-beta.
|
|
3
|
+
> - [Migration guide: Connect 9 → 10](https://connect.trezor.io/10.0.0-beta.2/guides/migrating-to-connect-10) — what you need to change in your code, as a checklist.
|
|
4
|
+
> - [New Connect flow in Trezor Suite](https://connect.trezor.io/10.0.0-beta.2/guides/new-connect-flow-in-trezor-suite) — how the Suite-hosted flow works and why.
|
|
5
5
|
|
|
6
6
|
| Package | Stable | Canary |
|
|
7
7
|
| :------------------------------: | :----: | :-----------: |
|
|
8
|
-
| npm @trezor/connect |
|
|
9
|
-
| npm @trezor/connect-web |
|
|
10
|
-
| npm @trezor/connect-webextension |
|
|
11
|
-
| npm @trezor/connect-mobile |
|
|
8
|
+
| npm @trezor/connect | 9.7.3 | 10.0.0-beta.2 |
|
|
9
|
+
| npm @trezor/connect-web | 9.7.3 | 10.0.0-beta.2 |
|
|
10
|
+
| npm @trezor/connect-webextension | 9.7.3 | 10.0.0-beta.2 |
|
|
11
|
+
| npm @trezor/connect-mobile | 9.7.3 | 10.0.0-beta.2 |
|
|
12
12
|
|
|
13
13
|
| Deployment | Stable | Canary |
|
|
14
14
|
| :----------------: | :----: | :-----------: |
|
|
15
|
-
| connect.trezor.io/ |
|
|
16
|
-
|
|
17
|
-
Connect 10 has no stable release yet — use [connect.trezor.io/10.0.0-beta.
|
|
15
|
+
| connect.trezor.io/ | 9.7.3 | 10.0.0-beta.2 |
|
|
16
|
+
|
|
17
|
+
Connect 10 has no stable release yet — use [connect.trezor.io/10.0.0-beta.2](https://connect.trezor.io/10.0.0-beta.2/) to access the prerelease version of Connect Explorer. Once Connect 10 is released, the persistent link [connect.trezor.io/10](https://connect.trezor.io/10/) will point to the latest stable version.
|
|
18
|
+
|
|
19
|
+
# 10.0.0-beta.2
|
|
20
|
+
|
|
21
|
+
An incremental prerelease on top of beta.1. It adds a handful of new methods (`sendTransaction`, `composePsbt`, `solanaSignMessage`), EIP-7702 and Stellar Soroban signing, and a Node entry point for `@trezor/connect` built on `@trezor/connect-core`, plus a batch of coin/backend fixes. It also carries several breaking changes — mostly to the UI-event and fee-selection channels used by custom-UI / host integrations, and to a couple of public method/result shapes — so read **Breaking since beta.1** before upgrading.
|
|
22
|
+
|
|
23
|
+
## New & improved
|
|
24
|
+
|
|
25
|
+
- **`sendTransaction`** — new Bitcoin method that composes, signs and (optionally, `push`) broadcasts a transaction in one call. This is the replacement for `composeTransaction`'s old signing overload (see Breaking). (919967d6a43)
|
|
26
|
+
- **`composePsbt`** — new device-less method that composes a Bitcoin transaction from PSBT data plus account addresses/UTXOs, returning a precomposed result with `version` and `locktime` (no permissions required). (019eada6052)
|
|
27
|
+
- **`solanaSignMessage`** — new method to sign Solana off-chain messages (OCMS v1): plain text plus optional signer public keys, with the device serializing the envelope. (1611924b04b)
|
|
28
|
+
- **EIP-7702 signing.** `ethereumSignTransaction` now signs EIP-7702 set-code (type-4) transactions — pass `authorizationList` on an EIP-1559 transaction, and the parsed `authorizationList` is returned on the result. (6aeeda9b667)
|
|
29
|
+
- **Stellar Soroban.** `stellarSignTransaction` now supports the `InvokeHostFunction` operation (auth entries, `SorobanTransactionData` extension, full sint64 nonce precision), gated on firmware 2.12.4. (ea9b52e4402)
|
|
30
|
+
- **Node entry point.** `@trezor/connect` now ships a Node build (on top of `@trezor/connect-core`) that injects Bridge and NodeUSB transports by default, so a Node consumer can install only `@trezor/connect` and talk to a device over bridge or USB. Browser (`[bridge, WebUSB]`) and react-native (`[bridge]`) defaults are unchanged. (ce5690f82a7)
|
|
31
|
+
- **`FIRMWARE_TYPE_CHANGED`** — new UI event (payload `{ device }`) emitted during a firmware update when the installed firmware type changes. (c2e11a9572b)
|
|
32
|
+
- `signMessage` accepts an optional `scriptType` param that overrides the script type inferred from the derivation path (e.g. for custom purpose-45 paths). (390fdd4c819)
|
|
33
|
+
- `getAccountInfo` and `discoverAccounts` now accept index-less **root** derivation paths (min path length 2) for single-account coin types, e.g. the Solana root path. (31fe1d9f725)
|
|
34
|
+
- `getAccountInfo` and `blockchainEstimateFee` accept a new optional `privatePending` param (in-flight nonces/txids) for EVM blockbook discovery. (754da40740d)
|
|
35
|
+
- `@trezor/connect-common` now exports `GRANTABLE_PERMISSIONS`, the canonical allowlist of upfront-grantable permission scopes for building `requestedPermissions` UIs. (5a8804c06f9)
|
|
36
|
+
- New `test-unsigned-nightly` value on the public `FirmwareChannel` type (a nightly/dev release channel). (fe1eb6ac0ed)
|
|
37
|
+
|
|
38
|
+
## Behavior & fixes
|
|
39
|
+
|
|
40
|
+
- **Named EVM inputs resolve to hex.** `getAccountInfo` now returns the backend-resolved hex address in `descriptor` for named EVM inputs (e.g. `.eth`), instead of echoing the name back. (de776b8cc76)
|
|
41
|
+
- **Pending BTC tx size.** The optimistic pending Bitcoin transaction now reports `size` in bytes (`byteLength`) instead of weight units (~4×), matching blockbook's byte-valued `size`. (2ec843049c0)
|
|
42
|
+
- **EVM slip44.** `getCoinInfo` now returns `slip44: 60` for every EVM network except ETC (61), rather than per-chain registry values — e.g. RHC and HYPE change from 4663/999 to 60. (8c4cbf2bf44)
|
|
43
|
+
- **`selectAccount` unsupported coins.** A Connect-valid but Suite-unmodeled coin (dash, dgb, xtz, testnets, …) is now rejected up front with the distinct `Method_UnsupportedCoinForHost` error instead of a generic modal. (2877a16d71d)
|
|
44
|
+
- **Manifest name sanitizing.** `manifest.appName` (and THP `hostName`) are sanitized — control chars stripped, whitespace runs collapsed, trimmed; a name that becomes empty is rejected. `appName` is also now strictly required at manifest parse (as beta.1 announced). (c6a11d3a93b, fe8e15c7fe7)
|
|
45
|
+
- **Solana.** `solanaSignTransaction` no longer fails precompose for transactions using address lookup tables (467c4002c3f), and rejects unsupported v1 transactions upfront with `Method_InvalidParameter` (d24fa8a5d8c). `solanaComposeTransaction` now returns token metadata (`newAccountProgramName`, `tokenAccountInfo`) in `additionalInfo` for pre-serialized token transfers, fixing Solana token trades. (bb7502fedc8)
|
|
46
|
+
- **Backend reconnect back-off.** A dropped blockchain backend no longer triggers a tight reconnect loop / Solana reconnect storm — reconnect delay is clamped to 1–20s, the attempt counter resets only after a connection holds for 30s, and back-off attempts reject with `Backend_Disconnected` rather than forcing an immediate re-sync (explicit reconnects still bypass the wait). (f02219132e6, d1fc98016c3)
|
|
47
|
+
- **TRON.** Default fee info now exposes real `minFee=1` / `maxFee=15,000,000,000` SUN instead of the `-1`/unknown placeholders (f124fe96ceb), and TRX/tTRX block notifications are throttled together with EVM at ~12s per block event (2524bc4d2ca).
|
|
48
|
+
- `ethereumSignTypedData` no longer requires the `eip712-domain-only` firmware capability for `EIP712Domain`-only payloads. (d4ead6f1780)
|
|
49
|
+
- **BTC custom-fee fallback** now composes a single transaction at the coin's `minFee` instead of scanning fees down from the top level, changing which custom fee is offered when no standard level is affordable. (7988531569c)
|
|
50
|
+
- **Firmware rollout bucketing** no longer permanently excludes the ~1% of devices that hash into the top bucket, even at 100% rollout. (3debf109035)
|
|
51
|
+
- On THP devices, the PIN matrix is now requested **before** the passphrase entry. (b2c3d73ce4c)
|
|
52
|
+
|
|
53
|
+
## Breaking since beta.1
|
|
54
|
+
|
|
55
|
+
These mostly affect **custom-UI and host (Suite-style) integrations**; a couple touch public method/result shapes.
|
|
56
|
+
|
|
57
|
+
- **`UI_EVENT` split.** The public `UI_REQUEST` constant map is split into `UI_EVENTS` (fire-and-forget notifications) and `UI_REQUESTS` (messages needing a `UI_RESPONSE`), a new `UI_REQUEST`/`UI_REQUESTS` event channel is added, and several members are renamed (e.g. `TRANSPORT`→`TRANSPORT_MISSING`, `INVALID_PIN`→`PIN_INVALID`). The event payloads were also reshaped: `requestId` was removed from `UI_EVENT` payloads (`callId` remains) and is now emitted on standalone `UI_REQUEST` payloads. Migrate `UI_REQUEST.*` references to `UI_EVENTS.*` / `UI_REQUESTS.*`. (8d5768be292, b372b090361, f26a6147e01)
|
|
58
|
+
- **`composeTransaction` is precompose-only.** Its signing/broadcast overload (`ComposeParams` → `SignedTransaction`, including `push`) is removed — migrate signing+push flows to the new `sendTransaction`. (919967d6a43)
|
|
59
|
+
- **`ethereumGetPublicKey.displayablePublicKey`** is now the hex-encoded compressed public key (byte-identical to `publicKey`, matching what firmware shows on screen) instead of the xpub. (a508e4ab6e4)
|
|
60
|
+
- **`blockchainEvmRpcGetChainId`** (formerly `blockchainValidateEvmRpcUrl` in beta.1) now takes only `{ url }` and returns `{ chainId }`, instead of validating a supplied chainId and returning `{ valid, actualChainId }`. (39fa982888d)
|
|
61
|
+
- **`SELECT_FEE` event** payload now carries `feeLevels` as `FeeLevel[]` (only composable/valid levels), and the `SelectFeeLevel` type is removed from `@trezor/connect-common`. (a300e1be087)
|
|
62
|
+
- **`RECEIVE_FEE` response** payload is restructured: use `{ type: 'select-fee', value }` and `{ type: 'select-fee-custom', value }` (replacing `'compose-custom'` / `'send'`). (eedb2fdde5f)
|
|
63
|
+
- **`UPDATE_CUSTOM_FEE` UI event removed.** The `ui-update_custom_fee` member of the `UI_REQUEST` map and its `UpdateCustomFee` type are removed from `@trezor/connect-common`; custom-UI code that listened for it should drop the handler. (4f5b240fcb0)
|
|
64
|
+
- **`KnownDevice.availableTranslations`** now maps language codes to `TranslationMetadata` objects instead of plain strings. (26f0cd334c5)
|
|
18
65
|
|
|
19
66
|
# 10.0.0-beta.1
|
|
20
67
|
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @trezor/connect
|
|
2
2
|
|
|
3
|
-
API version 10.0.0-beta.
|
|
3
|
+
API version 10.0.0-beta.2
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.org/package/@trezor/connect)
|
|
6
6
|
|
|
@@ -8,6 +8,8 @@ Trezor Connect is a platform for easy integration of Trezor into 3rd party servi
|
|
|
8
8
|
|
|
9
9
|
This package is intended to be used in node.js environment. If you wan't to build a web application please refer to [@trezor/connect-web package](https://github.com/trezor/trezor-suite/blob/develop/packages/connect-web/README.md).
|
|
10
10
|
|
|
11
|
+
It runs Connect in-process: it composes the execution engine from [@trezor/connect-core](https://github.com/trezor/trezor-suite/blob/develop/packages/connect-core/README.md) and supplies the node transports, Trezor Bridge first and direct USB (from [@trezor/transport](https://www.npmjs.com/package/@trezor/transport)) as the fallback. No extra package or transport wiring is needed; `init({ manifest })` is enough. Passing a non-empty `transports` list replaces the defaults.
|
|
12
|
+
|
|
11
13
|
> **Building a web app?** Use [@trezor/connect-web](https://www.npmjs.com/package/@trezor/connect-web) instead — it adds browser transport handling and popup-based UI.
|
|
12
14
|
>
|
|
13
15
|
> **Building a browser extension?** Use [@trezor/connect-webextension](https://www.npmjs.com/package/@trezor/connect-webextension) instead — it handles Manifest V3 and service worker constraints.
|
|
@@ -52,4 +54,4 @@ A collection of examples on how to implement @trezor/connect in various environm
|
|
|
52
54
|
|
|
53
55
|
## Tests
|
|
54
56
|
|
|
55
|
-
For integration testing against trezord and emulator refer to [this document](https://github.com/trezor/trezor-suite/blob/develop/packages/connect/e2e/README.md).
|
|
57
|
+
For integration testing against trezord and emulator refer to [this document](https://github.com/trezor/trezor-suite/blob/develop/packages/connect-core/e2e/README.md).
|
package/lib/exports.d.ts
CHANGED
package/lib/exports.js
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type UpdateConnectSettings } from '@trezor/connect-common';
|
|
2
|
+
import { CoreInModule } from '@trezor/connect-core/lib/impl/core-in-module';
|
|
3
|
+
import { type AbstractTransportParams, BridgeTransport } from '@trezor/transport-common';
|
|
4
|
+
export declare class CoreInModuleNative extends CoreInModule {
|
|
5
|
+
protected defaultTransports(params: AbstractTransportParams): BridgeTransport[];
|
|
6
|
+
protected updateProxy(proxy: UpdateConnectSettings['proxy']): Promise<void>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { updateProxy } from "@trezor/connect-core/lib/backend/BlockchainLink.js";
|
|
2
|
+
import { CoreInModule } from "@trezor/connect-core/lib/impl/core-in-module.js";
|
|
3
|
+
import { BridgeTransport } from "@trezor/transport-common";
|
|
4
|
+
export class CoreInModuleNative extends CoreInModule {
|
|
5
|
+
defaultTransports(params) {
|
|
6
|
+
return [new BridgeTransport(params)];
|
|
7
|
+
}
|
|
8
|
+
async updateProxy(proxy) {
|
|
9
|
+
await updateProxy(proxy);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type UpdateConnectSettings } from '@trezor/connect-common';
|
|
2
|
+
import { CoreInModule } from '@trezor/connect-core/lib/impl/core-in-module';
|
|
3
|
+
import { NodeUsbTransport } from '@trezor/transport';
|
|
4
|
+
import { type AbstractTransportParams, BridgeTransport } from '@trezor/transport-common';
|
|
5
|
+
export declare class CoreInModuleNode extends CoreInModule {
|
|
6
|
+
protected defaultTransports(params: AbstractTransportParams): (BridgeTransport | NodeUsbTransport)[];
|
|
7
|
+
protected updateProxy(proxy: UpdateConnectSettings['proxy']): Promise<void>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { updateProxy } from "@trezor/connect-core/lib/backend/BlockchainLink.js";
|
|
2
|
+
import { CoreInModule } from "@trezor/connect-core/lib/impl/core-in-module.js";
|
|
3
|
+
import { NodeUsbTransport } from "@trezor/transport";
|
|
4
|
+
import { BridgeTransport } from "@trezor/transport-common";
|
|
5
|
+
export class CoreInModuleNode extends CoreInModule {
|
|
6
|
+
defaultTransports(params) {
|
|
7
|
+
return [new BridgeTransport(params), new NodeUsbTransport(params)];
|
|
8
|
+
}
|
|
9
|
+
async updateProxy(proxy) {
|
|
10
|
+
await updateProxy(proxy);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type UpdateConnectSettings } from '@trezor/connect-common';
|
|
2
|
+
import { CoreInModule } from '@trezor/connect-core/lib/impl/core-in-module';
|
|
3
|
+
import { type AbstractTransportParams, BridgeTransport } from '@trezor/transport-common';
|
|
4
|
+
import { WebUsbTransport } from '@trezor/transport-web';
|
|
5
|
+
export declare class CoreInModuleWeb extends CoreInModule {
|
|
6
|
+
protected defaultTransports(params: AbstractTransportParams): (BridgeTransport | WebUsbTransport)[];
|
|
7
|
+
protected updateProxy(proxy: UpdateConnectSettings['proxy']): Promise<void>;
|
|
8
|
+
requestWebUSBDevice(): Promise<void>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ERRORS } from "@trezor/connect-common";
|
|
2
|
+
import { config } from "@trezor/connect-core/lib/data/config.js";
|
|
3
|
+
import { CoreInModule } from "@trezor/connect-core/lib/impl/core-in-module.js";
|
|
4
|
+
import { BridgeTransport, TRANSPORT } from "@trezor/transport-common";
|
|
5
|
+
import { WebUsbTransport } from "@trezor/transport-web";
|
|
6
|
+
export class CoreInModuleWeb extends CoreInModule {
|
|
7
|
+
defaultTransports(params) {
|
|
8
|
+
return [new BridgeTransport(params), new WebUsbTransport(params)];
|
|
9
|
+
}
|
|
10
|
+
updateProxy(proxy) {
|
|
11
|
+
if (proxy !== undefined) {
|
|
12
|
+
throw ERRORS.TypedError('Method_InvalidPackage', 'proxy setting is not supported in web environment');
|
|
13
|
+
}
|
|
14
|
+
return Promise.resolve();
|
|
15
|
+
}
|
|
16
|
+
async requestWebUSBDevice() {
|
|
17
|
+
try {
|
|
18
|
+
await window.navigator.usb.requestDevice({
|
|
19
|
+
filters: config.webusb
|
|
20
|
+
});
|
|
21
|
+
this.handleCoreMessage({
|
|
22
|
+
type: TRANSPORT.REQUEST_DEVICE
|
|
23
|
+
});
|
|
24
|
+
} catch {}
|
|
25
|
+
}
|
|
26
|
+
}
|
package/lib/index.browser.js
CHANGED
|
@@ -1,29 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { WebUsbTransport } from "@trezor/transport-web";
|
|
4
|
-
import { config } from "./data/config.js";
|
|
5
|
-
import { CoreInModule } from "./impl/core-in-module.js";
|
|
6
|
-
class CoreInModuleWeb extends CoreInModule {
|
|
7
|
-
defaultTransports(params) {
|
|
8
|
-
return [new BridgeTransport(params), new WebUsbTransport(params)];
|
|
9
|
-
}
|
|
10
|
-
updateProxy(proxy) {
|
|
11
|
-
if (proxy !== undefined) {
|
|
12
|
-
throw ERRORS.TypedError('Method_InvalidPackage', 'proxy setting is not supported in web environment');
|
|
13
|
-
}
|
|
14
|
-
return Promise.resolve();
|
|
15
|
-
}
|
|
16
|
-
async requestWebUSBDevice() {
|
|
17
|
-
try {
|
|
18
|
-
await window.navigator.usb.requestDevice({
|
|
19
|
-
filters: config.webusb
|
|
20
|
-
});
|
|
21
|
-
this.handleCoreMessage({
|
|
22
|
-
type: TRANSPORT.REQUEST_DEVICE
|
|
23
|
-
});
|
|
24
|
-
} catch {}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
1
|
+
import { factoryPrivileged } from "@trezor/connect-common";
|
|
2
|
+
import { CoreInModuleWeb } from "./impl/core-in-module-web.js";
|
|
27
3
|
const TrezorConnect = factoryPrivileged(new CoreInModuleWeb());
|
|
28
4
|
export default TrezorConnect;
|
|
29
5
|
export * from "./exports.js";
|
package/lib/index.js
CHANGED
|
@@ -1,15 +1,5 @@
|
|
|
1
1
|
import { factoryPrivileged } from "@trezor/connect-common";
|
|
2
|
-
import {
|
|
3
|
-
import { updateProxy } from "./backend/BlockchainLink.js";
|
|
4
|
-
import { CoreInModule } from "./impl/core-in-module.js";
|
|
5
|
-
class CoreInModuleNode extends CoreInModule {
|
|
6
|
-
defaultTransports(params) {
|
|
7
|
-
return [new BridgeTransport(params)];
|
|
8
|
-
}
|
|
9
|
-
async updateProxy(proxy) {
|
|
10
|
-
await updateProxy(proxy);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
2
|
+
import { CoreInModuleNode } from "./impl/core-in-module-node.js";
|
|
13
3
|
const TrezorConnect = factoryPrivileged(new CoreInModuleNode());
|
|
14
4
|
export default TrezorConnect;
|
|
15
5
|
export * from "./exports.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trezor/connect",
|
|
3
|
-
"version": "10.0.0-beta.
|
|
3
|
+
"version": "10.0.0-beta.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"author": "Trezor <info@trezor.io>",
|
|
6
6
|
"homepage": "https://github.com/trezor/trezor-suite/tree/develop/packages/connect",
|
|
@@ -22,18 +22,11 @@
|
|
|
22
22
|
"main": "./lib/index.js",
|
|
23
23
|
"browser": {
|
|
24
24
|
"./lib/index.js": "./lib/index.browser.js",
|
|
25
|
-
"./lib/
|
|
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/*"
|
|
25
|
+
"./lib/exports.js": "./lib/exports.js"
|
|
31
26
|
},
|
|
32
27
|
"react-native": {
|
|
33
|
-
"./src/index": "./src/index.ts",
|
|
34
|
-
"./src/index.ts": "./src/index.ts"
|
|
35
|
-
"./src/utils/assets": "./src/utils/assets.native.ts",
|
|
36
|
-
"./src/workers/workers": "./src/workers/workers.native.ts"
|
|
28
|
+
"./src/index": "./src/index.native.ts",
|
|
29
|
+
"./src/index.ts": "./src/index.native.ts"
|
|
37
30
|
},
|
|
38
31
|
"publishConfig": {
|
|
39
32
|
"main": "./lib/index.js",
|
|
@@ -47,21 +40,11 @@
|
|
|
47
40
|
},
|
|
48
41
|
"browser": {
|
|
49
42
|
"./lib/index.js": "./lib/index.browser.js",
|
|
50
|
-
"./lib/
|
|
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/*"
|
|
43
|
+
"./lib/exports.js": "./lib/exports.js"
|
|
56
44
|
},
|
|
57
45
|
"react-native": {
|
|
58
|
-
"./lib/index.js": "./lib/index.js",
|
|
59
|
-
"./lib/
|
|
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/*"
|
|
46
|
+
"./lib/index.js": "./lib/index.native.js",
|
|
47
|
+
"./lib/exports.js": "./lib/exports.js"
|
|
65
48
|
}
|
|
66
49
|
},
|
|
67
50
|
"files": [
|
|
@@ -69,7 +52,7 @@
|
|
|
69
52
|
"CHANGELOG.md"
|
|
70
53
|
],
|
|
71
54
|
"scripts": {
|
|
72
|
-
"test:unit": "
|
|
55
|
+
"test:unit": "yarn g:jest",
|
|
73
56
|
"depcheck": "yarn g:depcheck",
|
|
74
57
|
"type-check": "yarn g:tsc --build",
|
|
75
58
|
"build:lib": "yarn g:rimraf ./lib && yarn g:tsc --build tsconfig.lib.json && ../../scripts/publish/replace-imports.sh ./lib",
|
|
@@ -79,56 +62,22 @@
|
|
|
79
62
|
"version:minor": "yarn g:tsx scripts/bump-version.ts minor",
|
|
80
63
|
"version:preminor": "yarn g:tsx scripts/bump-version.ts preminor",
|
|
81
64
|
"version:major": "yarn g:tsx scripts/bump-version.ts major",
|
|
82
|
-
"test:e2e:web": "yarn g:tsx ./e2e/run.ts web",
|
|
83
|
-
"test:e2e:node": "yarn g:tsx ./e2e/run.ts node",
|
|
84
65
|
"lint:js": "yarn g:eslint '**/*.{ts,tsx,js}'"
|
|
85
66
|
},
|
|
86
67
|
"dependencies": {
|
|
87
|
-
"@
|
|
88
|
-
"@
|
|
89
|
-
"@
|
|
90
|
-
"@
|
|
91
|
-
"@trezor/
|
|
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
|
-
"cross-fetch": "^4.1.0",
|
|
111
|
-
"jws": "^4.0.1",
|
|
112
|
-
"viem": "^2.54.1"
|
|
68
|
+
"@trezor/connect-common": "10.0.0-beta.2",
|
|
69
|
+
"@trezor/connect-core": "10.0.0-beta.2",
|
|
70
|
+
"@trezor/transport": "10.0.0-beta.2",
|
|
71
|
+
"@trezor/transport-common": "10.0.0-beta.2",
|
|
72
|
+
"@trezor/transport-web": "10.0.0-beta.2"
|
|
113
73
|
},
|
|
114
74
|
"devDependencies": {
|
|
115
|
-
"@babel/preset-typescript": "^7.29.7",
|
|
116
75
|
"@trezor/eslint": "1.0.0",
|
|
117
|
-
"@trezor/
|
|
118
|
-
"@types/
|
|
76
|
+
"@trezor/requirements": "1.0.0",
|
|
77
|
+
"@types/jest": "30.0.0",
|
|
119
78
|
"@types/node": "22.13.10",
|
|
120
79
|
"@types/w3c-web-usb": "^1.0.14",
|
|
121
|
-
"
|
|
122
|
-
"crypto-browserify": "3.12.1",
|
|
123
|
-
"jest": "29.7.0",
|
|
124
|
-
"process": "^0.11.10",
|
|
125
|
-
"stream-browserify": "^3.0.0",
|
|
126
|
-
"tsx": "^4.21.0",
|
|
127
|
-
"vite-plugin-node-polyfills": "^0.26.0",
|
|
128
|
-
"vite-plugin-wasm": "^3.6.0",
|
|
129
|
-
"vitest": "^4.1.9",
|
|
130
|
-
"vm-browserify": "^1.1.2",
|
|
131
|
-
"ws": "^8.20.0"
|
|
80
|
+
"tsx": "^4.21.0"
|
|
132
81
|
},
|
|
133
82
|
"peerDependencies": {
|
|
134
83
|
"tslib": "^2.6.2"
|
package/lib/api/applyFlags.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { type PermissionRequest } from '@trezor/connect-common';
|
|
2
|
-
import { MessagesSchema as PROTO } from '@trezor/protobuf';
|
|
3
|
-
import type { MethodMessage } from "../core/AbstractMethod.js";
|
|
4
|
-
import { AbstractMethod } from "../core/AbstractMethod.js";
|
|
5
|
-
export default class ApplyFlags extends AbstractMethod<'applyFlags', PROTO.ApplyFlags> {
|
|
6
|
-
constructor(message: MethodMessage<'applyFlags'>);
|
|
7
|
-
get requiredPermissions(): PermissionRequest[];
|
|
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
|
-
}
|
package/lib/api/applyFlags.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { MessagesSchema as PROTO } from "@trezor/protobuf";
|
|
2
|
-
import { Assert } from "@trezor/schema-utils";
|
|
3
|
-
import { AbstractMethod } from "../core/AbstractMethod.js";
|
|
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 [{
|
|
19
|
-
permission: 'management'
|
|
20
|
-
}];
|
|
21
|
-
}
|
|
22
|
-
init() {}
|
|
23
|
-
get confirmation() {
|
|
24
|
-
return {
|
|
25
|
-
view: 'device-management',
|
|
26
|
-
customConfirmButton: {
|
|
27
|
-
className: 'confirm',
|
|
28
|
-
label: 'Proceed'
|
|
29
|
-
},
|
|
30
|
-
label: 'Do you really want to apply flags?'
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
async run() {
|
|
34
|
-
const cmd = this.getDevice().getCommands();
|
|
35
|
-
const response = await cmd.typedCall('ApplyFlags', 'Success', this.params);
|
|
36
|
-
return response.message;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { type PermissionRequest } from '@trezor/connect-common';
|
|
2
|
-
import type { MessagesSchema as PROTO } from '@trezor/protobuf';
|
|
3
|
-
import type { MethodMessage } from "../core/AbstractMethod.js";
|
|
4
|
-
import { AbstractMethod } from "../core/AbstractMethod.js";
|
|
5
|
-
export default class ApplySettings extends AbstractMethod<'applySettings', PROTO.ApplySettings> {
|
|
6
|
-
constructor(message: MethodMessage<'applySettings'>);
|
|
7
|
-
get requiredPermissions(): PermissionRequest[];
|
|
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
|
-
}
|
package/lib/api/applySettings.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { ApplySettings as ApplySettingsSchema } from "@trezor/connect-common";
|
|
2
|
-
import { Assert } from "@trezor/schema-utils";
|
|
3
|
-
import { AbstractMethod } from "../core/AbstractMethod.js";
|
|
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 [{
|
|
20
|
-
permission: 'management'
|
|
21
|
-
}];
|
|
22
|
-
}
|
|
23
|
-
init() {}
|
|
24
|
-
get confirmation() {
|
|
25
|
-
return {
|
|
26
|
-
view: 'device-management',
|
|
27
|
-
customConfirmButton: {
|
|
28
|
-
className: 'confirm',
|
|
29
|
-
label: 'Proceed'
|
|
30
|
-
},
|
|
31
|
-
label: 'Do you really want to change device settings?'
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
async run() {
|
|
35
|
-
const device = this.getDevice();
|
|
36
|
-
const cmd = device.getCommands();
|
|
37
|
-
const homescreenBytes = this.params.homescreen ? Buffer.from(this.params.homescreen, 'hex') : undefined;
|
|
38
|
-
if (device.atLeast('2.9.0') && homescreenBytes) {
|
|
39
|
-
this.params.homescreen = undefined;
|
|
40
|
-
this.params.homescreen_length = homescreenBytes.length;
|
|
41
|
-
}
|
|
42
|
-
if (homescreenBytes !== undefined) {
|
|
43
|
-
device.startPiggybackAck();
|
|
44
|
-
}
|
|
45
|
-
let response = await cmd.typedCall('ApplySettings', ['DataChunkRequest', 'Success'], this.params);
|
|
46
|
-
while (response.type !== 'Success') {
|
|
47
|
-
const start = response.message.data_offset;
|
|
48
|
-
const end = start + response.message.data_length;
|
|
49
|
-
const data_chunk = homescreenBytes?.subarray(start, end).toString('hex') || '';
|
|
50
|
-
response = await cmd.typedCall('DataChunkAck', ['DataChunkRequest', 'Success'], {
|
|
51
|
-
data_chunk
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
await device.stopPiggybackAck();
|
|
55
|
-
return response.message;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { PermissionRequest } from '@trezor/connect-common';
|
|
2
|
-
import { AuthenticateDeviceParams } from '@trezor/device-authenticity';
|
|
3
|
-
import type { MethodMessage } from "../core/AbstractMethod.js";
|
|
4
|
-
import { AbstractMethod } from "../core/AbstractMethod.js";
|
|
5
|
-
export default class AuthenticateDevice extends AbstractMethod<'authenticateDevice', AuthenticateDeviceParams> {
|
|
6
|
-
constructor(message: MethodMessage<'authenticateDevice'>);
|
|
7
|
-
get requiredPermissions(): PermissionRequest[];
|
|
8
|
-
streamAuthenticityProofs(challenge: Buffer): Promise<{
|
|
9
|
-
tropic_signature?: string | undefined;
|
|
10
|
-
mcu_signature?: string | undefined;
|
|
11
|
-
optiga_certificates: string[];
|
|
12
|
-
optiga_signature: string;
|
|
13
|
-
tropic_certificates: string[];
|
|
14
|
-
mcu_certificates: string[];
|
|
15
|
-
}>;
|
|
16
|
-
getAuthenticityProofs(challenge: Buffer): Promise<{
|
|
17
|
-
tropic_signature?: string | undefined;
|
|
18
|
-
mcu_signature?: string | undefined;
|
|
19
|
-
optiga_certificates: string[];
|
|
20
|
-
optiga_signature: string;
|
|
21
|
-
tropic_certificates: string[];
|
|
22
|
-
mcu_certificates: string[];
|
|
23
|
-
}>;
|
|
24
|
-
run(): Promise<import("@trezor/device-authenticity/lib/types").ResultsToValidate>;
|
|
25
|
-
}
|