@secondlayer/shared 7.11.2 → 9.0.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/archive/range-digest.d.ts +16 -169
- package/dist/src/archive/semantic-digest-builder.d.ts +16 -169
- package/dist/src/archive/status.js +11 -3
- package/dist/src/archive/status.js.map +3 -3
- package/dist/src/coverage/index.d.ts +15 -169
- package/dist/src/crypto/secrets.js +22 -3
- package/dist/src/crypto/secrets.js.map +3 -3
- package/dist/src/db/index.d.ts +18 -211
- package/dist/src/db/index.js +23 -16
- package/dist/src/db/index.js.map +4 -4
- package/dist/src/db/queries/chain-reorgs.d.ts +16 -169
- package/dist/src/db/queries/chain-reorgs.js +23 -16
- package/dist/src/db/queries/chain-reorgs.js.map +4 -4
- package/dist/src/db/queries/contracts.d.ts +16 -169
- package/dist/src/db/queries/instance.d.ts +16 -169
- package/dist/src/db/queries/integrity.d.ts +16 -169
- package/dist/src/db/queries/subgraph-gaps.d.ts +16 -169
- package/dist/src/db/queries/subgraph-operations.d.ts +17 -170
- package/dist/src/db/queries/subgraph-operations.js +1 -15
- package/dist/src/db/queries/subgraph-operations.js.map +3 -3
- package/dist/src/db/queries/subgraphs.d.ts +17 -191
- package/dist/src/db/queries/subgraphs.js +30 -1068
- package/dist/src/db/queries/subgraphs.js.map +5 -12
- package/dist/src/db/queries/subscriptions.d.ts +16 -169
- package/dist/src/db/queries/subscriptions.js +22 -3
- package/dist/src/db/queries/subscriptions.js.map +3 -3
- package/dist/src/db/queries/sync-scope.d.ts +1006 -0
- package/dist/src/db/queries/sync-scope.js +116 -0
- package/dist/src/db/queries/sync-scope.js.map +10 -0
- package/dist/src/db/schema.d.ts +17 -198
- package/dist/src/errors.d.ts +1 -22
- package/dist/src/errors.js +2 -4
- package/dist/src/errors.js.map +3 -3
- package/dist/src/index.d.ts +22 -256
- package/dist/src/index.js +24 -20
- package/dist/src/index.js.map +6 -6
- package/dist/src/mode.d.ts +16 -2
- package/dist/src/mode.js +25 -4
- package/dist/src/mode.js.map +3 -3
- package/dist/src/node/local-client.d.ts +16 -169
- package/dist/src/runtime/index.d.ts +137 -18
- package/dist/src/runtime/index.js +261 -41
- package/dist/src/runtime/index.js.map +9 -7
- package/dist/src/schemas/index.d.ts +5 -25
- package/dist/src/schemas/index.js +1 -2
- package/dist/src/schemas/index.js.map +3 -3
- package/dist/src/schemas/subgraphs.d.ts +5 -25
- package/dist/src/schemas/subgraphs.js +1 -2
- package/dist/src/schemas/subgraphs.js.map +3 -3
- package/dist/src/streams-rows/index.d.ts +399 -0
- package/dist/src/streams-rows/index.js +336 -0
- package/dist/src/streams-rows/index.js.map +17 -0
- package/dist/src/subgraphs/spec.d.ts +0 -9
- package/migrations/0118_drop_retired_control_tables.ts +53 -0
- package/migrations/0119_drop_accounts_plan.ts +29 -0
- package/migrations/0120_sync_scopes.ts +42 -0
- package/package.json +10 -6
- package/dist/src/x402.d.ts +0 -47
- package/dist/src/x402.js +0 -79
- package/dist/src/x402.js.map +0 -10
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
/** Make a cvToValue result JSON-serializable: Clarity (u)ints decode to bigint,
|
|
2
|
+
* which JSON.stringify can't handle — convert recursively to strings. */
|
|
3
|
+
declare function toJsonSafe(value: unknown): unknown;
|
|
4
|
+
/** Decode a hex-encoded Clarity value to JSON-safe JS (uints as strings,
|
|
5
|
+
* buffers as `0x…` hex, tuples as objects). Returns the input hex on failure. */
|
|
6
|
+
declare function decodeClarityValue(hex: string): unknown;
|
|
7
|
+
import { DECODED_EVENT_TYPES } from "@secondlayer/stacks/filters";
|
|
8
|
+
import { DecodedEventType } from "@secondlayer/stacks/filters";
|
|
9
|
+
/** Alias kept for the Streams surface (identical to {@link DECODED_EVENT_TYPES}).
|
|
10
|
+
* Explicit type annotation required — isolatedDeclarations emits `unknown` for
|
|
11
|
+
* a bare const-to-const alias. */
|
|
12
|
+
declare const STREAMS_EVENT_TYPES: typeof DECODED_EVENT_TYPES;
|
|
13
|
+
type StreamsEventType = DecodedEventType;
|
|
14
|
+
/** A Clarity value as Streams serves it: the canonical hex string, a typed
|
|
15
|
+
* object carrying that hex (`{ hex }`), or a decoded Clarity-JSON object.
|
|
16
|
+
* Decode helpers (`decodeNftTransfer`, etc.) resolve it to a concrete value. */
|
|
17
|
+
type StreamsClarityValue = string | {
|
|
18
|
+
hex: string
|
|
19
|
+
} | Record<string, unknown>;
|
|
20
|
+
type StxTransferPayload = {
|
|
21
|
+
sender: string
|
|
22
|
+
recipient: string
|
|
23
|
+
amount: string
|
|
24
|
+
memo?: string
|
|
25
|
+
};
|
|
26
|
+
type StxMintPayload = {
|
|
27
|
+
recipient: string
|
|
28
|
+
amount: string
|
|
29
|
+
};
|
|
30
|
+
type StxBurnPayload = {
|
|
31
|
+
sender: string
|
|
32
|
+
amount: string
|
|
33
|
+
};
|
|
34
|
+
type StxLockPayload = {
|
|
35
|
+
locked_address: string
|
|
36
|
+
locked_amount: string
|
|
37
|
+
unlock_height: string
|
|
38
|
+
};
|
|
39
|
+
type FtTransferPayload = {
|
|
40
|
+
asset_identifier: string
|
|
41
|
+
sender: string
|
|
42
|
+
recipient: string
|
|
43
|
+
amount: string
|
|
44
|
+
};
|
|
45
|
+
type FtMintPayload = {
|
|
46
|
+
asset_identifier: string
|
|
47
|
+
recipient: string
|
|
48
|
+
amount: string
|
|
49
|
+
};
|
|
50
|
+
type FtBurnPayload = {
|
|
51
|
+
asset_identifier: string
|
|
52
|
+
sender: string
|
|
53
|
+
amount: string
|
|
54
|
+
};
|
|
55
|
+
type NftTransferPayload = {
|
|
56
|
+
asset_identifier: string
|
|
57
|
+
sender: string
|
|
58
|
+
recipient: string
|
|
59
|
+
value: StreamsClarityValue
|
|
60
|
+
/** Canonical serialized hex of `value`, when the stream carries it. */
|
|
61
|
+
raw_value?: string
|
|
62
|
+
};
|
|
63
|
+
type NftMintPayload = {
|
|
64
|
+
asset_identifier: string
|
|
65
|
+
recipient: string
|
|
66
|
+
value: StreamsClarityValue
|
|
67
|
+
raw_value?: string
|
|
68
|
+
};
|
|
69
|
+
type NftBurnPayload = {
|
|
70
|
+
asset_identifier: string
|
|
71
|
+
sender: string
|
|
72
|
+
value: StreamsClarityValue
|
|
73
|
+
raw_value?: string
|
|
74
|
+
};
|
|
75
|
+
type PrintPayload = {
|
|
76
|
+
contract_id?: string | null
|
|
77
|
+
topic?: string
|
|
78
|
+
value?: unknown
|
|
79
|
+
raw_value?: string
|
|
80
|
+
};
|
|
81
|
+
/** Union of every Streams payload shape, discriminated by `event_type` on the
|
|
82
|
+
* parent `StreamsEvent`. */
|
|
83
|
+
type StreamsEventPayload = StxTransferPayload | StxMintPayload | StxBurnPayload | StxLockPayload | FtTransferPayload | FtMintPayload | FtBurnPayload | NftTransferPayload | NftMintPayload | NftBurnPayload | PrintPayload;
|
|
84
|
+
type StreamsEventBase = {
|
|
85
|
+
/**
|
|
86
|
+
* Globally unique, monotonic position of this event (`<block>:<index>`). Use
|
|
87
|
+
* it as the primary key of your projection rows — replaying a batch then
|
|
88
|
+
* upserts cleanly. Don't synthesize your own id from `tx_id`/`event_index`.
|
|
89
|
+
*/
|
|
90
|
+
cursor: string
|
|
91
|
+
block_height: number
|
|
92
|
+
block_hash: string
|
|
93
|
+
burn_block_height: number
|
|
94
|
+
tx_id: string
|
|
95
|
+
tx_index: number
|
|
96
|
+
event_index: number
|
|
97
|
+
contract_id: string | null
|
|
98
|
+
ts: string
|
|
99
|
+
/**
|
|
100
|
+
* True when this event's block is past the finality boundary (immutable).
|
|
101
|
+
* Optional for back-compat; the API always sets it on Streams responses.
|
|
102
|
+
*/
|
|
103
|
+
finalized?: boolean
|
|
104
|
+
/**
|
|
105
|
+
* Labels whose filter group this event satisfied, present only when the
|
|
106
|
+
* request used a labelled `filters` map. The SDK dispatches on it for you
|
|
107
|
+
* (`on.<label>`), so handlers rarely read it directly.
|
|
108
|
+
*/
|
|
109
|
+
matched?: string[]
|
|
110
|
+
};
|
|
111
|
+
type StreamsEventOf<
|
|
112
|
+
T extends StreamsEventType,
|
|
113
|
+
P
|
|
114
|
+
> = StreamsEventBase & {
|
|
115
|
+
event_type: T
|
|
116
|
+
payload: P
|
|
117
|
+
};
|
|
118
|
+
/** A raw Streams event. Discriminated on `event_type`, so `event.payload`
|
|
119
|
+
* narrows to the matching payload shape once the type is checked. */
|
|
120
|
+
type StreamsEvent = StreamsEventOf<"stx_transfer", StxTransferPayload> | StreamsEventOf<"stx_mint", StxMintPayload> | StreamsEventOf<"stx_burn", StxBurnPayload> | StreamsEventOf<"stx_lock", StxLockPayload> | StreamsEventOf<"ft_transfer", FtTransferPayload> | StreamsEventOf<"ft_mint", FtMintPayload> | StreamsEventOf<"ft_burn", FtBurnPayload> | StreamsEventOf<"nft_transfer", NftTransferPayload> | StreamsEventOf<"nft_mint", NftMintPayload> | StreamsEventOf<"nft_burn", NftBurnPayload> | StreamsEventOf<"print", PrintPayload>;
|
|
121
|
+
/** Superset of the columns the decoded_events table holds. Every decoded
|
|
122
|
+
* event's `decoded_payload` is assignable to this, so the indexer's writer
|
|
123
|
+
* can map columns generically instead of per-event-type. */
|
|
124
|
+
type DecodedEventColumns = {
|
|
125
|
+
contract_id?: string | null
|
|
126
|
+
asset_identifier?: string | null
|
|
127
|
+
sender?: string | null
|
|
128
|
+
recipient?: string | null
|
|
129
|
+
amount?: string | null
|
|
130
|
+
value?: string | null
|
|
131
|
+
memo?: string | null
|
|
132
|
+
/** JSONB overflow for non-flat types (e.g. print's decoded value). */
|
|
133
|
+
payload?: unknown
|
|
134
|
+
};
|
|
135
|
+
declare function requireString(payload: Record<string, unknown>, field: string, eventType: string): string;
|
|
136
|
+
declare function optionalString(value: unknown): string | null;
|
|
137
|
+
declare function requireAmountField(payload: Record<string, unknown>, field: string, eventType: string): string;
|
|
138
|
+
declare function requireAmount(payload: Record<string, unknown>, eventType: string): string;
|
|
139
|
+
declare function parseAssetIdentifier(assetIdentifier: string, eventType: string): {
|
|
140
|
+
contract_id: string
|
|
141
|
+
token_name: string | null
|
|
142
|
+
};
|
|
143
|
+
/** NFT token id: live streams emits a typed Clarity value at `value` and the
|
|
144
|
+
* canonical hex at `raw_value`; prefer raw_value when present. */
|
|
145
|
+
declare function requireHexValue(payload: Record<string, unknown>, eventType: string): string;
|
|
146
|
+
/** Common envelope fields shared by every decoded event, lifted off the
|
|
147
|
+
* source StreamsEvent. The decoder supplies event_type + decoded_payload. */
|
|
148
|
+
declare function decodedRow<
|
|
149
|
+
T extends string,
|
|
150
|
+
P
|
|
151
|
+
>(event: StreamsEvent, eventType: T, decoded_payload: P): {
|
|
152
|
+
cursor: string
|
|
153
|
+
block_height: number
|
|
154
|
+
tx_id: string
|
|
155
|
+
tx_index: number
|
|
156
|
+
event_index: number
|
|
157
|
+
event_type: T
|
|
158
|
+
decoded_payload: P
|
|
159
|
+
source_cursor: string
|
|
160
|
+
};
|
|
161
|
+
type FtTransferEvent = Extract<StreamsEvent, {
|
|
162
|
+
event_type: "ft_transfer"
|
|
163
|
+
}>;
|
|
164
|
+
type DecodedFtTransferPayload = {
|
|
165
|
+
asset_identifier: string
|
|
166
|
+
contract_id: string
|
|
167
|
+
token_name: string | null
|
|
168
|
+
sender: string
|
|
169
|
+
recipient: string
|
|
170
|
+
amount: string
|
|
171
|
+
};
|
|
172
|
+
type DecodedFtTransfer = {
|
|
173
|
+
cursor: string
|
|
174
|
+
block_height: number
|
|
175
|
+
tx_id: string
|
|
176
|
+
tx_index: number
|
|
177
|
+
event_index: number
|
|
178
|
+
event_type: "ft_transfer"
|
|
179
|
+
decoded_payload: DecodedFtTransferPayload
|
|
180
|
+
source_cursor: string
|
|
181
|
+
};
|
|
182
|
+
declare function isFtTransfer(event: StreamsEvent): event is FtTransferEvent;
|
|
183
|
+
declare function decodeFtTransfer(event: StreamsEvent): DecodedFtTransfer;
|
|
184
|
+
type NftTransferEvent = Extract<StreamsEvent, {
|
|
185
|
+
event_type: "nft_transfer"
|
|
186
|
+
}>;
|
|
187
|
+
type DecodedNftTransferPayload = {
|
|
188
|
+
asset_identifier: string
|
|
189
|
+
contract_id: string
|
|
190
|
+
token_name: string | null
|
|
191
|
+
sender: string
|
|
192
|
+
recipient: string
|
|
193
|
+
value: string
|
|
194
|
+
};
|
|
195
|
+
type DecodedNftTransfer = {
|
|
196
|
+
cursor: string
|
|
197
|
+
block_height: number
|
|
198
|
+
tx_id: string
|
|
199
|
+
tx_index: number
|
|
200
|
+
event_index: number
|
|
201
|
+
event_type: "nft_transfer"
|
|
202
|
+
decoded_payload: DecodedNftTransferPayload
|
|
203
|
+
source_cursor: string
|
|
204
|
+
};
|
|
205
|
+
declare function isNftTransfer(event: StreamsEvent): event is NftTransferEvent;
|
|
206
|
+
declare function decodeNftTransfer(event: StreamsEvent): DecodedNftTransfer;
|
|
207
|
+
/** Decoded form of a Clarity `print` event:
|
|
208
|
+
* - `topic`: the print topic, when the contract emits a `{ topic, ... }` tuple
|
|
209
|
+
* - `value`: the Clarity value decoded to JSON (uints as strings, buffers as
|
|
210
|
+
* `0x…` hex, tuples as objects)
|
|
211
|
+
* - `raw_value`: the canonical serialized hex, for byte-exact consumers */
|
|
212
|
+
type DecodedPrintValue = {
|
|
213
|
+
topic: string | null
|
|
214
|
+
value: unknown
|
|
215
|
+
raw_value: string | null
|
|
216
|
+
};
|
|
217
|
+
type DecodedPrintPayload = {
|
|
218
|
+
contract_id: string | null
|
|
219
|
+
payload: DecodedPrintValue
|
|
220
|
+
};
|
|
221
|
+
type DecodedPrint = {
|
|
222
|
+
cursor: string
|
|
223
|
+
block_height: number
|
|
224
|
+
tx_id: string
|
|
225
|
+
tx_index: number
|
|
226
|
+
event_index: number
|
|
227
|
+
event_type: "print"
|
|
228
|
+
decoded_payload: DecodedPrintPayload
|
|
229
|
+
source_cursor: string
|
|
230
|
+
};
|
|
231
|
+
declare function isPrint(event: StreamsEvent): event is StreamsEvent & {
|
|
232
|
+
event_type: "print"
|
|
233
|
+
};
|
|
234
|
+
declare function decodePrint(event: StreamsEvent): DecodedPrint;
|
|
235
|
+
type DecodedStxTransferPayload = {
|
|
236
|
+
sender: string
|
|
237
|
+
recipient: string
|
|
238
|
+
amount: string
|
|
239
|
+
memo: string | null
|
|
240
|
+
};
|
|
241
|
+
type DecodedStxTransfer = {
|
|
242
|
+
cursor: string
|
|
243
|
+
block_height: number
|
|
244
|
+
tx_id: string
|
|
245
|
+
tx_index: number
|
|
246
|
+
event_index: number
|
|
247
|
+
event_type: "stx_transfer"
|
|
248
|
+
decoded_payload: DecodedStxTransferPayload
|
|
249
|
+
source_cursor: string
|
|
250
|
+
};
|
|
251
|
+
type DecodedStxMintPayload = {
|
|
252
|
+
recipient: string
|
|
253
|
+
amount: string
|
|
254
|
+
};
|
|
255
|
+
type DecodedStxMint = {
|
|
256
|
+
cursor: string
|
|
257
|
+
block_height: number
|
|
258
|
+
tx_id: string
|
|
259
|
+
tx_index: number
|
|
260
|
+
event_index: number
|
|
261
|
+
event_type: "stx_mint"
|
|
262
|
+
decoded_payload: DecodedStxMintPayload
|
|
263
|
+
source_cursor: string
|
|
264
|
+
};
|
|
265
|
+
type DecodedStxBurnPayload = {
|
|
266
|
+
sender: string
|
|
267
|
+
amount: string
|
|
268
|
+
};
|
|
269
|
+
type DecodedStxBurn = {
|
|
270
|
+
cursor: string
|
|
271
|
+
block_height: number
|
|
272
|
+
tx_id: string
|
|
273
|
+
tx_index: number
|
|
274
|
+
event_index: number
|
|
275
|
+
event_type: "stx_burn"
|
|
276
|
+
decoded_payload: DecodedStxBurnPayload
|
|
277
|
+
source_cursor: string
|
|
278
|
+
};
|
|
279
|
+
declare function isStxTransfer(event: StreamsEvent): event is StreamsEvent & {
|
|
280
|
+
event_type: "stx_transfer"
|
|
281
|
+
};
|
|
282
|
+
declare function decodeStxTransfer(event: StreamsEvent): DecodedStxTransfer;
|
|
283
|
+
declare function isStxMint(event: StreamsEvent): event is StreamsEvent & {
|
|
284
|
+
event_type: "stx_mint"
|
|
285
|
+
};
|
|
286
|
+
declare function decodeStxMint(event: StreamsEvent): DecodedStxMint;
|
|
287
|
+
declare function isStxBurn(event: StreamsEvent): event is StreamsEvent & {
|
|
288
|
+
event_type: "stx_burn"
|
|
289
|
+
};
|
|
290
|
+
declare function decodeStxBurn(event: StreamsEvent): DecodedStxBurn;
|
|
291
|
+
type DecodedStxLockPayload = {
|
|
292
|
+
sender: string
|
|
293
|
+
amount: string
|
|
294
|
+
payload: {
|
|
295
|
+
unlock_height: string | null
|
|
296
|
+
}
|
|
297
|
+
};
|
|
298
|
+
type DecodedStxLock = {
|
|
299
|
+
cursor: string
|
|
300
|
+
block_height: number
|
|
301
|
+
tx_id: string
|
|
302
|
+
tx_index: number
|
|
303
|
+
event_index: number
|
|
304
|
+
event_type: "stx_lock"
|
|
305
|
+
decoded_payload: DecodedStxLockPayload
|
|
306
|
+
source_cursor: string
|
|
307
|
+
};
|
|
308
|
+
declare function isStxLock(event: StreamsEvent): event is StreamsEvent & {
|
|
309
|
+
event_type: "stx_lock"
|
|
310
|
+
};
|
|
311
|
+
declare function decodeStxLock(event: StreamsEvent): DecodedStxLock;
|
|
312
|
+
type DecodedFtMintPayload = {
|
|
313
|
+
asset_identifier: string
|
|
314
|
+
contract_id: string
|
|
315
|
+
token_name: string | null
|
|
316
|
+
recipient: string
|
|
317
|
+
amount: string
|
|
318
|
+
};
|
|
319
|
+
type DecodedFtMint = {
|
|
320
|
+
cursor: string
|
|
321
|
+
block_height: number
|
|
322
|
+
tx_id: string
|
|
323
|
+
tx_index: number
|
|
324
|
+
event_index: number
|
|
325
|
+
event_type: "ft_mint"
|
|
326
|
+
decoded_payload: DecodedFtMintPayload
|
|
327
|
+
source_cursor: string
|
|
328
|
+
};
|
|
329
|
+
type DecodedFtBurnPayload = {
|
|
330
|
+
asset_identifier: string
|
|
331
|
+
contract_id: string
|
|
332
|
+
token_name: string | null
|
|
333
|
+
sender: string
|
|
334
|
+
amount: string
|
|
335
|
+
};
|
|
336
|
+
type DecodedFtBurn = {
|
|
337
|
+
cursor: string
|
|
338
|
+
block_height: number
|
|
339
|
+
tx_id: string
|
|
340
|
+
tx_index: number
|
|
341
|
+
event_index: number
|
|
342
|
+
event_type: "ft_burn"
|
|
343
|
+
decoded_payload: DecodedFtBurnPayload
|
|
344
|
+
source_cursor: string
|
|
345
|
+
};
|
|
346
|
+
type DecodedNftMintPayload = {
|
|
347
|
+
asset_identifier: string
|
|
348
|
+
contract_id: string
|
|
349
|
+
token_name: string | null
|
|
350
|
+
recipient: string
|
|
351
|
+
value: string
|
|
352
|
+
};
|
|
353
|
+
type DecodedNftMint = {
|
|
354
|
+
cursor: string
|
|
355
|
+
block_height: number
|
|
356
|
+
tx_id: string
|
|
357
|
+
tx_index: number
|
|
358
|
+
event_index: number
|
|
359
|
+
event_type: "nft_mint"
|
|
360
|
+
decoded_payload: DecodedNftMintPayload
|
|
361
|
+
source_cursor: string
|
|
362
|
+
};
|
|
363
|
+
type DecodedNftBurnPayload = {
|
|
364
|
+
asset_identifier: string
|
|
365
|
+
contract_id: string
|
|
366
|
+
token_name: string | null
|
|
367
|
+
sender: string
|
|
368
|
+
value: string
|
|
369
|
+
};
|
|
370
|
+
type DecodedNftBurn = {
|
|
371
|
+
cursor: string
|
|
372
|
+
block_height: number
|
|
373
|
+
tx_id: string
|
|
374
|
+
tx_index: number
|
|
375
|
+
event_index: number
|
|
376
|
+
event_type: "nft_burn"
|
|
377
|
+
decoded_payload: DecodedNftBurnPayload
|
|
378
|
+
source_cursor: string
|
|
379
|
+
};
|
|
380
|
+
declare function isFtMint(event: StreamsEvent): event is StreamsEvent & {
|
|
381
|
+
event_type: "ft_mint"
|
|
382
|
+
};
|
|
383
|
+
declare function decodeFtMint(event: StreamsEvent): DecodedFtMint;
|
|
384
|
+
declare function isFtBurn(event: StreamsEvent): event is StreamsEvent & {
|
|
385
|
+
event_type: "ft_burn"
|
|
386
|
+
};
|
|
387
|
+
declare function decodeFtBurn(event: StreamsEvent): DecodedFtBurn;
|
|
388
|
+
declare function isNftMint(event: StreamsEvent): event is StreamsEvent & {
|
|
389
|
+
event_type: "nft_mint"
|
|
390
|
+
};
|
|
391
|
+
declare function decodeNftMint(event: StreamsEvent): DecodedNftMint;
|
|
392
|
+
declare function isNftBurn(event: StreamsEvent): event is StreamsEvent & {
|
|
393
|
+
event_type: "nft_burn"
|
|
394
|
+
};
|
|
395
|
+
declare function decodeNftBurn(event: StreamsEvent): DecodedNftBurn;
|
|
396
|
+
/** Union of every decoded DB-row shape the guard+decode pairs produce —
|
|
397
|
+
* exactly what the `decoded_events` table stores. */
|
|
398
|
+
type DecodedEventRow = DecodedFtTransfer | DecodedNftTransfer | DecodedStxTransfer | DecodedStxMint | DecodedStxBurn | DecodedStxLock | DecodedFtMint | DecodedFtBurn | DecodedNftMint | DecodedNftBurn | DecodedPrint;
|
|
399
|
+
export { toJsonSafe, requireString, requireHexValue, requireAmountField, requireAmount, parseAssetIdentifier, optionalString, isStxTransfer, isStxMint, isStxLock, isStxBurn, isPrint, isNftTransfer, isNftMint, isNftBurn, isFtTransfer, isFtMint, isFtBurn, decodedRow, decodeStxTransfer, decodeStxMint, decodeStxLock, decodeStxBurn, decodePrint, decodeNftTransfer, decodeNftMint, decodeNftBurn, decodeFtTransfer, decodeFtMint, decodeFtBurn, decodeClarityValue, StxTransferPayload, StxMintPayload, StxLockPayload, StxBurnPayload, StreamsEventType, StreamsEventPayload, StreamsEventBase, StreamsEvent, StreamsClarityValue, STREAMS_EVENT_TYPES, PrintPayload, NftTransferPayload, NftTransferEvent, NftMintPayload, NftBurnPayload, FtTransferPayload, FtTransferEvent, FtMintPayload, FtBurnPayload, DecodedStxTransferPayload, DecodedStxTransfer, DecodedStxMintPayload, DecodedStxMint, DecodedStxLockPayload, DecodedStxLock, DecodedStxBurnPayload, DecodedStxBurn, DecodedPrintValue, DecodedPrintPayload, DecodedPrint, DecodedNftTransferPayload, DecodedNftTransfer, DecodedNftMintPayload, DecodedNftMint, DecodedNftBurnPayload, DecodedNftBurn, DecodedFtTransferPayload, DecodedFtTransfer, DecodedFtMintPayload, DecodedFtMint, DecodedFtBurnPayload, DecodedFtBurn, DecodedEventRow, DecodedEventColumns };
|