@inodra/sui 0.1.0
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/LICENSE +202 -0
- package/README.md +237 -0
- package/bin/inodra-sui.mjs +2 -0
- package/dist/chunk-3CBLVI6J.js +426 -0
- package/dist/chunk-3CBLVI6J.js.map +1 -0
- package/dist/chunk-4HKKW5QN.js +80 -0
- package/dist/chunk-4HKKW5QN.js.map +1 -0
- package/dist/chunk-74XGJJJI.js +33 -0
- package/dist/chunk-74XGJJJI.js.map +1 -0
- package/dist/chunk-D6FZYWG7.js +99 -0
- package/dist/chunk-D6FZYWG7.js.map +1 -0
- package/dist/chunk-LZZMTSLH.js +31 -0
- package/dist/chunk-LZZMTSLH.js.map +1 -0
- package/dist/chunk-M3M2L6BW.js +29 -0
- package/dist/chunk-M3M2L6BW.js.map +1 -0
- package/dist/chunk-NSXRC5XW.js +298 -0
- package/dist/chunk-NSXRC5XW.js.map +1 -0
- package/dist/chunk-OGMBYWTG.js +537 -0
- package/dist/chunk-OGMBYWTG.js.map +1 -0
- package/dist/chunk-U6D5LGNF.js +111 -0
- package/dist/chunk-U6D5LGNF.js.map +1 -0
- package/dist/chunk-ZSW3EWGF.js +539 -0
- package/dist/chunk-ZSW3EWGF.js.map +1 -0
- package/dist/cli.js +665 -0
- package/dist/cli.js.map +1 -0
- package/dist/events.cjs +3273 -0
- package/dist/events.cjs.map +1 -0
- package/dist/events.d.cts +47 -0
- package/dist/events.d.ts +47 -0
- package/dist/events.js +2578 -0
- package/dist/events.js.map +1 -0
- package/dist/graphql.cjs +129 -0
- package/dist/graphql.cjs.map +1 -0
- package/dist/graphql.d.cts +36 -0
- package/dist/graphql.d.ts +36 -0
- package/dist/graphql.js +10 -0
- package/dist/graphql.js.map +1 -0
- package/dist/grpc-web.cjs +129 -0
- package/dist/grpc-web.cjs.map +1 -0
- package/dist/grpc-web.d.cts +31 -0
- package/dist/grpc-web.d.ts +31 -0
- package/dist/grpc-web.js +10 -0
- package/dist/grpc-web.js.map +1 -0
- package/dist/grpc.cjs +131 -0
- package/dist/grpc.cjs.map +1 -0
- package/dist/grpc.d.cts +34 -0
- package/dist/grpc.d.ts +34 -0
- package/dist/grpc.js +10 -0
- package/dist/grpc.js.map +1 -0
- package/dist/index-CGBN_EI5.d.ts +4800 -0
- package/dist/index-CVO2Kj8a.d.cts +4800 -0
- package/dist/index.cjs +4723 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +504 -0
- package/dist/index.d.ts +504 -0
- package/dist/index.js +59 -0
- package/dist/index.js.map +1 -0
- package/dist/manage.cjs +376 -0
- package/dist/manage.cjs.map +1 -0
- package/dist/manage.d.cts +2 -0
- package/dist/manage.d.ts +2 -0
- package/dist/manage.js +8 -0
- package/dist/manage.js.map +1 -0
- package/dist/network-CEg2MJY3.d.cts +60 -0
- package/dist/network-CEg2MJY3.d.ts +60 -0
- package/dist/node.cjs +4759 -0
- package/dist/node.cjs.map +1 -0
- package/dist/node.d.cts +28 -0
- package/dist/node.d.ts +28 -0
- package/dist/node.js +73 -0
- package/dist/node.js.map +1 -0
- package/dist/reflection-Bx44-Fs1.d.ts +4639 -0
- package/dist/reflection-Cf7WFH6H.d.cts +4639 -0
- package/dist/reflection-FEGYA7DU.js +9 -0
- package/dist/reflection-FEGYA7DU.js.map +1 -0
- package/dist/runtime-OWKF3LZ7.js +37 -0
- package/dist/runtime-OWKF3LZ7.js.map +1 -0
- package/dist/warp.cjs +633 -0
- package/dist/warp.cjs.map +1 -0
- package/dist/warp.d.cts +195 -0
- package/dist/warp.d.ts +195 -0
- package/dist/warp.js +12 -0
- package/dist/warp.js.map +1 -0
- package/dist/webhooks.cjs +104 -0
- package/dist/webhooks.cjs.map +1 -0
- package/dist/webhooks.d.cts +35 -0
- package/dist/webhooks.d.ts +35 -0
- package/dist/webhooks.js +7 -0
- package/dist/webhooks.js.map +1 -0
- package/llms.txt +189 -0
- package/package.json +119 -0
package/dist/node.cjs
ADDED
|
@@ -0,0 +1,4759 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __esm = (fn, res) => function __init() {
|
|
7
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
8
|
+
};
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from))
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
|
+
|
|
23
|
+
// src/core/auth.ts
|
|
24
|
+
function resolveAuth(auth) {
|
|
25
|
+
if (typeof auth === "string") {
|
|
26
|
+
return staticAuth(apiKeyCredentials(auth));
|
|
27
|
+
}
|
|
28
|
+
if ("apiKey" in auth) {
|
|
29
|
+
return staticAuth(apiKeyCredentials(auth.apiKey));
|
|
30
|
+
}
|
|
31
|
+
if ("sessionToken" in auth) {
|
|
32
|
+
return staticAuth({
|
|
33
|
+
headers: { authorization: `Bearer ${auth.sessionToken}` }
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
credentials: async () => auth.getCredentials(),
|
|
38
|
+
staticCredentials: () => void 0
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function authFromOptions(options, context) {
|
|
42
|
+
if (options.auth !== void 0) {
|
|
43
|
+
return resolveAuth(options.auth);
|
|
44
|
+
}
|
|
45
|
+
if (options.apiKey) {
|
|
46
|
+
return resolveAuth(options.apiKey);
|
|
47
|
+
}
|
|
48
|
+
throw new Error(`${context} requires auth (or the apiKey shorthand)`);
|
|
49
|
+
}
|
|
50
|
+
function staticAuthHeaders(options, context) {
|
|
51
|
+
const credentials = authFromOptions(options, context).staticCredentials();
|
|
52
|
+
if (!credentials) {
|
|
53
|
+
throw new Error(
|
|
54
|
+
`${context} does not support dynamic credential providers \u2014 pass an apiKey or sessionToken`
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
return credentials.headers;
|
|
58
|
+
}
|
|
59
|
+
function apiKeyCredentials(apiKey) {
|
|
60
|
+
if (!apiKey) {
|
|
61
|
+
throw new Error("Inodra auth: apiKey must be a non-empty string");
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
headers: { "x-api-key": apiKey },
|
|
65
|
+
queryParams: { api_key: apiKey }
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
function staticAuth(credentials) {
|
|
69
|
+
return {
|
|
70
|
+
credentials: async () => credentials,
|
|
71
|
+
staticCredentials: () => credentials
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
var init_auth = __esm({
|
|
75
|
+
"src/core/auth.ts"() {
|
|
76
|
+
"use strict";
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
// src/core/network.ts
|
|
81
|
+
function restBaseUrl(network) {
|
|
82
|
+
return INODRA_ENDPOINTS[network].rest;
|
|
83
|
+
}
|
|
84
|
+
function graphqlUrl(network) {
|
|
85
|
+
return INODRA_ENDPOINTS[network].graphql;
|
|
86
|
+
}
|
|
87
|
+
function grpcBaseUrl(network) {
|
|
88
|
+
return INODRA_ENDPOINTS[network].grpcWeb;
|
|
89
|
+
}
|
|
90
|
+
function grpcHost(network) {
|
|
91
|
+
return INODRA_ENDPOINTS[network].grpc;
|
|
92
|
+
}
|
|
93
|
+
function warpStreamUrl(network, subscriptionId) {
|
|
94
|
+
return `${INODRA_ENDPOINTS[network].rest}/warp/${subscriptionId}/stream`;
|
|
95
|
+
}
|
|
96
|
+
function warpWebSocketUrl(network, subscriptionId) {
|
|
97
|
+
return `${INODRA_ENDPOINTS[network].warpWs}/warp/${subscriptionId}/ws`;
|
|
98
|
+
}
|
|
99
|
+
var INODRA_ENDPOINTS;
|
|
100
|
+
var init_network = __esm({
|
|
101
|
+
"src/core/network.ts"() {
|
|
102
|
+
"use strict";
|
|
103
|
+
INODRA_ENDPOINTS = {
|
|
104
|
+
mainnet: {
|
|
105
|
+
rest: "https://mainnet-api.inodra.com/v1",
|
|
106
|
+
graphql: "https://mainnet-api.inodra.com/v1/graphql",
|
|
107
|
+
/** host:port for native gRPC transports */
|
|
108
|
+
grpc: "mainnet-grpc.inodra.com:443",
|
|
109
|
+
/** base URL for gRPC-Web transports */
|
|
110
|
+
grpcWeb: "https://mainnet-grpc.inodra.com",
|
|
111
|
+
warpWs: "wss://mainnet-api.inodra.com/v1"
|
|
112
|
+
},
|
|
113
|
+
testnet: {
|
|
114
|
+
rest: "https://testnet-api.inodra.com/v1",
|
|
115
|
+
graphql: "https://testnet-api.inodra.com/v1/graphql",
|
|
116
|
+
grpc: "testnet-grpc.inodra.com:443",
|
|
117
|
+
grpcWeb: "https://testnet-grpc.inodra.com",
|
|
118
|
+
warpWs: "wss://testnet-api.inodra.com/v1"
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
// src/core/version.ts
|
|
125
|
+
var SDK_VERSION, SDK_HEADER_NAME, SDK_HEADER_VALUE;
|
|
126
|
+
var init_version = __esm({
|
|
127
|
+
"src/core/version.ts"() {
|
|
128
|
+
"use strict";
|
|
129
|
+
SDK_VERSION = "0.1.0";
|
|
130
|
+
SDK_HEADER_NAME = "x-inodra-sdk";
|
|
131
|
+
SDK_HEADER_VALUE = `inodra-sdk-ts/${SDK_VERSION}`;
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
// src/events/runtime.ts
|
|
136
|
+
var runtime_exports = {};
|
|
137
|
+
__export(runtime_exports, {
|
|
138
|
+
baseEventType: () => baseEventType,
|
|
139
|
+
eventTypeMatches: () => eventTypeMatches,
|
|
140
|
+
innerEventType: () => innerEventType,
|
|
141
|
+
moveAddress: () => moveAddress,
|
|
142
|
+
moveBalance: () => moveBalance,
|
|
143
|
+
moveBool: () => moveBool,
|
|
144
|
+
moveBytes: () => moveBytes,
|
|
145
|
+
moveSmallUint: () => moveSmallUint,
|
|
146
|
+
moveString: () => moveString,
|
|
147
|
+
moveTypeName: () => moveTypeName,
|
|
148
|
+
moveUint: () => moveUint,
|
|
149
|
+
warpAddressPayloadSchema: () => warpAddressPayloadSchema,
|
|
150
|
+
warpCoinPayloadSchema: () => warpCoinPayloadSchema,
|
|
151
|
+
warpEventPayloadSchema: () => warpEventPayloadSchema,
|
|
152
|
+
warpObjectPayloadSchema: () => warpObjectPayloadSchema,
|
|
153
|
+
webhookEventBodySchema: () => webhookEventBodySchema
|
|
154
|
+
});
|
|
155
|
+
function baseEventType(eventType) {
|
|
156
|
+
const idx = eventType.indexOf("<");
|
|
157
|
+
return idx === -1 ? eventType : eventType.slice(0, idx);
|
|
158
|
+
}
|
|
159
|
+
function innerEventType(eventType) {
|
|
160
|
+
const start = eventType.indexOf("<");
|
|
161
|
+
if (start === -1 || !eventType.endsWith(">")) {
|
|
162
|
+
return void 0;
|
|
163
|
+
}
|
|
164
|
+
return eventType.slice(start + 1, -1);
|
|
165
|
+
}
|
|
166
|
+
function eventTypeMatches(rawEventType, deployment, generic) {
|
|
167
|
+
if (generic) {
|
|
168
|
+
return baseEventType(rawEventType) === deployment.eventType;
|
|
169
|
+
}
|
|
170
|
+
return rawEventType === deployment.eventType;
|
|
171
|
+
}
|
|
172
|
+
var import_zod, moveSmallUint, moveUint, moveBool, moveAddress, moveString, moveTypeName, moveBalance, moveBytes, warpEventPayloadSchema, warpAddressPayloadSchema, warpCoinPayloadSchema, warpObjectPayloadSchema, webhookEventBodySchema;
|
|
173
|
+
var init_runtime = __esm({
|
|
174
|
+
"src/events/runtime.ts"() {
|
|
175
|
+
"use strict";
|
|
176
|
+
import_zod = require("zod");
|
|
177
|
+
moveSmallUint = import_zod.z.number();
|
|
178
|
+
moveUint = import_zod.z.union([import_zod.z.string(), import_zod.z.number()]).transform((value) => String(value));
|
|
179
|
+
moveBool = import_zod.z.boolean();
|
|
180
|
+
moveAddress = import_zod.z.string();
|
|
181
|
+
moveString = import_zod.z.string();
|
|
182
|
+
moveTypeName = import_zod.z.union([import_zod.z.string(), import_zod.z.looseObject({ name: import_zod.z.string() })]).transform((value) => typeof value === "string" ? value : value.name);
|
|
183
|
+
moveBalance = import_zod.z.union([
|
|
184
|
+
import_zod.z.string(),
|
|
185
|
+
import_zod.z.number(),
|
|
186
|
+
import_zod.z.looseObject({ value: import_zod.z.union([import_zod.z.string(), import_zod.z.number()]) })
|
|
187
|
+
]).transform(
|
|
188
|
+
(value) => typeof value === "object" ? String(value.value) : String(value)
|
|
189
|
+
);
|
|
190
|
+
moveBytes = import_zod.z.union([import_zod.z.string(), import_zod.z.array(import_zod.z.number())]);
|
|
191
|
+
warpEventPayloadSchema = import_zod.z.looseObject({
|
|
192
|
+
activityType: import_zod.z.literal("package_event"),
|
|
193
|
+
txDigest: import_zod.z.string(),
|
|
194
|
+
eventSequence: import_zod.z.number(),
|
|
195
|
+
checkpoint: import_zod.z.number(),
|
|
196
|
+
timestamp: import_zod.z.number(),
|
|
197
|
+
/** Full concrete Move event type. */
|
|
198
|
+
type: import_zod.z.string(),
|
|
199
|
+
sender: import_zod.z.string(),
|
|
200
|
+
/** Decoded Move event payload — type with the generated catalog schemas. */
|
|
201
|
+
data: import_zod.z.unknown()
|
|
202
|
+
});
|
|
203
|
+
warpAddressPayloadSchema = import_zod.z.looseObject({
|
|
204
|
+
address: import_zod.z.string(),
|
|
205
|
+
activityType: import_zod.z.string(),
|
|
206
|
+
txDigest: import_zod.z.string(),
|
|
207
|
+
checkpoint: import_zod.z.number(),
|
|
208
|
+
timestamp: import_zod.z.number(),
|
|
209
|
+
objectId: import_zod.z.string().optional(),
|
|
210
|
+
objectType: import_zod.z.string().optional()
|
|
211
|
+
});
|
|
212
|
+
warpCoinPayloadSchema = import_zod.z.looseObject({
|
|
213
|
+
activityType: import_zod.z.literal("balance_change"),
|
|
214
|
+
address: import_zod.z.string(),
|
|
215
|
+
coin_type: import_zod.z.string(),
|
|
216
|
+
/** Signed amount, string for precision. */
|
|
217
|
+
amount: import_zod.z.string(),
|
|
218
|
+
txDigest: import_zod.z.string(),
|
|
219
|
+
checkpoint: import_zod.z.number(),
|
|
220
|
+
timestamp: import_zod.z.number()
|
|
221
|
+
});
|
|
222
|
+
warpObjectPayloadSchema = import_zod.z.looseObject({
|
|
223
|
+
activityType: import_zod.z.literal("object_change"),
|
|
224
|
+
object_id: import_zod.z.string(),
|
|
225
|
+
transactionDirection: import_zod.z.string(),
|
|
226
|
+
writeKind: import_zod.z.string(),
|
|
227
|
+
owner: import_zod.z.string().optional(),
|
|
228
|
+
previousOwner: import_zod.z.string().optional(),
|
|
229
|
+
txDigest: import_zod.z.string(),
|
|
230
|
+
checkpoint: import_zod.z.number(),
|
|
231
|
+
timestamp: import_zod.z.number()
|
|
232
|
+
});
|
|
233
|
+
webhookEventBodySchema = import_zod.z.looseObject({
|
|
234
|
+
payloadVersion: import_zod.z.number(),
|
|
235
|
+
payload: warpEventPayloadSchema.extend({ webhookId: import_zod.z.string() })
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
});
|
|
239
|
+
|
|
240
|
+
// src/events/move-types.ts
|
|
241
|
+
function splitArgs(inner) {
|
|
242
|
+
const parts = [];
|
|
243
|
+
let depth = 0;
|
|
244
|
+
let current = "";
|
|
245
|
+
for (const char of inner) {
|
|
246
|
+
if (char === "<") depth++;
|
|
247
|
+
if (char === ">") depth--;
|
|
248
|
+
if (char === "," && depth === 0) {
|
|
249
|
+
parts.push(current.trim());
|
|
250
|
+
current = "";
|
|
251
|
+
continue;
|
|
252
|
+
}
|
|
253
|
+
current += char;
|
|
254
|
+
}
|
|
255
|
+
if (current.trim()) parts.push(current.trim());
|
|
256
|
+
return parts;
|
|
257
|
+
}
|
|
258
|
+
function parseMoveType(input) {
|
|
259
|
+
const type = input.trim();
|
|
260
|
+
if (PRIMITIVES.has(type)) {
|
|
261
|
+
return { kind: "prim", prim: type };
|
|
262
|
+
}
|
|
263
|
+
if (type.startsWith("vector<") && type.endsWith(">")) {
|
|
264
|
+
return { kind: "vector", inner: parseMoveType(type.slice(7, -1)) };
|
|
265
|
+
}
|
|
266
|
+
const param = /^\$(\d+)$/.exec(type);
|
|
267
|
+
if (param) {
|
|
268
|
+
return { kind: "param", index: Number(param[1]) };
|
|
269
|
+
}
|
|
270
|
+
const generic = type.indexOf("<");
|
|
271
|
+
const base = generic === -1 ? type : type.slice(0, generic);
|
|
272
|
+
const args = generic === -1 || !type.endsWith(">") ? [] : splitArgs(type.slice(generic + 1, -1)).map(parseMoveType);
|
|
273
|
+
const [address, module2, name, ...rest] = base.split("::");
|
|
274
|
+
if (address?.startsWith("0x") && module2 && name && rest.length === 0) {
|
|
275
|
+
return {
|
|
276
|
+
kind: "struct",
|
|
277
|
+
address: normalizeAddress(address),
|
|
278
|
+
module: module2,
|
|
279
|
+
name,
|
|
280
|
+
args
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
return { kind: "opaque", raw: type };
|
|
284
|
+
}
|
|
285
|
+
function normalizeAddress(address) {
|
|
286
|
+
return address.replace(/^0x0+(?=[0-9a-fA-F])/, "0x");
|
|
287
|
+
}
|
|
288
|
+
function formatMoveType(node) {
|
|
289
|
+
switch (node.kind) {
|
|
290
|
+
case "prim":
|
|
291
|
+
return node.prim;
|
|
292
|
+
case "vector":
|
|
293
|
+
return `vector<${formatMoveType(node.inner)}>`;
|
|
294
|
+
case "param":
|
|
295
|
+
return `$${node.index}`;
|
|
296
|
+
case "opaque":
|
|
297
|
+
return node.raw;
|
|
298
|
+
case "struct": {
|
|
299
|
+
const base = `${node.address}::${node.module}::${node.name}`;
|
|
300
|
+
return node.args.length === 0 ? base : `${base}<${node.args.map(formatMoveType).join(", ")}>`;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
function substituteTypeParams(node, args) {
|
|
305
|
+
switch (node.kind) {
|
|
306
|
+
case "param":
|
|
307
|
+
return args[node.index] ?? node;
|
|
308
|
+
case "vector":
|
|
309
|
+
return { kind: "vector", inner: substituteTypeParams(node.inner, args) };
|
|
310
|
+
case "struct":
|
|
311
|
+
return {
|
|
312
|
+
...node,
|
|
313
|
+
args: node.args.map((a) => substituteTypeParams(a, args))
|
|
314
|
+
};
|
|
315
|
+
default:
|
|
316
|
+
return node;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
async function resolveShape(node, resolveStruct, depth = 0, stack = []) {
|
|
320
|
+
switch (node.kind) {
|
|
321
|
+
case "prim":
|
|
322
|
+
switch (node.prim) {
|
|
323
|
+
case "u8":
|
|
324
|
+
case "u16":
|
|
325
|
+
case "u32":
|
|
326
|
+
return { kind: "smallUint" };
|
|
327
|
+
case "u64":
|
|
328
|
+
case "u128":
|
|
329
|
+
case "u256":
|
|
330
|
+
return { kind: "uint" };
|
|
331
|
+
case "bool":
|
|
332
|
+
return { kind: "bool" };
|
|
333
|
+
case "address":
|
|
334
|
+
case "signer":
|
|
335
|
+
return { kind: "address" };
|
|
336
|
+
default:
|
|
337
|
+
return { kind: "unknown" };
|
|
338
|
+
}
|
|
339
|
+
case "vector":
|
|
340
|
+
if (node.inner.kind === "prim" && node.inner.prim === "u8") {
|
|
341
|
+
return { kind: "bytes" };
|
|
342
|
+
}
|
|
343
|
+
return {
|
|
344
|
+
kind: "vector",
|
|
345
|
+
inner: await resolveShape(node.inner, resolveStruct, depth, stack)
|
|
346
|
+
};
|
|
347
|
+
case "param":
|
|
348
|
+
case "opaque":
|
|
349
|
+
return { kind: "unknown" };
|
|
350
|
+
case "struct": {
|
|
351
|
+
const base = `${node.address}::${node.module}::${node.name}`;
|
|
352
|
+
switch (base) {
|
|
353
|
+
case "0x1::string::String":
|
|
354
|
+
case "0x1::ascii::String":
|
|
355
|
+
case "0x2::url::Url":
|
|
356
|
+
return { kind: "string" };
|
|
357
|
+
case "0x1::type_name::TypeName":
|
|
358
|
+
return { kind: "typeName" };
|
|
359
|
+
case "0x2::object::ID":
|
|
360
|
+
return { kind: "address" };
|
|
361
|
+
case "0x2::balance::Balance":
|
|
362
|
+
return { kind: "balance" };
|
|
363
|
+
case "0x1::option::Option": {
|
|
364
|
+
const inner = node.args[0];
|
|
365
|
+
if (node.args.length === 1 && inner) {
|
|
366
|
+
return {
|
|
367
|
+
kind: "option",
|
|
368
|
+
inner: await resolveShape(inner, resolveStruct, depth, stack)
|
|
369
|
+
};
|
|
370
|
+
}
|
|
371
|
+
return { kind: "unknown" };
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
const key = formatMoveType(node);
|
|
375
|
+
if (depth >= MAX_DEPTH || stack.includes(key)) {
|
|
376
|
+
return { kind: "unknown" };
|
|
377
|
+
}
|
|
378
|
+
const definition = await resolveStruct(node);
|
|
379
|
+
if (!definition) {
|
|
380
|
+
return { kind: "unknown" };
|
|
381
|
+
}
|
|
382
|
+
const fields = await Promise.all(
|
|
383
|
+
definition.map(async (field) => ({
|
|
384
|
+
name: field.name,
|
|
385
|
+
value: await resolveShape(
|
|
386
|
+
substituteTypeParams(field.type, node.args),
|
|
387
|
+
resolveStruct,
|
|
388
|
+
depth + 1,
|
|
389
|
+
[...stack, key]
|
|
390
|
+
)
|
|
391
|
+
}))
|
|
392
|
+
);
|
|
393
|
+
return { kind: "object", fields };
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
function shapeToZod(shape) {
|
|
398
|
+
switch (shape.kind) {
|
|
399
|
+
case "smallUint":
|
|
400
|
+
return moveSmallUint;
|
|
401
|
+
case "uint":
|
|
402
|
+
return moveUint;
|
|
403
|
+
case "bool":
|
|
404
|
+
return moveBool;
|
|
405
|
+
case "address":
|
|
406
|
+
return moveAddress;
|
|
407
|
+
case "string":
|
|
408
|
+
return moveString;
|
|
409
|
+
case "typeName":
|
|
410
|
+
return moveTypeName;
|
|
411
|
+
case "balance":
|
|
412
|
+
return moveBalance;
|
|
413
|
+
case "bytes":
|
|
414
|
+
return moveBytes;
|
|
415
|
+
case "option":
|
|
416
|
+
return shapeToZod(shape.inner).nullable();
|
|
417
|
+
case "vector":
|
|
418
|
+
return import_zod2.z.array(shapeToZod(shape.inner));
|
|
419
|
+
case "object":
|
|
420
|
+
return import_zod2.z.looseObject(
|
|
421
|
+
Object.fromEntries(
|
|
422
|
+
shape.fields.map((f) => [f.name, shapeToZod(f.value)])
|
|
423
|
+
)
|
|
424
|
+
);
|
|
425
|
+
case "unknown":
|
|
426
|
+
return import_zod2.z.unknown();
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
function shapeToExpr(shape, used, indent = "") {
|
|
430
|
+
const primitive = PRIMITIVE_EXPRS[shape.kind];
|
|
431
|
+
if (primitive) {
|
|
432
|
+
used.add(primitive);
|
|
433
|
+
return primitive;
|
|
434
|
+
}
|
|
435
|
+
switch (shape.kind) {
|
|
436
|
+
case "option":
|
|
437
|
+
return `${shapeToExpr(shape.inner, used, indent)}.nullable()`;
|
|
438
|
+
case "vector":
|
|
439
|
+
return `z.array(${shapeToExpr(shape.inner, used, indent)})`;
|
|
440
|
+
case "object": {
|
|
441
|
+
const lines = ["z.looseObject({"];
|
|
442
|
+
for (const field of shape.fields) {
|
|
443
|
+
lines.push(
|
|
444
|
+
`${indent} ${JSON.stringify(field.name)}: ${shapeToExpr(field.value, used, `${indent} `)},`
|
|
445
|
+
);
|
|
446
|
+
}
|
|
447
|
+
lines.push(`${indent}})`);
|
|
448
|
+
return lines.join("\n");
|
|
449
|
+
}
|
|
450
|
+
default:
|
|
451
|
+
return "z.unknown()";
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
var import_zod2, PRIMITIVES, MAX_DEPTH, PRIMITIVE_EXPRS;
|
|
455
|
+
var init_move_types = __esm({
|
|
456
|
+
"src/events/move-types.ts"() {
|
|
457
|
+
"use strict";
|
|
458
|
+
import_zod2 = require("zod");
|
|
459
|
+
init_runtime();
|
|
460
|
+
PRIMITIVES = /* @__PURE__ */ new Set([
|
|
461
|
+
"u8",
|
|
462
|
+
"u16",
|
|
463
|
+
"u32",
|
|
464
|
+
"u64",
|
|
465
|
+
"u128",
|
|
466
|
+
"u256",
|
|
467
|
+
"bool",
|
|
468
|
+
"address",
|
|
469
|
+
"signer"
|
|
470
|
+
]);
|
|
471
|
+
MAX_DEPTH = 6;
|
|
472
|
+
PRIMITIVE_EXPRS = {
|
|
473
|
+
smallUint: "moveSmallUint",
|
|
474
|
+
uint: "moveUint",
|
|
475
|
+
bool: "moveBool",
|
|
476
|
+
address: "moveAddress",
|
|
477
|
+
string: "moveString",
|
|
478
|
+
typeName: "moveTypeName",
|
|
479
|
+
balance: "moveBalance",
|
|
480
|
+
bytes: "moveBytes"
|
|
481
|
+
};
|
|
482
|
+
}
|
|
483
|
+
});
|
|
484
|
+
|
|
485
|
+
// src/events/reflection.ts
|
|
486
|
+
var reflection_exports = {};
|
|
487
|
+
__export(reflection_exports, {
|
|
488
|
+
EventSchemaReflector: () => EventSchemaReflector
|
|
489
|
+
});
|
|
490
|
+
function extractEventPayload(input, depth = 0) {
|
|
491
|
+
if (depth > 3 || typeof input !== "object" || input === null) {
|
|
492
|
+
return void 0;
|
|
493
|
+
}
|
|
494
|
+
const record = input;
|
|
495
|
+
if (typeof record.type === "string" && record.type.includes("::") && "data" in record) {
|
|
496
|
+
return { type: record.type, data: record.data };
|
|
497
|
+
}
|
|
498
|
+
return extractEventPayload(record.payload, depth + 1) ?? extractEventPayload(record.data, depth + 1);
|
|
499
|
+
}
|
|
500
|
+
var STRUCT_QUERY, EventSchemaReflector;
|
|
501
|
+
var init_reflection = __esm({
|
|
502
|
+
"src/events/reflection.ts"() {
|
|
503
|
+
"use strict";
|
|
504
|
+
init_auth();
|
|
505
|
+
init_network();
|
|
506
|
+
init_version();
|
|
507
|
+
init_move_types();
|
|
508
|
+
init_runtime();
|
|
509
|
+
STRUCT_QUERY = `query($pkg: SuiAddress!, $module: String!, $struct: String!) {
|
|
510
|
+
package(address: $pkg) {
|
|
511
|
+
module(name: $module) { struct(name: $struct) { fields { name type { repr } } } }
|
|
512
|
+
}
|
|
513
|
+
}`;
|
|
514
|
+
EventSchemaReflector = class {
|
|
515
|
+
url;
|
|
516
|
+
headers;
|
|
517
|
+
fetchImpl;
|
|
518
|
+
/** Struct-definition cache, keyed by `address::module::name`. */
|
|
519
|
+
structs = /* @__PURE__ */ new Map();
|
|
520
|
+
/** Resolved shape cache, keyed by the canonical concrete type string. */
|
|
521
|
+
shapes = /* @__PURE__ */ new Map();
|
|
522
|
+
schemas = /* @__PURE__ */ new Map();
|
|
523
|
+
constructor(options = {}) {
|
|
524
|
+
this.url = options.url ?? graphqlUrl(options.network ?? "mainnet");
|
|
525
|
+
this.fetchImpl = options.fetch ?? globalThis.fetch;
|
|
526
|
+
const headers = {
|
|
527
|
+
"content-type": "application/json",
|
|
528
|
+
[SDK_HEADER_NAME]: SDK_HEADER_VALUE
|
|
529
|
+
};
|
|
530
|
+
if (options.auth !== void 0 || options.apiKey) {
|
|
531
|
+
const credentials = authFromOptions(
|
|
532
|
+
options,
|
|
533
|
+
"EventSchemaReflector"
|
|
534
|
+
).staticCredentials();
|
|
535
|
+
if (!credentials) {
|
|
536
|
+
throw new Error(
|
|
537
|
+
"EventSchemaReflector does not support dynamic credential providers"
|
|
538
|
+
);
|
|
539
|
+
}
|
|
540
|
+
Object.assign(headers, credentials.headers);
|
|
541
|
+
}
|
|
542
|
+
this.headers = headers;
|
|
543
|
+
}
|
|
544
|
+
/**
|
|
545
|
+
* Resolved schema shape for a concrete Move type (cached). Useful for
|
|
546
|
+
* codegen and introspection; most callers want {@link schemaFor}.
|
|
547
|
+
*/
|
|
548
|
+
shapeFor(type) {
|
|
549
|
+
const node = parseMoveType(type);
|
|
550
|
+
const key = formatMoveType(node);
|
|
551
|
+
let pending = this.shapes.get(key);
|
|
552
|
+
if (!pending) {
|
|
553
|
+
pending = resolveShape(node, (struct) => this.structFields(struct));
|
|
554
|
+
this.shapes.set(key, pending);
|
|
555
|
+
pending.catch(() => this.shapes.delete(key));
|
|
556
|
+
}
|
|
557
|
+
return pending;
|
|
558
|
+
}
|
|
559
|
+
/**
|
|
560
|
+
* Build (and cache) a loose, normalizing zod schema for any concrete Move
|
|
561
|
+
* event type. Same encoding rules as the generated catalog schemas.
|
|
562
|
+
*/
|
|
563
|
+
schemaFor(type) {
|
|
564
|
+
const key = formatMoveType(parseMoveType(type));
|
|
565
|
+
let pending = this.schemas.get(key);
|
|
566
|
+
if (!pending) {
|
|
567
|
+
pending = this.shapeFor(type).then((shape) => {
|
|
568
|
+
if (shape.kind !== "object") {
|
|
569
|
+
throw new Error(
|
|
570
|
+
`${type} did not resolve to a struct \u2014 is it a Move event type on this network?`
|
|
571
|
+
);
|
|
572
|
+
}
|
|
573
|
+
return shapeToZod(shape);
|
|
574
|
+
});
|
|
575
|
+
this.schemas.set(key, pending);
|
|
576
|
+
pending.catch(() => this.schemas.delete(key));
|
|
577
|
+
}
|
|
578
|
+
return pending;
|
|
579
|
+
}
|
|
580
|
+
/**
|
|
581
|
+
* Validate + normalize an event payload against the reflected schema.
|
|
582
|
+
* Accepts a Warp stream message, a bare `{type, data}` event payload, or
|
|
583
|
+
* a webhook body. Returns undefined when the message carries a different
|
|
584
|
+
* event type; throws when the payload doesn't fit the reflected schema.
|
|
585
|
+
*
|
|
586
|
+
* Matching: exact when `type` is fully instantiated; base-type when
|
|
587
|
+
* `type` has no generics (all instantiations match).
|
|
588
|
+
*/
|
|
589
|
+
async parseEvent(message, type) {
|
|
590
|
+
const payload = extractEventPayload(message);
|
|
591
|
+
if (!payload) {
|
|
592
|
+
return void 0;
|
|
593
|
+
}
|
|
594
|
+
const canonical = (t) => formatMoveType(parseMoveType(t));
|
|
595
|
+
const requested = canonical(type);
|
|
596
|
+
const matches2 = type.includes("<") ? canonical(payload.type) === requested : canonical(baseEventType(payload.type)) === requested;
|
|
597
|
+
if (!matches2) {
|
|
598
|
+
return void 0;
|
|
599
|
+
}
|
|
600
|
+
const schema = await this.schemaFor(
|
|
601
|
+
type.includes("<") ? type : payload.type
|
|
602
|
+
);
|
|
603
|
+
return schema.parse(payload.data);
|
|
604
|
+
}
|
|
605
|
+
structFields(struct) {
|
|
606
|
+
const key = `${struct.address}::${struct.module}::${struct.name}`;
|
|
607
|
+
let pending = this.structs.get(key);
|
|
608
|
+
if (!pending) {
|
|
609
|
+
pending = this.fetchStruct(struct);
|
|
610
|
+
this.structs.set(key, pending);
|
|
611
|
+
pending.catch(() => this.structs.delete(key));
|
|
612
|
+
}
|
|
613
|
+
return pending;
|
|
614
|
+
}
|
|
615
|
+
async fetchStruct(struct) {
|
|
616
|
+
let lastError;
|
|
617
|
+
for (let attempt = 0; attempt < 3; attempt++) {
|
|
618
|
+
try {
|
|
619
|
+
const response = await this.fetchImpl(this.url, {
|
|
620
|
+
method: "POST",
|
|
621
|
+
headers: this.headers,
|
|
622
|
+
body: JSON.stringify({
|
|
623
|
+
query: STRUCT_QUERY,
|
|
624
|
+
variables: {
|
|
625
|
+
pkg: struct.address,
|
|
626
|
+
module: struct.module,
|
|
627
|
+
struct: struct.name
|
|
628
|
+
}
|
|
629
|
+
})
|
|
630
|
+
});
|
|
631
|
+
if (!response.ok) {
|
|
632
|
+
throw new Error(`GraphQL reflection failed: HTTP ${response.status}`);
|
|
633
|
+
}
|
|
634
|
+
const body = await response.json();
|
|
635
|
+
if (body.errors) {
|
|
636
|
+
throw new Error(
|
|
637
|
+
`GraphQL reflection errors: ${JSON.stringify(body.errors)}`
|
|
638
|
+
);
|
|
639
|
+
}
|
|
640
|
+
const fields = body.data?.package?.module?.struct?.fields;
|
|
641
|
+
if (!fields) {
|
|
642
|
+
return void 0;
|
|
643
|
+
}
|
|
644
|
+
return fields.map((field) => ({
|
|
645
|
+
name: field.name,
|
|
646
|
+
type: parseMoveType(field.type.repr)
|
|
647
|
+
}));
|
|
648
|
+
} catch (error) {
|
|
649
|
+
lastError = error;
|
|
650
|
+
await new Promise((r) => setTimeout(r, 300 * 2 ** attempt));
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
throw lastError;
|
|
654
|
+
}
|
|
655
|
+
};
|
|
656
|
+
}
|
|
657
|
+
});
|
|
658
|
+
|
|
659
|
+
// src/generated/events.ts
|
|
660
|
+
var import_zod3, _7kConfirmSwapSchema, _7kSwapSchema, AftermathDepositSchema, AftermathPerpFundingSchema, AftermathPerpLiquidatedSchema, AftermathSwapSchema, AlphafiLiquidityChangeSchema, AlphafiRewardSchema, BluefinFeeCollectedSchema, BluefinLiquidityProvidedSchema, BluefinLiquidityRemovedSchema, BluefinPoolCreatedSchema, BluefinPositionClosedSchema, BluefinPositionOpenedSchema, BluefinRewardCollectedSchema, BluefinSwapSchema, BucketBorrowSchema, BucketDepositCollateralSchema, BucketPositionUpdatedSchema, BucketRedeemSchema, BucketRepaySchema, BucketSbuckDepositSchema, BucketSbuckRewardsSchema, BucketWithdrawCollateralSchema, CetusAddLiquiditySchema, CetusClosePositionSchema, CetusCollectFeeSchema, CetusCreatePoolSchema, CetusOpenPositionSchema, CetusRemoveLiquiditySchema, CetusSwapSchema, CurrentBorrowSchema, CurrentDepositSchema, CurrentLiquidateSchema, CurrentRepaySchema, CurrentWithdrawSchema, DeepbookBalanceSchema, DeepbookFlashLoanSchema, DeepbookOrderCanceledSchema, DeepbookOrderFilledSchema, DeepbookOrderInfoSchema, DeepbookOrderPlacedSchema, EmberDepositSchema, EmberRateUpdatedSchema, EmberRedeemProcessedSchema, EmberRedeemRequestSchema, FlowxAmmPairCreatedSchema, FlowxAmmSwapSchema, FlowxClmmPoolCreatedSchema, FlowxClmmSwapSchema, HaedalInstantUnstakedSchema, HaedalStakedSchema, HaedalUnstakedSchema, KaiAddLiquiditySchema, KaiDeleverageSchema, KaiLiquidationSchema, KaiPositionOpenSchema, KaiReduceSchema, KaiSupplySchema, KaiSupplyWithdrawSchema, KriyaAddLiquiditySchema, KriyaSwapSchema, MagmaAddLiquiditySchema, MagmaCollectFeeSchema, MagmaCollectRewardSchema, MagmaCreatePoolSchema, MagmaRemoveLiquiditySchema, MagmaSwapSchema, MoleAddDebtSchema, MoleDepositSchema, MoleHarvestSchema, MoleKillSchema, MoleWithdrawSchema, MoleWorkSchema, MomentumAddLiquiditySchema, MomentumCollectFeeSchema, MomentumCollectRewardSchema, MomentumPoolCreatedSchema, MomentumRemoveLiquiditySchema, MomentumRepayFlashSwapSchema, MomentumSwapSchema, NaviBorrowSchema, NaviDepositSchema, NaviLiquidationSchema, NaviRepaySchema, NaviWithdrawSchema, PythPriceFeedUpdateSchema, ScallopBorrowSchema, ScallopCollateralDepositSchema, ScallopCollateralWithdrawSchema, ScallopLiquidationSchema, ScallopRepaySchema, SpringsuiEpochChangedSchema, SpringsuiStakeSchema, SpringsuiUnstakeSchema, SteammBankDepositSchema, SteammBankWithdrawSchema, SuilendBorrowSchema, SuilendClaimRewardSchema, SuilendDepositSchema, SuilendLiquidateSchema, SuilendRepaySchema, SuilendWithdrawSchema, SupraPriceUpdateSchema, TurbosAddLiquiditySchema, TurbosPoolCreatedSchema, TurbosRemoveLiquiditySchema, TurbosSwapSchema, TypusDovAuctionSchema, TypusDovBidSchema, TypusDovSettleSchema, TypusPerpFundingSchema, TypusPerpLiquidateSchema, TypusPerpLpBurnSchema, TypusPerpLpMintSchema, TypusPerpOrderSchema, VoloStakedSchema, VoloUnstakedSchema, WalrusBlobCertifiedSchema, WalrusBlobDeletedSchema, WalrusBlobRegisteredSchema, catalogEvents;
|
|
661
|
+
var init_events = __esm({
|
|
662
|
+
"src/generated/events.ts"() {
|
|
663
|
+
"use strict";
|
|
664
|
+
import_zod3 = require("zod");
|
|
665
|
+
init_runtime();
|
|
666
|
+
_7kConfirmSwapSchema = import_zod3.z.looseObject({
|
|
667
|
+
"quote_id": moveString,
|
|
668
|
+
"from": moveTypeName,
|
|
669
|
+
"target": moveTypeName,
|
|
670
|
+
"amount_in": moveUint,
|
|
671
|
+
"amount_out": moveUint,
|
|
672
|
+
"fee_amount": moveUint,
|
|
673
|
+
"fee_rate": moveSmallUint,
|
|
674
|
+
"fee_recipient": moveAddress,
|
|
675
|
+
"expect_amount_out": moveUint,
|
|
676
|
+
"amount_out_limit": moveUint
|
|
677
|
+
});
|
|
678
|
+
_7kSwapSchema = import_zod3.z.looseObject({
|
|
679
|
+
"quote_id": moveString,
|
|
680
|
+
"pool_id": moveAddress,
|
|
681
|
+
"dex": moveString,
|
|
682
|
+
"from": moveTypeName,
|
|
683
|
+
"target": moveTypeName,
|
|
684
|
+
"amount_in": moveUint,
|
|
685
|
+
"amount_out": moveUint,
|
|
686
|
+
"amount_in_remaining": moveUint
|
|
687
|
+
});
|
|
688
|
+
AftermathDepositSchema = import_zod3.z.looseObject({
|
|
689
|
+
"pool_id": moveAddress,
|
|
690
|
+
"issuer": moveAddress,
|
|
691
|
+
"referrer": moveAddress.nullable(),
|
|
692
|
+
"types": import_zod3.z.array(moveString),
|
|
693
|
+
"deposits": import_zod3.z.array(moveUint),
|
|
694
|
+
"reserves": import_zod3.z.array(moveUint),
|
|
695
|
+
"lp_coins_minted": moveUint
|
|
696
|
+
});
|
|
697
|
+
AftermathPerpFundingSchema = import_zod3.z.looseObject({
|
|
698
|
+
"ch_id": moveAddress,
|
|
699
|
+
"account_id": moveUint,
|
|
700
|
+
"collateral_change_usd": moveUint,
|
|
701
|
+
"collateral_after": moveUint
|
|
702
|
+
});
|
|
703
|
+
AftermathPerpLiquidatedSchema = import_zod3.z.looseObject({
|
|
704
|
+
"ch_id": moveAddress,
|
|
705
|
+
"liqee_account_id": moveUint,
|
|
706
|
+
"liqor_account_id": moveUint,
|
|
707
|
+
"is_liqee_long": moveBool,
|
|
708
|
+
"base_liquidated": moveUint,
|
|
709
|
+
"quote_liquidated": moveUint,
|
|
710
|
+
"bad_debt": moveUint
|
|
711
|
+
});
|
|
712
|
+
AftermathSwapSchema = import_zod3.z.looseObject({
|
|
713
|
+
"pool_id": moveAddress,
|
|
714
|
+
"issuer": moveAddress,
|
|
715
|
+
"referrer": moveAddress.nullable(),
|
|
716
|
+
"types_in": import_zod3.z.array(moveString),
|
|
717
|
+
"amounts_in": import_zod3.z.array(moveUint),
|
|
718
|
+
"types_out": import_zod3.z.array(moveString),
|
|
719
|
+
"amounts_out": import_zod3.z.array(moveUint),
|
|
720
|
+
"reserves": import_zod3.z.array(moveUint)
|
|
721
|
+
});
|
|
722
|
+
AlphafiLiquidityChangeSchema = import_zod3.z.looseObject({
|
|
723
|
+
"pool_id": moveAddress,
|
|
724
|
+
"event_type": moveSmallUint,
|
|
725
|
+
"amount_a": moveUint,
|
|
726
|
+
"amount_b": moveUint,
|
|
727
|
+
"total_amount_a": moveUint,
|
|
728
|
+
"total_amount_b": moveUint,
|
|
729
|
+
"fee_collected_a": moveUint,
|
|
730
|
+
"fee_collected_b": moveUint,
|
|
731
|
+
"tokens_invested": moveUint,
|
|
732
|
+
"sender": moveAddress
|
|
733
|
+
});
|
|
734
|
+
AlphafiRewardSchema = import_zod3.z.looseObject({
|
|
735
|
+
"coin_type": moveTypeName,
|
|
736
|
+
"amount": moveUint,
|
|
737
|
+
"investor_id": moveAddress,
|
|
738
|
+
"fee_collected": moveUint,
|
|
739
|
+
"total_amount_a": moveUint,
|
|
740
|
+
"total_amount_b": moveUint,
|
|
741
|
+
"sender": moveAddress
|
|
742
|
+
});
|
|
743
|
+
BluefinFeeCollectedSchema = import_zod3.z.looseObject({
|
|
744
|
+
"pool_id": moveAddress,
|
|
745
|
+
"position_id": moveAddress,
|
|
746
|
+
"coin_a_amount": moveUint,
|
|
747
|
+
"coin_b_amount": moveUint
|
|
748
|
+
});
|
|
749
|
+
BluefinLiquidityProvidedSchema = import_zod3.z.looseObject({
|
|
750
|
+
"pool_id": moveAddress,
|
|
751
|
+
"position_id": moveAddress,
|
|
752
|
+
"coin_a_amount": moveUint,
|
|
753
|
+
"coin_b_amount": moveUint,
|
|
754
|
+
"liquidity": moveUint
|
|
755
|
+
});
|
|
756
|
+
BluefinLiquidityRemovedSchema = import_zod3.z.looseObject({
|
|
757
|
+
"pool_id": moveAddress,
|
|
758
|
+
"position_id": moveAddress,
|
|
759
|
+
"coin_a_amount": moveUint,
|
|
760
|
+
"coin_b_amount": moveUint,
|
|
761
|
+
"liquidity": moveUint
|
|
762
|
+
});
|
|
763
|
+
BluefinPoolCreatedSchema = import_zod3.z.looseObject({
|
|
764
|
+
"id": moveAddress,
|
|
765
|
+
"coin_a": moveString,
|
|
766
|
+
"coin_b": moveString,
|
|
767
|
+
"fee_rate": moveUint,
|
|
768
|
+
"tick_spacing": moveSmallUint
|
|
769
|
+
});
|
|
770
|
+
BluefinPositionClosedSchema = import_zod3.z.looseObject({
|
|
771
|
+
"pool_id": moveAddress,
|
|
772
|
+
"position_id": moveAddress
|
|
773
|
+
});
|
|
774
|
+
BluefinPositionOpenedSchema = import_zod3.z.looseObject({
|
|
775
|
+
"pool_id": moveAddress,
|
|
776
|
+
"position_id": moveAddress
|
|
777
|
+
});
|
|
778
|
+
BluefinRewardCollectedSchema = import_zod3.z.looseObject({
|
|
779
|
+
"pool_id": moveAddress,
|
|
780
|
+
"position_id": moveAddress,
|
|
781
|
+
"reward_type": moveString,
|
|
782
|
+
"reward_symbol": moveString,
|
|
783
|
+
"reward_amount": moveUint
|
|
784
|
+
});
|
|
785
|
+
BluefinSwapSchema = import_zod3.z.looseObject({
|
|
786
|
+
"pool_id": moveAddress,
|
|
787
|
+
"a2b": moveBool,
|
|
788
|
+
"amount_in": moveUint,
|
|
789
|
+
"amount_out": moveUint,
|
|
790
|
+
"fee": moveUint,
|
|
791
|
+
"after_sqrt_price": moveUint,
|
|
792
|
+
"sequence_number": moveUint
|
|
793
|
+
});
|
|
794
|
+
BucketBorrowSchema = import_zod3.z.looseObject({
|
|
795
|
+
"collateral_type": moveString,
|
|
796
|
+
"buck_amount": moveUint
|
|
797
|
+
});
|
|
798
|
+
BucketDepositCollateralSchema = import_zod3.z.looseObject({
|
|
799
|
+
"collateral_type": moveString,
|
|
800
|
+
"collateral_amount": moveUint
|
|
801
|
+
});
|
|
802
|
+
BucketPositionUpdatedSchema = import_zod3.z.looseObject({
|
|
803
|
+
"collateral_type": moveString,
|
|
804
|
+
"debtor": moveAddress,
|
|
805
|
+
"bottle_id": moveAddress,
|
|
806
|
+
"collateral_amount": moveUint,
|
|
807
|
+
"buck_amount": moveUint
|
|
808
|
+
});
|
|
809
|
+
BucketRedeemSchema = import_zod3.z.looseObject({
|
|
810
|
+
"collateral_type": moveString,
|
|
811
|
+
"input_buck_amount": moveUint,
|
|
812
|
+
"output_collateral_amount": moveUint
|
|
813
|
+
});
|
|
814
|
+
BucketRepaySchema = import_zod3.z.looseObject({
|
|
815
|
+
"collateral_type": moveString,
|
|
816
|
+
"buck_amount": moveUint
|
|
817
|
+
});
|
|
818
|
+
BucketSbuckDepositSchema = import_zod3.z.looseObject({
|
|
819
|
+
"buck_amount": moveUint,
|
|
820
|
+
"sbuck_share": moveUint
|
|
821
|
+
});
|
|
822
|
+
BucketSbuckRewardsSchema = import_zod3.z.looseObject({
|
|
823
|
+
"buck_amount": moveUint
|
|
824
|
+
});
|
|
825
|
+
BucketWithdrawCollateralSchema = import_zod3.z.looseObject({
|
|
826
|
+
"collateral_type": moveString,
|
|
827
|
+
"collateral_amount": moveUint
|
|
828
|
+
});
|
|
829
|
+
CetusAddLiquiditySchema = import_zod3.z.looseObject({
|
|
830
|
+
"pool": moveAddress,
|
|
831
|
+
"position": moveAddress,
|
|
832
|
+
"liquidity": moveUint,
|
|
833
|
+
"after_liquidity": moveUint,
|
|
834
|
+
"amount_a": moveUint,
|
|
835
|
+
"amount_b": moveUint
|
|
836
|
+
});
|
|
837
|
+
CetusClosePositionSchema = import_zod3.z.looseObject({
|
|
838
|
+
"pool": moveAddress,
|
|
839
|
+
"position": moveAddress
|
|
840
|
+
});
|
|
841
|
+
CetusCollectFeeSchema = import_zod3.z.looseObject({
|
|
842
|
+
"position": moveAddress,
|
|
843
|
+
"pool": moveAddress,
|
|
844
|
+
"amount_a": moveUint,
|
|
845
|
+
"amount_b": moveUint
|
|
846
|
+
});
|
|
847
|
+
CetusCreatePoolSchema = import_zod3.z.looseObject({
|
|
848
|
+
"pool_id": moveAddress,
|
|
849
|
+
"coin_type_a": moveString,
|
|
850
|
+
"coin_type_b": moveString,
|
|
851
|
+
"tick_spacing": moveSmallUint
|
|
852
|
+
});
|
|
853
|
+
CetusOpenPositionSchema = import_zod3.z.looseObject({
|
|
854
|
+
"pool": moveAddress,
|
|
855
|
+
"position": moveAddress
|
|
856
|
+
});
|
|
857
|
+
CetusRemoveLiquiditySchema = import_zod3.z.looseObject({
|
|
858
|
+
"pool": moveAddress,
|
|
859
|
+
"position": moveAddress,
|
|
860
|
+
"liquidity": moveUint,
|
|
861
|
+
"after_liquidity": moveUint,
|
|
862
|
+
"amount_a": moveUint,
|
|
863
|
+
"amount_b": moveUint
|
|
864
|
+
});
|
|
865
|
+
CetusSwapSchema = import_zod3.z.looseObject({
|
|
866
|
+
"atob": moveBool,
|
|
867
|
+
"pool": moveAddress,
|
|
868
|
+
"partner": moveAddress,
|
|
869
|
+
"amount_in": moveUint,
|
|
870
|
+
"amount_out": moveUint,
|
|
871
|
+
"fee_amount": moveUint,
|
|
872
|
+
"before_sqrt_price": moveUint,
|
|
873
|
+
"after_sqrt_price": moveUint,
|
|
874
|
+
"steps": moveUint
|
|
875
|
+
});
|
|
876
|
+
CurrentBorrowSchema = import_zod3.z.looseObject({
|
|
877
|
+
"borrower": moveAddress,
|
|
878
|
+
"market": moveTypeName,
|
|
879
|
+
"obligation": moveAddress,
|
|
880
|
+
"asset": moveTypeName,
|
|
881
|
+
"amount": moveUint,
|
|
882
|
+
"time": moveUint
|
|
883
|
+
});
|
|
884
|
+
CurrentDepositSchema = import_zod3.z.looseObject({
|
|
885
|
+
"minter": moveAddress,
|
|
886
|
+
"market": moveTypeName,
|
|
887
|
+
"obligation": moveAddress,
|
|
888
|
+
"deposit_asset": moveTypeName,
|
|
889
|
+
"deposit_amount": moveUint,
|
|
890
|
+
"ctoken_amount": moveUint,
|
|
891
|
+
"time": moveUint
|
|
892
|
+
});
|
|
893
|
+
CurrentLiquidateSchema = import_zod3.z.looseObject({
|
|
894
|
+
"liquidator": moveAddress,
|
|
895
|
+
"market": moveTypeName,
|
|
896
|
+
"obligation": moveAddress,
|
|
897
|
+
"collateral_type": moveTypeName,
|
|
898
|
+
"debt_type": moveTypeName,
|
|
899
|
+
"seized_collateral_amount": moveUint,
|
|
900
|
+
"repay_amount": moveUint,
|
|
901
|
+
"refund_amount": moveUint,
|
|
902
|
+
"timestamp": moveUint
|
|
903
|
+
});
|
|
904
|
+
CurrentRepaySchema = import_zod3.z.looseObject({
|
|
905
|
+
"repayer": moveAddress,
|
|
906
|
+
"market": moveTypeName,
|
|
907
|
+
"obligation": moveAddress,
|
|
908
|
+
"asset": moveTypeName,
|
|
909
|
+
"amount": moveUint,
|
|
910
|
+
"refund": moveUint,
|
|
911
|
+
"time": moveUint
|
|
912
|
+
});
|
|
913
|
+
CurrentWithdrawSchema = import_zod3.z.looseObject({
|
|
914
|
+
"redeemer": moveAddress,
|
|
915
|
+
"market": moveTypeName,
|
|
916
|
+
"obligation": moveAddress,
|
|
917
|
+
"withdraw_asset": moveTypeName,
|
|
918
|
+
"withdraw_amount": moveUint,
|
|
919
|
+
"time": moveUint
|
|
920
|
+
});
|
|
921
|
+
DeepbookBalanceSchema = import_zod3.z.looseObject({
|
|
922
|
+
"balance_manager_id": moveAddress,
|
|
923
|
+
"asset": moveTypeName,
|
|
924
|
+
"amount": moveUint,
|
|
925
|
+
"deposit": moveBool
|
|
926
|
+
});
|
|
927
|
+
DeepbookFlashLoanSchema = import_zod3.z.looseObject({
|
|
928
|
+
"pool_id": moveAddress,
|
|
929
|
+
"borrow_quantity": moveUint,
|
|
930
|
+
"type_name": moveTypeName
|
|
931
|
+
});
|
|
932
|
+
DeepbookOrderCanceledSchema = import_zod3.z.looseObject({
|
|
933
|
+
"balance_manager_id": moveAddress,
|
|
934
|
+
"pool_id": moveAddress,
|
|
935
|
+
"order_id": moveUint,
|
|
936
|
+
"trader": moveAddress,
|
|
937
|
+
"price": moveUint,
|
|
938
|
+
"is_bid": moveBool,
|
|
939
|
+
"original_quantity": moveUint,
|
|
940
|
+
"base_asset_quantity_canceled": moveUint,
|
|
941
|
+
"timestamp": moveUint
|
|
942
|
+
});
|
|
943
|
+
DeepbookOrderFilledSchema = import_zod3.z.looseObject({
|
|
944
|
+
"pool_id": moveAddress,
|
|
945
|
+
"maker_order_id": moveUint,
|
|
946
|
+
"taker_order_id": moveUint,
|
|
947
|
+
"price": moveUint,
|
|
948
|
+
"taker_is_bid": moveBool,
|
|
949
|
+
"base_quantity": moveUint,
|
|
950
|
+
"quote_quantity": moveUint,
|
|
951
|
+
"taker_fee": moveUint,
|
|
952
|
+
"maker_fee": moveUint,
|
|
953
|
+
"timestamp": moveUint
|
|
954
|
+
});
|
|
955
|
+
DeepbookOrderInfoSchema = import_zod3.z.looseObject({
|
|
956
|
+
"pool_id": moveAddress,
|
|
957
|
+
"order_id": moveUint,
|
|
958
|
+
"balance_manager_id": moveAddress,
|
|
959
|
+
"client_order_id": moveUint,
|
|
960
|
+
"trader": moveAddress,
|
|
961
|
+
"order_type": moveSmallUint,
|
|
962
|
+
"price": moveUint,
|
|
963
|
+
"is_bid": moveBool,
|
|
964
|
+
"original_quantity": moveUint,
|
|
965
|
+
"executed_quantity": moveUint,
|
|
966
|
+
"status": moveSmallUint,
|
|
967
|
+
"timestamp": moveUint
|
|
968
|
+
});
|
|
969
|
+
DeepbookOrderPlacedSchema = import_zod3.z.looseObject({
|
|
970
|
+
"balance_manager_id": moveAddress,
|
|
971
|
+
"pool_id": moveAddress,
|
|
972
|
+
"order_id": moveUint,
|
|
973
|
+
"client_order_id": moveUint,
|
|
974
|
+
"trader": moveAddress,
|
|
975
|
+
"price": moveUint,
|
|
976
|
+
"is_bid": moveBool,
|
|
977
|
+
"placed_quantity": moveUint,
|
|
978
|
+
"expire_timestamp": moveUint,
|
|
979
|
+
"timestamp": moveUint
|
|
980
|
+
});
|
|
981
|
+
EmberDepositSchema = import_zod3.z.looseObject({
|
|
982
|
+
"vault_id": moveAddress,
|
|
983
|
+
"owner": moveAddress,
|
|
984
|
+
"total_amount": moveUint,
|
|
985
|
+
"shares_minted": moveUint,
|
|
986
|
+
"current_balance": moveUint,
|
|
987
|
+
"total_shares": moveUint,
|
|
988
|
+
"sequence_number": moveUint
|
|
989
|
+
});
|
|
990
|
+
EmberRateUpdatedSchema = import_zod3.z.looseObject({
|
|
991
|
+
"vault_id": moveAddress,
|
|
992
|
+
"previous_rate": moveUint,
|
|
993
|
+
"new_rate": moveUint,
|
|
994
|
+
"sequence_number": moveUint
|
|
995
|
+
});
|
|
996
|
+
EmberRedeemProcessedSchema = import_zod3.z.looseObject({
|
|
997
|
+
"vault_id": moveAddress,
|
|
998
|
+
"owner": moveAddress,
|
|
999
|
+
"receiver": moveAddress,
|
|
1000
|
+
"shares": moveUint,
|
|
1001
|
+
"withdraw_amount": moveUint,
|
|
1002
|
+
"skipped": moveBool,
|
|
1003
|
+
"cancelled": moveBool,
|
|
1004
|
+
"sequence_number": moveUint
|
|
1005
|
+
});
|
|
1006
|
+
EmberRedeemRequestSchema = import_zod3.z.looseObject({
|
|
1007
|
+
"vault_id": moveAddress,
|
|
1008
|
+
"owner": moveAddress,
|
|
1009
|
+
"receiver": moveAddress,
|
|
1010
|
+
"shares": moveUint,
|
|
1011
|
+
"total_shares": moveUint,
|
|
1012
|
+
"sequence_number": moveUint
|
|
1013
|
+
});
|
|
1014
|
+
FlowxAmmPairCreatedSchema = import_zod3.z.looseObject({
|
|
1015
|
+
"user": moveAddress,
|
|
1016
|
+
"coin_x": moveString,
|
|
1017
|
+
"coin_y": moveString
|
|
1018
|
+
});
|
|
1019
|
+
FlowxAmmSwapSchema = import_zod3.z.looseObject({
|
|
1020
|
+
"user": moveAddress,
|
|
1021
|
+
"coin_x": moveString,
|
|
1022
|
+
"coin_y": moveString,
|
|
1023
|
+
"amount_x_in": moveUint,
|
|
1024
|
+
"amount_y_in": moveUint,
|
|
1025
|
+
"amount_x_out": moveUint,
|
|
1026
|
+
"amount_y_out": moveUint
|
|
1027
|
+
});
|
|
1028
|
+
FlowxClmmPoolCreatedSchema = import_zod3.z.looseObject({
|
|
1029
|
+
"sender": moveAddress,
|
|
1030
|
+
"pool_id": moveAddress,
|
|
1031
|
+
"coin_type_x": moveTypeName,
|
|
1032
|
+
"coin_type_y": moveTypeName,
|
|
1033
|
+
"fee_rate": moveUint,
|
|
1034
|
+
"tick_spacing": moveSmallUint
|
|
1035
|
+
});
|
|
1036
|
+
FlowxClmmSwapSchema = import_zod3.z.looseObject({
|
|
1037
|
+
"sender": moveAddress,
|
|
1038
|
+
"pool_id": moveAddress,
|
|
1039
|
+
"x_for_y": moveBool,
|
|
1040
|
+
"amount_x": moveUint,
|
|
1041
|
+
"amount_y": moveUint,
|
|
1042
|
+
"liquidity": moveUint,
|
|
1043
|
+
"fee_amount": moveUint
|
|
1044
|
+
});
|
|
1045
|
+
HaedalInstantUnstakedSchema = import_zod3.z.looseObject({
|
|
1046
|
+
"owner": moveAddress,
|
|
1047
|
+
"sui_amount": moveUint,
|
|
1048
|
+
"st_amount": moveUint
|
|
1049
|
+
});
|
|
1050
|
+
HaedalStakedSchema = import_zod3.z.looseObject({
|
|
1051
|
+
"owner": moveAddress,
|
|
1052
|
+
"sui_amount": moveUint,
|
|
1053
|
+
"st_amount": moveUint,
|
|
1054
|
+
"validator": moveAddress
|
|
1055
|
+
});
|
|
1056
|
+
HaedalUnstakedSchema = import_zod3.z.looseObject({
|
|
1057
|
+
"owner": moveAddress,
|
|
1058
|
+
"epoch": moveUint,
|
|
1059
|
+
"sui_amount": moveUint,
|
|
1060
|
+
"st_amount": moveUint
|
|
1061
|
+
});
|
|
1062
|
+
KaiAddLiquiditySchema = import_zod3.z.looseObject({
|
|
1063
|
+
"position_id": moveAddress,
|
|
1064
|
+
"sqrt_pool_price_x64": moveUint,
|
|
1065
|
+
"delta_l": moveUint,
|
|
1066
|
+
"delta_x": moveUint,
|
|
1067
|
+
"delta_y": moveUint
|
|
1068
|
+
});
|
|
1069
|
+
KaiDeleverageSchema = import_zod3.z.looseObject({
|
|
1070
|
+
"position_id": moveAddress,
|
|
1071
|
+
"delta_l": moveUint,
|
|
1072
|
+
"delta_x": moveUint,
|
|
1073
|
+
"delta_y": moveUint,
|
|
1074
|
+
"x_repaid": moveUint,
|
|
1075
|
+
"y_repaid": moveUint
|
|
1076
|
+
});
|
|
1077
|
+
KaiLiquidationSchema = import_zod3.z.looseObject({
|
|
1078
|
+
"position_id": moveAddress,
|
|
1079
|
+
"x_repaid": moveUint,
|
|
1080
|
+
"y_repaid": moveUint,
|
|
1081
|
+
"liquidator_reward_x": moveUint,
|
|
1082
|
+
"liquidator_reward_y": moveUint,
|
|
1083
|
+
"liquidation_fee_x": moveUint,
|
|
1084
|
+
"liquidation_fee_y": moveUint
|
|
1085
|
+
});
|
|
1086
|
+
KaiPositionOpenSchema = import_zod3.z.looseObject({
|
|
1087
|
+
"position_id": moveAddress,
|
|
1088
|
+
"config_id": moveAddress,
|
|
1089
|
+
"x0": moveUint,
|
|
1090
|
+
"y0": moveUint,
|
|
1091
|
+
"cx": moveUint,
|
|
1092
|
+
"cy": moveUint,
|
|
1093
|
+
"dx": moveUint,
|
|
1094
|
+
"dy": moveUint,
|
|
1095
|
+
"l": moveUint,
|
|
1096
|
+
"creation_fee_amt_sui": moveUint
|
|
1097
|
+
});
|
|
1098
|
+
KaiReduceSchema = import_zod3.z.looseObject({
|
|
1099
|
+
"position_id": moveAddress,
|
|
1100
|
+
"delta_l": moveUint,
|
|
1101
|
+
"delta_x": moveUint,
|
|
1102
|
+
"delta_y": moveUint,
|
|
1103
|
+
"withdrawn_x": moveUint,
|
|
1104
|
+
"withdrawn_y": moveUint,
|
|
1105
|
+
"x_repaid": moveUint,
|
|
1106
|
+
"y_repaid": moveUint
|
|
1107
|
+
});
|
|
1108
|
+
KaiSupplySchema = import_zod3.z.looseObject({
|
|
1109
|
+
"supply_pool_id": moveAddress,
|
|
1110
|
+
"deposited": moveUint,
|
|
1111
|
+
"share_balance": moveUint
|
|
1112
|
+
});
|
|
1113
|
+
KaiSupplyWithdrawSchema = import_zod3.z.looseObject({
|
|
1114
|
+
"supply_pool_id": moveAddress,
|
|
1115
|
+
"share_balance": moveUint,
|
|
1116
|
+
"withdrawn": moveUint
|
|
1117
|
+
});
|
|
1118
|
+
KriyaAddLiquiditySchema = import_zod3.z.looseObject({
|
|
1119
|
+
"pool_id": moveAddress,
|
|
1120
|
+
"liquidity_provider": moveAddress,
|
|
1121
|
+
"amount_x": moveUint,
|
|
1122
|
+
"amount_y": moveUint,
|
|
1123
|
+
"lsp_minted": moveUint
|
|
1124
|
+
});
|
|
1125
|
+
KriyaSwapSchema = import_zod3.z.looseObject({
|
|
1126
|
+
"pool_id": moveAddress,
|
|
1127
|
+
"user": moveAddress,
|
|
1128
|
+
"reserve_x": moveUint,
|
|
1129
|
+
"reserve_y": moveUint,
|
|
1130
|
+
"amount_in": moveUint,
|
|
1131
|
+
"amount_out": moveUint
|
|
1132
|
+
});
|
|
1133
|
+
MagmaAddLiquiditySchema = import_zod3.z.looseObject({
|
|
1134
|
+
"pool": moveAddress,
|
|
1135
|
+
"position": moveAddress,
|
|
1136
|
+
"liquidity": moveUint,
|
|
1137
|
+
"after_liquidity": moveUint,
|
|
1138
|
+
"amount_a": moveUint,
|
|
1139
|
+
"amount_b": moveUint
|
|
1140
|
+
});
|
|
1141
|
+
MagmaCollectFeeSchema = import_zod3.z.looseObject({
|
|
1142
|
+
"position": moveAddress,
|
|
1143
|
+
"pool": moveAddress,
|
|
1144
|
+
"amount_a": moveUint,
|
|
1145
|
+
"amount_b": moveUint
|
|
1146
|
+
});
|
|
1147
|
+
MagmaCollectRewardSchema = import_zod3.z.looseObject({
|
|
1148
|
+
"position": moveAddress,
|
|
1149
|
+
"pool": moveAddress,
|
|
1150
|
+
"amount": moveUint
|
|
1151
|
+
});
|
|
1152
|
+
MagmaCreatePoolSchema = import_zod3.z.looseObject({
|
|
1153
|
+
"pool_id": moveAddress,
|
|
1154
|
+
"coin_type_a": moveString,
|
|
1155
|
+
"coin_type_b": moveString,
|
|
1156
|
+
"tick_spacing": moveSmallUint
|
|
1157
|
+
});
|
|
1158
|
+
MagmaRemoveLiquiditySchema = import_zod3.z.looseObject({
|
|
1159
|
+
"pool": moveAddress,
|
|
1160
|
+
"position": moveAddress,
|
|
1161
|
+
"liquidity": moveUint,
|
|
1162
|
+
"after_liquidity": moveUint,
|
|
1163
|
+
"amount_a": moveUint,
|
|
1164
|
+
"amount_b": moveUint
|
|
1165
|
+
});
|
|
1166
|
+
MagmaSwapSchema = import_zod3.z.looseObject({
|
|
1167
|
+
"atob": moveBool,
|
|
1168
|
+
"pool": moveAddress,
|
|
1169
|
+
"partner": moveAddress,
|
|
1170
|
+
"amount_in": moveUint,
|
|
1171
|
+
"amount_out": moveUint,
|
|
1172
|
+
"fee_amount": moveUint,
|
|
1173
|
+
"before_sqrt_price": moveUint,
|
|
1174
|
+
"after_sqrt_price": moveUint,
|
|
1175
|
+
"steps": moveUint
|
|
1176
|
+
});
|
|
1177
|
+
MoleAddDebtSchema = import_zod3.z.looseObject({
|
|
1178
|
+
"id": moveUint,
|
|
1179
|
+
"debt_share": moveUint
|
|
1180
|
+
});
|
|
1181
|
+
MoleDepositSchema = import_zod3.z.looseObject({
|
|
1182
|
+
"account": moveAddress,
|
|
1183
|
+
"amount": moveUint,
|
|
1184
|
+
"share": moveUint
|
|
1185
|
+
});
|
|
1186
|
+
MoleHarvestSchema = import_zod3.z.looseObject({
|
|
1187
|
+
"user": moveAddress,
|
|
1188
|
+
"pid": moveUint,
|
|
1189
|
+
"amount": moveUint,
|
|
1190
|
+
"action_type": moveUint
|
|
1191
|
+
});
|
|
1192
|
+
MoleKillSchema = import_zod3.z.looseObject({
|
|
1193
|
+
"id": moveUint,
|
|
1194
|
+
"killer": moveAddress,
|
|
1195
|
+
"owner": moveAddress,
|
|
1196
|
+
"posVal": moveUint,
|
|
1197
|
+
"debt": moveUint,
|
|
1198
|
+
"prize": moveUint,
|
|
1199
|
+
"left": moveUint
|
|
1200
|
+
});
|
|
1201
|
+
MoleWithdrawSchema = import_zod3.z.looseObject({
|
|
1202
|
+
"account": moveAddress,
|
|
1203
|
+
"share": moveUint,
|
|
1204
|
+
"amount": moveUint
|
|
1205
|
+
});
|
|
1206
|
+
MoleWorkSchema = import_zod3.z.looseObject({
|
|
1207
|
+
"id": moveUint,
|
|
1208
|
+
"loan": moveUint
|
|
1209
|
+
});
|
|
1210
|
+
MomentumAddLiquiditySchema = import_zod3.z.looseObject({
|
|
1211
|
+
"sender": moveAddress,
|
|
1212
|
+
"pool_id": moveAddress,
|
|
1213
|
+
"position_id": moveAddress,
|
|
1214
|
+
"liquidity": moveUint,
|
|
1215
|
+
"amount_x": moveUint,
|
|
1216
|
+
"amount_y": moveUint
|
|
1217
|
+
});
|
|
1218
|
+
MomentumCollectFeeSchema = import_zod3.z.looseObject({
|
|
1219
|
+
"sender": moveAddress,
|
|
1220
|
+
"pool_id": moveAddress,
|
|
1221
|
+
"position_id": moveAddress,
|
|
1222
|
+
"amount_x": moveUint,
|
|
1223
|
+
"amount_y": moveUint
|
|
1224
|
+
});
|
|
1225
|
+
MomentumCollectRewardSchema = import_zod3.z.looseObject({
|
|
1226
|
+
"sender": moveAddress,
|
|
1227
|
+
"pool_id": moveAddress,
|
|
1228
|
+
"position_id": moveAddress,
|
|
1229
|
+
"reward_coin_type": moveTypeName,
|
|
1230
|
+
"amount": moveUint
|
|
1231
|
+
});
|
|
1232
|
+
MomentumPoolCreatedSchema = import_zod3.z.looseObject({
|
|
1233
|
+
"sender": moveAddress,
|
|
1234
|
+
"pool_id": moveAddress,
|
|
1235
|
+
"type_x": moveTypeName,
|
|
1236
|
+
"type_y": moveTypeName,
|
|
1237
|
+
"fee_rate": moveUint,
|
|
1238
|
+
"tick_spacing": moveSmallUint
|
|
1239
|
+
});
|
|
1240
|
+
MomentumRemoveLiquiditySchema = import_zod3.z.looseObject({
|
|
1241
|
+
"sender": moveAddress,
|
|
1242
|
+
"pool_id": moveAddress,
|
|
1243
|
+
"position_id": moveAddress,
|
|
1244
|
+
"liquidity": moveUint,
|
|
1245
|
+
"amount_x": moveUint,
|
|
1246
|
+
"amount_y": moveUint
|
|
1247
|
+
});
|
|
1248
|
+
MomentumRepayFlashSwapSchema = import_zod3.z.looseObject({
|
|
1249
|
+
"sender": moveAddress,
|
|
1250
|
+
"pool_id": moveAddress,
|
|
1251
|
+
"amount_x_debt": moveUint,
|
|
1252
|
+
"amount_y_debt": moveUint,
|
|
1253
|
+
"paid_x": moveUint,
|
|
1254
|
+
"paid_y": moveUint,
|
|
1255
|
+
"reserve_x": moveUint,
|
|
1256
|
+
"reserve_y": moveUint
|
|
1257
|
+
});
|
|
1258
|
+
MomentumSwapSchema = import_zod3.z.looseObject({
|
|
1259
|
+
"sender": moveAddress,
|
|
1260
|
+
"pool_id": moveAddress,
|
|
1261
|
+
"x_for_y": moveBool,
|
|
1262
|
+
"amount_x": moveUint,
|
|
1263
|
+
"amount_y": moveUint,
|
|
1264
|
+
"fee_amount": moveUint,
|
|
1265
|
+
"liquidity": moveUint
|
|
1266
|
+
});
|
|
1267
|
+
NaviBorrowSchema = import_zod3.z.looseObject({
|
|
1268
|
+
"reserve": moveSmallUint,
|
|
1269
|
+
"sender": moveAddress,
|
|
1270
|
+
"amount": moveUint,
|
|
1271
|
+
"market_id": moveUint
|
|
1272
|
+
});
|
|
1273
|
+
NaviDepositSchema = import_zod3.z.looseObject({
|
|
1274
|
+
"reserve": moveSmallUint,
|
|
1275
|
+
"sender": moveAddress,
|
|
1276
|
+
"amount": moveUint,
|
|
1277
|
+
"market_id": moveUint
|
|
1278
|
+
});
|
|
1279
|
+
NaviLiquidationSchema = import_zod3.z.looseObject({
|
|
1280
|
+
"sender": moveAddress,
|
|
1281
|
+
"user": moveAddress,
|
|
1282
|
+
"collateral_asset": moveSmallUint,
|
|
1283
|
+
"collateral_amount": moveUint,
|
|
1284
|
+
"debt_asset": moveSmallUint,
|
|
1285
|
+
"debt_amount": moveUint,
|
|
1286
|
+
"market_id": moveUint
|
|
1287
|
+
});
|
|
1288
|
+
NaviRepaySchema = import_zod3.z.looseObject({
|
|
1289
|
+
"reserve": moveSmallUint,
|
|
1290
|
+
"sender": moveAddress,
|
|
1291
|
+
"amount": moveUint,
|
|
1292
|
+
"market_id": moveUint
|
|
1293
|
+
});
|
|
1294
|
+
NaviWithdrawSchema = import_zod3.z.looseObject({
|
|
1295
|
+
"reserve": moveSmallUint,
|
|
1296
|
+
"sender": moveAddress,
|
|
1297
|
+
"to": moveAddress,
|
|
1298
|
+
"amount": moveUint,
|
|
1299
|
+
"market_id": moveUint
|
|
1300
|
+
});
|
|
1301
|
+
PythPriceFeedUpdateSchema = import_zod3.z.looseObject({
|
|
1302
|
+
"price_feed": import_zod3.z.unknown(),
|
|
1303
|
+
"timestamp": moveUint
|
|
1304
|
+
});
|
|
1305
|
+
ScallopBorrowSchema = import_zod3.z.looseObject({
|
|
1306
|
+
"borrower": moveAddress,
|
|
1307
|
+
"obligation": moveAddress,
|
|
1308
|
+
"asset": moveTypeName,
|
|
1309
|
+
"amount": moveUint,
|
|
1310
|
+
"borrow_fee": moveUint,
|
|
1311
|
+
"time": moveUint
|
|
1312
|
+
});
|
|
1313
|
+
ScallopCollateralDepositSchema = import_zod3.z.looseObject({
|
|
1314
|
+
"provider": moveAddress,
|
|
1315
|
+
"obligation": moveAddress,
|
|
1316
|
+
"deposit_asset": moveTypeName,
|
|
1317
|
+
"deposit_amount": moveUint
|
|
1318
|
+
});
|
|
1319
|
+
ScallopCollateralWithdrawSchema = import_zod3.z.looseObject({
|
|
1320
|
+
"taker": moveAddress,
|
|
1321
|
+
"obligation": moveAddress,
|
|
1322
|
+
"withdraw_asset": moveTypeName,
|
|
1323
|
+
"withdraw_amount": moveUint
|
|
1324
|
+
});
|
|
1325
|
+
ScallopLiquidationSchema = import_zod3.z.looseObject({
|
|
1326
|
+
"liquidator": moveAddress,
|
|
1327
|
+
"obligation": moveAddress,
|
|
1328
|
+
"debt_type": moveTypeName,
|
|
1329
|
+
"collateral_type": moveTypeName,
|
|
1330
|
+
"repay_on_behalf": moveUint,
|
|
1331
|
+
"liq_amount": moveUint,
|
|
1332
|
+
"timestamp": moveUint
|
|
1333
|
+
});
|
|
1334
|
+
ScallopRepaySchema = import_zod3.z.looseObject({
|
|
1335
|
+
"repayer": moveAddress,
|
|
1336
|
+
"obligation": moveAddress,
|
|
1337
|
+
"asset": moveTypeName,
|
|
1338
|
+
"amount": moveUint,
|
|
1339
|
+
"time": moveUint
|
|
1340
|
+
});
|
|
1341
|
+
SpringsuiEpochChangedSchema = import_zod3.z.looseObject({
|
|
1342
|
+
"event": import_zod3.z.looseObject({
|
|
1343
|
+
"typename": moveTypeName,
|
|
1344
|
+
"old_sui_supply": moveUint,
|
|
1345
|
+
"new_sui_supply": moveUint,
|
|
1346
|
+
"lst_supply": moveUint,
|
|
1347
|
+
"spread_fee": moveUint
|
|
1348
|
+
})
|
|
1349
|
+
});
|
|
1350
|
+
SpringsuiStakeSchema = import_zod3.z.looseObject({
|
|
1351
|
+
"event": import_zod3.z.looseObject({
|
|
1352
|
+
"typename": moveTypeName,
|
|
1353
|
+
"sui_amount_in": moveUint,
|
|
1354
|
+
"lst_amount_out": moveUint,
|
|
1355
|
+
"fee_amount": moveUint
|
|
1356
|
+
})
|
|
1357
|
+
});
|
|
1358
|
+
SpringsuiUnstakeSchema = import_zod3.z.looseObject({
|
|
1359
|
+
"event": import_zod3.z.looseObject({
|
|
1360
|
+
"typename": moveTypeName,
|
|
1361
|
+
"lst_amount_in": moveUint,
|
|
1362
|
+
"sui_amount_out": moveUint,
|
|
1363
|
+
"fee_amount": moveUint
|
|
1364
|
+
})
|
|
1365
|
+
});
|
|
1366
|
+
SteammBankDepositSchema = import_zod3.z.looseObject({
|
|
1367
|
+
"event": import_zod3.z.looseObject({
|
|
1368
|
+
"user": moveAddress,
|
|
1369
|
+
"bank_id": moveAddress,
|
|
1370
|
+
"lending_market_id": moveAddress,
|
|
1371
|
+
"deposited_amount": moveUint,
|
|
1372
|
+
"minted_amount": moveUint
|
|
1373
|
+
})
|
|
1374
|
+
});
|
|
1375
|
+
SteammBankWithdrawSchema = import_zod3.z.looseObject({
|
|
1376
|
+
"event": import_zod3.z.looseObject({
|
|
1377
|
+
"user": moveAddress,
|
|
1378
|
+
"bank_id": moveAddress,
|
|
1379
|
+
"lending_market_id": moveAddress,
|
|
1380
|
+
"withdrawn_amount": moveUint,
|
|
1381
|
+
"burned_amount": moveUint
|
|
1382
|
+
})
|
|
1383
|
+
});
|
|
1384
|
+
SuilendBorrowSchema = import_zod3.z.looseObject({
|
|
1385
|
+
"lending_market_id": moveAddress,
|
|
1386
|
+
"coin_type": moveTypeName,
|
|
1387
|
+
"reserve_id": moveAddress,
|
|
1388
|
+
"obligation_id": moveAddress,
|
|
1389
|
+
"liquidity_amount": moveUint,
|
|
1390
|
+
"origination_fee_amount": moveUint
|
|
1391
|
+
});
|
|
1392
|
+
SuilendClaimRewardSchema = import_zod3.z.looseObject({
|
|
1393
|
+
"lending_market_id": moveAddress,
|
|
1394
|
+
"reserve_id": moveAddress,
|
|
1395
|
+
"obligation_id": moveAddress,
|
|
1396
|
+
"is_deposit_reward": moveBool,
|
|
1397
|
+
"coin_type": moveTypeName,
|
|
1398
|
+
"liquidity_amount": moveUint
|
|
1399
|
+
});
|
|
1400
|
+
SuilendDepositSchema = import_zod3.z.looseObject({
|
|
1401
|
+
"lending_market_id": moveAddress,
|
|
1402
|
+
"coin_type": moveTypeName,
|
|
1403
|
+
"reserve_id": moveAddress,
|
|
1404
|
+
"obligation_id": moveAddress,
|
|
1405
|
+
"ctoken_amount": moveUint
|
|
1406
|
+
});
|
|
1407
|
+
SuilendLiquidateSchema = import_zod3.z.looseObject({
|
|
1408
|
+
"lending_market_id": moveAddress,
|
|
1409
|
+
"obligation_id": moveAddress,
|
|
1410
|
+
"repay_amount": moveUint,
|
|
1411
|
+
"withdraw_amount": moveUint,
|
|
1412
|
+
"protocol_fee_amount": moveUint,
|
|
1413
|
+
"liquidator_bonus_amount": moveUint
|
|
1414
|
+
});
|
|
1415
|
+
SuilendRepaySchema = import_zod3.z.looseObject({
|
|
1416
|
+
"lending_market_id": moveAddress,
|
|
1417
|
+
"coin_type": moveTypeName,
|
|
1418
|
+
"reserve_id": moveAddress,
|
|
1419
|
+
"obligation_id": moveAddress,
|
|
1420
|
+
"liquidity_amount": moveUint
|
|
1421
|
+
});
|
|
1422
|
+
SuilendWithdrawSchema = import_zod3.z.looseObject({
|
|
1423
|
+
"lending_market_id": moveAddress,
|
|
1424
|
+
"coin_type": moveTypeName,
|
|
1425
|
+
"reserve_id": moveAddress,
|
|
1426
|
+
"obligation_id": moveAddress,
|
|
1427
|
+
"ctoken_amount": moveUint
|
|
1428
|
+
});
|
|
1429
|
+
SupraPriceUpdateSchema = import_zod3.z.looseObject({
|
|
1430
|
+
"pair": moveSmallUint,
|
|
1431
|
+
"value": moveUint,
|
|
1432
|
+
"decimal": moveSmallUint,
|
|
1433
|
+
"timestamp": moveUint,
|
|
1434
|
+
"round": moveUint
|
|
1435
|
+
});
|
|
1436
|
+
TurbosAddLiquiditySchema = import_zod3.z.looseObject({
|
|
1437
|
+
"pool": moveAddress,
|
|
1438
|
+
"owner": moveAddress,
|
|
1439
|
+
"amount_a": moveUint,
|
|
1440
|
+
"amount_b": moveUint,
|
|
1441
|
+
"liquidity_delta": moveUint
|
|
1442
|
+
});
|
|
1443
|
+
TurbosPoolCreatedSchema = import_zod3.z.looseObject({
|
|
1444
|
+
"account": moveAddress,
|
|
1445
|
+
"pool": moveAddress,
|
|
1446
|
+
"fee": moveSmallUint,
|
|
1447
|
+
"tick_spacing": moveSmallUint,
|
|
1448
|
+
"sqrt_price": moveUint
|
|
1449
|
+
});
|
|
1450
|
+
TurbosRemoveLiquiditySchema = import_zod3.z.looseObject({
|
|
1451
|
+
"pool": moveAddress,
|
|
1452
|
+
"owner": moveAddress,
|
|
1453
|
+
"amount_a": moveUint,
|
|
1454
|
+
"amount_b": moveUint,
|
|
1455
|
+
"liquidity_delta": moveUint
|
|
1456
|
+
});
|
|
1457
|
+
TurbosSwapSchema = import_zod3.z.looseObject({
|
|
1458
|
+
"pool": moveAddress,
|
|
1459
|
+
"recipient": moveAddress,
|
|
1460
|
+
"amount_a": moveUint,
|
|
1461
|
+
"amount_b": moveUint,
|
|
1462
|
+
"liquidity": moveUint,
|
|
1463
|
+
"sqrt_price": moveUint,
|
|
1464
|
+
"fee_amount": moveUint,
|
|
1465
|
+
"a_to_b": moveBool
|
|
1466
|
+
});
|
|
1467
|
+
TypusDovAuctionSchema = import_zod3.z.looseObject({
|
|
1468
|
+
"signer": moveAddress,
|
|
1469
|
+
"index": moveUint,
|
|
1470
|
+
"round": moveUint,
|
|
1471
|
+
"start_ts_ms": moveUint,
|
|
1472
|
+
"end_ts_ms": moveUint,
|
|
1473
|
+
"size": moveUint
|
|
1474
|
+
});
|
|
1475
|
+
TypusDovBidSchema = import_zod3.z.looseObject({
|
|
1476
|
+
"signer": moveAddress,
|
|
1477
|
+
"index": moveUint,
|
|
1478
|
+
"bid_index": moveUint,
|
|
1479
|
+
"price": moveUint,
|
|
1480
|
+
"size": moveUint,
|
|
1481
|
+
"ts_ms": moveUint
|
|
1482
|
+
});
|
|
1483
|
+
TypusDovSettleSchema = import_zod3.z.looseObject({
|
|
1484
|
+
"signer": moveAddress,
|
|
1485
|
+
"index": moveUint,
|
|
1486
|
+
"round": moveUint,
|
|
1487
|
+
"oracle_price": moveUint,
|
|
1488
|
+
"settle_balance": moveUint,
|
|
1489
|
+
"settled_balance": moveUint
|
|
1490
|
+
});
|
|
1491
|
+
TypusPerpFundingSchema = import_zod3.z.looseObject({
|
|
1492
|
+
"base_token": moveTypeName,
|
|
1493
|
+
"new_funding_ts_ms": moveUint,
|
|
1494
|
+
"cumulative_funding_rate_index": moveUint
|
|
1495
|
+
});
|
|
1496
|
+
TypusPerpLiquidateSchema = import_zod3.z.looseObject({
|
|
1497
|
+
"user": moveAddress,
|
|
1498
|
+
"position_id": moveUint,
|
|
1499
|
+
"collateral_price": moveUint,
|
|
1500
|
+
"trading_price": moveUint,
|
|
1501
|
+
"realized_liquidator_fee": moveUint
|
|
1502
|
+
});
|
|
1503
|
+
TypusPerpLpBurnSchema = import_zod3.z.looseObject({
|
|
1504
|
+
"sender": moveAddress,
|
|
1505
|
+
"index": moveUint,
|
|
1506
|
+
"burn_lp_amount": moveUint,
|
|
1507
|
+
"withdraw_token_amount": moveUint
|
|
1508
|
+
});
|
|
1509
|
+
TypusPerpLpMintSchema = import_zod3.z.looseObject({
|
|
1510
|
+
"sender": moveAddress,
|
|
1511
|
+
"index": moveUint,
|
|
1512
|
+
"deposit_amount": moveUint,
|
|
1513
|
+
"minted_lp_amount": moveUint
|
|
1514
|
+
});
|
|
1515
|
+
TypusPerpOrderSchema = import_zod3.z.looseObject({
|
|
1516
|
+
"user": moveAddress,
|
|
1517
|
+
"market_index": moveUint,
|
|
1518
|
+
"pool_index": moveUint,
|
|
1519
|
+
"order_id": moveUint,
|
|
1520
|
+
"collateral_amount": moveUint,
|
|
1521
|
+
"leverage_mbp": moveUint,
|
|
1522
|
+
"is_long": moveBool,
|
|
1523
|
+
"size": moveUint,
|
|
1524
|
+
"trigger_price": moveUint
|
|
1525
|
+
});
|
|
1526
|
+
VoloStakedSchema = import_zod3.z.looseObject({
|
|
1527
|
+
"staker": moveAddress,
|
|
1528
|
+
"sui_amount": moveUint,
|
|
1529
|
+
"cert_amount": moveUint
|
|
1530
|
+
});
|
|
1531
|
+
VoloUnstakedSchema = import_zod3.z.looseObject({
|
|
1532
|
+
"staker": moveAddress,
|
|
1533
|
+
"cert_amount": moveUint,
|
|
1534
|
+
"sui_amount": moveUint
|
|
1535
|
+
});
|
|
1536
|
+
WalrusBlobCertifiedSchema = import_zod3.z.looseObject({
|
|
1537
|
+
"epoch": moveSmallUint,
|
|
1538
|
+
"blob_id": moveUint,
|
|
1539
|
+
"end_epoch": moveSmallUint,
|
|
1540
|
+
"deletable": moveBool,
|
|
1541
|
+
"object_id": moveAddress
|
|
1542
|
+
});
|
|
1543
|
+
WalrusBlobDeletedSchema = import_zod3.z.looseObject({
|
|
1544
|
+
"epoch": moveSmallUint,
|
|
1545
|
+
"blob_id": moveUint,
|
|
1546
|
+
"end_epoch": moveSmallUint,
|
|
1547
|
+
"object_id": moveAddress,
|
|
1548
|
+
"was_certified": moveBool
|
|
1549
|
+
});
|
|
1550
|
+
WalrusBlobRegisteredSchema = import_zod3.z.looseObject({
|
|
1551
|
+
"epoch": moveSmallUint,
|
|
1552
|
+
"blob_id": moveUint,
|
|
1553
|
+
"size": moveUint,
|
|
1554
|
+
"end_epoch": moveSmallUint,
|
|
1555
|
+
"deletable": moveBool,
|
|
1556
|
+
"object_id": moveAddress
|
|
1557
|
+
});
|
|
1558
|
+
catalogEvents = {
|
|
1559
|
+
"7k.confirm-swap": {
|
|
1560
|
+
id: "7k.confirm-swap",
|
|
1561
|
+
protocolId: "7k",
|
|
1562
|
+
label: "7K \u2014 Swap confirmed",
|
|
1563
|
+
category: "swap",
|
|
1564
|
+
description: "A completed 7K aggregator trade (per-trade settlement summary).",
|
|
1565
|
+
generic: false,
|
|
1566
|
+
schema: _7kConfirmSwapSchema,
|
|
1567
|
+
deployments: [
|
|
1568
|
+
{ network: "mainnet", eventType: "0x33ec64e9bb369bf045ddc198c81adbf2acab424da37465d95296ee02045d2b17::router::ConfirmSwapEvent", primary: true }
|
|
1569
|
+
]
|
|
1570
|
+
},
|
|
1571
|
+
"7k.swap": {
|
|
1572
|
+
id: "7k.swap",
|
|
1573
|
+
protocolId: "7k",
|
|
1574
|
+
label: "7K \u2014 Swap (route leg)",
|
|
1575
|
+
category: "swap",
|
|
1576
|
+
description: "A single routing-leg swap on the 7K aggregator (per pool/DEX).",
|
|
1577
|
+
generic: false,
|
|
1578
|
+
schema: _7kSwapSchema,
|
|
1579
|
+
deployments: [
|
|
1580
|
+
{ network: "mainnet", eventType: "0x33ec64e9bb369bf045ddc198c81adbf2acab424da37465d95296ee02045d2b17::router::SwapEvent", primary: true }
|
|
1581
|
+
]
|
|
1582
|
+
},
|
|
1583
|
+
"aftermath.deposit": {
|
|
1584
|
+
id: "aftermath.deposit",
|
|
1585
|
+
protocolId: "aftermath",
|
|
1586
|
+
label: "Aftermath \u2014 Add liquidity",
|
|
1587
|
+
category: "liquidity",
|
|
1588
|
+
description: "Liquidity was deposited into an Aftermath AMM pool.",
|
|
1589
|
+
generic: false,
|
|
1590
|
+
schema: AftermathDepositSchema,
|
|
1591
|
+
deployments: [
|
|
1592
|
+
{ network: "mainnet", eventType: "0xc4049b2d1cc0f6e017fda8260e4377cecd236bd7f56a54fee120816e72e2e0dd::events::DepositEventV2", primary: true }
|
|
1593
|
+
]
|
|
1594
|
+
},
|
|
1595
|
+
"aftermath.perp-funding": {
|
|
1596
|
+
id: "aftermath.perp-funding",
|
|
1597
|
+
protocolId: "aftermath",
|
|
1598
|
+
label: "Aftermath \u2014 Funding settled (Perps)",
|
|
1599
|
+
category: "funding",
|
|
1600
|
+
description: "Funding was settled for an Aftermath perpetuals account.",
|
|
1601
|
+
generic: false,
|
|
1602
|
+
schema: AftermathPerpFundingSchema,
|
|
1603
|
+
deployments: [
|
|
1604
|
+
{ network: "mainnet", eventType: "0x21d001e8b07da2e3facb3e2d636bbaef43ba3c978bd84810368840b7d57c5068::events::SettledFunding", primary: true }
|
|
1605
|
+
]
|
|
1606
|
+
},
|
|
1607
|
+
"aftermath.perp-liquidated": {
|
|
1608
|
+
id: "aftermath.perp-liquidated",
|
|
1609
|
+
protocolId: "aftermath",
|
|
1610
|
+
label: "Aftermath \u2014 Position liquidated (Perps)",
|
|
1611
|
+
category: "liquidation",
|
|
1612
|
+
description: "A perpetuals position was liquidated on Aftermath.",
|
|
1613
|
+
generic: false,
|
|
1614
|
+
schema: AftermathPerpLiquidatedSchema,
|
|
1615
|
+
deployments: [
|
|
1616
|
+
{ network: "mainnet", eventType: "0x21d001e8b07da2e3facb3e2d636bbaef43ba3c978bd84810368840b7d57c5068::events::LiquidatedPosition", primary: true }
|
|
1617
|
+
]
|
|
1618
|
+
},
|
|
1619
|
+
"aftermath.swap": {
|
|
1620
|
+
id: "aftermath.swap",
|
|
1621
|
+
protocolId: "aftermath",
|
|
1622
|
+
label: "Aftermath \u2014 Swap",
|
|
1623
|
+
category: "swap",
|
|
1624
|
+
description: "A swap was executed on an Aftermath AMM pool.",
|
|
1625
|
+
generic: false,
|
|
1626
|
+
schema: AftermathSwapSchema,
|
|
1627
|
+
deployments: [
|
|
1628
|
+
{ network: "mainnet", eventType: "0xc4049b2d1cc0f6e017fda8260e4377cecd236bd7f56a54fee120816e72e2e0dd::events::SwapEventV2", primary: true }
|
|
1629
|
+
]
|
|
1630
|
+
},
|
|
1631
|
+
"alphafi.liquidity-change": {
|
|
1632
|
+
id: "alphafi.liquidity-change",
|
|
1633
|
+
protocolId: "alphafi",
|
|
1634
|
+
label: "AlphaFi \u2014 Vault deposit/withdraw",
|
|
1635
|
+
category: "vault",
|
|
1636
|
+
description: "A deposit or withdrawal on an AlphaFi vault (event_type: 1 = deposit, 0 = withdraw).",
|
|
1637
|
+
generic: false,
|
|
1638
|
+
schema: AlphafiLiquidityChangeSchema,
|
|
1639
|
+
deployments: [
|
|
1640
|
+
{ network: "mainnet", eventType: "0x754afbce8c72c8e491e3b9d536aa9d9766fdbc68650224ce01072189b235eee3::alphafi_bluefin_type_1_pool::LiquidityChangeEvent", primary: true }
|
|
1641
|
+
]
|
|
1642
|
+
},
|
|
1643
|
+
"alphafi.reward": {
|
|
1644
|
+
id: "alphafi.reward",
|
|
1645
|
+
protocolId: "alphafi",
|
|
1646
|
+
label: "AlphaFi \u2014 Reward harvest",
|
|
1647
|
+
category: "reward",
|
|
1648
|
+
description: "An AlphaFi vault auto-compounded its rewards.",
|
|
1649
|
+
generic: false,
|
|
1650
|
+
schema: AlphafiRewardSchema,
|
|
1651
|
+
deployments: [
|
|
1652
|
+
{ network: "mainnet", eventType: "0x830ce657bd8547460bdb1a5e5a7607d4641a73593a23165c8630c0d310a3f306::alphafi_bluefin_type_1_pool::RewardEvent", primary: true }
|
|
1653
|
+
]
|
|
1654
|
+
},
|
|
1655
|
+
"bluefin.fee-collected": {
|
|
1656
|
+
id: "bluefin.fee-collected",
|
|
1657
|
+
protocolId: "bluefin",
|
|
1658
|
+
label: "Bluefin \u2014 Fee collected",
|
|
1659
|
+
category: "fee",
|
|
1660
|
+
description: "Trading fees were collected from a Bluefin position.",
|
|
1661
|
+
generic: false,
|
|
1662
|
+
schema: BluefinFeeCollectedSchema,
|
|
1663
|
+
deployments: [
|
|
1664
|
+
{ network: "mainnet", eventType: "0x3492c874c1e3b3e2984e8c41b589e642d4d0a5d6459e5a9cfc2d52fd7c89c267::events::UserFeeCollected", primary: true }
|
|
1665
|
+
]
|
|
1666
|
+
},
|
|
1667
|
+
"bluefin.liquidity-provided": {
|
|
1668
|
+
id: "bluefin.liquidity-provided",
|
|
1669
|
+
protocolId: "bluefin",
|
|
1670
|
+
label: "Bluefin \u2014 Liquidity provided",
|
|
1671
|
+
category: "liquidity",
|
|
1672
|
+
description: "Liquidity was provided to a Bluefin position.",
|
|
1673
|
+
generic: false,
|
|
1674
|
+
schema: BluefinLiquidityProvidedSchema,
|
|
1675
|
+
deployments: [
|
|
1676
|
+
{ network: "mainnet", eventType: "0x3492c874c1e3b3e2984e8c41b589e642d4d0a5d6459e5a9cfc2d52fd7c89c267::events::LiquidityProvided", primary: true }
|
|
1677
|
+
]
|
|
1678
|
+
},
|
|
1679
|
+
"bluefin.liquidity-removed": {
|
|
1680
|
+
id: "bluefin.liquidity-removed",
|
|
1681
|
+
protocolId: "bluefin",
|
|
1682
|
+
label: "Bluefin \u2014 Liquidity removed",
|
|
1683
|
+
category: "liquidity",
|
|
1684
|
+
description: "Liquidity was removed from a Bluefin position.",
|
|
1685
|
+
generic: false,
|
|
1686
|
+
schema: BluefinLiquidityRemovedSchema,
|
|
1687
|
+
deployments: [
|
|
1688
|
+
{ network: "mainnet", eventType: "0x3492c874c1e3b3e2984e8c41b589e642d4d0a5d6459e5a9cfc2d52fd7c89c267::events::LiquidityRemoved", primary: true }
|
|
1689
|
+
]
|
|
1690
|
+
},
|
|
1691
|
+
"bluefin.pool-created": {
|
|
1692
|
+
id: "bluefin.pool-created",
|
|
1693
|
+
protocolId: "bluefin",
|
|
1694
|
+
label: "Bluefin \u2014 Pool created",
|
|
1695
|
+
category: "pool",
|
|
1696
|
+
description: "A new Bluefin spot pool was created.",
|
|
1697
|
+
generic: false,
|
|
1698
|
+
schema: BluefinPoolCreatedSchema,
|
|
1699
|
+
deployments: [
|
|
1700
|
+
{ network: "mainnet", eventType: "0x3492c874c1e3b3e2984e8c41b589e642d4d0a5d6459e5a9cfc2d52fd7c89c267::events::PoolCreated", primary: true }
|
|
1701
|
+
]
|
|
1702
|
+
},
|
|
1703
|
+
"bluefin.position-closed": {
|
|
1704
|
+
id: "bluefin.position-closed",
|
|
1705
|
+
protocolId: "bluefin",
|
|
1706
|
+
label: "Bluefin \u2014 Position closed",
|
|
1707
|
+
category: "position",
|
|
1708
|
+
description: "A Bluefin liquidity position was closed.",
|
|
1709
|
+
generic: false,
|
|
1710
|
+
schema: BluefinPositionClosedSchema,
|
|
1711
|
+
deployments: [
|
|
1712
|
+
{ network: "mainnet", eventType: "0x3492c874c1e3b3e2984e8c41b589e642d4d0a5d6459e5a9cfc2d52fd7c89c267::events::PositionClosed", primary: true }
|
|
1713
|
+
]
|
|
1714
|
+
},
|
|
1715
|
+
"bluefin.position-opened": {
|
|
1716
|
+
id: "bluefin.position-opened",
|
|
1717
|
+
protocolId: "bluefin",
|
|
1718
|
+
label: "Bluefin \u2014 Position opened",
|
|
1719
|
+
category: "position",
|
|
1720
|
+
description: "A new Bluefin liquidity position was opened.",
|
|
1721
|
+
generic: false,
|
|
1722
|
+
schema: BluefinPositionOpenedSchema,
|
|
1723
|
+
deployments: [
|
|
1724
|
+
{ network: "mainnet", eventType: "0x3492c874c1e3b3e2984e8c41b589e642d4d0a5d6459e5a9cfc2d52fd7c89c267::events::PositionOpened", primary: true }
|
|
1725
|
+
]
|
|
1726
|
+
},
|
|
1727
|
+
"bluefin.reward-collected": {
|
|
1728
|
+
id: "bluefin.reward-collected",
|
|
1729
|
+
protocolId: "bluefin",
|
|
1730
|
+
label: "Bluefin \u2014 Reward collected",
|
|
1731
|
+
category: "reward",
|
|
1732
|
+
description: "Incentive rewards were collected from a Bluefin position.",
|
|
1733
|
+
generic: false,
|
|
1734
|
+
schema: BluefinRewardCollectedSchema,
|
|
1735
|
+
deployments: [
|
|
1736
|
+
{ network: "mainnet", eventType: "0x3492c874c1e3b3e2984e8c41b589e642d4d0a5d6459e5a9cfc2d52fd7c89c267::events::UserRewardCollected", primary: true }
|
|
1737
|
+
]
|
|
1738
|
+
},
|
|
1739
|
+
"bluefin.swap": {
|
|
1740
|
+
id: "bluefin.swap",
|
|
1741
|
+
protocolId: "bluefin",
|
|
1742
|
+
label: "Bluefin \u2014 Swap",
|
|
1743
|
+
category: "swap",
|
|
1744
|
+
description: "An asset swap was executed on a Bluefin spot pool.",
|
|
1745
|
+
generic: false,
|
|
1746
|
+
schema: BluefinSwapSchema,
|
|
1747
|
+
deployments: [
|
|
1748
|
+
{ network: "mainnet", eventType: "0x3492c874c1e3b3e2984e8c41b589e642d4d0a5d6459e5a9cfc2d52fd7c89c267::events::AssetSwap", primary: true }
|
|
1749
|
+
]
|
|
1750
|
+
},
|
|
1751
|
+
"bucket.borrow": {
|
|
1752
|
+
id: "bucket.borrow",
|
|
1753
|
+
protocolId: "bucket",
|
|
1754
|
+
label: "Bucket \u2014 Borrow (mint BUCK)",
|
|
1755
|
+
category: "borrow",
|
|
1756
|
+
description: "BUCK was minted against collateral in a Bucket CDP.",
|
|
1757
|
+
generic: false,
|
|
1758
|
+
schema: BucketBorrowSchema,
|
|
1759
|
+
deployments: [
|
|
1760
|
+
{ network: "mainnet", eventType: "0xce7ff77a83ea0cb6fd39bd8748e2ec89a3f41e8efdc3f4eb123e0ca37b184db2::buck_events::BuckMinted", primary: true }
|
|
1761
|
+
]
|
|
1762
|
+
},
|
|
1763
|
+
"bucket.deposit-collateral": {
|
|
1764
|
+
id: "bucket.deposit-collateral",
|
|
1765
|
+
protocolId: "bucket",
|
|
1766
|
+
label: "Bucket \u2014 Deposit collateral",
|
|
1767
|
+
category: "supply",
|
|
1768
|
+
description: "Collateral was added to a Bucket CDP.",
|
|
1769
|
+
generic: false,
|
|
1770
|
+
schema: BucketDepositCollateralSchema,
|
|
1771
|
+
deployments: [
|
|
1772
|
+
{ network: "mainnet", eventType: "0xce7ff77a83ea0cb6fd39bd8748e2ec89a3f41e8efdc3f4eb123e0ca37b184db2::buck_events::CollateralIncreased", primary: true }
|
|
1773
|
+
]
|
|
1774
|
+
},
|
|
1775
|
+
"bucket.position-updated": {
|
|
1776
|
+
id: "bucket.position-updated",
|
|
1777
|
+
protocolId: "bucket",
|
|
1778
|
+
label: "Bucket \u2014 Position updated",
|
|
1779
|
+
category: "position",
|
|
1780
|
+
description: "A Bucket CDP position (bottle) changed state.",
|
|
1781
|
+
generic: false,
|
|
1782
|
+
schema: BucketPositionUpdatedSchema,
|
|
1783
|
+
deployments: [
|
|
1784
|
+
{ network: "mainnet", eventType: "0xce7ff77a83ea0cb6fd39bd8748e2ec89a3f41e8efdc3f4eb123e0ca37b184db2::bucket_events::BottleUpdated", primary: true }
|
|
1785
|
+
]
|
|
1786
|
+
},
|
|
1787
|
+
"bucket.redeem": {
|
|
1788
|
+
id: "bucket.redeem",
|
|
1789
|
+
protocolId: "bucket",
|
|
1790
|
+
label: "Bucket \u2014 Redeem",
|
|
1791
|
+
category: "liquidation",
|
|
1792
|
+
description: "BUCK was redeemed for collateral on a Bucket CDP.",
|
|
1793
|
+
generic: false,
|
|
1794
|
+
schema: BucketRedeemSchema,
|
|
1795
|
+
deployments: [
|
|
1796
|
+
{ network: "mainnet", eventType: "0xce7ff77a83ea0cb6fd39bd8748e2ec89a3f41e8efdc3f4eb123e0ca37b184db2::bucket_events::Redeem", primary: true }
|
|
1797
|
+
]
|
|
1798
|
+
},
|
|
1799
|
+
"bucket.repay": {
|
|
1800
|
+
id: "bucket.repay",
|
|
1801
|
+
protocolId: "bucket",
|
|
1802
|
+
label: "Bucket \u2014 Repay (burn BUCK)",
|
|
1803
|
+
category: "repay",
|
|
1804
|
+
description: "BUCK was burned to repay debt in a Bucket CDP.",
|
|
1805
|
+
generic: false,
|
|
1806
|
+
schema: BucketRepaySchema,
|
|
1807
|
+
deployments: [
|
|
1808
|
+
{ network: "mainnet", eventType: "0xce7ff77a83ea0cb6fd39bd8748e2ec89a3f41e8efdc3f4eb123e0ca37b184db2::buck_events::BuckBurnt", primary: true }
|
|
1809
|
+
]
|
|
1810
|
+
},
|
|
1811
|
+
"bucket.sbuck-deposit": {
|
|
1812
|
+
id: "bucket.sbuck-deposit",
|
|
1813
|
+
protocolId: "bucket",
|
|
1814
|
+
label: "Bucket \u2014 sBUCK deposit",
|
|
1815
|
+
category: "supply",
|
|
1816
|
+
description: "BUCK was deposited into the sBUCK savings vault.",
|
|
1817
|
+
generic: false,
|
|
1818
|
+
schema: BucketSbuckDepositSchema,
|
|
1819
|
+
deployments: [
|
|
1820
|
+
{ network: "mainnet", eventType: "0x1798f84ee72176114ddbf5525a6d964c5f8ea1b3738d08d50d0d3de4cf584884::event::Deposit", primary: true }
|
|
1821
|
+
]
|
|
1822
|
+
},
|
|
1823
|
+
"bucket.sbuck-rewards": {
|
|
1824
|
+
id: "bucket.sbuck-rewards",
|
|
1825
|
+
protocolId: "bucket",
|
|
1826
|
+
label: "Bucket \u2014 sBUCK rewards collected",
|
|
1827
|
+
category: "reward",
|
|
1828
|
+
description: "Rewards were collected from the sBUCK savings vault.",
|
|
1829
|
+
generic: false,
|
|
1830
|
+
schema: BucketSbuckRewardsSchema,
|
|
1831
|
+
deployments: [
|
|
1832
|
+
{ network: "mainnet", eventType: "0x1798f84ee72176114ddbf5525a6d964c5f8ea1b3738d08d50d0d3de4cf584884::event::CollectRewards", primary: true }
|
|
1833
|
+
]
|
|
1834
|
+
},
|
|
1835
|
+
"bucket.withdraw-collateral": {
|
|
1836
|
+
id: "bucket.withdraw-collateral",
|
|
1837
|
+
protocolId: "bucket",
|
|
1838
|
+
label: "Bucket \u2014 Withdraw collateral",
|
|
1839
|
+
category: "withdraw",
|
|
1840
|
+
description: "Collateral was removed from a Bucket CDP.",
|
|
1841
|
+
generic: false,
|
|
1842
|
+
schema: BucketWithdrawCollateralSchema,
|
|
1843
|
+
deployments: [
|
|
1844
|
+
{ network: "mainnet", eventType: "0xce7ff77a83ea0cb6fd39bd8748e2ec89a3f41e8efdc3f4eb123e0ca37b184db2::buck_events::CollateralDecreased", primary: true }
|
|
1845
|
+
]
|
|
1846
|
+
},
|
|
1847
|
+
"cetus.add-liquidity": {
|
|
1848
|
+
id: "cetus.add-liquidity",
|
|
1849
|
+
protocolId: "cetus",
|
|
1850
|
+
label: "Cetus \u2014 Add liquidity",
|
|
1851
|
+
category: "liquidity",
|
|
1852
|
+
description: "Liquidity was added to a Cetus position.",
|
|
1853
|
+
generic: false,
|
|
1854
|
+
schema: CetusAddLiquiditySchema,
|
|
1855
|
+
deployments: [
|
|
1856
|
+
{ network: "mainnet", eventType: "0x1eabed72c53feb3805120a081dc15963c204dc8d091542592abaf7a35689b2fb::pool::AddLiquidityEvent", primary: true }
|
|
1857
|
+
]
|
|
1858
|
+
},
|
|
1859
|
+
"cetus.close-position": {
|
|
1860
|
+
id: "cetus.close-position",
|
|
1861
|
+
protocolId: "cetus",
|
|
1862
|
+
label: "Cetus \u2014 Close position",
|
|
1863
|
+
category: "position",
|
|
1864
|
+
description: "A Cetus liquidity position was closed.",
|
|
1865
|
+
generic: false,
|
|
1866
|
+
schema: CetusClosePositionSchema,
|
|
1867
|
+
deployments: [
|
|
1868
|
+
{ network: "mainnet", eventType: "0x1eabed72c53feb3805120a081dc15963c204dc8d091542592abaf7a35689b2fb::pool::ClosePositionEvent", primary: true }
|
|
1869
|
+
]
|
|
1870
|
+
},
|
|
1871
|
+
"cetus.collect-fee": {
|
|
1872
|
+
id: "cetus.collect-fee",
|
|
1873
|
+
protocolId: "cetus",
|
|
1874
|
+
label: "Cetus \u2014 Collect fee",
|
|
1875
|
+
category: "fee",
|
|
1876
|
+
description: "Accrued swap fees were collected from a Cetus position.",
|
|
1877
|
+
generic: false,
|
|
1878
|
+
schema: CetusCollectFeeSchema,
|
|
1879
|
+
deployments: [
|
|
1880
|
+
{ network: "mainnet", eventType: "0x1eabed72c53feb3805120a081dc15963c204dc8d091542592abaf7a35689b2fb::pool::CollectFeeEvent", primary: true }
|
|
1881
|
+
]
|
|
1882
|
+
},
|
|
1883
|
+
"cetus.create-pool": {
|
|
1884
|
+
id: "cetus.create-pool",
|
|
1885
|
+
protocolId: "cetus",
|
|
1886
|
+
label: "Cetus \u2014 Create pool",
|
|
1887
|
+
category: "pool",
|
|
1888
|
+
description: "A new Cetus CLMM pool was created via the factory.",
|
|
1889
|
+
generic: false,
|
|
1890
|
+
schema: CetusCreatePoolSchema,
|
|
1891
|
+
deployments: [
|
|
1892
|
+
{ network: "mainnet", eventType: "0x1eabed72c53feb3805120a081dc15963c204dc8d091542592abaf7a35689b2fb::factory::CreatePoolEvent", primary: true }
|
|
1893
|
+
]
|
|
1894
|
+
},
|
|
1895
|
+
"cetus.open-position": {
|
|
1896
|
+
id: "cetus.open-position",
|
|
1897
|
+
protocolId: "cetus",
|
|
1898
|
+
label: "Cetus \u2014 Open position",
|
|
1899
|
+
category: "position",
|
|
1900
|
+
description: "A new Cetus liquidity position was opened.",
|
|
1901
|
+
generic: false,
|
|
1902
|
+
schema: CetusOpenPositionSchema,
|
|
1903
|
+
deployments: [
|
|
1904
|
+
{ network: "mainnet", eventType: "0x1eabed72c53feb3805120a081dc15963c204dc8d091542592abaf7a35689b2fb::pool::OpenPositionEvent", primary: true }
|
|
1905
|
+
]
|
|
1906
|
+
},
|
|
1907
|
+
"cetus.remove-liquidity": {
|
|
1908
|
+
id: "cetus.remove-liquidity",
|
|
1909
|
+
protocolId: "cetus",
|
|
1910
|
+
label: "Cetus \u2014 Remove liquidity",
|
|
1911
|
+
category: "liquidity",
|
|
1912
|
+
description: "Liquidity was removed from a Cetus position.",
|
|
1913
|
+
generic: false,
|
|
1914
|
+
schema: CetusRemoveLiquiditySchema,
|
|
1915
|
+
deployments: [
|
|
1916
|
+
{ network: "mainnet", eventType: "0x1eabed72c53feb3805120a081dc15963c204dc8d091542592abaf7a35689b2fb::pool::RemoveLiquidityEvent", primary: true }
|
|
1917
|
+
]
|
|
1918
|
+
},
|
|
1919
|
+
"cetus.swap": {
|
|
1920
|
+
id: "cetus.swap",
|
|
1921
|
+
protocolId: "cetus",
|
|
1922
|
+
label: "Cetus \u2014 Swap",
|
|
1923
|
+
category: "swap",
|
|
1924
|
+
description: "A token swap was executed on a Cetus CLMM pool.",
|
|
1925
|
+
generic: false,
|
|
1926
|
+
schema: CetusSwapSchema,
|
|
1927
|
+
deployments: [
|
|
1928
|
+
{ network: "mainnet", eventType: "0x1eabed72c53feb3805120a081dc15963c204dc8d091542592abaf7a35689b2fb::pool::SwapEvent", primary: true }
|
|
1929
|
+
]
|
|
1930
|
+
},
|
|
1931
|
+
"current.borrow": {
|
|
1932
|
+
id: "current.borrow",
|
|
1933
|
+
protocolId: "current",
|
|
1934
|
+
label: "Current \u2014 Borrow",
|
|
1935
|
+
category: "borrow",
|
|
1936
|
+
description: "Assets were borrowed from a Current lending market.",
|
|
1937
|
+
generic: false,
|
|
1938
|
+
schema: CurrentBorrowSchema,
|
|
1939
|
+
deployments: [
|
|
1940
|
+
{ network: "mainnet", eventType: "0xfe1d8929d13b00aaecd7642dec1c6d41cab82882a1b139efa46bf61dfd6380bf::borrow::BorrowEvent", primary: true }
|
|
1941
|
+
]
|
|
1942
|
+
},
|
|
1943
|
+
"current.deposit": {
|
|
1944
|
+
id: "current.deposit",
|
|
1945
|
+
protocolId: "current",
|
|
1946
|
+
label: "Current \u2014 Deposit",
|
|
1947
|
+
category: "supply",
|
|
1948
|
+
description: "Assets were deposited (supplied) to a Current lending market.",
|
|
1949
|
+
generic: false,
|
|
1950
|
+
schema: CurrentDepositSchema,
|
|
1951
|
+
deployments: [
|
|
1952
|
+
{ network: "mainnet", eventType: "0xfe1d8929d13b00aaecd7642dec1c6d41cab82882a1b139efa46bf61dfd6380bf::deposit::DepositEvent", primary: true }
|
|
1953
|
+
]
|
|
1954
|
+
},
|
|
1955
|
+
"current.liquidate": {
|
|
1956
|
+
id: "current.liquidate",
|
|
1957
|
+
protocolId: "current",
|
|
1958
|
+
label: "Current \u2014 Liquidation",
|
|
1959
|
+
category: "liquidation",
|
|
1960
|
+
description: "A Current obligation was liquidated.",
|
|
1961
|
+
generic: false,
|
|
1962
|
+
schema: CurrentLiquidateSchema,
|
|
1963
|
+
deployments: [
|
|
1964
|
+
{ network: "mainnet", eventType: "0xfe1d8929d13b00aaecd7642dec1c6d41cab82882a1b139efa46bf61dfd6380bf::liquidate::LiquidateEvent", primary: true }
|
|
1965
|
+
]
|
|
1966
|
+
},
|
|
1967
|
+
"current.repay": {
|
|
1968
|
+
id: "current.repay",
|
|
1969
|
+
protocolId: "current",
|
|
1970
|
+
label: "Current \u2014 Repay",
|
|
1971
|
+
category: "repay",
|
|
1972
|
+
description: "A Current loan was repaid.",
|
|
1973
|
+
generic: false,
|
|
1974
|
+
schema: CurrentRepaySchema,
|
|
1975
|
+
deployments: [
|
|
1976
|
+
{ network: "mainnet", eventType: "0xfe1d8929d13b00aaecd7642dec1c6d41cab82882a1b139efa46bf61dfd6380bf::repay::RepayEvent", primary: true }
|
|
1977
|
+
]
|
|
1978
|
+
},
|
|
1979
|
+
"current.withdraw": {
|
|
1980
|
+
id: "current.withdraw",
|
|
1981
|
+
protocolId: "current",
|
|
1982
|
+
label: "Current \u2014 Withdraw",
|
|
1983
|
+
category: "withdraw",
|
|
1984
|
+
description: "Assets were withdrawn from a Current lending market.",
|
|
1985
|
+
generic: false,
|
|
1986
|
+
schema: CurrentWithdrawSchema,
|
|
1987
|
+
deployments: [
|
|
1988
|
+
{ network: "mainnet", eventType: "0xfe1d8929d13b00aaecd7642dec1c6d41cab82882a1b139efa46bf61dfd6380bf::withdraw::WithdrawEvent", primary: true }
|
|
1989
|
+
]
|
|
1990
|
+
},
|
|
1991
|
+
"deepbook.balance": {
|
|
1992
|
+
id: "deepbook.balance",
|
|
1993
|
+
protocolId: "deepbook",
|
|
1994
|
+
label: "DeepBook \u2014 Balance change",
|
|
1995
|
+
category: "fee",
|
|
1996
|
+
description: "A deposit or withdrawal on a DeepBook balance manager.",
|
|
1997
|
+
generic: false,
|
|
1998
|
+
schema: DeepbookBalanceSchema,
|
|
1999
|
+
deployments: [
|
|
2000
|
+
{ network: "mainnet", eventType: "0x2c8d603bc51326b8c13cef9dd07031a408a48dddb541963357661df5d3204809::balance_manager::BalanceEvent", primary: true }
|
|
2001
|
+
]
|
|
2002
|
+
},
|
|
2003
|
+
"deepbook.flash-loan": {
|
|
2004
|
+
id: "deepbook.flash-loan",
|
|
2005
|
+
protocolId: "deepbook",
|
|
2006
|
+
label: "DeepBook \u2014 Flash loan borrowed",
|
|
2007
|
+
category: "fee",
|
|
2008
|
+
description: "A flash loan was borrowed from a DeepBook pool.",
|
|
2009
|
+
generic: false,
|
|
2010
|
+
schema: DeepbookFlashLoanSchema,
|
|
2011
|
+
deployments: [
|
|
2012
|
+
{ network: "mainnet", eventType: "0x2c8d603bc51326b8c13cef9dd07031a408a48dddb541963357661df5d3204809::vault::FlashLoanBorrowed", primary: true }
|
|
2013
|
+
]
|
|
2014
|
+
},
|
|
2015
|
+
"deepbook.order-canceled": {
|
|
2016
|
+
id: "deepbook.order-canceled",
|
|
2017
|
+
protocolId: "deepbook",
|
|
2018
|
+
label: "DeepBook \u2014 Order canceled",
|
|
2019
|
+
category: "order",
|
|
2020
|
+
description: "A DeepBook maker order was canceled.",
|
|
2021
|
+
generic: false,
|
|
2022
|
+
schema: DeepbookOrderCanceledSchema,
|
|
2023
|
+
deployments: [
|
|
2024
|
+
{ network: "mainnet", eventType: "0x2c8d603bc51326b8c13cef9dd07031a408a48dddb541963357661df5d3204809::order::OrderCanceled", primary: true }
|
|
2025
|
+
]
|
|
2026
|
+
},
|
|
2027
|
+
"deepbook.order-filled": {
|
|
2028
|
+
id: "deepbook.order-filled",
|
|
2029
|
+
protocolId: "deepbook",
|
|
2030
|
+
label: "DeepBook \u2014 Order filled",
|
|
2031
|
+
category: "order",
|
|
2032
|
+
description: "A DeepBook order was filled (partially or fully).",
|
|
2033
|
+
generic: false,
|
|
2034
|
+
schema: DeepbookOrderFilledSchema,
|
|
2035
|
+
deployments: [
|
|
2036
|
+
{ network: "mainnet", eventType: "0x2c8d603bc51326b8c13cef9dd07031a408a48dddb541963357661df5d3204809::order_info::OrderFilled", primary: true }
|
|
2037
|
+
]
|
|
2038
|
+
},
|
|
2039
|
+
"deepbook.order-info": {
|
|
2040
|
+
id: "deepbook.order-info",
|
|
2041
|
+
protocolId: "deepbook",
|
|
2042
|
+
label: "DeepBook \u2014 Order update",
|
|
2043
|
+
category: "order",
|
|
2044
|
+
description: "An order's lifecycle update on a DeepBook pool (placed/filled/status).",
|
|
2045
|
+
generic: false,
|
|
2046
|
+
schema: DeepbookOrderInfoSchema,
|
|
2047
|
+
deployments: [
|
|
2048
|
+
{ network: "mainnet", eventType: "0x2c8d603bc51326b8c13cef9dd07031a408a48dddb541963357661df5d3204809::order_info::OrderInfo", primary: true }
|
|
2049
|
+
]
|
|
2050
|
+
},
|
|
2051
|
+
"deepbook.order-placed": {
|
|
2052
|
+
id: "deepbook.order-placed",
|
|
2053
|
+
protocolId: "deepbook",
|
|
2054
|
+
label: "DeepBook \u2014 Order placed",
|
|
2055
|
+
category: "order",
|
|
2056
|
+
description: "A maker limit order was placed on a DeepBook pool.",
|
|
2057
|
+
generic: false,
|
|
2058
|
+
schema: DeepbookOrderPlacedSchema,
|
|
2059
|
+
deployments: [
|
|
2060
|
+
{ network: "mainnet", eventType: "0x2c8d603bc51326b8c13cef9dd07031a408a48dddb541963357661df5d3204809::order_info::OrderPlaced", primary: true }
|
|
2061
|
+
]
|
|
2062
|
+
},
|
|
2063
|
+
"ember.deposit": {
|
|
2064
|
+
id: "ember.deposit",
|
|
2065
|
+
protocolId: "ember",
|
|
2066
|
+
label: "Ember \u2014 Vault deposit",
|
|
2067
|
+
category: "vault",
|
|
2068
|
+
description: "A deposit into an Ember vault (matches all deposit coin types).",
|
|
2069
|
+
generic: true,
|
|
2070
|
+
schema: EmberDepositSchema,
|
|
2071
|
+
deployments: [
|
|
2072
|
+
{ network: "mainnet", eventType: "0xc83d5406fd355f34d3ce87b35ab2c0b099af9d309ba96c17e40309502a49976f::events::VaultDepositEvent", primary: true }
|
|
2073
|
+
]
|
|
2074
|
+
},
|
|
2075
|
+
"ember.rate-updated": {
|
|
2076
|
+
id: "ember.rate-updated",
|
|
2077
|
+
protocolId: "ember",
|
|
2078
|
+
label: "Ember \u2014 Vault rate updated",
|
|
2079
|
+
category: "reward",
|
|
2080
|
+
description: "An Ember vault's share rate (price) was updated.",
|
|
2081
|
+
generic: false,
|
|
2082
|
+
schema: EmberRateUpdatedSchema,
|
|
2083
|
+
deployments: [
|
|
2084
|
+
{ network: "mainnet", eventType: "0xc83d5406fd355f34d3ce87b35ab2c0b099af9d309ba96c17e40309502a49976f::events::VaultRateUpdatedEvent", primary: true }
|
|
2085
|
+
]
|
|
2086
|
+
},
|
|
2087
|
+
"ember.redeem-processed": {
|
|
2088
|
+
id: "ember.redeem-processed",
|
|
2089
|
+
protocolId: "ember",
|
|
2090
|
+
label: "Ember \u2014 Redeem processed",
|
|
2091
|
+
category: "withdraw",
|
|
2092
|
+
description: "A queued Ember redeem request was processed.",
|
|
2093
|
+
generic: true,
|
|
2094
|
+
schema: EmberRedeemProcessedSchema,
|
|
2095
|
+
deployments: [
|
|
2096
|
+
{ network: "mainnet", eventType: "0xc83d5406fd355f34d3ce87b35ab2c0b099af9d309ba96c17e40309502a49976f::events::RequestProcessedEvent", primary: true }
|
|
2097
|
+
]
|
|
2098
|
+
},
|
|
2099
|
+
"ember.redeem-request": {
|
|
2100
|
+
id: "ember.redeem-request",
|
|
2101
|
+
protocolId: "ember",
|
|
2102
|
+
label: "Ember \u2014 Redeem requested",
|
|
2103
|
+
category: "withdraw",
|
|
2104
|
+
description: "A redeem (withdrawal) was requested from an Ember vault.",
|
|
2105
|
+
generic: true,
|
|
2106
|
+
schema: EmberRedeemRequestSchema,
|
|
2107
|
+
deployments: [
|
|
2108
|
+
{ network: "mainnet", eventType: "0xc83d5406fd355f34d3ce87b35ab2c0b099af9d309ba96c17e40309502a49976f::events::RequestRedeemedEvent", primary: true }
|
|
2109
|
+
]
|
|
2110
|
+
},
|
|
2111
|
+
"flowx.amm-pair-created": {
|
|
2112
|
+
id: "flowx.amm-pair-created",
|
|
2113
|
+
protocolId: "flowx",
|
|
2114
|
+
label: "FlowX \u2014 Pair created (AMM)",
|
|
2115
|
+
category: "pool",
|
|
2116
|
+
description: "A new FlowX AMM trading pair was created.",
|
|
2117
|
+
generic: false,
|
|
2118
|
+
schema: FlowxAmmPairCreatedSchema,
|
|
2119
|
+
deployments: [
|
|
2120
|
+
{ network: "mainnet", eventType: "0xba153169476e8c3114962261d1edc70de5ad9781b83cc617ecc8c1923191cae0::factory::PairCreated", primary: true }
|
|
2121
|
+
]
|
|
2122
|
+
},
|
|
2123
|
+
"flowx.amm-swap": {
|
|
2124
|
+
id: "flowx.amm-swap",
|
|
2125
|
+
protocolId: "flowx",
|
|
2126
|
+
label: "FlowX \u2014 Swap (AMM)",
|
|
2127
|
+
category: "swap",
|
|
2128
|
+
description: "A swap was executed on a FlowX AMM pair.",
|
|
2129
|
+
generic: false,
|
|
2130
|
+
schema: FlowxAmmSwapSchema,
|
|
2131
|
+
deployments: [
|
|
2132
|
+
{ network: "mainnet", eventType: "0xba153169476e8c3114962261d1edc70de5ad9781b83cc617ecc8c1923191cae0::pair::Swapped", primary: true }
|
|
2133
|
+
]
|
|
2134
|
+
},
|
|
2135
|
+
"flowx.clmm-pool-created": {
|
|
2136
|
+
id: "flowx.clmm-pool-created",
|
|
2137
|
+
protocolId: "flowx",
|
|
2138
|
+
label: "FlowX \u2014 Pool created (CLMM)",
|
|
2139
|
+
category: "pool",
|
|
2140
|
+
description: "A new FlowX CLMM pool was created.",
|
|
2141
|
+
generic: false,
|
|
2142
|
+
schema: FlowxClmmPoolCreatedSchema,
|
|
2143
|
+
deployments: [
|
|
2144
|
+
{ network: "mainnet", eventType: "0x25929e7f29e0a30eb4e692952ba1b5b65a3a4d65ab5f2a32e1ba3edcb587f26d::pool_manager::PoolCreated", primary: true }
|
|
2145
|
+
]
|
|
2146
|
+
},
|
|
2147
|
+
"flowx.clmm-swap": {
|
|
2148
|
+
id: "flowx.clmm-swap",
|
|
2149
|
+
protocolId: "flowx",
|
|
2150
|
+
label: "FlowX \u2014 Swap (CLMM)",
|
|
2151
|
+
category: "swap",
|
|
2152
|
+
description: "A swap was executed on a FlowX CLMM pool.",
|
|
2153
|
+
generic: false,
|
|
2154
|
+
schema: FlowxClmmSwapSchema,
|
|
2155
|
+
deployments: [
|
|
2156
|
+
{ network: "mainnet", eventType: "0x25929e7f29e0a30eb4e692952ba1b5b65a3a4d65ab5f2a32e1ba3edcb587f26d::pool::Swap", primary: true }
|
|
2157
|
+
]
|
|
2158
|
+
},
|
|
2159
|
+
"haedal.instant-unstaked": {
|
|
2160
|
+
id: "haedal.instant-unstaked",
|
|
2161
|
+
protocolId: "haedal",
|
|
2162
|
+
label: "Haedal \u2014 Instant unstaked",
|
|
2163
|
+
category: "unstake",
|
|
2164
|
+
description: "An instant unstake was performed on Haedal.",
|
|
2165
|
+
generic: false,
|
|
2166
|
+
schema: HaedalInstantUnstakedSchema,
|
|
2167
|
+
deployments: [
|
|
2168
|
+
{ network: "mainnet", eventType: "0xbde4ba4c2e274a60ce15c1cfff9e5c42e41654ac8b6d906a57efa4bd3c29f47d::staking::UserInstantUnstaked", primary: true }
|
|
2169
|
+
]
|
|
2170
|
+
},
|
|
2171
|
+
"haedal.staked": {
|
|
2172
|
+
id: "haedal.staked",
|
|
2173
|
+
protocolId: "haedal",
|
|
2174
|
+
label: "Haedal \u2014 Staked",
|
|
2175
|
+
category: "stake",
|
|
2176
|
+
description: "SUI was staked with Haedal in exchange for haSUI.",
|
|
2177
|
+
generic: false,
|
|
2178
|
+
schema: HaedalStakedSchema,
|
|
2179
|
+
deployments: [
|
|
2180
|
+
{ network: "mainnet", eventType: "0xbde4ba4c2e274a60ce15c1cfff9e5c42e41654ac8b6d906a57efa4bd3c29f47d::staking::UserStaked", primary: true }
|
|
2181
|
+
]
|
|
2182
|
+
},
|
|
2183
|
+
"haedal.unstaked": {
|
|
2184
|
+
id: "haedal.unstaked",
|
|
2185
|
+
protocolId: "haedal",
|
|
2186
|
+
label: "Haedal \u2014 Unstaked",
|
|
2187
|
+
category: "unstake",
|
|
2188
|
+
description: "A delayed unstake was initiated on Haedal.",
|
|
2189
|
+
generic: false,
|
|
2190
|
+
schema: HaedalUnstakedSchema,
|
|
2191
|
+
deployments: [
|
|
2192
|
+
{ network: "mainnet", eventType: "0xbde4ba4c2e274a60ce15c1cfff9e5c42e41654ac8b6d906a57efa4bd3c29f47d::staking::UserNormalUnstaked", primary: true }
|
|
2193
|
+
]
|
|
2194
|
+
},
|
|
2195
|
+
"kai.add-liquidity": {
|
|
2196
|
+
id: "kai.add-liquidity",
|
|
2197
|
+
protocolId: "kai",
|
|
2198
|
+
label: "Kai \u2014 Increase position",
|
|
2199
|
+
category: "liquidity",
|
|
2200
|
+
description: "Liquidity was added to a Kai leveraged position.",
|
|
2201
|
+
generic: false,
|
|
2202
|
+
schema: KaiAddLiquiditySchema,
|
|
2203
|
+
deployments: [
|
|
2204
|
+
{ network: "mainnet", eventType: "0x51e0ccce48f0763f98f1cb4856847c2e1531adacada99cdd7626ab999db57523::position_core_clmm::AddLiquidityInfo", primary: true }
|
|
2205
|
+
]
|
|
2206
|
+
},
|
|
2207
|
+
"kai.deleverage": {
|
|
2208
|
+
id: "kai.deleverage",
|
|
2209
|
+
protocolId: "kai",
|
|
2210
|
+
label: "Kai \u2014 Deleverage",
|
|
2211
|
+
category: "repay",
|
|
2212
|
+
description: "A Kai leveraged position was deleveraged (debt repaid).",
|
|
2213
|
+
generic: false,
|
|
2214
|
+
schema: KaiDeleverageSchema,
|
|
2215
|
+
deployments: [
|
|
2216
|
+
{ network: "mainnet", eventType: "0x51e0ccce48f0763f98f1cb4856847c2e1531adacada99cdd7626ab999db57523::position_core_clmm::DeleverageInfo", primary: true }
|
|
2217
|
+
]
|
|
2218
|
+
},
|
|
2219
|
+
"kai.liquidation": {
|
|
2220
|
+
id: "kai.liquidation",
|
|
2221
|
+
protocolId: "kai",
|
|
2222
|
+
label: "Kai \u2014 Liquidation",
|
|
2223
|
+
category: "liquidation",
|
|
2224
|
+
description: "A Kai leveraged position was liquidated.",
|
|
2225
|
+
generic: false,
|
|
2226
|
+
schema: KaiLiquidationSchema,
|
|
2227
|
+
deployments: [
|
|
2228
|
+
{ network: "mainnet", eventType: "0x51e0ccce48f0763f98f1cb4856847c2e1531adacada99cdd7626ab999db57523::position_core_clmm::LiquidationInfo", primary: true }
|
|
2229
|
+
]
|
|
2230
|
+
},
|
|
2231
|
+
"kai.position-open": {
|
|
2232
|
+
id: "kai.position-open",
|
|
2233
|
+
protocolId: "kai",
|
|
2234
|
+
label: "Kai \u2014 Open leveraged position",
|
|
2235
|
+
category: "borrow",
|
|
2236
|
+
description: "A new Kai leveraged CLMM position was opened.",
|
|
2237
|
+
generic: false,
|
|
2238
|
+
schema: KaiPositionOpenSchema,
|
|
2239
|
+
deployments: [
|
|
2240
|
+
{ network: "mainnet", eventType: "0x51e0ccce48f0763f98f1cb4856847c2e1531adacada99cdd7626ab999db57523::position_core_clmm::PositionCreationInfo", primary: true }
|
|
2241
|
+
]
|
|
2242
|
+
},
|
|
2243
|
+
"kai.reduce": {
|
|
2244
|
+
id: "kai.reduce",
|
|
2245
|
+
protocolId: "kai",
|
|
2246
|
+
label: "Kai \u2014 Reduce position",
|
|
2247
|
+
category: "withdraw",
|
|
2248
|
+
description: "A Kai leveraged position was reduced / partially withdrawn.",
|
|
2249
|
+
generic: false,
|
|
2250
|
+
schema: KaiReduceSchema,
|
|
2251
|
+
deployments: [
|
|
2252
|
+
{ network: "mainnet", eventType: "0x51e0ccce48f0763f98f1cb4856847c2e1531adacada99cdd7626ab999db57523::position_core_clmm::ReductionInfo", primary: true }
|
|
2253
|
+
]
|
|
2254
|
+
},
|
|
2255
|
+
"kai.supply": {
|
|
2256
|
+
id: "kai.supply",
|
|
2257
|
+
protocolId: "kai",
|
|
2258
|
+
label: "Kai \u2014 Supply to pool",
|
|
2259
|
+
category: "lend",
|
|
2260
|
+
description: "Liquidity was supplied to a Kai lending pool.",
|
|
2261
|
+
generic: false,
|
|
2262
|
+
schema: KaiSupplySchema,
|
|
2263
|
+
deployments: [
|
|
2264
|
+
{ network: "mainnet", eventType: "0x51e0ccce48f0763f98f1cb4856847c2e1531adacada99cdd7626ab999db57523::supply_pool::SupplyInfo", primary: true }
|
|
2265
|
+
]
|
|
2266
|
+
},
|
|
2267
|
+
"kai.supply-withdraw": {
|
|
2268
|
+
id: "kai.supply-withdraw",
|
|
2269
|
+
protocolId: "kai",
|
|
2270
|
+
label: "Kai \u2014 Withdraw from pool",
|
|
2271
|
+
category: "withdraw",
|
|
2272
|
+
description: "Supplied liquidity was withdrawn from a Kai lending pool.",
|
|
2273
|
+
generic: false,
|
|
2274
|
+
schema: KaiSupplyWithdrawSchema,
|
|
2275
|
+
deployments: [
|
|
2276
|
+
{ network: "mainnet", eventType: "0x51e0ccce48f0763f98f1cb4856847c2e1531adacada99cdd7626ab999db57523::supply_pool::WithdrawInfo", primary: true }
|
|
2277
|
+
]
|
|
2278
|
+
},
|
|
2279
|
+
"kriya.add-liquidity": {
|
|
2280
|
+
id: "kriya.add-liquidity",
|
|
2281
|
+
protocolId: "kriya",
|
|
2282
|
+
label: "Kriya \u2014 Add liquidity",
|
|
2283
|
+
category: "liquidity",
|
|
2284
|
+
description: "Liquidity was provided to a Kriya pool.",
|
|
2285
|
+
generic: false,
|
|
2286
|
+
schema: KriyaAddLiquiditySchema,
|
|
2287
|
+
deployments: [
|
|
2288
|
+
{ network: "mainnet", eventType: "0xa0eba10b173538c8fecca1dff298e488402cc9ff374f8a12ca7758eebe830b66::spot_dex::LiquidityAddedEvent", primary: true }
|
|
2289
|
+
]
|
|
2290
|
+
},
|
|
2291
|
+
"kriya.swap": {
|
|
2292
|
+
id: "kriya.swap",
|
|
2293
|
+
protocolId: "kriya",
|
|
2294
|
+
label: "Kriya \u2014 Swap",
|
|
2295
|
+
category: "swap",
|
|
2296
|
+
description: "A token swap was executed on a Kriya spot pool (matches all token types).",
|
|
2297
|
+
generic: true,
|
|
2298
|
+
schema: KriyaSwapSchema,
|
|
2299
|
+
deployments: [
|
|
2300
|
+
{ network: "mainnet", eventType: "0xa0eba10b173538c8fecca1dff298e488402cc9ff374f8a12ca7758eebe830b66::spot_dex::SwapEvent", primary: true }
|
|
2301
|
+
]
|
|
2302
|
+
},
|
|
2303
|
+
"magma.add-liquidity": {
|
|
2304
|
+
id: "magma.add-liquidity",
|
|
2305
|
+
protocolId: "magma",
|
|
2306
|
+
label: "Magma \u2014 Add liquidity",
|
|
2307
|
+
category: "liquidity",
|
|
2308
|
+
description: "Liquidity was added to a Magma CLMM pool.",
|
|
2309
|
+
generic: false,
|
|
2310
|
+
schema: MagmaAddLiquiditySchema,
|
|
2311
|
+
deployments: [
|
|
2312
|
+
{ network: "mainnet", eventType: "0x4a35d3dfef55ed3631b7158544c6322a23bc434fe4fca1234cb680ce0505f82d::pool::AddLiquidityEvent", primary: true }
|
|
2313
|
+
]
|
|
2314
|
+
},
|
|
2315
|
+
"magma.collect-fee": {
|
|
2316
|
+
id: "magma.collect-fee",
|
|
2317
|
+
protocolId: "magma",
|
|
2318
|
+
label: "Magma \u2014 Collect fee",
|
|
2319
|
+
category: "fee",
|
|
2320
|
+
description: "Trading fees were collected from a Magma position.",
|
|
2321
|
+
generic: false,
|
|
2322
|
+
schema: MagmaCollectFeeSchema,
|
|
2323
|
+
deployments: [
|
|
2324
|
+
{ network: "mainnet", eventType: "0x4a35d3dfef55ed3631b7158544c6322a23bc434fe4fca1234cb680ce0505f82d::pool::CollectFeeEvent", primary: true }
|
|
2325
|
+
]
|
|
2326
|
+
},
|
|
2327
|
+
"magma.collect-reward": {
|
|
2328
|
+
id: "magma.collect-reward",
|
|
2329
|
+
protocolId: "magma",
|
|
2330
|
+
label: "Magma \u2014 Collect reward",
|
|
2331
|
+
category: "reward",
|
|
2332
|
+
description: "Incentive rewards were collected from a Magma position.",
|
|
2333
|
+
generic: false,
|
|
2334
|
+
schema: MagmaCollectRewardSchema,
|
|
2335
|
+
deployments: [
|
|
2336
|
+
{ network: "mainnet", eventType: "0x4a35d3dfef55ed3631b7158544c6322a23bc434fe4fca1234cb680ce0505f82d::pool::CollectRewardEvent", primary: true }
|
|
2337
|
+
]
|
|
2338
|
+
},
|
|
2339
|
+
"magma.create-pool": {
|
|
2340
|
+
id: "magma.create-pool",
|
|
2341
|
+
protocolId: "magma",
|
|
2342
|
+
label: "Magma \u2014 Create pool",
|
|
2343
|
+
category: "pool",
|
|
2344
|
+
description: "A new Magma CLMM pool was created.",
|
|
2345
|
+
generic: false,
|
|
2346
|
+
schema: MagmaCreatePoolSchema,
|
|
2347
|
+
deployments: [
|
|
2348
|
+
{ network: "mainnet", eventType: "0x4a35d3dfef55ed3631b7158544c6322a23bc434fe4fca1234cb680ce0505f82d::factory::CreatePoolEvent", primary: true }
|
|
2349
|
+
]
|
|
2350
|
+
},
|
|
2351
|
+
"magma.remove-liquidity": {
|
|
2352
|
+
id: "magma.remove-liquidity",
|
|
2353
|
+
protocolId: "magma",
|
|
2354
|
+
label: "Magma \u2014 Remove liquidity",
|
|
2355
|
+
category: "liquidity",
|
|
2356
|
+
description: "Liquidity was removed from a Magma CLMM pool.",
|
|
2357
|
+
generic: false,
|
|
2358
|
+
schema: MagmaRemoveLiquiditySchema,
|
|
2359
|
+
deployments: [
|
|
2360
|
+
{ network: "mainnet", eventType: "0x4a35d3dfef55ed3631b7158544c6322a23bc434fe4fca1234cb680ce0505f82d::pool::RemoveLiquidityEvent", primary: true }
|
|
2361
|
+
]
|
|
2362
|
+
},
|
|
2363
|
+
"magma.swap": {
|
|
2364
|
+
id: "magma.swap",
|
|
2365
|
+
protocolId: "magma",
|
|
2366
|
+
label: "Magma \u2014 Swap",
|
|
2367
|
+
category: "swap",
|
|
2368
|
+
description: "A token swap was executed on a Magma CLMM pool.",
|
|
2369
|
+
generic: false,
|
|
2370
|
+
schema: MagmaSwapSchema,
|
|
2371
|
+
deployments: [
|
|
2372
|
+
{ network: "mainnet", eventType: "0x4a35d3dfef55ed3631b7158544c6322a23bc434fe4fca1234cb680ce0505f82d::pool::SwapEvent", primary: true }
|
|
2373
|
+
]
|
|
2374
|
+
},
|
|
2375
|
+
"mole.add-debt": {
|
|
2376
|
+
id: "mole.add-debt",
|
|
2377
|
+
protocolId: "mole",
|
|
2378
|
+
label: "Mole \u2014 Add debt (leverage)",
|
|
2379
|
+
category: "borrow",
|
|
2380
|
+
description: "Debt was added to a Mole leveraged-farm position.",
|
|
2381
|
+
generic: true,
|
|
2382
|
+
schema: MoleAddDebtSchema,
|
|
2383
|
+
deployments: [
|
|
2384
|
+
{ network: "mainnet", eventType: "0x5ffa69ee4ee14d899dcc750df92de12bad4bacf81efa1ae12ee76406804dda7f::vault::AddDebtEvent", primary: true }
|
|
2385
|
+
]
|
|
2386
|
+
},
|
|
2387
|
+
"mole.deposit": {
|
|
2388
|
+
id: "mole.deposit",
|
|
2389
|
+
protocolId: "mole",
|
|
2390
|
+
label: "Mole \u2014 Vault deposit",
|
|
2391
|
+
category: "vault",
|
|
2392
|
+
description: "A deposit into a Mole savings vault (matches all coin types).",
|
|
2393
|
+
generic: true,
|
|
2394
|
+
schema: MoleDepositSchema,
|
|
2395
|
+
deployments: [
|
|
2396
|
+
{ network: "mainnet", eventType: "0x5ffa69ee4ee14d899dcc750df92de12bad4bacf81efa1ae12ee76406804dda7f::vault::DepositEvent", primary: true }
|
|
2397
|
+
]
|
|
2398
|
+
},
|
|
2399
|
+
"mole.harvest": {
|
|
2400
|
+
id: "mole.harvest",
|
|
2401
|
+
protocolId: "mole",
|
|
2402
|
+
label: "Mole \u2014 Harvest rewards",
|
|
2403
|
+
category: "reward",
|
|
2404
|
+
description: "Rewards were harvested from a Mole vault/farm.",
|
|
2405
|
+
generic: true,
|
|
2406
|
+
schema: MoleHarvestSchema,
|
|
2407
|
+
deployments: [
|
|
2408
|
+
{ network: "mainnet", eventType: "0xc4dc6948a7d0a58f32fadd44e45efb201f44383bfab1cb6c48b9c186a92cc762::sui_incentive::HarvestEvent", primary: true }
|
|
2409
|
+
]
|
|
2410
|
+
},
|
|
2411
|
+
"mole.kill": {
|
|
2412
|
+
id: "mole.kill",
|
|
2413
|
+
protocolId: "mole",
|
|
2414
|
+
label: "Mole \u2014 Position liquidation (kill)",
|
|
2415
|
+
category: "liquidation",
|
|
2416
|
+
description: "A Mole leveraged-farm position was liquidated.",
|
|
2417
|
+
generic: true,
|
|
2418
|
+
schema: MoleKillSchema,
|
|
2419
|
+
deployments: [
|
|
2420
|
+
{ network: "mainnet", eventType: "0x5ffa69ee4ee14d899dcc750df92de12bad4bacf81efa1ae12ee76406804dda7f::vault::KillEvent", primary: true }
|
|
2421
|
+
]
|
|
2422
|
+
},
|
|
2423
|
+
"mole.withdraw": {
|
|
2424
|
+
id: "mole.withdraw",
|
|
2425
|
+
protocolId: "mole",
|
|
2426
|
+
label: "Mole \u2014 Vault withdraw",
|
|
2427
|
+
category: "withdraw",
|
|
2428
|
+
description: "A withdrawal from a Mole savings vault (matches all coin types).",
|
|
2429
|
+
generic: true,
|
|
2430
|
+
schema: MoleWithdrawSchema,
|
|
2431
|
+
deployments: [
|
|
2432
|
+
{ network: "mainnet", eventType: "0x5ffa69ee4ee14d899dcc750df92de12bad4bacf81efa1ae12ee76406804dda7f::vault::WithdrawEvent", primary: true }
|
|
2433
|
+
]
|
|
2434
|
+
},
|
|
2435
|
+
"mole.work": {
|
|
2436
|
+
id: "mole.work",
|
|
2437
|
+
protocolId: "mole",
|
|
2438
|
+
label: "Mole \u2014 Open/adjust farm position",
|
|
2439
|
+
category: "liquidity",
|
|
2440
|
+
description: "A Mole leveraged-farm position was opened or adjusted.",
|
|
2441
|
+
generic: true,
|
|
2442
|
+
schema: MoleWorkSchema,
|
|
2443
|
+
deployments: [
|
|
2444
|
+
{ network: "mainnet", eventType: "0x5ffa69ee4ee14d899dcc750df92de12bad4bacf81efa1ae12ee76406804dda7f::vault::WorkEvent", primary: true }
|
|
2445
|
+
]
|
|
2446
|
+
},
|
|
2447
|
+
"momentum.add-liquidity": {
|
|
2448
|
+
id: "momentum.add-liquidity",
|
|
2449
|
+
protocolId: "momentum",
|
|
2450
|
+
label: "Momentum \u2014 Add liquidity",
|
|
2451
|
+
category: "liquidity",
|
|
2452
|
+
description: "Liquidity was added to a Momentum position.",
|
|
2453
|
+
generic: false,
|
|
2454
|
+
schema: MomentumAddLiquiditySchema,
|
|
2455
|
+
deployments: [
|
|
2456
|
+
{ network: "mainnet", eventType: "0x70285592c97965e811e0c6f98dccc3a9c2b4ad854b3594faab9597ada267b860::liquidity::AddLiquidityEvent", primary: true }
|
|
2457
|
+
]
|
|
2458
|
+
},
|
|
2459
|
+
"momentum.collect-fee": {
|
|
2460
|
+
id: "momentum.collect-fee",
|
|
2461
|
+
protocolId: "momentum",
|
|
2462
|
+
label: "Momentum \u2014 Collect fee",
|
|
2463
|
+
category: "fee",
|
|
2464
|
+
description: "Trading fees were collected from a Momentum position.",
|
|
2465
|
+
generic: false,
|
|
2466
|
+
schema: MomentumCollectFeeSchema,
|
|
2467
|
+
deployments: [
|
|
2468
|
+
{ network: "mainnet", eventType: "0x70285592c97965e811e0c6f98dccc3a9c2b4ad854b3594faab9597ada267b860::collect::FeeCollectedEvent", primary: true }
|
|
2469
|
+
]
|
|
2470
|
+
},
|
|
2471
|
+
"momentum.collect-reward": {
|
|
2472
|
+
id: "momentum.collect-reward",
|
|
2473
|
+
protocolId: "momentum",
|
|
2474
|
+
label: "Momentum \u2014 Collect reward",
|
|
2475
|
+
category: "reward",
|
|
2476
|
+
description: "Incentive rewards were collected from a Momentum position.",
|
|
2477
|
+
generic: false,
|
|
2478
|
+
schema: MomentumCollectRewardSchema,
|
|
2479
|
+
deployments: [
|
|
2480
|
+
{ network: "mainnet", eventType: "0x70285592c97965e811e0c6f98dccc3a9c2b4ad854b3594faab9597ada267b860::collect::CollectPoolRewardEvent", primary: true }
|
|
2481
|
+
]
|
|
2482
|
+
},
|
|
2483
|
+
"momentum.pool-created": {
|
|
2484
|
+
id: "momentum.pool-created",
|
|
2485
|
+
protocolId: "momentum",
|
|
2486
|
+
label: "Momentum \u2014 Pool created",
|
|
2487
|
+
category: "pool",
|
|
2488
|
+
description: "A new Momentum pool was created.",
|
|
2489
|
+
generic: false,
|
|
2490
|
+
schema: MomentumPoolCreatedSchema,
|
|
2491
|
+
deployments: [
|
|
2492
|
+
{ network: "mainnet", eventType: "0x70285592c97965e811e0c6f98dccc3a9c2b4ad854b3594faab9597ada267b860::create_pool::PoolCreatedEvent", primary: true }
|
|
2493
|
+
]
|
|
2494
|
+
},
|
|
2495
|
+
"momentum.remove-liquidity": {
|
|
2496
|
+
id: "momentum.remove-liquidity",
|
|
2497
|
+
protocolId: "momentum",
|
|
2498
|
+
label: "Momentum \u2014 Remove liquidity",
|
|
2499
|
+
category: "liquidity",
|
|
2500
|
+
description: "Liquidity was removed from a Momentum position.",
|
|
2501
|
+
generic: false,
|
|
2502
|
+
schema: MomentumRemoveLiquiditySchema,
|
|
2503
|
+
deployments: [
|
|
2504
|
+
{ network: "mainnet", eventType: "0x70285592c97965e811e0c6f98dccc3a9c2b4ad854b3594faab9597ada267b860::liquidity::RemoveLiquidityEvent", primary: true }
|
|
2505
|
+
]
|
|
2506
|
+
},
|
|
2507
|
+
"momentum.repay-flash-swap": {
|
|
2508
|
+
id: "momentum.repay-flash-swap",
|
|
2509
|
+
protocolId: "momentum",
|
|
2510
|
+
label: "Momentum \u2014 Repay flash swap",
|
|
2511
|
+
category: "fee",
|
|
2512
|
+
description: "A Momentum flash swap was repaid.",
|
|
2513
|
+
generic: false,
|
|
2514
|
+
schema: MomentumRepayFlashSwapSchema,
|
|
2515
|
+
deployments: [
|
|
2516
|
+
{ network: "mainnet", eventType: "0x70285592c97965e811e0c6f98dccc3a9c2b4ad854b3594faab9597ada267b860::trade::RepayFlashSwapEvent", primary: true }
|
|
2517
|
+
]
|
|
2518
|
+
},
|
|
2519
|
+
"momentum.swap": {
|
|
2520
|
+
id: "momentum.swap",
|
|
2521
|
+
protocolId: "momentum",
|
|
2522
|
+
label: "Momentum \u2014 Swap",
|
|
2523
|
+
category: "swap",
|
|
2524
|
+
description: "A swap was executed on a Momentum CLMM pool.",
|
|
2525
|
+
generic: false,
|
|
2526
|
+
schema: MomentumSwapSchema,
|
|
2527
|
+
deployments: [
|
|
2528
|
+
{ network: "mainnet", eventType: "0x70285592c97965e811e0c6f98dccc3a9c2b4ad854b3594faab9597ada267b860::trade::SwapEvent", primary: true }
|
|
2529
|
+
]
|
|
2530
|
+
},
|
|
2531
|
+
"navi.borrow": {
|
|
2532
|
+
id: "navi.borrow",
|
|
2533
|
+
protocolId: "navi",
|
|
2534
|
+
label: "NAVI \u2014 Borrow",
|
|
2535
|
+
category: "borrow",
|
|
2536
|
+
description: "Assets were borrowed from a NAVI pool.",
|
|
2537
|
+
generic: false,
|
|
2538
|
+
schema: NaviBorrowSchema,
|
|
2539
|
+
deployments: [
|
|
2540
|
+
{ network: "mainnet", eventType: "0x1e4a13a0494d5facdbe8473e74127b838c2d446ecec0ce262e2eddafa77259cb::event::BorrowEvent", primary: true }
|
|
2541
|
+
]
|
|
2542
|
+
},
|
|
2543
|
+
"navi.deposit": {
|
|
2544
|
+
id: "navi.deposit",
|
|
2545
|
+
protocolId: "navi",
|
|
2546
|
+
label: "NAVI \u2014 Deposit",
|
|
2547
|
+
category: "supply",
|
|
2548
|
+
description: "Assets were supplied to a NAVI lending pool.",
|
|
2549
|
+
generic: false,
|
|
2550
|
+
schema: NaviDepositSchema,
|
|
2551
|
+
deployments: [
|
|
2552
|
+
{ network: "mainnet", eventType: "0x1e4a13a0494d5facdbe8473e74127b838c2d446ecec0ce262e2eddafa77259cb::event::DepositEvent", primary: true }
|
|
2553
|
+
]
|
|
2554
|
+
},
|
|
2555
|
+
"navi.liquidation": {
|
|
2556
|
+
id: "navi.liquidation",
|
|
2557
|
+
protocolId: "navi",
|
|
2558
|
+
label: "NAVI \u2014 Liquidation",
|
|
2559
|
+
category: "liquidation",
|
|
2560
|
+
description: "An undercollateralized NAVI position was liquidated.",
|
|
2561
|
+
generic: false,
|
|
2562
|
+
schema: NaviLiquidationSchema,
|
|
2563
|
+
deployments: [
|
|
2564
|
+
{ network: "mainnet", eventType: "0x1e4a13a0494d5facdbe8473e74127b838c2d446ecec0ce262e2eddafa77259cb::event::LiquidationEvent", primary: true }
|
|
2565
|
+
]
|
|
2566
|
+
},
|
|
2567
|
+
"navi.repay": {
|
|
2568
|
+
id: "navi.repay",
|
|
2569
|
+
protocolId: "navi",
|
|
2570
|
+
label: "NAVI \u2014 Repay",
|
|
2571
|
+
category: "repay",
|
|
2572
|
+
description: "Borrowed assets were repaid to a NAVI pool.",
|
|
2573
|
+
generic: false,
|
|
2574
|
+
schema: NaviRepaySchema,
|
|
2575
|
+
deployments: [
|
|
2576
|
+
{ network: "mainnet", eventType: "0x1e4a13a0494d5facdbe8473e74127b838c2d446ecec0ce262e2eddafa77259cb::event::RepayEvent", primary: true }
|
|
2577
|
+
]
|
|
2578
|
+
},
|
|
2579
|
+
"navi.withdraw": {
|
|
2580
|
+
id: "navi.withdraw",
|
|
2581
|
+
protocolId: "navi",
|
|
2582
|
+
label: "NAVI \u2014 Withdraw",
|
|
2583
|
+
category: "withdraw",
|
|
2584
|
+
description: "Supplied assets were withdrawn from a NAVI pool.",
|
|
2585
|
+
generic: false,
|
|
2586
|
+
schema: NaviWithdrawSchema,
|
|
2587
|
+
deployments: [
|
|
2588
|
+
{ network: "mainnet", eventType: "0x1e4a13a0494d5facdbe8473e74127b838c2d446ecec0ce262e2eddafa77259cb::event::WithdrawEvent", primary: true }
|
|
2589
|
+
]
|
|
2590
|
+
},
|
|
2591
|
+
"pyth.price-feed-update": {
|
|
2592
|
+
id: "pyth.price-feed-update",
|
|
2593
|
+
protocolId: "pyth",
|
|
2594
|
+
label: "Pyth \u2014 Price feed update",
|
|
2595
|
+
category: "oracle",
|
|
2596
|
+
description: "A Pyth price feed was updated with new price data.",
|
|
2597
|
+
generic: false,
|
|
2598
|
+
schema: PythPriceFeedUpdateSchema,
|
|
2599
|
+
deployments: [
|
|
2600
|
+
{ network: "mainnet", eventType: "0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e::event::PriceFeedUpdateEvent", primary: true },
|
|
2601
|
+
{ network: "testnet", eventType: "0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837::event::PriceFeedUpdateEvent", primary: true }
|
|
2602
|
+
]
|
|
2603
|
+
},
|
|
2604
|
+
"scallop.borrow": {
|
|
2605
|
+
id: "scallop.borrow",
|
|
2606
|
+
protocolId: "scallop",
|
|
2607
|
+
label: "Scallop \u2014 Borrow",
|
|
2608
|
+
category: "borrow",
|
|
2609
|
+
description: "Assets were borrowed from a Scallop lending market.",
|
|
2610
|
+
generic: false,
|
|
2611
|
+
schema: ScallopBorrowSchema,
|
|
2612
|
+
deployments: [
|
|
2613
|
+
{ network: "mainnet", eventType: "0x6e641f0dca8aedab3101d047e96439178f16301bf0b57fe8745086ff1195eb3e::borrow::BorrowEventV3", primary: true }
|
|
2614
|
+
]
|
|
2615
|
+
},
|
|
2616
|
+
"scallop.collateral-deposit": {
|
|
2617
|
+
id: "scallop.collateral-deposit",
|
|
2618
|
+
protocolId: "scallop",
|
|
2619
|
+
label: "Scallop \u2014 Deposit collateral",
|
|
2620
|
+
category: "supply",
|
|
2621
|
+
description: "Collateral was deposited into a Scallop obligation.",
|
|
2622
|
+
generic: false,
|
|
2623
|
+
schema: ScallopCollateralDepositSchema,
|
|
2624
|
+
deployments: [
|
|
2625
|
+
{ network: "mainnet", eventType: "0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf::deposit_collateral::CollateralDepositEvent", primary: true }
|
|
2626
|
+
]
|
|
2627
|
+
},
|
|
2628
|
+
"scallop.collateral-withdraw": {
|
|
2629
|
+
id: "scallop.collateral-withdraw",
|
|
2630
|
+
protocolId: "scallop",
|
|
2631
|
+
label: "Scallop \u2014 Withdraw collateral",
|
|
2632
|
+
category: "withdraw",
|
|
2633
|
+
description: "Collateral was withdrawn from a Scallop obligation.",
|
|
2634
|
+
generic: false,
|
|
2635
|
+
schema: ScallopCollateralWithdrawSchema,
|
|
2636
|
+
deployments: [
|
|
2637
|
+
{ network: "mainnet", eventType: "0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf::withdraw_collateral::CollateralWithdrawEvent", primary: true }
|
|
2638
|
+
]
|
|
2639
|
+
},
|
|
2640
|
+
"scallop.liquidation": {
|
|
2641
|
+
id: "scallop.liquidation",
|
|
2642
|
+
protocolId: "scallop",
|
|
2643
|
+
label: "Scallop \u2014 Liquidation",
|
|
2644
|
+
category: "liquidation",
|
|
2645
|
+
description: "A Scallop obligation was liquidated.",
|
|
2646
|
+
generic: false,
|
|
2647
|
+
schema: ScallopLiquidationSchema,
|
|
2648
|
+
deployments: [
|
|
2649
|
+
{ network: "mainnet", eventType: "0x6e641f0dca8aedab3101d047e96439178f16301bf0b57fe8745086ff1195eb3e::liquidate::LiquidateEventV2", primary: true }
|
|
2650
|
+
]
|
|
2651
|
+
},
|
|
2652
|
+
"scallop.repay": {
|
|
2653
|
+
id: "scallop.repay",
|
|
2654
|
+
protocolId: "scallop",
|
|
2655
|
+
label: "Scallop \u2014 Repay",
|
|
2656
|
+
category: "repay",
|
|
2657
|
+
description: "Borrowed assets were repaid to a Scallop market.",
|
|
2658
|
+
generic: false,
|
|
2659
|
+
schema: ScallopRepaySchema,
|
|
2660
|
+
deployments: [
|
|
2661
|
+
{ network: "mainnet", eventType: "0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf::repay::RepayEvent", primary: true }
|
|
2662
|
+
]
|
|
2663
|
+
},
|
|
2664
|
+
"springsui.epoch-changed": {
|
|
2665
|
+
id: "springsui.epoch-changed",
|
|
2666
|
+
protocolId: "springsui",
|
|
2667
|
+
label: "SpringSui \u2014 Epoch changed (rewards)",
|
|
2668
|
+
category: "reward",
|
|
2669
|
+
description: "SpringSui accrued staking rewards at an epoch change.",
|
|
2670
|
+
generic: false,
|
|
2671
|
+
schema: SpringsuiEpochChangedSchema,
|
|
2672
|
+
deployments: [
|
|
2673
|
+
{ network: "mainnet", eventType: "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::events::Event<0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::liquid_staking::EpochChangedEvent>", primary: true }
|
|
2674
|
+
]
|
|
2675
|
+
},
|
|
2676
|
+
"springsui.stake": {
|
|
2677
|
+
id: "springsui.stake",
|
|
2678
|
+
protocolId: "springsui",
|
|
2679
|
+
label: "SpringSui \u2014 Stake (mint LST)",
|
|
2680
|
+
category: "stake",
|
|
2681
|
+
description: "SUI was staked to mint a SpringSui liquid-staking token.",
|
|
2682
|
+
generic: false,
|
|
2683
|
+
schema: SpringsuiStakeSchema,
|
|
2684
|
+
deployments: [
|
|
2685
|
+
{ network: "mainnet", eventType: "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::events::Event<0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::liquid_staking::MintEvent>", primary: true }
|
|
2686
|
+
]
|
|
2687
|
+
},
|
|
2688
|
+
"springsui.unstake": {
|
|
2689
|
+
id: "springsui.unstake",
|
|
2690
|
+
protocolId: "springsui",
|
|
2691
|
+
label: "SpringSui \u2014 Unstake (redeem LST)",
|
|
2692
|
+
category: "unstake",
|
|
2693
|
+
description: "A SpringSui liquid-staking token was redeemed for SUI.",
|
|
2694
|
+
generic: false,
|
|
2695
|
+
schema: SpringsuiUnstakeSchema,
|
|
2696
|
+
deployments: [
|
|
2697
|
+
{ network: "mainnet", eventType: "0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::events::Event<0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::liquid_staking::RedeemEvent>", primary: true }
|
|
2698
|
+
]
|
|
2699
|
+
},
|
|
2700
|
+
"steamm.bank-deposit": {
|
|
2701
|
+
id: "steamm.bank-deposit",
|
|
2702
|
+
protocolId: "steamm",
|
|
2703
|
+
label: "Steamm \u2014 Bank deposit (mint bToken)",
|
|
2704
|
+
category: "supply",
|
|
2705
|
+
description: "Funds were deposited into a Steamm bank, minting bTokens.",
|
|
2706
|
+
generic: false,
|
|
2707
|
+
schema: SteammBankDepositSchema,
|
|
2708
|
+
deployments: [
|
|
2709
|
+
{ network: "mainnet", eventType: "0x4fb1cf45dffd6230305f1d269dd1816678cc8e3ba0b747a813a556921219f261::events::Event<0x4fb1cf45dffd6230305f1d269dd1816678cc8e3ba0b747a813a556921219f261::bank::MintBTokenEvent>", primary: true }
|
|
2710
|
+
]
|
|
2711
|
+
},
|
|
2712
|
+
"steamm.bank-withdraw": {
|
|
2713
|
+
id: "steamm.bank-withdraw",
|
|
2714
|
+
protocolId: "steamm",
|
|
2715
|
+
label: "Steamm \u2014 Bank withdraw (burn bToken)",
|
|
2716
|
+
category: "withdraw",
|
|
2717
|
+
description: "bTokens were burned to withdraw funds from a Steamm bank.",
|
|
2718
|
+
generic: false,
|
|
2719
|
+
schema: SteammBankWithdrawSchema,
|
|
2720
|
+
deployments: [
|
|
2721
|
+
{ network: "mainnet", eventType: "0x4fb1cf45dffd6230305f1d269dd1816678cc8e3ba0b747a813a556921219f261::events::Event<0x4fb1cf45dffd6230305f1d269dd1816678cc8e3ba0b747a813a556921219f261::bank::BurnBTokenEvent>", primary: true }
|
|
2722
|
+
]
|
|
2723
|
+
},
|
|
2724
|
+
"suilend.borrow": {
|
|
2725
|
+
id: "suilend.borrow",
|
|
2726
|
+
protocolId: "suilend",
|
|
2727
|
+
label: "Suilend \u2014 Borrow",
|
|
2728
|
+
category: "borrow",
|
|
2729
|
+
description: "Assets were borrowed from a Suilend market.",
|
|
2730
|
+
generic: false,
|
|
2731
|
+
schema: SuilendBorrowSchema,
|
|
2732
|
+
deployments: [
|
|
2733
|
+
{ network: "mainnet", eventType: "0xf95b06141ed4a174f239417323bde3f209b972f5930d8521ea38a52aff3a6ddf::lending_market::BorrowEvent", primary: true }
|
|
2734
|
+
]
|
|
2735
|
+
},
|
|
2736
|
+
"suilend.claim-reward": {
|
|
2737
|
+
id: "suilend.claim-reward",
|
|
2738
|
+
protocolId: "suilend",
|
|
2739
|
+
label: "Suilend \u2014 Claim reward",
|
|
2740
|
+
category: "reward",
|
|
2741
|
+
description: "Rewards were claimed from a Suilend market.",
|
|
2742
|
+
generic: false,
|
|
2743
|
+
schema: SuilendClaimRewardSchema,
|
|
2744
|
+
deployments: [
|
|
2745
|
+
{ network: "mainnet", eventType: "0xf95b06141ed4a174f239417323bde3f209b972f5930d8521ea38a52aff3a6ddf::lending_market::ClaimRewardEvent", primary: true }
|
|
2746
|
+
]
|
|
2747
|
+
},
|
|
2748
|
+
"suilend.deposit": {
|
|
2749
|
+
id: "suilend.deposit",
|
|
2750
|
+
protocolId: "suilend",
|
|
2751
|
+
label: "Suilend \u2014 Deposit",
|
|
2752
|
+
category: "supply",
|
|
2753
|
+
description: "Assets were deposited into a Suilend reserve.",
|
|
2754
|
+
generic: false,
|
|
2755
|
+
schema: SuilendDepositSchema,
|
|
2756
|
+
deployments: [
|
|
2757
|
+
{ network: "mainnet", eventType: "0xf95b06141ed4a174f239417323bde3f209b972f5930d8521ea38a52aff3a6ddf::lending_market::DepositEvent", primary: true }
|
|
2758
|
+
]
|
|
2759
|
+
},
|
|
2760
|
+
"suilend.liquidate": {
|
|
2761
|
+
id: "suilend.liquidate",
|
|
2762
|
+
protocolId: "suilend",
|
|
2763
|
+
label: "Suilend \u2014 Liquidation",
|
|
2764
|
+
category: "liquidation",
|
|
2765
|
+
description: "A Suilend obligation was liquidated.",
|
|
2766
|
+
generic: false,
|
|
2767
|
+
schema: SuilendLiquidateSchema,
|
|
2768
|
+
deployments: [
|
|
2769
|
+
{ network: "mainnet", eventType: "0xf95b06141ed4a174f239417323bde3f209b972f5930d8521ea38a52aff3a6ddf::lending_market::LiquidateEvent", primary: true }
|
|
2770
|
+
]
|
|
2771
|
+
},
|
|
2772
|
+
"suilend.repay": {
|
|
2773
|
+
id: "suilend.repay",
|
|
2774
|
+
protocolId: "suilend",
|
|
2775
|
+
label: "Suilend \u2014 Repay",
|
|
2776
|
+
category: "repay",
|
|
2777
|
+
description: "Borrowed assets were repaid to a Suilend market.",
|
|
2778
|
+
generic: false,
|
|
2779
|
+
schema: SuilendRepaySchema,
|
|
2780
|
+
deployments: [
|
|
2781
|
+
{ network: "mainnet", eventType: "0xf95b06141ed4a174f239417323bde3f209b972f5930d8521ea38a52aff3a6ddf::lending_market::RepayEvent", primary: true }
|
|
2782
|
+
]
|
|
2783
|
+
},
|
|
2784
|
+
"suilend.withdraw": {
|
|
2785
|
+
id: "suilend.withdraw",
|
|
2786
|
+
protocolId: "suilend",
|
|
2787
|
+
label: "Suilend \u2014 Withdraw",
|
|
2788
|
+
category: "withdraw",
|
|
2789
|
+
description: "Assets were withdrawn from a Suilend reserve.",
|
|
2790
|
+
generic: false,
|
|
2791
|
+
schema: SuilendWithdrawSchema,
|
|
2792
|
+
deployments: [
|
|
2793
|
+
{ network: "mainnet", eventType: "0xf95b06141ed4a174f239417323bde3f209b972f5930d8521ea38a52aff3a6ddf::lending_market::WithdrawEvent", primary: true }
|
|
2794
|
+
]
|
|
2795
|
+
},
|
|
2796
|
+
"supra.price-update": {
|
|
2797
|
+
id: "supra.price-update",
|
|
2798
|
+
protocolId: "supra",
|
|
2799
|
+
label: "Supra \u2014 Price update",
|
|
2800
|
+
category: "oracle",
|
|
2801
|
+
description: "A Supra oracle price feed (pair) was updated.",
|
|
2802
|
+
generic: false,
|
|
2803
|
+
schema: SupraPriceUpdateSchema,
|
|
2804
|
+
deployments: [
|
|
2805
|
+
{ network: "mainnet", eventType: "0x4979543452f609ff272d504755966ff5e70122256101c17adbe8bd27d35116c3::SupraSValueFeed::PairDataUpdateEvent", primary: true }
|
|
2806
|
+
]
|
|
2807
|
+
},
|
|
2808
|
+
"turbos.add-liquidity": {
|
|
2809
|
+
id: "turbos.add-liquidity",
|
|
2810
|
+
protocolId: "turbos",
|
|
2811
|
+
label: "Turbos \u2014 Add liquidity",
|
|
2812
|
+
category: "liquidity",
|
|
2813
|
+
description: "Liquidity was minted into a Turbos position.",
|
|
2814
|
+
generic: false,
|
|
2815
|
+
schema: TurbosAddLiquiditySchema,
|
|
2816
|
+
deployments: [
|
|
2817
|
+
{ network: "mainnet", eventType: "0x91bfbc386a41afcfd9b2533058d7e915a1d3829089cc268ff4333d54d6339ca1::pool::MintEvent", primary: true }
|
|
2818
|
+
]
|
|
2819
|
+
},
|
|
2820
|
+
"turbos.pool-created": {
|
|
2821
|
+
id: "turbos.pool-created",
|
|
2822
|
+
protocolId: "turbos",
|
|
2823
|
+
label: "Turbos \u2014 Pool created",
|
|
2824
|
+
category: "pool",
|
|
2825
|
+
description: "A new Turbos CLMM pool was created.",
|
|
2826
|
+
generic: false,
|
|
2827
|
+
schema: TurbosPoolCreatedSchema,
|
|
2828
|
+
deployments: [
|
|
2829
|
+
{ network: "mainnet", eventType: "0x91bfbc386a41afcfd9b2533058d7e915a1d3829089cc268ff4333d54d6339ca1::pool_factory::PoolCreatedEvent", primary: true }
|
|
2830
|
+
]
|
|
2831
|
+
},
|
|
2832
|
+
"turbos.remove-liquidity": {
|
|
2833
|
+
id: "turbos.remove-liquidity",
|
|
2834
|
+
protocolId: "turbos",
|
|
2835
|
+
label: "Turbos \u2014 Remove liquidity",
|
|
2836
|
+
category: "liquidity",
|
|
2837
|
+
description: "Liquidity was burned from a Turbos position.",
|
|
2838
|
+
generic: false,
|
|
2839
|
+
schema: TurbosRemoveLiquiditySchema,
|
|
2840
|
+
deployments: [
|
|
2841
|
+
{ network: "mainnet", eventType: "0x91bfbc386a41afcfd9b2533058d7e915a1d3829089cc268ff4333d54d6339ca1::pool::BurnEvent", primary: true }
|
|
2842
|
+
]
|
|
2843
|
+
},
|
|
2844
|
+
"turbos.swap": {
|
|
2845
|
+
id: "turbos.swap",
|
|
2846
|
+
protocolId: "turbos",
|
|
2847
|
+
label: "Turbos \u2014 Swap",
|
|
2848
|
+
category: "swap",
|
|
2849
|
+
description: "A swap was executed on a Turbos CLMM pool.",
|
|
2850
|
+
generic: false,
|
|
2851
|
+
schema: TurbosSwapSchema,
|
|
2852
|
+
deployments: [
|
|
2853
|
+
{ network: "mainnet", eventType: "0x91bfbc386a41afcfd9b2533058d7e915a1d3829089cc268ff4333d54d6339ca1::pool::SwapEvent", primary: true }
|
|
2854
|
+
]
|
|
2855
|
+
},
|
|
2856
|
+
"typus.dov-auction": {
|
|
2857
|
+
id: "typus.dov-auction",
|
|
2858
|
+
protocolId: "typus",
|
|
2859
|
+
label: "Typus \u2014 DOV auction started",
|
|
2860
|
+
category: "option",
|
|
2861
|
+
description: "A new Typus options-vault (DOV) auction round started.",
|
|
2862
|
+
generic: false,
|
|
2863
|
+
schema: TypusDovAuctionSchema,
|
|
2864
|
+
deployments: [
|
|
2865
|
+
{ network: "mainnet", eventType: "0x321848bf1ae327a9e022ccb3701940191e02fa193ab160d9c0e49cd3c003de3a::typus_dov_single::NewAuctionEvent", primary: true }
|
|
2866
|
+
]
|
|
2867
|
+
},
|
|
2868
|
+
"typus.dov-bid": {
|
|
2869
|
+
id: "typus.dov-bid",
|
|
2870
|
+
protocolId: "typus",
|
|
2871
|
+
label: "Typus \u2014 DOV bid",
|
|
2872
|
+
category: "option",
|
|
2873
|
+
description: "A bid was placed in a Typus options-vault auction.",
|
|
2874
|
+
generic: false,
|
|
2875
|
+
schema: TypusDovBidSchema,
|
|
2876
|
+
deployments: [
|
|
2877
|
+
{ network: "mainnet", eventType: "0x321848bf1ae327a9e022ccb3701940191e02fa193ab160d9c0e49cd3c003de3a::typus_dov_single::NewBidEvent", primary: true }
|
|
2878
|
+
]
|
|
2879
|
+
},
|
|
2880
|
+
"typus.dov-settle": {
|
|
2881
|
+
id: "typus.dov-settle",
|
|
2882
|
+
protocolId: "typus",
|
|
2883
|
+
label: "Typus \u2014 DOV settled",
|
|
2884
|
+
category: "option",
|
|
2885
|
+
description: "A Typus options-vault round was settled.",
|
|
2886
|
+
generic: false,
|
|
2887
|
+
schema: TypusDovSettleSchema,
|
|
2888
|
+
deployments: [
|
|
2889
|
+
{ network: "mainnet", eventType: "0x321848bf1ae327a9e022ccb3701940191e02fa193ab160d9c0e49cd3c003de3a::typus_dov_single::SettleEvent", primary: true }
|
|
2890
|
+
]
|
|
2891
|
+
},
|
|
2892
|
+
"typus.perp-funding": {
|
|
2893
|
+
id: "typus.perp-funding",
|
|
2894
|
+
protocolId: "typus",
|
|
2895
|
+
label: "Typus \u2014 Perp funding update",
|
|
2896
|
+
category: "funding",
|
|
2897
|
+
description: "A Typus perps market funding rate was updated.",
|
|
2898
|
+
generic: false,
|
|
2899
|
+
schema: TypusPerpFundingSchema,
|
|
2900
|
+
deployments: [
|
|
2901
|
+
{ network: "mainnet", eventType: "0x9003219180252ae6b81d2893b41d430488669027219537236675c0c2924c94d9::trading::UpdateFundingRateEvent", primary: true }
|
|
2902
|
+
]
|
|
2903
|
+
},
|
|
2904
|
+
"typus.perp-liquidate": {
|
|
2905
|
+
id: "typus.perp-liquidate",
|
|
2906
|
+
protocolId: "typus",
|
|
2907
|
+
label: "Typus \u2014 Perp liquidation",
|
|
2908
|
+
category: "liquidation",
|
|
2909
|
+
description: "A Typus perps position was liquidated.",
|
|
2910
|
+
generic: false,
|
|
2911
|
+
schema: TypusPerpLiquidateSchema,
|
|
2912
|
+
deployments: [
|
|
2913
|
+
{ network: "mainnet", eventType: "0x9003219180252ae6b81d2893b41d430488669027219537236675c0c2924c94d9::trading::LiquidateEvent", primary: true }
|
|
2914
|
+
]
|
|
2915
|
+
},
|
|
2916
|
+
"typus.perp-lp-burn": {
|
|
2917
|
+
id: "typus.perp-lp-burn",
|
|
2918
|
+
protocolId: "typus",
|
|
2919
|
+
label: "Typus \u2014 TLP burn",
|
|
2920
|
+
category: "liquidity",
|
|
2921
|
+
description: "Liquidity was removed from the Typus perps LP (TLP).",
|
|
2922
|
+
generic: false,
|
|
2923
|
+
schema: TypusPerpLpBurnSchema,
|
|
2924
|
+
deployments: [
|
|
2925
|
+
{ network: "mainnet", eventType: "0x9003219180252ae6b81d2893b41d430488669027219537236675c0c2924c94d9::lp_pool::BurnLpEvent", primary: true }
|
|
2926
|
+
]
|
|
2927
|
+
},
|
|
2928
|
+
"typus.perp-lp-mint": {
|
|
2929
|
+
id: "typus.perp-lp-mint",
|
|
2930
|
+
protocolId: "typus",
|
|
2931
|
+
label: "Typus \u2014 TLP mint",
|
|
2932
|
+
category: "liquidity",
|
|
2933
|
+
description: "Liquidity was added to the Typus perps LP (TLP).",
|
|
2934
|
+
generic: false,
|
|
2935
|
+
schema: TypusPerpLpMintSchema,
|
|
2936
|
+
deployments: [
|
|
2937
|
+
{ network: "mainnet", eventType: "0x9003219180252ae6b81d2893b41d430488669027219537236675c0c2924c94d9::lp_pool::MintLpEvent", primary: true }
|
|
2938
|
+
]
|
|
2939
|
+
},
|
|
2940
|
+
"typus.perp-order": {
|
|
2941
|
+
id: "typus.perp-order",
|
|
2942
|
+
protocolId: "typus",
|
|
2943
|
+
label: "Typus \u2014 Perp order created",
|
|
2944
|
+
category: "perp",
|
|
2945
|
+
description: "A trading order was created on Typus perps.",
|
|
2946
|
+
generic: false,
|
|
2947
|
+
schema: TypusPerpOrderSchema,
|
|
2948
|
+
deployments: [
|
|
2949
|
+
{ network: "mainnet", eventType: "0x9003219180252ae6b81d2893b41d430488669027219537236675c0c2924c94d9::trading::CreateTradingOrderEvent", primary: true }
|
|
2950
|
+
]
|
|
2951
|
+
},
|
|
2952
|
+
"volo.staked": {
|
|
2953
|
+
id: "volo.staked",
|
|
2954
|
+
protocolId: "volo",
|
|
2955
|
+
label: "Volo \u2014 Staked",
|
|
2956
|
+
category: "stake",
|
|
2957
|
+
description: "SUI was staked with Volo in exchange for vSUI.",
|
|
2958
|
+
generic: false,
|
|
2959
|
+
schema: VoloStakedSchema,
|
|
2960
|
+
deployments: [
|
|
2961
|
+
{ network: "mainnet", eventType: "0x549e8b69270defbfafd4f94e17ec44cdbdd99820b33bda2278dea3b9a32d3f55::native_pool::StakedEvent", primary: true }
|
|
2962
|
+
]
|
|
2963
|
+
},
|
|
2964
|
+
"volo.unstaked": {
|
|
2965
|
+
id: "volo.unstaked",
|
|
2966
|
+
protocolId: "volo",
|
|
2967
|
+
label: "Volo \u2014 Unstaked",
|
|
2968
|
+
category: "unstake",
|
|
2969
|
+
description: "vSUI was burned to unstake SUI on Volo.",
|
|
2970
|
+
generic: false,
|
|
2971
|
+
schema: VoloUnstakedSchema,
|
|
2972
|
+
deployments: [
|
|
2973
|
+
{ network: "mainnet", eventType: "0x549e8b69270defbfafd4f94e17ec44cdbdd99820b33bda2278dea3b9a32d3f55::native_pool::UnstakedEvent", primary: true }
|
|
2974
|
+
]
|
|
2975
|
+
},
|
|
2976
|
+
"walrus.blob-certified": {
|
|
2977
|
+
id: "walrus.blob-certified",
|
|
2978
|
+
protocolId: "walrus",
|
|
2979
|
+
label: "Walrus \u2014 Blob certified",
|
|
2980
|
+
category: "storage",
|
|
2981
|
+
description: "A Walrus blob was certified available.",
|
|
2982
|
+
generic: false,
|
|
2983
|
+
schema: WalrusBlobCertifiedSchema,
|
|
2984
|
+
deployments: [
|
|
2985
|
+
{ network: "mainnet", eventType: "0xfdc88f7d7cf30afab2f82e8380d11ee8f70efb90e863d1de8616fae1bb09ea77::events::BlobCertified", primary: true }
|
|
2986
|
+
]
|
|
2987
|
+
},
|
|
2988
|
+
"walrus.blob-deleted": {
|
|
2989
|
+
id: "walrus.blob-deleted",
|
|
2990
|
+
protocolId: "walrus",
|
|
2991
|
+
label: "Walrus \u2014 Blob deleted",
|
|
2992
|
+
category: "storage",
|
|
2993
|
+
description: "A Walrus blob was deleted.",
|
|
2994
|
+
generic: false,
|
|
2995
|
+
schema: WalrusBlobDeletedSchema,
|
|
2996
|
+
deployments: [
|
|
2997
|
+
{ network: "mainnet", eventType: "0xfdc88f7d7cf30afab2f82e8380d11ee8f70efb90e863d1de8616fae1bb09ea77::events::BlobDeleted", primary: true }
|
|
2998
|
+
]
|
|
2999
|
+
},
|
|
3000
|
+
"walrus.blob-registered": {
|
|
3001
|
+
id: "walrus.blob-registered",
|
|
3002
|
+
protocolId: "walrus",
|
|
3003
|
+
label: "Walrus \u2014 Blob registered",
|
|
3004
|
+
category: "storage",
|
|
3005
|
+
description: "A new blob was registered for storage on Walrus.",
|
|
3006
|
+
generic: false,
|
|
3007
|
+
schema: WalrusBlobRegisteredSchema,
|
|
3008
|
+
deployments: [
|
|
3009
|
+
{ network: "mainnet", eventType: "0xfdc88f7d7cf30afab2f82e8380d11ee8f70efb90e863d1de8616fae1bb09ea77::events::BlobRegistered", primary: true }
|
|
3010
|
+
]
|
|
3011
|
+
}
|
|
3012
|
+
};
|
|
3013
|
+
}
|
|
3014
|
+
});
|
|
3015
|
+
|
|
3016
|
+
// src/events/index.ts
|
|
3017
|
+
var events_exports = {};
|
|
3018
|
+
__export(events_exports, {
|
|
3019
|
+
AftermathDepositSchema: () => AftermathDepositSchema,
|
|
3020
|
+
AftermathPerpFundingSchema: () => AftermathPerpFundingSchema,
|
|
3021
|
+
AftermathPerpLiquidatedSchema: () => AftermathPerpLiquidatedSchema,
|
|
3022
|
+
AftermathSwapSchema: () => AftermathSwapSchema,
|
|
3023
|
+
AlphafiLiquidityChangeSchema: () => AlphafiLiquidityChangeSchema,
|
|
3024
|
+
AlphafiRewardSchema: () => AlphafiRewardSchema,
|
|
3025
|
+
BluefinFeeCollectedSchema: () => BluefinFeeCollectedSchema,
|
|
3026
|
+
BluefinLiquidityProvidedSchema: () => BluefinLiquidityProvidedSchema,
|
|
3027
|
+
BluefinLiquidityRemovedSchema: () => BluefinLiquidityRemovedSchema,
|
|
3028
|
+
BluefinPoolCreatedSchema: () => BluefinPoolCreatedSchema,
|
|
3029
|
+
BluefinPositionClosedSchema: () => BluefinPositionClosedSchema,
|
|
3030
|
+
BluefinPositionOpenedSchema: () => BluefinPositionOpenedSchema,
|
|
3031
|
+
BluefinRewardCollectedSchema: () => BluefinRewardCollectedSchema,
|
|
3032
|
+
BluefinSwapSchema: () => BluefinSwapSchema,
|
|
3033
|
+
BucketBorrowSchema: () => BucketBorrowSchema,
|
|
3034
|
+
BucketDepositCollateralSchema: () => BucketDepositCollateralSchema,
|
|
3035
|
+
BucketPositionUpdatedSchema: () => BucketPositionUpdatedSchema,
|
|
3036
|
+
BucketRedeemSchema: () => BucketRedeemSchema,
|
|
3037
|
+
BucketRepaySchema: () => BucketRepaySchema,
|
|
3038
|
+
BucketSbuckDepositSchema: () => BucketSbuckDepositSchema,
|
|
3039
|
+
BucketSbuckRewardsSchema: () => BucketSbuckRewardsSchema,
|
|
3040
|
+
BucketWithdrawCollateralSchema: () => BucketWithdrawCollateralSchema,
|
|
3041
|
+
CetusAddLiquiditySchema: () => CetusAddLiquiditySchema,
|
|
3042
|
+
CetusClosePositionSchema: () => CetusClosePositionSchema,
|
|
3043
|
+
CetusCollectFeeSchema: () => CetusCollectFeeSchema,
|
|
3044
|
+
CetusCreatePoolSchema: () => CetusCreatePoolSchema,
|
|
3045
|
+
CetusOpenPositionSchema: () => CetusOpenPositionSchema,
|
|
3046
|
+
CetusRemoveLiquiditySchema: () => CetusRemoveLiquiditySchema,
|
|
3047
|
+
CetusSwapSchema: () => CetusSwapSchema,
|
|
3048
|
+
CurrentBorrowSchema: () => CurrentBorrowSchema,
|
|
3049
|
+
CurrentDepositSchema: () => CurrentDepositSchema,
|
|
3050
|
+
CurrentLiquidateSchema: () => CurrentLiquidateSchema,
|
|
3051
|
+
CurrentRepaySchema: () => CurrentRepaySchema,
|
|
3052
|
+
CurrentWithdrawSchema: () => CurrentWithdrawSchema,
|
|
3053
|
+
DeepbookBalanceSchema: () => DeepbookBalanceSchema,
|
|
3054
|
+
DeepbookFlashLoanSchema: () => DeepbookFlashLoanSchema,
|
|
3055
|
+
DeepbookOrderCanceledSchema: () => DeepbookOrderCanceledSchema,
|
|
3056
|
+
DeepbookOrderFilledSchema: () => DeepbookOrderFilledSchema,
|
|
3057
|
+
DeepbookOrderInfoSchema: () => DeepbookOrderInfoSchema,
|
|
3058
|
+
DeepbookOrderPlacedSchema: () => DeepbookOrderPlacedSchema,
|
|
3059
|
+
EmberDepositSchema: () => EmberDepositSchema,
|
|
3060
|
+
EmberRateUpdatedSchema: () => EmberRateUpdatedSchema,
|
|
3061
|
+
EmberRedeemProcessedSchema: () => EmberRedeemProcessedSchema,
|
|
3062
|
+
EmberRedeemRequestSchema: () => EmberRedeemRequestSchema,
|
|
3063
|
+
EventSchemaReflector: () => EventSchemaReflector,
|
|
3064
|
+
FlowxAmmPairCreatedSchema: () => FlowxAmmPairCreatedSchema,
|
|
3065
|
+
FlowxAmmSwapSchema: () => FlowxAmmSwapSchema,
|
|
3066
|
+
FlowxClmmPoolCreatedSchema: () => FlowxClmmPoolCreatedSchema,
|
|
3067
|
+
FlowxClmmSwapSchema: () => FlowxClmmSwapSchema,
|
|
3068
|
+
HaedalInstantUnstakedSchema: () => HaedalInstantUnstakedSchema,
|
|
3069
|
+
HaedalStakedSchema: () => HaedalStakedSchema,
|
|
3070
|
+
HaedalUnstakedSchema: () => HaedalUnstakedSchema,
|
|
3071
|
+
KaiAddLiquiditySchema: () => KaiAddLiquiditySchema,
|
|
3072
|
+
KaiDeleverageSchema: () => KaiDeleverageSchema,
|
|
3073
|
+
KaiLiquidationSchema: () => KaiLiquidationSchema,
|
|
3074
|
+
KaiPositionOpenSchema: () => KaiPositionOpenSchema,
|
|
3075
|
+
KaiReduceSchema: () => KaiReduceSchema,
|
|
3076
|
+
KaiSupplySchema: () => KaiSupplySchema,
|
|
3077
|
+
KaiSupplyWithdrawSchema: () => KaiSupplyWithdrawSchema,
|
|
3078
|
+
KriyaAddLiquiditySchema: () => KriyaAddLiquiditySchema,
|
|
3079
|
+
KriyaSwapSchema: () => KriyaSwapSchema,
|
|
3080
|
+
MagmaAddLiquiditySchema: () => MagmaAddLiquiditySchema,
|
|
3081
|
+
MagmaCollectFeeSchema: () => MagmaCollectFeeSchema,
|
|
3082
|
+
MagmaCollectRewardSchema: () => MagmaCollectRewardSchema,
|
|
3083
|
+
MagmaCreatePoolSchema: () => MagmaCreatePoolSchema,
|
|
3084
|
+
MagmaRemoveLiquiditySchema: () => MagmaRemoveLiquiditySchema,
|
|
3085
|
+
MagmaSwapSchema: () => MagmaSwapSchema,
|
|
3086
|
+
MoleAddDebtSchema: () => MoleAddDebtSchema,
|
|
3087
|
+
MoleDepositSchema: () => MoleDepositSchema,
|
|
3088
|
+
MoleHarvestSchema: () => MoleHarvestSchema,
|
|
3089
|
+
MoleKillSchema: () => MoleKillSchema,
|
|
3090
|
+
MoleWithdrawSchema: () => MoleWithdrawSchema,
|
|
3091
|
+
MoleWorkSchema: () => MoleWorkSchema,
|
|
3092
|
+
MomentumAddLiquiditySchema: () => MomentumAddLiquiditySchema,
|
|
3093
|
+
MomentumCollectFeeSchema: () => MomentumCollectFeeSchema,
|
|
3094
|
+
MomentumCollectRewardSchema: () => MomentumCollectRewardSchema,
|
|
3095
|
+
MomentumPoolCreatedSchema: () => MomentumPoolCreatedSchema,
|
|
3096
|
+
MomentumRemoveLiquiditySchema: () => MomentumRemoveLiquiditySchema,
|
|
3097
|
+
MomentumRepayFlashSwapSchema: () => MomentumRepayFlashSwapSchema,
|
|
3098
|
+
MomentumSwapSchema: () => MomentumSwapSchema,
|
|
3099
|
+
NaviBorrowSchema: () => NaviBorrowSchema,
|
|
3100
|
+
NaviDepositSchema: () => NaviDepositSchema,
|
|
3101
|
+
NaviLiquidationSchema: () => NaviLiquidationSchema,
|
|
3102
|
+
NaviRepaySchema: () => NaviRepaySchema,
|
|
3103
|
+
NaviWithdrawSchema: () => NaviWithdrawSchema,
|
|
3104
|
+
PythPriceFeedUpdateSchema: () => PythPriceFeedUpdateSchema,
|
|
3105
|
+
ScallopBorrowSchema: () => ScallopBorrowSchema,
|
|
3106
|
+
ScallopCollateralDepositSchema: () => ScallopCollateralDepositSchema,
|
|
3107
|
+
ScallopCollateralWithdrawSchema: () => ScallopCollateralWithdrawSchema,
|
|
3108
|
+
ScallopLiquidationSchema: () => ScallopLiquidationSchema,
|
|
3109
|
+
ScallopRepaySchema: () => ScallopRepaySchema,
|
|
3110
|
+
SpringsuiEpochChangedSchema: () => SpringsuiEpochChangedSchema,
|
|
3111
|
+
SpringsuiStakeSchema: () => SpringsuiStakeSchema,
|
|
3112
|
+
SpringsuiUnstakeSchema: () => SpringsuiUnstakeSchema,
|
|
3113
|
+
SteammBankDepositSchema: () => SteammBankDepositSchema,
|
|
3114
|
+
SteammBankWithdrawSchema: () => SteammBankWithdrawSchema,
|
|
3115
|
+
SuilendBorrowSchema: () => SuilendBorrowSchema,
|
|
3116
|
+
SuilendClaimRewardSchema: () => SuilendClaimRewardSchema,
|
|
3117
|
+
SuilendDepositSchema: () => SuilendDepositSchema,
|
|
3118
|
+
SuilendLiquidateSchema: () => SuilendLiquidateSchema,
|
|
3119
|
+
SuilendRepaySchema: () => SuilendRepaySchema,
|
|
3120
|
+
SuilendWithdrawSchema: () => SuilendWithdrawSchema,
|
|
3121
|
+
SupraPriceUpdateSchema: () => SupraPriceUpdateSchema,
|
|
3122
|
+
TurbosAddLiquiditySchema: () => TurbosAddLiquiditySchema,
|
|
3123
|
+
TurbosPoolCreatedSchema: () => TurbosPoolCreatedSchema,
|
|
3124
|
+
TurbosRemoveLiquiditySchema: () => TurbosRemoveLiquiditySchema,
|
|
3125
|
+
TurbosSwapSchema: () => TurbosSwapSchema,
|
|
3126
|
+
TypusDovAuctionSchema: () => TypusDovAuctionSchema,
|
|
3127
|
+
TypusDovBidSchema: () => TypusDovBidSchema,
|
|
3128
|
+
TypusDovSettleSchema: () => TypusDovSettleSchema,
|
|
3129
|
+
TypusPerpFundingSchema: () => TypusPerpFundingSchema,
|
|
3130
|
+
TypusPerpLiquidateSchema: () => TypusPerpLiquidateSchema,
|
|
3131
|
+
TypusPerpLpBurnSchema: () => TypusPerpLpBurnSchema,
|
|
3132
|
+
TypusPerpLpMintSchema: () => TypusPerpLpMintSchema,
|
|
3133
|
+
TypusPerpOrderSchema: () => TypusPerpOrderSchema,
|
|
3134
|
+
VoloStakedSchema: () => VoloStakedSchema,
|
|
3135
|
+
VoloUnstakedSchema: () => VoloUnstakedSchema,
|
|
3136
|
+
WalrusBlobCertifiedSchema: () => WalrusBlobCertifiedSchema,
|
|
3137
|
+
WalrusBlobDeletedSchema: () => WalrusBlobDeletedSchema,
|
|
3138
|
+
WalrusBlobRegisteredSchema: () => WalrusBlobRegisteredSchema,
|
|
3139
|
+
_7kConfirmSwapSchema: () => _7kConfirmSwapSchema,
|
|
3140
|
+
_7kSwapSchema: () => _7kSwapSchema,
|
|
3141
|
+
baseEventType: () => baseEventType,
|
|
3142
|
+
catalogEvents: () => catalogEvents,
|
|
3143
|
+
eventTypeMatches: () => eventTypeMatches,
|
|
3144
|
+
formatMoveType: () => formatMoveType,
|
|
3145
|
+
innerEventType: () => innerEventType,
|
|
3146
|
+
matchCatalogEvent: () => matchCatalogEvent,
|
|
3147
|
+
moveAddress: () => moveAddress,
|
|
3148
|
+
moveBalance: () => moveBalance,
|
|
3149
|
+
moveBool: () => moveBool,
|
|
3150
|
+
moveBytes: () => moveBytes,
|
|
3151
|
+
moveSmallUint: () => moveSmallUint,
|
|
3152
|
+
moveString: () => moveString,
|
|
3153
|
+
moveTypeName: () => moveTypeName,
|
|
3154
|
+
moveUint: () => moveUint,
|
|
3155
|
+
normalizeAddress: () => normalizeAddress,
|
|
3156
|
+
parseCatalogEvent: () => parseCatalogEvent,
|
|
3157
|
+
parseMoveType: () => parseMoveType,
|
|
3158
|
+
resolveCatalogEvent: () => resolveCatalogEvent,
|
|
3159
|
+
resolveShape: () => resolveShape,
|
|
3160
|
+
shapeToExpr: () => shapeToExpr,
|
|
3161
|
+
shapeToZod: () => shapeToZod,
|
|
3162
|
+
substituteTypeParams: () => substituteTypeParams,
|
|
3163
|
+
warpAddressPayloadSchema: () => warpAddressPayloadSchema,
|
|
3164
|
+
warpCoinPayloadSchema: () => warpCoinPayloadSchema,
|
|
3165
|
+
warpEventPayloadSchema: () => warpEventPayloadSchema,
|
|
3166
|
+
warpObjectPayloadSchema: () => warpObjectPayloadSchema,
|
|
3167
|
+
webhookEventBodySchema: () => webhookEventBodySchema
|
|
3168
|
+
});
|
|
3169
|
+
function resolveCatalogEvent(rawEventType, options = {}) {
|
|
3170
|
+
for (const event of Object.values(catalogEvents)) {
|
|
3171
|
+
for (const deployment of event.deployments) {
|
|
3172
|
+
if (options.network && deployment.network !== options.network) {
|
|
3173
|
+
continue;
|
|
3174
|
+
}
|
|
3175
|
+
if (eventTypeMatches(rawEventType, deployment, event.generic)) {
|
|
3176
|
+
return event;
|
|
3177
|
+
}
|
|
3178
|
+
}
|
|
3179
|
+
}
|
|
3180
|
+
return void 0;
|
|
3181
|
+
}
|
|
3182
|
+
function extractEventPayload2(input, depth = 0) {
|
|
3183
|
+
if (depth > 3 || typeof input !== "object" || input === null) {
|
|
3184
|
+
return void 0;
|
|
3185
|
+
}
|
|
3186
|
+
const record = input;
|
|
3187
|
+
if (typeof record.type === "string" && record.type.includes("::") && "data" in record) {
|
|
3188
|
+
return { type: record.type, data: record.data };
|
|
3189
|
+
}
|
|
3190
|
+
return extractEventPayload2(record.payload, depth + 1) ?? extractEventPayload2(record.data, depth + 1);
|
|
3191
|
+
}
|
|
3192
|
+
function matches(rawEventType, id, options) {
|
|
3193
|
+
const event = catalogEvents[id];
|
|
3194
|
+
return event.deployments.some(
|
|
3195
|
+
(deployment) => (!options.network || deployment.network === options.network) && eventTypeMatches(rawEventType, deployment, event.generic)
|
|
3196
|
+
);
|
|
3197
|
+
}
|
|
3198
|
+
function matchCatalogEvent(message, id, options = {}) {
|
|
3199
|
+
const payload = extractEventPayload2(message);
|
|
3200
|
+
if (!payload || !matches(payload.type, id, options)) {
|
|
3201
|
+
return void 0;
|
|
3202
|
+
}
|
|
3203
|
+
return payload.data;
|
|
3204
|
+
}
|
|
3205
|
+
function parseCatalogEvent(message, id, options = {}) {
|
|
3206
|
+
const payload = extractEventPayload2(message);
|
|
3207
|
+
if (!payload || !matches(payload.type, id, options)) {
|
|
3208
|
+
return void 0;
|
|
3209
|
+
}
|
|
3210
|
+
return catalogEvents[id].schema.parse(
|
|
3211
|
+
payload.data
|
|
3212
|
+
);
|
|
3213
|
+
}
|
|
3214
|
+
var init_events2 = __esm({
|
|
3215
|
+
"src/events/index.ts"() {
|
|
3216
|
+
"use strict";
|
|
3217
|
+
init_events();
|
|
3218
|
+
init_runtime();
|
|
3219
|
+
init_runtime();
|
|
3220
|
+
init_events();
|
|
3221
|
+
init_move_types();
|
|
3222
|
+
init_reflection();
|
|
3223
|
+
}
|
|
3224
|
+
});
|
|
3225
|
+
|
|
3226
|
+
// src/node.ts
|
|
3227
|
+
var node_exports = {};
|
|
3228
|
+
__export(node_exports, {
|
|
3229
|
+
AccountNamespace: () => AccountNamespace,
|
|
3230
|
+
CatalogNamespace: () => CatalogNamespace,
|
|
3231
|
+
DataNamespace: () => DataNamespace,
|
|
3232
|
+
EventsNamespace: () => EventsNamespace,
|
|
3233
|
+
INODRA_ENDPOINTS: () => INODRA_ENDPOINTS,
|
|
3234
|
+
Inodra: () => Inodra2,
|
|
3235
|
+
InodraAuthenticationError: () => InodraAuthenticationError,
|
|
3236
|
+
InodraError: () => InodraError,
|
|
3237
|
+
InodraHttpClient: () => InodraHttpClient,
|
|
3238
|
+
InodraManagementClient: () => InodraManagementClient,
|
|
3239
|
+
InodraRateLimitError: () => InodraRateLimitError,
|
|
3240
|
+
InodraTimeoutError: () => InodraTimeoutError,
|
|
3241
|
+
InodraWebhookSignatureError: () => InodraWebhookSignatureError,
|
|
3242
|
+
SDK_VERSION: () => SDK_VERSION,
|
|
3243
|
+
WarpNamespace: () => WarpNamespace,
|
|
3244
|
+
WarpSseStream: () => WarpSseStream,
|
|
3245
|
+
WarpWebSocketStream: () => WarpWebSocketStream,
|
|
3246
|
+
WebhooksNamespace: () => WebhooksNamespace,
|
|
3247
|
+
iterateStream: () => iterateStream,
|
|
3248
|
+
paginate: () => paginate,
|
|
3249
|
+
resolveAuth: () => resolveAuth,
|
|
3250
|
+
verifyWebhookSignature: () => verifyWebhookSignature
|
|
3251
|
+
});
|
|
3252
|
+
module.exports = __toCommonJS(node_exports);
|
|
3253
|
+
|
|
3254
|
+
// src/client.ts
|
|
3255
|
+
init_auth();
|
|
3256
|
+
|
|
3257
|
+
// src/core/http.ts
|
|
3258
|
+
init_auth();
|
|
3259
|
+
|
|
3260
|
+
// src/core/errors.ts
|
|
3261
|
+
var InodraError = class extends Error {
|
|
3262
|
+
status;
|
|
3263
|
+
requestId;
|
|
3264
|
+
body;
|
|
3265
|
+
/** Stable machine-readable error code from the API (e.g. "QUOTA_EXCEEDED"). */
|
|
3266
|
+
code;
|
|
3267
|
+
constructor(message, options) {
|
|
3268
|
+
super(message);
|
|
3269
|
+
this.name = "InodraError";
|
|
3270
|
+
this.status = options.status;
|
|
3271
|
+
this.requestId = options.requestId;
|
|
3272
|
+
this.body = options.body;
|
|
3273
|
+
this.code = options.code;
|
|
3274
|
+
}
|
|
3275
|
+
};
|
|
3276
|
+
var InodraAuthenticationError = class extends InodraError {
|
|
3277
|
+
constructor(options) {
|
|
3278
|
+
super(
|
|
3279
|
+
options.message ?? (options.status === 403 ? "Forbidden \u2014 the API key is valid but not allowed to do this" : "Invalid or missing API key"),
|
|
3280
|
+
options
|
|
3281
|
+
);
|
|
3282
|
+
this.name = "InodraAuthenticationError";
|
|
3283
|
+
}
|
|
3284
|
+
};
|
|
3285
|
+
var InodraRateLimitError = class extends InodraError {
|
|
3286
|
+
retryAfterSeconds;
|
|
3287
|
+
constructor(options) {
|
|
3288
|
+
super(options.message ?? "Rate limit exceeded", options);
|
|
3289
|
+
this.name = "InodraRateLimitError";
|
|
3290
|
+
this.retryAfterSeconds = options.retryAfterSeconds;
|
|
3291
|
+
}
|
|
3292
|
+
};
|
|
3293
|
+
var InodraTimeoutError = class extends Error {
|
|
3294
|
+
constructor(timeoutMs) {
|
|
3295
|
+
super(`Request timed out after ${timeoutMs}ms`);
|
|
3296
|
+
this.name = "InodraTimeoutError";
|
|
3297
|
+
}
|
|
3298
|
+
};
|
|
3299
|
+
var InodraWebhookSignatureError = class extends Error {
|
|
3300
|
+
constructor() {
|
|
3301
|
+
super("Webhook signature verification failed (bad, missing, or expired)");
|
|
3302
|
+
this.name = "InodraWebhookSignatureError";
|
|
3303
|
+
}
|
|
3304
|
+
};
|
|
3305
|
+
|
|
3306
|
+
// src/core/http.ts
|
|
3307
|
+
init_network();
|
|
3308
|
+
init_version();
|
|
3309
|
+
var InodraHttpClient = class {
|
|
3310
|
+
baseUrl;
|
|
3311
|
+
/** Rate-limit/credit info from the most recent response, if any. */
|
|
3312
|
+
lastResponseMeta;
|
|
3313
|
+
auth;
|
|
3314
|
+
maxRetries;
|
|
3315
|
+
timeoutMs;
|
|
3316
|
+
fetchImpl;
|
|
3317
|
+
onResponseMeta;
|
|
3318
|
+
constructor(options) {
|
|
3319
|
+
this.auth = authFromOptions(options, "InodraHttpClient");
|
|
3320
|
+
this.baseUrl = (options.baseUrl ?? restBaseUrl(options.network ?? "mainnet")).replace(/\/$/, "");
|
|
3321
|
+
this.maxRetries = options.maxRetries ?? 2;
|
|
3322
|
+
this.timeoutMs = options.timeoutMs ?? 3e4;
|
|
3323
|
+
this.fetchImpl = options.fetch ?? globalThis.fetch;
|
|
3324
|
+
this.onResponseMeta = options.onResponseMeta;
|
|
3325
|
+
}
|
|
3326
|
+
async request(method, path, options = {}) {
|
|
3327
|
+
const url = new URL(this.baseUrl + path);
|
|
3328
|
+
for (const [key, value] of Object.entries(options.query ?? {})) {
|
|
3329
|
+
if (value !== void 0) {
|
|
3330
|
+
url.searchParams.set(key, String(value));
|
|
3331
|
+
}
|
|
3332
|
+
}
|
|
3333
|
+
const retryOn5xx = options.idempotent ?? !(method === "POST" || method === "PATCH");
|
|
3334
|
+
let attempt = 0;
|
|
3335
|
+
for (; ; ) {
|
|
3336
|
+
const response = await this.send(url, method, options);
|
|
3337
|
+
this.captureMeta(response);
|
|
3338
|
+
if (response.ok) {
|
|
3339
|
+
if (response.status === 204) {
|
|
3340
|
+
return void 0;
|
|
3341
|
+
}
|
|
3342
|
+
return await response.json();
|
|
3343
|
+
}
|
|
3344
|
+
const retryable = response.status === 429 || retryOn5xx && response.status >= 500;
|
|
3345
|
+
if (retryable && attempt < this.maxRetries) {
|
|
3346
|
+
attempt += 1;
|
|
3347
|
+
await sleep(retryDelayMs(response, attempt));
|
|
3348
|
+
continue;
|
|
3349
|
+
}
|
|
3350
|
+
throw await toError(response);
|
|
3351
|
+
}
|
|
3352
|
+
}
|
|
3353
|
+
async send(url, method, options) {
|
|
3354
|
+
const timeoutSignal = AbortSignal.timeout(this.timeoutMs);
|
|
3355
|
+
const signal = options.signal ? AbortSignal.any([options.signal, timeoutSignal]) : timeoutSignal;
|
|
3356
|
+
const { headers: authHeaders } = await this.auth.credentials();
|
|
3357
|
+
try {
|
|
3358
|
+
return await this.fetchImpl(url, {
|
|
3359
|
+
method,
|
|
3360
|
+
headers: {
|
|
3361
|
+
...authHeaders,
|
|
3362
|
+
[SDK_HEADER_NAME]: SDK_HEADER_VALUE,
|
|
3363
|
+
"content-type": "application/json",
|
|
3364
|
+
accept: "application/json"
|
|
3365
|
+
},
|
|
3366
|
+
body: options.body === void 0 ? void 0 : JSON.stringify(options.body),
|
|
3367
|
+
signal
|
|
3368
|
+
});
|
|
3369
|
+
} catch (error) {
|
|
3370
|
+
if (timeoutSignal.aborted && !options.signal?.aborted) {
|
|
3371
|
+
throw new InodraTimeoutError(this.timeoutMs);
|
|
3372
|
+
}
|
|
3373
|
+
throw error;
|
|
3374
|
+
}
|
|
3375
|
+
}
|
|
3376
|
+
captureMeta(response) {
|
|
3377
|
+
const meta = parseResponseMeta(response);
|
|
3378
|
+
if (meta) {
|
|
3379
|
+
this.lastResponseMeta = meta;
|
|
3380
|
+
this.onResponseMeta?.(meta);
|
|
3381
|
+
}
|
|
3382
|
+
}
|
|
3383
|
+
};
|
|
3384
|
+
function parseResponseMeta(response) {
|
|
3385
|
+
const meta = {};
|
|
3386
|
+
const limit = header(response, "x-ratelimit-limit");
|
|
3387
|
+
const remaining = header(response, "x-ratelimit-remaining");
|
|
3388
|
+
const reset = header(response, "x-ratelimit-reset");
|
|
3389
|
+
if (limit !== void 0 && remaining !== void 0) {
|
|
3390
|
+
meta.rateLimit = {
|
|
3391
|
+
limit,
|
|
3392
|
+
remaining,
|
|
3393
|
+
reset: reset ?? 0,
|
|
3394
|
+
throttled: response.headers.get("x-ratelimit-throttle") !== null
|
|
3395
|
+
};
|
|
3396
|
+
}
|
|
3397
|
+
const creditRemaining = header(response, "x-inodra-credit-remaining");
|
|
3398
|
+
const creditLimit = header(response, "x-inodra-credit-limit");
|
|
3399
|
+
if (creditRemaining !== void 0 && creditLimit !== void 0) {
|
|
3400
|
+
meta.credits = {
|
|
3401
|
+
remaining: creditRemaining,
|
|
3402
|
+
limit: creditLimit,
|
|
3403
|
+
replenishDate: response.headers.get("x-inodra-credit-replenish-date") ?? void 0,
|
|
3404
|
+
degraded: response.headers.get("x-inodra-credit-degraded") === "true"
|
|
3405
|
+
};
|
|
3406
|
+
}
|
|
3407
|
+
const requestId = response.headers.get("x-request-id");
|
|
3408
|
+
if (requestId) {
|
|
3409
|
+
meta.requestId = requestId;
|
|
3410
|
+
}
|
|
3411
|
+
if (!meta.rateLimit && !meta.credits && !meta.requestId) {
|
|
3412
|
+
return void 0;
|
|
3413
|
+
}
|
|
3414
|
+
return meta;
|
|
3415
|
+
}
|
|
3416
|
+
function header(response, name) {
|
|
3417
|
+
const raw = response.headers.get(name);
|
|
3418
|
+
if (raw === null) {
|
|
3419
|
+
return void 0;
|
|
3420
|
+
}
|
|
3421
|
+
const value = Number(raw);
|
|
3422
|
+
return Number.isFinite(value) ? value : void 0;
|
|
3423
|
+
}
|
|
3424
|
+
async function toError(response) {
|
|
3425
|
+
const requestId = response.headers.get("x-request-id") ?? void 0;
|
|
3426
|
+
let body;
|
|
3427
|
+
try {
|
|
3428
|
+
body = await response.json();
|
|
3429
|
+
} catch {
|
|
3430
|
+
body = void 0;
|
|
3431
|
+
}
|
|
3432
|
+
const serverMessage = extractField(body, ["message", "error"]);
|
|
3433
|
+
const code = extractField(body, ["code"]);
|
|
3434
|
+
if (response.status === 401 || response.status === 403) {
|
|
3435
|
+
return new InodraAuthenticationError({
|
|
3436
|
+
status: response.status,
|
|
3437
|
+
requestId,
|
|
3438
|
+
body,
|
|
3439
|
+
code,
|
|
3440
|
+
message: serverMessage
|
|
3441
|
+
});
|
|
3442
|
+
}
|
|
3443
|
+
if (response.status === 429) {
|
|
3444
|
+
const retryAfter = response.headers.get("retry-after");
|
|
3445
|
+
return new InodraRateLimitError({
|
|
3446
|
+
status: response.status,
|
|
3447
|
+
requestId,
|
|
3448
|
+
body,
|
|
3449
|
+
code,
|
|
3450
|
+
retryAfterSeconds: retryAfter ? Number(retryAfter) : void 0,
|
|
3451
|
+
message: serverMessage
|
|
3452
|
+
});
|
|
3453
|
+
}
|
|
3454
|
+
return new InodraError(
|
|
3455
|
+
serverMessage ?? `Request failed with status ${response.status}`,
|
|
3456
|
+
{ status: response.status, requestId, body, code }
|
|
3457
|
+
);
|
|
3458
|
+
}
|
|
3459
|
+
function extractField(body, keys) {
|
|
3460
|
+
if (typeof body !== "object" || body === null) {
|
|
3461
|
+
return void 0;
|
|
3462
|
+
}
|
|
3463
|
+
for (const key of keys) {
|
|
3464
|
+
const value = body[key];
|
|
3465
|
+
if (typeof value === "string" && value.length > 0) {
|
|
3466
|
+
return value;
|
|
3467
|
+
}
|
|
3468
|
+
}
|
|
3469
|
+
return void 0;
|
|
3470
|
+
}
|
|
3471
|
+
function retryDelayMs(response, attempt) {
|
|
3472
|
+
const retryAfter = response.headers.get("retry-after");
|
|
3473
|
+
if (retryAfter) {
|
|
3474
|
+
const seconds = Number(retryAfter);
|
|
3475
|
+
if (Number.isFinite(seconds)) {
|
|
3476
|
+
return seconds * 1e3;
|
|
3477
|
+
}
|
|
3478
|
+
}
|
|
3479
|
+
return 250 * 2 ** (attempt - 1) + Math.random() * 100;
|
|
3480
|
+
}
|
|
3481
|
+
function sleep(ms) {
|
|
3482
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
3483
|
+
}
|
|
3484
|
+
|
|
3485
|
+
// src/client.ts
|
|
3486
|
+
init_network();
|
|
3487
|
+
|
|
3488
|
+
// src/graphql/index.ts
|
|
3489
|
+
var import_graphql = require("@mysten/sui/graphql");
|
|
3490
|
+
init_auth();
|
|
3491
|
+
init_network();
|
|
3492
|
+
init_version();
|
|
3493
|
+
var import_graphql2 = require("@mysten/sui/graphql");
|
|
3494
|
+
function createInodraGraphQLClient(options) {
|
|
3495
|
+
const network = options.network ?? "mainnet";
|
|
3496
|
+
return new import_graphql.SuiGraphQLClient({
|
|
3497
|
+
network,
|
|
3498
|
+
url: options.url ?? graphqlUrl(network),
|
|
3499
|
+
headers: {
|
|
3500
|
+
...staticAuthHeaders(options, "createInodraGraphQLClient"),
|
|
3501
|
+
[SDK_HEADER_NAME]: SDK_HEADER_VALUE,
|
|
3502
|
+
...options.headers
|
|
3503
|
+
},
|
|
3504
|
+
queries: options.queries
|
|
3505
|
+
});
|
|
3506
|
+
}
|
|
3507
|
+
|
|
3508
|
+
// src/grpc-web/index.ts
|
|
3509
|
+
var import_grpc = require("@mysten/sui/grpc");
|
|
3510
|
+
var import_grpcweb_transport = require("@protobuf-ts/grpcweb-transport");
|
|
3511
|
+
init_auth();
|
|
3512
|
+
init_network();
|
|
3513
|
+
init_version();
|
|
3514
|
+
var import_grpc2 = require("@mysten/sui/grpc");
|
|
3515
|
+
function createInodraGrpcWebClient(options) {
|
|
3516
|
+
const network = options.network ?? "mainnet";
|
|
3517
|
+
const transport = new import_grpcweb_transport.GrpcWebFetchTransport({
|
|
3518
|
+
baseUrl: options.baseUrl ?? grpcBaseUrl(network),
|
|
3519
|
+
meta: {
|
|
3520
|
+
...staticAuthHeaders(options, "createInodraGrpcWebClient"),
|
|
3521
|
+
[SDK_HEADER_NAME]: SDK_HEADER_VALUE,
|
|
3522
|
+
...options.metadata
|
|
3523
|
+
}
|
|
3524
|
+
});
|
|
3525
|
+
return new import_grpc.SuiGrpcClient({ network, transport });
|
|
3526
|
+
}
|
|
3527
|
+
|
|
3528
|
+
// src/namespaces/account.ts
|
|
3529
|
+
var AccountNamespace = class {
|
|
3530
|
+
http;
|
|
3531
|
+
constructor(http) {
|
|
3532
|
+
this.http = http;
|
|
3533
|
+
}
|
|
3534
|
+
/** Who am I — key, organization, project, network, tier, subscription. */
|
|
3535
|
+
me() {
|
|
3536
|
+
return this.http.request("GET", "/auth/me");
|
|
3537
|
+
}
|
|
3538
|
+
/** Usage stats for the current billing period (CU, requests, latency). */
|
|
3539
|
+
usage() {
|
|
3540
|
+
return this.http.request("GET", "/usage/stats");
|
|
3541
|
+
}
|
|
3542
|
+
};
|
|
3543
|
+
|
|
3544
|
+
// src/namespaces/catalog.ts
|
|
3545
|
+
var CatalogNamespace = class {
|
|
3546
|
+
http;
|
|
3547
|
+
constructor(http) {
|
|
3548
|
+
this.http = http;
|
|
3549
|
+
}
|
|
3550
|
+
protocols(query) {
|
|
3551
|
+
return this.http.request("GET", "/catalog/protocols", { query });
|
|
3552
|
+
}
|
|
3553
|
+
events(query) {
|
|
3554
|
+
return this.http.request("GET", "/catalog/events", { query });
|
|
3555
|
+
}
|
|
3556
|
+
};
|
|
3557
|
+
|
|
3558
|
+
// src/core/openapi.ts
|
|
3559
|
+
async function* paginate(fetchPage) {
|
|
3560
|
+
let cursor;
|
|
3561
|
+
for (; ; ) {
|
|
3562
|
+
const page = await fetchPage(cursor);
|
|
3563
|
+
yield* page.data;
|
|
3564
|
+
if (!page.pagination.hasNext || !page.pagination.cursor) {
|
|
3565
|
+
return;
|
|
3566
|
+
}
|
|
3567
|
+
cursor = page.pagination.cursor;
|
|
3568
|
+
}
|
|
3569
|
+
}
|
|
3570
|
+
|
|
3571
|
+
// src/namespaces/data.ts
|
|
3572
|
+
var DataNamespace = class {
|
|
3573
|
+
http;
|
|
3574
|
+
constructor(http) {
|
|
3575
|
+
this.http = http;
|
|
3576
|
+
}
|
|
3577
|
+
accounts = {
|
|
3578
|
+
get: (address) => this.http.request("GET", `/accounts/${encodeURIComponent(address)}`),
|
|
3579
|
+
balance: (address) => this.http.request(
|
|
3580
|
+
"GET",
|
|
3581
|
+
`/accounts/${encodeURIComponent(address)}/balance`
|
|
3582
|
+
),
|
|
3583
|
+
objects: (address, query) => this.http.request(
|
|
3584
|
+
"GET",
|
|
3585
|
+
`/accounts/${encodeURIComponent(address)}/objects`,
|
|
3586
|
+
{ query }
|
|
3587
|
+
),
|
|
3588
|
+
/** Every owned object, walking all pages lazily. */
|
|
3589
|
+
iterateObjects: (address, query) => paginate(
|
|
3590
|
+
(cursor) => this.accounts.objects(address, { ...query, cursor })
|
|
3591
|
+
),
|
|
3592
|
+
transactions: (address, query) => this.http.request(
|
|
3593
|
+
"GET",
|
|
3594
|
+
`/accounts/${encodeURIComponent(address)}/transactions`,
|
|
3595
|
+
{ query }
|
|
3596
|
+
),
|
|
3597
|
+
/** Every transaction, walking all pages lazily. */
|
|
3598
|
+
iterateTransactions: (address, query) => paginate(
|
|
3599
|
+
(cursor) => this.accounts.transactions(address, { ...query, cursor })
|
|
3600
|
+
),
|
|
3601
|
+
delegations: (address) => this.http.request(
|
|
3602
|
+
"GET",
|
|
3603
|
+
`/accounts/${encodeURIComponent(address)}/delegations`
|
|
3604
|
+
)
|
|
3605
|
+
};
|
|
3606
|
+
coins = {
|
|
3607
|
+
/** Coin denomination (supply, holders, decimals, …). */
|
|
3608
|
+
get: (coinType) => this.http.request("GET", `/coins/${encodeURIComponent(coinType)}`),
|
|
3609
|
+
/** Display metadata: name, symbol, icon, description, links. */
|
|
3610
|
+
metadata: (coinType) => this.http.request("GET", `/coins/type/${encodeURIComponent(coinType)}`)
|
|
3611
|
+
};
|
|
3612
|
+
objects = {
|
|
3613
|
+
/** Metadata (type, name, image, project) for one object id. */
|
|
3614
|
+
metadata: (input) => this.http.request("POST", "/objects/metadata", {
|
|
3615
|
+
body: input,
|
|
3616
|
+
idempotent: true
|
|
3617
|
+
}),
|
|
3618
|
+
transactions: (objectId, query) => this.http.request(
|
|
3619
|
+
"GET",
|
|
3620
|
+
`/objects/${encodeURIComponent(objectId)}/transactions`,
|
|
3621
|
+
{ query }
|
|
3622
|
+
),
|
|
3623
|
+
/** Every transaction touching the object, walking all pages lazily. */
|
|
3624
|
+
iterateTransactions: (objectId, query) => paginate(
|
|
3625
|
+
(cursor) => this.objects.transactions(objectId, { ...query, cursor })
|
|
3626
|
+
)
|
|
3627
|
+
};
|
|
3628
|
+
packages = {
|
|
3629
|
+
get: (packageId) => this.http.request("GET", `/packages/${encodeURIComponent(packageId)}`)
|
|
3630
|
+
};
|
|
3631
|
+
chain = {
|
|
3632
|
+
info: () => this.http.request("GET", "/chain/info"),
|
|
3633
|
+
staking: () => this.http.request("GET", "/chain/staking"),
|
|
3634
|
+
stats: () => this.http.request("GET", "/chain/stats")
|
|
3635
|
+
};
|
|
3636
|
+
validators = {
|
|
3637
|
+
list: (query) => this.http.request("GET", "/validators", { query }),
|
|
3638
|
+
apy: () => this.http.request("GET", "/validators/apy"),
|
|
3639
|
+
commission: () => this.http.request("GET", "/validators/commission"),
|
|
3640
|
+
get: (validatorAddress) => this.http.request(
|
|
3641
|
+
"GET",
|
|
3642
|
+
`/validators/${encodeURIComponent(validatorAddress)}`
|
|
3643
|
+
)
|
|
3644
|
+
};
|
|
3645
|
+
suins = {
|
|
3646
|
+
/** SuiNS name → address. */
|
|
3647
|
+
resolve: (name) => this.http.request("GET", `/suins/resolve/${encodeURIComponent(name)}`),
|
|
3648
|
+
/** Address → primary SuiNS name. */
|
|
3649
|
+
reverse: (address) => this.http.request(
|
|
3650
|
+
"GET",
|
|
3651
|
+
`/suins/reverse/${encodeURIComponent(address)}`
|
|
3652
|
+
),
|
|
3653
|
+
resolveBatch: (input) => this.http.request("POST", "/suins/resolve/batch", {
|
|
3654
|
+
body: input,
|
|
3655
|
+
idempotent: true
|
|
3656
|
+
}),
|
|
3657
|
+
availability: (name) => this.http.request(
|
|
3658
|
+
"GET",
|
|
3659
|
+
`/suins/availability/${encodeURIComponent(name)}`
|
|
3660
|
+
)
|
|
3661
|
+
};
|
|
3662
|
+
};
|
|
3663
|
+
|
|
3664
|
+
// src/namespaces/events.ts
|
|
3665
|
+
var EventsNamespace = class {
|
|
3666
|
+
ctx;
|
|
3667
|
+
reflectorPromise;
|
|
3668
|
+
constructor(ctx) {
|
|
3669
|
+
this.ctx = ctx;
|
|
3670
|
+
}
|
|
3671
|
+
/** The underlying reflector (shared cache across calls). */
|
|
3672
|
+
reflector() {
|
|
3673
|
+
this.reflectorPromise ??= Promise.resolve().then(() => (init_reflection(), reflection_exports)).then(
|
|
3674
|
+
(module2) => new module2.EventSchemaReflector({
|
|
3675
|
+
auth: this.ctx.auth,
|
|
3676
|
+
network: this.ctx.network,
|
|
3677
|
+
url: this.ctx.graphqlUrl,
|
|
3678
|
+
fetch: this.ctx.fetch
|
|
3679
|
+
})
|
|
3680
|
+
);
|
|
3681
|
+
return this.reflectorPromise;
|
|
3682
|
+
}
|
|
3683
|
+
/**
|
|
3684
|
+
* Build (and cache) a loose, normalizing zod schema for any concrete
|
|
3685
|
+
* Move event type, by reflecting its struct layout on-chain. Generic
|
|
3686
|
+
* types are typed concretely from their instantiation.
|
|
3687
|
+
*/
|
|
3688
|
+
async schemaFor(type) {
|
|
3689
|
+
return (await this.reflector()).schemaFor(type);
|
|
3690
|
+
}
|
|
3691
|
+
/**
|
|
3692
|
+
* Validate + normalize an event payload against the reflected schema.
|
|
3693
|
+
* Accepts a Warp stream message, a bare event payload, or a webhook
|
|
3694
|
+
* body. Returns undefined for other event types; throws on schema
|
|
3695
|
+
* mismatch. Pass a base type (no `<…>`) to match every instantiation —
|
|
3696
|
+
* each is reflected and typed concretely.
|
|
3697
|
+
*/
|
|
3698
|
+
async parseEvent(message, type) {
|
|
3699
|
+
return (await this.reflector()).parseEvent(message, type);
|
|
3700
|
+
}
|
|
3701
|
+
};
|
|
3702
|
+
|
|
3703
|
+
// src/warp/iterate.ts
|
|
3704
|
+
async function* iterateStream(stream, options = {}) {
|
|
3705
|
+
const queue = [];
|
|
3706
|
+
let notify;
|
|
3707
|
+
let closed = false;
|
|
3708
|
+
let failure;
|
|
3709
|
+
const unsubscribes = [
|
|
3710
|
+
stream.on("message", (event) => {
|
|
3711
|
+
queue.push(event);
|
|
3712
|
+
notify?.();
|
|
3713
|
+
}),
|
|
3714
|
+
stream.on("close", ({ reason }) => {
|
|
3715
|
+
closed = true;
|
|
3716
|
+
if (reason !== "client closed") {
|
|
3717
|
+
failure = new Error(`Warp stream closed: ${reason}`);
|
|
3718
|
+
}
|
|
3719
|
+
notify?.();
|
|
3720
|
+
})
|
|
3721
|
+
];
|
|
3722
|
+
try {
|
|
3723
|
+
for (; ; ) {
|
|
3724
|
+
while (queue.length > 0) {
|
|
3725
|
+
yield queue.shift();
|
|
3726
|
+
}
|
|
3727
|
+
if (closed) {
|
|
3728
|
+
if (failure) {
|
|
3729
|
+
throw failure;
|
|
3730
|
+
}
|
|
3731
|
+
return;
|
|
3732
|
+
}
|
|
3733
|
+
await new Promise((resolve) => {
|
|
3734
|
+
notify = resolve;
|
|
3735
|
+
});
|
|
3736
|
+
notify = void 0;
|
|
3737
|
+
}
|
|
3738
|
+
} finally {
|
|
3739
|
+
for (const unsubscribe of unsubscribes) {
|
|
3740
|
+
unsubscribe();
|
|
3741
|
+
}
|
|
3742
|
+
if (options.closeOnReturn ?? true) {
|
|
3743
|
+
stream.close();
|
|
3744
|
+
}
|
|
3745
|
+
}
|
|
3746
|
+
}
|
|
3747
|
+
|
|
3748
|
+
// src/warp/sse.ts
|
|
3749
|
+
init_auth();
|
|
3750
|
+
init_version();
|
|
3751
|
+
init_network();
|
|
3752
|
+
|
|
3753
|
+
// src/warp/emitter.ts
|
|
3754
|
+
var Emitter = class {
|
|
3755
|
+
handlers = /* @__PURE__ */ new Map();
|
|
3756
|
+
on(event, handler) {
|
|
3757
|
+
let set = this.handlers.get(event);
|
|
3758
|
+
if (!set) {
|
|
3759
|
+
set = /* @__PURE__ */ new Set();
|
|
3760
|
+
this.handlers.set(event, set);
|
|
3761
|
+
}
|
|
3762
|
+
set.add(handler);
|
|
3763
|
+
return () => set?.delete(handler);
|
|
3764
|
+
}
|
|
3765
|
+
off(event, handler) {
|
|
3766
|
+
this.handlers.get(event)?.delete(handler);
|
|
3767
|
+
}
|
|
3768
|
+
/** Returns false if any handler threw. */
|
|
3769
|
+
emit(event, payload) {
|
|
3770
|
+
let ok = true;
|
|
3771
|
+
for (const handler of this.handlers.get(event) ?? []) {
|
|
3772
|
+
try {
|
|
3773
|
+
handler(payload);
|
|
3774
|
+
} catch {
|
|
3775
|
+
ok = false;
|
|
3776
|
+
}
|
|
3777
|
+
}
|
|
3778
|
+
return ok;
|
|
3779
|
+
}
|
|
3780
|
+
};
|
|
3781
|
+
|
|
3782
|
+
// src/warp/sse-parser.ts
|
|
3783
|
+
var SseParser = class {
|
|
3784
|
+
buffer = "";
|
|
3785
|
+
eventName = "";
|
|
3786
|
+
dataLines = [];
|
|
3787
|
+
id;
|
|
3788
|
+
retryMs;
|
|
3789
|
+
feed(chunk) {
|
|
3790
|
+
this.buffer += chunk;
|
|
3791
|
+
const messages = [];
|
|
3792
|
+
for (; ; ) {
|
|
3793
|
+
const newline = this.buffer.search(/\r\n|\r|\n/);
|
|
3794
|
+
if (newline === -1) {
|
|
3795
|
+
break;
|
|
3796
|
+
}
|
|
3797
|
+
const line = this.buffer.slice(0, newline);
|
|
3798
|
+
const sep = this.buffer.slice(newline, newline + 2);
|
|
3799
|
+
this.buffer = this.buffer.slice(newline + (sep === "\r\n" ? 2 : 1));
|
|
3800
|
+
if (line === "") {
|
|
3801
|
+
const message = this.flush();
|
|
3802
|
+
if (message) {
|
|
3803
|
+
messages.push(message);
|
|
3804
|
+
}
|
|
3805
|
+
continue;
|
|
3806
|
+
}
|
|
3807
|
+
this.parseLine(line);
|
|
3808
|
+
}
|
|
3809
|
+
return messages;
|
|
3810
|
+
}
|
|
3811
|
+
parseLine(line) {
|
|
3812
|
+
if (line.startsWith(":")) {
|
|
3813
|
+
return;
|
|
3814
|
+
}
|
|
3815
|
+
const colon = line.indexOf(":");
|
|
3816
|
+
const field = colon === -1 ? line : line.slice(0, colon);
|
|
3817
|
+
let value = colon === -1 ? "" : line.slice(colon + 1);
|
|
3818
|
+
if (value.startsWith(" ")) {
|
|
3819
|
+
value = value.slice(1);
|
|
3820
|
+
}
|
|
3821
|
+
switch (field) {
|
|
3822
|
+
case "event":
|
|
3823
|
+
this.eventName = value;
|
|
3824
|
+
break;
|
|
3825
|
+
case "data":
|
|
3826
|
+
this.dataLines.push(value);
|
|
3827
|
+
break;
|
|
3828
|
+
case "id":
|
|
3829
|
+
if (!value.includes("\0")) {
|
|
3830
|
+
this.id = value;
|
|
3831
|
+
}
|
|
3832
|
+
break;
|
|
3833
|
+
case "retry": {
|
|
3834
|
+
const ms = Number(value);
|
|
3835
|
+
if (Number.isInteger(ms) && ms >= 0) {
|
|
3836
|
+
this.retryMs = ms;
|
|
3837
|
+
}
|
|
3838
|
+
break;
|
|
3839
|
+
}
|
|
3840
|
+
default:
|
|
3841
|
+
break;
|
|
3842
|
+
}
|
|
3843
|
+
}
|
|
3844
|
+
flush() {
|
|
3845
|
+
if (this.dataLines.length === 0 && this.eventName === "") {
|
|
3846
|
+
const retryOnly = this.retryMs;
|
|
3847
|
+
this.retryMs = void 0;
|
|
3848
|
+
return retryOnly === void 0 ? void 0 : { event: "", data: "", retryMs: retryOnly };
|
|
3849
|
+
}
|
|
3850
|
+
const message = {
|
|
3851
|
+
event: this.eventName || "message",
|
|
3852
|
+
data: this.dataLines.join("\n"),
|
|
3853
|
+
id: this.id,
|
|
3854
|
+
retryMs: this.retryMs
|
|
3855
|
+
};
|
|
3856
|
+
this.eventName = "";
|
|
3857
|
+
this.dataLines = [];
|
|
3858
|
+
this.retryMs = void 0;
|
|
3859
|
+
return message;
|
|
3860
|
+
}
|
|
3861
|
+
};
|
|
3862
|
+
|
|
3863
|
+
// src/warp/types.ts
|
|
3864
|
+
var CONTROL_EVENTS = /* @__PURE__ */ new Set(["connected", "error", "quota_exceeded"]);
|
|
3865
|
+
function backoffDelayMs(attempt) {
|
|
3866
|
+
return Math.min(1e3 * 2 ** (attempt - 1), 3e4) + Math.random() * 250;
|
|
3867
|
+
}
|
|
3868
|
+
|
|
3869
|
+
// src/warp/sse.ts
|
|
3870
|
+
var WarpSseStream = class extends Emitter {
|
|
3871
|
+
lastEventId;
|
|
3872
|
+
options;
|
|
3873
|
+
auth;
|
|
3874
|
+
url;
|
|
3875
|
+
fetchImpl;
|
|
3876
|
+
abort;
|
|
3877
|
+
reconnectAttempt = 0;
|
|
3878
|
+
serverRetryMs;
|
|
3879
|
+
closed = false;
|
|
3880
|
+
closeEmitted = false;
|
|
3881
|
+
constructor(options) {
|
|
3882
|
+
super();
|
|
3883
|
+
this.options = options;
|
|
3884
|
+
this.auth = authFromOptions(options, "WarpSseStream");
|
|
3885
|
+
const base = options.url ?? warpStreamUrl(options.network ?? "mainnet", options.subscriptionId);
|
|
3886
|
+
if (options.mode !== void 0) {
|
|
3887
|
+
const url = new URL(base);
|
|
3888
|
+
url.searchParams.set("mode", options.mode);
|
|
3889
|
+
this.url = url.toString();
|
|
3890
|
+
} else {
|
|
3891
|
+
this.url = base;
|
|
3892
|
+
}
|
|
3893
|
+
this.fetchImpl = options.fetch ?? globalThis.fetch;
|
|
3894
|
+
this.lastEventId = options.lastEventId;
|
|
3895
|
+
}
|
|
3896
|
+
connect() {
|
|
3897
|
+
if (this.abort) {
|
|
3898
|
+
return;
|
|
3899
|
+
}
|
|
3900
|
+
this.closed = false;
|
|
3901
|
+
this.closeEmitted = false;
|
|
3902
|
+
this.abort = new AbortController();
|
|
3903
|
+
void this.run(this.abort.signal);
|
|
3904
|
+
}
|
|
3905
|
+
close() {
|
|
3906
|
+
const wasActive = this.abort !== void 0;
|
|
3907
|
+
this.closed = true;
|
|
3908
|
+
this.abort?.abort();
|
|
3909
|
+
this.abort = void 0;
|
|
3910
|
+
if (wasActive) {
|
|
3911
|
+
this.emitClose("client closed");
|
|
3912
|
+
}
|
|
3913
|
+
}
|
|
3914
|
+
/** Emit "close" exactly once per connection lifecycle. */
|
|
3915
|
+
emitClose(reason) {
|
|
3916
|
+
if (this.closeEmitted) {
|
|
3917
|
+
return;
|
|
3918
|
+
}
|
|
3919
|
+
this.closeEmitted = true;
|
|
3920
|
+
this.emit("close", { reason });
|
|
3921
|
+
}
|
|
3922
|
+
/** Iterate data events; ends when the stream closes (throws unless client-initiated). */
|
|
3923
|
+
[Symbol.asyncIterator]() {
|
|
3924
|
+
return iterateStream(this);
|
|
3925
|
+
}
|
|
3926
|
+
async run(signal) {
|
|
3927
|
+
for (; ; ) {
|
|
3928
|
+
try {
|
|
3929
|
+
await this.consume(signal);
|
|
3930
|
+
if (this.closed || signal.aborted) {
|
|
3931
|
+
return;
|
|
3932
|
+
}
|
|
3933
|
+
} catch (error) {
|
|
3934
|
+
if (this.closed || signal.aborted) {
|
|
3935
|
+
return;
|
|
3936
|
+
}
|
|
3937
|
+
if (error instanceof TerminalStreamError) {
|
|
3938
|
+
this.emit("error", error);
|
|
3939
|
+
this.emitClose(error.message);
|
|
3940
|
+
this.close();
|
|
3941
|
+
return;
|
|
3942
|
+
}
|
|
3943
|
+
this.emit(
|
|
3944
|
+
"error",
|
|
3945
|
+
error instanceof Error ? error : new Error(String(error))
|
|
3946
|
+
);
|
|
3947
|
+
}
|
|
3948
|
+
if (!(this.options.reconnect ?? true)) {
|
|
3949
|
+
this.emitClose("disconnected");
|
|
3950
|
+
this.close();
|
|
3951
|
+
return;
|
|
3952
|
+
}
|
|
3953
|
+
this.reconnectAttempt += 1;
|
|
3954
|
+
if (this.reconnectAttempt > (this.options.maxReconnectAttempts ?? 10)) {
|
|
3955
|
+
this.emitClose("max reconnect attempts exceeded");
|
|
3956
|
+
this.close();
|
|
3957
|
+
return;
|
|
3958
|
+
}
|
|
3959
|
+
const delayMs = this.serverRetryMs ?? backoffDelayMs(this.reconnectAttempt);
|
|
3960
|
+
this.emit("reconnecting", { attempt: this.reconnectAttempt, delayMs });
|
|
3961
|
+
await sleep2(delayMs);
|
|
3962
|
+
if (this.closed || signal.aborted) {
|
|
3963
|
+
return;
|
|
3964
|
+
}
|
|
3965
|
+
}
|
|
3966
|
+
}
|
|
3967
|
+
async consume(signal) {
|
|
3968
|
+
const { headers: authHeaders } = await this.auth.credentials();
|
|
3969
|
+
const headers = {
|
|
3970
|
+
accept: "text/event-stream",
|
|
3971
|
+
...authHeaders,
|
|
3972
|
+
[SDK_HEADER_NAME]: SDK_HEADER_VALUE
|
|
3973
|
+
};
|
|
3974
|
+
if (this.lastEventId !== void 0) {
|
|
3975
|
+
headers["Last-Event-ID"] = this.lastEventId;
|
|
3976
|
+
}
|
|
3977
|
+
const response = await this.fetchImpl(this.url, { headers, signal });
|
|
3978
|
+
if (!response.ok || !response.body) {
|
|
3979
|
+
const retryable = response.status >= 500;
|
|
3980
|
+
const message = `SSE connection failed with status ${response.status}`;
|
|
3981
|
+
if (retryable) {
|
|
3982
|
+
throw new Error(message);
|
|
3983
|
+
}
|
|
3984
|
+
throw new TerminalStreamError(message);
|
|
3985
|
+
}
|
|
3986
|
+
const parser = new SseParser();
|
|
3987
|
+
const decoder = new TextDecoder();
|
|
3988
|
+
const reader = response.body.getReader();
|
|
3989
|
+
for (; ; ) {
|
|
3990
|
+
const { done, value } = await reader.read();
|
|
3991
|
+
if (done) {
|
|
3992
|
+
return;
|
|
3993
|
+
}
|
|
3994
|
+
for (const message of parser.feed(decoder.decode(value, { stream: true }))) {
|
|
3995
|
+
if (message.retryMs !== void 0) {
|
|
3996
|
+
this.serverRetryMs = message.retryMs;
|
|
3997
|
+
}
|
|
3998
|
+
if (message.event === "" && message.data === "") {
|
|
3999
|
+
continue;
|
|
4000
|
+
}
|
|
4001
|
+
this.dispatch(message.event, message.id, message.data);
|
|
4002
|
+
}
|
|
4003
|
+
}
|
|
4004
|
+
}
|
|
4005
|
+
dispatch(event, id, raw) {
|
|
4006
|
+
let data = raw;
|
|
4007
|
+
try {
|
|
4008
|
+
data = JSON.parse(raw);
|
|
4009
|
+
} catch {
|
|
4010
|
+
}
|
|
4011
|
+
if (id !== void 0) {
|
|
4012
|
+
this.lastEventId = id;
|
|
4013
|
+
}
|
|
4014
|
+
switch (event) {
|
|
4015
|
+
case "connected":
|
|
4016
|
+
this.reconnectAttempt = 0;
|
|
4017
|
+
this.emit("connected", data);
|
|
4018
|
+
return;
|
|
4019
|
+
case "quota_exceeded":
|
|
4020
|
+
this.emit("quota_exceeded", data);
|
|
4021
|
+
this.emitClose("quota_exceeded");
|
|
4022
|
+
this.close();
|
|
4023
|
+
return;
|
|
4024
|
+
case "error": {
|
|
4025
|
+
const message = typeof data === "object" && data !== null && "error" in data ? String(data.error) : raw;
|
|
4026
|
+
this.emit("error", new Error(message));
|
|
4027
|
+
return;
|
|
4028
|
+
}
|
|
4029
|
+
default:
|
|
4030
|
+
if (!CONTROL_EVENTS.has(event)) {
|
|
4031
|
+
this.emit("message", { type: event, id, data });
|
|
4032
|
+
}
|
|
4033
|
+
}
|
|
4034
|
+
}
|
|
4035
|
+
};
|
|
4036
|
+
var TerminalStreamError = class extends Error {
|
|
4037
|
+
};
|
|
4038
|
+
function sleep2(ms) {
|
|
4039
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
4040
|
+
}
|
|
4041
|
+
|
|
4042
|
+
// src/warp/ws.ts
|
|
4043
|
+
init_auth();
|
|
4044
|
+
init_network();
|
|
4045
|
+
var WarpWebSocketStream = class extends Emitter {
|
|
4046
|
+
lastEventId;
|
|
4047
|
+
options;
|
|
4048
|
+
auth;
|
|
4049
|
+
wsCtor;
|
|
4050
|
+
ws;
|
|
4051
|
+
reconnectAttempt = 0;
|
|
4052
|
+
closed = false;
|
|
4053
|
+
constructor(options) {
|
|
4054
|
+
super();
|
|
4055
|
+
this.options = options;
|
|
4056
|
+
this.auth = authFromOptions(options, "WarpWebSocketStream");
|
|
4057
|
+
const ctor = options.webSocket ?? globalThis.WebSocket;
|
|
4058
|
+
if (!ctor) {
|
|
4059
|
+
throw new Error(
|
|
4060
|
+
"No WebSocket implementation available \u2014 pass one via the webSocket option"
|
|
4061
|
+
);
|
|
4062
|
+
}
|
|
4063
|
+
this.wsCtor = ctor;
|
|
4064
|
+
this.lastEventId = options.lastEventId;
|
|
4065
|
+
}
|
|
4066
|
+
connect() {
|
|
4067
|
+
if (this.ws) {
|
|
4068
|
+
return;
|
|
4069
|
+
}
|
|
4070
|
+
this.closed = false;
|
|
4071
|
+
this.open();
|
|
4072
|
+
}
|
|
4073
|
+
close() {
|
|
4074
|
+
this.closed = true;
|
|
4075
|
+
this.ws?.close(1e3, "client closed");
|
|
4076
|
+
this.ws = void 0;
|
|
4077
|
+
}
|
|
4078
|
+
/** Acknowledge an event by ID (only needed with autoAck: false). */
|
|
4079
|
+
ack(id) {
|
|
4080
|
+
this.ws?.send(JSON.stringify({ type: "ack", id }));
|
|
4081
|
+
}
|
|
4082
|
+
/** Iterate data events; ends when the stream closes (throws unless client-initiated). */
|
|
4083
|
+
[Symbol.asyncIterator]() {
|
|
4084
|
+
return iterateStream(this);
|
|
4085
|
+
}
|
|
4086
|
+
buildUrl(authParams) {
|
|
4087
|
+
const base = this.options.url ?? warpWebSocketUrl(
|
|
4088
|
+
this.options.network ?? "mainnet",
|
|
4089
|
+
this.options.subscriptionId
|
|
4090
|
+
);
|
|
4091
|
+
const url = new URL(base);
|
|
4092
|
+
for (const [key, value] of Object.entries(authParams)) {
|
|
4093
|
+
url.searchParams.set(key, value);
|
|
4094
|
+
}
|
|
4095
|
+
if (this.options.mode !== void 0) {
|
|
4096
|
+
url.searchParams.set("mode", this.options.mode);
|
|
4097
|
+
}
|
|
4098
|
+
if (this.lastEventId !== void 0) {
|
|
4099
|
+
url.searchParams.set("lastEventId", this.lastEventId);
|
|
4100
|
+
}
|
|
4101
|
+
return url.toString();
|
|
4102
|
+
}
|
|
4103
|
+
open() {
|
|
4104
|
+
const credentials = this.auth.staticCredentials();
|
|
4105
|
+
if (credentials) {
|
|
4106
|
+
this.openWith(credentials.queryParams);
|
|
4107
|
+
return;
|
|
4108
|
+
}
|
|
4109
|
+
void this.auth.credentials().then(
|
|
4110
|
+
(resolved) => {
|
|
4111
|
+
if (!this.closed && !this.ws) {
|
|
4112
|
+
this.openWith(resolved.queryParams);
|
|
4113
|
+
}
|
|
4114
|
+
},
|
|
4115
|
+
(error) => {
|
|
4116
|
+
this.failTerminally(
|
|
4117
|
+
error instanceof Error ? error : new Error(String(error)),
|
|
4118
|
+
"credential resolution failed"
|
|
4119
|
+
);
|
|
4120
|
+
}
|
|
4121
|
+
);
|
|
4122
|
+
}
|
|
4123
|
+
failTerminally(error, reason) {
|
|
4124
|
+
this.closed = true;
|
|
4125
|
+
this.emit("error", error);
|
|
4126
|
+
this.emit("close", { reason });
|
|
4127
|
+
}
|
|
4128
|
+
openWith(authParams) {
|
|
4129
|
+
if (!authParams) {
|
|
4130
|
+
this.failTerminally(
|
|
4131
|
+
new Error(
|
|
4132
|
+
"These credentials cannot authenticate a WebSocket (no header support on upgrades) \u2014 use an API key or the SSE stream"
|
|
4133
|
+
),
|
|
4134
|
+
"unsupported credentials"
|
|
4135
|
+
);
|
|
4136
|
+
return;
|
|
4137
|
+
}
|
|
4138
|
+
const ws = new this.wsCtor(this.buildUrl(authParams));
|
|
4139
|
+
this.ws = ws;
|
|
4140
|
+
ws.addEventListener("message", (event) => {
|
|
4141
|
+
this.handleMessage(event);
|
|
4142
|
+
});
|
|
4143
|
+
ws.addEventListener("error", () => {
|
|
4144
|
+
this.emit("error", new Error("WebSocket transport error"));
|
|
4145
|
+
});
|
|
4146
|
+
ws.addEventListener("close", (event) => {
|
|
4147
|
+
if (this.ws !== ws) {
|
|
4148
|
+
return;
|
|
4149
|
+
}
|
|
4150
|
+
this.ws = void 0;
|
|
4151
|
+
this.handleClose(event.code, event.reason);
|
|
4152
|
+
});
|
|
4153
|
+
}
|
|
4154
|
+
handleMessage(event) {
|
|
4155
|
+
let parsed;
|
|
4156
|
+
try {
|
|
4157
|
+
parsed = JSON.parse(
|
|
4158
|
+
typeof event.data === "string" ? event.data : String(event.data)
|
|
4159
|
+
);
|
|
4160
|
+
} catch {
|
|
4161
|
+
this.emit("error", new Error("Received malformed WebSocket message"));
|
|
4162
|
+
return;
|
|
4163
|
+
}
|
|
4164
|
+
const type = typeof parsed.event === "string" ? parsed.event : "message";
|
|
4165
|
+
const id = typeof parsed.id === "string" ? parsed.id : void 0;
|
|
4166
|
+
switch (type) {
|
|
4167
|
+
case "connected":
|
|
4168
|
+
this.reconnectAttempt = 0;
|
|
4169
|
+
this.emit("connected", parsed.data);
|
|
4170
|
+
return;
|
|
4171
|
+
case "quota_exceeded":
|
|
4172
|
+
this.emit("quota_exceeded", parsed.data);
|
|
4173
|
+
return;
|
|
4174
|
+
// server closes with 1008; handleClose makes it terminal
|
|
4175
|
+
case "error": {
|
|
4176
|
+
const message = typeof parsed.data === "object" && parsed.data !== null && "error" in parsed.data ? String(parsed.data.error) : "Server error";
|
|
4177
|
+
this.emit("error", new Error(message));
|
|
4178
|
+
return;
|
|
4179
|
+
}
|
|
4180
|
+
default: {
|
|
4181
|
+
if (id !== void 0) {
|
|
4182
|
+
this.lastEventId = id;
|
|
4183
|
+
}
|
|
4184
|
+
const handlersSucceeded = this.emit("message", {
|
|
4185
|
+
type,
|
|
4186
|
+
id,
|
|
4187
|
+
data: parsed.data
|
|
4188
|
+
});
|
|
4189
|
+
if ((this.options.autoAck ?? true) && id !== void 0) {
|
|
4190
|
+
if (handlersSucceeded) {
|
|
4191
|
+
this.ack(id);
|
|
4192
|
+
} else {
|
|
4193
|
+
this.emit(
|
|
4194
|
+
"error",
|
|
4195
|
+
new Error(
|
|
4196
|
+
`Message handler threw; event ${id} not acked and will be redelivered`
|
|
4197
|
+
)
|
|
4198
|
+
);
|
|
4199
|
+
}
|
|
4200
|
+
}
|
|
4201
|
+
}
|
|
4202
|
+
}
|
|
4203
|
+
}
|
|
4204
|
+
handleClose(code, reason) {
|
|
4205
|
+
if (this.closed) {
|
|
4206
|
+
this.emit("close", { reason: "client closed" });
|
|
4207
|
+
return;
|
|
4208
|
+
}
|
|
4209
|
+
if (code === 1008) {
|
|
4210
|
+
this.emit("close", { reason: reason || "policy violation" });
|
|
4211
|
+
this.closed = true;
|
|
4212
|
+
return;
|
|
4213
|
+
}
|
|
4214
|
+
if (!(this.options.reconnect ?? true)) {
|
|
4215
|
+
this.emit("close", { reason: reason || "disconnected" });
|
|
4216
|
+
this.closed = true;
|
|
4217
|
+
return;
|
|
4218
|
+
}
|
|
4219
|
+
this.reconnectAttempt += 1;
|
|
4220
|
+
if (this.reconnectAttempt > (this.options.maxReconnectAttempts ?? 10)) {
|
|
4221
|
+
this.emit("close", { reason: "max reconnect attempts exceeded" });
|
|
4222
|
+
this.closed = true;
|
|
4223
|
+
return;
|
|
4224
|
+
}
|
|
4225
|
+
const delayMs = backoffDelayMs(this.reconnectAttempt);
|
|
4226
|
+
this.emit("reconnecting", { attempt: this.reconnectAttempt, delayMs });
|
|
4227
|
+
setTimeout(() => {
|
|
4228
|
+
if (!this.closed && !this.ws) {
|
|
4229
|
+
this.open();
|
|
4230
|
+
}
|
|
4231
|
+
}, delayMs);
|
|
4232
|
+
}
|
|
4233
|
+
};
|
|
4234
|
+
|
|
4235
|
+
// src/namespaces/warp.ts
|
|
4236
|
+
var WarpNamespace = class {
|
|
4237
|
+
ctx;
|
|
4238
|
+
constructor(ctx) {
|
|
4239
|
+
this.ctx = ctx;
|
|
4240
|
+
}
|
|
4241
|
+
createEventStream(input) {
|
|
4242
|
+
return this.ctx.http.request("POST", "/warp/events", { body: input });
|
|
4243
|
+
}
|
|
4244
|
+
createAddressStream(input) {
|
|
4245
|
+
return this.ctx.http.request("POST", "/warp/addresses", { body: input });
|
|
4246
|
+
}
|
|
4247
|
+
createCoinStream(input) {
|
|
4248
|
+
return this.ctx.http.request("POST", "/warp/coins", { body: input });
|
|
4249
|
+
}
|
|
4250
|
+
createObjectStream(input) {
|
|
4251
|
+
return this.ctx.http.request("POST", "/warp/objects", { body: input });
|
|
4252
|
+
}
|
|
4253
|
+
list() {
|
|
4254
|
+
return this.ctx.http.request("GET", "/warp");
|
|
4255
|
+
}
|
|
4256
|
+
get(id) {
|
|
4257
|
+
return this.ctx.http.request("GET", `/warp/${encodeURIComponent(id)}`);
|
|
4258
|
+
}
|
|
4259
|
+
update(id, input) {
|
|
4260
|
+
return this.ctx.http.request("PUT", `/warp/${encodeURIComponent(id)}`, {
|
|
4261
|
+
body: input
|
|
4262
|
+
});
|
|
4263
|
+
}
|
|
4264
|
+
delete(id) {
|
|
4265
|
+
return this.ctx.http.request("DELETE", `/warp/${encodeURIComponent(id)}`);
|
|
4266
|
+
}
|
|
4267
|
+
/**
|
|
4268
|
+
* Open an SSE connection to a Warp subscription and start it.
|
|
4269
|
+
* At-least-once delivery; reconnects resume from the last event ID.
|
|
4270
|
+
*/
|
|
4271
|
+
connect(subscriptionId, options = {}) {
|
|
4272
|
+
const stream = new WarpSseStream({
|
|
4273
|
+
...options,
|
|
4274
|
+
auth: this.ctx.auth,
|
|
4275
|
+
subscriptionId,
|
|
4276
|
+
network: this.ctx.network,
|
|
4277
|
+
url: options.url ?? this.sseUrl(subscriptionId),
|
|
4278
|
+
fetch: options.fetch ?? this.ctx.fetch
|
|
4279
|
+
});
|
|
4280
|
+
stream.connect();
|
|
4281
|
+
return stream;
|
|
4282
|
+
}
|
|
4283
|
+
/**
|
|
4284
|
+
* Open a WebSocket connection to a Warp subscription and start it.
|
|
4285
|
+
* Exactly-once delivery via acks (automatic by default).
|
|
4286
|
+
*/
|
|
4287
|
+
connectWebSocket(subscriptionId, options = {}) {
|
|
4288
|
+
const stream = new WarpWebSocketStream({
|
|
4289
|
+
...options,
|
|
4290
|
+
auth: this.ctx.auth,
|
|
4291
|
+
subscriptionId,
|
|
4292
|
+
network: this.ctx.network,
|
|
4293
|
+
url: options.url ?? this.wsUrl(subscriptionId)
|
|
4294
|
+
});
|
|
4295
|
+
stream.connect();
|
|
4296
|
+
return stream;
|
|
4297
|
+
}
|
|
4298
|
+
/**
|
|
4299
|
+
* One call from catalog id to typed live events: resolves the event's
|
|
4300
|
+
* canonical type for this network, creates the subscription, connects,
|
|
4301
|
+
* and yields validated payloads.
|
|
4302
|
+
*
|
|
4303
|
+
* ```ts
|
|
4304
|
+
* const swaps = await inodra.warp.streamCatalogEvent("cetus.swap", {
|
|
4305
|
+
* ephemeral: true,
|
|
4306
|
+
* });
|
|
4307
|
+
* for await (const { payload, envelope } of swaps) {
|
|
4308
|
+
* console.log(envelope.txDigest, payload.amount_in);
|
|
4309
|
+
* }
|
|
4310
|
+
* ```
|
|
4311
|
+
*/
|
|
4312
|
+
async streamCatalogEvent(id, options = {}) {
|
|
4313
|
+
const events = await Promise.resolve().then(() => (init_events2(), events_exports));
|
|
4314
|
+
const event = events.catalogEvents[id];
|
|
4315
|
+
if (!event) {
|
|
4316
|
+
throw new Error(`Unknown catalog event id: ${String(id)}`);
|
|
4317
|
+
}
|
|
4318
|
+
const deployments = event.deployments;
|
|
4319
|
+
const deployment = deployments.find(
|
|
4320
|
+
(d) => d.network === this.ctx.network && d.primary
|
|
4321
|
+
) ?? deployments.find((d) => d.network === this.ctx.network);
|
|
4322
|
+
if (!deployment) {
|
|
4323
|
+
throw new Error(
|
|
4324
|
+
`Catalog event ${String(id)} has no verified deployment on ${this.ctx.network}`
|
|
4325
|
+
);
|
|
4326
|
+
}
|
|
4327
|
+
const { sender, eventFieldFilters, transport, ephemeral, ...connectOptions } = options;
|
|
4328
|
+
const created = await this.createEventStream({
|
|
4329
|
+
eventType: deployment.eventType,
|
|
4330
|
+
sender,
|
|
4331
|
+
eventFieldFilters
|
|
4332
|
+
});
|
|
4333
|
+
const subscription = created.data;
|
|
4334
|
+
let stream;
|
|
4335
|
+
try {
|
|
4336
|
+
stream = transport === "ws" ? this.connectWebSocket(subscription.id, connectOptions) : this.connect(subscription.id, connectOptions);
|
|
4337
|
+
} catch (error) {
|
|
4338
|
+
if (ephemeral) {
|
|
4339
|
+
await this.delete(subscription.id).catch(() => {
|
|
4340
|
+
});
|
|
4341
|
+
}
|
|
4342
|
+
throw error;
|
|
4343
|
+
}
|
|
4344
|
+
let cleaned = false;
|
|
4345
|
+
const close = async () => {
|
|
4346
|
+
stream.close();
|
|
4347
|
+
if (ephemeral && !cleaned) {
|
|
4348
|
+
cleaned = true;
|
|
4349
|
+
await this.delete(subscription.id);
|
|
4350
|
+
}
|
|
4351
|
+
};
|
|
4352
|
+
const network = this.ctx.network;
|
|
4353
|
+
return {
|
|
4354
|
+
subscription,
|
|
4355
|
+
stream,
|
|
4356
|
+
close,
|
|
4357
|
+
async *[Symbol.asyncIterator]() {
|
|
4358
|
+
try {
|
|
4359
|
+
for await (const raw of iterateStream(stream, {
|
|
4360
|
+
closeOnReturn: false
|
|
4361
|
+
})) {
|
|
4362
|
+
const payload = events.parseCatalogEvent(raw, id, { network });
|
|
4363
|
+
if (payload === void 0) {
|
|
4364
|
+
continue;
|
|
4365
|
+
}
|
|
4366
|
+
const envelope = events.warpEventPayloadSchema.parse(raw.data);
|
|
4367
|
+
yield { payload, envelope };
|
|
4368
|
+
}
|
|
4369
|
+
} finally {
|
|
4370
|
+
await close();
|
|
4371
|
+
}
|
|
4372
|
+
}
|
|
4373
|
+
};
|
|
4374
|
+
}
|
|
4375
|
+
sseUrl(subscriptionId) {
|
|
4376
|
+
if (!this.ctx.restBaseUrl) {
|
|
4377
|
+
return void 0;
|
|
4378
|
+
}
|
|
4379
|
+
return `${this.ctx.restBaseUrl}/warp/${encodeURIComponent(subscriptionId)}/stream`;
|
|
4380
|
+
}
|
|
4381
|
+
wsUrl(subscriptionId) {
|
|
4382
|
+
if (!this.ctx.warpWsBaseUrl) {
|
|
4383
|
+
return void 0;
|
|
4384
|
+
}
|
|
4385
|
+
return `${this.ctx.warpWsBaseUrl}/warp/${encodeURIComponent(subscriptionId)}/ws`;
|
|
4386
|
+
}
|
|
4387
|
+
};
|
|
4388
|
+
|
|
4389
|
+
// src/webhooks/index.ts
|
|
4390
|
+
async function verifyWebhookSignature(options) {
|
|
4391
|
+
const parsed = parseSignatureHeader(options.signature);
|
|
4392
|
+
if (!parsed) {
|
|
4393
|
+
return false;
|
|
4394
|
+
}
|
|
4395
|
+
const now = options.now ?? Math.floor(Date.now() / 1e3);
|
|
4396
|
+
const tolerance = options.toleranceSeconds ?? 300;
|
|
4397
|
+
if (Math.abs(now - parsed.timestamp) > tolerance) {
|
|
4398
|
+
return false;
|
|
4399
|
+
}
|
|
4400
|
+
const expected = await hmacSha256Hex(
|
|
4401
|
+
options.secret,
|
|
4402
|
+
`${parsed.timestamp}.${options.payload}`
|
|
4403
|
+
);
|
|
4404
|
+
return parsed.signatures.some(
|
|
4405
|
+
(candidate) => timingSafeEqualHex(candidate, expected)
|
|
4406
|
+
);
|
|
4407
|
+
}
|
|
4408
|
+
function parseSignatureHeader(header2) {
|
|
4409
|
+
if (typeof header2 !== "string" || header2.length === 0) {
|
|
4410
|
+
return void 0;
|
|
4411
|
+
}
|
|
4412
|
+
let timestamp;
|
|
4413
|
+
const signatures = [];
|
|
4414
|
+
for (const part of header2.split(",")) {
|
|
4415
|
+
const eq = part.indexOf("=");
|
|
4416
|
+
if (eq === -1) {
|
|
4417
|
+
continue;
|
|
4418
|
+
}
|
|
4419
|
+
const key = part.slice(0, eq).trim();
|
|
4420
|
+
const value = part.slice(eq + 1).trim();
|
|
4421
|
+
if (key === "t") {
|
|
4422
|
+
const ts = Number(value);
|
|
4423
|
+
if (Number.isInteger(ts)) {
|
|
4424
|
+
timestamp = ts;
|
|
4425
|
+
}
|
|
4426
|
+
} else if (key === "v1" && /^[0-9a-f]+$/i.test(value)) {
|
|
4427
|
+
signatures.push(value.toLowerCase());
|
|
4428
|
+
}
|
|
4429
|
+
}
|
|
4430
|
+
if (timestamp === void 0 || signatures.length === 0) {
|
|
4431
|
+
return void 0;
|
|
4432
|
+
}
|
|
4433
|
+
return { timestamp, signatures };
|
|
4434
|
+
}
|
|
4435
|
+
async function hmacSha256Hex(secret, message) {
|
|
4436
|
+
const encoder = new TextEncoder();
|
|
4437
|
+
const key = await crypto.subtle.importKey(
|
|
4438
|
+
"raw",
|
|
4439
|
+
encoder.encode(secret),
|
|
4440
|
+
{ name: "HMAC", hash: "SHA-256" },
|
|
4441
|
+
false,
|
|
4442
|
+
["sign"]
|
|
4443
|
+
);
|
|
4444
|
+
const signature = await crypto.subtle.sign(
|
|
4445
|
+
"HMAC",
|
|
4446
|
+
key,
|
|
4447
|
+
encoder.encode(message)
|
|
4448
|
+
);
|
|
4449
|
+
return Array.from(
|
|
4450
|
+
new Uint8Array(signature),
|
|
4451
|
+
(byte) => byte.toString(16).padStart(2, "0")
|
|
4452
|
+
).join("");
|
|
4453
|
+
}
|
|
4454
|
+
function timingSafeEqualHex(a, b) {
|
|
4455
|
+
if (a.length !== b.length) {
|
|
4456
|
+
return false;
|
|
4457
|
+
}
|
|
4458
|
+
let diff = 0;
|
|
4459
|
+
for (let i = 0; i < a.length; i++) {
|
|
4460
|
+
diff |= a.charCodeAt(i) ^ b.charCodeAt(i);
|
|
4461
|
+
}
|
|
4462
|
+
return diff === 0;
|
|
4463
|
+
}
|
|
4464
|
+
|
|
4465
|
+
// src/namespaces/webhooks.ts
|
|
4466
|
+
var WebhooksNamespace = class {
|
|
4467
|
+
http;
|
|
4468
|
+
constructor(http) {
|
|
4469
|
+
this.http = http;
|
|
4470
|
+
}
|
|
4471
|
+
createEvent(input) {
|
|
4472
|
+
return this.http.request("POST", "/webhooks/events", { body: input });
|
|
4473
|
+
}
|
|
4474
|
+
createAddress(input) {
|
|
4475
|
+
return this.http.request("POST", "/webhooks/addresses", { body: input });
|
|
4476
|
+
}
|
|
4477
|
+
createCoin(input) {
|
|
4478
|
+
return this.http.request("POST", "/webhooks/coins", { body: input });
|
|
4479
|
+
}
|
|
4480
|
+
createObject(input) {
|
|
4481
|
+
return this.http.request("POST", "/webhooks/objects", { body: input });
|
|
4482
|
+
}
|
|
4483
|
+
list() {
|
|
4484
|
+
return this.http.request("GET", "/webhooks");
|
|
4485
|
+
}
|
|
4486
|
+
get(id) {
|
|
4487
|
+
return this.http.request("GET", `/webhooks/${encodeURIComponent(id)}`);
|
|
4488
|
+
}
|
|
4489
|
+
update(id, input) {
|
|
4490
|
+
return this.http.request("PUT", `/webhooks/${encodeURIComponent(id)}`, {
|
|
4491
|
+
body: input
|
|
4492
|
+
});
|
|
4493
|
+
}
|
|
4494
|
+
delete(id) {
|
|
4495
|
+
return this.http.request("DELETE", `/webhooks/${encodeURIComponent(id)}`);
|
|
4496
|
+
}
|
|
4497
|
+
/** Verify an incoming webhook delivery's X-Inodra-Signature header. */
|
|
4498
|
+
verifySignature(options) {
|
|
4499
|
+
return verifyWebhookSignature(options);
|
|
4500
|
+
}
|
|
4501
|
+
/**
|
|
4502
|
+
* Verify and parse an incoming event-webhook delivery in one step
|
|
4503
|
+
* (Stripe's constructEvent pattern). Throws InodraWebhookSignatureError
|
|
4504
|
+
* on a bad or expired signature, and a zod error if the body doesn't
|
|
4505
|
+
* look like an Inodra delivery.
|
|
4506
|
+
*
|
|
4507
|
+
* Pair with `matchCatalogEvent`/`parseCatalogEvent` from
|
|
4508
|
+
* `@inodra/sui/events` to narrow the payload to a catalog event type.
|
|
4509
|
+
*
|
|
4510
|
+
* ```ts
|
|
4511
|
+
* const body = await inodra.webhooks.constructEvent({
|
|
4512
|
+
* payload: rawBody, // exact raw string — do not JSON.parse first
|
|
4513
|
+
* signature: req.headers["x-inodra-signature"],
|
|
4514
|
+
* secret: process.env.INODRA_WEBHOOK_SECRET,
|
|
4515
|
+
* });
|
|
4516
|
+
* const swap = parseCatalogEvent(body, "cetus.swap");
|
|
4517
|
+
* ```
|
|
4518
|
+
*/
|
|
4519
|
+
async constructEvent(options) {
|
|
4520
|
+
const valid = await verifyWebhookSignature(options);
|
|
4521
|
+
if (!valid) {
|
|
4522
|
+
throw new InodraWebhookSignatureError();
|
|
4523
|
+
}
|
|
4524
|
+
const { webhookEventBodySchema: webhookEventBodySchema2 } = await Promise.resolve().then(() => (init_runtime(), runtime_exports));
|
|
4525
|
+
return webhookEventBodySchema2.parse(JSON.parse(options.payload));
|
|
4526
|
+
}
|
|
4527
|
+
};
|
|
4528
|
+
|
|
4529
|
+
// src/client.ts
|
|
4530
|
+
var Inodra = class {
|
|
4531
|
+
network;
|
|
4532
|
+
/** The underlying REST transport (shared by all REST namespaces). */
|
|
4533
|
+
http;
|
|
4534
|
+
options;
|
|
4535
|
+
auth;
|
|
4536
|
+
memo = /* @__PURE__ */ new Map();
|
|
4537
|
+
constructor(options) {
|
|
4538
|
+
authFromOptions(options, "Inodra");
|
|
4539
|
+
this.options = options;
|
|
4540
|
+
this.auth = options.auth ?? { apiKey: options.apiKey };
|
|
4541
|
+
this.network = options.network ?? "mainnet";
|
|
4542
|
+
this.http = new InodraHttpClient({
|
|
4543
|
+
auth: this.auth,
|
|
4544
|
+
network: this.network,
|
|
4545
|
+
baseUrl: options.endpoints?.rest,
|
|
4546
|
+
maxRetries: options.maxRetries,
|
|
4547
|
+
timeoutMs: options.timeoutMs,
|
|
4548
|
+
fetch: options.fetch,
|
|
4549
|
+
onResponseMeta: options.onResponseMeta
|
|
4550
|
+
});
|
|
4551
|
+
}
|
|
4552
|
+
/** Rate-limit/credit info from the most recent REST response. */
|
|
4553
|
+
get lastResponseMeta() {
|
|
4554
|
+
return this.http.lastResponseMeta;
|
|
4555
|
+
}
|
|
4556
|
+
/**
|
|
4557
|
+
* Sui gRPC client (@mysten/sui) over Inodra's authenticated gateway.
|
|
4558
|
+
* Uses a fetch-based gRPC-Web transport — works in browsers, edge
|
|
4559
|
+
* runtimes, and Node. For native HTTP/2 gRPC on Node, use
|
|
4560
|
+
* `@inodra/sui/node`.
|
|
4561
|
+
*/
|
|
4562
|
+
get grpc() {
|
|
4563
|
+
return this.lazy("grpc", () => this.createGrpcClient());
|
|
4564
|
+
}
|
|
4565
|
+
/** Sui GraphQL client (@mysten/sui) over Inodra's authenticated gateway. */
|
|
4566
|
+
get graphql() {
|
|
4567
|
+
return this.lazy(
|
|
4568
|
+
"graphql",
|
|
4569
|
+
() => createInodraGraphQLClient({
|
|
4570
|
+
auth: this.auth,
|
|
4571
|
+
network: this.network,
|
|
4572
|
+
url: this.options.endpoints?.graphql
|
|
4573
|
+
})
|
|
4574
|
+
);
|
|
4575
|
+
}
|
|
4576
|
+
/** Warp streams: subscription CRUD + live SSE/WebSocket delivery. */
|
|
4577
|
+
get warp() {
|
|
4578
|
+
return this.lazy(
|
|
4579
|
+
"warp",
|
|
4580
|
+
() => new WarpNamespace({
|
|
4581
|
+
http: this.http,
|
|
4582
|
+
auth: this.auth,
|
|
4583
|
+
network: this.network,
|
|
4584
|
+
restBaseUrl: this.options.endpoints?.rest,
|
|
4585
|
+
warpWsBaseUrl: this.options.endpoints?.warpWs,
|
|
4586
|
+
fetch: this.options.fetch
|
|
4587
|
+
})
|
|
4588
|
+
);
|
|
4589
|
+
}
|
|
4590
|
+
/** Webhooks: subscription CRUD + delivery signature verification. */
|
|
4591
|
+
get webhooks() {
|
|
4592
|
+
return this.lazy("webhooks", () => new WebhooksNamespace(this.http));
|
|
4593
|
+
}
|
|
4594
|
+
/** Indexer-backed data: accounts, coins, packages, validators, SuiNS, …. */
|
|
4595
|
+
get data() {
|
|
4596
|
+
return this.lazy("data", () => new DataNamespace(this.http));
|
|
4597
|
+
}
|
|
4598
|
+
/** Curated protocol event catalog (live view). */
|
|
4599
|
+
get catalog() {
|
|
4600
|
+
return this.lazy("catalog", () => new CatalogNamespace(this.http));
|
|
4601
|
+
}
|
|
4602
|
+
/** The authenticated principal: key introspection + usage stats. */
|
|
4603
|
+
get account() {
|
|
4604
|
+
return this.lazy("account", () => new AccountNamespace(this.http));
|
|
4605
|
+
}
|
|
4606
|
+
/** Reflection-based typed payloads for arbitrary (uncataloged) events. */
|
|
4607
|
+
get events() {
|
|
4608
|
+
return this.lazy(
|
|
4609
|
+
"events",
|
|
4610
|
+
() => new EventsNamespace({
|
|
4611
|
+
auth: this.auth,
|
|
4612
|
+
network: this.network,
|
|
4613
|
+
graphqlUrl: this.options.endpoints?.graphql,
|
|
4614
|
+
fetch: this.options.fetch
|
|
4615
|
+
})
|
|
4616
|
+
);
|
|
4617
|
+
}
|
|
4618
|
+
/** Default endpoints for this client's network. */
|
|
4619
|
+
get endpoints() {
|
|
4620
|
+
return INODRA_ENDPOINTS[this.network];
|
|
4621
|
+
}
|
|
4622
|
+
createGrpcClient() {
|
|
4623
|
+
return createInodraGrpcWebClient({
|
|
4624
|
+
auth: this.auth,
|
|
4625
|
+
network: this.network,
|
|
4626
|
+
baseUrl: this.options.endpoints?.grpcWeb
|
|
4627
|
+
});
|
|
4628
|
+
}
|
|
4629
|
+
lazy(key, create) {
|
|
4630
|
+
let value = this.memo.get(key);
|
|
4631
|
+
if (value === void 0) {
|
|
4632
|
+
value = create();
|
|
4633
|
+
this.memo.set(key, value);
|
|
4634
|
+
}
|
|
4635
|
+
return value;
|
|
4636
|
+
}
|
|
4637
|
+
};
|
|
4638
|
+
|
|
4639
|
+
// src/grpc/index.ts
|
|
4640
|
+
var import_grpc_js = require("@grpc/grpc-js");
|
|
4641
|
+
var import_grpc3 = require("@mysten/sui/grpc");
|
|
4642
|
+
var import_grpc_transport = require("@protobuf-ts/grpc-transport");
|
|
4643
|
+
init_auth();
|
|
4644
|
+
init_network();
|
|
4645
|
+
init_version();
|
|
4646
|
+
var import_grpc4 = require("@mysten/sui/grpc");
|
|
4647
|
+
function createInodraGrpcClient(options) {
|
|
4648
|
+
const network = options.network ?? "mainnet";
|
|
4649
|
+
const transport = new import_grpc_transport.GrpcTransport({
|
|
4650
|
+
host: options.host ?? grpcHost(network),
|
|
4651
|
+
channelCredentials: options.channelCredentials ?? import_grpc_js.ChannelCredentials.createSsl(),
|
|
4652
|
+
meta: {
|
|
4653
|
+
...staticAuthHeaders(options, "createInodraGrpcClient"),
|
|
4654
|
+
[SDK_HEADER_NAME]: SDK_HEADER_VALUE,
|
|
4655
|
+
...options.metadata
|
|
4656
|
+
}
|
|
4657
|
+
});
|
|
4658
|
+
return new import_grpc3.SuiGrpcClient({ network, transport });
|
|
4659
|
+
}
|
|
4660
|
+
|
|
4661
|
+
// src/index.ts
|
|
4662
|
+
init_auth();
|
|
4663
|
+
init_network();
|
|
4664
|
+
init_version();
|
|
4665
|
+
|
|
4666
|
+
// src/manage/index.ts
|
|
4667
|
+
var InodraManagementClient = class {
|
|
4668
|
+
http;
|
|
4669
|
+
constructor(options) {
|
|
4670
|
+
this.http = new InodraHttpClient(options);
|
|
4671
|
+
}
|
|
4672
|
+
webhooks = {
|
|
4673
|
+
createEvent: (input) => this.http.request("POST", "/webhooks/events", {
|
|
4674
|
+
body: input
|
|
4675
|
+
}),
|
|
4676
|
+
createAddress: (input) => this.http.request("POST", "/webhooks/addresses", {
|
|
4677
|
+
body: input
|
|
4678
|
+
}),
|
|
4679
|
+
createCoin: (input) => this.http.request("POST", "/webhooks/coins", {
|
|
4680
|
+
body: input
|
|
4681
|
+
}),
|
|
4682
|
+
createObject: (input) => this.http.request("POST", "/webhooks/objects", {
|
|
4683
|
+
body: input
|
|
4684
|
+
}),
|
|
4685
|
+
list: () => this.http.request("GET", "/webhooks"),
|
|
4686
|
+
get: (id) => this.http.request("GET", `/webhooks/${encodeURIComponent(id)}`),
|
|
4687
|
+
update: (id, input) => this.http.request(
|
|
4688
|
+
"PUT",
|
|
4689
|
+
`/webhooks/${encodeURIComponent(id)}`,
|
|
4690
|
+
{ body: input }
|
|
4691
|
+
),
|
|
4692
|
+
delete: (id) => this.http.request(
|
|
4693
|
+
"DELETE",
|
|
4694
|
+
`/webhooks/${encodeURIComponent(id)}`
|
|
4695
|
+
)
|
|
4696
|
+
};
|
|
4697
|
+
warp = {
|
|
4698
|
+
createEventStream: (input) => this.http.request("POST", "/warp/events", {
|
|
4699
|
+
body: input
|
|
4700
|
+
}),
|
|
4701
|
+
createAddressStream: (input) => this.http.request("POST", "/warp/addresses", {
|
|
4702
|
+
body: input
|
|
4703
|
+
}),
|
|
4704
|
+
createCoinStream: (input) => this.http.request("POST", "/warp/coins", {
|
|
4705
|
+
body: input
|
|
4706
|
+
}),
|
|
4707
|
+
createObjectStream: (input) => this.http.request("POST", "/warp/objects", {
|
|
4708
|
+
body: input
|
|
4709
|
+
}),
|
|
4710
|
+
list: () => this.http.request("GET", "/warp"),
|
|
4711
|
+
get: (id) => this.http.request("GET", `/warp/${encodeURIComponent(id)}`),
|
|
4712
|
+
update: (id, input) => this.http.request(
|
|
4713
|
+
"PUT",
|
|
4714
|
+
`/warp/${encodeURIComponent(id)}`,
|
|
4715
|
+
{ body: input }
|
|
4716
|
+
),
|
|
4717
|
+
delete: (id) => this.http.request(
|
|
4718
|
+
"DELETE",
|
|
4719
|
+
`/warp/${encodeURIComponent(id)}`
|
|
4720
|
+
)
|
|
4721
|
+
};
|
|
4722
|
+
};
|
|
4723
|
+
|
|
4724
|
+
// src/node.ts
|
|
4725
|
+
var Inodra2 = class extends Inodra {
|
|
4726
|
+
createGrpcClient() {
|
|
4727
|
+
return createInodraGrpcClient({
|
|
4728
|
+
auth: this.auth,
|
|
4729
|
+
network: this.network,
|
|
4730
|
+
host: this.options.endpoints?.grpc
|
|
4731
|
+
});
|
|
4732
|
+
}
|
|
4733
|
+
};
|
|
4734
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
4735
|
+
0 && (module.exports = {
|
|
4736
|
+
AccountNamespace,
|
|
4737
|
+
CatalogNamespace,
|
|
4738
|
+
DataNamespace,
|
|
4739
|
+
EventsNamespace,
|
|
4740
|
+
INODRA_ENDPOINTS,
|
|
4741
|
+
Inodra,
|
|
4742
|
+
InodraAuthenticationError,
|
|
4743
|
+
InodraError,
|
|
4744
|
+
InodraHttpClient,
|
|
4745
|
+
InodraManagementClient,
|
|
4746
|
+
InodraRateLimitError,
|
|
4747
|
+
InodraTimeoutError,
|
|
4748
|
+
InodraWebhookSignatureError,
|
|
4749
|
+
SDK_VERSION,
|
|
4750
|
+
WarpNamespace,
|
|
4751
|
+
WarpSseStream,
|
|
4752
|
+
WarpWebSocketStream,
|
|
4753
|
+
WebhooksNamespace,
|
|
4754
|
+
iterateStream,
|
|
4755
|
+
paginate,
|
|
4756
|
+
resolveAuth,
|
|
4757
|
+
verifyWebhookSignature
|
|
4758
|
+
});
|
|
4759
|
+
//# sourceMappingURL=node.cjs.map
|