@clonegod/ttd-sui-common 1.0.6 → 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.
- 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/package.json +3 -2
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
// Copyright (c) Mysten Labs, Inc.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
syntax = "proto3";
|
|
5
|
+
|
|
6
|
+
package sui.rpc.v2beta2;
|
|
7
|
+
|
|
8
|
+
import "google/protobuf/field_mask.proto";
|
|
9
|
+
import "google/protobuf/struct.proto";
|
|
10
|
+
import "sui/rpc/v2beta2/argument.proto";
|
|
11
|
+
import "sui/rpc/v2beta2/bcs.proto";
|
|
12
|
+
import "sui/rpc/v2beta2/executed_transaction.proto";
|
|
13
|
+
import "sui/rpc/v2beta2/object.proto";
|
|
14
|
+
import "sui/rpc/v2beta2/transaction.proto";
|
|
15
|
+
|
|
16
|
+
service LiveDataService {
|
|
17
|
+
rpc ListDynamicFields(ListDynamicFieldsRequest) returns (ListDynamicFieldsResponse);
|
|
18
|
+
rpc ListOwnedObjects(ListOwnedObjectsRequest) returns (ListOwnedObjectsResponse);
|
|
19
|
+
rpc GetCoinInfo(GetCoinInfoRequest) returns (GetCoinInfoResponse);
|
|
20
|
+
rpc GetBalance(GetBalanceRequest) returns (GetBalanceResponse);
|
|
21
|
+
rpc ListBalances(ListBalancesRequest) returns (ListBalancesResponse);
|
|
22
|
+
|
|
23
|
+
rpc SimulateTransaction(SimulateTransactionRequest) returns (SimulateTransactionResponse);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// Request message for `NodeService.GetCoinInfo`.
|
|
27
|
+
message GetCoinInfoRequest {
|
|
28
|
+
// The coin type to request information about
|
|
29
|
+
optional string coin_type = 1;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Response message for `NodeService.GetCoinInfo`.
|
|
33
|
+
message GetCoinInfoResponse {
|
|
34
|
+
// Required. The coin type.
|
|
35
|
+
optional string coin_type = 1;
|
|
36
|
+
|
|
37
|
+
// This field will be populated with information about this coin
|
|
38
|
+
// type's `0x2::coin::CoinMetadata` if it exists and has not been wrapped.
|
|
39
|
+
optional CoinMetadata metadata = 2;
|
|
40
|
+
|
|
41
|
+
// This field will be populated with information about this coin
|
|
42
|
+
// type's `0x2::coin::TreasuryCap` if it exists and has not been wrapped.
|
|
43
|
+
optional CoinTreasury treasury = 3;
|
|
44
|
+
|
|
45
|
+
// If this coin type is a regulated coin, this field will be
|
|
46
|
+
// populated with information about its `0x2::coin::RegulatedCoinMetadata`
|
|
47
|
+
// object.
|
|
48
|
+
optional RegulatedCoinMetadata regulated_metadata = 4;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Metadata for a coin type
|
|
52
|
+
message CoinMetadata {
|
|
53
|
+
// ObjectId of the `0x2::coin::CoinMetadata` object or
|
|
54
|
+
// 0x2::sui::coin_registry::CoinData object (when registered with CoinRegistry).
|
|
55
|
+
optional string id = 1;
|
|
56
|
+
// Number of decimal places to coin uses.
|
|
57
|
+
optional uint32 decimals = 2;
|
|
58
|
+
// Name for the token
|
|
59
|
+
optional string name = 3;
|
|
60
|
+
// Symbol for the token
|
|
61
|
+
optional string symbol = 4;
|
|
62
|
+
// Description of the token
|
|
63
|
+
optional string description = 5;
|
|
64
|
+
// URL for the token logo
|
|
65
|
+
optional string icon_url = 6;
|
|
66
|
+
|
|
67
|
+
// The MetadataCap ID if it has been claimed for this coin type.
|
|
68
|
+
// This capability allows updating the coin's metadata fields.
|
|
69
|
+
// Only populated when metadata is from CoinRegistry.
|
|
70
|
+
optional string metadata_cap_id = 7;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// Information about a coin type's `0x2::coin::TreasuryCap` and its total available supply
|
|
74
|
+
message CoinTreasury {
|
|
75
|
+
// Supply state of a coin, matching the Move SupplyState enum
|
|
76
|
+
enum SupplyState {
|
|
77
|
+
// Supply is unknown or TreasuryCap still exists (minting still possible)
|
|
78
|
+
SUPPLY_STATE_UNKNOWN = 0;
|
|
79
|
+
// Supply is fixed (TreasuryCap consumed, no more minting possible)
|
|
80
|
+
FIXED = 1;
|
|
81
|
+
}
|
|
82
|
+
// ObjectId of the `0x2::coin::TreasuryCap` object.
|
|
83
|
+
optional string id = 1;
|
|
84
|
+
// Total available supply for this coin type.
|
|
85
|
+
optional uint64 total_supply = 2;
|
|
86
|
+
// Supply state indicating if the supply is fixed or can still be minted
|
|
87
|
+
optional SupplyState supply_state = 3;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// Information about a regulated coin, which indicates that it makes use of the transfer deny list.
|
|
91
|
+
message RegulatedCoinMetadata {
|
|
92
|
+
// ObjectId of the `0x2::coin::RegulatedCoinMetadata` object.
|
|
93
|
+
optional string id = 1;
|
|
94
|
+
// The ID of the coin's `CoinMetadata` or `CoinData` object.
|
|
95
|
+
optional string coin_metadata_object = 2;
|
|
96
|
+
// The ID of the coin's `DenyCap` object.
|
|
97
|
+
optional string deny_cap_object = 3;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// Request message for `LiveDataService.GetBalance`.
|
|
101
|
+
message GetBalanceRequest {
|
|
102
|
+
// Required. The owner's Sui address.
|
|
103
|
+
optional string owner = 1;
|
|
104
|
+
|
|
105
|
+
// Required. The type names for the coin (e.g., 0x2::sui::SUI).
|
|
106
|
+
optional string coin_type = 2;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// Response message for `LiveDataService.GetBalance`.
|
|
110
|
+
// Return the total coin balance for one coin type, owned by the address owner.
|
|
111
|
+
message GetBalanceResponse {
|
|
112
|
+
// The balance information for the requested coin type.
|
|
113
|
+
optional Balance balance = 1;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// Request message for `LiveDataService.ListBalances`.
|
|
117
|
+
message ListBalancesRequest {
|
|
118
|
+
// Required. The owner's Sui address.
|
|
119
|
+
optional string owner = 1;
|
|
120
|
+
|
|
121
|
+
// The maximum number of balance entries to return. The service may return fewer than this value.
|
|
122
|
+
// If unspecified, at most `50` entries will be returned.
|
|
123
|
+
// The maximum value is `1000`; values above `1000` will be coerced to `1000`.
|
|
124
|
+
optional uint32 page_size = 2;
|
|
125
|
+
|
|
126
|
+
// A page token, received from a previous `ListBalances` call.
|
|
127
|
+
// Provide this to retrieve the subsequent page.
|
|
128
|
+
//
|
|
129
|
+
// When paginating, all other parameters provided to `ListBalances` must
|
|
130
|
+
// match the call that provided the page token.
|
|
131
|
+
optional bytes page_token = 3;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// Response message for `LiveDataService.ListBalances`.
|
|
135
|
+
// Return the total coin balance for all coin types, owned by the address owner.
|
|
136
|
+
message ListBalancesResponse {
|
|
137
|
+
// The list of coin types and their respective balances.
|
|
138
|
+
repeated Balance balances = 1;
|
|
139
|
+
|
|
140
|
+
// A token, which can be sent as `page_token` to retrieve the next page.
|
|
141
|
+
// If this field is omitted, there are no subsequent pages.
|
|
142
|
+
optional bytes next_page_token = 2;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// Balance information for a specific coin type.
|
|
146
|
+
message Balance {
|
|
147
|
+
// The type of the coin (e.g., 0x2::sui::SUI).
|
|
148
|
+
optional string coin_type = 1;
|
|
149
|
+
|
|
150
|
+
// Shows the total balance of the coin in its smallest unit.
|
|
151
|
+
optional uint64 balance = 3;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// Request message for `NodeService.ListDynamicFields`
|
|
155
|
+
message ListDynamicFieldsRequest {
|
|
156
|
+
// Required. The `UID` of the parent, which owns the collections of dynamic fields.
|
|
157
|
+
optional string parent = 1;
|
|
158
|
+
|
|
159
|
+
// The maximum number of dynamic fields to return. The service may return fewer than this value.
|
|
160
|
+
// If unspecified, at most `50` entries will be returned.
|
|
161
|
+
// The maximum value is `1000`; values above `1000` will be coerced to `1000`.
|
|
162
|
+
optional uint32 page_size = 2;
|
|
163
|
+
|
|
164
|
+
// A page token, received from a previous `ListDynamicFields` call.
|
|
165
|
+
// Provide this to retrieve the subsequent page.
|
|
166
|
+
//
|
|
167
|
+
// When paginating, all other parameters provided to `ListDynamicFields` must
|
|
168
|
+
// match the call that provided the page token.
|
|
169
|
+
optional bytes page_token = 3;
|
|
170
|
+
|
|
171
|
+
optional google.protobuf.FieldMask read_mask = 4;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// Response message for `NodeService.ListDynamicFields`
|
|
175
|
+
message ListDynamicFieldsResponse {
|
|
176
|
+
// Page of dynamic fields owned by the specified parent.
|
|
177
|
+
repeated DynamicField dynamic_fields = 1;
|
|
178
|
+
|
|
179
|
+
// A token, which can be sent as `page_token` to retrieve the next page.
|
|
180
|
+
// If this field is omitted, there are no subsequent pages.
|
|
181
|
+
optional bytes next_page_token = 2;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
message DynamicField {
|
|
185
|
+
enum DynamicFieldKind {
|
|
186
|
+
DYNAMIC_FIELD_KIND_UNKNOWN = 0;
|
|
187
|
+
FIELD = 1;
|
|
188
|
+
OBJECT = 2;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
optional DynamicFieldKind kind = 1;
|
|
192
|
+
|
|
193
|
+
// ObjectId of this dynamic field's parent.
|
|
194
|
+
optional string parent = 2;
|
|
195
|
+
|
|
196
|
+
// ObjectId of this dynamic field.
|
|
197
|
+
optional string field_id = 3;
|
|
198
|
+
|
|
199
|
+
// The type of the dynamic field "name"
|
|
200
|
+
optional string name_type = 4;
|
|
201
|
+
|
|
202
|
+
// The serialized move value of "name"
|
|
203
|
+
optional bytes name_value = 5;
|
|
204
|
+
|
|
205
|
+
// The type of the dynamic field "value".
|
|
206
|
+
//
|
|
207
|
+
// If this is a dynamic object field then this is the type of the object
|
|
208
|
+
// itself (which is a child of this field), otherwise this is the type of the
|
|
209
|
+
// value of this field.
|
|
210
|
+
optional string value_type = 6;
|
|
211
|
+
|
|
212
|
+
// The ObjectId of the child object when a child is a dynamic
|
|
213
|
+
// object field.
|
|
214
|
+
//
|
|
215
|
+
// The presence or absence of this field can be used to determine if a child
|
|
216
|
+
// is a dynamic field or a dynamic child object
|
|
217
|
+
optional string dynamic_object_id = 7;
|
|
218
|
+
|
|
219
|
+
// The object itself when a child is a dynamic object field.
|
|
220
|
+
optional Object object = 8;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
message SimulateTransactionRequest {
|
|
224
|
+
optional Transaction transaction = 1;
|
|
225
|
+
optional google.protobuf.FieldMask read_mask = 2;
|
|
226
|
+
|
|
227
|
+
// buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX
|
|
228
|
+
enum TransactionChecks {
|
|
229
|
+
ENABLED = 0;
|
|
230
|
+
DISABLED = 1;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
// Specify whether checks should be ENABLED (default) or DISABLED while executing the transaction
|
|
234
|
+
optional TransactionChecks checks = 3;
|
|
235
|
+
|
|
236
|
+
// Perform gas selection based on a budget estimation and include the
|
|
237
|
+
// selected gas payment and budget in the response.
|
|
238
|
+
//
|
|
239
|
+
// This option will be ignored if `checks` is `DISABLED`.
|
|
240
|
+
optional bool do_gas_selection = 4;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
message SimulateTransactionResponse {
|
|
244
|
+
optional ExecutedTransaction transaction = 1;
|
|
245
|
+
repeated CommandResult outputs = 2;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
// An intermediate result/output from the execution of a single command
|
|
249
|
+
message CommandResult {
|
|
250
|
+
repeated CommandOutput return_values = 1;
|
|
251
|
+
repeated CommandOutput mutated_by_ref = 2;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
message CommandOutput {
|
|
255
|
+
optional Argument argument = 1;
|
|
256
|
+
optional Bcs value = 2;
|
|
257
|
+
|
|
258
|
+
// JSON rendering of the output.
|
|
259
|
+
optional google.protobuf.Value json = 3;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
message ListOwnedObjectsRequest {
|
|
263
|
+
// Required. The address of the account that owns the objects.
|
|
264
|
+
optional string owner = 1;
|
|
265
|
+
|
|
266
|
+
// The maximum number of entries return. The service may return fewer than this value.
|
|
267
|
+
// If unspecified, at most `50` entries will be returned.
|
|
268
|
+
// The maximum value is `1000`; values above `1000` will be coerced to `1000`.
|
|
269
|
+
optional uint32 page_size = 2;
|
|
270
|
+
|
|
271
|
+
// A page token, received from a previous `ListOwnedObjects` call.
|
|
272
|
+
// Provide this to retrieve the subsequent page.
|
|
273
|
+
//
|
|
274
|
+
// When paginating, all other parameters provided to `ListOwnedObjects` must
|
|
275
|
+
// match the call that provided the page token.
|
|
276
|
+
optional bytes page_token = 3;
|
|
277
|
+
|
|
278
|
+
optional google.protobuf.FieldMask read_mask = 4;
|
|
279
|
+
|
|
280
|
+
// Optional type filter to limit the types of objects listed.
|
|
281
|
+
//
|
|
282
|
+
// Providing an object type with no type params will return objects of that
|
|
283
|
+
// type with any type parameter, e.g. `0x2::coin::Coin` will return all
|
|
284
|
+
// `Coin<T>` objects regardless of the type parameter `T`. Providing a type
|
|
285
|
+
// with a type param will retrict the returned objects to only those objects
|
|
286
|
+
// that match the provided type parameters, e.g.
|
|
287
|
+
// `0x2::coin::Coin<0x2::sui::SUI>` will only return `Coin<SUI>` objects.
|
|
288
|
+
optional string object_type = 5;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
message ListOwnedObjectsResponse {
|
|
292
|
+
// Page of dynamic fields owned by the specified parent.
|
|
293
|
+
repeated Object objects = 1;
|
|
294
|
+
|
|
295
|
+
// A token, which can be sent as `page_token` to retrieve the next page.
|
|
296
|
+
// If this field is omitted, there are no subsequent pages.
|
|
297
|
+
optional bytes next_page_token = 2;
|
|
298
|
+
}
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
// Copyright (c) Mysten Labs, Inc.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
syntax = "proto3";
|
|
5
|
+
|
|
6
|
+
package sui.rpc.v2beta2;
|
|
7
|
+
|
|
8
|
+
// A Move Package
|
|
9
|
+
message Package {
|
|
10
|
+
// The PackageId of this package
|
|
11
|
+
//
|
|
12
|
+
// A package's `storage_id` is the Sui ObjectId of the package on-chain.
|
|
13
|
+
// Outside of system packages the `storage_id` for every package version is
|
|
14
|
+
// different.
|
|
15
|
+
optional string storage_id = 1;
|
|
16
|
+
|
|
17
|
+
// The PackageId of the first published version of this package.
|
|
18
|
+
//
|
|
19
|
+
// A package's `original_id` (sometimes also called its `runtime_id`) is the
|
|
20
|
+
// `storage_id` of the first version of this package that has been published.
|
|
21
|
+
// The `original_id`/`runtime_id` is stable across all versions of the
|
|
22
|
+
// package and does not ever change.
|
|
23
|
+
optional string original_id = 2;
|
|
24
|
+
|
|
25
|
+
// The version of this package
|
|
26
|
+
optional uint64 version = 3;
|
|
27
|
+
|
|
28
|
+
// The modules defined by this package
|
|
29
|
+
repeated Module modules = 4;
|
|
30
|
+
|
|
31
|
+
// List of datatype origins for mapping datatypes to a package version where
|
|
32
|
+
// it was first defined
|
|
33
|
+
repeated TypeOrigin type_origins = 5;
|
|
34
|
+
|
|
35
|
+
// The package's transitive dependencies as a mapping from the package's
|
|
36
|
+
// runtime Id (the Id it is referred to by in other packages) to its
|
|
37
|
+
// storage Id (the Id it is loaded from on chain).
|
|
38
|
+
repeated Linkage linkage = 6;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// A Move Module.
|
|
42
|
+
message Module {
|
|
43
|
+
// Name of this module.
|
|
44
|
+
optional string name = 1;
|
|
45
|
+
|
|
46
|
+
// Serialized bytecode of the module.
|
|
47
|
+
optional bytes contents = 2;
|
|
48
|
+
|
|
49
|
+
// List of DataTypes defined by this module.
|
|
50
|
+
repeated DatatypeDescriptor datatypes = 3;
|
|
51
|
+
|
|
52
|
+
// List of Functions defined by this module.
|
|
53
|
+
repeated FunctionDescriptor functions = 4;
|
|
54
|
+
|
|
55
|
+
// List of Constants defined by this module.
|
|
56
|
+
// repeated Constant constants = 5;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Describes a Move Datatype.
|
|
60
|
+
message DatatypeDescriptor {
|
|
61
|
+
// Fully qualified name of this Datatype.
|
|
62
|
+
//
|
|
63
|
+
// This is `<defining_id>::<module>::<name>`
|
|
64
|
+
optional string type_name = 1;
|
|
65
|
+
|
|
66
|
+
// PackageId of the package where this Datatype is defined.
|
|
67
|
+
//
|
|
68
|
+
// A type's `defining_id` is the `storage_id` of the package version that first introduced or added that type.
|
|
69
|
+
optional string defining_id = 2;
|
|
70
|
+
|
|
71
|
+
// Name of the module where this Datatype is defined
|
|
72
|
+
optional string module = 3;
|
|
73
|
+
|
|
74
|
+
// Name of this Datatype
|
|
75
|
+
optional string name = 4;
|
|
76
|
+
|
|
77
|
+
// This type's abilities
|
|
78
|
+
repeated Ability abilities = 5;
|
|
79
|
+
|
|
80
|
+
// Ability constraints and phantom status for this type's generic type parameters
|
|
81
|
+
repeated TypeParameter type_parameters = 6;
|
|
82
|
+
|
|
83
|
+
enum DatatypeKind {
|
|
84
|
+
DATATYPE_KIND_UNKNOWN = 0;
|
|
85
|
+
STRUCT = 1;
|
|
86
|
+
ENUM = 2;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Indicates whether this datatype is a 'STRUCT' or an 'ENUM'
|
|
90
|
+
optional DatatypeKind kind = 7;
|
|
91
|
+
|
|
92
|
+
// Set of fields if this Datatype is a struct.
|
|
93
|
+
//
|
|
94
|
+
// The order of the entries is the order of how the fields are defined.
|
|
95
|
+
repeated FieldDescriptor fields = 8;
|
|
96
|
+
|
|
97
|
+
// Set of variants if this Datatype is an enum.
|
|
98
|
+
//
|
|
99
|
+
// The order of the entries is the order of how the variants are defined.
|
|
100
|
+
repeated VariantDescriptor variants = 9;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// An `Ability` classifies what operations are permitted for a given type
|
|
104
|
+
enum Ability {
|
|
105
|
+
ABILITY_UNKNOWN = 0;
|
|
106
|
+
|
|
107
|
+
// Allows values of types with this ability to be copied
|
|
108
|
+
COPY = 1;
|
|
109
|
+
|
|
110
|
+
// Allows values of types with this ability to be dropped.
|
|
111
|
+
DROP = 2;
|
|
112
|
+
|
|
113
|
+
// Allows values of types with this ability to exist inside a struct in global storage
|
|
114
|
+
STORE = 3;
|
|
115
|
+
|
|
116
|
+
// Allows the type to serve as a key for global storage operations
|
|
117
|
+
KEY = 4;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// A generic type parameter used in the declaration of a struct or enum.
|
|
121
|
+
message TypeParameter {
|
|
122
|
+
// The type parameter constraints
|
|
123
|
+
repeated Ability constraints = 1;
|
|
124
|
+
|
|
125
|
+
// Whether the parameter is declared as phantom
|
|
126
|
+
optional bool is_phantom = 2;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// Descriptor of a field that belongs to a struct or enum variant
|
|
130
|
+
message FieldDescriptor {
|
|
131
|
+
// Name of the field
|
|
132
|
+
optional string name = 1;
|
|
133
|
+
|
|
134
|
+
// Order or position of the field in the struct or enum variant definition.
|
|
135
|
+
optional uint32 position = 2;
|
|
136
|
+
|
|
137
|
+
// The type of the field
|
|
138
|
+
optional OpenSignatureBody type = 3;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// Descriptor of an enum variant
|
|
142
|
+
message VariantDescriptor {
|
|
143
|
+
// Name of the variant
|
|
144
|
+
optional string name = 1;
|
|
145
|
+
|
|
146
|
+
// Order or position of the variant in the enum definition.
|
|
147
|
+
optional uint32 position = 2;
|
|
148
|
+
|
|
149
|
+
// Set of fields defined by this variant.
|
|
150
|
+
repeated FieldDescriptor fields = 3;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// Representation of a type signature that could appear as a field type for a struct or enum
|
|
154
|
+
message OpenSignatureBody {
|
|
155
|
+
enum Type {
|
|
156
|
+
TYPE_UNKNOWN = 0;
|
|
157
|
+
ADDRESS = 1;
|
|
158
|
+
BOOL = 2;
|
|
159
|
+
U8 = 3;
|
|
160
|
+
U16 = 4;
|
|
161
|
+
U32 = 5;
|
|
162
|
+
U64 = 6;
|
|
163
|
+
U128 = 7;
|
|
164
|
+
U256 = 8;
|
|
165
|
+
VECTOR = 9;
|
|
166
|
+
DATATYPE = 10;
|
|
167
|
+
TYPE_PARAMETER = 11;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// Type of this signature
|
|
171
|
+
optional Type type = 1;
|
|
172
|
+
|
|
173
|
+
// Fully qualified name of the datatype when `type` is `DATATYPE`
|
|
174
|
+
optional string type_name = 2;
|
|
175
|
+
|
|
176
|
+
// Set when `type` is `VECTOR` or `DATATYPE`
|
|
177
|
+
repeated OpenSignatureBody type_parameter_instantiation = 3;
|
|
178
|
+
|
|
179
|
+
// Position of the type parameter as defined in the containing data type descriptor when `type` is `TYPE_PARAMETER`
|
|
180
|
+
optional uint32 type_parameter = 4;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// Descriptor of a Move function
|
|
184
|
+
message FunctionDescriptor {
|
|
185
|
+
// Name of the function
|
|
186
|
+
optional string name = 1;
|
|
187
|
+
|
|
188
|
+
enum Visibility {
|
|
189
|
+
VISIBILITY_UNKNOWN = 0;
|
|
190
|
+
PRIVATE = 1;
|
|
191
|
+
PUBLIC = 2;
|
|
192
|
+
FRIEND = 3;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// Whether the function is `public`, `private` or `public(friend)`
|
|
196
|
+
optional Visibility visibility = 5;
|
|
197
|
+
|
|
198
|
+
// Whether the function is marked `entry` or not.
|
|
199
|
+
optional bool is_entry = 6;
|
|
200
|
+
|
|
201
|
+
// Ability constraints for type parameters
|
|
202
|
+
repeated TypeParameter type_parameters = 7;
|
|
203
|
+
|
|
204
|
+
// Formal parameter types.
|
|
205
|
+
repeated OpenSignature parameters = 8;
|
|
206
|
+
|
|
207
|
+
// Return types.
|
|
208
|
+
repeated OpenSignature returns = 9;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
// Representation of a type signature that could appear as a function parameter or return value.
|
|
212
|
+
message OpenSignature {
|
|
213
|
+
enum Reference {
|
|
214
|
+
REFERENCE_UNKNOWN = 0;
|
|
215
|
+
IMMUTABLE = 1;
|
|
216
|
+
MUTABLE = 2;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
optional Reference reference = 1;
|
|
220
|
+
optional OpenSignatureBody body = 2;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
// Identifies a struct and the module it was defined in.
|
|
224
|
+
message TypeOrigin {
|
|
225
|
+
optional string module_name = 1;
|
|
226
|
+
optional string datatype_name = 2;
|
|
227
|
+
optional string package_id = 3;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
// Upgraded package info for the linkage table.
|
|
231
|
+
message Linkage {
|
|
232
|
+
// Id of the original package.
|
|
233
|
+
optional string original_id = 1;
|
|
234
|
+
// Id of the upgraded package.
|
|
235
|
+
optional string upgraded_id = 2;
|
|
236
|
+
// Version of the upgraded package.
|
|
237
|
+
optional uint64 upgraded_version = 3;
|
|
238
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
// Copyright (c) Mysten Labs, Inc.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
syntax = "proto3";
|
|
5
|
+
|
|
6
|
+
package sui.rpc.v2beta2;
|
|
7
|
+
|
|
8
|
+
import "sui/rpc/v2beta2/move_package.proto";
|
|
9
|
+
|
|
10
|
+
service MovePackageService {
|
|
11
|
+
rpc GetPackage(GetPackageRequest) returns (GetPackageResponse);
|
|
12
|
+
rpc GetDatatype(GetDatatypeRequest) returns (GetDatatypeResponse);
|
|
13
|
+
rpc GetFunction(GetFunctionRequest) returns (GetFunctionResponse);
|
|
14
|
+
rpc ListPackageVersions(ListPackageVersionsRequest) returns (ListPackageVersionsResponse);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
message GetPackageRequest {
|
|
18
|
+
// Required. The `storage_id` of the requested package.
|
|
19
|
+
optional string package_id = 1;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
message GetPackageResponse {
|
|
23
|
+
// The package.
|
|
24
|
+
optional Package package = 1;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
message GetDatatypeRequest {
|
|
28
|
+
// Required. The `storage_id` of the requested package.
|
|
29
|
+
optional string package_id = 1;
|
|
30
|
+
|
|
31
|
+
// Required. The name of the requested module.
|
|
32
|
+
optional string module_name = 2;
|
|
33
|
+
|
|
34
|
+
// Required. The name of the requested datatype.
|
|
35
|
+
optional string name = 3;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
message GetDatatypeResponse {
|
|
39
|
+
// The datatype.
|
|
40
|
+
optional DatatypeDescriptor datatype = 1;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
message GetFunctionRequest {
|
|
44
|
+
// Required. The `storage_id` of the requested package.
|
|
45
|
+
optional string package_id = 1;
|
|
46
|
+
|
|
47
|
+
// Required. The name of the requested module.
|
|
48
|
+
optional string module_name = 2;
|
|
49
|
+
|
|
50
|
+
// Required. The name of the requested function.
|
|
51
|
+
optional string name = 3;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
message GetFunctionResponse {
|
|
55
|
+
// The function.
|
|
56
|
+
optional FunctionDescriptor function = 1;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
message ListPackageVersionsRequest {
|
|
60
|
+
// Required. The `storage_id` of any version of the package.
|
|
61
|
+
optional string package_id = 1;
|
|
62
|
+
|
|
63
|
+
// The maximum number of versions to return. The service may return fewer than this value.
|
|
64
|
+
// If unspecified, at most `1000` entries will be returned.
|
|
65
|
+
// The maximum value is `10000`; values above `10000` will be coerced to `10000`.
|
|
66
|
+
optional uint32 page_size = 2;
|
|
67
|
+
|
|
68
|
+
// A page token, received from a previous `ListPackageVersions` call.
|
|
69
|
+
// Provide this to retrieve the subsequent page.
|
|
70
|
+
//
|
|
71
|
+
// When paginating, all other parameters provided to `ListPackageVersions` must
|
|
72
|
+
// match the call that provided the page token.
|
|
73
|
+
optional bytes page_token = 3;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
message ListPackageVersionsResponse {
|
|
77
|
+
// List of all package versions, ordered by version.
|
|
78
|
+
repeated PackageVersion versions = 1;
|
|
79
|
+
|
|
80
|
+
// A token, which can be sent as `page_token` to retrieve the next page.
|
|
81
|
+
// If this field is omitted, there are no subsequent pages.
|
|
82
|
+
optional bytes next_page_token = 2;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// A simplified representation of a package version
|
|
86
|
+
message PackageVersion {
|
|
87
|
+
// The storage ID of this package version
|
|
88
|
+
optional string package_id = 1;
|
|
89
|
+
// The version number
|
|
90
|
+
optional uint64 version = 2;
|
|
91
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// Copyright (c) Mysten Labs, Inc.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
syntax = "proto3";
|
|
5
|
+
|
|
6
|
+
package sui.rpc.v2beta2;
|
|
7
|
+
|
|
8
|
+
import "google/protobuf/struct.proto";
|
|
9
|
+
import "sui/rpc/v2beta2/bcs.proto";
|
|
10
|
+
import "sui/rpc/v2beta2/move_package.proto";
|
|
11
|
+
import "sui/rpc/v2beta2/owner.proto";
|
|
12
|
+
|
|
13
|
+
// An object on the Sui blockchain.
|
|
14
|
+
message Object {
|
|
15
|
+
// This Object serialized as BCS.
|
|
16
|
+
optional Bcs bcs = 1;
|
|
17
|
+
|
|
18
|
+
// `ObjectId` for this object.
|
|
19
|
+
optional string object_id = 2;
|
|
20
|
+
|
|
21
|
+
// Version of the object.
|
|
22
|
+
optional uint64 version = 3;
|
|
23
|
+
|
|
24
|
+
// The digest of this Object.
|
|
25
|
+
optional string digest = 4;
|
|
26
|
+
|
|
27
|
+
// Owner of the object.
|
|
28
|
+
optional Owner owner = 5;
|
|
29
|
+
|
|
30
|
+
// The type of this object.
|
|
31
|
+
//
|
|
32
|
+
// This will be 'package' for packages and a StructTag for move structs.
|
|
33
|
+
optional string object_type = 6;
|
|
34
|
+
|
|
35
|
+
// DEPRECATED this field is no longer used to determine whether a tx can transfer this
|
|
36
|
+
// object. Instead, it is always calculated from the objects type when loaded in execution.
|
|
37
|
+
//
|
|
38
|
+
// Only set for Move structs
|
|
39
|
+
optional bool has_public_transfer = 7;
|
|
40
|
+
|
|
41
|
+
// BCS bytes of a Move struct value.
|
|
42
|
+
//
|
|
43
|
+
// Only set for Move structs
|
|
44
|
+
optional Bcs contents = 8;
|
|
45
|
+
|
|
46
|
+
// Package information for Move Packages
|
|
47
|
+
optional Package package = 9;
|
|
48
|
+
|
|
49
|
+
// The digest of the transaction that created or last mutated this object
|
|
50
|
+
optional string previous_transaction = 10;
|
|
51
|
+
|
|
52
|
+
// The amount of SUI to rebate if this object gets deleted.
|
|
53
|
+
// This number is re-calculated each time the object is mutated based on
|
|
54
|
+
// the present storage gas price.
|
|
55
|
+
optional uint64 storage_rebate = 11;
|
|
56
|
+
|
|
57
|
+
// JSON rendering of the object.
|
|
58
|
+
optional google.protobuf.Value json = 100;
|
|
59
|
+
|
|
60
|
+
// Current balance if this object is a `0x2::coin::Coin<T>`
|
|
61
|
+
optional uint64 balance = 101;
|
|
62
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Copyright (c) Mysten Labs, Inc.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
syntax = "proto3";
|
|
5
|
+
|
|
6
|
+
package sui.rpc.v2beta2;
|
|
7
|
+
|
|
8
|
+
// Reference to an object.
|
|
9
|
+
message ObjectReference {
|
|
10
|
+
// The object id of this object.
|
|
11
|
+
optional string object_id = 1;
|
|
12
|
+
// The version of this object.
|
|
13
|
+
optional uint64 version = 2;
|
|
14
|
+
// The digest of this object.
|
|
15
|
+
optional string digest = 3;
|
|
16
|
+
}
|