@secondlayer/sdk 6.50.0 → 6.52.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 CHANGED
@@ -93,10 +93,12 @@ declare class Subgraphs extends BaseClient {
93
93
  openapi(name: string, options?: SubgraphSpecOptions): Promise<Record<string, unknown>>;
94
94
  schema(name: string, options?: SubgraphSpecOptions): Promise<SubgraphAgentSchema>;
95
95
  markdown(name: string, options?: SubgraphSpecOptions): Promise<string>;
96
- reindex(name: string, options?: {
97
- fromBlock?: number;
98
- toBlock?: number;
99
- }): Promise<ReindexResponse>;
96
+ /**
97
+ * Reindex always drops and rebuilds the whole subgraph, so it takes no
98
+ * block range — the API rejects one with `REINDEX_RANGE_NOT_SUPPORTED`.
99
+ * Use {@link backfill} to process a specific range.
100
+ */
101
+ reindex(name: string): Promise<ReindexResponse>;
100
102
  stop(name: string): Promise<{
101
103
  message: string;
102
104
  operationId?: string;
@@ -1833,6 +1835,8 @@ type MempoolListParams = {
1833
1835
  type?: string;
1834
1836
  /** Filter to pending calls to a single contract (e.g. `SP….contract`). */
1835
1837
  contractId?: string;
1838
+ /** Filter to pending calls to a single function (composes with `contractId`). */
1839
+ functionName?: string;
1836
1840
  };
1837
1841
  type MempoolWalkParams = Omit<MempoolListParams, "limit"> & {
1838
1842
  batchSize?: number;
package/dist/index.js CHANGED
@@ -367,8 +367,8 @@ class Subgraphs extends BaseClient {
367
367
  async markdown(name, options) {
368
368
  return this.requestText("GET", `/api/subgraphs/${name}/docs.md${buildSpecQueryString(options)}`);
369
369
  }
370
- async reindex(name, options) {
371
- return this.request("POST", `/api/subgraphs/${name}/reindex`, options);
370
+ async reindex(name) {
371
+ return this.request("POST", `/api/subgraphs/${name}/reindex`);
372
372
  }
373
373
  async stop(name) {
374
374
  return this.request("POST", `/api/subgraphs/${name}/stop`);
@@ -1254,7 +1254,8 @@ class Index extends BaseClient {
1254
1254
  limit: params.limit,
1255
1255
  sender: params.sender,
1256
1256
  type: params.type,
1257
- contract_id: params.contractId
1257
+ contract_id: params.contractId,
1258
+ function_name: params.functionName
1258
1259
  })}`);
1259
1260
  }
1260
1261
  async getMempoolTx(txId) {
@@ -2929,5 +2930,5 @@ export {
2929
2930
  ApiError
2930
2931
  };
2931
2932
 
2932
- //# debugId=FF0374F12DD08F8A64756E2164756E21
2933
+ //# debugId=16C05126967D2E7464756E2164756E21
2933
2934
  //# sourceMappingURL=index.js.map