@secondlayer/sdk 6.25.1 → 6.26.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
@@ -988,6 +988,16 @@ type IndexEventBase = {
988
988
  tx_index: number
989
989
  event_index: number
990
990
  contract_id: string | null
991
+ /** Submitting-transaction context, present only when `txContext: true` was
992
+ * requested. `tx_sender` is the real tx sender — distinct from a transfer's
993
+ * asset `sender`, and the only place a `print` event's sender is available.
994
+ * Lets a consumer build per-event tx context without a `/v1/index/transactions`
995
+ * call per event. */
996
+ tx_sender?: string | null
997
+ tx_type?: string | null
998
+ tx_status?: string | null
999
+ tx_contract_id?: string | null
1000
+ tx_function_name?: string | null
991
1001
  };
992
1002
  type IndexFtTransfer = IndexEventBase & {
993
1003
  event_type: "ft_transfer"
@@ -1084,6 +1094,11 @@ type EventsListParams = {
1084
1094
  /** Restrict to contracts conforming to a trait/standard (e.g. "sip-010").
1085
1095
  * Mutually exclusive with contractId; contract-keyed event types only. */
1086
1096
  trait?: string
1097
+ /** Join the submitting transaction into each event — populates `tx_sender`,
1098
+ * `tx_type`, `tx_status`, `tx_contract_id`, `tx_function_name`. Off by default.
1099
+ * Avoids a `/v1/index/transactions` call per event; for `print` events it's
1100
+ * the only source of the submitting sender. */
1101
+ txContext?: boolean
1087
1102
  };
1088
1103
  type EventsWalkParams = Omit<EventsListParams, "limit"> & {
1089
1104
  batchSize?: number
package/dist/index.js CHANGED
@@ -768,6 +768,7 @@ class Index extends BaseClient {
768
768
  recipient: params.recipient,
769
769
  trait: params.trait,
770
770
  toHeight: params.toHeight,
771
+ txContext: params.txContext,
771
772
  cursor,
772
773
  fromHeight,
773
774
  limit
@@ -904,7 +905,8 @@ class Index extends BaseClient {
904
905
  recipient: params.recipient,
905
906
  from_height: params.fromHeight,
906
907
  to_height: params.toHeight,
907
- trait: params.trait
908
+ trait: params.trait,
909
+ tx_context: params.txContext ? "true" : undefined
908
910
  })}`);
909
911
  }
910
912
  async* walkEvents(params) {
@@ -2515,5 +2517,5 @@ export {
2515
2517
  ApiError
2516
2518
  };
2517
2519
 
2518
- //# debugId=9B0B41D8F5C2671064756E2164756E21
2520
+ //# debugId=997EE849532E462E64756E2164756E21
2519
2521
  //# sourceMappingURL=index.js.map