@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.
- package/README.md +7 -0
- package/buf.gen.yaml +12 -0
- package/buf.lock +9 -0
- package/buf.yaml +15 -0
- package/dist/sdk.d.ts +1354 -0
- package/dist/sdk.js +1130 -0
- package/dist/sdk.js.map +1 -0
- package/package.json +39 -0
- package/proto/thru/common/v1/consensus.proto +75 -0
- package/proto/thru/common/v1/errors.proto +67 -0
- package/proto/thru/common/v1/filters.proto +50 -0
- package/proto/thru/common/v1/pagination.proto +47 -0
- package/proto/thru/core/v1/account.proto +138 -0
- package/proto/thru/core/v1/block.proto +82 -0
- package/proto/thru/core/v1/state.proto +37 -0
- package/proto/thru/core/v1/transaction.proto +95 -0
- package/proto/thru/core/v1/types.proto +52 -0
- package/proto/thru/services/v1/command_service.proto +45 -0
- package/proto/thru/services/v1/query_service.proto +344 -0
- package/proto/thru/services/v1/streaming_service.proto +128 -0
- package/thru-ts-client-sdk/core/bound-client.ts +129 -0
- package/thru-ts-client-sdk/core/client.ts +38 -0
- package/thru-ts-client-sdk/counter.ts +216 -0
- package/thru-ts-client-sdk/create-account.ts +78 -0
- package/thru-ts-client-sdk/defaults.ts +17 -0
- package/thru-ts-client-sdk/get-height.ts +52 -0
- package/thru-ts-client-sdk/modules/accounts.ts +137 -0
- package/thru-ts-client-sdk/modules/blocks.ts +75 -0
- package/thru-ts-client-sdk/modules/events.ts +20 -0
- package/thru-ts-client-sdk/modules/height.ts +9 -0
- package/thru-ts-client-sdk/modules/helpers.ts +340 -0
- package/thru-ts-client-sdk/modules/proofs.ts +20 -0
- package/thru-ts-client-sdk/modules/streaming.ts +34 -0
- package/thru-ts-client-sdk/modules/transactions.ts +274 -0
- package/thru-ts-client-sdk/proto/buf/validate/validate_pb.ts +4761 -0
- package/thru-ts-client-sdk/proto/google/api/annotations_pb.ts +39 -0
- package/thru-ts-client-sdk/proto/google/api/client_pb.ts +953 -0
- package/thru-ts-client-sdk/proto/google/api/field_behavior_pb.ts +157 -0
- package/thru-ts-client-sdk/proto/google/api/http_pb.ts +474 -0
- package/thru-ts-client-sdk/proto/google/api/launch_stage_pb.ts +118 -0
- package/thru-ts-client-sdk/proto/thru/common/v1/consensus_pb.ts +163 -0
- package/thru-ts-client-sdk/proto/thru/common/v1/errors_pb.ts +130 -0
- package/thru-ts-client-sdk/proto/thru/common/v1/filters_pb.ts +81 -0
- package/thru-ts-client-sdk/proto/thru/common/v1/pagination_pb.ts +80 -0
- package/thru-ts-client-sdk/proto/thru/core/v1/account_pb.ts +358 -0
- package/thru-ts-client-sdk/proto/thru/core/v1/block_pb.ts +260 -0
- package/thru-ts-client-sdk/proto/thru/core/v1/state_pb.ts +104 -0
- package/thru-ts-client-sdk/proto/thru/core/v1/transaction_pb.ts +327 -0
- package/thru-ts-client-sdk/proto/thru/core/v1/types_pb.ts +101 -0
- package/thru-ts-client-sdk/proto/thru/services/v1/command_service_pb.ts +81 -0
- package/thru-ts-client-sdk/proto/thru/services/v1/query_service_pb.ts +813 -0
- package/thru-ts-client-sdk/proto/thru/services/v1/streaming_service_pb.ts +391 -0
- package/thru-ts-client-sdk/sdk.ts +58 -0
- package/thru-ts-client-sdk/transactions/Transaction.ts +240 -0
- package/thru-ts-client-sdk/transactions/TransactionBuilder.ts +48 -0
- package/thru-ts-client-sdk/transactions/__tests__/transaction.test.ts +95 -0
- package/thru-ts-client-sdk/transactions/index.ts +3 -0
- package/thru-ts-client-sdk/transactions/types.ts +64 -0
- package/thru-ts-client-sdk/transactions/utils.ts +134 -0
- package/thru-ts-client-sdk/types/types.ts +8 -0
- package/thru-ts-client-sdk/utils/utils.ts +70 -0
- package/tsconfig.json +9 -0
- package/tsup.config.ts +10 -0
|
@@ -0,0 +1,104 @@
|
|
|
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, 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_google_api_field_behavior } from "../../../google/api/field_behavior_pb";
|
|
9
|
+
import type { Pubkey } 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/state.proto.
|
|
15
|
+
*/
|
|
16
|
+
export const file_thru_core_v1_state: GenFile = /*@__PURE__*/
|
|
17
|
+
fileDesc("Chh0aHJ1L2NvcmUvdjEvc3RhdGUucHJvdG8SDHRocnUuY29yZS52MSKQAQoRU3RhdGVQcm9vZlJlcXVlc3QSKgoHYWRkcmVzcxgBIAEoCzIULnRocnUuY29yZS52MS5QdWJrZXlCA+BBAhI1Cgpwcm9vZl90eXBlGAIgASgOMhwudGhydS5jb3JlLnYxLlN0YXRlUHJvb2ZUeXBlQgPgQQISGAoLdGFyZ2V0X3Nsb3QYAyABKARCA+BBASIzCgpTdGF0ZVByb29mEhIKBXByb29mGAEgASgMQgPgQQISEQoEc2xvdBgCIAEoBEID4EECKo8BCg5TdGF0ZVByb29mVHlwZRIgChxTVEFURV9QUk9PRl9UWVBFX1VOU1BFQ0lGSUVEEAASHQoZU1RBVEVfUFJPT0ZfVFlQRV9DUkVBVElORxABEh0KGVNUQVRFX1BST09GX1RZUEVfVVBEQVRJTkcQAhIdChlTVEFURV9QUk9PRl9UWVBFX0VYSVNUSU5HEANCvgEKEGNvbS50aHJ1LmNvcmUudjFCClN0YXRlUHJvdG9QAVpAZ2l0aHViLmNvbS9VbnRvLUxhYnMvdGhydS1uZXQvZ3JwYy9wa2cvcHJvdG8vdGhydS9jb3JlL3YxO2NvcmV2MaICA1RDWKoCDFRocnUuQ29yZS5WMboCBFRIVUPKAgxUaHJ1XENvcmVcVjHiAhhUaHJ1XENvcmVcVjFcR1BCTWV0YWRhdGHqAg5UaHJ1OjpDb3JlOjpWMZIDAggBYghlZGl0aW9uc3DoBw", [file_google_api_field_behavior, file_thru_core_v1_types]);
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* StateProofRequest describes a request to generate an account state proof.
|
|
21
|
+
*
|
|
22
|
+
* @generated from message thru.core.v1.StateProofRequest
|
|
23
|
+
*/
|
|
24
|
+
export type StateProofRequest = Message<"thru.core.v1.StateProofRequest"> & {
|
|
25
|
+
/**
|
|
26
|
+
* @generated from field: thru.core.v1.Pubkey address = 1;
|
|
27
|
+
*/
|
|
28
|
+
address?: Pubkey;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @generated from field: thru.core.v1.StateProofType proof_type = 2;
|
|
32
|
+
*/
|
|
33
|
+
proofType: StateProofType;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* @generated from field: uint64 target_slot = 3;
|
|
37
|
+
*/
|
|
38
|
+
targetSlot: bigint;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Describes the message thru.core.v1.StateProofRequest.
|
|
43
|
+
* Use `create(StateProofRequestSchema)` to create a new message.
|
|
44
|
+
*/
|
|
45
|
+
export const StateProofRequestSchema: GenMessage<StateProofRequest> = /*@__PURE__*/
|
|
46
|
+
messageDesc(file_thru_core_v1_state, 0);
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* StateProof returns binary proof data along with context.
|
|
50
|
+
*
|
|
51
|
+
* @generated from message thru.core.v1.StateProof
|
|
52
|
+
*/
|
|
53
|
+
export type StateProof = Message<"thru.core.v1.StateProof"> & {
|
|
54
|
+
/**
|
|
55
|
+
* @generated from field: bytes proof = 1;
|
|
56
|
+
*/
|
|
57
|
+
proof: Uint8Array;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* @generated from field: uint64 slot = 2;
|
|
61
|
+
*/
|
|
62
|
+
slot: bigint;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Describes the message thru.core.v1.StateProof.
|
|
67
|
+
* Use `create(StateProofSchema)` to create a new message.
|
|
68
|
+
*/
|
|
69
|
+
export const StateProofSchema: GenMessage<StateProof> = /*@__PURE__*/
|
|
70
|
+
messageDesc(file_thru_core_v1_state, 1);
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* StateProofType selects the type of state proof to generate.
|
|
74
|
+
*
|
|
75
|
+
* @generated from enum thru.core.v1.StateProofType
|
|
76
|
+
*/
|
|
77
|
+
export enum StateProofType {
|
|
78
|
+
/**
|
|
79
|
+
* @generated from enum value: STATE_PROOF_TYPE_UNSPECIFIED = 0;
|
|
80
|
+
*/
|
|
81
|
+
UNSPECIFIED = 0,
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* @generated from enum value: STATE_PROOF_TYPE_CREATING = 1;
|
|
85
|
+
*/
|
|
86
|
+
CREATING = 1,
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* @generated from enum value: STATE_PROOF_TYPE_UPDATING = 2;
|
|
90
|
+
*/
|
|
91
|
+
UPDATING = 2,
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* @generated from enum value: STATE_PROOF_TYPE_EXISTING = 3;
|
|
95
|
+
*/
|
|
96
|
+
EXISTING = 3,
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Describes the enum thru.core.v1.StateProofType.
|
|
101
|
+
*/
|
|
102
|
+
export const StateProofTypeSchema: GenEnum<StateProofType> = /*@__PURE__*/
|
|
103
|
+
enumDesc(file_thru_core_v1_state, 0);
|
|
104
|
+
|
|
@@ -0,0 +1,327 @@
|
|
|
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, 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 { Pubkey, Signature } from "./types_pb";
|
|
11
|
+
import { file_thru_core_v1_types } from "./types_pb";
|
|
12
|
+
import type { Message } from "@bufbuild/protobuf";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Describes the file thru/core/v1/transaction.proto.
|
|
16
|
+
*/
|
|
17
|
+
export const file_thru_core_v1_transaction: GenFile = /*@__PURE__*/
|
|
18
|
+
fileDesc("Ch50aHJ1L2NvcmUvdjEvdHJhbnNhY3Rpb24ucHJvdG8SDHRocnUuY29yZS52MSKaBAoRVHJhbnNhY3Rpb25IZWFkZXISOQoTZmVlX3BheWVyX3NpZ25hdHVyZRgBIAEoCzIXLnRocnUuY29yZS52MS5TaWduYXR1cmVCA+BBAhIUCgd2ZXJzaW9uGAIgASgNQgPgQQISEgoFZmxhZ3MYAyABKA1CA+BBARIlChhyZWFkd3JpdGVfYWNjb3VudHNfY291bnQYBCABKA1CA+BBARIkChdyZWFkb25seV9hY2NvdW50c19jb3VudBgFIAEoDUID4EEBEiIKFWluc3RydWN0aW9uX2RhdGFfc2l6ZRgGIAEoDUID4EEBEiQKF3JlcXVlc3RlZF9jb21wdXRlX3VuaXRzGAcgASgNQgPgQQESIgoVcmVxdWVzdGVkX3N0YXRlX3VuaXRzGAggASgNQgPgQQESIwoWcmVxdWVzdGVkX21lbW9yeV91bml0cxgJIAEoDUID4EEBEhkKDGV4cGlyeV9hZnRlchgKIAEoDUID4EEBEhAKA2ZlZRgLIAEoBEID4EEBEhIKBW5vbmNlGAwgASgEQgPgQQESFwoKc3RhcnRfc2xvdBgNIAEoBEID4EEBEjMKEGZlZV9wYXllcl9wdWJrZXkYDiABKAsyFC50aHJ1LmNvcmUudjEuUHVia2V5QgPgQQESMQoOcHJvZ3JhbV9wdWJrZXkYDyABKAsyFC50aHJ1LmNvcmUudjEuUHVia2V5QgPgQQEizAMKGlRyYW5zYWN0aW9uRXhlY3V0aW9uUmVzdWx0EiMKFmNvbnN1bWVkX2NvbXB1dGVfdW5pdHMYASABKA1CA+BBARIiChVjb25zdW1lZF9tZW1vcnlfdW5pdHMYAiABKA1CA+BBARIhChRjb25zdW1lZF9zdGF0ZV91bml0cxgDIAEoDUID4EEBEhwKD3VzZXJfZXJyb3JfY29kZRgEIAEoBEID4EEBEhUKCHZtX2Vycm9yGAUgASgNQgPgQQESHQoQZXhlY3V0aW9uX3Jlc3VsdBgGIAEoBEID4EEBEhcKCnBhZ2VzX3VzZWQYByABKA1CA+BBARIZCgxldmVudHNfY291bnQYCCABKA1CA+BBARIYCgtldmVudHNfc2l6ZRgJIAEoDUID4EEBEjUKEnJlYWR3cml0ZV9hY2NvdW50cxgKIAMoCzIULnRocnUuY29yZS52MS5QdWJrZXlCA+BBARI0ChFyZWFkb25seV9hY2NvdW50cxgLIAMoCzIULnRocnUuY29yZS52MS5QdWJrZXlCA+BBARIzCgZldmVudHMYDCADKAsyHi50aHJ1LmNvcmUudjEuVHJhbnNhY3Rpb25FdmVudEID4EEBIpwBChBUcmFuc2FjdGlvbkV2ZW50EhUKCGV2ZW50X2lkGAEgASgJQgPgQQESFQoIY2FsbF9pZHgYAiABKA1CA+BBARIYCgtwcm9ncmFtX2lkeBgDIAEoDUID4EEBEioKB3Byb2dyYW0YBCABKAsyFC50aHJ1LmNvcmUudjEuUHVia2V5QgPgQQESFAoHcGF5bG9hZBgFIAEoDEID4EEBIogCCgtUcmFuc2FjdGlvbhIvCglzaWduYXR1cmUYASABKAsyFy50aHJ1LmNvcmUudjEuU2lnbmF0dXJlQgPgQQISNAoGaGVhZGVyGAIgASgLMh8udGhydS5jb3JlLnYxLlRyYW5zYWN0aW9uSGVhZGVyQgPgQQESGwoEYm9keRgDIAEoDEIN4EEBukgHegUYgICACBJHChBleGVjdXRpb25fcmVzdWx0GAQgASgLMigudGhydS5jb3JlLnYxLlRyYW5zYWN0aW9uRXhlY3V0aW9uUmVzdWx0QgPgQQESEQoEc2xvdBgFIAEoBEID4EEBEhkKDGJsb2NrX29mZnNldBgGIAEoDUID4EEBImkKDlJhd1RyYW5zYWN0aW9uEi8KCXNpZ25hdHVyZRgBIAEoCzIXLnRocnUuY29yZS52MS5TaWduYXR1cmVCA+BBAhImCg9yYXdfdHJhbnNhY3Rpb24YAiABKAxCDeBBArpIB3oFGICAgAgquwEKD1RyYW5zYWN0aW9uVmlldxIgChxUUkFOU0FDVElPTl9WSUVXX1VOU1BFQ0lGSUVEEAASIwofVFJBTlNBQ1RJT05fVklFV19TSUdOQVRVUkVfT05MWRABEiAKHFRSQU5TQUNUSU9OX1ZJRVdfSEVBREVSX09OTFkQAhIkCiBUUkFOU0FDVElPTl9WSUVXX0hFQURFUl9BTkRfQk9EWRADEhkKFVRSQU5TQUNUSU9OX1ZJRVdfRlVMTBAEQsQBChBjb20udGhydS5jb3JlLnYxQhBUcmFuc2FjdGlvblByb3RvUAFaQGdpdGh1Yi5jb20vVW50by1MYWJzL3RocnUtbmV0L2dycGMvcGtnL3Byb3RvL3RocnUvY29yZS92MTtjb3JldjGiAgNUQ1iqAgxUaHJ1LkNvcmUuVjG6AgRUSFVDygIMVGhydVxDb3JlXFYx4gIYVGhydVxDb3JlXFYxXEdQQk1ldGFkYXRh6gIOVGhydTo6Q29yZTo6VjGSAwIIAWIIZWRpdGlvbnNw6Ac", [file_buf_validate_validate, file_google_api_field_behavior, file_thru_core_v1_types]);
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* TransactionHeader carries structured metadata for a transaction.
|
|
22
|
+
*
|
|
23
|
+
* @generated from message thru.core.v1.TransactionHeader
|
|
24
|
+
*/
|
|
25
|
+
export type TransactionHeader = Message<"thru.core.v1.TransactionHeader"> & {
|
|
26
|
+
/**
|
|
27
|
+
* @generated from field: thru.core.v1.Signature fee_payer_signature = 1;
|
|
28
|
+
*/
|
|
29
|
+
feePayerSignature?: Signature;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @generated from field: uint32 version = 2;
|
|
33
|
+
*/
|
|
34
|
+
version: number;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* @generated from field: uint32 flags = 3;
|
|
38
|
+
*/
|
|
39
|
+
flags: number;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @generated from field: uint32 readwrite_accounts_count = 4;
|
|
43
|
+
*/
|
|
44
|
+
readwriteAccountsCount: number;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @generated from field: uint32 readonly_accounts_count = 5;
|
|
48
|
+
*/
|
|
49
|
+
readonlyAccountsCount: number;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* @generated from field: uint32 instruction_data_size = 6;
|
|
53
|
+
*/
|
|
54
|
+
instructionDataSize: number;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* @generated from field: uint32 requested_compute_units = 7;
|
|
58
|
+
*/
|
|
59
|
+
requestedComputeUnits: number;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* @generated from field: uint32 requested_state_units = 8;
|
|
63
|
+
*/
|
|
64
|
+
requestedStateUnits: number;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* @generated from field: uint32 requested_memory_units = 9;
|
|
68
|
+
*/
|
|
69
|
+
requestedMemoryUnits: number;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* @generated from field: uint32 expiry_after = 10;
|
|
73
|
+
*/
|
|
74
|
+
expiryAfter: number;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* @generated from field: uint64 fee = 11;
|
|
78
|
+
*/
|
|
79
|
+
fee: bigint;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* @generated from field: uint64 nonce = 12;
|
|
83
|
+
*/
|
|
84
|
+
nonce: bigint;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* @generated from field: uint64 start_slot = 13;
|
|
88
|
+
*/
|
|
89
|
+
startSlot: bigint;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* @generated from field: thru.core.v1.Pubkey fee_payer_pubkey = 14;
|
|
93
|
+
*/
|
|
94
|
+
feePayerPubkey?: Pubkey;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* @generated from field: thru.core.v1.Pubkey program_pubkey = 15;
|
|
98
|
+
*/
|
|
99
|
+
programPubkey?: Pubkey;
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Describes the message thru.core.v1.TransactionHeader.
|
|
104
|
+
* Use `create(TransactionHeaderSchema)` to create a new message.
|
|
105
|
+
*/
|
|
106
|
+
export const TransactionHeaderSchema: GenMessage<TransactionHeader> = /*@__PURE__*/
|
|
107
|
+
messageDesc(file_thru_core_v1_transaction, 0);
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* TransactionExecutionResult captures execution outcomes.
|
|
111
|
+
*
|
|
112
|
+
* @generated from message thru.core.v1.TransactionExecutionResult
|
|
113
|
+
*/
|
|
114
|
+
export type TransactionExecutionResult = Message<"thru.core.v1.TransactionExecutionResult"> & {
|
|
115
|
+
/**
|
|
116
|
+
* @generated from field: uint32 consumed_compute_units = 1;
|
|
117
|
+
*/
|
|
118
|
+
consumedComputeUnits: number;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* @generated from field: uint32 consumed_memory_units = 2;
|
|
122
|
+
*/
|
|
123
|
+
consumedMemoryUnits: number;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* @generated from field: uint32 consumed_state_units = 3;
|
|
127
|
+
*/
|
|
128
|
+
consumedStateUnits: number;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* @generated from field: uint64 user_error_code = 4;
|
|
132
|
+
*/
|
|
133
|
+
userErrorCode: bigint;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* @generated from field: uint32 vm_error = 5;
|
|
137
|
+
*/
|
|
138
|
+
vmError: number;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* @generated from field: uint64 execution_result = 6;
|
|
142
|
+
*/
|
|
143
|
+
executionResult: bigint;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* @generated from field: uint32 pages_used = 7;
|
|
147
|
+
*/
|
|
148
|
+
pagesUsed: number;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* @generated from field: uint32 events_count = 8;
|
|
152
|
+
*/
|
|
153
|
+
eventsCount: number;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* @generated from field: uint32 events_size = 9;
|
|
157
|
+
*/
|
|
158
|
+
eventsSize: number;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* @generated from field: repeated thru.core.v1.Pubkey readwrite_accounts = 10;
|
|
162
|
+
*/
|
|
163
|
+
readwriteAccounts: Pubkey[];
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* @generated from field: repeated thru.core.v1.Pubkey readonly_accounts = 11;
|
|
167
|
+
*/
|
|
168
|
+
readonlyAccounts: Pubkey[];
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* @generated from field: repeated thru.core.v1.TransactionEvent events = 12;
|
|
172
|
+
*/
|
|
173
|
+
events: TransactionEvent[];
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Describes the message thru.core.v1.TransactionExecutionResult.
|
|
178
|
+
* Use `create(TransactionExecutionResultSchema)` to create a new message.
|
|
179
|
+
*/
|
|
180
|
+
export const TransactionExecutionResultSchema: GenMessage<TransactionExecutionResult> = /*@__PURE__*/
|
|
181
|
+
messageDesc(file_thru_core_v1_transaction, 1);
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* TransactionEvent describes an event emitted during transaction execution.
|
|
185
|
+
*
|
|
186
|
+
* @generated from message thru.core.v1.TransactionEvent
|
|
187
|
+
*/
|
|
188
|
+
export type TransactionEvent = Message<"thru.core.v1.TransactionEvent"> & {
|
|
189
|
+
/**
|
|
190
|
+
* @generated from field: string event_id = 1;
|
|
191
|
+
*/
|
|
192
|
+
eventId: string;
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* @generated from field: uint32 call_idx = 2;
|
|
196
|
+
*/
|
|
197
|
+
callIdx: number;
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* @generated from field: uint32 program_idx = 3;
|
|
201
|
+
*/
|
|
202
|
+
programIdx: number;
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* @generated from field: thru.core.v1.Pubkey program = 4;
|
|
206
|
+
*/
|
|
207
|
+
program?: Pubkey;
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* @generated from field: bytes payload = 5;
|
|
211
|
+
*/
|
|
212
|
+
payload: Uint8Array;
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Describes the message thru.core.v1.TransactionEvent.
|
|
217
|
+
* Use `create(TransactionEventSchema)` to create a new message.
|
|
218
|
+
*/
|
|
219
|
+
export const TransactionEventSchema: GenMessage<TransactionEvent> = /*@__PURE__*/
|
|
220
|
+
messageDesc(file_thru_core_v1_transaction, 2);
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Transaction describes a fully decoded transaction resource.
|
|
224
|
+
*
|
|
225
|
+
* @generated from message thru.core.v1.Transaction
|
|
226
|
+
*/
|
|
227
|
+
export type Transaction = Message<"thru.core.v1.Transaction"> & {
|
|
228
|
+
/**
|
|
229
|
+
* @generated from field: thru.core.v1.Signature signature = 1;
|
|
230
|
+
*/
|
|
231
|
+
signature?: Signature;
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* @generated from field: thru.core.v1.TransactionHeader header = 2;
|
|
235
|
+
*/
|
|
236
|
+
header?: TransactionHeader;
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* @generated from field: bytes body = 3;
|
|
240
|
+
*/
|
|
241
|
+
body: Uint8Array;
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* @generated from field: thru.core.v1.TransactionExecutionResult execution_result = 4;
|
|
245
|
+
*/
|
|
246
|
+
executionResult?: TransactionExecutionResult;
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* @generated from field: uint64 slot = 5;
|
|
250
|
+
*/
|
|
251
|
+
slot: bigint;
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* @generated from field: uint32 block_offset = 6;
|
|
255
|
+
*/
|
|
256
|
+
blockOffset: number;
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Describes the message thru.core.v1.Transaction.
|
|
261
|
+
* Use `create(TransactionSchema)` to create a new message.
|
|
262
|
+
*/
|
|
263
|
+
export const TransactionSchema: GenMessage<Transaction> = /*@__PURE__*/
|
|
264
|
+
messageDesc(file_thru_core_v1_transaction, 3);
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* RawTransaction provides direct access to serialized transaction bytes.
|
|
268
|
+
*
|
|
269
|
+
* @generated from message thru.core.v1.RawTransaction
|
|
270
|
+
*/
|
|
271
|
+
export type RawTransaction = Message<"thru.core.v1.RawTransaction"> & {
|
|
272
|
+
/**
|
|
273
|
+
* @generated from field: thru.core.v1.Signature signature = 1;
|
|
274
|
+
*/
|
|
275
|
+
signature?: Signature;
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* @generated from field: bytes raw_transaction = 2;
|
|
279
|
+
*/
|
|
280
|
+
rawTransaction: Uint8Array;
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Describes the message thru.core.v1.RawTransaction.
|
|
285
|
+
* Use `create(RawTransactionSchema)` to create a new message.
|
|
286
|
+
*/
|
|
287
|
+
export const RawTransactionSchema: GenMessage<RawTransaction> = /*@__PURE__*/
|
|
288
|
+
messageDesc(file_thru_core_v1_transaction, 4);
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* TransactionView controls how transactions are materialized in responses.
|
|
292
|
+
*
|
|
293
|
+
* @generated from enum thru.core.v1.TransactionView
|
|
294
|
+
*/
|
|
295
|
+
export enum TransactionView {
|
|
296
|
+
/**
|
|
297
|
+
* @generated from enum value: TRANSACTION_VIEW_UNSPECIFIED = 0;
|
|
298
|
+
*/
|
|
299
|
+
UNSPECIFIED = 0,
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* @generated from enum value: TRANSACTION_VIEW_SIGNATURE_ONLY = 1;
|
|
303
|
+
*/
|
|
304
|
+
SIGNATURE_ONLY = 1,
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* @generated from enum value: TRANSACTION_VIEW_HEADER_ONLY = 2;
|
|
308
|
+
*/
|
|
309
|
+
HEADER_ONLY = 2,
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* @generated from enum value: TRANSACTION_VIEW_HEADER_AND_BODY = 3;
|
|
313
|
+
*/
|
|
314
|
+
HEADER_AND_BODY = 3,
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* @generated from enum value: TRANSACTION_VIEW_FULL = 4;
|
|
318
|
+
*/
|
|
319
|
+
FULL = 4,
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* Describes the enum thru.core.v1.TransactionView.
|
|
324
|
+
*/
|
|
325
|
+
export const TransactionViewSchema: GenEnum<TransactionView> = /*@__PURE__*/
|
|
326
|
+
enumDesc(file_thru_core_v1_transaction, 0);
|
|
327
|
+
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
// @generated by protoc-gen-es v2.9.0 with parameter "target=ts"
|
|
2
|
+
// @generated from file thru/core/v1/types.proto (package thru.core.v1, edition 2023)
|
|
3
|
+
// option features.field_presence = EXPLICIT;
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
|
|
6
|
+
import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
|
|
7
|
+
import { 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 { Message } from "@bufbuild/protobuf";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Describes the file thru/core/v1/types.proto.
|
|
14
|
+
*/
|
|
15
|
+
export const file_thru_core_v1_types: GenFile = /*@__PURE__*/
|
|
16
|
+
fileDesc("Chh0aHJ1L2NvcmUvdjEvdHlwZXMucHJvdG8SDHRocnUuY29yZS52MSIjCgZQdWJrZXkSGQoFdmFsdWUYASABKAxCCuBBArpIBHoCaCAiIQoESGFzaBIZCgV2YWx1ZRgBIAEoDEIK4EECukgEegJoICImCglCbG9ja0hhc2gSGQoFdmFsdWUYASABKAxCCuBBArpIBHoCaEAiJgoJU2lnbmF0dXJlEhkKBXZhbHVlGAEgASgMQgrgQQK6SAR6AmhAQr4BChBjb20udGhydS5jb3JlLnYxQgpUeXBlc1Byb3RvUAFaQGdpdGh1Yi5jb20vVW50by1MYWJzL3RocnUtbmV0L2dycGMvcGtnL3Byb3RvL3RocnUvY29yZS92MTtjb3JldjGiAgNUQ1iqAgxUaHJ1LkNvcmUuVjG6AgRUSFVDygIMVGhydVxDb3JlXFYx4gIYVGhydVxDb3JlXFYxXEdQQk1ldGFkYXRh6gIOVGhydTo6Q29yZTo6VjGSAwIIAWIIZWRpdGlvbnNw6Ac", [file_buf_validate_validate, file_google_api_field_behavior]);
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Pubkey represents a 32-byte public key value.
|
|
20
|
+
*
|
|
21
|
+
* @generated from message thru.core.v1.Pubkey
|
|
22
|
+
*/
|
|
23
|
+
export type Pubkey = Message<"thru.core.v1.Pubkey"> & {
|
|
24
|
+
/**
|
|
25
|
+
* 32-byte public key buffer.
|
|
26
|
+
*
|
|
27
|
+
* @generated from field: bytes value = 1;
|
|
28
|
+
*/
|
|
29
|
+
value: Uint8Array;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Describes the message thru.core.v1.Pubkey.
|
|
34
|
+
* Use `create(PubkeySchema)` to create a new message.
|
|
35
|
+
*/
|
|
36
|
+
export const PubkeySchema: GenMessage<Pubkey> = /*@__PURE__*/
|
|
37
|
+
messageDesc(file_thru_core_v1_types, 0);
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Hash represents a 32-byte hash value.
|
|
41
|
+
*
|
|
42
|
+
* @generated from message thru.core.v1.Hash
|
|
43
|
+
*/
|
|
44
|
+
export type Hash = Message<"thru.core.v1.Hash"> & {
|
|
45
|
+
/**
|
|
46
|
+
* 32-byte hash buffer.
|
|
47
|
+
*
|
|
48
|
+
* @generated from field: bytes value = 1;
|
|
49
|
+
*/
|
|
50
|
+
value: Uint8Array;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Describes the message thru.core.v1.Hash.
|
|
55
|
+
* Use `create(HashSchema)` to create a new message.
|
|
56
|
+
*/
|
|
57
|
+
export const HashSchema: GenMessage<Hash> = /*@__PURE__*/
|
|
58
|
+
messageDesc(file_thru_core_v1_types, 1);
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* BlockHash represents a 64-byte hash for block identifiers.
|
|
62
|
+
*
|
|
63
|
+
* @generated from message thru.core.v1.BlockHash
|
|
64
|
+
*/
|
|
65
|
+
export type BlockHash = Message<"thru.core.v1.BlockHash"> & {
|
|
66
|
+
/**
|
|
67
|
+
* 64-byte block hash buffer.
|
|
68
|
+
*
|
|
69
|
+
* @generated from field: bytes value = 1;
|
|
70
|
+
*/
|
|
71
|
+
value: Uint8Array;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Describes the message thru.core.v1.BlockHash.
|
|
76
|
+
* Use `create(BlockHashSchema)` to create a new message.
|
|
77
|
+
*/
|
|
78
|
+
export const BlockHashSchema: GenMessage<BlockHash> = /*@__PURE__*/
|
|
79
|
+
messageDesc(file_thru_core_v1_types, 2);
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Signature represents a 64-byte signature value.
|
|
83
|
+
*
|
|
84
|
+
* @generated from message thru.core.v1.Signature
|
|
85
|
+
*/
|
|
86
|
+
export type Signature = Message<"thru.core.v1.Signature"> & {
|
|
87
|
+
/**
|
|
88
|
+
* 64-byte signature buffer.
|
|
89
|
+
*
|
|
90
|
+
* @generated from field: bytes value = 1;
|
|
91
|
+
*/
|
|
92
|
+
value: Uint8Array;
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Describes the message thru.core.v1.Signature.
|
|
97
|
+
* Use `create(SignatureSchema)` to create a new message.
|
|
98
|
+
*/
|
|
99
|
+
export const SignatureSchema: GenMessage<Signature> = /*@__PURE__*/
|
|
100
|
+
messageDesc(file_thru_core_v1_types, 3);
|
|
101
|
+
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
// @generated by protoc-gen-es v2.9.0 with parameter "target=ts"
|
|
2
|
+
// @generated from file thru/services/v1/command_service.proto (package thru.services.v1, edition 2023)
|
|
3
|
+
// option features.field_presence = EXPLICIT;
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
|
|
6
|
+
import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
|
|
7
|
+
import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
|
|
8
|
+
import { file_google_api_annotations } from "../../../google/api/annotations_pb";
|
|
9
|
+
import { file_google_api_client } from "../../../google/api/client_pb";
|
|
10
|
+
import { file_google_api_field_behavior } from "../../../google/api/field_behavior_pb";
|
|
11
|
+
import { file_thru_core_v1_transaction } from "../../core/v1/transaction_pb";
|
|
12
|
+
import type { Signature } from "../../core/v1/types_pb";
|
|
13
|
+
import { file_thru_core_v1_types } from "../../core/v1/types_pb";
|
|
14
|
+
import type { Message } from "@bufbuild/protobuf";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Describes the file thru/services/v1/command_service.proto.
|
|
18
|
+
*/
|
|
19
|
+
export const file_thru_services_v1_command_service: GenFile = /*@__PURE__*/
|
|
20
|
+
fileDesc("CiZ0aHJ1L3NlcnZpY2VzL3YxL2NvbW1hbmRfc2VydmljZS5wcm90bxIQdGhydS5zZXJ2aWNlcy52MSI2ChZTZW5kVHJhbnNhY3Rpb25SZXF1ZXN0EhwKD3Jhd190cmFuc2FjdGlvbhgBIAEoDEID4EECIkoKF1NlbmRUcmFuc2FjdGlvblJlc3BvbnNlEi8KCXNpZ25hdHVyZRgBIAEoCzIXLnRocnUuY29yZS52MS5TaWduYXR1cmVCA+BBAjKrAQoOQ29tbWFuZFNlcnZpY2USgwEKD1NlbmRUcmFuc2FjdGlvbhIoLnRocnUuc2VydmljZXMudjEuU2VuZFRyYW5zYWN0aW9uUmVxdWVzdBopLnRocnUuc2VydmljZXMudjEuU2VuZFRyYW5zYWN0aW9uUmVzcG9uc2UiG4LT5JMCFToBKiIQL3YxL3RyYW5zYWN0aW9ucxoTykEQYXBpLnRocnUubmV0d29ya0LjAQoUY29tLnRocnUuc2VydmljZXMudjFCE0NvbW1hbmRTZXJ2aWNlUHJvdG9QAVpIZ2l0aHViLmNvbS9VbnRvLUxhYnMvdGhydS1uZXQvZ3JwYy9wa2cvcHJvdG8vdGhydS9zZXJ2aWNlcy92MTtzZXJ2aWNlc3YxogIDVFNYqgIQVGhydS5TZXJ2aWNlcy5WMboCBFRIVVPKAhBUaHJ1XFNlcnZpY2VzXFYx4gIcVGhydVxTZXJ2aWNlc1xWMVxHUEJNZXRhZGF0YeoCElRocnU6OlNlcnZpY2VzOjpWMZIDAggBYghlZGl0aW9uc3DoBw", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_thru_core_v1_transaction, file_thru_core_v1_types]);
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* SendTransactionRequest submits a transaction to the cluster.
|
|
24
|
+
*
|
|
25
|
+
* @generated from message thru.services.v1.SendTransactionRequest
|
|
26
|
+
*/
|
|
27
|
+
export type SendTransactionRequest = Message<"thru.services.v1.SendTransactionRequest"> & {
|
|
28
|
+
/**
|
|
29
|
+
* Raw transaction bytes encoded according to chain specification.
|
|
30
|
+
*
|
|
31
|
+
* @generated from field: bytes raw_transaction = 1;
|
|
32
|
+
*/
|
|
33
|
+
rawTransaction: Uint8Array;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Describes the message thru.services.v1.SendTransactionRequest.
|
|
38
|
+
* Use `create(SendTransactionRequestSchema)` to create a new message.
|
|
39
|
+
*/
|
|
40
|
+
export const SendTransactionRequestSchema: GenMessage<SendTransactionRequest> = /*@__PURE__*/
|
|
41
|
+
messageDesc(file_thru_services_v1_command_service, 0);
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* SendTransactionResponse echoes submission metadata.
|
|
45
|
+
*
|
|
46
|
+
* @generated from message thru.services.v1.SendTransactionResponse
|
|
47
|
+
*/
|
|
48
|
+
export type SendTransactionResponse = Message<"thru.services.v1.SendTransactionResponse"> & {
|
|
49
|
+
/**
|
|
50
|
+
* @generated from field: thru.core.v1.Signature signature = 1;
|
|
51
|
+
*/
|
|
52
|
+
signature?: Signature;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Describes the message thru.services.v1.SendTransactionResponse.
|
|
57
|
+
* Use `create(SendTransactionResponseSchema)` to create a new message.
|
|
58
|
+
*/
|
|
59
|
+
export const SendTransactionResponseSchema: GenMessage<SendTransactionResponse> = /*@__PURE__*/
|
|
60
|
+
messageDesc(file_thru_services_v1_command_service, 1);
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* CommandService defines transactional RPCs that mutate state or perform
|
|
64
|
+
* expensive computations.
|
|
65
|
+
*
|
|
66
|
+
* @generated from service thru.services.v1.CommandService
|
|
67
|
+
*/
|
|
68
|
+
export const CommandService: GenService<{
|
|
69
|
+
/**
|
|
70
|
+
* Submit a new transaction to the cluster.
|
|
71
|
+
*
|
|
72
|
+
* @generated from rpc thru.services.v1.CommandService.SendTransaction
|
|
73
|
+
*/
|
|
74
|
+
sendTransaction: {
|
|
75
|
+
methodKind: "unary";
|
|
76
|
+
input: typeof SendTransactionRequestSchema;
|
|
77
|
+
output: typeof SendTransactionResponseSchema;
|
|
78
|
+
},
|
|
79
|
+
}> = /*@__PURE__*/
|
|
80
|
+
serviceDesc(file_thru_services_v1_command_service, 0);
|
|
81
|
+
|