@cartridge/controller 0.1.2 → 0.1.37

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/lib/account.d.ts CHANGED
@@ -1,13 +1,11 @@
1
- import { AccountInterface, DeployContractPayload, Abi, Call, DeployContractResponse as StarknetDeployContractResponse, InvocationsDetails, Signature, typedData, number, Provider, Invocation, SignerInterface, InvokeFunctionResponse } from "starknet";
2
- import { EstimateFee } from "starknet/types/account";
1
+ import { Account, DeployContractPayload, Abi, Call, EstimateFeeDetails, EstimateFee, DeployContractResponse as StarknetDeployContractResponse, InvocationsDetails, Signature, typedData, InvokeFunctionResponse } from "starknet";
3
2
  import { Messenger } from "./messenger";
4
3
  import { Scope } from "./types";
5
- export declare class Account extends Provider implements AccountInterface {
4
+ export declare class CartridgeAccount extends Account {
6
5
  address: string;
7
6
  private messenger;
8
7
  private url;
9
8
  private _scopes;
10
- signer: SignerInterface;
11
9
  constructor(address: string, scopes: Scope[] | undefined, messenger: Messenger, options?: {
12
10
  url?: string;
13
11
  });
@@ -23,30 +21,30 @@ export declare class Account extends Provider implements AccountInterface {
23
21
  */
24
22
  deployContract(payload: DeployContractPayload, abi?: Abi): Promise<StarknetDeployContractResponse>;
25
23
  /**
26
- * Estimate Fee for a method on starknet
27
- *
28
- * @param invocation the invocation object containing:
29
- * - contractAddress - the address of the contract
30
- * - entrypoint - the entrypoint of the contract
31
- * - calldata - (defaults to []) the calldata
32
- * - signature - (defaults to []) the signature
33
- *
34
- * @returns response from addTransaction
35
- */
36
- estimateFee(invocation: Invocation): Promise<EstimateFee>;
24
+ * Estimate Fee for a method on starknet
25
+ *
26
+ * @param calls the invocation object containing:
27
+ * - contractAddress - the address of the contract
28
+ * - entrypoint - the entrypoint of the contract
29
+ * - calldata - (defaults to []) the calldata
30
+ * - signature - (defaults to []) the signature
31
+ *
32
+ * @returns response from addTransaction
33
+ */
34
+ estimateFee(calls: Call | Call[], { nonce: providedNonce, blockIdentifier }?: EstimateFeeDetails): Promise<EstimateFee>;
37
35
  /**
38
36
  * Invoke execute function in account contract
39
37
  *
40
- * @param transactions the invocation object or an array of them, containing:
38
+ * @param calls the invocation object or an array of them, containing:
41
39
  * - contractAddress - the address of the contract
42
40
  * - entrypoint - the entrypoint of the contract
43
41
  * - calldata - (defaults to []) the calldata
44
42
  * - signature - (defaults to []) the signature
45
- * @param abi (optional) the abi of the contract for better displaying
43
+ * @param abis (optional) the abi of the contract for better displaying
46
44
  *
47
45
  * @returns response from addTransaction
48
46
  */
49
- execute(transactions: Call | Call[], abis?: Abi[], transactionsDetail?: InvocationsDetails): Promise<InvokeFunctionResponse>;
47
+ execute(calls: Call | Call[], abis?: Abi[], transactionsDetail?: InvocationsDetails): Promise<InvokeFunctionResponse>;
50
48
  /**
51
49
  * Sign an JSON object for off-chain usage with the starknet private key and return the signature
52
50
  * This adds a message prefix so it cant be interchanged with transactions
@@ -56,33 +54,4 @@ export declare class Account extends Provider implements AccountInterface {
56
54
  * @throws {Error} if the JSON object is not a valid JSON
57
55
  */
58
56
  signMessage(typedData: typedData.TypedData): Promise<Signature>;
59
- /**
60
- * Hash a JSON object with pederson hash and return the hash
61
- * This adds a message prefix so it cant be interchanged with transactions
62
- *
63
- * @param json - JSON object to be hashed
64
- * @returns the hash of the JSON object
65
- * @throws {Error} if the JSON object is not a valid JSON
66
- */
67
- hashMessage(typedData: typedData.TypedData): Promise<string>;
68
- /**
69
- * Verify a signature of a JSON object
70
- *
71
- * @param json - JSON object to be verified
72
- * @param signature - signature of the JSON object
73
- * @returns true if the signature is valid, false otherwise
74
- * @throws {Error} if the JSON object is not a valid JSON or the signature is not a valid signature
75
- */
76
- verifyMessage(typedData: typedData.TypedData, signature: Signature): Promise<boolean>;
77
- /**
78
- * Verify a signature of a given hash
79
- * @warning This method is not recommended, use verifyMessage instead
80
- *
81
- * @param hash - hash to be verified
82
- * @param signature - signature of the hash
83
- * @returns true if the signature is valid, false otherwise
84
- * @throws {Error} if the signature is not a valid signature
85
- */
86
- verifyMessageHash(hash: number.BigNumberish, signature: Signature): Promise<boolean>;
87
- getNonce(): Promise<string>;
88
57
  }
package/lib/account.js CHANGED
@@ -50,20 +50,20 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
50
50
  }
51
51
  };
52
52
  import cuid from "cuid";
53
- import { Provider, } from "starknet";
53
+ import { Account, defaultProvider, } from "starknet";
54
54
  import qs from 'query-string';
55
55
  import { Signer } from "./signer";
