@thru/thru-sdk 0.1.19 → 0.1.21

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 (88) hide show
  1. package/README.md +19 -0
  2. package/dist/{chunk-PH7P5EEU.js → chunk-SHMREHP5.js} +13 -9
  3. package/dist/chunk-SHMREHP5.js.map +1 -0
  4. package/dist/client.d.ts +2 -1
  5. package/dist/client.js +3 -2
  6. package/dist/client.js.map +1 -1
  7. package/dist/metafile-esm.json +1 -1
  8. package/dist/sdk.d.ts +3 -3
  9. package/dist/sdk.js +1 -1
  10. package/dist/{transactions-BzD9hYlc.d.ts → transactions-CLezIeXO.d.ts} +20 -18
  11. package/package.json +7 -3
  12. package/buf.gen.yaml +0 -12
  13. package/buf.lock +0 -9
  14. package/buf.yaml +0 -15
  15. package/dist/chunk-PH7P5EEU.js.map +0 -1
  16. package/proto/thru/common/v1/consensus.proto +0 -73
  17. package/proto/thru/common/v1/errors.proto +0 -65
  18. package/proto/thru/common/v1/filters.proto +0 -60
  19. package/proto/thru/common/v1/pagination.proto +0 -45
  20. package/proto/thru/core/v1/account.proto +0 -137
  21. package/proto/thru/core/v1/block.proto +0 -80
  22. package/proto/thru/core/v1/state.proto +0 -35
  23. package/proto/thru/core/v1/transaction.proto +0 -136
  24. package/proto/thru/core/v1/types.proto +0 -50
  25. package/proto/thru/services/v1/command_service.proto +0 -70
  26. package/proto/thru/services/v1/query_service.proto +0 -344
  27. package/proto/thru/services/v1/streaming_service.proto +0 -126
  28. package/thru-ts-client-sdk/__tests__/helpers/test-utils.ts +0 -228
  29. package/thru-ts-client-sdk/client.ts +0 -10
  30. package/thru-ts-client-sdk/core/__tests__/bound-client.test.ts +0 -354
  31. package/thru-ts-client-sdk/core/__tests__/client.test.ts +0 -53
  32. package/thru-ts-client-sdk/core/bound-client.ts +0 -156
  33. package/thru-ts-client-sdk/core/client.ts +0 -38
  34. package/thru-ts-client-sdk/defaults.ts +0 -26
  35. package/thru-ts-client-sdk/modules/__tests__/accounts.test.ts +0 -406
  36. package/thru-ts-client-sdk/modules/__tests__/blocks.test.ts +0 -199
  37. package/thru-ts-client-sdk/modules/__tests__/events.test.ts +0 -74
  38. package/thru-ts-client-sdk/modules/__tests__/height.test.ts +0 -39
  39. package/thru-ts-client-sdk/modules/__tests__/helpers.test.ts +0 -288
  40. package/thru-ts-client-sdk/modules/__tests__/keys.test.ts +0 -55
  41. package/thru-ts-client-sdk/modules/__tests__/proofs.test.ts +0 -119
  42. package/thru-ts-client-sdk/modules/__tests__/streaming.test.ts +0 -152
  43. package/thru-ts-client-sdk/modules/__tests__/transactions.test.ts +0 -730
  44. package/thru-ts-client-sdk/modules/__tests__/version.test.ts +0 -40
  45. package/thru-ts-client-sdk/modules/accounts.ts +0 -141
  46. package/thru-ts-client-sdk/modules/blocks.ts +0 -75
  47. package/thru-ts-client-sdk/modules/events.ts +0 -20
  48. package/thru-ts-client-sdk/modules/height.ts +0 -9
  49. package/thru-ts-client-sdk/modules/helpers.ts +0 -131
  50. package/thru-ts-client-sdk/modules/keys.ts +0 -29
  51. package/thru-ts-client-sdk/modules/proofs.ts +0 -20
  52. package/thru-ts-client-sdk/modules/streaming.ts +0 -133
  53. package/thru-ts-client-sdk/modules/transactions.ts +0 -374
  54. package/thru-ts-client-sdk/modules/version.ts +0 -10
  55. package/thru-ts-client-sdk/proto/buf/validate/validate_pb.ts +0 -4761
  56. package/thru-ts-client-sdk/proto/google/api/annotations_pb.ts +0 -39
  57. package/thru-ts-client-sdk/proto/google/api/client_pb.ts +0 -953
  58. package/thru-ts-client-sdk/proto/google/api/field_behavior_pb.ts +0 -157
  59. package/thru-ts-client-sdk/proto/google/api/http_pb.ts +0 -474
  60. package/thru-ts-client-sdk/proto/google/api/launch_stage_pb.ts +0 -118
  61. package/thru-ts-client-sdk/proto/thru/common/v1/consensus_pb.ts +0 -162
  62. package/thru-ts-client-sdk/proto/thru/common/v1/errors_pb.ts +0 -129
  63. package/thru-ts-client-sdk/proto/thru/common/v1/filters_pb.ts +0 -129
  64. package/thru-ts-client-sdk/proto/thru/common/v1/pagination_pb.ts +0 -79
  65. package/thru-ts-client-sdk/proto/thru/core/v1/account_pb.ts +0 -359
  66. package/thru-ts-client-sdk/proto/thru/core/v1/block_pb.ts +0 -259
  67. package/thru-ts-client-sdk/proto/thru/core/v1/state_pb.ts +0 -103
  68. package/thru-ts-client-sdk/proto/thru/core/v1/transaction_pb.ts +0 -528
  69. package/thru-ts-client-sdk/proto/thru/core/v1/types_pb.ts +0 -100
  70. package/thru-ts-client-sdk/proto/thru/services/v1/command_service_pb.ts +0 -146
  71. package/thru-ts-client-sdk/proto/thru/services/v1/query_service_pb.ts +0 -819
  72. package/thru-ts-client-sdk/proto/thru/services/v1/streaming_service_pb.ts +0 -390
  73. package/thru-ts-client-sdk/sdk.ts +0 -42
  74. package/thru-ts-client-sdk/test-scripts/counter.ts +0 -469
  75. package/thru-ts-client-sdk/test-scripts/create-account.ts +0 -74
  76. package/thru-ts-client-sdk/test-scripts/get-height.ts +0 -52
  77. package/thru-ts-client-sdk/transactions/Transaction.ts +0 -240
  78. package/thru-ts-client-sdk/transactions/TransactionBuilder.ts +0 -53
  79. package/thru-ts-client-sdk/transactions/__tests__/TransactionBuilder.test.ts +0 -411
  80. package/thru-ts-client-sdk/transactions/__tests__/utils.test.ts +0 -214
  81. package/thru-ts-client-sdk/transactions/index.ts +0 -3
  82. package/thru-ts-client-sdk/transactions/types.ts +0 -74
  83. package/thru-ts-client-sdk/transactions/utils.ts +0 -132
  84. package/thru-ts-client-sdk/types/types.ts +0 -8
  85. package/thru-ts-client-sdk/utils/utils.ts +0 -27
  86. package/tsconfig.json +0 -9
  87. package/tsup.config.ts +0 -14
  88. package/vitest.config.ts +0 -31
