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 +1 @@
1
- {"version":3,"file":"api.js","sourceRoot":"","sources":["../../../../../src/api/api.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,MAAM,MAAM,WAAW,CAAC;AAG/B,MAAM,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,GAAG,MAAM,CAAC;AAUzD;;;;GAIG;AACH,MAAM,OAAO,mBAAmB;IAO9B;;;OAGG;IACH,YAAY,MAKX;QACC,MAAM,EAAE,GAAG,EAAE,aAAa,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;QACtD,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,QAAQ,GAAG,iBAAiB,CAAC;QAClC,IAAI,CAAC,KAAK,GAAG,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,QAAQ,CAAC;QAC/B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,GAAG,KAAK,OAAO,EAAE,CAAC;YACpB,IAAI,aAAa,KAAK,SAAS;gBAC7B,MAA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IAAI,EAAE,kBAAkB;gBACxB,OAAO,EAAE,OAAO;gBAChB,QAAQ,EAAE,IAAI,CAAC,GAAG;gBAClB,IAAI,EAAE,IAAI;gBACV,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,sCAAsC;aAC9D,CAAC;YAEF,IAAI,CAAC;gBACH,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;gBAC1D,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC;YAChD,CAAC;YAAC,OAAO,KAAU,EAAE,CAAC;gBACpB,OAAO,CAAC,KAAK,CAAC,eAAe,EAAE,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,CAAC;gBACvD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;YAC1C,CAAC;QACH,CAAC;IACH,CAAC;IAED,8DAA8D;IACtD,OAAO,CAAC,IAAS;QACvB,IAAI,IAAI,KAAK,OAAO;YAAE,OAAO,IAAI,CAAC;QAClC,IAAI,IAAI,EAAE,SAAS,KAAK,QAAQ;YAAE,OAAO,IAAI,CAAC;QAC9C,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC;YACpE,OAAO,IAAI,CAAC;QACd,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS;YAAE,OAAO,IAAI,CAAC;QAChE,OAAO,KAAK,CAAC;IACf,CAAC;CACF"}
@@ -1,4 +1,3 @@
1
- import { __awaiter } from "tslib";
2
1
  export class Cloud {
3
2
  constructor(params) {
4
3
  const { id, jobId, stepId, taskId, cache, developer, repo, task, userId, args, metadata, isLocalCloud, chain, } = params;
@@ -13,7 +12,7 @@ export class Cloud {
13
12
  this.userId = userId;
14
13
  this.args = args;
15
14
  this.metadata = metadata;
16
- this.isLocalCloud = isLocalCloud !== null && isLocalCloud !== void 0 ? isLocalCloud : false;
15
+ this.isLocalCloud = isLocalCloud ?? false;
17
16
  this.chain = chain;
18
17
  }
19
18
  }
@@ -22,37 +21,25 @@ export class zkCloudWorker {
22
21
  this.cloud = cloud;
23
22
  }
24
23
  // To verify the SmartContract code
25
- deployedContracts() {
26
- return __awaiter(this, void 0, void 0, function* () {
27
- return [];
28
- });
24
+ async deployedContracts() {
25
+ return [];
29
26
  }
30
27
  // Those methods should be implemented for recursive proofs calculations
31
- create(transaction) {
32
- return __awaiter(this, void 0, void 0, function* () {
33
- return undefined;
34
- });
28
+ async create(transaction) {
29
+ return undefined;
35
30
  }
36
- merge(proof1, proof2) {
37
- return __awaiter(this, void 0, void 0, function* () {
38
- return undefined;
39
- });
31
+ async merge(proof1, proof2) {
32
+ return undefined;
40
33
  }
41
34
  // Those methods should be implemented for anything except for recursive proofs
42
- execute(transactions) {
43
- return __awaiter(this, void 0, void 0, function* () {
44
- return undefined;
45
- });
35
+ async execute(transactions) {
36
+ return undefined;
46
37
  }
47
38
  // process the transactions received by the cloud
48
- processTransactions(transactions) {
49
- return __awaiter(this, void 0, void 0, function* () { });
50
- }
39
+ async processTransactions(transactions) { }
51
40
  // process the task defined by the developer
52
- task() {
53
- return __awaiter(this, void 0, void 0, function* () {
54
- return undefined;
55
- });
41
+ async task() {
42
+ return undefined;
56
43
  }
57
44
  }
58
45
  //# sourceMappingURL=cloud.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cloud.js","sourceRoot":"","sources":["../../../../../src/cloud/cloud.ts"],"names":[],"mappings":";AAeA,MAAM,OAAgB,KAAK;IAezB,YAAY,MAcX;QACC,MAAM,EACJ,EAAE,EACF,KAAK,EACL,MAAM,EACN,MAAM,EACN,KAAK,EACL,SAAS,EACT,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,QAAQ,E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OAAO,CAAC,YAAsB;QAClC,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,iDAAiD;IACjD,KAAK,CAAC,mBAAmB,CAAC,YAAgC,IAAkB,CAAC;IAE7E,4CAA4C;IAC5C,KAAK,CAAC,IAAI;QACR,OAAO,SAAS,CAAC;IACnB,CAAC;CACF"}
@@ -1,74 +1,65 @@
1
- import { __awaiter } from "tslib";
2
1
  import fs from "fs/promises";
3
- export function saveFile(params) {
4
- return __awaiter(this, void 0, void 0, function* () {
5
- const { data, filename } = params;
6
- const folder = "./data/";
7
- const name = folder + filename + ".json";
8
- try {
9
- yield fs.access("./data");
10
- }
11
- catch (e) {
12
- // if not, create it
13
- yield fs.mkdir("./data");
14
- }
15
- try {
16
- yield fs.writeFile(name, JSON.stringify(data, null, 2));
17
- return name;
18
- }
19
- catch (e) {
20
- console.error(`Error writing file ${name}`);
21
- return undefined;
22
- }
23
- });
2
+ export async function saveFile(params) {
3
+ const { data, filename } = params;
4
+ const folder = "./data/";
5
+ const name = folder + filename + ".json";
6
+ try {
7
+ await fs.access("./data");
8
+ }
9
+ catch (e) {
10
+ // if not, create it
11
+ await fs.mkdir("./data");
12
+ }
13
+ try {
14
+ await fs.writeFile(name, JSON.stringify(data, null, 2));
15
+ return name;
16
+ }
17
+ catch (e) {
18
+ console.error(`Error writing file ${name}`);
19
+ return undefined;
20
+ }
24
21
  }
25
- export function loadFile(filename) {
26
- return __awaiter(this, void 0, void 0, function* () {
27
- const name = "./data/" + filename + ".json";
28
- try {
29
- const filedata = yield fs.readFile(name, "utf8");
30
- const data = JSON.parse(filedata);
31
- return data;
32
- }
33
- catch (e) {
34
- console.error(`File ${name} does not exist or has wrong format`);
35
- return undefined;
36
- }
37
- });
22
+ export async function loadFile(filename) {
23
+ const name = "./data/" + filename + ".json";
24
+ try {
25
+ const filedata = await fs.readFile(name, "utf8");
26
+ const data = JSON.parse(filedata);
27
+ return data;
28
+ }
29
+ catch (e) {
30
+ console.error(`File ${name} does not exist or has wrong format`);
31
+ return undefined;
32
+ }
38
33
  }
39
- export function saveBinaryFile(params) {
40
- return __awaiter(this, void 0, void 0, function* () {
41
- const { data, filename } = params;
42
- const folder = "./data/";
43
- const name = folder + filename + ".bin";
44
- try {
45
- yield fs.access("./data");
46
- }
47
- catch (e) {
48
- // if not, create it
49
- yield fs.mkdir("./data");
50
- }
51
- try {
52
- yield fs.writeFile(name, data);
53
- return name;
54
- }
55
- catch (e) {
56
- console.error(`Error writing file ${name}`);
57
- return undefined;
58
- }
59
- });
34
+ export async function saveBinaryFile(params) {
35
+ const { data, filename } = params;
36
+ const folder = "./data/";
37
+ const name = folder + filename + ".bin";
38
+ try {
39
+ await fs.access("./data");
40
+ }
41
+ catch (e) {
42
+ // if not, create it
43
+ await fs.mkdir("./data");
44
+ }
45
+ try {
46
+ await fs.writeFile(name, data);
47
+ return name;
48
+ }
49
+ catch (e) {
50
+ console.error(`Error writing file ${name}`);
51
+ return undefined;
52
+ }
60
53
  }
61
- export function loadBinaryFile(filename) {
62
- return __awaiter(this, void 0, void 0, function* () {
63
- const name = "./data/" + filename + ".bin";
64
- try {
65
- const data = yield fs.readFile(name);
66
- return data;
67
- }
68
- catch (e) {
69
- console.error(`File ${name} does not exist or has wrong format`);
70
- return undefined;
71
- }
72
- });
54
+ export async function loadBinaryFile(filename) {
55
+ const name = "./data/" + filename + ".bin";
56
+ try {
57
+ const data = await fs.readFile(name);
58
+ return data;
59
+ }
60
+ catch (e) {
61
+ console.error(`File ${name} does not exist or has wrong format`);
62
+ return undefined;
63
+ }
73
64
  }
74
65
  //# sourceMappingURL=files.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"files.js","sourceRoot":"","sources":["../../../../../src/cloud/files.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,aAAa,CAAC;AAE7B,MAAM,UAAgB,QAAQ,CAAC,MAI9B;;QACC,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;QAClC,MAAM,MAAM,GA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