@airgap/ethereum 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 (82) 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/BaseEthereumProtocol.d.ts +1 -0
  5. package/v0/protocol/BaseEthereumProtocol.js +872 -460
  6. package/v0/protocol/BaseEthereumProtocol.js.map +1 -1
  7. package/v0/protocol/EthereumAddress.d.ts +1 -0
  8. package/v0/protocol/EthereumAddress.js +17 -26
  9. package/v0/protocol/EthereumAddress.js.map +1 -1
  10. package/v0/protocol/EthereumClassicProtocol.js +23 -6
  11. package/v0/protocol/EthereumClassicProtocol.js.map +1 -1
  12. package/v0/protocol/EthereumCryptoClient.js +125 -66
  13. package/v0/protocol/EthereumCryptoClient.js.map +1 -1
  14. package/v0/protocol/EthereumProtocol.js +28 -9
  15. package/v0/protocol/EthereumProtocol.js.map +1 -1
  16. package/v0/protocol/EthereumProtocolOptions.d.ts +1 -1
  17. package/v0/protocol/EthereumProtocolOptions.js +117 -36
  18. package/v0/protocol/EthereumProtocolOptions.js.map +1 -1
  19. package/v0/protocol/EthereumRopstenProtocol.js +23 -6
  20. package/v0/protocol/EthereumRopstenProtocol.js.map +1 -1
  21. package/v0/protocol/clients/info-clients/EtherscanInfoClient.js +186 -86
  22. package/v0/protocol/clients/info-clients/EtherscanInfoClient.js.map +1 -1
  23. package/v0/protocol/clients/info-clients/InfoClient.js +4 -3
  24. package/v0/protocol/clients/info-clients/InfoClient.js.map +1 -1
  25. package/v0/protocol/clients/node-clients/AirGapNodeClient.js +298 -126
  26. package/v0/protocol/clients/node-clients/AirGapNodeClient.js.map +1 -1
  27. package/v0/protocol/clients/node-clients/NodeClient.js +4 -3
  28. package/v0/protocol/clients/node-clients/NodeClient.js.map +1 -1
  29. package/v0/protocol/erc20/ERC20.js +4 -4
  30. package/v0/protocol/erc20/ERC20.js.map +1 -1
  31. package/v0/protocol/erc20/GenericERC20.js +300 -161
  32. package/v0/protocol/erc20/GenericERC20.js.map +1 -1
  33. package/v0/protocol/utils/utils.js +55 -52
  34. package/v0/protocol/utils/utils.js.map +1 -1
  35. package/v0/serializer/validators/transaction-validator.js +31 -23
  36. package/v0/serializer/validators/transaction-validator.js.map +1 -1
  37. package/v0/serializer/validators/validators.js +73 -25
  38. package/v0/serializer/validators/validators.js.map +1 -1
  39. package/v1/block-explorer/EtherscanBlockExplorer.js +61 -12
  40. package/v1/block-explorer/EtherscanBlockExplorer.js.map +1 -1
  41. package/v1/clients/crypto/EthereumCryptoClient.js +124 -69
  42. package/v1/clients/crypto/EthereumCryptoClient.js.map +1 -1
  43. package/v1/clients/info/EthereumInfoClient.d.ts +1 -1
  44. package/v1/clients/info/EthereumInfoClient.js +4 -3
  45. package/v1/clients/info/EthereumInfoClient.js.map +1 -1
  46. package/v1/clients/info/EtherscanInfoClient.js +162 -84
  47. package/v1/clients/info/EtherscanInfoClient.js.map +1 -1
  48. package/v1/clients/node/HttpEthereumNodeClient.d.ts +2 -2
  49. package/v1/clients/node/HttpEthereumNodeClient.js +375 -164
  50. package/v1/clients/node/HttpEthereumNodeClient.js.map +1 -1
  51. package/v1/data/EthereumAddress.js +20 -29
  52. package/v1/data/EthereumAddress.js.map +1 -1
  53. package/v1/index.js +14 -14
  54. package/v1/index.js.map +1 -1
  55. package/v1/module/EthereumModule.js +112 -43
  56. package/v1/module/EthereumModule.js.map +1 -1
  57. package/v1/module.js +3 -2
  58. package/v1/module.js.map +1 -1
  59. package/v1/protocol/EthereumBaseProtocol.js +788 -467
  60. package/v1/protocol/EthereumBaseProtocol.js.map +1 -1
  61. package/v1/protocol/EthereumProtocol.js +46 -15
  62. package/v1/protocol/EthereumProtocol.js.map +1 -1
  63. package/v1/protocol/erc20/ERC20Protocol.js +360 -213
  64. package/v1/protocol/erc20/ERC20Protocol.js.map +1 -1
  65. package/v1/protocol/erc20/ERC20Token.d.ts +1 -1
  66. package/v1/protocol/erc20/ERC20Token.js +113 -35
  67. package/v1/protocol/erc20/ERC20Token.js.map +1 -1
  68. package/v1/serializer/v3/schemas/converter/transaction-converter.js +42 -25
  69. package/v1/serializer/v3/schemas/converter/transaction-converter.js.map +1 -1
  70. package/v1/serializer/v3/serializer-companion.js +148 -71
  71. package/v1/serializer/v3/serializer-companion.js.map +1 -1
  72. package/v1/serializer/v3/validators/transaction-validator.js +17 -14
  73. package/v1/serializer/v3/validators/transaction-validator.js.map +1 -1
  74. package/v1/types/crypto.d.ts +1 -1
  75. package/v1/types/protocol.d.ts +1 -1
  76. package/v1/types/transaction.d.ts +1 -1
  77. package/v1/utils/EthereumUtils.js +60 -57
  78. package/v1/utils/EthereumUtils.js.map +1 -1
  79. package/v1/utils/key.js +19 -28
  80. package/v1/utils/key.js.map +1 -1
  81. package/v1/utils/protocol.js +21 -33
  82. package/v1/utils/protocol.js.map +1 -1
