@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
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { IAirGapSignedTransaction } from '../../interfaces/IAirGapSignedTransaction';
|
|
3
2
|
import { AirGapTransactionStatus, IAirGapTransaction } from '../../interfaces/IAirGapTransaction';
|
|
4
3
|
import { SignedAeternityTransaction } from '../../serializer/schemas/definitions/signed-transaction-aeternity';
|
|
@@ -8,10 +7,9 @@ import { ProtocolSymbols } from '../../utils/ProtocolSymbols';
|
|
|
8
7
|
import { CurrencyUnit, FeeDefaults, ICoinProtocol } from '../ICoinProtocol';
|
|
9
8
|
import { ICoinSubProtocol } from '../ICoinSubProtocol';
|
|
10
9
|
import { NonExtendedProtocol } from '../NonExtendedProtocol';
|
|
11
|
-
import { AeternityTransactionCursor, AeternityTransactionResult } from './AeternityTypes';
|
|
12
|
-
import { AeternityAddress } from './AeternityAddress';
|
|
13
10
|
import { AeternityCryptoClient } from './AeternityCryptoClient';
|
|
14
11
|
import { AeternityProtocolOptions } from './AeternityProtocolOptions';
|
|
12
|
+
import { AeternityAddressCursor, AeternityAddressResult, AeternityTransactionCursor, AeternityTransactionResult } from './AeternityTypes';
|
|
15
13
|
export declare class AeternityProtocol extends NonExtendedProtocol implements ICoinProtocol {
|
|
16
14
|
readonly options: AeternityProtocolOptions;
|
|
17
15
|
symbol: string;
|
|
@@ -39,7 +37,7 @@ export declare class AeternityProtocol extends NonExtendedProtocol implements IC
|
|
|
39
37
|
getBlockExplorerLinkForAddress(address: string): Promise<string>;
|
|
40
38
|
getBlockExplorerLinkForTxId(txId: string): Promise<string>;
|
|
41
39
|
getPublicKeyFromMnemonic(mnemonic: string, derivationPath: string, password?: string): Promise<string>;
|
|
42
|
-
getPrivateKeyFromMnemonic(mnemonic: string, derivationPath: string, password?: string): Promise<
|
|
40
|
+
getPrivateKeyFromMnemonic(mnemonic: string, derivationPath: string, password?: string): Promise<string>;
|
|
43
41
|
/**
|
|
44
42
|
* Returns the PublicKey as String, derived from a supplied hex-string
|
|
45
43
|
* @param secret HEX-Secret from BIP39
|
|
@@ -51,14 +49,13 @@ export declare class AeternityProtocol extends NonExtendedProtocol implements IC
|
|
|
51
49
|
* @param secret HEX-Secret from BIP39
|
|
52
50
|
* @param derivationPath DerivationPath for Key
|
|
53
51
|
*/
|
|
54
|
-
getPrivateKeyFromHexSecret(secret: string, derivationPath: string): Promise<
|
|
55
|
-
getAddressFromPublicKey(publicKey: string): Promise<
|
|
56
|
-
getAddressesFromPublicKey(publicKey: string): Promise<
|
|
57
|
-
getNextAddressFromPublicKey(publicKey: string, current: AeternityAddress): Promise<AeternityAddress>;
|
|
52
|
+
getPrivateKeyFromHexSecret(secret: string, derivationPath: string): Promise<string>;
|
|
53
|
+
getAddressFromPublicKey(publicKey: string, cursor?: AeternityAddressCursor): Promise<AeternityAddressResult>;
|
|
54
|
+
getAddressesFromPublicKey(publicKey: string, cursor?: AeternityAddressCursor): Promise<AeternityAddressResult[]>;
|
|
58
55
|
getTransactionsFromPublicKey(publicKey: string, limit: number, cursor?: AeternityTransactionCursor): Promise<AeternityTransactionResult>;
|
|
59
56
|
getTransactionsFromAddresses(addresses: string[], limit: number, cursor?: AeternityTransactionCursor): Promise<AeternityTransactionResult>;
|
|
60
57
|
protected getPageNumber(limit: number, offset: number): number;
|
|
61
|
-
signWithPrivateKey(privateKey:
|
|
58
|
+
signWithPrivateKey(privateKey: string, transaction: RawAeternityTransaction): Promise<IAirGapSignedTransaction>;
|
|
62
59
|
private decodeTx;
|
|
63
60
|
getTransactionDetails(unsignedTx: UnsignedAeternityTransaction): Promise<IAirGapTransaction[]>;
|
|
64
61
|
getTransactionDetailsFromSigned(signedTx: SignedAeternityTransaction): Promise<IAirGapTransaction[]>;
|
|
@@ -81,15 +78,15 @@ export declare class AeternityProtocol extends NonExtendedProtocol implements IC
|
|
|
81
78
|
broadcastTransaction(rawTransaction: string): Promise<string>;
|
|
82
79
|
private toHexBuffer;
|
|
83
80
|
signMessage(message: string, keypair: {
|
|
84
|
-
privateKey:
|
|
81
|
+
privateKey: string;
|
|
85
82
|
}): Promise<string>;
|
|
86
83
|
verifyMessage(message: string, signature: string, publicKey: string): Promise<boolean>;
|
|
87
84
|
encryptAsymmetric(message: string, publicKey: string): Promise<string>;
|
|
88
85
|
decryptAsymmetric(message: string, keypair: {
|
|
89
86
|
publicKey: string;
|
|
90
|
-
privateKey:
|
|
87
|
+
privateKey: string;
|
|
91
88
|
}): Promise<string>;
|
|
92
|
-
encryptAES(message: string, privateKey:
|
|
93
|
-
decryptAES(message: string, privateKey:
|
|
89
|
+
encryptAES(message: string, privateKey: string): Promise<string>;
|
|
90
|
+
decryptAES(message: string, privateKey: string): Promise<string>;
|
|
94
91
|
getTransactionStatuses(transactionHashes: string[]): Promise<AirGapTransactionStatus[]>;
|
|
95
92
|
}
|
|
@@ -79,6 +79,8 @@ var index_2 = require("../../dependencies/src/bip39-2.5.0/index");
|
|
|
79
79
|
var bs58check = __importStar(require("../../dependencies/src/bs58check-2.1.2/index"));
|
|
80
80
|
var index_3 = require("../../dependencies/src/hd-wallet-js-b216450e56954a6e82ace0aade9474673de5d9d5/src/index");
|
|
81
81
|
var rlp = __importStar(require("../../dependencies/src/rlp-2.2.3/index"));
|
|
82
|
+
var errors_1 = require("../../errors");
|
|
83
|
+
var coinlib_error_1 = require("../../errors/coinlib-error");
|
|
82
84
|
var base64Check_1 = __importDefault(require("../../utils/base64Check"));
|
|
83
85
|
var padStart_1 = require("../../utils/padStart");
|
|
84
86
|
var ProtocolSymbols_1 = require("../../utils/ProtocolSymbols");
|
|
@@ -87,8 +89,6 @@ var NonExtendedProtocol_1 = require("../NonExtendedProtocol");
|
|
|
87
89
|
var AeternityAddress_1 = require("./AeternityAddress");
|
|
88
90
|
var AeternityCryptoClient_1 = require("./AeternityCryptoClient");
|
|
89
91
|
var AeternityProtocolOptions_1 = require("./AeternityProtocolOptions");
|
|
90
|
-
var errors_1 = require("../../errors");
|
|
91
|
-
var coinlib_error_1 = require("../../errors/coinlib-error");
|
|
92
92
|
var AeternityProtocol = /** @class */ (function (_super) {
|
|
93
93
|
__extends(AeternityProtocol, _super);
|
|
94
94
|
function AeternityProtocol(options) {
|
|
@@ -180,23 +180,26 @@ var AeternityProtocol = /** @class */ (function (_super) {
|
|
|
180
180
|
var secretKey;
|
|
181
181
|
return __generator(this, function (_a) {
|
|
182
182
|
secretKey = index_3.generateWalletUsingDerivationPath(Buffer.from(secret, 'hex'), derivationPath).secretKey;
|
|
183
|
-
return [2 /*return*/, Buffer.from(secretKey)];
|
|
183
|
+
return [2 /*return*/, Buffer.from(secretKey).toString('hex')];
|
|
184
184
|
});
|
|
185
185
|
});
|
|
186
186
|
};
|
|
187
|
-
AeternityProtocol.prototype.getAddressFromPublicKey = function (publicKey) {
|
|
187
|
+
AeternityProtocol.prototype.getAddressFromPublicKey = function (publicKey, cursor) {
|
|
188
188
|
return __awaiter(this, void 0, void 0, function () {
|
|
189
189
|
return __generator(this, function (_a) {
|
|
190
|
-
return [2 /*return*/,
|
|
190
|
+
return [2 /*return*/, {
|
|
191
|
+
address: AeternityAddress_1.AeternityAddress.from(publicKey).asString(),
|
|
192
|
+
cursor: { hasNext: false }
|
|
193
|
+
}];
|
|
191
194
|
});
|
|
192
195
|
});
|
|
193
196
|
};
|
|
194
|
-
AeternityProtocol.prototype.getAddressesFromPublicKey = function (publicKey) {
|
|
197
|
+
AeternityProtocol.prototype.getAddressesFromPublicKey = function (publicKey, cursor) {
|
|
195
198
|
return __awaiter(this, void 0, void 0, function () {
|
|
196
199
|
var address;
|
|
197
200
|
return __generator(this, function (_a) {
|
|
198
201
|
switch (_a.label) {
|
|
199
|
-
case 0: return [4 /*yield*/, this.getAddressFromPublicKey(publicKey)];
|
|
202
|
+
case 0: return [4 /*yield*/, this.getAddressFromPublicKey(publicKey, cursor)];
|
|
200
203
|
case 1:
|
|
201
204
|
address = _a.sent();
|
|
202
205
|
return [2 /*return*/, [address]];
|
|
@@ -204,13 +207,6 @@ var AeternityProtocol = /** @class */ (function (_super) {
|
|
|
204
207
|
});
|
|
205
208
|
});
|
|
206
209
|
};
|
|
207
|
-
AeternityProtocol.prototype.getNextAddressFromPublicKey = function (publicKey, current) {
|
|
208
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
209
|
-
return __generator(this, function (_a) {
|
|
210
|
-
return [2 /*return*/, current];
|
|
211
|
-
});
|
|
212
|
-
});
|
|
213
|
-
};
|
|
214
210
|
AeternityProtocol.prototype.getTransactionsFromPublicKey = function (publicKey, limit, cursor) {
|
|
215
211
|
return __awaiter(this, void 0, void 0, function () {
|
|
216
212
|
var address;
|
|
@@ -219,7 +215,7 @@ var AeternityProtocol = /** @class */ (function (_super) {
|
|
|
219
215
|
case 0: return [4 /*yield*/, this.getAddressFromPublicKey(publicKey)];
|
|
220
216
|
case 1:
|
|
221
217
|
address = _a.sent();
|
|
222
|
-
return [2 /*return*/, this.getTransactionsFromAddresses([address.
|
|
218
|
+
return [2 /*return*/, this.getTransactionsFromAddresses([address.address], limit, cursor)];
|
|
223
219
|
}
|
|
224
220
|
});
|
|
225
221
|
});
|
|
@@ -283,7 +279,7 @@ var AeternityProtocol = /** @class */ (function (_super) {
|
|
|
283
279
|
return [4 /*yield*/, sodium.ready];
|
|
284
280
|
case 1:
|
|
285
281
|
_a.sent();
|
|
286
|
-
signature = sodium.crypto_sign_detached(Buffer.concat([Buffer.from(transaction.networkId), rawTx]), privateKey);
|
|
282
|
+
signature = sodium.crypto_sign_detached(Buffer.concat([Buffer.from(transaction.networkId), rawTx]), Buffer.from(privateKey, 'hex'));
|
|
287
283
|
txObj = {
|
|
288
284
|
tag: this.toHexBuffer(11),
|
|
289
285
|
version: this.toHexBuffer(1),
|
|
@@ -334,11 +330,11 @@ var AeternityProtocol = /** @class */ (function (_super) {
|
|
|
334
330
|
airgapTx = {
|
|
335
331
|
amount: new bignumber_1.default(parseInt(rlpDecodedTx[4].toString('hex'), 16)).toString(10),
|
|
336
332
|
fee: new bignumber_1.default(parseInt(rlpDecodedTx[5].toString('hex'), 16)).toString(10),
|
|
337
|
-
from: [fromAddress.
|
|
333
|
+
from: [fromAddress.address],
|
|
338
334
|
isInbound: false,
|
|
339
335
|
protocolIdentifier: this.identifier,
|
|
340
336
|
network: this.options.network,
|
|
341
|
-
to: [toAddress.
|
|
337
|
+
to: [toAddress.address],
|
|
342
338
|
data: (rlpDecodedTx[8] || '').toString('utf8'),
|
|
343
339
|
transactionDetails: unsignedTx.transaction
|
|
344
340
|
};
|
|
@@ -407,7 +403,7 @@ var AeternityProtocol = /** @class */ (function (_super) {
|
|
|
407
403
|
case 0: return [4 /*yield*/, this.getAddressFromPublicKey(publicKey)];
|
|
408
404
|
case 1:
|
|
409
405
|
address = _a.sent();
|
|
410
|
-
return [2 /*return*/, this.getBalanceOfAddresses([address.
|
|
406
|
+
return [2 /*return*/, this.getBalanceOfAddresses([address.address])];
|
|
411
407
|
}
|
|
412
408
|
});
|
|
413
409
|
});
|
|
@@ -479,7 +475,7 @@ var AeternityProtocol = /** @class */ (function (_super) {
|
|
|
479
475
|
_b.label = 2;
|
|
480
476
|
case 2:
|
|
481
477
|
_b.trys.push([2, 4, , 5]);
|
|
482
|
-
return [4 /*yield*/, index_1.default.get(this.options.network.rpcUrl + "/v2/accounts/" + address.
|
|
478
|
+
return [4 /*yield*/, index_1.default.get(this.options.network.rpcUrl + "/v2/accounts/" + address.address)];
|
|
483
479
|
case 3:
|
|
484
480
|
accountResponse = (_b.sent()).data;
|
|
485
481
|
nonce = accountResponse.nonce + 1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AeternityProtocol.js","sourceRoot":"","sources":["../../../src/protocols/aeternity/AeternityProtocol.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6C;AAE7C,oFAA6E;AAC7E,kGAA2E;AAC3E,kEAAyE;AACzE,sFAAyE;AACzE,gHAA0I;AAC1I,0EAA6D;AAM7D,wEAA+C;AAC/C,iDAA+C;AAC/C,+DAAkF;AAClF,iDAAuD;AAGvD,8DAA4D;AAG5D,uDAAqD;AACrD,iEAA+D;AAC/D,uEAAqE;AACrE,uCAA4E;AAC5E,4DAAmD;AAEnD;IAAuC,qCAAmB;IAsCxD,2BAA4B,OAAkE;QAAlE,wBAAA,EAAA,cAAwC,mDAAwB,EAAE;QAA9F,YACE,iBAAO,SACR;QAF2B,aAAO,GAAP,OAAO,CAA2D;QArCvF,YAAM,GAAW,IAAI,CAAA;QACrB,UAAI,GAAW,UAAU,CAAA;QACzB,kBAAY,GAAW,IAAI,CAAA;QAE3B,eAAS,GAAW,IAAI,CAAA;QAExB,cAAQ,GAAW,EAAE,CAAA;QACrB,iBAAW,GAAW,EAAE,CAAA;QACxB,gBAAU,GAAoB,qCAAmB,CAAC,EAAE,CAAA;QAEpD,iBAAW,GAAG;YACnB,GAAG,EAAE,SAAS;YACd,MAAM,EAAE,UAAU;YAClB,IAAI,EAAE,SAAS;SAChB,CAAA;QAEM,WAAK,GAAmB;YAC7B;gBACE,UAAU,EAAE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AAK,CAAC,CAAA;IAC3H,CAAC;IAEY,uCAAW,GAAxB,UAAyB,OAAe,EAAE,OAA+B;;;gBACvE,sBAAO,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,OAAO,EAAE,OAAO,CAAC,EAAA;;;KACvD;IAEY,yCAAa,GAA1B,UAA2B,OAAe,EAAE,SAAiB,EAAE,SAAiB;;;gBAC9E,sBAAO,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC,EAAA;;;KACtE;IAEY,6CAAiB,GAA9B,UAA+B,OAAe,EAAE,SAAiB;;;gBAC/D,sBAAO,IAAI,CAAC,YAAY,CAAC,iBAAiB,CAAC,OAAO,EAAE,SAAS,CAAC,EAAA;;;KAC/D;IAEY,6CAAiB,GAA9B,UAA+B,OAAe,EAAE,OAAkD;;;gBAChG,sBAAO,IAAI,CAAC,YAAY,CAAC,iBAAiB,CAAC,OAAO,EAAE,OAAO,CAAC,EAAA;;;KAC7D;IAEY,sCAAU,GAAvB,UAAwB,OAAe,EAAE,UAAkB;;;gBACzD,sBAAO,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,EAAA;;;KACzD;IAEY,sCAAU,GAAvB,UAAwB,OAAe,EAAE,UAAkB;;;gBACzD,sBAAO,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,EAAA;;;KACzD;IAEY,kDAAsB,GAAnC,UAAoC,iBAA2B;;;gBAC7D,sBAAO,OAAO,CAAC,MAAM,CAAC,oCAAoC,CAAC,EAAA;;;KAC5D;IACH,wBAAC;AAAD,CAAC,AAnaD,CAAuC,yCAAmB,GAmazD;AAnaY,8CAAiB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IAirGapAddressResult, IBaseProtocolAddressCursor } from '../../interfaces/IAirGapAddress';
|
|
1
2
|
import { IAirGapTransaction } from '../../interfaces/IAirGapTransaction';
|
|
2
3
|
export interface AeternityTransactionCursor {
|
|
3
4
|
page: number;
|
|
@@ -6,3 +7,8 @@ export interface AeternityTransactionResult {
|
|
|
6
7
|
transactions: IAirGapTransaction[];
|
|
7
8
|
cursor: AeternityTransactionCursor;
|
|
8
9
|
}
|
|
10
|
+
export interface AeternityAddressCursor extends IBaseProtocolAddressCursor {
|
|
11
|
+
hasNext: false;
|
|
12
|
+
}
|
|
13
|
+
export interface AeternityAddressResult extends IAirGapAddressResult<AeternityAddressCursor> {
|
|
14
|
+
}
|
|
@@ -5,5 +5,5 @@ export declare class BitcoinAddress implements CoinAddress {
|
|
|
5
5
|
readonly addressDerivationIndex?: number | undefined;
|
|
6
6
|
constructor(value: string, visibilityDerivationIndex?: number | undefined, addressDerivationIndex?: number | undefined);
|
|
7
7
|
static from(node: any, visibilityDerivationIndex?: number, addressDerivationIndex?: number): BitcoinAddress;
|
|
8
|
-
|
|
8
|
+
asString(): string;
|
|
9
9
|
}
|
|
@@ -14,7 +14,7 @@ var BitcoinAddress = /** @class */ (function () {
|
|
|
14
14
|
: node;
|
|
15
15
|
return new BitcoinAddress(_node.getAddress(), visibilityDerivationIndex, addressDerivationIndex);
|
|
16
16
|
};
|
|
17
|
-
BitcoinAddress.prototype.
|
|
17
|
+
BitcoinAddress.prototype.asString = function () {
|
|
18
18
|
return this.value;
|
|
19
19
|
};
|
|
20
20
|
return BitcoinAddress;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { ICoinProtocol } from '../..';
|
|
3
2
|
import { Secp256k1CryptoClient } from '../Secp256k1CryptoClient';
|
|
4
3
|
export declare class BitcoinCryptoClient extends Secp256k1CryptoClient {
|
|
@@ -6,7 +5,7 @@ export declare class BitcoinCryptoClient extends Secp256k1CryptoClient {
|
|
|
6
5
|
private readonly bitcoinJSMessage;
|
|
7
6
|
constructor(protocol: ICoinProtocol, bitcoinJSMessage: any);
|
|
8
7
|
signMessage(message: string, keypair: {
|
|
9
|
-
privateKey:
|
|
8
|
+
privateKey: string;
|
|
10
9
|
}): Promise<string>;
|
|
11
10
|
verifyMessage(message: string, signature: string, publicKey: string): Promise<boolean>;
|
|
12
11
|
}
|
|
@@ -63,7 +63,7 @@ var BitcoinCryptoClient = /** @class */ (function (_super) {
|
|
|
63
63
|
return __awaiter(this, void 0, void 0, function () {
|
|
64
64
|
var signature;
|
|
65
65
|
return __generator(this, function (_a) {
|
|
66
|
-
signature = this.bitcoinJSMessage.sign(message, keypair.privateKey, true);
|
|
66
|
+
signature = this.bitcoinJSMessage.sign(message, Buffer.from(keypair.privateKey, 'hex'), true);
|
|
67
67
|
return [2 /*return*/, signature.toString('base64')];
|
|
68
68
|
});
|
|
69
69
|
});
|
|
@@ -78,7 +78,7 @@ var BitcoinCryptoClient = /** @class */ (function (_super) {
|
|
|
78
78
|
return [4 /*yield*/, this.protocol.getAddressFromPublicKey(publicKey)];
|
|
79
79
|
case 1:
|
|
80
80
|
address = _a.sent();
|
|
81
|
-
return [2 /*return*/, this.bitcoinJSMessage.verify(message, address.
|
|
81
|
+
return [2 /*return*/, this.bitcoinJSMessage.verify(message, address.address, rawSignature)];
|
|
82
82
|
}
|
|
83
83
|
});
|
|
84
84
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BitcoinCryptoClient.js","sourceRoot":"","sources":["../../../src/protocols/bitcoin/BitcoinCryptoClient.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"BitcoinCryptoClient.js","sourceRoot":"","sources":["../../../src/protocols/bitcoin/BitcoinCryptoClient.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kEAAgE;AAEhE;IAAyC,uCAAqB;IAC5D,6BAA6B,QAAuB,EAAmB,gBAAqB;QAA5F,YACE,iBAAO,SACR;QAF4B,cAAQ,GAAR,QAAQ,CAAe;QAAmB,sBAAgB,GAAhB,gBAAgB,CAAK;;IAE5F,CAAC;IAEY,yCAAW,GAAxB,UAAyB,OAAe,EAAE,OAA+B;;;;gBACjE,SAAS,GAAW,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,KAAK,CAAC,EAAE,IAAI,CAAC,CAAA;gBAE3G,sBAAO,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAA;;;KACpC;IAEY,2CAAa,GAA1B,UAA2B,OAAe,EAAE,SAAiB,EAAE,SAAiB;;;;;;wBACxE,YAAY,GAAW,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAA;wBAE7C,qBAAM,IAAI,CAAC,QAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,EAAA;;wBAAhE,OAAO,GAAG,SAAsD;wBAEtE,sBAAO,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,YAAY,CAAC,EAAA;;;;KAC5E;IACH,0BAAC;AAAD,CAAC,AAlBD,CAAyC,6CAAqB,GAkB7D;AAlBY,kDAAmB"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { IAirGapSignedTransaction } from '../../interfaces/IAirGapSignedTransaction';
|
|
3
2
|
import { AirGapTransactionStatus, IAirGapTransaction } from '../../interfaces/IAirGapTransaction';
|
|
4
3
|
import { SignedBitcoinTransaction } from '../../serializer/schemas/definitions/signed-transaction-bitcoin';
|
|
@@ -7,8 +6,7 @@ import { RawBitcoinTransaction } from '../../serializer/types';
|
|
|
7
6
|
import { ProtocolSymbols } from '../../utils/ProtocolSymbols';
|
|
8
7
|
import { CurrencyUnit, FeeDefaults, ICoinProtocol } from '../ICoinProtocol';
|
|
9
8
|
import { ICoinSubProtocol } from '../ICoinSubProtocol';
|
|
10
|
-
import { BitcoinBlockbookTransactionCursor, BitcoinBlockbookTransactionResult } from './BitcoinTypes';
|
|
11
|
-
import { BitcoinAddress } from './BitcoinAddress';
|
|
9
|
+
import { BitcoinAddressCursor, BitcoinAddressResult, BitcoinBlockbookTransactionCursor, BitcoinBlockbookTransactionResult } from './BitcoinTypes';
|
|
12
10
|
import { BitcoinProtocolOptions } from './BitcoinProtocolOptions';
|
|
13
11
|
import { BitcoinCryptoClient } from './BitcoinCryptoClient';
|
|
14
12
|
export interface UTXOResponse {
|
|
@@ -109,17 +107,16 @@ export declare class BitcoinProtocol implements ICoinProtocol {
|
|
|
109
107
|
getBlockExplorerLinkForAddress(address: string): Promise<string>;
|
|
110
108
|
getBlockExplorerLinkForTxId(txId: string): Promise<string>;
|
|
111
109
|
getPublicKeyFromMnemonic(mnemonic: string, derivationPath: string, password?: string): Promise<string>;
|
|
112
|
-
getPrivateKeyFromMnemonic(mnemonic: string, derivationPath: string, password?: string): Promise<
|
|
110
|
+
getPrivateKeyFromMnemonic(mnemonic: string, derivationPath: string, password?: string): Promise<string>;
|
|
113
111
|
getExtendedPrivateKeyFromMnemonic(mnemonic: string, derivationPath: string, password?: string): Promise<string>;
|
|
114
112
|
getPublicKeyFromHexSecret(secret: string, derivationPath: string): Promise<string>;
|
|
115
|
-
getPrivateKeyFromHexSecret(secret: string, derivationPath: string): Promise<
|
|
113
|
+
getPrivateKeyFromHexSecret(secret: string, derivationPath: string): Promise<string>;
|
|
116
114
|
getExtendedPrivateKeyFromHexSecret(secret: string, derivationPath: string): Promise<string>;
|
|
117
|
-
getAddressFromPublicKey(publicKey: string): Promise<
|
|
118
|
-
getAddressesFromPublicKey(publicKey: string): Promise<
|
|
119
|
-
getAddressFromExtendedPublicKey(extendedPublicKey: string, visibilityDerivationIndex: number, addressDerivationIndex: number): Promise<
|
|
120
|
-
getAddressesFromExtendedPublicKey(extendedPublicKey: string, visibilityDerivationIndex: number, addressCount: number, offset: number): Promise<
|
|
121
|
-
|
|
122
|
-
signWithPrivateKey(privateKey: Buffer, transaction: RawBitcoinTransaction): Promise<IAirGapSignedTransaction>;
|
|
115
|
+
getAddressFromPublicKey(publicKey: string, cursor?: BitcoinAddressCursor): Promise<BitcoinAddressResult>;
|
|
116
|
+
getAddressesFromPublicKey(publicKey: string, cursor?: BitcoinAddressCursor): Promise<BitcoinAddressResult[]>;
|
|
117
|
+
getAddressFromExtendedPublicKey(extendedPublicKey: string, visibilityDerivationIndex: number, addressDerivationIndex: number): Promise<BitcoinAddressResult>;
|
|
118
|
+
getAddressesFromExtendedPublicKey(extendedPublicKey: string, visibilityDerivationIndex: number, addressCount: number, offset: number): Promise<BitcoinAddressResult[]>;
|
|
119
|
+
signWithPrivateKey(privateKey: string, transaction: RawBitcoinTransaction): Promise<IAirGapSignedTransaction>;
|
|
123
120
|
signWithExtendedPrivateKey(extendedPrivateKey: string, transaction: RawBitcoinTransaction): Promise<string>;
|
|
124
121
|
getTransactionDetails(unsignedTx: UnsignedTransaction): Promise<IAirGapTransaction[]>;
|
|
125
122
|
getTransactionDetailsFromSigned(signedTx: SignedBitcoinTransaction): Promise<IAirGapTransaction[]>;
|
|
@@ -140,15 +137,15 @@ export declare class BitcoinProtocol implements ICoinProtocol {
|
|
|
140
137
|
getTransactionsFromAddresses(addresses: string[], limit: number, cursor?: BitcoinBlockbookTransactionCursor): Promise<BitcoinBlockbookTransactionResult>;
|
|
141
138
|
private containsSome;
|
|
142
139
|
signMessage(message: string, keypair: {
|
|
143
|
-
privateKey:
|
|
140
|
+
privateKey: string;
|
|
144
141
|
}): Promise<string>;
|
|
145
142
|
verifyMessage(message: string, signature: string, publicKey: string): Promise<boolean>;
|
|
146
143
|
encryptAsymmetric(message: string, publicKey: string): Promise<string>;
|
|
147
144
|
decryptAsymmetric(message: string, keypair: {
|
|
148
145
|
publicKey: string;
|
|
149
|
-
privateKey:
|
|
146
|
+
privateKey: string;
|
|
150
147
|
}): Promise<string>;
|
|
151
|
-
encryptAES(message: string, privateKey:
|
|
152
|
-
decryptAES(message: string, privateKey:
|
|
148
|
+
encryptAES(message: string, privateKey: string): Promise<string>;
|
|
149
|
+
decryptAES(message: string, privateKey: string): Promise<string>;
|
|
153
150
|
getTransactionStatuses(transactionHashes: string[]): Promise<AirGapTransactionStatus[]>;
|
|
154
151
|
}
|
|
@@ -170,7 +170,7 @@ var BitcoinProtocol = /** @class */ (function () {
|
|
|
170
170
|
var bitcoinNode;
|
|
171
171
|
return __generator(this, function (_a) {
|
|
172
172
|
bitcoinNode = this.options.config.bitcoinJSLib.HDNode.fromSeedHex(secret, this.options.network.extras.network);
|
|
173
|
-
return [2 /*return*/, bitcoinNode.derivePath(derivationPath).keyPair.d.toBuffer(32)];
|
|
173
|
+
return [2 /*return*/, bitcoinNode.derivePath(derivationPath).keyPair.d.toBuffer(32).toString('hex')];
|
|
174
174
|
});
|
|
175
175
|
});
|
|
176
176
|
};
|
|
@@ -183,20 +183,24 @@ var BitcoinProtocol = /** @class */ (function () {
|
|
|
183
183
|
});
|
|
184
184
|
});
|
|
185
185
|
};
|
|
186
|
-
BitcoinProtocol.prototype.getAddressFromPublicKey = function (publicKey) {
|
|
186
|
+
BitcoinProtocol.prototype.getAddressFromPublicKey = function (publicKey, cursor) {
|
|
187
187
|
return __awaiter(this, void 0, void 0, function () {
|
|
188
|
-
var node;
|
|
188
|
+
var node, address;
|
|
189
189
|
return __generator(this, function (_a) {
|
|
190
190
|
node = this.options.config.bitcoinJSLib.HDNode.fromBase58(publicKey, this.options.network.extras.network);
|
|
191
|
-
|
|
191
|
+
address = BitcoinAddress_1.BitcoinAddress.from(node);
|
|
192
|
+
return [2 /*return*/, {
|
|
193
|
+
address: address.asString(),
|
|
194
|
+
cursor: { hasNext: false }
|
|
195
|
+
}];
|
|
192
196
|
});
|
|
193
197
|
});
|
|
194
198
|
};
|
|
195
|
-
BitcoinProtocol.prototype.getAddressesFromPublicKey = function (publicKey) {
|
|
199
|
+
BitcoinProtocol.prototype.getAddressesFromPublicKey = function (publicKey, cursor) {
|
|
196
200
|
return __awaiter(this, void 0, void 0, function () {
|
|
197
201
|
return __generator(this, function (_a) {
|
|
198
202
|
switch (_a.label) {
|
|
199
|
-
case 0: return [4 /*yield*/, this.getAddressFromPublicKey(publicKey)];
|
|
203
|
+
case 0: return [4 /*yield*/, this.getAddressFromPublicKey(publicKey, cursor)];
|
|
200
204
|
case 1: return [2 /*return*/, [_a.sent()]];
|
|
201
205
|
}
|
|
202
206
|
});
|
|
@@ -204,10 +208,14 @@ var BitcoinProtocol = /** @class */ (function () {
|
|
|
204
208
|
};
|
|
205
209
|
BitcoinProtocol.prototype.getAddressFromExtendedPublicKey = function (extendedPublicKey, visibilityDerivationIndex, addressDerivationIndex) {
|
|
206
210
|
return __awaiter(this, void 0, void 0, function () {
|
|
207
|
-
var node;
|
|
211
|
+
var node, address;
|
|
208
212
|
return __generator(this, function (_a) {
|
|
209
213
|
node = this.options.config.bitcoinJSLib.HDNode.fromBase58(extendedPublicKey, this.options.network.extras.network);
|
|
210
|
-
|
|
214
|
+
address = BitcoinAddress_1.BitcoinAddress.from(node, visibilityDerivationIndex, addressDerivationIndex);
|
|
215
|
+
return [2 /*return*/, {
|
|
216
|
+
address: address.asString(),
|
|
217
|
+
cursor: { hasNext: false }
|
|
218
|
+
}];
|
|
211
219
|
});
|
|
212
220
|
});
|
|
213
221
|
};
|
|
@@ -217,16 +225,13 @@ var BitcoinProtocol = /** @class */ (function () {
|
|
|
217
225
|
return __generator(this, function (_a) {
|
|
218
226
|
node = this.options.config.bitcoinJSLib.HDNode.fromBase58(extendedPublicKey, this.options.network.extras.network);
|
|
219
227
|
generatorArray = Array.from(new Array(addressCount), function (_, i) { return i + offset; });
|
|
220
|
-
return [2 /*return*/, Promise.all(generatorArray.map(function (x) {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
return __generator(this, function (_a) {
|
|
228
|
-
node = this.options.config.bitcoinJSLib.HDNode.fromBase58(publicKey, this.options.network.extras.network);
|
|
229
|
-
return [2 /*return*/, BitcoinAddress_1.BitcoinAddress.from(node, current.visibilityDerivationIndex, current.addressDerivationIndex !== undefined ? current.addressDerivationIndex + 1 : undefined)];
|
|
228
|
+
return [2 /*return*/, Promise.all(generatorArray.map(function (x) {
|
|
229
|
+
var address = BitcoinAddress_1.BitcoinAddress.from(node, visibilityDerivationIndex, x);
|
|
230
|
+
return {
|
|
231
|
+
address: address.asString(),
|
|
232
|
+
cursor: { hasNext: false }
|
|
233
|
+
};
|
|
234
|
+
}))];
|
|
230
235
|
});
|
|
231
236
|
});
|
|
232
237
|
};
|
|
@@ -247,9 +252,9 @@ var BitcoinProtocol = /** @class */ (function () {
|
|
|
247
252
|
if (!(_b < _c.length)) return [3 /*break*/, 5];
|
|
248
253
|
output = _c[_b];
|
|
249
254
|
if (!output.isChange) return [3 /*break*/, 3];
|
|
250
|
-
return [4 /*yield*/, this.getAddressFromPublicKey(privateKey
|
|
255
|
+
return [4 /*yield*/, this.getAddressFromPublicKey(privateKey)];
|
|
251
256
|
case 2:
|
|
252
|
-
generatedChangeAddress = (_d.sent()).
|
|
257
|
+
generatedChangeAddress = (_d.sent()).address;
|
|
253
258
|
if (generatedChangeAddress !== output.recipient) {
|
|
254
259
|
throw new errors_1.ConditionViolationError(coinlib_error_1.Domain.BITCOIN, 'Change address could not be verified.');
|
|
255
260
|
}
|
|
@@ -262,7 +267,7 @@ var BitcoinProtocol = /** @class */ (function () {
|
|
|
262
267
|
return [3 /*break*/, 1];
|
|
263
268
|
case 5:
|
|
264
269
|
for (i = 0; i < transaction.ins.length; i++) {
|
|
265
|
-
transactionBuilder.sign(i, privateKey);
|
|
270
|
+
transactionBuilder.sign(i, Buffer.from(privateKey, 'hex'));
|
|
266
271
|
}
|
|
267
272
|
return [2 /*return*/, transactionBuilder.build().toHex()];
|
|
268
273
|
}
|
|
@@ -293,7 +298,7 @@ var BitcoinProtocol = /** @class */ (function () {
|
|
|
293
298
|
if (!output.derivationPath) return [3 /*break*/, 3];
|
|
294
299
|
return [4 /*yield*/, this.getAddressesFromExtendedPublicKey(extendedPrivateKey, 1, 1, parseInt(output.derivationPath, 10))];
|
|
295
300
|
case 2:
|
|
296
|
-
generatedChangeAddress = (_d.sent()).map(function (address) { return address.
|
|
301
|
+
generatedChangeAddress = (_d.sent()).map(function (address) { return address.address; });
|
|
297
302
|
changeAddressIsValid = generatedChangeAddress.includes(output.recipient);
|
|
298
303
|
return [3 /*break*/, 7];
|
|
299
304
|
case 3:
|
|
@@ -303,7 +308,7 @@ var BitcoinProtocol = /** @class */ (function () {
|
|
|
303
308
|
if (!(x < changeAddressMaxAddresses)) return [3 /*break*/, 7];
|
|
304
309
|
return [4 /*yield*/, this.getAddressesFromExtendedPublicKey(extendedPrivateKey, 1, changeAddressBatchSize, x)];
|
|
305
310
|
case 5:
|
|
306
|
-
addresses = (_d.sent()).map(function (address) { return address.
|
|
311
|
+
addresses = (_d.sent()).map(function (address) { return address.address; });
|
|
307
312
|
if (addresses.indexOf(output.recipient) >= 0) {
|
|
308
313
|
changeAddressIsValid = true;
|
|
309
314
|
x = changeAddressMaxAddresses;
|
|
@@ -429,7 +434,7 @@ var BitcoinProtocol = /** @class */ (function () {
|
|
|
429
434
|
case 0: return [4 /*yield*/, this.getAddressFromPublicKey(publicKey)];
|
|
430
435
|
case 1:
|
|
431
436
|
address = _a.sent();
|
|
432
|
-
return [2 /*return*/, this.getBalanceOfAddresses([address.
|
|
437
|
+
return [2 /*return*/, this.getBalanceOfAddresses([address.address])];
|
|
433
438
|
}
|
|
434
439
|
});
|
|
435
440
|
});
|
|
@@ -562,7 +567,7 @@ var BitcoinProtocol = /** @class */ (function () {
|
|
|
562
567
|
return [4 /*yield*/, this.getAddressFromExtendedPublicKey(extendedPublicKey, indexes[0], indexes[1])];
|
|
563
568
|
case 3:
|
|
564
569
|
derivedAddress = _a.sent();
|
|
565
|
-
if (derivedAddress.
|
|
570
|
+
if (derivedAddress.address === utxo.address) {
|
|
566
571
|
transaction.ins.push({
|
|
567
572
|
txId: utxo.txid,
|
|
568
573
|
value: new bignumber_1.default(utxo.value).toString(10),
|
|
@@ -605,7 +610,7 @@ var BitcoinProtocol = /** @class */ (function () {
|
|
|
605
610
|
case 6:
|
|
606
611
|
derivedAddress = _a.sent();
|
|
607
612
|
transaction.outs.push({
|
|
608
|
-
recipient: derivedAddress.
|
|
613
|
+
recipient: derivedAddress.address,
|
|
609
614
|
isChange: true,
|
|
610
615
|
value: changeValue.toString(10),
|
|
611
616
|
derivationPath: changeAddressIndex.toString()
|
|
@@ -633,7 +638,7 @@ var BitcoinProtocol = /** @class */ (function () {
|
|
|
633
638
|
}
|
|
634
639
|
return [4 /*yield*/, this.getAddressFromPublicKey(publicKey)];
|
|
635
640
|
case 1:
|
|
636
|
-
address = (_a.sent()).
|
|
641
|
+
address = (_a.sent()).address;
|
|
637
642
|
return [4 /*yield*/, index_1.default.get(this.options.network.extras.indexerApi + "/api/v2/utxo/" + address, {
|
|
638
643
|
responseType: 'json'
|
|
639
644
|
})];
|
|
@@ -779,7 +784,7 @@ var BitcoinProtocol = /** @class */ (function () {
|
|
|
779
784
|
case 0: return [4 /*yield*/, this.getAddressFromPublicKey(publicKey)];
|
|
780
785
|
case 1:
|
|
781
786
|
address = _a.sent();
|
|
782
|
-
return [2 /*return*/, this.getTransactionsFromAddresses([address.
|
|
787
|
+
return [2 /*return*/, this.getTransactionsFromAddresses([address.address], limit, cursor)];
|
|
783
788
|
}
|
|
784
789
|
});
|
|
785
790
|
});
|
|
@@ -895,11 +900,11 @@ var BitcoinProtocol = /** @class */ (function () {
|
|
|
895
900
|
return __awaiter(this, void 0, void 0, function () {
|
|
896
901
|
var childPrivateKey;
|
|
897
902
|
return __generator(this, function (_a) {
|
|
898
|
-
childPrivateKey = this.options.config.bitcoinJSLib.HDNode.fromBase58(keypair.privateKey
|
|
903
|
+
childPrivateKey = this.options.config.bitcoinJSLib.HDNode.fromBase58(keypair.privateKey, this.options.network.extras.network)
|
|
899
904
|
.derive(0)
|
|
900
905
|
.derive(0)
|
|
901
906
|
.keyPair.d.toBuffer(32);
|
|
902
|
-
return [2 /*return*/, this.cryptoClient.decryptAsymmetric(message, { publicKey: '', privateKey: childPrivateKey })];
|
|
907
|
+
return [2 /*return*/, this.cryptoClient.decryptAsymmetric(message, { publicKey: '', privateKey: childPrivateKey.toString('hex') })];
|
|
903
908
|
});
|
|
904
909
|
});
|
|
905
910
|
};
|