@glowlabs-org/events-sdk 1.0.1 → 1.0.2

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/README.md CHANGED
@@ -52,6 +52,7 @@ export interface AuditPushedV1Payload {
52
52
  farmId: string; // bytes32 hex string (0x...)
53
53
  protocolFeeUSDPrice_12Decimals: string; // uint256 (decimal) − 12 implied decimals
54
54
  expectedProduction_12Decimals: string; // uint256 (decimal) − 12 implied decimals
55
+ txHash: string; // bytes32 hex string (0x...)
55
56
  }
56
57
  ```
57
58
 
@@ -59,6 +60,7 @@ export interface AuditPushedV1Payload {
59
60
 
60
61
  - `farmId` must be a 32-byte hex string (e.g., `0x...`).
61
62
  - `protocolFeeUSDPrice_12Decimals` and `expectedProduction_12Decimals` must be decimal strings representing unsigned big integers.
63
+ - `txHash` must be a 32-byte hex string (e.g., `0x...`).
62
64
 
63
65
  ### `audit.slashed` v1
64
66
 
@@ -66,6 +68,7 @@ export interface AuditPushedV1Payload {
66
68
  export interface AuditSlashedV1Payload {
67
69
  farmId: string; // bytes32 hex string (0x...)
68
70
  slasher: string; // Ethereum address (0x...)
71
+ txHash: string; // bytes32 hex string (0x...)
69
72
  }
70
73
  ```
71
74
 
