@usearete/sdk 0.8.1 → 0.9.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
@@ -823,6 +823,8 @@ interface ProgramSdkDefinition {
823
823
  readonly constants?: unknown;
824
824
  readonly defaults?: unknown;
825
825
  readonly math?: unknown;
826
+ /** Managed-hosting transports. Absent for local/self-hosted generation. */
827
+ readonly gateway?: HostedSolanaGatewayBindings;
826
828
  }
827
829
  interface ProgramReleaseReference {
828
830
  readonly programReleaseHash: string;
@@ -906,6 +908,8 @@ interface StackDefinition<TPrograms extends Record<string, ProgramSdkDefinition>
906
908
  readonly programs?: TPrograms;
907
909
  /** Release and transport metadata keyed in parallel with `programs`. */
908
910
  readonly programReads?: ProgramReadDescriptors<TPrograms>;
911
+ /** Managed-hosting transports. Absent for local/self-hosted generation. */
912
+ readonly gateway?: HostedSolanaGatewayBindings;
909
913
  }
910
914
  interface ViewGroup {
911
915
  state?: ViewDef<any, 'state', any>;
@@ -2127,6 +2131,8 @@ interface SessionDefinition<TPrograms extends Record<string, ProgramSdkDefinitio
2127
2131
  readonly mode?: 'composition';
2128
2132
  readonly stacks?: Record<string, StackDefinition>;
2129
2133
  readonly programs?: TPrograms;
2134
+ /** Hosted chain and transaction capabilities shared by a generated composition. */
2135
+ readonly gateway?: HostedSolanaGatewayBindings;
2130
2136
  /** @deprecated Generated program cartridges carry defaults; use only for complete overrides. */
2131
2137
  readonly programReads?: ProgramReadDescriptors<TPrograms>;
2132
2138
  }
@@ -2182,13 +2188,21 @@ interface SessionOptions<TDef extends SessionDefinition = SessionDefinition, TSt
2182
2188
  /** Session-wide per-program overrides, keyed by program key. */
2183
2189
  programReads?: Readonly<Record<string, ProgramReadOverride>>;
2184
2190
  }
2185
- type CompositionSessionOptions<TDef extends SessionDefinition = SessionDefinition, TStackPrograms extends SessionStackPrograms<TDef> = {}> = Omit<SessionOptions<TDef, TStackPrograms>, 'chain' | 'transactions' | 'endpoints'> & {
2191
+ type CompositionSessionOptions<TDef extends SessionDefinition = SessionDefinition, TStackPrograms extends SessionStackPrograms<TDef> = {}> = Omit<SessionOptions<TDef, TStackPrograms>, 'chain' | 'transactions' | 'endpoints'> & (TDef extends {
2192
+ readonly gateway: HostedSolanaGatewayBindings;
2193
+ } ? {
2194
+ /** Explicit override for the generated hosted chain transport. */
2195
+ chain?: ChainClient;
2196
+ /** Explicit override for the generated hosted transaction transport. */
2197
+ transactions?: TransactionTransport;
2198
+ endpoints?: never;
2199
+ } : {
2186
2200
  /** Chain reads never inherit a live member's HTTP endpoint. */
2187
2201
  chain: ChainClient;
2188
2202
  /** Transactions never inherit a live member's HTTP endpoint. */
2189
2203
  transactions: TransactionTransport;
2190
2204
  endpoints?: never;
2191
- };
2205
+ });
2192
2206
  type SessionStacks<TDef extends SessionDefinition, TStackPrograms extends SessionStackPrograms<TDef> = {}> = {
2193
2207
  readonly [K in keyof NonNullable<TDef['stacks']>]: NonNullable<TDef['stacks']>[K] extends StackDefinition ? K extends keyof TStackPrograms ? ConnectedArete<StackWithAttachedPrograms<NonNullable<TDef['stacks']>[K], TStackPrograms[K]>, NonNullable<TDef['stacks']>[K]> : ConnectedArete<NonNullable<TDef['stacks']>[K], NonNullable<TDef['stacks']>[K]> : never;
2194
2208
  };