@merkl/api 0.10.231 → 0.10.233

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/dist/database/api/.generated/edge.js +6 -12
  2. package/dist/database/api/.generated/index-browser.js +3 -8
  3. package/dist/database/api/.generated/index.d.ts +156 -124
  4. package/dist/database/api/.generated/index.js +6 -12
  5. package/dist/database/api/.generated/package.json +1 -1
  6. package/dist/database/api/.generated/schema.prisma +3 -10
  7. package/dist/database/api/.generated/wasm.js +3 -8
  8. package/dist/database/engine/.generated/edge.js +2 -3
  9. package/dist/database/engine/.generated/index.js +2 -3
  10. package/dist/database/engine/.generated/package.json +1 -1
  11. package/dist/database/engine/.generated/schema.prisma +1 -1
  12. package/dist/src/eden/index.d.ts +142 -155
  13. package/dist/src/index.d.ts +52 -55
  14. package/dist/src/modules/v4/campaign/campaign.repository.js +3 -1
  15. package/dist/src/modules/v4/enso/enso.service.d.ts +1 -1
  16. package/dist/src/modules/v4/interaction/interaction.controller.d.ts +2 -42
  17. package/dist/src/modules/v4/interaction/interaction.controller.js +2 -20
  18. package/dist/src/modules/v4/interaction/interaction.model.d.ts +1 -0
  19. package/dist/src/modules/v4/interaction/interaction.model.js +1 -0
  20. package/dist/src/modules/v4/interaction/interaction.service.d.ts +1 -1
  21. package/dist/src/modules/v4/interaction/interaction.service.js +2 -2
  22. package/dist/src/modules/v4/kyberzap/kyberzap.model.d.ts +1 -0
  23. package/dist/src/modules/v4/kyberzap/kyberzap.model.js +1 -0
  24. package/dist/src/modules/v4/kyberzap/kyberzap.service.d.ts +1 -1
  25. package/dist/src/modules/v4/kyberzap/kyberzap.service.js +6 -2
  26. package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +5 -3
  27. package/dist/src/modules/v4/opportunity/opportunity.controller.js +1 -2
  28. package/dist/src/modules/v4/opportunity/opportunity.model.d.ts +2 -14
  29. package/dist/src/modules/v4/opportunity/opportunity.repository.d.ts +18 -8
  30. package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +9 -4
  31. package/dist/src/modules/v4/programPayload/programPayload.repository.d.ts +3 -0
  32. package/dist/src/modules/v4/programPayload/programPayload.repository.js +95 -25
  33. package/dist/src/modules/v4/protocol/protocol.controller.d.ts +6 -6
  34. package/dist/src/modules/v4/protocol/protocol.model.d.ts +3 -15
  35. package/dist/src/modules/v4/protocol/protocol.model.js +3 -4
  36. package/dist/src/modules/v4/protocol/protocol.repository.d.ts +5 -5
  37. package/dist/src/modules/v4/protocol/protocol.repository.js +11 -6
  38. package/dist/src/modules/v4/protocol/protocol.service.d.ts +2 -2
  39. package/dist/src/modules/v4/reward/reward.repository.d.ts +3 -2
  40. package/dist/src/modules/v4/reward/reward.service.d.ts +18 -12
  41. package/dist/src/modules/v4/router.d.ts +52 -55
  42. package/dist/src/modules/v4/token/token.controller.d.ts +33 -0
  43. package/dist/src/modules/v4/token/token.controller.js +14 -1
  44. package/dist/src/modules/v4/token/token.model.d.ts +8 -0
  45. package/dist/src/modules/v4/token/token.model.js +7 -0
  46. package/dist/src/modules/v4/token/token.service.d.ts +19 -1
  47. package/dist/src/modules/v4/token/token.service.js +10 -0
  48. package/dist/src/modules/v4/user/user.controller.d.ts +6 -4
  49. package/dist/tsconfig.package.tsbuildinfo +1 -1
  50. package/package.json +1 -1
  51. package/dist/src/modules/v4/zyfi/zyfi.model.d.ts +0 -45
  52. package/dist/src/modules/v4/zyfi/zyfi.model.js +0 -1
  53. package/dist/src/modules/v4/zyfi/zyfi.service.d.ts +0 -30
  54. package/dist/src/modules/v4/zyfi/zyfi.service.js +0 -35
