@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,4 @@
|
|
|
1
|
+
import type { BlockchainLinkParams, BlockchainLinkResponse } from '@trezor/blockchain-link';
|
|
2
|
+
import type { CommonParamsWithCoin, Response } from '../params';
|
|
3
|
+
export declare function blockchainGetCurrentFiatRates(params: CommonParamsWithCoin & BlockchainLinkParams<'getCurrentFiatRates'>): Response<BlockchainLinkResponse<'getCurrentFiatRates'>>;
|
|
4
|
+
//# sourceMappingURL=blockchainGetCurrentFiatRates.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { BlockchainLinkParams, BlockchainLinkResponse } from '@trezor/blockchain-link';
|
|
2
|
+
import type { CommonParamsWithCoin, Response } from '../params';
|
|
3
|
+
export declare function blockchainGetFiatRatesForTimestamps(params: CommonParamsWithCoin & BlockchainLinkParams<'getFiatRatesForTimestamps'>): Response<BlockchainLinkResponse<'getFiatRatesForTimestamps'>>;
|
|
4
|
+
//# sourceMappingURL=blockchainGetFiatRatesForTimestamps.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { TypedRawTransaction } from '@trezor/blockchain-link';
|
|
2
|
+
import type { CommonParamsWithCoin, Response } from '../params';
|
|
3
|
+
export declare type BlockchainGetTransactions = CommonParamsWithCoin & {
|
|
4
|
+
txs: string[];
|
|
5
|
+
};
|
|
6
|
+
export declare function blockchainGetTransactions(params: BlockchainGetTransactions): Response<TypedRawTransaction[]>;
|
|
7
|
+
//# sourceMappingURL=blockchainGetTransactions.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CommonParamsWithCoin, Response } from '../params';
|
|
2
|
+
import type { BlockchainLink } from '../coinInfo';
|
|
3
|
+
export declare type BlockchainSetCustomBackend = CommonParamsWithCoin & {
|
|
4
|
+
blockchainLink?: BlockchainLink;
|
|
5
|
+
};
|
|
6
|
+
export declare function blockchainSetCustomBackend(params: BlockchainSetCustomBackend): Response<boolean>;
|
|
7
|
+
//# sourceMappingURL=blockchainSetCustomBackend.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SubscriptionAccountInfo, BlockchainLinkResponse } from '@trezor/blockchain-link';
|
|
2
|
+
import type { CommonParamsWithCoin, Response } from '../params';
|
|
3
|
+
export declare type BlockchainSubscribe = CommonParamsWithCoin & {
|
|
4
|
+
accounts?: SubscriptionAccountInfo[];
|
|
5
|
+
};
|
|
6
|
+
export declare function blockchainSubscribe(params: BlockchainSubscribe): Response<BlockchainLinkResponse<'subscribe'>>;
|
|
7
|
+
//# sourceMappingURL=blockchainSubscribe.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BlockchainLinkResponse } from '@trezor/blockchain-link';
|
|
2
|
+
import type { CommonParamsWithCoin, Response } from '../params';
|
|
3
|
+
export declare type BlockchainSubscribeFiatRates = CommonParamsWithCoin & {
|
|
4
|
+
currency?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function blockchainSubscribeFiatRates(params: BlockchainSubscribeFiatRates): Response<BlockchainLinkResponse<'subscribe'>>;
|
|
7
|
+
//# sourceMappingURL=blockchainSubscribeFiatRates.d.ts.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { BlockchainLinkResponse } from '@trezor/blockchain-link';
|
|
2
|
+
import type { Response } from '../params';
|
|
3
|
+
import type { BlockchainSubscribe } from './blockchainSubscribe';
|
|
4
|
+
export declare function blockchainUnsubscribe(params: BlockchainSubscribe): Response<BlockchainLinkResponse<'unsubscribe'>>;
|
|
5
|
+
//# sourceMappingURL=blockchainUnsubscribe.d.ts.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { BlockchainLinkResponse } from '@trezor/blockchain-link';
|
|
2
|
+
import type { Response } from '../params';
|
|
3
|
+
import type { BlockchainSubscribeFiatRates } from './blockchainSubscribeFiatRates';
|
|
4
|
+
export declare function blockchainUnsubscribeFiatRates(params: BlockchainSubscribeFiatRates): Response<BlockchainLinkResponse<'unsubscribe'>>;
|
|
5
|
+
//# sourceMappingURL=blockchainUnsubscribeFiatRates.d.ts.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { PROTO } from '../../constants';
|
|
2
|
+
import type { Params, BundledParams, Response } from '../params';
|
|
3
|
+
export interface CardanoCertificatePointer {
|
|
4
|
+
blockIndex: number;
|
|
5
|
+
txIndex: number;
|
|
6
|
+
certificateIndex: number;
|
|
7
|
+
}
|
|
8
|
+
export interface CardanoAddressParameters {
|
|
9
|
+
addressType: PROTO.CardanoAddressType;
|
|
10
|
+
path?: string | number[];
|
|
11
|
+
stakingPath?: string | number[];
|
|
12
|
+
stakingKeyHash?: string;
|
|
13
|
+
certificatePointer?: CardanoCertificatePointer;
|
|
14
|
+
paymentScriptHash?: string;
|
|
15
|
+
stakingScriptHash?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface CardanoGetAddress {
|
|
18
|
+
addressParameters: CardanoAddressParameters;
|
|
19
|
+
protocolMagic: number;
|
|
20
|
+
networkId: number;
|
|
21
|
+
address?: string;
|
|
22
|
+
showOnTrezor?: boolean;
|
|
23
|
+
derivationType?: PROTO.CardanoDerivationType;
|
|
24
|
+
}
|
|
25
|
+
export interface CardanoAddress {
|
|
26
|
+
addressParameters: CardanoAddressParameters;
|
|
27
|
+
protocolMagic: number;
|
|
28
|
+
networkId: number;
|
|
29
|
+
serializedPath: string;
|
|
30
|
+
serializedStakingPath: string;
|
|
31
|
+
address: string;
|
|
32
|
+
}
|
|
33
|
+
export declare function cardanoGetAddress(params: Params<CardanoGetAddress>): Response<CardanoAddress>;
|
|
34
|
+
export declare function cardanoGetAddress(params: BundledParams<CardanoGetAddress>): Response<CardanoAddress[]>;
|
|
35
|
+
//# sourceMappingURL=cardanoGetAddress.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { PROTO } from '../../constants';
|
|
2
|
+
import type { Params, Response } from '../params';
|
|
3
|
+
export interface CardanoNativeScript {
|
|
4
|
+
type: PROTO.CardanoNativeScriptType;
|
|
5
|
+
scripts?: CardanoNativeScript[];
|
|
6
|
+
keyHash?: string;
|
|
7
|
+
keyPath?: string | number[];
|
|
8
|
+
requiredSignaturesCount?: number;
|
|
9
|
+
invalidBefore?: string;
|
|
10
|
+
invalidHereafter?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface CardanoGetNativeScriptHash {
|
|
13
|
+
script: CardanoNativeScript;
|
|
14
|
+
displayFormat: PROTO.CardanoNativeScriptHashDisplayFormat;
|
|
15
|
+
derivationType?: PROTO.CardanoDerivationType;
|
|
16
|
+
}
|
|
17
|
+
export interface CardanoNativeScriptHash {
|
|
18
|
+
scriptHash: string;
|
|
19
|
+
}
|
|
20
|
+
export declare function cardanoGetNativeScriptHash(params: Params<CardanoGetNativeScriptHash>): Response<CardanoNativeScriptHash>;
|
|
21
|
+
//# sourceMappingURL=cardanoGetNativeScriptHash.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { PROTO } from '../../constants';
|
|
2
|
+
import type { Params, BundledParams, Response } from '../params';
|
|
3
|
+
export interface CardanoGetPublicKey {
|
|
4
|
+
path: string | number[];
|
|
5
|
+
showOnTrezor?: boolean;
|
|
6
|
+
derivationType?: PROTO.CardanoDerivationType;
|
|
7
|
+
}
|
|
8
|
+
export interface CardanoPublicKey {
|
|
9
|
+
path: number[];
|
|
10
|
+
serializedPath: string;
|
|
11
|
+
publicKey: string;
|
|
12
|
+
node: PROTO.HDNodeType;
|
|
13
|
+
}
|
|
14
|
+
export declare function cardanoGetPublicKey(params: Params<CardanoGetPublicKey>): Response<CardanoPublicKey>;
|
|
15
|
+
export declare function cardanoGetPublicKey(params: BundledParams<CardanoGetPublicKey>): Response<CardanoPublicKey[]>;
|
|
16
|
+
//# sourceMappingURL=cardanoGetPublicKey.d.ts.map
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import type { PROTO } from '../../constants';
|
|
2
|
+
import type { CardanoAddressParameters } from './cardanoGetAddress';
|
|
3
|
+
import type { Params, Response } from '../params';
|
|
4
|
+
export interface CardanoInput {
|
|
5
|
+
path?: string | number[];
|
|
6
|
+
prev_hash: string;
|
|
7
|
+
prev_index: number;
|
|
8
|
+
}
|
|
9
|
+
export interface CardanoToken {
|
|
10
|
+
assetNameBytes: string;
|
|
11
|
+
amount?: string;
|
|
12
|
+
mintAmount?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface CardanoAssetGroup {
|
|
15
|
+
policyId: string;
|
|
16
|
+
tokenAmounts: CardanoToken[];
|
|
17
|
+
}
|
|
18
|
+
export declare type CardanoOutput = {
|
|
19
|
+
addressParameters: CardanoAddressParameters;
|
|
20
|
+
amount: string;
|
|
21
|
+
tokenBundle?: CardanoAssetGroup[];
|
|
22
|
+
datumHash?: string;
|
|
23
|
+
} | {
|
|
24
|
+
address: string;
|
|
25
|
+
amount: string;
|
|
26
|
+
tokenBundle?: CardanoAssetGroup[];
|
|
27
|
+
datumHash?: string;
|
|
28
|
+
};
|
|
29
|
+
export interface CardanoPoolOwner {
|
|
30
|
+
stakingKeyPath?: string | number[];
|
|
31
|
+
stakingKeyHash?: string;
|
|
32
|
+
}
|
|
33
|
+
export interface CardanoPoolRelay {
|
|
34
|
+
type: PROTO.CardanoPoolRelayType;
|
|
35
|
+
ipv4Address?: string;
|
|
36
|
+
ipv6Address?: string;
|
|
37
|
+
port?: number;
|
|
38
|
+
hostName?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface CardanoPoolMetadata {
|
|
41
|
+
url: string;
|
|
42
|
+
hash: string;
|
|
43
|
+
}
|
|
44
|
+
export interface CardanoPoolMargin {
|
|
45
|
+
numerator: string;
|
|
46
|
+
denominator: string;
|
|
47
|
+
}
|
|
48
|
+
export interface CardanoPoolParameters {
|
|
49
|
+
poolId: string;
|
|
50
|
+
vrfKeyHash: string;
|
|
51
|
+
pledge: string;
|
|
52
|
+
cost: string;
|
|
53
|
+
margin: CardanoPoolMargin;
|
|
54
|
+
rewardAccount: string;
|
|
55
|
+
owners: CardanoPoolOwner[];
|
|
56
|
+
relays: CardanoPoolRelay[];
|
|
57
|
+
metadata: CardanoPoolMetadata;
|
|
58
|
+
}
|
|
59
|
+
export interface CardanoCertificate {
|
|
60
|
+
type: PROTO.CardanoCertificateType;
|
|
61
|
+
path?: string | number[];
|
|
62
|
+
pool?: string;
|
|
63
|
+
poolParameters?: CardanoPoolParameters;
|
|
64
|
+
scriptHash?: string;
|
|
65
|
+
keyHash?: string;
|
|
66
|
+
}
|
|
67
|
+
export interface CardanoWithdrawal {
|
|
68
|
+
path?: string | number[];
|
|
69
|
+
amount: string;
|
|
70
|
+
scriptHash?: string;
|
|
71
|
+
keyHash?: string;
|
|
72
|
+
}
|
|
73
|
+
export declare type CardanoMint = CardanoAssetGroup[];
|
|
74
|
+
export interface CardanoCollateralInput {
|
|
75
|
+
path?: string | number[];
|
|
76
|
+
prev_hash: string;
|
|
77
|
+
prev_index: number;
|
|
78
|
+
}
|
|
79
|
+
export interface CardanoRequiredSigner {
|
|
80
|
+
keyPath?: string | number[];
|
|
81
|
+
keyHash?: string;
|
|
82
|
+
}
|
|
83
|
+
export interface CardanoCatalystRegistrationParameters {
|
|
84
|
+
votingPublicKey: string;
|
|
85
|
+
stakingPath: string | number[];
|
|
86
|
+
rewardAddressParameters: CardanoAddressParameters;
|
|
87
|
+
nonce: string;
|
|
88
|
+
}
|
|
89
|
+
export interface CardanoAuxiliaryData {
|
|
90
|
+
hash?: string;
|
|
91
|
+
catalystRegistrationParameters?: CardanoCatalystRegistrationParameters;
|
|
92
|
+
}
|
|
93
|
+
export interface CardanoSignTransaction {
|
|
94
|
+
inputs: CardanoInput[];
|
|
95
|
+
outputs: CardanoOutput[];
|
|
96
|
+
fee: string;
|
|
97
|
+
ttl?: string;
|
|
98
|
+
certificates?: CardanoCertificate[];
|
|
99
|
+
withdrawals?: CardanoWithdrawal[];
|
|
100
|
+
validityIntervalStart?: string;
|
|
101
|
+
auxiliaryData?: CardanoAuxiliaryData;
|
|
102
|
+
mint?: CardanoMint;
|
|
103
|
+
scriptDataHash?: string;
|
|
104
|
+
collateralInputs?: CardanoCollateralInput[];
|
|
105
|
+
requiredSigners?: CardanoRequiredSigner[];
|
|
106
|
+
additionalWitnessRequests?: (string | number[])[];
|
|
107
|
+
protocolMagic: number;
|
|
108
|
+
networkId: number;
|
|
109
|
+
signingMode: PROTO.CardanoTxSigningMode;
|
|
110
|
+
derivationType?: PROTO.CardanoDerivationType;
|
|
111
|
+
includeNetworkId?: boolean;
|
|
112
|
+
}
|
|
113
|
+
export interface CardanoSignedTxWitness {
|
|
114
|
+
type: PROTO.CardanoTxWitnessType;
|
|
115
|
+
pubKey: string;
|
|
116
|
+
signature: string;
|
|
117
|
+
chainCode?: string;
|
|
118
|
+
}
|
|
119
|
+
export interface CardanoAuxiliaryDataSupplement {
|
|
120
|
+
type: PROTO.CardanoTxAuxiliaryDataSupplementType;
|
|
121
|
+
auxiliaryDataHash: string;
|
|
122
|
+
catalystSignature?: string;
|
|
123
|
+
}
|
|
124
|
+
export interface CardanoSignedTxData {
|
|
125
|
+
hash: string;
|
|
126
|
+
witnesses: CardanoSignedTxWitness[];
|
|
127
|
+
auxiliaryDataSupplement?: CardanoAuxiliaryDataSupplement;
|
|
128
|
+
}
|
|
129
|
+
export declare function cardanoSignTransaction(params: Params<CardanoSignTransaction>): Response<CardanoSignedTxData>;
|
|
130
|
+
//# sourceMappingURL=cardanoSignTransaction.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import type { Params, BundledParams, Response } from '../params';
|
|
3
|
+
export interface CipherKeyValue {
|
|
4
|
+
path: string | number[];
|
|
5
|
+
key: string;
|
|
6
|
+
value: string | Buffer;
|
|
7
|
+
encrypt?: boolean;
|
|
8
|
+
askOnEncrypt?: boolean;
|
|
9
|
+
askOnDecrypt?: boolean;
|
|
10
|
+
iv?: string | Buffer;
|
|
11
|
+
}
|
|
12
|
+
export interface CipheredValue {
|
|
13
|
+
value: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function cipherKeyValue(params: Params<CipherKeyValue>): Response<CipheredValue>;
|
|
16
|
+
export declare function cipherKeyValue(params: BundledParams<CipherKeyValue>): Response<CipheredValue[]>;
|
|
17
|
+
//# sourceMappingURL=cipherKeyValue.d.ts.map
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import type { PROTO } from '../../constants';
|
|
2
|
+
import type { AccountAddresses, Utxo as AccountUtxo } from '@trezor/blockchain-link';
|
|
3
|
+
import type { Params, Response } from '../params';
|
|
4
|
+
export interface RegularOutput {
|
|
5
|
+
type?: 'external';
|
|
6
|
+
address: string;
|
|
7
|
+
amount: string;
|
|
8
|
+
script_type?: 'PAYTOADDRESS';
|
|
9
|
+
}
|
|
10
|
+
export interface InternalOutput {
|
|
11
|
+
type?: 'internal';
|
|
12
|
+
address_n: number[];
|
|
13
|
+
amount: string;
|
|
14
|
+
script_type?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface SendMaxOutput {
|
|
17
|
+
type: 'send-max';
|
|
18
|
+
address: string;
|
|
19
|
+
}
|
|
20
|
+
export interface OpReturnOutput {
|
|
21
|
+
type: 'opreturn';
|
|
22
|
+
dataHex: string;
|
|
23
|
+
}
|
|
24
|
+
export interface NoAddressOutput {
|
|
25
|
+
type: 'noaddress';
|
|
26
|
+
amount: string;
|
|
27
|
+
}
|
|
28
|
+
export interface NoAddressSendMaxOutput {
|
|
29
|
+
type: 'send-max-noaddress';
|
|
30
|
+
}
|
|
31
|
+
export declare type ComposeOutput = RegularOutput | InternalOutput | SendMaxOutput | OpReturnOutput | NoAddressOutput | NoAddressSendMaxOutput;
|
|
32
|
+
export interface ComposeParams {
|
|
33
|
+
outputs: ComposeOutput[];
|
|
34
|
+
coin: string;
|
|
35
|
+
account?: undefined;
|
|
36
|
+
feeLevels?: undefined;
|
|
37
|
+
push?: boolean;
|
|
38
|
+
sequence?: number;
|
|
39
|
+
baseFee?: number;
|
|
40
|
+
floorBaseFee?: boolean;
|
|
41
|
+
skipPermutation?: boolean;
|
|
42
|
+
}
|
|
43
|
+
export declare type SignedTransaction = {
|
|
44
|
+
signatures: string[];
|
|
45
|
+
serializedTx: string;
|
|
46
|
+
txid?: string;
|
|
47
|
+
};
|
|
48
|
+
export interface PrecomposeParams {
|
|
49
|
+
outputs: ComposeOutput[];
|
|
50
|
+
coin: string;
|
|
51
|
+
account: {
|
|
52
|
+
path: string;
|
|
53
|
+
addresses: AccountAddresses;
|
|
54
|
+
utxo: (AccountUtxo & {
|
|
55
|
+
required?: boolean;
|
|
56
|
+
})[];
|
|
57
|
+
};
|
|
58
|
+
feeLevels: {
|
|
59
|
+
feePerUnit: string;
|
|
60
|
+
}[];
|
|
61
|
+
push?: undefined;
|
|
62
|
+
baseFee?: number;
|
|
63
|
+
floorBaseFee?: boolean;
|
|
64
|
+
sequence?: number;
|
|
65
|
+
skipPermutation?: boolean;
|
|
66
|
+
}
|
|
67
|
+
export declare type PrecomposedTransaction = {
|
|
68
|
+
type: 'error';
|
|
69
|
+
error: string;
|
|
70
|
+
} | {
|
|
71
|
+
type: 'nonfinal';
|
|
72
|
+
max?: string;
|
|
73
|
+
totalSpent: string;
|
|
74
|
+
fee: string;
|
|
75
|
+
feePerByte: string;
|
|
76
|
+
bytes: number;
|
|
77
|
+
} | {
|
|
78
|
+
type: 'final';
|
|
79
|
+
max?: string;
|
|
80
|
+
totalSpent: string;
|
|
81
|
+
fee: string;
|
|
82
|
+
feePerByte: string;
|
|
83
|
+
bytes: number;
|
|
84
|
+
transaction: {
|
|
85
|
+
inputs: PROTO.TxInputType[];
|
|
86
|
+
outputs: PROTO.TxOutputType[];
|
|
87
|
+
outputsPermutation: number[];
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
export declare function composeTransaction(params: Params<ComposeParams>): Response<SignedTransaction>;
|
|
91
|
+
export declare function composeTransaction(params: Params<PrecomposeParams>): Response<PrecomposedTransaction[]>;
|
|
92
|
+
//# sourceMappingURL=composeTransaction.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Params, Response } from '../params';
|
|
2
|
+
export interface CustomMessage {
|
|
3
|
+
messages?: JSON | Record<string, any>;
|
|
4
|
+
message: string;
|
|
5
|
+
params: JSON | Record<string, any>;
|
|
6
|
+
callback: (request: any) => Promise<{
|
|
7
|
+
message: string;
|
|
8
|
+
params?: Record<string, any>;
|
|
9
|
+
}>;
|
|
10
|
+
}
|
|
11
|
+
export declare function customMessage<R extends Record<string, any>>(params: Params<CustomMessage>): Response<R>;
|
|
12
|
+
//# sourceMappingURL=customMessage.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Params, BundledParams, Response } from '../params';
|
|
2
|
+
export interface EosGetPublicKey {
|
|
3
|
+
path: string | number[];
|
|
4
|
+
showOnTrezor?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface EosPublicKey {
|
|
7
|
+
wifPublicKey: string;
|
|
8
|
+
rawPublicKey: string;
|
|
9
|
+
path: number[];
|
|
10
|
+
serializedPath: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function eosGetPublicKey(params: Params<EosGetPublicKey>): Response<EosPublicKey>;
|
|
13
|
+
export declare function eosGetPublicKey(params: BundledParams<EosGetPublicKey>): Response<EosPublicKey[]>;
|
|
14
|
+
//# sourceMappingURL=eosGetPublicKey.d.ts.map
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import type { PROTO } from '../../constants';
|
|
2
|
+
import type { Params, Response } from '../params';
|
|
3
|
+
export interface EosTxHeader {
|
|
4
|
+
expiration: PROTO.UintType;
|
|
5
|
+
refBlockNum: number;
|
|
6
|
+
refBlockPrefix: number;
|
|
7
|
+
maxNetUsageWords: number;
|
|
8
|
+
maxCpuUsageMs: number;
|
|
9
|
+
delaySec: number;
|
|
10
|
+
}
|
|
11
|
+
export interface EosAuthorization {
|
|
12
|
+
threshold: number;
|
|
13
|
+
keys: PROTO.EosAuthorizationKey[];
|
|
14
|
+
accounts: {
|
|
15
|
+
permission: PROTO.EosPermissionLevel;
|
|
16
|
+
weight: number;
|
|
17
|
+
}[];
|
|
18
|
+
waits: PROTO.EosAuthorizationWait[];
|
|
19
|
+
}
|
|
20
|
+
export interface EosTxActionCommon {
|
|
21
|
+
account: string;
|
|
22
|
+
authorization: PROTO.EosPermissionLevel[];
|
|
23
|
+
}
|
|
24
|
+
export declare type EosTxAction = (EosTxActionCommon & {
|
|
25
|
+
name: 'transfer';
|
|
26
|
+
data: {
|
|
27
|
+
from: string;
|
|
28
|
+
to: string;
|
|
29
|
+
quantity: string;
|
|
30
|
+
memo: string;
|
|
31
|
+
};
|
|
32
|
+
}) | (EosTxActionCommon & {
|
|
33
|
+
name: 'delegatebw';
|
|
34
|
+
data: {
|
|
35
|
+
from: string;
|
|
36
|
+
receiver: string;
|
|
37
|
+
stake_net_quantity: string;
|
|
38
|
+
stake_cpu_quantity: string;
|
|
39
|
+
transfer: boolean;
|
|
40
|
+
};
|
|
41
|
+
}) | (EosTxActionCommon & {
|
|
42
|
+
name: 'undelegatebw';
|
|
43
|
+
data: {
|
|
44
|
+
from: string;
|
|
45
|
+
receiver: string;
|
|
46
|
+
unstake_net_quantity: string;
|
|
47
|
+
unstake_cpu_quantity: string;
|
|
48
|
+
};
|
|
49
|
+
}) | (EosTxActionCommon & {
|
|
50
|
+
name: 'buyram';
|
|
51
|
+
data: {
|
|
52
|
+
payer: string;
|
|
53
|
+
receiver: string;
|
|
54
|
+
quant: string;
|
|
55
|
+
};
|
|
56
|
+
}) | (EosTxActionCommon & {
|
|
57
|
+
name: 'buyrambytes';
|
|
58
|
+
data: PROTO.EosActionBuyRamBytes;
|
|
59
|
+
}) | (EosTxActionCommon & {
|
|
60
|
+
name: 'sellram';
|
|
61
|
+
data: PROTO.EosActionSellRam;
|
|
62
|
+
}) | (EosTxActionCommon & {
|
|
63
|
+
name: 'voteproducer';
|
|
64
|
+
data: {
|
|
65
|
+
voter: string;
|
|
66
|
+
proxy: string;
|
|
67
|
+
producers: string[];
|
|
68
|
+
};
|
|
69
|
+
}) | (EosTxActionCommon & {
|
|
70
|
+
name: 'refund';
|
|
71
|
+
data: PROTO.EosActionRefund;
|
|
72
|
+
}) | (EosTxActionCommon & {
|
|
73
|
+
name: 'updateauth';
|
|
74
|
+
data: {
|
|
75
|
+
account: string;
|
|
76
|
+
permission: string;
|
|
77
|
+
parent: string;
|
|
78
|
+
auth: EosAuthorization;
|
|
79
|
+
};
|
|
80
|
+
}) | (EosTxActionCommon & {
|
|
81
|
+
name: 'deleteauth';
|
|
82
|
+
data: PROTO.EosActionDeleteAuth;
|
|
83
|
+
}) | (EosTxActionCommon & {
|
|
84
|
+
name: 'linkauth';
|
|
85
|
+
data: PROTO.EosActionLinkAuth;
|
|
86
|
+
}) | (EosTxActionCommon & {
|
|
87
|
+
name: 'unlinkauth';
|
|
88
|
+
data: PROTO.EosActionUnlinkAuth;
|
|
89
|
+
}) | (EosTxActionCommon & {
|
|
90
|
+
name: 'newaccount';
|
|
91
|
+
data: {
|
|
92
|
+
creator: string;
|
|
93
|
+
name: string;
|
|
94
|
+
owner: EosAuthorization;
|
|
95
|
+
active: EosAuthorization;
|
|
96
|
+
};
|
|
97
|
+
});
|
|
98
|
+
export interface EosSDKTransaction {
|
|
99
|
+
chainId: string;
|
|
100
|
+
header: EosTxHeader;
|
|
101
|
+
actions: Array<EosTxAction | (EosTxActionCommon & {
|
|
102
|
+
name: string;
|
|
103
|
+
data: string;
|
|
104
|
+
})>;
|
|
105
|
+
}
|
|
106
|
+
export interface EosSignTransaction {
|
|
107
|
+
path: string | number[];
|
|
108
|
+
transaction: EosSDKTransaction;
|
|
109
|
+
}
|
|
110
|
+
export declare function eosSignTransaction(params: Params<EosSignTransaction>): Response<PROTO.EosSignedTx>;
|
|
111
|
+
//# sourceMappingURL=eosSignTransaction.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { GetAddress, Address, Params, BundledParams, Response } from '../params';
|
|
2
|
+
export declare function ethereumGetAddress(params: Params<GetAddress>): Response<Address>;
|
|
3
|
+
export declare function ethereumGetAddress(params: BundledParams<GetAddress>): Response<Address[]>;
|
|
4
|
+
//# sourceMappingURL=ethereumGetAddress.d.ts.map
|