@secondlayer/sdk 6.42.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/subgraphs/index.d.ts +17 -2
- package/dist/subgraphs/index.js +3 -2
- package/dist/subgraphs/index.js.map +3 -3
- package/package.json +1 -1
|
@@ -1714,8 +1714,8 @@ type IndexSbtcSummary = {
|
|
|
1714
1714
|
total_locked_sats: string
|
|
1715
1715
|
sbtc_supply_sats: string | null
|
|
1716
1716
|
};
|
|
1717
|
-
type SbtcDepositsEnvelope = {
|
|
1718
|
-
deposits:
|
|
1717
|
+
type SbtcDepositsEnvelope<TRow = IndexSbtcDeposit> = {
|
|
1718
|
+
deposits: TRow[]
|
|
1719
1719
|
next_cursor: string | null
|
|
1720
1720
|
tip: IndexTip
|
|
1721
1721
|
reorgs: IndexReorg[]
|
|
@@ -1759,7 +1759,17 @@ type SbtcDepositsListParams = {
|
|
|
1759
1759
|
bitcoinTxid?: string
|
|
1760
1760
|
fromHeight?: number
|
|
1761
1761
|
toHeight?: number
|
|
1762
|
+
/**
|
|
1763
|
+
* Columns to return. The server projects the row, so an unrequested column
|
|
1764
|
+
* is physically absent — and the narrowing overload on `list` makes reading
|
|
1765
|
+
* one a compile error rather than `undefined` at runtime.
|
|
1766
|
+
*/
|
|
1767
|
+
fields?: readonly (keyof IndexSbtcDeposit & string)[]
|
|
1762
1768
|
};
|
|
1769
|
+
/** Deposit columns that survive any projection — pagination needs them. */
|
|
1770
|
+
type SbtcDepositAlwaysFields = "cursor" | "block_height";
|
|
1771
|
+
/** A deposit row narrowed to the requested columns plus the always-present ones. */
|
|
1772
|
+
type SbtcDepositFields<F extends keyof IndexSbtcDeposit & string> = Pick<IndexSbtcDeposit, (F | SbtcDepositAlwaysFields) & keyof IndexSbtcDeposit>;
|
|
1763
1773
|
type SbtcDepositsWalkParams = Omit<SbtcDepositsListParams, "limit"> & {
|
|
1764
1774
|
batchSize?: number
|
|
1765
1775
|
signal?: AbortSignal
|
|
@@ -1804,6 +1814,11 @@ type SbtcDepositsConsumeParams<TTx = never> = Omit<SbtcDepositsListParams, "curs
|
|
|
1804
1814
|
* events, scoreboard). The only productized decoded sBTC peg feed on Stacks. */
|
|
1805
1815
|
interface SbtcResource {
|
|
1806
1816
|
deposits: {
|
|
1817
|
+
/** Narrowing overload: `fields` shrinks the row type to exactly the
|
|
1818
|
+
* requested columns plus {@link SbtcDepositAlwaysFields}. */
|
|
1819
|
+
list<const F extends keyof IndexSbtcDeposit & string>(params: SbtcDepositsListParams & {
|
|
1820
|
+
fields: readonly F[]
|
|
1821
|
+
}): Promise<SbtcDepositsEnvelope<SbtcDepositFields<F>>>
|
|
1807
1822
|
list(params?: SbtcDepositsListParams): Promise<SbtcDepositsEnvelope>
|
|
1808
1823
|
walk(params?: SbtcDepositsWalkParams): AsyncIterable<IndexSbtcDeposit>
|
|
1809
1824
|
/** Checkpointed sweep of completed deposits — append-only, so safe to
|
package/dist/subgraphs/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 = {}) {
|
|
@@ -2181,5 +2182,5 @@ export {
|
|
|
2181
2182
|
Subgraphs
|
|
2182
2183
|
};
|
|
2183
2184
|
|
|
2184
|
-
//# debugId=
|
|
2185
|
+
//# debugId=E63059793EB272A464756E2164756E21
|
|
2185
2186
|
//# sourceMappingURL=index.js.map
|