@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,374 +0,0 @@
|
|
|
1
|
-
import type { BitcoinNetworkInfo, EthereumNetworkInfo, MiscNetworkInfo } from '@trezor/connect-common/libESM/types/coinInfo';
|
|
2
|
-
import type { DerivationPath } from '@trezor/connect-common/libESM/types/params';
|
|
3
|
-
export declare const getBitcoinNetwork: (pathOrName: DerivationPath) => Readonly<BitcoinNetworkInfo> | undefined;
|
|
4
|
-
export declare const getEthereumNetwork: (pathOrNetworkSymbol: DerivationPath) => Readonly<EthereumNetworkInfo> | undefined;
|
|
5
|
-
export declare const getMiscNetwork: (pathOrName: DerivationPath) => Readonly<MiscNetworkInfo> | undefined;
|
|
6
|
-
export declare const getSegwitNetwork: (coin: BitcoinNetworkInfo) => {
|
|
7
|
-
bip32: {
|
|
8
|
-
public: number;
|
|
9
|
-
private: number;
|
|
10
|
-
};
|
|
11
|
-
forkId?: number | undefined;
|
|
12
|
-
messagePrefix: string;
|
|
13
|
-
bech32: string;
|
|
14
|
-
pubKeyHash: number;
|
|
15
|
-
scriptHash: number;
|
|
16
|
-
wif: number;
|
|
17
|
-
} | null;
|
|
18
|
-
export declare const getBech32Network: (coin: BitcoinNetworkInfo) => {
|
|
19
|
-
bip32: {
|
|
20
|
-
public: number;
|
|
21
|
-
private: number;
|
|
22
|
-
};
|
|
23
|
-
forkId?: number | undefined;
|
|
24
|
-
messagePrefix: string;
|
|
25
|
-
bech32: string;
|
|
26
|
-
pubKeyHash: number;
|
|
27
|
-
scriptHash: number;
|
|
28
|
-
wif: number;
|
|
29
|
-
} | null;
|
|
30
|
-
export declare const fixCoinInfoNetwork: (ci: BitcoinNetworkInfo, path: number[]) => {
|
|
31
|
-
blockchainLink?: {
|
|
32
|
-
type: string;
|
|
33
|
-
url: string[];
|
|
34
|
-
} | undefined;
|
|
35
|
-
label: string;
|
|
36
|
-
name: string;
|
|
37
|
-
shortcut: string;
|
|
38
|
-
slip44: number;
|
|
39
|
-
support: {
|
|
40
|
-
T1B1: string | false;
|
|
41
|
-
T2T1: string | false;
|
|
42
|
-
T3T1: string | false;
|
|
43
|
-
T2B1: string | false;
|
|
44
|
-
T3B1: string | false;
|
|
45
|
-
T3W1: string | false;
|
|
46
|
-
UNKNOWN: string | false;
|
|
47
|
-
};
|
|
48
|
-
decimals: number;
|
|
49
|
-
blockTime: number;
|
|
50
|
-
minFee: number;
|
|
51
|
-
maxFee: number;
|
|
52
|
-
minPriorityFee: number;
|
|
53
|
-
defaultFees: {
|
|
54
|
-
feePerTx?: string | undefined;
|
|
55
|
-
feeLimit?: string | undefined;
|
|
56
|
-
baseFeePerGas?: string | undefined;
|
|
57
|
-
maxFeePerGas?: string | undefined;
|
|
58
|
-
maxPriorityFeePerGas?: string | undefined;
|
|
59
|
-
label: "high" | "normal" | "economy" | "low" | "custom";
|
|
60
|
-
blocks: number;
|
|
61
|
-
feePerUnit: string;
|
|
62
|
-
}[];
|
|
63
|
-
} & {
|
|
64
|
-
taproot?: boolean | undefined;
|
|
65
|
-
cashAddrPrefix?: string | undefined;
|
|
66
|
-
xPubMagicSegwitNative?: number | undefined;
|
|
67
|
-
xPubMagicSegwit?: number | undefined;
|
|
68
|
-
type: "bitcoin";
|
|
69
|
-
curveName: string;
|
|
70
|
-
dustLimit: number;
|
|
71
|
-
forceBip143: boolean;
|
|
72
|
-
hashGenesisBlock: string;
|
|
73
|
-
maxAddressLength: number;
|
|
74
|
-
maxFeeSatoshiKb: number;
|
|
75
|
-
minAddressLength: number;
|
|
76
|
-
minFeeSatoshiKb: number;
|
|
77
|
-
segwit: boolean;
|
|
78
|
-
xPubMagic: number;
|
|
79
|
-
network: {
|
|
80
|
-
forkId?: number | undefined;
|
|
81
|
-
messagePrefix: string;
|
|
82
|
-
bech32: string;
|
|
83
|
-
bip32: {
|
|
84
|
-
public: number;
|
|
85
|
-
private: number;
|
|
86
|
-
};
|
|
87
|
-
pubKeyHash: number;
|
|
88
|
-
scriptHash: number;
|
|
89
|
-
wif: number;
|
|
90
|
-
};
|
|
91
|
-
isBitcoin: boolean;
|
|
92
|
-
};
|
|
93
|
-
export declare const getCoinInfo: (currency: string) => Readonly<{
|
|
94
|
-
blockchainLink?: {
|
|
95
|
-
type: string;
|
|
96
|
-
url: string[];
|
|
97
|
-
} | undefined;
|
|
98
|
-
label: string;
|
|
99
|
-
name: string;
|
|
100
|
-
shortcut: string;
|
|
101
|
-
slip44: number;
|
|
102
|
-
support: {
|
|
103
|
-
T1B1: string | false;
|
|
104
|
-
T2T1: string | false;
|
|
105
|
-
T3T1: string | false;
|
|
106
|
-
T2B1: string | false;
|
|
107
|
-
T3B1: string | false;
|
|
108
|
-
T3W1: string | false;
|
|
109
|
-
UNKNOWN: string | false;
|
|
110
|
-
};
|
|
111
|
-
decimals: number;
|
|
112
|
-
blockTime: number;
|
|
113
|
-
minFee: number;
|
|
114
|
-
maxFee: number;
|
|
115
|
-
minPriorityFee: number;
|
|
116
|
-
defaultFees: {
|
|
117
|
-
feePerTx?: string | undefined;
|
|
118
|
-
feeLimit?: string | undefined;
|
|
119
|
-
baseFeePerGas?: string | undefined;
|
|
120
|
-
maxFeePerGas?: string | undefined;
|
|
121
|
-
maxPriorityFeePerGas?: string | undefined;
|
|
122
|
-
label: "high" | "normal" | "economy" | "low" | "custom";
|
|
123
|
-
blocks: number;
|
|
124
|
-
feePerUnit: string;
|
|
125
|
-
}[];
|
|
126
|
-
} & {
|
|
127
|
-
taproot?: boolean | undefined;
|
|
128
|
-
cashAddrPrefix?: string | undefined;
|
|
129
|
-
xPubMagicSegwitNative?: number | undefined;
|
|
130
|
-
xPubMagicSegwit?: number | undefined;
|
|
131
|
-
type: "bitcoin";
|
|
132
|
-
curveName: string;
|
|
133
|
-
dustLimit: number;
|
|
134
|
-
forceBip143: boolean;
|
|
135
|
-
hashGenesisBlock: string;
|
|
136
|
-
maxAddressLength: number;
|
|
137
|
-
maxFeeSatoshiKb: number;
|
|
138
|
-
minAddressLength: number;
|
|
139
|
-
minFeeSatoshiKb: number;
|
|
140
|
-
segwit: boolean;
|
|
141
|
-
xPubMagic: number;
|
|
142
|
-
network: {
|
|
143
|
-
forkId?: number | undefined;
|
|
144
|
-
messagePrefix: string;
|
|
145
|
-
bech32: string;
|
|
146
|
-
bip32: {
|
|
147
|
-
public: number;
|
|
148
|
-
private: number;
|
|
149
|
-
};
|
|
150
|
-
pubKeyHash: number;
|
|
151
|
-
scriptHash: number;
|
|
152
|
-
wif: number;
|
|
153
|
-
};
|
|
154
|
-
isBitcoin: boolean;
|
|
155
|
-
}> | Readonly<{
|
|
156
|
-
blockchainLink?: {
|
|
157
|
-
type: string;
|
|
158
|
-
url: string[];
|
|
159
|
-
} | undefined;
|
|
160
|
-
label: string;
|
|
161
|
-
name: string;
|
|
162
|
-
shortcut: string;
|
|
163
|
-
slip44: number;
|
|
164
|
-
support: {
|
|
165
|
-
T1B1: string | false;
|
|
166
|
-
T2T1: string | false;
|
|
167
|
-
T3T1: string | false;
|
|
168
|
-
T2B1: string | false;
|
|
169
|
-
T3B1: string | false;
|
|
170
|
-
T3W1: string | false;
|
|
171
|
-
UNKNOWN: string | false;
|
|
172
|
-
};
|
|
173
|
-
decimals: number;
|
|
174
|
-
blockTime: number;
|
|
175
|
-
minFee: number;
|
|
176
|
-
maxFee: number;
|
|
177
|
-
minPriorityFee: number;
|
|
178
|
-
defaultFees: {
|
|
179
|
-
feePerTx?: string | undefined;
|
|
180
|
-
feeLimit?: string | undefined;
|
|
181
|
-
baseFeePerGas?: string | undefined;
|
|
182
|
-
maxFeePerGas?: string | undefined;
|
|
183
|
-
maxPriorityFeePerGas?: string | undefined;
|
|
184
|
-
label: "high" | "normal" | "economy" | "low" | "custom";
|
|
185
|
-
blocks: number;
|
|
186
|
-
feePerUnit: string;
|
|
187
|
-
}[];
|
|
188
|
-
} & {
|
|
189
|
-
network?: undefined;
|
|
190
|
-
type: "ethereum";
|
|
191
|
-
chainId: number;
|
|
192
|
-
}> | Readonly<{
|
|
193
|
-
blockchainLink?: {
|
|
194
|
-
type: string;
|
|
195
|
-
url: string[];
|
|
196
|
-
} | undefined;
|
|
197
|
-
label: string;
|
|
198
|
-
name: string;
|
|
199
|
-
shortcut: string;
|
|
200
|
-
slip44: number;
|
|
201
|
-
support: {
|
|
202
|
-
T1B1: string | false;
|
|
203
|
-
T2T1: string | false;
|
|
204
|
-
T3T1: string | false;
|
|
205
|
-
T2B1: string | false;
|
|
206
|
-
T3B1: string | false;
|
|
207
|
-
T3W1: string | false;
|
|
208
|
-
UNKNOWN: string | false;
|
|
209
|
-
};
|
|
210
|
-
decimals: number;
|
|
211
|
-
blockTime: number;
|
|
212
|
-
minFee: number;
|
|
213
|
-
maxFee: number;
|
|
214
|
-
minPriorityFee: number;
|
|
215
|
-
defaultFees: {
|
|
216
|
-
feePerTx?: string | undefined;
|
|
217
|
-
feeLimit?: string | undefined;
|
|
218
|
-
baseFeePerGas?: string | undefined;
|
|
219
|
-
maxFeePerGas?: string | undefined;
|
|
220
|
-
maxPriorityFeePerGas?: string | undefined;
|
|
221
|
-
label: "high" | "normal" | "economy" | "low" | "custom";
|
|
222
|
-
blocks: number;
|
|
223
|
-
feePerUnit: string;
|
|
224
|
-
}[];
|
|
225
|
-
} & {
|
|
226
|
-
network?: undefined;
|
|
227
|
-
type: "misc";
|
|
228
|
-
curve: string;
|
|
229
|
-
}> | undefined;
|
|
230
|
-
export declare const getCoinName: (path: number[]) => string;
|
|
231
|
-
export declare const ethereumNetworkInfoBase: {
|
|
232
|
-
type: "ethereum";
|
|
233
|
-
decimals: number;
|
|
234
|
-
};
|
|
235
|
-
export declare const getUniqueNetworks: <T extends {
|
|
236
|
-
shortcut: string;
|
|
237
|
-
}>(networks: (T | undefined)[]) => T[];
|
|
238
|
-
export declare const getAllNetworks: () => (({
|
|
239
|
-
blockchainLink?: {
|
|
240
|
-
type: string;
|
|
241
|
-
url: string[];
|
|
242
|
-
} | undefined;
|
|
243
|
-
label: string;
|
|
244
|
-
name: string;
|
|
245
|
-
shortcut: string;
|
|
246
|
-
slip44: number;
|
|
247
|
-
support: {
|
|
248
|
-
T1B1: string | false;
|
|
249
|
-
T2T1: string | false;
|
|
250
|
-
T3T1: string | false;
|
|
251
|
-
T2B1: string | false;
|
|
252
|
-
T3B1: string | false;
|
|
253
|
-
T3W1: string | false;
|
|
254
|
-
UNKNOWN: string | false;
|
|
255
|
-
};
|
|
256
|
-
decimals: number;
|
|
257
|
-
blockTime: number;
|
|
258
|
-
minFee: number;
|
|
259
|
-
maxFee: number;
|
|
260
|
-
minPriorityFee: number;
|
|
261
|
-
defaultFees: {
|
|
262
|
-
feePerTx?: string | undefined;
|
|
263
|
-
feeLimit?: string | undefined;
|
|
264
|
-
baseFeePerGas?: string | undefined;
|
|
265
|
-
maxFeePerGas?: string | undefined;
|
|
266
|
-
maxPriorityFeePerGas?: string | undefined;
|
|
267
|
-
label: "high" | "normal" | "economy" | "low" | "custom";
|
|
268
|
-
blocks: number;
|
|
269
|
-
feePerUnit: string;
|
|
270
|
-
}[];
|
|
271
|
-
} & {
|
|
272
|
-
taproot?: boolean | undefined;
|
|
273
|
-
cashAddrPrefix?: string | undefined;
|
|
274
|
-
xPubMagicSegwitNative?: number | undefined;
|
|
275
|
-
xPubMagicSegwit?: number | undefined;
|
|
276
|
-
type: "bitcoin";
|
|
277
|
-
curveName: string;
|
|
278
|
-
dustLimit: number;
|
|
279
|
-
forceBip143: boolean;
|
|
280
|
-
hashGenesisBlock: string;
|
|
281
|
-
maxAddressLength: number;
|
|
282
|
-
maxFeeSatoshiKb: number;
|
|
283
|
-
minAddressLength: number;
|
|
284
|
-
minFeeSatoshiKb: number;
|
|
285
|
-
segwit: boolean;
|
|
286
|
-
xPubMagic: number;
|
|
287
|
-
network: {
|
|
288
|
-
forkId?: number | undefined;
|
|
289
|
-
messagePrefix: string;
|
|
290
|
-
bech32: string;
|
|
291
|
-
bip32: {
|
|
292
|
-
public: number;
|
|
293
|
-
private: number;
|
|
294
|
-
};
|
|
295
|
-
pubKeyHash: number;
|
|
296
|
-
scriptHash: number;
|
|
297
|
-
wif: number;
|
|
298
|
-
};
|
|
299
|
-
isBitcoin: boolean;
|
|
300
|
-
}) | ({
|
|
301
|
-
blockchainLink?: {
|
|
302
|
-
type: string;
|
|
303
|
-
url: string[];
|
|
304
|
-
} | undefined;
|
|
305
|
-
label: string;
|
|
306
|
-
name: string;
|
|
307
|
-
shortcut: string;
|
|
308
|
-
slip44: number;
|
|
309
|
-
support: {
|
|
310
|
-
T1B1: string | false;
|
|
311
|
-
T2T1: string | false;
|
|
312
|
-
T3T1: string | false;
|
|
313
|
-
T2B1: string | false;
|
|
314
|
-
T3B1: string | false;
|
|
315
|
-
T3W1: string | false;
|
|
316
|
-
UNKNOWN: string | false;
|
|
317
|
-
};
|
|
318
|
-
decimals: number;
|
|
319
|
-
blockTime: number;
|
|
320
|
-
minFee: number;
|
|
321
|
-
maxFee: number;
|
|
322
|
-
minPriorityFee: number;
|
|
323
|
-
defaultFees: {
|
|
324
|
-
feePerTx?: string | undefined;
|
|
325
|
-
feeLimit?: string | undefined;
|
|
326
|
-
baseFeePerGas?: string | undefined;
|
|
327
|
-
maxFeePerGas?: string | undefined;
|
|
328
|
-
maxPriorityFeePerGas?: string | undefined;
|
|
329
|
-
label: "high" | "normal" | "economy" | "low" | "custom";
|
|
330
|
-
blocks: number;
|
|
331
|
-
feePerUnit: string;
|
|
332
|
-
}[];
|
|
333
|
-
} & {
|
|
334
|
-
network?: undefined;
|
|
335
|
-
type: "ethereum";
|
|
336
|
-
chainId: number;
|
|
337
|
-
}) | ({
|
|
338
|
-
blockchainLink?: {
|
|
339
|
-
type: string;
|
|
340
|
-
url: string[];
|
|
341
|
-
} | undefined;
|
|
342
|
-
label: string;
|
|
343
|
-
name: string;
|
|
344
|
-
shortcut: string;
|
|
345
|
-
slip44: number;
|
|
346
|
-
support: {
|
|
347
|
-
T1B1: string | false;
|
|
348
|
-
T2T1: string | false;
|
|
349
|
-
T3T1: string | false;
|
|
350
|
-
T2B1: string | false;
|
|
351
|
-
T3B1: string | false;
|
|
352
|
-
T3W1: string | false;
|
|
353
|
-
UNKNOWN: string | false;
|
|
354
|
-
};
|
|
355
|
-
decimals: number;
|
|
356
|
-
blockTime: number;
|
|
357
|
-
minFee: number;
|
|
358
|
-
maxFee: number;
|
|
359
|
-
minPriorityFee: number;
|
|
360
|
-
defaultFees: {
|
|
361
|
-
feePerTx?: string | undefined;
|
|
362
|
-
feeLimit?: string | undefined;
|
|
363
|
-
baseFeePerGas?: string | undefined;
|
|
364
|
-
maxFeePerGas?: string | undefined;
|
|
365
|
-
maxPriorityFeePerGas?: string | undefined;
|
|
366
|
-
label: "high" | "normal" | "economy" | "low" | "custom";
|
|
367
|
-
blocks: number;
|
|
368
|
-
feePerUnit: string;
|
|
369
|
-
}[];
|
|
370
|
-
} & {
|
|
371
|
-
network?: undefined;
|
|
372
|
-
type: "misc";
|
|
373
|
-
curve: string;
|
|
374
|
-
}))[];
|
package/libESM/data/coinInfo.mjs
DELETED
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
import coinsEth from "@trezor/connect-data/files/coins-eth.json" with { type: "json" };
|
|
2
|
-
import coins from "@trezor/connect-data/files/coins.json" with { type: "json" };
|
|
3
|
-
import { cloneObject } from "@trezor/utils";
|
|
4
|
-
import { getBitcoinFeeLevels, getEthereumFeeLevels, getMiscFeeLevels } from "./defaultFeeLevels.mjs";
|
|
5
|
-
import { fromHardened, toHardened } from "../utils/pathUtils.mjs";
|
|
6
|
-
const bitcoinNetworks = [];
|
|
7
|
-
const ethereumNetworks = [];
|
|
8
|
-
const miscNetworks = [];
|
|
9
|
-
export const getBitcoinNetwork = pathOrName => {
|
|
10
|
-
if (typeof pathOrName === 'string') {
|
|
11
|
-
const name = pathOrName.toLowerCase();
|
|
12
|
-
return bitcoinNetworks.find(n => n.name.toLowerCase() === name || n.shortcut.toLowerCase() === name || n.label.toLowerCase() === name);
|
|
13
|
-
}
|
|
14
|
-
const slip44 = fromHardened(pathOrName[1]);
|
|
15
|
-
return bitcoinNetworks.find(n => n.slip44 === slip44);
|
|
16
|
-
};
|
|
17
|
-
export const getEthereumNetwork = pathOrNetworkSymbol => {
|
|
18
|
-
if (typeof pathOrNetworkSymbol === 'string') {
|
|
19
|
-
const networkSymbol = pathOrNetworkSymbol.toLowerCase();
|
|
20
|
-
return ethereumNetworks.find(network => network.shortcut.toLowerCase() === networkSymbol);
|
|
21
|
-
}
|
|
22
|
-
const slip44 = fromHardened(pathOrNetworkSymbol[1]);
|
|
23
|
-
return ethereumNetworks.find(n => n.slip44 === slip44);
|
|
24
|
-
};
|
|
25
|
-
export const getMiscNetwork = pathOrName => {
|
|
26
|
-
if (typeof pathOrName === 'string') {
|
|
27
|
-
const name = pathOrName.toLowerCase();
|
|
28
|
-
return miscNetworks.find(n => n.name.toLowerCase() === name || n.shortcut.toLowerCase() === name);
|
|
29
|
-
}
|
|
30
|
-
const slip44 = fromHardened(pathOrName[1]);
|
|
31
|
-
return miscNetworks.find(n => n.slip44 === slip44);
|
|
32
|
-
};
|
|
33
|
-
export const getSegwitNetwork = coin => {
|
|
34
|
-
if (coin.segwit && typeof coin.xPubMagicSegwit === 'number') {
|
|
35
|
-
return {
|
|
36
|
-
...coin.network,
|
|
37
|
-
bip32: {
|
|
38
|
-
...coin.network.bip32,
|
|
39
|
-
public: coin.xPubMagicSegwit
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
return null;
|
|
44
|
-
};
|
|
45
|
-
export const getBech32Network = coin => {
|
|
46
|
-
if (coin.segwit && typeof coin.xPubMagicSegwitNative === 'number') {
|
|
47
|
-
return {
|
|
48
|
-
...coin.network,
|
|
49
|
-
bip32: {
|
|
50
|
-
...coin.network.bip32,
|
|
51
|
-
public: coin.xPubMagicSegwitNative
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
return null;
|
|
56
|
-
};
|
|
57
|
-
export const fixCoinInfoNetwork = (ci, path) => {
|
|
58
|
-
const coinInfo = cloneObject(ci);
|
|
59
|
-
if (path[0] === toHardened(84)) {
|
|
60
|
-
const bech32Network = getBech32Network(coinInfo);
|
|
61
|
-
if (bech32Network) {
|
|
62
|
-
coinInfo.network = bech32Network;
|
|
63
|
-
}
|
|
64
|
-
} else if (path[0] === toHardened(49)) {
|
|
65
|
-
const segwitNetwork = getSegwitNetwork(coinInfo);
|
|
66
|
-
if (segwitNetwork) {
|
|
67
|
-
coinInfo.network = segwitNetwork;
|
|
68
|
-
}
|
|
69
|
-
} else {
|
|
70
|
-
coinInfo.segwit = false;
|
|
71
|
-
}
|
|
72
|
-
return coinInfo;
|
|
73
|
-
};
|
|
74
|
-
export const getCoinInfo = currency => getBitcoinNetwork(currency) || getEthereumNetwork(currency) || getMiscNetwork(currency);
|
|
75
|
-
export const getCoinName = path => {
|
|
76
|
-
const slip44 = fromHardened(path[1]);
|
|
77
|
-
const network = ethereumNetworks.find(n => n.slip44 === slip44);
|
|
78
|
-
return network ? network.name : 'Unknown coin';
|
|
79
|
-
};
|
|
80
|
-
const BITCOIN_SHORTCUTS = ['BTC', 'TEST', 'REGTEST'];
|
|
81
|
-
const parseBitcoinNetworksJson = json => {
|
|
82
|
-
Object.keys(json).forEach(key => {
|
|
83
|
-
const coin = json[key];
|
|
84
|
-
const shortcut = coin.coin_shortcut;
|
|
85
|
-
const isBitcoin = BITCOIN_SHORTCUTS.includes(shortcut);
|
|
86
|
-
const network = {
|
|
87
|
-
messagePrefix: coin.signed_message_header,
|
|
88
|
-
bech32: coin.bech32_prefix,
|
|
89
|
-
bip32: {
|
|
90
|
-
public: coin.xpub_magic,
|
|
91
|
-
private: coin.xprv_magic
|
|
92
|
-
},
|
|
93
|
-
pubKeyHash: coin.address_type,
|
|
94
|
-
scriptHash: coin.address_type_p2sh,
|
|
95
|
-
forkId: coin.fork_id,
|
|
96
|
-
wif: 0
|
|
97
|
-
};
|
|
98
|
-
bitcoinNetworks.push({
|
|
99
|
-
type: 'bitcoin',
|
|
100
|
-
blockchainLink: coin.blockchain_link,
|
|
101
|
-
cashAddrPrefix: coin.cashaddr_prefix,
|
|
102
|
-
label: coin.coin_label,
|
|
103
|
-
name: coin.coin_name,
|
|
104
|
-
shortcut,
|
|
105
|
-
curveName: coin.curve_name,
|
|
106
|
-
forceBip143: coin.force_bip143,
|
|
107
|
-
hashGenesisBlock: coin.hash_genesis_block,
|
|
108
|
-
maxAddressLength: coin.max_address_length,
|
|
109
|
-
maxFeeSatoshiKb: coin.maxfee_kb,
|
|
110
|
-
minAddressLength: coin.min_address_length,
|
|
111
|
-
minFeeSatoshiKb: coin.minfee_kb,
|
|
112
|
-
segwit: coin.segwit,
|
|
113
|
-
slip44: coin.slip44,
|
|
114
|
-
support: coin.support,
|
|
115
|
-
xPubMagic: coin.xpub_magic,
|
|
116
|
-
xPubMagicSegwitNative: coin.xpub_magic_segwit_native,
|
|
117
|
-
xPubMagicSegwit: coin.xpub_magic_segwit_p2sh,
|
|
118
|
-
taproot: coin.taproot,
|
|
119
|
-
network,
|
|
120
|
-
isBitcoin,
|
|
121
|
-
decimals: coin.decimals,
|
|
122
|
-
...getBitcoinFeeLevels(coin)
|
|
123
|
-
});
|
|
124
|
-
});
|
|
125
|
-
};
|
|
126
|
-
export const ethereumNetworkInfoBase = {
|
|
127
|
-
type: 'ethereum',
|
|
128
|
-
decimals: 18
|
|
129
|
-
};
|
|
130
|
-
const parseEthereumNetworksJson = json => {
|
|
131
|
-
Object.keys(json).forEach(key => {
|
|
132
|
-
const network = json[key];
|
|
133
|
-
ethereumNetworks.push({
|
|
134
|
-
...ethereumNetworkInfoBase,
|
|
135
|
-
...getEthereumFeeLevels(network),
|
|
136
|
-
blockchainLink: network.blockchain_link,
|
|
137
|
-
chainId: network.chain_id,
|
|
138
|
-
label: network.label,
|
|
139
|
-
name: network.name,
|
|
140
|
-
shortcut: network.shortcut,
|
|
141
|
-
slip44: network.slip44,
|
|
142
|
-
support: network.support
|
|
143
|
-
});
|
|
144
|
-
});
|
|
145
|
-
};
|
|
146
|
-
const parseMiscNetworksJSON = json => {
|
|
147
|
-
Object.keys(json).forEach(key => {
|
|
148
|
-
const network = json[key];
|
|
149
|
-
miscNetworks.push({
|
|
150
|
-
type: 'misc',
|
|
151
|
-
blockchainLink: network.blockchain_link,
|
|
152
|
-
curve: network.curve,
|
|
153
|
-
label: network.name,
|
|
154
|
-
name: network.name,
|
|
155
|
-
shortcut: network.shortcut,
|
|
156
|
-
slip44: network.slip44,
|
|
157
|
-
support: network.support,
|
|
158
|
-
decimals: network.decimals,
|
|
159
|
-
...getMiscFeeLevels(network)
|
|
160
|
-
});
|
|
161
|
-
});
|
|
162
|
-
};
|
|
163
|
-
const parseCoinsJson = json => {
|
|
164
|
-
Object.keys(json).forEach(key => {
|
|
165
|
-
switch (key) {
|
|
166
|
-
case 'bitcoin':
|
|
167
|
-
return parseBitcoinNetworksJson(json[key]);
|
|
168
|
-
case 'eth':
|
|
169
|
-
return parseEthereumNetworksJson(json[key]);
|
|
170
|
-
case 'misc':
|
|
171
|
-
return parseMiscNetworksJSON(json[key]);
|
|
172
|
-
}
|
|
173
|
-
});
|
|
174
|
-
};
|
|
175
|
-
export const getUniqueNetworks = networks => networks.reduce((result, info) => {
|
|
176
|
-
if (!info || result.find(i => i.shortcut === info.shortcut)) return result;
|
|
177
|
-
return result.concat(info);
|
|
178
|
-
}, []);
|
|
179
|
-
export const getAllNetworks = () => [...bitcoinNetworks, ...ethereumNetworks, ...miscNetworks];
|
|
180
|
-
parseCoinsJson({
|
|
181
|
-
...coins,
|
|
182
|
-
...coinsEth
|
|
183
|
-
});
|
package/libESM/data/config.d.mts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { FirmwareRule } from '@trezor/connect-common';
|
|
2
|
-
import { TREZOR_USB_DESCRIPTORS } from '@trezor/transport/libESM/constants';
|
|
3
|
-
type Config = {
|
|
4
|
-
webusb: typeof TREZOR_USB_DESCRIPTORS;
|
|
5
|
-
supportedFirmware: Array<FirmwareRule>;
|
|
6
|
-
};
|
|
7
|
-
export declare const config: Config;
|
|
8
|
-
export {};
|