56
- var Account = /** @class */ (function (_super) {
57
- __extends(Account, _super);
58
- function Account(address, scopes, messenger, options) {
56
+ import { toBN } from "starknet/utils/number";
57
+ var CartridgeAccount = /** @class */ (function (_super) {
58
+ __extends(CartridgeAccount, _super);
59
+ function CartridgeAccount(address, scopes, messenger, options) {
59
60
  if (scopes === void 0) { scopes = []; }
60
- var _this = _super.call(this) || this;
61
- _this.url = "https://cartridge.gg";
61
+ var _this = _super.call(this, defaultProvider, address, new Signer(messenger, options)) || this;
62
+ _this.url = "https://x.cartridge.gg";
62
63
  _this._scopes = [];
63
64
  _this.address = address;
64
65
  _this.messenger = messenger;
65
66
  _this._scopes = scopes;
66
- _this.signer = new Signer(messenger, options);
67
67
  if (options === null || options === void 0 ? void 0 : options.url) {
68
68
  _this.url = options.url;
69
69
  }
@@ -79,7 +79,7 @@ var Account = /** @class */ (function (_super) {
79
79
  * @param abi the abi of the contract
80
80
  * @returns a confirmation of sending a transaction on the starknet contract
81
81
  */
82
- Account.prototype.deployContract = function (payload, abi) {
82
+ CartridgeAccount.prototype.deployContract = function (payload, abi) {
83
83
  return __awaiter(this, void 0, void 0, function () {
84
84
  var id, response;
85
85
  return __generator(this, function (_a) {
@@ -106,29 +106,43 @@ var Account = /** @class */ (function (_super) {
106
106
  });
107
107
  };
108
108
  /**
109
- * Estimate Fee for a method on starknet
110
- *
111
- * @param invocation the invocation object containing:
112
- * - contractAddress - the address of the contract
113
- * - entrypoint - the entrypoint of the contract
114
- * - calldata - (defaults to []) the calldata
115
- * - signature - (defaults to []) the signature
116
- *
117
- * @returns response from addTransaction
118
- */
119
- Account.prototype.estimateFee = function (invocation) {
109
+ * Estimate Fee for a method on starknet
110
+ *
111
+ * @param calls the invocation object containing:
112
+ * - contractAddress - the address of the contract
113
+ * - entrypoint - the entrypoint of the contract
114
+ * - calldata - (defaults to []) the calldata
115
+ * - signature - (defaults to []) the signature
116
+ *
117
+ * @returns response from addTransaction
118
+ */
119
+ CartridgeAccount.prototype.estimateFee = function (calls, _a) {
120
+ var _b = _a === void 0 ? {} : _a, providedNonce = _b.nonce, blockIdentifier = _b.blockIdentifier;
120
121
  return __awaiter(this, void 0, void 0, function () {
121
- var response;
122
- return __generator(this, function (_a) {
123
- switch (_a.label) {
124
- case 0: return [4 /*yield*/, this.messenger.send({
125
- method: "estimate-fee",
126
- params: {
127
- invocation: invocation,
128
- },
129
- })];
130
- case 1:
131
- response = _a.sent();
122
+ var nonce, _c, _d, response;
123
+ return __generator(this, function (_e) {
124
+ switch (_e.label) {
125
+ case 0:
126
+ _c = toBN;
127
+ if (!(providedNonce !== null && providedNonce !== void 0)) return [3 /*break*/, 1];
128
+ _d = providedNonce;
129
+ return [3 /*break*/, 3];
130
+ case 1: return [4 /*yield*/, this.getNonce()];
131
+ case 2:
132
+ _d = (_e.sent());
133
+ _e.label = 3;
134
+ case 3:
135
+ nonce = _c.apply(void 0, [_d]);
136
+ return [4 /*yield*/, this.messenger.send({
137
+ method: "estimate-fee",
138
+ params: {
139
+ calls: calls,
140
+ nonce: nonce,
141
+ blockIdentifier: blockIdentifier,
142
+ },
143
+ })];
144
+ case 4:
145
+ response = _e.sent();
132
146
  if (response.error) {
133
147
  throw new Error(response.error);
134
148
  }
@@ -140,24 +154,24 @@ var Account = /** @class */ (function (_super) {
140
154
  /**
141
155
  * Invoke execute function in account contract
142
156
  *
143
- * @param transactions the invocation object or an array of them, containing:
157
+ * @param calls the invocation object or an array of them, containing:
144
158
  * - contractAddress - the address of the contract
145
159
  * - entrypoint - the entrypoint of the contract
146
160
  * - calldata - (defaults to []) the calldata
147
161
  * - signature - (defaults to []) the signature
148
- * @param abi (optional) the abi of the contract for better displaying
162
+ * @param abis (optional) the abi of the contract for better displaying
149
163
  *
150
164
  * @returns response from addTransaction
151
165
  */
152
- Account.prototype.execute = function (transactions, abis, transactionsDetail) {
166
+ CartridgeAccount.prototype.execute = function (calls, abis, transactionsDetail) {
153
167
  return __awaiter(this, void 0, void 0, function () {
154
- var response, id, calls;
168
+ var response, id;
155
169
  return __generator(this, function (_a) {
156
170
  switch (_a.label) {
157
171
  case 0: return [4 /*yield*/, this.messenger.send({
158
172
  method: "execute",
159
173
  params: {
160
- transactions: transactions,
174
+ calls: calls,
161
175
  abis: abis,
162
176
  transactionsDetail: transactionsDetail,
163
177
  },
@@ -171,7 +185,6 @@ var Account = /** @class */ (function (_super) {
171
185
  throw new Error(response.error);
172
186
  }
173
187
  id = cuid();
174
- calls = Array.isArray(transactions) ? transactions : [transactions];
175
188
  window.open("".concat(this.url, "/execute?").concat(qs.stringify({
176
189
  id: id,
177
190
  origin: window.origin,
@@ -181,7 +194,7 @@ var Account = /** @class */ (function (_super) {
181
194
  method: "execute",
182
195
  params: {
183
196
  id: id,
184
- transactions: transactions,
197
+ calls: calls,
185
198
  abis: abis,
186
199
  transactionsDetail: transactionsDetail,
187
200
  },
@@ -204,7 +217,7 @@ var Account = /** @class */ (function (_super) {
204
217
  * @returns the signature of the JSON object
205
218
  * @throws {Error} if the JSON object is not a valid JSON
206
219
  */
207
- Account.prototype.signMessage = function (typedData) {
220
+ CartridgeAccount.prototype.signMessage = function (typedData) {
208
221
  return __awaiter(this, void 0, void 0, function () {
209
222
  var id, response;
210
223
  return __generator(this, function (_a) {
@@ -233,115 +246,7 @@ var Account = /** @class */ (function (_super) {
233
246
  });
234
247
  });
235
248
  };
236
- /**
237
- * Hash a JSON object with pederson hash and return the hash
238
- * This adds a message prefix so it cant be interchanged with transactions
239
- *
240
- * @param json - JSON object to be hashed
241
- * @returns the hash of the JSON object
242
- * @throws {Error} if the JSON object is not a valid JSON
243
- */
244
- Account.prototype.hashMessage = function (typedData) {
245
- return __awaiter(this, void 0, void 0, function () {
246
- var response;
247
- return __generator(this, function (_a) {
248
- switch (_a.label) {
249
- case 0: return [4 /*yield*/, this.messenger.send({
250
- method: "hash-message",
251
- params: {
252
- typedData: typedData,
253
- },
254
- })];
255
- case 1:
256
- response = _a.sent();
257
- if (response.error) {
258
- throw new Error(response.error);
259
- }
260
- return [2 /*return*/, response.result];
261
- }
262
- });
263
- });
264
- };
265
- /**
266
- * Verify a signature of a JSON object
267
- *
268
- * @param json - JSON object to be verified
269
- * @param signature - signature of the JSON object
270
- * @returns true if the signature is valid, false otherwise
271
- * @throws {Error} if the JSON object is not a valid JSON or the signature is not a valid signature
272
- */
273
- Account.prototype.verifyMessage = function (typedData, signature) {
274
- return __awaiter(this, void 0, void 0, function () {
275
- var response;
276
- return __generator(this, function (_a) {
277
- switch (_a.label) {
278
- case 0: return [4 /*yield*/, this.messenger.send({
279
- method: "verify-message",
280
- params: {
281
- typedData: typedData,
282
- signature: signature,
283
- },
284
- })];
285
- case 1:
286
- response = _a.sent();
287
- if (response.error) {
288
- throw new Error(response.error);
289
- }
290
- return [2 /*return*/, response.result];
291
- }
292
- });
293
- });
294
- };
295
- /**
296
- * Verify a signature of a given hash
297
- * @warning This method is not recommended, use verifyMessage instead
298
- *
299
- * @param hash - hash to be verified
300
- * @param signature - signature of the hash
301
- * @returns true if the signature is valid, false otherwise
302
- * @throws {Error} if the signature is not a valid signature
303
- */
304
- Account.prototype.verifyMessageHash = function (hash, signature) {
305
- return __awaiter(this, void 0, void 0, function () {
306
- var response;
307
- return __generator(this, function (_a) {
308
- switch (_a.label) {
309
- case 0: return [4 /*yield*/, this.messenger.send({
310
- method: "verify-message-hash",
311
- params: {
312
- hash: hash,
313
- signature: signature,
314
- },
315
- })];
316
- case 1:
317
- response = _a.sent();
318
- if (response.error) {
319
- throw new Error(response.error);
320
- }
321
- return [2 /*return*/, response.result];
322
- }
323
- });
324
- });
325
- };
326
- Account.prototype.getNonce = function () {
327
- return __awaiter(this, void 0, void 0, function () {
328
- var response;
329
- return __generator(this, function (_a) {
330
- switch (_a.label) {
331
- case 0: return [4 /*yield*/, this.messenger.send({
332
- method: "get-nonce",
333
- })];
334
- case 1:
335
- response = _a.sent();
336
- if (response.error) {
337
- throw new Error(response.error);
338
- }
339
- return [2 /*return*/, response.result];
340
- }
341
- });
342
- });
343
- };
344
- return Account;
345
- }(Provider));
346
- export { Account };
249
+ return CartridgeAccount;
250
+ }(Account));
251
+ export { CartridgeAccount };
347
252
  //# sourceMappingURL=account.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"account.js","sourceRoot":"","sources":["../src/account.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAUL,QAAQ,GAIT,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,MAAM,cAAc,CAAC;AAe9B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC;IAA6B,2BAAQ;IAQnC,iBACE,OAAe,EACf,MAAoB,EACpB,SAAoB,EACpB,OAEC;QAJD,uBAAA,EAAA,WAAoB;QAFtB,YAQE,iBAAO,SASR;QAtBO,SAAG,GAAW,sBAAsB,CAAC;QACrC,aAAO,GAAY,EAAE,CAAC;QAa5B,KAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,KAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,KAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,KAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;QAE5C,IAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,GAAG,EAAE;YAChB,KAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;SACxB;;IACH,CAA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KAAK,CAAC,QAAQ,CAAC,KAAe,CAAC,CAAC;yBAC3C;wBAED,sBAAO,QAAQ,CAAC,MAAO,EAAC;;;;KACzB;IACH,uBAAC;AAAD,CAAC,AAhMD,CAAsC,OAAO,GAgM5C"}
package/lib/index.d.ts CHANGED
@@ -6,7 +6,6 @@ export declare class Cartridge {
6
6
  private messenger?;
7
7
  private scopes;
8
8
  private url;
9
- private origin;
10
9
  private loading;
11
10
  private ready_;
12
11
  private account;
@@ -16,7 +15,8 @@ export declare class Cartridge {
16
15
  });
17
16
  ready(): Promise<boolean | undefined>;
18
17
  probe(): Promise<AccountInterface | undefined>;
19
- connect(): Promise<AccountInterface | undefined>;
18
+ connect(): Promise<AccountInterface | null>;
20
19
  }
21
- export { Message, Messenger };
20
+ export type { Message };
21
+ export { Messenger };
22
22
  export * from "./types";
package/lib/index.js CHANGED
@@ -35,7 +35,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
35
35
  }
36
36
  };
37
37
  import cuid from "cuid";
38
- import { Account } from "./account";
38
+ import { CartridgeAccount as Account } from "./account";
39
39
  import { Messenger } from "./messenger";
40
40
  import qs from "query-string";
41
41
  var Cartridge = /** @class */ (function () {
@@ -43,8 +43,7 @@ var Cartridge = /** @class */ (function () {
43
43
  var _this = this;
44
44
  this.selector = "cartridge-messenger";
45
45
  this.scopes = [];
46
- this.url = "https://cartridge.gg";
47
- this.origin = "https://cartridge.gg";
46
+ this.url = "https://x.cartridge.gg";
48
47
  this.loading = true;
49
48
  if (scopes) {
50
49
  this.scopes = scopes;
@@ -52,9 +51,6 @@ var Cartridge = /** @class */ (function () {
52
51
  if (options === null || options === void 0 ? void 0 : options.url) {
53
52
  this.url = options.url;
54
53
  }
55
- if (options === null || options === void 0 ? void 0 : options.origin) {
56
- this.origin = options.origin;
57
- }
58
54
  if (typeof document !== "undefined") {
59
55
  this.ready_ = new Promise(function (resolve, reject) {
60
56
  window.addEventListener("message", function (e) { return __awaiter(_this, void 0, void 0, function () {
@@ -79,13 +75,13 @@ var Cartridge = /** @class */ (function () {
79
75
  var iframe = document.getElementById(this.selector);
80
76
  if (!!iframe) {
81
77
  if (!this.messenger) {
82
- this.messenger = new Messenger(iframe.contentWindow, this.origin);
78
+ this.messenger = new Messenger(iframe.contentWindow, this.url);
83
79
  }
84
80
  }
85
81
  else {
86
82
  iframe = document.createElement("iframe");
87
83
  iframe.id = this.selector;
88
- iframe.src = "".concat(this.url, "/iframe");
84
+ iframe.src = "".concat(this.url);
89
85
  iframe.style.opacity = "0";
90
86
  iframe.style.height = "0";
91
87
  iframe.style.width = "0";
@@ -95,7 +91,7 @@ var Cartridge = /** @class */ (function () {
95
91
  iframe.sandbox.add("allow-storage-access-by-user-activation");
96
92
  }
97
93
  document.body.appendChild(iframe);
98
- this.messenger = new Messenger(iframe.contentWindow, this.origin);
94
+ this.messenger = new Messenger(iframe.contentWindow, this.url);
99
95
  }
100
96
  }
101
97
  }
@@ -167,7 +163,7 @@ var Cartridge = /** @class */ (function () {
167
163
  response = _b.sent();
168
164
  if (!this.messenger || !response || response.error || !response.result) {
169
165
  console.error("not ready for connect");
170
- return [2 /*return*/];
166
+ return [2 /*return*/, null];
171
167
  }
172
168
  this.account = new Account(response.result.address, response.result.scopes, this.messenger, {
173
169
  url: this.url,
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAW,SAAS,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,EAAE,MAAM,cAAc,CAAC;AAG9B;IAUE,mBACE,MAAgB,EAChB,OAGC;QALH,iBA0DC;QAnEO,aAAQ,GAAG,qBAAqB,CAAC;QAEjC,WAAM,GAAY,EAAE,CAAC;QACrB,QAAG,GAAW,sB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
package/lib/messenger.js CHANGED
@@ -12,7 +12,7 @@ var __assign = (this && this.__assign) || function () {
12
12
  import cuid from "cuid";
13
13
  var Messenger = /** @class */ (function () {
14
14
  function Messenger(target, origin) {
15
- if (origin === void 0) { origin = "https://cartridge.gg"; }
15
+ if (origin === void 0) { origin = "https://x.cartridge.gg"; }
16
16
  var _this = this;
17
17
  this.pending = [];
18
18
  this.defaultHandler = function (e) {
@@ -1 +1 @@
1
- {"version":3,"file":"messenger.js","sourceRoot":"","sources":["../src/messenger.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,IAAI,MAAM,MAAM,CAAC;AASxB;IAcE,mBAAY,MAAqB,EAAE,MAAuC;QAAvC,uBAAA,EAAA,+BAAuC;QAA1E,iBAYC;QAvBO,YAAO,GAAqC,EAAE,CAAA;QAE9C,mBAAc,GAAG,UAAC,CAAiC;YACzD,IACE,CAAC,CAAC,IAAI,CAAC,MAAM,KAAK,WAAW;gBAC7B,CAAC,CAAC,IAAI,CAAC,IAAI,KAAK,SAAS,EACzB;gBACA,KAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;aACrB;QACH,CAAC,CAAA;QAGC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QAErB,IACE,OAAO,QAAQ,KAAK,WAAW;YAC/B,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,KAAK,MAAM,EAClD;YACA,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;SACjD;QAED,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,CAAC,CAAA;IACzD,CAAC;IAED,6BAAS,GAAT,UACE,EAAmE;QAEnE,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,CAAC,CAAA;QAE1D,IAAM,UAAU,GAAG,UAAC,EAIa;gB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EAAE,CAAC,OAAkB,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;aACvC;QACH,CAAC,CACF,CAAC;IACJ,CAAC;IAED,wBAAI,GAAJ,UAAmB,OAAgB;QACjC,IAAM,EAAE,GAAG,IAAI,EAAE,CAAC;QAClB,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YAChB,MAAM,IAAI,KAAK,CAAC,WAAW,CAAC,CAAC;SAC9B;QAED,IAAI,CAAC,MAAM,CAAC,WAAW,CACrB;YACE,EAAE,IAAA;YACF,MAAM,EAAE,WAAW;YACnB,IAAI,EAAE,SAAS;YACf,OAAO,aACL,MAAM,EAAE,MAAM,CAAC,MAAM,IAClB,OAAO,CACX;SACF,EACD,IAAI,CAAC,MAAM,CACZ,CAAC;QAEF,OAAO,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;YACjC,IAAM,OAAO,GAAG,UAAC,EAAkC;oBAAhC,IAAI,UAAA;gBACrB,IACE,IAAI,CAAC,MAAM,KAAK,WAAW;oBAC3B,IAAI,CAAC,IAAI,KAAK,UAAU;oBACxB,EAAE,KAAK,IAAI,CAAC,EAAE,EACd;oBACA,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;oBACtB,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;iBAChD;YACH,CAAC,CAAC;YACF,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QAC9C,CAAC,CAAC,CAAC;IACL,CAAC;IACH,gBAAC;AAAD,CAAC,AAhHD,IAgHC"}
@@ -0,0 +1 @@
1
+ {"program":{"fileNames":["../node_modules/typescript/lib/lib.d.ts","../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/typescript/lib/lib.es2020.d.ts","../node_modules/typescript/lib/lib.dom.d.ts","../node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../node_modules/typescript/lib/lib.scripthost.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/typescript/lib/lib.es2020.date.d.ts","../node_modules/typescript/lib/lib.es2020.promise.d.ts","../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2020.string.d.ts","../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2020.intl.d.ts","../node_modules/typescript/lib/lib.es2020.number.d.ts","../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/cuid/index.d.ts","../../node_modules/starknet/dist/utils/encode.d.ts","../../node_modules/starknet/dist/constants.d.ts","../../node_modules/starknet/dist/utils/number.d.ts","../../node_modules/starknet/dist/types/lib.d.ts","../../node_modules/starknet/dist/provider/utils.d.ts","../../node_modules/starknet/dist/types/api/openrpc.d.ts","../../node_modules/starknet/dist/types/api/rpc.d.ts","../../node_modules/starknet/dist/types/provider.d.ts","../../node_modules/starknet/dist/types/api/sequencer.d.ts","../../node_modules/starknet/dist/types/api/index.d.ts","../../node_modules/starknet/dist/types/signer.d.ts","../../node_modules/starknet/dist/types/contract.d.ts","../../node_modules/starknet/dist/types/account.d.ts","../../node_modules/starknet/dist/types/index.d.ts","../../node_modules/starknet/dist/provider/interface.d.ts","../../node_modules/starknet/dist/provider/rpc.d.ts","../../node_modules/starknet/dist/provider/sequencer.d.ts","../../node_modules/starknet/dist/provider/default.d.ts","../../node_modules/ts-custom-error/dist/custom-error.d.ts","../../node_modules/starknet/dist/provider/errors.d.ts","../../node_modules/starknet/dist/provider/index.d.ts","../../node_modules/starknet/dist/utils/typeddata/types.d.ts","../../node_modules/starknet/dist/utils/typeddata/index.d.ts","../../node_modules/starknet/dist/signer/interface.d.ts","../../node_modules/starknet/dist/signer/default.d.ts","../../node_modules/starknet/dist/signer/index.d.ts","../../node_modules/starknet/dist/account/interface.d.ts","../../node_modules/starknet/dist/account/default.d.ts","../../node_modules/starknet/dist/account/index.d.ts","../../node_modules/starknet/dist/contract/interface.d.ts","../../node_modules/starknet/dist/contract/default.d.ts","../../node_modules/starknet/dist/contract/contractfactory.d.ts","../../node_modules/starknet/dist/contract/index.d.ts","../../node_modules/starknet/dist/utils/hash.d.ts","../../node_modules/starknet/dist/utils/json.d.ts","../../node_modules/starknet/dist/utils/transaction.d.ts","../../node_modules/starknet/dist/utils/stark.d.ts","../../node_modules/starknet/dist/utils/merkle.d.ts","../../node_modules/starknet/dist/utils/ellipticcurve.d.ts","../../node_modules/starknet/dist/utils/uint256.d.ts","../../node_modules/starknet/dist/utils/shortstring.d.ts","../../node_modules/starknet/dist/utils/address.d.ts","../../node_modules/starknet/dist/utils/url.d.ts","../../node_modules/starknet/dist/index.d.ts","../../node_modules/starknet/utils/number.d.ts","../../node_modules/starknet/types/lib.d.ts","../../node_modules/starknet/types/api/openrpc.d.ts","../../node_modules/starknet/types/api/rpc.d.ts","../../node_modules/starknet/types/provider.d.ts","../../node_modules/starknet/types/api/sequencer.d.ts","../../node_modules/starknet/types/api/index.d.ts","../../node_modules/starknet/utils/encode.d.ts","../../node_modules/starknet/constants.d.ts","../../node_modules/starknet/types/signer.d.ts","../../node_modules/starknet/types/contract.d.ts","../../node_modules/starknet/types/index.d.ts","../../node_modules/starknet/provider/utils.d.ts","../../node_modules/starknet/types/account.d.ts","../../node_modules/query-string/index.d.ts","../src/types.ts","../src/messenger.ts","../src/signer.ts","../src/account.ts","../src/index.ts","../../node_modules/fast-deep-equal/index.d.ts","../src/utils.ts","../../node_modules/@types/node/assert.d.ts","../../node_modules/@types/node/assert/strict.d.ts","../../node_modules/@types/node/globals.d.ts","../../node_modules/@types/node/async_hooks.d.ts","../../node_modules/@types/node/buffer.d.ts","../../node_modules/@types/node/child_process.d.ts","../../node_modules/@types/node/cluster.d.ts","../../node_modules/@types/node/console.d.ts","../../node_modules/@types/node/constants.d.ts","../../node_modules/@types/node/crypto.d.ts","../../node_modules/@types/node/dgram.d.ts","../../node_modules/@types/node/diagnostics_channel.d.ts","../../node_modules/@types/node/dns.d.ts","../../node_modules/@types/node/dns/promises.d.ts","../../node_modules/@types/node/domain.d.ts","../../node_modules/@types/node/events.d.ts","../../node_modules/@types/node/fs.d.ts","../../node_modules/@types/node/fs/promises.d.ts","../../node_modules/@types/node/http.d.ts","../../node_modules/@types/node/http2.d.ts","../../node_modules/@types/node/https.d.ts","../../node_modules/@types/node/inspector.d.ts","../../node_modules/@types/node/module.d.ts","../../node_modules/@types/node/net.d.ts","../../node_modules/@types/node/os.d.ts","../../node_modules/@types/node/path.d.ts","../../node_modules/@types/node/perf_hooks.d.ts","../../node_modules/@types/node/process.d.ts","../../node_modules/@types/node/punycode.d.ts","../../node_modules/@types/node/querystring.d.ts","../../node_modules/@types/node/readline.d.ts","../../node_modules/@types/node/repl.d.ts","../../node_modules/@types/node/stream.d.ts","../../node_modules/@types/node/stream/promises.d.ts","../../node_modules/@types/node/stream/consumers.d.ts","../../node_modules/@types/node/stream/web.d.ts","../../node_modules/@types/node/string_decoder.d.ts","../../node_modules/@types/node/timers.d.ts","../../node_modules/@types/node/timers/promises.d.ts","../../node_modules/@types/node/tls.d.ts","../../node_modules/@types/node/trace_events.d.ts","../../node_modules/@types/node/tty.d.ts","../../node_modules/@types/node/url.d.ts","../../node_modules/@types/node/util.d.ts","../../node_modules/@types/node/v8.d.ts","../../node_modules/@types/node/vm.d.ts","../../node_modules/@types/node/wasi.d.ts","../../node_modules/@types/node/worker_threads.d.ts","../../node_modules/@types/node/zlib.d.ts","../../node_modules/@types/node/globals.global.d.ts","../../node_modules/@types/node/index.d.ts","../../node_modules/base64url/dist/base64url.d.ts","../src/webauthn.ts","../../node_modules/@babel/types/lib/index.d.ts","../../node_modules/@types/babel__generator/index.d.ts","../../node_modules/@babel/parser/typings/babel-parser.d.ts","../../node_modules/@types/babel__template/index.d.ts","../../node_modules/@types/babel__traverse/index.d.ts","../../node_modules/@types/babel__core/index.d.ts","../../node_modules/@types/keyv/index.d.ts","../../node_modules/@types/http-cache-semantics/index.d.ts","../../node_modules/@types/responselike/index.d.ts","../../node_modules/@types/cacheable-request/index.d.ts","../../node_modules/@types/emscripten/index.d.ts","../../node_modules/@types/graceful-fs/index.d.ts","../../node_modules/ci-info/index.d.ts","../../node_modules/@types/is-ci/index.d.ts","../../node_modules/@types/istanbul-lib-coverage/index.d.ts","../../node_modules/@types/istanbul-lib-report/index.d.ts","../../node_modules/@types/istanbul-reports/index.d.ts","../../node_modules/jest-diff/build/cleanupsemantic.d.ts","../../node_modules/jest-diff/build/types.d.ts","../../node_modules/jest-diff/build/difflines.d.ts","../../node_modules/jest-diff/build/printdiffs.d.ts","../../node_modules/jest-diff/build/index.d.ts","../../node_modules/pretty-format/build/types.d.ts","../../node_modules/pretty-format/build/index.d.ts","../../node_modules/@types/jest/index.d.ts","../../node_modules/@types/js-cookie/index.d.ts","../../node_modules/@types/json5/index.d.ts","../../node_modules/@types/lodash/common/common.d.ts","../../node_modules/@types/lodash/common/array.d.ts","../../node_modules/@types/lodash/common/collection.d.ts","../../node_modules/@types/lodash/common/date.d.ts","../../node_modules/@types/lodash/common/function.d.ts","../../node_modules/@types/lodash/common/lang.d.ts","../../node_modules/@types/lodash/common/math.d.ts","../../node_modules/@types/lodash/common/number.d.ts","../../node_modules/@types/lodash/common/object.d.ts","../../node_modules/@types/lodash/common/seq.d.ts","../../node_modules/@types/lodash/common/string.d.ts","../../node_modules/@types/lodash/common/util.d.ts","../../node_modules/@types/lodash/index.d.ts","../../node_modules/@types/lodash.mergewith/index.d.ts","../../node_modules/@types/minimist/index.d.ts","../../node_modules/@types/normalize-package-data/index.d.ts","../../node_modules/@types/parse-json/index.d.ts","../../node_modules/@types/prettier/index.d.ts","../../node_modules/@types/prop-types/index.d.ts","../../node_modules/@types/react/global.d.ts","../../node_modules/csstype/index.d.ts","../../node_modules/@types/scheduler/tracing.d.ts","../../node_modules/@types/react/index.d.ts","../../node_modules/@types/react-dom/node_modules/@types/react/global.d.ts","../../node_modules/@types/react-dom/node_modules/@types/react/index.d.ts","../../node_modules/@types/react-dom/index.d.ts","../../node_modules/@types/scheduler/index.d.ts","../../node_modules/@types/semver/index.d.ts","../../node_modules/@types/stack-utils/index.d.ts","../../node_modules/@types/treeify/index.d.ts","../../node_modules/@types/yargs-parser/index.d.ts","../../node_modules/@types/yargs/index.d.ts"],"fileInfos":["2dc8c927c9c162a773c6bb3cdc4f3286c23f10eedc67414028f9cb5951610f60",{"version":"f20c05dbfe50a208301d2a1da37b9931bce0466eb5a1f4fe240971b4ecc82b67","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9",{"version":"9b087de7268e4efc5f215347a62656663933d63c0b1d7b624913240367b999ea","affectsGlobalScope":true},{"version":"7fac8cb5fc820bc2a59ae11ef1c5b38d3832c6d0dfaec5acdb5569137d09a481","affectsGlobalScope":true},{"version":"097a57355ded99c68e6df1b738990448e0bf170e606707df5a7c0481ff2427cd","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"55f400eec64d17e888e278f4def2f254b41b89515d3b88ad75d5e05f019daddd","affectsGlobalScope":true},{"version":"181f1784c6c10b751631b24ce60c7f78b20665db4550b335be179217bacc0d5f","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"775d9c9fd150d5de79e0450f35bc8b8f94ae64e3eb5da12725ff2a649dccc777","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},"4046592570718236ed274564f611f502ca4e9fce87e0e078e1f5905292a22b62","ca48a1e1060cffcfd8ecc1f92965ff05077673eabc967915eeed16d2a7de509c","5248132d2fbd87db7a48f417c3683a4bb9046f12a8bddb68af4574faa286357c","1350d708c0285d0db2c6646bae5e346df59d01ad376973099865684fd7e518dc","848830e3022521bcfcaac72ac5bdd97dc97f5f5822708ce94593fb847bfde21b","1db3d01527c2ce80b7c9dea27f296c62a548b55261531226aca90e44698b4e49","221909089b014c9a458cddd86933284ab472a7c192d77c42b4265ab3a83f5af0","bed4a354ee584414887d439eedb684748be0d031a431edcb7d9b23d03516a247","af8abfd9938e9b6b3fc2963898e79ca531d1d9e1713320a8b4bd313a6e905176","70932e40ea4cfa0da3e4f65685f18d9d69d083dc13d353e511f55457ca912dde","c09207ffe59f7e42610a595e036b42439079167c6b204fcb3f988eb14f973c52","09df7e0591cd077c7b3852db5f1d22e259190708a49db58b9453b9fd1c791493","41b85e2ae9e6693ec35d97fdaf40e1c8bbf3bcf8fa4e0d8f65cd5fc274fc5178","8125aa6a4b386f39dbaf3baa682dc82a6823560b6af478db6ecfe3eda1e2e80e","18329fb1bf0b5007e7e3fbde52b50ac32f41e561905c63366427a2c84fdd1ed1","9468242e8e5479d2de3129123ceb36a7286445069f3e87aa14b1b7ebfb0c51b7","f134e2cd12819dbd0ba82082969b56ba5dac259e0ab1bdd4f3c027aa450638cf","95d2b8873b068b99f13605f57be2dbad26037527d307f8ac6076b8a576037f39","3740c5afb5625668ca358a26902027e9686fd1792dbb0b4831afb0484469db57","79ba5dfa0abac7e3e7210eb2358f9e6117a46da02446cead1510f32c26eae02e","11e4c4acfac620baf36dfedfd718d206341b826177db889d9a43be8e6664115b","a86ed1d5af2993cd4590482156d02b5c65a085c8c8cf988742af77f99cc1fddd","09904e3035c1750f4d32b154f1a6e918de3c10f6832ae6c0e7552dc978d0b58c","80c2a5252c10e80e365e677352793ffd351ba727158d6cd27e9a696e372827c1","44b2402af682b6d58f0cb344092ae0229df30f7d2eaad060f6ab4abfba34796f","b127c14367688bddd09953b11147b6b612813a4eb2632e01f4063b005cc0e1f2","0ed9549430e664ef1937e951bd724ea2b4c5c18b0c9d5df8c7c4896dcbabde30","dbe86ccfa691d249250cfa28243f7c576c10d09c99bb6699af01015ad3b3a755","118ac5f02f6f266278c1367a62b55bd948b714cb730829ebdc14abbc8aa9eeba","1c2d63e8f0d1682ef743cba58b45e76daf43151e21a448cff9f458c4caf70149","86cfa44a1f7c1980155ead44d97c7eb861be223c8c43179e3edcc5d0a08f32a9","f2dacc93b262ba816bd55b627a107661399fa2f8606dfd8604e8b2715fa49e21","a3ef4d2ed756218072dc620abc9b063f29a0c61f4f61eee1f5b7a90a6365ab41","53ea14c2358f74f035193be11a7743127d83bb3eb4deeb91889bb22325047d3e","fa352a2d7789ff4c06290b2528d20512f189c0da808886230cec38b5fe108342","1e1841c4bde0b0675ac55b13b0335c79ae4d9eee11b977ec11c40c4196da17c4","92bd6f2ede006673136fa59417277f6143fdfa2e8945fc03a52413b9ec6e1755","555eea2ebabe6d92f190f97fd1d3417103ac80ab86ef306234a07cfdf228f854","2b831e5b0d5f2c32058aa5af469b040b73c63f0710b13cbf9a66b79aad41319a","55fbd67cd25e1ac16b908fbe281cf1f6775a769907d84f4b1e1b42d3bb54602a","4d095ff25697a97e23965e0a5c92942af8325acdbee4af3c447dca10ec0cbdd3","d472fb5521b99f836e8e5678c75b7b60dacc5d9f43a3339c9c3bb0d8b100dccf","206a7fd7ba9b1c8e058695b900f4902a37df6fd7a63015370e1598d418b02bcc","bd2946e1fca274e1e5f062f83dc27c911190aa6a5c3f4209efc0d0beb903bd90","522565c0052865a60b2328ccebf9cd2d5e56af16c42011d7d46cefec90bcae28","1350d708c0285d0db2c6646bae5e346df59d01ad376973099865684fd7e518dc","848830e3022521bcfcaac72ac5bdd97dc97f5f5822708ce94593fb847bfde21b","221909089b014c9a458cddd86933284ab472a7c192d77c42b4265ab3a83f5af0","bed4a354ee584414887d439eedb684748be0d031a431edcb7d9b23d03516a247","af8abfd9938e9b6b3fc2963898e79ca531d1d9e1713320a8b4bd313a6e905176","70932e40ea4cfa0da3e4f65685f18d9d69d083dc13d353e511f55457ca912dde","c09207ffe59f7e42610a595e036b42439079167c6b204fcb3f988eb14f973c52","ca48a1e1060cffcfd8ecc1f92965ff05077673eabc967915eeed16d2a7de509c","5248132d2fbd87db7a48f417c3683a4bb9046f12a8bddb68af4574faa286357c","09df7e0591cd077c7b3852db5f1d22e259190708a49db58b9453b9fd1c791493","41b85e2ae9e6693ec35d97fdaf40e1c8bbf3bcf8fa4e0d8f65cd5fc274fc5178","18329fb1bf0b5007e7e3fbde52b50ac32f41e561905c63366427a2c84fdd1ed1","1db3d01527c2ce80b7c9dea27f296c62a548b55261531226aca90e44698b4e49","8125aa6a4b386f39dbaf3baa682dc82a6823560b6af478db6ecfe3eda1e2e80e","27975250d16d95779140c1c2231e2f7b9d7764f4bb716b19880c01eeea715452",{"version":"093e49fa85e7bbbd97a84250d60c43066af0cd63d5e40c73a66528903a5ef967","signature":"2c020d5efb4dc790674f741fb2fca29a3662008e1fffce23d51ca662d5d5e56b"},{"version":"1cdb918dab41252429cba67fabaa7003ff6c875b1764bb13e2dffd69ded5fc3f","signature":"9f455277a4362940e292202bb3aed51268be4310b5dde15d0040bcfe92c5bd72"},{"version":"c524ec4a4acb50f00b80082abe10ff1164ad18d6344317edb81f4b5165ef6d27","signature":"8f22f31b5bbc207cb9265260bfa3cf94f7ed3994b033dec9d46422562cb16431"},{"version":"a09359ecf8974811eca6b6cf7a890ce661bd13e9810f50f4092825e89483001a","signature":"5db84d8d9a8a7260b6b3cbd1586970a2c6dcf4de1745ba6fbde3edb2c2f99abb"},{"version":"03e263d797f7021842597279a193836f4fb4445fc0d0953ae4fe14f6beceb147","signature":"65d9c1ec1326c3e56414d0ddcca801d366a2c59ed1f7f0b0ac25b0335f2c4568"},"37ffe3c12813b6a6d512f7c27b71f3388d03dafa10555ad5094cea393ed3d1f6",{"version":"267fee80b668921a70b3f0a3f1e97ae16b217847ddb012fd27eebf995577e67f","signature":"46ce1c74c6ee15c8beb721ff8503067a36758b2b8bf0a99e4790a163a0be29a9"},"0cba3a5d7b81356222594442753cf90dd2892e5ccfe1d262aaca6896ba6c1380","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"c2ab70bbc7a24c42a790890739dd8a0ba9d2e15038b40dff8163a97a5d148c00","affectsGlobalScope":true},"422dbb183fdced59425ca072c8bd09efaa77ce4e2ab928ec0d8a1ce062d2a45a",{"version":"712ba0d43b44d144dfd01593f61af6e2e21cfae83e834d297643e7973e55ed61","affectsGlobalScope":true},"1dab5ab6bcf11de47ab9db295df8c4f1d92ffa750e8f095e88c71ce4c3299628","f71f46ccd5a90566f0a37b25b23bc4684381ab2180bdf6733f4e6624474e1894",{"version":"54e65985a3ee3cec182e6a555e20974ea936fc8b8d1738c14e8ed8a42bd921d4","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","98a3ebfa494b46265634a73459050befba5da8fdc6ca0ef9b7269421780f4ff3","34e5de87d983bc6aefef8b17658556e3157003e8d9555d3cb098c6bef0b5fbc8","cc0b61316c4f37393f1f9595e93b673f4184e9d07f4c127165a490ec4a928668","f27371653aded82b2b160f7a7033fb4a5b1534b6f6081ef7be1468f0f15327d3","c762cd6754b13a461c54b59d0ae0ab7aeef3c292c6cf889873f786ee4d8e75c9","f4ea7d5df644785bd9fbf419930cbaec118f0d8b4160037d2339b8e23c059e79",{"version":"bfea28e6162ed21a0aeed181b623dcf250aa79abf49e24a6b7e012655af36d81","affectsGlobalScope":true},"b8aca9d0c81abb02bec9b7621983ae65bde71da6727580070602bd2500a9ce2a","ae97e20f2e10dbeec193d6a2f9cd9a367a1e293e7d6b33b68bacea166afd7792","10d4796a130577d57003a77b95d8723530bbec84718e364aa2129fa8ffba0378","ad41bb744149e92adb06eb953da195115620a3f2ad48e7d3ae04d10762dae197","bf73c576885408d4a176f44a9035d798827cc5020d58284cb18d7573430d9022","7ae078ca42a670445ae0c6a97c029cb83d143d62abd1730efb33f68f0b2c0e82",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"5d0a9ea09d990b5788f867f1c79d4878f86f7384cb7dab38eecbf22f9efd063d","12eea70b5e11e924bb0543aea5eadc16ced318aa26001b453b0d561c2fd0bd1e","08777cd9318d294646b121838574e1dd7acbb22c21a03df84e1f2c87b1ad47f2","08a90bcdc717df3d50a2ce178d966a8c353fd23e5c392fd3594a6e39d9bb6304",{"version":"4cd4cff679c9b3d9239fd7bf70293ca4594583767526916af8e5d5a47d0219c7","affectsGlobalScope":true},"2a12d2da5ac4c4979401a3f6eaafa874747a37c365e4bc18aa2b171ae134d21b","002b837927b53f3714308ecd96f72ee8a053b8aeb28213d8ec6de23ed1608b66","1dc9c847473bb47279e398b22c740c83ea37a5c88bf66629666e3cf4c5b9f99c","a9e4a5a24bf2c44de4c98274975a1a705a0abbaad04df3557c2d3cd8b1727949","00fa7ce8bc8acc560dc341bbfdf37840a8c59e6a67c9bfa3fa5f36254df35db2","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"806ef4cac3b3d9fa4a48d849c8e084d7c72fcd7b16d76e06049a9ed742ff79c0","affectsGlobalScope":true},"44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","5f0ed51db151c2cdc4fa3bb0f44ce6066912ad001b607a34e65a96c52eb76248",{"version":"3345c276cab0e76dda86c0fb79104ff915a4580ba0f3e440870e183b1baec476","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","103d70bfbeb3cd3a3f26d1705bf986322d8738c2c143f38ebb743b1e228d7444","f52fbf64c7e480271a9096763c4882d356b05cab05bf56a64e68a95313cd2ce2","59bdb65f28d7ce52ccfc906e9aaf422f8b8534b2d21c32a27d7819be5ad81df7",{"version":"3a2da34079a2567161c1359316a32e712404b56566c45332ac9dcee015ecce9f","affectsGlobalScope":true},"28a2e7383fd898c386ffdcacedf0ec0845e5d1a86b5a43f25b86bc315f556b79","3aff9c8c36192e46a84afe7b926136d520487155154ab9ba982a8b544ea8fc95","a880cf8d85af2e4189c709b0fea613741649c0e40fffb4360ec70762563d5de0","85bbf436a15bbeda4db888be3062d47f99c66fd05d7c50f0f6473a9151b6a070","9f9c49c95ecd25e0cb2587751925976cf64fd184714cb11e213749c80cf0f927","f0c75c08a71f9212c93a719a25fb0320d53f2e50ca89a812640e08f8ad8c408c",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"9cafe917bf667f1027b2bb62e2de454ecd2119c80873ad76fc41d941089753b8","946d667bb57e1a5c8850161b3980a11b616ab4f1914d9b4ba71791bda1d195a5",{"version":"ecff2bcce9928284e20bea2783b6c98ab5e60992e05ebff93aa9a6732e3a07dc","signature":"b9a263293fafb63954f10377d9a94223c648878dc6a771639a32d843adf74c57"},"2ff9995137f3e5d68971388ec58af0c79721626323884513f9f5e2e996ac1fdd","cc957354aa3c94c9961ebf46282cfde1e81d107fc5785a61f62c67f1dd3ac2eb","1a7cc144992d79b062c22ac0309c6624dbb0d49bbddff7ea3b9daa0c17bcac0a","93de1c6dab503f053efe8d304cb522bb3a89feab8c98f307a674a4fae04773e9","3b043cf9a81854a72963fdb57d1884fc4da1cf5be69b5e0a4c5b751e58cb6d88","5426e62886b7be7806312d31a00e8f7dccd6fe63ba9bbefe99ee2eab29cc48a3","fec943fdb3275eb6e006b35e04a8e2e99e9adf3f4b969ddf15315ac7575a93e4","cab425b5559edac18327eb2c3c0f47e7e9f71b667290b7689faafd28aac69eae","3cfb0cb51cc2c2e1b313d7c4df04dbf7e5bda0a133c6b309bf6af77cf614b971","f992cd6cc0bcbaa4e6c810468c90f2d8595f8c6c3cf050c806397d3de8585562",{"version":"82fcf338bc21711d93d65f981a7182f9942d3ac1f268c4480537c9b62c89d10d","affectsGlobalScope":true},"3ebae8c00411116a66fca65b08228ea0cf0b72724701f9b854442100aab55aba","913754f9281683f22d98d0ba7796896cee30c302baefa3dda69f61af8de244d8","a3e5b8b86e7bd38d9afdc294875c4445c535319e288d3a13c1e2e41f9af934f2","8b06ac3faeacb8484d84ddb44571d8f410697f98d7bfa86c0fda60373a9f5215","7eb06594824ada538b1d8b48c3925a83e7db792f47a081a62cf3e5c4e23cf0ee","f5638f7c2f12a9a1a57b5c41b3c1ea7db3876c003bab68e6a57afd6bcc169af0","d8aab31ba8e618cc3eea10b0945de81cb93b7e8150a013a482332263b9305322","69da61a7b5093dac77fa3bec8be95dcf9a74c95a0e9161edb98bb24e30e439d2","561eca7a381b96d6ccac6e4061e6d2ae53f5bc44203f3fd9f5b26864c32ae6e9","62ea38627e3ebab429f7616812a9394d327c2bc271003dfba985de9b4137369f","b4439890c168d646357928431100daac5cbdee1d345a34e6bf6eca9f3abe22bc","5d72971a459517c44c1379dab9ed248e87a61ba0a1e0f25c9d67e1e640cd9a09","02d734976af36f4273d930bea88b3e62adf6b078cf120c1c63d49aa8d8427c5c",{"version":"516a426e3960379f310107635b8f3a7e8c307c6c665080b128039d9299ec4087","affectsGlobalScope":true},"15418e0b2cb1655d7503fd57bd55d761764d9d1d5b7c4941bf8bca0e3831a921","96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538","675e702f2032766a91eeadee64f51014c64688525da99dccd8178f0c599f13a8","fe4a2042d087990ebfc7dc0142d5aaf5a152e4baea86b45f283f103ec1e871ea","d70c026dd2eeaa974f430ea229230a1897fdb897dc74659deebe2afd4feeb08f","187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","febf0b2de54781102b00f61653b21377390a048fbf5262718c91860d11ff34a6","6702a1cd8818cb22ee95c85dcf2c31c117bde892e1afd2bc254bd720f4c6263c","0aaef8cded245bf5036a7a40b65622dd6c4da71f7a35343112edbe112b348a1e","00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","7a79ca84e4370ed2e1afaa99ff7d25194901916b7672e977d16f77af3b71342f","3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd","3cf0d343c2276842a5b617f22ba82af6322c7cfe8bb52238ffc0c491a3c21019","df996e25faa505f85aeb294d15ebe61b399cf1d1e49959cdfaf2cc0815c203f9",{"version":"f2eff8704452659641164876c1ef0df4174659ce7311b0665798ea3f556fa9ad","affectsGlobalScope":true},"68b7968bfe692bb273debb1d38ed534b695f8b387d36b7b7a75a81b03f8bf238","209e814e8e71aec74f69686a9506dd7610b97ab59dcee9446266446f72a76d05","6fa0008bf91a4cc9c8963bace4bba0bd6865cbfa29c3e3ccc461155660fb113a","2b8264b2fefd7367e0f20e2c04eed5d3038831fe00f5efbc110ff0131aab899b","6209c901f30cc321f4b86800d11fad3d67e73a3308f19946b1bc642af0280298","f7b46d22a307739c145e5fddf537818038fdfffd580d79ed717f4d4d37249380",{"version":"bbdf156fea2fabed31a569445835aeedcc33643d404fcbaa54541f06c109df3f","affectsGlobalScope":true},"ea0aa24a32c073b8639aa1f3130ba0add0f0f2f76b314d9ba988a5cb91d7e3c4","f5a8b384f182b3851cec3596ccc96cb7464f8d3469f48c74bf2befb782a19de5",{"version":"5917af4ff931b050dba49a1dedd9c00f15f7b3dc4345ad8491bfacd2ec68ed32","affectsGlobalScope":true},{"version":"bbdf156fea2fabed31a569445835aeedcc33643d404fcbaa54541f06c109df3f","affectsGlobalScope":true},{"version":"78e92f26901faf513581b3db36496e55a25e24ba3e60aa3ab9d48185452a3ab1","affectsGlobalScope":true},"e4dd91dd4789a109aab51d8a0569a282369fcda9ba6f2b2297bc61bacfb1a042","74b0245c42990ed8a849df955db3f4362c81b13f799ebc981b7bec2d5b414a57","87352bb579421f6938177a53bb66e8514067b4872ccaa5fe08ddbca56364570c","b0d10e46cfe3f6c476b69af02eaa38e4ccc7430221ce3109ae84bb9fb8282298","e2c3fb7ba470548053dabb65521b89846fffad3a103ddc72b5115d8caa23ce8e","70e9a18da08294f75bf23e46c7d69e67634c0765d355887b9b41f0d959e1426e","09c4b2e2d3070239d563fc690f0cc5db04a2d9b66a23e61aef8b5274e3e9910c"],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"esModuleInterop":true,"module":99,"outDir":"./","skipLibCheck":true,"sourceMap":true,"strict":true,"target":1},"fileIdsList":[[155],[45,89,103,104,105,106,107,155],[45,89,104,105,106,108,155],[45,105,155],[45,89,104,105,106,155],[48,89,103,155],[105,110,155],[89,90,155,163],[155,165],[155,165,166,167,168,169],[155,165,167],[127,130,154,155,162,171,172,173],[128,155,162],[155,177],[155,179],[155,180],[155,186,188],[127,155,162],[155,204],[155,192,194,195,196,197,198,199,200,201,202,203,204],[155,192,193,195,196,197,198,199,200,201,202,203,204],[155,193,194,195,196,197,198,199,200,201,202,203,204],[155,192,193,194,196,197,198,199,200,201,202,203,204],[155,192,193,194,195,197,198,199,200,201,202,203,204],[155,192,193,194,195,196,198,199,200,201,202,203,204],[155,192,193,194,195,196,197,199,200,201,202,203,204],[155,192,193,194,195,196,197,198,200,201,202,203,204],[155,192,193,194,195,196,197,198,199,201,202,203,204],[155,192,193,194,195,196,197,198,199,200,202,203,204],[155,192,193,194,195,196,197,198,199,200,201,203,204],[155,192,193,194,195,196,197,198,199,200,201,202,204],[155,192,193,194,195,196,197,198,199,200,201,202,203],[112,155],[115,155],[116,121,155],[117,127,128,135,144,154,155],[117,118,127,135,155],[119,155],[120,121,128,136,155],[121,144,151,155],[122,124,127,135,155],[123,155],[124,125,155],[126,127,155],[127,155],[127,128,129,144,154,155],[127,128,129,144,155],[130,135,144,154,155],[127,128,130,131,135,144,151,154,155],[130,132,144,151,154,155],[112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161],[127,133,155],[134,154,155],[124,127,135,144,155],[136,155],[137,155],[115,138,155],[139,153,155,159],[140,155],[141,155],[127,142,155],[142,143,155,157],[127,144,145,146,155],[144,146,155],[144,145,155],[147,155],[148,155],[127,149,150,155],[149,150,155],[121,135,144,151,155],[152,155],[135,153,155],[116,130,141,154,155],[121,155],[144,155,156],[155,157],[155,158],[116,121,127,129,138,144,154,155,157,159],[144,155,160],[155,216],[155,210,212,213,215],[155,210,211,212,213],[130,144,155,162],[155,222],[155,162],[155,182,183],[155,182,183,184,185],[155,187],[97,155],[48,50,58,59,63,66,68,71,72,155],[72,73,155],[48,50,59,66,67,71,155],[46,155],[59,66,74,76,155],[48,50,59,66,74,75,155],[75,76,77,155],[50,59,66,74,155],[46,47,48,59,66,68,71,74,78,79,80,81,82,83,84,85,86,87,88,155],[47,48,50,59,60,61,62,155],[64,155],[60,61,62,63,65,155],[47,48,50,59,155],[47,48,50,55,59,60,155],[48,59,155],[59,68,69,155],[69,70,155],[59,68,155],[48,50,53,155],[48,49,52,54,155],[51,155],[48,49,50,53,155],[49,53,55,56,57,58,155],[48,155],[49,52,155],[47,49,155],[47,48,49,155],[48,67,155],[90,101,155],[90,94,102,155],[90,91,93,95,155],[92,155],[90,91,94,102,155],[91,94,96,99,100,103,155],[90,155],[91,93,155],[91,98,155],[89,105,106],[105],[89,106],[48,89,103],[89]],"referencedMap":[[1,1],[9,1],[13,1],[12,1],[3,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[20,1],[21,1],[4,1],[5,1],[25,1],[22,1],[23,1],[24,1],[26,1],[27,1],[28,1],[6,1],[29,1],[30,1],[31,1],[32,1],[7,1],[33,1],[34,1],[35,1],[36,1],[8,1],[37,1],[42,1],[43,1],[38,1],[39,1],[40,1],[41,1],[2,1],[44,1],[11,1],[10,1],[108,2],[109,3],[106,4],[107,5],[105,6],[111,7],[164,8],[167,9],[165,1],[170,10],[166,9],[168,11],[169,9],[174,12],[175,1],[176,13],[172,1],[178,14],[179,1],[180,15],[181,16],[189,17],[190,1],[191,1],[171,18],[205,19],[193,20],[194,21],[192,22],[195,23],[196,24],[197,25],[198,26],[199,27],[200,28],[201,29],[202,30],[203,31],[204,32],[206,1],[112,33],[113,33],[115,34],[116,35],[117,36],[118,37],[119,38],[120,39],[121,40],[122,41],[123,42],[124,43],[125,43],[126,44],[127,45],[128,46],[129,47],[114,1],[161,1],[130,48],[131,49],[132,50],[162,51],[133,52],[134,53],[135,54],[136,55],[137,56],[138,57],[139,58],[140,59],[141,60],[142,61],[143,62],[144,63],[146,64],[145,65],[147,66],[148,67],[149,68],[150,69],[151,70],[152,71],[153,72],[154,73],[155,74],[156,75],[157,76],[158,77],[159,78],[160,79],[207,1],[208,1],[209,1],[210,1],[217,80],[215,1],[216,81],[211,1],[214,82],[173,83],[218,1],[213,1],[219,1],[220,1],[221,1],[222,1],[223,84],[163,85],[177,1],[212,1],[45,1],[110,1],[182,1],[184,86],[186,87],[185,86],[183,1],[188,88],[187,1],[104,1],[98,89],[73,90],[74,91],[72,92],[47,93],[77,94],[76,95],[78,96],[75,97],[89,98],[63,99],[65,100],[66,101],[60,102],[61,103],[62,103],[50,104],[70,105],[71,106],[69,107],[58,108],[55,109],[51,1],[52,110],[54,111],[57,1],[59,112],[49,113],[53,114],[56,115],[87,113],[84,104],[46,1],[79,116],[80,1],[83,1],[48,1],[86,1],[82,104],[81,104],[68,117],[67,1],[85,113],[88,1],[102,118],[103,119],[96,120],[92,1],[93,121],[95,122],[100,1],[101,123],[91,124],[94,125],[99,126],[97,1],[90,1],[64,1]],"exportedModulesMap":[[1,1],[9,1],[13,1],[12,1],[3,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[20,1],[21,1],[4,1],[5,1],[25,1],[22,1],[23,1],[24,1],[26,1],[27,1],[28,1],[6,1],[29,1],[30,1],[31,1],[32,1],[7,1],[33,1],[34,1],[35,1],[36,1],[8,1],[37,1],[42,1],[43,1],[38,1],[39,1],[40,1],[41,1],[2,1],[44,1],[11,1],[10,1],[108,127],[109,127],[106,128],[107,129],[105,130],[111,128],[164,131],[167,9],[165,1],[170,10],[166,9],[168,11],[169,9],[174,12],[175,1],[176,13],[172,1],[178,14],[179,1],[180,15],[181,16],[189,17],[190,1],[191,1],[171,18],[205,19],[193,20],[194,21],[192,22],[195,23],[196,24],[197,25],[198,26],[199,27],[200,28],[201,29],[202,30],[203,31],[204,32],[206,1],[112,33],[113,33],[115,34],[116,35],[117,36],[118,37],[119,38],[120,39],[121,40],[122,41],[123,42],[124,43],[125,43],[126,44],[127,45],[128,46],[129,47],[114,1],[161,1],[130,48],[131,49],[132,50],[162,51],[133,52],[134,53],[135,54],[136,55],[137,56],[138,57],[139,58],[140,59],[141,60],[142,61],[143,62],[144,63],[146,64],[145,65],[147,66],[148,67],[149,68],[150,69],[151,70],[152,71],[153,72],[154,73],[155,74],[156,75],[157,76],[158,77],[159,78],[160,79],[207,1],[208,1],[209,1],[210,1],[217,80],[215,1],[216,81],[211,1],[214,82],[173,83],[218,1],[213,1],[219,1],[220,1],[221,1],[222,1],[223,84],[163,85],[177,1],[212,1],[45,1],[110,1],[182,1],[184,86],[186,87],[185,86],[183,1],[188,88],[187,1],[104,1],[98,89],[73,90],[74,91],[72,92],[47,93],[77,94],[76,95],[78,96],[75,97],[89,98],[63,99],[65,100],[66,101],[60,102],[61,103],[62,103],[50,104],[70,105],[71,106],[69,107],[58,108],[55,109],[51,1],[52,110],[54,111],[57,1],[59,112],[49,113],[53,114],[56,115],[87,113],[84,104],[46,1],[79,116],[80,1],[83,1],[48,1],[86,1],[82,104],[81,104],[68,117],[67,1],[85,113],[88,1],[102,118],[103,119],[96,120],[92,1],[93,121],[95,122],[100,1],[101,123],[91,124],[94,125],[99,126],[97,1],[90,1],[64,1]],"semanticDiagnosticsPerFile":[1,9,13,12,3,14,15,16,17,18,19,20,21,4,5,25,22,23,24,26,27,28,6,29,30,31,32,7,33,34,35,36,8,37,42,43,38,39,40,41,2,44,11,10,108,109,106,107,105,111,164,167,165,170,166,168,169,174,175,176,172,178,179,180,181,189,190,191,171,205,193,194,192,195,196,197,198,199,200,201,202,203,204,206,112,113,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,114,161,130,131,132,162,133,134,135,136,137,138,139,140,141,142,143,144,146,145,147,148,149,150,151,152,153,154,155,156,157,158,159,160,207,208,209,210,217,215,216,211,214,173,218,213,219,220,221,222,223,163,177,212,45,110,182,184,186,185,183,188,187,104,98,73,74,72,47,77,76,78,75,89,63,65,66,60,61,62,50,70,71,69,58,55,51,52,54,57,59,49,53,56,87,84,46,79,80,83,48,86,82,81,68,67,85,88,102,103,96,92,93,95,100,101,91,94,99,97,90,64],"latestChangedDtsFile":"./src/webauthn.d.ts"},"version":"4.8.2"}
package/lib/types.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- import { DeployContractPayload, DeployContractResponse as StarknetDeployContractResponse, Abi, Call, InvocationsDetails, typedData, InvokeFunctionResponse, Signature, Invocation } from "starknet";
1
+ import { DeployContractPayload, DeployContractResponse as StarknetDeployContractResponse, Abi, Call, InvocationsDetails, typedData, InvokeFunctionResponse, Signature } from "starknet";
2
2
  import { BigNumberish } from "starknet/dist/utils/number";
3
+ import { BlockIdentifier } from "starknet/provider/utils";
3
4
  import { EstimateFee } from "starknet/types/account";
4
5
  export declare type Approvals = {
5
6
  [origin: string]: {
@@ -51,7 +52,9 @@ export interface DeployContractResponse extends RawResponse {
51
52
  export interface EstimateFeeRequest extends RawRequest {
52
53
  method: "estimate-fee";
53
54
  params: {
54
- invocation: Invocation;
55
+ calls: Call | Call[];
56
+ nonce: BigNumberish;
57
+ blockIdentifier?: BlockIdentifier;
55
58
  };
56
59
  }
57
60
  export interface EstimateFeeResponse extends RawResponse {
@@ -62,7 +65,7 @@ export interface ExecuteRequest extends RawRequest {
62
65
  method: "execute";
63
66
  params: {
64
67
  id?: string;
65
- transactions: Call | Call[];
68
+ calls: Call | Call[];
66
69
  abis?: Abi[];
67
70
  transactionsDetail?: InvocationsDetails;
68
71
  };
@@ -76,7 +79,7 @@ export interface SignTransactionRequest extends RawRequest {
76
79
  method: "sign-transaction";
77
80
  params: {
78
81
  id: string;
79
- transactions: Call | Call[];
82
+ calls: Call | Call[];
80
83
  abis?: Abi[];
81
84
  transactionsDetail?: InvocationsDetails;
82
85
  };
@@ -97,53 +100,27 @@ export interface SignMessageResponse extends RawResponse {
97
100
  method: "sign-message";
98
101
  result?: Signature;
99
102
  }
100
- export interface HashMessageRequest extends RawRequest {
101
- method: "hash-message";
103
+ export interface RegisterRequest extends RawRequest {
104
+ method: "register";
102
105
  params: {
103
- typedData: typedData.TypedData;
106
+ username: string;
107
+ address: string;
104
108
  };
105
109
  }
106
- export interface HashMessageResponse extends RawResponse {
107
- method: "hash-message";
108
- result?: string;
109
- }
110
- export interface VerifyMessageRequest extends RawRequest {
111
- method: "verify-message";
112
- params: {
113
- typedData: typedData.TypedData;
114
- signature: Signature;
110
+ export interface RegisterResponse extends RawResponse {
111
+ method: "register";
112
+ result: {
113
+ publicKey: string;
115
114
  };
116
115
  }
117
- export interface VerifyMessageResponse extends RawResponse {
118
- method: "verify-message";
119
- result?: boolean;
120
- }
121
- export interface VerifyMessageHashRequest extends RawRequest {
122
- method: "verify-message-hash";
123
- params: {
124
- hash: BigNumberish;
125
- signature: Signature;
126
- };
127
- }
128
- export interface VerifyMessageHashResponse extends RawResponse {
129
- method: "verify-message-hash";
130
- result?: boolean;
131
- }
132
- export interface GetNonceRequest extends RawRequest {
133
- method: "get-nonce";
134
- }
135
- export interface GetNonceResponse extends RawResponse {
136
- method: "get-nonce";
137
- result?: string;
138
- }
139
116
  export declare type RawRequest = {
140
117
  origin?: string;
141
118
  method: string;
142
119
  params?: object | any[];
143
120
  };
144
- export declare type Request = RawRequest | ProbeRequest | ConnectRequest | DeployContractRequest | EstimateFeeRequest | ExecuteRequest | SignMessageRequest | HashMessageRequest | VerifyMessageHashRequest | VerifyMessageRequest | GetNonceRequest;
121
+ export declare type Request = RawRequest | ProbeRequest | ConnectRequest | DeployContractRequest | EstimateFeeRequest | ExecuteRequest | SignMessageRequest | RegisterRequest;
145
122
  export declare type RawResponse = {
146
123
  result?: any;
147
124
  error?: unknown;
148
125
  };
149
- export declare type Response = RawResponse | ProbeResponse | DeployContractResponse | EstimateFeeResponse | ConnectResponse | SignMessageResponse | HashMessageResponse | VerifyMessageHashResponse | VerifyMessageResponse | GetNonceResponse;
126
+ export declare type Response = RawResponse | ProbeResponse | DeployContractResponse | EstimateFeeResponse | ConnectResponse | SignMessageResponse | RegisterResponse;
package/lib/webauthn.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Abi, Invocation, InvocationsSignerDetails, Signature, SignerInterface, typedData } from "starknet";
1
+ import { Abi, Call, InvocationsSignerDetails, Signature, SignerInterface, typedData } from "starknet";
2
2
  declare type Assertion = PublicKeyCredential & {
3
3
  response: AuthenticatorAssertionResponse;
4
4
  };
@@ -9,8 +9,8 @@ export declare class WebauthnSigner implements SignerInterface {
9
9
  getPubKey(): Promise<string>;
10
10
  sign(hash: string): Promise<Assertion>;
11
11
  formatAssertion(assertion: Assertion): Signature;
12
- hashTransaction(transactions: Invocation[], transactionsDetail: InvocationsSignerDetails, abis?: Abi[]): string;
13
- signTransaction(transactions: Invocation[], transactionsDetail: InvocationsSignerDetails, abis?: Abi[]): Promise<Signature>;
12
+ hashTransaction(transactions: Call[], transactionsDetail: InvocationsSignerDetails, abis?: Abi[]): string;
13
+ signTransaction(calls: Call[], transactionsDetail: InvocationsSignerDetails, abis?: Abi[]): Promise<Signature>;
14
14
  signMessage(td: typedData.TypedData, accountAddress: string): Promise<Signature>;
15
15
  }
16
16
  export {};
package/lib/webauthn.js CHANGED
@@ -149,19 +149,19 @@ var WebauthnSigner = /** @class */ (function () {
149
149
  }
150
150
  // now use abi to display decoded data somewhere, but as this signer is headless, we can't do that
151
151
  var calldata = transaction.fromCallsToExecuteCalldataWithNonce(transactions, transactionsDetail.nonce);
152
- return hash.calculcateTransactionHash(transactionsDetail.walletAddress, transactionsDetail.version, hash.getSelectorFromName("__execute__"), calldata, transactionsDetail.maxFee, transactionsDetail.chainId);
152
+ return hash.calculateTransactionHash(transactionsDetail.walletAddress, transactionsDetail.version, [hash.getSelectorFromName("__execute__")].concat(calldata), transactionsDetail.maxFee, transactionsDetail.chainId, transactionsDetail.nonce);
153
153
  };
154
- WebauthnSigner.prototype.signTransaction = function (transactions, transactionsDetail, abis) {
154
+ WebauthnSigner.prototype.signTransaction = function (calls, transactionsDetail, abis) {
155
155
  return __awaiter(this, void 0, void 0, function () {
156
156
  var calldata, msgHash, assertion;
157
157
  return __generator(this, function (_a) {
158
158
  switch (_a.label) {
159
159
  case 0:
160
- if (abis && abis.length !== transactions.length) {
160
+ if (abis && abis.length !== calls.length) {
161
161
  throw new Error("ABI must be provided for each transaction or no transaction");
162
162
  }
163
- calldata = transaction.fromCallsToExecuteCalldataWithNonce(transactions, transactionsDetail.nonce);
164
- msgHash = hash.calculcateTransactionHash(transactionsDetail.walletAddress, transactionsDetail.version, hash.getSelectorFromName("__execute__"), calldata, transactionsDetail.maxFee, transactionsDetail.chainId);
163
+ calldata = transaction.fromCallsToExecuteCalldataWithNonce(calls, transactionsDetail.nonce);
164
+ msgHash = hash.calculateTransactionHash(transactionsDetail.walletAddress, transactionsDetail.version, [hash.getSelectorFromName("__execute__")].concat(calldata), transactionsDetail.maxFee, transactionsDetail.chainId, transactionsDetail.nonce);
165
165
  return [4 /*yield*/, this.sign(msgHash)];
166
166
  case 1:
167
167
  assertion = _a.sent();
@@ -1 +1 @@
1
- {"version":3,"file":"webauthn.js","sourceRoot":"","sources":["../src/webauthn.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAML,WAAW,EACX,IAAI,EACJ,SAAS,EACT,MAAM,EACP,MAAM,UAAU,CAAC;AAClB,OAAO,SAAS,MAAM,WAAW,CAAC;AAGlC,IAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAMpC,SAAS,KAAK,CAAC,CAAe;IAC5B,IAAM,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACtB,IAAM,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAChC,IAAM,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAChC,OAAO,EAAE,CAAC,GAAA,EAAE,CAAC,GAAA,EAAE,CAAC,GAAA,EAAE,CAAC;AACrB,CAAC;AAED,SAAS,4BAA4B,CAAC,OAAmB;IACvD,IAAI,KAAK,GAAG,EAAE,EACZ,CAAC,GAAG,CAAC,EACL,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC;IAEvB,OAAO,CAAC,GAAG,GAAG,EAAE;QACd,KAAK,CAAC,IAAI,CACR,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;YACnB,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,IAAI,EAAE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WAAW,CAAC,mCAAmC,CAC9D,KAAK,EACL,kBAAkB,CAAC,KAAK,CACzB,CAAC;wBAEI,OAAO,GAAG,IAAI,CAAC,wBAAwB,CAC3C,kBAAkB,CAAC,aAAa,EAChC,kBAAkB,CAAC,OAAO,EAC1B,CAAC,IAAI,CAAC,mBAAmB,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAC1D,kBAAkB,CAAC,MAAM,EACzB,kBAAkB,CAAC,OAAO,EAC1B,kBAAkB,CAAC,KAAK,CACzB,CAAC;wBAEgB,qBAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,EAAA;;wBAApC,SAAS,GAAG,SAAwB;wBAC1C,sBAAO,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,EAAC;;;;KACxC;IAEY,oCAAW,GAAxB,UACE,EAAuB,EACvB,cAAsB;;;;;;wBAEhB,OAAO,GAAG,SAAS,CAAC,cAAc,CAAC,EAAE,EAAE,cAAc,CAAC,CAAC;wBAC3C,qBAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,EAAA;;wBAApC,SAAS,GAAG,SAAwB;wBAC1C,sBAAO,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,EAAC;;;;KACxC;IACH,qBAAC;AAAD,CAAC,AA7JD,IA6JC"}
package/package.json CHANGED
@@ -1,25 +1,22 @@
1
1
  {
2
2
  "name": "@cartridge/controller",
3
- "version": "0.1.2",
3
+ "version": "0.1.37",
4
4
  "description": "Cartridge Controller",
5
5
  "main": "lib",
6
6
  "types": "lib",
7
7
  "type": "module",
8
8
  "scripts": {
9
9
  "build": "tsc",
10
+ "dev": "tsc --watch",
10
11
  "format": "prettier --write \"src/**/*.ts\" \"tests/**/*.ts\""
11
12
  },
12
13
  "files": [
13
14
  "lib"
14
15
  ],
15
16
  "devDependencies": {
16
- "@rollup/plugin-replace": "^4.0.0",
17
17
  "@types/jest": "^26.0.18",
18
18
  "@types/node": "^17.0.23",
19
19
  "jest": "^26.6.3",
20
- "rimraf": "^3.0.2",
21
- "rollup": "^2.61.1",
22
- "rollup-plugin-typescript2": "^0.30.0",
23
20
  "ts-jest": "^26.5.1",
24
21
  "ts-node": "^10.4.0",
25
22
  "tslib": "^2.3.1",
@@ -30,6 +27,6 @@
30
27
  "cuid": "^2.1.8",
31
28
  "fast-deep-equal": "^3.1.3",
32
29
  "query-string": "^7.1.1",
33
- "starknet": "4.3.0"
30
+ "starknet": "^4.3.0"
34
31
  }
35
32
  }