@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,100 +0,0 @@
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, syntax proto3)
3
- /* eslint-disable */
4
-
5
- import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
6
- import { 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 { Message } from "@bufbuild/protobuf";
10
-
11
- /**
12
- * Describes the file thru/core/v1/types.proto.
13
- */
14
- export const file_thru_core_v1_types: GenFile = /*@__PURE__*/
15
- fileDesc("Chh0aHJ1L2NvcmUvdjEvdHlwZXMucHJvdG8SDHRocnUuY29yZS52MSIjCgZQdWJrZXkSGQoFdmFsdWUYASABKAxCCuBBArpIBHoCaCAiIQoESGFzaBIZCgV2YWx1ZRgBIAEoDEIK4EECukgEegJoICImCglCbG9ja0hhc2gSGQoFdmFsdWUYASABKAxCCuBBArpIBHoCaEAiJgoJU2lnbmF0dXJlEhkKBXZhbHVlGAEgASgMQgrgQQK6SAR6AmhAQrkBChBjb20udGhydS5jb3JlLnYxQgpUeXBlc1Byb3RvUAFaQGdpdGh1Yi5jb20vVW50by1MYWJzL3RocnUtbmV0L2dycGMvcGtnL3Byb3RvL3RocnUvY29yZS92MTtjb3JldjGiAgNUQ1iqAgxUaHJ1LkNvcmUuVjG6AgRUSFVDygIMVGhydVxDb3JlXFYx4gIYVGhydVxDb3JlXFYxXEdQQk1ldGFkYXRh6gIOVGhydTo6Q29yZTo6VjFiBnByb3RvMw", [file_buf_validate_validate, file_google_api_field_behavior]);
16
-
17
- /**
18
- * Pubkey represents a 32-byte public key value.
19
- *
20
- * @generated from message thru.core.v1.Pubkey
21
- */
22
- export type Pubkey = Message<"thru.core.v1.Pubkey"> & {
23
- /**
24
- * 32-byte public key buffer.
25
- *
26
- * @generated from field: bytes value = 1;
27
- */
28
- value: Uint8Array;
29
- };
30
-
31
- /**
32
- * Describes the message thru.core.v1.Pubkey.
33
- * Use `create(PubkeySchema)` to create a new message.
34
- */
35
- export const PubkeySchema: GenMessage<Pubkey> = /*@__PURE__*/
36
- messageDesc(file_thru_core_v1_types, 0);
37
-
38
- /**
39
- * Hash represents a 32-byte hash value.
40
- *
41
- * @generated from message thru.core.v1.Hash
42
- */
43
- export type Hash = Message<"thru.core.v1.Hash"> & {
44
- /**
45
- * 32-byte hash buffer.
46
- *
47
- * @generated from field: bytes value = 1;
48
- */
49
- value: Uint8Array;
50
- };
51
-
52
- /**
53
- * Describes the message thru.core.v1.Hash.
54
- * Use `create(HashSchema)` to create a new message.
55
- */
56
- export const HashSchema: GenMessage<Hash> = /*@__PURE__*/
57
- messageDesc(file_thru_core_v1_types, 1);
58
-
59
- /**
60
- * BlockHash represents a 64-byte hash for block identifiers.
61
- *
62
- * @generated from message thru.core.v1.BlockHash
63
- */
64
- export type BlockHash = Message<"thru.core.v1.BlockHash"> & {
65
- /**
66
- * 64-byte block hash buffer.
67
- *
68
- * @generated from field: bytes value = 1;
69
- */
70
- value: Uint8Array;
71
- };
72
-
73
- /**
74
- * Describes the message thru.core.v1.BlockHash.
75
- * Use `create(BlockHashSchema)` to create a new message.
76
- */
77
- export const BlockHashSchema: GenMessage<BlockHash> = /*@__PURE__*/
78
- messageDesc(file_thru_core_v1_types, 2);
79
-
80
- /**
81
- * Signature represents a 64-byte signature value.
82
- *
83
- * @generated from message thru.core.v1.Signature
84
- */
85
- export type Signature = Message<"thru.core.v1.Signature"> & {
86
- /**
87
- * 64-byte signature buffer.
88
- *
89
- * @generated from field: bytes value = 1;
90
- */
91
- value: Uint8Array;
92
- };
93
-
94
- /**
95
- * Describes the message thru.core.v1.Signature.
96
- * Use `create(SignatureSchema)` to create a new message.
97
- */
98
- export const SignatureSchema: GenMessage<Signature> = /*@__PURE__*/
99
- messageDesc(file_thru_core_v1_types, 3);
100
-
@@ -1,146 +0,0 @@
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, syntax proto3)
3
- /* eslint-disable */
4
-
5
- import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
6
- import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
7
- import { file_google_api_annotations } from "../../../google/api/annotations_pb";
8
- import { file_google_api_client } from "../../../google/api/client_pb";
9
- import { file_google_api_field_behavior } from "../../../google/api/field_behavior_pb";
10
- import { file_thru_core_v1_transaction } from "../../core/v1/transaction_pb";
11
- import type { Signature } from "../../core/v1/types_pb";
12
- import { file_thru_core_v1_types } from "../../core/v1/types_pb";
13
- import type { Message } from "@bufbuild/protobuf";
14
-
15
- /**
16
- * Describes the file thru/services/v1/command_service.proto.
17
- */
18
- export const file_thru_services_v1_command_service: GenFile = /*@__PURE__*/
19
- fileDesc("CiZ0aHJ1L3NlcnZpY2VzL3YxL2NvbW1hbmRfc2VydmljZS5wcm90bxIQdGhydS5zZXJ2aWNlcy52MSI2ChZTZW5kVHJhbnNhY3Rpb25SZXF1ZXN0EhwKD3Jhd190cmFuc2FjdGlvbhgBIAEoDEID4EECIkoKF1NlbmRUcmFuc2FjdGlvblJlc3BvbnNlEi8KCXNpZ25hdHVyZRgBIAEoCzIXLnRocnUuY29yZS52MS5TaWduYXR1cmVCA+BBAiJSChxCYXRjaFNlbmRUcmFuc2FjdGlvbnNSZXF1ZXN0Eh0KEHJhd190cmFuc2FjdGlvbnMYASADKAxCA+BBAhITCgtudW1fcmV0cmllcxgCIAEoBSJoCh1CYXRjaFNlbmRUcmFuc2FjdGlvbnNSZXNwb25zZRIwCgpzaWduYXR1cmVzGAEgAygLMhcudGhydS5jb3JlLnYxLlNpZ25hdHVyZUID4EECEhUKCGFjY2VwdGVkGAIgAygIQgPgQQIyyQIKDkNvbW1hbmRTZXJ2aWNlEoMBCg9TZW5kVHJhbnNhY3Rpb24SKC50aHJ1LnNlcnZpY2VzLnYxLlNlbmRUcmFuc2FjdGlvblJlcXVlc3QaKS50aHJ1LnNlcnZpY2VzLnYxLlNlbmRUcmFuc2FjdGlvblJlc3BvbnNlIhuC0+STAhU6ASoiEC92MS90cmFuc2FjdGlvbnMSmwEKFUJhdGNoU2VuZFRyYW5zYWN0aW9ucxIuLnRocnUuc2VydmljZXMudjEuQmF0Y2hTZW5kVHJhbnNhY3Rpb25zUmVxdWVzdBovLnRocnUuc2VydmljZXMudjEuQmF0Y2hTZW5kVHJhbnNhY3Rpb25zUmVzcG9uc2UiIYLT5JMCGzoBKiIWL3YxL3RyYW5zYWN0aW9ucy9iYXRjaBoTykEQYXBpLnRocnUubmV0d29ya0LeAQoUY29tLnRocnUuc2VydmljZXMudjFCE0NvbW1hbmRTZXJ2aWNlUHJvdG9QAVpIZ2l0aHViLmNvbS9VbnRvLUxhYnMvdGhydS1uZXQvZ3JwYy9wa2cvcHJvdG8vdGhydS9zZXJ2aWNlcy92MTtzZXJ2aWNlc3YxogIDVFNYqgIQVGhydS5TZXJ2aWNlcy5WMboCBFRIVVPKAhBUaHJ1XFNlcnZpY2VzXFYx4gIcVGhydVxTZXJ2aWNlc1xWMVxHUEJNZXRhZGF0YeoCElRocnU6OlNlcnZpY2VzOjpWMWIGcHJvdG8z", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_thru_core_v1_transaction, file_thru_core_v1_types]);
20
-
21
- /**
22
- * SendTransactionRequest submits a transaction to the cluster.
23
- *
24
- * @generated from message thru.services.v1.SendTransactionRequest
25
- */
26
- export type SendTransactionRequest = Message<"thru.services.v1.SendTransactionRequest"> & {
27
- /**
28
- * Raw transaction bytes encoded according to chain specification.
29
- *
30
- * @generated from field: bytes raw_transaction = 1;
31
- */
32
- rawTransaction: Uint8Array;
33
- };
34
-
35
- /**
36
- * Describes the message thru.services.v1.SendTransactionRequest.
37
- * Use `create(SendTransactionRequestSchema)` to create a new message.
38
- */
39
- export const SendTransactionRequestSchema: GenMessage<SendTransactionRequest> = /*@__PURE__*/
40
- messageDesc(file_thru_services_v1_command_service, 0);
41
-
42
- /**
43
- * SendTransactionResponse echoes submission metadata.
44
- *
45
- * @generated from message thru.services.v1.SendTransactionResponse
46
- */
47
- export type SendTransactionResponse = Message<"thru.services.v1.SendTransactionResponse"> & {
48
- /**
49
- * @generated from field: thru.core.v1.Signature signature = 1;
50
- */
51
- signature?: Signature;
52
- };
53
-
54
- /**
55
- * Describes the message thru.services.v1.SendTransactionResponse.
56
- * Use `create(SendTransactionResponseSchema)` to create a new message.
57
- */
58
- export const SendTransactionResponseSchema: GenMessage<SendTransactionResponse> = /*@__PURE__*/
59
- messageDesc(file_thru_services_v1_command_service, 1);
60
-
61
- /**
62
- * BatchSendTransactionsRequest submits multiple transactions to the cluster.
63
- *
64
- * @generated from message thru.services.v1.BatchSendTransactionsRequest
65
- */
66
- export type BatchSendTransactionsRequest = Message<"thru.services.v1.BatchSendTransactionsRequest"> & {
67
- /**
68
- * List of raw transaction bytes encoded according to chain specification.
69
- *
70
- * @generated from field: repeated bytes raw_transactions = 1;
71
- */
72
- rawTransactions: Uint8Array[];
73
-
74
- /**
75
- * Number of retries for each transaction if not accepted by UDS (defaults to 0).
76
- *
77
- * @generated from field: int32 num_retries = 2;
78
- */
79
- numRetries: number;
80
- };
81
-
82
- /**
83
- * Describes the message thru.services.v1.BatchSendTransactionsRequest.
84
- * Use `create(BatchSendTransactionsRequestSchema)` to create a new message.
85
- */
86
- export const BatchSendTransactionsRequestSchema: GenMessage<BatchSendTransactionsRequest> = /*@__PURE__*/
87
- messageDesc(file_thru_services_v1_command_service, 2);
88
-
89
- /**
90
- * BatchSendTransactionsResponse returns submission results for each transaction.
91
- *
92
- * @generated from message thru.services.v1.BatchSendTransactionsResponse
93
- */
94
- export type BatchSendTransactionsResponse = Message<"thru.services.v1.BatchSendTransactionsResponse"> & {
95
- /**
96
- * Signatures for each transaction (in same order as request).
97
- *
98
- * @generated from field: repeated thru.core.v1.Signature signatures = 1;
99
- */
100
- signatures: Signature[];
101
-
102
- /**
103
- * Acceptance status for each transaction (true if accepted, false if not).
104
- *
105
- * @generated from field: repeated bool accepted = 2;
106
- */
107
- accepted: boolean[];
108
- };
109
-
110
- /**
111
- * Describes the message thru.services.v1.BatchSendTransactionsResponse.
112
- * Use `create(BatchSendTransactionsResponseSchema)` to create a new message.
113
- */
114
- export const BatchSendTransactionsResponseSchema: GenMessage<BatchSendTransactionsResponse> = /*@__PURE__*/
115
- messageDesc(file_thru_services_v1_command_service, 3);
116
-
117
- /**
118
- * CommandService defines transactional RPCs that mutate state or perform
119
- * expensive computations.
120
- *
121
- * @generated from service thru.services.v1.CommandService
122
- */
123
- export const CommandService: GenService<{
124
- /**
125
- * Submit a new transaction to the cluster.
126
- *
127
- * @generated from rpc thru.services.v1.CommandService.SendTransaction
128
- */
129
- sendTransaction: {
130
- methodKind: "unary";
131
- input: typeof SendTransactionRequestSchema;
132
- output: typeof SendTransactionResponseSchema;
133
- },
134
- /**
135
- * Submit multiple transactions to the cluster in batch.
136
- *
137
- * @generated from rpc thru.services.v1.CommandService.BatchSendTransactions
138
- */
139
- batchSendTransactions: {
140
- methodKind: "unary";
141
- input: typeof BatchSendTransactionsRequestSchema;
142
- output: typeof BatchSendTransactionsResponseSchema;
143
- },
144
- }> = /*@__PURE__*/
145
- serviceDesc(file_thru_services_v1_command_service, 0);
146
-