@secondlayer/sdk 14.4.0 → 14.5.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
@@ -1820,6 +1820,14 @@ type IndexStateWrite = {
1820
1820
  /** Full MARF key, e.g. `vm::<contract>::0::map::<hex>`. */
1821
1821
  key: string;
1822
1822
  value_hex: string;
1823
+ /** The writing transaction, present only when `txContext: true` was
1824
+ * passed; null for block-level writes. */
1825
+ tx_id?: string | null;
1826
+ tx_sender?: string | null;
1827
+ tx_type?: string | null;
1828
+ tx_status?: string | null;
1829
+ tx_contract_id?: string | null;
1830
+ tx_function_name?: string | null;
1823
1831
  };
1824
1832
  type StateWritesEnvelope = {
1825
1833
  state_writes: IndexStateWrite[];
@@ -1835,6 +1843,10 @@ type StateWritesListParams = {
1835
1843
  toHeight?: number;
1836
1844
  /** One block. Excludes `fromHeight`/`toHeight`; a cursor must sit at it. */
1837
1845
  blockHeight?: number;
1846
+ /** One contract (`<address>.<name>`): only keys under `vm::<contractId>::`. */
1847
+ contractId?: string;
1848
+ /** Join the writing transaction's `tx_*` fields onto each row. */
1849
+ txContext?: boolean;
1838
1850
  };
1839
1851
  type StateWritesWalkParams = Omit<StateWritesListParams, "limit"> & WalkOptions;
1840
1852
  /** A block resource. Metadata is intentionally thin — only chain-linkage and
@@ -2968,6 +2980,13 @@ interface SubgraphSource {
2968
2980
  name: string;
2969
2981
  version: string;
2970
2982
  sourceCode: string | null;
2983
+ /** The bundled handler the runtime executes; null for local deploys. */
2984
+ handlerCode?: string | null;
2985
+ /** sha256 of `pinPreimage`; null for local deploys. */
2986
+ pin?: string | null;
2987
+ /** The canonical JSON the pin hashes (handler hash, network, runtime,
2988
+ * schema hash, startBlock); null before it was stored. */
2989
+ pinPreimage?: string | null;
2971
2990
  readOnly: boolean;
2972
2991
  reason?: string;
2973
2992
  updatedAt: string;
package/dist/index.js CHANGED
@@ -1460,7 +1460,9 @@ class Index extends BaseClient {
1460
1460
  async listStateWrites(params = {}) {
1461
1461
  return this.request("GET", `/v1/index/state-writes${buildQuery({
1462
1462
  ...indexPageQuery(params),
1463
- block_height: params.blockHeight
1463
+ block_height: params.blockHeight,
1464
+ contract_id: params.contractId,
1465
+ tx_context: params.txContext ? "true" : undefined
1464
1466
  })}`, undefined, { signal: params.signal });
1465
1467
  }
1466
1468
  walkStateWrites(params = {}) {
@@ -3475,5 +3477,5 @@ export {
3475
3477
  verifyWebhookSignature
3476
3478
  };
3477
3479
 
3478
- //# debugId=9B9AA015232E3E2E64756E2164756E21
3480
+ //# debugId=D9B8A03B011C93A864756E2164756E21
3479
3481
  //# sourceMappingURL=index.js.map