@secondlayer/sdk 6.41.0 → 6.43.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/index.d.ts +17 -2
- package/dist/index.js +3 -2
- package/dist/index.js.map +3 -3
- package/dist/streams/rows.d.ts +356 -0
- package/dist/streams/rows.js +306 -0
- package/dist/streams/rows.js.map +16 -0
- package/dist/subgraphs/index.d.ts +17 -2
- package/dist/subgraphs/index.js +3 -2
- package/dist/subgraphs/index.js.map +3 -3
- package/package.json +6 -2
package/dist/index.d.ts
CHANGED
|
@@ -1802,8 +1802,8 @@ type IndexSbtcSummary = {
|
|
|
1802
1802
|
total_locked_sats: string
|
|
1803
1803
|
sbtc_supply_sats: string | null
|
|
1804
1804
|
};
|
|
1805
|
-
type SbtcDepositsEnvelope = {
|
|
1806
|
-
deposits:
|
|
1805
|
+
type SbtcDepositsEnvelope<TRow = IndexSbtcDeposit> = {
|
|
1806
|
+
deposits: TRow[]
|
|
1807
1807
|
next_cursor: string | null
|
|
1808
1808
|
tip: IndexTip
|
|
1809
1809
|
reorgs: IndexReorg[]
|
|
@@ -1847,7 +1847,17 @@ type SbtcDepositsListParams = {
|
|
|
1847
1847
|
bitcoinTxid?: string
|
|
1848
1848
|
fromHeight?: number
|
|
1849
1849
|
toHeight?: number
|
|
1850
|
+
/**
|
|
1851
|
+
* Columns to return. The server projects the row, so an unrequested column
|
|
1852
|
+
* is physically absent — and the narrowing overload on `list` makes reading
|
|
1853
|
+
* one a compile error rather than `undefined` at runtime.
|
|
1854
|
+
*/
|
|
1855
|
+
fields?: readonly (keyof IndexSbtcDeposit & string)[]
|
|
1850
1856
|
};
|
|
1857
|
+
/** Deposit columns that survive any projection — pagination needs them. */
|
|
1858
|
+
type SbtcDepositAlwaysFields = "cursor" | "block_height";
|
|
1859
|
+
/** A deposit row narrowed to the requested columns plus the always-present ones. */
|
|
1860
|
+
type SbtcDepositFields<F extends keyof IndexSbtcDeposit & string> = Pick<IndexSbtcDeposit, (F | SbtcDepositAlwaysFields) & keyof IndexSbtcDeposit>;
|
|
1851
1861
|
type SbtcDepositsWalkParams = Omit<SbtcDepositsListParams, "limit"> & {
|
|
1852
1862
|
batchSize?: number
|
|
1853
1863
|
signal?: AbortSignal
|
|
@@ -1892,6 +1902,11 @@ type SbtcDepositsConsumeParams<TTx = never> = Omit<SbtcDepositsListParams, "curs
|
|
|
1892
1902
|
* events, scoreboard). The only productized decoded sBTC peg feed on Stacks. */
|
|
1893
1903
|
interface SbtcResource {
|
|
1894
1904
|
deposits: {
|
|
1905
|
+
/** Narrowing overload: `fields` shrinks the row type to exactly the
|
|
1906
|
+
* requested columns plus {@link SbtcDepositAlwaysFields}. */
|
|
1907
|
+
list<const F extends keyof IndexSbtcDeposit & string>(params: SbtcDepositsListParams & {
|
|
1908
|
+
fields: readonly F[]
|
|
1909
|
+
}): Promise<SbtcDepositsEnvelope<SbtcDepositFields<F>>>
|
|
1895
1910
|
list(params?: SbtcDepositsListParams): Promise<SbtcDepositsEnvelope>
|
|
1896
1911
|
walk(params?: SbtcDepositsWalkParams): AsyncIterable<IndexSbtcDeposit>
|
|
1897
1912
|
/** Checkpointed sweep of completed deposits — append-only, so safe to
|
package/dist/index.js
CHANGED
|
@@ -1229,7 +1229,8 @@ class Index extends BaseClient {
|
|
|
1229
1229
|
sender: params.sender,
|
|
1230
1230
|
bitcoin_txid: params.bitcoinTxid,
|
|
1231
1231
|
from_height: params.fromHeight,
|
|
1232
|
-
to_height: params.toHeight
|
|
1232
|
+
to_height: params.toHeight,
|
|
1233
|
+
fields: params.fields?.join(",")
|
|
1233
1234
|
})}`);
|
|
1234
1235
|
}
|
|
1235
1236
|
walkSbtcDeposits(params = {}) {
|
|
@@ -2877,5 +2878,5 @@ export {
|
|
|
2877
2878
|
ApiError
|
|
2878
2879
|
};
|
|
2879
2880
|
|
|
2880
|
-
//# debugId=
|
|
2881
|
+
//# debugId=F96DBA9B81801E0B64756E2164756E21
|
|
2881
2882
|
//# sourceMappingURL=index.js.map
|