@trezor/connect 9.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +50 -0
- package/README.md +38 -0
- package/lib/api/applyFlags.d.ts +8 -0
- package/lib/api/applyFlags.js +37 -0
- package/lib/api/applySettings.d.ts +8 -0
- package/lib/api/applySettings.js +57 -0
- package/lib/api/authorizeCoinJoin.d.ts +7 -0
- package/lib/api/authorizeCoinJoin.js +45 -0
- package/lib/api/backupDevice.d.ts +7 -0
- package/lib/api/backupDevice.js +31 -0
- package/lib/api/binance/binanceSignTx.d.ts +6 -0
- package/lib/api/binance/binanceSignTx.js +91 -0
- package/lib/api/binanceGetAddress.d.ts +22 -0
- package/lib/api/binanceGetAddress.js +126 -0
- package/lib/api/binanceGetPublicKey.d.ts +10 -0
- package/lib/api/binanceGetPublicKey.js +72 -0
- package/lib/api/binanceSignTransaction.d.ts +12 -0
- package/lib/api/binanceSignTransaction.js +31 -0
- package/lib/api/bitcoin/Fees.d.ts +15 -0
- package/lib/api/bitcoin/Fees.js +175 -0
- package/lib/api/bitcoin/TransactionComposer.d.ts +36 -0
- package/lib/api/bitcoin/TransactionComposer.js +150 -0
- package/lib/api/bitcoin/__fixtures__/inputs.d.ts +112 -0
- package/lib/api/bitcoin/__fixtures__/inputs.js +102 -0
- package/lib/api/bitcoin/__fixtures__/signtxVerify.d.ts +147 -0
- package/lib/api/bitcoin/__fixtures__/signtxVerify.js +216 -0
- package/lib/api/bitcoin/enhanceSignTx.d.ts +4 -0
- package/lib/api/bitcoin/enhanceSignTx.js +63 -0
- package/lib/api/bitcoin/index.d.ts +10 -0
- package/lib/api/bitcoin/index.js +13 -0
- package/lib/api/bitcoin/inputs.d.ts +8 -0
- package/lib/api/bitcoin/inputs.js +60 -0
- package/lib/api/bitcoin/outputs.d.ts +8 -0
- package/lib/api/bitcoin/outputs.js +115 -0
- package/lib/api/bitcoin/refTx.d.ts +11 -0
- package/lib/api/bitcoin/refTx.js +220 -0
- package/lib/api/bitcoin/signtx.d.ts +25 -0
- package/lib/api/bitcoin/signtx.js +164 -0
- package/lib/api/bitcoin/signtxLegacy.d.ts +4 -0
- package/lib/api/bitcoin/signtxLegacy.js +136 -0
- package/lib/api/bitcoin/signtxVerify.d.ts +8 -0
- package/lib/api/bitcoin/signtxVerify.js +130 -0
- package/lib/api/blockchainDisconnect.d.ts +13 -0
- package/lib/api/blockchainDisconnect.js +34 -0
- package/lib/api/blockchainEstimateFee.d.ts +12 -0
- package/lib/api/blockchainEstimateFee.js +70 -0
- package/lib/api/blockchainGetAccountBalanceHistory.d.ts +12 -0
- package/lib/api/blockchainGetAccountBalanceHistory.js +41 -0
- package/lib/api/blockchainGetCurrentFiatRates.d.ts +15 -0
- package/lib/api/blockchainGetCurrentFiatRates.js +33 -0
- package/lib/api/blockchainGetFiatRatesForTimestamps.d.ts +17 -0
- package/lib/api/blockchainGetFiatRatesForTimestamps.js +33 -0
- package/lib/api/blockchainGetTransactions.d.ts +12 -0
- package/lib/api/blockchainGetTransactions.js +33 -0
- package/lib/api/blockchainSetCustomBackend.d.ts +11 -0
- package/lib/api/blockchainSetCustomBackend.js +38 -0
- package/lib/api/blockchainSubscribe.d.ts +14 -0
- package/lib/api/blockchainSubscribe.js +38 -0
- package/lib/api/blockchainSubscribeFiatRates.d.ts +14 -0
- package/lib/api/blockchainSubscribeFiatRates.js +33 -0
- package/lib/api/blockchainUnsubscribe.d.ts +14 -0
- package/lib/api/blockchainUnsubscribe.js +38 -0
- package/lib/api/blockchainUnsubscribeFiatRates.d.ts +13 -0
- package/lib/api/blockchainUnsubscribeFiatRates.js +29 -0
- package/lib/api/cardano/cardanoAddressParameters.d.ts +8 -0
- package/lib/api/cardano/cardanoAddressParameters.js +100 -0
- package/lib/api/cardano/cardanoAuxiliaryData.d.ts +6 -0
- package/lib/api/cardano/cardanoAuxiliaryData.js +51 -0
- package/lib/api/cardano/cardanoCertificate.d.ts +14 -0
- package/lib/api/cardano/cardanoCertificate.js +149 -0
- package/lib/api/cardano/cardanoInputs.d.ts +13 -0
- package/lib/api/cardano/cardanoInputs.js +34 -0
- package/lib/api/cardano/cardanoOutputs.d.ts +8 -0
- package/lib/api/cardano/cardanoOutputs.js +38 -0
- package/lib/api/cardano/cardanoTokenBundle.d.ts +8 -0
- package/lib/api/cardano/cardanoTokenBundle.js +36 -0
- package/lib/api/cardano/cardanoWitnesses.d.ts +5 -0
- package/lib/api/cardano/cardanoWitnesses.js +48 -0
- package/lib/api/cardanoGetAddress.d.ts +23 -0
- package/lib/api/cardanoGetAddress.js +158 -0
- package/lib/api/cardanoGetNativeScriptHash.d.ts +12 -0
- package/lib/api/cardanoGetNativeScriptHash.js +79 -0
- package/lib/api/cardanoGetPublicKey.d.ts +10 -0
- package/lib/api/cardanoGetPublicKey.js +78 -0
- package/lib/api/cardanoSignTransaction.d.ts +48 -0
- package/lib/api/cardanoSignTransaction.js +283 -0
- package/lib/api/changePin.d.ts +7 -0
- package/lib/api/changePin.js +22 -0
- package/lib/api/cipherKeyValue.d.ts +8 -0
- package/lib/api/cipherKeyValue.js +56 -0
- package/lib/api/common/Discovery.d.ts +35 -0
- package/lib/api/common/Discovery.js +113 -0
- package/lib/api/common/__fixtures__/paramsValidator.d.ts +596 -0
- package/lib/api/common/__fixtures__/paramsValidator.js +355 -0
- package/lib/api/common/paramsValidator.d.ts +14 -0
- package/lib/api/common/paramsValidator.js +140 -0
- package/lib/api/composeTransaction.d.ts +33 -0
- package/lib/api/composeTransaction.js +270 -0
- package/lib/api/customMessage.d.ts +13 -0
- package/lib/api/customMessage.js +56 -0
- package/lib/api/eos/eosSignTx.d.ts +17 -0
- package/lib/api/eos/eosSignTx.js +347 -0
- package/lib/api/eosGetPublicKey.d.ts +10 -0
- package/lib/api/eosGetPublicKey.js +73 -0
- package/lib/api/eosSignTransaction.d.ts +16 -0
- package/lib/api/eosSignTransaction.js +36 -0
- package/lib/api/ethereum/__fixtures__/ethereumSignTypedData.d.ts +225 -0
- package/lib/api/ethereum/__fixtures__/ethereumSignTypedData.js +341 -0
- package/lib/api/ethereum/ethereumSignTx.d.ts +13 -0
- package/lib/api/ethereum/ethereumSignTx.js +92 -0
- package/lib/api/ethereum/ethereumSignTypedData.d.ts +9 -0
- package/lib/api/ethereum/ethereumSignTypedData.js +120 -0
- package/lib/api/ethereumGetAddress.d.ts +28 -0
- package/lib/api/ethereumGetAddress.js +133 -0
- package/lib/api/ethereumGetPublicKey.d.ts +15 -0
- package/lib/api/ethereumGetPublicKey.js +79 -0
- package/lib/api/ethereumSignMessage.d.ts +7 -0
- package/lib/api/ethereumSignMessage.js +41 -0
- package/lib/api/ethereumSignTransaction.d.ts +20 -0
- package/lib/api/ethereumSignTransaction.js +82 -0
- package/lib/api/ethereumSignTypedData.d.ts +14 -0
- package/lib/api/ethereumSignTypedData.js +151 -0
- package/lib/api/ethereumVerifyMessage.d.ts +7 -0
- package/lib/api/ethereumVerifyMessage.js +34 -0
- package/lib/api/firmware/getBinary.d.ts +20 -0
- package/lib/api/firmware/getBinary.js +37 -0
- package/lib/api/firmware/modifyFirmware.d.ts +6 -0
- package/lib/api/firmware/modifyFirmware.js +18 -0
- package/lib/api/firmwareUpdate.d.ts +15 -0
- package/lib/api/firmwareUpdate.js +89 -0
- package/lib/api/getAccountInfo.d.ts +98 -0
- package/lib/api/getAccountInfo.js +326 -0
- package/lib/api/getAddress.d.ts +28 -0
- package/lib/api/getAddress.js +152 -0
- package/lib/api/getCoinInfo.d.ts +11 -0
- package/lib/api/getCoinInfo.js +27 -0
- package/lib/api/getDeviceState.d.ts +8 -0
- package/lib/api/getDeviceState.js +15 -0
- package/lib/api/getFeatures.d.ts +6 -0
- package/lib/api/getFeatures.js +18 -0
- package/lib/api/getOwnershipId.d.ts +10 -0
- package/lib/api/getOwnershipId.js +75 -0
- package/lib/api/getOwnershipProof.d.ts +14 -0
- package/lib/api/getOwnershipProof.js +86 -0
- package/lib/api/getPublicKey.d.ts +15 -0
- package/lib/api/getPublicKey.js +84 -0
- package/lib/api/getSettings.d.ts +6 -0
- package/lib/api/getSettings.js +16 -0
- package/lib/api/index.d.ts +64 -0
- package/lib/api/index.js +134 -0
- package/lib/api/management/uploadFirmware.d.ts +6 -0
- package/lib/api/management/uploadFirmware.js +49 -0
- package/lib/api/nem/nemSignTx.d.ts +4 -0
- package/lib/api/nem/nemSignTx.js +139 -0
- package/lib/api/nemGetAddress.d.ts +22 -0
- package/lib/api/nemGetAddress.js +144 -0
- package/lib/api/nemSignTransaction.d.ts +7 -0
- package/lib/api/nemSignTransaction.js +29 -0
- package/lib/api/pushTransaction.d.ts +14 -0
- package/lib/api/pushTransaction.js +40 -0
- package/lib/api/rebootToBootloader.d.ts +8 -0
- package/lib/api/rebootToBootloader.js +43 -0
- package/lib/api/recoveryDevice.d.ts +8 -0
- package/lib/api/recoveryDevice.js +57 -0
- package/lib/api/requestLogin.d.ts +12 -0
- package/lib/api/requestLogin.js +63 -0
- package/lib/api/resetDevice.d.ts +9 -0
- package/lib/api/resetDevice.js +59 -0
- package/lib/api/rippleGetAddress.d.ts +22 -0
- package/lib/api/rippleGetAddress.js +126 -0
- package/lib/api/rippleSignTransaction.d.ts +10 -0
- package/lib/api/rippleSignTransaction.js +54 -0
- package/lib/api/setProxy.d.ts +8 -0
- package/lib/api/setProxy.js +26 -0
- package/lib/api/signMessage.d.ts +7 -0
- package/lib/api/signMessage.js +51 -0
- package/lib/api/signTransaction.d.ts +21 -0
- package/lib/api/signTransaction.js +146 -0
- package/lib/api/stellar/stellarSignTx.d.ts +5 -0
- package/lib/api/stellar/stellarSignTx.js +198 -0
- package/lib/api/stellarGetAddress.d.ts +22 -0
- package/lib/api/stellarGetAddress.js +126 -0
- package/lib/api/stellarSignTransaction.d.ts +23 -0
- package/lib/api/stellarSignTransaction.js +62 -0
- package/lib/api/tezos/tezosSignTx.d.ts +4 -0
- package/lib/api/tezos/tezosSignTx.js +237 -0
- package/lib/api/tezosGetAddress.d.ts +22 -0
- package/lib/api/tezosGetAddress.js +126 -0
- package/lib/api/tezosGetPublicKey.d.ts +10 -0
- package/lib/api/tezosGetPublicKey.js +72 -0
- package/lib/api/tezosSignTransaction.d.ts +7 -0
- package/lib/api/tezosSignTransaction.js +30 -0
- package/lib/api/verifyMessage.d.ts +7 -0
- package/lib/api/verifyMessage.js +47 -0
- package/lib/api/wipeDevice.d.ts +8 -0
- package/lib/api/wipeDevice.js +41 -0
- package/lib/backend/BlockchainLink.d.ts +75 -0
- package/lib/backend/BlockchainLink.js +298 -0
- package/lib/constants/cardano.d.ts +9 -0
- package/lib/constants/cardano.js +14 -0
- package/lib/constants/errors.d.ts +49 -0
- package/lib/constants/errors.js +62 -0
- package/lib/constants/index.d.ts +6 -0
- package/lib/constants/index.js +10 -0
- package/lib/constants/nem.d.ts +22 -0
- package/lib/constants/nem.js +28 -0
- package/lib/constants/network.d.ts +13 -0
- package/lib/constants/network.js +15 -0
- package/lib/core/AbstractMethod.d.ts +59 -0
- package/lib/core/AbstractMethod.js +159 -0
- package/lib/core/index.d.ts +16 -0
- package/lib/core/index.js +671 -0
- package/lib/core/method.d.ts +6 -0
- package/lib/core/method.js +19 -0
- package/lib/data/DataManager.d.ts +31 -0
- package/lib/data/DataManager.js +98 -0
- package/lib/data/coinInfo.d.ts +37 -0
- package/lib/data/coinInfo.js +278 -0
- package/lib/data/config.d.ts +98 -0
- package/lib/data/config.js +201 -0
- package/lib/data/connectSettings.d.ts +6 -0
- package/lib/data/connectSettings.js +150 -0
- package/lib/data/firmwareInfo.d.ts +11 -0
- package/lib/data/firmwareInfo.js +148 -0
- package/lib/data/transportInfo.d.ts +4 -0
- package/lib/data/transportInfo.js +29 -0
- package/lib/data/udevInfo.d.ts +3 -0
- package/lib/data/udevInfo.js +21 -0
- package/lib/data/version.d.ts +3 -0
- package/lib/data/version.js +7 -0
- package/lib/device/AbortController.d.ts +21 -0
- package/lib/device/AbortController.js +40 -0
- package/lib/device/DescriptorStream.d.ts +28 -0
- package/lib/device/DescriptorStream.js +139 -0
- package/lib/device/Device.d.ts +105 -0
- package/lib/device/Device.js +527 -0
- package/lib/device/DeviceCommands.d.ts +63 -0
- package/lib/device/DeviceCommands.js +465 -0
- package/lib/device/DeviceList.d.ts +76 -0
- package/lib/device/DeviceList.js +411 -0
- package/lib/events/blockchain.d.ts +56 -0
- package/lib/events/blockchain.js +18 -0
- package/lib/events/call.d.ts +41 -0
- package/lib/events/call.js +14 -0
- package/lib/events/core.d.ts +20 -0
- package/lib/events/core.js +28 -0
- package/lib/events/device.d.ts +40 -0
- package/lib/events/device.js +28 -0
- package/lib/events/iframe.d.ts +39 -0
- package/lib/events/iframe.js +18 -0
- package/lib/events/index.d.ts +62 -0
- package/lib/events/index.js +21 -0
- package/lib/events/popup.d.ts +51 -0
- package/lib/events/popup.js +22 -0
- package/lib/events/transport.d.ts +62 -0
- package/lib/events/transport.js +21 -0
- package/lib/events/ui-promise.d.ts +12 -0
- package/lib/events/ui-promise.js +3 -0
- package/lib/events/ui-request.d.ts +180 -0
- package/lib/events/ui-request.js +50 -0
- package/lib/events/ui-response.d.ts +97 -0
- package/lib/events/ui-response.js +25 -0
- package/lib/exports.d.ts +5 -0
- package/lib/exports.js +10 -0
- package/lib/factory.d.ts +20 -0
- package/lib/factory.js +122 -0
- package/lib/index-browser.d.ts +4 -0
- package/lib/index-browser.js +29 -0
- package/lib/index.d.ts +11 -0
- package/lib/index.js +236 -0
- package/lib/types/account.d.ts +37 -0
- package/lib/types/account.js +3 -0
- package/lib/types/api/applyFlags.d.ts +4 -0
- package/lib/types/api/applyFlags.js +3 -0
- package/lib/types/api/applySettings.d.ts +4 -0
- package/lib/types/api/applySettings.js +3 -0
- package/lib/types/api/authorizeCoinJoin.d.ts +14 -0
- package/lib/types/api/authorizeCoinJoin.js +3 -0
- package/lib/types/api/backupDevice.d.ts +4 -0
- package/lib/types/api/backupDevice.js +3 -0
- package/lib/types/api/binanceGetAddress.d.ts +4 -0
- package/lib/types/api/binanceGetAddress.js +3 -0
- package/lib/types/api/binanceGetPublicKey.d.ts +4 -0
- package/lib/types/api/binanceGetPublicKey.js +3 -0
- package/lib/types/api/binanceSignTransaction.d.ts +31 -0
- package/lib/types/api/binanceSignTransaction.js +3 -0
- package/lib/types/api/blockchainDisconnect.d.ts +5 -0
- package/lib/types/api/blockchainDisconnect.js +3 -0
- package/lib/types/api/blockchainEstimateFee.d.ts +29 -0
- package/lib/types/api/blockchainEstimateFee.js +3 -0
- package/lib/types/api/blockchainGetAccountBalanceHistory.d.ts +4 -0
- package/lib/types/api/blockchainGetAccountBalanceHistory.js +3 -0
- package/lib/types/api/blockchainGetCurrentFiatRates.d.ts +4 -0
- package/lib/types/api/blockchainGetCurrentFiatRates.js +3 -0
- package/lib/types/api/blockchainGetFiatRatesForTimestamps.d.ts +4 -0
- package/lib/types/api/blockchainGetFiatRatesForTimestamps.js +3 -0
- package/lib/types/api/blockchainGetTransactions.d.ts +7 -0
- package/lib/types/api/blockchainGetTransactions.js +3 -0
- package/lib/types/api/blockchainSetCustomBackend.d.ts +7 -0
- package/lib/types/api/blockchainSetCustomBackend.js +3 -0
- package/lib/types/api/blockchainSubscribe.d.ts +7 -0
- package/lib/types/api/blockchainSubscribe.js +3 -0
- package/lib/types/api/blockchainSubscribeFiatRates.d.ts +7 -0
- package/lib/types/api/blockchainSubscribeFiatRates.js +3 -0
- package/lib/types/api/blockchainUnsubscribe.d.ts +5 -0
- package/lib/types/api/blockchainUnsubscribe.js +3 -0
- package/lib/types/api/blockchainUnsubscribeFiatRates.d.ts +5 -0
- package/lib/types/api/blockchainUnsubscribeFiatRates.js +3 -0
- package/lib/types/api/cancel.d.ts +2 -0
- package/lib/types/api/cancel.js +3 -0
- package/lib/types/api/cardanoGetAddress.d.ts +35 -0
- package/lib/types/api/cardanoGetAddress.js +3 -0
- package/lib/types/api/cardanoGetNativeScriptHash.d.ts +21 -0
- package/lib/types/api/cardanoGetNativeScriptHash.js +3 -0
- package/lib/types/api/cardanoGetPublicKey.d.ts +16 -0
- package/lib/types/api/cardanoGetPublicKey.js +3 -0
- package/lib/types/api/cardanoSignTransaction.d.ts +130 -0
- package/lib/types/api/cardanoSignTransaction.js +3 -0
- package/lib/types/api/changePin.d.ts +4 -0
- package/lib/types/api/changePin.js +3 -0
- package/lib/types/api/cipherKeyValue.d.ts +17 -0
- package/lib/types/api/cipherKeyValue.js +3 -0
- package/lib/types/api/composeTransaction.d.ts +92 -0
- package/lib/types/api/composeTransaction.js +3 -0
- package/lib/types/api/customMessage.d.ts +12 -0
- package/lib/types/api/customMessage.js +3 -0
- package/lib/types/api/disableWebUSB.d.ts +2 -0
- package/lib/types/api/disableWebUSB.js +3 -0
- package/lib/types/api/dispose.d.ts +2 -0
- package/lib/types/api/dispose.js +3 -0
- package/lib/types/api/eosGetPublicKey.d.ts +14 -0
- package/lib/types/api/eosGetPublicKey.js +3 -0
- package/lib/types/api/eosSignTransaction.d.ts +111 -0
- package/lib/types/api/eosSignTransaction.js +3 -0
- package/lib/types/api/ethereumGetAddress.d.ts +4 -0
- package/lib/types/api/ethereumGetAddress.js +3 -0
- package/lib/types/api/ethereumGetPublicKey.d.ts +5 -0
- package/lib/types/api/ethereumGetPublicKey.js +3 -0
- package/lib/types/api/ethereumSignMessage.d.ts +9 -0
- package/lib/types/api/ethereumSignMessage.js +3 -0
- package/lib/types/api/ethereumSignTransaction.d.ts +40 -0
- package/lib/types/api/ethereumSignTransaction.js +3 -0
- package/lib/types/api/ethereumSignTypedData.d.ts +42 -0
- package/lib/types/api/ethereumSignTypedData.js +3 -0
- package/lib/types/api/ethereumVerifyMessage.d.ts +10 -0
- package/lib/types/api/ethereumVerifyMessage.js +3 -0
- package/lib/types/api/firmwareUpdate.d.ts +14 -0
- package/lib/types/api/firmwareUpdate.js +3 -0
- package/lib/types/api/getAccountInfo.d.ts +14 -0
- package/lib/types/api/getAccountInfo.js +3 -0
- package/lib/types/api/getAddress.d.ts +13 -0
- package/lib/types/api/getAddress.js +3 -0
- package/lib/types/api/getCoinInfo.d.ts +4 -0
- package/lib/types/api/getCoinInfo.js +3 -0
- package/lib/types/api/getDeviceState.d.ts +6 -0
- package/lib/types/api/getDeviceState.js +3 -0
- package/lib/types/api/getFeatures.d.ts +4 -0
- package/lib/types/api/getFeatures.js +3 -0
- package/lib/types/api/getOwnershipId.d.ts +15 -0
- package/lib/types/api/getOwnershipId.js +3 -0
- package/lib/types/api/getOwnershipProof.d.ts +19 -0
- package/lib/types/api/getOwnershipProof.js +3 -0
- package/lib/types/api/getPublicKey.d.ts +19 -0
- package/lib/types/api/getPublicKey.js +3 -0
- package/lib/types/api/getSettings.d.ts +4 -0
- package/lib/types/api/getSettings.js +3 -0
- package/lib/types/api/index.d.ts +149 -0
- package/lib/types/api/index.js +3 -0
- package/lib/types/api/init.d.ts +5 -0
- package/lib/types/api/init.js +3 -0
- package/lib/types/api/manifest.d.ts +3 -0
- package/lib/types/api/manifest.js +3 -0
- package/lib/types/api/nemGetAddress.d.ts +7 -0
- package/lib/types/api/nemGetAddress.js +3 -0
- package/lib/types/api/nemSignTransaction.d.ts +92 -0
- package/lib/types/api/nemSignTransaction.js +3 -0
- package/lib/types/api/off.d.ts +11 -0
- package/lib/types/api/off.js +3 -0
- package/lib/types/api/on.d.ts +14 -0
- package/lib/types/api/on.js +3 -0
- package/lib/types/api/pushTransaction.d.ts +10 -0
- package/lib/types/api/pushTransaction.js +3 -0
- package/lib/types/api/rebootToBootloader.d.ts +4 -0
- package/lib/types/api/rebootToBootloader.js +3 -0
- package/lib/types/api/recoveryDevice.d.ts +7 -0
- package/lib/types/api/recoveryDevice.js +3 -0
- package/lib/types/api/removeAllListeners.d.ts +3 -0
- package/lib/types/api/removeAllListeners.js +3 -0
- package/lib/types/api/renderWebUSBButton.d.ts +2 -0
- package/lib/types/api/renderWebUSBButton.js +3 -0
- package/lib/types/api/requestLogin.d.ts +20 -0
- package/lib/types/api/requestLogin.js +3 -0
- package/lib/types/api/resetDevice.d.ts +16 -0
- package/lib/types/api/resetDevice.js +3 -0
- package/lib/types/api/rippleGetAddress.d.ts +4 -0
- package/lib/types/api/rippleGetAddress.js +3 -0
- package/lib/types/api/rippleSignTransaction.d.ts +23 -0
- package/lib/types/api/rippleSignTransaction.js +3 -0
- package/lib/types/api/setProxy.d.ts +9 -0
- package/lib/types/api/setProxy.js +3 -0
- package/lib/types/api/signMessage.d.ts +11 -0
- package/lib/types/api/signMessage.js +3 -0
- package/lib/types/api/signTransaction.d.ts +70 -0
- package/lib/types/api/signTransaction.js +3 -0
- package/lib/types/api/stellarGetAddress.d.ts +4 -0
- package/lib/types/api/stellarGetAddress.js +3 -0
- package/lib/types/api/stellarSignTransaction.d.ts +182 -0
- package/lib/types/api/stellarSignTransaction.js +3 -0
- package/lib/types/api/tezosGetAddress.d.ts +4 -0
- package/lib/types/api/tezosGetAddress.js +3 -0
- package/lib/types/api/tezosGetPublicKey.d.ts +4 -0
- package/lib/types/api/tezosGetPublicKey.js +3 -0
- package/lib/types/api/tezosSignTransaction.d.ts +61 -0
- package/lib/types/api/tezosSignTransaction.js +3 -0
- package/lib/types/api/uiResponse.d.ts +3 -0
- package/lib/types/api/uiResponse.js +3 -0
- package/lib/types/api/verifyMessage.d.ts +11 -0
- package/lib/types/api/verifyMessage.js +3 -0
- package/lib/types/api/wipeDevice.d.ts +4 -0
- package/lib/types/api/wipeDevice.js +3 -0
- package/lib/types/coinInfo.d.ts +79 -0
- package/lib/types/coinInfo.js +3 -0
- package/lib/types/device.d.ts +92 -0
- package/lib/types/device.js +3 -0
- package/lib/types/firmware.d.ts +36 -0
- package/lib/types/firmware.js +3 -0
- package/lib/types/index.d.ts +15 -0
- package/lib/types/index.js +11 -0
- package/lib/types/params.d.ts +56 -0
- package/lib/types/params.js +3 -0
- package/lib/types/settings.d.ts +34 -0
- package/lib/types/settings.js +3 -0
- package/lib/types/utils.d.ts +15 -0
- package/lib/types/utils.js +3 -0
- package/lib/utils/__fixtures__/accountUtils.d.ts +4 -0
- package/lib/utils/__fixtures__/accountUtils.js +32 -0
- package/lib/utils/__fixtures__/addressUtils.d.ts +10 -0
- package/lib/utils/__fixtures__/addressUtils.js +214 -0
- package/lib/utils/__fixtures__/ethereumUtils.d.ts +3 -0
- package/lib/utils/__fixtures__/ethereumUtils.js +20 -0
- package/lib/utils/__fixtures__/formatUtils.d.ts +3 -0
- package/lib/utils/__fixtures__/formatUtils.js +15 -0
- package/lib/utils/__fixtures__/hdnodeUtils.d.ts +186 -0
- package/lib/utils/__fixtures__/hdnodeUtils.js +206 -0
- package/lib/utils/accountUtils.d.ts +11 -0
- package/lib/utils/accountUtils.js +99 -0
- package/lib/utils/addressUtils.d.ts +3 -0
- package/lib/utils/addressUtils.js +32 -0
- package/lib/utils/assets-browser.d.ts +2 -0
- package/lib/utils/assets-browser.js +21 -0
- package/lib/utils/assets.d.ts +2 -0
- package/lib/utils/assets.js +28 -0
- package/lib/utils/bip39.d.ts +3 -0
- package/lib/utils/bip39.js +2053 -0
- package/lib/utils/browserUtils.d.ts +21 -0
- package/lib/utils/browserUtils.js +100 -0
- package/lib/utils/bufferUtils.d.ts +3 -0
- package/lib/utils/bufferUtils.js +11 -0
- package/lib/utils/debug.d.ts +24 -0
- package/lib/utils/debug.js +90 -0
- package/lib/utils/deferred.d.ts +18 -0
- package/lib/utils/deferred.js +66 -0
- package/lib/utils/deviceFeaturesUtils.d.ts +6 -0
- package/lib/utils/deviceFeaturesUtils.js +115 -0
- package/lib/utils/ethereumUtils.d.ts +3 -0
- package/lib/utils/ethereumUtils.js +12 -0
- package/lib/utils/firmwareUtils.d.ts +7 -0
- package/lib/utils/firmwareUtils.js +28 -0
- package/lib/utils/formatUtils.d.ts +8 -0
- package/lib/utils/formatUtils.js +57 -0
- package/lib/utils/hdnodeUtils.d.ts +8 -0
- package/lib/utils/hdnodeUtils.js +80 -0
- package/lib/utils/interactionTimeout.d.ts +10 -0
- package/lib/utils/interactionTimeout.js +34 -0
- package/lib/utils/objectUtils.d.ts +10 -0
- package/lib/utils/objectUtils.js +37 -0
- package/lib/utils/pathUtils.d.ts +20 -0
- package/lib/utils/pathUtils.js +159 -0
- package/lib/utils/promiseUtils.d.ts +2 -0
- package/lib/utils/promiseUtils.js +8 -0
- package/lib/utils/urlUtils.d.ts +5 -0
- package/lib/utils/urlUtils.js +27 -0
- package/lib/utils/versionUtils.d.ts +6 -0
- package/lib/utils/versionUtils.js +72 -0
- package/lib/utils/windowsUtils.d.ts +2 -0
- package/lib/utils/windowsUtils.js +6 -0
- package/lib/workers/RNUsbPlugin.d.ts +31 -0
- package/lib/workers/RNUsbPlugin.js +65 -0
- package/lib/workers/workers-browser.d.ts +8 -0
- package/lib/workers/workers-browser.js +19 -0
- package/lib/workers/workers-react-native.d.ts +8 -0
- package/lib/workers/workers-react-native.js +19 -0
- package/lib/workers/workers.d.ts +10 -0
- package/lib/workers/workers.js +17 -0
- package/package.json +62 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
export interface CoinSupport {
|
|
2
|
+
connect: boolean;
|
|
3
|
+
trezor1: string;
|
|
4
|
+
trezor2: string;
|
|
5
|
+
}
|
|
6
|
+
export interface Network {
|
|
7
|
+
messagePrefix: string;
|
|
8
|
+
bech32: string;
|
|
9
|
+
bip32: {
|
|
10
|
+
public: number;
|
|
11
|
+
private: number;
|
|
12
|
+
};
|
|
13
|
+
pubKeyHash: number;
|
|
14
|
+
scriptHash: number;
|
|
15
|
+
wif: number;
|
|
16
|
+
forkId?: number;
|
|
17
|
+
}
|
|
18
|
+
export interface BlockchainLink {
|
|
19
|
+
type: string;
|
|
20
|
+
url: string[];
|
|
21
|
+
}
|
|
22
|
+
export declare type BitcoinDefaultFeesKeys = 'High' | 'Normal' | 'Economy' | 'Low';
|
|
23
|
+
export declare type BitcoinDefaultFees = {
|
|
24
|
+
[key in BitcoinDefaultFeesKeys]: number;
|
|
25
|
+
};
|
|
26
|
+
interface Common {
|
|
27
|
+
label: string;
|
|
28
|
+
name: string;
|
|
29
|
+
shortcut: string;
|
|
30
|
+
slip44: number;
|
|
31
|
+
support: CoinSupport;
|
|
32
|
+
decimals: number;
|
|
33
|
+
blockchainLink?: BlockchainLink;
|
|
34
|
+
blocktime: number;
|
|
35
|
+
minFee: number;
|
|
36
|
+
maxFee: number;
|
|
37
|
+
}
|
|
38
|
+
export interface BitcoinNetworkInfo extends Common {
|
|
39
|
+
type: 'bitcoin';
|
|
40
|
+
cashAddrPrefix?: string;
|
|
41
|
+
curveName: string;
|
|
42
|
+
dustLimit: number;
|
|
43
|
+
forceBip143: boolean;
|
|
44
|
+
hashGenesisBlock: string;
|
|
45
|
+
maxAddressLength: number;
|
|
46
|
+
maxFeeSatoshiKb: number;
|
|
47
|
+
minAddressLength: number;
|
|
48
|
+
minFeeSatoshiKb: number;
|
|
49
|
+
defaultFees: BitcoinDefaultFees;
|
|
50
|
+
segwit: boolean;
|
|
51
|
+
xPubMagic: number;
|
|
52
|
+
xPubMagicSegwitNative?: number;
|
|
53
|
+
xPubMagicSegwit?: number;
|
|
54
|
+
taproot?: boolean;
|
|
55
|
+
network: Network;
|
|
56
|
+
isBitcoin: boolean;
|
|
57
|
+
blocks?: number;
|
|
58
|
+
}
|
|
59
|
+
export interface EthereumNetworkInfo extends Common {
|
|
60
|
+
type: 'ethereum';
|
|
61
|
+
chain: string;
|
|
62
|
+
chainId: number;
|
|
63
|
+
rskip60: boolean;
|
|
64
|
+
defaultFees: Array<{
|
|
65
|
+
label: 'high' | 'normal' | 'low';
|
|
66
|
+
feePerUnit: string;
|
|
67
|
+
feeLimit: string;
|
|
68
|
+
}>;
|
|
69
|
+
network: typeof undefined;
|
|
70
|
+
}
|
|
71
|
+
export interface MiscNetworkInfo extends Common {
|
|
72
|
+
type: 'misc' | 'nem';
|
|
73
|
+
curve: string;
|
|
74
|
+
defaultFees: BitcoinDefaultFees;
|
|
75
|
+
network: typeof undefined;
|
|
76
|
+
}
|
|
77
|
+
export declare type CoinInfo = BitcoinNetworkInfo | EthereumNetworkInfo | MiscNetworkInfo;
|
|
78
|
+
export {};
|
|
79
|
+
//# sourceMappingURL=coinInfo.d.ts.map
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import type { PROTO } from '../constants';
|
|
2
|
+
import type { ReleaseInfo } from './firmware';
|
|
3
|
+
export declare type DeviceStatus = 'available' | 'occupied' | 'used';
|
|
4
|
+
export declare type DeviceMode = 'normal' | 'bootloader' | 'initialize' | 'seedless';
|
|
5
|
+
export declare type DeviceFirmwareStatus = 'valid' | 'outdated' | 'required' | 'unknown' | 'none';
|
|
6
|
+
export declare type UnavailableCapability = 'no-capability' | 'no-support' | 'update-required' | 'trezor-connect-outdated';
|
|
7
|
+
export declare type UnavailableCapabilities = {
|
|
8
|
+
[key: string]: UnavailableCapability;
|
|
9
|
+
};
|
|
10
|
+
export declare type KnownDevice = {
|
|
11
|
+
type: 'acquired';
|
|
12
|
+
id: string | null;
|
|
13
|
+
path: string;
|
|
14
|
+
label: string;
|
|
15
|
+
error?: typeof undefined;
|
|
16
|
+
firmware: DeviceFirmwareStatus;
|
|
17
|
+
firmwareRelease?: ReleaseInfo | null;
|
|
18
|
+
status: DeviceStatus;
|
|
19
|
+
mode: DeviceMode;
|
|
20
|
+
state?: string;
|
|
21
|
+
features: PROTO.Features;
|
|
22
|
+
unavailableCapabilities: UnavailableCapabilities;
|
|
23
|
+
};
|
|
24
|
+
export declare type UnknownDevice = {
|
|
25
|
+
type: 'unacquired';
|
|
26
|
+
id?: null;
|
|
27
|
+
path: string;
|
|
28
|
+
label: string;
|
|
29
|
+
error?: typeof undefined;
|
|
30
|
+
features?: typeof undefined;
|
|
31
|
+
firmware?: typeof undefined;
|
|
32
|
+
firmwareRelease?: typeof undefined;
|
|
33
|
+
status?: typeof undefined;
|
|
34
|
+
mode?: typeof undefined;
|
|
35
|
+
state?: typeof undefined;
|
|
36
|
+
unavailableCapabilities?: typeof undefined;
|
|
37
|
+
};
|
|
38
|
+
export declare type UnreadableDevice = {
|
|
39
|
+
type: 'unreadable';
|
|
40
|
+
id?: null;
|
|
41
|
+
path: string;
|
|
42
|
+
label: string;
|
|
43
|
+
error: string;
|
|
44
|
+
features?: typeof undefined;
|
|
45
|
+
firmware?: typeof undefined;
|
|
46
|
+
firmwareRelease?: typeof undefined;
|
|
47
|
+
status?: typeof undefined;
|
|
48
|
+
mode?: typeof undefined;
|
|
49
|
+
state?: typeof undefined;
|
|
50
|
+
unavailableCapabilities?: typeof undefined;
|
|
51
|
+
};
|
|
52
|
+
export declare type Device = KnownDevice | UnknownDevice | UnreadableDevice;
|
|
53
|
+
export declare type Features = PROTO.Features;
|
|
54
|
+
declare type FeaturesNarrowing = {
|
|
55
|
+
major_version: 2;
|
|
56
|
+
fw_major: null;
|
|
57
|
+
fw_minor: null;
|
|
58
|
+
fw_patch: null;
|
|
59
|
+
bootloader_mode: true;
|
|
60
|
+
firmware_present: false;
|
|
61
|
+
} | {
|
|
62
|
+
major_version: 2;
|
|
63
|
+
fw_major: null;
|
|
64
|
+
fw_minor: null;
|
|
65
|
+
fw_patch: null;
|
|
66
|
+
bootloader_mode: null;
|
|
67
|
+
firmware_present: null;
|
|
68
|
+
} | {
|
|
69
|
+
major_version: 2;
|
|
70
|
+
fw_major: 2;
|
|
71
|
+
fw_minor: number;
|
|
72
|
+
fw_patch: number;
|
|
73
|
+
bootloader_mode: true;
|
|
74
|
+
firmware_present: true;
|
|
75
|
+
} | {
|
|
76
|
+
major_version: 1;
|
|
77
|
+
fw_major: null;
|
|
78
|
+
fw_minor: null;
|
|
79
|
+
fw_patch: null;
|
|
80
|
+
bootloader_mode: true;
|
|
81
|
+
firmware_present: false;
|
|
82
|
+
} | {
|
|
83
|
+
major_version: 1;
|
|
84
|
+
fw_major: null;
|
|
85
|
+
fw_minor: null;
|
|
86
|
+
fw_patch: null;
|
|
87
|
+
bootloader_mode: true;
|
|
88
|
+
firmware_present: true;
|
|
89
|
+
};
|
|
90
|
+
export declare type StrictFeatures = Features & FeaturesNarrowing;
|
|
91
|
+
export {};
|
|
92
|
+
//# sourceMappingURL=device.d.ts.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export interface FirmwareRange {
|
|
2
|
+
'1': {
|
|
3
|
+
min: string;
|
|
4
|
+
max: string;
|
|
5
|
+
};
|
|
6
|
+
'2': {
|
|
7
|
+
min: string;
|
|
8
|
+
max: string;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export declare type VersionArray = [1 | 2, number, number];
|
|
12
|
+
export declare type FirmwareRelease = {
|
|
13
|
+
required: boolean;
|
|
14
|
+
url: string;
|
|
15
|
+
fingerprint: string;
|
|
16
|
+
changelog: string;
|
|
17
|
+
min_bridge_version: [number, number, number];
|
|
18
|
+
version: VersionArray;
|
|
19
|
+
min_firmware_version: VersionArray;
|
|
20
|
+
min_bootloader_version: VersionArray;
|
|
21
|
+
bootloader_version?: VersionArray;
|
|
22
|
+
url_bitcoinonly?: string;
|
|
23
|
+
fingerprint_bitcoinonly?: string;
|
|
24
|
+
notes?: string;
|
|
25
|
+
rollout?: number;
|
|
26
|
+
channel?: string;
|
|
27
|
+
};
|
|
28
|
+
export declare type ReleaseInfo = {
|
|
29
|
+
changelog: FirmwareRelease[] | null;
|
|
30
|
+
release: FirmwareRelease;
|
|
31
|
+
isLatest: boolean;
|
|
32
|
+
latest: FirmwareRelease;
|
|
33
|
+
isRequired: boolean | null;
|
|
34
|
+
isNewer: boolean | null;
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=firmware.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * from './api';
|
|
2
|
+
export * from './account';
|
|
3
|
+
export * from './coinInfo';
|
|
4
|
+
export * from './device';
|
|
5
|
+
export * from './firmware';
|
|
6
|
+
export * from './params';
|
|
7
|
+
export * from './settings';
|
|
8
|
+
export type { RipplePayment } from './api/rippleSignTransaction';
|
|
9
|
+
export type { ComposeOutput, PrecomposedTransaction } from './api/composeTransaction';
|
|
10
|
+
export type { SignTransaction } from './api/signTransaction';
|
|
11
|
+
export type { EthereumTransaction } from './api/ethereumSignTransaction';
|
|
12
|
+
export type { CardanoOutput, CardanoInput, CardanoCertificate } from './api/cardanoSignTransaction';
|
|
13
|
+
export type { RecoveryDevice } from './api/recoveryDevice';
|
|
14
|
+
export type { TokenInfo, Transaction as AccountTransaction, Target as TransactionTarget, AccountBalanceHistory as BlockchainAccountBalanceHistory, } from '@trezor/blockchain-link';
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
(0, tslib_1.__exportStar)(require("./api"), exports);
|
|
5
|
+
(0, tslib_1.__exportStar)(require("./account"), exports);
|
|
6
|
+
(0, tslib_1.__exportStar)(require("./coinInfo"), exports);
|
|
7
|
+
(0, tslib_1.__exportStar)(require("./device"), exports);
|
|
8
|
+
(0, tslib_1.__exportStar)(require("./firmware"), exports);
|
|
9
|
+
(0, tslib_1.__exportStar)(require("./params"), exports);
|
|
10
|
+
(0, tslib_1.__exportStar)(require("./settings"), exports);
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export interface CommonParams {
|
|
2
|
+
device?: {
|
|
3
|
+
path: string;
|
|
4
|
+
state?: string;
|
|
5
|
+
instance?: number;
|
|
6
|
+
};
|
|
7
|
+
useEmptyPassphrase?: boolean;
|
|
8
|
+
useEventListener?: boolean;
|
|
9
|
+
allowSeedlessDevice?: boolean;
|
|
10
|
+
keepSession?: boolean;
|
|
11
|
+
skipFinalReload?: boolean;
|
|
12
|
+
useCardanoDerivation?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare type Params<T> = CommonParams & T & {
|
|
15
|
+
bundle?: undefined;
|
|
16
|
+
};
|
|
17
|
+
interface Bundle<T> {
|
|
18
|
+
bundle: T[];
|
|
19
|
+
}
|
|
20
|
+
export declare type BundledParams<T> = CommonParams & Bundle<T>;
|
|
21
|
+
export interface CommonParamsWithCoin extends CommonParams {
|
|
22
|
+
coin: string;
|
|
23
|
+
}
|
|
24
|
+
export interface Unsuccessful {
|
|
25
|
+
success: false;
|
|
26
|
+
payload: {
|
|
27
|
+
error: string;
|
|
28
|
+
code?: string;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export interface Success<T> {
|
|
32
|
+
success: true;
|
|
33
|
+
payload: T;
|
|
34
|
+
}
|
|
35
|
+
export declare type Response<T> = Promise<Success<T> | Unsuccessful>;
|
|
36
|
+
export interface GetAddress {
|
|
37
|
+
path: string | number[];
|
|
38
|
+
address?: string;
|
|
39
|
+
showOnTrezor?: boolean;
|
|
40
|
+
}
|
|
41
|
+
export interface Address {
|
|
42
|
+
address: string;
|
|
43
|
+
path: number[];
|
|
44
|
+
serializedPath: string;
|
|
45
|
+
}
|
|
46
|
+
export interface GetPublicKey {
|
|
47
|
+
path: string | number[];
|
|
48
|
+
showOnTrezor?: boolean;
|
|
49
|
+
}
|
|
50
|
+
export interface PublicKey {
|
|
51
|
+
publicKey: string;
|
|
52
|
+
path: number[];
|
|
53
|
+
serializedPath: string;
|
|
54
|
+
}
|
|
55
|
+
export {};
|
|
56
|
+
//# sourceMappingURL=params.d.ts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { BlockchainSettings } from '@trezor/blockchain-link';
|
|
2
|
+
export interface Manifest {
|
|
3
|
+
appUrl: string;
|
|
4
|
+
email: string;
|
|
5
|
+
}
|
|
6
|
+
export declare type Proxy = BlockchainSettings['proxy'];
|
|
7
|
+
export interface ConnectSettings {
|
|
8
|
+
manifest?: Manifest;
|
|
9
|
+
connectSrc?: string;
|
|
10
|
+
debug?: boolean;
|
|
11
|
+
hostLabel?: string;
|
|
12
|
+
hostIcon?: string;
|
|
13
|
+
popup?: boolean;
|
|
14
|
+
transportReconnect?: boolean;
|
|
15
|
+
webusb?: boolean;
|
|
16
|
+
pendingTransportEvent?: boolean;
|
|
17
|
+
lazyLoad?: boolean;
|
|
18
|
+
interactionTimeout?: number;
|
|
19
|
+
origin?: string;
|
|
20
|
+
configSrc: string;
|
|
21
|
+
iframeSrc: string;
|
|
22
|
+
popupSrc: string;
|
|
23
|
+
webusbSrc: string;
|
|
24
|
+
version: string;
|
|
25
|
+
priority: number;
|
|
26
|
+
trustedHost: boolean;
|
|
27
|
+
supportedBrowser?: boolean;
|
|
28
|
+
extension?: string;
|
|
29
|
+
env: 'node' | 'web' | 'webextension' | 'electron' | 'react-native';
|
|
30
|
+
timestamp: number;
|
|
31
|
+
proxy?: Proxy;
|
|
32
|
+
useOnionLinks?: boolean;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=settings.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
2
|
+
export declare type MessageFactoryFn<Group, Event> = UnionToIntersection<Event extends {
|
|
3
|
+
type: string;
|
|
4
|
+
} ? Event extends {
|
|
5
|
+
payload: any;
|
|
6
|
+
} ? (type: Event['type'], payload: Event['payload']) => {
|
|
7
|
+
event: Group;
|
|
8
|
+
type: Event['type'];
|
|
9
|
+
payload: Event['payload'];
|
|
10
|
+
} : (type: Event['type'], payload?: undefined) => {
|
|
11
|
+
event: Group;
|
|
12
|
+
type: Event['type'];
|
|
13
|
+
payload: undefined;
|
|
14
|
+
} : never>;
|
|
15
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isUtxoBasedFixtures = exports.getAccountLabelFixtures = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const coins_json_1 = (0, tslib_1.__importDefault)(require("@trezor/connect-common/files/coins.json"));
|
|
6
|
+
const coinInfo_1 = require("../../data/coinInfo");
|
|
7
|
+
(0, coinInfo_1.parseCoinsJson)(coins_json_1.default);
|
|
8
|
+
exports.getAccountLabelFixtures = [
|
|
9
|
+
{
|
|
10
|
+
description: 'Legacy',
|
|
11
|
+
input: [[44], (0, coinInfo_1.getBitcoinNetwork)('btc')],
|
|
12
|
+
output: 'legacy <span>account #1</span>',
|
|
13
|
+
},
|
|
14
|
+
];
|
|
15
|
+
exports.isUtxoBasedFixtures = [
|
|
16
|
+
{
|
|
17
|
+
description: 'btc',
|
|
18
|
+
input: [(0, coinInfo_1.getBitcoinNetwork)('btc')],
|
|
19
|
+
output: true,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
description: 'ada',
|
|
23
|
+
input: [(0, coinInfo_1.getMiscNetwork)('ada')],
|
|
24
|
+
output: true,
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
description: 'eth',
|
|
28
|
+
input: [(0, coinInfo_1.getEthereumNetwork)('eth')],
|
|
29
|
+
output: false,
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
//# sourceMappingURL=accountUtils.js.map
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.invalidAddresses = exports.validAddresses = void 0;
|
|
4
|
+
exports.validAddresses = [
|
|
5
|
+
{
|
|
6
|
+
description: 'Bitcoin P2PKH',
|
|
7
|
+
coin: 'btc',
|
|
8
|
+
address: '12KYrjTdVGjFMtaxERSk3gphreJ5US8aUP',
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
description: 'Bitcoin P2SH',
|
|
12
|
+
coin: 'btc',
|
|
13
|
+
address: '3FyVFsEyyBPzHjD3qUEgX7Jsn4tcHNZFkn',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
description: 'Bitcoin P2WPKH',
|
|
17
|
+
coin: 'btc',
|
|
18
|
+
address: 'BC1QW508D6QEJXTDG4Y5R3ZARVARY0C5XW7KV8F3T4',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
description: 'BTC P2WPKH version 1',
|
|
22
|
+
coin: 'btc',
|
|
23
|
+
address: 'bc1pw508d6qejxtdg4y5r3zarvary0c5xw7kw508d6qejxtdg4y5r3zarvary0c5xw7kt5nd6y',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
description: 'BTC P2WPKH version 2',
|
|
27
|
+
coin: 'btc',
|
|
28
|
+
address: 'bc1zw508d6qejxtdg4y5r3zarvaryvaxxpcs',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
description: 'BTC P2WPKH version 16',
|
|
32
|
+
coin: 'btc',
|
|
33
|
+
address: 'BC1SW50QGDZ25J',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
description: 'Testnet P2PKH',
|
|
37
|
+
coin: 'test',
|
|
38
|
+
address: 'mzBc4XEFSdzCDcTxAgf6EZXgsZWpztRhef',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
description: 'Testnet P2SH',
|
|
42
|
+
coin: 'test',
|
|
43
|
+
address: '2MxKEf2su6FGAUfCEAHreGFQvEYrfYNHvL7',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
description: 'Testnet P2SH',
|
|
47
|
+
coin: 'test',
|
|
48
|
+
address: '2Mww8dCYPUpKHofjgcXcBCEGmniw9CoaiD2',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
description: 'Testnet P2WPKH',
|
|
52
|
+
coin: 'test',
|
|
53
|
+
address: 'tb1qrp33g0q5c5txsp9arysrx4k6zdkfs4nce4xj0gdcccefvpysxf3q0sl5k7',
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
description: 'Testnet P2WPKH',
|
|
57
|
+
coin: 'test',
|
|
58
|
+
address: 'tb1qqqqqp399et2xygdj5xreqhjjvcmzhxw4aywxecjdzew6hylgvsesrxh6hy',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
description: 'Regtest P2PKH',
|
|
62
|
+
coin: 'regtest',
|
|
63
|
+
address: 'mvbu1Gdy8SUjTenqerxUaZyYjmveZvt33q',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
description: 'Regtest P2SH',
|
|
67
|
+
coin: 'regtest',
|
|
68
|
+
address: '2N4Q5FhU2497BryFfUgbqkAJE87aKHUhXMp',
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
description: 'Regtest P2WPKH',
|
|
72
|
+
coin: 'regtest',
|
|
73
|
+
address: 'bcrt1qkvwu9g3k2pdxewfqr7syz89r3gj557l374sg5v',
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
description: 'Regtest P2TR',
|
|
77
|
+
coin: 'regtest',
|
|
78
|
+
address: 'bcrt1pswrqtykue8r89t9u4rprjs0gt4qzkdfuursfnvqaa3f2yql07zmq2fdmpx',
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
description: 'Litecoin P2PKH',
|
|
82
|
+
coin: 'ltc',
|
|
83
|
+
address: 'LVg2kJoFNg45Nbpy53h7Fe1wKyeXVRhMH9',
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
description: 'Litecoin P2SH',
|
|
87
|
+
coin: 'ltc',
|
|
88
|
+
address: 'MUWheVyCBf3Fm3WNNXvotQ3Gj8NTSZCBVe',
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
description: 'Litecoin P2WPKH',
|
|
92
|
+
coin: 'ltc',
|
|
93
|
+
address: 'ltc1qajkrze8gc5qdx2ehldsmd596a2gprnn50a53mj3xxvy0zgtdq6gqumv03a',
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
description: 'BCH cash address',
|
|
97
|
+
coin: 'bch',
|
|
98
|
+
address: 'bitcoincash:qq4v32mtagxac29my6gwj6fd4tmqg8rysu23dax807',
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
description: 'BCH cash address no prefix',
|
|
102
|
+
coin: 'bch',
|
|
103
|
+
address: 'qq4v32mtagxac29my6gwj6fd4tmqg8rysu23dax807',
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
description: 'Bitcoin Gold P2PKH',
|
|
107
|
+
coin: 'btg',
|
|
108
|
+
address: 'GW3JrQyHtoVfEFES3Y9JagiX3VSKQStLwj',
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
description: 'Bitcoin Gold P2SH',
|
|
112
|
+
coin: 'btg',
|
|
113
|
+
address: 'AQtK3tNjJUSn68fXdDoBU8o1jNxNvzMQ4A',
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
description: 'Dash P2PKH',
|
|
117
|
+
coin: 'dash',
|
|
118
|
+
address: 'Xx4dYKgz3Zcv6kheaqog3fynaKWjbahb6b',
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
description: 'Digibyte P2PKH',
|
|
122
|
+
coin: 'dgb',
|
|
123
|
+
address: 'D9TDZTR9Z9Mx2NoDJnhqhnYhDLKRAmsL9n',
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
description: 'Digibyte P2SH',
|
|
127
|
+
coin: 'dgb',
|
|
128
|
+
address: 'SRrevBM5bfZNpFJ4MhzaNfkTghYKoTB6LV',
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
description: 'Doge P2PKH',
|
|
132
|
+
coin: 'doge',
|
|
133
|
+
address: 'DPpJVPpvPNP6i6tMj4rTycAGh8wReTqaSU',
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
description: 'Vertcoin P2PKH',
|
|
137
|
+
coin: 'vtc',
|
|
138
|
+
address: 'VmoMjGf3zgZLy8sk3PMKd3xikZHXWvnYi7',
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
description: 'Vertcoin P2SH',
|
|
142
|
+
coin: 'vtc',
|
|
143
|
+
address: '3PgeyhEJEnS5CeBu3iFcu3JHVKemeHx1AW',
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
description: 'Vertcoin P2WPKH',
|
|
147
|
+
coin: 'vtc',
|
|
148
|
+
address: 'vtc1qmzq3erafwvz23yfeu9tu45uz2kx3d7esk0rayg',
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
description: 'ZCash P2PKH',
|
|
152
|
+
coin: 'zec',
|
|
153
|
+
address: 't1U9yhDa5XEjgfnTgZoKddeSiEN1aoLkQxq',
|
|
154
|
+
},
|
|
155
|
+
];
|
|
156
|
+
exports.invalidAddresses = [
|
|
157
|
+
{
|
|
158
|
+
address: 'LVg2kJoFNg45Nbpy53h7Fe1wKyeXVRhMH9',
|
|
159
|
+
coin: 'btc',
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
address: 'tc1qw508d6qejxtdg4y5r3zarvary0c5xw7kg3g4ty',
|
|
163
|
+
coin: 'btc',
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
address: 'bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t5',
|
|
167
|
+
coin: 'btc',
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
address: 'bc1rw5uspcuh',
|
|
171
|
+
coin: 'btc',
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
address: 'bc1gmk9yu',
|
|
175
|
+
coin: 'btc',
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
address: 'bc1gmk9yu',
|
|
179
|
+
coin: 'btc',
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
address: '12KYrjTdVGjFMtaxERSk3gphreJ5US8aUP',
|
|
183
|
+
coin: 'bch',
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
address: '3NJZLcZEEYBpxYEUGewU4knsQRn1WM5Fkt',
|
|
187
|
+
coin: 'bch',
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
address: 'bitcoincash:qp3wjpa3tjlj042z2wv7hahsldgwhwy0rq9sywjpyya',
|
|
191
|
+
coin: 'bch',
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
address: 'vtc1qmzq3erafwvz23yabc9tu45uz2kx3d7esk0rayg',
|
|
195
|
+
coin: 'vtc',
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
address: 'vtc1qhy8eqwqxpyryz4wctus36yl2uu60t0z6ecrvt',
|
|
199
|
+
coin: 'vtc',
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
address: 'vtd1qhy8eqwqxpyryz4wctus36yl2uu60t0z6ecrvtc',
|
|
203
|
+
coin: 'vtc',
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
address: 't3Yz22vK5z2LcKEdg16Yv4FFneEL1zg9ojd',
|
|
207
|
+
coin: 'zec',
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
address: 't2YNzUUx8mWBCRYPRezvA363EYXyEpHokyi',
|
|
211
|
+
coin: 'zec',
|
|
212
|
+
},
|
|
213
|
+
];
|
|
214
|
+
//# sourceMappingURL=addressUtils.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getNetworkLabelFixtures = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const coins_json_1 = (0, tslib_1.__importDefault)(require("@trezor/connect-common/files/coins.json"));
|
|
6
|
+
const coinInfo_1 = require("../../data/coinInfo");
|
|
7
|
+
(0, coinInfo_1.parseCoinsJson)(coins_json_1.default);
|
|
8
|
+
exports.getNetworkLabelFixtures = [
|
|
9
|
+
{
|
|
10
|
+
description: 'eth',
|
|
11
|
+
input: ['Export #NETWORK address', (0, coinInfo_1.getEthereumNetwork)('eth')],
|
|
12
|
+
output: 'Export Ethereum address',
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
description: 'etc',
|
|
16
|
+
input: ['Export #NETWORK address', (0, coinInfo_1.getEthereumNetwork)('etc')],
|
|
17
|
+
output: 'Export Ethereum Classic address',
|
|
18
|
+
},
|
|
19
|
+
];
|
|
20
|
+
//# sourceMappingURL=ethereumUtils.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.formatAmountFixtures = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const coins_json_1 = (0, tslib_1.__importDefault)(require("@trezor/connect-common/files/coins.json"));
|
|
6
|
+
const coinInfo_1 = require("../../data/coinInfo");
|
|
7
|
+
(0, coinInfo_1.parseCoinsJson)(coins_json_1.default);
|
|
8
|
+
exports.formatAmountFixtures = [
|
|
9
|
+
{
|
|
10
|
+
description: '10',
|
|
11
|
+
input: ['10', (0, coinInfo_1.getBitcoinNetwork)('btc')],
|
|
12
|
+
output: '0.0000001 BTC',
|
|
13
|
+
},
|
|
14
|
+
];
|
|
15
|
+
//# sourceMappingURL=formatUtils.js.map
|