@thru/thru-sdk 0.1.25 → 0.1.29

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.
@@ -1,8 +1,8 @@
1
1
  import { BytesLike, Pubkey as Pubkey$1 } from '@thru/helpers';
2
- import { Message } from '@bufbuild/protobuf';
3
2
  import { Timestamp } from '@bufbuild/protobuf/wkt';
4
- import { createClient } from '@connectrpc/connect';
5
- import { createGrpcWebTransport } from '@connectrpc/connect-web';
3
+ import { Message } from '@bufbuild/protobuf';
4
+ import { Transport, createClient, CallOptions, Interceptor } from '@connectrpc/connect';
5
+ import { GrpcWebTransportOptions } from '@connectrpc/connect-web';
6
6
  import { GenMessage } from '@bufbuild/protobuf/codegenv2';
7
7
 
8
8
  /**
@@ -49,6 +49,15 @@ type VersionContext = Message<"thru.common.v1.VersionContext"> & {
49
49
  */
50
50
  value: Timestamp;
51
51
  case: "timestamp";
52
+ } | {
53
+ /**
54
+ * Request the version for a specific seq number.
55
+ * Relevant only for GetAccount and GetRawAccount requests.
56
+ *
57
+ * @generated from field: uint64 seq = 5;
58
+ */
59
+ value: bigint;
60
+ case: "seq";
52
61
  } | {
53
62
  case: undefined;
54
63
  value?: undefined;
@@ -116,887 +125,948 @@ declare enum ConsensusStatus {
116
125
  }
117
126
 
118
127
  /**
119
- * Filter represents a CEL-based expression applied to query or stream results.
128
+ * Pubkey represents a 32-byte public key value.
120
129
  *
121
- * @generated from message thru.common.v1.Filter
130
+ * @generated from message thru.common.v1.Pubkey
122
131
  */
123
- type Filter$1 = Message<"thru.common.v1.Filter"> & {
124
- /**
125
- * CEL expression applied server-side. Empty expressions are treated as no-op.
126
- *
127
- * @generated from field: optional string expression = 1;
128
- */
129
- expression?: string;
132
+ type Pubkey = Message<"thru.common.v1.Pubkey"> & {
130
133
  /**
131
- * Named parameter bindings for expression parameterization.
134
+ * 32-byte public key buffer.
132
135
  *
133
- * @generated from field: map<string, thru.common.v1.FilterParamValue> params = 2;
134
- */
135
- params: {
136
- [key: string]: FilterParamValue$1;
137
- };
138
- };
139
- /**
140
- * Describes the message thru.common.v1.Filter.
141
- * Use `create(FilterSchema)` to create a new message.
142
- */
143
- declare const FilterSchema: GenMessage<Filter$1>;
144
- /**
145
- * FilterParamValue carries strongly-typed CEL parameter bindings.
146
- *
147
- * @generated from message thru.common.v1.FilterParamValue
148
- */
149
- type FilterParamValue$1 = Message<"thru.common.v1.FilterParamValue"> & {
150
- /**
151
- * @generated from oneof thru.common.v1.FilterParamValue.kind
136
+ * @generated from field: bytes value = 1;
152
137
  */
153
- kind: {
154
- /**
155
- * @generated from field: string string_value = 1;
156
- */
157
- value: string;
158
- case: "stringValue";
159
- } | {
160
- /**
161
- * @generated from field: bytes bytes_value = 2;
162
- */
163
- value: Uint8Array;
164
- case: "bytesValue";
165
- } | {
166
- /**
167
- * @generated from field: bool bool_value = 3;
168
- */
169
- value: boolean;
170
- case: "boolValue";
171
- } | {
172
- /**
173
- * @generated from field: sint64 int_value = 4;
174
- */
175
- value: bigint;
176
- case: "intValue";
177
- } | {
178
- /**
179
- * @generated from field: double double_value = 5;
180
- */
181
- value: number;
182
- case: "doubleValue";
183
- } | {
184
- case: undefined;
185
- value?: undefined;
186
- };
138
+ value: Uint8Array;
187
139
  };
188
140
  /**
189
- * Describes the message thru.common.v1.FilterParamValue.
190
- * Use `create(FilterParamValueSchema)` to create a new message.
191
- */
192
- declare const FilterParamValueSchema: GenMessage<FilterParamValue$1>;
193
-
194
- /**
195
- * Pubkey represents a 32-byte public key value.
141
+ * Signature represents a 64-byte signature value.
196
142
  *
197
- * @generated from message thru.core.v1.Pubkey
143
+ * @generated from message thru.common.v1.Signature
198
144
  */
199
- type Pubkey = Message<"thru.core.v1.Pubkey"> & {
145
+ type Signature = Message<"thru.common.v1.Signature"> & {
200
146
  /**
201
- * 32-byte public key buffer.
147
+ * 64-byte signature buffer.
202
148
  *
203
149
  * @generated from field: bytes value = 1;
204
150
  */
205
151
  value: Uint8Array;
206
152
  };
207
153
  /**
208
- * BlockHash represents a 64-byte hash for block identifiers.
154
+ * TaPubkey represents a ta-encoded public key string (46 characters).
209
155
  *
210
- * @generated from message thru.core.v1.BlockHash
156
+ * @generated from message thru.common.v1.TaPubkey
211
157
  */
212
- type BlockHash = Message<"thru.core.v1.BlockHash"> & {
158
+ type TaPubkey = Message<"thru.common.v1.TaPubkey"> & {
213
159
  /**
214
- * 64-byte block hash buffer.
160
+ * 46-character ta-encoded public key string.
215
161
  *
216
- * @generated from field: bytes value = 1;
162
+ * @generated from field: string value = 1;
217
163
  */
218
- value: Uint8Array;
164
+ value: string;
219
165
  };
220
166
  /**
221
- * Signature represents a 64-byte signature value.
167
+ * TsSignature represents a ts-encoded signature string (90 characters).
222
168
  *
223
- * @generated from message thru.core.v1.Signature
169
+ * @generated from message thru.common.v1.TsSignature
224
170
  */
225
- type Signature = Message<"thru.core.v1.Signature"> & {
171
+ type TsSignature = Message<"thru.common.v1.TsSignature"> & {
226
172
  /**
227
- * 64-byte signature buffer.
173
+ * 90-character ts-encoded signature string.
228
174
  *
229
- * @generated from field: bytes value = 1;
175
+ * @generated from field: string value = 1;
230
176
  */
231
- value: Uint8Array;
177
+ value: string;
232
178
  };
233
179
 
234
180
  /**
235
- * AccountFlags enumerates boolean account capability flags.
181
+ * TransactionHeader carries structured metadata for a transaction.
236
182
  *
237
- * @generated from message thru.core.v1.AccountFlags
183
+ * @generated from message thru.core.v1.TransactionHeader
238
184
  */
239
- type AccountFlags$1 = Message<"thru.core.v1.AccountFlags"> & {
185
+ type TransactionHeader = Message<"thru.core.v1.TransactionHeader"> & {
240
186
  /**
241
- * @generated from field: bool is_program = 1;
187
+ * @generated from field: thru.common.v1.Signature fee_payer_signature = 1;
242
188
  */
243
- isProgram: boolean;
189
+ feePayerSignature?: Signature;
244
190
  /**
245
- * @generated from field: bool is_privileged = 2;
191
+ * @generated from field: uint32 version = 2;
246
192
  */
247
- isPrivileged: boolean;
193
+ version: number;
248
194
  /**
249
- * @generated from field: bool is_uncompressable = 3;
195
+ * @generated from field: uint32 flags = 3;
250
196
  */
251
- isUncompressable: boolean;
197
+ flags: number;
252
198
  /**
253
- * @generated from field: bool is_ephemeral = 4;
199
+ * @generated from field: uint32 readwrite_accounts_count = 4;
254
200
  */
255
- isEphemeral: boolean;
201
+ readwriteAccountsCount: number;
256
202
  /**
257
- * @generated from field: bool is_deleted = 5;
203
+ * @generated from field: uint32 readonly_accounts_count = 5;
258
204
  */
259
- isDeleted: boolean;
205
+ readonlyAccountsCount: number;
260
206
  /**
261
- * @generated from field: bool is_new = 6;
207
+ * @generated from field: uint32 instruction_data_size = 6;
262
208
  */
263
- isNew: boolean;
209
+ instructionDataSize: number;
264
210
  /**
265
- * @generated from field: bool is_compressed = 7;
211
+ * @generated from field: uint32 requested_compute_units = 7;
266
212
  */
267
- isCompressed: boolean;
268
- };
269
- /**
270
- * AccountMeta captures metadata associated with an account.
271
- *
272
- * @generated from message thru.core.v1.AccountMeta
273
- */
274
- type AccountMeta$1 = Message<"thru.core.v1.AccountMeta"> & {
213
+ requestedComputeUnits: number;
275
214
  /**
276
- * @generated from field: uint32 version = 1;
215
+ * @generated from field: uint32 requested_state_units = 8;
277
216
  */
278
- version: number;
217
+ requestedStateUnits: number;
279
218
  /**
280
- * @generated from field: thru.core.v1.AccountFlags flags = 2;
219
+ * @generated from field: uint32 requested_memory_units = 9;
281
220
  */
282
- flags?: AccountFlags$1;
221
+ requestedMemoryUnits: number;
283
222
  /**
284
- * @generated from field: uint32 data_size = 3;
223
+ * @generated from field: uint32 expiry_after = 10;
285
224
  */
286
- dataSize: number;
225
+ expiryAfter: number;
287
226
  /**
288
- * Account sequence number
289
- *
290
- * @generated from field: uint64 seq = 4;
227
+ * @generated from field: uint64 fee = 11;
291
228
  */
292
- seq: bigint;
229
+ fee: bigint;
293
230
  /**
294
- * @generated from field: thru.core.v1.Pubkey owner = 5;
231
+ * @generated from field: uint64 nonce = 12;
295
232
  */
296
- owner?: Pubkey;
233
+ nonce: bigint;
297
234
  /**
298
- * @generated from field: uint64 balance = 6;
235
+ * @generated from field: uint64 start_slot = 13;
299
236
  */
300
- balance: bigint;
237
+ startSlot: bigint;
301
238
  /**
302
- * @generated from field: uint64 nonce = 7;
239
+ * @generated from field: thru.common.v1.Pubkey fee_payer_pubkey = 14;
303
240
  */
304
- nonce: bigint;
241
+ feePayerPubkey?: Pubkey;
242
+ /**
243
+ * @generated from field: thru.common.v1.Pubkey program_pubkey = 15;
244
+ */
245
+ programPubkey?: Pubkey;
305
246
  };
306
247
  /**
307
- * AccountData contains account data payloads.
248
+ * TransactionExecutionResult captures execution outcomes.
308
249
  *
309
- * @generated from message thru.core.v1.AccountData
250
+ * @generated from message thru.core.v1.TransactionExecutionResult
310
251
  */
311
- type AccountData$1 = Message<"thru.core.v1.AccountData"> & {
252
+ type TransactionExecutionResult = Message<"thru.core.v1.TransactionExecutionResult"> & {
312
253
  /**
313
- * @generated from field: optional bytes data = 1;
254
+ * @generated from field: uint32 consumed_compute_units = 1;
314
255
  */
315
- data?: Uint8Array;
256
+ consumedComputeUnits: number;
316
257
  /**
317
- * @generated from field: optional bool compressed = 2;
258
+ * @generated from field: uint32 consumed_memory_units = 2;
318
259
  */
319
- compressed?: boolean;
260
+ consumedMemoryUnits: number;
320
261
  /**
321
- * @generated from field: optional string compression_algorithm = 3;
262
+ * @generated from field: uint32 consumed_state_units = 3;
322
263
  */
323
- compressionAlgorithm?: string;
324
- };
325
- /**
326
- * DataSlice describes a contiguous range of account data to return.
327
- *
328
- * @generated from message thru.core.v1.DataSlice
329
- */
330
- type DataSlice = Message<"thru.core.v1.DataSlice"> & {
264
+ consumedStateUnits: number;
331
265
  /**
332
- * @generated from field: uint32 offset = 1;
266
+ * @generated from field: uint64 user_error_code = 4;
333
267
  */
334
- offset: number;
268
+ userErrorCode: bigint;
335
269
  /**
336
- * @generated from field: uint32 length = 2;
270
+ * @generated from field: thru.core.v1.TransactionVmError vm_error = 5;
337
271
  */
338
- length: number;
339
- };
340
- /**
341
- * VersionContextMetadata captures context for a returned account state.
342
- *
343
- * @generated from message thru.core.v1.VersionContextMetadata
344
- */
345
- type VersionContextMetadata = Message<"thru.core.v1.VersionContextMetadata"> & {
272
+ vmError: TransactionVmError;
346
273
  /**
347
- * @generated from field: optional uint64 slot = 1;
274
+ * @generated from field: uint64 execution_result = 6;
348
275
  */
349
- slot?: bigint;
276
+ executionResult: bigint;
350
277
  /**
351
- * @generated from field: optional google.protobuf.Timestamp block_timestamp = 2;
278
+ * @generated from field: uint32 pages_used = 7;
352
279
  */
353
- blockTimestamp?: Timestamp;
354
- };
355
- /**
356
- * Account models a fully decoded account resource.
357
- *
358
- * @generated from message thru.core.v1.Account
359
- */
360
- type Account$1 = Message<"thru.core.v1.Account"> & {
280
+ pagesUsed: number;
361
281
  /**
362
- * @generated from field: thru.core.v1.Pubkey address = 1;
282
+ * @generated from field: uint32 events_count = 8;
363
283
  */
364
- address?: Pubkey;
284
+ eventsCount: number;
365
285
  /**
366
- * @generated from field: optional thru.core.v1.AccountMeta meta = 2;
286
+ * @generated from field: uint32 events_size = 9;
367
287
  */
368
- meta?: AccountMeta$1;
288
+ eventsSize: number;
369
289
  /**
370
- * @generated from field: optional thru.core.v1.AccountData data = 3;
290
+ * @generated from field: repeated thru.common.v1.Pubkey readwrite_accounts = 10;
371
291
  */
372
- data?: AccountData$1;
292
+ readwriteAccounts: Pubkey[];
373
293
  /**
374
- * @generated from field: optional thru.core.v1.VersionContextMetadata version_context = 4;
294
+ * @generated from field: repeated thru.common.v1.Pubkey readonly_accounts = 11;
375
295
  */
376
- versionContext?: VersionContextMetadata;
296
+ readonlyAccounts: Pubkey[];
377
297
  /**
378
- * @generated from field: optional thru.common.v1.ConsensusStatus consensus_status = 5;
298
+ * @generated from field: repeated thru.core.v1.TransactionEvent events = 12;
379
299
  */
380
- consensusStatus?: ConsensusStatus;
300
+ events: TransactionEvent[];
381
301
  };
382
302
  /**
383
- * RawAccount captures raw serialized account bytes.
303
+ * TransactionEvent describes an event emitted during transaction execution.
384
304
  *
385
- * @generated from message thru.core.v1.RawAccount
305
+ * @generated from message thru.core.v1.TransactionEvent
386
306
  */
387
- type RawAccount = Message<"thru.core.v1.RawAccount"> & {
307
+ type TransactionEvent = Message<"thru.core.v1.TransactionEvent"> & {
388
308
  /**
389
- * @generated from field: thru.core.v1.Pubkey address = 1;
309
+ * @generated from field: string event_id = 1;
390
310
  */
391
- address?: Pubkey;
311
+ eventId: string;
392
312
  /**
393
- * @generated from field: bytes raw_meta = 2;
313
+ * @generated from field: uint32 call_idx = 2;
394
314
  */
395
- rawMeta: Uint8Array;
315
+ callIdx: number;
396
316
  /**
397
- * @generated from field: optional bytes raw_data = 3;
317
+ * @generated from field: uint32 program_idx = 3;
398
318
  */
399
- rawData?: Uint8Array;
319
+ programIdx: number;
400
320
  /**
401
- * @generated from field: optional thru.core.v1.VersionContextMetadata version_context = 4;
321
+ * @generated from field: thru.common.v1.Pubkey program = 4;
402
322
  */
403
- versionContext?: VersionContextMetadata;
404
- };
323
+ program?: Pubkey;
324
+ /**
325
+ * @generated from field: bytes payload = 5;
326
+ */
327
+ payload: Uint8Array;
328
+ };
405
329
  /**
406
- * AccountView controls which sections of account resources are returned.
330
+ * Transaction describes a fully decoded transaction resource.
407
331
  *
408
- * @generated from enum thru.core.v1.AccountView
332
+ * @generated from message thru.core.v1.Transaction
409
333
  */
410
- declare enum AccountView {
334
+ type Transaction$1 = Message<"thru.core.v1.Transaction"> & {
411
335
  /**
412
- * ACCOUNT_VIEW_UNSPECIFIED uses service defaults.
413
- *
414
- * @generated from enum value: ACCOUNT_VIEW_UNSPECIFIED = 0;
336
+ * @generated from field: thru.common.v1.Signature signature = 1;
337
+ */
338
+ signature?: Signature;
339
+ /**
340
+ * @generated from field: thru.core.v1.TransactionHeader header = 2;
341
+ */
342
+ header?: TransactionHeader;
343
+ /**
344
+ * @generated from field: optional bytes body = 3;
345
+ */
346
+ body?: Uint8Array;
347
+ /**
348
+ * @generated from field: optional thru.core.v1.TransactionExecutionResult execution_result = 4;
349
+ */
350
+ executionResult?: TransactionExecutionResult;
351
+ /**
352
+ * @generated from field: optional uint64 slot = 5;
353
+ */
354
+ slot?: bigint;
355
+ /**
356
+ * @generated from field: optional uint32 block_offset = 6;
357
+ */
358
+ blockOffset?: number;
359
+ };
360
+ /**
361
+ * RawTransaction provides direct access to serialized transaction bytes.
362
+ *
363
+ * @generated from message thru.core.v1.RawTransaction
364
+ */
365
+ type RawTransaction = Message<"thru.core.v1.RawTransaction"> & {
366
+ /**
367
+ * @generated from field: thru.common.v1.Signature signature = 1;
368
+ */
369
+ signature?: Signature;
370
+ /**
371
+ * @generated from field: bytes raw_transaction = 2;
372
+ */
373
+ rawTransaction: Uint8Array;
374
+ };
375
+ /**
376
+ * TransactionView controls how transactions are materialized in responses.
377
+ *
378
+ * @generated from enum thru.core.v1.TransactionView
379
+ */
380
+ declare enum TransactionView {
381
+ /**
382
+ * @generated from enum value: TRANSACTION_VIEW_UNSPECIFIED = 0;
415
383
  */
416
384
  UNSPECIFIED = 0,
417
385
  /**
418
- * ACCOUNT_VIEW_PUBKEY_ONLY returns only the account address.
419
- *
420
- * @generated from enum value: ACCOUNT_VIEW_PUBKEY_ONLY = 1;
386
+ * @generated from enum value: TRANSACTION_VIEW_SIGNATURE_ONLY = 1;
421
387
  */
422
- PUBKEY_ONLY = 1,
388
+ SIGNATURE_ONLY = 1,
423
389
  /**
424
- * ACCOUNT_VIEW_META_ONLY returns only account metadata.
425
- *
426
- * @generated from enum value: ACCOUNT_VIEW_META_ONLY = 2;
390
+ * @generated from enum value: TRANSACTION_VIEW_HEADER_ONLY = 2;
427
391
  */
428
- META_ONLY = 2,
392
+ HEADER_ONLY = 2,
429
393
  /**
430
- * ACCOUNT_VIEW_DATA_ONLY returns only account data.
431
- *
432
- * @generated from enum value: ACCOUNT_VIEW_DATA_ONLY = 3;
394
+ * @generated from enum value: TRANSACTION_VIEW_HEADER_AND_BODY = 3;
433
395
  */
434
- DATA_ONLY = 3,
396
+ HEADER_AND_BODY = 3,
435
397
  /**
436
- * ACCOUNT_VIEW_FULL returns address, metadata, and data.
437
- *
438
- * @generated from enum value: ACCOUNT_VIEW_FULL = 4;
398
+ * @generated from enum value: TRANSACTION_VIEW_FULL = 4;
439
399
  */
440
400
  FULL = 4
441
401
  }
442
-
443
402
  /**
444
- * BlockHeader describes metadata about a block.
403
+ * TransactionVmError enumerates runtime error codes returned by the executor.
445
404
  *
446
- * @generated from message thru.core.v1.BlockHeader
405
+ * @generated from enum thru.core.v1.TransactionVmError
447
406
  */
448
- type BlockHeader$1 = Message<"thru.core.v1.BlockHeader"> & {
407
+ declare enum TransactionVmError {
449
408
  /**
450
- * @generated from field: uint64 slot = 1;
409
+ * TN_RUNTIME_TXN_EXECUTE_SUCCESS
410
+ *
411
+ * @generated from enum value: TRANSACTION_VM_EXECUTE_SUCCESS = 0;
451
412
  */
452
- slot: bigint;
413
+ TRANSACTION_VM_EXECUTE_SUCCESS = 0,
453
414
  /**
454
- * @generated from field: thru.core.v1.BlockHash block_hash = 2;
415
+ * TN_RUNTIME_TXN_ERR_INVALID_FORMAT
416
+ *
417
+ * @generated from enum value: TRANSACTION_VM_ERROR_INVALID_FORMAT = -255;
455
418
  */
456
- blockHash?: BlockHash;
419
+ TRANSACTION_VM_ERROR_INVALID_FORMAT = -255,
457
420
  /**
458
- * @generated from field: thru.core.v1.Signature header_signature = 3;
421
+ * TN_RUNTIME_TXN_ERR_INVALID_VERSION
422
+ *
423
+ * @generated from enum value: TRANSACTION_VM_ERROR_INVALID_VERSION = -254;
459
424
  */
460
- headerSignature?: Signature;
425
+ TRANSACTION_VM_ERROR_INVALID_VERSION = -254,
461
426
  /**
462
- * @generated from field: uint32 version = 4;
427
+ * TN_RUNTIME_TXN_ERR_INVALID_FLAGS
428
+ *
429
+ * @generated from enum value: TRANSACTION_VM_ERROR_INVALID_FLAGS = -253;
463
430
  */
464
- version: number;
431
+ TRANSACTION_VM_ERROR_INVALID_FLAGS = -253,
465
432
  /**
466
- * @generated from field: thru.core.v1.Pubkey producer = 5;
433
+ * TN_RUNTIME_TXN_ERR_INVALID_SIGNATURE
434
+ *
435
+ * @generated from enum value: TRANSACTION_VM_ERROR_INVALID_SIGNATURE = -252;
467
436
  */
468
- producer?: Pubkey;
437
+ TRANSACTION_VM_ERROR_INVALID_SIGNATURE = -252,
469
438
  /**
470
- * @generated from field: google.protobuf.Timestamp expiry_timestamp = 6;
439
+ * TN_RUNTIME_TXN_ERR_DUPLICATE_ACCOUNT
440
+ *
441
+ * @generated from enum value: TRANSACTION_VM_ERROR_DUPLICATE_ACCOUNT = -251;
471
442
  */
472
- expiryTimestamp?: Timestamp;
443
+ TRANSACTION_VM_ERROR_DUPLICATE_ACCOUNT = -251,
473
444
  /**
474
- * @generated from field: uint64 start_slot = 7;
445
+ * TN_RUNTIME_TXN_ERR_UNSORTED_ACCOUNTS
446
+ *
447
+ * @generated from enum value: TRANSACTION_VM_ERROR_UNSORTED_ACCOUNTS = -250;
475
448
  */
476
- startSlot: bigint;
449
+ TRANSACTION_VM_ERROR_UNSORTED_ACCOUNTS = -250,
477
450
  /**
478
- * @generated from field: uint32 expiry_after = 8;
451
+ * TN_RUNTIME_TXN_ERR_UNSORTED_READWRITE_ACCOUNTS
452
+ *
453
+ * @generated from enum value: TRANSACTION_VM_ERROR_UNSORTED_READWRITE_ACCOUNTS = -249;
479
454
  */
480
- expiryAfter: number;
455
+ TRANSACTION_VM_ERROR_UNSORTED_READWRITE_ACCOUNTS = -249,
481
456
  /**
482
- * @generated from field: uint32 max_block_size = 9;
457
+ * TN_RUNTIME_TXN_ERR_UNSORTED_READONLY_ACCOUNTS
458
+ *
459
+ * @generated from enum value: TRANSACTION_VM_ERROR_UNSORTED_READONLY_ACCOUNTS = -248;
483
460
  */
484
- maxBlockSize: number;
461
+ TRANSACTION_VM_ERROR_UNSORTED_READONLY_ACCOUNTS = -248,
485
462
  /**
486
- * @generated from field: uint64 max_compute_units = 10;
463
+ * TN_RUNTIME_TXN_ERR_ACCOUNT_COUNT_LIMIT_EXCEEDED
464
+ *
465
+ * @generated from enum value: TRANSACTION_VM_ERROR_ACCOUNT_COUNT_LIMIT_EXCEEDED = -247;
487
466
  */
488
- maxComputeUnits: bigint;
467
+ TRANSACTION_VM_ERROR_ACCOUNT_COUNT_LIMIT_EXCEEDED = -247,
489
468
  /**
490
- * @generated from field: uint32 max_state_units = 11;
469
+ * TN_RUNTIME_TXN_ERR_NONCE_TOO_LOW
470
+ *
471
+ * @generated from enum value: TRANSACTION_VM_ERROR_NONCE_TOO_LOW = -511;
491
472
  */
492
- maxStateUnits: number;
473
+ TRANSACTION_VM_ERROR_NONCE_TOO_LOW = -511,
493
474
  /**
494
- * @generated from field: uint64 price = 12;
475
+ * TN_RUNTIME_TXN_ERR_NONCE_TOO_HIGH
476
+ *
477
+ * @generated from enum value: TRANSACTION_VM_ERROR_NONCE_TOO_HIGH = -510;
495
478
  */
496
- price: bigint;
497
- };
498
- /**
499
- * BlockFooter captures execution result metadata for a block.
500
- *
501
- * @generated from message thru.core.v1.BlockFooter
502
- */
503
- type BlockFooter$1 = Message<"thru.core.v1.BlockFooter"> & {
479
+ TRANSACTION_VM_ERROR_NONCE_TOO_HIGH = -510,
504
480
  /**
505
- * @generated from field: thru.core.v1.Signature signature = 1;
481
+ * TN_RUNTIME_TXN_ERR_INSUFFICIENT_FEE_PAYER_BALANCE
482
+ *
483
+ * @generated from enum value: TRANSACTION_VM_ERROR_INSUFFICIENT_FEE_PAYER_BALANCE = -509;
506
484
  */
507
- signature?: Signature;
485
+ TRANSACTION_VM_ERROR_INSUFFICIENT_FEE_PAYER_BALANCE = -509,
508
486
  /**
509
- * @generated from field: thru.core.v1.ExecutionStatus status = 2;
487
+ * TN_RUNTIME_TXN_ERR_FEE_PAYER_ACCOUNT_DOES_NOT_EXIST
488
+ *
489
+ * @generated from enum value: TRANSACTION_VM_ERROR_FEE_PAYER_ACCOUNT_DOES_NOT_EXIST = -508;
510
490
  */
511
- status: ExecutionStatus;
491
+ TRANSACTION_VM_ERROR_FEE_PAYER_ACCOUNT_DOES_NOT_EXIST = -508,
512
492
  /**
513
- * @generated from field: uint64 consumed_compute_units = 3;
493
+ * TN_RUNTIME_TXN_ERR_NOT_LIVE_YET
494
+ *
495
+ * @generated from enum value: TRANSACTION_VM_ERROR_NOT_LIVE_YET = -507;
514
496
  */
515
- consumedComputeUnits: bigint;
497
+ TRANSACTION_VM_ERROR_NOT_LIVE_YET = -507,
516
498
  /**
517
- * @generated from field: uint32 consumed_state_units = 4;
499
+ * TN_RUNTIME_TXN_ERR_EXPIRED
500
+ *
501
+ * @generated from enum value: TRANSACTION_VM_ERROR_EXPIRED = -506;
518
502
  */
519
- consumedStateUnits: number;
520
- };
521
- /**
522
- * Block represents a fully decoded block resource.
523
- *
524
- * @generated from message thru.core.v1.Block
525
- */
526
- type Block$1 = Message<"thru.core.v1.Block"> & {
503
+ TRANSACTION_VM_ERROR_EXPIRED = -506,
527
504
  /**
528
- * @generated from field: thru.core.v1.BlockHeader header = 1;
505
+ * TN_RUNTIME_TXN_ERR_INVALID_FEE_PAYER_STATE_PROOF
506
+ *
507
+ * @generated from enum value: TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF = -505;
529
508
  */
530
- header?: BlockHeader$1;
509
+ TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF = -505,
531
510
  /**
532
- * @generated from field: optional thru.core.v1.BlockFooter footer = 2;
511
+ * TN_RUNTIME_TXN_ERR_INVALID_FEE_PAYER_STATE_PROOF_TYPE
512
+ *
513
+ * @generated from enum value: TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF_TYPE = -504;
533
514
  */
534
- footer?: BlockFooter$1;
515
+ TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF_TYPE = -504,
535
516
  /**
536
- * @generated from field: optional bytes body = 3;
517
+ * TN_RUNTIME_TXN_ERR_INVALID_FEE_PAYER_STATE_PROOF_SLOT
518
+ *
519
+ * @generated from enum value: TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF_SLOT = -503;
537
520
  */
538
- body?: Uint8Array;
521
+ TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF_SLOT = -503,
539
522
  /**
540
- * @generated from field: optional thru.common.v1.ConsensusStatus consensus_status = 4;
523
+ * TN_RUNTIME_TXN_ERR_INVALID_FEE_PAYER_ACCOUNT_OWNER
524
+ *
525
+ * @generated from enum value: TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_ACCOUNT_OWNER = -502;
541
526
  */
542
- consensusStatus?: ConsensusStatus;
543
- };
544
- /**
545
- * RawBlock captures raw block bytes for direct access.
546
- *
547
- * @generated from message thru.core.v1.RawBlock
548
- */
549
- type RawBlock = Message<"thru.core.v1.RawBlock"> & {
527
+ TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_ACCOUNT_OWNER = -502,
550
528
  /**
551
- * @generated from field: uint64 slot = 1;
529
+ * TN_RUNTIME_TXN_ERR_INVALID_FEE_PAYER_STATE_PROOF_ACCOUNT_OWNER
530
+ *
531
+ * @generated from enum value: TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF_ACCOUNT_OWNER = -501;
552
532
  */
553
- slot: bigint;
533
+ TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF_ACCOUNT_OWNER = -501,
554
534
  /**
555
- * @generated from field: bytes raw_block = 2;
535
+ * TN_RUNTIME_TXN_ERR_INVALID_FEE_PAYER_STATE_PROOF_ACCOUNT_META_DATA_SZ
536
+ *
537
+ * @generated from enum value: TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF_ACCOUNT_META_DATA_SZ = -500;
556
538
  */
557
- rawBlock: Uint8Array;
558
- };
559
- /**
560
- * BlockView controls how much of a block resource is returned.
561
- *
562
- * @generated from enum thru.core.v1.BlockView
563
- */
564
- declare enum BlockView {
539
+ TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF_ACCOUNT_META_DATA_SZ = -500,
565
540
  /**
566
- * @generated from enum value: BLOCK_VIEW_UNSPECIFIED = 0;
541
+ * TN_RUNTIME_TXN_ERR_VM_FAILED
542
+ *
543
+ * @generated from enum value: TRANSACTION_VM_ERROR_VM_FAILED = -767;
567
544
  */
568
- UNSPECIFIED = 0,
545
+ TRANSACTION_VM_ERROR_VM_FAILED = -767,
569
546
  /**
570
- * @generated from enum value: BLOCK_VIEW_HEADER_ONLY = 1;
547
+ * TN_RUNTIME_TXN_ERR_INVALID_PROGRAM_ACCOUNT
548
+ *
549
+ * @generated from enum value: TRANSACTION_VM_ERROR_INVALID_PROGRAM_ACCOUNT = -766;
571
550
  */
572
- HEADER_ONLY = 1,
551
+ TRANSACTION_VM_ERROR_INVALID_PROGRAM_ACCOUNT = -766,
573
552
  /**
574
- * @generated from enum value: BLOCK_VIEW_HEADER_AND_FOOTER = 2;
553
+ * TN_RUNTIME_TXN_ERR_VM_REVERT
554
+ *
555
+ * @generated from enum value: TRANSACTION_VM_ERROR_VM_REVERT = -765;
575
556
  */
576
- HEADER_AND_FOOTER = 2,
557
+ TRANSACTION_VM_ERROR_VM_REVERT = -765,
577
558
  /**
578
- * @generated from enum value: BLOCK_VIEW_BODY_ONLY = 3;
559
+ * TN_RUNTIME_TXN_ERR_CU_EXHAUSTED
560
+ *
561
+ * @generated from enum value: TRANSACTION_VM_ERROR_CU_EXHAUSTED = -764;
579
562
  */
580
- BODY_ONLY = 3,
563
+ TRANSACTION_VM_ERROR_CU_EXHAUSTED = -764,
581
564
  /**
582
- * @generated from enum value: BLOCK_VIEW_FULL = 4;
565
+ * TN_RUNTIME_TXN_ERR_SU_EXHAUSTED
566
+ *
567
+ * @generated from enum value: TRANSACTION_VM_ERROR_SU_EXHAUSTED = -763;
583
568
  */
584
- FULL = 4
569
+ TRANSACTION_VM_ERROR_SU_EXHAUSTED = -763
585
570
  }
571
+
572
+ /**
573
+ * Filter represents a CEL-based expression applied to query or stream results.
574
+ *
575
+ * @generated from message thru.common.v1.Filter
576
+ */
577
+ type Filter$1 = Message<"thru.common.v1.Filter"> & {
578
+ /**
579
+ * CEL expression applied server-side. Empty expressions are treated as no-op.
580
+ *
581
+ * @generated from field: optional string expression = 1;
582
+ */
583
+ expression?: string;
584
+ /**
585
+ * Named parameter bindings for expression parameterization.
586
+ *
587
+ * @generated from field: map<string, thru.common.v1.FilterParamValue> params = 2;
588
+ */
589
+ params: {
590
+ [key: string]: FilterParamValue$1;
591
+ };
592
+ };
593
+ /**
594
+ * Describes the message thru.common.v1.Filter.
595
+ * Use `create(FilterSchema)` to create a new message.
596
+ */
597
+ declare const FilterSchema: GenMessage<Filter$1>;
598
+ /**
599
+ * FilterParamValue carries strongly-typed CEL parameter bindings.
600
+ *
601
+ * @generated from message thru.common.v1.FilterParamValue
602
+ */
603
+ type FilterParamValue$1 = Message<"thru.common.v1.FilterParamValue"> & {
604
+ /**
605
+ * @generated from oneof thru.common.v1.FilterParamValue.kind
606
+ */
607
+ kind: {
608
+ /**
609
+ * @generated from field: string string_value = 1;
610
+ */
611
+ value: string;
612
+ case: "stringValue";
613
+ } | {
614
+ /**
615
+ * @generated from field: bytes bytes_value = 2;
616
+ */
617
+ value: Uint8Array;
618
+ case: "bytesValue";
619
+ } | {
620
+ /**
621
+ * @generated from field: bool bool_value = 3;
622
+ */
623
+ value: boolean;
624
+ case: "boolValue";
625
+ } | {
626
+ /**
627
+ * @generated from field: sint64 int_value = 4;
628
+ */
629
+ value: bigint;
630
+ case: "intValue";
631
+ } | {
632
+ /**
633
+ * @generated from field: uint64 uint_value = 5;
634
+ */
635
+ value: bigint;
636
+ case: "uintValue";
637
+ } | {
638
+ /**
639
+ * @generated from field: double double_value = 6;
640
+ */
641
+ value: number;
642
+ case: "doubleValue";
643
+ } | {
644
+ /**
645
+ * @generated from field: thru.common.v1.Pubkey pubkey_value = 7;
646
+ */
647
+ value: Pubkey;
648
+ case: "pubkeyValue";
649
+ } | {
650
+ /**
651
+ * @generated from field: thru.common.v1.Signature signature_value = 8;
652
+ */
653
+ value: Signature;
654
+ case: "signatureValue";
655
+ } | {
656
+ /**
657
+ * @generated from field: thru.common.v1.TaPubkey ta_pubkey_value = 9;
658
+ */
659
+ value: TaPubkey;
660
+ case: "taPubkeyValue";
661
+ } | {
662
+ /**
663
+ * @generated from field: thru.common.v1.TsSignature ts_signature_value = 10;
664
+ */
665
+ value: TsSignature;
666
+ case: "tsSignatureValue";
667
+ } | {
668
+ case: undefined;
669
+ value?: undefined;
670
+ };
671
+ };
586
672
  /**
587
- * ExecutionStatus enumerates block execution results.
588
- *
589
- * @generated from enum thru.core.v1.ExecutionStatus
673
+ * Describes the message thru.common.v1.FilterParamValue.
674
+ * Use `create(FilterParamValueSchema)` to create a new message.
590
675
  */
591
- declare enum ExecutionStatus {
592
- /**
593
- * @generated from enum value: EXECUTION_STATUS_UNSPECIFIED = 0;
594
- */
595
- UNSPECIFIED = 0,
596
- /**
597
- * @generated from enum value: EXECUTION_STATUS_PENDING = 1;
598
- */
599
- PENDING = 1,
600
- /**
601
- * @generated from enum value: EXECUTION_STATUS_EXECUTED = 2;
602
- */
603
- EXECUTED = 2,
604
- /**
605
- * @generated from enum value: EXECUTION_STATUS_FAILED = 3;
606
- */
607
- FAILED = 3
608
- }
676
+ declare const FilterParamValueSchema: GenMessage<FilterParamValue$1>;
609
677
 
610
678
  /**
611
- * TransactionHeader carries structured metadata for a transaction.
679
+ * AccountFlags enumerates boolean account capability flags.
612
680
  *
613
- * @generated from message thru.core.v1.TransactionHeader
681
+ * @generated from message thru.core.v1.AccountFlags
614
682
  */
615
- type TransactionHeader = Message<"thru.core.v1.TransactionHeader"> & {
616
- /**
617
- * @generated from field: thru.core.v1.Signature fee_payer_signature = 1;
618
- */
619
- feePayerSignature?: Signature;
683
+ type AccountFlags$1 = Message<"thru.core.v1.AccountFlags"> & {
620
684
  /**
621
- * @generated from field: uint32 version = 2;
685
+ * @generated from field: bool is_program = 1;
622
686
  */
623
- version: number;
687
+ isProgram: boolean;
624
688
  /**
625
- * @generated from field: uint32 flags = 3;
689
+ * @generated from field: bool is_privileged = 2;
626
690
  */
627
- flags: number;
691
+ isPrivileged: boolean;
628
692
  /**
629
- * @generated from field: uint32 readwrite_accounts_count = 4;
693
+ * @generated from field: bool is_uncompressable = 3;
630
694
  */
631
- readwriteAccountsCount: number;
695
+ isUncompressable: boolean;
632
696
  /**
633
- * @generated from field: uint32 readonly_accounts_count = 5;
697
+ * @generated from field: bool is_ephemeral = 4;
634
698
  */
635
- readonlyAccountsCount: number;
699
+ isEphemeral: boolean;
636
700
  /**
637
- * @generated from field: uint32 instruction_data_size = 6;
701
+ * @generated from field: bool is_deleted = 5;
638
702
  */
639
- instructionDataSize: number;
703
+ isDeleted: boolean;
640
704
  /**
641
- * @generated from field: uint32 requested_compute_units = 7;
705
+ * @generated from field: bool is_new = 6;
642
706
  */
643
- requestedComputeUnits: number;
707
+ isNew: boolean;
644
708
  /**
645
- * @generated from field: uint32 requested_state_units = 8;
709
+ * @generated from field: bool is_compressed = 7;
646
710
  */
647
- requestedStateUnits: number;
711
+ isCompressed: boolean;
712
+ };
713
+ /**
714
+ * AccountMeta captures metadata associated with an account.
715
+ *
716
+ * @generated from message thru.core.v1.AccountMeta
717
+ */
718
+ type AccountMeta$1 = Message<"thru.core.v1.AccountMeta"> & {
648
719
  /**
649
- * @generated from field: uint32 requested_memory_units = 9;
720
+ * @generated from field: uint32 version = 1;
650
721
  */
651
- requestedMemoryUnits: number;
722
+ version: number;
652
723
  /**
653
- * @generated from field: uint32 expiry_after = 10;
724
+ * @generated from field: thru.core.v1.AccountFlags flags = 2;
654
725
  */
655
- expiryAfter: number;
726
+ flags?: AccountFlags$1;
656
727
  /**
657
- * @generated from field: uint64 fee = 11;
728
+ * @generated from field: uint32 data_size = 3;
658
729
  */
659
- fee: bigint;
730
+ dataSize: number;
660
731
  /**
661
- * @generated from field: uint64 nonce = 12;
732
+ * Account sequence number
733
+ *
734
+ * @generated from field: uint64 seq = 4;
662
735
  */
663
- nonce: bigint;
736
+ seq: bigint;
664
737
  /**
665
- * @generated from field: uint64 start_slot = 13;
738
+ * @generated from field: thru.common.v1.Pubkey owner = 5;
666
739
  */
667
- startSlot: bigint;
740
+ owner?: Pubkey;
668
741
  /**
669
- * @generated from field: thru.core.v1.Pubkey fee_payer_pubkey = 14;
742
+ * @generated from field: uint64 balance = 6;
670
743
  */
671
- feePayerPubkey?: Pubkey;
744
+ balance: bigint;
672
745
  /**
673
- * @generated from field: thru.core.v1.Pubkey program_pubkey = 15;
746
+ * @generated from field: uint64 nonce = 7;
674
747
  */
675
- programPubkey?: Pubkey;
748
+ nonce: bigint;
676
749
  };
677
750
  /**
678
- * TransactionExecutionResult captures execution outcomes.
751
+ * AccountData contains account data payloads.
679
752
  *
680
- * @generated from message thru.core.v1.TransactionExecutionResult
753
+ * @generated from message thru.core.v1.AccountData
681
754
  */
682
- type TransactionExecutionResult = Message<"thru.core.v1.TransactionExecutionResult"> & {
755
+ type AccountData$1 = Message<"thru.core.v1.AccountData"> & {
683
756
  /**
684
- * @generated from field: uint32 consumed_compute_units = 1;
757
+ * @generated from field: optional bytes data = 1;
685
758
  */
686
- consumedComputeUnits: number;
759
+ data?: Uint8Array;
687
760
  /**
688
- * @generated from field: uint32 consumed_memory_units = 2;
761
+ * @generated from field: optional bool compressed = 2;
689
762
  */
690
- consumedMemoryUnits: number;
763
+ compressed?: boolean;
691
764
  /**
692
- * @generated from field: uint32 consumed_state_units = 3;
765
+ * @generated from field: optional string compression_algorithm = 3;
693
766
  */
694
- consumedStateUnits: number;
767
+ compressionAlgorithm?: string;
768
+ };
769
+ /**
770
+ * DataSlice describes a contiguous range of account data to return.
771
+ *
772
+ * @generated from message thru.core.v1.DataSlice
773
+ */
774
+ type DataSlice = Message<"thru.core.v1.DataSlice"> & {
695
775
  /**
696
- * @generated from field: uint64 user_error_code = 4;
776
+ * @generated from field: uint32 offset = 1;
697
777
  */
698
- userErrorCode: bigint;
778
+ offset: number;
699
779
  /**
700
- * @generated from field: thru.core.v1.TransactionVmError vm_error = 5;
780
+ * @generated from field: uint32 length = 2;
701
781
  */
702
- vmError: TransactionVmError;
782
+ length: number;
783
+ };
784
+ /**
785
+ * VersionContextMetadata captures context for a returned account state.
786
+ *
787
+ * @generated from message thru.core.v1.VersionContextMetadata
788
+ */
789
+ type VersionContextMetadata = Message<"thru.core.v1.VersionContextMetadata"> & {
703
790
  /**
704
- * @generated from field: uint64 execution_result = 6;
791
+ * @generated from field: optional uint64 slot = 1;
705
792
  */
706
- executionResult: bigint;
793
+ slot?: bigint;
707
794
  /**
708
- * @generated from field: uint32 pages_used = 7;
795
+ * @generated from field: optional google.protobuf.Timestamp block_timestamp = 2;
709
796
  */
710
- pagesUsed: number;
797
+ blockTimestamp?: Timestamp;
798
+ };
799
+ /**
800
+ * Account models a fully decoded account resource.
801
+ *
802
+ * @generated from message thru.core.v1.Account
803
+ */
804
+ type Account$1 = Message<"thru.core.v1.Account"> & {
711
805
  /**
712
- * @generated from field: uint32 events_count = 8;
806
+ * @generated from field: thru.common.v1.Pubkey address = 1;
713
807
  */
714
- eventsCount: number;
808
+ address?: Pubkey;
715
809
  /**
716
- * @generated from field: uint32 events_size = 9;
810
+ * @generated from field: optional thru.core.v1.AccountMeta meta = 2;
717
811
  */
718
- eventsSize: number;
812
+ meta?: AccountMeta$1;
719
813
  /**
720
- * @generated from field: repeated thru.core.v1.Pubkey readwrite_accounts = 10;
814
+ * @generated from field: optional thru.core.v1.AccountData data = 3;
721
815
  */
722
- readwriteAccounts: Pubkey[];
816
+ data?: AccountData$1;
723
817
  /**
724
- * @generated from field: repeated thru.core.v1.Pubkey readonly_accounts = 11;
818
+ * @generated from field: optional thru.core.v1.VersionContextMetadata version_context = 4;
725
819
  */
726
- readonlyAccounts: Pubkey[];
820
+ versionContext?: VersionContextMetadata;
727
821
  /**
728
- * @generated from field: repeated thru.core.v1.TransactionEvent events = 12;
822
+ * @generated from field: optional thru.common.v1.ConsensusStatus consensus_status = 5;
729
823
  */
730
- events: TransactionEvent[];
824
+ consensusStatus?: ConsensusStatus;
731
825
  };
732
826
  /**
733
- * TransactionEvent describes an event emitted during transaction execution.
827
+ * RawAccount captures raw serialized account bytes.
734
828
  *
735
- * @generated from message thru.core.v1.TransactionEvent
829
+ * @generated from message thru.core.v1.RawAccount
736
830
  */
737
- type TransactionEvent = Message<"thru.core.v1.TransactionEvent"> & {
738
- /**
739
- * @generated from field: string event_id = 1;
740
- */
741
- eventId: string;
831
+ type RawAccount = Message<"thru.core.v1.RawAccount"> & {
742
832
  /**
743
- * @generated from field: uint32 call_idx = 2;
833
+ * @generated from field: thru.common.v1.Pubkey address = 1;
744
834
  */
745
- callIdx: number;
835
+ address?: Pubkey;
746
836
  /**
747
- * @generated from field: uint32 program_idx = 3;
837
+ * @generated from field: bytes raw_meta = 2;
748
838
  */
749
- programIdx: number;
839
+ rawMeta: Uint8Array;
750
840
  /**
751
- * @generated from field: thru.core.v1.Pubkey program = 4;
841
+ * @generated from field: optional bytes raw_data = 3;
752
842
  */
753
- program?: Pubkey;
843
+ rawData?: Uint8Array;
754
844
  /**
755
- * @generated from field: bytes payload = 5;
845
+ * @generated from field: optional thru.core.v1.VersionContextMetadata version_context = 4;
756
846
  */
757
- payload: Uint8Array;
847
+ versionContext?: VersionContextMetadata;
758
848
  };
759
849
  /**
760
- * Transaction describes a fully decoded transaction resource.
850
+ * AccountView controls which sections of account resources are returned.
761
851
  *
762
- * @generated from message thru.core.v1.Transaction
852
+ * @generated from enum thru.core.v1.AccountView
763
853
  */
764
- type Transaction$1 = Message<"thru.core.v1.Transaction"> & {
765
- /**
766
- * @generated from field: thru.core.v1.Signature signature = 1;
767
- */
768
- signature?: Signature;
854
+ declare enum AccountView {
769
855
  /**
770
- * @generated from field: thru.core.v1.TransactionHeader header = 2;
856
+ * ACCOUNT_VIEW_UNSPECIFIED uses service defaults.
857
+ *
858
+ * @generated from enum value: ACCOUNT_VIEW_UNSPECIFIED = 0;
771
859
  */
772
- header?: TransactionHeader;
860
+ UNSPECIFIED = 0,
773
861
  /**
774
- * @generated from field: optional bytes body = 3;
862
+ * ACCOUNT_VIEW_PUBKEY_ONLY returns only the account address.
863
+ *
864
+ * @generated from enum value: ACCOUNT_VIEW_PUBKEY_ONLY = 1;
775
865
  */
776
- body?: Uint8Array;
866
+ PUBKEY_ONLY = 1,
777
867
  /**
778
- * @generated from field: optional thru.core.v1.TransactionExecutionResult execution_result = 4;
868
+ * ACCOUNT_VIEW_META_ONLY returns only account metadata.
869
+ *
870
+ * @generated from enum value: ACCOUNT_VIEW_META_ONLY = 2;
779
871
  */
780
- executionResult?: TransactionExecutionResult;
872
+ META_ONLY = 2,
781
873
  /**
782
- * @generated from field: optional uint64 slot = 5;
874
+ * ACCOUNT_VIEW_DATA_ONLY returns only account data.
875
+ *
876
+ * @generated from enum value: ACCOUNT_VIEW_DATA_ONLY = 3;
783
877
  */
784
- slot?: bigint;
878
+ DATA_ONLY = 3,
785
879
  /**
786
- * @generated from field: optional uint32 block_offset = 6;
880
+ * ACCOUNT_VIEW_FULL returns address, metadata, and data.
881
+ *
882
+ * @generated from enum value: ACCOUNT_VIEW_FULL = 4;
787
883
  */
788
- blockOffset?: number;
789
- };
884
+ FULL = 4
885
+ }
886
+
790
887
  /**
791
- * RawTransaction provides direct access to serialized transaction bytes.
888
+ * BlockHash represents a 64-byte hash for block identifiers.
792
889
  *
793
- * @generated from message thru.core.v1.RawTransaction
890
+ * @generated from message thru.core.v1.BlockHash
794
891
  */
795
- type RawTransaction = Message<"thru.core.v1.RawTransaction"> & {
796
- /**
797
- * @generated from field: thru.core.v1.Signature signature = 1;
798
- */
799
- signature?: Signature;
892
+ type BlockHash = Message<"thru.core.v1.BlockHash"> & {
800
893
  /**
801
- * @generated from field: bytes raw_transaction = 2;
894
+ * 64-byte block hash buffer.
895
+ *
896
+ * @generated from field: bytes value = 1;
802
897
  */
803
- rawTransaction: Uint8Array;
898
+ value: Uint8Array;
804
899
  };
900
+
805
901
  /**
806
- * TransactionView controls how transactions are materialized in responses.
902
+ * BlockHeader describes metadata about a block.
807
903
  *
808
- * @generated from enum thru.core.v1.TransactionView
904
+ * @generated from message thru.core.v1.BlockHeader
809
905
  */
810
- declare enum TransactionView {
906
+ type BlockHeader$1 = Message<"thru.core.v1.BlockHeader"> & {
811
907
  /**
812
- * @generated from enum value: TRANSACTION_VIEW_UNSPECIFIED = 0;
908
+ * @generated from field: uint64 slot = 1;
813
909
  */
814
- UNSPECIFIED = 0,
910
+ slot: bigint;
815
911
  /**
816
- * @generated from enum value: TRANSACTION_VIEW_SIGNATURE_ONLY = 1;
912
+ * @generated from field: thru.core.v1.BlockHash block_hash = 2;
817
913
  */
818
- SIGNATURE_ONLY = 1,
914
+ blockHash?: BlockHash;
819
915
  /**
820
- * @generated from enum value: TRANSACTION_VIEW_HEADER_ONLY = 2;
916
+ * @generated from field: thru.common.v1.Signature header_signature = 3;
821
917
  */
822
- HEADER_ONLY = 2,
918
+ headerSignature?: Signature;
823
919
  /**
824
- * @generated from enum value: TRANSACTION_VIEW_HEADER_AND_BODY = 3;
920
+ * @generated from field: uint32 version = 4;
825
921
  */
826
- HEADER_AND_BODY = 3,
922
+ version: number;
827
923
  /**
828
- * @generated from enum value: TRANSACTION_VIEW_FULL = 4;
924
+ * @generated from field: thru.common.v1.Pubkey producer = 5;
829
925
  */
830
- FULL = 4
831
- }
832
- /**
833
- * TransactionVmError enumerates runtime error codes returned by the executor.
834
- *
835
- * @generated from enum thru.core.v1.TransactionVmError
836
- */
837
- declare enum TransactionVmError {
926
+ producer?: Pubkey;
838
927
  /**
839
- * TN_RUNTIME_TXN_EXECUTE_SUCCESS
840
- *
841
- * @generated from enum value: TRANSACTION_VM_EXECUTE_SUCCESS = 0;
928
+ * @generated from field: google.protobuf.Timestamp expiry_timestamp = 6;
842
929
  */
843
- TRANSACTION_VM_EXECUTE_SUCCESS = 0,
930
+ expiryTimestamp?: Timestamp;
844
931
  /**
845
- * TN_RUNTIME_TXN_ERR_INVALID_FORMAT
846
- *
847
- * @generated from enum value: TRANSACTION_VM_ERROR_INVALID_FORMAT = -255;
932
+ * @generated from field: uint64 start_slot = 7;
848
933
  */
849
- TRANSACTION_VM_ERROR_INVALID_FORMAT = -255,
934
+ startSlot: bigint;
850
935
  /**
851
- * TN_RUNTIME_TXN_ERR_INVALID_VERSION
852
- *
853
- * @generated from enum value: TRANSACTION_VM_ERROR_INVALID_VERSION = -254;
936
+ * @generated from field: uint32 expiry_after = 8;
854
937
  */
855
- TRANSACTION_VM_ERROR_INVALID_VERSION = -254,
938
+ expiryAfter: number;
856
939
  /**
857
- * TN_RUNTIME_TXN_ERR_INVALID_FLAGS
858
- *
859
- * @generated from enum value: TRANSACTION_VM_ERROR_INVALID_FLAGS = -253;
940
+ * @generated from field: uint32 max_block_size = 9;
860
941
  */
861
- TRANSACTION_VM_ERROR_INVALID_FLAGS = -253,
942
+ maxBlockSize: number;
862
943
  /**
863
- * TN_RUNTIME_TXN_ERR_INVALID_SIGNATURE
864
- *
865
- * @generated from enum value: TRANSACTION_VM_ERROR_INVALID_SIGNATURE = -252;
944
+ * @generated from field: uint64 max_compute_units = 10;
866
945
  */
867
- TRANSACTION_VM_ERROR_INVALID_SIGNATURE = -252,
946
+ maxComputeUnits: bigint;
868
947
  /**
869
- * TN_RUNTIME_TXN_ERR_DUPLICATE_ACCOUNT
870
- *
871
- * @generated from enum value: TRANSACTION_VM_ERROR_DUPLICATE_ACCOUNT = -251;
948
+ * @generated from field: uint32 max_state_units = 11;
872
949
  */
873
- TRANSACTION_VM_ERROR_DUPLICATE_ACCOUNT = -251,
950
+ maxStateUnits: number;
874
951
  /**
875
- * TN_RUNTIME_TXN_ERR_UNSORTED_ACCOUNTS
876
- *
877
- * @generated from enum value: TRANSACTION_VM_ERROR_UNSORTED_ACCOUNTS = -250;
952
+ * @generated from field: uint64 price = 12;
878
953
  */
879
- TRANSACTION_VM_ERROR_UNSORTED_ACCOUNTS = -250,
954
+ price: bigint;
880
955
  /**
881
- * TN_RUNTIME_TXN_ERR_UNSORTED_READWRITE_ACCOUNTS
882
- *
883
- * @generated from enum value: TRANSACTION_VM_ERROR_UNSORTED_READWRITE_ACCOUNTS = -249;
956
+ * @generated from field: google.protobuf.Timestamp block_time = 13;
884
957
  */
885
- TRANSACTION_VM_ERROR_UNSORTED_READWRITE_ACCOUNTS = -249,
958
+ blockTime?: Timestamp;
959
+ };
960
+ /**
961
+ * BlockFooter captures execution result metadata for a block.
962
+ *
963
+ * @generated from message thru.core.v1.BlockFooter
964
+ */
965
+ type BlockFooter$1 = Message<"thru.core.v1.BlockFooter"> & {
886
966
  /**
887
- * TN_RUNTIME_TXN_ERR_UNSORTED_READONLY_ACCOUNTS
888
- *
889
- * @generated from enum value: TRANSACTION_VM_ERROR_UNSORTED_READONLY_ACCOUNTS = -248;
967
+ * @generated from field: thru.common.v1.Signature signature = 1;
890
968
  */
891
- TRANSACTION_VM_ERROR_UNSORTED_READONLY_ACCOUNTS = -248,
969
+ signature?: Signature;
892
970
  /**
893
- * TN_RUNTIME_TXN_ERR_ACCOUNT_COUNT_LIMIT_EXCEEDED
894
- *
895
- * @generated from enum value: TRANSACTION_VM_ERROR_ACCOUNT_COUNT_LIMIT_EXCEEDED = -247;
971
+ * @generated from field: thru.core.v1.ExecutionStatus status = 2;
896
972
  */
897
- TRANSACTION_VM_ERROR_ACCOUNT_COUNT_LIMIT_EXCEEDED = -247,
973
+ status: ExecutionStatus;
898
974
  /**
899
- * TN_RUNTIME_TXN_ERR_NONCE_TOO_LOW
900
- *
901
- * @generated from enum value: TRANSACTION_VM_ERROR_NONCE_TOO_LOW = -511;
975
+ * @generated from field: uint64 consumed_compute_units = 3;
902
976
  */
903
- TRANSACTION_VM_ERROR_NONCE_TOO_LOW = -511,
977
+ consumedComputeUnits: bigint;
904
978
  /**
905
- * TN_RUNTIME_TXN_ERR_NONCE_TOO_HIGH
906
- *
907
- * @generated from enum value: TRANSACTION_VM_ERROR_NONCE_TOO_HIGH = -510;
979
+ * @generated from field: uint32 consumed_state_units = 4;
908
980
  */
909
- TRANSACTION_VM_ERROR_NONCE_TOO_HIGH = -510,
981
+ consumedStateUnits: number;
982
+ };
983
+ /**
984
+ * Block represents a fully decoded block resource.
985
+ *
986
+ * @generated from message thru.core.v1.Block
987
+ */
988
+ type Block$1 = Message<"thru.core.v1.Block"> & {
910
989
  /**
911
- * TN_RUNTIME_TXN_ERR_INSUFFICIENT_FEE_PAYER_BALANCE
912
- *
913
- * @generated from enum value: TRANSACTION_VM_ERROR_INSUFFICIENT_FEE_PAYER_BALANCE = -509;
990
+ * @generated from field: thru.core.v1.BlockHeader header = 1;
914
991
  */
915
- TRANSACTION_VM_ERROR_INSUFFICIENT_FEE_PAYER_BALANCE = -509,
992
+ header?: BlockHeader$1;
916
993
  /**
917
- * TN_RUNTIME_TXN_ERR_FEE_PAYER_ACCOUNT_DOES_NOT_EXIST
918
- *
919
- * @generated from enum value: TRANSACTION_VM_ERROR_FEE_PAYER_ACCOUNT_DOES_NOT_EXIST = -508;
994
+ * @generated from field: optional thru.core.v1.BlockFooter footer = 2;
920
995
  */
921
- TRANSACTION_VM_ERROR_FEE_PAYER_ACCOUNT_DOES_NOT_EXIST = -508,
996
+ footer?: BlockFooter$1;
922
997
  /**
923
- * TN_RUNTIME_TXN_ERR_NOT_LIVE_YET
924
- *
925
- * @generated from enum value: TRANSACTION_VM_ERROR_NOT_LIVE_YET = -507;
998
+ * @generated from field: optional bytes body = 3;
926
999
  */
927
- TRANSACTION_VM_ERROR_NOT_LIVE_YET = -507,
1000
+ body?: Uint8Array;
928
1001
  /**
929
- * TN_RUNTIME_TXN_ERR_EXPIRED
930
- *
931
- * @generated from enum value: TRANSACTION_VM_ERROR_EXPIRED = -506;
1002
+ * @generated from field: optional thru.common.v1.ConsensusStatus consensus_status = 4;
932
1003
  */
933
- TRANSACTION_VM_ERROR_EXPIRED = -506,
1004
+ consensusStatus?: ConsensusStatus;
1005
+ };
1006
+ /**
1007
+ * RawBlock captures raw block bytes for direct access.
1008
+ *
1009
+ * @generated from message thru.core.v1.RawBlock
1010
+ */
1011
+ type RawBlock = Message<"thru.core.v1.RawBlock"> & {
934
1012
  /**
935
- * TN_RUNTIME_TXN_ERR_INVALID_FEE_PAYER_STATE_PROOF
936
- *
937
- * @generated from enum value: TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF = -505;
1013
+ * @generated from field: uint64 slot = 1;
938
1014
  */
939
- TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF = -505,
1015
+ slot: bigint;
940
1016
  /**
941
- * TN_RUNTIME_TXN_ERR_INVALID_FEE_PAYER_STATE_PROOF_TYPE
942
- *
943
- * @generated from enum value: TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF_TYPE = -504;
1017
+ * @generated from field: bytes raw_block = 2;
944
1018
  */
945
- TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF_TYPE = -504,
1019
+ rawBlock: Uint8Array;
1020
+ };
1021
+ /**
1022
+ * BlockView controls how much of a block resource is returned.
1023
+ *
1024
+ * @generated from enum thru.core.v1.BlockView
1025
+ */
1026
+ declare enum BlockView {
946
1027
  /**
947
- * TN_RUNTIME_TXN_ERR_INVALID_FEE_PAYER_STATE_PROOF_SLOT
948
- *
949
- * @generated from enum value: TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF_SLOT = -503;
1028
+ * @generated from enum value: BLOCK_VIEW_UNSPECIFIED = 0;
950
1029
  */
951
- TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF_SLOT = -503,
1030
+ UNSPECIFIED = 0,
952
1031
  /**
953
- * TN_RUNTIME_TXN_ERR_INVALID_FEE_PAYER_ACCOUNT_OWNER
954
- *
955
- * @generated from enum value: TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_ACCOUNT_OWNER = -502;
1032
+ * @generated from enum value: BLOCK_VIEW_HEADER_ONLY = 1;
956
1033
  */
957
- TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_ACCOUNT_OWNER = -502,
1034
+ HEADER_ONLY = 1,
958
1035
  /**
959
- * TN_RUNTIME_TXN_ERR_INVALID_FEE_PAYER_STATE_PROOF_ACCOUNT_OWNER
960
- *
961
- * @generated from enum value: TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF_ACCOUNT_OWNER = -501;
1036
+ * @generated from enum value: BLOCK_VIEW_HEADER_AND_FOOTER = 2;
962
1037
  */
963
- TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF_ACCOUNT_OWNER = -501,
1038
+ HEADER_AND_FOOTER = 2,
964
1039
  /**
965
- * TN_RUNTIME_TXN_ERR_INVALID_FEE_PAYER_STATE_PROOF_ACCOUNT_META_DATA_SZ
966
- *
967
- * @generated from enum value: TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF_ACCOUNT_META_DATA_SZ = -500;
1040
+ * @generated from enum value: BLOCK_VIEW_BODY_ONLY = 3;
968
1041
  */
969
- TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF_ACCOUNT_META_DATA_SZ = -500,
1042
+ BODY_ONLY = 3,
970
1043
  /**
971
- * TN_RUNTIME_TXN_ERR_VM_FAILED
972
- *
973
- * @generated from enum value: TRANSACTION_VM_ERROR_VM_FAILED = -767;
1044
+ * @generated from enum value: BLOCK_VIEW_FULL = 4;
974
1045
  */
975
- TRANSACTION_VM_ERROR_VM_FAILED = -767,
1046
+ FULL = 4
1047
+ }
1048
+ /**
1049
+ * ExecutionStatus enumerates block execution results.
1050
+ *
1051
+ * @generated from enum thru.core.v1.ExecutionStatus
1052
+ */
1053
+ declare enum ExecutionStatus {
976
1054
  /**
977
- * TN_RUNTIME_TXN_ERR_INVALID_PROGRAM_ACCOUNT
978
- *
979
- * @generated from enum value: TRANSACTION_VM_ERROR_INVALID_PROGRAM_ACCOUNT = -766;
1055
+ * @generated from enum value: EXECUTION_STATUS_UNSPECIFIED = 0;
980
1056
  */
981
- TRANSACTION_VM_ERROR_INVALID_PROGRAM_ACCOUNT = -766,
1057
+ UNSPECIFIED = 0,
982
1058
  /**
983
- * TN_RUNTIME_TXN_ERR_VM_REVERT
984
- *
985
- * @generated from enum value: TRANSACTION_VM_ERROR_VM_REVERT = -765;
1059
+ * @generated from enum value: EXECUTION_STATUS_PENDING = 1;
986
1060
  */
987
- TRANSACTION_VM_ERROR_VM_REVERT = -765,
1061
+ PENDING = 1,
988
1062
  /**
989
- * TN_RUNTIME_TXN_ERR_CU_EXHAUSTED
990
- *
991
- * @generated from enum value: TRANSACTION_VM_ERROR_CU_EXHAUSTED = -764;
1063
+ * @generated from enum value: EXECUTION_STATUS_EXECUTED = 2;
992
1064
  */
993
- TRANSACTION_VM_ERROR_CU_EXHAUSTED = -764,
1065
+ EXECUTED = 2,
994
1066
  /**
995
- * TN_RUNTIME_TXN_ERR_SU_EXHAUSTED
996
- *
997
- * @generated from enum value: TRANSACTION_VM_ERROR_SU_EXHAUSTED = -763;
1067
+ * @generated from enum value: EXECUTION_STATUS_FAILED = 3;
998
1068
  */
999
- TRANSACTION_VM_ERROR_SU_EXHAUSTED = -763
1069
+ FAILED = 3
1000
1070
  }
1001
1071
 
1002
1072
  /**
@@ -1018,7 +1088,7 @@ type StreamEventsResponse = Message<"thru.services.v1.StreamEventsResponse"> & {
1018
1088
  */
1019
1089
  timestamp?: Timestamp;
1020
1090
  /**
1021
- * @generated from field: thru.core.v1.Pubkey program = 4;
1091
+ * @generated from field: thru.common.v1.Pubkey program = 4;
1022
1092
  */
1023
1093
  program?: Pubkey;
1024
1094
  /**
@@ -1026,7 +1096,7 @@ type StreamEventsResponse = Message<"thru.services.v1.StreamEventsResponse"> & {
1026
1096
  */
1027
1097
  callIdx: number;
1028
1098
  /**
1029
- * @generated from field: thru.core.v1.Signature signature = 6;
1099
+ * @generated from field: thru.common.v1.Signature signature = 6;
1030
1100
  */
1031
1101
  signature?: Signature;
1032
1102
  /**
@@ -1129,6 +1199,7 @@ declare class Transaction {
1129
1199
  readonly readWriteAccounts: AccountAddress[];
1130
1200
  readonly readOnlyAccounts: AccountAddress[];
1131
1201
  readonly instructionData?: Uint8Array;
1202
+ readonly instructionDataSize?: number;
1132
1203
  readonly feePayerStateProof?: Uint8Array;
1133
1204
  readonly feePayerAccountMetaRaw?: Uint8Array;
1134
1205
  executionResult?: TransactionExecutionResultData;
@@ -1142,6 +1213,7 @@ declare class Transaction {
1142
1213
  header: TransactionHeaderInput;
1143
1214
  accounts?: TransactionAccountsInput;
1144
1215
  instructionData?: Uint8Array;
1216
+ instructionDataSize?: number;
1145
1217
  proofs?: OptionalProofs;
1146
1218
  });
1147
1219
  static fromWire(data: Uint8Array): Transaction;
@@ -1166,6 +1238,15 @@ declare class Transaction {
1166
1238
  private static convertExecutionResultToProto;
1167
1239
  }
1168
1240
 
1241
+ type StreamTransactionUpdate = {
1242
+ kind: "partial";
1243
+ signature: Uint8Array;
1244
+ slot?: bigint;
1245
+ executionResult?: ReturnType<typeof Transaction.executionResultFromProto>;
1246
+ } | {
1247
+ kind: "full";
1248
+ transaction: Transaction;
1249
+ };
1169
1250
  interface TrackTransactionUpdate {
1170
1251
  signature?: Uint8Array;
1171
1252
  status: string;
@@ -1282,11 +1363,11 @@ type Event = Message<"thru.services.v1.Event"> & {
1282
1363
  */
1283
1364
  eventId: string;
1284
1365
  /**
1285
- * @generated from field: thru.core.v1.Signature transaction_signature = 2;
1366
+ * @generated from field: thru.common.v1.Signature transaction_signature = 2;
1286
1367
  */
1287
1368
  transactionSignature?: Signature;
1288
1369
  /**
1289
- * @generated from field: optional thru.core.v1.Pubkey program = 3;
1370
+ * @generated from field: optional thru.common.v1.Pubkey program = 3;
1290
1371
  */
1291
1372
  program?: Pubkey;
1292
1373
  /**
@@ -1309,6 +1390,14 @@ type Event = Message<"thru.services.v1.Event"> & {
1309
1390
  * @generated from field: optional uint32 payload_size = 8;
1310
1391
  */
1311
1392
  payloadSize?: number;
1393
+ /**
1394
+ * @generated from field: optional uint32 block_offset = 9;
1395
+ */
1396
+ blockOffset?: number;
1397
+ /**
1398
+ * @generated from field: optional google.protobuf.Timestamp timestamp = 10;
1399
+ */
1400
+ timestamp?: Timestamp;
1312
1401
  };
1313
1402
  /**
1314
1403
  * TransactionStatus captures status metadata for a transaction.
@@ -1317,7 +1406,7 @@ type Event = Message<"thru.services.v1.Event"> & {
1317
1406
  */
1318
1407
  type TransactionStatus = Message<"thru.services.v1.TransactionStatus"> & {
1319
1408
  /**
1320
- * @generated from field: thru.core.v1.Signature signature = 1;
1409
+ * @generated from field: thru.common.v1.Signature signature = 1;
1321
1410
  */
1322
1411
  signature?: Signature;
1323
1412
  /**
@@ -1353,7 +1442,7 @@ type BatchSendTransactionsResponse = Message<"thru.services.v1.BatchSendTransact
1353
1442
  /**
1354
1443
  * Signatures for each transaction (in same order as request).
1355
1444
  *
1356
- * @generated from field: repeated thru.core.v1.Signature signatures = 1;
1445
+ * @generated from field: repeated thru.common.v1.Signature signatures = 1;
1357
1446
  */
1358
1447
  signatures: Signature[];
1359
1448
  /**
@@ -1364,18 +1453,24 @@ type BatchSendTransactionsResponse = Message<"thru.services.v1.BatchSendTransact
1364
1453
  accepted: boolean[];
1365
1454
  };
1366
1455
 
1456
+ type PartialTransportOptions = Partial<GrpcWebTransportOptions>;
1367
1457
  interface ThruClientConfig {
1368
1458
  baseUrl?: string;
1459
+ transport?: Transport;
1460
+ transportOptions?: PartialTransportOptions;
1461
+ interceptors?: Interceptor[];
1462
+ callOptions?: CallOptions;
1369
1463
  }
1370
1464
  type QueryClient = ReturnType<typeof createClient<typeof QueryService>>;
1371
1465
  type CommandClient = ReturnType<typeof createClient<typeof CommandService>>;
1372
1466
  type StreamingClient = ReturnType<typeof createClient<typeof StreamingService>>;
1373
1467
  interface ThruClientContext {
1374
1468
  baseUrl: string;
1375
- transport: ReturnType<typeof createGrpcWebTransport>;
1469
+ transport: Transport;
1376
1470
  query: QueryClient;
1377
1471
  command: CommandClient;
1378
1472
  streaming: StreamingClient;
1473
+ callOptions?: CallOptions;
1379
1474
  }
1380
1475
 
1381
1476
  interface AccountFlagsData {
@@ -1472,7 +1567,7 @@ type StreamAccountUpdate = {
1472
1567
  update: AccountUpdateDelta;
1473
1568
  };
1474
1569
 
1475
- type FilterParamValueCase = "stringValue" | "bytesValue" | "boolValue" | "intValue" | "doubleValue";
1570
+ type FilterParamValueCase = "stringValue" | "bytesValue" | "boolValue" | "intValue" | "doubleValue" | "uintValue" | "pubkeyValue" | "signatureValue" | "taPubkeyValue" | "tsSignatureValue";
1476
1571
  declare class FilterParamValue {
1477
1572
  private readonly case?;
1478
1573
  private readonly value?;
@@ -1483,6 +1578,11 @@ declare class FilterParamValue {
1483
1578
  static bool(value: boolean): FilterParamValue;
1484
1579
  static int(value: bigint): FilterParamValue;
1485
1580
  static double(value: number): FilterParamValue;
1581
+ static uint(value: number | bigint): FilterParamValue;
1582
+ static pubkey(value: Pubkey$1, field?: string): FilterParamValue;
1583
+ static signature(value: BytesLike, field?: string): FilterParamValue;
1584
+ static taPubkey(value: Pubkey$1 | string, field?: string): FilterParamValue;
1585
+ static tsSignature(value: BytesLike | string, field?: string): FilterParamValue;
1486
1586
  static fromProto(proto: FilterParamValue$1): FilterParamValue;
1487
1587
  toProto(): FilterParamValue$1;
1488
1588
  getCase(): FilterParamValueCase | undefined;
@@ -1490,7 +1590,12 @@ declare class FilterParamValue {
1490
1590
  getBytes(): Uint8Array | undefined;
1491
1591
  getBool(): boolean | undefined;
1492
1592
  getInt(): bigint | undefined;
1593
+ getUint(): bigint | undefined;
1493
1594
  getDouble(): number | undefined;
1595
+ getPubkey(): Uint8Array | undefined;
1596
+ getSignature(): Uint8Array | undefined;
1597
+ getTaPubkey(): string | undefined;
1598
+ getTsSignature(): string | undefined;
1494
1599
  }
1495
1600
  interface FilterParamsInit {
1496
1601
  [key: string]: FilterParamValue;
@@ -1659,12 +1764,20 @@ declare class Block {
1659
1764
  private static parseTransactionsFromBody;
1660
1765
  }
1661
1766
 
1767
+ type TsSignatureInput = string | Uint8Array;
1768
+
1662
1769
  type BlockSelector = {
1663
1770
  slot: number | bigint;
1664
1771
  } | {
1665
1772
  blockHash: BytesLike;
1666
1773
  };
1774
+ declare function toSignature(value: BytesLike): Signature;
1775
+ declare function toSignatureBytes(value: BytesLike): Uint8Array;
1776
+ declare function toTsSignature(value: TsSignatureInput | BytesLike, field?: string): TsSignature;
1667
1777
  declare function toPubkey(value: Pubkey$1, field: string): Pubkey;
1778
+ declare function toPubkeyBytes(value: Pubkey$1, field: string): Uint8Array;
1779
+ declare function toTaPubkey(value: Pubkey$1 | string, field?: string): TaPubkey;
1780
+ declare function toBlockHash(value: BytesLike): BlockHash;
1668
1781
  interface DeriveProgramAddressOptions {
1669
1782
  programAddress: Pubkey$1;
1670
1783
  seed: BytesLike;
@@ -1708,6 +1821,39 @@ declare namespace blocks {
1708
1821
  export { type blocks_BlockList as BlockList, type blocks_BlockQueryOptions as BlockQueryOptions, type blocks_ListBlocksOptions as ListBlocksOptions, type blocks_RawBlockQueryOptions as RawBlockQueryOptions, blocks_getBlock as getBlock, blocks_getRawBlock as getRawBlock, blocks_listBlocks as listBlocks };
1709
1822
  }
1710
1823
 
1824
+ declare function consensusStatusToString(status: ConsensusStatus): string;
1825
+
1826
+ type VersionContextInput = VersionContext | {
1827
+ current: true;
1828
+ } | {
1829
+ currentOrHistorical: true;
1830
+ } | {
1831
+ slot: number | bigint;
1832
+ } | {
1833
+ timestamp: Date | number | Timestamp;
1834
+ } | {
1835
+ seq: number | bigint;
1836
+ };
1837
+
1838
+ declare function currentVersionContext(): VersionContext;
1839
+ declare function currentOrHistoricalVersionContext(): VersionContext;
1840
+ declare function slotVersionContext(slot: number | bigint): VersionContext;
1841
+ declare function timestampVersionContext(value: Date | number | Timestamp): VersionContext;
1842
+ declare function seqVersionContext(seq: number | bigint): VersionContext;
1843
+ declare function versionContext(input?: VersionContextInput): VersionContext;
1844
+
1845
+ type consensus_VersionContextInput = VersionContextInput;
1846
+ declare const consensus_consensusStatusToString: typeof consensusStatusToString;
1847
+ declare const consensus_currentOrHistoricalVersionContext: typeof currentOrHistoricalVersionContext;
1848
+ declare const consensus_currentVersionContext: typeof currentVersionContext;
1849
+ declare const consensus_seqVersionContext: typeof seqVersionContext;
1850
+ declare const consensus_slotVersionContext: typeof slotVersionContext;
1851
+ declare const consensus_timestampVersionContext: typeof timestampVersionContext;
1852
+ declare const consensus_versionContext: typeof versionContext;
1853
+ declare namespace consensus {
1854
+ export { type consensus_VersionContextInput as VersionContextInput, consensus_consensusStatusToString as consensusStatusToString, consensus_currentOrHistoricalVersionContext as currentOrHistoricalVersionContext, consensus_currentVersionContext as currentVersionContext, consensus_seqVersionContext as seqVersionContext, consensus_slotVersionContext as slotVersionContext, consensus_timestampVersionContext as timestampVersionContext, consensus_versionContext as versionContext };
1855
+ }
1856
+
1711
1857
  interface ChainEventParams {
1712
1858
  id: string;
1713
1859
  transactionSignature?: Uint8Array;
@@ -1805,7 +1951,7 @@ declare class StateProof {
1805
1951
  type GenerateStateProofOptions = {
1806
1952
  address?: Pubkey$1;
1807
1953
  proofType: StateProofType;
1808
- targetSlot: bigint;
1954
+ targetSlot?: bigint;
1809
1955
  };
1810
1956
 
1811
1957
  declare function generateStateProof(ctx: ThruClientContext, options: GenerateStateProofOptions): Promise<StateProof>;
@@ -1844,9 +1990,7 @@ interface StreamTransactionsOptions {
1844
1990
  minConsensus?: ConsensusStatus;
1845
1991
  signal?: AbortSignal;
1846
1992
  }
1847
- interface StreamTransactionsResult {
1848
- transaction: Transaction;
1849
- }
1993
+ type StreamTransactionsResult = StreamTransactionUpdate;
1850
1994
  declare function streamTransactions(ctx: ThruClientContext, options?: StreamTransactionsOptions): AsyncIterable<StreamTransactionsResult>;
1851
1995
  interface StreamEventsOptions {
1852
1996
  filter?: Filter;
@@ -1857,24 +2001,40 @@ interface StreamEventsResult {
1857
2001
  }
1858
2002
  declare function streamEvents(ctx: ThruClientContext, options?: StreamEventsOptions): AsyncIterable<StreamEventsResult>;
1859
2003
  declare function trackTransaction(ctx: ThruClientContext, signature: BytesLike, options?: TrackTransactionOptions): AsyncIterable<TrackTransactionUpdate>;
2004
+ interface CollectStreamOptions {
2005
+ limit?: number;
2006
+ signal?: AbortSignal;
2007
+ }
2008
+ declare function collectStream<T>(iterable: AsyncIterable<T>, options?: CollectStreamOptions): Promise<T[]>;
2009
+ declare function firstStreamValue<T>(iterable: AsyncIterable<T>, options?: {
2010
+ signal?: AbortSignal;
2011
+ }): Promise<T | undefined>;
2012
+ declare function forEachStreamValue<T>(iterable: AsyncIterable<T>, handler: (value: T, index: number) => void | Promise<void>, options?: {
2013
+ signal?: AbortSignal;
2014
+ }): Promise<void>;
1860
2015
 
2016
+ type streaming_CollectStreamOptions = CollectStreamOptions;
1861
2017
  type streaming_StreamAccountUpdatesOptions = StreamAccountUpdatesOptions;
1862
2018
  type streaming_StreamAccountUpdatesResult = StreamAccountUpdatesResult;
1863
2019
  type streaming_StreamBlocksOptions = StreamBlocksOptions;
1864
2020
  type streaming_StreamBlocksResult = StreamBlocksResult;
1865
2021
  type streaming_StreamEventsOptions = StreamEventsOptions;
1866
2022
  type streaming_StreamEventsResult = StreamEventsResult;
2023
+ type streaming_StreamTransactionUpdate = StreamTransactionUpdate;
1867
2024
  type streaming_StreamTransactionsOptions = StreamTransactionsOptions;
1868
2025
  type streaming_StreamTransactionsResult = StreamTransactionsResult;
1869
2026
  type streaming_TrackTransactionOptions = TrackTransactionOptions;
1870
2027
  type streaming_TrackTransactionUpdate = TrackTransactionUpdate;
2028
+ declare const streaming_collectStream: typeof collectStream;
2029
+ declare const streaming_firstStreamValue: typeof firstStreamValue;
2030
+ declare const streaming_forEachStreamValue: typeof forEachStreamValue;
1871
2031
  declare const streaming_streamAccountUpdates: typeof streamAccountUpdates;
1872
2032
  declare const streaming_streamBlocks: typeof streamBlocks;
1873
2033
  declare const streaming_streamEvents: typeof streamEvents;
1874
2034
  declare const streaming_streamTransactions: typeof streamTransactions;
1875
2035
  declare const streaming_trackTransaction: typeof trackTransaction;
1876
2036
  declare namespace streaming {
1877
- export { type streaming_StreamAccountUpdatesOptions as StreamAccountUpdatesOptions, type streaming_StreamAccountUpdatesResult as StreamAccountUpdatesResult, type streaming_StreamBlocksOptions as StreamBlocksOptions, type streaming_StreamBlocksResult as StreamBlocksResult, type streaming_StreamEventsOptions as StreamEventsOptions, type streaming_StreamEventsResult as StreamEventsResult, type streaming_StreamTransactionsOptions as StreamTransactionsOptions, type streaming_StreamTransactionsResult as StreamTransactionsResult, type streaming_TrackTransactionOptions as TrackTransactionOptions, type streaming_TrackTransactionUpdate as TrackTransactionUpdate, streaming_streamAccountUpdates as streamAccountUpdates, streaming_streamBlocks as streamBlocks, streaming_streamEvents as streamEvents, streaming_streamTransactions as streamTransactions, streaming_trackTransaction as trackTransaction };
2037
+ export { type streaming_CollectStreamOptions as CollectStreamOptions, type streaming_StreamAccountUpdatesOptions as StreamAccountUpdatesOptions, type streaming_StreamAccountUpdatesResult as StreamAccountUpdatesResult, type streaming_StreamBlocksOptions as StreamBlocksOptions, type streaming_StreamBlocksResult as StreamBlocksResult, type streaming_StreamEventsOptions as StreamEventsOptions, type streaming_StreamEventsResult as StreamEventsResult, type streaming_StreamTransactionUpdate as StreamTransactionUpdate, type streaming_StreamTransactionsOptions as StreamTransactionsOptions, type streaming_StreamTransactionsResult as StreamTransactionsResult, type streaming_TrackTransactionOptions as TrackTransactionOptions, type streaming_TrackTransactionUpdate as TrackTransactionUpdate, streaming_collectStream as collectStream, streaming_firstStreamValue as firstStreamValue, streaming_forEachStreamValue as forEachStreamValue, streaming_streamAccountUpdates as streamAccountUpdates, streaming_streamBlocks as streamBlocks, streaming_streamEvents as streamEvents, streaming_streamTransactions as streamTransactions, streaming_trackTransaction as trackTransaction };
1878
2038
  }
1879
2039
 
1880
2040
  interface TransactionFeePayerConfig {
@@ -1975,4 +2135,4 @@ declare class VersionInfo {
1975
2135
  get(component: string): string | undefined;
1976
2136
  }
1977
2137
 
1978
- export { type TrackTransactionOptions as $, Account as A, type BuildTransactionParams as B, ChainEvent as C, type RawBlockQueryOptions as D, type BlockSelector as E, Filter as F, type GetEventOptions as G, HeightSnapshot as H, type DeriveProgramAddressOptions as I, type DeriveProgramAddressResult as J, type GeneratedKeyPair as K, type ListAccountsOptions as L, type StreamAccountUpdate as M, type HeightSnapshotParams as N, type StreamAccountUpdatesOptions as O, PageRequest as P, type StreamAccountUpdatesResult as Q, type RawAccountQueryOptions as R, type SignedTransactionResult as S, Transaction as T, type StreamBlocksOptions as U, VersionInfo as V, type StreamBlocksResult as W, type StreamEventsOptions as X, type StreamEventsResult as Y, type StreamTransactionsOptions as Z, type StreamTransactionsResult as _, accounts as a, type TrackTransactionUpdate as a0, type TransactionExecutionEvent as a1, type TransactionExecutionResultData as a2, type InstructionContext as a3, type ProgramIdentifier as a4, type BatchSendTransactionsOptions as a5, type BuildAndSignTransactionOptions as a6, type BuildTransactionOptions as a7, type InstructionData as a8, type ListTransactionsForAccountOptions as a9, batchSendTransactions as aA, trackTransaction as aB, getEvent as aC, streamEvents as aD, generateStateProof as aE, generateKeyPair as aF, fromPrivateKey as aG, type Signature as aH, type Pubkey as aI, type BlockHash as aJ, type ThruClientConfig as aK, type RawTransactionQueryOptions as aa, type TransactionAccountsConfig as ab, type TransactionFeePayerConfig as ac, type TransactionHeaderConfig as ad, type TransactionList as ae, type TransactionQueryOptions as af, type GenerateStateProofOptions as ag, type ThruClientContext as ah, getBlock as ai, getRawBlock as aj, listBlocks as ak, streamBlocks as al, getBlockHeight as am, getAccount as an, getRawAccount as ao, listAccounts as ap, streamAccountUpdates as aq, createAccount as ar, getTransaction as as, getRawTransaction as at, getTransactionStatus as au, listTransactionsForAccount as av, streamTransactions as aw, buildTransaction as ax, buildAndSignTransaction as ay, sendTransaction as az, blocks as b, Block as c, FilterParamValue as d, events as e, PageResponse as f, StateProof as g, height as h, TransactionStatusSnapshot as i, deriveProgramAddress as j, keys as k, toPubkey as l, ConsensusStatus as m, FilterParamValueSchema as n, FilterSchema as o, proofs as p, type PageRequestParams as q, type PageResponseParams as r, streaming as s, transactions as t, type AccountList as u, type AccountQueryOptions as v, type CreateAccountOptions as w, type BlockList as x, type BlockQueryOptions as y, type ListBlocksOptions as z };
2138
+ export { type GetEventOptions as $, Account as A, type BuildTransactionParams as B, ChainEvent as C, FilterParamValueSchema as D, FilterSchema as E, Filter as F, AccountView as G, HeightSnapshot as H, BlockView as I, ExecutionStatus as J, TransactionView as K, TransactionVmError as L, type PageRequestParams as M, type PageResponseParams as N, type VersionContextInput as O, PageRequest as P, type AccountQueryOptions as Q, type CreateAccountOptions as R, type SignedTransactionResult as S, Transaction as T, type ListAccountsOptions as U, VersionInfo as V, type RawAccountQueryOptions as W, type BlockList as X, type BlockQueryOptions as Y, type ListBlocksOptions as Z, type RawBlockQueryOptions as _, accounts as a, slotVersionContext as a$, type BlockSelector as a0, type DeriveProgramAddressOptions as a1, type DeriveProgramAddressResult as a2, type GeneratedKeyPair as a3, type StreamAccountUpdate as a4, type HeightSnapshotParams as a5, type StreamAccountUpdatesOptions as a6, type StreamAccountUpdatesResult as a7, type StreamBlocksOptions as a8, type StreamBlocksResult as a9, listBlocks as aA, streamBlocks as aB, getBlockHeight as aC, getAccount as aD, getRawAccount as aE, listAccounts as aF, streamAccountUpdates as aG, createAccount as aH, getTransaction as aI, getRawTransaction as aJ, getTransactionStatus as aK, listTransactionsForAccount as aL, streamTransactions as aM, buildTransaction as aN, buildAndSignTransaction as aO, sendTransaction as aP, batchSendTransactions as aQ, trackTransaction as aR, getEvent as aS, streamEvents as aT, generateStateProof as aU, generateKeyPair as aV, fromPrivateKey as aW, consensusStatusToString as aX, versionContext as aY, currentVersionContext as aZ, currentOrHistoricalVersionContext as a_, type StreamEventsOptions as aa, type StreamEventsResult as ab, type StreamTransactionsOptions as ac, type StreamTransactionsResult as ad, type StreamTransactionUpdate as ae, type TrackTransactionOptions as af, type TrackTransactionUpdate as ag, type TransactionExecutionEvent as ah, type TransactionExecutionResultData as ai, type InstructionContext as aj, type ProgramIdentifier as ak, type BatchSendTransactionsOptions as al, type BuildAndSignTransactionOptions as am, type BuildTransactionOptions as an, type InstructionData as ao, type ListTransactionsForAccountOptions as ap, type RawTransactionQueryOptions as aq, type TransactionAccountsConfig as ar, type TransactionFeePayerConfig as as, type TransactionHeaderConfig as at, type TransactionList as au, type TransactionQueryOptions as av, type GenerateStateProofOptions as aw, type ThruClientContext as ax, getBlock as ay, getRawBlock as az, blocks as b, timestampVersionContext as b0, seqVersionContext as b1, type Signature as b2, type TsSignature as b3, type Pubkey as b4, type TaPubkey as b5, type BlockHash as b6, type ThruClientConfig as b7, consensus as c, Block as d, events as e, FilterParamValue as f, PageResponse as g, height as h, StateProof as i, TransactionStatusSnapshot as j, keys as k, deriveProgramAddress as l, toBlockHash as m, toPubkey as n, toPubkeyBytes as o, proofs as p, toSignature as q, toSignatureBytes as r, streaming as s, transactions as t, toTaPubkey as u, toTsSignature as v, collectStream as w, firstStreamValue as x, forEachStreamValue as y, ConsensusStatus as z };