zkcloudworker 0.5.1 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. package/lib/ts/src/api/api.js +14 -6
  2. package/lib/ts/src/index.d.ts +3 -2
  3. package/lib/ts/src/index.js +3 -2
  4. package/lib/ts/src/utils/base64.d.ts +5 -0
  5. package/lib/ts/src/utils/base64.js +90 -0
  6. package/lib/ts/src/{fetch.js → utils/fetch.js} +24 -6
  7. package/lib/ts/src/utils/fields.d.ts +3 -0
  8. package/lib/ts/src/utils/fields.js +33 -0
  9. package/lib/ts/tsconfig.tsbuildinfo +1 -1
  10. package/lib/web/src/api/api.js +260 -275
  11. package/lib/web/src/api/api.js.map +1 -1
  12. package/lib/web/src/cloud/cloud.js +12 -25
  13. package/lib/web/src/cloud/cloud.js.map +1 -1
  14. package/lib/web/src/cloud/files.js +59 -68
  15. package/lib/web/src/cloud/files.js.map +1 -1
  16. package/lib/web/src/cloud/local.js +221 -259
  17. package/lib/web/src/cloud/local.js.map +1 -1
  18. package/lib/web/src/encryption/encryption.js +2 -5
  19. package/lib/web/src/encryption/encryption.js.map +1 -1
  20. package/lib/web/src/encryption/messages.js +24 -29
  21. package/lib/web/src/encryption/messages.js.map +1 -1
  22. package/lib/web/src/encryption/nats-client.js +67 -83
  23. package/lib/web/src/encryption/nats-client.js.map +1 -1
  24. package/lib/web/src/fee.js +3 -6
  25. package/lib/web/src/fee.js.map +1 -1
  26. package/lib/web/src/index.d.ts +3 -2
  27. package/lib/web/src/index.js +3 -2
  28. package/lib/web/src/index.js.map +1 -1
  29. package/lib/web/src/mina.js +60 -67
  30. package/lib/web/src/mina.js.map +1 -1
  31. package/lib/web/src/utils/base64.d.ts +5 -0
  32. package/lib/web/src/utils/base64.js +84 -0
  33. package/lib/web/src/utils/base64.js.map +1 -0
  34. package/lib/web/src/utils/fetch.js +79 -0
  35. package/lib/web/src/utils/fetch.js.map +1 -0
  36. package/lib/web/src/utils/fields.d.ts +3 -0
  37. package/lib/web/src/utils/fields.js +29 -0
  38. package/lib/web/src/utils/fields.js.map +1 -0
  39. package/lib/web/tsconfig.web.tsbuildinfo +1 -1
  40. package/package.json +1 -1
  41. package/lib/ts/src/api/client-api.d.ts +0 -147
  42. package/lib/ts/src/api/client-api.js +0 -122
  43. package/lib/web/src/api/client-api.d.ts +0 -147
  44. package/lib/web/src/api/client-api.js +0 -134
  45. package/lib/web/src/api/client-api.js.map +0 -1
  46. package/lib/web/src/fetch.js +0 -68
  47. package/lib/web/src/fetch.js.map +0 -1
  48. /package/lib/ts/src/{fetch.d.ts → utils/fetch.d.ts} +0 -0
  49. /package/lib/web/src/{fetch.d.ts → utils/fetch.d.ts} +0 -0
@@ -1,4 +1,3 @@
1
- import { __awaiter } from "tslib";
2
1
  import { Cache, PrivateKey } from "o1js";
3
2
  import { Cloud } from "./cloud";
4
3
  import { makeString } from "../mina";
