@trezor/connect 10.0.0-alpha.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 +159 -63
- package/README.md +5 -3
- package/lib/exports.d.ts +1 -0
- package/lib/exports.js +1 -0
- 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.d.ts +7 -0
- package/lib/index.browser.js +10 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.js +5 -0
- package/lib/index.native.d.ts +4 -0
- package/lib/index.native.js +5 -0
- package/package.json +30 -83
- 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/cardanoTokenBundle.mjs +0 -21
- 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/cardano/cardanoWitnesses.mjs +0 -47
- 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/calculateFirmwareHash.mjs +0 -56
- 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/modifyFirmware.mjs +0 -13
- package/libESM/api/firmware/parseFirmwareHeaders.d.mts +0 -4
- package/libESM/api/firmware/parseFirmwareHeaders.mjs +0 -26
- 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/tron/tronProtobuf.mjs +0 -28
- 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/localFirmwareStore.mjs +0 -8
- 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/events/ui-promise.mjs +0 -1
- 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/idevice.mjs +0 -1
- package/libESM/types/typed-call-provider.d.mts +0 -29
- package/libESM/types/typed-call-provider.mjs +0 -1
- package/libESM/types/workflow.d.mts +0 -16
- package/libESM/types/workflow.mjs +0 -1
- 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/addressUtils.mjs +0 -24
- 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/assetsTypes.mjs +0 -1
- package/libESM/utils/buildOutputDescriptor.d.mts +0 -12
- package/libESM/utils/buildOutputDescriptor.mjs +0 -67
- 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/ethereumUtils.mjs +0 -7
- 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/utils/uiPromiseManager.mjs +0 -51
- 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
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import type { CoinInfo, MethodPermission } from '@trezor/connect-common';
|
|
2
|
-
import type { MethodMessage } from '../core/AbstractMethod';
|
|
3
|
-
import { AbstractMethod } from '../core/AbstractMethod';
|
|
4
|
-
type Params = {
|
|
5
|
-
coinInfo: CoinInfo;
|
|
6
|
-
};
|
|
7
|
-
export default class GetCoinInfo extends AbstractMethod<'getCoinInfo', Params> {
|
|
8
|
-
constructor(message: MethodMessage<'getCoinInfo'>);
|
|
9
|
-
get requiredPermissions(): MethodPermission[];
|
|
10
|
-
run(): Promise<({
|
|
11
|
-
blockchainLink?: {
|
|
12
|
-
type: string;
|
|
13
|
-
url: string[];
|
|
14
|
-
} | undefined;
|
|
15
|
-
label: string;
|
|
16
|
-
name: string;
|
|
17
|
-
shortcut: string;
|
|
18
|
-
slip44: number;
|
|
19
|
-
support: {
|
|
20
|
-
T1B1: string | false;
|
|
21
|
-
T2T1: string | false;
|
|
22
|
-
T3T1: string | false;
|
|
23
|
-
T2B1: string | false;
|
|
24
|
-
T3B1: string | false;
|
|
25
|
-
T3W1: string | false;
|
|
26
|
-
UNKNOWN: string | false;
|
|
27
|
-
};
|
|
28
|
-
decimals: number;
|
|
29
|
-
blockTime: number;
|
|
30
|
-
minFee: number;
|
|
31
|
-
maxFee: number;
|
|
32
|
-
minPriorityFee: number;
|
|
33
|
-
defaultFees: {
|
|
34
|
-
feePerTx?: string | undefined;
|
|
35
|
-
feeLimit?: string | undefined;
|
|
36
|
-
baseFeePerGas?: string | undefined;
|
|
37
|
-
maxFeePerGas?: string | undefined;
|
|
38
|
-
maxPriorityFeePerGas?: string | undefined;
|
|
39
|
-
label: "high" | "normal" | "economy" | "low" | "custom";
|
|
40
|
-
blocks: number;
|
|
41
|
-
feePerUnit: string;
|
|
42
|
-
}[];
|
|
43
|
-
} & {
|
|
44
|
-
taproot?: boolean | undefined;
|
|
45
|
-
cashAddrPrefix?: string | undefined;
|
|
46
|
-
xPubMagicSegwitNative?: number | undefined;
|
|
47
|
-
xPubMagicSegwit?: number | undefined;
|
|
48
|
-
type: "bitcoin";
|
|
49
|
-
curveName: string;
|
|
50
|
-
dustLimit: number;
|
|
51
|
-
forceBip143: boolean;
|
|
52
|
-
hashGenesisBlock: string;
|
|
53
|
-
maxAddressLength: number;
|
|
54
|
-
maxFeeSatoshiKb: number;
|
|
55
|
-
minAddressLength: number;
|
|
56
|
-
minFeeSatoshiKb: number;
|
|
57
|
-
segwit: boolean;
|
|
58
|
-
xPubMagic: number;
|
|
59
|
-
network: {
|
|
60
|
-
forkId?: number | undefined;
|
|
61
|
-
messagePrefix: string;
|
|
62
|
-
bech32: string;
|
|
63
|
-
bip32: {
|
|
64
|
-
public: number;
|
|
65
|
-
private: number;
|
|
66
|
-
};
|
|
67
|
-
pubKeyHash: number;
|
|
68
|
-
scriptHash: number;
|
|
69
|
-
wif: number;
|
|
70
|
-
};
|
|
71
|
-
isBitcoin: boolean;
|
|
72
|
-
}) | ({
|
|
73
|
-
blockchainLink?: {
|
|
74
|
-
type: string;
|
|
75
|
-
url: string[];
|
|
76
|
-
} | undefined;
|
|
77
|
-
label: string;
|
|
78
|
-
name: string;
|
|
79
|
-
shortcut: string;
|
|
80
|
-
slip44: number;
|
|
81
|
-
support: {
|
|
82
|
-
T1B1: string | false;
|
|
83
|
-
T2T1: string | false;
|
|
84
|
-
T3T1: string | false;
|
|
85
|
-
T2B1: string | false;
|
|
86
|
-
T3B1: string | false;
|
|
87
|
-
T3W1: string | false;
|
|
88
|
-
UNKNOWN: string | false;
|
|
89
|
-
};
|
|
90
|
-
decimals: number;
|
|
91
|
-
blockTime: number;
|
|
92
|
-
minFee: number;
|
|
93
|
-
maxFee: number;
|
|
94
|
-
minPriorityFee: number;
|
|
95
|
-
defaultFees: {
|
|
96
|
-
feePerTx?: string | undefined;
|
|
97
|
-
feeLimit?: string | undefined;
|
|
98
|
-
baseFeePerGas?: string | undefined;
|
|
99
|
-
maxFeePerGas?: string | undefined;
|
|
100
|
-
maxPriorityFeePerGas?: string | undefined;
|
|
101
|
-
label: "high" | "normal" | "economy" | "low" | "custom";
|
|
102
|
-
blocks: number;
|
|
103
|
-
feePerUnit: string;
|
|
104
|
-
}[];
|
|
105
|
-
} & {
|
|
106
|
-
network?: undefined;
|
|
107
|
-
type: "ethereum";
|
|
108
|
-
chainId: number;
|
|
109
|
-
}) | ({
|
|
110
|
-
blockchainLink?: {
|
|
111
|
-
type: string;
|
|
112
|
-
url: string[];
|
|
113
|
-
} | undefined;
|
|
114
|
-
label: string;
|
|
115
|
-
name: string;
|
|
116
|
-
shortcut: string;
|
|
117
|
-
slip44: number;
|
|
118
|
-
support: {
|
|
119
|
-
T1B1: string | false;
|
|
120
|
-
T2T1: string | false;
|
|
121
|
-
T3T1: string | false;
|
|
122
|
-
T2B1: string | false;
|
|
123
|
-
T3B1: string | false;
|
|
124
|
-
T3W1: string | false;
|
|
125
|
-
UNKNOWN: string | false;
|
|
126
|
-
};
|
|
127
|
-
decimals: number;
|
|
128
|
-
blockTime: number;
|
|
129
|
-
minFee: number;
|
|
130
|
-
maxFee: number;
|
|
131
|
-
minPriorityFee: number;
|
|
132
|
-
defaultFees: {
|
|
133
|
-
feePerTx?: string | undefined;
|
|
134
|
-
feeLimit?: string | undefined;
|
|
135
|
-
baseFeePerGas?: string | undefined;
|
|
136
|
-
maxFeePerGas?: string | undefined;
|
|
137
|
-
maxPriorityFeePerGas?: string | undefined;
|
|
138
|
-
label: "high" | "normal" | "economy" | "low" | "custom";
|
|
139
|
-
blocks: number;
|
|
140
|
-
feePerUnit: string;
|
|
141
|
-
}[];
|
|
142
|
-
} & {
|
|
143
|
-
network?: undefined;
|
|
144
|
-
type: "misc";
|
|
145
|
-
curve: string;
|
|
146
|
-
})>;
|
|
147
|
-
}
|
|
148
|
-
export {};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { CoinObj } from "@trezor/connect-common";
|
|
2
|
-
import { ERRORS } from "@trezor/connect-common/libESM/constants/index.mjs";
|
|
3
|
-
import { Assert } from "@trezor/schema-utils";
|
|
4
|
-
import { AbstractMethod } from "../core/AbstractMethod.mjs";
|
|
5
|
-
import { getCoinInfo } from "../data/coinInfo.mjs";
|
|
6
|
-
export default class GetCoinInfo extends AbstractMethod {
|
|
7
|
-
constructor(message) {
|
|
8
|
-
const {
|
|
9
|
-
payload
|
|
10
|
-
} = message;
|
|
11
|
-
Assert(CoinObj, payload);
|
|
12
|
-
const coinInfo = getCoinInfo(payload.coin);
|
|
13
|
-
if (!coinInfo) {
|
|
14
|
-
throw ERRORS.TypedError('Method_UnknownCoin');
|
|
15
|
-
}
|
|
16
|
-
const params = {
|
|
17
|
-
coinInfo
|
|
18
|
-
};
|
|
19
|
-
super(message, params);
|
|
20
|
-
this.useDevice = false;
|
|
21
|
-
this.useUi = false;
|
|
22
|
-
}
|
|
23
|
-
get requiredPermissions() {
|
|
24
|
-
return [];
|
|
25
|
-
}
|
|
26
|
-
run() {
|
|
27
|
-
return Promise.resolve(this.params.coinInfo);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type MethodPermission } from '@trezor/connect-common';
|
|
2
|
-
import { AbstractMethod } from '../core/AbstractMethod';
|
|
3
|
-
export default class GetDeviceState extends AbstractMethod<'getDeviceState'> {
|
|
4
|
-
get requiredPermissions(): MethodPermission[];
|
|
5
|
-
run(): Promise<{
|
|
6
|
-
state: import("@trezor/connect-common").DeviceState;
|
|
7
|
-
}>;
|
|
8
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ERRORS } from "@trezor/connect-common/libESM/constants/index.mjs";
|
|
2
|
-
import { AbstractMethod } from "../core/AbstractMethod.mjs";
|
|
3
|
-
export default class GetDeviceState extends AbstractMethod {
|
|
4
|
-
get requiredPermissions() {
|
|
5
|
-
return ['read'];
|
|
6
|
-
}
|
|
7
|
-
run() {
|
|
8
|
-
const state = this.getDevice().getState();
|
|
9
|
-
if (!state?.staticSessionId) {
|
|
10
|
-
throw ERRORS.TypedError('Runtime', 'Device state not set');
|
|
11
|
-
}
|
|
12
|
-
return Promise.resolve({
|
|
13
|
-
state
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { type MethodPermission } from '@trezor/connect-common';
|
|
2
|
-
import type { MethodMessage } from '../core/AbstractMethod';
|
|
3
|
-
import { AbstractMethod } from '../core/AbstractMethod';
|
|
4
|
-
export default class GetFeatures extends AbstractMethod<'getFeatures'> {
|
|
5
|
-
constructor(message: MethodMessage<'getFeatures'>);
|
|
6
|
-
get requiredPermissions(): MethodPermission[];
|
|
7
|
-
checkFirmwareRange(): undefined;
|
|
8
|
-
run(): Promise<{
|
|
9
|
-
build_version?: number | undefined;
|
|
10
|
-
_passphrase_cached?: boolean | undefined;
|
|
11
|
-
fw_build?: number | undefined;
|
|
12
|
-
busy?: boolean | undefined;
|
|
13
|
-
homescreen_format?: "Toif" | "Jpeg" | "ToiG" | undefined;
|
|
14
|
-
hide_passphrase_from_host?: boolean | undefined;
|
|
15
|
-
unit_color?: number | undefined;
|
|
16
|
-
unit_btconly?: boolean | undefined;
|
|
17
|
-
homescreen_width?: number | undefined;
|
|
18
|
-
homescreen_height?: number | undefined;
|
|
19
|
-
bootloader_locked?: boolean | undefined;
|
|
20
|
-
language_version_matches?: boolean | undefined;
|
|
21
|
-
unit_packaging?: number | undefined;
|
|
22
|
-
haptic_feedback?: boolean | undefined;
|
|
23
|
-
recovery_type?: "NormalRecovery" | "DryRun" | "UnlockRepeatedBackup" | undefined;
|
|
24
|
-
optiga_sec?: number | undefined;
|
|
25
|
-
soc?: number | undefined;
|
|
26
|
-
firmware_corrupted?: boolean | undefined;
|
|
27
|
-
auto_lock_delay_battery_ms?: number | undefined;
|
|
28
|
-
led?: boolean | undefined;
|
|
29
|
-
usb_connected?: boolean | undefined;
|
|
30
|
-
wireless_connected?: boolean | undefined;
|
|
31
|
-
capabilities: ("Capability_Bitcoin" | "Capability_Bitcoin_like" | "Capability_Binance" | "Capability_Cardano" | "Capability_Crypto" | "Capability_EOS" | "Capability_Ethereum" | "Capability_Lisk" | "Capability_Monero" | "Capability_NEM" | "Capability_Ripple" | "Capability_Stellar" | "Capability_Tezos" | "Capability_U2F" | "Capability_Shamir" | "Capability_ShamirGroups" | "Capability_PassphraseEntry" | "Capability_Solana" | "Capability_Translations" | "Capability_Brightness" | "Capability_Haptic" | "Capability_BLE" | "Capability_NFC" | "Capability_Tron" | "Capability_N4W1")[];
|
|
32
|
-
label: string | null;
|
|
33
|
-
session_id: string | null;
|
|
34
|
-
vendor: string;
|
|
35
|
-
major_version: number;
|
|
36
|
-
minor_version: number;
|
|
37
|
-
patch_version: number;
|
|
38
|
-
bootloader_mode: boolean | null;
|
|
39
|
-
device_id: string | null;
|
|
40
|
-
pin_protection: boolean | null;
|
|
41
|
-
passphrase_protection: boolean | null;
|
|
42
|
-
language: string | null;
|
|
43
|
-
initialized: boolean | null;
|
|
44
|
-
revision: string | null;
|
|
45
|
-
bootloader_hash: string | null;
|
|
46
|
-
imported: boolean | null;
|
|
47
|
-
unlocked: boolean | null;
|
|
48
|
-
firmware_present: boolean | null;
|
|
49
|
-
backup_availability: "NotAvailable" | "Required" | "Available" | null;
|
|
50
|
-
flags: number | null;
|
|
51
|
-
model: string;
|
|
52
|
-
fw_major: number | null;
|
|
53
|
-
fw_minor: number | null;
|
|
54
|
-
fw_patch: number | null;
|
|
55
|
-
fw_vendor: string | null;
|
|
56
|
-
unfinished_backup: boolean | null;
|
|
57
|
-
no_backup: boolean | null;
|
|
58
|
-
recovery_status: "Nothing" | "Recovery" | "Backup" | null;
|
|
59
|
-
backup_type: "Bip39" | "Slip39_Basic" | "Slip39_Advanced" | "Slip39_Single_Extendable" | "Slip39_Basic_Extendable" | "Slip39_Advanced_Extendable" | null;
|
|
60
|
-
sd_card_present: boolean | null;
|
|
61
|
-
sd_protection: boolean | null;
|
|
62
|
-
wipe_code_protection: boolean | null;
|
|
63
|
-
passphrase_always_on_device: boolean | null;
|
|
64
|
-
safety_checks: "Strict" | "PromptAlways" | "PromptTemporarily" | null;
|
|
65
|
-
auto_lock_delay_ms: number | null;
|
|
66
|
-
display_rotation: "North" | "East" | "South" | "West" | null;
|
|
67
|
-
experimental_features: boolean | null;
|
|
68
|
-
internal_model: import("@trezor/protobuf/libESM/definitions").DeviceModelInternal;
|
|
69
|
-
}>;
|
|
70
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { UI_REQUEST } from "@trezor/connect-common";
|
|
2
|
-
import { AbstractMethod } from "../core/AbstractMethod.mjs";
|
|
3
|
-
export default class GetFeatures extends AbstractMethod {
|
|
4
|
-
constructor(message) {
|
|
5
|
-
super(message, undefined);
|
|
6
|
-
this.useUi = false;
|
|
7
|
-
this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.INITIALIZE, UI_REQUEST.BOOTLOADER];
|
|
8
|
-
this.useDeviceState = false;
|
|
9
|
-
this.useEmptyPassphrase = true;
|
|
10
|
-
}
|
|
11
|
-
get requiredPermissions() {
|
|
12
|
-
return ['read'];
|
|
13
|
-
}
|
|
14
|
-
checkFirmwareRange() {
|
|
15
|
-
return undefined;
|
|
16
|
-
}
|
|
17
|
-
run() {
|
|
18
|
-
return Promise.resolve(this.getDevice().features);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
@@ -1,11 +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 GetFirmwareHash extends AbstractMethod<'getFirmwareHash', PROTO.GetFirmwareHash> {
|
|
6
|
-
constructor(message: MethodMessage<'getFirmwareHash'>);
|
|
7
|
-
get requiredPermissions(): MethodPermission[];
|
|
8
|
-
run(): Promise<{
|
|
9
|
-
hash: string;
|
|
10
|
-
}>;
|
|
11
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { UI_REQUEST } from "@trezor/connect-common";
|
|
2
|
-
import { MessagesSchema as PROTO } from "@trezor/protobuf";
|
|
3
|
-
import { Assert } from "@trezor/schema-utils";
|
|
4
|
-
import { AbstractMethod } from "../core/AbstractMethod.mjs";
|
|
5
|
-
export default class GetFirmwareHash extends AbstractMethod {
|
|
6
|
-
constructor(message) {
|
|
7
|
-
const {
|
|
8
|
-
payload
|
|
9
|
-
} = message;
|
|
10
|
-
Assert(PROTO.GetFirmwareHash, payload);
|
|
11
|
-
const params = {
|
|
12
|
-
challenge: payload.challenge
|
|
13
|
-
};
|
|
14
|
-
super(message, params);
|
|
15
|
-
this.useEmptyPassphrase = true;
|
|
16
|
-
this.useDeviceState = false;
|
|
17
|
-
this.allowDeviceMode = [UI_REQUEST.INITIALIZE];
|
|
18
|
-
}
|
|
19
|
-
get requiredPermissions() {
|
|
20
|
-
return ['management'];
|
|
21
|
-
}
|
|
22
|
-
async run() {
|
|
23
|
-
const cmd = this.getDevice().getCommands();
|
|
24
|
-
const response = await cmd.typedCall('GetFirmwareHash', 'FirmwareHash', this.params);
|
|
25
|
-
return response.message;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type MethodPermission } from '@trezor/connect-common';
|
|
2
|
-
import type { MethodMessage } from '../core/AbstractMethod';
|
|
3
|
-
import { AbstractMethod } from '../core/AbstractMethod';
|
|
4
|
-
export default class GetNonce extends AbstractMethod<'getNonce'> {
|
|
5
|
-
constructor(message: MethodMessage<'getNonce'>);
|
|
6
|
-
get requiredPermissions(): MethodPermission[];
|
|
7
|
-
run(): Promise<{
|
|
8
|
-
nonce: string;
|
|
9
|
-
}>;
|
|
10
|
-
}
|
package/libESM/api/getNonce.mjs
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { AbstractMethod } from "../core/AbstractMethod.mjs";
|
|
2
|
-
export default class GetNonce extends AbstractMethod {
|
|
3
|
-
constructor(message) {
|
|
4
|
-
super(message, undefined);
|
|
5
|
-
this.useDeviceState = false;
|
|
6
|
-
this.useEmptyPassphrase = true;
|
|
7
|
-
}
|
|
8
|
-
get requiredPermissions() {
|
|
9
|
-
return ['management'];
|
|
10
|
-
}
|
|
11
|
-
async run() {
|
|
12
|
-
const cmd = this.getDevice().getCommands();
|
|
13
|
-
const response = await cmd.typedCall('GetNonce', 'Nonce');
|
|
14
|
-
return response.message;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { type MethodPermission } from '@trezor/connect-common';
|
|
2
|
-
import type { MessagesSchema as PROTO } from '@trezor/protobuf';
|
|
3
|
-
import type { MethodContext, MethodMessage } from '../core/AbstractMethod';
|
|
4
|
-
import { AbstractMethod } from '../core/AbstractMethod';
|
|
5
|
-
export default class GetOwnershipId extends AbstractMethod<'getOwnershipId', PROTO.GetOwnershipId[]> {
|
|
6
|
-
constructor(message: MethodMessage<'getOwnershipId'>);
|
|
7
|
-
hasBundle?: boolean;
|
|
8
|
-
get requiredPermissions(): MethodPermission[];
|
|
9
|
-
get info(): string;
|
|
10
|
-
get confirmation(): {
|
|
11
|
-
view: "export-address";
|
|
12
|
-
label: string;
|
|
13
|
-
};
|
|
14
|
-
run({ sendCoreMessage }: MethodContext): Promise<import("@trezor/connect-common/libESM/types/api/getOwnershipId").OwnershipId | import("@trezor/connect-common/libESM/types/api/getOwnershipId").OwnershipId[]>;
|
|
15
|
-
}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { Bundle, GetOwnershipId as GetOwnershipIdSchema, UI_REQUEST, createUiMessage } from "@trezor/connect-common";
|
|
2
|
-
import { Assert } from "@trezor/schema-utils";
|
|
3
|
-
import { bundlify } from "./common/paramsValidator.mjs";
|
|
4
|
-
import { AbstractMethod } from "../core/AbstractMethod.mjs";
|
|
5
|
-
import { getBitcoinNetwork } from "../data/coinInfo.mjs";
|
|
6
|
-
import { getScriptType, getSerializedPath, validatePath } from "../utils/pathUtils.mjs";
|
|
7
|
-
export default class GetOwnershipId extends AbstractMethod {
|
|
8
|
-
constructor(message) {
|
|
9
|
-
const {
|
|
10
|
-
hasBundle,
|
|
11
|
-
payload
|
|
12
|
-
} = bundlify(message.payload);
|
|
13
|
-
Assert(Bundle(GetOwnershipIdSchema), payload);
|
|
14
|
-
const preprocessed = payload.bundle.map(batch => {
|
|
15
|
-
const address_n = validatePath(batch.path, 1);
|
|
16
|
-
return {
|
|
17
|
-
batch,
|
|
18
|
-
address_n,
|
|
19
|
-
coinInfo: getBitcoinNetwork(batch.coin || address_n)
|
|
20
|
-
};
|
|
21
|
-
});
|
|
22
|
-
const params = preprocessed.map(({
|
|
23
|
-
batch,
|
|
24
|
-
address_n,
|
|
25
|
-
coinInfo
|
|
26
|
-
}) => {
|
|
27
|
-
const script_type = batch.scriptType || getScriptType(address_n);
|
|
28
|
-
return {
|
|
29
|
-
address_n,
|
|
30
|
-
coin_name: coinInfo ? coinInfo.name : undefined,
|
|
31
|
-
multisig: batch.multisig,
|
|
32
|
-
script_type
|
|
33
|
-
};
|
|
34
|
-
});
|
|
35
|
-
super(message, params);
|
|
36
|
-
this.requiredFirmwareCoins = preprocessed.map(({
|
|
37
|
-
coinInfo
|
|
38
|
-
}) => coinInfo);
|
|
39
|
-
this.hasBundle = hasBundle;
|
|
40
|
-
}
|
|
41
|
-
hasBundle;
|
|
42
|
-
get requiredPermissions() {
|
|
43
|
-
return ['read'];
|
|
44
|
-
}
|
|
45
|
-
get info() {
|
|
46
|
-
return 'Export ownership id';
|
|
47
|
-
}
|
|
48
|
-
get confirmation() {
|
|
49
|
-
return {
|
|
50
|
-
view: 'export-address',
|
|
51
|
-
label: this.params.length > 1 ? 'Export multiple ownership proof ids' : this.info
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
async run({
|
|
55
|
-
sendCoreMessage
|
|
56
|
-
}) {
|
|
57
|
-
const responses = [];
|
|
58
|
-
const cmd = this.getDevice().getCommands();
|
|
59
|
-
for (let i = 0; i < this.params.length; i++) {
|
|
60
|
-
const batch = this.params[i];
|
|
61
|
-
const {
|
|
62
|
-
message
|
|
63
|
-
} = await cmd.typedCall('GetOwnershipId', 'OwnershipId', batch);
|
|
64
|
-
responses.push({
|
|
65
|
-
...message,
|
|
66
|
-
path: batch.address_n,
|
|
67
|
-
serializedPath: getSerializedPath(batch.address_n)
|
|
68
|
-
});
|
|
69
|
-
if (this.hasBundle) {
|
|
70
|
-
sendCoreMessage(createUiMessage(UI_REQUEST.BUNDLE_PROGRESS, {
|
|
71
|
-
total: this.params.length,
|
|
72
|
-
progress: i,
|
|
73
|
-
response: message
|
|
74
|
-
}));
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
return this.hasBundle ? responses : responses[0];
|
|
78
|
-
}
|
|
79
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { type MethodPermission } from '@trezor/connect-common';
|
|
2
|
-
import type { MessagesSchema as PROTO } from '@trezor/protobuf';
|
|
3
|
-
import type { MethodContext, MethodMessage } from '../core/AbstractMethod';
|
|
4
|
-
import { AbstractMethod } from '../core/AbstractMethod';
|
|
5
|
-
export default class GetOwnershipProof extends AbstractMethod<'getOwnershipProof', PROTO.GetOwnershipProof[]> {
|
|
6
|
-
constructor(message: MethodMessage<'getOwnershipProof'>);
|
|
7
|
-
hasBundle?: boolean;
|
|
8
|
-
get requiredPermissions(): MethodPermission[];
|
|
9
|
-
get info(): string;
|
|
10
|
-
get confirmation(): {
|
|
11
|
-
view: "export-address";
|
|
12
|
-
label: string;
|
|
13
|
-
};
|
|
14
|
-
run({ sendCoreMessage }: MethodContext): Promise<import("@trezor/connect-common/libESM/types/api/getOwnershipProof").OwnershipProof | import("@trezor/connect-common/libESM/types/api/getOwnershipProof").OwnershipProof[]>;
|
|
15
|
-
}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { Bundle, GetOwnershipProof as GetOwnershipProofSchema, UI_REQUEST, createUiMessage } from "@trezor/connect-common";
|
|
2
|
-
import { Assert } from "@trezor/schema-utils";
|
|
3
|
-
import { bundlify } from "./common/paramsValidator.mjs";
|
|
4
|
-
import { AbstractMethod } from "../core/AbstractMethod.mjs";
|
|
5
|
-
import { getBitcoinNetwork } from "../data/coinInfo.mjs";
|
|
6
|
-
import { getScriptType, getSerializedPath, validatePath } from "../utils/pathUtils.mjs";
|
|
7
|
-
export default class GetOwnershipProof extends AbstractMethod {
|
|
8
|
-
constructor(message) {
|
|
9
|
-
const {
|
|
10
|
-
hasBundle,
|
|
11
|
-
payload
|
|
12
|
-
} = bundlify(message.payload);
|
|
13
|
-
Assert(Bundle(GetOwnershipProofSchema), payload);
|
|
14
|
-
const preprocessed = payload.bundle.map(batch => {
|
|
15
|
-
const address_n = validatePath(batch.path, 1);
|
|
16
|
-
return {
|
|
17
|
-
batch,
|
|
18
|
-
address_n,
|
|
19
|
-
coinInfo: getBitcoinNetwork(batch.coin || address_n)
|
|
20
|
-
};
|
|
21
|
-
});
|
|
22
|
-
const params = preprocessed.map(({
|
|
23
|
-
batch,
|
|
24
|
-
address_n,
|
|
25
|
-
coinInfo
|
|
26
|
-
}) => {
|
|
27
|
-
const script_type = batch.scriptType || getScriptType(address_n);
|
|
28
|
-
return {
|
|
29
|
-
address_n,
|
|
30
|
-
coin_name: coinInfo ? coinInfo.name : undefined,
|
|
31
|
-
multisig: batch.multisig,
|
|
32
|
-
script_type,
|
|
33
|
-
user_confirmation: batch.userConfirmation,
|
|
34
|
-
ownership_ids: batch.ownershipIds,
|
|
35
|
-
commitment_data: batch.commitmentData
|
|
36
|
-
};
|
|
37
|
-
});
|
|
38
|
-
super(message, params);
|
|
39
|
-
this.requiredFirmwareCoins = preprocessed.map(({
|
|
40
|
-
coinInfo
|
|
41
|
-
}) => coinInfo);
|
|
42
|
-
this.preauthorized = payload.bundle.some(batch => batch.preauthorized);
|
|
43
|
-
this.hasBundle = hasBundle;
|
|
44
|
-
}
|
|
45
|
-
hasBundle;
|
|
46
|
-
get requiredPermissions() {
|
|
47
|
-
return ['read'];
|
|
48
|
-
}
|
|
49
|
-
get info() {
|
|
50
|
-
return 'Export ownership proof';
|
|
51
|
-
}
|
|
52
|
-
get confirmation() {
|
|
53
|
-
return {
|
|
54
|
-
view: 'export-address',
|
|
55
|
-
label: this.params.length > 1 ? 'Export multiple ownership proofs' : this.info
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
async run({
|
|
59
|
-
sendCoreMessage
|
|
60
|
-
}) {
|
|
61
|
-
const responses = [];
|
|
62
|
-
const cmd = this.getDevice().getCommands();
|
|
63
|
-
for (let i = 0; i < this.params.length; i++) {
|
|
64
|
-
const batch = this.params[i];
|
|
65
|
-
if (this.preauthorized) {
|
|
66
|
-
await cmd.preauthorize(true);
|
|
67
|
-
}
|
|
68
|
-
const {
|
|
69
|
-
message
|
|
70
|
-
} = await cmd.typedCall('GetOwnershipProof', 'OwnershipProof', batch);
|
|
71
|
-
responses.push({
|
|
72
|
-
...message,
|
|
73
|
-
path: batch.address_n,
|
|
74
|
-
serializedPath: getSerializedPath(batch.address_n)
|
|
75
|
-
});
|
|
76
|
-
if (this.hasBundle) {
|
|
77
|
-
sendCoreMessage(createUiMessage(UI_REQUEST.BUNDLE_PROGRESS, {
|
|
78
|
-
total: this.params.length,
|
|
79
|
-
progress: i,
|
|
80
|
-
response: message
|
|
81
|
-
}));
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
return this.hasBundle ? responses : responses[0];
|
|
85
|
-
}
|
|
86
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import type { BitcoinNetworkInfo, MethodPermission } from '@trezor/connect-common';
|
|
2
|
-
import type { MessagesSchema as PROTO } from '@trezor/protobuf';
|
|
3
|
-
import type { MethodContext, MethodMessage } from '../core/AbstractMethod';
|
|
4
|
-
import { AbstractMethod } from '../core/AbstractMethod';
|
|
5
|
-
type Params = {
|
|
6
|
-
proto: PROTO.GetPublicKey;
|
|
7
|
-
coinInfo?: BitcoinNetworkInfo;
|
|
8
|
-
suppressBackupWarning?: boolean;
|
|
9
|
-
unlockPath?: PROTO.UnlockPath;
|
|
10
|
-
};
|
|
11
|
-
export default class GetPublicKey extends AbstractMethod<'getPublicKey', Params[]> {
|
|
12
|
-
constructor(message: MethodMessage<'getPublicKey'>);
|
|
13
|
-
hasBundle?: boolean;
|
|
14
|
-
get requiredPermissions(): MethodPermission[];
|
|
15
|
-
get info(): string;
|
|
16
|
-
get confirmation(): {
|
|
17
|
-
view: "export-xpub";
|
|
18
|
-
label: string;
|
|
19
|
-
};
|
|
20
|
-
run({ sendCoreMessage }: MethodContext): Promise<({
|
|
21
|
-
publicKey: string;
|
|
22
|
-
path: number[];
|
|
23
|
-
serializedPath: string;
|
|
24
|
-
} & {
|
|
25
|
-
xpubSegwit?: string | undefined;
|
|
26
|
-
descriptorChecksum?: string | undefined;
|
|
27
|
-
rootFingerprint?: number | undefined;
|
|
28
|
-
descriptor?: string | undefined;
|
|
29
|
-
childNum: number;
|
|
30
|
-
xpub: string;
|
|
31
|
-
chainCode: string;
|
|
32
|
-
fingerprint: number;
|
|
33
|
-
depth: number;
|
|
34
|
-
}) | ({
|
|
35
|
-
publicKey: string;
|
|
36
|
-
path: number[];
|
|
37
|
-
serializedPath: string;
|
|
38
|
-
} & {
|
|
39
|
-
xpubSegwit?: string | undefined;
|
|
40
|
-
descriptorChecksum?: string | undefined;
|
|
41
|
-
rootFingerprint?: number | undefined;
|
|
42
|
-
descriptor?: string | undefined;
|
|
43
|
-
childNum: number;
|
|
44
|
-
xpub: string;
|
|
45
|
-
chainCode: string;
|
|
46
|
-
fingerprint: number;
|
|
47
|
-
depth: number;
|
|
48
|
-
})[]>;
|
|
49
|
-
}
|
|
50
|
-
export {};
|