@clonegod/ttd-sui-common 1.0.6 → 1.0.8
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/dist/checkpoint_185049558.json +13761 -0
- package/dist/checkpoint_185049559.json +7487 -0
- package/dist/checkpoint_185071431_decoded.json +4996 -0
- package/dist/checkpoint_185071441_decoded.json +26073 -0
- package/dist/checkpoint_185071445_decoded.json +6731 -0
- package/dist/checkpoint_185071447_decoded.json +5477 -0
- package/dist/checkpoint_185071453_decoded.json +3382 -0
- package/dist/checkpoint_185071454_decoded.json +11236 -0
- package/dist/checkpoint_185071458_decoded.json +1546 -0
- package/dist/checkpoint_185071465_decoded.json +15284 -0
- package/dist/checkpoint_185071468_decoded.json +1616 -0
- package/dist/constants/index.d.ts +5 -0
- package/dist/constants/index.js +20 -0
- package/dist/grpc/grpc-connection.js +7 -1
- package/dist/grpc/protos/google/protobuf/any.proto +162 -0
- package/dist/grpc/protos/google/protobuf/duration.proto +115 -0
- package/dist/grpc/protos/google/protobuf/empty.proto +51 -0
- package/dist/grpc/protos/google/protobuf/field_mask.proto +245 -0
- package/dist/grpc/protos/google/protobuf/struct.proto +95 -0
- package/dist/grpc/protos/google/protobuf/timestamp.proto +144 -0
- package/dist/grpc/protos/google/rpc/error_details.proto +363 -0
- package/dist/grpc/protos/google/rpc/status.proto +49 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/README.md +123 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/argument.proto +34 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/balance_change.proto +18 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/bcs.proto +17 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/checkpoint.proto +32 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/checkpoint_contents.proto +34 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/checkpoint_summary.proto +102 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/effects.proto +154 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/epoch.proto +34 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/error_reason.proto +12 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/event.proto +44 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/executed_transaction.proto +51 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/execution_status.proto +374 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/gas_cost_summary.proto +19 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/input.proto +55 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/ledger_service.proto +165 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/live_data_service.proto +298 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/move_package.proto +238 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/move_package_service.proto +91 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/object.proto +62 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/object_reference.proto +16 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/owner.proto +25 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/protocol_config.proto +12 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/signature.proto +232 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/signature_scheme.proto +22 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/signature_verification_service.proto +49 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/subscription_service.proto +41 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/system_state.proto +340 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/transaction.proto +494 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/transaction_execution_service.proto +53 -0
- package/dist/grpc/subscription-service.js +11 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/test/test_checkpoint.d.ts +1 -0
- package/dist/test/test_checkpoint.js +70 -0
- package/dist/test/test_checkpoint_with_schema.d.ts +1 -0
- package/dist/test/test_checkpoint_with_schema.js +250 -0
- package/dist/test/test_dynamic_bcs.d.ts +1 -0
- package/dist/test/test_dynamic_bcs.js +82 -0
- package/dist/test/test_github_extractor.d.ts +1 -0
- package/dist/test/test_github_extractor.js +69 -0
- package/dist/test/test_grpc.js +0 -11
- package/dist/test/test_hybrid_bcs.d.ts +1 -0
- package/dist/test/test_hybrid_bcs.js +98 -0
- package/dist/test/test_schema_database.d.ts +1 -0
- package/dist/test/test_schema_database.js +91 -0
- package/dist/test/test_simple_schema.d.ts +1 -0
- package/dist/test/test_simple_schema.js +78 -0
- package/dist/utils/dex_event_parser.d.ts +34 -0
- package/dist/utils/dex_event_parser.js +132 -0
- package/dist/utils/dex_schema_database.d.ts +206 -0
- package/dist/utils/dex_schema_database.js +169 -0
- package/dist/utils/dynamic_bcs_parser.d.ts +21 -0
- package/dist/utils/dynamic_bcs_parser.js +166 -0
- package/dist/utils/github_schema_extractor.d.ts +20 -0
- package/dist/utils/github_schema_extractor.js +153 -0
- package/dist/utils/hybrid_bcs_parser.d.ts +22 -0
- package/dist/utils/hybrid_bcs_parser.js +194 -0
- package/dist/utils/simple_schema_parser.d.ts +76 -0
- package/dist/utils/simple_schema_parser.js +193 -0
- package/package.json +4 -3
- package/dist/parsed_swap_transactions_2025-08-30T12-11-48-744Z.json +0 -19215
- package/dist/parsed_swap_transactions_2025-08-30T12-51-39-586Z.json +0 -19309
- package/dist/parsed_swap_transactions_2025-08-30T13-58-34-579Z.json +0 -19005
- package/dist/swap_transactions_2025-08-30T12-05-49-140Z.json +0 -1384
- package/dist/swap_transactions_2025-08-30T12-05-51-529Z.json +0 -2907
- package/dist/swap_transactions_2025-08-30T12-05-54-042Z.json +0 -13392
- package/dist/swap_transactions_2025-08-30T12-05-56-880Z.json +0 -16210
- package/dist/swap_transactions_2025-08-30T12-05-59-588Z.json +0 -17993
- package/dist/swap_transactions_2025-08-30T12-05-59-597Z.json +0 -17993
- package/dist/transaction_28FaeTYoctpP1VdWCuyPxNEBeaMm3ebj27kdF5umi9YL.json +0 -4754
|
@@ -0,0 +1,95 @@
|
|
|
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/structpb";
|
|
37
|
+
option java_package = "com.google.protobuf";
|
|
38
|
+
option java_outer_classname = "StructProto";
|
|
39
|
+
option java_multiple_files = true;
|
|
40
|
+
option objc_class_prefix = "GPB";
|
|
41
|
+
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
|
|
42
|
+
|
|
43
|
+
// `Struct` represents a structured data value, consisting of fields
|
|
44
|
+
// which map to dynamically typed values. In some languages, `Struct`
|
|
45
|
+
// might be supported by a native representation. For example, in
|
|
46
|
+
// scripting languages like JS a struct is represented as an
|
|
47
|
+
// object. The details of that representation are described together
|
|
48
|
+
// with the proto support for the language.
|
|
49
|
+
//
|
|
50
|
+
// The JSON representation for `Struct` is JSON object.
|
|
51
|
+
message Struct {
|
|
52
|
+
// Unordered map of dynamically typed values.
|
|
53
|
+
map<string, Value> fields = 1;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// `Value` represents a dynamically typed value which can be either
|
|
57
|
+
// null, a number, a string, a boolean, a recursive struct value, or a
|
|
58
|
+
// list of values. A producer of value is expected to set one of these
|
|
59
|
+
// variants. Absence of any variant indicates an error.
|
|
60
|
+
//
|
|
61
|
+
// The JSON representation for `Value` is JSON value.
|
|
62
|
+
message Value {
|
|
63
|
+
// The kind of value.
|
|
64
|
+
oneof kind {
|
|
65
|
+
// Represents a null value.
|
|
66
|
+
NullValue null_value = 1;
|
|
67
|
+
// Represents a double value.
|
|
68
|
+
double number_value = 2;
|
|
69
|
+
// Represents a string value.
|
|
70
|
+
string string_value = 3;
|
|
71
|
+
// Represents a boolean value.
|
|
72
|
+
bool bool_value = 4;
|
|
73
|
+
// Represents a structured value.
|
|
74
|
+
Struct struct_value = 5;
|
|
75
|
+
// Represents a repeated `Value`.
|
|
76
|
+
ListValue list_value = 6;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// `NullValue` is a singleton enumeration to represent the null value for the
|
|
81
|
+
// `Value` type union.
|
|
82
|
+
//
|
|
83
|
+
// The JSON representation for `NullValue` is JSON `null`.
|
|
84
|
+
enum NullValue {
|
|
85
|
+
// Null value.
|
|
86
|
+
NULL_VALUE = 0;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// `ListValue` is a wrapper around a repeated field of values.
|
|
90
|
+
//
|
|
91
|
+
// The JSON representation for `ListValue` is JSON array.
|
|
92
|
+
message ListValue {
|
|
93
|
+
// Repeated field of dynamically typed values.
|
|
94
|
+
repeated Value values = 1;
|
|
95
|
+
}
|
|
@@ -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
|
+
}
|