@thru/thru-sdk 0.1.22 → 0.1.24
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 -74
- package/dist/{transactions-CLezIeXO.d.ts → VersionInfo-B13I6BVC.d.ts} +649 -447
- package/dist/{chunk-SHMREHP5.js → chunk-M3N53HZF.js} +1363 -214
- package/dist/chunk-M3N53HZF.js.map +1 -0
- package/dist/client.d.ts +3 -3
- package/dist/client.js +3 -3
- package/dist/client.js.map +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/sdk.d.ts +4 -4
- package/dist/sdk.js +236 -1
- package/dist/sdk.js.map +1 -1
- package/package.json +4 -3
- package/dist/chunk-SHMREHP5.js.map +0 -1
|
@@ -1,162 +1,10 @@
|
|
|
1
1
|
import { BytesLike, Pubkey as Pubkey$1 } from '@thru/helpers';
|
|
2
|
-
import { Timestamp } from '@bufbuild/protobuf/wkt';
|
|
3
2
|
import { Message } from '@bufbuild/protobuf';
|
|
3
|
+
import { Timestamp } from '@bufbuild/protobuf/wkt';
|
|
4
4
|
import { createClient } from '@connectrpc/connect';
|
|
5
5
|
import { createGrpcWebTransport } from '@connectrpc/connect-web';
|
|
6
6
|
import { GenMessage } from '@bufbuild/protobuf/codegenv2';
|
|
7
7
|
|
|
8
|
-
type Bytes32 = Uint8Array;
|
|
9
|
-
type Bytes64 = Uint8Array;
|
|
10
|
-
type AccountAddress = Bytes32;
|
|
11
|
-
type ProgramIdentifier = BytesLike;
|
|
12
|
-
interface ResourceLimits {
|
|
13
|
-
computeUnits?: number;
|
|
14
|
-
stateUnits?: number;
|
|
15
|
-
memoryUnits?: number;
|
|
16
|
-
}
|
|
17
|
-
interface OptionalProofs {
|
|
18
|
-
feePayerStateProof?: Uint8Array;
|
|
19
|
-
feePayerAccountMetaRaw?: Uint8Array;
|
|
20
|
-
}
|
|
21
|
-
interface TransactionHeaderInput extends ResourceLimits {
|
|
22
|
-
fee: bigint;
|
|
23
|
-
nonce: bigint;
|
|
24
|
-
startSlot: bigint;
|
|
25
|
-
expiryAfter?: number;
|
|
26
|
-
flags?: number;
|
|
27
|
-
}
|
|
28
|
-
interface TransactionAccountsInput {
|
|
29
|
-
readWriteAccounts?: AccountAddress[];
|
|
30
|
-
readOnlyAccounts?: AccountAddress[];
|
|
31
|
-
}
|
|
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;
|
|
42
|
-
}
|
|
43
|
-
interface FeePayerInput {
|
|
44
|
-
publicKey: AccountAddress;
|
|
45
|
-
privateKey?: Bytes32;
|
|
46
|
-
}
|
|
47
|
-
interface BuildTransactionParams {
|
|
48
|
-
feePayer: FeePayerInput;
|
|
49
|
-
program: ProgramIdentifier;
|
|
50
|
-
header: TransactionHeaderInput;
|
|
51
|
-
accounts?: TransactionAccountsInput;
|
|
52
|
-
instructionData?: BytesLike;
|
|
53
|
-
proofs?: OptionalProofs;
|
|
54
|
-
}
|
|
55
|
-
interface BuiltTransactionResult {
|
|
56
|
-
transaction: TransactionLike;
|
|
57
|
-
}
|
|
58
|
-
interface SignedTransactionResult extends BuiltTransactionResult {
|
|
59
|
-
signature: Bytes64;
|
|
60
|
-
rawTransaction: Uint8Array;
|
|
61
|
-
}
|
|
62
|
-
interface TransactionLike {
|
|
63
|
-
toWire(): Uint8Array;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
declare class Transaction$1 {
|
|
67
|
-
readonly feePayer: AccountAddress;
|
|
68
|
-
readonly program: AccountAddress;
|
|
69
|
-
readonly fee: bigint;
|
|
70
|
-
readonly nonce: bigint;
|
|
71
|
-
readonly startSlot: bigint;
|
|
72
|
-
readonly expiryAfter: number;
|
|
73
|
-
readonly requestedComputeUnits: number;
|
|
74
|
-
readonly requestedStateUnits: number;
|
|
75
|
-
readonly requestedMemoryUnits: number;
|
|
76
|
-
readonly flags: number;
|
|
77
|
-
readonly readWriteAccounts: AccountAddress[];
|
|
78
|
-
readonly readOnlyAccounts: AccountAddress[];
|
|
79
|
-
readonly instructionData?: Uint8Array;
|
|
80
|
-
readonly feePayerStateProof?: Uint8Array;
|
|
81
|
-
readonly feePayerAccountMetaRaw?: Uint8Array;
|
|
82
|
-
private signature?;
|
|
83
|
-
constructor(params: {
|
|
84
|
-
feePayer: AccountAddress;
|
|
85
|
-
program: AccountAddress;
|
|
86
|
-
header: TransactionHeaderInput;
|
|
87
|
-
accounts?: TransactionAccountsInput;
|
|
88
|
-
instructionData?: Uint8Array;
|
|
89
|
-
proofs?: OptionalProofs;
|
|
90
|
-
});
|
|
91
|
-
getSignature(): Bytes64 | undefined;
|
|
92
|
-
setSignature(signature: Bytes64): void;
|
|
93
|
-
sign(privateKey: Uint8Array): Promise<Bytes64>;
|
|
94
|
-
toWireForSigning(): Uint8Array;
|
|
95
|
-
toWire(): Uint8Array;
|
|
96
|
-
private createHeader;
|
|
97
|
-
private buildWirePayload;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Pubkey represents a 32-byte public key value.
|
|
102
|
-
*
|
|
103
|
-
* @generated from message thru.core.v1.Pubkey
|
|
104
|
-
*/
|
|
105
|
-
type Pubkey = Message<"thru.core.v1.Pubkey"> & {
|
|
106
|
-
/**
|
|
107
|
-
* 32-byte public key buffer.
|
|
108
|
-
*
|
|
109
|
-
* @generated from field: bytes value = 1;
|
|
110
|
-
*/
|
|
111
|
-
value: Uint8Array;
|
|
112
|
-
};
|
|
113
|
-
/**
|
|
114
|
-
* BlockHash represents a 64-byte hash for block identifiers.
|
|
115
|
-
*
|
|
116
|
-
* @generated from message thru.core.v1.BlockHash
|
|
117
|
-
*/
|
|
118
|
-
type BlockHash = Message<"thru.core.v1.BlockHash"> & {
|
|
119
|
-
/**
|
|
120
|
-
* 64-byte block hash buffer.
|
|
121
|
-
*
|
|
122
|
-
* @generated from field: bytes value = 1;
|
|
123
|
-
*/
|
|
124
|
-
value: Uint8Array;
|
|
125
|
-
};
|
|
126
|
-
/**
|
|
127
|
-
* Signature represents a 64-byte signature value.
|
|
128
|
-
*
|
|
129
|
-
* @generated from message thru.core.v1.Signature
|
|
130
|
-
*/
|
|
131
|
-
type Signature = Message<"thru.core.v1.Signature"> & {
|
|
132
|
-
/**
|
|
133
|
-
* 64-byte signature buffer.
|
|
134
|
-
*
|
|
135
|
-
* @generated from field: bytes value = 1;
|
|
136
|
-
*/
|
|
137
|
-
value: Uint8Array;
|
|
138
|
-
};
|
|
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
|
-
|
|
160
8
|
/**
|
|
161
9
|
* VersionContext selects which logical version of a resource should be
|
|
162
10
|
* returned. At least one field must be set.
|
|
@@ -272,7 +120,7 @@ declare enum ConsensusStatus {
|
|
|
272
120
|
*
|
|
273
121
|
* @generated from message thru.common.v1.Filter
|
|
274
122
|
*/
|
|
275
|
-
type Filter = Message<"thru.common.v1.Filter"> & {
|
|
123
|
+
type Filter$1 = Message<"thru.common.v1.Filter"> & {
|
|
276
124
|
/**
|
|
277
125
|
* CEL expression applied server-side. Empty expressions are treated as no-op.
|
|
278
126
|
*
|
|
@@ -285,20 +133,20 @@ type Filter = Message<"thru.common.v1.Filter"> & {
|
|
|
285
133
|
* @generated from field: map<string, thru.common.v1.FilterParamValue> params = 2;
|
|
286
134
|
*/
|
|
287
135
|
params: {
|
|
288
|
-
[key: string]: FilterParamValue;
|
|
136
|
+
[key: string]: FilterParamValue$1;
|
|
289
137
|
};
|
|
290
138
|
};
|
|
291
139
|
/**
|
|
292
140
|
* Describes the message thru.common.v1.Filter.
|
|
293
141
|
* Use `create(FilterSchema)` to create a new message.
|
|
294
142
|
*/
|
|
295
|
-
declare const FilterSchema: GenMessage<Filter>;
|
|
143
|
+
declare const FilterSchema: GenMessage<Filter$1>;
|
|
296
144
|
/**
|
|
297
145
|
* FilterParamValue carries strongly-typed CEL parameter bindings.
|
|
298
146
|
*
|
|
299
147
|
* @generated from message thru.common.v1.FilterParamValue
|
|
300
148
|
*/
|
|
301
|
-
type FilterParamValue = Message<"thru.common.v1.FilterParamValue"> & {
|
|
149
|
+
type FilterParamValue$1 = Message<"thru.common.v1.FilterParamValue"> & {
|
|
302
150
|
/**
|
|
303
151
|
* @generated from oneof thru.common.v1.FilterParamValue.kind
|
|
304
152
|
*/
|
|
@@ -341,51 +189,46 @@ type FilterParamValue = Message<"thru.common.v1.FilterParamValue"> & {
|
|
|
341
189
|
* Describes the message thru.common.v1.FilterParamValue.
|
|
342
190
|
* Use `create(FilterParamValueSchema)` to create a new message.
|
|
343
191
|
*/
|
|
344
|
-
declare const FilterParamValueSchema: GenMessage<FilterParamValue>;
|
|
192
|
+
declare const FilterParamValueSchema: GenMessage<FilterParamValue$1>;
|
|
345
193
|
|
|
346
194
|
/**
|
|
347
|
-
*
|
|
195
|
+
* Pubkey represents a 32-byte public key value.
|
|
348
196
|
*
|
|
349
|
-
* @generated from message thru.
|
|
197
|
+
* @generated from message thru.core.v1.Pubkey
|
|
350
198
|
*/
|
|
351
|
-
type
|
|
352
|
-
/**
|
|
353
|
-
* Maximum number of items to return in a single response.
|
|
354
|
-
*
|
|
355
|
-
* @generated from field: optional uint32 page_size = 1;
|
|
356
|
-
*/
|
|
357
|
-
pageSize?: number;
|
|
358
|
-
/**
|
|
359
|
-
* Token identifying the position to resume from.
|
|
360
|
-
*
|
|
361
|
-
* @generated from field: optional string page_token = 2;
|
|
362
|
-
*/
|
|
363
|
-
pageToken?: string;
|
|
199
|
+
type Pubkey = Message<"thru.core.v1.Pubkey"> & {
|
|
364
200
|
/**
|
|
365
|
-
*
|
|
201
|
+
* 32-byte public key buffer.
|
|
366
202
|
*
|
|
367
|
-
* @generated from field:
|
|
203
|
+
* @generated from field: bytes value = 1;
|
|
368
204
|
*/
|
|
369
|
-
|
|
205
|
+
value: Uint8Array;
|
|
370
206
|
};
|
|
371
207
|
/**
|
|
372
|
-
*
|
|
208
|
+
* BlockHash represents a 64-byte hash for block identifiers.
|
|
373
209
|
*
|
|
374
|
-
* @generated from message thru.
|
|
210
|
+
* @generated from message thru.core.v1.BlockHash
|
|
375
211
|
*/
|
|
376
|
-
type
|
|
212
|
+
type BlockHash = Message<"thru.core.v1.BlockHash"> & {
|
|
377
213
|
/**
|
|
378
|
-
*
|
|
214
|
+
* 64-byte block hash buffer.
|
|
379
215
|
*
|
|
380
|
-
* @generated from field:
|
|
216
|
+
* @generated from field: bytes value = 1;
|
|
381
217
|
*/
|
|
382
|
-
|
|
218
|
+
value: Uint8Array;
|
|
219
|
+
};
|
|
220
|
+
/**
|
|
221
|
+
* Signature represents a 64-byte signature value.
|
|
222
|
+
*
|
|
223
|
+
* @generated from message thru.core.v1.Signature
|
|
224
|
+
*/
|
|
225
|
+
type Signature = Message<"thru.core.v1.Signature"> & {
|
|
383
226
|
/**
|
|
384
|
-
*
|
|
227
|
+
* 64-byte signature buffer.
|
|
385
228
|
*
|
|
386
|
-
* @generated from field:
|
|
229
|
+
* @generated from field: bytes value = 1;
|
|
387
230
|
*/
|
|
388
|
-
|
|
231
|
+
value: Uint8Array;
|
|
389
232
|
};
|
|
390
233
|
|
|
391
234
|
/**
|
|
@@ -393,7 +236,7 @@ type PageResponse = Message<"thru.common.v1.PageResponse"> & {
|
|
|
393
236
|
*
|
|
394
237
|
* @generated from message thru.core.v1.AccountFlags
|
|
395
238
|
*/
|
|
396
|
-
type AccountFlags = Message<"thru.core.v1.AccountFlags"> & {
|
|
239
|
+
type AccountFlags$1 = Message<"thru.core.v1.AccountFlags"> & {
|
|
397
240
|
/**
|
|
398
241
|
* @generated from field: bool is_program = 1;
|
|
399
242
|
*/
|
|
@@ -428,7 +271,7 @@ type AccountFlags = Message<"thru.core.v1.AccountFlags"> & {
|
|
|
428
271
|
*
|
|
429
272
|
* @generated from message thru.core.v1.AccountMeta
|
|
430
273
|
*/
|
|
431
|
-
type AccountMeta = Message<"thru.core.v1.AccountMeta"> & {
|
|
274
|
+
type AccountMeta$1 = Message<"thru.core.v1.AccountMeta"> & {
|
|
432
275
|
/**
|
|
433
276
|
* @generated from field: uint32 version = 1;
|
|
434
277
|
*/
|
|
@@ -436,7 +279,7 @@ type AccountMeta = Message<"thru.core.v1.AccountMeta"> & {
|
|
|
436
279
|
/**
|
|
437
280
|
* @generated from field: thru.core.v1.AccountFlags flags = 2;
|
|
438
281
|
*/
|
|
439
|
-
flags?: AccountFlags;
|
|
282
|
+
flags?: AccountFlags$1;
|
|
440
283
|
/**
|
|
441
284
|
* @generated from field: uint32 data_size = 3;
|
|
442
285
|
*/
|
|
@@ -465,7 +308,7 @@ type AccountMeta = Message<"thru.core.v1.AccountMeta"> & {
|
|
|
465
308
|
*
|
|
466
309
|
* @generated from message thru.core.v1.AccountData
|
|
467
310
|
*/
|
|
468
|
-
type AccountData = Message<"thru.core.v1.AccountData"> & {
|
|
311
|
+
type AccountData$1 = Message<"thru.core.v1.AccountData"> & {
|
|
469
312
|
/**
|
|
470
313
|
* @generated from field: optional bytes data = 1;
|
|
471
314
|
*/
|
|
@@ -494,33 +337,6 @@ type DataSlice = Message<"thru.core.v1.DataSlice"> & {
|
|
|
494
337
|
*/
|
|
495
338
|
length: number;
|
|
496
339
|
};
|
|
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
|
-
};
|
|
524
340
|
/**
|
|
525
341
|
* VersionContextMetadata captures context for a returned account state.
|
|
526
342
|
*
|
|
@@ -541,7 +357,7 @@ type VersionContextMetadata = Message<"thru.core.v1.VersionContextMetadata"> & {
|
|
|
541
357
|
*
|
|
542
358
|
* @generated from message thru.core.v1.Account
|
|
543
359
|
*/
|
|
544
|
-
type Account = Message<"thru.core.v1.Account"> & {
|
|
360
|
+
type Account$1 = Message<"thru.core.v1.Account"> & {
|
|
545
361
|
/**
|
|
546
362
|
* @generated from field: thru.core.v1.Pubkey address = 1;
|
|
547
363
|
*/
|
|
@@ -549,11 +365,11 @@ type Account = Message<"thru.core.v1.Account"> & {
|
|
|
549
365
|
/**
|
|
550
366
|
* @generated from field: optional thru.core.v1.AccountMeta meta = 2;
|
|
551
367
|
*/
|
|
552
|
-
meta?: AccountMeta;
|
|
368
|
+
meta?: AccountMeta$1;
|
|
553
369
|
/**
|
|
554
370
|
* @generated from field: optional thru.core.v1.AccountData data = 3;
|
|
555
371
|
*/
|
|
556
|
-
data?: AccountData;
|
|
372
|
+
data?: AccountData$1;
|
|
557
373
|
/**
|
|
558
374
|
* @generated from field: optional thru.core.v1.VersionContextMetadata version_context = 4;
|
|
559
375
|
*/
|
|
@@ -629,7 +445,7 @@ declare enum AccountView {
|
|
|
629
445
|
*
|
|
630
446
|
* @generated from message thru.core.v1.BlockHeader
|
|
631
447
|
*/
|
|
632
|
-
type BlockHeader = Message<"thru.core.v1.BlockHeader"> & {
|
|
448
|
+
type BlockHeader$1 = Message<"thru.core.v1.BlockHeader"> & {
|
|
633
449
|
/**
|
|
634
450
|
* @generated from field: uint64 slot = 1;
|
|
635
451
|
*/
|
|
@@ -684,7 +500,7 @@ type BlockHeader = Message<"thru.core.v1.BlockHeader"> & {
|
|
|
684
500
|
*
|
|
685
501
|
* @generated from message thru.core.v1.BlockFooter
|
|
686
502
|
*/
|
|
687
|
-
type BlockFooter = Message<"thru.core.v1.BlockFooter"> & {
|
|
503
|
+
type BlockFooter$1 = Message<"thru.core.v1.BlockFooter"> & {
|
|
688
504
|
/**
|
|
689
505
|
* @generated from field: thru.core.v1.Signature signature = 1;
|
|
690
506
|
*/
|
|
@@ -707,15 +523,15 @@ type BlockFooter = Message<"thru.core.v1.BlockFooter"> & {
|
|
|
707
523
|
*
|
|
708
524
|
* @generated from message thru.core.v1.Block
|
|
709
525
|
*/
|
|
710
|
-
type Block = Message<"thru.core.v1.Block"> & {
|
|
526
|
+
type Block$1 = Message<"thru.core.v1.Block"> & {
|
|
711
527
|
/**
|
|
712
528
|
* @generated from field: thru.core.v1.BlockHeader header = 1;
|
|
713
529
|
*/
|
|
714
|
-
header?: BlockHeader;
|
|
530
|
+
header?: BlockHeader$1;
|
|
715
531
|
/**
|
|
716
532
|
* @generated from field: optional thru.core.v1.BlockFooter footer = 2;
|
|
717
533
|
*/
|
|
718
|
-
footer?: BlockFooter;
|
|
534
|
+
footer?: BlockFooter$1;
|
|
719
535
|
/**
|
|
720
536
|
* @generated from field: optional bytes body = 3;
|
|
721
537
|
*/
|
|
@@ -791,45 +607,6 @@ declare enum ExecutionStatus {
|
|
|
791
607
|
FAILED = 3
|
|
792
608
|
}
|
|
793
609
|
|
|
794
|
-
/**
|
|
795
|
-
* StateProof returns binary proof data along with context.
|
|
796
|
-
*
|
|
797
|
-
* @generated from message thru.core.v1.StateProof
|
|
798
|
-
*/
|
|
799
|
-
type StateProof = Message<"thru.core.v1.StateProof"> & {
|
|
800
|
-
/**
|
|
801
|
-
* @generated from field: bytes proof = 1;
|
|
802
|
-
*/
|
|
803
|
-
proof: Uint8Array;
|
|
804
|
-
/**
|
|
805
|
-
* @generated from field: uint64 slot = 2;
|
|
806
|
-
*/
|
|
807
|
-
slot: bigint;
|
|
808
|
-
};
|
|
809
|
-
/**
|
|
810
|
-
* StateProofType selects the type of state proof to generate.
|
|
811
|
-
*
|
|
812
|
-
* @generated from enum thru.core.v1.StateProofType
|
|
813
|
-
*/
|
|
814
|
-
declare enum StateProofType {
|
|
815
|
-
/**
|
|
816
|
-
* @generated from enum value: STATE_PROOF_TYPE_UNSPECIFIED = 0;
|
|
817
|
-
*/
|
|
818
|
-
UNSPECIFIED = 0,
|
|
819
|
-
/**
|
|
820
|
-
* @generated from enum value: STATE_PROOF_TYPE_CREATING = 1;
|
|
821
|
-
*/
|
|
822
|
-
CREATING = 1,
|
|
823
|
-
/**
|
|
824
|
-
* @generated from enum value: STATE_PROOF_TYPE_UPDATING = 2;
|
|
825
|
-
*/
|
|
826
|
-
UPDATING = 2,
|
|
827
|
-
/**
|
|
828
|
-
* @generated from enum value: STATE_PROOF_TYPE_EXISTING = 3;
|
|
829
|
-
*/
|
|
830
|
-
EXISTING = 3
|
|
831
|
-
}
|
|
832
|
-
|
|
833
610
|
/**
|
|
834
611
|
* TransactionHeader carries structured metadata for a transaction.
|
|
835
612
|
*
|
|
@@ -984,7 +761,7 @@ type TransactionEvent = Message<"thru.core.v1.TransactionEvent"> & {
|
|
|
984
761
|
*
|
|
985
762
|
* @generated from message thru.core.v1.Transaction
|
|
986
763
|
*/
|
|
987
|
-
type Transaction = Message<"thru.core.v1.Transaction"> & {
|
|
764
|
+
type Transaction$1 = Message<"thru.core.v1.Transaction"> & {
|
|
988
765
|
/**
|
|
989
766
|
* @generated from field: thru.core.v1.Signature signature = 1;
|
|
990
767
|
*/
|
|
@@ -1223,61 +1000,264 @@ declare enum TransactionVmError {
|
|
|
1223
1000
|
}
|
|
1224
1001
|
|
|
1225
1002
|
/**
|
|
1226
|
-
*
|
|
1003
|
+
* StreamEventsResponse delivers event payloads.
|
|
1227
1004
|
*
|
|
1228
|
-
* @generated from message thru.services.v1.
|
|
1005
|
+
* @generated from message thru.services.v1.StreamEventsResponse
|
|
1229
1006
|
*/
|
|
1230
|
-
type
|
|
1007
|
+
type StreamEventsResponse = Message<"thru.services.v1.StreamEventsResponse"> & {
|
|
1008
|
+
/**
|
|
1009
|
+
* @generated from field: string event_id = 1;
|
|
1010
|
+
*/
|
|
1011
|
+
eventId: string;
|
|
1012
|
+
/**
|
|
1013
|
+
* @generated from field: optional bytes payload = 2;
|
|
1014
|
+
*/
|
|
1015
|
+
payload?: Uint8Array;
|
|
1016
|
+
/**
|
|
1017
|
+
* @generated from field: optional google.protobuf.Timestamp timestamp = 3;
|
|
1018
|
+
*/
|
|
1019
|
+
timestamp?: Timestamp;
|
|
1020
|
+
/**
|
|
1021
|
+
* @generated from field: thru.core.v1.Pubkey program = 4;
|
|
1022
|
+
*/
|
|
1023
|
+
program?: Pubkey;
|
|
1024
|
+
/**
|
|
1025
|
+
* @generated from field: uint32 call_idx = 5;
|
|
1026
|
+
*/
|
|
1027
|
+
callIdx: number;
|
|
1028
|
+
/**
|
|
1029
|
+
* @generated from field: thru.core.v1.Signature signature = 6;
|
|
1030
|
+
*/
|
|
1031
|
+
signature?: Signature;
|
|
1231
1032
|
/**
|
|
1232
|
-
* @generated from field:
|
|
1033
|
+
* @generated from field: uint64 slot = 7;
|
|
1233
1034
|
*/
|
|
1234
|
-
|
|
1035
|
+
slot: bigint;
|
|
1235
1036
|
};
|
|
1037
|
+
|
|
1038
|
+
type Bytes32 = Uint8Array;
|
|
1039
|
+
type Bytes64 = Uint8Array;
|
|
1040
|
+
type AccountAddress = Bytes32;
|
|
1041
|
+
type ProgramIdentifier = BytesLike;
|
|
1042
|
+
interface ResourceLimits {
|
|
1043
|
+
computeUnits?: number;
|
|
1044
|
+
stateUnits?: number;
|
|
1045
|
+
memoryUnits?: number;
|
|
1046
|
+
}
|
|
1047
|
+
interface OptionalProofs {
|
|
1048
|
+
feePayerStateProof?: Uint8Array;
|
|
1049
|
+
feePayerAccountMetaRaw?: Uint8Array;
|
|
1050
|
+
}
|
|
1051
|
+
interface TransactionHeaderInput extends ResourceLimits {
|
|
1052
|
+
fee: bigint;
|
|
1053
|
+
nonce: bigint;
|
|
1054
|
+
startSlot: bigint;
|
|
1055
|
+
expiryAfter?: number;
|
|
1056
|
+
flags?: number;
|
|
1057
|
+
}
|
|
1058
|
+
interface TransactionAccountsInput {
|
|
1059
|
+
readWriteAccounts?: AccountAddress[];
|
|
1060
|
+
readOnlyAccounts?: AccountAddress[];
|
|
1061
|
+
}
|
|
1236
1062
|
/**
|
|
1237
|
-
*
|
|
1063
|
+
* Context provided to instruction data functions.
|
|
1064
|
+
* Contains all transaction accounts in their final sorted order and helper functions
|
|
1065
|
+
* for looking up account indexes.
|
|
1066
|
+
*/
|
|
1067
|
+
interface InstructionContext {
|
|
1068
|
+
/** All accounts in final transaction order: [feePayer, program, ...readWrite, ...readOnly] */
|
|
1069
|
+
accounts: AccountAddress[];
|
|
1070
|
+
/** Get the index of an account by its public key. Throws if account is not found in transaction. */
|
|
1071
|
+
getAccountIndex: (pubkey: AccountAddress) => number;
|
|
1072
|
+
}
|
|
1073
|
+
interface FeePayerInput {
|
|
1074
|
+
publicKey: AccountAddress;
|
|
1075
|
+
privateKey?: Bytes32;
|
|
1076
|
+
}
|
|
1077
|
+
interface BuildTransactionParams {
|
|
1078
|
+
feePayer: FeePayerInput;
|
|
1079
|
+
program: ProgramIdentifier;
|
|
1080
|
+
header: TransactionHeaderInput;
|
|
1081
|
+
accounts?: TransactionAccountsInput;
|
|
1082
|
+
instructionData?: BytesLike;
|
|
1083
|
+
proofs?: OptionalProofs;
|
|
1084
|
+
}
|
|
1085
|
+
interface BuiltTransactionResult {
|
|
1086
|
+
transaction: TransactionLike;
|
|
1087
|
+
}
|
|
1088
|
+
interface SignedTransactionResult extends BuiltTransactionResult {
|
|
1089
|
+
signature: Bytes64;
|
|
1090
|
+
rawTransaction: Uint8Array;
|
|
1091
|
+
}
|
|
1092
|
+
interface TransactionLike {
|
|
1093
|
+
toWire(): Uint8Array;
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
interface TransactionExecutionEvent {
|
|
1097
|
+
eventId: string;
|
|
1098
|
+
callIdx: number;
|
|
1099
|
+
programIdx: number;
|
|
1100
|
+
program?: AccountAddress;
|
|
1101
|
+
payload: Uint8Array;
|
|
1102
|
+
}
|
|
1103
|
+
interface TransactionExecutionResultData {
|
|
1104
|
+
consumedComputeUnits: number;
|
|
1105
|
+
consumedMemoryUnits: number;
|
|
1106
|
+
consumedStateUnits: number;
|
|
1107
|
+
userErrorCode: bigint;
|
|
1108
|
+
vmError: TransactionVmError;
|
|
1109
|
+
executionResult: bigint;
|
|
1110
|
+
pagesUsed: number;
|
|
1111
|
+
eventsCount: number;
|
|
1112
|
+
eventsSize: number;
|
|
1113
|
+
readwriteAccounts: AccountAddress[];
|
|
1114
|
+
readonlyAccounts: AccountAddress[];
|
|
1115
|
+
events?: TransactionExecutionEvent[];
|
|
1116
|
+
}
|
|
1117
|
+
declare class Transaction {
|
|
1118
|
+
readonly version: number;
|
|
1119
|
+
readonly feePayer: AccountAddress;
|
|
1120
|
+
readonly program: AccountAddress;
|
|
1121
|
+
readonly fee: bigint;
|
|
1122
|
+
readonly nonce: bigint;
|
|
1123
|
+
readonly startSlot: bigint;
|
|
1124
|
+
readonly expiryAfter: number;
|
|
1125
|
+
readonly requestedComputeUnits: number;
|
|
1126
|
+
readonly requestedStateUnits: number;
|
|
1127
|
+
readonly requestedMemoryUnits: number;
|
|
1128
|
+
readonly flags: number;
|
|
1129
|
+
readonly readWriteAccounts: AccountAddress[];
|
|
1130
|
+
readonly readOnlyAccounts: AccountAddress[];
|
|
1131
|
+
readonly instructionData?: Uint8Array;
|
|
1132
|
+
readonly feePayerStateProof?: Uint8Array;
|
|
1133
|
+
readonly feePayerAccountMetaRaw?: Uint8Array;
|
|
1134
|
+
executionResult?: TransactionExecutionResultData;
|
|
1135
|
+
slot?: bigint;
|
|
1136
|
+
blockOffset?: number;
|
|
1137
|
+
private signature?;
|
|
1138
|
+
constructor(params: {
|
|
1139
|
+
version?: number;
|
|
1140
|
+
feePayer: AccountAddress;
|
|
1141
|
+
program: AccountAddress;
|
|
1142
|
+
header: TransactionHeaderInput;
|
|
1143
|
+
accounts?: TransactionAccountsInput;
|
|
1144
|
+
instructionData?: Uint8Array;
|
|
1145
|
+
proofs?: OptionalProofs;
|
|
1146
|
+
});
|
|
1147
|
+
static fromWire(data: Uint8Array): Transaction;
|
|
1148
|
+
static parseWire(data: Uint8Array, options?: {
|
|
1149
|
+
strict?: boolean;
|
|
1150
|
+
}): {
|
|
1151
|
+
transaction: Transaction;
|
|
1152
|
+
size: number;
|
|
1153
|
+
};
|
|
1154
|
+
static fromProto(proto: Transaction$1): Transaction;
|
|
1155
|
+
getSignature(): Uint8Array | undefined;
|
|
1156
|
+
setSignature(signature: Bytes64): void;
|
|
1157
|
+
sign(privateKey: Uint8Array): Promise<Bytes64>;
|
|
1158
|
+
toWireForSigning(): Uint8Array;
|
|
1159
|
+
toWire(): Uint8Array;
|
|
1160
|
+
private createHeader;
|
|
1161
|
+
private buildWirePayload;
|
|
1162
|
+
private static parseBodySections;
|
|
1163
|
+
private static ensureAvailable;
|
|
1164
|
+
private static parseStateProof;
|
|
1165
|
+
static executionResultFromProto(proto: TransactionExecutionResult): TransactionExecutionResultData;
|
|
1166
|
+
private static convertExecutionResultToProto;
|
|
1167
|
+
}
|
|
1168
|
+
|
|
1169
|
+
interface TrackTransactionUpdate {
|
|
1170
|
+
signature?: Uint8Array;
|
|
1171
|
+
status: string;
|
|
1172
|
+
statusCode: ConsensusStatus;
|
|
1173
|
+
executionResult?: ReturnType<typeof Transaction.executionResultFromProto>;
|
|
1174
|
+
transaction?: Transaction;
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
/**
|
|
1178
|
+
* PageRequest contains pagination parameters for listing RPCs.
|
|
1238
1179
|
*
|
|
1239
|
-
* @generated from message thru.
|
|
1180
|
+
* @generated from message thru.common.v1.PageRequest
|
|
1240
1181
|
*/
|
|
1241
|
-
type
|
|
1182
|
+
type PageRequest$1 = Message<"thru.common.v1.PageRequest"> & {
|
|
1242
1183
|
/**
|
|
1243
|
-
*
|
|
1184
|
+
* Maximum number of items to return in a single response.
|
|
1185
|
+
*
|
|
1186
|
+
* @generated from field: optional uint32 page_size = 1;
|
|
1244
1187
|
*/
|
|
1245
|
-
|
|
1188
|
+
pageSize?: number;
|
|
1246
1189
|
/**
|
|
1247
|
-
*
|
|
1190
|
+
* Token identifying the position to resume from.
|
|
1191
|
+
*
|
|
1192
|
+
* @generated from field: optional string page_token = 2;
|
|
1248
1193
|
*/
|
|
1249
|
-
|
|
1194
|
+
pageToken?: string;
|
|
1195
|
+
/**
|
|
1196
|
+
* Optional ordering specification in "field [asc|desc]" form.
|
|
1197
|
+
*
|
|
1198
|
+
* @generated from field: optional string order_by = 3;
|
|
1199
|
+
*/
|
|
1200
|
+
orderBy?: string;
|
|
1250
1201
|
};
|
|
1251
1202
|
/**
|
|
1252
|
-
*
|
|
1203
|
+
* PageResponse captures pagination metadata returned with list results.
|
|
1253
1204
|
*
|
|
1254
|
-
* @generated from message thru.
|
|
1205
|
+
* @generated from message thru.common.v1.PageResponse
|
|
1255
1206
|
*/
|
|
1256
|
-
type
|
|
1207
|
+
type PageResponse$1 = Message<"thru.common.v1.PageResponse"> & {
|
|
1257
1208
|
/**
|
|
1258
|
-
*
|
|
1209
|
+
* Token to retrieve the next page of results, if any.
|
|
1210
|
+
*
|
|
1211
|
+
* @generated from field: optional string next_page_token = 1;
|
|
1259
1212
|
*/
|
|
1260
|
-
|
|
1213
|
+
nextPageToken?: string;
|
|
1261
1214
|
/**
|
|
1262
|
-
*
|
|
1215
|
+
* Total number of items available when known.
|
|
1216
|
+
*
|
|
1217
|
+
* @generated from field: optional uint64 total_size = 2;
|
|
1263
1218
|
*/
|
|
1264
|
-
|
|
1219
|
+
totalSize?: bigint;
|
|
1265
1220
|
};
|
|
1221
|
+
|
|
1266
1222
|
/**
|
|
1267
|
-
*
|
|
1223
|
+
* StateProof returns binary proof data along with context.
|
|
1268
1224
|
*
|
|
1269
|
-
* @generated from message thru.
|
|
1225
|
+
* @generated from message thru.core.v1.StateProof
|
|
1270
1226
|
*/
|
|
1271
|
-
type
|
|
1227
|
+
type StateProof$1 = Message<"thru.core.v1.StateProof"> & {
|
|
1272
1228
|
/**
|
|
1273
|
-
* @generated from field:
|
|
1229
|
+
* @generated from field: bytes proof = 1;
|
|
1274
1230
|
*/
|
|
1275
|
-
|
|
1231
|
+
proof: Uint8Array;
|
|
1276
1232
|
/**
|
|
1277
|
-
* @generated from field:
|
|
1233
|
+
* @generated from field: uint64 slot = 2;
|
|
1278
1234
|
*/
|
|
1279
|
-
|
|
1235
|
+
slot: bigint;
|
|
1280
1236
|
};
|
|
1237
|
+
/**
|
|
1238
|
+
* StateProofType selects the type of state proof to generate.
|
|
1239
|
+
*
|
|
1240
|
+
* @generated from enum thru.core.v1.StateProofType
|
|
1241
|
+
*/
|
|
1242
|
+
declare enum StateProofType {
|
|
1243
|
+
/**
|
|
1244
|
+
* @generated from enum value: STATE_PROOF_TYPE_UNSPECIFIED = 0;
|
|
1245
|
+
*/
|
|
1246
|
+
UNSPECIFIED = 0,
|
|
1247
|
+
/**
|
|
1248
|
+
* @generated from enum value: STATE_PROOF_TYPE_CREATING = 1;
|
|
1249
|
+
*/
|
|
1250
|
+
CREATING = 1,
|
|
1251
|
+
/**
|
|
1252
|
+
* @generated from enum value: STATE_PROOF_TYPE_UPDATING = 2;
|
|
1253
|
+
*/
|
|
1254
|
+
UPDATING = 2,
|
|
1255
|
+
/**
|
|
1256
|
+
* @generated from enum value: STATE_PROOF_TYPE_EXISTING = 3;
|
|
1257
|
+
*/
|
|
1258
|
+
EXISTING = 3
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1281
1261
|
/**
|
|
1282
1262
|
* GetVersionResponse returns version information per component.
|
|
1283
1263
|
*
|
|
@@ -1349,150 +1329,39 @@ type TransactionStatus = Message<"thru.services.v1.TransactionStatus"> & {
|
|
|
1349
1329
|
*/
|
|
1350
1330
|
executionResult?: TransactionExecutionResult;
|
|
1351
1331
|
};
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
/**
|
|
1367
|
-
* @generated from field: uint64 cluster_executed = 3;
|
|
1368
|
-
*/
|
|
1369
|
-
clusterExecuted: bigint;
|
|
1370
|
-
};
|
|
1332
|
+
|
|
1333
|
+
interface TransactionStatusParams {
|
|
1334
|
+
signature: Uint8Array;
|
|
1335
|
+
consensusStatus?: ConsensusStatus;
|
|
1336
|
+
executionResult?: ReturnType<typeof Transaction.executionResultFromProto>;
|
|
1337
|
+
}
|
|
1338
|
+
declare class TransactionStatusSnapshot {
|
|
1339
|
+
readonly signature: Uint8Array;
|
|
1340
|
+
readonly statusCode?: ConsensusStatus;
|
|
1341
|
+
readonly status?: string;
|
|
1342
|
+
readonly executionResult?: ReturnType<typeof Transaction.executionResultFromProto>;
|
|
1343
|
+
constructor(params: TransactionStatusParams);
|
|
1344
|
+
static fromProto(proto: TransactionStatus): TransactionStatusSnapshot;
|
|
1345
|
+
}
|
|
1371
1346
|
|
|
1372
1347
|
/**
|
|
1373
|
-
*
|
|
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
|
-
};
|
|
1478
|
-
/**
|
|
1479
|
-
* TrackTransactionResponse reports status transitions for a transaction.
|
|
1348
|
+
* BatchSendTransactionsResponse returns submission results for each transaction.
|
|
1480
1349
|
*
|
|
1481
|
-
* @generated from message thru.services.v1.
|
|
1350
|
+
* @generated from message thru.services.v1.BatchSendTransactionsResponse
|
|
1482
1351
|
*/
|
|
1483
|
-
type
|
|
1484
|
-
/**
|
|
1485
|
-
* @generated from field: thru.core.v1.Signature signature = 1;
|
|
1486
|
-
*/
|
|
1487
|
-
signature?: Signature;
|
|
1352
|
+
type BatchSendTransactionsResponse = Message<"thru.services.v1.BatchSendTransactionsResponse"> & {
|
|
1488
1353
|
/**
|
|
1489
|
-
*
|
|
1354
|
+
* Signatures for each transaction (in same order as request).
|
|
1355
|
+
*
|
|
1356
|
+
* @generated from field: repeated thru.core.v1.Signature signatures = 1;
|
|
1490
1357
|
*/
|
|
1491
|
-
|
|
1358
|
+
signatures: Signature[];
|
|
1492
1359
|
/**
|
|
1493
|
-
*
|
|
1360
|
+
* Acceptance status for each transaction (true if accepted, false if not).
|
|
1361
|
+
*
|
|
1362
|
+
* @generated from field: repeated bool accepted = 2;
|
|
1494
1363
|
*/
|
|
1495
|
-
|
|
1364
|
+
accepted: boolean[];
|
|
1496
1365
|
};
|
|
1497
1366
|
|
|
1498
1367
|
interface ThruClientConfig {
|
|
@@ -1509,6 +1378,169 @@ interface ThruClientContext {
|
|
|
1509
1378
|
streaming: StreamingClient;
|
|
1510
1379
|
}
|
|
1511
1380
|
|
|
1381
|
+
interface AccountFlagsData {
|
|
1382
|
+
isProgram: boolean;
|
|
1383
|
+
isPrivileged: boolean;
|
|
1384
|
+
isUncompressable: boolean;
|
|
1385
|
+
isEphemeral: boolean;
|
|
1386
|
+
isDeleted: boolean;
|
|
1387
|
+
isNew: boolean;
|
|
1388
|
+
isCompressed: boolean;
|
|
1389
|
+
}
|
|
1390
|
+
declare class AccountFlags implements AccountFlagsData {
|
|
1391
|
+
readonly isProgram: boolean;
|
|
1392
|
+
readonly isPrivileged: boolean;
|
|
1393
|
+
readonly isUncompressable: boolean;
|
|
1394
|
+
readonly isEphemeral: boolean;
|
|
1395
|
+
readonly isDeleted: boolean;
|
|
1396
|
+
readonly isNew: boolean;
|
|
1397
|
+
readonly isCompressed: boolean;
|
|
1398
|
+
constructor(flags?: Partial<AccountFlagsData>);
|
|
1399
|
+
static fromProto(flags?: AccountFlags$1): AccountFlags;
|
|
1400
|
+
}
|
|
1401
|
+
declare class AccountMeta {
|
|
1402
|
+
readonly version: number;
|
|
1403
|
+
readonly flags: AccountFlags;
|
|
1404
|
+
readonly dataSize: number;
|
|
1405
|
+
readonly seq: bigint;
|
|
1406
|
+
readonly owner?: AccountAddress;
|
|
1407
|
+
readonly balance: bigint;
|
|
1408
|
+
readonly nonce?: bigint;
|
|
1409
|
+
constructor(params: {
|
|
1410
|
+
version: number;
|
|
1411
|
+
flags?: AccountFlags;
|
|
1412
|
+
dataSize: number;
|
|
1413
|
+
seq: bigint;
|
|
1414
|
+
owner?: AccountAddress;
|
|
1415
|
+
balance: bigint;
|
|
1416
|
+
nonce?: bigint;
|
|
1417
|
+
});
|
|
1418
|
+
static fromProto(meta?: AccountMeta$1): AccountMeta | undefined;
|
|
1419
|
+
}
|
|
1420
|
+
declare class AccountData {
|
|
1421
|
+
readonly data?: Uint8Array;
|
|
1422
|
+
readonly compressed: boolean;
|
|
1423
|
+
readonly compressionAlgorithm?: string;
|
|
1424
|
+
constructor(params: {
|
|
1425
|
+
data?: Uint8Array;
|
|
1426
|
+
compressed?: boolean;
|
|
1427
|
+
compressionAlgorithm?: string;
|
|
1428
|
+
});
|
|
1429
|
+
static fromProto(data?: AccountData$1): AccountData | undefined;
|
|
1430
|
+
}
|
|
1431
|
+
interface AccountVersionContext {
|
|
1432
|
+
slot?: bigint;
|
|
1433
|
+
blockTimestampNs?: bigint;
|
|
1434
|
+
}
|
|
1435
|
+
declare class Account {
|
|
1436
|
+
readonly address: AccountAddress;
|
|
1437
|
+
readonly meta?: AccountMeta;
|
|
1438
|
+
readonly data?: AccountData;
|
|
1439
|
+
readonly versionContext?: AccountVersionContext;
|
|
1440
|
+
readonly consensusStatus?: ConsensusStatus;
|
|
1441
|
+
constructor(params: {
|
|
1442
|
+
address: AccountAddress;
|
|
1443
|
+
meta?: AccountMeta;
|
|
1444
|
+
data?: AccountData;
|
|
1445
|
+
versionContext?: AccountVersionContext;
|
|
1446
|
+
consensusStatus?: ConsensusStatus;
|
|
1447
|
+
});
|
|
1448
|
+
static fromProto(proto: Account$1): Account;
|
|
1449
|
+
}
|
|
1450
|
+
|
|
1451
|
+
interface AccountPageChunk {
|
|
1452
|
+
pageIndex: number;
|
|
1453
|
+
pageSize: number;
|
|
1454
|
+
data: Uint8Array;
|
|
1455
|
+
compressed?: boolean;
|
|
1456
|
+
compressionAlgorithm?: string;
|
|
1457
|
+
}
|
|
1458
|
+
interface AccountSnapshot {
|
|
1459
|
+
account: Account;
|
|
1460
|
+
}
|
|
1461
|
+
interface AccountUpdateDelta {
|
|
1462
|
+
slot: bigint;
|
|
1463
|
+
meta?: AccountMeta;
|
|
1464
|
+
page?: AccountPageChunk;
|
|
1465
|
+
deleted?: boolean;
|
|
1466
|
+
}
|
|
1467
|
+
type StreamAccountUpdate = {
|
|
1468
|
+
kind: "snapshot";
|
|
1469
|
+
snapshot: AccountSnapshot;
|
|
1470
|
+
} | {
|
|
1471
|
+
kind: "update";
|
|
1472
|
+
update: AccountUpdateDelta;
|
|
1473
|
+
};
|
|
1474
|
+
|
|
1475
|
+
type FilterParamValueCase = "stringValue" | "bytesValue" | "boolValue" | "intValue" | "doubleValue";
|
|
1476
|
+
declare class FilterParamValue {
|
|
1477
|
+
private readonly case?;
|
|
1478
|
+
private readonly value?;
|
|
1479
|
+
private constructor();
|
|
1480
|
+
static none(): FilterParamValue;
|
|
1481
|
+
static string(value: string): FilterParamValue;
|
|
1482
|
+
static bytes(value: Uint8Array): FilterParamValue;
|
|
1483
|
+
static bool(value: boolean): FilterParamValue;
|
|
1484
|
+
static int(value: bigint): FilterParamValue;
|
|
1485
|
+
static double(value: number): FilterParamValue;
|
|
1486
|
+
static fromProto(proto: FilterParamValue$1): FilterParamValue;
|
|
1487
|
+
toProto(): FilterParamValue$1;
|
|
1488
|
+
getCase(): FilterParamValueCase | undefined;
|
|
1489
|
+
getString(): string | undefined;
|
|
1490
|
+
getBytes(): Uint8Array | undefined;
|
|
1491
|
+
getBool(): boolean | undefined;
|
|
1492
|
+
getInt(): bigint | undefined;
|
|
1493
|
+
getDouble(): number | undefined;
|
|
1494
|
+
}
|
|
1495
|
+
interface FilterParamsInit {
|
|
1496
|
+
[key: string]: FilterParamValue;
|
|
1497
|
+
}
|
|
1498
|
+
declare class Filter {
|
|
1499
|
+
readonly expression?: string;
|
|
1500
|
+
private readonly params;
|
|
1501
|
+
constructor(init?: {
|
|
1502
|
+
expression?: string;
|
|
1503
|
+
params?: FilterParamsInit | Map<string, FilterParamValue> | Iterable<[string, FilterParamValue]>;
|
|
1504
|
+
});
|
|
1505
|
+
static fromProto(proto: Filter$1): Filter;
|
|
1506
|
+
toProto(): Filter$1;
|
|
1507
|
+
hasParam(name: string): boolean;
|
|
1508
|
+
getParam(name: string): FilterParamValue | undefined;
|
|
1509
|
+
listParams(): string[];
|
|
1510
|
+
entries(): [string, FilterParamValue][];
|
|
1511
|
+
withExpression(expression?: string): Filter;
|
|
1512
|
+
withParam(name: string, value: FilterParamValue): Filter;
|
|
1513
|
+
withoutParam(name: string): Filter;
|
|
1514
|
+
private setParamInternal;
|
|
1515
|
+
}
|
|
1516
|
+
|
|
1517
|
+
interface PageRequestParams {
|
|
1518
|
+
pageSize?: number;
|
|
1519
|
+
pageToken?: string;
|
|
1520
|
+
orderBy?: string;
|
|
1521
|
+
}
|
|
1522
|
+
declare class PageRequest {
|
|
1523
|
+
readonly pageSize?: number;
|
|
1524
|
+
readonly pageToken?: string;
|
|
1525
|
+
readonly orderBy?: string;
|
|
1526
|
+
constructor(params?: PageRequestParams);
|
|
1527
|
+
static fromProto(proto?: PageRequest$1): PageRequest | undefined;
|
|
1528
|
+
toProto(): PageRequest$1;
|
|
1529
|
+
withParams(params: PageRequestParams): PageRequest;
|
|
1530
|
+
}
|
|
1531
|
+
interface PageResponseParams {
|
|
1532
|
+
nextPageToken?: string;
|
|
1533
|
+
totalSize?: bigint;
|
|
1534
|
+
}
|
|
1535
|
+
declare class PageResponse {
|
|
1536
|
+
readonly nextPageToken?: string;
|
|
1537
|
+
readonly totalSize?: bigint;
|
|
1538
|
+
constructor(params?: PageResponseParams);
|
|
1539
|
+
static fromProto(proto?: PageResponse$1): PageResponse | undefined;
|
|
1540
|
+
toProto(): PageResponse$1;
|
|
1541
|
+
hasNextPage(): boolean;
|
|
1542
|
+
}
|
|
1543
|
+
|
|
1512
1544
|
interface CreateAccountOptions {
|
|
1513
1545
|
/** The new account's public key (fee payer). */
|
|
1514
1546
|
publicKey: Pubkey$1;
|
|
@@ -1533,11 +1565,16 @@ interface ListAccountsOptions {
|
|
|
1533
1565
|
page?: PageRequest;
|
|
1534
1566
|
minConsensus?: ConsensusStatus;
|
|
1535
1567
|
}
|
|
1568
|
+
interface AccountList {
|
|
1569
|
+
accounts: Account[];
|
|
1570
|
+
page?: PageResponse;
|
|
1571
|
+
}
|
|
1536
1572
|
declare function getAccount(ctx: ThruClientContext, address: Pubkey$1, options?: AccountQueryOptions): Promise<Account>;
|
|
1537
1573
|
declare function getRawAccount(ctx: ThruClientContext, address: Pubkey$1, options?: RawAccountQueryOptions): Promise<RawAccount>;
|
|
1538
|
-
declare function listAccounts(ctx: ThruClientContext, options: ListAccountsOptions): Promise<
|
|
1539
|
-
declare function createAccount(ctx: ThruClientContext, options: CreateAccountOptions): Promise<Transaction
|
|
1574
|
+
declare function listAccounts(ctx: ThruClientContext, options: ListAccountsOptions): Promise<AccountList>;
|
|
1575
|
+
declare function createAccount(ctx: ThruClientContext, options: CreateAccountOptions): Promise<Transaction>;
|
|
1540
1576
|
|
|
1577
|
+
type accounts_AccountList = AccountList;
|
|
1541
1578
|
type accounts_AccountQueryOptions = AccountQueryOptions;
|
|
1542
1579
|
type accounts_CreateAccountOptions = CreateAccountOptions;
|
|
1543
1580
|
type accounts_ListAccountsOptions = ListAccountsOptions;
|
|
@@ -1547,7 +1584,79 @@ declare const accounts_getAccount: typeof getAccount;
|
|
|
1547
1584
|
declare const accounts_getRawAccount: typeof getRawAccount;
|
|
1548
1585
|
declare const accounts_listAccounts: typeof listAccounts;
|
|
1549
1586
|
declare namespace accounts {
|
|
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 };
|
|
1587
|
+
export { type accounts_AccountList as AccountList, 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 };
|
|
1588
|
+
}
|
|
1589
|
+
|
|
1590
|
+
interface BlockFooterParams {
|
|
1591
|
+
signature?: Uint8Array;
|
|
1592
|
+
status: ExecutionStatus;
|
|
1593
|
+
consumedComputeUnits: bigint;
|
|
1594
|
+
consumedStateUnits: number;
|
|
1595
|
+
}
|
|
1596
|
+
declare class BlockFooter {
|
|
1597
|
+
readonly signature?: Uint8Array;
|
|
1598
|
+
readonly status: ExecutionStatus;
|
|
1599
|
+
readonly consumedComputeUnits: bigint;
|
|
1600
|
+
readonly consumedStateUnits: number;
|
|
1601
|
+
constructor(params: BlockFooterParams);
|
|
1602
|
+
static fromProto(proto: BlockFooter$1): BlockFooter;
|
|
1603
|
+
}
|
|
1604
|
+
|
|
1605
|
+
interface BlockHeaderParams {
|
|
1606
|
+
slot: bigint;
|
|
1607
|
+
version: number;
|
|
1608
|
+
headerSignature?: Uint8Array;
|
|
1609
|
+
producer?: Uint8Array;
|
|
1610
|
+
expiryTimestamp?: Timestamp;
|
|
1611
|
+
startSlot: bigint;
|
|
1612
|
+
expiryAfter?: number;
|
|
1613
|
+
maxBlockSize?: number;
|
|
1614
|
+
maxComputeUnits?: bigint;
|
|
1615
|
+
maxStateUnits?: number;
|
|
1616
|
+
price?: bigint;
|
|
1617
|
+
blockHash?: Uint8Array;
|
|
1618
|
+
}
|
|
1619
|
+
declare class BlockHeader {
|
|
1620
|
+
readonly slot: bigint;
|
|
1621
|
+
readonly version: number;
|
|
1622
|
+
readonly headerSignature?: Uint8Array;
|
|
1623
|
+
readonly producer?: Uint8Array;
|
|
1624
|
+
readonly expiryTimestamp?: Timestamp;
|
|
1625
|
+
readonly startSlot: bigint;
|
|
1626
|
+
readonly expiryAfter?: number;
|
|
1627
|
+
readonly maxBlockSize?: number;
|
|
1628
|
+
readonly maxComputeUnits?: bigint;
|
|
1629
|
+
readonly maxStateUnits?: number;
|
|
1630
|
+
readonly price?: bigint;
|
|
1631
|
+
readonly blockHash?: Uint8Array;
|
|
1632
|
+
constructor(params: BlockHeaderParams);
|
|
1633
|
+
static fromProto(proto: BlockHeader$1): BlockHeader;
|
|
1634
|
+
withBlockHash(blockHash: Uint8Array): BlockHeader;
|
|
1635
|
+
}
|
|
1636
|
+
|
|
1637
|
+
declare class Block {
|
|
1638
|
+
readonly header: BlockHeader;
|
|
1639
|
+
readonly footer?: BlockFooter;
|
|
1640
|
+
readonly body?: Uint8Array;
|
|
1641
|
+
readonly consensusStatus?: ConsensusStatus;
|
|
1642
|
+
blockTimeNs?: bigint;
|
|
1643
|
+
attestorPayment?: bigint;
|
|
1644
|
+
constructor(params: {
|
|
1645
|
+
header: BlockHeader;
|
|
1646
|
+
footer?: BlockFooter;
|
|
1647
|
+
body?: Uint8Array;
|
|
1648
|
+
consensusStatus?: ConsensusStatus;
|
|
1649
|
+
});
|
|
1650
|
+
static fromProto(proto: Block$1): Block;
|
|
1651
|
+
static fromWire(data: Uint8Array): Block;
|
|
1652
|
+
toWire(): Uint8Array;
|
|
1653
|
+
getTransactions(): Transaction[];
|
|
1654
|
+
private static extractTransactionBody;
|
|
1655
|
+
private serializeHeader;
|
|
1656
|
+
private serializeFooter;
|
|
1657
|
+
private static parseHeader;
|
|
1658
|
+
private static parseFooter;
|
|
1659
|
+
private static parseTransactionsFromBody;
|
|
1551
1660
|
}
|
|
1552
1661
|
|
|
1553
1662
|
type BlockSelector = {
|
|
@@ -1580,10 +1689,15 @@ interface ListBlocksOptions {
|
|
|
1580
1689
|
view?: BlockView;
|
|
1581
1690
|
minConsensus?: ConsensusStatus;
|
|
1582
1691
|
}
|
|
1692
|
+
interface BlockList {
|
|
1693
|
+
blocks: Block[];
|
|
1694
|
+
page?: PageResponse;
|
|
1695
|
+
}
|
|
1583
1696
|
declare function getBlock(ctx: ThruClientContext, selector: BlockSelector, options?: BlockQueryOptions): Promise<Block>;
|
|
1584
1697
|
declare function getRawBlock(ctx: ThruClientContext, selector: BlockSelector, options?: RawBlockQueryOptions): Promise<RawBlock>;
|
|
1585
|
-
declare function listBlocks(ctx: ThruClientContext, options?: ListBlocksOptions): Promise<
|
|
1698
|
+
declare function listBlocks(ctx: ThruClientContext, options?: ListBlocksOptions): Promise<BlockList>;
|
|
1586
1699
|
|
|
1700
|
+
type blocks_BlockList = BlockList;
|
|
1587
1701
|
type blocks_BlockQueryOptions = BlockQueryOptions;
|
|
1588
1702
|
type blocks_ListBlocksOptions = ListBlocksOptions;
|
|
1589
1703
|
type blocks_RawBlockQueryOptions = RawBlockQueryOptions;
|
|
@@ -1591,13 +1705,39 @@ declare const blocks_getBlock: typeof getBlock;
|
|
|
1591
1705
|
declare const blocks_getRawBlock: typeof getRawBlock;
|
|
1592
1706
|
declare const blocks_listBlocks: typeof listBlocks;
|
|
1593
1707
|
declare namespace blocks {
|
|
1594
|
-
export { 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 };
|
|
1708
|
+
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
|
+
}
|
|
1710
|
+
|
|
1711
|
+
interface ChainEventParams {
|
|
1712
|
+
id: string;
|
|
1713
|
+
transactionSignature?: Uint8Array;
|
|
1714
|
+
program?: Uint8Array;
|
|
1715
|
+
payload?: Uint8Array;
|
|
1716
|
+
slot?: bigint;
|
|
1717
|
+
callIndex?: number;
|
|
1718
|
+
programIndex?: number;
|
|
1719
|
+
payloadSize?: number;
|
|
1720
|
+
timestampNs?: bigint;
|
|
1721
|
+
}
|
|
1722
|
+
declare class ChainEvent {
|
|
1723
|
+
readonly id: string;
|
|
1724
|
+
readonly transactionSignature?: Uint8Array;
|
|
1725
|
+
readonly program?: Uint8Array;
|
|
1726
|
+
readonly payload?: Uint8Array;
|
|
1727
|
+
readonly slot?: bigint;
|
|
1728
|
+
readonly callIndex?: number;
|
|
1729
|
+
readonly programIndex?: number;
|
|
1730
|
+
readonly payloadSize?: number;
|
|
1731
|
+
readonly timestampNs?: bigint;
|
|
1732
|
+
constructor(params: ChainEventParams);
|
|
1733
|
+
static fromQuery(proto: Event): ChainEvent;
|
|
1734
|
+
static fromStream(proto: StreamEventsResponse): ChainEvent;
|
|
1595
1735
|
}
|
|
1596
1736
|
|
|
1597
1737
|
interface GetEventOptions {
|
|
1598
1738
|
versionContext?: VersionContext;
|
|
1599
1739
|
}
|
|
1600
|
-
declare function getEvent(ctx: ThruClientContext, eventId: string, options?: GetEventOptions): Promise<
|
|
1740
|
+
declare function getEvent(ctx: ThruClientContext, eventId: string, options?: GetEventOptions): Promise<ChainEvent>;
|
|
1601
1741
|
|
|
1602
1742
|
type events_GetEventOptions = GetEventOptions;
|
|
1603
1743
|
declare const events_getEvent: typeof getEvent;
|
|
@@ -1605,7 +1745,29 @@ declare namespace events {
|
|
|
1605
1745
|
export { type events_GetEventOptions as GetEventOptions, events_getEvent as getEvent };
|
|
1606
1746
|
}
|
|
1607
1747
|
|
|
1608
|
-
|
|
1748
|
+
interface HeightSnapshotParams {
|
|
1749
|
+
finalized: bigint;
|
|
1750
|
+
locallyExecuted: bigint;
|
|
1751
|
+
clusterExecuted: bigint;
|
|
1752
|
+
}
|
|
1753
|
+
declare class HeightSnapshot {
|
|
1754
|
+
readonly finalized: bigint;
|
|
1755
|
+
readonly locallyExecuted: bigint;
|
|
1756
|
+
readonly clusterExecuted: bigint;
|
|
1757
|
+
constructor(params: HeightSnapshotParams);
|
|
1758
|
+
static fromProto(proto: {
|
|
1759
|
+
finalized: bigint;
|
|
1760
|
+
locallyExecuted: bigint;
|
|
1761
|
+
clusterExecuted: bigint;
|
|
1762
|
+
}): HeightSnapshot;
|
|
1763
|
+
delta(other: HeightSnapshot): {
|
|
1764
|
+
finalized: bigint;
|
|
1765
|
+
locallyExecuted: bigint;
|
|
1766
|
+
clusterExecuted: bigint;
|
|
1767
|
+
};
|
|
1768
|
+
}
|
|
1769
|
+
|
|
1770
|
+
declare function getBlockHeight(ctx: ThruClientContext): Promise<HeightSnapshot>;
|
|
1609
1771
|
|
|
1610
1772
|
declare const height_getBlockHeight: typeof getBlockHeight;
|
|
1611
1773
|
declare namespace height {
|
|
@@ -1630,13 +1792,23 @@ declare namespace keys {
|
|
|
1630
1792
|
export { type keys_GeneratedKeyPair as GeneratedKeyPair, keys_fromPrivateKey as fromPrivateKey, keys_generateKeyPair as generateKeyPair };
|
|
1631
1793
|
}
|
|
1632
1794
|
|
|
1795
|
+
declare class StateProof {
|
|
1796
|
+
readonly proof: Uint8Array;
|
|
1797
|
+
readonly slot: bigint;
|
|
1798
|
+
constructor(params: {
|
|
1799
|
+
proof: Uint8Array;
|
|
1800
|
+
slot: bigint;
|
|
1801
|
+
});
|
|
1802
|
+
static fromProto(proto: StateProof$1): StateProof;
|
|
1803
|
+
}
|
|
1804
|
+
|
|
1633
1805
|
type GenerateStateProofOptions = {
|
|
1634
1806
|
address?: Pubkey$1;
|
|
1635
1807
|
proofType: StateProofType;
|
|
1636
1808
|
targetSlot: bigint;
|
|
1637
1809
|
};
|
|
1638
1810
|
|
|
1639
|
-
declare function generateStateProof(ctx: ThruClientContext, options: GenerateStateProofOptions): Promise<
|
|
1811
|
+
declare function generateStateProof(ctx: ThruClientContext, options: GenerateStateProofOptions): Promise<StateProof>;
|
|
1640
1812
|
|
|
1641
1813
|
declare const proofs_generateStateProof: typeof generateStateProof;
|
|
1642
1814
|
declare namespace proofs {
|
|
@@ -1654,38 +1826,55 @@ interface StreamBlocksOptions {
|
|
|
1654
1826
|
minConsensus?: ConsensusStatus;
|
|
1655
1827
|
signal?: AbortSignal;
|
|
1656
1828
|
}
|
|
1657
|
-
|
|
1829
|
+
interface StreamBlocksResult {
|
|
1830
|
+
block: Block;
|
|
1831
|
+
}
|
|
1832
|
+
declare function streamBlocks(ctx: ThruClientContext, options?: StreamBlocksOptions): AsyncIterable<StreamBlocksResult>;
|
|
1658
1833
|
interface StreamAccountUpdatesOptions {
|
|
1659
1834
|
view?: AccountView;
|
|
1660
1835
|
filter?: Filter;
|
|
1661
1836
|
signal?: AbortSignal;
|
|
1662
1837
|
}
|
|
1663
|
-
|
|
1838
|
+
interface StreamAccountUpdatesResult {
|
|
1839
|
+
update: StreamAccountUpdate;
|
|
1840
|
+
}
|
|
1841
|
+
declare function streamAccountUpdates(ctx: ThruClientContext, address: Pubkey$1, options?: StreamAccountUpdatesOptions): AsyncIterable<StreamAccountUpdatesResult>;
|
|
1664
1842
|
interface StreamTransactionsOptions {
|
|
1665
1843
|
filter?: Filter;
|
|
1666
1844
|
minConsensus?: ConsensusStatus;
|
|
1667
1845
|
signal?: AbortSignal;
|
|
1668
1846
|
}
|
|
1669
|
-
|
|
1847
|
+
interface StreamTransactionsResult {
|
|
1848
|
+
transaction: Transaction;
|
|
1849
|
+
}
|
|
1850
|
+
declare function streamTransactions(ctx: ThruClientContext, options?: StreamTransactionsOptions): AsyncIterable<StreamTransactionsResult>;
|
|
1670
1851
|
interface StreamEventsOptions {
|
|
1671
1852
|
filter?: Filter;
|
|
1672
1853
|
signal?: AbortSignal;
|
|
1673
1854
|
}
|
|
1674
|
-
|
|
1675
|
-
|
|
1855
|
+
interface StreamEventsResult {
|
|
1856
|
+
event: ChainEvent;
|
|
1857
|
+
}
|
|
1858
|
+
declare function streamEvents(ctx: ThruClientContext, options?: StreamEventsOptions): AsyncIterable<StreamEventsResult>;
|
|
1859
|
+
declare function trackTransaction(ctx: ThruClientContext, signature: BytesLike, options?: TrackTransactionOptions): AsyncIterable<TrackTransactionUpdate>;
|
|
1676
1860
|
|
|
1677
1861
|
type streaming_StreamAccountUpdatesOptions = StreamAccountUpdatesOptions;
|
|
1862
|
+
type streaming_StreamAccountUpdatesResult = StreamAccountUpdatesResult;
|
|
1678
1863
|
type streaming_StreamBlocksOptions = StreamBlocksOptions;
|
|
1864
|
+
type streaming_StreamBlocksResult = StreamBlocksResult;
|
|
1679
1865
|
type streaming_StreamEventsOptions = StreamEventsOptions;
|
|
1866
|
+
type streaming_StreamEventsResult = StreamEventsResult;
|
|
1680
1867
|
type streaming_StreamTransactionsOptions = StreamTransactionsOptions;
|
|
1868
|
+
type streaming_StreamTransactionsResult = StreamTransactionsResult;
|
|
1681
1869
|
type streaming_TrackTransactionOptions = TrackTransactionOptions;
|
|
1870
|
+
type streaming_TrackTransactionUpdate = TrackTransactionUpdate;
|
|
1682
1871
|
declare const streaming_streamAccountUpdates: typeof streamAccountUpdates;
|
|
1683
1872
|
declare const streaming_streamBlocks: typeof streamBlocks;
|
|
1684
1873
|
declare const streaming_streamEvents: typeof streamEvents;
|
|
1685
1874
|
declare const streaming_streamTransactions: typeof streamTransactions;
|
|
1686
1875
|
declare const streaming_trackTransaction: typeof trackTransaction;
|
|
1687
1876
|
declare namespace streaming {
|
|
1688
|
-
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 };
|
|
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 };
|
|
1689
1878
|
}
|
|
1690
1879
|
|
|
1691
1880
|
interface TransactionFeePayerConfig {
|
|
@@ -1738,18 +1927,23 @@ interface RawTransactionQueryOptions {
|
|
|
1738
1927
|
interface ListTransactionsForAccountOptions {
|
|
1739
1928
|
filter?: Filter;
|
|
1740
1929
|
page?: PageRequest;
|
|
1930
|
+
transactionOptions?: TransactionQueryOptions;
|
|
1931
|
+
}
|
|
1932
|
+
interface TransactionList {
|
|
1933
|
+
transactions: Transaction[];
|
|
1934
|
+
page?: PageResponse;
|
|
1741
1935
|
}
|
|
1742
1936
|
declare function getTransaction(ctx: ThruClientContext, signature: BytesLike, options?: TransactionQueryOptions): Promise<Transaction>;
|
|
1743
1937
|
declare function getRawTransaction(ctx: ThruClientContext, signature: BytesLike, options?: RawTransactionQueryOptions): Promise<RawTransaction>;
|
|
1744
|
-
declare function getTransactionStatus(ctx: ThruClientContext, signature: BytesLike): Promise<
|
|
1745
|
-
declare function listTransactionsForAccount(ctx: ThruClientContext, account: Pubkey$1, options?: ListTransactionsForAccountOptions): Promise<
|
|
1746
|
-
declare function buildTransaction(ctx: ThruClientContext, options: BuildTransactionOptions): Promise<Transaction
|
|
1938
|
+
declare function getTransactionStatus(ctx: ThruClientContext, signature: BytesLike): Promise<TransactionStatusSnapshot>;
|
|
1939
|
+
declare function listTransactionsForAccount(ctx: ThruClientContext, account: Pubkey$1, options?: ListTransactionsForAccountOptions): Promise<TransactionList>;
|
|
1940
|
+
declare function buildTransaction(ctx: ThruClientContext, options: BuildTransactionOptions): Promise<Transaction>;
|
|
1747
1941
|
declare function buildAndSignTransaction(ctx: ThruClientContext, options: BuildAndSignTransactionOptions): Promise<SignedTransactionResult>;
|
|
1748
|
-
declare function sendTransaction(ctx: ThruClientContext, transaction: Transaction
|
|
1942
|
+
declare function sendTransaction(ctx: ThruClientContext, transaction: Transaction | Uint8Array): Promise<string>;
|
|
1749
1943
|
interface BatchSendTransactionsOptions {
|
|
1750
1944
|
numRetries?: number;
|
|
1751
1945
|
}
|
|
1752
|
-
declare function batchSendTransactions(ctx: ThruClientContext, transactions: (Transaction
|
|
1946
|
+
declare function batchSendTransactions(ctx: ThruClientContext, transactions: (Transaction | Uint8Array)[], options?: BatchSendTransactionsOptions): Promise<BatchSendTransactionsResponse>;
|
|
1753
1947
|
|
|
1754
1948
|
type transactions_BatchSendTransactionsOptions = BatchSendTransactionsOptions;
|
|
1755
1949
|
type transactions_BuildAndSignTransactionOptions = BuildAndSignTransactionOptions;
|
|
@@ -1760,6 +1954,7 @@ type transactions_RawTransactionQueryOptions = RawTransactionQueryOptions;
|
|
|
1760
1954
|
type transactions_TransactionAccountsConfig = TransactionAccountsConfig;
|
|
1761
1955
|
type transactions_TransactionFeePayerConfig = TransactionFeePayerConfig;
|
|
1762
1956
|
type transactions_TransactionHeaderConfig = TransactionHeaderConfig;
|
|
1957
|
+
type transactions_TransactionList = TransactionList;
|
|
1763
1958
|
type transactions_TransactionQueryOptions = TransactionQueryOptions;
|
|
1764
1959
|
declare const transactions_batchSendTransactions: typeof batchSendTransactions;
|
|
1765
1960
|
declare const transactions_buildAndSignTransaction: typeof buildAndSignTransaction;
|
|
@@ -1770,7 +1965,14 @@ declare const transactions_getTransactionStatus: typeof getTransactionStatus;
|
|
|
1770
1965
|
declare const transactions_listTransactionsForAccount: typeof listTransactionsForAccount;
|
|
1771
1966
|
declare const transactions_sendTransaction: typeof sendTransaction;
|
|
1772
1967
|
declare namespace transactions {
|
|
1773
|
-
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 };
|
|
1968
|
+
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_TransactionList as TransactionList, 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 };
|
|
1969
|
+
}
|
|
1970
|
+
|
|
1971
|
+
declare class VersionInfo {
|
|
1972
|
+
readonly components: Record<string, string>;
|
|
1973
|
+
constructor(components: Record<string, string>);
|
|
1974
|
+
static fromProto(proto: GetVersionResponse): VersionInfo;
|
|
1975
|
+
get(component: string): string | undefined;
|
|
1774
1976
|
}
|
|
1775
1977
|
|
|
1776
|
-
export {
|
|
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 };
|