@wallfree-dev/bitcoin 0.13.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +7 -0
- package/index.d.ts +1 -0
- package/index.js +18 -0
- package/index.js.map +1 -0
- package/package.json +66 -0
- package/readme.md +121 -0
- package/v0/index.d.ts +14 -0
- package/v0/index.js +34 -0
- package/v0/index.js.map +1 -0
- package/v0/protocol/BitcoinAddress.d.ts +9 -0
- package/v0/protocol/BitcoinAddress.js +23 -0
- package/v0/protocol/BitcoinAddress.js.map +1 -0
- package/v0/protocol/BitcoinCryptoClient.d.ts +11 -0
- package/v0/protocol/BitcoinCryptoClient.js +91 -0
- package/v0/protocol/BitcoinCryptoClient.js.map +1 -0
- package/v0/protocol/BitcoinProtocol.d.ts +168 -0
- package/v0/protocol/BitcoinProtocol.js +1070 -0
- package/v0/protocol/BitcoinProtocol.js.map +1 -0
- package/v0/protocol/BitcoinProtocolOptions.d.ts +26 -0
- package/v0/protocol/BitcoinProtocolOptions.js +148 -0
- package/v0/protocol/BitcoinProtocolOptions.js.map +1 -0
- package/v0/protocol/BitcoinSegwitAddress.d.ts +7 -0
- package/v0/protocol/BitcoinSegwitAddress.js +41 -0
- package/v0/protocol/BitcoinSegwitAddress.js.map +1 -0
- package/v0/protocol/BitcoinSegwitProtocol.d.ts +29 -0
- package/v0/protocol/BitcoinSegwitProtocol.js +548 -0
- package/v0/protocol/BitcoinSegwitProtocol.js.map +1 -0
- package/v0/protocol/BitcoinTestnetProtocol.d.ts +7 -0
- package/v0/protocol/BitcoinTestnetProtocol.js +58 -0
- package/v0/protocol/BitcoinTestnetProtocol.js.map +1 -0
- package/v0/protocol/BitcoinTypes.d.ts +21 -0
- package/v0/protocol/BitcoinTypes.js +3 -0
- package/v0/protocol/BitcoinTypes.js.map +1 -0
- package/v0/serializer/schemas/v2/transaction-sign-request-bitcoin-segwit.json +0 -0
- package/v0/serializer/schemas/v2/transaction-sign-request-bitcoin.json +73 -0
- package/v0/serializer/schemas/v2/transaction-sign-response-bitcoin-segwit.json +0 -0
- package/v0/serializer/schemas/v2/transaction-sign-response-bitcoin.json +37 -0
- package/v0/serializer/schemas/v3/transaction-sign-request-bitcoin-segwit.json +29 -0
- package/v0/serializer/schemas/v3/transaction-sign-request-bitcoin.json +73 -0
- package/v0/serializer/schemas/v3/transaction-sign-response-bitcoin-segwit.json +19 -0
- package/v0/serializer/schemas/v3/transaction-sign-response-bitcoin.json +37 -0
- package/v0/serializer/validators/transaction-validator.d.ts +15 -0
- package/v0/serializer/validators/transaction-validator.js +81 -0
- package/v0/serializer/validators/transaction-validator.js.map +1 -0
- package/v0/serializer/validators/validators.d.ts +1 -0
- package/v0/serializer/validators/validators.js +151 -0
- package/v0/serializer/validators/validators.js.map +1 -0
- package/v0/types/signed-transaction-bitcoin-segwit.d.ts +5 -0
- package/v0/types/signed-transaction-bitcoin-segwit.js +3 -0
- package/v0/types/signed-transaction-bitcoin-segwit.js.map +1 -0
- package/v0/types/signed-transaction-bitcoin.d.ts +9 -0
- package/v0/types/signed-transaction-bitcoin.js +3 -0
- package/v0/types/signed-transaction-bitcoin.js.map +1 -0
- package/v0/types/transaction-bitcoin.d.ts +20 -0
- package/v0/types/transaction-bitcoin.js +3 -0
- package/v0/types/transaction-bitcoin.js.map +1 -0
- package/v0/types/unsigned-transaction-bitcoin-segwit.d.ts +7 -0
- package/v0/types/unsigned-transaction-bitcoin-segwit.js +3 -0
- package/v0/types/unsigned-transaction-bitcoin-segwit.js.map +1 -0
- package/v0/types/unsigned-transaction-bitcoin.d.ts +22 -0
- package/v0/types/unsigned-transaction-bitcoin.js +3 -0
- package/v0/types/unsigned-transaction-bitcoin.js.map +1 -0
- package/v1/block-explorer/BlockCypherBlockExplorer.d.ts +9 -0
- package/v1/block-explorer/BlockCypherBlockExplorer.js +72 -0
- package/v1/block-explorer/BlockCypherBlockExplorer.js.map +1 -0
- package/v1/data/BitcoinAddress.d.ts +7 -0
- package/v1/data/BitcoinAddress.js +20 -0
- package/v1/data/BitcoinAddress.js.map +1 -0
- package/v1/data/BitcoinSegwitAddress.d.ts +9 -0
- package/v1/data/BitcoinSegwitAddress.js +25 -0
- package/v1/data/BitcoinSegwitAddress.js.map +1 -0
- package/v1/data/BitcoinTaprootAddress.d.ts +9 -0
- package/v1/data/BitcoinTaprootAddress.js +57 -0
- package/v1/data/BitcoinTaprootAddress.js.map +1 -0
- package/v1/index.d.ts +25 -0
- package/v1/index.js +30 -0
- package/v1/index.js.map +1 -0
- package/v1/module/BitcoinModule.d.ts +18 -0
- package/v1/module/BitcoinModule.js +116 -0
- package/v1/module/BitcoinModule.js.map +1 -0
- package/v1/module.d.ts +3 -0
- package/v1/module.js +24 -0
- package/v1/module.js.map +1 -0
- package/v1/protocol/BitcoinCryptoClient.d.ts +12 -0
- package/v1/protocol/BitcoinCryptoClient.js +96 -0
- package/v1/protocol/BitcoinCryptoClient.js.map +1 -0
- package/v1/protocol/BitcoinProtocol.d.ts +84 -0
- package/v1/protocol/BitcoinProtocol.js +1312 -0
- package/v1/protocol/BitcoinProtocol.js.map +1 -0
- package/v1/protocol/BitcoinSegwitProtocol.d.ts +56 -0
- package/v1/protocol/BitcoinSegwitProtocol.js +863 -0
- package/v1/protocol/BitcoinSegwitProtocol.js.map +1 -0
- package/v1/protocol/BitcoinTaprootProtocol.d.ts +60 -0
- package/v1/protocol/BitcoinTaprootProtocol.js +1079 -0
- package/v1/protocol/BitcoinTaprootProtocol.js.map +1 -0
- package/v1/protocol/BitcoinTestnetProtocol.d.ts +10 -0
- package/v1/protocol/BitcoinTestnetProtocol.js +70 -0
- package/v1/protocol/BitcoinTestnetProtocol.js.map +1 -0
- package/v1/serializer/v3/schemas/converter/transaction-converter.d.ts +19 -0
- package/v1/serializer/v3/schemas/converter/transaction-converter.js +96 -0
- package/v1/serializer/v3/schemas/converter/transaction-converter.js.map +1 -0
- package/v1/serializer/v3/schemas/definitions/transaction-sign-request-bitcoin-segwit.d.ts +4 -0
- package/v1/serializer/v3/schemas/definitions/transaction-sign-request-bitcoin-segwit.js +3 -0
- package/v1/serializer/v3/schemas/definitions/transaction-sign-request-bitcoin-segwit.js.map +1 -0
- package/v1/serializer/v3/schemas/definitions/transaction-sign-request-bitcoin-taproot.d.ts +4 -0
- package/v1/serializer/v3/schemas/definitions/transaction-sign-request-bitcoin-taproot.js +3 -0
- package/v1/serializer/v3/schemas/definitions/transaction-sign-request-bitcoin-taproot.js.map +1 -0
- package/v1/serializer/v3/schemas/definitions/transaction-sign-request-bitcoin.d.ts +4 -0
- package/v1/serializer/v3/schemas/definitions/transaction-sign-request-bitcoin.js +3 -0
- package/v1/serializer/v3/schemas/definitions/transaction-sign-request-bitcoin.js.map +1 -0
- package/v1/serializer/v3/schemas/definitions/transaction-sign-response-bitcoin-segwit.d.ts +3 -0
- package/v1/serializer/v3/schemas/definitions/transaction-sign-response-bitcoin-segwit.js +3 -0
- package/v1/serializer/v3/schemas/definitions/transaction-sign-response-bitcoin-segwit.js.map +1 -0
- package/v1/serializer/v3/schemas/definitions/transaction-sign-response-bitcoin-taproot.d.ts +3 -0
- package/v1/serializer/v3/schemas/definitions/transaction-sign-response-bitcoin-taproot.js +3 -0
- package/v1/serializer/v3/schemas/definitions/transaction-sign-response-bitcoin-taproot.js.map +1 -0
- package/v1/serializer/v3/schemas/definitions/transaction-sign-response-bitcoin.d.ts +7 -0
- package/v1/serializer/v3/schemas/definitions/transaction-sign-response-bitcoin.js +3 -0
- package/v1/serializer/v3/schemas/definitions/transaction-sign-response-bitcoin.js.map +1 -0
- package/v1/serializer/v3/schemas/generated/transaction-sign-request-bitcoin-segwit.json +29 -0
- package/v1/serializer/v3/schemas/generated/transaction-sign-request-bitcoin-taproot.json +29 -0
- package/v1/serializer/v3/schemas/generated/transaction-sign-request-bitcoin.json +79 -0
- package/v1/serializer/v3/schemas/generated/transaction-sign-response-bitcoin-segwit.json +19 -0
- package/v1/serializer/v3/schemas/generated/transaction-sign-response-bitcoin-taproot.json +19 -0
- package/v1/serializer/v3/schemas/generated/transaction-sign-response-bitcoin.json +37 -0
- package/v1/serializer/v3/serializer-companion.d.ts +14 -0
- package/v1/serializer/v3/serializer-companion.js +219 -0
- package/v1/serializer/v3/serializer-companion.js.map +1 -0
- package/v1/serializer/v3/validators/transaction-validator.d.ts +7 -0
- package/v1/serializer/v3/validators/transaction-validator.js +56 -0
- package/v1/serializer/v3/validators/transaction-validator.js.map +1 -0
- package/v1/serializer/v3/validators/validators.d.ts +7 -0
- package/v1/serializer/v3/validators/validators.js +238 -0
- package/v1/serializer/v3/validators/validators.js.map +1 -0
- package/v1/types/bitcoinjs.d.ts +20 -0
- package/v1/types/bitcoinjs.js +3 -0
- package/v1/types/bitcoinjs.js.map +1 -0
- package/v1/types/crypto.d.ts +2 -0
- package/v1/types/crypto.js +3 -0
- package/v1/types/crypto.js.map +1 -0
- package/v1/types/indexer.d.ts +81 -0
- package/v1/types/indexer.js +3 -0
- package/v1/types/indexer.js.map +1 -0
- package/v1/types/key.d.ts +6 -0
- package/v1/types/key.js +3 -0
- package/v1/types/key.js.map +1 -0
- package/v1/types/protocol.d.ts +17 -0
- package/v1/types/protocol.js +3 -0
- package/v1/types/protocol.js.map +1 -0
- package/v1/types/transaction.d.ts +49 -0
- package/v1/types/transaction.js +3 -0
- package/v1/types/transaction.js.map +1 -0
- package/v1/utils/common.d.ts +2 -0
- package/v1/utils/common.js +28 -0
- package/v1/utils/common.js.map +1 -0
- package/v1/utils/key.d.ts +34 -0
- package/v1/utils/key.js +190 -0
- package/v1/utils/key.js.map +1 -0
- package/v1/utils/network.d.ts +2 -0
- package/v1/utils/network.js +22 -0
- package/v1/utils/network.js.map +1 -0
- package/v1/utils/protocol.d.ts +10 -0
- package/v1/utils/protocol.js +33 -0
- package/v1/utils/protocol.js.map +1 -0
- package/v1/utils/signature.d.ts +2 -0
- package/v1/utils/signature.js +34 -0
- package/v1/utils/signature.js.map +1 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { TransactionSignRequest, TransactionSignRequestV2 } from '@wallfree-dev/serializer';
|
|
2
|
+
interface IInTransaction {
|
|
3
|
+
txId: string;
|
|
4
|
+
value: string;
|
|
5
|
+
vout: number;
|
|
6
|
+
address: string;
|
|
7
|
+
derivationPath?: string;
|
|
8
|
+
}
|
|
9
|
+
interface IOutTransaction {
|
|
10
|
+
recipient: string;
|
|
11
|
+
isChange: boolean;
|
|
12
|
+
value: string;
|
|
13
|
+
derivationPath?: string;
|
|
14
|
+
}
|
|
15
|
+
interface RawBitcoinTransaction {
|
|
16
|
+
ins: IInTransaction[];
|
|
17
|
+
outs: IOutTransaction[];
|
|
18
|
+
}
|
|
19
|
+
export interface UnsignedBitcoinTransaction extends TransactionSignRequest, TransactionSignRequestV2 {
|
|
20
|
+
transaction: RawBitcoinTransaction;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unsigned-transaction-bitcoin.js","sourceRoot":"","sources":["../../../src/v0/types/unsigned-transaction-bitcoin.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AirGapBlockExplorer, BlockExplorerMetadata } from '@wallfree-dev/module-kit';
|
|
2
|
+
export declare class BlockCypherBlockExplorer implements AirGapBlockExplorer {
|
|
3
|
+
readonly url: string;
|
|
4
|
+
constructor(url: string);
|
|
5
|
+
private readonly metadata;
|
|
6
|
+
getMetadata(): Promise<BlockExplorerMetadata>;
|
|
7
|
+
createAddressUrl(address: string): Promise<string>;
|
|
8
|
+
createTransactionUrl(transactionId: string): Promise<string>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.BlockCypherBlockExplorer = void 0;
|
|
40
|
+
var BlockCypherBlockExplorer = /** @class */ (function () {
|
|
41
|
+
function BlockCypherBlockExplorer(url) {
|
|
42
|
+
this.url = url;
|
|
43
|
+
this.metadata = {
|
|
44
|
+
name: 'BlockCypher',
|
|
45
|
+
url: this.url
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
BlockCypherBlockExplorer.prototype.getMetadata = function () {
|
|
49
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
50
|
+
return __generator(this, function (_a) {
|
|
51
|
+
return [2 /*return*/, this.metadata];
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
BlockCypherBlockExplorer.prototype.createAddressUrl = function (address) {
|
|
56
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
57
|
+
return __generator(this, function (_a) {
|
|
58
|
+
return [2 /*return*/, "".concat(this.url, "/address/").concat(address, "/")];
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
BlockCypherBlockExplorer.prototype.createTransactionUrl = function (transactionId) {
|
|
63
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
64
|
+
return __generator(this, function (_a) {
|
|
65
|
+
return [2 /*return*/, "".concat(this.url, "/tx/").concat(transactionId)];
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
return BlockCypherBlockExplorer;
|
|
70
|
+
}());
|
|
71
|
+
exports.BlockCypherBlockExplorer = BlockCypherBlockExplorer;
|
|
72
|
+
//# sourceMappingURL=BlockCypherBlockExplorer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BlockCypherBlockExplorer.js","sourceRoot":"","sources":["../../../src/v1/block-explorer/BlockCypherBlockExplorer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;IACE,kCAAmC,GAAW;QAAX,QAAG,GAAH,GAAG,CAAQ;QAE7B,aAAQ,GAA0B;YACjD,IAAI,EAAE,aAAa;YACnB,GAAG,EAAE,IAAI,CAAC,GAAG;SACd,CAAA;IALgD,CAAC;IAOrC,8CAAW,GAAxB;;;gBACE,sBAAO,IAAI,CAAC,QAAQ,EAAA;;;KACrB;IAEY,mDAAgB,GAA7B,UAA8B,OAAe;;;gBAC3C,sBAAO,UAAG,IAAI,CAAC,GAAG,sBAAY,OAAO,MAAG,EAAA;;;KACzC;IAEY,uDAAoB,GAAjC,UAAkC,aAAqB;;;gBACrD,sBAAO,UAAG,IAAI,CAAC,GAAG,iBAAO,aAAa,CAAE,EAAA;;;KACzC;IACH,+BAAC;AAAD,CAAC,AAnBD,IAmBC;AAnBY,4DAAwB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BitcoinAddress = void 0;
|
|
4
|
+
var BitcoinAddress = /** @class */ (function () {
|
|
5
|
+
function BitcoinAddress(value) {
|
|
6
|
+
this.value = value;
|
|
7
|
+
}
|
|
8
|
+
BitcoinAddress.fromHDNode = function (node) {
|
|
9
|
+
return new BitcoinAddress(node.getAddress());
|
|
10
|
+
};
|
|
11
|
+
BitcoinAddress.fromECPair = function (keyPair) {
|
|
12
|
+
return new BitcoinAddress(keyPair.getAddress());
|
|
13
|
+
};
|
|
14
|
+
BitcoinAddress.prototype.asString = function () {
|
|
15
|
+
return this.value;
|
|
16
|
+
};
|
|
17
|
+
return BitcoinAddress;
|
|
18
|
+
}());
|
|
19
|
+
exports.BitcoinAddress = BitcoinAddress;
|
|
20
|
+
//# sourceMappingURL=BitcoinAddress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BitcoinAddress.js","sourceRoot":"","sources":["../../../src/v1/data/BitcoinAddress.ts"],"names":[],"mappings":";;;AAAA;IACE,wBAAuC,KAAa;QAAb,UAAK,GAAL,KAAK,CAAQ;IAAG,CAAC;IAE1C,yBAAU,GAAxB,UAAyB,IAAS;QAChC,OAAO,IAAI,cAAc,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAA;IAC9C,CAAC;IAEa,yBAAU,GAAxB,UAAyB,OAAY;QACnC,OAAO,IAAI,cAAc,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,CAAA;IACjD,CAAC;IAEM,iCAAQ,GAAf;QACE,OAAO,IAAI,CAAC,KAAK,CAAA;IACnB,CAAC;IACH,qBAAC;AAAD,CAAC,AAdD,IAcC;AAdY,wCAAc"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type * as bitcoin from 'bitcoinjs-lib';
|
|
2
|
+
import { BIP32Interface } from 'bip32';
|
|
3
|
+
export declare class BitcoinSegwitAddress {
|
|
4
|
+
protected readonly value: string;
|
|
5
|
+
private constructor();
|
|
6
|
+
static fromBip32(bip32: BIP32Interface): BitcoinSegwitAddress;
|
|
7
|
+
static fromPayment(payment: bitcoin.Payment): BitcoinSegwitAddress;
|
|
8
|
+
asString(): string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BitcoinSegwitAddress = void 0;
|
|
4
|
+
var coinlib_core_1 = require("@wallfree-dev/coinlib-core");
|
|
5
|
+
var errors_1 = require("@wallfree-dev/coinlib-core/errors");
|
|
6
|
+
var BitcoinSegwitAddress = /** @class */ (function () {
|
|
7
|
+
function BitcoinSegwitAddress(value) {
|
|
8
|
+
this.value = value;
|
|
9
|
+
}
|
|
10
|
+
BitcoinSegwitAddress.fromBip32 = function (bip32) {
|
|
11
|
+
return new BitcoinSegwitAddress(bip32.toBase58());
|
|
12
|
+
};
|
|
13
|
+
BitcoinSegwitAddress.fromPayment = function (payment) {
|
|
14
|
+
if (payment.address === undefined) {
|
|
15
|
+
throw new errors_1.UnsupportedError(coinlib_core_1.Domain.BITCOIN, 'Could not generate address.');
|
|
16
|
+
}
|
|
17
|
+
return new BitcoinSegwitAddress(payment.address);
|
|
18
|
+
};
|
|
19
|
+
BitcoinSegwitAddress.prototype.asString = function () {
|
|
20
|
+
return this.value;
|
|
21
|
+
};
|
|
22
|
+
return BitcoinSegwitAddress;
|
|
23
|
+
}());
|
|
24
|
+
exports.BitcoinSegwitAddress = BitcoinSegwitAddress;
|
|
25
|
+
//# sourceMappingURL=BitcoinSegwitAddress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BitcoinSegwitAddress.js","sourceRoot":"","sources":["../../../src/v1/data/BitcoinSegwitAddress.ts"],"names":[],"mappings":";;;AAAA,2DAAmD;AACnD,4DAAoE;AAIpE;IACE,8BAAuC,KAAa;QAAb,UAAK,GAAL,KAAK,CAAQ;IAAG,CAAC;IAE1C,8BAAS,GAAvB,UAAwB,KAAqB;QAC3C,OAAO,IAAI,oBAAoB,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAA;IACnD,CAAC;IAEa,gCAAW,GAAzB,UAA0B,OAAwB;QAChD,IAAI,OAAO,CAAC,OAAO,KAAK,SAAS,EAAE;YACjC,MAAM,IAAI,yBAAgB,CAAC,qBAAM,CAAC,OAAO,EAAE,6BAA6B,CAAC,CAAA;SAC1E;QAED,OAAO,IAAI,oBAAoB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;IAClD,CAAC;IAEM,uCAAQ,GAAf;QACE,OAAO,IAAI,CAAC,KAAK,CAAA;IACnB,CAAC;IACH,2BAAC;AAAD,CAAC,AAlBD,IAkBC;AAlBY,oDAAoB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as bitcoin from 'bitcoinjs-lib';
|
|
2
|
+
import { BIP32Interface } from 'bip32';
|
|
3
|
+
export declare class BitcoinTaprootAddress {
|
|
4
|
+
protected readonly value: string;
|
|
5
|
+
private constructor();
|
|
6
|
+
static fromBip32(bip32: BIP32Interface): BitcoinTaprootAddress;
|
|
7
|
+
static fromPayment(payment: bitcoin.Payment): BitcoinTaprootAddress;
|
|
8
|
+
asString(): string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.BitcoinTaprootAddress = void 0;
|
|
27
|
+
var coinlib_core_1 = require("@wallfree-dev/coinlib-core");
|
|
28
|
+
var errors_1 = require("@wallfree-dev/coinlib-core/errors");
|
|
29
|
+
var bitcoin = __importStar(require("bitcoinjs-lib"));
|
|
30
|
+
var BitcoinTaprootAddress = /** @class */ (function () {
|
|
31
|
+
function BitcoinTaprootAddress(value) {
|
|
32
|
+
this.value = value;
|
|
33
|
+
}
|
|
34
|
+
BitcoinTaprootAddress.fromBip32 = function (bip32) {
|
|
35
|
+
var xOnlyPubkey = bip32.publicKey.slice(1, 33);
|
|
36
|
+
var payment = bitcoin.payments.p2tr({
|
|
37
|
+
internalPubkey: Buffer.from(xOnlyPubkey),
|
|
38
|
+
network: bitcoin.networks.bitcoin
|
|
39
|
+
});
|
|
40
|
+
if (payment.address === undefined) {
|
|
41
|
+
throw new errors_1.UnsupportedError(coinlib_core_1.Domain.BITCOIN, 'Could not generate Taproot address from BIP32.');
|
|
42
|
+
}
|
|
43
|
+
return new BitcoinTaprootAddress(payment.address);
|
|
44
|
+
};
|
|
45
|
+
BitcoinTaprootAddress.fromPayment = function (payment) {
|
|
46
|
+
if (payment.address === undefined) {
|
|
47
|
+
throw new errors_1.UnsupportedError(coinlib_core_1.Domain.BITCOIN, 'Could not generate Taproot address from payment.');
|
|
48
|
+
}
|
|
49
|
+
return new BitcoinTaprootAddress(payment.address);
|
|
50
|
+
};
|
|
51
|
+
BitcoinTaprootAddress.prototype.asString = function () {
|
|
52
|
+
return this.value;
|
|
53
|
+
};
|
|
54
|
+
return BitcoinTaprootAddress;
|
|
55
|
+
}());
|
|
56
|
+
exports.BitcoinTaprootAddress = BitcoinTaprootAddress;
|
|
57
|
+
//# sourceMappingURL=BitcoinTaprootAddress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BitcoinTaprootAddress.js","sourceRoot":"","sources":["../../../src/v1/data/BitcoinTaprootAddress.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2DAAmD;AACnD,4DAAoE;AACpE,qDAAwC;AAGxC;IACE,+BAAuC,KAAa;QAAb,UAAK,GAAL,KAAK,CAAQ;IAAG,CAAC;IAE1C,+BAAS,GAAvB,UAAwB,KAAqB;QAC3C,IAAM,WAAW,GAAG,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;QAEhD,IAAM,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;YACjC,MAAM,IAAI,yBAAgB,CAAC,qBAAM,CAAC,OAAO,EAAE,gDAAgD,CAAC,CAAA;SAC7F;QAED,OAAO,IAAI,qBAAqB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;IACnD,CAAC;IAEa,iCAAW,GAAzB,UAA0B,OAAwB;QAChD,IAAI,OAAO,CAAC,OAAO,KAAK,SAAS,EAAE;YACjC,MAAM,IAAI,yBAAgB,CAAC,qBAAM,CAAC,OAAO,EAAE,kDAAkD,CAAC,CAAA;SAC/F;QAED,OAAO,IAAI,qBAAqB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;IACnD,CAAC;IAEM,wCAAQ,GAAf;QACE,OAAO,IAAI,CAAC,KAAK,CAAA;IACnB,CAAC;IACH,4BAAC;AAAD,CAAC,AA7BD,IA6BC;AA7BY,sDAAqB"}
|
package/v1/index.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { BlockCypherBlockExplorer } from './block-explorer/BlockCypherBlockExplorer';
|
|
2
|
+
import { BitcoinModule } from './module/BitcoinModule';
|
|
3
|
+
import { BitcoinProtocol, createBitcoinProtocol, createBitcoinProtocolOptions } from './protocol/BitcoinProtocol';
|
|
4
|
+
import { BitcoinSegwitProtocol, createBitcoinSegwitProtocol } from './protocol/BitcoinSegwitProtocol';
|
|
5
|
+
import { BitcoinTaprootProtocol, createBitcoinTaprootProtocol } from './protocol/BitcoinTaprootProtocol';
|
|
6
|
+
import { BitcoinTestnetProtocol, createBitcoinTestnetProtocol } from './protocol/BitcoinTestnetProtocol';
|
|
7
|
+
import { bitcoinSignedTransactionToResponse, bitcoinTransactionSignRequestToUnsigned, bitcoinTransactionSignResponseToSigned, bitcoinUnsignedTransactionToRequest } from './serializer/v3/schemas/converter/transaction-converter';
|
|
8
|
+
import { BitcoinTransactionSignRequest } from './serializer/v3/schemas/definitions/transaction-sign-request-bitcoin';
|
|
9
|
+
import { BitcoinSegwitTransactionSignRequest } from './serializer/v3/schemas/definitions/transaction-sign-request-bitcoin-segwit';
|
|
10
|
+
import { BitcoinTaprootTransactionSignRequest } from './serializer/v3/schemas/definitions/transaction-sign-request-bitcoin-taproot';
|
|
11
|
+
import { BitcoinTransactionSignResponse } from './serializer/v3/schemas/definitions/transaction-sign-response-bitcoin';
|
|
12
|
+
import { BitcoinSegwitTransactionSignResponse } from './serializer/v3/schemas/definitions/transaction-sign-response-bitcoin-segwit';
|
|
13
|
+
import { BitcoinTaprootTransactionSignResponse } from './serializer/v3/schemas/definitions/transaction-sign-response-bitcoin-taproot';
|
|
14
|
+
import { BitcoinTransactionValidator } from './serializer/v3/validators/transaction-validator';
|
|
15
|
+
import { bitcoinValidators } from './serializer/v3/validators/validators';
|
|
16
|
+
import { BitcoinCryptoConfiguration } from './types/crypto';
|
|
17
|
+
import { BitcoinProtocolNetwork, BitcoinProtocolOptions, BitcoinUnits } from './types/protocol';
|
|
18
|
+
import { BitcoinInTransaction, BitcoinOutTransaction, BitcoinSegwitSignedTransaction, BitcoinSegwitUnsignedTransaction, BitcoinTaprootSignedTransaction, BitcoinTaprootUnsignedTransaction, BitcoinSignedTransaction, BitcoinTransactionCursor, BitcoinUnsignedTransaction } from './types/transaction';
|
|
19
|
+
import { isBitcoinProtocol, isBitcoinSegwitProtocol, isBitcoinTaprootProtocol } from './utils/protocol';
|
|
20
|
+
export { BitcoinModule };
|
|
21
|
+
export { BitcoinProtocol, BitcoinTestnetProtocol, BitcoinSegwitProtocol, BitcoinTaprootProtocol, createBitcoinProtocol, createBitcoinTestnetProtocol, createBitcoinSegwitProtocol, createBitcoinTaprootProtocol, createBitcoinProtocolOptions };
|
|
22
|
+
export { BlockCypherBlockExplorer };
|
|
23
|
+
export { BitcoinCryptoConfiguration, BitcoinUnits, BitcoinProtocolNetwork, BitcoinProtocolOptions, BitcoinUnsignedTransaction, BitcoinSignedTransaction, BitcoinSegwitUnsignedTransaction, BitcoinSegwitSignedTransaction, BitcoinTaprootUnsignedTransaction, BitcoinTaprootSignedTransaction, BitcoinInTransaction, BitcoinOutTransaction, BitcoinTransactionCursor };
|
|
24
|
+
export { BitcoinTransactionSignRequest, BitcoinTransactionSignResponse, BitcoinSegwitTransactionSignRequest, BitcoinTaprootTransactionSignRequest, BitcoinSegwitTransactionSignResponse, BitcoinTaprootTransactionSignResponse, BitcoinTransactionValidator, bitcoinValidators, bitcoinUnsignedTransactionToRequest, bitcoinSignedTransactionToResponse, bitcoinTransactionSignRequestToUnsigned, bitcoinTransactionSignResponseToSigned };
|
|
25
|
+
export { isBitcoinProtocol, isBitcoinSegwitProtocol, isBitcoinTaprootProtocol };
|
package/v1/index.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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.createBitcoinProtocol = exports.BitcoinModule = void 0;
|
|
4
|
+
var BlockCypherBlockExplorer_1 = require("./block-explorer/BlockCypherBlockExplorer");
|
|
5
|
+
Object.defineProperty(exports, "BlockCypherBlockExplorer", { enumerable: true, get: function () { return BlockCypherBlockExplorer_1.BlockCypherBlockExplorer; } });
|
|
6
|
+
var BitcoinModule_1 = require("./module/BitcoinModule");
|
|
7
|
+
Object.defineProperty(exports, "BitcoinModule", { enumerable: true, get: function () { return BitcoinModule_1.BitcoinModule; } });
|
|
8
|
+
var BitcoinProtocol_1 = require("./protocol/BitcoinProtocol");
|
|
9
|
+
Object.defineProperty(exports, "createBitcoinProtocol", { enumerable: true, get: function () { return BitcoinProtocol_1.createBitcoinProtocol; } });
|
|
10
|
+
Object.defineProperty(exports, "createBitcoinProtocolOptions", { enumerable: true, get: function () { return BitcoinProtocol_1.createBitcoinProtocolOptions; } });
|
|
11
|
+
var BitcoinSegwitProtocol_1 = require("./protocol/BitcoinSegwitProtocol");
|
|
12
|
+
Object.defineProperty(exports, "createBitcoinSegwitProtocol", { enumerable: true, get: function () { return BitcoinSegwitProtocol_1.createBitcoinSegwitProtocol; } });
|
|
13
|
+
var BitcoinTaprootProtocol_1 = require("./protocol/BitcoinTaprootProtocol");
|
|
14
|
+
Object.defineProperty(exports, "createBitcoinTaprootProtocol", { enumerable: true, get: function () { return BitcoinTaprootProtocol_1.createBitcoinTaprootProtocol; } });
|
|
15
|
+
var BitcoinTestnetProtocol_1 = require("./protocol/BitcoinTestnetProtocol");
|
|
16
|
+
Object.defineProperty(exports, "createBitcoinTestnetProtocol", { enumerable: true, get: function () { return BitcoinTestnetProtocol_1.createBitcoinTestnetProtocol; } });
|
|
17
|
+
var transaction_converter_1 = require("./serializer/v3/schemas/converter/transaction-converter");
|
|
18
|
+
Object.defineProperty(exports, "bitcoinSignedTransactionToResponse", { enumerable: true, get: function () { return transaction_converter_1.bitcoinSignedTransactionToResponse; } });
|
|
19
|
+
Object.defineProperty(exports, "bitcoinTransactionSignRequestToUnsigned", { enumerable: true, get: function () { return transaction_converter_1.bitcoinTransactionSignRequestToUnsigned; } });
|
|
20
|
+
Object.defineProperty(exports, "bitcoinTransactionSignResponseToSigned", { enumerable: true, get: function () { return transaction_converter_1.bitcoinTransactionSignResponseToSigned; } });
|
|
21
|
+
Object.defineProperty(exports, "bitcoinUnsignedTransactionToRequest", { enumerable: true, get: function () { return transaction_converter_1.bitcoinUnsignedTransactionToRequest; } });
|
|
22
|
+
var transaction_validator_1 = require("./serializer/v3/validators/transaction-validator");
|
|
23
|
+
Object.defineProperty(exports, "BitcoinTransactionValidator", { enumerable: true, get: function () { return transaction_validator_1.BitcoinTransactionValidator; } });
|
|
24
|
+
var validators_1 = require("./serializer/v3/validators/validators");
|
|
25
|
+
Object.defineProperty(exports, "bitcoinValidators", { enumerable: true, get: function () { return validators_1.bitcoinValidators; } });
|
|
26
|
+
var protocol_1 = require("./utils/protocol");
|
|
27
|
+
Object.defineProperty(exports, "isBitcoinProtocol", { enumerable: true, get: function () { return protocol_1.isBitcoinProtocol; } });
|
|
28
|
+
Object.defineProperty(exports, "isBitcoinSegwitProtocol", { enumerable: true, get: function () { return protocol_1.isBitcoinSegwitProtocol; } });
|
|
29
|
+
Object.defineProperty(exports, "isBitcoinTaprootProtocol", { enumerable: true, get: function () { return protocol_1.isBitcoinTaprootProtocol; } });
|
|
30
|
+
//# sourceMappingURL=index.js.map
|
package/v1/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/v1/index.ts"],"names":[],"mappings":";;;AAAA,sFAAoF;AAuD3E,yGAvDA,mDAAwB,OAuDA;AAtDjC,wDAAsD;AAoC7C,8FApCA,6BAAa,OAoCA;AAnCtB,8DAAiH;AA4C/G,sGA5CwB,uCAAqB,OA4CxB;AAIrB,6GAhD+C,8CAA4B,OAgD/C;AA/C9B,0EAAqG;AA6CnG,4GA7C8B,mDAA2B,OA6C9B;AA5C7B,4EAAwG;AA6CtG,6GA7C+B,qDAA4B,OA6C/B;AA5C9B,4EAAwG;AA0CtG,6GA1C+B,qDAA4B,OA0C/B;AAzC9B,iGAKgE;AA4E9D,mHAhFA,0DAAkC,OAgFA;AAClC,wHAhFA,+DAAuC,OAgFA;AACvC,uHAhFA,8DAAsC,OAgFA;AAHtC,oHA5EA,2DAAmC,OA4EA;AApErC,0FAA8F;AAkE5F,4GAlEO,mDAA2B,OAkEP;AAjE7B,oEAAyE;AAkEvE,kGAlEO,8BAAiB,OAkEP;AApDnB,6CAAuG;AA6D9F,kGA7DA,4BAAiB,OA6DA;AAAE,wGA7DA,kCAAuB,OA6DA;AAAE,yGA7DA,mCAAwB,OA6DA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { MainProtocolSymbols } from '@wallfree-dev/coinlib-core';
|
|
2
|
+
import { AirGapBlockExplorer, AirGapModule, AirGapOfflineProtocol, AirGapOnlineProtocol, AirGapV3SerializerCompanion, ProtocolConfiguration } from '@wallfree-dev/module-kit';
|
|
3
|
+
import { BitcoinProtocolNetwork } from '../types/protocol';
|
|
4
|
+
declare type SupportedProtocols = MainProtocolSymbols.BTC | MainProtocolSymbols.BTC_SEGWIT | MainProtocolSymbols.BTC_TAPROOT;
|
|
5
|
+
export declare class BitcoinModule implements AirGapModule<{
|
|
6
|
+
Protocols: SupportedProtocols;
|
|
7
|
+
ProtocolNetwork: BitcoinProtocolNetwork;
|
|
8
|
+
}> {
|
|
9
|
+
private readonly networkRegistries;
|
|
10
|
+
readonly supportedProtocols: Record<SupportedProtocols, ProtocolConfiguration>;
|
|
11
|
+
constructor();
|
|
12
|
+
createOfflineProtocol(identifier: SupportedProtocols): Promise<AirGapOfflineProtocol | undefined>;
|
|
13
|
+
createOnlineProtocol(identifier: SupportedProtocols, networkOrId?: BitcoinProtocolNetwork | string): Promise<AirGapOnlineProtocol | undefined>;
|
|
14
|
+
createBlockExplorer(identifier: SupportedProtocols, networkOrId?: BitcoinProtocolNetwork | string): Promise<AirGapBlockExplorer | undefined>;
|
|
15
|
+
createV3SerializerCompanion(): Promise<AirGapV3SerializerCompanion>;
|
|
16
|
+
private createProtocol;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,116 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.BitcoinModule = void 0;
|
|
40
|
+
var coinlib_core_1 = require("@wallfree-dev/coinlib-core");
|
|
41
|
+
var errors_1 = require("@wallfree-dev/coinlib-core/errors");
|
|
42
|
+
var module_kit_1 = require("@wallfree-dev/module-kit");
|
|
43
|
+
var BlockCypherBlockExplorer_1 = require("../block-explorer/BlockCypherBlockExplorer");
|
|
44
|
+
var BitcoinProtocol_1 = require("../protocol/BitcoinProtocol");
|
|
45
|
+
var BitcoinSegwitProtocol_1 = require("../protocol/BitcoinSegwitProtocol");
|
|
46
|
+
var BitcoinTaprootProtocol_1 = require("../protocol/BitcoinTaprootProtocol");
|
|
47
|
+
var serializer_companion_1 = require("../serializer/v3/serializer-companion");
|
|
48
|
+
var BitcoinModule = /** @class */ (function () {
|
|
49
|
+
function BitcoinModule() {
|
|
50
|
+
var _a;
|
|
51
|
+
var networkRegistry = new module_kit_1.ModuleNetworkRegistry({
|
|
52
|
+
supportedNetworks: [BitcoinProtocol_1.BITCOIN_MAINNET_PROTOCOL_NETWORK]
|
|
53
|
+
});
|
|
54
|
+
this.networkRegistries = (_a = {},
|
|
55
|
+
_a[coinlib_core_1.MainProtocolSymbols.BTC] = networkRegistry,
|
|
56
|
+
_a[coinlib_core_1.MainProtocolSymbols.BTC_SEGWIT] = networkRegistry,
|
|
57
|
+
_a[coinlib_core_1.MainProtocolSymbols.BTC_TAPROOT] = networkRegistry,
|
|
58
|
+
_a);
|
|
59
|
+
this.supportedProtocols = (0, module_kit_1.createSupportedProtocols)(this.networkRegistries);
|
|
60
|
+
}
|
|
61
|
+
BitcoinModule.prototype.createOfflineProtocol = function (identifier) {
|
|
62
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
63
|
+
return __generator(this, function (_a) {
|
|
64
|
+
return [2 /*return*/, this.createProtocol(identifier)];
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
BitcoinModule.prototype.createOnlineProtocol = function (identifier, networkOrId) {
|
|
69
|
+
var _a;
|
|
70
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
71
|
+
var network;
|
|
72
|
+
return __generator(this, function (_b) {
|
|
73
|
+
network = typeof networkOrId === 'object' ? networkOrId : (_a = this.networkRegistries[identifier]) === null || _a === void 0 ? void 0 : _a.findNetwork(networkOrId);
|
|
74
|
+
if (network === undefined) {
|
|
75
|
+
throw new errors_1.ConditionViolationError(coinlib_core_1.Domain.BITCOIN, 'Protocol network not supported.');
|
|
76
|
+
}
|
|
77
|
+
return [2 /*return*/, this.createProtocol(identifier, network)];
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
BitcoinModule.prototype.createBlockExplorer = function (identifier, networkOrId) {
|
|
82
|
+
var _a;
|
|
83
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
84
|
+
var network;
|
|
85
|
+
return __generator(this, function (_b) {
|
|
86
|
+
network = typeof networkOrId === 'object' ? networkOrId : (_a = this.networkRegistries[identifier]) === null || _a === void 0 ? void 0 : _a.findNetwork(networkOrId);
|
|
87
|
+
if (network === undefined) {
|
|
88
|
+
throw new errors_1.ConditionViolationError(coinlib_core_1.Domain.BITCOIN, 'Block Explorer network not supported.');
|
|
89
|
+
}
|
|
90
|
+
return [2 /*return*/, new BlockCypherBlockExplorer_1.BlockCypherBlockExplorer(network.blockExplorerUrl)];
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
BitcoinModule.prototype.createV3SerializerCompanion = function () {
|
|
95
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
96
|
+
return __generator(this, function (_a) {
|
|
97
|
+
return [2 /*return*/, new serializer_companion_1.BitcoinV3SerializerCompanion()];
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
};
|
|
101
|
+
BitcoinModule.prototype.createProtocol = function (identifier, network) {
|
|
102
|
+
switch (identifier) {
|
|
103
|
+
case coinlib_core_1.MainProtocolSymbols.BTC:
|
|
104
|
+
return (0, BitcoinProtocol_1.createBitcoinProtocol)({ network: network });
|
|
105
|
+
case coinlib_core_1.MainProtocolSymbols.BTC_SEGWIT:
|
|
106
|
+
return (0, BitcoinSegwitProtocol_1.createBitcoinSegwitProtocol)({ network: network });
|
|
107
|
+
case coinlib_core_1.MainProtocolSymbols.BTC_TAPROOT:
|
|
108
|
+
return (0, BitcoinTaprootProtocol_1.createBitcoinTaprootProtocol)({ network: network });
|
|
109
|
+
default:
|
|
110
|
+
throw new errors_1.ConditionViolationError(coinlib_core_1.Domain.BITCOIN, "Protocol ".concat(identifier, " not supported."));
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
return BitcoinModule;
|
|
114
|
+
}());
|
|
115
|
+
exports.BitcoinModule = BitcoinModule;
|
|
116
|
+
//# sourceMappingURL=BitcoinModule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BitcoinModule.js","sourceRoot":"","sources":["../../../src/v1/module/BitcoinModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2DAAwE;AACxE,4DAA2E;AAC3E,uDAWiC;AAEjC,uFAAqF;AACrF,+DAAqG;AACrG,2EAA+E;AAC/E,6EAAiF;AACjF,8EAAoF;AAKpF;IAIE;;QACE,IAAM,eAAe,GAA0B,IAAI,kCAAqB,CAAC;YACvE,iBAAiB,EAAE,CAAC,kDAAgC,CAAC;SACtD,CAAC,CAAA;QACF,IAAI,CAAC,iBAAiB;YACpB,GAAC,kCAAmB,CAAC,GAAG,IAAG,eAAe;YAC1C,GAAC,kCAAmB,CAAC,UAAU,IAAG,eAAe;YACjD,GAAC,kCAAmB,CAAC,WAAW,IAAG,eAAe;eACnD,CAAA;QACD,IAAI,CAAC,kBAAkB,GAAG,IAAA,qCAAwB,EAAC,IAAI,CAAC,iBAAiB,CAAC,CAAA;IAC5E,CAAC;IAEY,6CAAqB,GAAlC,UAAmC,UAA8B;;;gBAC/D,sBAAO,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,EAAA;;;KACvC;IAEY,4CAAoB,GAAjC,UACE,UAA8B,EAC9B,WAA6C;;;;;gBAEvC,OAAO,GACX,OAAO,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,MAAA,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,0CAAE,WAAW,CAAC,WAAW,CAAC,CAAA;gBAE9G,IAAI,OAAO,KAAK,SAAS,EAAE;oBACzB,MAAM,IAAI,gCAAuB,CAAC,qBAAM,CAAC,OAAO,EAAE,iCAAiC,CAAC,CAAA;iBACrF;gBAED,sBAAO,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,OAAO,CAAC,EAAA;;;KAChD;IAEY,2CAAmB,GAAhC,UACE,UAA8B,EAC9B,WAA6C;;;;;gBAEvC,OAAO,GACX,OAAO,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,MAAA,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,0CAAE,WAAW,CAAC,WAAW,CAAC,CAAA;gBAE9G,IAAI,OAAO,KAAK,SAAS,EAAE;oBACzB,MAAM,IAAI,gCAAuB,CAAC,qBAAM,CAAC,OAAO,EAAE,uCAAuC,CAAC,CAAA;iBAC3F;gBAED,sBAAO,IAAI,mDAAwB,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAA;;;KAC9D;IAEY,mDAA2B,GAAxC;;;gBACE,sBAAO,IAAI,mDAA4B,EAAE,EAAA;;;KAC1C;IAEO,sCAAc,GAAtB,UAAuB,UAA8B,EAAE,OAAyB;QAC9E,QAAQ,UAAU,EAAE;YAClB,KAAK,kCAAmB,CAAC,GAAG;gBAC1B,OAAO,IAAA,uCAAqB,EAAC,EAAE,OAAO,SAAA,EAAE,CAAC,CAAA;YAC3C,KAAK,kCAAmB,CAAC,UAAU;gBACjC,OAAO,IAAA,mDAA2B,EAAC,EAAE,OAAO,SAAA,EAAE,CAAC,CAAA;YACjD,KAAK,kCAAmB,CAAC,WAAW;gBAClC,OAAO,IAAA,qDAA4B,EAAC,EAAE,OAAO,SAAA,EAAE,CAAC,CAAA;YAClD;gBACE,MAAM,IAAI,gCAAuB,CAAC,qBAAM,CAAC,OAAO,EAAE,mBAAY,UAAU,oBAAiB,CAAC,CAAA;SAC7F;IACH,CAAC;IACH,oBAAC;AAAD,CAAC,AAhED,IAgEC;AAhEY,sCAAa"}
|
package/v1/module.d.ts
ADDED
package/v1/module.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.create = void 0;
|
|
18
|
+
var BitcoinModule_1 = require("./module/BitcoinModule");
|
|
19
|
+
__exportStar(require("./index"), exports);
|
|
20
|
+
function create() {
|
|
21
|
+
return new BitcoinModule_1.BitcoinModule();
|
|
22
|
+
}
|
|
23
|
+
exports.create = create;
|
|
24
|
+
//# sourceMappingURL=module.js.map
|
package/v1/module.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../src/v1/module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACA,wDAAsD;AAEtD,0CAAuB;AAEvB,SAAgB,MAAM;IACpB,OAAO,IAAI,6BAAa,EAAE,CAAA;AAC5B,CAAC;AAFD,wBAEC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Secp256k1CryptoClient } from '@wallfree-dev/coinlib-core/protocols/Secp256k1CryptoClient';
|
|
2
|
+
import { BitcoinProtocol } from '../../v1';
|
|
3
|
+
import { BitcoinJS } from '../types/bitcoinjs';
|
|
4
|
+
export declare class BitcoinCryptoClient extends Secp256k1CryptoClient {
|
|
5
|
+
private readonly protocol;
|
|
6
|
+
private readonly bitcoinjs;
|
|
7
|
+
constructor(protocol: BitcoinProtocol, bitcoinjs: BitcoinJS);
|
|
8
|
+
signMessage(message: string, keypair: {
|
|
9
|
+
privateKey: string;
|
|
10
|
+
}): Promise<string>;
|
|
11
|
+
verifyMessage(message: string, signature: string, publicKey: string): Promise<boolean>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
+
exports.BitcoinCryptoClient = void 0;
|
|
55
|
+
var Secp256k1CryptoClient_1 = require("@wallfree-dev/coinlib-core/protocols/Secp256k1CryptoClient");
|
|
56
|
+
var hex_1 = require("@wallfree-dev/coinlib-core/utils/hex");
|
|
57
|
+
var module_kit_1 = require("@wallfree-dev/module-kit");
|
|
58
|
+
var BitcoinCryptoClient = /** @class */ (function (_super) {
|
|
59
|
+
__extends(BitcoinCryptoClient, _super);
|
|
60
|
+
function BitcoinCryptoClient(protocol, bitcoinjs) {
|
|
61
|
+
var _this = _super.call(this) || this;
|
|
62
|
+
_this.protocol = protocol;
|
|
63
|
+
_this.bitcoinjs = bitcoinjs;
|
|
64
|
+
return _this;
|
|
65
|
+
}
|
|
66
|
+
BitcoinCryptoClient.prototype.signMessage = function (message, keypair) {
|
|
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));
|
|
95
|
+
exports.BitcoinCryptoClient = BitcoinCryptoClient;
|
|
96
|
+
//# sourceMappingURL=BitcoinCryptoClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BitcoinCryptoClient.js","sourceRoot":"","sources":["../../../src/v1/protocol/BitcoinCryptoClient.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oGAAkG;AAClG,4DAA4D;AAC5D,uDAA2G;AAK3G;IAAyC,uCAAqB;IAC5D,6BAA6B,QAAyB,EAAmB,SAAoB;QAA7F,YACE,iBAAO,SACR;QAF4B,cAAQ,GAAR,QAAQ,CAAiB;QAAmB,eAAS,GAAT,SAAS,CAAW;;IAE7F,CAAC;IAEY,yCAAW,GAAxB,UAAyB,OAAe,EAAE,OAA+B;;;;gBACjE,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;gBAE5G,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;wBAGvD,UAAU,GAAkC,IAAA,WAAK,EAAC,SAAS,CAAC;4BAChE,CAAC,CAAC,IAAA,yBAAY,EAAC,SAAS,EAAE,KAAK,CAAC;4BAChC,CAAC,CAAC,IAAA,iCAAoB,EAAC,SAAS,EAAE,SAAS,CAAC,CAAA;wBAE9B,qBAAM,IAAI,CAAC,QAAQ,CAAC,uBAAuB,CAAC,UAAU,CAAC,EAAA;;wBAAjE,OAAO,GAAG,SAAuD;wBAEvE,sBAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,YAAY,CAAC,EAAA;;;;KACrE;IACH,0BAAC;AAAD,CAAC,AAvBD,CAAyC,6CAAqB,GAuB7D;AAvBY,kDAAmB"}
|