@airgap/bitcoin 0.13.45-beta.3 → 0.13.45-beta.5

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.
Files changed (73) hide show
  1. package/package.json +5 -5
  2. package/v0/index.js +10 -10
  3. package/v0/index.js.map +1 -1
  4. package/v0/protocol/BitcoinAddress.js +9 -8
  5. package/v0/protocol/BitcoinAddress.js.map +1 -1
  6. package/v0/protocol/BitcoinCryptoClient.js +85 -16
  7. package/v0/protocol/BitcoinCryptoClient.js.map +1 -1
  8. package/v0/protocol/BitcoinProtocol.js +987 -590
  9. package/v0/protocol/BitcoinProtocol.js.map +1 -1
  10. package/v0/protocol/BitcoinProtocolOptions.js +111 -45
  11. package/v0/protocol/BitcoinProtocolOptions.js.map +1 -1
  12. package/v0/protocol/BitcoinSegwitAddress.js +29 -12
  13. package/v0/protocol/BitcoinSegwitAddress.js.map +1 -1
  14. package/v0/protocol/BitcoinSegwitProtocol.js +483 -348
  15. package/v0/protocol/BitcoinSegwitProtocol.js.map +1 -1
  16. package/v0/protocol/BitcoinTestnetProtocol.js +36 -28
  17. package/v0/protocol/BitcoinTestnetProtocol.js.map +1 -1
  18. package/v0/serializer/validators/transaction-validator.js +30 -22
  19. package/v0/serializer/validators/transaction-validator.js.map +1 -1
  20. package/v0/serializer/validators/validators.js +23 -23
  21. package/v0/serializer/validators/validators.js.map +1 -1
  22. package/v1/block-explorer/BlockCypherBlockExplorer.js +61 -12
  23. package/v1/block-explorer/BlockCypherBlockExplorer.js.map +1 -1
  24. package/v1/data/BitcoinAddress.js +10 -9
  25. package/v1/data/BitcoinAddress.js.map +1 -1
  26. package/v1/data/BitcoinLegacyAddress.js +12 -11
  27. package/v1/data/BitcoinLegacyAddress.js.map +1 -1
  28. package/v1/data/BitcoinSegwitAddress.js +12 -11
  29. package/v1/data/BitcoinSegwitAddress.js.map +1 -1
  30. package/v1/data/BitcoinTaprootAddress.js +22 -31
  31. package/v1/data/BitcoinTaprootAddress.js.map +1 -1
  32. package/v1/index.js +11 -11
  33. package/v1/index.js.map +1 -1
  34. package/v1/module/BitcoinModule.d.ts +1 -1
  35. package/v1/module/BitcoinModule.js +102 -44
  36. package/v1/module/BitcoinModule.js.map +1 -1
  37. package/v1/module.js +3 -2
  38. package/v1/module.js.map +1 -1
  39. package/v1/protocol/BitcoinCryptoClient.js +90 -22
  40. package/v1/protocol/BitcoinCryptoClient.js.map +1 -1
  41. package/v1/protocol/BitcoinLegacyProtocol.js +796 -520
  42. package/v1/protocol/BitcoinLegacyProtocol.js.map +1 -1
  43. package/v1/protocol/BitcoinProtocol.js +1169 -735
  44. package/v1/protocol/BitcoinProtocol.js.map +1 -1
  45. package/v1/protocol/BitcoinSegwitProtocol.js +796 -542
  46. package/v1/protocol/BitcoinSegwitProtocol.js.map +1 -1
  47. package/v1/protocol/BitcoinTaprootProtocol.js +1000 -688
  48. package/v1/protocol/BitcoinTaprootProtocol.js.map +1 -1
  49. package/v1/protocol/BitcoinTestnetProtocol.js +33 -14
  50. package/v1/protocol/BitcoinTestnetProtocol.js.map +1 -1
  51. package/v1/serializer/v3/schemas/converter/transaction-converter.js +52 -29
  52. package/v1/serializer/v3/schemas/converter/transaction-converter.js.map +1 -1
  53. package/v1/serializer/v3/serializer-companion.js +165 -98
  54. package/v1/serializer/v3/serializer-companion.js.map +1 -1
  55. package/v1/serializer/v3/validators/transaction-validator.js +16 -13
  56. package/v1/serializer/v3/validators/transaction-validator.js.map +1 -1
  57. package/v1/serializer/v3/validators/validators.js +213 -122
  58. package/v1/serializer/v3/validators/validators.js.map +1 -1
  59. package/v1/types/crypto.d.ts +1 -1
  60. package/v1/types/key.d.ts +6 -6
  61. package/v1/types/protocol.d.ts +2 -2
  62. package/v1/types/transaction.d.ts +3 -3
  63. package/v1/utils/common.js +6 -4
  64. package/v1/utils/common.js.map +1 -1
  65. package/v1/utils/key.d.ts +6 -5
  66. package/v1/utils/key.js +39 -38
  67. package/v1/utils/key.js.map +1 -1
  68. package/v1/utils/network.js +4 -3
  69. package/v1/utils/network.js.map +1 -1
  70. package/v1/utils/protocol.js +19 -25
  71. package/v1/utils/protocol.js.map +1 -1
  72. package/v1/utils/signature.js +5 -4
  73. package/v1/utils/signature.js.map +1 -1
