@airgap/coinlib-core 0.13.7-beta.0 → 0.13.7-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/actions/GetKtAccountsAction.js +1 -1
- package/actions/GetKtAccountsAction.js.map +1 -1
- package/airgap-coinlib-core.min.js +1102 -1167
- package/index.d.ts +1 -2
- package/index.js +1 -3
- package/index.js.map +1 -1
- package/interfaces/IAirGapAddress.d.ts +19 -0
- package/interfaces/IAirGapAddress.js +3 -0
- package/interfaces/IAirGapAddress.js.map +1 -0
- package/package.json +1 -1
- package/protocols/CryptoClient.d.ts +4 -5
- package/protocols/Ed25519CryptoClient.d.ts +1 -2
- package/protocols/Ed25519CryptoClient.js +1 -1
- package/protocols/Ed25519CryptoClient.js.map +1 -1
- package/protocols/ICoinBaseProtocol.d.ts +47 -0
- package/protocols/ICoinBaseProtocol.js +3 -0
- package/protocols/ICoinBaseProtocol.js.map +1 -0
- package/protocols/ICoinOfflineProtocol.d.ts +22 -0
- package/protocols/ICoinOfflineProtocol.js +3 -0
- package/protocols/ICoinOfflineProtocol.js.map +1 -0
- package/protocols/ICoinOnlineProtocol.d.ts +46 -0
- package/protocols/ICoinOnlineProtocol.js +3 -0
- package/protocols/ICoinOnlineProtocol.js.map +1 -0
- package/protocols/ICoinProtocol.d.ts +4 -110
- package/protocols/NonExtendedProtocol.d.ts +4 -3
- package/protocols/NonExtendedProtocol.js +4 -1
- package/protocols/NonExtendedProtocol.js.map +1 -1
- package/protocols/Secp256k1CryptoClient.d.ts +1 -2
- package/protocols/Secp256k1CryptoClient.js +1 -1
- package/protocols/Secp256k1CryptoClient.js.map +1 -1
- package/protocols/Sr25519CryptoClient.d.ts +1 -2
- package/protocols/aeternity/AeternityAddress.d.ts +1 -1
- package/protocols/aeternity/AeternityAddress.js +1 -1
- package/protocols/aeternity/AeternityCryptoClient.d.ts +1 -2
- package/protocols/aeternity/AeternityCryptoClient.js +1 -1
- package/protocols/aeternity/AeternityCryptoClient.js.map +1 -1
- package/protocols/aeternity/AeternityProtocol.d.ts +10 -13
- package/protocols/aeternity/AeternityProtocol.js +16 -20
- package/protocols/aeternity/AeternityProtocol.js.map +1 -1
- package/protocols/aeternity/AeternityTypes.d.ts +6 -0
- package/protocols/bitcoin/BitcoinAddress.d.ts +1 -1
- package/protocols/bitcoin/BitcoinAddress.js +1 -1
- package/protocols/bitcoin/BitcoinCryptoClient.d.ts +1 -2
- package/protocols/bitcoin/BitcoinCryptoClient.js +2 -2
- package/protocols/bitcoin/BitcoinCryptoClient.js.map +1 -1
- package/protocols/bitcoin/BitcoinProtocol.d.ts +12 -15
- package/protocols/bitcoin/BitcoinProtocol.js +35 -30
- package/protocols/bitcoin/BitcoinProtocol.js.map +1 -1
- package/protocols/bitcoin/BitcoinSegwitAddress.d.ts +1 -1
- package/protocols/bitcoin/BitcoinSegwitAddress.js +1 -1
- package/protocols/bitcoin/BitcoinSegwitProtocol.d.ts +6 -7
- package/protocols/bitcoin/BitcoinSegwitProtocol.js +28 -15
- package/protocols/bitcoin/BitcoinSegwitProtocol.js.map +1 -1
- package/protocols/bitcoin/BitcoinTypes.d.ts +6 -0
- package/protocols/cosmos/CosmosAddress.d.ts +1 -1
- package/protocols/cosmos/CosmosAddress.js +1 -1
- package/protocols/cosmos/CosmosCryptoClient.d.ts +1 -2
- package/protocols/cosmos/CosmosCryptoClient.js +1 -1
- package/protocols/cosmos/CosmosCryptoClient.js.map +1 -1
- package/protocols/cosmos/CosmosProtocol.d.ts +10 -13
- package/protocols/cosmos/CosmosProtocol.js +26 -27
- package/protocols/cosmos/CosmosProtocol.js.map +1 -1
- package/protocols/cosmos/CosmosTypes.d.ts +6 -0
- package/protocols/cosmos/CosmosTypes.js.map +1 -1
- package/protocols/ethereum/BaseEthereumProtocol.d.ts +12 -14
- package/protocols/ethereum/BaseEthereumProtocol.js +20 -22
- package/protocols/ethereum/BaseEthereumProtocol.js.map +1 -1
- package/protocols/ethereum/EthereumAddress.d.ts +1 -1
- package/protocols/ethereum/EthereumAddress.js +1 -1
- package/protocols/ethereum/EthereumCryptoClient.d.ts +1 -2
- package/protocols/ethereum/EthereumCryptoClient.js +8 -7
- package/protocols/ethereum/EthereumCryptoClient.js.map +1 -1
- package/protocols/ethereum/EthereumTypes.d.ts +6 -0
- package/protocols/ethereum/erc20/GenericERC20.d.ts +1 -2
- package/protocols/ethereum/erc20/GenericERC20.js +5 -5
- package/protocols/ethereum/erc20/GenericERC20.js.map +1 -1
- package/protocols/substrate/SubstrateCryptoClient.d.ts +1 -2
- package/protocols/substrate/SubstrateCryptoClient.js +7 -7
- package/protocols/substrate/SubstrateCryptoClient.js.map +1 -1
- package/protocols/substrate/SubstrateDelegateProtocol.js +3 -3
- package/protocols/substrate/SubstrateDelegateProtocol.js.map +1 -1
- package/protocols/substrate/SubstrateProtocol.d.ts +12 -13
- package/protocols/substrate/SubstrateProtocol.js +22 -20
- package/protocols/substrate/SubstrateProtocol.js.map +1 -1
- package/protocols/substrate/SubstrateTypes.d.ts +6 -0
- package/protocols/substrate/common/SubstrateAccountController.js +4 -4
- package/protocols/substrate/common/data/account/SubstrateAddress.d.ts +1 -1
- package/protocols/substrate/common/data/account/SubstrateAddress.js +2 -2
- package/protocols/substrate/common/data/scale/type/SCALEAccountId.js +1 -1
- package/protocols/substrate/common/data/transaction/method/SubstrateTransactionMethodArgs.js +12 -12
- package/protocols/substrate/moonbeam/MoonbeamProtocol.js +4 -4
- package/protocols/substrate/moonbeam/MoonbeamProtocol.js.map +1 -1
- package/protocols/substrate/moonbeam/controllers/MoonbeamAccountController.js +3 -3
- package/protocols/substrate/moonbeam/data/account/MoonbeamAddress.d.ts +1 -1
- package/protocols/substrate/moonbeam/data/account/MoonbeamAddress.js +3 -3
- package/protocols/tezos/TezosAddress.d.ts +1 -1
- package/protocols/tezos/TezosAddress.js +1 -1
- package/protocols/tezos/TezosCryptoClient.d.ts +1 -1
- package/protocols/tezos/TezosCryptoClient.js +1 -1
- package/protocols/tezos/TezosCryptoClient.js.map +1 -1
- package/protocols/tezos/TezosProtocol.d.ts +11 -12
- package/protocols/tezos/TezosProtocol.js +24 -22
- package/protocols/tezos/TezosProtocol.js.map +1 -1
- package/protocols/tezos/fa/TezosFA1Protocol.js +4 -4
- package/protocols/tezos/fa/TezosFA1Protocol.js.map +1 -1
- package/protocols/tezos/fa/TezosFA2Protocol.js +2 -2
- package/protocols/tezos/fa/TezosFA2Protocol.js.map +1 -1
- package/protocols/tezos/fa/TezosFAProtocol.js +1 -1
- package/protocols/tezos/fa/TezosFAProtocol.js.map +1 -1
- package/protocols/tezos/kt/TezosKtProtocol.d.ts +4 -3
- package/protocols/tezos/kt/TezosKtProtocol.js +44 -16
- package/protocols/tezos/kt/TezosKtProtocol.js.map +1 -1
- package/protocols/tezos/sapling/TezosSaplingCryptoClient.d.ts +1 -1
- package/protocols/tezos/sapling/TezosSaplingProtocol.d.ts +12 -12
- package/protocols/tezos/sapling/TezosSaplingProtocol.js +74 -29
- package/protocols/tezos/sapling/TezosSaplingProtocol.js.map +1 -1
- package/protocols/tezos/sapling/utils/TezosSaplingBookkeeper.js +7 -7
- package/protocols/tezos/sapling/utils/TezosSaplingBookkeeper.js.map +1 -1
- package/protocols/tezos/types/TezosAddressCursor.d.ts +3 -0
- package/protocols/tezos/types/TezosAddressCursor.js +3 -0
- package/protocols/tezos/types/TezosAddressCursor.js.map +1 -0
- package/protocols/tezos/types/TezosAddressResult.d.ts +4 -0
- package/protocols/tezos/types/TezosAddressResult.js +3 -0
- package/protocols/tezos/types/TezosAddressResult.js.map +1 -0
- package/protocols/tezos/types/kt/TezosKtAddressCursor.d.ts +4 -0
- package/protocols/tezos/types/kt/TezosKtAddressCursor.js +3 -0
- package/protocols/tezos/types/kt/TezosKtAddressCursor.js.map +1 -0
- package/protocols/tezos/types/kt/TezosKtAddressResult.d.ts +5 -0
- package/protocols/tezos/types/kt/TezosKtAddressResult.js +3 -0
- package/protocols/tezos/types/kt/TezosKtAddressResult.js.map +1 -0
- package/protocols/tezos/types/sapling/TezosSaplingAddressCursor.d.ts +4 -0
- package/protocols/tezos/types/sapling/TezosSaplingAddressCursor.js +3 -0
- package/protocols/tezos/types/sapling/TezosSaplingAddressCursor.js.map +1 -0
- package/protocols/tezos/types/sapling/TezosSaplingAddressResult.d.ts +4 -0
- package/protocols/tezos/types/sapling/TezosSaplingAddressResult.js +3 -0
- package/protocols/tezos/types/sapling/TezosSaplingAddressResult.js.map +1 -0
- package/utils/AES.d.ts +2 -3
- package/utils/AES.js +3 -1
- package/utils/AES.js.map +1 -1
- package/utils/protocolsByIdentifier.js +1 -10
- package/utils/protocolsByIdentifier.js.map +1 -1
- package/wallet/AirGapWallet.js +1 -1
- package/wallet/AirGapWallet.js.map +1 -1
- package/utils/createProtocol.d.ts +0 -3
- package/utils/createProtocol.js +0 -143
- package/utils/createProtocol.js.map +0 -1
package/index.d.ts
CHANGED
|
@@ -51,7 +51,6 @@ import { Serializer } from './serializer/serializer';
|
|
|
51
51
|
import { SerializerV3 } from './serializer-v3/serializer';
|
|
52
52
|
import { RawAeternityTransaction, RawBitcoinTransaction, RawEthereumTransaction, RawSubstrateTransaction, RawTezosTransaction, UnsignedCosmosTransaction } from './serializer/types';
|
|
53
53
|
import { isCoinlibReady } from './utils/coinlibReady';
|
|
54
|
-
import { createProtocolByIdentifier } from './utils/createProtocol';
|
|
55
54
|
import { isNetworkEqual } from './utils/Network';
|
|
56
55
|
import { getProtocolByIdentifier } from './utils/protocolsByIdentifier';
|
|
57
56
|
import { addSubProtocol, getSubProtocolsByIdentifier } from './utils/subProtocols';
|
|
@@ -158,6 +157,6 @@ export { SubstrateProtocol, SubstrateDelegateProtocol, PolkadotProtocol, KusamaP
|
|
|
158
157
|
export { TezosProtocol, TezosKtProtocol, TezosFAProtocol, TezosFA1Protocol, TezosFA1p2Protocol, TezosFA2Protocol, TezosBTC, TezosStaker, TezosUSD, TezosUSDT, TezosETHtz as TezosETH, TezosUUSD, TezosYOU, TezosUDEFI, TezosUBTC, TezosWrapped, TezosWRAP, TezosKolibriUSD, TezosCTez, TezosPlenty, TezosQUIPU, TezosDOGA, TezosBTCTez, TezosSIRS, TezosTransactionResult, TezosTransactionCursor, BakerInfo, DelegationRewardInfo, DelegationInfo, TezosPayoutInfo, TezosDelegatorAction, TezosCryptoClient, TezosProtocolNetworkExtras, TezosBlockExplorer, TezosProtocolNetwork, TezosProtocolConfig, TezosProtocolOptions, TezosFAProtocolConfig, TezosFA2ProtocolConfig, TezosBTCProtocolConfig, TezosETHtzProtocolConfig as TezosETHProtocolConfig, TezosUUSDProtocolConfig, TezosYOUProtocolConfig, TezosWrappedProtocolConfig, TezosKolibriUSDProtocolConfig, TezosStakerProtocolConfig, TezosUSDProtocolConfig, TezosUSDTProtocolConfig, TezosCTezProtocolConfig, TezosPlentyProtocolConfig, TezosUDEFIProtocolConfig, TezosUBTCProtocolConfig, TezosWRAPProtocolConfig, TezosQUIPUProtocolConfig, TezosDOGAProtocolConfig, TezosSIRSProtocolConfig, TezosBTCTezProtocolConfig, TezosFAProtocolOptions, TezosFA2ProtocolOptions, TezosNetwork, TezosSaplingProtocol, TezosShieldedTezProtocol, TezosSaplingProtocolOptions, TezosSaplingProtocolConfig, TezosShieldedTezProtocolConfig, TezosSaplingExternalMethodProvider, TezosSaplingTransaction, TezosUtils, TezosWrappedOperation, TezosAddress, RawTezosTransaction, TezosDomains, TezosIndexerClient };
|
|
159
158
|
export { IACMessageType, IACMessageDefinitionObject, IACMessageDefinitionObjectV3, AccountShareResponse, MessageSignRequest, MessageSignResponse, SignedTransaction, UnsignedTransaction, UnsignedAeternityTransaction, UnsignedBitcoinTransaction, UnsignedBitcoinSegwitTransaction, UnsignedCosmosTransaction, UnsignedEthereumTransaction, UnsignedTypedEthereumTransaction, UnsignedTezosTransaction, SignedAeternityTransaction, SignedBitcoinTransaction, SignedBitcoinSegwitTransaction, SignedCosmosTransaction, SignedEthereumTransaction, SignedTezosTransaction, Serializer, SerializerV3, Message, SerializedAirGapWallet };
|
|
160
159
|
export { Action, RepeatableAction, LinkedAction, SimpleAction, ImportAccountAction, ImportAccoutActionContext };
|
|
161
|
-
export { isNetworkEqual, getProtocolOptionsByIdentifier, addSupportedProtocol,
|
|
160
|
+
export { isNetworkEqual, getProtocolOptionsByIdentifier, addSupportedProtocol, getProtocolByIdentifier, getSubProtocolsByIdentifier, supportedProtocols, isProtocolSymbol, isMainProtocolSymbol, isSubProtocolSymbol, TypeNotSupported, SerializerVersionMismatch, ProtocolNotSupported, NetworkError, CoinlibError, SerializerErrorType, ProtocolErrorType, BalanceError, TransactionError, Domain, isCoinlibReady, addSubProtocol, generateId, generateIdV2, TimeInterval, DelegateeDetails, DelegatorAction, DelegatorDetails, DelegatorReward, IAirGapSignedTransaction, IAirGapTransactionResult, AirGapWalletPriceService, IProtocolTransactionCursor, SubProtocolType, assertNever };
|
|
162
161
|
export { IACMessages, IACMessagesV2, AccountShareResponseV2 };
|
|
163
162
|
export { bufferFrom };
|
package/index.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.EthereumAddress = exports.EthereumERC20ProtocolOptions = exports.EthereumERC20ProtocolConfig = exports.EthereumProtocolOptions = exports.EthereumProtocolConfig = exports.EthereumProtocolNetwork = exports.EtherscanBlockExplorer = exports.EthereumProtocolNetworkExtras = exports.EthereumCryptoClient = exports.GenericERC20 = exports.EthereumClassicProtocol = exports.EthereumRopstenProtocol = exports.EthereumProtocol = exports.CosmosTransaction = exports.CosmosAddress = exports.CosmosDelegationActionType = exports.CosmosProtocolOptions = exports.CosmosProtocolConfig = exports.CosmosProtocolNetwork = exports.MintscanBlockExplorer = exports.CosmosCryptoClient = exports.CosmosProtocol = exports.BitcoinSegwitAddress = exports.BitcoinSegwitProtocol = exports.BitcoinAddress = exports.BitcoinProtocolOptions = exports.BitcoinProtocolConfig = exports.BitcoinProtocolNetwork = exports.BlockcypherBlockExplorer = exports.BitcoinProtocolNetworkExtras = exports.BitcoinCryptoClient = exports.BitcoinTestnetProtocol = exports.BitcoinProtocol = exports.AeternityAddress = exports.AeternityProtocolNetwork = exports.AeternalBlockExplorer = exports.AeternityProtocolOptions = exports.AeternityCryptoClient = exports.AeternityProtocol = exports.NetworkType = exports.SubProtocolSymbols = exports.MainProtocolSymbols = exports.ProtocolNetwork = exports.ProtocolBlockExplorer = exports.CryptoClient = exports.AirGapNFTWallet = exports.AirGapWalletStatus = exports.AirGapCoinWallet = exports.AirGapMarketWallet = exports.AirGapWallet = void 0;
|
|
4
4
|
exports.TezosProtocol = exports.SubstrateAddress = exports.SubstrateTransaction = exports.SubstrateStakingActionType = exports.SubstrateNominationStatus = exports.SubstrateElectionStatus = exports.MoonriverProtocolOptions = exports.MoonriverProtocolNetwork = exports.MoonriverProtocolConfig = exports.MoonriverSubscanBlockExplorer = exports.MoonriverProtocolNetworkExtras = exports.MoonbaseProtocolOptions = exports.MoonbaseProtocolNetwork = exports.MoonbaseProtocolConfig = exports.MoonbaseSubscanBlockExplorer = exports.MoonbaseProtocolNetworkExtras = exports.PolkadotProtocolOptions = exports.PolkadotProtocolNetwork = exports.PolkadotProtocolConfig = exports.PolkadotSubscanBlockExplorer = exports.PolkadotProtocolNetworkExtras = exports.KusamaProtocolOptions = exports.KusamaProtocolNetwork = exports.KusamaProtocolConfig = exports.KusamaPolkascanBlockExplorer = exports.KusamaProtocolNetworkExtras = exports.SubstrateNodeClient = exports.SubstrateProtocolOptions = exports.SubstrateProtocolNetwork = exports.SubstrateProtocolConfig = exports.SubstrateProtocolNetworkExtras = exports.SubstrateCryptoClient = exports.SubstratePayee = exports.SubstrateNetwork = exports.ShidenProtocol = exports.AstarProtocol = exports.MoonriverProtocol = exports.MoonbaseProtocol = exports.MoonbeamProtocol = exports.KusamaProtocol = exports.PolkadotProtocol = exports.SubstrateDelegateProtocol = exports.SubstrateProtocol = exports.GroestlcoinProtocolOptions = exports.GroestlcoinProtocolConfig = exports.GroestlcoinProtocolNetwork = exports.CryptoidBlockExplorer = exports.GroestlcoinProtocolNetworkExtras = exports.GroestlcoinTestnetProtocol = exports.GroestlcoinProtocol = void 0;
|
|
5
5
|
exports.TezosFAProtocolOptions = exports.TezosBTCTezProtocolConfig = exports.TezosSIRSProtocolConfig = exports.TezosDOGAProtocolConfig = exports.TezosQUIPUProtocolConfig = exports.TezosWRAPProtocolConfig = exports.TezosUBTCProtocolConfig = exports.TezosUDEFIProtocolConfig = exports.TezosPlentyProtocolConfig = exports.TezosCTezProtocolConfig = exports.TezosUSDTProtocolConfig = exports.TezosUSDProtocolConfig = exports.TezosStakerProtocolConfig = exports.TezosKolibriUSDProtocolConfig = exports.TezosWrappedProtocolConfig = exports.TezosYOUProtocolConfig = exports.TezosUUSDProtocolConfig = exports.TezosETHProtocolConfig = exports.TezosBTCProtocolConfig = exports.TezosFA2ProtocolConfig = exports.TezosFAProtocolConfig = exports.TezosProtocolOptions = exports.TezosProtocolConfig = exports.TezosProtocolNetwork = exports.TezosBlockExplorer = exports.TezosCryptoClient = exports.TezosDelegatorAction = exports.TezosSIRS = exports.TezosBTCTez = exports.TezosDOGA = exports.TezosQUIPU = exports.TezosPlenty = exports.TezosCTez = exports.TezosKolibriUSD = exports.TezosWRAP = exports.TezosWrapped = exports.TezosUBTC = exports.TezosUDEFI = exports.TezosYOU = exports.TezosUUSD = exports.TezosETH = exports.TezosUSDT = exports.TezosUSD = exports.TezosStaker = exports.TezosBTC = exports.TezosFA2Protocol = exports.TezosFA1p2Protocol = exports.TezosFA1Protocol = exports.TezosFAProtocol = exports.TezosKtProtocol = void 0;
|
|
6
|
-
exports.bufferFrom = exports.assertNever = exports.SubProtocolType = exports.TimeInterval = exports.generateIdV2 = exports.generateId = exports.addSubProtocol = exports.isCoinlibReady = exports.Domain = exports.TransactionError = exports.BalanceError = exports.ProtocolErrorType = exports.SerializerErrorType = exports.CoinlibError = exports.NetworkError = exports.ProtocolNotSupported = exports.SerializerVersionMismatch = exports.TypeNotSupported = exports.isSubProtocolSymbol = exports.isMainProtocolSymbol = exports.isProtocolSymbol = exports.supportedProtocols = exports.getSubProtocolsByIdentifier = exports.getProtocolByIdentifier = exports.
|
|
6
|
+
exports.bufferFrom = exports.assertNever = exports.SubProtocolType = exports.TimeInterval = exports.generateIdV2 = exports.generateId = exports.addSubProtocol = exports.isCoinlibReady = exports.Domain = exports.TransactionError = exports.BalanceError = exports.ProtocolErrorType = exports.SerializerErrorType = exports.CoinlibError = exports.NetworkError = exports.ProtocolNotSupported = exports.SerializerVersionMismatch = exports.TypeNotSupported = exports.isSubProtocolSymbol = exports.isMainProtocolSymbol = exports.isProtocolSymbol = exports.supportedProtocols = exports.getSubProtocolsByIdentifier = exports.getProtocolByIdentifier = exports.addSupportedProtocol = exports.getProtocolOptionsByIdentifier = exports.isNetworkEqual = exports.ImportAccountAction = exports.SimpleAction = exports.LinkedAction = exports.RepeatableAction = exports.Action = exports.Message = exports.SerializerV3 = exports.Serializer = exports.IACMessageType = exports.TezosIndexerClient = exports.TezosDomains = exports.TezosAddress = exports.TezosUtils = exports.TezosShieldedTezProtocolConfig = exports.TezosSaplingProtocolConfig = exports.TezosSaplingProtocolOptions = exports.TezosShieldedTezProtocol = exports.TezosSaplingProtocol = exports.TezosNetwork = exports.TezosFA2ProtocolOptions = void 0;
|
|
7
7
|
// tslint:disable:ordered-imports
|
|
8
8
|
// This needs to be imported first, otherwise the tests won't run anymore
|
|
9
9
|
var EthereumProtocol_1 = require("./protocols/ethereum/EthereumProtocol");
|
|
@@ -84,8 +84,6 @@ var serializer_2 = require("./serializer-v3/serializer");
|
|
|
84
84
|
Object.defineProperty(exports, "SerializerV3", { enumerable: true, get: function () { return serializer_2.SerializerV3; } });
|
|
85
85
|
var coinlibReady_1 = require("./utils/coinlibReady");
|
|
86
86
|
Object.defineProperty(exports, "isCoinlibReady", { enumerable: true, get: function () { return coinlibReady_1.isCoinlibReady; } });
|
|
87
|
-
var createProtocol_1 = require("./utils/createProtocol");
|
|
88
|
-
Object.defineProperty(exports, "createProtocolByIdentifier", { enumerable: true, get: function () { return createProtocol_1.createProtocolByIdentifier; } });
|
|
89
87
|
var Network_1 = require("./utils/Network");
|
|
90
88
|
Object.defineProperty(exports, "isNetworkEqual", { enumerable: true, get: function () { return Network_1.isNetworkEqual; } });
|
|
91
89
|
var protocolsByIdentifier_1 = require("./utils/protocolsByIdentifier");
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,iCAAiC;AACjC,yEAAyE;AACzE,0EAAwE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,iCAAiC;AACjC,yEAAyE;AACzE,0EAAwE;AA+UtE,iGA/UO,mCAAgB,OA+UP;AA7UlB,mCASiB;AA4gBf,qGAphBA,6BAAoB,OAohBA;AADpB,0GAlhBA,kCAAyB,OAkhBA;AADzB,iGAhhBA,yBAAgB,OAghBA;AAGhB,6FAlhBA,qBAAY,OAkhBA;AAEZ,oGAnhBA,4BAAmB,OAmhBA;AACnB,kGAnhBA,0BAAiB,OAmhBA;AACjB,6FAnhBA,qBAAY,OAmhBA;AACZ,iGAnhBA,yBAAgB,OAmhBA;AAjhBlB,wDAA6D;AA6gB3D,6FA7gBO,4BAAY,OA6gBP;AAKZ,uFAlhBqB,sBAAM,OAkhBrB;AA/gBR,6EAA2E;AAqRzE,kGArRO,qCAAiB,OAqRP;AApRnB,uEAAqE;AA+RnE,gGA/RO,iCAAe,OA+RP;AA9RjB,qFAAmF;AA+RjF,uGA/RO,+CAAsB,OA+RP;AA9RxB,oEAA8F;AAsT5F,2GAtTO,2CAA0B,OAsTP;AAR1B,+FA9SmC,+BAAc,OA8SnC;AA7ShB,wEAAsE;AA+TpE,6FA/TO,2BAAY,OA+TP;AA9Td,wFAAsF;AA6TpF,wGA7TO,iDAAuB,OA6TP;AA5TzB,wFAAsF;A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ressCursor } from '../protocols/aeternity/AeternityTypes';
|
|
2
|
+
import { BitcoinAddressCursor } from '../protocols/bitcoin/BitcoinTypes';
|
|
3
|
+
import { CosmosAddressCursor } from '../protocols/cosmos/CosmosTypes';
|
|
4
|
+
import { EthereumAddressCursor } from '../protocols/ethereum/EthereumTypes';
|
|
5
|
+
import { SubstrateAddressCursor } from '../protocols/substrate/SubstrateTypes';
|
|
6
|
+
import { TezosKtAddressCursor } from '../protocols/tezos/types/kt/TezosKtAddressCursor';
|
|
7
|
+
import { TezosSaplingAddressCursor } from '../protocols/tezos/types/sapling/TezosSaplingAddressCursor';
|
|
8
|
+
import { TezosAddressCursor } from '../protocols/tezos/types/TezosAddressCursor';
|
|
9
|
+
export interface IAirGapAddress {
|
|
10
|
+
getValue(): string;
|
|
11
|
+
}
|
|
12
|
+
export interface IBaseProtocolAddressCursor {
|
|
13
|
+
hasNext: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare type IProtocolAddressCursor = AeternityAddressCursor | BitcoinAddressCursor | CosmosAddressCursor | EthereumAddressCursor | SubstrateAddressCursor | TezosAddressCursor | TezosKtAddressCursor | TezosSaplingAddressCursor;
|
|
16
|
+
export interface IAirGapAddressResult<T extends IBaseProtocolAddressCursor = IProtocolAddressCursor> {
|
|
17
|
+
address: string;
|
|
18
|
+
cursor: T;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IAirGapAddress.js","sourceRoot":"","sources":["../../src/interfaces/IAirGapAddress.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
export declare abstract class CryptoClient {
|
|
3
2
|
abstract signMessage(message: string, keypair: {
|
|
4
3
|
publicKey?: string;
|
|
5
|
-
privateKey:
|
|
4
|
+
privateKey: string;
|
|
6
5
|
}): Promise<string>;
|
|
7
6
|
abstract verifyMessage(message: string, signature: string, publicKey: string): Promise<boolean>;
|
|
8
|
-
encryptAES(payload: string, privateKey:
|
|
9
|
-
decryptAES(encryptedPayload: string, privateKey:
|
|
7
|
+
encryptAES(payload: string, privateKey: string): Promise<string>;
|
|
8
|
+
decryptAES(encryptedPayload: string, privateKey: string): Promise<string>;
|
|
10
9
|
encryptAsymmetric(payload: string, publicKey: string): Promise<string>;
|
|
11
10
|
decryptAsymmetric(encryptedPayload: string, keypair: {
|
|
12
11
|
publicKey?: string;
|
|
13
|
-
privateKey:
|
|
12
|
+
privateKey: string;
|
|
14
13
|
}): Promise<string>;
|
|
15
14
|
recoverPublicKeyFromSignature(): Promise<void>;
|
|
16
15
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { CryptoClient } from './CryptoClient';
|
|
3
2
|
export declare abstract class Ed25519CryptoClient extends CryptoClient {
|
|
4
3
|
encryptAsymmetric(payload: string, publicKey: string): Promise<string>;
|
|
5
4
|
decryptAsymmetric(encryptedPayload: string, keypair: {
|
|
6
5
|
publicKey: string;
|
|
7
|
-
privateKey:
|
|
6
|
+
privateKey: string;
|
|
8
7
|
}): Promise<string>;
|
|
9
8
|
}
|
|
@@ -80,7 +80,7 @@ var Ed25519CryptoClient = /** @class */ (function (_super) {
|
|
|
80
80
|
return __awaiter(this, void 0, void 0, function () {
|
|
81
81
|
var kxSelfPrivateKey, kxSelfPublicKey, decryptedMessage;
|
|
82
82
|
return __generator(this, function (_a) {
|
|
83
|
-
kxSelfPrivateKey = sodium.crypto_sign_ed25519_sk_to_curve25519(Buffer.from(keypair.privateKey)) // Secret bytes to scalar bytes
|
|
83
|
+
kxSelfPrivateKey = sodium.crypto_sign_ed25519_sk_to_curve25519(Buffer.from(keypair.privateKey, 'hex')) // Secret bytes to scalar bytes
|
|
84
84
|
;
|
|
85
85
|
kxSelfPublicKey = sodium.crypto_sign_ed25519_pk_to_curve25519(Buffer.from(keypair.publicKey, 'hex')) // Secret bytes to scalar bytes
|
|
86
86
|
;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Ed25519CryptoClient.js","sourceRoot":"","sources":["../../src/protocols/Ed25519CryptoClient.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6C;AAE7C,+CAA6C;AAE7C,SAAS,KAAK,CAAC,KAAU;IACvB,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;AAC3C,CAAC;AAED;IAAkD,uCAAY;IAA9D;;IAsBA,CAAC;IArBc,+CAAiB,GAA9B,UAA+B,OAAe,EAAE,SAAiB;;;;;4BAC/D,qBAAM,MAAM,CAAC,KAAK,EAAA;;wBAAlB,SAAkB,CAAA;wBAEZ,eAAe,GAAe,MAAM,CAAC,oCAAoC,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,+BAA+B;wBAAhC,CAAA;wBACxG,gBAAgB,GAAe,MAAM,CAAC,eAAe,CAAC,OAAO,EAAE,eAAe,CAAC,CAAA;wBAErF,sBAAO,KAAK,CAAC,gBAAgB,CAAC,EAAA;;;;KAC/B;IAEY,+CAAiB,GAA9B,UAA+B,gBAAwB,EAAE,OAAkD;;;;gBACnG,gBAAgB,GAAe,MAAM,CAAC,oCAAoC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,+BAA+B;gBAAhC,CAAA;
|
|
1
|
+
{"version":3,"file":"Ed25519CryptoClient.js","sourceRoot":"","sources":["../../src/protocols/Ed25519CryptoClient.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6C;AAE7C,+CAA6C;AAE7C,SAAS,KAAK,CAAC,KAAU;IACvB,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,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SignedTransaction } from '../serializer/schemas/definitions/signed-transaction';
|
|
4
|
+
import { UnsignedTransaction } from '../serializer/schemas/definitions/unsigned-transaction';
|
|
5
|
+
import { ProtocolOptions } from '../utils/ProtocolOptions';
|
|
6
|
+
import { ProtocolSymbols } from '../utils/ProtocolSymbols';
|
|
7
|
+
export interface FeeDefaults {
|
|
8
|
+
low: string;
|
|
9
|
+
medium: string;
|
|
10
|
+
high: string;
|
|
11
|
+
}
|
|
12
|
+
export interface CoinAddress {
|
|
13
|
+
asString(): string;
|
|
14
|
+
}
|
|
15
|
+
export interface ICoinBaseProtocol {
|
|
16
|
+
symbol: string;
|
|
17
|
+
name: string;
|
|
18
|
+
marketSymbol: string;
|
|
19
|
+
feeSymbol: string;
|
|
20
|
+
feeDefaults: FeeDefaults;
|
|
21
|
+
decimals: number;
|
|
22
|
+
feeDecimals: number;
|
|
23
|
+
identifier: ProtocolSymbols;
|
|
24
|
+
units: {
|
|
25
|
+
unitSymbol: string;
|
|
26
|
+
factor: string;
|
|
27
|
+
}[];
|
|
28
|
+
supportsHD: boolean;
|
|
29
|
+
standardDerivationPath: string;
|
|
30
|
+
addressIsCaseSensitive: boolean;
|
|
31
|
+
addressValidationPattern: string;
|
|
32
|
+
addressPlaceholder: string;
|
|
33
|
+
options: ProtocolOptions;
|
|
34
|
+
cryptoClient: CryptoClient;
|
|
35
|
+
getAddressFromPublicKey(publicKey: string, cursor?: IProtocolAddressCursor): Promise<IAirGapAddressResult>;
|
|
36
|
+
getAddressesFromPublicKey(publicKey: string, cursor?: IProtocolAddressCursor): Promise<IAirGapAddressResult[]>;
|
|
37
|
+
getAddressFromExtendedPublicKey(extendedPublicKey: string, visibilityDerivationIndex: number, addressDerivationIndex: number): Promise<IAirGapAddressResult>;
|
|
38
|
+
getAddressesFromExtendedPublicKey(extendedPublicKey: string, visibilityDerivationIndex: number, addressCount: number, offset: number): Promise<IAirGapAddressResult[]>;
|
|
39
|
+
getTransactionDetails(transaction: UnsignedTransaction, data?: {
|
|
40
|
+
[key: string]: unknown;
|
|
41
|
+
}): Promise<IAirGapTransaction[]>;
|
|
42
|
+
getTransactionDetailsFromSigned(transaction: SignedTransaction, data?: {
|
|
43
|
+
[key: string]: unknown;
|
|
44
|
+
}): Promise<IAirGapTransaction[]>;
|
|
45
|
+
verifyMessage(message: string, signature: string, publicKey: string): Promise<boolean>;
|
|
46
|
+
encryptAsymmetric(payload: string, publicKey: string): Promise<string>;
|
|
47
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ICoinBaseProtocol.js","sourceRoot":"","sources":["../../src/protocols/ICoinBaseProtocol.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { IAirGapSignedTransaction } from '../interfaces/IAirGapSignedTransaction';
|
|
2
|
+
import { ICoinBaseProtocol } from './ICoinBaseProtocol';
|
|
3
|
+
export interface ICoinOfflineProtocol extends ICoinBaseProtocol {
|
|
4
|
+
getPublicKeyFromMnemonic(mnemonic: string, derivationPath: string, password?: string): Promise<string>;
|
|
5
|
+
getPrivateKeyFromMnemonic(mnemonic: string, derivationPath: string, password?: string): Promise<string>;
|
|
6
|
+
getExtendedPrivateKeyFromMnemonic(mnemonic: string, derivationPath: string, password?: string): Promise<string>;
|
|
7
|
+
getPublicKeyFromHexSecret(secret: string, derivationPath: string): Promise<string>;
|
|
8
|
+
getPrivateKeyFromHexSecret(secret: string, derivationPath: string): Promise<string>;
|
|
9
|
+
signWithExtendedPrivateKey(extendedPrivateKey: string, transaction: any, childDerivationPath?: string): Promise<IAirGapSignedTransaction>;
|
|
10
|
+
signWithPrivateKey(privateKey: string, transaction: any): Promise<IAirGapSignedTransaction>;
|
|
11
|
+
getExtendedPrivateKeyFromHexSecret(secret: string, derivationPath: string): Promise<string>;
|
|
12
|
+
signMessage(message: string, keypair: {
|
|
13
|
+
publicKey?: string;
|
|
14
|
+
privateKey: string;
|
|
15
|
+
}): Promise<string>;
|
|
16
|
+
decryptAsymmetric(encryptedPayload: string, keypair: {
|
|
17
|
+
publicKey?: string;
|
|
18
|
+
privateKey: string;
|
|
19
|
+
}): Promise<string>;
|
|
20
|
+
encryptAES(payload: string, privateKey: string): Promise<string>;
|
|
21
|
+
decryptAES(encryptedPayload: string, privateKey: string): Promise<string>;
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ICoinOfflineProtocol.js","sourceRoot":"","sources":["../../src/protocols/ICoinOfflineProtocol.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { AirGapTransactionStatus, IAirGapTransactionResult } from '../interfaces/IAirGapTransaction';
|
|
2
|
+
import { IProtocolTransactionCursor } from './../interfaces/IAirGapTransaction';
|
|
3
|
+
import { FeeDefaults, ICoinBaseProtocol } from './ICoinBaseProtocol';
|
|
4
|
+
import { ICoinSubProtocol } from './ICoinSubProtocol';
|
|
5
|
+
export interface ICoinOnlineProtocol extends ICoinBaseProtocol {
|
|
6
|
+
getBlockExplorerLinkForAddress(address: string): Promise<string>;
|
|
7
|
+
getBlockExplorerLinkForTxId(txId: string): Promise<string>;
|
|
8
|
+
getTransactionsFromPublicKey(publicKey: string, limit: number, cursor?: IProtocolTransactionCursor): Promise<IAirGapTransactionResult>;
|
|
9
|
+
getTransactionsFromExtendedPublicKey(extendedPublicKey: string, limit: number, cursor?: IProtocolTransactionCursor): Promise<IAirGapTransactionResult>;
|
|
10
|
+
getTransactionsFromAddresses(addresses: string[], limit: number, cursor?: IProtocolTransactionCursor): Promise<IAirGapTransactionResult>;
|
|
11
|
+
getBalanceOfAddresses(addresses: string[], data?: {
|
|
12
|
+
[key: string]: unknown;
|
|
13
|
+
}): Promise<string>;
|
|
14
|
+
getBalanceOfPublicKey(publicKey: string, data?: {
|
|
15
|
+
addressIndex?: number;
|
|
16
|
+
[key: string]: unknown;
|
|
17
|
+
}): Promise<string>;
|
|
18
|
+
getBalanceOfExtendedPublicKey(extendedPublicKey: string, offset: number, data?: {
|
|
19
|
+
[key: string]: unknown;
|
|
20
|
+
}): Promise<string>;
|
|
21
|
+
getAvailableBalanceOfAddresses(addresses: string[], data?: {
|
|
22
|
+
[key: string]: unknown;
|
|
23
|
+
}): Promise<string>;
|
|
24
|
+
getTransactionStatuses(transactionHash: string[]): Promise<AirGapTransactionStatus[]>;
|
|
25
|
+
getBalanceOfPublicKeyForSubProtocols(publicKey: string, subProtocols: ICoinSubProtocol[]): Promise<string[]>;
|
|
26
|
+
estimateMaxTransactionValueFromExtendedPublicKey(extendedPublicKey: string, recipients: string[], fee?: string, data?: {
|
|
27
|
+
[key: string]: unknown;
|
|
28
|
+
}): Promise<string>;
|
|
29
|
+
estimateMaxTransactionValueFromPublicKey(publicKey: string, recipients: string[], fee?: string, data?: {
|
|
30
|
+
addressIndex?: number;
|
|
31
|
+
[key: string]: unknown;
|
|
32
|
+
}): Promise<string>;
|
|
33
|
+
estimateFeeDefaultsFromExtendedPublicKey(publicKey: string, recipients: string[], values: string[], data?: {
|
|
34
|
+
[key: string]: unknown;
|
|
35
|
+
}): Promise<FeeDefaults>;
|
|
36
|
+
estimateFeeDefaultsFromPublicKey(publicKey: string, recipients: string[], values: string[], data?: {
|
|
37
|
+
[key: string]: unknown;
|
|
38
|
+
}): Promise<FeeDefaults>;
|
|
39
|
+
prepareTransactionFromExtendedPublicKey(extendedPublicKey: string, offset: number, recipients: string[], values: string[], fee: string, extras?: {
|
|
40
|
+
[key: string]: unknown;
|
|
41
|
+
}): Promise<any>;
|
|
42
|
+
prepareTransactionFromPublicKey(publicKey: string, recipients: string[], values: string[], fee: string, extras?: {
|
|
43
|
+
[key: string]: unknown;
|
|
44
|
+
}): Promise<any>;
|
|
45
|
+
broadcastTransaction(rawTransaction: any): Promise<string>;
|
|
46
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ICoinOnlineProtocol.js","sourceRoot":"","sources":["../../src/protocols/ICoinOnlineProtocol.ts"],"names":[],"mappings":""}
|
|
@@ -1,115 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { AirGapTransactionStatus, IAirGapTransaction, IAirGapTransactionResult } from '../interfaces/IAirGapTransaction';
|
|
5
|
-
import { SignedTransaction } from '../serializer/schemas/definitions/signed-transaction';
|
|
6
|
-
import { UnsignedTransaction } from '../serializer/schemas/definitions/unsigned-transaction';
|
|
7
|
-
import { ProtocolOptions } from '../utils/ProtocolOptions';
|
|
8
|
-
import { ProtocolSymbols } from '../utils/ProtocolSymbols';
|
|
9
|
-
import { IProtocolTransactionCursor } from './../interfaces/IAirGapTransaction';
|
|
10
|
-
import { ICoinSubProtocol } from './ICoinSubProtocol';
|
|
11
|
-
export interface FeeDefaults {
|
|
12
|
-
low: string;
|
|
13
|
-
medium: string;
|
|
14
|
-
high: string;
|
|
15
|
-
}
|
|
1
|
+
import { ICoinOfflineProtocol } from './ICoinOfflineProtocol';
|
|
2
|
+
import { ICoinOnlineProtocol } from './ICoinOnlineProtocol';
|
|
3
|
+
export { CoinAddress, FeeDefaults } from './ICoinBaseProtocol';
|
|
16
4
|
export interface CurrencyUnit {
|
|
17
5
|
unitSymbol: string;
|
|
18
6
|
factor: string;
|
|
19
7
|
}
|
|
20
|
-
export interface
|
|
21
|
-
getValue(): string;
|
|
22
|
-
}
|
|
23
|
-
export interface ICoinProtocol {
|
|
24
|
-
symbol: string;
|
|
25
|
-
name: string;
|
|
26
|
-
marketSymbol: string;
|
|
27
|
-
feeSymbol: string;
|
|
28
|
-
feeDefaults: FeeDefaults;
|
|
29
|
-
decimals: number;
|
|
30
|
-
feeDecimals: number;
|
|
31
|
-
identifier: ProtocolSymbols;
|
|
32
|
-
units: {
|
|
33
|
-
unitSymbol: string;
|
|
34
|
-
factor: string;
|
|
35
|
-
}[];
|
|
36
|
-
supportsHD: boolean;
|
|
37
|
-
standardDerivationPath: string;
|
|
38
|
-
addressIsCaseSensitive: boolean;
|
|
39
|
-
addressValidationPattern: string;
|
|
40
|
-
addressPlaceholder: string;
|
|
41
|
-
subProtocols?: ICoinSubProtocol[];
|
|
42
|
-
options: ProtocolOptions;
|
|
43
|
-
cryptoClient: CryptoClient;
|
|
44
|
-
getBlockExplorerLinkForAddress(address: string): Promise<string>;
|
|
45
|
-
getBlockExplorerLinkForTxId(txId: string): Promise<string>;
|
|
46
|
-
getPublicKeyFromMnemonic(mnemonic: string, derivationPath: string, password?: string): Promise<string>;
|
|
47
|
-
getPrivateKeyFromMnemonic(mnemonic: string, derivationPath: string, password?: string): Promise<Buffer>;
|
|
48
|
-
getExtendedPrivateKeyFromMnemonic(mnemonic: string, derivationPath: string, password?: string): Promise<string>;
|
|
49
|
-
getPublicKeyFromHexSecret(secret: string, derivationPath: string): Promise<string>;
|
|
50
|
-
getPrivateKeyFromHexSecret(secret: string, derivationPath: string): Promise<Buffer>;
|
|
51
|
-
getExtendedPrivateKeyFromHexSecret(secret: string, derivationPath: string): Promise<string>;
|
|
52
|
-
getAddressFromPublicKey(publicKey: string): Promise<CoinAddress>;
|
|
53
|
-
getAddressesFromPublicKey(publicKey: string): Promise<CoinAddress[]>;
|
|
54
|
-
getAddressFromExtendedPublicKey(extendedPublicKey: string, visibilityDerivationIndex: number, addressDerivationIndex: number): Promise<CoinAddress>;
|
|
55
|
-
getAddressesFromExtendedPublicKey(extendedPublicKey: string, visibilityDerivationIndex: number, addressCount: number, offset: number): Promise<CoinAddress[]>;
|
|
56
|
-
getNextAddressFromPublicKey(publicKey: string, current: CoinAddress): Promise<CoinAddress>;
|
|
57
|
-
getTransactionsFromPublicKey(publicKey: string, limit: number, cursor?: IProtocolTransactionCursor): Promise<IAirGapTransactionResult>;
|
|
58
|
-
getTransactionsFromExtendedPublicKey(extendedPublicKey: string, limit: number, cursor?: IProtocolTransactionCursor): Promise<IAirGapTransactionResult>;
|
|
59
|
-
getTransactionsFromAddresses(addresses: string[], limit: number, cursor?: IProtocolTransactionCursor): Promise<IAirGapTransactionResult>;
|
|
60
|
-
signWithExtendedPrivateKey(extendedPrivateKey: string, transaction: any, childDerivationPath?: string): Promise<IAirGapSignedTransaction>;
|
|
61
|
-
signWithPrivateKey(privateKey: Buffer, transaction: any): Promise<IAirGapSignedTransaction>;
|
|
62
|
-
getTransactionDetails(transaction: UnsignedTransaction, data?: {
|
|
63
|
-
[key: string]: unknown;
|
|
64
|
-
}): Promise<IAirGapTransaction[]>;
|
|
65
|
-
getTransactionDetailsFromSigned(transaction: SignedTransaction, data?: {
|
|
66
|
-
[key: string]: unknown;
|
|
67
|
-
}): Promise<IAirGapTransaction[]>;
|
|
68
|
-
getBalanceOfAddresses(addresses: string[], data?: {
|
|
69
|
-
[key: string]: unknown;
|
|
70
|
-
}): Promise<string>;
|
|
71
|
-
getBalanceOfPublicKey(publicKey: string, data?: {
|
|
72
|
-
addressIndex?: number;
|
|
73
|
-
[key: string]: unknown;
|
|
74
|
-
}): Promise<string>;
|
|
75
|
-
getBalanceOfExtendedPublicKey(extendedPublicKey: string, offset: number, data?: {
|
|
76
|
-
[key: string]: unknown;
|
|
77
|
-
}): Promise<string>;
|
|
78
|
-
getAvailableBalanceOfAddresses(addresses: string[], data?: {
|
|
79
|
-
[key: string]: unknown;
|
|
80
|
-
}): Promise<string>;
|
|
81
|
-
getTransactionStatuses(transactionHash: string[]): Promise<AirGapTransactionStatus[]>;
|
|
82
|
-
getBalanceOfPublicKeyForSubProtocols(publicKey: string, subProtocols: ICoinSubProtocol[]): Promise<string[]>;
|
|
83
|
-
estimateMaxTransactionValueFromExtendedPublicKey(extendedPublicKey: string, recipients: string[], fee?: string, data?: {
|
|
84
|
-
[key: string]: unknown;
|
|
85
|
-
}): Promise<string>;
|
|
86
|
-
estimateMaxTransactionValueFromPublicKey(publicKey: string, recipients: string[], fee?: string, data?: {
|
|
87
|
-
addressIndex?: number;
|
|
88
|
-
[key: string]: unknown;
|
|
89
|
-
}): Promise<string>;
|
|
90
|
-
estimateFeeDefaultsFromExtendedPublicKey(publicKey: string, recipients: string[], values: string[], data?: {
|
|
91
|
-
[key: string]: unknown;
|
|
92
|
-
}): Promise<FeeDefaults>;
|
|
93
|
-
estimateFeeDefaultsFromPublicKey(publicKey: string, recipients: string[], values: string[], data?: {
|
|
94
|
-
[key: string]: unknown;
|
|
95
|
-
}): Promise<FeeDefaults>;
|
|
96
|
-
prepareTransactionFromExtendedPublicKey(extendedPublicKey: string, offset: number, recipients: string[], values: string[], fee: string, extras?: {
|
|
97
|
-
[key: string]: unknown;
|
|
98
|
-
}): Promise<any>;
|
|
99
|
-
prepareTransactionFromPublicKey(publicKey: string, recipients: string[], values: string[], fee: string, extras?: {
|
|
100
|
-
[key: string]: unknown;
|
|
101
|
-
}): Promise<any>;
|
|
102
|
-
broadcastTransaction(rawTransaction: any): Promise<string>;
|
|
103
|
-
signMessage(message: string, keypair: {
|
|
104
|
-
publicKey?: string;
|
|
105
|
-
privateKey: Buffer;
|
|
106
|
-
}): Promise<string>;
|
|
107
|
-
verifyMessage(message: string, signature: string, publicKey: string): Promise<boolean>;
|
|
108
|
-
encryptAsymmetric(payload: string, publicKey: string): Promise<string>;
|
|
109
|
-
decryptAsymmetric(encryptedPayload: string, keypair: {
|
|
110
|
-
publicKey?: string;
|
|
111
|
-
privateKey: Buffer;
|
|
112
|
-
}): Promise<string>;
|
|
113
|
-
encryptAES(payload: string, privateKey: Buffer): Promise<string>;
|
|
114
|
-
decryptAES(encryptedPayload: string, privateKey: Buffer): Promise<string>;
|
|
8
|
+
export interface ICoinProtocol extends ICoinOnlineProtocol, ICoinOfflineProtocol {
|
|
115
9
|
}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
+
import { IAirGapAddressResult } from '../interfaces/IAirGapAddress';
|
|
1
2
|
import { IProtocolTransactionCursor } from '../interfaces/IAirGapTransaction';
|
|
2
|
-
import { FeeDefaults
|
|
3
|
+
import { FeeDefaults } from './ICoinProtocol';
|
|
3
4
|
import { TezosTransactionResult } from './tezos/types/TezosTransactionResult';
|
|
4
5
|
export declare abstract class NonExtendedProtocol {
|
|
5
6
|
getExtendedPrivateKeyFromMnemonic(mnemonic: string, derivationPath: string, password?: string): Promise<string>;
|
|
6
7
|
getExtendedPrivateKeyFromHexSecret(secret: string, derivationPath: string): Promise<string>;
|
|
7
8
|
getBalanceOfExtendedPublicKey(extendedPublicKey: string, offset: number): Promise<string>;
|
|
8
9
|
signWithExtendedPrivateKey(extendedPrivateKey: string, transaction: any, childDerivationPath: string): Promise<string>;
|
|
9
|
-
getAddressFromExtendedPublicKey(extendedPublicKey: string, visibilityDerivationIndex: number, addressDerivationIndex: number): Promise<
|
|
10
|
-
getAddressesFromExtendedPublicKey(extendedPublicKey: string, visibilityDerivationIndex: number, addressCount: number, offset: number): Promise<
|
|
10
|
+
getAddressFromExtendedPublicKey(extendedPublicKey: string, visibilityDerivationIndex: number, addressDerivationIndex: number): Promise<IAirGapAddressResult>;
|
|
11
|
+
getAddressesFromExtendedPublicKey(extendedPublicKey: string, visibilityDerivationIndex: number, addressCount: number, offset: number): Promise<IAirGapAddressResult[]>;
|
|
11
12
|
estimateMaxTransactionValueFromExtendedPublicKey(extendedPublicKey: string, recipients: string[], fee: string): Promise<string>;
|
|
12
13
|
estimateFeeDefaultsFromExtendedPublicKey(publicKey: string, recipients: string[], values: string[], data?: any): Promise<FeeDefaults>;
|
|
13
14
|
getTransactionsFromExtendedPublicKey(extendedPublicKey: string, limit: number, cursor: IProtocolTransactionCursor): Promise<TezosTransactionResult>;
|
|
@@ -17,7 +17,10 @@ var NonExtendedProtocol = /** @class */ (function () {
|
|
|
17
17
|
return Promise.reject('extended private key signing for not implemented');
|
|
18
18
|
};
|
|
19
19
|
NonExtendedProtocol.prototype.getAddressFromExtendedPublicKey = function (extendedPublicKey, visibilityDerivationIndex, addressDerivationIndex) {
|
|
20
|
-
return Promise.resolve({
|
|
20
|
+
return Promise.resolve({
|
|
21
|
+
address: '',
|
|
22
|
+
cursor: { hasNext: false }
|
|
23
|
+
});
|
|
21
24
|
};
|
|
22
25
|
NonExtendedProtocol.prototype.getAddressesFromExtendedPublicKey = function (extendedPublicKey, visibilityDerivationIndex, addressCount, offset) {
|
|
23
26
|
return Promise.resolve([]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NonExtendedProtocol.js","sourceRoot":"","sources":["../../src/protocols/NonExtendedProtocol.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"NonExtendedProtocol.js","sourceRoot":"","sources":["../../src/protocols/NonExtendedProtocol.ts"],"names":[],"mappings":";;;AAMA;IAAA;IAmEA,CAAC;IAlEQ,+DAAiC,GAAxC,UAAyC,QAAgB,EAAE,cAAsB,EAAE,QAAiB;QAClG,MAAM,OAAO,CAAC,MAAM,CAAC,8CAA8C,CAAC,CAAA;IACtE,CAAC;IAEM,gEAAkC,GAAzC,UAA0C,MAAc,EAAE,cAAsB;QAC9E,MAAM,OAAO,CAAC,MAAM,CAAC,8CAA8C,CAAC,CAAA;IACtE,CAAC;IAEM,2DAA6B,GAApC,UAAqC,iBAAyB,EAAE,MAAc;QAC5E,OAAO,OAAO,CAAC,MAAM,CAAC,yCAAyC,CAAC,CAAA;IAClE,CAAC;IAEM,wDAA0B,GAAjC,UAAkC,kBAA0B,EAAE,WAAgB,EAAE,mBAA2B;QACzG,OAAO,OAAO,CAAC,MAAM,CAAC,kDAAkD,CAAC,CAAA;IAC3E,CAAC;IAEM,6DAA+B,GAAtC,UACE,iBAAyB,EACzB,yBAAiC,EACjC,sBAA8B;QAE9B,OAAO,OAAO,CAAC,OAAO,CAAC;YACrB,OAAO,EAAE,EAAE;YACX,MAAM,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE;SAC3B,CAAC,CAAA;IACJ,CAAC;IAEM,+DAAiC,GAAxC,UACE,iBAAyB,EACzB,yBAAiC,EACjC,YAAoB,EACpB,MAAc;QAEd,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;IAC5B,CAAC;IAEM,8EAAgD,GAAvD,UAAwD,iBAAyB,EAAE,UAAoB,EAAE,GAAW;QAClH,OAAO,OAAO,CAAC,MAAM,CAAC,gEAAgE,CAAC,CAAA;IACzF,CAAC;IAEM,sEAAwC,GAA/C,UACE,SAAiB,EACjB,UAAoB,EACpB,MAAgB,EAChB,IAAU;QAEV,OAAO,OAAO,CAAC,MAAM,CAAC,mEAAmE,CAAC,CAAA;IAC5F,CAAC;IAEM,kEAAoC,GAA3C,UACE,iBAAyB,EACzB,KAAa,EACb,MAAkC;QAElC,OAAO,OAAO,CAAC,MAAM,CAAC,wDAAwD,CAAC,CAAA;IACjF,CAAC;IAEM,qEAAuC,GAA9C,UACE,iBAAyB,EACzB,MAAc,EACd,UAAoB,EACpB,MAAgB,EAChB,GAAW;QAEX,OAAO,OAAO,CAAC,MAAM,CAAC,wCAAwC,CAAC,CAAA;IACjE,CAAC;IACH,0BAAC;AAAD,CAAC,AAnED,IAmEC;AAnEqB,kDAAmB"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { CryptoClient } from './CryptoClient';
|
|
3
2
|
export declare abstract class Secp256k1CryptoClient extends CryptoClient {
|
|
4
3
|
encryptAsymmetric(payload: string, publicKey: string): Promise<string>;
|
|
5
4
|
decryptAsymmetric(encryptedPayload: string, keypair: {
|
|
6
5
|
publicKey: string;
|
|
7
|
-
privateKey:
|
|
6
|
+
privateKey: string;
|
|
8
7
|
}): Promise<string>;
|
|
9
8
|
}
|
|
@@ -67,7 +67,7 @@ var Secp256k1CryptoClient = /** @class */ (function (_super) {
|
|
|
67
67
|
Secp256k1CryptoClient.prototype.decryptAsymmetric = function (encryptedPayload, keypair) {
|
|
68
68
|
return __awaiter(this, void 0, void 0, function () {
|
|
69
69
|
return __generator(this, function (_a) {
|
|
70
|
-
return [2 /*return*/, index_1.decrypt(keypair.privateKey
|
|
70
|
+
return [2 /*return*/, index_1.decrypt(keypair.privateKey, Buffer.from(encryptedPayload, 'hex')).toString()];
|
|
71
71
|
});
|
|
72
72
|
});
|
|
73
73
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Secp256k1CryptoClient.js","sourceRoot":"","sources":["../../src/protocols/Secp256k1CryptoClient.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qEAA8E;AAE9E,+CAA6C;AAE7C;IAAoD,yCAAY;IAAhE;;IAQA,CAAC;IAPc,iDAAiB,GAA9B,UAA+B,OAAe,EAAE,SAAiB;;;gBAC/D,sBAAO,eAAO,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAA;;;KAChE;IAEY,iDAAiB,GAA9B,UAA+B,gBAAwB,EAAE,OAAkD;;;gBACzG,sBAAO,eAAO,CAAC,OAAO,CAAC,UAAU,
|
|
1
|
+
{"version":3,"file":"Secp256k1CryptoClient.js","sourceRoot":"","sources":["../../src/protocols/Secp256k1CryptoClient.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qEAA8E;AAE9E,+CAA6C;AAE7C;IAAoD,yCAAY;IAAhE;;IAQA,CAAC;IAPc,iDAAiB,GAA9B,UAA+B,OAAe,EAAE,SAAiB;;;gBAC/D,sBAAO,eAAO,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAA;;;KAChE;IAEY,iDAAiB,GAA9B,UAA+B,gBAAwB,EAAE,OAAkD;;;gBACzG,sBAAO,eAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAA;;;KACpF;IACH,4BAAC;AAAD,CAAC,AARD,CAAoD,2BAAY,GAQ/D;AARqB,sDAAqB"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { CryptoClient } from './CryptoClient';
|
|
3
2
|
export declare abstract class Sr25519CryptoClient extends CryptoClient {
|
|
4
3
|
encryptAsymmetric(payload: string, publicKey: string): Promise<string>;
|
|
5
4
|
decryptAsymmetric(encryptedPayload: string, keypair: {
|
|
6
5
|
publicKey: string;
|
|
7
|
-
privateKey:
|
|
6
|
+
privateKey: string;
|
|
8
7
|
}): Promise<string>;
|
|
9
8
|
}
|
|
@@ -29,7 +29,7 @@ var AeternityAddress = /** @class */ (function () {
|
|
|
29
29
|
var base58 = bs58check.encode(Buffer.from(publicKey, 'hex'));
|
|
30
30
|
return new AeternityAddress("ak_" + base58);
|
|
31
31
|
};
|
|
32
|
-
AeternityAddress.prototype.
|
|
32
|
+
AeternityAddress.prototype.asString = function () {
|
|
33
33
|
return this.value;
|
|
34
34
|
};
|
|
35
35
|
return AeternityAddress;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { Ed25519CryptoClient } from '../Ed25519CryptoClient';
|
|
3
2
|
export declare class AeternityCryptoClient extends Ed25519CryptoClient {
|
|
4
3
|
constructor();
|
|
5
4
|
signMessage(message: string, keypair: {
|
|
6
|
-
privateKey:
|
|
5
|
+
privateKey: string;
|
|
7
6
|
}): Promise<string>;
|
|
8
7
|
verifyMessage(message: string, signature: string, publicKey: string): Promise<boolean>;
|
|
9
8
|
}
|
|
@@ -76,7 +76,7 @@ var AeternityCryptoClient = /** @class */ (function (_super) {
|
|
|
76
76
|
case 1:
|
|
77
77
|
_a.sent();
|
|
78
78
|
messageBuffer = personalMessageToBinary(message);
|
|
79
|
-
rawSignature = sodium.crypto_sign_detached(messageBuffer, keypair.privateKey);
|
|
79
|
+
rawSignature = sodium.crypto_sign_detached(messageBuffer, Buffer.from(keypair.privateKey, 'hex'));
|
|
80
80
|
return [2 /*return*/, Buffer.from(rawSignature).toString('hex')];
|
|
81
81
|
}
|
|
82
82
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AeternityCryptoClient.js","sourceRoot":"","sources":["../../../src/protocols/aeternity/AeternityCryptoClient.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6C;AAC7C,uCAAgD;AAChD,4DAAmD;AAEnD,8DAA4D;AAE5D,IAAM,uBAAuB,GAAG,UAAC,OAAe;IAC9C,IAAM,MAAM,GAAW,MAAM,CAAC,IAAI,CAAC,6BAA6B,EAAE,MAAM,CAAC,CAAA;IACzE,IAAM,aAAa,GAAW,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;IAC1D,IAAI,aAAa,CAAC,MAAM,IAAI,IAAI,EAAE;QAChC,MAAM,IAAI,0BAAiB,CAAC,sBAAM,CAAC,SAAS,EAAE,kBAAkB,CAAC,CAAA;KAClE;IAED,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAA;AAClH,CAAC,CAAA;AAED;IAA2C,yCAAmB;IAC5D;eACE,iBAAO;IACT,CAAC;IAEY,2CAAW,GAAxB,UAAyB,OAAe,EAAE,OAA+B;;;;;4BACvE,qBAAM,MAAM,CAAC,KAAK,EAAA;;wBAAlB,SAAkB,CAAA;wBAEZ,aAAa,GAAW,uBAAuB,CAAC,OAAO,CAAC,CAAA;wBACxD,YAAY,GAAe,MAAM,CAAC,oBAAoB,CAAC,aAAa,EAAE,OAAO,CAAC,UAAU,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"AeternityCryptoClient.js","sourceRoot":"","sources":["../../../src/protocols/aeternity/AeternityCrypt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