@airgap/bitcoin 0.13.45-beta.2 → 0.13.45-beta.3
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/package.json +5 -5
- package/v0/index.js +10 -10
- package/v0/index.js.map +1 -1
- package/v0/protocol/BitcoinAddress.js +8 -9
- package/v0/protocol/BitcoinAddress.js.map +1 -1
- package/v0/protocol/BitcoinCryptoClient.js +16 -85
- package/v0/protocol/BitcoinCryptoClient.js.map +1 -1
- package/v0/protocol/BitcoinProtocol.js +590 -987
- package/v0/protocol/BitcoinProtocol.js.map +1 -1
- package/v0/protocol/BitcoinProtocolOptions.js +45 -111
- package/v0/protocol/BitcoinProtocolOptions.js.map +1 -1
- package/v0/protocol/BitcoinSegwitAddress.js +12 -29
- package/v0/protocol/BitcoinSegwitAddress.js.map +1 -1
- package/v0/protocol/BitcoinSegwitProtocol.js +348 -483
- package/v0/protocol/BitcoinSegwitProtocol.js.map +1 -1
- package/v0/protocol/BitcoinTestnetProtocol.js +28 -36
- package/v0/protocol/BitcoinTestnetProtocol.js.map +1 -1
- package/v0/serializer/validators/transaction-validator.js +22 -30
- package/v0/serializer/validators/transaction-validator.js.map +1 -1
- package/v0/serializer/validators/validators.js +23 -23
- package/v0/serializer/validators/validators.js.map +1 -1
- package/v1/block-explorer/BlockCypherBlockExplorer.js +12 -61
- package/v1/block-explorer/BlockCypherBlockExplorer.js.map +1 -1
- package/v1/data/BitcoinAddress.js +9 -10
- package/v1/data/BitcoinAddress.js.map +1 -1
- package/v1/data/BitcoinLegacyAddress.js +11 -12
- package/v1/data/BitcoinLegacyAddress.js.map +1 -1
- package/v1/data/BitcoinSegwitAddress.js +11 -12
- package/v1/data/BitcoinSegwitAddress.js.map +1 -1
- package/v1/data/BitcoinTaprootAddress.js +31 -22
- package/v1/data/BitcoinTaprootAddress.js.map +1 -1
- package/v1/index.js +11 -11
- package/v1/index.js.map +1 -1
- package/v1/module/BitcoinModule.d.ts +1 -1
- package/v1/module/BitcoinModule.js +44 -102
- package/v1/module/BitcoinModule.js.map +1 -1
- package/v1/module.js +2 -3
- package/v1/module.js.map +1 -1
- package/v1/protocol/BitcoinCryptoClient.js +22 -90
- package/v1/protocol/BitcoinCryptoClient.js.map +1 -1
- package/v1/protocol/BitcoinLegacyProtocol.js +520 -796
- package/v1/protocol/BitcoinLegacyProtocol.js.map +1 -1
- package/v1/protocol/BitcoinProtocol.js +735 -1169
- package/v1/protocol/BitcoinProtocol.js.map +1 -1
- package/v1/protocol/BitcoinSegwitProtocol.js +542 -796
- package/v1/protocol/BitcoinSegwitProtocol.js.map +1 -1
- package/v1/protocol/BitcoinTaprootProtocol.js +688 -1000
- package/v1/protocol/BitcoinTaprootProtocol.js.map +1 -1
- package/v1/protocol/BitcoinTestnetProtocol.js +14 -33
- package/v1/protocol/BitcoinTestnetProtocol.js.map +1 -1
- package/v1/serializer/v3/schemas/converter/transaction-converter.js +29 -52
- package/v1/serializer/v3/schemas/converter/transaction-converter.js.map +1 -1
- package/v1/serializer/v3/serializer-companion.js +98 -165
- package/v1/serializer/v3/serializer-companion.js.map +1 -1
- package/v1/serializer/v3/validators/transaction-validator.js +13 -16
- package/v1/serializer/v3/validators/transaction-validator.js.map +1 -1
- package/v1/serializer/v3/validators/validators.js +122 -213
- package/v1/serializer/v3/validators/validators.js.map +1 -1
- package/v1/types/crypto.d.ts +1 -1
- package/v1/types/key.d.ts +6 -6
- package/v1/types/protocol.d.ts +2 -2
- package/v1/types/transaction.d.ts +3 -3
- package/v1/utils/common.js +4 -6
- package/v1/utils/common.js.map +1 -1
- package/v1/utils/key.d.ts +5 -6
- package/v1/utils/key.js +38 -39
- package/v1/utils/key.js.map +1 -1
- package/v1/utils/network.js +3 -4
- package/v1/utils/network.js.map +1 -1
- package/v1/utils/protocol.js +25 -19
- package/v1/utils/protocol.js.map +1 -1
- package/v1/utils/signature.js +4 -5
- package/v1/utils/signature.js.map +1 -1
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BitcoinSegwitAddress = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
const coinlib_core_1 = require("@airgap/coinlib-core");
|
|
5
|
+
const errors_1 = require("@airgap/coinlib-core/errors");
|
|
6
|
+
class BitcoinSegwitAddress {
|
|
7
|
+
constructor(value) {
|
|
8
8
|
this.value = value;
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
static fromBip32(bip32) {
|
|
11
11
|
return new BitcoinSegwitAddress(bip32.toBase58());
|
|
12
|
-
}
|
|
13
|
-
|
|
12
|
+
}
|
|
13
|
+
static fromPayment(payment) {
|
|
14
14
|
if (payment.address === undefined) {
|
|
15
15
|
throw new errors_1.UnsupportedError(coinlib_core_1.Domain.BITCOIN, 'Could not generate address.');
|
|
16
16
|
}
|
|
17
17
|
return new BitcoinSegwitAddress(payment.address);
|
|
18
|
-
}
|
|
19
|
-
|
|
18
|
+
}
|
|
19
|
+
asString() {
|
|
20
20
|
return this.value;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
}());
|
|
21
|
+
}
|
|
22
|
+
}
|
|
24
23
|
exports.BitcoinSegwitAddress = BitcoinSegwitAddress;
|
|
25
24
|
//# sourceMappingURL=BitcoinSegwitAddress.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BitcoinSegwitAddress.js","sourceRoot":"","sources":["../../../src/v1/data/BitcoinSegwitAddress.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"BitcoinSegwitAddress.js","sourceRoot":"","sources":["../../../src/v1/data/BitcoinSegwitAddress.ts"],"names":[],"mappings":";;;AAAA,uDAA6C;AAC7C,wDAA8D;AAI9D,MAAa,oBAAoB;IAC/B,YAAuC,KAAa;QAAb,UAAK,GAAL,KAAK,CAAQ;IAAG,CAAC;IAEjD,MAAM,CAAC,SAAS,CAAC,KAAqB;QAC3C,OAAO,IAAI,oBAAoB,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAA;IACnD,CAAC;IAEM,MAAM,CAAC,WAAW,CAAC,OAAwB;QAChD,IAAI,OAAO,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;YAClC,MAAM,IAAI,yBAAgB,CAAC,qBAAM,CAAC,OAAO,EAAE,6BAA6B,CAAC,CAAA;QAC3E,CAAC;QAED,OAAO,IAAI,oBAAoB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;IAClD,CAAC;IAEM,QAAQ;QACb,OAAO,IAAI,CAAC,KAAK,CAAA;IACnB,CAAC;CACF;AAlBD,oDAkBC"}
|
|
@@ -15,25 +15,35 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.BitcoinTaprootAddress = void 0;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
37
|
+
const coinlib_core_1 = require("@airgap/coinlib-core");
|
|
38
|
+
const errors_1 = require("@airgap/coinlib-core/errors");
|
|
39
|
+
const bitcoin = __importStar(require("bitcoinjs-lib"));
|
|
40
|
+
class BitcoinTaprootAddress {
|
|
41
|
+
constructor(value) {
|
|
32
42
|
this.value = value;
|
|
33
43
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
44
|
+
static fromBip32(bip32) {
|
|
45
|
+
const xOnlyPubkey = bip32.publicKey.slice(1, 33);
|
|
46
|
+
const payment = bitcoin.payments.p2tr({
|
|
37
47
|
internalPubkey: Buffer.from(xOnlyPubkey),
|
|
38
48
|
network: bitcoin.networks.bitcoin
|
|
39
49
|
});
|
|
@@ -41,17 +51,16 @@ var BitcoinTaprootAddress = /** @class */ (function () {
|
|
|
41
51
|
throw new errors_1.UnsupportedError(coinlib_core_1.Domain.BITCOIN, 'Could not generate Taproot address from BIP32.');
|
|
42
52
|
}
|
|
43
53
|
return new BitcoinTaprootAddress(payment.address);
|
|
44
|
-
}
|
|
45
|
-
|
|
54
|
+
}
|
|
55
|
+
static fromPayment(payment) {
|
|
46
56
|
if (payment.address === undefined) {
|
|
47
57
|
throw new errors_1.UnsupportedError(coinlib_core_1.Domain.BITCOIN, 'Could not generate Taproot address from payment.');
|
|
48
58
|
}
|
|
49
59
|
return new BitcoinTaprootAddress(payment.address);
|
|
50
|
-
}
|
|
51
|
-
|
|
60
|
+
}
|
|
61
|
+
asString() {
|
|
52
62
|
return this.value;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
}());
|
|
63
|
+
}
|
|
64
|
+
}
|
|
56
65
|
exports.BitcoinTaprootAddress = BitcoinTaprootAddress;
|
|
57
66
|
//# sourceMappingURL=BitcoinTaprootAddress.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BitcoinTaprootAddress.js","sourceRoot":"","sources":["../../../src/v1/data/BitcoinTaprootAddress.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BitcoinTaprootAddress.js","sourceRoot":"","sources":["../../../src/v1/data/BitcoinTaprootAddress.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAA6C;AAC7C,wDAA8D;AAC9D,uDAAwC;AAGxC,MAAa,qBAAqB;IAChC,YAAuC,KAAa;QAAb,UAAK,GAAL,KAAK,CAAQ;IAAG,CAAC;IAEjD,MAAM,CAAC,SAAS,CAAC,KAAqB;QAC3C,MAAM,WAAW,GAAG,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;QAEhD,MAAM,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC;YACpC,cAAc,EAAE,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC;YACxC,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC,OAAO;SAClC,CAAC,CAAA;QAEF,IAAI,OAAO,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;YAClC,MAAM,IAAI,yBAAgB,CAAC,qBAAM,CAAC,OAAO,EAAE,gDAAgD,CAAC,CAAA;QAC9F,CAAC;QAED,OAAO,IAAI,qBAAqB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;IACnD,CAAC;IAEM,MAAM,CAAC,WAAW,CAAC,OAAwB;QAChD,IAAI,OAAO,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;YAClC,MAAM,IAAI,yBAAgB,CAAC,qBAAM,CAAC,OAAO,EAAE,kDAAkD,CAAC,CAAA;QAChG,CAAC;QAED,OAAO,IAAI,qBAAqB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;IACnD,CAAC;IAEM,QAAQ;QACb,OAAO,IAAI,CAAC,KAAK,CAAA;IACnB,CAAC;CACF;AA7BD,sDA6BC"}
|
package/v1/index.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isBitcoinTaprootProtocol = exports.isBitcoinSegwitProtocol = exports.isBitcoinProtocol = exports.bitcoinTransactionSignResponseToSigned = exports.bitcoinTransactionSignRequestToUnsigned = exports.bitcoinSignedTransactionToResponse = exports.bitcoinUnsignedTransactionToRequest = exports.bitcoinValidators = exports.BitcoinTransactionValidator = exports.BlockCypherBlockExplorer = exports.createBitcoinProtocolOptions = exports.createBitcoinTaprootProtocol = exports.createBitcoinSegwitProtocol = exports.createBitcoinTestnetProtocol = exports.createBitcoinLegacyProtocol = exports.createBitcoinProtocol = exports.BitcoinModule = void 0;
|
|
4
|
-
|
|
4
|
+
const BlockCypherBlockExplorer_1 = require("./block-explorer/BlockCypherBlockExplorer");
|
|
5
5
|
Object.defineProperty(exports, "BlockCypherBlockExplorer", { enumerable: true, get: function () { return BlockCypherBlockExplorer_1.BlockCypherBlockExplorer; } });
|
|
6
|
-
|
|
6
|
+
const BitcoinModule_1 = require("./module/BitcoinModule");
|
|
7
7
|
Object.defineProperty(exports, "BitcoinModule", { enumerable: true, get: function () { return BitcoinModule_1.BitcoinModule; } });
|
|
8
|
-
|
|
8
|
+
const BitcoinLegacyProtocol_1 = require("./protocol/BitcoinLegacyProtocol");
|
|
9
9
|
Object.defineProperty(exports, "createBitcoinLegacyProtocol", { enumerable: true, get: function () { return BitcoinLegacyProtocol_1.createBitcoinLegacyProtocol; } });
|
|
10
|
-
|
|
10
|
+
const BitcoinProtocol_1 = require("./protocol/BitcoinProtocol");
|
|
11
11
|
Object.defineProperty(exports, "createBitcoinProtocol", { enumerable: true, get: function () { return BitcoinProtocol_1.createBitcoinProtocol; } });
|
|
12
12
|
Object.defineProperty(exports, "createBitcoinProtocolOptions", { enumerable: true, get: function () { return BitcoinProtocol_1.createBitcoinProtocolOptions; } });
|
|
13
|
-
|
|
13
|
+
const BitcoinSegwitProtocol_1 = require("./protocol/BitcoinSegwitProtocol");
|
|
14
14
|
Object.defineProperty(exports, "createBitcoinSegwitProtocol", { enumerable: true, get: function () { return BitcoinSegwitProtocol_1.createBitcoinSegwitProtocol; } });
|
|
15
|
-
|
|
15
|
+
const BitcoinTaprootProtocol_1 = require("./protocol/BitcoinTaprootProtocol");
|
|
16
16
|
Object.defineProperty(exports, "createBitcoinTaprootProtocol", { enumerable: true, get: function () { return BitcoinTaprootProtocol_1.createBitcoinTaprootProtocol; } });
|
|
17
|
-
|
|
17
|
+
const BitcoinTestnetProtocol_1 = require("./protocol/BitcoinTestnetProtocol");
|
|
18
18
|
Object.defineProperty(exports, "createBitcoinTestnetProtocol", { enumerable: true, get: function () { return BitcoinTestnetProtocol_1.createBitcoinTestnetProtocol; } });
|
|
19
|
-
|
|
19
|
+
const transaction_converter_1 = require("./serializer/v3/schemas/converter/transaction-converter");
|
|
20
20
|
Object.defineProperty(exports, "bitcoinSignedTransactionToResponse", { enumerable: true, get: function () { return transaction_converter_1.bitcoinSignedTransactionToResponse; } });
|
|
21
21
|
Object.defineProperty(exports, "bitcoinTransactionSignRequestToUnsigned", { enumerable: true, get: function () { return transaction_converter_1.bitcoinTransactionSignRequestToUnsigned; } });
|
|
22
22
|
Object.defineProperty(exports, "bitcoinTransactionSignResponseToSigned", { enumerable: true, get: function () { return transaction_converter_1.bitcoinTransactionSignResponseToSigned; } });
|
|
23
23
|
Object.defineProperty(exports, "bitcoinUnsignedTransactionToRequest", { enumerable: true, get: function () { return transaction_converter_1.bitcoinUnsignedTransactionToRequest; } });
|
|
24
|
-
|
|
24
|
+
const transaction_validator_1 = require("./serializer/v3/validators/transaction-validator");
|
|
25
25
|
Object.defineProperty(exports, "BitcoinTransactionValidator", { enumerable: true, get: function () { return transaction_validator_1.BitcoinTransactionValidator; } });
|
|
26
|
-
|
|
26
|
+
const validators_1 = require("./serializer/v3/validators/validators");
|
|
27
27
|
Object.defineProperty(exports, "bitcoinValidators", { enumerable: true, get: function () { return validators_1.bitcoinValidators; } });
|
|
28
|
-
|
|
28
|
+
const protocol_1 = require("./utils/protocol");
|
|
29
29
|
Object.defineProperty(exports, "isBitcoinProtocol", { enumerable: true, get: function () { return protocol_1.isBitcoinProtocol; } });
|
|
30
30
|
Object.defineProperty(exports, "isBitcoinSegwitProtocol", { enumerable: true, get: function () { return protocol_1.isBitcoinSegwitProtocol; } });
|
|
31
31
|
Object.defineProperty(exports, "isBitcoinTaprootProtocol", { enumerable: true, get: function () { return protocol_1.isBitcoinTaprootProtocol; } });
|
package/v1/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/v1/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/v1/index.ts"],"names":[],"mappings":";;;AAAA,wFAAoF;AA8D3E,yGA9DA,mDAAwB,OA8DA;AA7DjC,0DAAsD;AAyC7C,8FAzCA,6BAAa,OAyCA;AAxCtB,4EAAqG;AAmDnG,4GAnD8B,mDAA2B,OAmD9B;AAlD7B,gEAAiH;AAiD/G,sGAjDwB,uCAAqB,OAiDxB;AAKrB,6GAtD+C,8CAA4B,OAsD/C;AArD9B,4EAAqG;AAmDnG,4GAnD8B,mDAA2B,OAmD9B;AAlD7B,8EAAwG;AAmDtG,6GAnD+B,qDAA4B,OAmD/B;AAlD9B,8EAAwG;AAgDtG,6GAhD+B,qDAA4B,OAgD/B;AA/C9B,mGAKgE;AAsF9D,mHA1FA,0DAAkC,OA0FA;AAClC,wHA1FA,+DAAuC,OA0FA;AACvC,uHA1FA,8DAAsC,OA0FA;AAHtC,oHAtFA,2DAAmC,OAsFA;AA5ErC,4FAA8F;AA0E5F,4GA1EO,mDAA2B,OA0EP;AAzE7B,sEAAyE;AA0EvE,kGA1EO,8BAAiB,OA0EP;AA1DnB,+CAAuG;AAmE9F,kGAnEA,4BAAiB,OAmEA;AAAE,wGAnEA,kCAAuB,OAmEA;AAAE,yGAnEA,mCAAwB,OAmEA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MainProtocolSymbols } from '@airgap/coinlib-core';
|
|
2
2
|
import { AirGapBlockExplorer, AirGapModule, AirGapOfflineProtocol, AirGapOnlineProtocol, AirGapV3SerializerCompanion, ProtocolConfiguration } from '@airgap/module-kit';
|
|
3
3
|
import { BitcoinProtocolNetwork } from '../types/protocol';
|
|
4
|
-
|
|
4
|
+
type SupportedProtocols = MainProtocolSymbols.BTC | MainProtocolSymbols.BTC_SEGWIT | MainProtocolSymbols.BTC_TAPROOT;
|
|
5
5
|
export declare class BitcoinModule implements AirGapModule<{
|
|
6
6
|
Protocols: SupportedProtocols;
|
|
7
7
|
ProtocolNetwork: BitcoinProtocolNetwork;
|
|
@@ -1,118 +1,60 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
3
|
exports.BitcoinModule = void 0;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
4
|
+
const coinlib_core_1 = require("@airgap/coinlib-core");
|
|
5
|
+
const errors_1 = require("@airgap/coinlib-core/errors");
|
|
6
|
+
const module_kit_1 = require("@airgap/module-kit");
|
|
7
|
+
const BlockCypherBlockExplorer_1 = require("../block-explorer/BlockCypherBlockExplorer");
|
|
44
8
|
// import { BITCOIN_MAINNET_PROTOCOL_NETWORK, createBitcoinProtocol } from '../protocol/BitcoinProtocol'
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
var networkRegistry = new module_kit_1.ModuleNetworkRegistry({
|
|
9
|
+
const BitcoinProtocol_1 = require("../protocol/BitcoinProtocol");
|
|
10
|
+
const BitcoinSegwitProtocol_1 = require("../protocol/BitcoinSegwitProtocol");
|
|
11
|
+
const BitcoinTaprootProtocol_1 = require("../protocol/BitcoinTaprootProtocol");
|
|
12
|
+
const serializer_companion_1 = require("../serializer/v3/serializer-companion");
|
|
13
|
+
const BitcoinLegacyProtocol_1 = require("../protocol/BitcoinLegacyProtocol");
|
|
14
|
+
class BitcoinModule {
|
|
15
|
+
constructor() {
|
|
16
|
+
const networkRegistry = new module_kit_1.ModuleNetworkRegistry({
|
|
54
17
|
supportedNetworks: [BitcoinProtocol_1.BITCOIN_MAINNET_PROTOCOL_NETWORK]
|
|
55
18
|
});
|
|
56
|
-
this.networkRegistries =
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
19
|
+
this.networkRegistries = {
|
|
20
|
+
[coinlib_core_1.MainProtocolSymbols.BTC]: networkRegistry,
|
|
21
|
+
[coinlib_core_1.MainProtocolSymbols.BTC_SEGWIT]: networkRegistry,
|
|
22
|
+
[coinlib_core_1.MainProtocolSymbols.BTC_TAPROOT]: networkRegistry
|
|
23
|
+
};
|
|
61
24
|
this.supportedProtocols = (0, module_kit_1.createSupportedProtocols)(this.networkRegistries);
|
|
62
25
|
}
|
|
63
|
-
|
|
64
|
-
return
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
var _a;
|
|
85
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
86
|
-
var network;
|
|
87
|
-
return __generator(this, function (_b) {
|
|
88
|
-
network = typeof networkOrId === 'object' ? networkOrId : (_a = this.networkRegistries[identifier]) === null || _a === void 0 ? void 0 : _a.findNetwork(networkOrId);
|
|
89
|
-
if (network === undefined) {
|
|
90
|
-
throw new errors_1.ConditionViolationError(coinlib_core_1.Domain.BITCOIN, 'Block Explorer network not supported.');
|
|
91
|
-
}
|
|
92
|
-
return [2 /*return*/, new BlockCypherBlockExplorer_1.BlockCypherBlockExplorer(network.blockExplorerUrl)];
|
|
93
|
-
});
|
|
94
|
-
});
|
|
95
|
-
};
|
|
96
|
-
BitcoinModule.prototype.createV3SerializerCompanion = function () {
|
|
97
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
98
|
-
return __generator(this, function (_a) {
|
|
99
|
-
return [2 /*return*/, new serializer_companion_1.BitcoinV3SerializerCompanion()];
|
|
100
|
-
});
|
|
101
|
-
});
|
|
102
|
-
};
|
|
103
|
-
BitcoinModule.prototype.createProtocol = function (identifier, network) {
|
|
26
|
+
async createOfflineProtocol(identifier) {
|
|
27
|
+
return this.createProtocol(identifier);
|
|
28
|
+
}
|
|
29
|
+
async createOnlineProtocol(identifier, networkOrId) {
|
|
30
|
+
const network = typeof networkOrId === 'object' ? networkOrId : this.networkRegistries[identifier]?.findNetwork(networkOrId);
|
|
31
|
+
if (network === undefined) {
|
|
32
|
+
throw new errors_1.ConditionViolationError(coinlib_core_1.Domain.BITCOIN, 'Protocol network not supported.');
|
|
33
|
+
}
|
|
34
|
+
return this.createProtocol(identifier, network);
|
|
35
|
+
}
|
|
36
|
+
async createBlockExplorer(identifier, networkOrId) {
|
|
37
|
+
const network = typeof networkOrId === 'object' ? networkOrId : this.networkRegistries[identifier]?.findNetwork(networkOrId);
|
|
38
|
+
if (network === undefined) {
|
|
39
|
+
throw new errors_1.ConditionViolationError(coinlib_core_1.Domain.BITCOIN, 'Block Explorer network not supported.');
|
|
40
|
+
}
|
|
41
|
+
return new BlockCypherBlockExplorer_1.BlockCypherBlockExplorer(network.blockExplorerUrl);
|
|
42
|
+
}
|
|
43
|
+
async createV3SerializerCompanion() {
|
|
44
|
+
return new serializer_companion_1.BitcoinV3SerializerCompanion();
|
|
45
|
+
}
|
|
46
|
+
createProtocol(identifier, network) {
|
|
104
47
|
switch (identifier) {
|
|
105
48
|
case coinlib_core_1.MainProtocolSymbols.BTC:
|
|
106
|
-
return (0, BitcoinLegacyProtocol_1.createBitcoinLegacyProtocol)({ network
|
|
49
|
+
return (0, BitcoinLegacyProtocol_1.createBitcoinLegacyProtocol)({ network });
|
|
107
50
|
case coinlib_core_1.MainProtocolSymbols.BTC_SEGWIT:
|
|
108
|
-
return (0, BitcoinSegwitProtocol_1.createBitcoinSegwitProtocol)({ network
|
|
51
|
+
return (0, BitcoinSegwitProtocol_1.createBitcoinSegwitProtocol)({ network });
|
|
109
52
|
case coinlib_core_1.MainProtocolSymbols.BTC_TAPROOT:
|
|
110
|
-
return (0, BitcoinTaprootProtocol_1.createBitcoinTaprootProtocol)({ network
|
|
53
|
+
return (0, BitcoinTaprootProtocol_1.createBitcoinTaprootProtocol)({ network });
|
|
111
54
|
default:
|
|
112
|
-
throw new errors_1.ConditionViolationError(coinlib_core_1.Domain.BITCOIN,
|
|
55
|
+
throw new errors_1.ConditionViolationError(coinlib_core_1.Domain.BITCOIN, `Protocol ${identifier} not supported.`);
|
|
113
56
|
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
}());
|
|
57
|
+
}
|
|
58
|
+
}
|
|
117
59
|
exports.BitcoinModule = BitcoinModule;
|
|
118
60
|
//# sourceMappingURL=BitcoinModule.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BitcoinModule.js","sourceRoot":"","sources":["../../../src/v1/module/BitcoinModule.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BitcoinModule.js","sourceRoot":"","sources":["../../../src/v1/module/BitcoinModule.ts"],"names":[],"mappings":";;;AAAA,uDAAkE;AAClE,wDAAqE;AACrE,mDAW2B;AAE3B,yFAAqF;AACrF,wGAAwG;AACxG,iEAA8E;AAC9E,6EAA+E;AAC/E,+EAAiF;AACjF,gFAAoF;AAEpF,6EAA+E;AAI/E,MAAa,aAAa;IAIxB;QACE,MAAM,eAAe,GAA0B,IAAI,kCAAqB,CAAC;YACvE,iBAAiB,EAAE,CAAC,kDAAgC,CAAC;SACtD,CAAC,CAAA;QACF,IAAI,CAAC,iBAAiB,GAAG;YACvB,CAAC,kCAAmB,CAAC,GAAG,CAAC,EAAE,eAAe;YAC1C,CAAC,kCAAmB,CAAC,UAAU,CAAC,EAAE,eAAe;YACjD,CAAC,kCAAmB,CAAC,WAAW,CAAC,EAAE,eAAe;SACnD,CAAA;QACD,IAAI,CAAC,kBAAkB,GAAG,IAAA,qCAAwB,EAAC,IAAI,CAAC,iBAAiB,CAAC,CAAA;IAC5E,CAAC;IAEM,KAAK,CAAC,qBAAqB,CAAC,UAA8B;QAC/D,OAAO,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,CAAA;IACxC,CAAC;IAEM,KAAK,CAAC,oBAAoB,CAC/B,UAA8B,EAC9B,WAA6C;QAE7C,MAAM,OAAO,GACX,OAAO,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC,CAAA;QAE9G,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;YAC1B,MAAM,IAAI,gCAAuB,CAAC,qBAAM,CAAC,OAAO,EAAE,iCAAiC,CAAC,CAAA;QACtF,CAAC;QAED,OAAO,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,OAAO,CAAC,CAAA;IACjD,CAAC;IAEM,KAAK,CAAC,mBAAmB,CAC9B,UAA8B,EAC9B,WAA6C;QAE7C,MAAM,OAAO,GACX,OAAO,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC,CAAA;QAE9G,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;YAC1B,MAAM,IAAI,gCAAuB,CAAC,qBAAM,CAAC,OAAO,EAAE,uCAAuC,CAAC,CAAA;QAC5F,CAAC;QAED,OAAO,IAAI,mDAAwB,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAA;IAC/D,CAAC;IAEM,KAAK,CAAC,2BAA2B;QACtC,OAAO,IAAI,mDAA4B,EAAE,CAAA;IAC3C,CAAC;IAEO,cAAc,CAAC,UAA8B,EAAE,OAAyB;QAC9E,QAAQ,UAAU,EAAE,CAAC;YACnB,KAAK,kCAAmB,CAAC,GAAG;gBAC1B,OAAO,IAAA,mDAA2B,EAAC,EAAE,OAAO,EAAE,CAAC,CAAA;YACjD,KAAK,kCAAmB,CAAC,UAAU;gBACjC,OAAO,IAAA,mDAA2B,EAAC,EAAE,OAAO,EAAE,CAAC,CAAA;YACjD,KAAK,kCAAmB,CAAC,WAAW;gBAClC,OAAO,IAAA,qDAA4B,EAAC,EAAE,OAAO,EAAE,CAAC,CAAA;YAClD;gBACE,MAAM,IAAI,gCAAuB,CAAC,qBAAM,CAAC,OAAO,EAAE,YAAY,UAAU,iBAAiB,CAAC,CAAA;QAC9F,CAAC;IACH,CAAC;CACF;AAhED,sCAgEC"}
|
package/v1/module.js
CHANGED
|
@@ -14,11 +14,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.create =
|
|
18
|
-
|
|
17
|
+
exports.create = create;
|
|
18
|
+
const BitcoinModule_1 = require("./module/BitcoinModule");
|
|
19
19
|
__exportStar(require("./index"), exports);
|
|
20
20
|
function create() {
|
|
21
21
|
return new BitcoinModule_1.BitcoinModule();
|
|
22
22
|
}
|
|
23
|
-
exports.create = create;
|
|
24
23
|
//# sourceMappingURL=module.js.map
|
package/v1/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../src/v1/module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../src/v1/module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAKA,wBAEC;AAND,0DAAsD;AAEtD,0CAAuB;AAEvB,SAAgB,MAAM;IACpB,OAAO,IAAI,6BAAa,EAAE,CAAA;AAC5B,CAAC"}
|
|
@@ -1,96 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
-
});
|
|
25
|
-
};
|
|
26
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
-
function step(op) {
|
|
31
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
-
while (_) try {
|
|
33
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
-
switch (op[0]) {
|
|
36
|
-
case 0: case 1: t = op; break;
|
|
37
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
-
default:
|
|
41
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
-
if (t[2]) _.ops.pop();
|
|
46
|
-
_.trys.pop(); continue;
|
|
47
|
-
}
|
|
48
|
-
op = body.call(thisArg, _);
|
|
49
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
3
|
exports.BitcoinCryptoClient = void 0;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
4
|
+
const Secp256k1CryptoClient_1 = require("@airgap/coinlib-core/protocols/Secp256k1CryptoClient");
|
|
5
|
+
const hex_1 = require("@airgap/coinlib-core/utils/hex");
|
|
6
|
+
const module_kit_1 = require("@airgap/module-kit");
|
|
7
|
+
class BitcoinCryptoClient extends Secp256k1CryptoClient_1.Secp256k1CryptoClient {
|
|
8
|
+
constructor(protocol, bitcoinjs) {
|
|
9
|
+
super();
|
|
10
|
+
this.protocol = protocol;
|
|
11
|
+
this.bitcoinjs = bitcoinjs;
|
|
12
|
+
}
|
|
13
|
+
async signMessage(message, keypair) {
|
|
14
|
+
const signature = this.bitcoinjs.message.sign(message, Buffer.from(keypair.privateKey, 'hex'), true);
|
|
15
|
+
return signature.toString('base64');
|
|
16
|
+
}
|
|
17
|
+
async verifyMessage(message, signature, publicKey) {
|
|
18
|
+
const rawSignature = Buffer.from(signature, 'base64');
|
|
19
|
+
// TODO: pass objects directly instead of string values
|
|
20
|
+
const _publicKey = (0, hex_1.isHex)(publicKey)
|
|
21
|
+
? (0, module_kit_1.newPublicKey)(publicKey, 'hex')
|
|
22
|
+
: (0, module_kit_1.newExtendedPublicKey)(publicKey, 'encoded');
|
|
23
|
+
const address = await this.protocol.getAddressFromPublicKey(_publicKey);
|
|
24
|
+
return this.bitcoinjs.message.verify(message, address, rawSignature);
|
|
65
25
|
}
|
|
66
|
-
|
|
67
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
68
|
-
var signature;
|
|
69
|
-
return __generator(this, function (_a) {
|
|
70
|
-
signature = this.bitcoinjs.message.sign(message, Buffer.from(keypair.privateKey, 'hex'), true);
|
|
71
|
-
return [2 /*return*/, signature.toString('base64')];
|
|
72
|
-
});
|
|
73
|
-
});
|
|
74
|
-
};
|
|
75
|
-
BitcoinCryptoClient.prototype.verifyMessage = function (message, signature, publicKey) {
|
|
76
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
77
|
-
var rawSignature, _publicKey, address;
|
|
78
|
-
return __generator(this, function (_a) {
|
|
79
|
-
switch (_a.label) {
|
|
80
|
-
case 0:
|
|
81
|
-
rawSignature = Buffer.from(signature, 'base64');
|
|
82
|
-
_publicKey = (0, hex_1.isHex)(publicKey)
|
|
83
|
-
? (0, module_kit_1.newPublicKey)(publicKey, 'hex')
|
|
84
|
-
: (0, module_kit_1.newExtendedPublicKey)(publicKey, 'encoded');
|
|
85
|
-
return [4 /*yield*/, this.protocol.getAddressFromPublicKey(_publicKey)];
|
|
86
|
-
case 1:
|
|
87
|
-
address = _a.sent();
|
|
88
|
-
return [2 /*return*/, this.bitcoinjs.message.verify(message, address, rawSignature)];
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
});
|
|
92
|
-
};
|
|
93
|
-
return BitcoinCryptoClient;
|
|
94
|
-
}(Secp256k1CryptoClient_1.Secp256k1CryptoClient));
|
|
26
|
+
}
|
|
95
27
|
exports.BitcoinCryptoClient = BitcoinCryptoClient;
|
|
96
28
|
//# sourceMappingURL=BitcoinCryptoClient.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BitcoinCryptoClient.js","sourceRoot":"","sources":["../../../src/v1/protocol/BitcoinCryptoClient.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BitcoinCryptoClient.js","sourceRoot":"","sources":["../../../src/v1/protocol/BitcoinCryptoClient.ts"],"names":[],"mappings":";;;AAAA,gGAA4F;AAC5F,wDAAsD;AACtD,mDAAqG;AAKrG,MAAa,mBAAoB,SAAQ,6CAAqB;IAC5D,YAA6B,QAAyB,EAAmB,SAAoB;QAC3F,KAAK,EAAE,CAAA;QADoB,aAAQ,GAAR,QAAQ,CAAiB;QAAmB,cAAS,GAAT,SAAS,CAAW;IAE7F,CAAC;IAEM,KAAK,CAAC,WAAW,CAAC,OAAe,EAAE,OAA+B;QACvE,MAAM,SAAS,GAAW,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,KAAK,CAAC,EAAE,IAAI,CAAC,CAAA;QAE5G,OAAO,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;IACrC,CAAC;IAEM,KAAK,CAAC,aAAa,CAAC,OAAe,EAAE,SAAiB,EAAE,SAAiB;QAC9E,MAAM,YAAY,GAAW,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAA;QAE7D,uDAAuD;QACvD,MAAM,UAAU,GAAkC,IAAA,WAAK,EAAC,SAAS,CAAC;YAChE,CAAC,CAAC,IAAA,yBAAY,EAAC,SAAS,EAAE,KAAK,CAAC;YAChC,CAAC,CAAC,IAAA,iCAAoB,EAAC,SAAS,EAAE,SAAS,CAAC,CAAA;QAE9C,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,uBAAuB,CAAC,UAAU,CAAC,CAAA;QAEvE,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,YAAY,CAAC,CAAA;IACtE,CAAC;CACF;AAvBD,kDAuBC"}
|