@@ -1,54 +1,130 @@
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
+ };
2
53
  Object.defineProperty(exports, "__esModule", { value: true });
3
54
  exports.EthereumERC20ProtocolOptions = exports.EthereumERC20ProtocolConfig = exports.EthereumProtocolOptions = exports.EthereumProtocolConfig = exports.EthereumProtocolNetwork = exports.EtherscanBlockExplorer = exports.EthereumProtocolNetworkExtras = exports.BLOCK_EXPLORER_API = exports.NODE_URL = void 0;
4
- const ProtocolNetwork_1 = require("@airgap/coinlib-core/utils/ProtocolNetwork");
5
- const EtherscanInfoClient_1 = require("./clients/info-clients/EtherscanInfoClient");
6
- const AirGapNodeClient_1 = require("./clients/node-clients/AirGapNodeClient");
55
+ var ProtocolNetwork_1 = require("@airgap/coinlib-core/utils/ProtocolNetwork");
56
+ var EtherscanInfoClient_1 = require("./clients/info-clients/EtherscanInfoClient");
57
+ var AirGapNodeClient_1 = require("./clients/node-clients/AirGapNodeClient");
7
58
  // tslint:disable:max-classes-per-file
8
- const MAINNET_NAME = 'Mainnet';
59
+ var MAINNET_NAME = 'Mainnet';
9
60
  exports.NODE_URL = 'https://eth-rpc-proxy.airgap.prod.gke.papers.tech';
10
- const BLOCK_EXPLORER_URL = 'https://etherscan.io';
61
+ var BLOCK_EXPLORER_URL = 'https://etherscan.io';
11
62
  exports.BLOCK_EXPLORER_API = 'https://api.etherscan.io';