package/package.json CHANGED
@@ -89,5 +89,5 @@
89
89
  "access": "public",
90
90
  "registry": "https://registry.npmjs.org/"
91
91
  },
92
- "version": "v0.10.231"
92
+ "version": "v0.10.233"
93
93
  }
@@ -1,45 +0,0 @@
1
- export type ZyfiApi = {
2
- "erc20_sponsored_paymaster/v1": {
3
- payload: {
4
- /**
5
- * Defaults to ZKsync Era
6
- */
7
- chainId?: number;
8
- feeTokenAddress?: string;
9
- /**
10
- * [0-100] how much of the tx to sponsor
11
- */
12
- sponsorshipRatio: number;
13
- /**
14
- * Defaults to 5, how many time can the user replay the tx
15
- */
16
- replayLimit?: string;
17
- txData: {
18
- from: string;
19
- to: string;
20
- data: string;
21
- };
22
- };
23
- response: {
24
- expirationTime: string;
25
- expiresIn: string;
26
- feeTokenAmount: string;
27
- feeTokendecimals: string;
28
- feeUSD: string;
29
- gasLimit: string;
30
- gasPrice: string;
31
- markup: string;
32
- maxNonce: string;
33
- protocolAddress: string;
34
- sponsorshipRatio: string;
35
- tokenAddress: string;
36
- tokenPrice: string;
37
- txData: {
38
- from: string;
39
- to: string;
40
- data: string;
41
- };
42
- warnings: string[];
43
- };
44
- };
45
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,30 +0,0 @@
1
- import type { ZyfiApi } from "./zyfi.model";
2
- export declare abstract class ZyfiService {
3
- #private;
4
- /**
5
- * Get sponsored tx from raw payload
6
- * @param transaction to wrap
7
- * @returns query
8
- */
9
- static wrapTx(transaction: ZyfiApi["erc20_sponsored_paymaster/v1"]["payload"]["txData"]): Promise<{
10
- expirationTime: string;
11
- expiresIn: string;
12
- feeTokenAmount: string;
13
- feeTokendecimals: string;
14
- feeUSD: string;
15
- gasLimit: string;
16
- gasPrice: string;
17
- markup: string;
18
- maxNonce: string;
19
- protocolAddress: string;
20
- sponsorshipRatio: string;
21
- tokenAddress: string;
22
- tokenPrice: string;
23
- txData: {
24
- from: string;
25
- to: string;
26
- data: string;
27
- };
28
- warnings: string[];
29
- }>;
30
- }
@@ -1,35 +0,0 @@
1
- export class ZyfiService {
2
- static async #fetch(call, resource = "Paymaster") {
3
- const { data, status } = await call();
4
- if (status === 404)
5
- throw new Response(`${resource} not found`, { status });
6
- if (status === 500)
7
- throw new Response(`${resource} unavailable`, { status });
8
- if (data == null)
9
- throw new Response(`${resource} unavailable`, { status });
10
- return data;
11
- }
12
- static async #post(route, payload) {
13
- const response = await fetch(`https://api.zyfi.org/api/${route}`, {
14
- method: "POST",
15
- headers: {
16
- "Content-Type": "application/json",
17
- "X-API-Key": process.env.ZYFI_API_KEY ?? "",
18
- },
19
- body: JSON.stringify(payload),
20
- });
21
- return (await response.json());
22
- }
23
- /**
24
- * Get sponsored tx from raw payload
25
- * @param transaction to wrap
26
- * @returns query
27
- */
28
- static async wrapTx(transaction) {
29
- const res = await ZyfiService.#post("erc20_sponsored_paymaster/v1", {
30
- txData: transaction,
31
- sponsorshipRatio: 100,
32
- });
33
- return res;
34
- }
35
- }