@secondlayer/sdk 5.8.0 → 6.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/README.md +62 -6
- package/dist/index.d.ts +199 -29
- package/dist/index.js +186 -7
- package/dist/index.js.map +10 -9
- package/dist/streams/index.d.ts +199 -29
- package/dist/streams/index.js +186 -7
- package/dist/streams/index.js.map +10 -9
- package/dist/subgraphs/index.d.ts +173 -8
- package/dist/subgraphs/index.js +185 -7
- package/dist/subgraphs/index.js.map +7 -6
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -19,9 +19,12 @@ const sl = new SecondLayer({
|
|
|
19
19
|
});
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
`sl.index` and `sl.subgraphs` reads are anonymous — no key needed. **`sl.streams`
|
|
23
|
+
reads require a bearer token** (`apiKey`) and resolve a per-tier tenant; a
|
|
24
|
+
publicly-known free-tier token exists but a bearer is always required. Writes
|
|
25
|
+
require an `sk-sl_` API key, created in the platform console at
|
|
26
|
+
https://secondlayer.tools/platform/api-keys. (Public Streams bulk dumps —
|
|
27
|
+
`client.dumps`, `events.replay` — need no key.)
|
|
25
28
|
|
|
26
29
|
## Mental model
|
|
27
30
|
|
|
@@ -31,16 +34,20 @@ https://secondlayer.tools/platform/api-keys.
|
|
|
31
34
|
|
|
32
35
|
## Stacks Streams
|
|
33
36
|
|
|
34
|
-
Typed L1 HTTP client. Reads
|
|
37
|
+
Typed L1 HTTP client. Reads require a bearer token (`apiKey`).
|
|
35
38
|
|
|
36
39
|
```typescript
|
|
37
40
|
const tip = await sl.streams.tip();
|
|
41
|
+
// tip.finalized_height — highest immutable (past Bitcoin-anchored finality) block
|
|
38
42
|
const page = await sl.streams.events.list({
|
|
39
43
|
types: ["ft_transfer"],
|
|
40
44
|
contractId: "SP...sbtc-token",
|
|
45
|
+
sender: "SP...", // exact payload sender (events that have one)
|
|
46
|
+
recipient: "SP...", // exact payload recipient
|
|
47
|
+
assetIdentifier: "SP...token::asset", // exact FT/NFT asset id
|
|
41
48
|
limit: 10,
|
|
42
49
|
});
|
|
43
|
-
|
|
50
|
+
// each event carries `finalized: boolean`
|
|
44
51
|
console.log({ tip, firstCursor: page.events[0]?.cursor });
|
|
45
52
|
```
|
|
46
53
|
|
|
@@ -50,10 +57,19 @@ console.log({ tip, firstCursor: page.events[0]?.cursor });
|
|
|
50
57
|
import { createStreamsClient } from "@secondlayer/sdk";
|
|
51
58
|
|
|
52
59
|
const streams = createStreamsClient({
|
|
53
|
-
apiKey: process.env.
|
|
60
|
+
apiKey: process.env.SL_API_KEY!, // sk-sl_... — required for reads
|
|
61
|
+
// verify: true, // verify ed25519 X-Signature on every read
|
|
62
|
+
// // (auto-fetches the public key; { publicKey } pins a PEM)
|
|
63
|
+
// dumpsBaseUrl: process.env.SL_STREAMS_DUMPS_URL, // required to use client.dumps
|
|
54
64
|
});
|
|
55
65
|
```
|
|
56
66
|
|
|
67
|
+
Verified responses: every Streams read is signed (ed25519 `X-Signature` +
|
|
68
|
+
`X-Signature-KeyId`). Pass `verify: true` to check it on every read (or
|
|
69
|
+
`{ publicKey }` to pin a PEM); a missing/bad signature throws
|
|
70
|
+
`StreamsSignatureError`. The public key is at
|
|
71
|
+
`GET /public/streams/signing-key`.
|
|
72
|
+
|
|
57
73
|
Convenience reads:
|
|
58
74
|
|
|
59
75
|
```typescript
|
|
@@ -102,6 +118,46 @@ for await (const event of streams.events.stream({
|
|
|
102
118
|
}
|
|
103
119
|
```
|
|
104
120
|
|
|
121
|
+
Bulk parquet dumps.
|
|
122
|
+
|
|
123
|
+
Finalized history is published as public parquet files. Set `dumpsBaseUrl`
|
|
124
|
+
(or `SL_STREAMS_DUMPS_URL`) — no API key needed for dumps. The SDK does **not**
|
|
125
|
+
decode parquet; `download` hands you sha256-verified bytes to process with your
|
|
126
|
+
own tooling.
|
|
127
|
+
|
|
128
|
+
```typescript
|
|
129
|
+
const streams = createStreamsClient({
|
|
130
|
+
apiKey: process.env.SL_API_KEY!,
|
|
131
|
+
dumpsBaseUrl: process.env.SL_STREAMS_DUMPS_URL!,
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
const manifest = await streams.dumps.list(); // parse the manifest
|
|
135
|
+
for (const file of manifest.files) {
|
|
136
|
+
const bytes = await streams.dumps.download(file); // fetch + verify sha256
|
|
137
|
+
await myParquetReader(bytes);
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Backfill then tail (`events.replay`).
|
|
142
|
+
|
|
143
|
+
Backfills from bulk dumps, then tails live from the manifest's
|
|
144
|
+
`latest_finalized_cursor` — no gap or dupe at the seam. `onDumpFile` hands you
|
|
145
|
+
each finalized file; `onBatch` receives live events after the seam.
|
|
146
|
+
|
|
147
|
+
```typescript
|
|
148
|
+
await streams.events.replay({
|
|
149
|
+
from: lastCheckpoint,
|
|
150
|
+
async onDumpFile(file) {
|
|
151
|
+
const bytes = await streams.dumps.download(file);
|
|
152
|
+
await ingestParquet(bytes); // your tooling
|
|
153
|
+
},
|
|
154
|
+
async onBatch(events, envelope) {
|
|
155
|
+
for (const event of events) await handle(event);
|
|
156
|
+
return envelope.next_cursor;
|
|
157
|
+
},
|
|
158
|
+
});
|
|
159
|
+
```
|
|
160
|
+
|
|
105
161
|
Decoder helper.
|
|
106
162
|
|
|
107
163
|
```typescript
|
package/dist/index.d.ts
CHANGED
|
@@ -346,8 +346,77 @@ declare class Index extends BaseClient {
|
|
|
346
346
|
}
|
|
347
347
|
declare const STREAMS_EVENT_TYPES: readonly ["stx_transfer", "stx_mint", "stx_burn", "stx_lock", "ft_transfer", "ft_mint", "ft_burn", "nft_transfer", "nft_mint", "nft_burn", "print"];
|
|
348
348
|
type StreamsEventType = (typeof STREAMS_EVENT_TYPES)[number];
|
|
349
|
-
|
|
350
|
-
|
|
349
|
+
/** A Clarity value as Streams serves it: the canonical hex string, a typed
|
|
350
|
+
* object carrying that hex (`{ hex }`), or a decoded Clarity-JSON object.
|
|
351
|
+
* Decode helpers (`decodeNftTransfer`, etc.) resolve it to a concrete value. */
|
|
352
|
+
type StreamsClarityValue = string | {
|
|
353
|
+
hex: string
|
|
354
|
+
} | Record<string, unknown>;
|
|
355
|
+
type StxTransferPayload = {
|
|
356
|
+
sender: string
|
|
357
|
+
recipient: string
|
|
358
|
+
amount: string
|
|
359
|
+
memo?: string
|
|
360
|
+
};
|
|
361
|
+
type StxMintPayload = {
|
|
362
|
+
recipient: string
|
|
363
|
+
amount: string
|
|
364
|
+
};
|
|
365
|
+
type StxBurnPayload = {
|
|
366
|
+
sender: string
|
|
367
|
+
amount: string
|
|
368
|
+
};
|
|
369
|
+
type StxLockPayload = {
|
|
370
|
+
locked_address: string
|
|
371
|
+
locked_amount: string
|
|
372
|
+
unlock_height: string
|
|
373
|
+
};
|
|
374
|
+
type FtTransferPayload = {
|
|
375
|
+
asset_identifier: string
|
|
376
|
+
sender: string
|
|
377
|
+
recipient: string
|
|
378
|
+
amount: string
|
|
379
|
+
};
|
|
380
|
+
type FtMintPayload = {
|
|
381
|
+
asset_identifier: string
|
|
382
|
+
recipient: string
|
|
383
|
+
amount: string
|
|
384
|
+
};
|
|
385
|
+
type FtBurnPayload = {
|
|
386
|
+
asset_identifier: string
|
|
387
|
+
sender: string
|
|
388
|
+
amount: string
|
|
389
|
+
};
|
|
390
|
+
type NftTransferPayload = {
|
|
391
|
+
asset_identifier: string
|
|
392
|
+
sender: string
|
|
393
|
+
recipient: string
|
|
394
|
+
value: StreamsClarityValue
|
|
395
|
+
/** Canonical serialized hex of `value`, when the stream carries it. */
|
|
396
|
+
raw_value?: string
|
|
397
|
+
};
|
|
398
|
+
type NftMintPayload = {
|
|
399
|
+
asset_identifier: string
|
|
400
|
+
recipient: string
|
|
401
|
+
value: StreamsClarityValue
|
|
402
|
+
raw_value?: string
|
|
403
|
+
};
|
|
404
|
+
type NftBurnPayload = {
|
|
405
|
+
asset_identifier: string
|
|
406
|
+
sender: string
|
|
407
|
+
value: StreamsClarityValue
|
|
408
|
+
raw_value?: string
|
|
409
|
+
};
|
|
410
|
+
type PrintPayload = {
|
|
411
|
+
contract_id?: string | null
|
|
412
|
+
topic?: string
|
|
413
|
+
value?: unknown
|
|
414
|
+
raw_value?: string
|
|
415
|
+
};
|
|
416
|
+
/** Union of every Streams payload shape, discriminated by `event_type` on the
|
|
417
|
+
* parent `StreamsEvent`. */
|
|
418
|
+
type StreamsEventPayload = StxTransferPayload | StxMintPayload | StxBurnPayload | StxLockPayload | FtTransferPayload | FtMintPayload | FtBurnPayload | NftTransferPayload | NftMintPayload | NftBurnPayload | PrintPayload;
|
|
419
|
+
type StreamsEventBase = {
|
|
351
420
|
cursor: string
|
|
352
421
|
block_height: number
|
|
353
422
|
block_hash: string
|
|
@@ -355,15 +424,33 @@ type StreamsEvent = {
|
|
|
355
424
|
tx_id: string
|
|
356
425
|
tx_index: number
|
|
357
426
|
event_index: number
|
|
358
|
-
event_type: StreamsEventType
|
|
359
427
|
contract_id: string | null
|
|
360
|
-
payload: StreamsEventPayload
|
|
361
428
|
ts: string
|
|
362
|
-
|
|
429
|
+
/**
|
|
430
|
+
* True when this event's block is past the finality boundary (immutable).
|
|
431
|
+
* Optional for back-compat; the API always sets it on Streams responses.
|
|
432
|
+
*/
|
|
433
|
+
finalized?: boolean
|
|
434
|
+
};
|
|
435
|
+
type StreamsEventOf<
|
|
436
|
+
T extends StreamsEventType,
|
|
437
|
+
P
|
|
438
|
+
> = StreamsEventBase & {
|
|
439
|
+
event_type: T
|
|
440
|
+
payload: P
|
|
441
|
+
};
|
|
442
|
+
/** A raw Streams event. Discriminated on `event_type`, so `event.payload`
|
|
443
|
+
* narrows to the matching payload shape once the type is checked. */
|
|
444
|
+
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>;
|
|
363
445
|
type StreamsTip = {
|
|
364
446
|
block_height: number
|
|
365
447
|
block_hash: string
|
|
366
448
|
burn_block_height: number
|
|
449
|
+
/**
|
|
450
|
+
* Highest Stacks block past the burn-confirmation finality boundary.
|
|
451
|
+
* Optional for back-compat; the API always sets it.
|
|
452
|
+
*/
|
|
453
|
+
finalized_height?: number
|
|
367
454
|
lag_seconds: number
|
|
368
455
|
};
|
|
369
456
|
type StreamsCanonicalBlock = {
|
|
@@ -397,18 +484,29 @@ type StreamsReorgsListEnvelope = {
|
|
|
397
484
|
reorgs: StreamsReorg[]
|
|
398
485
|
next_since: string | null
|
|
399
486
|
};
|
|
487
|
+
/** A filter that matches a single value or any value in a list. */
|
|
488
|
+
type StreamsFilterValue = string | readonly string[];
|
|
400
489
|
type StreamsEventsListParams = {
|
|
401
490
|
cursor?: string | null
|
|
402
491
|
fromHeight?: number
|
|
403
492
|
toHeight?: number
|
|
404
493
|
types?: readonly StreamsEventType[]
|
|
405
|
-
|
|
494
|
+
/** Event types to exclude (applied after `types`). */
|
|
495
|
+
notTypes?: readonly StreamsEventType[]
|
|
496
|
+
contractId?: StreamsFilterValue
|
|
497
|
+
sender?: StreamsFilterValue
|
|
498
|
+
recipient?: StreamsFilterValue
|
|
499
|
+
assetIdentifier?: string
|
|
406
500
|
limit?: number
|
|
407
501
|
};
|
|
408
502
|
type StreamsEventsStreamParams = {
|
|
409
503
|
fromCursor?: string | null
|
|
410
504
|
types?: readonly StreamsEventType[]
|
|
411
|
-
|
|
505
|
+
notTypes?: readonly StreamsEventType[]
|
|
506
|
+
contractId?: StreamsFilterValue
|
|
507
|
+
sender?: StreamsFilterValue
|
|
508
|
+
recipient?: StreamsFilterValue
|
|
509
|
+
assetIdentifier?: string
|
|
412
510
|
batchSize?: number
|
|
413
511
|
emptyBackoffMs?: number
|
|
414
512
|
maxPages?: number
|
|
@@ -419,7 +517,11 @@ type StreamsEventsConsumeParams = {
|
|
|
419
517
|
fromCursor?: string | null
|
|
420
518
|
mode?: "tail" | "bounded"
|
|
421
519
|
types?: readonly StreamsEventType[]
|
|
422
|
-
|
|
520
|
+
notTypes?: readonly StreamsEventType[]
|
|
521
|
+
contractId?: StreamsFilterValue
|
|
522
|
+
sender?: StreamsFilterValue
|
|
523
|
+
recipient?: StreamsFilterValue
|
|
524
|
+
assetIdentifier?: string
|
|
423
525
|
batchSize?: number
|
|
424
526
|
onBatch: (events: StreamsEvent[], envelope: StreamsEventsEnvelope) => Promise<string | null | undefined> | string | null | undefined
|
|
425
527
|
emptyBackoffMs?: number
|
|
@@ -432,7 +534,63 @@ type StreamsEventsConsumeResult = {
|
|
|
432
534
|
pages: number
|
|
433
535
|
emptyPolls: number
|
|
434
536
|
};
|
|
537
|
+
type StreamsEventsReplayParams = {
|
|
538
|
+
/** Start point: `"genesis"` (default) or a `<block>:<index>` cursor. */
|
|
539
|
+
from?: "genesis" | string
|
|
540
|
+
/**
|
|
541
|
+
* Called once per finalized dump file, in block order, before live tailing.
|
|
542
|
+
* Process the parquet with your own tooling (e.g. DuckDB) — the SDK does not
|
|
543
|
+
* decode parquet. Use `client.dumps.download(file)` to fetch + verify bytes.
|
|
544
|
+
*/
|
|
545
|
+
onDumpFile: (file: StreamsDumpFile) => Promise<void> | void
|
|
546
|
+
/** Called per live page after the dump phase, like `consume`. */
|
|
547
|
+
onBatch: (events: StreamsEvent[], envelope: StreamsEventsEnvelope) => Promise<string | null | undefined> | string | null | undefined
|
|
548
|
+
mode?: "tail" | "bounded"
|
|
549
|
+
batchSize?: number
|
|
550
|
+
emptyBackoffMs?: number
|
|
551
|
+
maxPages?: number
|
|
552
|
+
maxEmptyPolls?: number
|
|
553
|
+
signal?: AbortSignal
|
|
554
|
+
};
|
|
435
555
|
type FetchLike2 = (input: string | URL | Request, init?: RequestInit) => Promise<Response>;
|
|
556
|
+
/** One bulk parquet file in the dumps manifest. `path` is the object key under
|
|
557
|
+
* the dumps base URL. */
|
|
558
|
+
type StreamsDumpFile = {
|
|
559
|
+
path: string
|
|
560
|
+
from_block: number
|
|
561
|
+
to_block: number
|
|
562
|
+
min_cursor: string | null
|
|
563
|
+
max_cursor: string | null
|
|
564
|
+
row_count: number
|
|
565
|
+
byte_size: number
|
|
566
|
+
sha256: string
|
|
567
|
+
schema_version: number
|
|
568
|
+
created_at: string
|
|
569
|
+
};
|
|
570
|
+
type StreamsDumpsManifest = {
|
|
571
|
+
dataset: string
|
|
572
|
+
network: string
|
|
573
|
+
version: string
|
|
574
|
+
schema_version: number
|
|
575
|
+
generated_at: string
|
|
576
|
+
producer_version: string
|
|
577
|
+
finality_lag_blocks: number
|
|
578
|
+
/** Cursor at the end of the finalized bulk coverage — hand to live tailing. */
|
|
579
|
+
latest_finalized_cursor: string | null
|
|
580
|
+
coverage: {
|
|
581
|
+
from_block: number
|
|
582
|
+
to_block: number
|
|
583
|
+
}
|
|
584
|
+
files: StreamsDumpFile[]
|
|
585
|
+
};
|
|
586
|
+
type StreamsDumps = {
|
|
587
|
+
/** Fetch and parse the latest dumps manifest. */
|
|
588
|
+
list(): Promise<StreamsDumpsManifest>
|
|
589
|
+
/** Absolute URL for a manifest file. */
|
|
590
|
+
fileUrl(file: StreamsDumpFile): string
|
|
591
|
+
/** Download a parquet file and verify its sha256 against the manifest. */
|
|
592
|
+
download(file: StreamsDumpFile): Promise<Uint8Array>
|
|
593
|
+
};
|
|
436
594
|
type StreamsClient = {
|
|
437
595
|
events: {
|
|
438
596
|
list(params?: StreamsEventsListParams): Promise<StreamsEventsEnvelope>
|
|
@@ -448,6 +606,14 @@ type StreamsClient = {
|
|
|
448
606
|
*/
|
|
449
607
|
consume(params: StreamsEventsConsumeParams): Promise<StreamsEventsConsumeResult>
|
|
450
608
|
/**
|
|
609
|
+
* Backfill from bulk dumps, then continue live from the dump→live seam in
|
|
610
|
+
* one call. Iterates finalized dump files (via `onDumpFile`) in block
|
|
611
|
+
* order, then tails live from the manifest's `latest_finalized_cursor`
|
|
612
|
+
* (exclusive input → no gap or duplicate at the seam). Requires
|
|
613
|
+
* `dumpsBaseUrl`.
|
|
614
|
+
*/
|
|
615
|
+
replay(params: StreamsEventsReplayParams): Promise<StreamsEventsConsumeResult>
|
|
616
|
+
/**
|
|
451
617
|
* Follow Streams as an async iterator.
|
|
452
618
|
*
|
|
453
619
|
* Use `stream` for live processors and watch-style apps. It tails
|
|
@@ -462,6 +628,8 @@ type StreamsClient = {
|
|
|
462
628
|
reorgs: {
|
|
463
629
|
list(params: StreamsReorgsListParams): Promise<StreamsReorgsListEnvelope>
|
|
464
630
|
}
|
|
631
|
+
/** Bulk parquet dumps. Requires `dumpsBaseUrl` on the client. */
|
|
632
|
+
dumps: StreamsDumps
|
|
465
633
|
canonical(height: number): Promise<StreamsCanonicalBlock>
|
|
466
634
|
tip(): Promise<StreamsTip>
|
|
467
635
|
};
|
|
@@ -523,6 +691,20 @@ type CreateStreamsClientOptions = {
|
|
|
523
691
|
apiKey: string
|
|
524
692
|
baseUrl?: string
|
|
525
693
|
fetchImpl?: FetchLike2
|
|
694
|
+
/**
|
|
695
|
+
* Public base URL for bulk parquet dumps (the R2/CDN bucket root). Required
|
|
696
|
+
* to use `client.dumps`. See `GET /public/streams/dumps/manifest`.
|
|
697
|
+
*/
|
|
698
|
+
dumpsBaseUrl?: string
|
|
699
|
+
/**
|
|
700
|
+
* Verify the ed25519 `X-Signature` on every response (default off). Pass
|
|
701
|
+
* `true` to fetch the server's public key from
|
|
702
|
+
* `/public/streams/signing-key`, or `{ publicKey }` to pin a known PEM. A
|
|
703
|
+
* failed or missing signature throws `StreamsSignatureError`.
|
|
704
|
+
*/
|
|
705
|
+
verify?: boolean | {
|
|
706
|
+
publicKey: string
|
|
707
|
+
}
|
|
526
708
|
};
|
|
527
709
|
declare function createStreamsClient(options: CreateStreamsClientOptions): StreamsClient;
|
|
528
710
|
declare class AuthError extends Error {
|
|
@@ -544,16 +726,13 @@ declare class StreamsServerError extends Error {
|
|
|
544
726
|
readonly body?: unknown;
|
|
545
727
|
constructor(message: string, status: number, body?: unknown);
|
|
546
728
|
}
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
};
|
|
553
|
-
type FtTransferEvent = StreamsEvent & {
|
|
729
|
+
/** Thrown when response signature verification is enabled and fails. */
|
|
730
|
+
declare class StreamsSignatureError extends Error {
|
|
731
|
+
constructor(message?: string);
|
|
732
|
+
}
|
|
733
|
+
type FtTransferEvent = Extract<StreamsEvent, {
|
|
554
734
|
event_type: "ft_transfer"
|
|
555
|
-
|
|
556
|
-
};
|
|
735
|
+
}>;
|
|
557
736
|
type DecodedFtTransferPayload = {
|
|
558
737
|
asset_identifier: string
|
|
559
738
|
contract_id: string
|
|
@@ -574,18 +753,9 @@ type DecodedFtTransfer = {
|
|
|
574
753
|
};
|
|
575
754
|
declare function isFtTransfer(event: StreamsEvent): event is FtTransferEvent;
|
|
576
755
|
declare function decodeFtTransfer(event: StreamsEvent): DecodedFtTransfer;
|
|
577
|
-
type
|
|
578
|
-
asset_identifier: string
|
|
579
|
-
sender: string
|
|
580
|
-
recipient: string
|
|
581
|
-
value: string | {
|
|
582
|
-
hex: string
|
|
583
|
-
}
|
|
584
|
-
};
|
|
585
|
-
type NftTransferEvent = StreamsEvent & {
|
|
756
|
+
type NftTransferEvent = Extract<StreamsEvent, {
|
|
586
757
|
event_type: "nft_transfer"
|
|
587
|
-
|
|
588
|
-
};
|
|
758
|
+
}>;
|
|
589
759
|
type DecodedNftTransferPayload = {
|
|
590
760
|
asset_identifier: string
|
|
591
761
|
contract_id: string
|
|
@@ -1054,4 +1224,4 @@ declare function toJsonSafe(value: unknown): unknown;
|
|
|
1054
1224
|
/** Decode a hex-encoded Clarity value to JSON-safe JS (uints as strings,
|
|
1055
1225
|
* buffers as `0x…` hex, tuples as objects). Returns the input hex on failure. */
|
|
1056
1226
|
declare function decodeClarityValue(hex: string): unknown;
|
|
1057
|
-
export { verifyWebhookSignature, toJsonSafe, isStxTransfer, isStxMint, isStxLock, isStxBurn, isPrint, isNftTransfer, isNftMint, isNftBurn, isFtTransfer, isFtMint, isFtBurn, getSubgraph, decodeStxTransfer, decodeStxMint, decodeStxLock, decodeStxBurn, decodePrint, decodeNftTransfer, decodeNftMint, decodeNftBurn, decodeFtTransfer, decodeFtMint, decodeFtBurn, decodeClarityValue, createStreamsClient, VersionConflictError, ValidationError, UpdateSubscriptionRequest2 as UpdateSubscriptionRequest, Subscriptions, SubscriptionSummary2 as SubscriptionSummary, SubscriptionStatus, SubscriptionRuntime, SubscriptionFormat, SubscriptionDetail2 as SubscriptionDetail, Subgraphs, SubgraphSpecOptions3 as SubgraphSpecOptions, SubgraphSpecFormat2 as SubgraphSpecFormat, SubgraphAgentSchema3 as SubgraphAgentSchema, StreamsTip, StreamsServerError, StreamsReorgsListParams, StreamsReorgsListEnvelope, StreamsReorg, StreamsEventsStreamParams, StreamsEventsListParams, StreamsEventsListEnvelope, StreamsEventsEnvelope, StreamsEventsConsumeResult, StreamsEventsConsumeParams, StreamsEventType, StreamsEventPayload, StreamsEvent, StreamsClient, StreamsCanonicalBlock, SecondLayerOptions, SecondLayer, RotateSecretResponse2 as RotateSecretResponse, ReplayResult2 as ReplayResult, RateLimitError, Pox4CallsParams, NftTransfersWalkParams, NftTransfersListParams, NftTransfersEnvelope, NftTransferPayload, NftTransferEvent, NftTransfer, IndexTip, IndexEventType, IndexEvent, IndexContractCall, Index, FtTransfersWalkParams, FtTransfersListParams, FtTransfersEnvelope, FtTransferPayload, FtTransferEvent, FtTransfer, FetchLike2 as FetchLike, EventsWalkParams, EventsListParams, EventsEnvelope, DeliveryRow2 as DeliveryRow, 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, DeadRow2 as DeadRow, Datasets, DatasetRow, CursorListParams, CursorEnvelope, CreateSubscriptionResponse2 as CreateSubscriptionResponse, CreateSubscriptionRequest2 as CreateSubscriptionRequest, ContractCallsWalkParams, ContractCallsListParams, ContractCallsEnvelope, CURSOR_SLUGS, AuthError, ApiError };
|
|
1227
|
+
export { verifyWebhookSignature, toJsonSafe, isStxTransfer, isStxMint, isStxLock, isStxBurn, isPrint, isNftTransfer, isNftMint, isNftBurn, isFtTransfer, isFtMint, isFtBurn, getSubgraph, decodeStxTransfer, decodeStxMint, decodeStxLock, decodeStxBurn, decodePrint, decodeNftTransfer, decodeNftMint, decodeNftBurn, decodeFtTransfer, decodeFtMint, decodeFtBurn, decodeClarityValue, createStreamsClient, VersionConflictError, ValidationError, UpdateSubscriptionRequest2 as UpdateSubscriptionRequest, Subscriptions, SubscriptionSummary2 as SubscriptionSummary, SubscriptionStatus, SubscriptionRuntime, SubscriptionFormat, SubscriptionDetail2 as SubscriptionDetail, Subgraphs, SubgraphSpecOptions3 as SubgraphSpecOptions, SubgraphSpecFormat2 as SubgraphSpecFormat, SubgraphAgentSchema3 as SubgraphAgentSchema, StreamsTip, StreamsSignatureError, StreamsServerError, StreamsReorgsListParams, StreamsReorgsListEnvelope, StreamsReorg, StreamsEventsStreamParams, StreamsEventsListParams, StreamsEventsListEnvelope, StreamsEventsEnvelope, StreamsEventsConsumeResult, StreamsEventsConsumeParams, StreamsEventType, StreamsEventPayload, StreamsEvent, StreamsDumpsManifest, StreamsDumps, StreamsDumpFile, StreamsClient, StreamsCanonicalBlock, SecondLayerOptions, SecondLayer, RotateSecretResponse2 as RotateSecretResponse, ReplayResult2 as ReplayResult, RateLimitError, Pox4CallsParams, NftTransfersWalkParams, NftTransfersListParams, NftTransfersEnvelope, NftTransferPayload, NftTransferEvent, NftTransfer, IndexTip, IndexEventType, IndexEvent, IndexContractCall, Index, FtTransfersWalkParams, FtTransfersListParams, FtTransfersEnvelope, FtTransferPayload, FtTransferEvent, FtTransfer, FetchLike2 as FetchLike, EventsWalkParams, EventsListParams, EventsEnvelope, DeliveryRow2 as DeliveryRow, 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, DeadRow2 as DeadRow, Datasets, DatasetRow, CursorListParams, CursorEnvelope, CreateSubscriptionResponse2 as CreateSubscriptionResponse, CreateSubscriptionRequest2 as CreateSubscriptionRequest, ContractCallsWalkParams, ContractCallsListParams, ContractCallsEnvelope, CURSOR_SLUGS, AuthError, ApiError };
|