@secondlayer/shared 6.7.0 → 6.8.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/dist/src/db/index.d.ts +3 -0
- package/dist/src/db/queries/chain-reorgs.d.ts +3 -0
- package/dist/src/db/queries/integrity.d.ts +3 -0
- package/dist/src/db/queries/subgraph-gaps.d.ts +3 -0
- package/dist/src/db/queries/subgraph-operations.d.ts +3 -0
- package/dist/src/db/queries/subgraphs.d.ts +3 -0
- package/dist/src/db/queries/subscriptions.d.ts +3 -0
- package/dist/src/db/schema.d.ts +3 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/node/local-client.d.ts +3 -0
- package/migrations/0079_decoded_events_payload.ts +12 -0
- package/package.json +1 -1
package/dist/src/db/index.d.ts
CHANGED
|
@@ -305,6 +305,9 @@ interface DecodedEventsTable {
|
|
|
305
305
|
asset_identifier: string | null;
|
|
306
306
|
value: string | null;
|
|
307
307
|
memo: string | null;
|
|
308
|
+
/** Decoded payload for event types that don't fit the flat columns
|
|
309
|
+
* (e.g. `print`: { topic, value, raw_value }). Null for transfer types. */
|
|
310
|
+
payload: unknown | null;
|
|
308
311
|
source_cursor: string;
|
|
309
312
|
created_at: Generated<Date>;
|
|
310
313
|
}
|
|
@@ -286,6 +286,9 @@ interface DecodedEventsTable {
|
|
|
286
286
|
asset_identifier: string | null;
|
|
287
287
|
value: string | null;
|
|
288
288
|
memo: string | null;
|
|
289
|
+
/** Decoded payload for event types that don't fit the flat columns
|
|
290
|
+
* (e.g. `print`: { topic, value, raw_value }). Null for transfer types. */
|
|
291
|
+
payload: unknown | null;
|
|
289
292
|
source_cursor: string;
|
|
290
293
|
created_at: Generated<Date>;
|
|
291
294
|
}
|
|
@@ -287,6 +287,9 @@ interface DecodedEventsTable {
|
|
|
287
287
|
asset_identifier: string | null;
|
|
288
288
|
value: string | null;
|
|
289
289
|
memo: string | null;
|
|
290
|
+
/** Decoded payload for event types that don't fit the flat columns
|
|
291
|
+
* (e.g. `print`: { topic, value, raw_value }). Null for transfer types. */
|
|
292
|
+
payload: unknown | null;
|
|
290
293
|
source_cursor: string;
|
|
291
294
|
created_at: Generated<Date>;
|
|
292
295
|
}
|
|
@@ -287,6 +287,9 @@ interface DecodedEventsTable {
|
|
|
287
287
|
asset_identifier: string | null;
|
|
288
288
|
value: string | null;
|
|
289
289
|
memo: string | null;
|
|
290
|
+
/** Decoded payload for event types that don't fit the flat columns
|
|
291
|
+
* (e.g. `print`: { topic, value, raw_value }). Null for transfer types. */
|
|
292
|
+
payload: unknown | null;
|
|
290
293
|
source_cursor: string;
|
|
291
294
|
created_at: Generated<Date>;
|
|
292
295
|
}
|
|
@@ -287,6 +287,9 @@ interface DecodedEventsTable {
|
|
|
287
287
|
asset_identifier: string | null;
|
|
288
288
|
value: string | null;
|
|
289
289
|
memo: string | null;
|
|
290
|
+
/** Decoded payload for event types that don't fit the flat columns
|
|
291
|
+
* (e.g. `print`: { topic, value, raw_value }). Null for transfer types. */
|
|
292
|
+
payload: unknown | null;
|
|
290
293
|
source_cursor: string;
|
|
291
294
|
created_at: Generated<Date>;
|
|
292
295
|
}
|
|
@@ -287,6 +287,9 @@ interface DecodedEventsTable {
|
|
|
287
287
|
asset_identifier: string | null;
|
|
288
288
|
value: string | null;
|
|
289
289
|
memo: string | null;
|
|
290
|
+
/** Decoded payload for event types that don't fit the flat columns
|
|
291
|
+
* (e.g. `print`: { topic, value, raw_value }). Null for transfer types. */
|
|
292
|
+
payload: unknown | null;
|
|
290
293
|
source_cursor: string;
|
|
291
294
|
created_at: Generated<Date>;
|
|
292
295
|
}
|
|
@@ -287,6 +287,9 @@ interface DecodedEventsTable {
|
|
|
287
287
|
asset_identifier: string | null;
|
|
288
288
|
value: string | null;
|
|
289
289
|
memo: string | null;
|
|
290
|
+
/** Decoded payload for event types that don't fit the flat columns
|
|
291
|
+
* (e.g. `print`: { topic, value, raw_value }). Null for transfer types. */
|
|
292
|
+
payload: unknown | null;
|
|
290
293
|
source_cursor: string;
|
|
291
294
|
created_at: Generated<Date>;
|
|
292
295
|
}
|
package/dist/src/db/schema.d.ts
CHANGED
|
@@ -286,6 +286,9 @@ interface DecodedEventsTable {
|
|
|
286
286
|
asset_identifier: string | null;
|
|
287
287
|
value: string | null;
|
|
288
288
|
memo: string | null;
|
|
289
|
+
/** Decoded payload for event types that don't fit the flat columns
|
|
290
|
+
* (e.g. `print`: { topic, value, raw_value }). Null for transfer types. */
|
|
291
|
+
payload: unknown | null;
|
|
289
292
|
source_cursor: string;
|
|
290
293
|
created_at: Generated<Date>;
|
|
291
294
|
}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -286,6 +286,9 @@ interface DecodedEventsTable {
|
|
|
286
286
|
asset_identifier: string | null;
|
|
287
287
|
value: string | null;
|
|
288
288
|
memo: string | null;
|
|
289
|
+
/** Decoded payload for event types that don't fit the flat columns
|
|
290
|
+
* (e.g. `print`: { topic, value, raw_value }). Null for transfer types. */
|
|
291
|
+
payload: unknown | null;
|
|
289
292
|
source_cursor: string;
|
|
290
293
|
created_at: Generated<Date>;
|
|
291
294
|
}
|
|
@@ -287,6 +287,9 @@ interface DecodedEventsTable {
|
|
|
287
287
|
asset_identifier: string | null;
|
|
288
288
|
value: string | null;
|
|
289
289
|
memo: string | null;
|
|
290
|
+
/** Decoded payload for event types that don't fit the flat columns
|
|
291
|
+
* (e.g. `print`: { topic, value, raw_value }). Null for transfer types. */
|
|
292
|
+
payload: unknown | null;
|
|
290
293
|
source_cursor: string;
|
|
291
294
|
created_at: Generated<Date>;
|
|
292
295
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type Kysely, sql } from "kysely";
|
|
2
|
+
|
|
3
|
+
// Adds a generic JSONB column for decoded event types whose payload doesn't fit
|
|
4
|
+
// the flat transfer columns — first consumer is `print` (topic + decoded Clarity
|
|
5
|
+
// value + raw hex). Nullable; every existing transfer row leaves it null.
|
|
6
|
+
export async function up(db: Kysely<unknown>): Promise<void> {
|
|
7
|
+
await sql`ALTER TABLE decoded_events ADD COLUMN payload JSONB`.execute(db);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export async function down(db: Kysely<unknown>): Promise<void> {
|
|
11
|
+
await sql`ALTER TABLE decoded_events DROP COLUMN payload`.execute(db);
|
|
12
|
+
}
|