@@ -1,103 +0,0 @@
1
- // @generated by protoc-gen-es v2.9.0 with parameter "target=ts"
2
- // @generated from file thru/core/v1/state.proto (package thru.core.v1, syntax proto3)
3
- /* eslint-disable */
4
-
5
- import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
6
- import { enumDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
7
- import { file_google_api_field_behavior } from "../../../google/api/field_behavior_pb";
8
- import type { Pubkey } from "./types_pb";
9
- import { file_thru_core_v1_types } from "./types_pb";
10
- import type { Message } from "@bufbuild/protobuf";
11
-
12
- /**
13
- * Describes the file thru/core/v1/state.proto.
14
- */
15
- export const file_thru_core_v1_state: GenFile = /*@__PURE__*/
16
- fileDesc("Chh0aHJ1L2NvcmUvdjEvc3RhdGUucHJvdG8SDHRocnUuY29yZS52MSKlAQoRU3RhdGVQcm9vZlJlcXVlc3QSKgoHYWRkcmVzcxgBIAEoCzIULnRocnUuY29yZS52MS5QdWJrZXlCA+BBAhI1Cgpwcm9vZl90eXBlGAIgASgOMhwudGhydS5jb3JlLnYxLlN0YXRlUHJvb2ZUeXBlQgPgQQISHQoLdGFyZ2V0X3Nsb3QYAyABKARCA+BBAUgAiAEBQg4KDF90YXJnZXRfc2xvdCIzCgpTdGF0ZVByb29mEhIKBXByb29mGAEgASgMQgPgQQISEQoEc2xvdBgCIAEoBEID4EECKo8BCg5TdGF0ZVByb29mVHlwZRIgChxTVEFURV9QUk9PRl9UWVBFX1VOU1BFQ0lGSUVEEAASHQoZU1RBVEVfUFJPT0ZfVFlQRV9DUkVBVElORxABEh0KGVNUQVRFX1BST09GX1RZUEVfVVBEQVRJTkcQAhIdChlTVEFURV9QUk9PRl9UWVBFX0VYSVNUSU5HEANCuQEKEGNvbS50aHJ1LmNvcmUudjFCClN0YXRlUHJvdG9QAVpAZ2l0aHViLmNvbS9VbnRvLUxhYnMvdGhydS1uZXQvZ3JwYy9wa2cvcHJvdG8vdGhydS9jb3JlL3YxO2NvcmV2MaICA1RDWKoCDFRocnUuQ29yZS5WMboCBFRIVUPKAgxUaHJ1XENvcmVcVjHiAhhUaHJ1XENvcmVcVjFcR1BCTWV0YWRhdGHqAg5UaHJ1OjpDb3JlOjpWMWIGcHJvdG8z", [file_google_api_field_behavior, file_thru_core_v1_types]);
17
-
18
- /**
19
- * StateProofRequest describes a request to generate an account state proof.
20
- *
21
- * @generated from message thru.core.v1.StateProofRequest
22
- */
23
- export type StateProofRequest = Message<"thru.core.v1.StateProofRequest"> & {
24
- /**
25
- * @generated from field: thru.core.v1.Pubkey address = 1;
26
- */
27
- address?: Pubkey;
28
-
29
- /**
30
- * @generated from field: thru.core.v1.StateProofType proof_type = 2;
31
- */
32
- proofType: StateProofType;
33
-
34
- /**
35
- * @generated from field: optional uint64 target_slot = 3;
36
- */
37
- targetSlot?: bigint;
38
- };
39
-
40
- /**
41
- * Describes the message thru.core.v1.StateProofRequest.
42
- * Use `create(StateProofRequestSchema)` to create a new message.
43
- */
44
- export const StateProofRequestSchema: GenMessage<StateProofRequest> = /*@__PURE__*/
45
- messageDesc(file_thru_core_v1_state, 0);
46
-
47
- /**
48
- * StateProof returns binary proof data along with context.
49
- *
50
- * @generated from message thru.core.v1.StateProof
51
- */
52
- export type StateProof = Message<"thru.core.v1.StateProof"> & {
53
- /**
54
- * @generated from field: bytes proof = 1;
55
- */
56
- proof: Uint8Array;
57
-
58
- /**
59
- * @generated from field: uint64 slot = 2;
60
- */
61
- slot: bigint;
62
- };
63
-
64
- /**
65
- * Describes the message thru.core.v1.StateProof.
66
- * Use `create(StateProofSchema)` to create a new message.
67
- */
68
- export const StateProofSchema: GenMessage<StateProof> = /*@__PURE__*/
69
- messageDesc(file_thru_core_v1_state, 1);
70
-
71
- /**
72
- * StateProofType selects the type of state proof to generate.
73
- *
74
- * @generated from enum thru.core.v1.StateProofType
75
- */
76
- export enum StateProofType {
77
- /**
78
- * @generated from enum value: STATE_PROOF_TYPE_UNSPECIFIED = 0;
79
- */
80
- UNSPECIFIED = 0,
81
-
82
- /**
83
- * @generated from enum value: STATE_PROOF_TYPE_CREATING = 1;
84
- */
85
- CREATING = 1,
86
-
87
- /**
88
- * @generated from enum value: STATE_PROOF_TYPE_UPDATING = 2;
89
- */
90
- UPDATING = 2,
91
-
92
- /**
93
- * @generated from enum value: STATE_PROOF_TYPE_EXISTING = 3;
94
- */
95
- EXISTING = 3,
96
- }
97
-
98
- /**
99
- * Describes the enum thru.core.v1.StateProofType.
100
- */
101
- export const StateProofTypeSchema: GenEnum<StateProofType> = /*@__PURE__*/
102
- enumDesc(file_thru_core_v1_state, 0);
103
-
@@ -1,528 +0,0 @@
1
- // @generated by protoc-gen-es v2.9.0 with parameter "target=ts"
2
- // @generated from file thru/core/v1/transaction.proto (package thru.core.v1, syntax proto3)
3
- /* eslint-disable */
4
-
5
- import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
6
- import { enumDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
7
- import { file_buf_validate_validate } from "../../../buf/validate/validate_pb";
8
- import { file_google_api_field_behavior } from "../../../google/api/field_behavior_pb";
9
- import type { Pubkey, Signature } from "./types_pb";
10
- import { file_thru_core_v1_types } from "./types_pb";
11
- import type { Message } from "@bufbuild/protobuf";
12
-
13
- /**
14
- * Describes the file thru/core/v1/transaction.proto.
15
- */
16
- export const file_thru_core_v1_transaction: GenFile = /*@__PURE__*/
17
- fileDesc("Ch50aHJ1L2NvcmUvdjEvdHJhbnNhY3Rpb24ucHJvdG8SDHRocnUuY29yZS52MSKaBAoRVHJhbnNhY3Rpb25IZWFkZXISOQoTZmVlX3BheWVyX3NpZ25hdHVyZRgBIAEoCzIXLnRocnUuY29yZS52MS5TaWduYXR1cmVCA+BBAhIUCgd2ZXJzaW9uGAIgASgNQgPgQQISEgoFZmxhZ3MYAyABKA1CA+BBAhIlChhyZWFkd3JpdGVfYWNjb3VudHNfY291bnQYBCABKA1CA+BBAhIkChdyZWFkb25seV9hY2NvdW50c19jb3VudBgFIAEoDUID4EECEiIKFWluc3RydWN0aW9uX2RhdGFfc2l6ZRgGIAEoDUID4EECEiQKF3JlcXVlc3RlZF9jb21wdXRlX3VuaXRzGAcgASgNQgPgQQISI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Ul9JTlZBTElEX0ZPUk1BVBCB/v////////8BEjEKJFRSQU5TQUNUSU9OX1ZNX0VSUk9SX0lOVkFMSURfVkVSU0lPThCC/v////////8BEi8KIlRSQU5TQUNUSU9OX1ZNX0VSUk9SX0lOVkFMSURfRkxBR1MQg/7/////////ARIzCiZUUkFOU0FDVElPTl9WTV9FUlJPUl9JTlZBTElEX1NJR05BVFVSRRCE/v////////8BEjMKJlRSQU5TQUNUSU9OX1ZNX0VSUk9SX0RVUExJQ0FURV9BQ0NPVU5UEIX+/////////wESMwomVFJBTlNBQ1RJT05fVk1fRVJST1JfVU5TT1JURURfQUNDT1VOVFMQhv7/////////ARI9CjBUUkFOU0FDVElPTl9WTV9FUlJPUl9VTlNPUlRFRF9SRUFEV1JJVEVfQUNDT1VOVFMQh/7/////////ARI8Ci9UUkFOU0FDVElPTl9WTV9FUlJPUl9VTlNPUlRFRF9SRUFET05MWV9BQ0NPVU5UUxCI/v////////8BEj4KMVRSQU5TQUNUSU9OX1ZNX0VSUk9SX0FDQ09VTlRfQ09VTlRfTElNSVRfRVhDRUVERUQQif7/////////ARIvCiJUUkFOU0FDVElPTl9WTV9FUlJPUl9OT05DRV9UT09fTE9XEIH8/////////wESMAojVFJBTlNBQ1RJT05fVk1fRVJST1JfTk9OQ0VfVE9PX0hJR0gQgvz/////////ARJACjNUUkFOU0FDVElPTl9WTV9FUlJPUl9JTlNVRkZJQ0lFTlRfRkVFX1BBWUVSX0JBTEFOQ0UQg/z/////////ARJCCjVUUkFOU0FDVElPTl9WTV9FUlJPUl9GRUVfUEFZRVJfQUNDT1VOVF9ET0VTX05PVF9FWElTVBCE/P////////8BEi4KIVRSQU5TQUNUSU9OX1ZNX0VSUk9SX05PVF9MSVZFX1lFVBCF/P////////8BEikKHFRSQU5TQUNUSU9OX1ZNX0VSUk9SX0VYUElSRUQQhvz/////////ARI/CjJUUkFOU0FDVElPTl9WTV9FUlJPUl9JTlZBTElEX0ZFRV9QQVlFUl9TVEFURV9QUk9PR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f_validate_validate, file_google_api_field_behavior, file_thru_core_v1_types]);
18
-
19
- /**
20
- * TransactionHeader carries structured metadata for a transaction.
21
- *
22
- * @generated from message thru.core.v1.TransactionHeader
23
- */
24
- export type TransactionHeader = Message<"thru.core.v1.TransactionHeader"> & {
25
- /**
26
- * @generated from field: thru.core.v1.Signature fee_payer_signature = 1;
27
- */
28
- feePayerSignature?: Signature;
29
-
30
- /**
31
- * @generated from field: uint32 version = 2;
32
- */
33
- version: number;
34
-
35
- /**
36
- * @generated from field: uint32 flags = 3;
37
- */
38
- flags: number;
39
-
40
- /**
41
- * @generated from field: uint32 readwrite_accounts_count = 4;
42
- */
43
- readwriteAccountsCount: number;
44
-
45
- /**
46
- * @generated from field: uint32 readonly_accounts_count = 5;
47
- */
48
- readonlyAccountsCount: number;
49
-
50
- /**
51
- * @generated from field: uint32 instruction_data_size = 6;
52
- */
53
- instructionDataSize: number;
54
-
55
- /**
56
- * @generated from field: uint32 requested_compute_units = 7;
57
- */
58
- requestedComputeUnits: number;
59
-
60
- /**
61
- * @generated from field: uint32 requested_state_units = 8;
62
- */
63
- requestedStateUnits: number;
64
-
65
- /**
66
- * @generated from field: uint32 requested_memory_units = 9;
67
- */
68
- requestedMemoryUnits: number;
69
-
70
- /**
71
- * @generated from field: uint32 expiry_after = 10;
72
- */
73
- expiryAfter: number;
74
-
75
- /**
76
- * @generated from field: uint64 fee = 11;
77
- */
78
- fee: bigint;
79
-
80
- /**
81
- * @generated from field: uint64 nonce = 12;
82
- */
83
- nonce: bigint;
84
-
85
- /**
86
- * @generated from field: uint64 start_slot = 13;
87
- */
88
- startSlot: bigint;
89
-
90
- /**
91
- * @generated from field: thru.core.v1.Pubkey fee_payer_pubkey = 14;
92
- */
93
- feePayerPubkey?: Pubkey;
94
-
95
- /**
96
- * @generated from field: thru.core.v1.Pubkey program_pubkey = 15;
97
- */
98
- programPubkey?: Pubkey;
99
- };
100
-
101
- /**
102
- * Describes the message thru.core.v1.TransactionHeader.
103
- * Use `create(TransactionHeaderSchema)` to create a new message.
104
- */
105
- export const TransactionHeaderSchema: GenMessage<TransactionHeader> = /*@__PURE__*/
106
- messageDesc(file_thru_core_v1_transaction, 0);
107
-
108
- /**
109
- * TransactionExecutionResult captures execution outcomes.
110
- *
111
- * @generated from message thru.core.v1.TransactionExecutionResult
112
- */
113
- export type TransactionExecutionResult = Message<"thru.core.v1.TransactionExecutionResult"> & {
114
- /**
115
- * @generated from field: uint32 consumed_compute_units = 1;
116
- */
117
- consumedComputeUnits: number;
118
-
119
- /**
120
- * @generated from field: uint32 consumed_memory_units = 2;
121
- */
122
- consumedMemoryUnits: number;
123
-
124
- /**
125
- * @generated from field: uint32 consumed_state_units = 3;
126
- */
127
- consumedStateUnits: number;
128
-
129
- /**
130
- * @generated from field: uint64 user_error_code = 4;
131
- */
132
- userErrorCode: bigint;
133
-
134
- /**
135
- * @generated from field: thru.core.v1.TransactionVmError vm_error = 5;
136
- */
137
- vmError: TransactionVmError;
138
-
139
- /**
140
- * @generated from field: uint64 execution_result = 6;
141
- */
142
- executionResult: bigint;
143
-
144
- /**
145
- * @generated from field: uint32 pages_used = 7;
146
- */
147
- pagesUsed: number;
148
-
149
- /**
150
- * @generated from field: uint32 events_count = 8;
151
- */
152
- eventsCount: number;
153
-
154
- /**
155
- * @generated from field: uint32 events_size = 9;
156
- */
157
- eventsSize: number;
158
-
159
- /**
160
- * @generated from field: repeated thru.core.v1.Pubkey readwrite_accounts = 10;
161
- */
162
- readwriteAccounts: Pubkey[];
163
-
164
- /**
165
- * @generated from field: repeated thru.core.v1.Pubkey readonly_accounts = 11;
166
- */
167
- readonlyAccounts: Pubkey[];
168
-
169
- /**
170
- * @generated from field: repeated thru.core.v1.TransactionEvent events = 12;
171
- */
172
- events: TransactionEvent[];
173
- };
174
-
175
- /**
176
- * Describes the message thru.core.v1.TransactionExecutionResult.
177
- * Use `create(TransactionExecutionResultSchema)` to create a new message.
178
- */
179
- export const TransactionExecutionResultSchema: GenMessage<TransactionExecutionResult> = /*@__PURE__*/
180
- messageDesc(file_thru_core_v1_transaction, 1);
181
-
182
- /**
183
- * TransactionEvent describes an event emitted during transaction execution.
184
- *
185
- * @generated from message thru.core.v1.TransactionEvent
186
- */
187
- export type TransactionEvent = Message<"thru.core.v1.TransactionEvent"> & {
188
- /**
189
- * @generated from field: string event_id = 1;
190
- */
191
- eventId: string;
192
-
193
- /**
194
- * @generated from field: uint32 call_idx = 2;
195
- */
196
- callIdx: number;
197
-
198
- /**
199
- * @generated from field: uint32 program_idx = 3;
200
- */
201
- programIdx: number;
202
-
203
- /**
204
- * @generated from field: thru.core.v1.Pubkey program = 4;
205
- */
206
- program?: Pubkey;
207
-
208
- /**
209
- * @generated from field: bytes payload = 5;
210
- */
211
- payload: Uint8Array;
212
- };
213
-
214
- /**
215
- * Describes the message thru.core.v1.TransactionEvent.
216
- * Use `create(TransactionEventSchema)` to create a new message.
217
- */
218
- export const TransactionEventSchema: GenMessage<TransactionEvent> = /*@__PURE__*/
219
- messageDesc(file_thru_core_v1_transaction, 2);
220
-
221
- /**
222
- * Transaction describes a fully decoded transaction resource.
223
- *
224
- * @generated from message thru.core.v1.Transaction
225
- */
226
- export type Transaction = Message<"thru.core.v1.Transaction"> & {
227
- /**
228
- * @generated from field: thru.core.v1.Signature signature = 1;
229
- */
230
- signature?: Signature;
231
-
232
- /**
233
- * @generated from field: thru.core.v1.TransactionHeader header = 2;
234
- */
235
- header?: TransactionHeader;
236
-
237
- /**
238
- * @generated from field: optional bytes body = 3;
239
- */
240
- body?: Uint8Array;
241
-
242
- /**
243
- * @generated from field: optional thru.core.v1.TransactionExecutionResult execution_result = 4;
244
- */
245
- executionResult?: TransactionExecutionResult;
246
-
247
- /**
248
- * @generated from field: optional uint64 slot = 5;
249
- */
250
- slot?: bigint;
251
-
252
- /**
253
- * @generated from field: optional uint32 block_offset = 6;
254
- */
255
- blockOffset?: number;
256
- };
257
-
258
- /**
259
- * Describes the message thru.core.v1.Transaction.
260
- * Use `create(TransactionSchema)` to create a new message.
261
- */
262
- export const TransactionSchema: GenMessage<Transaction> = /*@__PURE__*/
263
- messageDesc(file_thru_core_v1_transaction, 3);
264
-
265
- /**
266
- * RawTransaction provides direct access to serialized transaction bytes.
267
- *
268
- * @generated from message thru.core.v1.RawTransaction
269
- */
270
- export type RawTransaction = Message<"thru.core.v1.RawTransaction"> & {
271
- /**
272
- * @generated from field: thru.core.v1.Signature signature = 1;
273
- */
274
- signature?: Signature;
275
-
276
- /**
277
- * @generated from field: bytes raw_transaction = 2;
278
- */
279
- rawTransaction: Uint8Array;
280
- };
281
-
282
- /**
283
- * Describes the message thru.core.v1.RawTransaction.
284
- * Use `create(RawTransactionSchema)` to create a new message.
285
- */
286
- export const RawTransactionSchema: GenMessage<RawTransaction> = /*@__PURE__*/
287
- messageDesc(file_thru_core_v1_transaction, 4);
288
-
289
- /**
290
- * TransactionView controls how transactions are materialized in responses.
291
- *
292
- * @generated from enum thru.core.v1.TransactionView
293
- */
294
- export enum TransactionView {
295
- /**
296
- * @generated from enum value: TRANSACTION_VIEW_UNSPECIFIED = 0;
297
- */
298
- UNSPECIFIED = 0,
299
-
300
- /**
301
- * @generated from enum value: TRANSACTION_VIEW_SIGNATURE_ONLY = 1;
302
- */
303
- SIGNATURE_ONLY = 1,
304
-
305
- /**
306
- * @generated from enum value: TRANSACTION_VIEW_HEADER_ONLY = 2;
307
- */
308
- HEADER_ONLY = 2,
309
-
310
- /**
311
- * @generated from enum value: TRANSACTION_VIEW_HEADER_AND_BODY = 3;
312
- */
313
- HEADER_AND_BODY = 3,
314
-
315
- /**
316
- * @generated from enum value: TRANSACTION_VIEW_FULL = 4;
317
- */
318
- FULL = 4,
319
- }
320
-
321
- /**
322
- * Describes the enum thru.core.v1.TransactionView.
323
- */
324
- export const TransactionViewSchema: GenEnum<TransactionView> = /*@__PURE__*/
325
- enumDesc(file_thru_core_v1_transaction, 0);
326
-
327
- /**
328
- * TransactionVmError enumerates runtime error codes returned by the executor.
329
- *
330
- * @generated from enum thru.core.v1.TransactionVmError
331
- */
332
- export enum TransactionVmError {
333
- /**
334
- * TN_RUNTIME_TXN_EXECUTE_SUCCESS
335
- *
336
- * @generated from enum value: TRANSACTION_VM_EXECUTE_SUCCESS = 0;
337
- */
338
- TRANSACTION_VM_EXECUTE_SUCCESS = 0,
339
-
340
- /**
341
- * TN_RUNTIME_TXN_ERR_INVALID_FORMAT
342
- *
343
- * @generated from enum value: TRANSACTION_VM_ERROR_INVALID_FORMAT = -255;
344
- */
345
- TRANSACTION_VM_ERROR_INVALID_FORMAT = -255,
346
-
347
- /**
348
- * TN_RUNTIME_TXN_ERR_INVALID_VERSION
349
- *
350
- * @generated from enum value: TRANSACTION_VM_ERROR_INVALID_VERSION = -254;
351
- */
352
- TRANSACTION_VM_ERROR_INVALID_VERSION = -254,
353
-
354
- /**
355
- * TN_RUNTIME_TXN_ERR_INVALID_FLAGS
356
- *
357
- * @generated from enum value: TRANSACTION_VM_ERROR_INVALID_FLAGS = -253;
358
- */
359
- TRANSACTION_VM_ERROR_INVALID_FLAGS = -253,
360
-
361
- /**
362
- * TN_RUNTIME_TXN_ERR_INVALID_SIGNATURE
363
- *
364
- * @generated from enum value: TRANSACTION_VM_ERROR_INVALID_SIGNATURE = -252;
365
- */
366
- TRANSACTION_VM_ERROR_INVALID_SIGNATURE = -252,
367
-
368
- /**
369
- * TN_RUNTIME_TXN_ERR_DUPLICATE_ACCOUNT
370
- *
371
- * @generated from enum value: TRANSACTION_VM_ERROR_DUPLICATE_ACCOUNT = -251;
372
- */
373
- TRANSACTION_VM_ERROR_DUPLICATE_ACCOUNT = -251,
374
-
375
- /**
376
- * TN_RUNTIME_TXN_ERR_UNSORTED_ACCOUNTS
377
- *
378
- * @generated from enum value: TRANSACTION_VM_ERROR_UNSORTED_ACCOUNTS = -250;
379
- */
380
- TRANSACTION_VM_ERROR_UNSORTED_ACCOUNTS = -250,
381
-
382
- /**
383
- * TN_RUNTIME_TXN_ERR_UNSORTED_READWRITE_ACCOUNTS
384
- *
385
- * @generated from enum value: TRANSACTION_VM_ERROR_UNSORTED_READWRITE_ACCOUNTS = -249;
386
- */
387
- TRANSACTION_VM_ERROR_UNSORTED_READWRITE_ACCOUNTS = -249,
388
-
389
- /**
390
- * TN_RUNTIME_TXN_ERR_UNSORTED_READONLY_ACCOUNTS
391
- *
392
- * @generated from enum value: TRANSACTION_VM_ERROR_UNSORTED_READONLY_ACCOUNTS = -248;
393
- */
394
- TRANSACTION_VM_ERROR_UNSORTED_READONLY_ACCOUNTS = -248,
395
-
396
- /**
397
- * TN_RUNTIME_TXN_ERR_ACCOUNT_COUNT_LIMIT_EXCEEDED
398
- *
399
- * @generated from enum value: TRANSACTION_VM_ERROR_ACCOUNT_COUNT_LIMIT_EXCEEDED = -247;
400
- */
401
- TRANSACTION_VM_ERROR_ACCOUNT_COUNT_LIMIT_EXCEEDED = -247,
402
-
403
- /**
404
- * TN_RUNTIME_TXN_ERR_NONCE_TOO_LOW
405
- *
406
- * @generated from enum value: TRANSACTION_VM_ERROR_NONCE_TOO_LOW = -511;
407
- */
408
- TRANSACTION_VM_ERROR_NONCE_TOO_LOW = -511,
409
-
410
- /**
411
- * TN_RUNTIME_TXN_ERR_NONCE_TOO_HIGH
412
- *
413
- * @generated from enum value: TRANSACTION_VM_ERROR_NONCE_TOO_HIGH = -510;
414
- */
415
- TRANSACTION_VM_ERROR_NONCE_TOO_HIGH = -510,
416
-
417
- /**
418
- * TN_RUNTIME_TXN_ERR_INSUFFICIENT_FEE_PAYER_BALANCE
419
- *
420
- * @generated from enum value: TRANSACTION_VM_ERROR_INSUFFICIENT_FEE_PAYER_BALANCE = -509;
421
- */
422
- TRANSACTION_VM_ERROR_INSUFFICIENT_FEE_PAYER_BALANCE = -509,
423
-
424
- /**
425
- * TN_RUNTIME_TXN_ERR_FEE_PAYER_ACCOUNT_DOES_NOT_EXIST
426
- *
427
- * @generated from enum value: TRANSACTION_VM_ERROR_FEE_PAYER_ACCOUNT_DOES_NOT_EXIST = -508;
428
- */
429
- TRANSACTION_VM_ERROR_FEE_PAYER_ACCOUNT_DOES_NOT_EXIST = -508,
430
-
431
- /**
432
- * TN_RUNTIME_TXN_ERR_NOT_LIVE_YET
433
- *
434
- * @generated from enum value: TRANSACTION_VM_ERROR_NOT_LIVE_YET = -507;
435
- */
436
- TRANSACTION_VM_ERROR_NOT_LIVE_YET = -507,
437
-
438
- /**
439
- * TN_RUNTIME_TXN_ERR_EXPIRED
440
- *
441
- * @generated from enum value: TRANSACTION_VM_ERROR_EXPIRED = -506;
442
- */
443
- TRANSACTION_VM_ERROR_EXPIRED = -506,
444
-
445
- /**
446
- * TN_RUNTIME_TXN_ERR_INVALID_FEE_PAYER_STATE_PROOF
447
- *
448
- * @generated from enum value: TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF = -505;
449
- */
450
- TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF = -505,
451
-
452
- /**
453
- * TN_RUNTIME_TXN_ERR_INVALID_FEE_PAYER_STATE_PROOF_TYPE
454
- *
455
- * @generated from enum value: TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF_TYPE = -504;
456
- */
457
- TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF_TYPE = -504,
458
-
459
- /**
460
- * TN_RUNTIME_TXN_ERR_INVALID_FEE_PAYER_STATE_PROOF_SLOT
461
- *
462
- * @generated from enum value: TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF_SLOT = -503;
463
- */
464
- TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF_SLOT = -503,
465
-
466
- /**
467
- * TN_RUNTIME_TXN_ERR_INVALID_FEE_PAYER_ACCOUNT_OWNER
468
- *
469
- * @generated from enum value: TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_ACCOUNT_OWNER = -502;
470
- */
471
- TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_ACCOUNT_OWNER = -502,
472
-
473
- /**
474
- * TN_RUNTIME_TXN_ERR_INVALID_FEE_PAYER_STATE_PROOF_ACCOUNT_OWNER
475
- *
476
- * @generated from enum value: TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF_ACCOUNT_OWNER = -501;
477
- */
478
- TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF_ACCOUNT_OWNER = -501,
479
-
480
- /**
481
- * TN_RUNTIME_TXN_ERR_INVALID_FEE_PAYER_STATE_PROOF_ACCOUNT_META_DATA_SZ
482
- *
483
- * @generated from enum value: TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF_ACCOUNT_META_DATA_SZ = -500;
484
- */
485
- TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF_ACCOUNT_META_DATA_SZ = -500,
486
-
487
- /**
488
- * TN_RUNTIME_TXN_ERR_VM_FAILED
489
- *
490
- * @generated from enum value: TRANSACTION_VM_ERROR_VM_FAILED = -767;
491
- */
492
- TRANSACTION_VM_ERROR_VM_FAILED = -767,
493
-
494
- /**
495
- * TN_RUNTIME_TXN_ERR_INVALID_PROGRAM_ACCOUNT
496
- *
497
- * @generated from enum value: TRANSACTION_VM_ERROR_INVALID_PROGRAM_ACCOUNT = -766;
498
- */
499
- TRANSACTION_VM_ERROR_INVALID_PROGRAM_ACCOUNT = -766,
500
-
501
- /**
502
- * TN_RUNTIME_TXN_ERR_VM_REVERT
503
- *
504
- * @generated from enum value: TRANSACTION_VM_ERROR_VM_REVERT = -765;
505
- */
506
- TRANSACTION_VM_ERROR_VM_REVERT = -765,
507
-
508
- /**
509
- * TN_RUNTIME_TXN_ERR_CU_EXHAUSTED
510
- *
511
- * @generated from enum value: TRANSACTION_VM_ERROR_CU_EXHAUSTED = -764;
512
- */
513
- TRANSACTION_VM_ERROR_CU_EXHAUSTED = -764,
514
-
515
- /**
516
- * TN_RUNTIME_TXN_ERR_SU_EXHAUSTED
517
- *
518
- * @generated from enum value: TRANSACTION_VM_ERROR_SU_EXHAUSTED = -763;
519
- */
520
- TRANSACTION_VM_ERROR_SU_EXHAUSTED = -763,
521
- }
522
-
523
- /**
524
- * Describes the enum thru.core.v1.TransactionVmError.
525
- */
526
- export const TransactionVmErrorSchema: GenEnum<TransactionVmError> = /*@__PURE__*/
527
- enumDesc(file_thru_core_v1_transaction, 1);
528
-