@thru/thru-sdk 0.0.4

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.
Files changed (63) hide show
  1. package/README.md +7 -0
  2. package/buf.gen.yaml +12 -0
  3. package/buf.lock +9 -0
  4. package/buf.yaml +15 -0
  5. package/dist/sdk.d.ts +1354 -0
  6. package/dist/sdk.js +1130 -0
  7. package/dist/sdk.js.map +1 -0
  8. package/package.json +39 -0
  9. package/proto/thru/common/v1/consensus.proto +75 -0
  10. package/proto/thru/common/v1/errors.proto +67 -0
  11. package/proto/thru/common/v1/filters.proto +50 -0
  12. package/proto/thru/common/v1/pagination.proto +47 -0
  13. package/proto/thru/core/v1/account.proto +138 -0
  14. package/proto/thru/core/v1/block.proto +82 -0
  15. package/proto/thru/core/v1/state.proto +37 -0
  16. package/proto/thru/core/v1/transaction.proto +95 -0
  17. package/proto/thru/core/v1/types.proto +52 -0
  18. package/proto/thru/services/v1/command_service.proto +45 -0
  19. package/proto/thru/services/v1/query_service.proto +344 -0
  20. package/proto/thru/services/v1/streaming_service.proto +128 -0
  21. package/thru-ts-client-sdk/core/bound-client.ts +129 -0
  22. package/thru-ts-client-sdk/core/client.ts +38 -0
  23. package/thru-ts-client-sdk/counter.ts +216 -0
  24. package/thru-ts-client-sdk/create-account.ts +78 -0
  25. package/thru-ts-client-sdk/defaults.ts +17 -0
  26. package/thru-ts-client-sdk/get-height.ts +52 -0
  27. package/thru-ts-client-sdk/modules/accounts.ts +137 -0
  28. package/thru-ts-client-sdk/modules/blocks.ts +75 -0
  29. package/thru-ts-client-sdk/modules/events.ts +20 -0
  30. package/thru-ts-client-sdk/modules/height.ts +9 -0
  31. package/thru-ts-client-sdk/modules/helpers.ts +340 -0
  32. package/thru-ts-client-sdk/modules/proofs.ts +20 -0
  33. package/thru-ts-client-sdk/modules/streaming.ts +34 -0
  34. package/thru-ts-client-sdk/modules/transactions.ts +274 -0
  35. package/thru-ts-client-sdk/proto/buf/validate/validate_pb.ts +4761 -0
  36. package/thru-ts-client-sdk/proto/google/api/annotations_pb.ts +39 -0
  37. package/thru-ts-client-sdk/proto/google/api/client_pb.ts +953 -0
  38. package/thru-ts-client-sdk/proto/google/api/field_behavior_pb.ts +157 -0
  39. package/thru-ts-client-sdk/proto/google/api/http_pb.ts +474 -0
  40. package/thru-ts-client-sdk/proto/google/api/launch_stage_pb.ts +118 -0
  41. package/thru-ts-client-sdk/proto/thru/common/v1/consensus_pb.ts +163 -0
  42. package/thru-ts-client-sdk/proto/thru/common/v1/errors_pb.ts +130 -0
  43. package/thru-ts-client-sdk/proto/thru/common/v1/filters_pb.ts +81 -0
  44. package/thru-ts-client-sdk/proto/thru/common/v1/pagination_pb.ts +80 -0
  45. package/thru-ts-client-sdk/proto/thru/core/v1/account_pb.ts +358 -0
  46. package/thru-ts-client-sdk/proto/thru/core/v1/block_pb.ts +260 -0
  47. package/thru-ts-client-sdk/proto/thru/core/v1/state_pb.ts +104 -0
  48. package/thru-ts-client-sdk/proto/thru/core/v1/transaction_pb.ts +327 -0
  49. package/thru-ts-client-sdk/proto/thru/core/v1/types_pb.ts +101 -0
  50. package/thru-ts-client-sdk/proto/thru/services/v1/command_service_pb.ts +81 -0
  51. package/thru-ts-client-sdk/proto/thru/services/v1/query_service_pb.ts +813 -0
  52. package/thru-ts-client-sdk/proto/thru/services/v1/streaming_service_pb.ts +391 -0
  53. package/thru-ts-client-sdk/sdk.ts +58 -0
  54. package/thru-ts-client-sdk/transactions/Transaction.ts +240 -0
  55. package/thru-ts-client-sdk/transactions/TransactionBuilder.ts +48 -0
  56. package/thru-ts-client-sdk/transactions/__tests__/transaction.test.ts +95 -0
  57. package/thru-ts-client-sdk/transactions/index.ts +3 -0
  58. package/thru-ts-client-sdk/transactions/types.ts +64 -0
  59. package/thru-ts-client-sdk/transactions/utils.ts +134 -0
  60. package/thru-ts-client-sdk/types/types.ts +8 -0
  61. package/thru-ts-client-sdk/utils/utils.ts +70 -0
  62. package/tsconfig.json +9 -0
  63. package/tsup.config.ts +10 -0
