@usearete/sdk 0.24.0 → 0.25.1

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
@@ -751,15 +751,15 @@ declare function createInstructionHandler<TParams = Record<string, unknown>, TEr
751
751
  */
752
752
  interface BuildOptions {
753
753
  /** Wallet, used only for accounts explicitly marked with signerKind: 'wallet'. */
754
- wallet?: WalletAdapter;
754
+ wallet?: WalletAdapter | undefined;
755
755
  /** Explicit account-address overrides, including signer slots when needed. */
756
- accounts?: Record<string, string>;
756
+ accounts?: Record<string, string> | undefined;
757
757
  /**
758
758
  * Extra account metas appended after the instruction's declared accounts
759
759
  * (Anchor's `remainingAccounts`) — for routers, transfer hooks, and other
760
760
  * composition patterns the IDL cannot express.
761
761
  */
762
- remainingAccounts?: BuiltAccountMeta[];
762
+ remainingAccounts?: BuiltAccountMeta[] | undefined;
763
763
  }
764
764
  /**
765
765
  * Options for executing (building + sending) an instruction.
@@ -954,6 +954,17 @@ interface ProgramSdkDefinition {
954
954
  readonly programId?: string;
955
955
  /** Typed identity of generated program content. V2 excludes compiler provenance. */
956
956
  readonly sdkDefinitionHash?: string;
957
+ /**
958
+ * Program package release this SDK was generated from, for program SDKs
959
+ * installed from the registry. It is the program SDK's identity: a stack's
960
+ * embedded program and a standalone install with the same value are the same
961
+ * program, and the SDK runtime treats them as one when both are attached.
962
+ * Generated entries stamp it with `withProgramIdentity` after applying the
963
+ * package's own extension; `extendProgram`, `extendPrograms` and
964
+ * `withProgramRead` drop it, because a program changed outside its generated
965
+ * SDK is no longer provably that SDK.
966
+ */
967
+ readonly packageReleaseHash?: string;
957
968
  readonly programSpecHash?: string;
958
969
  readonly idlContentHash?: string;
959
970
  readonly normalizedIdlHash?: string;
@@ -1152,6 +1163,14 @@ interface WatchOptions<TSchema = unknown> {
1152
1163
  /** Maximum number of entities to include in snapshot */
1153
1164
  snapshotLimit?: number;
1154
1165
  }
