@thirdweb-dev/service-utils 0.0.0-dev-baacf27-20230914091112 → 0.0.0-dev-bb06abb-20230915121226

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.
@@ -20,7 +20,7 @@ function getAws(options) {
20
20
  * Types
21
21
  */
22
22
  const usageEventSchema = zod.z.object({
23
- source: zod.z.enum(["wallet", "rpc", "storage", "bundler", "paymaster", "relayer"]),
23
+ source: zod.z.enum(["embeddedWallets", "rpc", "storage", "bundler", "paymaster", "relayer"]),
24
24
  action: zod.z.string(),
25
25
  accountId: zod.z.string(),
26
26
  // Optional
@@ -33,10 +33,11 @@ const usageEventSchema = zod.z.object({
33
33
  mimeType: zod.z.string().optional(),
34
34
  fileSize: zod.z.number().int().nonnegative().optional(),
35
35
  fileCid: zod.z.string().optional(),
36
- transactionHash: zod.z.string().optional(),
36
+ evmMethod: zod.z.string().optional(),
37
+ userOpHash: zod.z.string().optional(),
37
38
  gasLimit: zod.z.number().nonnegative().optional(),
38
39
  gasPricePerUnit: zod.z.string().optional(),
39
- userOpHash: zod.z.string().optional()
40
+ transactionHash: zod.z.string().optional()
40
41
  });
41
42
  /**
42
43
  * Publish usage events. Provide the relevant fields for your application.
@@ -20,7 +20,7 @@ function getAws(options) {
20
20
  * Types
21
21
  */
22
22
  const usageEventSchema = zod.z.object({
23
- source: zod.z.enum(["wallet", "rpc", "storage", "bundler", "paymaster", "relayer"]),
23
+ source: zod.z.enum(["embeddedWallets", "rpc", "storage", "bundler", "paymaster", "relayer"]),
24
24
  action: zod.z.string(),
25
25
  accountId: zod.z.string(),
26
26
  // Optional
@@ -33,10 +33,11 @@ const usageEventSchema = zod.z.object({
33
33
  mimeType: zod.z.string().optional(),
34
34
  fileSize: zod.z.number().int().nonnegative().optional(),
35
35
  fileCid: zod.z.string().optional(),
36
- transactionHash: zod.z.string().optional(),
36
+ evmMethod: zod.z.string().optional(),
37
+ userOpHash: zod.z.string().optional(),
37
38
  gasLimit: zod.z.number().nonnegative().optional(),
38
39
  gasPricePerUnit: zod.z.string().optional(),
39
- userOpHash: zod.z.string().optional()
40
+ transactionHash: zod.z.string().optional()
40
41
  });
41
42
  /**
42
43
  * Publish usage events. Provide the relevant fields for your application.
@@ -17,7 +17,7 @@ function getAws(options) {
17
17
  * Types
18
18
  */
19
19
  const usageEventSchema = z.object({
20
- source: z.enum(["wallet", "rpc", "storage", "bundler", "paymaster", "relayer"]),
20
+ source: z.enum(["embeddedWallets", "rpc", "storage", "bundler", "paymaster", "relayer"]),
21
21
  action: z.string(),
22
22
  accountId: z.string(),
23
23
  // Optional
@@ -30,10 +30,11 @@ const usageEventSchema = z.object({
30
30
  mimeType: z.string().optional(),
31
31
  fileSize: z.number().int().nonnegative().optional(),
32
32
  fileCid: z.string().optional(),
33
- transactionHash: z.string().optional(),
33
+ evmMethod: z.string().optional(),
34
+ userOpHash: z.string().optional(),
34
35
  gasLimit: z.number().nonnegative().optional(),
35
36
  gasPricePerUnit: z.string().optional(),
36
- userOpHash: z.string().optional()
37
+ transactionHash: z.string().optional()
37
38
  });
38
39
  /**
39
40
  * Publish usage events. Provide the relevant fields for your application.
@@ -3,7 +3,7 @@ import { z } from "zod";
3
3
  * Types
4
4
  */
5
5
  declare const usageEventSchema: z.ZodObject<{
6
- source: z.ZodEnum<["wallet", "rpc", "storage", "bundler", "paymaster", "relayer"]>;
6
+ source: z.ZodEnum<["embeddedWallets", "rpc", "storage", "bundler", "paymaster", "relayer"]>;
7
7
  action: z.ZodString;
8
8
  accountId: z.ZodString;
9
9
  apiKeyId: z.ZodOptional<z.ZodString>;
@@ -15,12 +15,13 @@ declare const usageEventSchema: z.ZodObject<{
15
15
  mimeType: z.ZodOptional<z.ZodString>;
16
16
  fileSize: z.ZodOptional<z.ZodNumber>;
17
17
  fileCid: z.ZodOptional<z.ZodString>;
18
- transactionHash: z.ZodOptional<z.ZodString>;
18
+ evmMethod: z.ZodOptional<z.ZodString>;
19
+ userOpHash: z.ZodOptional<z.ZodString>;
19
20
  gasLimit: z.ZodOptional<z.ZodNumber>;
20
21
  gasPricePerUnit: z.ZodOptional<z.ZodString>;
21
- userOpHash: z.ZodOptional<z.ZodString>;
22
+ transactionHash: z.ZodOptional<z.ZodString>;
22
23
  }, "strip", z.ZodTypeAny, {
23
- source: "storage" | "rpc" | "bundler" | "relayer" | "wallet" | "paymaster";
24
+ source: "storage" | "rpc" | "bundler" | "relayer" | "embeddedWallets" | "paymaster";
24
25
  accountId: string;
25
26
  action: string;
26
27
  apiKeyId?: string | undefined;
@@ -32,12 +33,13 @@ declare const usageEventSchema: z.ZodObject<{
32
33
  mimeType?: string | undefined;
33
34
  fileSize?: number | undefined;
34
35
  fileCid?: string | undefined;
35
- transactionHash?: string | undefined;
36
+ evmMethod?: string | undefined;
37
+ userOpHash?: string | undefined;
36
38
  gasLimit?: number | undefined;
37
39
  gasPricePerUnit?: string | undefined;
38
- userOpHash?: string | undefined;
40
+ transactionHash?: string | undefined;
39
41
  }, {
40
- source: "storage" | "rpc" | "bundler" | "relayer" | "wallet" | "paymaster";
42
+ source: "storage" | "rpc" | "bundler" | "relayer" | "embeddedWallets" | "paymaster";
41
43
  accountId: string;
42
44
  action: string;
43
45
  apiKeyId?: string | undefined;
@@ -49,10 +51,11 @@ declare const usageEventSchema: z.ZodObject<{
49
51
  mimeType?: string | undefined;
50
52
  fileSize?: number | undefined;
51
53
  fileCid?: string | undefined;
52
- transactionHash?: string | undefined;
54
+ evmMethod?: string | undefined;
55
+ userOpHash?: string | undefined;
53
56
  gasLimit?: number | undefined;
54
57
  gasPricePerUnit?: string | undefined;
55
- userOpHash?: string | undefined;
58
+ transactionHash?: string | undefined;
56
59
  }>;
57
60
  export type UsageEvent = z.infer<typeof usageEventSchema>;
58
61
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"usage.d.ts","sourceRoot":"../../../../src/cf-worker","sources":["usage.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB;;GAEG;AACH,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BpB,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D;;;;;;;;;;;;;GAaG;AACH,wBAAsB,kBAAkB,CACtC,WAAW,EAAE,UAAU,EAAE,EACzB,MAAM,EAAE;IACN,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GACA,OAAO,CAAC,IAAI,CAAC,CAiCf"}
1
+ {"version":3,"file":"usage.d.ts","sourceRoot":"../../../../src/cf-worker","sources":["usage.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB;;GAEG;AACH,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BpB,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D;;;;;;;;;;;;;GAaG;AACH,wBAAsB,kBAAkB,CACtC,WAAW,EAAE,UAAU,EAAE,EACzB,MAAM,EAAE;IACN,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GACA,OAAO,CAAC,IAAI,CAAC,CAiCf"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thirdweb-dev/service-utils",
3
- "version": "0.0.0-dev-baacf27-20230914091112",
3
+ "version": "0.0.0-dev-bb06abb-20230915121226",
4
4
  "main": "dist/thirdweb-dev-service-utils.cjs.js",
5
5
  "module": "dist/thirdweb-dev-service-utils.esm.js",
6
6
  "exports": {