@@ -73,6 +76,7 @@ export interface AuditSlashedV1Payload {
73
76
 
74
77
  - `farmId` must be a 32-byte hex string (e.g., `0x...`).
75
78
  - `slasher` must be a valid Ethereum address (0x...40 hex chars).
79
+ - `txHash` must be a 32-byte hex string (e.g., `0x...`).
76
80
 
77
81
  ### `audit.pfees.paid` v1 (by applicationId)
78
82
 
@@ -81,6 +85,7 @@ export interface AuditPfeesPaidV1Payload {
81
85
  applicationId: string; // bytes32 hex string (0x...)
82
86
  payer: string; // Ethereum address (0x...)
83
87
  amount_12Decimals: string; // uint256 (decimal) − 12 implied decimals
88
+ txHash: string; // bytes32 hex string (0x...)
84
89
  }
85
90
  ```
86
91
 
@@ -89,6 +94,7 @@ export interface AuditPfeesPaidV1Payload {
89
94
  - `applicationId` must be a 32-byte hex string (e.g., `0x...`).
90
95
  - `payer` must be a valid Ethereum address (0x...40 hex chars).
91
96
  - `amount_12Decimals` must be a decimal string representing an unsigned big integer (12 implied decimals).
97
+ - `txHash` must be a 32-byte hex string (e.g., `0x...`).
92
98
 
93
99
  ### `audit.pfees.paid` v2 (by farmId)
94
100
 
@@ -97,6 +103,7 @@ export interface AuditPfeesPaidV2Payload {
97
103
  farmId: string; // bytes32 hex string (0x...)
98
104
  payer: string; // Ethereum address (0x...)
99
105
  amount_12Decimals: string; // uint256 (decimal) − 12 implied decimals
106
+ txHash: string; // bytes32 hex string (0x...)
100
107
  }
101
108
  ```
102
109
 
@@ -105,6 +112,7 @@ export interface AuditPfeesPaidV2Payload {
105
112
  - `farmId` must be a 32-byte hex string (e.g., `0x...`).
106
113
  - `payer` must be a valid Ethereum address (0x...40 hex chars).
107
114
  - `amount_12Decimals` must be a decimal string representing an unsigned big integer (12 implied decimals).
115
+ - `txHash` must be a 32-byte hex string (e.g., `0x...`).
108
116
 
109
117
  ### `application.created` v1
110
118
 
@@ -3,11 +3,14 @@ export declare const auditPfeesPaidV1PayloadZ: z.ZodObject<{
3
3
  applicationId: z.ZodString;
4
4
  payer: z.ZodString;
5
5
  amount_12Decimals: z.ZodString;
6
+ txHash: z.ZodString;
6
7
  }, "strip", z.ZodTypeAny, {
8
+ txHash: string;
7
9
  applicationId: string;
8
10
  payer: string;
9
11
  amount_12Decimals: string;
10
12
  }, {
13
+ txHash: string;
11
14
  applicationId: string;
12
15
  payer: string;
13
16
  amount_12Decimals: string;
@@ -11,4 +11,5 @@ exports.auditPfeesPaidV1PayloadZ = zod_1.z.object({
11
11
  amount_12Decimals: zod_1.z
12
12
  .string()
13
13
  .regex(uint256, "uint256 (decimal) − 12 implied decimals"),
14
+ txHash: zod_1.z.string().regex(hexBytes32, "bytes32 hex string"),
14
15
  });
@@ -3,12 +3,15 @@ export declare const auditPfeesPaidV2PayloadZ: z.ZodObject<{
3
3
  farmId: z.ZodString;
4
4
  payer: z.ZodString;
5
5
  amount_12Decimals: z.ZodString;
6
+ txHash: z.ZodString;
6
7
  }, "strip", z.ZodTypeAny, {
7
8
  farmId: string;
9
+ txHash: string;
8
10
  payer: string;
9
11
  amount_12Decimals: string;
10
12
  }, {
11
13
  farmId: string;
14
+ txHash: string;
12
15
  payer: string;
13
16
  amount_12Decimals: string;
14
17
  }>;
@@ -11,4 +11,5 @@ exports.auditPfeesPaidV2PayloadZ = zod_1.z.object({
11
11
  amount_12Decimals: zod_1.z
12
12
  .string()
13
13
  .regex(uint256, "uint256 (decimal) − 12 implied decimals"),
14
+ txHash: zod_1.z.string().regex(hexBytes32, "bytes32 hex string"),
14
15
  });
@@ -3,13 +3,16 @@ export declare const auditPushedV1PayloadZ: z.ZodObject<{
3
3
  farmId: z.ZodString;
4
4
  protocolFeeUSDPrice_12Decimals: z.ZodString;
5
5
  expectedProduction_12Decimals: z.ZodString;
6
+ txHash: z.ZodString;
6
7
  }, "strip", z.ZodTypeAny, {
7
8
  farmId: string;
8
9
  protocolFeeUSDPrice_12Decimals: string;
9
10
  expectedProduction_12Decimals: string;
11
+ txHash: string;
10
12
  }, {
11
13
  farmId: string;
12
14
  protocolFeeUSDPrice_12Decimals: string;
13
15
  expectedProduction_12Decimals: string;
16
+ txHash: string;
14
17
  }>;
15
18
  export type AuditPushedV1Payload = z.infer<typeof auditPushedV1PayloadZ>;
@@ -10,4 +10,5 @@ exports.auditPushedV1PayloadZ = zod_1.z.object({
10
10
  .string()
11
11
  .regex(uint256, "uint256 (decimal) − 12 implied decimals"),
12
12
  expectedProduction_12Decimals: zod_1.z.string().regex(uint256),
13
+ txHash: zod_1.z.string().regex(hexBytes32, "bytes32 hex string"),
13
14
  });
@@ -2,11 +2,14 @@ import { z } from "zod";
2
2
  export declare const auditSlashedV1PayloadZ: z.ZodObject<{
3
3
  farmId: z.ZodString;
4
4
  slasher: z.ZodString;
5
+ txHash: z.ZodString;
5
6
  }, "strip", z.ZodTypeAny, {
6
7
  farmId: string;
8
+ txHash: string;
7
9
  slasher: string;
8
10
  }, {
9
11
  farmId: string;
12
+ txHash: string;
10
13
  slasher: string;
11
14
  }>;
12
15
  export type AuditSlashedV1Payload = z.infer<typeof auditSlashedV1PayloadZ>;
@@ -7,4 +7,5 @@ const ethAddress = /^0x[0-9a-fA-F]{40}$/;
7
7
  exports.auditSlashedV1PayloadZ = zod_1.z.object({
8
8
  farmId: zod_1.z.string().regex(hexBytes32, "bytes32 hex string"),
9
9
  slasher: zod_1.z.string().regex(ethAddress, "Ethereum address"),
10
+ txHash: zod_1.z.string().regex(hexBytes32, "bytes32 hex string"),
10
11
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glowlabs-org/events-sdk",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Typed event SDK for Glow, powered by RabbitMQ and Zod.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",