12
- class EthereumProtocolNetworkExtras {
13
- constructor(chainID = 1, blockExplorerApi = exports.BLOCK_EXPLORER_API) {
63
+ var EthereumProtocolNetworkExtras = /** @class */ (function () {
64
+ function EthereumProtocolNetworkExtras(chainID, blockExplorerApi) {
65
+ if (chainID === void 0) { chainID = 1; }
66
+ if (blockExplorerApi === void 0) { blockExplorerApi = exports.BLOCK_EXPLORER_API; }
14
67
  this.chainID = chainID;
15
68
  this.blockExplorerApi = blockExplorerApi;
16
69
  }
17
- }
70
+ return EthereumProtocolNetworkExtras;
71
+ }());
18
72
  exports.EthereumProtocolNetworkExtras = EthereumProtocolNetworkExtras;
19
- class EtherscanBlockExplorer {
20
- constructor(blockExplorer = BLOCK_EXPLORER_URL) {
73
+ var EtherscanBlockExplorer = /** @class */ (function () {
74
+ function EtherscanBlockExplorer(blockExplorer) {
75
+ if (blockExplorer === void 0) { blockExplorer = BLOCK_EXPLORER_URL; }
21
76
  this.blockExplorer = blockExplorer;
22
77
  }
23
- async getAddressLink(address) {
24
- return `${this.blockExplorer}/address/${address}`;
25
- }
26
- async getTransactionLink(transactionId) {
27
- return `${this.blockExplorer}/tx/${transactionId}`;
28
- }
29
- }
78
+ EtherscanBlockExplorer.prototype.getAddressLink = function (address) {
79
+ return __awaiter(this, void 0, void 0, function () {
80
+ return __generator(this, function (_a) {
81
+ return [2 /*return*/, "".concat(this.blockExplorer, "/address/").concat(address)];
82
+ });
83
+ });
84
+ };
85
+ EtherscanBlockExplorer.prototype.getTransactionLink = function (transactionId) {
86
+ return __awaiter(this, void 0, void 0, function () {
87
+ return __generator(this, function (_a) {
88
+ return [2 /*return*/, "".concat(this.blockExplorer, "/tx/").concat(transactionId)];
89
+ });
90
+ });
91
+ };
92
+ return EtherscanBlockExplorer;
93
+ }());
30
94
  exports.EtherscanBlockExplorer = EtherscanBlockExplorer;
31
- class EthereumProtocolNetwork extends ProtocolNetwork_1.ProtocolNetwork {
32
- constructor(name = MAINNET_NAME, type = ProtocolNetwork_1.NetworkType.MAINNET, rpcUrl = exports.NODE_URL, blockExplorer = new EtherscanBlockExplorer(), extras = new EthereumProtocolNetworkExtras()) {
33
- super(name, type, rpcUrl, blockExplorer, extras);
95
+ var EthereumProtocolNetwork = /** @class */ (function (_super) {
96
+ __extends(EthereumProtocolNetwork, _super);
97
+ function EthereumProtocolNetwork(name, type, rpcUrl, blockExplorer, extras) {
98
+ if (name === void 0) { name = MAINNET_NAME; }
99
+ if (type === void 0) { type = ProtocolNetwork_1.NetworkType.MAINNET; }
100
+ if (rpcUrl === void 0) { rpcUrl = exports.NODE_URL; }
101
+ if (blockExplorer === void 0) { blockExplorer = new EtherscanBlockExplorer(); }
102
+ if (extras === void 0) { extras = new EthereumProtocolNetworkExtras(); }
103
+ return _super.call(this, name, type, rpcUrl, blockExplorer, extras) || this;
34
104
  }
35
- }
105
+ return EthereumProtocolNetwork;
106
+ }(ProtocolNetwork_1.ProtocolNetwork));
36
107
  exports.EthereumProtocolNetwork = EthereumProtocolNetwork;
37
- class EthereumProtocolConfig {
38
- constructor() { }
39
- }
108
+ var EthereumProtocolConfig = /** @class */ (function () {
109
+ function EthereumProtocolConfig() {
110
+ }
111
+ return EthereumProtocolConfig;
112
+ }());
40
113
  exports.EthereumProtocolConfig = EthereumProtocolConfig;
41
- class EthereumProtocolOptions {
42
- constructor(network = new EthereumProtocolNetwork(), config = new EthereumProtocolConfig()) {
114
+ var EthereumProtocolOptions = /** @class */ (function () {
115
+ function EthereumProtocolOptions(network, config) {
116
+ if (network === void 0) { network = new EthereumProtocolNetwork(); }
117
+ if (config === void 0) { config = new EthereumProtocolConfig(); }
43
118
  this.network = network;
44
119
  this.config = config;
45
120
  this.nodeClient = new AirGapNodeClient_1.AirGapNodeClient(network.rpcUrl);
46
121
  this.infoClient = new EtherscanInfoClient_1.EtherscanInfoClient(network.extras.blockExplorerApi);
47
122
  }
48
- }
123
+ return EthereumProtocolOptions;
124
+ }());
49
125
  exports.EthereumProtocolOptions = EthereumProtocolOptions;
50
- class EthereumERC20ProtocolConfig {
51
- constructor(symbol, name, marketSymbol, identifier, contractAddress, decimals) {
126
+ var EthereumERC20ProtocolConfig = /** @class */ (function () {
127
+ function EthereumERC20ProtocolConfig(symbol, name, marketSymbol, identifier, contractAddress, decimals) {
52
128
  this.symbol = symbol;
53
129
  this.name = name;
54
130
  this.marketSymbol = marketSymbol;
@@ -56,14 +132,19 @@ class EthereumERC20ProtocolConfig {
56
132
  this.contractAddress = contractAddress;
57
133
  this.decimals = decimals;
58
134
  }
59
- }
135
+ return EthereumERC20ProtocolConfig;
136
+ }());
60
137
  exports.EthereumERC20ProtocolConfig = EthereumERC20ProtocolConfig;
61
- class EthereumERC20ProtocolOptions extends EthereumProtocolOptions {
62
- constructor(network = new EthereumProtocolNetwork(), config) {
63
- super(network, config);
64
- this.network = network;
65
- this.config = config;
138
+ var EthereumERC20ProtocolOptions = /** @class */ (function (_super) {
139
+ __extends(EthereumERC20ProtocolOptions, _super);
140
+ function EthereumERC20ProtocolOptions(network, config) {
141
+ if (network === void 0) { network = new EthereumProtocolNetwork(); }
142
+ var _this = _super.call(this, network, config) || this;
143
+ _this.network = network;
144
+ _this.config = config;
145
+ return _this;
66
146
  }
67
- }
147
+ return EthereumERC20ProtocolOptions;
148
+ }(EthereumProtocolOptions));
68
149
  exports.EthereumERC20ProtocolOptions = EthereumERC20ProtocolOptions;
69
150
  //# sourceMappingURL=EthereumProtocolOptions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EthereumProtocolOptions.js","sourceRoot":"","sources":["../../../src/v0/protocol/EthereumProtocolOptions.ts"],"names":[],"mappings":";;;AACA,gFAAyF;AAIzF,oFAAgF;AAEhF,8EAA0E;AAG1E,sCAAsC;AAEtC,MAAM,YAAY,GAAW,SAAS,CAAA;AAEzB,QAAA,QAAQ,GAAW,mDAAmD,CAAA;AAEnF,MAAM,kBAAkB,GAAW,sBAAsB,CAAA;AAC5C,QAAA,kBAAkB,GAAW,0BAA0B,CAAA;AAEpE,MAAa,6BAA6B;IACxC,YAA4B,UAAkB,CAAC,EAAkB,mBAA2B,0BAAkB;QAAlF,YAAO,GAAP,OAAO,CAAY;QAAkB,qBAAgB,GAAhB,gBAAgB,CAA6B;IAAG,CAAC;CACnH;AAFD,sEAEC;AAED,MAAa,sBAAsB;IACjC,YAA4B,gBAAwB,kBAAkB;QAA1C,kBAAa,GAAb,aAAa,CAA6B;IAAG,CAAC;IAEnE,KAAK,CAAC,cAAc,CAAC,OAAe;QACzC,OAAO,GAAG,IAAI,CAAC,aAAa,YAAY,OAAO,EAAE,CAAA;IACnD,CAAC;IACM,KAAK,CAAC,kBAAkB,CAAC,aAAqB;QACnD,OAAO,GAAG,IAAI,CAAC,aAAa,OAAO,aAAa,EAAE,CAAA;IACpD,CAAC;CACF;AATD,wDASC;AAED,MAAa,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vB;QAJiB,aAAO,GAAP,OAAO,CAAyD;QAChE,YAAM,GAAN,MAAM,CAA6B;;IAGrD,CAAC;IACH,mCAAC;AAAD,CAAC,AAPD,CAAkD,uBAAuB,GAOxE;AAPY,oEAA4B"}
@@ -1,13 +1,30 @@
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
+ })();
2
17
  Object.defineProperty(exports, "__esModule", { value: true });
3
18
  exports.EthereumRopstenProtocol = void 0;
4
- const BaseEthereumProtocol_1 = require("./BaseEthereumProtocol");
5
- const EthereumProtocolOptions_1 = require("./EthereumProtocolOptions");
6
- class EthereumRopstenProtocol extends BaseEthereumProtocol_1.BaseEthereumProtocol {
7
- constructor() {
19
+ var BaseEthereumProtocol_1 = require("./BaseEthereumProtocol");
20
+ var EthereumProtocolOptions_1 = require("./EthereumProtocolOptions");
21
+ var EthereumRopstenProtocol = /** @class */ (function (_super) {
22
+ __extends(EthereumRopstenProtocol, _super);
23
+ function EthereumRopstenProtocol() {
8
24
  // we probably need another network here, explorer is ok
9
- super(new EthereumProtocolOptions_1.EthereumProtocolOptions(new EthereumProtocolOptions_1.EthereumProtocolNetwork(undefined, undefined, 'https://ropsten.infura.io', undefined, new EthereumProtocolOptions_1.EthereumProtocolNetworkExtras(3, 'https://api-ropsten.etherscan.io/'))));
25
+ return _super.call(this, new EthereumProtocolOptions_1.EthereumProtocolOptions(new EthereumProtocolOptions_1.EthereumProtocolNetwork(undefined, undefined, 'https://ropsten.infura.io', undefined, new EthereumProtocolOptions_1.EthereumProtocolNetworkExtras(3, 'https://api-ropsten.etherscan.io/')))) || this;
10
26
  }
11
- }
27
+ return EthereumRopstenProtocol;
28
+ }(BaseEthereumProtocol_1.BaseEthereumProtocol));
12
29
  exports.EthereumRopstenProtocol = EthereumRopstenProtocol;
13
30
  //# sourceMappingURL=EthereumRopstenProtocol.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EthereumRopstenProtocol.js","sourceRoot":"","sources":["../../../src/v0/protocol/EthereumRopstenProtocol.ts"],"names":[],"mappings":";;;AAAA,iEAA6D;AAG7D,uEAA2H;AAE3H,MAAa,uBAAwB,SAAQ,2CAA2D;IACtG;QACE,wDAAwD;QACxD,KAAK,CACH,IAAI,iDAAuB,CACzB,IAAI,iDAAuB,CACzB,SAAS,EACT,SAAS,EACT,2BAA2B,EAC3B,SAAS,EACT,IAAI,uDAA6B,CAAC,CAAC,EAAE,mCAAmC,CAAC,CAC1E,CACF,CACF,CAAA;IACH,CAAC;CACF;AAfD,0DAeC"}
1
+ {"version":3,"file":"EthereumRopstenProtocol.js","sourceRoot":"","sources":["../../../src/v0/protocol/EthereumRopstenProtocol.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+DAA6D;AAG7D,qEAA2H;AAE3H;IAA6C,2CAA2D;IACtG;QACE,wDAAwD;eACxD,kBACE,IAAI,iDAAuB,CACzB,IAAI,iDAAuB,CACzB,SAAS,EACT,SAAS,EACT,2BAA2B,EAC3B,SAAS,EACT,IAAI,uDAA6B,CAAC,CAAC,EAAE,mCAAmC,CAAC,CAC1E,CACF,CACF;IACH,CAAC;IACH,8BAAC;AAAD,CAAC,AAfD,CAA6C,2CAAoB,GAehE;AAfY,0DAAuB"}
@@ -1,95 +1,195 @@
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
+ };
2
53
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
54
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
55
  };
5
56
  Object.defineProperty(exports, "__esModule", { value: true });
6
57
  exports.EtherscanInfoClient = void 0;
7
- const axios_0_19_0_1 = __importDefault(require("@airgap/coinlib-core/dependencies/src/axios-0.19.0"));
8
- const bignumber_1 = require("@airgap/coinlib-core/dependencies/src/bignumber.js-9.0.0/bignumber");
9
- const validate_1 = require("@airgap/coinlib-core/dependencies/src/validate.js-0.13.1/validate");
10
- const IAirGapTransaction_1 = require("@airgap/coinlib-core/interfaces/IAirGapTransaction");
11
- const EthereumProtocolOptions_1 = require("../../EthereumProtocolOptions");
12
- const InfoClient_1 = require("./InfoClient");
13
- const errors_1 = require("@airgap/coinlib-core/errors");
14
- const coinlib_error_1 = require("@airgap/coinlib-core/errors/coinlib-error");
15
- class EtherscanInfoClient extends InfoClient_1.EthereumInfoClient {
16
- constructor(baseURL = EthereumProtocolOptions_1.BLOCK_EXPLORER_API) {
17
- super(baseURL);
18
- }
19
- async fetchTransactions(protocol, address, limit, cursor) {
20
- const airGapTransactions = [];
21
- const url = cursor
22
- ? `${this.baseURL}/api?module=account&action=txlist&address=${address}&page=${cursor.page}&offset=${limit}&sort=desc&apiKey=P63MEHEYBM5BGEG5WFN76VPNCET8B2MAP7`
23
- : `${this.baseURL}/api?module=account&action=txlist&address=${address}&page=1&offset=${limit}&sort=desc&apiKey=P63MEHEYBM5BGEG5WFN76VPNCET8B2MAP7`;
24
- const response = await axios_0_19_0_1.default.get(url);
25
- const transactionResponse = response.data;
26
- const transactions = transactionResponse.result;
27
- if (transactionResponse.status === '0' && (transactions === undefined || !(0, validate_1.isArray)(transactions))) {
28
- throw new errors_1.NetworkError(coinlib_error_1.Domain.ETHEREUM, { response });
29
- }
30
- for (const transaction of transactions) {
31
- const fee = new bignumber_1.BigNumber(transaction.gas).times(new bignumber_1.BigNumber(transaction.gasPrice));
32
- const airGapTransaction = {
33
- hash: transaction.hash,
34
- from: [transaction.from],
35
- to: [transaction.to],
36
- isInbound: transaction.to.toLowerCase() === address.toLowerCase(),
37
- amount: new bignumber_1.BigNumber(transaction.value).toString(10),
38
- fee: fee.toString(10),
39
- blockHeight: transaction.blockNumber,
40
- protocolIdentifier: await protocol.getIdentifier(),
41
- network: (await protocol.getOptions()).network,
42
- timestamp: parseInt(transaction.timeStamp, 10),
43
- status: transaction.txreceipt_status === undefined || transaction.txreceipt_status === '1'
44
- ? IAirGapTransaction_1.AirGapTransactionStatus.APPLIED
45
- : IAirGapTransaction_1.AirGapTransactionStatus.FAILED
46
- };
47
- airGapTransactions.push(airGapTransaction);
48
- }
49
- return {
50
- transactions: airGapTransactions,
51
- cursor: {
52
- page: cursor ? cursor.page + 1 : 2
53
- }
54
- };
55
- }
56
- async fetchContractTransactions(protocol, contractAddress, address, limit, cursor) {
57
- const airGapTransactions = [];
58
- const url = cursor
59
- ? `${this.baseURL}/api?module=account&action=tokentx&address=${address}&contractAddress=${contractAddress}&page=${cursor.page}&offset=${limit}&sort=desc&apiKey=P63MEHEYBM5BGEG5WFN76VPNCET8B2MAP7`
60
- : `${this.baseURL}/api?module=account&action=tokentx&address=${address}&contractAddress=${contractAddress}&page=1&offset=${limit}&sort=desc&apiKey=P63MEHEYBM5BGEG5WFN76VPNCET8B2MAP7`;
61
- const response = await axios_0_19_0_1.default.get(url);
62
- const transactionResponse = response.data;
63
- const transactions = transactionResponse.result;
64
- if (transactionResponse.status === '0' && (transactions === undefined || !(0, validate_1.isArray)(transactions))) {
65
- throw new errors_1.NetworkError(coinlib_error_1.Domain.ETHEREUM, { response });
66
- }
67
- for (const transaction of transactions) {
68
- const fee = new bignumber_1.BigNumber(transaction.gas).times(new bignumber_1.BigNumber(transaction.gasPrice));
69
- const airGapTransaction = {
70
- hash: transaction.hash,
71
- from: [transaction.from],
72
- to: [transaction.to],
73
- isInbound: transaction.to.toLowerCase() === address.toLowerCase(),
74
- blockHeight: transaction.blockNumber,
75
- protocolIdentifier: await protocol.getIdentifier(),
76
- network: (await protocol.getOptions()).network,
77
- amount: new bignumber_1.BigNumber(transaction.value).toString(10),
78
- fee: fee.toString(10),
79
- timestamp: parseInt(transaction.timeStamp, 10),
80
- status: transaction.txreceipt_status === undefined || transaction.txreceipt_status === '1'
81
- ? IAirGapTransaction_1.AirGapTransactionStatus.APPLIED
82
- : IAirGapTransaction_1.AirGapTransactionStatus.FAILED
83
- };
84
- airGapTransactions.push(airGapTransaction);
85
- }
86
- return {
87
- transactions: airGapTransactions,
88
- cursor: {
89
- page: cursor ? cursor.page + 1 : 2
90
- }
91
- };
58
+ var axios_0_19_0_1 = __importDefault(require("@airgap/coinlib-core/dependencies/src/axios-0.19.0"));
59
+ var bignumber_1 = require("@airgap/coinlib-core/dependencies/src/bignumber.js-9.0.0/bignumber");
60
+ var validate_1 = require("@airgap/coinlib-core/dependencies/src/validate.js-0.13.1/validate");
61
+ var IAirGapTransaction_1 = require("@airgap/coinlib-core/interfaces/IAirGapTransaction");
62
+ var EthereumProtocolOptions_1 = require("../../EthereumProtocolOptions");
63
+ var InfoClient_1 = require("./InfoClient");
64
+ var errors_1 = require("@airgap/coinlib-core/errors");
65
+ var coinlib_error_1 = require("@airgap/coinlib-core/errors/coinlib-error");
66
+ var EtherscanInfoClient = /** @class */ (function (_super) {
67
+ __extends(EtherscanInfoClient, _super);
68
+ function EtherscanInfoClient(baseURL) {
69
+ if (baseURL === void 0) { baseURL = EthereumProtocolOptions_1.BLOCK_EXPLORER_API; }
70
+ return _super.call(this, baseURL) || this;
92
71
  }
93
- }
72
+ EtherscanInfoClient.prototype.fetchTransactions = function (protocol, address, limit, cursor) {
73
+ return __awaiter(this, void 0, void 0, function () {
74
+ var airGapTransactions, url, response, transactionResponse, transactions, _i, transactions_1, transaction, fee, airGapTransaction;
75
+ var _a;
76
+ return __generator(this, function (_b) {
77
+ switch (_b.label) {
78
+ case 0:
79
+ airGapTransactions = [];
80
+ url = cursor
81
+ ? "".concat(this.baseURL, "/api?module=account&action=txlist&address=").concat(address, "&page=").concat(cursor.page, "&offset=").concat(limit, "&sort=desc&apiKey=P63MEHEYBM5BGEG5WFN76VPNCET8B2MAP7")
82
+ : "".concat(this.baseURL, "/api?module=account&action=txlist&address=").concat(address, "&page=1&offset=").concat(limit, "&sort=desc&apiKey=P63MEHEYBM5BGEG5WFN76VPNCET8B2MAP7");
83
+ return [4 /*yield*/, axios_0_19_0_1.default.get(url)];
84
+ case 1:
85
+ response = _b.sent();
86
+ transactionResponse = response.data;
87
+ transactions = transactionResponse.result;
88
+ if (transactionResponse.status === '0' && (transactions === undefined || !(0, validate_1.isArray)(transactions))) {
89
+ throw new errors_1.NetworkError(coinlib_error_1.Domain.ETHEREUM, { response: response });
90
+ }
91
+ _i = 0, transactions_1 = transactions;
92
+ _b.label = 2;
93
+ case 2:
94
+ if (!(_i < transactions_1.length)) return [3 /*break*/, 6];
95
+ transaction = transactions_1[_i];
96
+ fee = new bignumber_1.BigNumber(transaction.gas).times(new bignumber_1.BigNumber(transaction.gasPrice));
97
+ _a = {
98
+ hash: transaction.hash,
99
+ from: [transaction.from],
100
+ to: [transaction.to],
101
+ isInbound: transaction.to.toLowerCase() === address.toLowerCase(),
102
+ amount: new bignumber_1.BigNumber(transaction.value).toString(10),
103
+ fee: fee.toString(10),
104
+ blockHeight: transaction.blockNumber
105
+ };
106
+ return [4 /*yield*/, protocol.getIdentifier()];
107
+ case 3:
108
+ _a.protocolIdentifier = _b.sent();
109
+ return [4 /*yield*/, protocol.getOptions()];
110
+ case 4:
111
+ airGapTransaction = (_a.network = (_b.sent()).network,
112
+ _a.timestamp = parseInt(transaction.timeStamp, 10),
113
+ _a.status = transaction.txreceipt_status === undefined || transaction.txreceipt_status === '1'
114
+ ? IAirGapTransaction_1.AirGapTransactionStatus.APPLIED
115
+ : IAirGapTransaction_1.AirGapTransactionStatus.FAILED,
116
+ _a);
117
+ airGapTransactions.push(airGapTransaction);
118
+ _b.label = 5;
119
+ case 5:
120
+ _i++;
121
+ return [3 /*break*/, 2];
122
+ case 6: return [2 /*return*/, {
123
+ transactions: airGapTransactions,
124
+ cursor: {
125
+ page: cursor ? cursor.page + 1 : 2
126
+ }
127
+ }];
128
+ }
129
+ });
130
+ });
131
+ };
132
+ EtherscanInfoClient.prototype.fetchContractTransactions = function (protocol, contractAddress, address, limit, cursor) {
133
+ return __awaiter(this, void 0, void 0, function () {
134
+ var airGapTransactions, url, response, transactionResponse, transactions, _i, transactions_2, transaction, fee, airGapTransaction;
135
+ var _a;
136
+ return __generator(this, function (_b) {
137
+ switch (_b.label) {
138
+ case 0:
139
+ airGapTransactions = [];
140
+ url = cursor
141
+ ? "".concat(this.baseURL, "/api?module=account&action=tokentx&address=").concat(address, "&contractAddress=").concat(contractAddress, "&page=").concat(cursor.page, "&offset=").concat(limit, "&sort=desc&apiKey=P63MEHEYBM5BGEG5WFN76VPNCET8B2MAP7")
142
+ : "".concat(this.baseURL, "/api?module=account&action=tokentx&address=").concat(address, "&contractAddress=").concat(contractAddress, "&page=1&offset=").concat(limit, "&sort=desc&apiKey=P63MEHEYBM5BGEG5WFN76VPNCET8B2MAP7");
143
+ return [4 /*yield*/, axios_0_19_0_1.default.get(url)];
144
+ case 1:
145
+ response = _b.sent();
146
+ transactionResponse = response.data;
147
+ transactions = transactionResponse.result;
148
+ if (transactionResponse.status === '0' && (transactions === undefined || !(0, validate_1.isArray)(transactions))) {
149
+ throw new errors_1.NetworkError(coinlib_error_1.Domain.ETHEREUM, { response: response });
150
+ }
151
+ _i = 0, transactions_2 = transactions;
152
+ _b.label = 2;
153
+ case 2:
154
+ if (!(_i < transactions_2.length)) return [3 /*break*/, 6];
155
+ transaction = transactions_2[_i];
156
+ fee = new bignumber_1.BigNumber(transaction.gas).times(new bignumber_1.BigNumber(transaction.gasPrice));
157
+ _a = {
158
+ hash: transaction.hash,
159
+ from: [transaction.from],
160
+ to: [transaction.to],
161
+ isInbound: transaction.to.toLowerCase() === address.toLowerCase(),
162
+ blockHeight: transaction.blockNumber
163
+ };
164
+ return [4 /*yield*/, protocol.getIdentifier()];
165
+ case 3:
166
+ _a.protocolIdentifier = _b.sent();
167
+ return [4 /*yield*/, protocol.getOptions()];
168
+ case 4:
169
+ airGapTransaction = (_a.network = (_b.sent()).network,
170
+ _a.amount = new bignumber_1.BigNumber(transaction.value).toString(10),
171
+ _a.fee = fee.toString(10),
172
+ _a.timestamp = parseInt(transaction.timeStamp, 10),
173
+ _a.status = transaction.txreceipt_status === undefined || transaction.txreceipt_status === '1'
174
+ ? IAirGapTransaction_1.AirGapTransactionStatus.APPLIED
175
+ : IAirGapTransaction_1.AirGapTransactionStatus.FAILED,
176
+ _a);
177
+ airGapTransactions.push(airGapTransaction);
178
+ _b.label = 5;
179
+ case 5:
180
+ _i++;
181
+ return [3 /*break*/, 2];
182
+ case 6: return [2 /*return*/, {
183
+ transactions: airGapTransactions,
184
+ cursor: {
185
+ page: cursor ? cursor.page + 1 : 2
186
+ }
187
+ }];
188
+ }
189
+ });
190
+ });
191
+ };
192
+ return EtherscanInfoClient;
193
+ }(InfoClient_1.EthereumInfoClient));
94
194
  exports.EtherscanInfoClient = EtherscanInfoClient;
95
195
  //# sourceMappingURL=EtherscanInfoClient.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EtherscanInfoClient.js","sourceRoot":"","sources":["../../../../../src/v0/protocol/clients/info-clients/EtherscanInfoClient.ts"],"names":[],"mappings":";;;;;;AAAA,sGAAsE;AACtE,kGAA8F;AAC9F,gGAA2F;AAC3F,2FAAgH;AAEhH,2EAAkE;AAGlE,6CAAiD;AACjD,wDAA0D;AAC1D,6EAAkE;AAElE,MAAa,mBAAoB,SAAQ,+BAAkB;IACzD,YAAY,UAAkB,4CAAkB;QAC9C,KAAK,CAAC,OAAO,CAAC,CAAA;IAChB,CAAC;IAEM,KAAK,CAAC,iBAAiB,CAC5B,QAA0B,EAC1B,OAAe,EACf,KAAU,EACV,MAAkC;QAElC,MAAM,kBAAkB,GAAyB,EAAE,CAAA;QAEnD,MAAM,GAAG,GAAG,MAAM;YAChB,CAAC,CAAC,GAAG,IAAI,CAAC,OAAO,6CAA6C,OAAO,SAAS,MAAM,CAAC,IAAI,WAAW,KAAK,sDAAsD;YAC/J,CAAC,CAAC,GAAG,IAAI,CAAC,OAAO,6CAA6C,OAAO,kBAAkB,KAAK,sDAAsD,CAAA;QAEpJ,MAAM,QAAQ,GAAG,MAAM,sBAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;QACrC,MAAM,mBAAmB,GAAG,QAAQ,CAAC,IAAI,CAAA;QACzC,MAAM,YAAY,GAAG,mBAAmB,CAAC,MAAM,CAAA;QAC/C,IAAI,mBAAmB,CAAC,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,KAAK,SAAS,IAAI,CAAC,IAAA,kBAAO,EAAC,YAAY,CAAC,CAAC,EAAE,CAAC;YACjG,MAAM,IAAI,qBAAY,CAAC,sBAAM,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAA;QACvD,CAAC;QACD,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE,CAAC;YACvC,MAAM,GAAG,GAAc,IAAI,qBAAS,CAAC,WAAW,CAAC,GAAG,CA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D,OAAO,EAAE,CAAC,MAAM,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC,OAAO;gBAC9C,MAAM,EAAE,IAAI,qBAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC;gBACrD,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;gBACrB,SAAS,EAAE,QAAQ,CAAC,WAAW,CAAC,SAAS,EAAE,EAAE,CAAC;gBAC9C,MAAM,EACJ,WAAW,CAAC,gBAAgB,KAAK,SAAS,IAAI,WAAW,CAAC,gBAAgB,KAAK,GAAG;oBAChF,CAAC,CAAC,4CAAuB,CAAC,OAAO;oBACjC,CAAC,CAAC,4CAAuB,CAAC,MAAM;aACrC,CAAA;YAED,kBAAkB,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAA;QAC5C,CAAC;QAED,OAAO;YACL,YAAY,EAAE,kBAAkB;YAChC,MAAM,EAAE;gBACN,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;aACnC;SACF,CAAA;IACH,CAAC;CACF;AArGD,kDAqGC"}
1
+ {"version":3,"file":"EtherscanInfoClient.js","sourceRoot":"","sources":["../../../../../src/v0/protocol/clients/info-clients/EtherscanInfoClient.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oGAAsE;AACtE,gGAA8F;AAC9F,8FAA2F;AAC3F,yFAAgH;AAEhH,yEAAkE;AAGlE,2CAAiD;AACjD,sDAA0D;AAC1D,2EAAkE;AAElE;IAAyC,uCAAkB;IACzD,6BAAY,OAAoC;QAApC,wBAAA,EAAA,UAAkB,4CAAkB;eAC9C,kBAAM,OAAO,CAAC;IAChB,CAAC;IAEY,+CAAiB,GAA9B,UACE,QAA0B,EAC1B,OAAe,EACf,KAAU,EACV,MAAkC;;;;;;;wBAE5B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,SAAS,IAAI,WAAW,CAAC,gBAAgB,KAAK,GAAG;gCAChF,CAAC,CAAC,4CAAuB,CAAC,OAAO;gCACjC,CAAC,CAAC,4CAAuB,CAAC,MAAM;+BACrC;wBAED,kBAAkB,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAA;;;wBAnBlB,IAAY,CAAA;;4BAsBtC,sBAAO;4BACL,YAAY,EAAE,kBAAkB;4BAChC,MAAM,EAAE;gCACN,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;6BACnC;yBACF,EAAA;;;;KACF;IACH,0BAAC;AAAD,CAAC,AArGD,CAAyC,+BAAkB,GAqG1D;AArGY,kDAAmB"}
@@ -1,10 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.EthereumInfoClient = void 0;
4
- class EthereumInfoClient {
5
- constructor(baseURL) {
4
+ var EthereumInfoClient = /** @class */ (function () {
5
+ function EthereumInfoClient(baseURL) {
6
6
  this.baseURL = baseURL;
7
7
  }
8
- }
8
+ return EthereumInfoClient;
9
+ }());
9
10
  exports.EthereumInfoClient = EthereumInfoClient;
10
11
  //# sourceMappingURL=InfoClient.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"InfoClient.js","sourceRoot":"","sources":["../../../../../src/v0/protocol/clients/info-clients/InfoClient.ts"],"names":[],"mappings":";;;AAGA,MAAsB,kBAAkB;IAGtC,YAAY,OAAe;QACzB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACxB,CAAC;CAeF;AApBD,gDAoBC"}
1
+ {"version":3,"file":"InfoClient.js","sourceRoot":"","sources":["../../../../../src/v0/protocol/clients/info-clients/InfoClient.ts"],"names":[],"mappings":";;;AAGA;IAGE,4BAAY,OAAe;QACzB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACxB,CAAC;IAeH,yBAAC;AAAD,CAAC,AApBD,IAoBC;AApBqB,gDAAkB"}