@@ -1,20 +1,56 @@
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
+ };
2
38
  Object.defineProperty(exports, "__esModule", { value: true });
3
39
  exports.BitcoinV3SerializerCompanion = void 0;
4
- const coinlib_core_1 = require("@airgap/coinlib-core");
5
- const validate_1 = require("@airgap/coinlib-core/dependencies/src/validate.js-0.13.1/validate");
6
- const errors_1 = require("@airgap/coinlib-core/errors");
7
- const serializer_1 = require("@airgap/serializer");
8
- const transaction_converter_1 = require("./schemas/converter/transaction-converter");
40
+ var coinlib_core_1 = require("@airgap/coinlib-core");
41
+ var validate_1 = require("@airgap/coinlib-core/dependencies/src/validate.js-0.13.1/validate");
42
+ var errors_1 = require("@airgap/coinlib-core/errors");
43
+ var serializer_1 = require("@airgap/serializer");
44
+ var transaction_converter_1 = require("./schemas/converter/transaction-converter");
9
45
  // import { BitcoinTransactionValidator } from './validators/transaction-validator'
10
- const validators_1 = require("./validators/validators");
11
- const bitcoinSegwitTransactionSignRequest = require('./schemas/generated/transaction-sign-request-bitcoin-segwit.json');
12
- const bitcoinSegwitTransactionSignResponse = require('./schemas/generated/transaction-sign-response-bitcoin-segwit.json');
13
- const bitcoinLegacyTransactionSignRequest = require('./schemas/generated/transaction-sign-request-bitcoin-legacy.json');
14
- const bitcoinLegacyTransactionSignResponse = require('./schemas/generated/transaction-sign-response-bitcoin-legacy.json');
15
- class BitcoinV3SerializerCompanion {
46
+ var validators_1 = require("./validators/validators");
47
+ var bitcoinSegwitTransactionSignRequest = require('./schemas/generated/transaction-sign-request-bitcoin-segwit.json');
48
+ var bitcoinSegwitTransactionSignResponse = require('./schemas/generated/transaction-sign-response-bitcoin-segwit.json');
49
+ var bitcoinLegacyTransactionSignRequest = require('./schemas/generated/transaction-sign-request-bitcoin-legacy.json');
50
+ var bitcoinLegacyTransactionSignResponse = require('./schemas/generated/transaction-sign-response-bitcoin-legacy.json');
51
+ var BitcoinV3SerializerCompanion = /** @class */ (function () {
16
52
  // private readonly bitcoinTransactionValidator: BitcoinTransactionValidator = new BitcoinTransactionValidator()
17
- constructor() {
53
+ function BitcoinV3SerializerCompanion() {
18
54
  this.schemas = [
19
55
  {
20
56
  type: serializer_1.IACMessageType.TransactionSignRequest,
@@ -47,94 +83,125 @@ class BitcoinV3SerializerCompanion {
47
83
  protocolIdentifier: coinlib_core_1.MainProtocolSymbols.BTC_TAPROOT
48
84
  }
49
85
  ];
50
- Object.keys(validators_1.bitcoinValidators).forEach((key) => {
86
+ Object.keys(validators_1.bitcoinValidators).forEach(function (key) {
51
87
  validate_1.validators[key] = validators_1.bitcoinValidators[key];
52
88
  });
53
89
  }
54
- async toTransactionSignRequest(identifier, unsignedTransaction, publicKey, callbackUrl) {
55
- switch (identifier) {
56
- case coinlib_core_1.MainProtocolSymbols.BTC:
57
- return (0, transaction_converter_1.bitcoinLegacyUnsignedTransactionToRequest)(unsignedTransaction, publicKey, callbackUrl);
58
- case coinlib_core_1.MainProtocolSymbols.BTC_SEGWIT:
59
- return (0, transaction_converter_1.bitcoinSegwitUnsignedTransactionToRequest)(unsignedTransaction, publicKey, callbackUrl);
60
- case coinlib_core_1.MainProtocolSymbols.BTC_TAPROOT:
61
- return (0, transaction_converter_1.bitcoinTaprootUnsignedTransactionToRequest)(unsignedTransaction, publicKey, callbackUrl);
62
- default:
63
- throw new errors_1.UnsupportedError(coinlib_core_1.Domain.BITCOIN, `Protocol ${identifier} not supported`);
64
- }
65
- }
66
- async fromTransactionSignRequest(identifier, transactionSignRequest) {
67
- switch (identifier) {
68
- case coinlib_core_1.MainProtocolSymbols.BTC:
69
- return (0, transaction_converter_1.bitcoinLegacyTransactionSignRequestToUnsigned)(transactionSignRequest);
70
- case coinlib_core_1.MainProtocolSymbols.BTC_SEGWIT:
71
- return (0, transaction_converter_1.bitcoinSegwitTransactionSignRequestToUnsigned)(transactionSignRequest);
72
- case coinlib_core_1.MainProtocolSymbols.BTC_TAPROOT:
73
- return (0, transaction_converter_1.bitcoinTaprootTransactionSignRequestToUnsigned)(transactionSignRequest);
74
- default:
75
- throw new errors_1.UnsupportedError(coinlib_core_1.Domain.BITCOIN, `Protocol ${identifier} not supported`);
76
- }
77
- }
78
- async validateTransactionSignRequest(identifier, transactionSignRequest) {
79
- switch (identifier) {
80
- case coinlib_core_1.MainProtocolSymbols.BTC:
81
- // try {
82
- // await this.bitcoinTransactionValidator.validateUnsignedTransaction(transactionSignRequest)
83
- // return true
84
- // } catch {
85
- // return false
86
- // }
87
- return true;
88
- case coinlib_core_1.MainProtocolSymbols.BTC_SEGWIT:
89
- return true;
90
- case coinlib_core_1.MainProtocolSymbols.BTC_TAPROOT:
91
- return true;
92
- default:
93
- throw new errors_1.UnsupportedError(coinlib_core_1.Domain.BITCOIN, `Protocol ${identifier} not supported`);
94
- }
95
- }
96
- async toTransactionSignResponse(identifier, signedTransaction, accountIdentifier) {
97
- switch (identifier) {
98
- case coinlib_core_1.MainProtocolSymbols.BTC:
99
- return (0, transaction_converter_1.bitcoinLegacySignedTransactionToResponse)(signedTransaction, accountIdentifier);
100
- case coinlib_core_1.MainProtocolSymbols.BTC_SEGWIT:
101
- return (0, transaction_converter_1.bitcoinSegwitSignedTransactionToResponse)(signedTransaction, accountIdentifier);
102
- case coinlib_core_1.MainProtocolSymbols.BTC_TAPROOT:
103
- return (0, transaction_converter_1.bitcoinTaprootSignedTransactionToResponse)(signedTransaction, accountIdentifier);
104
- default:
105
- throw new errors_1.UnsupportedError(coinlib_core_1.Domain.BITCOIN, `Protocol ${identifier} not supported`);
106
- }
107
- }
108
- async fromTransactionSignResponse(identifier, transactionSignResponse) {
109
- switch (identifier) {
110
- case coinlib_core_1.MainProtocolSymbols.BTC:
111
- return (0, transaction_converter_1.bitcoinLegacyTransactionSignResponseToSigned)(transactionSignResponse);
112
- case coinlib_core_1.MainProtocolSymbols.BTC_SEGWIT:
113
- return (0, transaction_converter_1.bitcoinSegwitTransactionSignResponseToSigned)(transactionSignResponse);
114
- case coinlib_core_1.MainProtocolSymbols.BTC_TAPROOT:
115
- return (0, transaction_converter_1.bitcoinTaprootTransactionSignResponseToSigned)(transactionSignResponse);
116
- default:
117
- throw new errors_1.UnsupportedError(coinlib_core_1.Domain.BITCOIN, `Protocol ${identifier} not supported`);
118
- }
119
- }
120
- async validateTransactionSignResponse(identifier, transactionSignResponse) {
121
- switch (identifier) {
122
- case coinlib_core_1.MainProtocolSymbols.BTC:
123
- // try {
124
- // await this.bitcoinTransactionValidator.validateSignedTransaction(transactionSignResponse as BitcoinTransactionSignResponse)
125
- // return true
126
- // } catch {
127
- // return false
128
- // }
129
- return true;
130
- case coinlib_core_1.MainProtocolSymbols.BTC_SEGWIT:
131
- return true;
132
- case coinlib_core_1.MainProtocolSymbols.BTC_TAPROOT:
133
- return true;
134
- default:
135
- throw new errors_1.UnsupportedError(coinlib_core_1.Domain.BITCOIN, `Protocol ${identifier} not supported`);
136
- }
137
- }
138
- }
90
+ BitcoinV3SerializerCompanion.prototype.toTransactionSignRequest = function (identifier, unsignedTransaction, publicKey, callbackUrl) {
91
+ return __awaiter(this, void 0, void 0, function () {
92
+ return __generator(this, function (_a) {
93
+ switch (identifier) {
94
+ case coinlib_core_1.MainProtocolSymbols.BTC:
95
+ return [2 /*return*/, (0, transaction_converter_1.bitcoinLegacyUnsignedTransactionToRequest)(unsignedTransaction, publicKey, callbackUrl)];
96
+ case coinlib_core_1.MainProtocolSymbols.BTC_SEGWIT:
97
+ return [2 /*return*/, (0, transaction_converter_1.bitcoinSegwitUnsignedTransactionToRequest)(unsignedTransaction, publicKey, callbackUrl)];
98
+ case coinlib_core_1.MainProtocolSymbols.BTC_TAPROOT:
99
+ return [2 /*return*/, (0, transaction_converter_1.bitcoinTaprootUnsignedTransactionToRequest)(unsignedTransaction, publicKey, callbackUrl)];
100
+ default:
101
+ throw new errors_1.UnsupportedError(coinlib_core_1.Domain.BITCOIN, "Protocol ".concat(identifier, " not supported"));
102
+ }
103
+ return [2 /*return*/];
104
+ });
105
+ });
106
+ };
107
+ BitcoinV3SerializerCompanion.prototype.fromTransactionSignRequest = function (identifier, transactionSignRequest) {
108
+ return __awaiter(this, void 0, void 0, function () {
109
+ return __generator(this, function (_a) {
110
+ switch (identifier) {
111
+ case coinlib_core_1.MainProtocolSymbols.BTC:
112
+ return [2 /*return*/, (0, transaction_converter_1.bitcoinLegacyTransactionSignRequestToUnsigned)(transactionSignRequest)];
113
+ case coinlib_core_1.MainProtocolSymbols.BTC_SEGWIT:
114
+ return [2 /*return*/, (0, transaction_converter_1.bitcoinSegwitTransactionSignRequestToUnsigned)(transactionSignRequest)];
115
+ case coinlib_core_1.MainProtocolSymbols.BTC_TAPROOT:
116
+ return [2 /*return*/, (0, transaction_converter_1.bitcoinTaprootTransactionSignRequestToUnsigned)(transactionSignRequest)];
117
+ default:
118
+ throw new errors_1.UnsupportedError(coinlib_core_1.Domain.BITCOIN, "Protocol ".concat(identifier, " not supported"));
119
+ }
120
+ return [2 /*return*/];
121
+ });
122
+ });
123
+ };
124
+ BitcoinV3SerializerCompanion.prototype.validateTransactionSignRequest = function (identifier, transactionSignRequest) {
125
+ return __awaiter(this, void 0, void 0, function () {
126
+ return __generator(this, function (_a) {
127
+ switch (identifier) {
128
+ case coinlib_core_1.MainProtocolSymbols.BTC:
129
+ // try {
130
+ // await this.bitcoinTransactionValidator.validateUnsignedTransaction(transactionSignRequest)
131
+ // return true
132
+ // } catch {
133
+ // return false
134
+ // }
135
+ return [2 /*return*/, true];
136
+ case coinlib_core_1.MainProtocolSymbols.BTC_SEGWIT:
137
+ return [2 /*return*/, true];
138
+ case coinlib_core_1.MainProtocolSymbols.BTC_TAPROOT:
139
+ return [2 /*return*/, true];
140
+ default:
141
+ throw new errors_1.UnsupportedError(coinlib_core_1.Domain.BITCOIN, "Protocol ".concat(identifier, " not supported"));
142
+ }
143
+ return [2 /*return*/];
144
+ });
145
+ });
146
+ };
147
+ BitcoinV3SerializerCompanion.prototype.toTransactionSignResponse = function (identifier, signedTransaction, accountIdentifier) {
148
+ return __awaiter(this, void 0, void 0, function () {
149
+ return __generator(this, function (_a) {
150
+ switch (identifier) {
151
+ case coinlib_core_1.MainProtocolSymbols.BTC:
152
+ return [2 /*return*/, (0, transaction_converter_1.bitcoinLegacySignedTransactionToResponse)(signedTransaction, accountIdentifier)];
153
+ case coinlib_core_1.MainProtocolSymbols.BTC_SEGWIT:
154
+ return [2 /*return*/, (0, transaction_converter_1.bitcoinSegwitSignedTransactionToResponse)(signedTransaction, accountIdentifier)];
155
+ case coinlib_core_1.MainProtocolSymbols.BTC_TAPROOT:
156
+ return [2 /*return*/, (0, transaction_converter_1.bitcoinTaprootSignedTransactionToResponse)(signedTransaction, accountIdentifier)];
157
+ default:
158
+ throw new errors_1.UnsupportedError(coinlib_core_1.Domain.BITCOIN, "Protocol ".concat(identifier, " not supported"));
159
+ }
160
+ return [2 /*return*/];
161
+ });
162
+ });
163
+ };
164
+ BitcoinV3SerializerCompanion.prototype.fromTransactionSignResponse = function (identifier, transactionSignResponse) {
165
+ return __awaiter(this, void 0, void 0, function () {
166
+ return __generator(this, function (_a) {
167
+ switch (identifier) {
168
+ case coinlib_core_1.MainProtocolSymbols.BTC:
169
+ return [2 /*return*/, (0, transaction_converter_1.bitcoinLegacyTransactionSignResponseToSigned)(transactionSignResponse)];
170
+ case coinlib_core_1.MainProtocolSymbols.BTC_SEGWIT:
171
+ return [2 /*return*/, (0, transaction_converter_1.bitcoinSegwitTransactionSignResponseToSigned)(transactionSignResponse)];
172
+ case coinlib_core_1.MainProtocolSymbols.BTC_TAPROOT:
173
+ return [2 /*return*/, (0, transaction_converter_1.bitcoinTaprootTransactionSignResponseToSigned)(transactionSignResponse)];
174
+ default:
175
+ throw new errors_1.UnsupportedError(coinlib_core_1.Domain.BITCOIN, "Protocol ".concat(identifier, " not supported"));
176
+ }
177
+ return [2 /*return*/];
178
+ });
179
+ });
180
+ };
181
+ BitcoinV3SerializerCompanion.prototype.validateTransactionSignResponse = function (identifier, transactionSignResponse) {
182
+ return __awaiter(this, void 0, void 0, function () {
183
+ return __generator(this, function (_a) {
184
+ switch (identifier) {
185
+ case coinlib_core_1.MainProtocolSymbols.BTC:
186
+ // try {
187
+ // await this.bitcoinTransactionValidator.validateSignedTransaction(transactionSignResponse as BitcoinTransactionSignResponse)
188
+ // return true
189
+ // } catch {
190
+ // return false
191
+ // }
192
+ return [2 /*return*/, true];
193
+ case coinlib_core_1.MainProtocolSymbols.BTC_SEGWIT:
194
+ return [2 /*return*/, true];
195
+ case coinlib_core_1.MainProtocolSymbols.BTC_TAPROOT:
196
+ return [2 /*return*/, true];
197
+ default:
198
+ throw new errors_1.UnsupportedError(coinlib_core_1.Domain.BITCOIN, "Protocol ".concat(identifier, " not supported"));
199
+ }
200
+ return [2 /*return*/];
201
+ });
202
+ });
203
+ };
204
+ return BitcoinV3SerializerCompanion;
205
+ }());
139
206
  exports.BitcoinV3SerializerCompanion = BitcoinV3SerializerCompanion;
140
207
  //# sourceMappingURL=serializer-companion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"serializer-companion.js","sourceRoot":"","sources":["../../../../src/v1/serializer/v3/serializer-companion.ts"],"names":[],"mappings":";;;AAAA,uDAAkE;AAClE,gGAA8F;AAC9F,wDAA8D;AAG9D,mDAAgH;AAahH,qFAiBkD;AAElD,mFAAmF;AACnF,wDAA2D;AAI3D,MAAM,mCAAmC,GAAe,OAAO,CAAC,kEAAkE,CAAC,CAAA;AACnI,MAAM,oCAAoC,GAAe,OAAO,CAAC,mEAAmE,CAAC,CAAA;AAErI,MAAM,mCAAmC,GAAe,OAAO,CAAC,kEAAkE,CAAC,CAAA;AAC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;IAEM,KAAK,CAAC,+BAA+B,CAAC,UAAkB,EAAE,uBAAgD;QAC/G,QAAQ,UAAU,EAAE,CAAC;YACnB,KAAK,kCAAmB,CAAC,GAAG;gBAC1B,QAAQ;gBACR,gIAAgI;gBAEhI,gBAAgB;gBAChB,YAAY;gBACZ,iBAAiB;gBACjB,IAAI;gBAEJ,OAAO,IAAI,CAAA;YACb,KAAK,kCAAmB,CAAC,UAAU;gBACjC,OAAO,IAAI,CAAA;YACb,KAAK,kCAAmB,CAAC,WAAW;gBAClC,OAAO,IAAI,CAAA;YACb;gBACE,MAAM,IAAI,yBAAgB,CAAC,qBAAM,CAAC,OAAO,EAAE,YAAY,UAAU,gBAAgB,CAAC,CAAA;QACtF,CAAC;IACH,CAAC;CACF;AAtJD,oEAsJC"}
1
+ {"version":3,"file":"serializer-companion.js","sourceRoot":"","sources":["../../../../src/v1/serializer/v3/serializer-companion.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAkE;AAClE,8FAA8F;AAC9F,sDAA8D;AAG9D,iDAAgH;AAahH,mFAiBkD;AAElD,mFAAmF;AACnF,sDAA2D;AAI3D,IAAM,mCAAmC,GAAe,OAAO,CAAC,kEAAkE,CAAC,CAAA;AACnI,IAAM,oCAAoC,GAAe,OAAO,CAAC,mEAAmE,CAAC,CAAA;AAErI,IAAM,mCAAmC,GAAe,OAAO,CAAC,kEAAkE,CAAC,CAAA;AACnI,IAAM,oCAAoC,GAAe,OAAO,CAAC,mEAAmE,CAAC,CAAA;AAErI;IAkCE,gHAAgH;IAEhH;QAnCgB,YAAO,GAA4B;YACjD;gBACE,IAAI,EAAE,2BAAc,CAAC,sBAAsB;gBAC3C,MAAM,EAAE,EAAE,MAAM,EAAE,mCAAmC,EAAE;gBACvD,kBAAkB,EAAE,kCAAmB,CAAC,GAAG;aAC5C;YACD;gBACE,IAAI,EAAE,2BAAc,CAAC,uBAAuB;gBAC5C,MAAM,EAAE,EA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gB,CAAC,qBAAM,CAAC,OAAO,EAAE,mBAAY,UAAU,mBAAgB,CAAC,CAAA;iBACrF;;;;KACF;IACH,mCAAC;AAAD,CAAC,AAtJD,IAsJC;AAtJY,oEAA4B"}
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BitcoinTransactionValidator = void 0;
4
4
  // tslint:disable: max-classes-per-file
5
- const validate_1 = require("@airgap/coinlib-core/dependencies/src/validate.js-0.13.1/validate");
6
- const serializer_1 = require("@airgap/serializer");
7
- const unsignedTransactionConstraints = {
5
+ var validate_1 = require("@airgap/coinlib-core/dependencies/src/validate.js-0.13.1/validate");
6
+ var serializer_1 = require("@airgap/serializer");
7
+ var unsignedTransactionConstraints = {
8
8
  ins: {
9
9
  presence: { allowEmpty: false },
10
10
  isValidBitcoinInput: true
@@ -14,7 +14,7 @@ const unsignedTransactionConstraints = {
14
14
  isValidBitcoinOutput: true
15
15
  }
16
16
  };
17
- const signedTransactionConstraints = {
17
+ var signedTransactionConstraints = {
18
18
  from: {
19
19
  presence: { allowEmpty: false },
20
20
  isValidBitcoinFromArray: true
@@ -37,17 +37,20 @@ const signedTransactionConstraints = {
37
37
  presence: { allowEmpty: false }
38
38
  }
39
39
  };
40
- const success = () => undefined;
41
- const error = (errors) => errors;
42
- class BitcoinTransactionValidator {
43
- validateUnsignedTransaction(request) {
44
- const transaction = request.transaction;
40
+ var success = function () { return undefined; };
41
+ var error = function (errors) { return errors; };
42
+ var BitcoinTransactionValidator = /** @class */ (function () {
43
+ function BitcoinTransactionValidator() {
44
+ }
45
+ BitcoinTransactionValidator.prototype.validateUnsignedTransaction = function (request) {
46
+ var transaction = request.transaction;
45
47
  (0, serializer_1.validateSyncScheme)({});
46
48
  return (0, validate_1.async)(transaction, unsignedTransactionConstraints).then(success, error);
47
- }
48
- validateSignedTransaction(response) {
49
+ };
50
+ BitcoinTransactionValidator.prototype.validateSignedTransaction = function (response) {
49
51
  return (0, validate_1.async)(response, signedTransactionConstraints).then(success, error);
50
- }
51
- }
52
+ };
53
+ return BitcoinTransactionValidator;
54
+ }());
52
55
  exports.BitcoinTransactionValidator = BitcoinTransactionValidator;
53
56
  //# sourceMappingURL=transaction-validator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"transaction-validator.js","sourceRoot":"","sources":["../../../../../src/v1/serializer/v3/validators/transaction-validator.ts"],"names":[],"mappings":";;;AAAA,uCAAuC;AACvC,gGAAyF;AACzF,mDAA6E;AAK7E,MAAM,8BAA8B,GAAG;IACrC,GAAG,EAAE;QACH,QAAQ,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE;QAC/B,mBAAmB,EAAE,IAAI;KAC1B;IACD,IAAI,EAAE;QACJ,QAAQ,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE;QAC/B,oBAAoB,EAAE,IAAI;KAC3B;CACF,CAAA;AAED,MAAM,4BAA4B,GAAG;IACnC,IAAI,EAAE;QACJ,QAAQ,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE;QAC/B,uBAAuB,EAAE,IAAI;KAC9B;IACD,MAAM,EAAE;QACN,IAAI,EAAE,WAAW;QACjB,QAAQ,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE;KAChC;IACD,GAAG,EAAE;QACH,IAAI,EAAE,WAAW;QACjB,QAAQ,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE;KAChC;IACD,iBAAiB,EAAE;QACjB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE;KAChC;IACD,WAAW,EAAE;QACX,sBAAsB,EAAE,IAAI;QAC5B,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE;KAChC;CACF,CAAA;AACD,MAAM,OAAO,GAAG,GAAG,EAAE,CAAC,SAAS,CAAA;AAC/B,MAAM,KAAK,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAA;AAEhC,MAAa,2BAA2B;IAC/B,2BAA2B,CAAC,OAAsC;QACvE,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAA;QACvC,IAAA,+BAAkB,EAAC,EAAE,CAAC,CAAA;QAEtB,OAAO,IAAA,gBAAK,EAAC,WAAW,EAAE,8BAA8B,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAA;IAChF,CAAC;IACM,yBAAyB,CAAC,QAAwC;QACvE,OAAO,IAAA,gBAAK,EAAC,QAAQ,EAAE,4BAA4B,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAA;IAC3E,CAAC;CACF;AAVD,kEAUC"}
1
+ {"version":3,"file":"transaction-validator.js","sourceRoot":"","sources":["../../../../../src/v1/serializer/v3/validators/transaction-validator.ts"],"names":[],"mappings":";;;AAAA,uCAAuC;AACvC,8FAAyF;AACzF,iDAA6E;AAK7E,IAAM,8BAA8B,GAAG;IACrC,GAAG,EAAE;QACH,QAAQ,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE;QAC/B,mBAAmB,EAAE,IAAI;KAC1B;IACD,IAAI,EAAE;QACJ,QAAQ,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE;QAC/B,oBAAoB,EAAE,IAAI;KAC3B;CACF,CAAA;AAED,IAAM,4BAA4B,GAAG;IACnC,IAAI,EAAE;QACJ,QAAQ,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE;QAC/B,uBAAuB,EAAE,IAAI;KAC9B;IACD,MAAM,EAAE;QACN,IAAI,EAAE,WAAW;QACjB,QAAQ,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE;KAChC;IACD,GAAG,EAAE;QACH,IAAI,EAAE,WAAW;QACjB,QAAQ,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE;KAChC;IACD,iBAAiB,EAAE;QACjB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE;KAChC;IACD,WAAW,EAAE;QACX,sBAAs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