@glowlabs-org/events-sdk 1.0.1 → 1.0.3
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 +8 -0
- package/dist/base-event.d.ts +3 -3
- package/dist/base-event.js +6 -1
- package/dist/schemas/audit-pfees-paid.v1.d.ts +3 -0
- package/dist/schemas/audit-pfees-paid.v1.js +1 -0
- package/dist/schemas/audit-pfees-paid.v2.d.ts +3 -0
- package/dist/schemas/audit-pfees-paid.v2.js +1 -0
- package/dist/schemas/audit-pushed.v1.d.ts +3 -0
- package/dist/schemas/audit-pushed.v1.js +1 -0
- package/dist/schemas/audit-slashed.v1.d.ts +3 -0
- package/dist/schemas/audit-slashed.v1.js +1 -0
- package/package.json +1 -1
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
|
|
package/dist/base-event.d.ts
CHANGED
@@ -5,21 +5,21 @@ export declare const baseEventZ: z.ZodObject<{
|
|
5
5
|
zoneId: z.ZodEffects<z.ZodNumber, number, number>;
|
6
6
|
zoneName: z.ZodEnum<[string, ...string[]]>;
|
7
7
|
schemaVersion: z.ZodEffects<z.ZodNumber, 1 | 2, number>;
|
8
|
-
eventType: z.ZodEnum<["audit.pushed", "audit.slashed", "audit.pfees.paid"]>;
|
8
|
+
eventType: z.ZodEnum<["audit.pushed", "audit.slashed", "audit.pfees.paid", "application.created"]>;
|
9
9
|
timeStamp: z.ZodNumber;
|
10
10
|
}, "strip", z.ZodTypeAny, {
|
11
11
|
id: string;
|
12
12
|
zoneId: number;
|
13
13
|
zoneName: string;
|
14
14
|
schemaVersion: 1 | 2;
|
15
|
-
eventType: "audit.pushed" | "audit.slashed" | "audit.pfees.paid";
|
15
|
+
eventType: "audit.pushed" | "audit.slashed" | "audit.pfees.paid" | "application.created";
|
16
16
|
timeStamp: number;
|
17
17
|
}, {
|
18
18
|
id: string;
|
19
19
|
zoneId: number;
|
20
20
|
zoneName: string;
|
21
21
|
schemaVersion: number;
|
22
|
-
eventType: "audit.pushed" | "audit.slashed" | "audit.pfees.paid";
|
22
|
+
eventType: "audit.pushed" | "audit.slashed" | "audit.pfees.paid" | "application.created";
|
23
23
|
timeStamp: number;
|
24
24
|
}>;
|
25
25
|
export interface BaseEventAuditPushedV1 {
|
package/dist/base-event.js
CHANGED
@@ -17,6 +17,11 @@ exports.baseEventZ = zod_1.z.object({
|
|
17
17
|
.refine((v) => v === 1 || v === 2, {
|
18
18
|
message: "Invalid schemaVersion",
|
19
19
|
}),
|
20
|
-
eventType: zod_1.z.enum([
|
20
|
+
eventType: zod_1.z.enum([
|
21
|
+
"audit.pushed",
|
22
|
+
"audit.slashed",
|
23
|
+
"audit.pfees.paid",
|
24
|
+
"application.created",
|
25
|
+
]),
|
21
26
|
timeStamp: zod_1.z.number().int(),
|
22
27
|
});
|
@@ -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;
|
@@ -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
|
}>;
|
@@ -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>;
|
@@ -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
|
});
|