@@ -0,0 +1,358 @@
1
+ // @generated by protoc-gen-es v2.9.0 with parameter "target=ts"
2
+ // @generated from file thru/core/v1/account.proto (package thru.core.v1, edition 2023)
3
+ // option features.field_presence = EXPLICIT;
4
+ /* eslint-disable */
5
+
6
+ import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
7
+ import { enumDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
8
+ import { file_buf_validate_validate } from "../../../buf/validate/validate_pb";
9
+ import { file_google_api_field_behavior } from "../../../google/api/field_behavior_pb";
10
+ import type { Timestamp } from "@bufbuild/protobuf/wkt";
11
+ import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
12
+ import type { ConsensusStatus } from "../../common/v1/consensus_pb";
13
+ import { file_thru_common_v1_consensus } from "../../common/v1/consensus_pb";
14
+ import type { Pubkey } from "./types_pb";
15
+ import { file_thru_core_v1_types } from "./types_pb";
16
+ import type { Message } from "@bufbuild/protobuf";
17
+
18
+ /**
19
+ * Describes the file thru/core/v1/account.proto.
20
+ */
21
+ export const file_thru_core_v1_account: GenFile = /*@__PURE__*/
22
+ fileDesc("Chp0aHJ1L2NvcmUvdjEvYWNjb3VudC5wcm90bxIMdGhydS5jb3JlLnYxIsgBCgxBY2NvdW50RmxhZ3MSFwoKaXNfcHJvZ3JhbRgBIAEoCEID4EEBEhoKDWlzX3ByaXZpbGVnZWQYAiABKAhCA+BBARIeChFpc191bmNvbXByZXNzYWJsZRgDIAEoCEID4EEBEhkKDGlzX2VwaGVtZXJhbBgEIAEoCEID4EEBEhcKCmlzX2RlbGV0ZWQYBSABKAhCA+BBARITCgZpc19uZXcYBiABKAhCA+BBARIaCg1pc19jb21wcmVzc2VkGAcgASgIQgPgQQEi4gEKC0FjY291bnRNZXRhEhsKB3ZlcnNpb24YASABKA1CCuBBArpIBCoCKAESLgoFZmxhZ3MYAiABKAsyGi50aHJ1LmNvcmUudjEuQWN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VzX3N0YXR1cxgFIAEoDjIfLnRocnUuY29tbW9uLnYxLkNvbnNlbnN1c1N0YXR1c0ID4EEBIrwBCgpSYXdBY2NvdW50EioKB2FkZHJlc3MYASABKAsyFC50aHJ1LmNvcmUudjEuUHVia2V5QgPgQQISHQoIcmF3X21ldGEYAiABKAxCC+BBArpIBXoDGIAgEh8KCHJhd19kYXRhGAMgASgMQg3gQQG6SAd6BRiAgIAIEkIKD3ZlcnNpb25fY29udGV4dBgEIAEoCzIkLnRocnUuY29yZS52MS5WZXJzaW9uQ29udGV4dE1ldGFkYXRhQgPgQQEqmAEKC0FjY291bnRWaWV3EhwKGEFDQ09VTlRfVklFV19VTlNQRUNJRklFRBAAEhwKGEFDQ09VTlRfVklFV19QVUJLRVlfT05MWRABEhoKFkFDQ09VTlRfVklFV19NRVRBX09OTFkQAhIaChZBQ0NPVU5UX1ZJRVdfREFUQV9PTkxZEAMSFQoRQUNDT1VOVF9WSUVXX0ZVTEwQBELAAQoQY29tLnRocnUuY29yZS52MUIMQWNjb3VudFByb3RvUAFaQGdpdGh1Yi5jb20vVW50by1MYWJzL3RocnUtbmV0L2dycGMvcGtnL3Byb3RvL3RocnUvY29yZS92MTtjb3JldjGiAgNUQ1iqAgxUaHJ1LkNvcmUuVjG6AgRUSFVDygIMVGhydVxDb3JlXFYx4gIYVGhydVxDb3JlXFYxXEdQQk1ldGFkYXRh6gIOVGhydTo6Q29yZTo6VjGSAwIIAWIIZWRpdGlvbnNw6Ac", [file_buf_validate_validate, file_google_api_field_behavior, file_google_protobuf_timestamp, file_thru_common_v1_consensus, file_thru_core_v1_types]);
23
+
24
+ /**
25
+ * AccountFlags enumerates boolean account capability flags.
26
+ *
27
+ * @generated from message thru.core.v1.AccountFlags
28
+ */
29
+ export type AccountFlags = Message<"thru.core.v1.AccountFlags"> & {
30
+ /**
31
+ * @generated from field: bool is_program = 1;
32
+ */
33
+ isProgram: boolean;
34
+
35
+ /**
36
+ * @generated from field: bool is_privileged = 2;
37
+ */
38
+ isPrivileged: boolean;
39
+
40
+ /**
41
+ * @generated from field: bool is_uncompressable = 3;
42
+ */
43
+ isUncompressable: boolean;
44
+
45
+ /**
46
+ * @generated from field: bool is_ephemeral = 4;
47
+ */
48
+ isEphemeral: boolean;
49
+
50
+ /**
51
+ * @generated from field: bool is_deleted = 5;
52
+ */
53
+ isDeleted: boolean;
54
+
55
+ /**
56
+ * @generated from field: bool is_new = 6;
57
+ */
58
+ isNew: boolean;
59
+
60
+ /**
61
+ * @generated from field: bool is_compressed = 7;
62
+ */
63
+ isCompressed: boolean;
64
+ };
65
+
66
+ /**
67
+ * Describes the message thru.core.v1.AccountFlags.
68
+ * Use `create(AccountFlagsSchema)` to create a new message.
69
+ */
70
+ export const AccountFlagsSchema: GenMessage<AccountFlags> = /*@__PURE__*/
71
+ messageDesc(file_thru_core_v1_account, 0);
72
+
73
+ /**
74
+ * AccountMeta captures metadata associated with an account.
75
+ *
76
+ * @generated from message thru.core.v1.AccountMeta
77
+ */
78
+ export type AccountMeta = Message<"thru.core.v1.AccountMeta"> & {
79
+ /**
80
+ * @generated from field: uint32 version = 1;
81
+ */
82
+ version: number;
83
+
84
+ /**
85
+ * @generated from field: thru.core.v1.AccountFlags flags = 2;
86
+ */
87
+ flags?: AccountFlags;
88
+
89
+ /**
90
+ * @generated from field: uint32 data_size = 3;
91
+ */
92
+ dataSize: number;
93
+
94
+ /**
95
+ * @generated from field: uint64 state_counter = 4;
96
+ */
97
+ stateCounter: bigint;
98
+
99
+ /**
100
+ * @generated from field: thru.core.v1.Pubkey owner = 5;
101
+ */
102
+ owner?: Pubkey;
103
+
104
+ /**
105
+ * @generated from field: uint64 balance = 6;
106
+ */
107
+ balance: bigint;
108
+
109
+ /**
110
+ * @generated from field: uint64 nonce = 7;
111
+ */
112
+ nonce: bigint;
113
+ };
114
+
115
+ /**
116
+ * Describes the message thru.core.v1.AccountMeta.
117
+ * Use `create(AccountMetaSchema)` to create a new message.
118
+ */
119
+ export const AccountMetaSchema: GenMessage<AccountMeta> = /*@__PURE__*/
120
+ messageDesc(file_thru_core_v1_account, 1);
121
+
122
+ /**
123
+ * AccountData contains account data payloads.
124
+ *
125
+ * @generated from message thru.core.v1.AccountData
126
+ */
127
+ export type AccountData = Message<"thru.core.v1.AccountData"> & {
128
+ /**
129
+ * @generated from field: bytes data = 1;
130
+ */
131
+ data: Uint8Array;
132
+
133
+ /**
134
+ * @generated from field: bool compressed = 2;
135
+ */
136
+ compressed: boolean;
137
+
138
+ /**
139
+ * @generated from field: string compression_algorithm = 3;
140
+ */
141
+ compressionAlgorithm: string;
142
+ };
143
+
144
+ /**
145
+ * Describes the message thru.core.v1.AccountData.
146
+ * Use `create(AccountDataSchema)` to create a new message.
147
+ */
148
+ export const AccountDataSchema: GenMessage<AccountData> = /*@__PURE__*/
149
+ messageDesc(file_thru_core_v1_account, 2);
150
+
151
+ /**
152
+ * DataSlice describes a contiguous range of account data to return.
153
+ *
154
+ * @generated from message thru.core.v1.DataSlice
155
+ */
156
+ export type DataSlice = Message<"thru.core.v1.DataSlice"> & {
157
+ /**
158
+ * @generated from field: uint32 offset = 1;
159
+ */
160
+ offset: number;
161
+
162
+ /**
163
+ * @generated from field: uint32 length = 2;
164
+ */
165
+ length: number;
166
+ };
167
+
168
+ /**
169
+ * Describes the message thru.core.v1.DataSlice.
170
+ * Use `create(DataSliceSchema)` to create a new message.
171
+ */
172
+ export const DataSliceSchema: GenMessage<DataSlice> = /*@__PURE__*/
173
+ messageDesc(file_thru_core_v1_account, 3);
174
+
175
+ /**
176
+ * AccountPage represents a 4KB chunk for streaming account data.
177
+ *
178
+ * @generated from message thru.core.v1.AccountPage
179
+ */
180
+ export type AccountPage = Message<"thru.core.v1.AccountPage"> & {
181
+ /**
182
+ * @generated from field: uint32 page_idx = 1;
183
+ */
184
+ pageIdx: number;
185
+
186
+ /**
187
+ * @generated from field: uint32 page_size = 2;
188
+ */
189
+ pageSize: number;
190
+
191
+ /**
192
+ * @generated from field: bytes page_data = 3;
193
+ */
194
+ pageData: Uint8Array;
195
+
196
+ /**
197
+ * @generated from field: bool compressed = 4;
198
+ */
199
+ compressed: boolean;
200
+
201
+ /**
202
+ * @generated from field: string compression_algorithm = 5;
203
+ */
204
+ compressionAlgorithm: string;
205
+ };
206
+
207
+ /**
208
+ * Describes the message thru.core.v1.AccountPage.
209
+ * Use `create(AccountPageSchema)` to create a new message.
210
+ */
211
+ export const AccountPageSchema: GenMessage<AccountPage> = /*@__PURE__*/
212
+ messageDesc(file_thru_core_v1_account, 4);
213
+
214
+ /**
215
+ * VersionContextMetadata captures context for a returned account state.
216
+ *
217
+ * @generated from message thru.core.v1.VersionContextMetadata
218
+ */
219
+ export type VersionContextMetadata = Message<"thru.core.v1.VersionContextMetadata"> & {
220
+ /**
221
+ * @generated from field: uint64 slot = 1;
222
+ */
223
+ slot: bigint;
224
+
225
+ /**
226
+ * @generated from field: google.protobuf.Timestamp block_timestamp = 2;
227
+ */
228
+ blockTimestamp?: Timestamp;
229
+ };
230
+
231
+ /**
232
+ * Describes the message thru.core.v1.VersionContextMetadata.
233
+ * Use `create(VersionContextMetadataSchema)` to create a new message.
234
+ */
235
+ export const VersionContextMetadataSchema: GenMessage<VersionContextMetadata> = /*@__PURE__*/
236
+ messageDesc(file_thru_core_v1_account, 5);
237
+
238
+ /**
239
+ * Account models a fully decoded account resource.
240
+ *
241
+ * @generated from message thru.core.v1.Account
242
+ */
243
+ export type Account = Message<"thru.core.v1.Account"> & {
244
+ /**
245
+ * @generated from field: thru.core.v1.Pubkey address = 1;
246
+ */
247
+ address?: Pubkey;
248
+
249
+ /**
250
+ * @generated from field: thru.core.v1.AccountMeta meta = 2;
251
+ */
252
+ meta?: AccountMeta;
253
+
254
+ /**
255
+ * @generated from field: thru.core.v1.AccountData data = 3;
256
+ */
257
+ data?: AccountData;
258
+
259
+ /**
260
+ * @generated from field: thru.core.v1.VersionContextMetadata version_context = 4;
261
+ */
262
+ versionContext?: VersionContextMetadata;
263
+
264
+ /**
265
+ * @generated from field: thru.common.v1.ConsensusStatus consensus_status = 5;
266
+ */
267
+ consensusStatus: ConsensusStatus;
268
+ };
269
+
270
+ /**
271
+ * Describes the message thru.core.v1.Account.
272
+ * Use `create(AccountSchema)` to create a new message.
273
+ */
274
+ export const AccountSchema: GenMessage<Account> = /*@__PURE__*/
275
+ messageDesc(file_thru_core_v1_account, 6);
276
+
277
+ /**
278
+ * RawAccount captures raw serialized account bytes.
279
+ *
280
+ * @generated from message thru.core.v1.RawAccount
281
+ */
282
+ export type RawAccount = Message<"thru.core.v1.RawAccount"> & {
283
+ /**
284
+ * @generated from field: thru.core.v1.Pubkey address = 1;
285
+ */
286
+ address?: Pubkey;
287
+
288
+ /**
289
+ * @generated from field: bytes raw_meta = 2;
290
+ */
291
+ rawMeta: Uint8Array;
292
+
293
+ /**
294
+ * @generated from field: bytes raw_data = 3;
295
+ */
296
+ rawData: Uint8Array;
297
+
298
+ /**
299
+ * @generated from field: thru.core.v1.VersionContextMetadata version_context = 4;
300
+ */
301
+ versionContext?: VersionContextMetadata;
302
+ };
303
+
304
+ /**
305
+ * Describes the message thru.core.v1.RawAccount.
306
+ * Use `create(RawAccountSchema)` to create a new message.
307
+ */
308
+ export const RawAccountSchema: GenMessage<RawAccount> = /*@__PURE__*/
309
+ messageDesc(file_thru_core_v1_account, 7);
310
+
311
+ /**
312
+ * AccountView controls which sections of account resources are returned.
313
+ *
314
+ * @generated from enum thru.core.v1.AccountView
315
+ */
316
+ export enum AccountView {
317
+ /**
318
+ * ACCOUNT_VIEW_UNSPECIFIED uses service defaults.
319
+ *
320
+ * @generated from enum value: ACCOUNT_VIEW_UNSPECIFIED = 0;
321
+ */
322
+ UNSPECIFIED = 0,
323
+
324
+ /**
325
+ * ACCOUNT_VIEW_PUBKEY_ONLY returns only the account address.
326
+ *
327
+ * @generated from enum value: ACCOUNT_VIEW_PUBKEY_ONLY = 1;
328
+ */
329
+ PUBKEY_ONLY = 1,
330
+
331
+ /**
332
+ * ACCOUNT_VIEW_META_ONLY returns only account metadata.
333
+ *
334
+ * @generated from enum value: ACCOUNT_VIEW_META_ONLY = 2;
335
+ */
336
+ META_ONLY = 2,
337
+
338
+ /**
339
+ * ACCOUNT_VIEW_DATA_ONLY returns only account data.
340
+ *
341
+ * @generated from enum value: ACCOUNT_VIEW_DATA_ONLY = 3;
342
+ */
343
+ DATA_ONLY = 3,
344
+
345
+ /**
346
+ * ACCOUNT_VIEW_FULL returns address, metadata, and data.
347
+ *
348
+ * @generated from enum value: ACCOUNT_VIEW_FULL = 4;
349
+ */
350
+ FULL = 4,
351
+ }
352
+
353
+ /**
354
+ * Describes the enum thru.core.v1.AccountView.
355
+ */
356
+ export const AccountViewSchema: GenEnum<AccountView> = /*@__PURE__*/
357
+ enumDesc(file_thru_core_v1_account, 0);
358
+
@@ -0,0 +1,260 @@
1
+ // @generated by protoc-gen-es v2.9.0 with parameter "target=ts"
2
+ // @generated from file thru/core/v1/block.proto (package thru.core.v1, edition 2023)
3
+ // option features.field_presence = EXPLICIT;
4
+ /* eslint-disable */
5
+
6
+ import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
7
+ import { enumDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
8
+ import { file_buf_validate_validate } from "../../../buf/validate/validate_pb";
9
+ import { file_google_api_field_behavior } from "../../../google/api/field_behavior_pb";
10
+ import type { Timestamp } from "@bufbuild/protobuf/wkt";
11
+ import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
12
+ import type { ConsensusStatus } from "../../common/v1/consensus_pb";
13
+ import { file_thru_common_v1_consensus } from "../../common/v1/consensus_pb";
14
+ import type { BlockHash, Pubkey, Signature } from "./types_pb";
15
+ import { file_thru_core_v1_types } from "./types_pb";
16
+ import type { Message } from "@bufbuild/protobuf";
17
+
18
+ /**
19
+ * Describes the file thru/core/v1/block.proto.
20
+ */
21
+ export const file_thru_core_v1_block: GenFile = /*@__PURE__*/
22
+ fileDesc("Chh0aHJ1L2N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UuY29tbW9uLnYxLkNvbnNlbnN1c1N0YXR1c0ID4EEBIj8KCFJhd0Jsb2NrEhEKBHNsb3QYASABKARCA+BBAhIgCglyYXdfYmxvY2sYAiABKAxCDeBBArpIB3oFGICAgBAqlAEKCUJsb2NrVmlldxIaChZCTE9DS19WSUVXX1VOU1BFQ0lGSUVEEAASGgoWQkxPQ0tfVklFV19IRUFERVJfT05MWRABEiAKHEJMT0NLX1ZJRVdfSEVBREVSX0FORF9GT09URVIQAhIYChRCTE9DS19WSUVXX0JPRFlfT05MWRADEhMKD0JMT0NLX1ZJRVdfRlVMTBAEKo0BCg9FeGVjdXRpb25TdGF0dXMSIAocRVhFQ1VUSU9OX1NUQVRVU19VTlNQRUNJRklFRBAAEhwKGEVYRUNVVElPTl9TVEFUVVNfUEVORElORxABEh0KGUVYRUNVVElPTl9TVEFUVVNfRVhFQ1VURUQQAhIbChdFWEVDVVRJT05fU1RBVFVTX0ZBSUxFRBADQr4BChBjb20udGhydS5jb3JlLnYxQgpCbG9ja1Byb3RvUAFaQGdpdGh1Yi5jb20vVW50by1MYWJzL3RocnUtbmV0L2dycGMvcGtnL3Byb3RvL3RocnUvY29yZS92MTtjb3JldjGiAgNUQ1iqAgxUaHJ1LkNvcmUuVjG6AgRUSFVDygIMVGhydVxDb3JlXFYx4gIYVGhydVxDb3JlXFYxXEdQQk1ldGFkYXRh6gIOVGhydTo6Q29yZTo6VjGSAwIIAWIIZWRpdGlvbnNw6Ac", [file_buf_validate_validate, file_google_api_field_behavior, file_google_protobuf_timestamp, file_thru_common_v1_consensus, file_thru_core_v1_types]);
23
+
24
+ /**
25
+ * BlockHeader describes metadata about a block.
26
+ *
27
+ * @generated from message thru.core.v1.BlockHeader
28
+ */
29
+ export type BlockHeader = Message<"thru.core.v1.BlockHeader"> & {
30
+ /**
31
+ * @generated from field: uint64 slot = 1;
32
+ */
33
+ slot: bigint;
34
+
35
+ /**
36
+ * @generated from field: thru.core.v1.BlockHash block_hash = 2;
37
+ */
38
+ blockHash?: BlockHash;
39
+
40
+ /**
41
+ * @generated from field: thru.core.v1.Signature header_signature = 3;
42
+ */
43
+ headerSignature?: Signature;
44
+
45
+ /**
46
+ * @generated from field: uint32 version = 4;
47
+ */
48
+ version: number;
49
+
50
+ /**
51
+ * @generated from field: thru.core.v1.Pubkey producer = 5;
52
+ */
53
+ producer?: Pubkey;
54
+
55
+ /**
56
+ * @generated from field: google.protobuf.Timestamp expiry_timestamp = 6;
57
+ */
58
+ expiryTimestamp?: Timestamp;
59
+
60
+ /**
61
+ * @generated from field: uint64 start_slot = 7;
62
+ */
63
+ startSlot: bigint;
64
+
65
+ /**
66
+ * @generated from field: uint32 expiry_after = 8;
67
+ */
68
+ expiryAfter: number;
69
+
70
+ /**
71
+ * @generated from field: uint32 max_block_size = 9;
72
+ */
73
+ maxBlockSize: number;
74
+
75
+ /**
76
+ * @generated from field: uint64 max_compute_units = 10;
77
+ */
78
+ maxComputeUnits: bigint;
79
+
80
+ /**
81
+ * @generated from field: uint32 max_state_units = 11;
82
+ */
83
+ maxStateUnits: number;
84
+
85
+ /**
86
+ * @generated from field: uint64 price = 12;
87
+ */
88
+ price: bigint;
89
+ };
90
+
91
+ /**
92
+ * Describes the message thru.core.v1.BlockHeader.
93
+ * Use `create(BlockHeaderSchema)` to create a new message.
94
+ */
95
+ export const BlockHeaderSchema: GenMessage<BlockHeader> = /*@__PURE__*/
96
+ messageDesc(file_thru_core_v1_block, 0);
97
+
98
+ /**
99
+ * BlockFooter captures execution result metadata for a block.
100
+ *
101
+ * @generated from message thru.core.v1.BlockFooter
102
+ */
103
+ export type BlockFooter = Message<"thru.core.v1.BlockFooter"> & {
104
+ /**
105
+ * @generated from field: thru.core.v1.Signature signature = 1;
106
+ */
107
+ signature?: Signature;
108
+
109
+ /**
110
+ * @generated from field: thru.core.v1.ExecutionStatus status = 2;
111
+ */
112
+ status: ExecutionStatus;
113
+
114
+ /**
115
+ * @generated from field: uint64 consumed_compute_units = 3;
116
+ */
117
+ consumedComputeUnits: bigint;
118
+
119
+ /**
120
+ * @generated from field: uint32 consumed_state_units = 4;
121
+ */
122
+ consumedStateUnits: number;
123
+ };
124
+
125
+ /**
126
+ * Describes the message thru.core.v1.BlockFooter.
127
+ * Use `create(BlockFooterSchema)` to create a new message.
128
+ */
129
+ export const BlockFooterSchema: GenMessage<BlockFooter> = /*@__PURE__*/
130
+ messageDesc(file_thru_core_v1_block, 1);
131
+
132
+ /**
133
+ * Block represents a fully decoded block resource.
134
+ *
135
+ * @generated from message thru.core.v1.Block
136
+ */
137
+ export type Block = Message<"thru.core.v1.Block"> & {
138
+ /**
139
+ * @generated from field: thru.core.v1.BlockHeader header = 1;
140
+ */
141
+ header?: BlockHeader;
142
+
143
+ /**
144
+ * @generated from field: thru.core.v1.BlockFooter footer = 2;
145
+ */
146
+ footer?: BlockFooter;
147
+
148
+ /**
149
+ * @generated from field: bytes body = 3;
150
+ */
151
+ body: Uint8Array;
152
+
153
+ /**
154
+ * @generated from field: thru.common.v1.ConsensusStatus consensus_status = 4;
155
+ */
156
+ consensusStatus: ConsensusStatus;
157
+ };
158
+
159
+ /**
160
+ * Describes the message thru.core.v1.Block.
161
+ * Use `create(BlockSchema)` to create a new message.
162
+ */
163
+ export const BlockSchema: GenMessage<Block> = /*@__PURE__*/
164
+ messageDesc(file_thru_core_v1_block, 2);
165
+
166
+ /**
167
+ * RawBlock captures raw block bytes for direct access.
168
+ *
169
+ * @generated from message thru.core.v1.RawBlock
170
+ */
171
+ export type RawBlock = Message<"thru.core.v1.RawBlock"> & {
172
+ /**
173
+ * @generated from field: uint64 slot = 1;
174
+ */
175
+ slot: bigint;
176
+
177
+ /**
178
+ * @generated from field: bytes raw_block = 2;
179
+ */
180
+ rawBlock: Uint8Array;
181
+ };
182
+
183
+ /**
184
+ * Describes the message thru.core.v1.RawBlock.
185
+ * Use `create(RawBlockSchema)` to create a new message.
186
+ */
187
+ export const RawBlockSchema: GenMessage<RawBlock> = /*@__PURE__*/
188
+ messageDesc(file_thru_core_v1_block, 3);
189
+
190
+ /**
191
+ * BlockView controls how much of a block resource is returned.
192
+ *
193
+ * @generated from enum thru.core.v1.BlockView
194
+ */
195
+ export enum BlockView {
196
+ /**
197
+ * @generated from enum value: BLOCK_VIEW_UNSPECIFIED = 0;
198
+ */
199
+ UNSPECIFIED = 0,
200
+
201
+ /**
202
+ * @generated from enum value: BLOCK_VIEW_HEADER_ONLY = 1;
203
+ */
204
+ HEADER_ONLY = 1,
205
+
206
+ /**
207
+ * @generated from enum value: BLOCK_VIEW_HEADER_AND_FOOTER = 2;
208
+ */
209
+ HEADER_AND_FOOTER = 2,
210
+
211
+ /**
212
+ * @generated from enum value: BLOCK_VIEW_BODY_ONLY = 3;
213
+ */
214
+ BODY_ONLY = 3,
215
+
216
+ /**
217
+ * @generated from enum value: BLOCK_VIEW_FULL = 4;
218
+ */
219
+ FULL = 4,
220
+ }
221
+
222
+ /**
223
+ * Describes the enum thru.core.v1.BlockView.
224
+ */
225
+ export const BlockViewSchema: GenEnum<BlockView> = /*@__PURE__*/
226
+ enumDesc(file_thru_core_v1_block, 0);
227
+
228
+ /**
229
+ * ExecutionStatus enumerates block execution results.
230
+ *
231
+ * @generated from enum thru.core.v1.ExecutionStatus
232
+ */
233
+ export enum ExecutionStatus {
234
+ /**
235
+ * @generated from enum value: EXECUTION_STATUS_UNSPECIFIED = 0;
236
+ */
237
+ UNSPECIFIED = 0,
238
+
239
+ /**
240
+ * @generated from enum value: EXECUTION_STATUS_PENDING = 1;
241
+ */
242
+ PENDING = 1,
243
+
244
+ /**
245
+ * @generated from enum value: EXECUTION_STATUS_EXECUTED = 2;
246
+ */
247
+ EXECUTED = 2,
248
+
249
+ /**
250
+ * @generated from enum value: EXECUTION_STATUS_FAILED = 3;
251
+ */
252
+ FAILED = 3,
253
+ }
254
+
255
+ /**
256
+ * Describes the enum thru.core.v1.ExecutionStatus.
257
+ */
258
+ export const ExecutionStatusSchema: GenEnum<ExecutionStatus> = /*@__PURE__*/
259
+ enumDesc(file_thru_core_v1_block, 1);
260
+