@clonegod/ttd-sui-common 1.0.5 → 1.0.7

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 (73) hide show
  1. package/dist/grpc/protos/google/protobuf/any.proto +162 -0
  2. package/dist/grpc/protos/google/protobuf/duration.proto +115 -0
  3. package/dist/grpc/protos/google/protobuf/empty.proto +51 -0
  4. package/dist/grpc/protos/google/protobuf/field_mask.proto +245 -0
  5. package/dist/grpc/protos/google/protobuf/struct.proto +95 -0
  6. package/dist/grpc/protos/google/protobuf/timestamp.proto +144 -0
  7. package/dist/grpc/protos/google/rpc/error_details.proto +363 -0
  8. package/dist/grpc/protos/google/rpc/status.proto +49 -0
  9. package/dist/grpc/protos/sui/rpc/v2beta2/README.md +123 -0
  10. package/dist/grpc/protos/sui/rpc/v2beta2/argument.proto +34 -0
  11. package/dist/grpc/protos/sui/rpc/v2beta2/balance_change.proto +18 -0
  12. package/dist/grpc/protos/sui/rpc/v2beta2/bcs.proto +17 -0
  13. package/dist/grpc/protos/sui/rpc/v2beta2/checkpoint.proto +32 -0
  14. package/dist/grpc/protos/sui/rpc/v2beta2/checkpoint_contents.proto +34 -0
  15. package/dist/grpc/protos/sui/rpc/v2beta2/checkpoint_summary.proto +102 -0
  16. package/dist/grpc/protos/sui/rpc/v2beta2/effects.proto +154 -0
  17. package/dist/grpc/protos/sui/rpc/v2beta2/epoch.proto +34 -0
  18. package/dist/grpc/protos/sui/rpc/v2beta2/error_reason.proto +12 -0
  19. package/dist/grpc/protos/sui/rpc/v2beta2/event.proto +44 -0
  20. package/dist/grpc/protos/sui/rpc/v2beta2/executed_transaction.proto +51 -0
  21. package/dist/grpc/protos/sui/rpc/v2beta2/execution_status.proto +374 -0
  22. package/dist/grpc/protos/sui/rpc/v2beta2/gas_cost_summary.proto +19 -0
  23. package/dist/grpc/protos/sui/rpc/v2beta2/input.proto +55 -0
  24. package/dist/grpc/protos/sui/rpc/v2beta2/ledger_service.proto +165 -0
  25. package/dist/grpc/protos/sui/rpc/v2beta2/live_data_service.proto +298 -0
  26. package/dist/grpc/protos/sui/rpc/v2beta2/move_package.proto +238 -0
  27. package/dist/grpc/protos/sui/rpc/v2beta2/move_package_service.proto +91 -0
  28. package/dist/grpc/protos/sui/rpc/v2beta2/object.proto +62 -0
  29. package/dist/grpc/protos/sui/rpc/v2beta2/object_reference.proto +16 -0
  30. package/dist/grpc/protos/sui/rpc/v2beta2/owner.proto +25 -0
  31. package/dist/grpc/protos/sui/rpc/v2beta2/protocol_config.proto +12 -0
  32. package/dist/grpc/protos/sui/rpc/v2beta2/signature.proto +232 -0
  33. package/dist/grpc/protos/sui/rpc/v2beta2/signature_scheme.proto +22 -0
  34. package/dist/grpc/protos/sui/rpc/v2beta2/signature_verification_service.proto +49 -0
  35. package/dist/grpc/protos/sui/rpc/v2beta2/subscription_service.proto +41 -0
  36. package/dist/grpc/protos/sui/rpc/v2beta2/system_state.proto +340 -0
  37. package/dist/grpc/protos/sui/rpc/v2beta2/transaction.proto +494 -0
  38. package/dist/grpc/protos/sui/rpc/v2beta2/transaction_execution_service.proto +53 -0
  39. package/dist/index.d.ts +2 -0
  40. package/dist/index.js +2 -0
  41. package/dist/parsed_swap_transactions_2025-08-30T12-11-48-744Z.json +19215 -0
  42. package/dist/parsed_swap_transactions_2025-08-30T12-51-39-586Z.json +19309 -0
  43. package/dist/parsed_swap_transactions_2025-08-30T13-58-34-579Z.json +19005 -0
  44. package/dist/swap_transactions_2025-08-30T12-05-49-140Z.json +1384 -0
  45. package/dist/swap_transactions_2025-08-30T12-05-51-529Z.json +2907 -0
  46. package/dist/swap_transactions_2025-08-30T12-05-54-042Z.json +13392 -0
  47. package/dist/swap_transactions_2025-08-30T12-05-56-880Z.json +16210 -0
  48. package/dist/swap_transactions_2025-08-30T12-05-59-588Z.json +17993 -0
  49. package/dist/swap_transactions_2025-08-30T12-05-59-597Z.json +17993 -0
  50. package/dist/test/test_checkpoint_processor.d.ts +1 -0
  51. package/dist/test/test_checkpoint_processor.js +112 -0
  52. package/dist/test/test_checkpoint_subscription.d.ts +1 -0
  53. package/dist/test/test_checkpoint_subscription.js +132 -0
  54. package/dist/test/test_grpc.js +1 -1
  55. package/dist/test/test_momentum_events.d.ts +1 -0
  56. package/dist/test/test_momentum_events.js +113 -0
  57. package/dist/test/test_single_momentum_event.d.ts +1 -0
  58. package/dist/test/test_single_momentum_event.js +44 -0
  59. package/dist/type/index.d.ts +45 -0
  60. package/dist/type/index.js +2 -0
  61. package/dist/utils/bcs-parser.d.ts +8 -0
  62. package/dist/utils/bcs-parser.js +121 -0
  63. package/dist/utils/checkpoint-processor.d.ts +7 -0
  64. package/dist/utils/checkpoint-processor.js +123 -0
  65. package/dist/utils/checkpoint_parse.d.ts +26 -0
  66. package/dist/utils/checkpoint_parse.js +277 -0
  67. package/dist/utils/decode.d.ts +2 -0
  68. package/dist/utils/decode.js +43 -0
  69. package/dist/utils/dex-parser-manager.d.ts +7 -0
  70. package/dist/utils/dex-parser-manager.js +138 -0
  71. package/dist/utils/index.d.ts +2 -2
  72. package/dist/utils/index.js +16 -41
  73. package/package.json +4 -2