1166
+ /** Options for the one-shot reads `get` and `getOne`. */
1167
+ interface GetOptions extends WatchOptions {
1168
+ /**
1169
+ * How long to wait for the initial snapshot before rejecting with
1170
+ * `InitialDataTimeoutError` (defaults to 5000). `null` waits forever.
1171
+ */
1172
+ timeoutMs?: number | null;
1173
+ }
1155
1174
  interface AreteOptions<TStack extends StackDefinition> {
1156
1175
  stack: TStack;
1157
1176
  /** Connect immediately when the client is created (defaults to true). */
@@ -1230,6 +1249,13 @@ interface AreteConfig {
1230
1249
  reconnectIntervals?: number[];
1231
1250
  maxReconnectAttempts?: number;
1232
1251
  initialSubscriptions?: Subscription[];
1252
+ /**
1253
+ * Entities kept per view; the oldest are dropped past it. `null` keeps all.
1254
+ * Keep it above the size of every subscription on a view: the server still
1255
+ * counts a dropped entity as held and sends only patches for it, which are
1256
+ * discarded (reported as `'evicted-key'` diagnostics), so it stays missing
1257
+ * until it re-enters the query or the subscription is re-established.
1258
+ */
1233
1259
  maxEntriesPerView?: number | null;
1234
1260
  /** Authentication configuration */
1235
1261
  auth?: AuthConfig;
@@ -1310,14 +1336,32 @@ interface TypedStateView<T, TKey = string> {
1310
1336
  use<TSchema = T>(key: TKey, options?: WatchOptions<TSchema>): AsyncIterable<TSchema>;
1311
1337
  watch(key: TKey, options?: WatchOptions): AsyncIterable<Update<T>>;
1312
1338
  watchRich(key: TKey, options?: WatchOptions): AsyncIterable<RichUpdate<T>>;
1313
- get(key: TKey, options?: WatchOptions): Promise<T | null>;
1339
+ /**
1340
+ * Open (or reuse) the equivalent subscription, wait for its initial
1341
+ * snapshot, and release it. Resolves `null` when the entity is absent.
1342
+ */
1343
+ get(key: TKey, options?: GetOptions): Promise<T | null>;
1344
+ /**
1345
+ * Read an already active equivalent subscription without waiting;
1346
+ * `undefined` when none is active (absent is not the same as empty).
1347
+ */
1314
1348
  getSync(key: TKey, options?: WatchOptions): T | null | undefined;
1315
1349
  }
1316
1350
  interface TypedListView<T> {
1317
1351
  use<TSchema = T>(options?: WatchOptions<TSchema>): AsyncIterable<TSchema>;
1318
1352
  watch(options?: WatchOptions): AsyncIterable<Update<T>>;
1319
1353
  watchRich(options?: WatchOptions): AsyncIterable<RichUpdate<T>>;
1320
- get(options?: WatchOptions): Promise<T[]>;
1354
+ /**
1355
+ * Open (or reuse) the equivalent subscription, wait for its initial
1356
+ * snapshot, and release it.
1357
+ */
1358
+ get(options?: GetOptions): Promise<T[]>;
1359
+ /** Like `get` with `take: 1`: the first item, or `null` when the list is empty. */
1360
+ getOne(options?: Omit<GetOptions, 'take'>): Promise<T | null>;
1361
+ /**
1362
+ * Read an already active equivalent subscription without waiting;
1363
+ * `undefined` when none is active (absent is not the same as empty).
1364
+ */
1321
1365
  getSync(options?: WatchOptions): T[] | undefined;
1322
1366
  }
1323
1367
  type SubscribeCallback<T> = (update: Update<T>) => void;
@@ -1356,6 +1400,12 @@ interface SubscribedFrame extends IdentifiedFrame {
1356
1400
  sort?: SortConfig;
1357
1401
  /** Present on append views backed by the journal. */
1358
1402
  replayWindow?: ReplayWindow;
1403
+ /**
1404
+ * The server sends a key whole (`upsert` or a snapshot row) before any
1405
+ * `patch` for it, so a patch for a key the client does not hold can be
1406
+ * dropped. Older servers omit it; their patches for unknown keys are kept.
1407
+ */
1408
+ wholeEntities?: boolean;
1359
1409
  }
1360
1410
  interface UnsubscribedFrame extends IdentifiedFrame {
1361
1411
  op: 'unsubscribed';
@@ -1625,6 +1675,11 @@ declare class ProcessedSlotTimeoutError extends Error {
1625
1675
  constructor(targetSlot: bigint, processedSlot: bigint | null);
1626
1676
  }
1627
1677
  interface FrameProcessorConfig {
1678
+ /**
1679
+ * Entities kept per view (see `AreteConfig.maxEntriesPerView`). Keep it
1680
+ * above every subscription's size: patches for an entity dropped here are
1681
+ * discarded until the server sends it whole again.
1682
+ */
1628
1683
  maxEntriesPerView?: number | null;
1629
1684
  /**
1630
1685
  * Interval in milliseconds to buffer frames before flushing to storage.
@@ -1638,9 +1693,13 @@ interface FrameProcessorConfig {
1638
1693
  schemas?: Record<string, Schema<unknown>>;
1639
1694
  patchSchemas?: Record<string, Schema<unknown>>;
1640
1695
  queryStore?: QueryStore;
1641
- /** Whether rejected frames should also be written to `console.warn`. */
1696
+ /** Whether schema-rejected frames should also be written to `console.warn`. */
1642
1697
  warnOnValidationError?: boolean;
1643
- /** Receives structured details whenever a generated schema rejects a frame. */
1698
+ /**
1699
+ * Receives structured details whenever a frame is not stored: a generated
1700
+ * schema rejected it, or it was a `patch` for a key the client holds no
1701
+ * entity for.
1702
+ */
1644
1703
  onValidationError?: (diagnostic: FrameValidationDiagnostic) => void;
1645
1704
  }
1646
1705
  interface FrameValidationDiagnostic {
@@ -1648,6 +1707,25 @@ interface FrameValidationDiagnostic {
1648
1707
  readonly key?: string;
1649
1708
  readonly seq?: string;
1650
1709
  readonly operation: 'snapshot' | 'upsert' | 'patch';
1710
+ /**
1711
+ * Why the frame was not stored. `'schema'`: a generated schema rejected it.
1712
+ * `'unknown-key'`: a `patch` for a key the client never received. A patch
1713
+ * is a partial entity, so it is discarded; the entity appears when the
1714
+ * server sends a full `upsert` for the key. `'evicted-key'`: a `patch` for a
1715
+ * key this client dropped to stay within `maxEntriesPerView`. The server
1716
+ * still counts the client as holding it, so it keeps sending patches and
1717
+ * sends no `upsert` until the key re-enters the query or the subscription
1718
+ * is re-established; raise `maxEntriesPerView` above the subscription's
1719
+ * size to avoid this.
1720
+ *
1721
+ * Patches are discarded only when the server's `subscribed` acknowledgement
1722
+ * carries `wholeEntities: true`; with an older server a patch for an unknown
1723
+ * key is stored as the entity, as before. Replayable append-view records
1724
+ * (frames with an `offset`) are events and are never discarded this way.
1725
+ * `'schema'` diagnostics, and the first `'evicted-key'` one per view, are
1726
+ * written to `console.warn` when `warnOnValidationError` is on.
1727
+ */
1728
+ readonly reason: 'schema' | 'unknown-key' | 'evicted-key';
1651
1729
  readonly error: unknown;
1652
1730
  }
1653
1731
  declare class FrameProcessor {
@@ -1665,6 +1743,15 @@ declare class FrameProcessor {
1665
1743
  private latestProcessedSlot;
1666
1744
  private processedSlotWaiters;
1667
1745
  private cursors;
1746
+ /**
1747
+ * Whether the server's latest acknowledgement guaranteed whole entities.
1748
+ * One connection talks to one server, so its latest ack speaks for every
1749
+ * subscription on it; a reconnect re-acknowledges each one.
1750
+ */
1751
+ private serverSendsWholeEntities;
1752
+ /** Keys dropped by `maxEntriesPerView`, per view, oldest first; bounded. */
1753
+ private evictedKeys;
1754
+ private warnedEvictedViews;
1668
1755
  /**
1669
1756
  * Observe the connection's cursor tracker instead of a private one.
1670
1757
  *
@@ -1676,6 +1763,7 @@ declare class FrameProcessor {
1676
1763
  constructor(storage: StorageAdapter, config?: FrameProcessorConfig);
1677
1764
  private getSchema;
1678
1765
  private normalizeEntity;
1766
+ private reportDiagnostic;
1679
1767
  private hasSchema;
1680
1768
  private normalizePathSegment;
1681
1769
  private normalizePath;
@@ -1684,6 +1772,17 @@ declare class FrameProcessor {
1684
1772
  private extractSeq;
1685
1773
  private getInternalSeq;
1686
1774
  private compareSeq;
1775
+ private extractVersion;
1776
+ private getInternalVersion;
1777
+ /**
1778
+ * Whether a frame at `incoming` is one this client already applied, or older.
1779
+ * A version is `{epoch}:{counter}`, and counters compare only within an
1780
+ * epoch: a server restart or a reloaded stack starts a new one, whose first
1781
+ * frame is newer than anything from the old one. A version that does not
1782
+ * parse cannot be ordered and is never stale.
1783
+ */
1784
+ private isStaleVersion;
1785
+ private attachInternalVersion;
1687
1786
  private attachInternalSeq;
1688
1787
  handleFrame<T>(frame: Frame<T>): void;
1689
1788
  /**
@@ -1715,6 +1814,13 @@ declare class FrameProcessor {
1715
1814
  private emitRichUpdate;
1716
1815
  private createRichUpdate;
1717
1816
  private enforceMaxEntries;
1817
+ /**
1818
+ * Remember a key `maxEntriesPerView` dropped, so a later patch for it can be
1819
+ * reported as such. At most `limit` keys per view, most recent kept.
1820
+ */
1821
+ private rememberEvicted;
1822
+ private forgetEvicted;
1823
+ private reportDiscardedPatch;
1718
1824
  }
1719
1825
 
1720
1826
  interface NormalizedSubscriptionRequest {
@@ -1732,6 +1838,8 @@ declare class SubscriptionRegistry {
1732
1838
  private readonly queryStore;
1733
1839
  private readonly subscriptions;
1734
1840
  private readonly subscriptionsById;
1841
+ private readonly failureListeners;
1842
+ private connectionError;
1735
1843
  constructor(connection: ConnectionManager, queryStore: QueryStore);
1736
1844
  subscribe(query: SubscriptionQuery, snapshotEnabled?: boolean): QueryLease;
1737
1845
  refresh(query: SubscriptionQuery, snapshotEnabled?: boolean): Promise<void>;
@@ -1744,8 +1852,16 @@ declare class SubscriptionRegistry {
1744
1852
  getRefCount(query: SubscriptionQuery, snapshotEnabled?: boolean): number;
1745
1853
  getActiveSubscriptions(): Subscription[];
1746
1854
  getSnapshot<T>(query: SubscriptionQuery, snapshotEnabled?: boolean): QuerySnapshot<T> | undefined;
1747
- handleConnectionState(state: ConnectionState): void;
1855
+ handleConnectionState(state: ConnectionState, message?: string): void;
1856
+ /** The terminal connection failure while the connection is in the `error` state. */
1857
+ getConnectionError(): AreteError | undefined;
1858
+ /**
1859
+ * Called when pending queries can no longer resolve: the connection failed
1860
+ * terminally, or a disconnect cleared every subscription.
1861
+ */
1862
+ onFailure(callback: (error: AreteError) => void): UnsubscribeFn;
1748
1863
  clear(): void;
1864
+ private notifyFailure;
1749
1865
  private createLease;
1750
1866
  private getTracker;
1751
1867
  private refreshTracker;
@@ -1904,18 +2020,18 @@ interface CreatePreparedInstructionInput<TArtifacts> {
1904
2020
  name: string;
1905
2021
  instruction: BuiltInstruction;
1906
2022
  artifacts: TArtifacts;
1907
- requiredSignerAddresses?: readonly string[];
1908
- signers?: readonly unknown[];
1909
- errors?: readonly ErrorMetadata[];
2023
+ requiredSignerAddresses?: readonly string[] | undefined;
2024
+ signers?: readonly unknown[] | undefined;
2025
+ errors?: readonly ErrorMetadata[] | undefined;
1910
2026
  }
1911
2027
  type PreparedTransactionInstruction = BuiltInstruction | PreparedInstruction<unknown>;
1912
2028
  type PreparedTransactionOperation = PreparedInstruction<unknown> | PreparedTransaction<unknown>;
1913
2029
  interface CreatePreparedTransactionBaseInput<TArtifacts> {
1914
2030
  name: string;
1915
2031
  artifacts: TArtifacts;
1916
- requiredSignerAddresses?: readonly string[];
1917
- signers?: readonly unknown[];
1918
- errors?: readonly ErrorMetadata[];
2032
+ requiredSignerAddresses?: readonly string[] | undefined;
2033
+ signers?: readonly unknown[] | undefined;
2034
+ errors?: readonly ErrorMetadata[] | undefined;
1919
2035
  }
1920
2036
  type CreatePreparedTransactionInput<TArtifacts> = CreatePreparedTransactionBaseInput<TArtifacts> & ({
1921
2037
  instructions: readonly PreparedTransactionInstruction[];
@@ -1932,9 +2048,9 @@ interface CreatePreparedFlowInput<TArtifacts> {
1932
2048
  declare function createPreparedTransactionBody(input: {
1933
2049
  name: string;
1934
2050
  instructions: readonly BuiltInstruction[];
1935
- requiredSignerAddresses?: readonly string[];
1936
- signers?: readonly unknown[];
1937
- errors?: readonly ErrorMetadata[];
2051
+ requiredSignerAddresses?: readonly string[] | undefined;
2052
+ signers?: readonly unknown[] | undefined;
2053
+ errors?: readonly ErrorMetadata[] | undefined;
1938
2054
  }): PreparedTransactionBody;
1939
2055
  declare function createPreparedInstruction<TArtifacts>(input: CreatePreparedInstructionInput<TArtifacts>): PreparedInstruction<TArtifacts>;
1940
2056
  declare function createPreparedTransaction<TArtifacts>(input: CreatePreparedTransactionInput<TArtifacts>): PreparedTransaction<TArtifacts>;
@@ -2075,6 +2191,34 @@ declare function instructionOperation<TInput, TArtifacts>(prepare: (input: TInpu
2075
2191
  declare function transactionOperation<TInput, TArtifacts>(prepare: (input: TInput) => MaybePromise<PreparedTransaction<TArtifacts>>): TransactionOperation<TInput, TArtifacts>;
2076
2192
  declare function flowOperation<TInput, TArtifacts>(prepare: (input: TInput) => MaybePromise<PreparedFlow<TArtifacts>>): FlowOperation<TInput, TArtifacts>;
2077
2193
 
2194
+ /**
2195
+ * Version of the extension contract: `defineStackExtensions`,
2196
+ * `defineProgramExtensions`, `extendProgram`, `extendPrograms`, `extendStack`,
2197
+ * `withProgramRead`, and the instruction helpers generated code imports
2198
+ * (`createInstructionHandler`, `buildInstruction`, `instructionOperation`,
2199
+ * `createPreparedInstruction`, the PDA and read helpers, …).
2200
+ *
2201
+ * It only changes on a breaking change to that contract, so generated SDKs and
2202
+ * extensions built for one value keep working with every SDK release that
2203
+ * exports the same value. The same number is published in this package's
2204
+ * `package.json` as `arete.extensionApi` for tools that read `node_modules`.
2205
+ */
2206
+ declare const EXTENSION_API_VERSION: 1;
2207
+ /**
2208
+ * Runtime extension carriers live under registry symbols (`Symbol.for`), so
2209
+ * two copies of this module still read each other's definitions. The
2210
+ * properties are enumerable: `{ ...stack }` and `{ ...program }` keep them,
2211
+ * while `Object.keys`, `for…in` and `JSON.stringify` never see a symbol key.
2212
+ *
2213
+ * The constants are typed as their historical property names rather than as
2214
+ * `unique symbol`. Generated program SDKs use them as computed keys inside
2215
+ * object literals, and TypeScript can only name a `unique symbol` key in
2216
+ * emitted declarations from a file that imports it; a string-literal key type
2217
+ * keeps every generated `.d.ts` nameable and identical across module copies.
2218
+ * Always read and write these properties through the constants (or
2219
+ * `getStackRuntimeExtensions` / `getProgramRuntimeExtensions`), never by the
2220
+ * literal name.
2221
+ */
2078
2222
  declare const STACK_RUNTIME_EXTENSIONS: "__areteStackRuntimeExtensions";
2079
2223
  declare const PROGRAM_OPERATION_EXTENSIONS: "__areteProgramOperationExtensions";
2080
2224
  type EmptyRecord = Record<string, never>;
@@ -2092,6 +2236,13 @@ type MaybeField<TKey extends string, TValue> = [TValue] extends [never] ? {} : {
2092
2236
  readonly [K in TKey]: TValue;
2093
2237
  };
2094
2238
  type Field<TValue, TKey extends PropertyKey> = TKey extends keyof TValue ? TValue[TKey] : never;
2239
+ /**
2240
+ * A field an extension provides. The helpers skip an extension value that is
2241
+ * `undefined`, so an optional field is never `undefined` on the result either
2242
+ * (which `exactOptionalPropertyTypes` would reject where the result is used as
2243
+ * a `ProgramSdkDefinition`).
2244
+ */
2245
+ type ExtensionField<TValue, TKey extends PropertyKey> = Exclude<Field<TValue, TKey>, undefined>;
2095
2246
  type DeepMerge<TBase, TExtension> = TBase extends Record<string, unknown> ? TExtension extends Record<string, unknown> ? Omit<TBase, keyof TExtension> & {
2096
2247
  readonly [K in keyof TExtension]: K extends keyof TBase ? DeepMerge<TBase[K], TExtension[K]> : TExtension[K];
2097
2248
  } : TExtension : TExtension;
@@ -2143,7 +2294,7 @@ type DefinedProgramExtensions<TBase extends ProgramSdkDefinition, TAddresses, TC
2143
2294
  readonly createRead?: (context: ProgramOperationContext<ExtendedProgramDefinition<TBase, TAddresses, TConstants, TDefaults, ProgramOperations, TMath, never>>) => TRead;
2144
2295
  };
2145
2296
  declare function defineProgramExtensions<TBase extends ProgramSdkDefinition>(): <TAddresses = never, TConstants = never, TDefaults = never, TOperations extends AnyProgramOperations = ProgramOperations, TMath = never, TRead = never>(extensions: DefinedProgramExtensions<TBase, TAddresses, TConstants, TDefaults, TOperations, TMath, TRead>) => DefinedProgramExtensions<TBase, TAddresses, TConstants, TDefaults, TOperations, TMath, TRead>;
2146
- declare function extendProgram<TBase extends ProgramSdkDefinition, TExtension extends ProgramExtensionInput<any, any, any, any, any, any, any>>(program: TBase, extensions: TExtension): ExtendedProgramDefinition<TBase, MergeField<Field<TBase, 'addresses'>, Field<TExtension, 'addresses'>>, MergeField<Field<TBase, 'constants'>, Field<TExtension, 'constants'>>, MergeField<Field<TBase, 'defaults'>, Field<TExtension, 'defaults'>>, Extract<FactoryReturn<TExtension, 'createOperations'>, AnyProgramOperations>, MergeField<Field<TBase, 'math'>, Field<TExtension, 'math'>>, FactoryReturn<TExtension, 'createRead'>>;
2297
+ declare function extendProgram<TBase extends ProgramSdkDefinition, TExtension extends ProgramExtensionInput<any, any, any, any, any, any, any>>(program: TBase, extensions: TExtension): ExtendedProgramDefinition<TBase, MergeField<Field<TBase, 'addresses'>, ExtensionField<TExtension, 'addresses'>>, MergeField<Field<TBase, 'constants'>, ExtensionField<TExtension, 'constants'>>, MergeField<Field<TBase, 'defaults'>, ExtensionField<TExtension, 'defaults'>>, Extract<FactoryReturn<TExtension, 'createOperations'>, AnyProgramOperations>, MergeField<Field<TBase, 'math'>, ExtensionField<TExtension, 'math'>>, FactoryReturn<TExtension, 'createRead'>>;
2147
2298
  declare function extendPrograms<TPrograms extends Record<string, ProgramSdkDefinition>, TExtensions extends Partial<{
2148
2299
  [K in keyof TPrograms]: ProgramExtensionInput<any, any, any, any, any, any, any>;
2149
2300
  }>>(programs: TPrograms, extensions: TExtensions): {
@@ -2182,13 +2333,29 @@ declare function defineStackExtensions<TBase extends StackDefinition>(): <const
2182
2333
  readonly createRead?: (client: StackExtensionClient<TBase, any, any, any, any>) => unknown;
2183
2334
  readonly createFlows?: (client: StackExtensionClient<TBase, any, any, any, any>) => FlowOperationNamespace | EmptyRecord;
2184
2335
  }) => TExtension;
2185
- declare function extendStack<TBase extends StackDefinition, TExtension extends StackExtensionInput<any, any, any, any, any, any, any>>(stack: TBase, extensions: TExtension & ReadArgumentCountRequirement<TExtension>): ExtendedStackDefinition<TBase, MergeField<Field<TBase, 'addresses'>, Field<TExtension, 'addresses'>>, MergeField<Field<TBase, 'constants'>, Field<TExtension, 'constants'>>, MergeField<Field<TBase, 'defaults'>, Field<TExtension, 'defaults'>>, MergeField<Field<TBase, 'math'>, Field<TExtension, 'math'>>, MergeField<StackReadOf<TBase>, FactoryReturn<TExtension, 'createRead'>>, Extract<MergeField<StackFlowsOf<TBase>, FactoryReturn<TExtension, 'createFlows'>>, FlowOperationNamespace | EmptyRecord>>;
2336
+ declare function extendStack<TBase extends StackDefinition, TExtension extends StackExtensionInput<any, any, any, any, any, any, any>>(stack: TBase, extensions: TExtension & ReadArgumentCountRequirement<TExtension>): ExtendedStackDefinition<TBase, MergeField<Field<TBase, 'addresses'>, ExtensionField<TExtension, 'addresses'>>, MergeField<Field<TBase, 'constants'>, ExtensionField<TExtension, 'constants'>>, MergeField<Field<TBase, 'defaults'>, ExtensionField<TExtension, 'defaults'>>, MergeField<Field<TBase, 'math'>, ExtensionField<TExtension, 'math'>>, MergeField<StackReadOf<TBase>, FactoryReturn<TExtension, 'createRead'>>, Extract<MergeField<StackFlowsOf<TBase>, FactoryReturn<TExtension, 'createFlows'>>, FlowOperationNamespace | EmptyRecord>>;
2186
2337
  declare function getStackRuntimeExtensions<TStack extends StackDefinition>(stack: TStack): StackRuntimeExtensions<StackReadOf<TStack>> | undefined;
2187
2338
  declare function applyConnectedStackExtensions<TClient extends object, TStack extends StackDefinition>(client: TClient, stack: TStack): ConnectedStackClient<TClient, TStack>;
2188
2339
 
2189
2340
  type ProgramMap = Record<string, ProgramSdkDefinition>;
2190
2341
  type NormalizeProgramMap<TPrograms> = TPrograms extends ProgramMap ? TPrograms : Record<string, never>;
2191
- type MergeProgramMaps<TStackPrograms, TAttachedPrograms> = Omit<NormalizeProgramMap<TAttachedPrograms>, keyof NormalizeProgramMap<TStackPrograms>> & NormalizeProgramMap<TStackPrograms>;
2342
+ /**
2343
+ * The keys a program map names, leaving out an index signature. `keyof` of
2344
+ * `Record<string, never>` (nothing attached) or of a wide
2345
+ * `Record<string, ProgramSdkDefinition>` is `string`, which would omit every
2346
+ * program a stack provides.
2347
+ */
2348
+ type NamedProgramKeys<TPrograms> = keyof {
2349
+ [K in keyof TPrograms as string extends K ? never : number extends K ? never : K]: unknown;
2350
+ };
2351
+ /**
2352
+ * A stack's programs with attached programs added. An attached program under a
2353
+ * key the stack provides takes that key: it is either the same program SDK
2354
+ * (identical at runtime) or one with the same program spec that could not be
2355
+ * proven identical, which the runtime uses in place of the stack's. Keys the
2356
+ * attached map does not name keep the stack's program types.
2357
+ */
2358
+ type MergeProgramMaps<TStackPrograms, TAttachedPrograms> = Omit<NormalizeProgramMap<TStackPrograms>, NamedProgramKeys<NormalizeProgramMap<TAttachedPrograms>>> & NormalizeProgramMap<TAttachedPrograms>;
2192
2359
  type StackWithAttachedPrograms<TStack extends StackDefinition, TAttachedPrograms extends ProgramMap | undefined> = Omit<TStack, 'programs'> & {
2193
2360
  programs: MergeProgramMaps<TStack['programs'], TAttachedPrograms>;
2194
2361
  };
@@ -2226,7 +2393,13 @@ interface ConnectOptions<TPrograms extends ProgramMap | undefined = undefined, T
2226
2393
  wallet?: WalletAdapter;
2227
2394
  /** Optional fetch implementation for HTTP point reads. */
2228
2395
  fetch?: typeof fetch;
2229
- /** Additional program SDKs exposed under client.programs.<key>. */
2396
+ /**
2397
+ * Additional program SDKs exposed under client.programs.<key>. Under a key
2398
+ * the stack already provides, the same program SDK (the same object or the
2399
+ * same `packageReleaseHash`) resolves to the stack's; a program with the
2400
+ * same `programSpecHash` that cannot be proven identical replaces it, with a
2401
+ * warning; anything else throws `PROGRAM_KEY_CONFLICT`.
2402
+ */
2230
2403
  programs?: TPrograms;
2231
2404
  /** Per-program complete descriptor replacements. */
2232
2405
  programReads?: ProgramReadOverrides<MergeProgramMaps<TStackPrograms, TPrograms>>;
@@ -2419,6 +2592,17 @@ declare class Arete$1<TStack extends StackDefinition> {
2419
2592
  interface SessionDefinition<TPrograms extends Record<string, ProgramSdkDefinition> = Record<string, ProgramSdkDefinition>> {
2420
2593
  readonly mode?: 'composition';
2421
2594
  readonly stacks?: Record<string, StackDefinition>;
2595
+ /**
2596
+ * Standalone program SDKs, available at `session.programs.<key>`. Under a key
2597
+ * a stack also provides, the same program SDK (the same object or the same
2598
+ * `packageReleaseHash`) is served from the stack's connected instance, unless
2599
+ * this definition's `programReads.<key>` resolves to a descriptor other than
2600
+ * the one the stack reads through. That program, or one with the same
2601
+ * `programSpecHash` that cannot be proven identical, takes
2602
+ * `session.programs.<key>` with its own read configuration, with a warning,
2603
+ * while `session.stacks.<stack>.programs.<key>` keeps the stack's; anything
2604
+ * else throws `PROGRAM_KEY_CONFLICT`.
2605
+ */
2422
2606
  readonly programs?: TPrograms;
2423
2607
  /** Hosted chain and transaction capabilities shared by a generated composition. */
2424
2608
  readonly gateway?: HostedSolanaGatewayBindings;
@@ -2526,10 +2710,57 @@ declare function createSession<TDef extends SessionDefinition, TStackPrograms ex
2526
2710
  /**
2527
2711
  * Bundle a generated program definition with its default read descriptor.
2528
2712
  *
2529
- * Generated SDK entries call this automatically. The descriptor is deliberately
2530
- * non-enumerable so it remains an implementation detail of the program cartridge.
2713
+ * Generated SDK entries call this automatically. The descriptor lives under a
2714
+ * registry symbol, so `Object.keys` and `JSON.stringify` never see it, while
2715
+ * `{ ...program }` keeps it: a spread program still reads through its release.
2716
+ * Every other own property (including the runtime extension carrier) is copied
2717
+ * unchanged, except `packageReleaseHash`: the result reads differently from
2718
+ * the generated program SDK, so it is no longer provably that SDK. Generated
2719
+ * entries apply `withProgramIdentity` last.
2531
2720
  */
2532
2721
  declare function withProgramRead<TProgram extends ProgramSdkDefinition>(program: TProgram, descriptor: ProgramReadDescriptor): TProgram;
2722
+ /** The identity a generated program SDK entry stamps on its final program. */
2723
+ interface ProgramSdkIdentity {
2724
+ /** The program package release the SDK was generated from, when known. */
2725
+ readonly packageReleaseHash?: string;
2726
+ }
2727
+ /**
2728
+ * Stamp a program definition with the identity of the program SDK it is.
2729
+ *
2730
+ * Generated program SDK entries call this last, after the package's own
2731
+ * extension and read descriptor are applied, so the identity describes
2732
+ * exactly the generated SDK. `extendProgram`, `extendPrograms` and
2733
+ * `withProgramRead` drop the identity again: a program changed outside its
2734
+ * generated SDK is no longer provably that SDK. Every other own property,
2735
+ * including symbol-keyed runtime extensions and the read descriptor, is copied
2736
+ * unchanged. An absent or empty `packageReleaseHash` removes the identity.
2737
+ */
2738
+ declare function withProgramIdentity<TProgram extends ProgramSdkDefinition>(program: TProgram, identity: ProgramSdkIdentity): TProgram;
2739
+
2740
+ /** Error code for two different program SDKs claiming one program key. */
2741
+ declare const PROGRAM_KEY_CONFLICT: "PROGRAM_KEY_CONFLICT";
2742
+ /**
2743
+ * How two program definitions under one key relate:
2744
+ *
2745
+ * - `'same'`: the same program SDK. They are the same object, or both carry a
2746
+ * `packageReleaseHash` and the hashes are equal.
2747
+ * - `'unproven'`: at least one has no `packageReleaseHash` (a local build, or
2748
+ * a program extended outside its generated SDK), but both carry the same
2749
+ * `programSpecHash`. They describe the same program but cannot be proven to
2750
+ * be the same SDK.
2751
+ * - `'different'`: both carry a `packageReleaseHash` and the hashes differ, or
2752
+ * neither identity matches (different or missing `programSpecHash`).
2753
+ */
2754
+ type ProgramIdentityMatch = 'same' | 'unproven' | 'different';
2755
+ /** Compare two program definitions by identity, never by name. */
2756
+ declare function compareProgramIdentity(left: ProgramSdkDefinition, right: ProgramSdkDefinition): ProgramIdentityMatch;
2757
+ /**
2758
+ * Whether two program definitions are provably the same program SDK: the same
2759
+ * object, or both carry the same `packageReleaseHash` (the program package
2760
+ * release they were generated from). Anything else is not provably the same,
2761
+ * even under the same name.
2762
+ */
2763
+ declare function isSameProgramSdk(left: ProgramSdkDefinition, right: ProgramSdkDefinition): boolean;
2533
2764
 
2534
2765
  /**
2535
2766
  * Non-enumerable brand attached by the operation and read factories so
@@ -2585,7 +2816,8 @@ type AmountInput = bigint | {
2585
2816
  interface AmountResolutionInput {
2586
2817
  mint: string;
2587
2818
  amount: AmountInput;
2588
- decimals?: number;
2819
+ /** The mint's decimals; read from the mint when absent. */
2820
+ decimals?: number | undefined;
2589
2821
  }
2590
2822
  /** Convert a UI amount ("1.5") to raw base units using string math (no float precision loss). */
2591
2823
  declare function parseUiAmountToRaw(value: string | number, decimals: number): bigint;
@@ -2715,6 +2947,18 @@ declare function createUpdateStream<T>(_storage: StorageAdapter, subscriptionReg
2715
2947
  declare function createEntityStream<T>(_storage: StorageAdapter, subscriptionRegistry: SubscriptionRegistry, query: SubscriptionQuery, options?: WatchOptions<any>, keyFilter?: string): AsyncIterable<T>;
2716
2948
  declare function createRichUpdateStream<T>(_storage: StorageAdapter, subscriptionRegistry: SubscriptionRegistry, query: SubscriptionQuery, keyFilter?: string, snapshotEnabled?: boolean): AsyncIterable<RichUpdate<T>>;
2717
2949
 
2950
+ /** How long `get` and `getOne` wait for an initial snapshot, as in the Rust and Python SDKs. */
2951
+ declare const DEFAULT_INITIAL_DATA_TIMEOUT_MS = 5000;
2952
+ /**
2953
+ * `get` or `getOne` gave up waiting for the initial snapshot: the socket never
2954
+ * delivered it (no connection, a reconnect storm, a server that never
2955
+ * answers). The read's subscription is released before this is thrown.
2956
+ */
2957
+ declare class InitialDataTimeoutError extends AreteError {
2958
+ readonly view: string;
2959
+ readonly timeoutMs: number;
2960
+ constructor(view: string, timeoutMs: number);
2961
+ }
2718
2962
  declare function serializeViewKey<TKey>(viewDef: ViewDef<unknown, 'state', TKey>, key: TKey): string;
2719
2963
  declare function createTypedStateView<T, TKey = unknown>(viewDef: ViewDef<T, 'state', TKey>, storage: StorageAdapter, subscriptionRegistry: SubscriptionRegistry): TypedStateView<T, DefaultViewKey<TKey>>;
2720
2964
  declare function createTypedListView<T>(viewDef: ViewDef<T, 'list'>, storage: StorageAdapter, subscriptionRegistry: SubscriptionRegistry): TypedListView<T>;
@@ -2724,5 +2968,5 @@ declare const Arete: typeof Arete$1 & {
2724
2968
  session: typeof createSession;
2725
2969
  };
2726
2970
 
2727
- export { ASSOCIATED_TOKEN_PROGRAM_ADDRESS, Arete, AreteError, ConnectionManager, DEFAULT_CONFIG, DEFAULT_MAX_ENTRIES_PER_VIEW, FrameProcessor, InstructionError, MemoryAdapter, OPERATION_KIND, OperationCallbackError, OperationExecutionError, PROGRAM_OPERATION_EXTENSIONS, ProcessedSlotTimeoutError, QueryStore, ReadRequestError, SPL_TOKEN_PROGRAM_ADDRESS, STACK_RUNTIME_EXTENSIONS, SYSTEM_PROGRAM_ADDRESS, StreamGapError, SubscriptionRegistry, TOKEN_2022_PROGRAM_ADDRESS, TRANSACTION_RESOURCE_OPTION_KEYS, TransactionExecutionError, TransactionOptionsError, TransactionTransportError, account, appendFlowTransactions, appendTransactionInstructions, applyConnectedStackExtensions, arg, buildInstruction, bytes, canonicalQueryKey, chainAccountLoader, createChainClient, createEntityStream, createHostedSolanaGatewayTransports, createInstructionExecutor, createInstructionHandler, createPreparedFlow, createPreparedInstruction, createPreparedTransaction, createPreparedTransactionBody, createProgramPdas, createPublicKeySeed, createRichUpdateStream, createSeed, createSession, createSignerRegistry, createSubscriptionId, createTransactionTransport, createTypedListView, createTypedStateView, createTypedViews, createUpdateStream, decodeBase58, defineProgramExtensions, defineStackExtensions, deriveAssociatedTokenAccount, deriveHttpEndpoint, findProgramAddress as derivePda, describePreparedOperation, encodeBase58, executeInstruction, executePreparedOperation, extendProgram, extendPrograms, extendStack, findProgramAddress, findProgramAddressSync, flowOperation, formatPreparedOperation, formatProgramError, formatRawToUi, getMintDecimals, getOperationKind, getProgramRuntimeExtensions, getStackRuntimeExtensions, getTransactionFailureOutcome, hostedWebsocketSuffixes, inspectPreparedOperation, instructionOperation, isEntityFrame, isErrorFrame, isHostedAreteEndpoint, isReplayErrorCode, isSnapshotFrame, isStackVersionRefusalCode, isSubscribedFrame, isUnsubscribedFrame, isValidFrame, literal, normalizeSubscription, normalizeSubscriptionQuery, normalizeSubscriptionRequest, normalizeTransactionError, parseFrame, parseFrameFromBlob, parseInstructionError, parseUiAmountToRaw, pda, prependFlowTransactionInstructions, prependTransactionInstructions, programAccountRead, programQuery, resolveAccounts, resolveAmount, resolveAmountToRaw, resolveAmountsToRaw, resolveTokenProgramAddress, resolveTransactionBuildOptions, safeToRawAmount, serializeInstructionData, serializeViewKey, setHostedWebsocketSuffixes, stackQuery, stringifyBigints, toJsonValue, toRawAmount, toWireResourceOptions, transactionOperation, unwrapOperationExecutionError, validateAccountResolution, validateProgramReadDescriptor, validateSubscriptionId, withProgramRead, withPrograms };
2728
- export type { AccountCategory, AccountLoader, AccountMeta, AccountResolutionOptions, AccountResolutionResult, AmountInput, AnyOperation, AreteConfig, AreteOptions, AreteOptionsWithStorage, ArgSchema, ArgType, AuthConfig, AuthTokenRequest, AuthTokenResult, AuthTokenTarget, BuildOptions, BuiltAccountMeta, BuiltInstruction, ChainClient, ChainClock, ChainFailedTransactionOutcome, CompositionSessionOptions, ConfirmationLevel, ConfirmedTransactionOutcome, ConnectOptions, ConnectedArete, ConnectedStackClient, ConnectionState, ConnectionStateCallback, ContextSlotOptions, CreatePreparedFlowInput, CreatePreparedInstructionInput, CreatePreparedTransactionInput, DefaultViewKey, EntityFrame, ErrorFrame, ErrorMetadata, ExecuteOptions, ExecutionResult, ExtendedProgramDefinition, ExtendedStackDefinition, FlowOperation, FlowOperationNamespace, FlowOperationReceipt, Frame, FrameMode, FrameOp, FrameProcessorConfig, FrameValidationDiagnostic, HostedSolanaGatewayBindings, HostedSolanaGatewayCapabilityBinding, HostedSolanaGatewayTransportOptions, HostedSolanaGatewayTransports, HttpAuthMetadata, InstructionExecutor, InstructionHandler, InstructionHandlerConfig, InstructionOperation, InstructionOperationNamespace, JsonObject, JsonPrimitive, JsonValue, LatestBlockhashResult, MergeProgramMaps, MintAccountInfo, NativeBalanceInfo, NonEmptyReadonlyArray, NotSubmittedTransactionOutcome, OperationCallbackPhase, OperationExecutionEvent, OperationExecutionHost, OperationExecutionOptions, OperationExecutionSuccessEvent, OperationInspection, OperationInspectionOptions, OperationKind, OperationKindBrand, OperationNamespace, OperationPlan, OperationReceiptFor, OperationTransactionReceipt, PdaConfig, PdaDeriveContext, PdaFactory, PdaProgram, PdaProgramSelector, PdaSeed, PreparedFlow, PreparedInstruction, PreparedOperation, PreparedOperationDescription, PreparedTransaction, PreparedTransactionBody, PreparedTransactionInstruction, PreparedTransactionOperation, ProgramAccountBatchItem, ProgramAccountBatchResult, ProgramAccountReadDefinition, ProgramError, ProgramExtensionInput, ProgramInterface, ProgramOperationContext, ProgramOperations, ProgramOperationsOf, ProgramPdas, ProgramQueryDefinition, ProgramReadBinding, ProgramReadBindingAuthTarget, ProgramReadDescriptor, ProgramReadDescriptors, ProgramReadOf, ProgramReadOverride, ProgramReadOverrides, ProgramReadRequest, ProgramReadTransport, ProgramReleaseReference, ProgramRuntimeExtensionCarrier, ProgramRuntimeExtensions, ProgramSdkDefinition, ProgramsInterface, QueriesInterface, QueryLease, QuerySnapshot, RawAccountInfo, RawInstructionsInterface, RawProgramsInterface, ReadArgumentCount, ReadArgumentCounts, ReadTransportMethod, ReplayErrorCode, ReplayWindow, ResolvedAccount, ResolvedAccounts, ResolvedTransactionBuildOptions, ResolvedTransactionResourceOptions, ResourceLamports, ResourceUnits, RichUpdate, RichUpdateCallback, Schema, SchemaResult, SeedDef, SendOptions, SendResult, Session, SessionDefinition, SessionMemberOptions, SessionOptions, SignerRegistry, SingleTransactionOperationReceipt, SnapshotEntity, SnapshotFrame, SocketIssue, SocketIssueCallback, SolanaGatewayAuthMetadata, SolanaGatewayAuthScope, SolanaGatewayBindingAuthTarget, SortConfig, SortOrder, StackConnectedExtensions, StackDefinition, StackEndpoints, StackExtensionClient, StackExtensionInput, StackQueryDefinition, StackRelease, StackRuntimeExtensionCarrier, StackRuntimeExtensions, StackVersionRefusal, StackWithAttachedPrograms, StorageAdapter, StorageAdapterConfig, StringifiedBigints, SubmittedUnknownTransactionOutcome, SubscribeCallback, SubscribedFrame, Subscription, SubscriptionIdentity, SubscriptionOptions, SubscriptionQuery, SubscriptionRequest, SubscriptionSnapshotOptions, TokenAccountInfo, TokenBalanceInfo, TokenBalanceInput, TransactionBuildCapability, TransactionBuildOptions, TransactionCommitment, TransactionFailureOutcome, TransactionFailurePhase, TransactionFailureStatus, TransactionFeeResult, TransactionInspectionOptions, TransactionInspectionResult, TransactionOperation, TransactionOperationNamespace, TransactionOptions, TransactionOptionsErrorCode, TransactionOutcome, TransactionRequestContext, TransactionResourceOptionKey, TransactionResourceOptions, TransactionSendOptions, TransactionSendResult, TransactionSignatureStatus, TransactionSimulationOptions, TransactionSimulationResult, TransactionTransport, TransactionTransportErrorBody, TransactionVersion, TypedAccountReader, TypedInstruction, TypedListView, TypedQueryExecutor, TypedStateView, TypedViewGroup, TypedViews, UnsubscribeFn, UnsubscribedFrame, Update, UpdateCallback, ViewDef, ViewGroup, ViewKeyFields, ViewKeyValue, ViewSortConfig, WaitForProcessedSlotOptions, WalletAdapter, WalletConnectOptions, WalletExecutionContext, WalletState, WatchOptions, WebSocketFactoryInit };
2971
+ export { ASSOCIATED_TOKEN_PROGRAM_ADDRESS, Arete, AreteError, ConnectionManager, DEFAULT_CONFIG, DEFAULT_INITIAL_DATA_TIMEOUT_MS, DEFAULT_MAX_ENTRIES_PER_VIEW, EXTENSION_API_VERSION, FrameProcessor, InitialDataTimeoutError, InstructionError, MemoryAdapter, OPERATION_KIND, OperationCallbackError, OperationExecutionError, PROGRAM_KEY_CONFLICT, PROGRAM_OPERATION_EXTENSIONS, ProcessedSlotTimeoutError, QueryStore, ReadRequestError, SPL_TOKEN_PROGRAM_ADDRESS, STACK_RUNTIME_EXTENSIONS, SYSTEM_PROGRAM_ADDRESS, StreamGapError, SubscriptionRegistry, TOKEN_2022_PROGRAM_ADDRESS, TRANSACTION_RESOURCE_OPTION_KEYS, TransactionExecutionError, TransactionOptionsError, TransactionTransportError, account, appendFlowTransactions, appendTransactionInstructions, applyConnectedStackExtensions, arg, buildInstruction, bytes, canonicalQueryKey, chainAccountLoader, compareProgramIdentity, createChainClient, createEntityStream, createHostedSolanaGatewayTransports, createInstructionExecutor, createInstructionHandler, createPreparedFlow, createPreparedInstruction, createPreparedTransaction, createPreparedTransactionBody, createProgramPdas, createPublicKeySeed, createRichUpdateStream, createSeed, createSession, createSignerRegistry, createSubscriptionId, createTransactionTransport, createTypedListView, createTypedStateView, createTypedViews, createUpdateStream, decodeBase58, defineProgramExtensions, defineStackExtensions, deriveAssociatedTokenAccount, deriveHttpEndpoint, findProgramAddress as derivePda, describePreparedOperation, encodeBase58, executeInstruction, executePreparedOperation, extendProgram, extendPrograms, extendStack, findProgramAddress, findProgramAddressSync, flowOperation, formatPreparedOperation, formatProgramError, formatRawToUi, getMintDecimals, getOperationKind, getProgramRuntimeExtensions, getStackRuntimeExtensions, getTransactionFailureOutcome, hostedWebsocketSuffixes, inspectPreparedOperation, instructionOperation, isEntityFrame, isErrorFrame, isHostedAreteEndpoint, isReplayErrorCode, isSameProgramSdk, isSnapshotFrame, isStackVersionRefusalCode, isSubscribedFrame, isUnsubscribedFrame, isValidFrame, literal, normalizeSubscription, normalizeSubscriptionQuery, normalizeSubscriptionRequest, normalizeTransactionError, parseFrame, parseFrameFromBlob, parseInstructionError, parseUiAmountToRaw, pda, prependFlowTransactionInstructions, prependTransactionInstructions, programAccountRead, programQuery, resolveAccounts, resolveAmount, resolveAmountToRaw, resolveAmountsToRaw, resolveTokenProgramAddress, resolveTransactionBuildOptions, safeToRawAmount, serializeInstructionData, serializeViewKey, setHostedWebsocketSuffixes, stackQuery, stringifyBigints, toJsonValue, toRawAmount, toWireResourceOptions, transactionOperation, unwrapOperationExecutionError, validateAccountResolution, validateProgramReadDescriptor, validateSubscriptionId, withProgramIdentity, withProgramRead, withPrograms };
2972
+ export type { AccountCategory, AccountLoader, AccountMeta, AccountResolutionOptions, AccountResolutionResult, AmountInput, AnyOperation, AreteConfig, AreteOptions, AreteOptionsWithStorage, ArgSchema, ArgType, AuthConfig, AuthTokenRequest, AuthTokenResult, AuthTokenTarget, BuildOptions, BuiltAccountMeta, BuiltInstruction, ChainClient, ChainClock, ChainFailedTransactionOutcome, CompositionSessionOptions, ConfirmationLevel, ConfirmedTransactionOutcome, ConnectOptions, ConnectedArete, ConnectedStackClient, ConnectionState, ConnectionStateCallback, ContextSlotOptions, CreatePreparedFlowInput, CreatePreparedInstructionInput, CreatePreparedTransactionInput, DefaultViewKey, EntityFrame, ErrorFrame, ErrorMetadata, ExecuteOptions, ExecutionResult, ExtendedProgramDefinition, ExtendedStackDefinition, FlowOperation, FlowOperationNamespace, FlowOperationReceipt, Frame, FrameMode, FrameOp, FrameProcessorConfig, FrameValidationDiagnostic, GetOptions, HostedSolanaGatewayBindings, HostedSolanaGatewayCapabilityBinding, HostedSolanaGatewayTransportOptions, HostedSolanaGatewayTransports, HttpAuthMetadata, InstructionExecutor, InstructionHandler, InstructionHandlerConfig, InstructionOperation, InstructionOperationNamespace, JsonObject, JsonPrimitive, JsonValue, LatestBlockhashResult, MergeProgramMaps, MintAccountInfo, NativeBalanceInfo, NonEmptyReadonlyArray, NotSubmittedTransactionOutcome, OperationCallbackPhase, OperationExecutionEvent, OperationExecutionHost, OperationExecutionOptions, OperationExecutionSuccessEvent, OperationInspection, OperationInspectionOptions, OperationKind, OperationKindBrand, OperationNamespace, OperationPlan, OperationReceiptFor, OperationTransactionReceipt, PdaConfig, PdaDeriveContext, PdaFactory, PdaProgram, PdaProgramSelector, PdaSeed, PreparedFlow, PreparedInstruction, PreparedOperation, PreparedOperationDescription, PreparedTransaction, PreparedTransactionBody, PreparedTransactionInstruction, PreparedTransactionOperation, ProgramAccountBatchItem, ProgramAccountBatchResult, ProgramAccountReadDefinition, ProgramError, ProgramExtensionInput, ProgramIdentityMatch, ProgramInterface, ProgramOperationContext, ProgramOperations, ProgramOperationsOf, ProgramPdas, ProgramQueryDefinition, ProgramReadBinding, ProgramReadBindingAuthTarget, ProgramReadDescriptor, ProgramReadDescriptors, ProgramReadOf, ProgramReadOverride, ProgramReadOverrides, ProgramReadRequest, ProgramReadTransport, ProgramReleaseReference, ProgramRuntimeExtensionCarrier, ProgramRuntimeExtensions, ProgramSdkDefinition, ProgramSdkIdentity, ProgramsInterface, QueriesInterface, QueryLease, QuerySnapshot, RawAccountInfo, RawInstructionsInterface, RawProgramsInterface, ReadArgumentCount, ReadArgumentCounts, ReadTransportMethod, ReplayErrorCode, ReplayWindow, ResolvedAccount, ResolvedAccounts, ResolvedTransactionBuildOptions, ResolvedTransactionResourceOptions, ResourceLamports, ResourceUnits, RichUpdate, RichUpdateCallback, Schema, SchemaResult, SeedDef, SendOptions, SendResult, Session, SessionDefinition, SessionMemberOptions, SessionOptions, SignerRegistry, SingleTransactionOperationReceipt, SnapshotEntity, SnapshotFrame, SocketIssue, SocketIssueCallback, SolanaGatewayAuthMetadata, SolanaGatewayAuthScope, SolanaGatewayBindingAuthTarget, SortConfig, SortOrder, StackConnectedExtensions, StackDefinition, StackEndpoints, StackExtensionClient, StackExtensionInput, StackQueryDefinition, StackRelease, StackRuntimeExtensionCarrier, StackRuntimeExtensions, StackVersionRefusal, StackWithAttachedPrograms, StorageAdapter, StorageAdapterConfig, StringifiedBigints, SubmittedUnknownTransactionOutcome, SubscribeCallback, SubscribedFrame, Subscription, SubscriptionIdentity, SubscriptionOptions, SubscriptionQuery, SubscriptionRequest, SubscriptionSnapshotOptions, TokenAccountInfo, TokenBalanceInfo, TokenBalanceInput, TransactionBuildCapability, TransactionBuildOptions, TransactionCommitment, TransactionFailureOutcome, TransactionFailurePhase, TransactionFailureStatus, TransactionFeeResult, TransactionInspectionOptions, TransactionInspectionResult, TransactionOperation, TransactionOperationNamespace, TransactionOptions, TransactionOptionsErrorCode, TransactionOutcome, TransactionRequestContext, TransactionResourceOptionKey, TransactionResourceOptions, TransactionSendOptions, TransactionSendResult, TransactionSignatureStatus, TransactionSimulationOptions, TransactionSimulationResult, TransactionTransport, TransactionTransportErrorBody, TransactionVersion, TypedAccountReader, TypedInstruction, TypedListView, TypedQueryExecutor, TypedStateView, TypedViewGroup, TypedViews, UnsubscribeFn, UnsubscribedFrame, Update, UpdateCallback, ViewDef, ViewGroup, ViewKeyFields, ViewKeyValue, ViewSortConfig, WaitForProcessedSlotOptions, WalletAdapter, WalletConnectOptions, WalletExecutionContext, WalletState, WatchOptions, WebSocketFactoryInit };