@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.
@@ -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
  }
@@ -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
  }
@@ -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
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@secondlayer/shared",
3
- "version": "6.7.0",
3
+ "version": "6.8.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",