@@ -10,9 +9,9 @@ export class LocalCloud extends Cloud {
10
9
  super({
11
10
  id: id,
12
11
  jobId: jobId,
13
- stepId: stepId !== null && stepId !== void 0 ? stepId : "stepId",
14
- taskId: taskId !== null && taskId !== void 0 ? taskId : "taskId",
15
- cache: cache !== null && cache !== void 0 ? cache : Cache.FileSystem("./cache"),
12
+ stepId: stepId ?? "stepId",
13
+ taskId: taskId ?? "taskId",
14
+ cache: cache ?? Cache.FileSystem("./cache"),
16
15
  developer: developer,
17
16
  repo: repo,
18
17
  task: task,
@@ -24,106 +23,200 @@ export class LocalCloud extends Cloud {
24
23
  });
25
24
  this.localWorker = localWorker;
26
25
  }
27
- getDeployer() {
28
- return __awaiter(this, void 0, void 0, function* () {
29
- const deployer = process.env.DEPLOYER;
30
- return deployer === undefined ? undefined : PrivateKey.fromBase58(deployer);
31
- });
26
+ async getDeployer() {
27
+ const deployer = process.env.DEPLOYER;
28
+ return deployer === undefined ? undefined : PrivateKey.fromBase58(deployer);
32
29
  }
33
- releaseDeployer(txsHashes) {
34
- return __awaiter(this, void 0, void 0, function* () {
35
- console.log("LocalCloud: releaseDeployer", txsHashes);
36
- });
30
+ async releaseDeployer(txsHashes) {
31
+ console.log("LocalCloud: releaseDeployer", txsHashes);
37
32
  }
38
- log(msg) {
39
- return __awaiter(this, void 0, void 0, function* () {
40
- console.log("LocalCloud:", msg);
41
- });
33
+ async log(msg) {
34
+ console.log("LocalCloud:", msg);
35
+ }
36
+ async getDataByKey(key) {
37
+ const value = LocalStorage.data[key];
38
+ return value;
39
+ }
40
+ async saveDataByKey(key, value) {
41
+ if (value !== undefined)
42
+ LocalStorage.data[key] = value;
43
+ else
44
+ delete LocalStorage.data[key];
45
+ }
46
+ async saveFile(filename, value) {
47
+ await saveBinaryFile({ data: value, filename });
48
+ }
49
+ async loadFile(filename) {
50
+ const data = await loadBinaryFile(filename);
51
+ return data;
42
52
  }
43
- getDataByKey(key) {
44
- return __awaiter(this, void 0, void 0, function* () {
45
- const value = LocalStorage.data[key];
46
- return value;
53
+ async loadEnvironment(password) {
54
+ throw new Error("Method not implemented.");
55
+ }
56
+ static generateId() {
57
+ return "local." + Date.now().toString() + "." + makeString(32);
58
+ }
59
+ static async addTransactions(transactions) {
60
+ const timeReceived = Date.now();
61
+ const txId = [];
62
+ transactions.forEach((tx) => {
63
+ const id = LocalCloud.generateId();
64
+ LocalStorage.transactions[id] = { transaction: tx, timeReceived };
65
+ txId.push(id);
47
66
  });
67
+ return txId;
48
68
  }
49
- saveDataByKey(key, value) {
50
- return __awaiter(this, void 0, void 0, function* () {
51
- if (value !== undefined)
52
- LocalStorage.data[key] = value;
53
- else
54
- delete LocalStorage.data[key];
69
+ async deleteTransaction(txId) {
70
+ if (LocalStorage.transactions[txId] === undefined)
71
+ throw new Error(`deleteTransaction: Transaction ${txId} not found`);
72
+ delete LocalStorage.transactions[txId];
73
+ }
74
+ async getTransactions() {
75
+ const txs = Object.keys(LocalStorage.transactions).map((txId) => {
76
+ const { transaction, timeReceived } = LocalStorage.transactions[txId];
77
+ return {
78
+ txId,
79
+ transaction,
80
+ timeReceived,
81
+ };
55
82
  });
83
+ return txs;
56
84
  }
57
- saveFile(filename, value) {
58
- return __awaiter(this, void 0, void 0, function* () {
59
- yield saveBinaryFile({ data: value, filename });
85
+ static async run(params) {
86
+ const { command, data, chain, localWorker } = params;
87
+ const { developer, repo, transactions, task, userId, args, metadata } = data;
88
+ const timeCreated = Date.now();
89
+ const jobId = LocalCloud.generateId();
90
+ const job = {
91
+ id: "local",
92
+ jobId,
93
+ developer,
94
+ repo,
95
+ task,
96
+ userId,
97
+ args,
98
+ metadata,
99
+ txNumber: command === "recursiveProof" ? transactions.length : 1,
100
+ timeCreated,
101
+ timeCreatedString: new Date(timeCreated).toISOString(),
102
+ timeStarted: timeCreated,
103
+ jobStatus: "started",
104
+ maxAttempts: 0,
105
+ };
106
+ const cloud = new LocalCloud({
107
+ job,
108
+ chain,
109
+ localWorker,
60
110
  });
111
+ const worker = await localWorker(cloud);
112
+ if (worker === undefined)
113
+ throw new Error("worker is undefined");
114
+ const result = command === "recursiveProof"
115
+ ? await LocalCloud.sequencer({
116
+ worker,
117
+ data,
118
+ })
119
+ : command === "execute"
120
+ ? await worker.execute(transactions)
121
+ : undefined;
122
+ const timeFinished = Date.now();
123
+ if (result !== undefined) {
124
+ job.jobStatus = "finished";
125
+ job.timeFinished = timeFinished;
126
+ job.result = result;
127
+ }
128
+ else {
129
+ job.jobStatus = "failed";
130
+ job.timeFailed = timeFinished;
131
+ }
132
+ job.maxAttempts = 1;
133
+ job.billedDuration = timeFinished - timeCreated;
134
+ LocalStorage.jobs[jobId] = job;
135
+ return jobId;
61
136
  }
62
- loadFile(filename) {
63
- return __awaiter(this, void 0, void 0, function* () {
64
- const data = yield loadBinaryFile(filename);
65
- return data;
137
+ async recursiveProof(data) {
138
+ return await LocalCloud.run({
139
+ command: "recursiveProof",
140
+ data: {
141
+ developer: this.developer,
142
+ repo: this.repo,
143
+ transactions: data.transactions,
144
+ task: data.task ?? "recursiveProof",
145
+ userId: data.userId,
146
+ args: data.args,
147
+ metadata: data.metadata,
148
+ },
149
+ chain: this.chain,
150
+ localWorker: this.localWorker,
66
151
  });
67
152
  }
68
- loadEnvironment(password) {
69
- return __awaiter(this, void 0, void 0, function* () {
70
- throw new Error("Method not implemented.");
153
+ async execute(data) {
154
+ return await LocalCloud.run({
155
+ command: "execute",
156
+ data: {
157
+ developer: this.developer,
158
+ repo: this.repo,
159
+ transactions: data.transactions,
160
+ task: data.task,
161
+ userId: data.userId,
162
+ args: data.args,
163
+ metadata: data.metadata,
164
+ },
165
+ chain: this.chain,
166
+ localWorker: this.localWorker,
71
167
  });
72
168
  }
73
- static generateId() {
74
- return "local." + Date.now().toString() + "." + makeString(32);
169
+ async jobResult(jobId) {
170
+ return LocalStorage.jobs[jobId];
75
171
  }
76
- static addTransactions(transactions) {
77
- return __awaiter(this, void 0, void 0, function* () {
78
- const timeReceived = Date.now();
79
- const txId = [];
80
- transactions.forEach((tx) => {
81
- const id = LocalCloud.generateId();
82
- LocalStorage.transactions[id] = { transaction: tx, timeReceived };
83
- txId.push(id);
84
- });
85
- return txId;
86
- });
172
+ async addTask(data) {
173
+ const taskId = LocalCloud.generateId();
174
+ LocalStorage.tasks[taskId] = {
175
+ ...data,
176
+ id: "local",
177
+ taskId,
178
+ timeCreated: Date.now(),
179
+ developer: this.developer,
180
+ repo: this.repo,
181
+ chain: this.chain,
182
+ };
183
+ return taskId;
87
184
  }
88
- deleteTransaction(txId) {
89
- return __awaiter(this, void 0, void 0, function* () {
90
- if (LocalStorage.transactions[txId] === undefined)
91
- throw new Error(`deleteTransaction: Transaction ${txId} not found`);
92
- delete LocalStorage.transactions[txId];
93
- });
185
+ async deleteTask(taskId) {
186
+ if (LocalStorage.tasks[taskId] === undefined)
187
+ throw new Error(`deleteTask: Task ${taskId} not found`);
188
+ delete LocalStorage.tasks[taskId];
94
189
  }
95
- getTransactions() {
96
- return __awaiter(this, void 0, void 0, function* () {
97
- const txs = Object.keys(LocalStorage.transactions).map((txId) => {
98
- const { transaction, timeReceived } = LocalStorage.transactions[txId];
99
- return {
100
- txId,
101
- transaction,
102
- timeReceived,
103
- };
104
- });
105
- return txs;
190
+ async processTasks() {
191
+ await LocalCloud.processLocalTasks({
192
+ developer: this.developer,
193
+ repo: this.repo,
194
+ localWorker: this.localWorker,
195
+ chain: this.chain,
106
196
  });
107
197
  }
108
- static run(params) {
109
- return __awaiter(this, void 0, void 0, function* () {
110
- const { command, data, chain, localWorker } = params;
111
- const { developer, repo, transactions, task, userId, args, metadata } = data;
112
- const timeCreated = Date.now();
198
+ static async processLocalTasks(params) {
199
+ const { developer, repo, localWorker, chain } = params;
200
+ for (const taskId in LocalStorage.tasks) {
201
+ const data = LocalStorage.tasks[taskId];
113
202
  const jobId = LocalCloud.generateId();
203
+ const timeCreated = Date.now();
204
+ if (data.startTime !== undefined && data.startTime < timeCreated)
205
+ continue;
114
206
  const job = {
115
207
  id: "local",
116
- jobId,
208
+ jobId: jobId,
209
+ taskId: taskId,
117
210
  developer,
118
211
  repo,
119
- task,
120
- userId,
121
- args,
122
- metadata,
123
- txNumber: command === "recursiveProof" ? transactions.length : 1,
124
- timeCreated,
212
+ task: data.task,
213
+ userId: data.userId,
214
+ args: data.args,
215
+ metadata: data.metadata,
216
+ txNumber: 1,
217
+ timeCreated: timeCreated,
125
218
  timeCreatedString: new Date(timeCreated).toISOString(),
126
- timeStarted: timeCreated,
219
+ timeStarted: Date.now(),
127
220
  jobStatus: "started",
128
221
  maxAttempts: 0,
129
222
  };
@@ -132,198 +225,67 @@ export class LocalCloud extends Cloud {
132
225
  chain,
133
226
  localWorker,
134
227
  });
135
- const worker = yield localWorker(cloud);
136
- if (worker === undefined)
137
- throw new Error("worker is undefined");
138
- const result = command === "recursiveProof"
139
- ? yield LocalCloud.sequencer({
140
- worker,
141
- data,
142
- })
143
- : command === "execute"
144
- ? yield worker.execute(transactions)
145
- : undefined;
146
- const timeFinished = Date.now();
228
+ const worker = await localWorker(cloud);
229
+ const result = await worker.task();
230
+ job.timeFinished = Date.now();
231
+ job.maxAttempts = 1;
232
+ job.billedDuration = job.timeFinished - timeCreated;
147
233
  if (result !== undefined) {
148
234
  job.jobStatus = "finished";
149
- job.timeFinished = timeFinished;
150
235
  job.result = result;
151
236
  }
152
237
  else {
153
238
  job.jobStatus = "failed";
154
- job.timeFailed = timeFinished;
155
239
  }
156
- job.maxAttempts = 1;
157
- job.billedDuration = timeFinished - timeCreated;
158
240
  LocalStorage.jobs[jobId] = job;
159
- return jobId;
160
- });
161
- }
162
- recursiveProof(data) {
163
- return __awaiter(this, void 0, void 0, function* () {
164
- var _a;
165
- return yield LocalCloud.run({
166
- command: "recursiveProof",
167
- data: {
168
- developer: this.developer,
169
- repo: this.repo,
170
- transactions: data.transactions,
171
- task: (_a = data.task) !== null && _a !== void 0 ? _a : "recursiveProof",
172
- userId: data.userId,
173
- args: data.args,
174
- metadata: data.metadata,
175
- },
176
- chain: this.chain,
177
- localWorker: this.localWorker,
178
- });
179
- });
180
- }
181
- execute(data) {
182
- return __awaiter(this, void 0, void 0, function* () {
183
- return yield LocalCloud.run({
184
- command: "execute",
185
- data: {
186
- developer: this.developer,
187
- repo: this.repo,
188
- transactions: data.transactions,
189
- task: data.task,
190
- userId: data.userId,
191
- args: data.args,
192
- metadata: data.metadata,
193
- },
194
- chain: this.chain,
195
- localWorker: this.localWorker,
196
- });
197
- });
241
+ }
242
+ let count = 0;
243
+ for (const task in LocalStorage.tasks)
244
+ count++;
245
+ return count;
198
246
  }
199
- jobResult(jobId) {
200
- return __awaiter(this, void 0, void 0, function* () {
201
- return LocalStorage.jobs[jobId];
202
- });
203
- }
204
- addTask(data) {
205
- return __awaiter(this, void 0, void 0, function* () {
206
- const taskId = LocalCloud.generateId();
207
- LocalStorage.tasks[taskId] = Object.assign(Object.assign({}, data), { id: "local", taskId, timeCreated: Date.now(), developer: this.developer, repo: this.repo, chain: this.chain });
208
- return taskId;
209
- });
210
- }
211
- deleteTask(taskId) {
212
- return __awaiter(this, void 0, void 0, function* () {
213
- if (LocalStorage.tasks[taskId] === undefined)
214
- throw new Error(`deleteTask: Task ${taskId} not found`);
215
- delete LocalStorage.tasks[taskId];
216
- });
217
- }
218
- processTasks() {
219
- return __awaiter(this, void 0, void 0, function* () {
220
- yield LocalCloud.processLocalTasks({
221
- developer: this.developer,
222
- repo: this.repo,
223
- localWorker: this.localWorker,
224
- chain: this.chain,
225
- });
226
- });
227
- }
228
- static processLocalTasks(params) {
229
- return __awaiter(this, void 0, void 0, function* () {
230
- const { developer, repo, localWorker, chain } = params;
231
- for (const taskId in LocalStorage.tasks) {
232
- const data = LocalStorage.tasks[taskId];
233
- const jobId = LocalCloud.generateId();
234
- const timeCreated = Date.now();
235
- if (data.startTime !== undefined && data.startTime < timeCreated)
236
- continue;
237
- const job = {
238
- id: "local",
239
- jobId: jobId,
240
- taskId: taskId,
241
- developer,
242
- repo,
243
- task: data.task,
244
- userId: data.userId,
245
- args: data.args,
246
- metadata: data.metadata,
247
- txNumber: 1,
248
- timeCreated: timeCreated,
249
- timeCreatedString: new Date(timeCreated).toISOString(),
250
- timeStarted: Date.now(),
251
- jobStatus: "started",
252
- maxAttempts: 0,
253
- };
254
- const cloud = new LocalCloud({
255
- job,
256
- chain,
257
- localWorker,
258
- });
259
- const worker = yield localWorker(cloud);
260
- const result = yield worker.task();
261
- job.timeFinished = Date.now();
262
- job.maxAttempts = 1;
263
- job.billedDuration = job.timeFinished - timeCreated;
264
- if (result !== undefined) {
265
- job.jobStatus = "finished";
266
- job.result = result;
267
- }
268
- else {
269
- job.jobStatus = "failed";
270
- }
271
- LocalStorage.jobs[jobId] = job;
272
- }
273
- let count = 0;
274
- for (const task in LocalStorage.tasks)
275
- count++;
276
- return count;
277
- });
278
- }
279
- static sequencer(params) {
280
- return __awaiter(this, void 0, void 0, function* () {
281
- const { worker, data } = params;
282
- const { transactions } = data;
283
- if (transactions.length === 0)
284
- throw new Error("No transactions to process");
285
- const proofs = [];
286
- for (const transaction of transactions) {
287
- const result = yield worker.create(transaction);
288
- if (result === undefined)
289
- throw new Error("Failed to create proof");
290
- proofs.push(result);
291
- }
292
- let proof = proofs[0];
293
- for (let i = 1; i < proofs.length; i++) {
294
- const result = yield worker.merge(proof, proofs[i]);
295
- if (result === undefined)
296
- throw new Error("Failed to merge proofs");
297
- proof = result;
298
- }
299
- return proof;
300
- });
247
+ static async sequencer(params) {
248
+ const { worker, data } = params;
249
+ const { transactions } = data;
250
+ if (transactions.length === 0)
251
+ throw new Error("No transactions to process");
252
+ const proofs = [];
253
+ for (const transaction of transactions) {
254
+ const result = await worker.create(transaction);
255
+ if (result === undefined)
256
+ throw new Error("Failed to create proof");
257
+ proofs.push(result);
258
+ }
259
+ let proof = proofs[0];
260
+ for (let i = 1; i < proofs.length; i++) {
261
+ const result = await worker.merge(proof, proofs[i]);
262
+ if (result === undefined)
263
+ throw new Error("Failed to merge proofs");
264
+ proof = result;
265
+ }
266
+ return proof;
301
267
  }
302
268
  }
303
269
  export class LocalStorage {
304
- static saveData(name) {
305
- return __awaiter(this, void 0, void 0, function* () {
306
- const data = {
307
- jobs: LocalStorage.jobs,
308
- data: LocalStorage.data,
309
- transactions: LocalStorage.transactions,
310
- tasks: LocalStorage.tasks,
311
- };
312
- const filename = name + ".cloud";
313
- yield saveFile({ data, filename });
314
- });
270
+ static async saveData(name) {
271
+ const data = {
272
+ jobs: LocalStorage.jobs,
273
+ data: LocalStorage.data,
274
+ transactions: LocalStorage.transactions,
275
+ tasks: LocalStorage.tasks,
276
+ };
277
+ const filename = name + ".cloud";
278
+ await saveFile({ data, filename });
315
279
  }
316
- static loadData(name) {
317
- return __awaiter(this, void 0, void 0, function* () {
318
- const filename = name + ".cloud";
319
- const data = yield loadFile(filename);
320
- if (data === undefined)
321
- return;
322
- LocalStorage.jobs = data.jobs;
323
- LocalStorage.data = data.data;
324
- LocalStorage.transactions = data.transactions;
325
- LocalStorage.tasks = data.tasks;
326
- });
280
+ static async loadData(name) {
281
+ const filename = name + ".cloud";
282
+ const data = await loadFile(filename);
283
+ if (data === undefined)
284
+ return;
285
+ LocalStorage.jobs = data.jobs;
286
+ LocalStorage.data = data.data;
287
+ LocalStorage.transactions = data.transactions;
288
+ LocalStorage.tasks = data.tasks;
327
289
  }
328
290
  }
329
291
  LocalStorage.jobs = {};
@@ -1 +1 @@
1
- {"version":3,"file":"local.js","sourceRoot":"","sources":["../../../../../src/cloud/local.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AACzC,OAAO,EAAE,KAAK,EAAiB,MAAM,SAAS,CAAC;AAG/C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAI7E,MAAM,OAAO,UAAW,SAAQ,KAAK;IAEnC,YAAY,MAMX;QACC,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC;QAE1D,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,GACxE,GAAG,CAAC;QACN,KAAK,CAAC;YACJ,EAAE,EAAE,EAAE;YACN,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,QAAQ;YAC1B,MAAM,EAAE,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,QAAQ;YAC1B,KAAK,EAAE,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC;YAC3C,SAAS,EAAE,SAAS;YACpB,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,IAAI;YACV,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;YACV,QAAQ,EAAE,QAAQ;YAClB,YAAY,EAAE,IAAI;YAClB,KAAK;SACN,CAAC,CA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,YAAY;IAQvB,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAY;QAChC,MAAM,IAAI,GAAG;YACX,IAAI,EAAE,YAAY,CAAC,IAAI;YACvB,IAAI,EAAE,YAAY,CAAC,IAAI;YACvB,YAAY,EAAE,YAAY,CAAC,YAAY;YACvC,KAAK,EAAE,YAAY,CAAC,KAAK;SAC1B,CAAC;QACF,MAAM,QAAQ,GAAG,IAAI,GAAG,QAAQ,CAAC;QACjC,MAAM,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAY;QAChC,MAAM,QAAQ,GAAG,IAAI,GAAG,QAAQ,CAAC;QACjC,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACtC,IAAI,IAAI,KAAK,SAAS;YAAE,OAAO;QAC/B,YAAY,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QAC9B,YAAY,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QAC9B,YAAY,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;QAC9C,YAAY,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;IAClC,CAAC;;AA1BM,iBAAI,GAA+B,EAAE,CAAC;AACtC,iBAAI,GAA8B,EAAE,CAAC;AACrC,yBAAY,GAEf,EAAE,CAAC;AACA,kBAAK,GAAgC,EAAE,CAAC"}
@@ -1,4 +1,3 @@
1
- import { __awaiter } from "tslib";
2
1
  import { Field, PublicKey, PrivateKey, Encoding, Group, Encryption, initializeBindings, } from "o1js";
3
2
  export class CipherText {
4
3
  static stringify(cipherText) {
@@ -32,10 +31,8 @@ export class CipherText {
32
31
  throw Error(`Could not decrypt cipher='${cipherText}'.` + ` Error ${err}`);
33
32
  }
34
33
  }
35
- static initialize() {
36
- return __awaiter(this, void 0, void 0, function* () {
37
- yield initializeBindings();
38
- });
34
+ static async initialize() {
35
+ await initializeBindings();
39
36
  }
40
37
  }
41
38
  //# sourceMappingURL=encryption.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"encryption.js","sourceRoot":"","sources":["../../../../../src/encryption/encryption.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,KAAK,EACL,SAAS,EACT,UAAU,EACV,QAAQ,EACR,KAAK,EACL,UAAU,EACV,kBAAkB,GACnB,MAAM,MAAM,CAAC;AAOd,MAAM,OAAO,UAAU;IACrB,MAAM,CAAC,SAAS,CAAC,UAA4B;QAC3C,OAAO,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACpC,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,OAAe;QAC1B,IAAI,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAC9B,OAAO;YACL,SAAS,EAAE,IAAI,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC;YACnC,UAAU,EAAE,CAAC,GAAG,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;SAChE,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,OAAO,CAAC,OAAe,EAAE,QAAgB;QAC9C,IAAI,CAAC;YACH,IAAI,MAAM,GAAY,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;YACvD,IAAI,SAAS,GAAG,UAAU,CAAC,OAAO,CAChC,MAAM,EACN,SAAS,CAAC,UAAU,CAAC,QAAQ,CAAC,CAC/B,CAAC;YACF,OAAO,UAAU,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QACzC,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,KAAK,CACT,8BAA8B,OAAO,gBAAgB,QAAQ,IAAI;gBAC/D,UAAU,GAAG,EAAE,CAClB,CAAC;QACJ,CAAC;IACH,CAAC;IAED,MAAM,CAAC,OAAO,C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