@thru/thru-sdk 0.1.16 → 0.1.20
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/README.md +96 -0
- package/dist/{chunk-FDZQR6ZZ.js → chunk-4JWHIX3Q.js} +168 -65
- package/dist/chunk-4JWHIX3Q.js.map +1 -0
- package/dist/client.d.ts +16 -3
- package/dist/client.js +19 -3
- package/dist/client.js.map +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/sdk.d.ts +5 -4
- package/dist/sdk.js +1 -1
- package/dist/{transactions-X2KKrGw6.d.ts → transactions-CJsRFL_T.d.ts} +562 -98
- package/package.json +15 -4
- package/buf.gen.yaml +0 -12
- package/buf.lock +0 -9
- package/buf.yaml +0 -15
- package/dist/chunk-FDZQR6ZZ.js.map +0 -1
- package/proto/thru/common/v1/consensus.proto +0 -73
- package/proto/thru/common/v1/errors.proto +0 -65
- package/proto/thru/common/v1/filters.proto +0 -60
- package/proto/thru/common/v1/pagination.proto +0 -45
- package/proto/thru/core/v1/account.proto +0 -137
- package/proto/thru/core/v1/block.proto +0 -80
- package/proto/thru/core/v1/state.proto +0 -35
- package/proto/thru/core/v1/transaction.proto +0 -136
- package/proto/thru/core/v1/types.proto +0 -50
- package/proto/thru/services/v1/command_service.proto +0 -70
- package/proto/thru/services/v1/query_service.proto +0 -344
- package/proto/thru/services/v1/streaming_service.proto +0 -126
- package/thru-ts-client-sdk/client.ts +0 -10
- package/thru-ts-client-sdk/core/bound-client.ts +0 -135
- package/thru-ts-client-sdk/core/client.ts +0 -38
- package/thru-ts-client-sdk/defaults.ts +0 -17
- package/thru-ts-client-sdk/modules/accounts.ts +0 -145
- package/thru-ts-client-sdk/modules/blocks.ts +0 -75
- package/thru-ts-client-sdk/modules/events.ts +0 -20
- package/thru-ts-client-sdk/modules/height.ts +0 -9
- package/thru-ts-client-sdk/modules/helpers.ts +0 -131
- package/thru-ts-client-sdk/modules/keys.ts +0 -29
- package/thru-ts-client-sdk/modules/proofs.ts +0 -20
- package/thru-ts-client-sdk/modules/streaming.ts +0 -34
- package/thru-ts-client-sdk/modules/transactions.ts +0 -274
- package/thru-ts-client-sdk/proto/buf/validate/validate_pb.ts +0 -4761
- package/thru-ts-client-sdk/proto/google/api/annotations_pb.ts +0 -39
- package/thru-ts-client-sdk/proto/google/api/client_pb.ts +0 -953
- package/thru-ts-client-sdk/proto/google/api/field_behavior_pb.ts +0 -157
- package/thru-ts-client-sdk/proto/google/api/http_pb.ts +0 -474
- package/thru-ts-client-sdk/proto/google/api/launch_stage_pb.ts +0 -118
- package/thru-ts-client-sdk/proto/thru/common/v1/consensus_pb.ts +0 -163
- package/thru-ts-client-sdk/proto/thru/common/v1/errors_pb.ts +0 -130
- package/thru-ts-client-sdk/proto/thru/common/v1/filters_pb.ts +0 -81
- package/thru-ts-client-sdk/proto/thru/common/v1/pagination_pb.ts +0 -80
- package/thru-ts-client-sdk/proto/thru/core/v1/account_pb.ts +0 -358
- package/thru-ts-client-sdk/proto/thru/core/v1/block_pb.ts +0 -260
- package/thru-ts-client-sdk/proto/thru/core/v1/state_pb.ts +0 -104
- package/thru-ts-client-sdk/proto/thru/core/v1/transaction_pb.ts +0 -327
- package/thru-ts-client-sdk/proto/thru/core/v1/types_pb.ts +0 -101
- package/thru-ts-client-sdk/proto/thru/services/v1/command_service_pb.ts +0 -81
- package/thru-ts-client-sdk/proto/thru/services/v1/query_service_pb.ts +0 -813
- package/thru-ts-client-sdk/proto/thru/services/v1/streaming_service_pb.ts +0 -391
- package/thru-ts-client-sdk/sdk.ts +0 -40
- package/thru-ts-client-sdk/test-scripts/counter.ts +0 -216
- package/thru-ts-client-sdk/test-scripts/create-account.ts +0 -74
- package/thru-ts-client-sdk/test-scripts/get-height.ts +0 -52
- package/thru-ts-client-sdk/transactions/Transaction.ts +0 -240
- package/thru-ts-client-sdk/transactions/TransactionBuilder.ts +0 -48
- package/thru-ts-client-sdk/transactions/__tests__/transaction.test.ts +0 -95
- package/thru-ts-client-sdk/transactions/index.ts +0 -3
- package/thru-ts-client-sdk/transactions/types.ts +0 -64
- package/thru-ts-client-sdk/transactions/utils.ts +0 -132
- package/thru-ts-client-sdk/types/types.ts +0 -8
- package/thru-ts-client-sdk/utils/utils.ts +0 -27
- package/tsconfig.json +0 -9
- package/tsup.config.ts +0 -14
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { BytesLike } from '@thru/helpers';
|
|
1
|
+
import { BytesLike, Pubkey as Pubkey$1 } from '@thru/helpers';
|
|
2
|
+
import { Timestamp } from '@bufbuild/protobuf/wkt';
|
|
2
3
|
import { Message } from '@bufbuild/protobuf';
|
|
3
4
|
import { createClient } from '@connectrpc/connect';
|
|
4
5
|
import { createGrpcWebTransport } from '@connectrpc/connect-web';
|
|
5
|
-
import {
|
|
6
|
+
import { GenMessage } from '@bufbuild/protobuf/codegenv2';
|
|
6
7
|
|
|
7
8
|
type Bytes32 = Uint8Array;
|
|
8
9
|
type Bytes64 = Uint8Array;
|
|
@@ -28,9 +29,16 @@ interface TransactionAccountsInput {
|
|
|
28
29
|
readWriteAccounts?: AccountAddress[];
|
|
29
30
|
readOnlyAccounts?: AccountAddress[];
|
|
30
31
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
/**
|
|
33
|
+
* Context provided to instruction data functions.
|
|
34
|
+
* Contains all transaction accounts in their final sorted order and helper functions
|
|
35
|
+
* for looking up account indexes.
|
|
36
|
+
*/
|
|
37
|
+
interface InstructionContext {
|
|
38
|
+
/** All accounts in final transaction order: [feePayer, program, ...readWrite, ...readOnly] */
|
|
39
|
+
accounts: AccountAddress[];
|
|
40
|
+
/** Get the index of an account by its public key. Throws if account is not found in transaction. */
|
|
41
|
+
getAccountIndex: (pubkey: AccountAddress) => number;
|
|
34
42
|
}
|
|
35
43
|
interface FeePayerInput {
|
|
36
44
|
publicKey: AccountAddress;
|
|
@@ -41,7 +49,8 @@ interface BuildTransactionParams {
|
|
|
41
49
|
program: ProgramIdentifier;
|
|
42
50
|
header: TransactionHeaderInput;
|
|
43
51
|
accounts?: TransactionAccountsInput;
|
|
44
|
-
|
|
52
|
+
instructionData?: BytesLike;
|
|
53
|
+
proofs?: OptionalProofs;
|
|
45
54
|
}
|
|
46
55
|
interface BuiltTransactionResult {
|
|
47
56
|
transaction: TransactionLike;
|
|
@@ -67,7 +76,7 @@ declare class Transaction$1 {
|
|
|
67
76
|
readonly flags: number;
|
|
68
77
|
readonly readWriteAccounts: AccountAddress[];
|
|
69
78
|
readonly readOnlyAccounts: AccountAddress[];
|
|
70
|
-
readonly
|
|
79
|
+
readonly instructionData?: Uint8Array;
|
|
71
80
|
readonly feePayerStateProof?: Uint8Array;
|
|
72
81
|
readonly feePayerAccountMetaRaw?: Uint8Array;
|
|
73
82
|
private signature?;
|
|
@@ -76,7 +85,7 @@ declare class Transaction$1 {
|
|
|
76
85
|
program: AccountAddress;
|
|
77
86
|
header: TransactionHeaderInput;
|
|
78
87
|
accounts?: TransactionAccountsInput;
|
|
79
|
-
|
|
88
|
+
instructionData?: Uint8Array;
|
|
80
89
|
proofs?: OptionalProofs;
|
|
81
90
|
});
|
|
82
91
|
getSignature(): Bytes64 | undefined;
|
|
@@ -128,6 +137,26 @@ type Signature = Message<"thru.core.v1.Signature"> & {
|
|
|
128
137
|
value: Uint8Array;
|
|
129
138
|
};
|
|
130
139
|
|
|
140
|
+
/**
|
|
141
|
+
* BatchSendTransactionsResponse returns submission results for each transaction.
|
|
142
|
+
*
|
|
143
|
+
* @generated from message thru.services.v1.BatchSendTransactionsResponse
|
|
144
|
+
*/
|
|
145
|
+
type BatchSendTransactionsResponse = Message<"thru.services.v1.BatchSendTransactionsResponse"> & {
|
|
146
|
+
/**
|
|
147
|
+
* Signatures for each transaction (in same order as request).
|
|
148
|
+
*
|
|
149
|
+
* @generated from field: repeated thru.core.v1.Signature signatures = 1;
|
|
150
|
+
*/
|
|
151
|
+
signatures: Signature[];
|
|
152
|
+
/**
|
|
153
|
+
* Acceptance status for each transaction (true if accepted, false if not).
|
|
154
|
+
*
|
|
155
|
+
* @generated from field: repeated bool accepted = 2;
|
|
156
|
+
*/
|
|
157
|
+
accepted: boolean[];
|
|
158
|
+
};
|
|
159
|
+
|
|
131
160
|
/**
|
|
132
161
|
* VersionContext selects which logical version of a resource should be
|
|
133
162
|
* returned. At least one field must be set.
|
|
@@ -247,18 +276,72 @@ type Filter = Message<"thru.common.v1.Filter"> & {
|
|
|
247
276
|
/**
|
|
248
277
|
* CEL expression applied server-side. Empty expressions are treated as no-op.
|
|
249
278
|
*
|
|
250
|
-
* @generated from field: string expression = 1;
|
|
279
|
+
* @generated from field: optional string expression = 1;
|
|
251
280
|
*/
|
|
252
|
-
expression
|
|
281
|
+
expression?: string;
|
|
253
282
|
/**
|
|
254
283
|
* Named parameter bindings for expression parameterization.
|
|
255
284
|
*
|
|
256
|
-
* @generated from field: map<string,
|
|
285
|
+
* @generated from field: map<string, thru.common.v1.FilterParamValue> params = 2;
|
|
257
286
|
*/
|
|
258
287
|
params: {
|
|
259
|
-
[key: string]:
|
|
288
|
+
[key: string]: FilterParamValue;
|
|
260
289
|
};
|
|
261
290
|
};
|
|
291
|
+
/**
|
|
292
|
+
* Describes the message thru.common.v1.Filter.
|
|
293
|
+
* Use `create(FilterSchema)` to create a new message.
|
|
294
|
+
*/
|
|
295
|
+
declare const FilterSchema: GenMessage<Filter>;
|
|
296
|
+
/**
|
|
297
|
+
* FilterParamValue carries strongly-typed CEL parameter bindings.
|
|
298
|
+
*
|
|
299
|
+
* @generated from message thru.common.v1.FilterParamValue
|
|
300
|
+
*/
|
|
301
|
+
type FilterParamValue = Message<"thru.common.v1.FilterParamValue"> & {
|
|
302
|
+
/**
|
|
303
|
+
* @generated from oneof thru.common.v1.FilterParamValue.kind
|
|
304
|
+
*/
|
|
305
|
+
kind: {
|
|
306
|
+
/**
|
|
307
|
+
* @generated from field: string string_value = 1;
|
|
308
|
+
*/
|
|
309
|
+
value: string;
|
|
310
|
+
case: "stringValue";
|
|
311
|
+
} | {
|
|
312
|
+
/**
|
|
313
|
+
* @generated from field: bytes bytes_value = 2;
|
|
314
|
+
*/
|
|
315
|
+
value: Uint8Array;
|
|
316
|
+
case: "bytesValue";
|
|
317
|
+
} | {
|
|
318
|
+
/**
|
|
319
|
+
* @generated from field: bool bool_value = 3;
|
|
320
|
+
*/
|
|
321
|
+
value: boolean;
|
|
322
|
+
case: "boolValue";
|
|
323
|
+
} | {
|
|
324
|
+
/**
|
|
325
|
+
* @generated from field: sint64 int_value = 4;
|
|
326
|
+
*/
|
|
327
|
+
value: bigint;
|
|
328
|
+
case: "intValue";
|
|
329
|
+
} | {
|
|
330
|
+
/**
|
|
331
|
+
* @generated from field: double double_value = 5;
|
|
332
|
+
*/
|
|
333
|
+
value: number;
|
|
334
|
+
case: "doubleValue";
|
|
335
|
+
} | {
|
|
336
|
+
case: undefined;
|
|
337
|
+
value?: undefined;
|
|
338
|
+
};
|
|
339
|
+
};
|
|
340
|
+
/**
|
|
341
|
+
* Describes the message thru.common.v1.FilterParamValue.
|
|
342
|
+
* Use `create(FilterParamValueSchema)` to create a new message.
|
|
343
|
+
*/
|
|
344
|
+
declare const FilterParamValueSchema: GenMessage<FilterParamValue>;
|
|
262
345
|
|
|
263
346
|
/**
|
|
264
347
|
* PageRequest contains pagination parameters for listing RPCs.
|
|
@@ -269,21 +352,21 @@ type PageRequest = Message<"thru.common.v1.PageRequest"> & {
|
|
|
269
352
|
/**
|
|
270
353
|
* Maximum number of items to return in a single response.
|
|
271
354
|
*
|
|
272
|
-
* @generated from field: uint32 page_size = 1;
|
|
355
|
+
* @generated from field: optional uint32 page_size = 1;
|
|
273
356
|
*/
|
|
274
|
-
pageSize
|
|
357
|
+
pageSize?: number;
|
|
275
358
|
/**
|
|
276
359
|
* Token identifying the position to resume from.
|
|
277
360
|
*
|
|
278
|
-
* @generated from field: string page_token = 2;
|
|
361
|
+
* @generated from field: optional string page_token = 2;
|
|
279
362
|
*/
|
|
280
|
-
pageToken
|
|
363
|
+
pageToken?: string;
|
|
281
364
|
/**
|
|
282
365
|
* Optional ordering specification in "field [asc|desc]" form.
|
|
283
366
|
*
|
|
284
|
-
* @generated from field: string order_by = 3;
|
|
367
|
+
* @generated from field: optional string order_by = 3;
|
|
285
368
|
*/
|
|
286
|
-
orderBy
|
|
369
|
+
orderBy?: string;
|
|
287
370
|
};
|
|
288
371
|
/**
|
|
289
372
|
* PageResponse captures pagination metadata returned with list results.
|
|
@@ -294,15 +377,15 @@ type PageResponse = Message<"thru.common.v1.PageResponse"> & {
|
|
|
294
377
|
/**
|
|
295
378
|
* Token to retrieve the next page of results, if any.
|
|
296
379
|
*
|
|
297
|
-
* @generated from field: string next_page_token = 1;
|
|
380
|
+
* @generated from field: optional string next_page_token = 1;
|
|
298
381
|
*/
|
|
299
|
-
nextPageToken
|
|
382
|
+
nextPageToken?: string;
|
|
300
383
|
/**
|
|
301
384
|
* Total number of items available when known.
|
|
302
385
|
*
|
|
303
|
-
* @generated from field: uint64 total_size = 2;
|
|
386
|
+
* @generated from field: optional uint64 total_size = 2;
|
|
304
387
|
*/
|
|
305
|
-
totalSize
|
|
388
|
+
totalSize?: bigint;
|
|
306
389
|
};
|
|
307
390
|
|
|
308
391
|
/**
|
|
@@ -359,9 +442,11 @@ type AccountMeta = Message<"thru.core.v1.AccountMeta"> & {
|
|
|
359
442
|
*/
|
|
360
443
|
dataSize: number;
|
|
361
444
|
/**
|
|
362
|
-
*
|
|
445
|
+
* Account sequence number
|
|
446
|
+
*
|
|
447
|
+
* @generated from field: uint64 seq = 4;
|
|
363
448
|
*/
|
|
364
|
-
|
|
449
|
+
seq: bigint;
|
|
365
450
|
/**
|
|
366
451
|
* @generated from field: thru.core.v1.Pubkey owner = 5;
|
|
367
452
|
*/
|
|
@@ -382,17 +467,17 @@ type AccountMeta = Message<"thru.core.v1.AccountMeta"> & {
|
|
|
382
467
|
*/
|
|
383
468
|
type AccountData = Message<"thru.core.v1.AccountData"> & {
|
|
384
469
|
/**
|
|
385
|
-
* @generated from field: bytes data = 1;
|
|
470
|
+
* @generated from field: optional bytes data = 1;
|
|
386
471
|
*/
|
|
387
|
-
data
|
|
472
|
+
data?: Uint8Array;
|
|
388
473
|
/**
|
|
389
|
-
* @generated from field: bool compressed = 2;
|
|
474
|
+
* @generated from field: optional bool compressed = 2;
|
|
390
475
|
*/
|
|
391
|
-
compressed
|
|
476
|
+
compressed?: boolean;
|
|
392
477
|
/**
|
|
393
|
-
* @generated from field: string compression_algorithm = 3;
|
|
478
|
+
* @generated from field: optional string compression_algorithm = 3;
|
|
394
479
|
*/
|
|
395
|
-
compressionAlgorithm
|
|
480
|
+
compressionAlgorithm?: string;
|
|
396
481
|
};
|
|
397
482
|
/**
|
|
398
483
|
* DataSlice describes a contiguous range of account data to return.
|
|
@@ -409,6 +494,33 @@ type DataSlice = Message<"thru.core.v1.DataSlice"> & {
|
|
|
409
494
|
*/
|
|
410
495
|
length: number;
|
|
411
496
|
};
|
|
497
|
+
/**
|
|
498
|
+
* AccountPage represents a 4KB chunk for streaming account data.
|
|
499
|
+
*
|
|
500
|
+
* @generated from message thru.core.v1.AccountPage
|
|
501
|
+
*/
|
|
502
|
+
type AccountPage = Message<"thru.core.v1.AccountPage"> & {
|
|
503
|
+
/**
|
|
504
|
+
* @generated from field: uint32 page_idx = 1;
|
|
505
|
+
*/
|
|
506
|
+
pageIdx: number;
|
|
507
|
+
/**
|
|
508
|
+
* @generated from field: uint32 page_size = 2;
|
|
509
|
+
*/
|
|
510
|
+
pageSize: number;
|
|
511
|
+
/**
|
|
512
|
+
* @generated from field: bytes page_data = 3;
|
|
513
|
+
*/
|
|
514
|
+
pageData: Uint8Array;
|
|
515
|
+
/**
|
|
516
|
+
* @generated from field: optional bool compressed = 4;
|
|
517
|
+
*/
|
|
518
|
+
compressed?: boolean;
|
|
519
|
+
/**
|
|
520
|
+
* @generated from field: optional string compression_algorithm = 5;
|
|
521
|
+
*/
|
|
522
|
+
compressionAlgorithm?: string;
|
|
523
|
+
};
|
|
412
524
|
/**
|
|
413
525
|
* VersionContextMetadata captures context for a returned account state.
|
|
414
526
|
*
|
|
@@ -416,11 +528,11 @@ type DataSlice = Message<"thru.core.v1.DataSlice"> & {
|
|
|
416
528
|
*/
|
|
417
529
|
type VersionContextMetadata = Message<"thru.core.v1.VersionContextMetadata"> & {
|
|
418
530
|
/**
|
|
419
|
-
* @generated from field: uint64 slot = 1;
|
|
531
|
+
* @generated from field: optional uint64 slot = 1;
|
|
420
532
|
*/
|
|
421
|
-
slot
|
|
533
|
+
slot?: bigint;
|
|
422
534
|
/**
|
|
423
|
-
* @generated from field: google.protobuf.Timestamp block_timestamp = 2;
|
|
535
|
+
* @generated from field: optional google.protobuf.Timestamp block_timestamp = 2;
|
|
424
536
|
*/
|
|
425
537
|
blockTimestamp?: Timestamp;
|
|
426
538
|
};
|
|
@@ -435,21 +547,21 @@ type Account = Message<"thru.core.v1.Account"> & {
|
|
|
435
547
|
*/
|
|
436
548
|
address?: Pubkey;
|
|
437
549
|
/**
|
|
438
|
-
* @generated from field: thru.core.v1.AccountMeta meta = 2;
|
|
550
|
+
* @generated from field: optional thru.core.v1.AccountMeta meta = 2;
|
|
439
551
|
*/
|
|
440
552
|
meta?: AccountMeta;
|
|
441
553
|
/**
|
|
442
|
-
* @generated from field: thru.core.v1.AccountData data = 3;
|
|
554
|
+
* @generated from field: optional thru.core.v1.AccountData data = 3;
|
|
443
555
|
*/
|
|
444
556
|
data?: AccountData;
|
|
445
557
|
/**
|
|
446
|
-
* @generated from field: thru.core.v1.VersionContextMetadata version_context = 4;
|
|
558
|
+
* @generated from field: optional thru.core.v1.VersionContextMetadata version_context = 4;
|
|
447
559
|
*/
|
|
448
560
|
versionContext?: VersionContextMetadata;
|
|
449
561
|
/**
|
|
450
|
-
* @generated from field: thru.common.v1.ConsensusStatus consensus_status = 5;
|
|
562
|
+
* @generated from field: optional thru.common.v1.ConsensusStatus consensus_status = 5;
|
|
451
563
|
*/
|
|
452
|
-
consensusStatus
|
|
564
|
+
consensusStatus?: ConsensusStatus;
|
|
453
565
|
};
|
|
454
566
|
/**
|
|
455
567
|
* RawAccount captures raw serialized account bytes.
|
|
@@ -466,11 +578,11 @@ type RawAccount = Message<"thru.core.v1.RawAccount"> & {
|
|
|
466
578
|
*/
|
|
467
579
|
rawMeta: Uint8Array;
|
|
468
580
|
/**
|
|
469
|
-
* @generated from field: bytes raw_data = 3;
|
|
581
|
+
* @generated from field: optional bytes raw_data = 3;
|
|
470
582
|
*/
|
|
471
|
-
rawData
|
|
583
|
+
rawData?: Uint8Array;
|
|
472
584
|
/**
|
|
473
|
-
* @generated from field: thru.core.v1.VersionContextMetadata version_context = 4;
|
|
585
|
+
* @generated from field: optional thru.core.v1.VersionContextMetadata version_context = 4;
|
|
474
586
|
*/
|
|
475
587
|
versionContext?: VersionContextMetadata;
|
|
476
588
|
};
|
|
@@ -601,17 +713,17 @@ type Block = Message<"thru.core.v1.Block"> & {
|
|
|
601
713
|
*/
|
|
602
714
|
header?: BlockHeader;
|
|
603
715
|
/**
|
|
604
|
-
* @generated from field: thru.core.v1.BlockFooter footer = 2;
|
|
716
|
+
* @generated from field: optional thru.core.v1.BlockFooter footer = 2;
|
|
605
717
|
*/
|
|
606
718
|
footer?: BlockFooter;
|
|
607
719
|
/**
|
|
608
|
-
* @generated from field: bytes body = 3;
|
|
720
|
+
* @generated from field: optional bytes body = 3;
|
|
609
721
|
*/
|
|
610
|
-
body
|
|
722
|
+
body?: Uint8Array;
|
|
611
723
|
/**
|
|
612
|
-
* @generated from field: thru.common.v1.ConsensusStatus consensus_status = 4;
|
|
724
|
+
* @generated from field: optional thru.common.v1.ConsensusStatus consensus_status = 4;
|
|
613
725
|
*/
|
|
614
|
-
consensusStatus
|
|
726
|
+
consensusStatus?: ConsensusStatus;
|
|
615
727
|
};
|
|
616
728
|
/**
|
|
617
729
|
* RawBlock captures raw block bytes for direct access.
|
|
@@ -808,9 +920,9 @@ type TransactionExecutionResult = Message<"thru.core.v1.TransactionExecutionResu
|
|
|
808
920
|
*/
|
|
809
921
|
userErrorCode: bigint;
|
|
810
922
|
/**
|
|
811
|
-
* @generated from field:
|
|
923
|
+
* @generated from field: thru.core.v1.TransactionVmError vm_error = 5;
|
|
812
924
|
*/
|
|
813
|
-
vmError:
|
|
925
|
+
vmError: TransactionVmError;
|
|
814
926
|
/**
|
|
815
927
|
* @generated from field: uint64 execution_result = 6;
|
|
816
928
|
*/
|
|
@@ -882,21 +994,21 @@ type Transaction = Message<"thru.core.v1.Transaction"> & {
|
|
|
882
994
|
*/
|
|
883
995
|
header?: TransactionHeader;
|
|
884
996
|
/**
|
|
885
|
-
* @generated from field: bytes body = 3;
|
|
997
|
+
* @generated from field: optional bytes body = 3;
|
|
886
998
|
*/
|
|
887
|
-
body
|
|
999
|
+
body?: Uint8Array;
|
|
888
1000
|
/**
|
|
889
|
-
* @generated from field: thru.core.v1.TransactionExecutionResult execution_result = 4;
|
|
1001
|
+
* @generated from field: optional thru.core.v1.TransactionExecutionResult execution_result = 4;
|
|
890
1002
|
*/
|
|
891
1003
|
executionResult?: TransactionExecutionResult;
|
|
892
1004
|
/**
|
|
893
|
-
* @generated from field: uint64 slot = 5;
|
|
1005
|
+
* @generated from field: optional uint64 slot = 5;
|
|
894
1006
|
*/
|
|
895
|
-
slot
|
|
1007
|
+
slot?: bigint;
|
|
896
1008
|
/**
|
|
897
|
-
* @generated from field: uint32 block_offset = 6;
|
|
1009
|
+
* @generated from field: optional uint32 block_offset = 6;
|
|
898
1010
|
*/
|
|
899
|
-
blockOffset
|
|
1011
|
+
blockOffset?: number;
|
|
900
1012
|
};
|
|
901
1013
|
/**
|
|
902
1014
|
* RawTransaction provides direct access to serialized transaction bytes.
|
|
@@ -940,6 +1052,175 @@ declare enum TransactionView {
|
|
|
940
1052
|
*/
|
|
941
1053
|
FULL = 4
|
|
942
1054
|
}
|
|
1055
|
+
/**
|
|
1056
|
+
* TransactionVmError enumerates runtime error codes returned by the executor.
|
|
1057
|
+
*
|
|
1058
|
+
* @generated from enum thru.core.v1.TransactionVmError
|
|
1059
|
+
*/
|
|
1060
|
+
declare enum TransactionVmError {
|
|
1061
|
+
/**
|
|
1062
|
+
* TN_RUNTIME_TXN_EXECUTE_SUCCESS
|
|
1063
|
+
*
|
|
1064
|
+
* @generated from enum value: TRANSACTION_VM_EXECUTE_SUCCESS = 0;
|
|
1065
|
+
*/
|
|
1066
|
+
TRANSACTION_VM_EXECUTE_SUCCESS = 0,
|
|
1067
|
+
/**
|
|
1068
|
+
* TN_RUNTIME_TXN_ERR_INVALID_FORMAT
|
|
1069
|
+
*
|
|
1070
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_INVALID_FORMAT = -255;
|
|
1071
|
+
*/
|
|
1072
|
+
TRANSACTION_VM_ERROR_INVALID_FORMAT = -255,
|
|
1073
|
+
/**
|
|
1074
|
+
* TN_RUNTIME_TXN_ERR_INVALID_VERSION
|
|
1075
|
+
*
|
|
1076
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_INVALID_VERSION = -254;
|
|
1077
|
+
*/
|
|
1078
|
+
TRANSACTION_VM_ERROR_INVALID_VERSION = -254,
|
|
1079
|
+
/**
|
|
1080
|
+
* TN_RUNTIME_TXN_ERR_INVALID_FLAGS
|
|
1081
|
+
*
|
|
1082
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_INVALID_FLAGS = -253;
|
|
1083
|
+
*/
|
|
1084
|
+
TRANSACTION_VM_ERROR_INVALID_FLAGS = -253,
|
|
1085
|
+
/**
|
|
1086
|
+
* TN_RUNTIME_TXN_ERR_INVALID_SIGNATURE
|
|
1087
|
+
*
|
|
1088
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_INVALID_SIGNATURE = -252;
|
|
1089
|
+
*/
|
|
1090
|
+
TRANSACTION_VM_ERROR_INVALID_SIGNATURE = -252,
|
|
1091
|
+
/**
|
|
1092
|
+
* TN_RUNTIME_TXN_ERR_DUPLICATE_ACCOUNT
|
|
1093
|
+
*
|
|
1094
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_DUPLICATE_ACCOUNT = -251;
|
|
1095
|
+
*/
|
|
1096
|
+
TRANSACTION_VM_ERROR_DUPLICATE_ACCOUNT = -251,
|
|
1097
|
+
/**
|
|
1098
|
+
* TN_RUNTIME_TXN_ERR_UNSORTED_ACCOUNTS
|
|
1099
|
+
*
|
|
1100
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_UNSORTED_ACCOUNTS = -250;
|
|
1101
|
+
*/
|
|
1102
|
+
TRANSACTION_VM_ERROR_UNSORTED_ACCOUNTS = -250,
|
|
1103
|
+
/**
|
|
1104
|
+
* TN_RUNTIME_TXN_ERR_UNSORTED_READWRITE_ACCOUNTS
|
|
1105
|
+
*
|
|
1106
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_UNSORTED_READWRITE_ACCOUNTS = -249;
|
|
1107
|
+
*/
|
|
1108
|
+
TRANSACTION_VM_ERROR_UNSORTED_READWRITE_ACCOUNTS = -249,
|
|
1109
|
+
/**
|
|
1110
|
+
* TN_RUNTIME_TXN_ERR_UNSORTED_READONLY_ACCOUNTS
|
|
1111
|
+
*
|
|
1112
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_UNSORTED_READONLY_ACCOUNTS = -248;
|
|
1113
|
+
*/
|
|
1114
|
+
TRANSACTION_VM_ERROR_UNSORTED_READONLY_ACCOUNTS = -248,
|
|
1115
|
+
/**
|
|
1116
|
+
* TN_RUNTIME_TXN_ERR_ACCOUNT_COUNT_LIMIT_EXCEEDED
|
|
1117
|
+
*
|
|
1118
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_ACCOUNT_COUNT_LIMIT_EXCEEDED = -247;
|
|
1119
|
+
*/
|
|
1120
|
+
TRANSACTION_VM_ERROR_ACCOUNT_COUNT_LIMIT_EXCEEDED = -247,
|
|
1121
|
+
/**
|
|
1122
|
+
* TN_RUNTIME_TXN_ERR_NONCE_TOO_LOW
|
|
1123
|
+
*
|
|
1124
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_NONCE_TOO_LOW = -511;
|
|
1125
|
+
*/
|
|
1126
|
+
TRANSACTION_VM_ERROR_NONCE_TOO_LOW = -511,
|
|
1127
|
+
/**
|
|
1128
|
+
* TN_RUNTIME_TXN_ERR_NONCE_TOO_HIGH
|
|
1129
|
+
*
|
|
1130
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_NONCE_TOO_HIGH = -510;
|
|
1131
|
+
*/
|
|
1132
|
+
TRANSACTION_VM_ERROR_NONCE_TOO_HIGH = -510,
|
|
1133
|
+
/**
|
|
1134
|
+
* TN_RUNTIME_TXN_ERR_INSUFFICIENT_FEE_PAYER_BALANCE
|
|
1135
|
+
*
|
|
1136
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_INSUFFICIENT_FEE_PAYER_BALANCE = -509;
|
|
1137
|
+
*/
|
|
1138
|
+
TRANSACTION_VM_ERROR_INSUFFICIENT_FEE_PAYER_BALANCE = -509,
|
|
1139
|
+
/**
|
|
1140
|
+
* TN_RUNTIME_TXN_ERR_FEE_PAYER_ACCOUNT_DOES_NOT_EXIST
|
|
1141
|
+
*
|
|
1142
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_FEE_PAYER_ACCOUNT_DOES_NOT_EXIST = -508;
|
|
1143
|
+
*/
|
|
1144
|
+
TRANSACTION_VM_ERROR_FEE_PAYER_ACCOUNT_DOES_NOT_EXIST = -508,
|
|
1145
|
+
/**
|
|
1146
|
+
* TN_RUNTIME_TXN_ERR_NOT_LIVE_YET
|
|
1147
|
+
*
|
|
1148
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_NOT_LIVE_YET = -507;
|
|
1149
|
+
*/
|
|
1150
|
+
TRANSACTION_VM_ERROR_NOT_LIVE_YET = -507,
|
|
1151
|
+
/**
|
|
1152
|
+
* TN_RUNTIME_TXN_ERR_EXPIRED
|
|
1153
|
+
*
|
|
1154
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_EXPIRED = -506;
|
|
1155
|
+
*/
|
|
1156
|
+
TRANSACTION_VM_ERROR_EXPIRED = -506,
|
|
1157
|
+
/**
|
|
1158
|
+
* TN_RUNTIME_TXN_ERR_INVALID_FEE_PAYER_STATE_PROOF
|
|
1159
|
+
*
|
|
1160
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF = -505;
|
|
1161
|
+
*/
|
|
1162
|
+
TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF = -505,
|
|
1163
|
+
/**
|
|
1164
|
+
* TN_RUNTIME_TXN_ERR_INVALID_FEE_PAYER_STATE_PROOF_TYPE
|
|
1165
|
+
*
|
|
1166
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF_TYPE = -504;
|
|
1167
|
+
*/
|
|
1168
|
+
TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF_TYPE = -504,
|
|
1169
|
+
/**
|
|
1170
|
+
* TN_RUNTIME_TXN_ERR_INVALID_FEE_PAYER_STATE_PROOF_SLOT
|
|
1171
|
+
*
|
|
1172
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF_SLOT = -503;
|
|
1173
|
+
*/
|
|
1174
|
+
TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF_SLOT = -503,
|
|
1175
|
+
/**
|
|
1176
|
+
* TN_RUNTIME_TXN_ERR_INVALID_FEE_PAYER_ACCOUNT_OWNER
|
|
1177
|
+
*
|
|
1178
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_ACCOUNT_OWNER = -502;
|
|
1179
|
+
*/
|
|
1180
|
+
TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_ACCOUNT_OWNER = -502,
|
|
1181
|
+
/**
|
|
1182
|
+
* TN_RUNTIME_TXN_ERR_INVALID_FEE_PAYER_STATE_PROOF_ACCOUNT_OWNER
|
|
1183
|
+
*
|
|
1184
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF_ACCOUNT_OWNER = -501;
|
|
1185
|
+
*/
|
|
1186
|
+
TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF_ACCOUNT_OWNER = -501,
|
|
1187
|
+
/**
|
|
1188
|
+
* TN_RUNTIME_TXN_ERR_INVALID_FEE_PAYER_STATE_PROOF_ACCOUNT_META_DATA_SZ
|
|
1189
|
+
*
|
|
1190
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF_ACCOUNT_META_DATA_SZ = -500;
|
|
1191
|
+
*/
|
|
1192
|
+
TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF_ACCOUNT_META_DATA_SZ = -500,
|
|
1193
|
+
/**
|
|
1194
|
+
* TN_RUNTIME_TXN_ERR_VM_FAILED
|
|
1195
|
+
*
|
|
1196
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_VM_FAILED = -767;
|
|
1197
|
+
*/
|
|
1198
|
+
TRANSACTION_VM_ERROR_VM_FAILED = -767,
|
|
1199
|
+
/**
|
|
1200
|
+
* TN_RUNTIME_TXN_ERR_INVALID_PROGRAM_ACCOUNT
|
|
1201
|
+
*
|
|
1202
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_INVALID_PROGRAM_ACCOUNT = -766;
|
|
1203
|
+
*/
|
|
1204
|
+
TRANSACTION_VM_ERROR_INVALID_PROGRAM_ACCOUNT = -766,
|
|
1205
|
+
/**
|
|
1206
|
+
* TN_RUNTIME_TXN_ERR_VM_REVERT
|
|
1207
|
+
*
|
|
1208
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_VM_REVERT = -765;
|
|
1209
|
+
*/
|
|
1210
|
+
TRANSACTION_VM_ERROR_VM_REVERT = -765,
|
|
1211
|
+
/**
|
|
1212
|
+
* TN_RUNTIME_TXN_ERR_CU_EXHAUSTED
|
|
1213
|
+
*
|
|
1214
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_CU_EXHAUSTED = -764;
|
|
1215
|
+
*/
|
|
1216
|
+
TRANSACTION_VM_ERROR_CU_EXHAUSTED = -764,
|
|
1217
|
+
/**
|
|
1218
|
+
* TN_RUNTIME_TXN_ERR_SU_EXHAUSTED
|
|
1219
|
+
*
|
|
1220
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_SU_EXHAUSTED = -763;
|
|
1221
|
+
*/
|
|
1222
|
+
TRANSACTION_VM_ERROR_SU_EXHAUSTED = -763
|
|
1223
|
+
}
|
|
943
1224
|
|
|
944
1225
|
/**
|
|
945
1226
|
* GenerateStateProofResponse contains the generated proof.
|
|
@@ -953,17 +1234,17 @@ type GenerateStateProofResponse = Message<"thru.services.v1.GenerateStateProofRe
|
|
|
953
1234
|
proof?: StateProof;
|
|
954
1235
|
};
|
|
955
1236
|
/**
|
|
956
|
-
*
|
|
1237
|
+
* ListAccountsResponse contains paginated accounts.
|
|
957
1238
|
*
|
|
958
|
-
* @generated from message thru.services.v1.
|
|
1239
|
+
* @generated from message thru.services.v1.ListAccountsResponse
|
|
959
1240
|
*/
|
|
960
|
-
type
|
|
1241
|
+
type ListAccountsResponse = Message<"thru.services.v1.ListAccountsResponse"> & {
|
|
961
1242
|
/**
|
|
962
1243
|
* @generated from field: repeated thru.core.v1.Account accounts = 1;
|
|
963
1244
|
*/
|
|
964
1245
|
accounts: Account[];
|
|
965
1246
|
/**
|
|
966
|
-
* @generated from field: thru.common.v1.PageResponse page = 2;
|
|
1247
|
+
* @generated from field: optional thru.common.v1.PageResponse page = 2;
|
|
967
1248
|
*/
|
|
968
1249
|
page?: PageResponse;
|
|
969
1250
|
};
|
|
@@ -978,10 +1259,38 @@ type ListBlocksResponse = Message<"thru.services.v1.ListBlocksResponse"> & {
|
|
|
978
1259
|
*/
|
|
979
1260
|
blocks: Block[];
|
|
980
1261
|
/**
|
|
981
|
-
* @generated from field: thru.common.v1.PageResponse page = 2;
|
|
1262
|
+
* @generated from field: optional thru.common.v1.PageResponse page = 2;
|
|
982
1263
|
*/
|
|
983
1264
|
page?: PageResponse;
|
|
984
1265
|
};
|
|
1266
|
+
/**
|
|
1267
|
+
* ListTransactionsForAccountResponse contains transaction signatures.
|
|
1268
|
+
*
|
|
1269
|
+
* @generated from message thru.services.v1.ListTransactionsForAccountResponse
|
|
1270
|
+
*/
|
|
1271
|
+
type ListTransactionsForAccountResponse = Message<"thru.services.v1.ListTransactionsForAccountResponse"> & {
|
|
1272
|
+
/**
|
|
1273
|
+
* @generated from field: repeated thru.core.v1.Signature signatures = 1;
|
|
1274
|
+
*/
|
|
1275
|
+
signatures: Signature[];
|
|
1276
|
+
/**
|
|
1277
|
+
* @generated from field: optional thru.common.v1.PageResponse page = 2;
|
|
1278
|
+
*/
|
|
1279
|
+
page?: PageResponse;
|
|
1280
|
+
};
|
|
1281
|
+
/**
|
|
1282
|
+
* GetVersionResponse returns version information per component.
|
|
1283
|
+
*
|
|
1284
|
+
* @generated from message thru.services.v1.GetVersionResponse
|
|
1285
|
+
*/
|
|
1286
|
+
type GetVersionResponse = Message<"thru.services.v1.GetVersionResponse"> & {
|
|
1287
|
+
/**
|
|
1288
|
+
* @generated from field: map<string, string> versions = 1;
|
|
1289
|
+
*/
|
|
1290
|
+
versions: {
|
|
1291
|
+
[key: string]: string;
|
|
1292
|
+
};
|
|
1293
|
+
};
|
|
985
1294
|
/**
|
|
986
1295
|
* Event represents a transaction event emitted by the chain.
|
|
987
1296
|
*
|
|
@@ -997,29 +1306,29 @@ type Event = Message<"thru.services.v1.Event"> & {
|
|
|
997
1306
|
*/
|
|
998
1307
|
transactionSignature?: Signature;
|
|
999
1308
|
/**
|
|
1000
|
-
* @generated from field: thru.core.v1.Pubkey program = 3;
|
|
1309
|
+
* @generated from field: optional thru.core.v1.Pubkey program = 3;
|
|
1001
1310
|
*/
|
|
1002
1311
|
program?: Pubkey;
|
|
1003
1312
|
/**
|
|
1004
|
-
* @generated from field: bytes payload = 4;
|
|
1313
|
+
* @generated from field: optional bytes payload = 4;
|
|
1005
1314
|
*/
|
|
1006
|
-
payload
|
|
1315
|
+
payload?: Uint8Array;
|
|
1007
1316
|
/**
|
|
1008
|
-
* @generated from field: uint64 slot = 5;
|
|
1317
|
+
* @generated from field: optional uint64 slot = 5;
|
|
1009
1318
|
*/
|
|
1010
|
-
slot
|
|
1319
|
+
slot?: bigint;
|
|
1011
1320
|
/**
|
|
1012
|
-
* @generated from field: uint32 call_idx = 6;
|
|
1321
|
+
* @generated from field: optional uint32 call_idx = 6;
|
|
1013
1322
|
*/
|
|
1014
|
-
callIdx
|
|
1323
|
+
callIdx?: number;
|
|
1015
1324
|
/**
|
|
1016
|
-
* @generated from field: uint32 program_idx = 7;
|
|
1325
|
+
* @generated from field: optional uint32 program_idx = 7;
|
|
1017
1326
|
*/
|
|
1018
|
-
programIdx
|
|
1327
|
+
programIdx?: number;
|
|
1019
1328
|
/**
|
|
1020
|
-
* @generated from field: uint32 payload_size = 8;
|
|
1329
|
+
* @generated from field: optional uint32 payload_size = 8;
|
|
1021
1330
|
*/
|
|
1022
|
-
payloadSize
|
|
1331
|
+
payloadSize?: number;
|
|
1023
1332
|
};
|
|
1024
1333
|
/**
|
|
1025
1334
|
* TransactionStatus captures status metadata for a transaction.
|
|
@@ -1032,11 +1341,11 @@ type TransactionStatus = Message<"thru.services.v1.TransactionStatus"> & {
|
|
|
1032
1341
|
*/
|
|
1033
1342
|
signature?: Signature;
|
|
1034
1343
|
/**
|
|
1035
|
-
* @generated from field: thru.common.v1.ConsensusStatus consensus_status = 2;
|
|
1344
|
+
* @generated from field: optional thru.common.v1.ConsensusStatus consensus_status = 2;
|
|
1036
1345
|
*/
|
|
1037
|
-
consensusStatus
|
|
1346
|
+
consensusStatus?: ConsensusStatus;
|
|
1038
1347
|
/**
|
|
1039
|
-
* @generated from field: thru.core.v1.TransactionExecutionResult execution_result = 3;
|
|
1348
|
+
* @generated from field: optional thru.core.v1.TransactionExecutionResult execution_result = 3;
|
|
1040
1349
|
*/
|
|
1041
1350
|
executionResult?: TransactionExecutionResult;
|
|
1042
1351
|
};
|
|
@@ -1060,6 +1369,112 @@ type GetHeightResponse = Message<"thru.services.v1.GetHeightResponse"> & {
|
|
|
1060
1369
|
clusterExecuted: bigint;
|
|
1061
1370
|
};
|
|
1062
1371
|
|
|
1372
|
+
/**
|
|
1373
|
+
* StreamBlocksResponse delivers block updates.
|
|
1374
|
+
*
|
|
1375
|
+
* @generated from message thru.services.v1.StreamBlocksResponse
|
|
1376
|
+
*/
|
|
1377
|
+
type StreamBlocksResponse = Message<"thru.services.v1.StreamBlocksResponse"> & {
|
|
1378
|
+
/**
|
|
1379
|
+
* @generated from field: thru.core.v1.Block block = 1;
|
|
1380
|
+
*/
|
|
1381
|
+
block?: Block;
|
|
1382
|
+
};
|
|
1383
|
+
/**
|
|
1384
|
+
* AccountUpdate describes a delta for an account.
|
|
1385
|
+
*
|
|
1386
|
+
* @generated from message thru.services.v1.AccountUpdate
|
|
1387
|
+
*/
|
|
1388
|
+
type AccountUpdate = Message<"thru.services.v1.AccountUpdate"> & {
|
|
1389
|
+
/**
|
|
1390
|
+
* @generated from field: uint64 slot = 1;
|
|
1391
|
+
*/
|
|
1392
|
+
slot: bigint;
|
|
1393
|
+
/**
|
|
1394
|
+
* @generated from field: optional thru.core.v1.AccountPage page = 2;
|
|
1395
|
+
*/
|
|
1396
|
+
page?: AccountPage;
|
|
1397
|
+
/**
|
|
1398
|
+
* @generated from field: optional thru.core.v1.AccountMeta meta = 3;
|
|
1399
|
+
*/
|
|
1400
|
+
meta?: AccountMeta;
|
|
1401
|
+
/**
|
|
1402
|
+
* @generated from field: optional bool delete = 4;
|
|
1403
|
+
*/
|
|
1404
|
+
delete?: boolean;
|
|
1405
|
+
};
|
|
1406
|
+
/**
|
|
1407
|
+
* StreamAccountUpdatesResponse contains either an initial snapshot or a delta.
|
|
1408
|
+
*
|
|
1409
|
+
* @generated from message thru.services.v1.StreamAccountUpdatesResponse
|
|
1410
|
+
*/
|
|
1411
|
+
type StreamAccountUpdatesResponse = Message<"thru.services.v1.StreamAccountUpdatesResponse"> & {
|
|
1412
|
+
/**
|
|
1413
|
+
* @generated from oneof thru.services.v1.StreamAccountUpdatesResponse.message
|
|
1414
|
+
*/
|
|
1415
|
+
message: {
|
|
1416
|
+
/**
|
|
1417
|
+
* @generated from field: thru.core.v1.Account snapshot = 1;
|
|
1418
|
+
*/
|
|
1419
|
+
value: Account;
|
|
1420
|
+
case: "snapshot";
|
|
1421
|
+
} | {
|
|
1422
|
+
/**
|
|
1423
|
+
* @generated from field: thru.services.v1.AccountUpdate update = 2;
|
|
1424
|
+
*/
|
|
1425
|
+
value: AccountUpdate;
|
|
1426
|
+
case: "update";
|
|
1427
|
+
} | {
|
|
1428
|
+
case: undefined;
|
|
1429
|
+
value?: undefined;
|
|
1430
|
+
};
|
|
1431
|
+
};
|
|
1432
|
+
/**
|
|
1433
|
+
* StreamTransactionsResponse delivers transaction events.
|
|
1434
|
+
*
|
|
1435
|
+
* @generated from message thru.services.v1.StreamTransactionsResponse
|
|
1436
|
+
*/
|
|
1437
|
+
type StreamTransactionsResponse = Message<"thru.services.v1.StreamTransactionsResponse"> & {
|
|
1438
|
+
/**
|
|
1439
|
+
* @generated from field: thru.core.v1.Transaction transaction = 1;
|
|
1440
|
+
*/
|
|
1441
|
+
transaction?: Transaction;
|
|
1442
|
+
};
|
|
1443
|
+
/**
|
|
1444
|
+
* StreamEventsResponse delivers event payloads.
|
|
1445
|
+
*
|
|
1446
|
+
* @generated from message thru.services.v1.StreamEventsResponse
|
|
1447
|
+
*/
|
|
1448
|
+
type StreamEventsResponse = Message<"thru.services.v1.StreamEventsResponse"> & {
|
|
1449
|
+
/**
|
|
1450
|
+
* @generated from field: string event_id = 1;
|
|
1451
|
+
*/
|
|
1452
|
+
eventId: string;
|
|
1453
|
+
/**
|
|
1454
|
+
* @generated from field: optional bytes payload = 2;
|
|
1455
|
+
*/
|
|
1456
|
+
payload?: Uint8Array;
|
|
1457
|
+
/**
|
|
1458
|
+
* @generated from field: optional google.protobuf.Timestamp timestamp = 3;
|
|
1459
|
+
*/
|
|
1460
|
+
timestamp?: Timestamp;
|
|
1461
|
+
/**
|
|
1462
|
+
* @generated from field: thru.core.v1.Pubkey program = 4;
|
|
1463
|
+
*/
|
|
1464
|
+
program?: Pubkey;
|
|
1465
|
+
/**
|
|
1466
|
+
* @generated from field: uint32 call_idx = 5;
|
|
1467
|
+
*/
|
|
1468
|
+
callIdx: number;
|
|
1469
|
+
/**
|
|
1470
|
+
* @generated from field: thru.core.v1.Signature signature = 6;
|
|
1471
|
+
*/
|
|
1472
|
+
signature?: Signature;
|
|
1473
|
+
/**
|
|
1474
|
+
* @generated from field: uint64 slot = 7;
|
|
1475
|
+
*/
|
|
1476
|
+
slot: bigint;
|
|
1477
|
+
};
|
|
1063
1478
|
/**
|
|
1064
1479
|
* TrackTransactionResponse reports status transitions for a transaction.
|
|
1065
1480
|
*
|
|
@@ -1096,7 +1511,7 @@ interface ThruClientContext {
|
|
|
1096
1511
|
|
|
1097
1512
|
interface CreateAccountOptions {
|
|
1098
1513
|
/** The new account's public key (fee payer). */
|
|
1099
|
-
publicKey:
|
|
1514
|
+
publicKey: Pubkey$1;
|
|
1100
1515
|
/** Optional overrides for the transaction header. */
|
|
1101
1516
|
header?: Partial<TransactionHeaderInput>;
|
|
1102
1517
|
}
|
|
@@ -1111,28 +1526,28 @@ interface RawAccountQueryOptions {
|
|
|
1111
1526
|
versionContext?: VersionContext;
|
|
1112
1527
|
minConsensus?: ConsensusStatus;
|
|
1113
1528
|
}
|
|
1114
|
-
interface
|
|
1529
|
+
interface ListAccountsOptions {
|
|
1115
1530
|
view?: AccountView;
|
|
1116
1531
|
versionContext?: VersionContext;
|
|
1117
1532
|
filter?: Filter;
|
|
1118
1533
|
page?: PageRequest;
|
|
1119
1534
|
minConsensus?: ConsensusStatus;
|
|
1120
1535
|
}
|
|
1121
|
-
declare function getAccount(ctx: ThruClientContext, address:
|
|
1122
|
-
declare function getRawAccount(ctx: ThruClientContext, address:
|
|
1123
|
-
declare function
|
|
1536
|
+
declare function getAccount(ctx: ThruClientContext, address: Pubkey$1, options?: AccountQueryOptions): Promise<Account>;
|
|
1537
|
+
declare function getRawAccount(ctx: ThruClientContext, address: Pubkey$1, options?: RawAccountQueryOptions): Promise<RawAccount>;
|
|
1538
|
+
declare function listAccounts(ctx: ThruClientContext, options: ListAccountsOptions): Promise<ListAccountsResponse>;
|
|
1124
1539
|
declare function createAccount(ctx: ThruClientContext, options: CreateAccountOptions): Promise<Transaction$1>;
|
|
1125
1540
|
|
|
1126
1541
|
type accounts_AccountQueryOptions = AccountQueryOptions;
|
|
1127
1542
|
type accounts_CreateAccountOptions = CreateAccountOptions;
|
|
1128
|
-
type
|
|
1543
|
+
type accounts_ListAccountsOptions = ListAccountsOptions;
|
|
1129
1544
|
type accounts_RawAccountQueryOptions = RawAccountQueryOptions;
|
|
1130
1545
|
declare const accounts_createAccount: typeof createAccount;
|
|
1131
1546
|
declare const accounts_getAccount: typeof getAccount;
|
|
1132
1547
|
declare const accounts_getRawAccount: typeof getRawAccount;
|
|
1133
|
-
declare const
|
|
1548
|
+
declare const accounts_listAccounts: typeof listAccounts;
|
|
1134
1549
|
declare namespace accounts {
|
|
1135
|
-
export { type accounts_AccountQueryOptions as AccountQueryOptions, type accounts_CreateAccountOptions as CreateAccountOptions, type
|
|
1550
|
+
export { type accounts_AccountQueryOptions as AccountQueryOptions, type accounts_CreateAccountOptions as CreateAccountOptions, type accounts_ListAccountsOptions as ListAccountsOptions, type accounts_RawAccountQueryOptions as RawAccountQueryOptions, accounts_createAccount as createAccount, accounts_getAccount as getAccount, accounts_getRawAccount as getRawAccount, accounts_listAccounts as listAccounts };
|
|
1136
1551
|
}
|
|
1137
1552
|
|
|
1138
1553
|
type BlockSelector = {
|
|
@@ -1140,9 +1555,9 @@ type BlockSelector = {
|
|
|
1140
1555
|
} | {
|
|
1141
1556
|
blockHash: BytesLike;
|
|
1142
1557
|
};
|
|
1143
|
-
declare function toPubkey(value:
|
|
1558
|
+
declare function toPubkey(value: Pubkey$1, field: string): Pubkey;
|
|
1144
1559
|
interface DeriveProgramAddressOptions {
|
|
1145
|
-
programAddress:
|
|
1560
|
+
programAddress: Pubkey$1;
|
|
1146
1561
|
seed: BytesLike;
|
|
1147
1562
|
ephemeral?: boolean;
|
|
1148
1563
|
}
|
|
@@ -1214,7 +1629,7 @@ declare namespace keys {
|
|
|
1214
1629
|
}
|
|
1215
1630
|
|
|
1216
1631
|
type GenerateStateProofOptions = {
|
|
1217
|
-
address?:
|
|
1632
|
+
address?: Pubkey$1;
|
|
1218
1633
|
proofType: StateProofType;
|
|
1219
1634
|
targetSlot: bigint;
|
|
1220
1635
|
};
|
|
@@ -1230,26 +1645,54 @@ interface TrackTransactionOptions {
|
|
|
1230
1645
|
timeoutMs?: number;
|
|
1231
1646
|
signal?: AbortSignal;
|
|
1232
1647
|
}
|
|
1648
|
+
interface StreamBlocksOptions {
|
|
1649
|
+
startSlot?: bigint;
|
|
1650
|
+
filter?: Filter;
|
|
1651
|
+
view?: BlockView;
|
|
1652
|
+
minConsensus?: ConsensusStatus;
|
|
1653
|
+
signal?: AbortSignal;
|
|
1654
|
+
}
|
|
1655
|
+
declare function streamBlocks(ctx: ThruClientContext, options?: StreamBlocksOptions): AsyncIterable<StreamBlocksResponse>;
|
|
1656
|
+
interface StreamAccountUpdatesOptions {
|
|
1657
|
+
view?: AccountView;
|
|
1658
|
+
filter?: Filter;
|
|
1659
|
+
signal?: AbortSignal;
|
|
1660
|
+
}
|
|
1661
|
+
declare function streamAccountUpdates(ctx: ThruClientContext, address: Pubkey$1, options?: StreamAccountUpdatesOptions): AsyncIterable<StreamAccountUpdatesResponse>;
|
|
1662
|
+
interface StreamTransactionsOptions {
|
|
1663
|
+
filter?: Filter;
|
|
1664
|
+
minConsensus?: ConsensusStatus;
|
|
1665
|
+
signal?: AbortSignal;
|
|
1666
|
+
}
|
|
1667
|
+
declare function streamTransactions(ctx: ThruClientContext, options?: StreamTransactionsOptions): AsyncIterable<StreamTransactionsResponse>;
|
|
1668
|
+
interface StreamEventsOptions {
|
|
1669
|
+
filter?: Filter;
|
|
1670
|
+
signal?: AbortSignal;
|
|
1671
|
+
}
|
|
1672
|
+
declare function streamEvents(ctx: ThruClientContext, options?: StreamEventsOptions): AsyncIterable<StreamEventsResponse>;
|
|
1233
1673
|
declare function trackTransaction(ctx: ThruClientContext, signature: BytesLike, options?: TrackTransactionOptions): AsyncIterable<TrackTransactionResponse>;
|
|
1234
1674
|
|
|
1675
|
+
type streaming_StreamAccountUpdatesOptions = StreamAccountUpdatesOptions;
|
|
1676
|
+
type streaming_StreamBlocksOptions = StreamBlocksOptions;
|
|
1677
|
+
type streaming_StreamEventsOptions = StreamEventsOptions;
|
|
1678
|
+
type streaming_StreamTransactionsOptions = StreamTransactionsOptions;
|
|
1235
1679
|
type streaming_TrackTransactionOptions = TrackTransactionOptions;
|
|
1680
|
+
declare const streaming_streamAccountUpdates: typeof streamAccountUpdates;
|
|
1681
|
+
declare const streaming_streamBlocks: typeof streamBlocks;
|
|
1682
|
+
declare const streaming_streamEvents: typeof streamEvents;
|
|
1683
|
+
declare const streaming_streamTransactions: typeof streamTransactions;
|
|
1236
1684
|
declare const streaming_trackTransaction: typeof trackTransaction;
|
|
1237
1685
|
declare namespace streaming {
|
|
1238
|
-
export { type streaming_TrackTransactionOptions as TrackTransactionOptions, streaming_trackTransaction as trackTransaction };
|
|
1686
|
+
export { type streaming_StreamAccountUpdatesOptions as StreamAccountUpdatesOptions, type streaming_StreamBlocksOptions as StreamBlocksOptions, type streaming_StreamEventsOptions as StreamEventsOptions, type streaming_StreamTransactionsOptions as StreamTransactionsOptions, type streaming_TrackTransactionOptions as TrackTransactionOptions, streaming_streamAccountUpdates as streamAccountUpdates, streaming_streamBlocks as streamBlocks, streaming_streamEvents as streamEvents, streaming_streamTransactions as streamTransactions, streaming_trackTransaction as trackTransaction };
|
|
1239
1687
|
}
|
|
1240
1688
|
|
|
1241
1689
|
interface TransactionFeePayerConfig {
|
|
1242
|
-
publicKey:
|
|
1690
|
+
publicKey: Pubkey$1;
|
|
1243
1691
|
privateKey?: Uint8Array;
|
|
1244
1692
|
}
|
|
1245
1693
|
interface TransactionAccountsConfig {
|
|
1246
|
-
readWrite?:
|
|
1247
|
-
readOnly?:
|
|
1248
|
-
}
|
|
1249
|
-
interface TransactionContentConfig {
|
|
1250
|
-
instructions?: BytesLike;
|
|
1251
|
-
feePayerStateProof?: Uint8Array;
|
|
1252
|
-
feePayerAccountMetaRaw?: Uint8Array;
|
|
1694
|
+
readWrite?: Pubkey$1[];
|
|
1695
|
+
readOnly?: Pubkey$1[];
|
|
1253
1696
|
}
|
|
1254
1697
|
interface TransactionHeaderConfig {
|
|
1255
1698
|
fee?: bigint;
|
|
@@ -1261,12 +1704,20 @@ interface TransactionHeaderConfig {
|
|
|
1261
1704
|
memoryUnits?: number;
|
|
1262
1705
|
flags?: number;
|
|
1263
1706
|
}
|
|
1707
|
+
/**
|
|
1708
|
+
* Instruction data can be either:
|
|
1709
|
+
* - A Uint8Array directly
|
|
1710
|
+
* - A function that takes an InstructionContext and returns a Uint8Array
|
|
1711
|
+
*/
|
|
1712
|
+
type InstructionData = Uint8Array | ((context: InstructionContext) => Uint8Array);
|
|
1264
1713
|
interface BuildTransactionOptions {
|
|
1265
1714
|
feePayer: TransactionFeePayerConfig;
|
|
1266
1715
|
program: ProgramIdentifier;
|
|
1267
1716
|
header?: TransactionHeaderConfig;
|
|
1268
1717
|
accounts?: TransactionAccountsConfig;
|
|
1269
|
-
|
|
1718
|
+
instructionData?: InstructionData | BytesLike;
|
|
1719
|
+
feePayerStateProof?: Uint8Array;
|
|
1720
|
+
feePayerAccountMetaRaw?: Uint8Array;
|
|
1270
1721
|
}
|
|
1271
1722
|
interface BuildAndSignTransactionOptions extends BuildTransactionOptions {
|
|
1272
1723
|
feePayer: TransactionFeePayerConfig & {
|
|
@@ -1282,29 +1733,42 @@ interface RawTransactionQueryOptions {
|
|
|
1282
1733
|
versionContext?: VersionContext;
|
|
1283
1734
|
minConsensus?: ConsensusStatus;
|
|
1284
1735
|
}
|
|
1736
|
+
interface ListTransactionsForAccountOptions {
|
|
1737
|
+
filter?: Filter;
|
|
1738
|
+
page?: PageRequest;
|
|
1739
|
+
}
|
|
1285
1740
|
declare function getTransaction(ctx: ThruClientContext, signature: BytesLike, options?: TransactionQueryOptions): Promise<Transaction>;
|
|
1286
1741
|
declare function getRawTransaction(ctx: ThruClientContext, signature: BytesLike, options?: RawTransactionQueryOptions): Promise<RawTransaction>;
|
|
1287
1742
|
declare function getTransactionStatus(ctx: ThruClientContext, signature: BytesLike): Promise<TransactionStatus>;
|
|
1743
|
+
declare function listTransactionsForAccount(ctx: ThruClientContext, account: Pubkey$1, options?: ListTransactionsForAccountOptions): Promise<ListTransactionsForAccountResponse>;
|
|
1288
1744
|
declare function buildTransaction(ctx: ThruClientContext, options: BuildTransactionOptions): Promise<Transaction$1>;
|
|
1289
1745
|
declare function buildAndSignTransaction(ctx: ThruClientContext, options: BuildAndSignTransactionOptions): Promise<SignedTransactionResult>;
|
|
1290
1746
|
declare function sendTransaction(ctx: ThruClientContext, transaction: Transaction$1 | Uint8Array): Promise<string>;
|
|
1747
|
+
interface BatchSendTransactionsOptions {
|
|
1748
|
+
numRetries?: number;
|
|
1749
|
+
}
|
|
1750
|
+
declare function batchSendTransactions(ctx: ThruClientContext, transactions: (Transaction$1 | Uint8Array)[], options?: BatchSendTransactionsOptions): Promise<BatchSendTransactionsResponse>;
|
|
1291
1751
|
|
|
1752
|
+
type transactions_BatchSendTransactionsOptions = BatchSendTransactionsOptions;
|
|
1292
1753
|
type transactions_BuildAndSignTransactionOptions = BuildAndSignTransactionOptions;
|
|
1293
1754
|
type transactions_BuildTransactionOptions = BuildTransactionOptions;
|
|
1755
|
+
type transactions_InstructionData = InstructionData;
|
|
1756
|
+
type transactions_ListTransactionsForAccountOptions = ListTransactionsForAccountOptions;
|
|
1294
1757
|
type transactions_RawTransactionQueryOptions = RawTransactionQueryOptions;
|
|
1295
1758
|
type transactions_TransactionAccountsConfig = TransactionAccountsConfig;
|
|
1296
|
-
type transactions_TransactionContentConfig = TransactionContentConfig;
|
|
1297
1759
|
type transactions_TransactionFeePayerConfig = TransactionFeePayerConfig;
|
|
1298
1760
|
type transactions_TransactionHeaderConfig = TransactionHeaderConfig;
|
|
1299
1761
|
type transactions_TransactionQueryOptions = TransactionQueryOptions;
|
|
1762
|
+
declare const transactions_batchSendTransactions: typeof batchSendTransactions;
|
|
1300
1763
|
declare const transactions_buildAndSignTransaction: typeof buildAndSignTransaction;
|
|
1301
1764
|
declare const transactions_buildTransaction: typeof buildTransaction;
|
|
1302
1765
|
declare const transactions_getRawTransaction: typeof getRawTransaction;
|
|
1303
1766
|
declare const transactions_getTransaction: typeof getTransaction;
|
|
1304
1767
|
declare const transactions_getTransactionStatus: typeof getTransactionStatus;
|
|
1768
|
+
declare const transactions_listTransactionsForAccount: typeof listTransactionsForAccount;
|
|
1305
1769
|
declare const transactions_sendTransaction: typeof sendTransaction;
|
|
1306
1770
|
declare namespace transactions {
|
|
1307
|
-
export { type transactions_BuildAndSignTransactionOptions as BuildAndSignTransactionOptions, type transactions_BuildTransactionOptions as BuildTransactionOptions, type
|
|
1771
|
+
export { type transactions_BatchSendTransactionsOptions as BatchSendTransactionsOptions, type transactions_BuildAndSignTransactionOptions as BuildAndSignTransactionOptions, type transactions_BuildTransactionOptions as BuildTransactionOptions, type transactions_InstructionData as InstructionData, type transactions_ListTransactionsForAccountOptions as ListTransactionsForAccountOptions, type transactions_RawTransactionQueryOptions as RawTransactionQueryOptions, type transactions_TransactionAccountsConfig as TransactionAccountsConfig, type transactions_TransactionFeePayerConfig as TransactionFeePayerConfig, type transactions_TransactionHeaderConfig as TransactionHeaderConfig, type transactions_TransactionQueryOptions as TransactionQueryOptions, transactions_batchSendTransactions as batchSendTransactions, transactions_buildAndSignTransaction as buildAndSignTransaction, transactions_buildTransaction as buildTransaction, transactions_getRawTransaction as getRawTransaction, transactions_getTransaction as getTransaction, transactions_getTransactionStatus as getTransactionStatus, transactions_listTransactionsForAccount as listTransactionsForAccount, transactions_sendTransaction as sendTransaction };
|
|
1308
1772
|
}
|
|
1309
1773
|
|
|
1310
|
-
export {
|
|
1774
|
+
export { listAccounts as $, type AccountQueryOptions as A, type BuildTransactionParams as B, ConsensusStatus as C, type DeriveProgramAddressOptions as D, type TransactionAccountsConfig as E, FilterParamValueSchema as F, type GetEventOptions as G, type TransactionFeePayerConfig as H, type InstructionData as I, type TransactionHeaderConfig as J, type TransactionQueryOptions as K, type ListAccountsOptions as L, type InstructionContext as M, type GenerateStateProofOptions as N, type ThruClientContext as O, type ProgramIdentifier as P, type GetVersionResponse as Q, type RawAccountQueryOptions as R, type SignedTransactionResult as S, Transaction$1 as T, getBlock as U, getRawBlock as V, listBlocks as W, streamBlocks as X, getBlockHeight as Y, getAccount as Z, getRawAccount as _, accounts as a, streamAccountUpdates as a0, createAccount as a1, getTransaction as a2, getRawTransaction as a3, getTransactionStatus as a4, listTransactionsForAccount as a5, streamTransactions as a6, buildTransaction as a7, buildAndSignTransaction as a8, sendTransaction as a9, batchSendTransactions as aa, trackTransaction as ab, getEvent as ac, streamEvents as ad, generateStateProof as ae, generateKeyPair as af, type Signature as ag, type Pubkey as ah, type BlockHash as ai, type ThruClientConfig as aj, blocks as b, toPubkey as c, deriveProgramAddress as d, events as e, FilterSchema as f, type Filter as g, height as h, type FilterParamValue as i, type CreateAccountOptions as j, keys as k, type BlockQueryOptions as l, type ListBlocksOptions as m, type RawBlockQueryOptions as n, type BlockSelector as o, proofs as p, type DeriveProgramAddressResult as q, type GeneratedKeyPair as r, streaming as s, transactions as t, type TrackTransactionOptions as u, type BatchSendTransactionsOptions as v, type BuildAndSignTransactionOptions as w, type BuildTransactionOptions as x, type ListTransactionsForAccountOptions as y, type RawTransactionQueryOptions as z };
|