@@ -0,0 +1,144 @@
1
+ // Protocol Buffers - Google's data interchange format
2
+ // Copyright 2008 Google Inc. All rights reserved.
3
+ // https://developers.google.com/protocol-buffers/
4
+ //
5
+ // Redistribution and use in source and binary forms, with or without
6
+ // modification, are permitted provided that the following conditions are
7
+ // met:
8
+ //
9
+ // * Redistributions of source code must retain the above copyright
10
+ // notice, this list of conditions and the following disclaimer.
11
+ // * Redistributions in binary form must reproduce the above
12
+ // copyright notice, this list of conditions and the following disclaimer
13
+ // in the documentation and/or other materials provided with the
14
+ // distribution.
15
+ // * Neither the name of Google Inc. nor the names of its
16
+ // contributors may be used to endorse or promote products derived from
17
+ // this software without specific prior written permission.
18
+ //
19
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20
+ // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21
+ // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22
+ // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23
+ // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24
+ // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25
+ // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26
+ // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27
+ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28
+ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
+
31
+ syntax = "proto3";
32
+
33
+ package google.protobuf;
34
+
35
+ option cc_enable_arenas = true;
36
+ option go_package = "google.golang.org/protobuf/types/known/timestamppb";
37
+ option java_package = "com.google.protobuf";
38
+ option java_outer_classname = "TimestampProto";
39
+ option java_multiple_files = true;
40
+ option objc_class_prefix = "GPB";
41
+ option csharp_namespace = "Google.Protobuf.WellKnownTypes";
42
+
43
+ // A Timestamp represents a point in time independent of any time zone or local
44
+ // calendar, encoded as a count of seconds and fractions of seconds at
45
+ // nanosecond resolution. The count is relative to an epoch at UTC midnight on
46
+ // January 1, 1970, in the proleptic Gregorian calendar which extends the
47
+ // Gregorian calendar backwards to year one.
48
+ //
49
+ // All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
50
+ // second table is needed for interpretation, using a [24-hour linear
51
+ // smear](https://developers.google.com/time/smear).
52
+ //
53
+ // The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
54
+ // restricting to that range, we ensure that we can convert to and from [RFC
55
+ // 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
56
+ //
57
+ // # Examples
58
+ //
59
+ // Example 1: Compute Timestamp from POSIX `time()`.
60
+ //
61
+ // Timestamp timestamp;
62
+ // timestamp.set_seconds(time(NULL));
63
+ // timestamp.set_nanos(0);
64
+ //
65
+ // Example 2: Compute Timestamp from POSIX `gettimeofday()`.
66
+ //
67
+ // struct timeval tv;
68
+ // gettimeofday(&tv, NULL);
69
+ //
70
+ // Timestamp timestamp;
71
+ // timestamp.set_seconds(tv.tv_sec);
72
+ // timestamp.set_nanos(tv.tv_usec * 1000);
73
+ //
74
+ // Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
75
+ //
76
+ // FILETIME ft;
77
+ // GetSystemTimeAsFileTime(&ft);
78
+ // UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
79
+ //
80
+ // // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
81
+ // // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
82
+ // Timestamp timestamp;
83
+ // timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
84
+ // timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
85
+ //
86
+ // Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
87
+ //
88
+ // long millis = System.currentTimeMillis();
89
+ //
90
+ // Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
91
+ // .setNanos((int) ((millis % 1000) * 1000000)).build();
92
+ //
93
+ // Example 5: Compute Timestamp from Java `Instant.now()`.
94
+ //
95
+ // Instant now = Instant.now();
96
+ //
97
+ // Timestamp timestamp =
98
+ // Timestamp.newBuilder().setSeconds(now.getEpochSecond())
99
+ // .setNanos(now.getNano()).build();
100
+ //
101
+ // Example 6: Compute Timestamp from current time in Python.
102
+ //
103
+ // timestamp = Timestamp()
104
+ // timestamp.GetCurrentTime()
105
+ //
106
+ // # JSON Mapping
107
+ //
108
+ // In JSON format, the Timestamp type is encoded as a string in the
109
+ // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
110
+ // format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
111
+ // where {year} is always expressed using four digits while {month}, {day},
112
+ // {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
113
+ // seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
114
+ // are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
115
+ // is required. A proto3 JSON serializer should always use UTC (as indicated by
116
+ // "Z") when printing the Timestamp type and a proto3 JSON parser should be
117
+ // able to accept both UTC and other timezones (as indicated by an offset).
118
+ //
119
+ // For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
120
+ // 01:30 UTC on January 15, 2017.
121
+ //
122
+ // In JavaScript, one can convert a Date object to this format using the
123
+ // standard
124
+ // [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
125
+ // method. In Python, a standard `datetime.datetime` object can be converted
126
+ // to this format using
127
+ // [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
128
+ // the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
129
+ // the Joda Time's [`ISODateTimeFormat.dateTime()`](
130
+ // http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
131
+ // ) to obtain a formatter capable of generating timestamps in this format.
132
+ //
133
+ message Timestamp {
134
+ // Represents seconds of UTC time since Unix epoch
135
+ // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
136
+ // 9999-12-31T23:59:59Z inclusive.
137
+ int64 seconds = 1;
138
+
139
+ // Non-negative fractions of a second at nanosecond resolution. Negative
140
+ // second values with fractions must still have non-negative nanos values
141
+ // that count forward in time. Must be from 0 to 999,999,999
142
+ // inclusive.
143
+ int32 nanos = 2;
144
+ }
@@ -0,0 +1,363 @@
1
+ // Copyright 2025 Google LLC
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ syntax = "proto3";
16
+
17
+ package google.rpc;
18
+
19
+ import "google/protobuf/duration.proto";
20
+
21
+ option go_package = "google.golang.org/genproto/googleapis/rpc/errdetails;errdetails";
22
+ option java_multiple_files = true;
23
+ option java_outer_classname = "ErrorDetailsProto";
24
+ option java_package = "com.google.rpc";
25
+ option objc_class_prefix = "RPC";
26
+
27
+ // Describes the cause of the error with structured details.
28
+ //
29
+ // Example of an error when contacting the "pubsub.googleapis.com" API when it
30
+ // is not enabled:
31
+ //
32
+ // { "reason": "API_DISABLED"
33
+ // "domain": "googleapis.com"
34
+ // "metadata": {
35
+ // "resource": "projects/123",
36
+ // "service": "pubsub.googleapis.com"
37
+ // }
38
+ // }
39
+ //
40
+ // This response indicates that the pubsub.googleapis.com API is not enabled.
41
+ //
42
+ // Example of an error that is returned when attempting to create a Spanner
43
+ // instance in a region that is out of stock:
44
+ //
45
+ // { "reason": "STOCKOUT"
46
+ // "domain": "spanner.googleapis.com",
47
+ // "metadata": {
48
+ // "availableRegions": "us-central1,us-east2"
49
+ // }
50
+ // }
51
+ message ErrorInfo {
52
+ // The reason of the error. This is a constant value that identifies the
53
+ // proximate cause of the error. Error reasons are unique within a particular
54
+ // domain of errors. This should be at most 63 characters and match a
55
+ // regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, which represents
56
+ // UPPER_SNAKE_CASE.
57
+ string reason = 1;
58
+
59
+ // The logical grouping to which the "reason" belongs. The error domain
60
+ // is typically the registered service name of the tool or product that
61
+ // generates the error. Example: "pubsub.googleapis.com". If the error is
62
+ // generated by some common infrastructure, the error domain must be a
63
+ // globally unique value that identifies the infrastructure. For Google API
64
+ // infrastructure, the error domain is "googleapis.com".
65
+ string domain = 2;
66
+
67
+ // Additional structured details about this error.
68
+ //
69
+ // Keys must match a regular expression of `[a-z][a-zA-Z0-9-_]+` but should
70
+ // ideally be lowerCamelCase. Also, they must be limited to 64 characters in
71
+ // length. When identifying the current value of an exceeded limit, the units
72
+ // should be contained in the key, not the value. For example, rather than
73
+ // `{"instanceLimit": "100/request"}`, should be returned as,
74
+ // `{"instanceLimitPerRequest": "100"}`, if the client exceeds the number of
75
+ // instances that can be created in a single (batch) request.
76
+ map<string, string> metadata = 3;
77
+ }
78
+
79
+ // Describes when the clients can retry a failed request. Clients could ignore
80
+ // the recommendation here or retry when this information is missing from error
81
+ // responses.
82
+ //
83
+ // It's always recommended that clients should use exponential backoff when
84
+ // retrying.
85
+ //
86
+ // Clients should wait until `retry_delay` amount of time has passed since
87
+ // receiving the error response before retrying. If retrying requests also
88
+ // fail, clients should use an exponential backoff scheme to gradually increase
89
+ // the delay between retries based on `retry_delay`, until either a maximum
90
+ // number of retries have been reached or a maximum retry delay cap has been
91
+ // reached.
92
+ message RetryInfo {
93
+ // Clients should wait at least this long between retrying the same request.
94
+ google.protobuf.Duration retry_delay = 1;
95
+ }
96
+
97
+ // Describes additional debugging info.
98
+ message DebugInfo {
99
+ // The stack trace entries indicating where the error occurred.
100
+ repeated string stack_entries = 1;
101
+
102
+ // Additional debugging information provided by the server.
103
+ string detail = 2;
104
+ }
105
+
106
+ // Describes how a quota check failed.
107
+ //
108
+ // For example if a daily limit was exceeded for the calling project,
109
+ // a service could respond with a QuotaFailure detail containing the project
110
+ // id and the description of the quota limit that was exceeded. If the
111
+ // calling project hasn't enabled the service in the developer console, then
112
+ // a service could respond with the project id and set `service_disabled`
113
+ // to true.
114
+ //
115
+ // Also see RetryInfo and Help types for other details about handling a
116
+ // quota failure.
117
+ message QuotaFailure {
118
+ // A message type used to describe a single quota violation. For example, a
119
+ // daily quota or a custom quota that was exceeded.
120
+ message Violation {
121
+ // The subject on which the quota check failed.
122
+ // For example, "clientip:<ip address of client>" or "project:<Google
123
+ // developer project id>".
124
+ string subject = 1;
125
+
126
+ // A description of how the quota check failed. Clients can use this
127
+ // description to find more about the quota configuration in the service's
128
+ // public documentation, or find the relevant quota limit to adjust through
129
+ // developer console.
130
+ //
131
+ // For example: "Service disabled" or "Daily Limit for read operations
132
+ // exceeded".
133
+ string description = 2;
134
+
135
+ // The API Service from which the `QuotaFailure.Violation` orginates. In
136
+ // some cases, Quota issues originate from an API Service other than the one
137
+ // that was called. In other words, a dependency of the called API Service
138
+ // could be the cause of the `QuotaFailure`, and this field would have the
139
+ // dependency API service name.
140
+ //
141
+ // For example, if the called API is Kubernetes Engine API
142
+ // (container.googleapis.com), and a quota violation occurs in the
143
+ // Kubernetes Engine API itself, this field would be
144
+ // "container.googleapis.com". On the other hand, if the quota violation
145
+ // occurs when the Kubernetes Engine API creates VMs in the Compute Engine
146
+ // API (compute.googleapis.com), this field would be
147
+ // "compute.googleapis.com".
148
+ string api_service = 3;
149
+
150
+ // The metric of the violated quota. A quota metric is a named counter to
151
+ // measure usage, such as API requests or CPUs. When an activity occurs in a
152
+ // service, such as Virtual Machine allocation, one or more quota metrics
153
+ // may be affected.
154
+ //
155
+ // For example, "compute.googleapis.com/cpus_per_vm_family",
156
+ // "storage.googleapis.com/internet_egress_bandwidth".
157
+ string quota_metric = 4;
158
+
159
+ // The id of the violated quota. Also know as "limit name", this is the
160
+ // unique identifier of a quota in the context of an API service.
161
+ //
162
+ // For example, "CPUS-PER-VM-FAMILY-per-project-region".
163
+ string quota_id = 5;
164
+
165
+ // The dimensions of the violated quota. Every non-global quota is enforced
166
+ // on a set of dimensions. While quota metric defines what to count, the
167
+ // dimensions specify for what aspects the counter should be increased.
168
+ //
169
+ // For example, the quota "CPUs per region per VM family" enforces a limit
170
+ // on the metric "compute.googleapis.com/cpus_per_vm_family" on dimensions
171
+ // "region" and "vm_family". And if the violation occurred in region
172
+ // "us-central1" and for VM family "n1", the quota_dimensions would be,
173
+ //
174
+ // {
175
+ // "region": "us-central1",
176
+ // "vm_family": "n1",
177
+ // }
178
+ //
179
+ // When a quota is enforced globally, the quota_dimensions would always be
180
+ // empty.
181
+ map<string, string> quota_dimensions = 6;
182
+
183
+ // The enforced quota value at the time of the `QuotaFailure`.
184
+ //
185
+ // For example, if the enforced quota value at the time of the
186
+ // `QuotaFailure` on the number of CPUs is "10", then the value of this
187
+ // field would reflect this quantity.
188
+ int64 quota_value = 7;
189
+
190
+ // The new quota value being rolled out at the time of the violation. At the
191
+ // completion of the rollout, this value will be enforced in place of
192
+ // quota_value. If no rollout is in progress at the time of the violation,
193
+ // this field is not set.
194
+ //
195
+ // For example, if at the time of the violation a rollout is in progress
196
+ // changing the number of CPUs quota from 10 to 20, 20 would be the value of
197
+ // this field.
198
+ optional int64 future_quota_value = 8;
199
+ }
200
+
201
+ // Describes all quota violations.
202
+ repeated Violation violations = 1;
203
+ }
204
+
205
+ // Describes what preconditions have failed.
206
+ //
207
+ // For example, if an RPC failed because it required the Terms of Service to be
208
+ // acknowledged, it could list the terms of service violation in the
209
+ // PreconditionFailure message.
210
+ message PreconditionFailure {
211
+ // A message type used to describe a single precondition failure.
212
+ message Violation {
213
+ // The type of PreconditionFailure. We recommend using a service-specific
214
+ // enum type to define the supported precondition violation subjects. For
215
+ // example, "TOS" for "Terms of Service violation".
216
+ string type = 1;
217
+
218
+ // The subject, relative to the type, that failed.
219
+ // For example, "google.com/cloud" relative to the "TOS" type would indicate
220
+ // which terms of service is being referenced.
221
+ string subject = 2;
222
+
223
+ // A description of how the precondition failed. Developers can use this
224
+ // description to understand how to fix the failure.
225
+ //
226
+ // For example: "Terms of service not accepted".
227
+ string description = 3;
228
+ }
229
+
230
+ // Describes all precondition violations.
231
+ repeated Violation violations = 1;
232
+ }
233
+
234
+ // Describes violations in a client request. This error type focuses on the
235
+ // syntactic aspects of the request.
236
+ message BadRequest {
237
+ // A message type used to describe a single bad request field.
238
+ message FieldViolation {
239
+ // A path that leads to a field in the request body. The value will be a
240
+ // sequence of dot-separated identifiers that identify a protocol buffer
241
+ // field.
242
+ //
243
+ // Consider the following:
244
+ //
245
+ // message CreateContactRequest {
246
+ // message EmailAddress {
247
+ // enum Type {
248
+ // TYPE_UNSPECIFIED = 0;
249
+ // HOME = 1;
250
+ // WORK = 2;
251
+ // }
252
+ //
253
+ // optional string email = 1;
254
+ // repeated EmailType type = 2;
255
+ // }
256
+ //
257
+ // string full_name = 1;
258
+ // repeated EmailAddress email_addresses = 2;
259
+ // }
260
+ //
261
+ // In this example, in proto `field` could take one of the following values:
262
+ //
263
+ // * `full_name` for a violation in the `full_name` value
264
+ // * `email_addresses[1].email` for a violation in the `email` field of the
265
+ // first `email_addresses` message
266
+ // * `email_addresses[3].type[2]` for a violation in the second `type`
267
+ // value in the third `email_addresses` message.
268
+ //
269
+ // In JSON, the same values are represented as:
270
+ //
271
+ // * `fullName` for a violation in the `fullName` value
272
+ // * `emailAddresses[1].email` for a violation in the `email` field of the
273
+ // first `emailAddresses` message
274
+ // * `emailAddresses[3].type[2]` for a violation in the second `type`
275
+ // value in the third `emailAddresses` message.
276
+ string field = 1;
277
+
278
+ // A description of why the request element is bad.
279
+ string description = 2;
280
+
281
+ // The reason of the field-level error. This is a constant value that
282
+ // identifies the proximate cause of the field-level error. It should
283
+ // uniquely identify the type of the FieldViolation within the scope of the
284
+ // google.rpc.ErrorInfo.domain. This should be at most 63
285
+ // characters and match a regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`,
286
+ // which represents UPPER_SNAKE_CASE.
287
+ string reason = 3;
288
+
289
+ // Provides a localized error message for field-level errors that is safe to
290
+ // return to the API consumer.
291
+ LocalizedMessage localized_message = 4;
292
+ }
293
+
294
+ // Describes all violations in a client request.
295
+ repeated FieldViolation field_violations = 1;
296
+ }
297
+
298
+ // Contains metadata about the request that clients can attach when filing a bug
299
+ // or providing other forms of feedback.
300
+ message RequestInfo {
301
+ // An opaque string that should only be interpreted by the service generating
302
+ // it. For example, it can be used to identify requests in the service's logs.
303
+ string request_id = 1;
304
+
305
+ // Any data that was used to serve this request. For example, an encrypted
306
+ // stack trace that can be sent back to the service provider for debugging.
307
+ string serving_data = 2;
308
+ }
309
+
310
+ // Describes the resource that is being accessed.
311
+ message ResourceInfo {
312
+ // A name for the type of resource being accessed, e.g. "sql table",
313
+ // "cloud storage bucket", "file", "Google calendar"; or the type URL
314
+ // of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic".
315
+ string resource_type = 1;
316
+
317
+ // The name of the resource being accessed. For example, a shared calendar
318
+ // name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current
319
+ // error is
320
+ // [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
321
+ string resource_name = 2;
322
+
323
+ // The owner of the resource (optional).
324
+ // For example, "user:<owner email>" or "project:<Google developer project
325
+ // id>".
326
+ string owner = 3;
327
+
328
+ // Describes what error is encountered when accessing this resource.
329
+ // For example, updating a cloud project may require the `writer` permission
330
+ // on the developer console project.
331
+ string description = 4;
332
+ }
333
+
334
+ // Provides links to documentation or for performing an out of band action.
335
+ //
336
+ // For example, if a quota check failed with an error indicating the calling
337
+ // project hasn't enabled the accessed service, this can contain a URL pointing
338
+ // directly to the right place in the developer console to flip the bit.
339
+ message Help {
340
+ // Describes a URL link.
341
+ message Link {
342
+ // Describes what the link offers.
343
+ string description = 1;
344
+
345
+ // The URL of the link.
346
+ string url = 2;
347
+ }
348
+
349
+ // URL(s) pointing to additional information on handling the current error.
350
+ repeated Link links = 1;
351
+ }
352
+
353
+ // Provides a localized error message that is safe to return to the user
354
+ // which can be attached to an RPC error.
355
+ message LocalizedMessage {
356
+ // The locale used following the specification defined at
357
+ // https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
358
+ // Examples are: "en-US", "fr-CH", "es-MX"
359
+ string locale = 1;
360
+
361
+ // The localized error message in the above locale.
362
+ string message = 2;
363
+ }
@@ -0,0 +1,49 @@
1
+ // Copyright 2025 Google LLC
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ syntax = "proto3";
16
+
17
+ package google.rpc;
18
+
19
+ import "google/protobuf/any.proto";
20
+
21
+ option cc_enable_arenas = true;
22
+ option go_package = "google.golang.org/genproto/googleapis/rpc/status;status";
23
+ option java_multiple_files = true;
24
+ option java_outer_classname = "StatusProto";
25
+ option java_package = "com.google.rpc";
26
+ option objc_class_prefix = "RPC";
27
+
28
+ // The `Status` type defines a logical error model that is suitable for
29
+ // different programming environments, including REST APIs and RPC APIs. It is
30
+ // used by [gRPC](https://github.com/grpc). Each `Status` message contains
31
+ // three pieces of data: error code, error message, and error details.
32
+ //
33
+ // You can find out more about this error model and how to work with it in the
34
+ // [API Design Guide](https://cloud.google.com/apis/design/errors).
35
+ message Status {
36
+ // The status code, which should be an enum value of
37
+ // [google.rpc.Code][google.rpc.Code].
38
+ int32 code = 1;
39
+
40
+ // A developer-facing error message, which should be in English. Any
41
+ // user-facing error message should be localized and sent in the
42
+ // [google.rpc.Status.details][google.rpc.Status.details] field, or localized
43
+ // by the client.
44
+ string message = 2;
45
+
46
+ // A list of messages that carry the error details. There is a common set of
47
+ // message types for APIs to use.
48
+ repeated google.protobuf.Any details = 3;
49
+ }
@@ -0,0 +1,123 @@
1
+ ## Overview
2
+ This package defines a number of APIs for interacting with services in the Sui
3
+ ecosystem. Some of the below API semantics and guidelines are inspired by
4
+ [Google's AIPs](https://google.aip.dev/) and apply to all services in this
5
+ package. For information on the individual services themselves, see their
6
+ definitions:
7
+
8
+ - [`LedgerService`](./ledger_service.proto)
9
+ - [`LiveDataService`](./live_data_service.proto)
10
+ - [`MovePackageService`](./move_package_service.proto.proto)
11
+ - [`SignatureVerificationService`](./signature_verification_service.proto)
12
+ - [`SubscriptionService`](./subscription_service.proto.proto)
13
+ - [`TransactionExecutionService`](./transaction_execution_service.proto.proto)
14
+
15
+ ## Encoding
16
+ In order to improve usability of these APIs a number of identifiers are
17
+ encoding in messages in this package using their human-readable string
18
+ representations instead of a more compact bytes representation.
19
+
20
+ - `Address` and `ObjectId`: Represented as 64 hexadecimal characters with a
21
+ leading `0x`.
22
+ - `Digest`s: Represented as
23
+ [Base58](https://learnmeabitcoin.com/technical/keys/base58/).
24
+ - `TypeTag` and `StructTag`: Represented in their canonical string format (for
25
+ example,
26
+ `0x0000000000000000000000000000000000000000000000000000000000000002::coin::Coin<0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI>`)
27
+
28
+ ## Field Masks and Partial Responses
29
+ Some APIs may return resources that are either larger or expensive to compute
30
+ and the API may want to give the user control over which fields it returns.
31
+
32
+ In such circumstances Field Masks
33
+ [(google.protobuf.FieldMask)](../../../google/protobuf/field_mask.proto) can be
34
+ used for granting the user fine-grained control over what fields are returned.
35
+
36
+ For APIs where Field Masks are supported:
37
+
38
+ - The field masks must be a google.protobuf.FieldMask and should be named
39
+ `read_mask`.
40
+ - The field mask parameter must be optional:
41
+ - An explicit value of `"*"` should be supported, and must return all
42
+ fields.
43
+ - If the field mask parameter is omitted, it must default to `"*"`, unless
44
+ otherwise documented.
45
+ - An API may allow read masks with non-terminal repeated fields (counter to the
46
+ documentation on Field Masks).
47
+
48
+ ## Pagination
49
+ Some APIs often need to provide collections of data. However, collections can
50
+ often be arbitrarily sized, and also often grow over time, increasing lookup
51
+ time as well as the size of the responses being sent over the wire. Therefore,
52
+ it is important that such APIs listing over a collection be paginated.
53
+
54
+ APIs returning collections of data must provide pagination at the outset, as it
55
+ is a backwards-incompatible change to add pagination to an existing method.
56
+
57
+ - Request messages for collections should define an `uint32 page_size` field,
58
+ allowing users to specify the maximum number of results to return.
59
+ - The `page_size` field must not be required.
60
+ - If the user does not specify `page_size` (or specifies `0`), the API
61
+ chooses an appropriate default, which the API should document. The API
62
+ must not return an error.
63
+ - If the user specifies `page_size` greater than the maximum permitted by
64
+ the API, the API should coerce down to the maximum permitted page size.
65
+ - The API may return fewer results than the number requested (including
66
+ zero results), even if not at the end of the collection.
67
+ - Request messages for collections should define a `bytes page_token` field,
68
+ allowing users to advance to the next page in the collection.
69
+ - The `page_token` field must not be required.
70
+ - If the user changes the `page_size` in a request for subsequent pages,
71
+ the service must honor the new page size.
72
+ - The user is expected to keep all other arguments to the RPC the same; if
73
+ any arguments are different, the API should send an `INVALID_ARGUMENT`
74
+ error.
75
+ - Response messages for collections should define a `bytes next_page_token`
76
+ field, providing the user with a page token that may be used to retrieve the
77
+ next page.
78
+ - The field containing pagination results should be the first field in the
79
+ message and have a field number of `1`. It should be a repeated field
80
+ containing a list of resources constituting a single page of results.
81
+ - If the end of the collection has been reached, the `next_page_token`
82
+ field must be empty. This is the only way to communicate
83
+ "end-of-collection" to users.
84
+ - If the end of the collection has not been reached (or if the API can not
85
+ determine in time), the API must provide a `next_page_token`.
86
+
87
+ ## Field Presence
88
+ The proto files used in this package for message and service definitions are
89
+ all defined using protobuf version 3 (`proto3`). In `proto3`, fields that are
90
+ primitives (that is, they are not a `message`) and are not present on the wire
91
+ are zero-initialized. To gain the ability to detect [field
92
+ presence](https://github.com/protocolbuffers/protobuf/blob/main/docs/field_presence.md),
93
+ these definitions follow the convention of having all fields marked `optional`,
94
+ and wrapping `repeated` fields in a message as needed.
95
+
96
+ ## Errors
97
+ The services defined in this package support the [richer error
98
+ model](https://grpc.io/docs/guides/error/#richer-error-model) following [AIP
99
+ 193](https://google.aip.dev/193). In particular, when an RPC returns a response
100
+ with a non-OK status code, richer error information can generally be found by
101
+ looking at the `grpc-status-details-bin` header which contains a
102
+ [google.rpc.Status](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto)
103
+ message encoded in Base64.
104
+
105
+ ## HTTP Headers
106
+ Implementations of the services defined in this package should set the
107
+ following HTTP headers in responses where possible:
108
+
109
+ - `x-sui-chain-id`: Chain Id of the current chain
110
+ - `x-sui-chain`: Human-readable name of the current chain
111
+ - `x-sui-checkpoint-height`: Current checkpoint height
112
+ - `x-sui-lowest-available-checkpoint`: Lowest available checkpoint for which
113
+ transaction and checkpoint data can be requested. Specifically this is the
114
+ lowest checkpoint for which the following data can be requested: checkpoints,
115
+ transactions, effects and events.
116
+ - `x-sui-lowest-available-checkpoint-objects`: Lowest available checkpoint for
117
+ which object data can be requested. Specifically this is the lowest
118
+ checkpoint for which input/output object data will be available.
119
+ - `x-sui-epoch`: Current epoch of the chain.
120
+ - `x-sui-timestamp-ms`: Current timestamp of the chain, represented as number
121
+ of milliseconds from the Unix epoch.
122
+ - `x-sui-timestamp`: Current timestamp of the chain, encoded in the
123
+ [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format.