@clonegod/ttd-sui-common 1.0.93 → 1.0.94

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 (44) hide show
  1. package/README.md +1 -1
  2. package/dist/grpc/grpc-connection.js +2 -2
  3. package/dist/grpc/index.d.ts +1 -1
  4. package/dist/grpc/index.js +3 -3
  5. package/dist/grpc/protos/google/protobuf/timestamp.proto +9 -8
  6. package/dist/grpc/protos/sui/rpc/v2/argument.proto +34 -0
  7. package/dist/grpc/protos/sui/rpc/v2/balance_change.proto +18 -0
  8. package/dist/grpc/protos/sui/rpc/v2/bcs.proto +17 -0
  9. package/dist/grpc/protos/sui/rpc/v2/checkpoint.proto +42 -0
  10. package/dist/grpc/protos/sui/rpc/v2/checkpoint_contents.proto +34 -0
  11. package/dist/grpc/protos/sui/rpc/v2/checkpoint_summary.proto +105 -0
  12. package/dist/grpc/protos/sui/rpc/v2/effects.proto +157 -0
  13. package/dist/grpc/protos/sui/rpc/v2/epoch.proto +34 -0
  14. package/dist/grpc/protos/sui/rpc/v2/error_reason.proto +12 -0
  15. package/dist/grpc/protos/sui/rpc/v2/event.proto +44 -0
  16. package/dist/grpc/protos/sui/rpc/v2/executed_transaction.proto +49 -0
  17. package/dist/grpc/protos/sui/rpc/v2/execution_status.proto +374 -0
  18. package/dist/grpc/protos/sui/rpc/v2/gas_cost_summary.proto +19 -0
  19. package/dist/grpc/protos/sui/rpc/v2/input.proto +55 -0
  20. package/dist/grpc/protos/sui/rpc/v2/jwk.proto +38 -0
  21. package/dist/grpc/protos/sui/rpc/v2/ledger_service.proto +165 -0
  22. package/dist/grpc/protos/sui/rpc/v2/move_package.proto +238 -0
  23. package/dist/grpc/protos/sui/rpc/v2/move_package_service.proto +91 -0
  24. package/dist/grpc/protos/sui/rpc/v2/name_service.proto +67 -0
  25. package/dist/grpc/protos/sui/rpc/v2/object.proto +68 -0
  26. package/dist/grpc/protos/sui/rpc/v2/object_reference.proto +16 -0
  27. package/dist/grpc/protos/sui/rpc/v2/owner.proto +25 -0
  28. package/dist/grpc/protos/sui/rpc/v2/protocol_config.proto +12 -0
  29. package/dist/grpc/protos/sui/rpc/v2/signature.proto +238 -0
  30. package/dist/grpc/protos/sui/rpc/v2/signature_scheme.proto +22 -0
  31. package/dist/grpc/protos/sui/rpc/v2/signature_verification_service.proto +49 -0
  32. package/dist/grpc/protos/sui/rpc/v2/state_service.proto +300 -0
  33. package/dist/grpc/protos/sui/rpc/v2/subscription_service.proto +41 -0
  34. package/dist/grpc/protos/sui/rpc/v2/system_state.proto +340 -0
  35. package/dist/grpc/protos/sui/rpc/v2/transaction.proto +531 -0
  36. package/dist/grpc/protos/sui/rpc/v2/transaction_execution_service.proto +78 -0
  37. package/dist/grpc/state-service.d.ts +11 -0
  38. package/dist/grpc/state-service.js +107 -0
  39. package/dist/grpc/sui-grpc-client.d.ts +2 -2
  40. package/dist/grpc/sui-grpc-client.js +2 -2
  41. package/dist/test/test.js +2 -2
  42. package/dist/test/test_grpc.js +9 -9
  43. package/dist/trade/abstract_sui_dex_trade_plus.js +1 -1
  44. package/package.json +2 -2
@@ -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.v2;
7
+
8
+ import "sui/rpc/v2/bcs.proto";
9
+ import "sui/rpc/v2/jwk.proto";
10
+ import "sui/rpc/v2/signature_scheme.proto";
11
+
12
+ // A signature from a user.
13
+ message UserSignature {
14
+ // This signature serialized as as BCS.
15
+ //
16
+ // When provided as input this will support both the form that is length
17
+ // prefixed as well as not length prefixed.
18
+ optional Bcs bcs = 1;
19
+
20
+ // The signature scheme of this signature.
21
+ optional SignatureScheme scheme = 2;
22
+
23
+ oneof signature {
24
+ // Simple signature if scheme is ed25519 | secp256k1 | secp256r1.
25
+ SimpleSignature simple = 3;
26
+
27
+ // The multisig aggregated signature if scheme is `MULTISIG`.
28
+ MultisigAggregatedSignature multisig = 4;
29
+
30
+ // The zklogin authenticator if scheme is `ZKLOGIN`.
31
+ ZkLoginAuthenticator zklogin = 5;
32
+
33
+ // The passkey authenticator if scheme is `PASSKEY`.
34
+ PasskeyAuthenticator passkey = 6;
35
+ }
36
+ }
37
+
38
+ // Either an ed25519, secp256k1 or secp256r1 signature
39
+ message SimpleSignature {
40
+ // The signature scheme of this signature.
41
+ optional SignatureScheme scheme = 1;
42
+
43
+ // Signature bytes
44
+ optional bytes signature = 2;
45
+
46
+ // Public key bytes
47
+ optional bytes public_key = 3;
48
+ }
49
+
50
+ // Public key equivalent for zklogin authenticators.
51
+ message ZkLoginPublicIdentifier {
52
+ optional string iss = 1;
53
+ // base10 encoded Bn254FieldElement
54
+ optional string address_seed = 2;
55
+ }
56
+
57
+ // Set of valid public keys for multisig committee members.
58
+ message MultisigMemberPublicKey {
59
+ // The signature scheme of this public key.
60
+ optional SignatureScheme scheme = 1;
61
+
62
+ // Public key bytes if scheme is ed25519 | secp256k1 | secp256r1 | passkey.
63
+ optional bytes public_key = 2;
64
+
65
+ // A zklogin public identifier if scheme is zklogin.
66
+ optional ZkLoginPublicIdentifier zklogin = 3;
67
+ }
68
+
69
+ // A member in a multisig committee.
70
+ message MultisigMember {
71
+ // The public key of the committee member.
72
+ optional MultisigMemberPublicKey public_key = 1;
73
+ // The weight of this member's signature.
74
+ optional uint32 weight = 2;
75
+ }
76
+
77
+ // A multisig committee.
78
+ message MultisigCommittee {
79
+ // A list of committee members and their corresponding weight.
80
+ repeated MultisigMember members = 1;
81
+ // The threshold of signatures needed to validate a signature from
82
+ // this committee.
83
+ optional uint32 threshold = 2;
84
+ }
85
+
86
+ // Aggregated signature from members of a multisig committee.
87
+ message MultisigAggregatedSignature {
88
+ // The plain signatures encoded with signature scheme.
89
+ //
90
+ // The signatures must be in the same order as they are listed in the committee.
91
+ repeated MultisigMemberSignature signatures = 1;
92
+
93
+ // Bitmap indicating which committee members contributed to the
94
+ // signature.
95
+ optional uint32 bitmap = 2;
96
+ // If present, means this signature's on-chain format uses the old
97
+ // legacy multisig format.
98
+ optional bytes legacy_bitmap = 3;
99
+ // The committee to use to validate this signature.
100
+ optional MultisigCommittee committee = 4;
101
+ }
102
+
103
+ // A signature from a member of a multisig committee.
104
+ message MultisigMemberSignature {
105
+ // The signature scheme of this signature.
106
+ optional SignatureScheme scheme = 1;
107
+
108
+ // Signature bytes if scheme is ed25519 | secp256k1 | secp256r1.
109
+ optional bytes signature = 2;
110
+
111
+ // The zklogin authenticator if scheme is `ZKLOGIN`.
112
+ optional ZkLoginAuthenticator zklogin = 3;
113
+
114
+ // The passkey authenticator if scheme is `PASSKEY`.
115
+ optional PasskeyAuthenticator passkey = 4;
116
+ }
117
+
118
+ // A zklogin authenticator.
119
+ message ZkLoginAuthenticator {
120
+ // Zklogin proof and inputs required to perform proof verification.
121
+ optional ZkLoginInputs inputs = 1;
122
+ // Maximum epoch for which the proof is valid.
123
+ optional uint64 max_epoch = 2;
124
+ // User signature with the public key attested to by the provided proof.
125
+ optional SimpleSignature signature = 3;
126
+
127
+ // The public identifier (similar to a public key) for this zklogin authenticator
128
+ optional ZkLoginPublicIdentifier public_identifier = 4;
129
+ // The id of the JWK used to authorize this zklogin authenticator
130
+ optional JwkId jwk_id = 5;
131
+ }
132
+
133
+ // A zklogin groth16 proof and the required inputs to perform proof verification.
134
+ message ZkLoginInputs {
135
+ optional ZkLoginProof proof_points = 1;
136
+ optional ZkLoginClaim iss_base64_details = 2;
137
+ optional string header_base64 = 3;
138
+ // base10 encoded Bn254FieldElement
139
+ optional string address_seed = 4;
140
+ }
141
+
142
+ // A zklogin groth16 proof.
143
+ message ZkLoginProof {
144
+ optional CircomG1 a = 1;
145
+ optional CircomG2 b = 2;
146
+ optional CircomG1 c = 3;
147
+ }
148
+
149
+ // A claim of the iss in a zklogin proof.
150
+ message ZkLoginClaim {
151
+ optional string value = 1;
152
+ optional uint32 index_mod_4 = 2;
153
+ }
154
+
155
+ // A G1 point.
156
+ message CircomG1 {
157
+ // base10 encoded Bn254FieldElement
158
+ optional string e0 = 1;
159
+ // base10 encoded Bn254FieldElement
160
+ optional string e1 = 2;
161
+ // base10 encoded Bn254FieldElement
162
+ optional string e2 = 3;
163
+ }
164
+
165
+ // A G2 point.
166
+ message CircomG2 {
167
+ // base10 encoded Bn254FieldElement
168
+ optional string e00 = 1;
169
+ // base10 encoded Bn254FieldElement
170
+ optional string e01 = 2;
171
+
172
+ // base10 encoded Bn254FieldElement
173
+ optional string e10 = 3;
174
+ // base10 encoded Bn254FieldElement
175
+ optional string e11 = 4;
176
+
177
+ // base10 encoded Bn254FieldElement
178
+ optional string e20 = 5;
179
+ // base10 encoded Bn254FieldElement
180
+ optional string e21 = 6;
181
+ }
182
+
183
+ // A passkey authenticator.
184
+ //
185
+ // See
186
+ // [struct.PasskeyAuthenticator](https://mystenlabs.github.io/sui-rust-sdk/sui_sdk_types/struct.PasskeyAuthenticator.html#bcs)
187
+ // for more information on the requirements on the shape of the
188
+ // `client_data_json` field.
189
+ message PasskeyAuthenticator {
190
+ // Opaque authenticator data for this passkey signature.
191
+ //
192
+ // See [Authenticator Data](https://www.w3.org/TR/webauthn-2/#sctn-authenticator-data) for
193
+ // more information on this field.
194
+ optional bytes authenticator_data = 1;
195
+
196
+ // Structured, unparsed, JSON for this passkey signature.
197
+ //
198
+ // See [CollectedClientData](https://www.w3.org/TR/webauthn-2/#dictdef-collectedclientdata)
199
+ // for more information on this field.
200
+ optional string client_data_json = 2;
201
+
202
+ // A secp256r1 signature.
203
+ optional SimpleSignature signature = 3;
204
+ }
205
+
206
+ // The validator set for a particular epoch.
207
+ message ValidatorCommittee {
208
+ // The epoch where this committee governs.
209
+ optional uint64 epoch = 1;
210
+
211
+ // The committee members.
212
+ repeated ValidatorCommitteeMember members = 2;
213
+ }
214
+
215
+ // A member of a validator committee.
216
+ message ValidatorCommitteeMember {
217
+ // The 96-byte Bls12381 public key for this validator.
218
+ optional bytes public_key = 1;
219
+
220
+ // voting weight this validator possesses.
221
+ optional uint64 weight = 2;
222
+ }
223
+
224
+ /// An aggregated signature from multiple validators.
225
+ message ValidatorAggregatedSignature {
226
+ // The epoch when this signature was produced.
227
+ //
228
+ // This can be used to lookup the `ValidatorCommittee` from this epoch
229
+ // to verify this signature.
230
+ optional uint64 epoch = 1;
231
+
232
+ // The 48-byte Bls12381 aggregated signature.
233
+ optional bytes signature = 2;
234
+
235
+ // Bitmap indicating which members of the committee contributed to
236
+ // this signature.
237
+ optional bytes bitmap = 3;
238
+ }
@@ -0,0 +1,22 @@
1
+ // Copyright (c) Mysten Labs, Inc.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ syntax = "proto3";
5
+
6
+ package sui.rpc.v2;
7
+
8
+ // Flag use to disambiguate the signature schemes supported by Sui.
9
+ //
10
+ // Note: the enum values defined by this proto message exactly match their
11
+ // expected BCS serialized values when serialized as a u8. See
12
+ // [enum.SignatureScheme](https://mystenlabs.github.io/sui-rust-sdk/sui_sdk_types/enum.SignatureScheme.html)
13
+ // for more information about signature schemes.
14
+ enum SignatureScheme {
15
+ ED25519 = 0;
16
+ SECP256K1 = 1;
17
+ SECP256R1 = 2;
18
+ MULTISIG = 3;
19
+ BLS12381 = 4;
20
+ ZKLOGIN = 5;
21
+ PASSKEY = 6;
22
+ }
@@ -0,0 +1,49 @@
1
+ // Copyright (c) Mysten Labs, Inc.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ syntax = "proto3";
5
+
6
+ package sui.rpc.v2;
7
+
8
+ import "sui/rpc/v2/bcs.proto";
9
+ import "sui/rpc/v2/signature.proto";
10
+ import "sui/rpc/v2/transaction.proto";
11
+
12
+ service SignatureVerificationService {
13
+ // Perform signature verification of a UserSignature against the provided message.
14
+ rpc VerifySignature(VerifySignatureRequest) returns (VerifySignatureResponse);
15
+ }
16
+
17
+ message VerifySignatureRequest {
18
+ // The message to verify against.
19
+ //
20
+ // Today the only supported message types are `PersonalMessage` and
21
+ // `TransactionData` and the `Bcs.name` must be set to indicate which type of
22
+ // message is being verified.
23
+ optional Bcs message = 1;
24
+
25
+ // The signature to verify.
26
+ optional UserSignature signature = 2;
27
+
28
+ // Optional. Address to validate against the provided signature.
29
+ //
30
+ // If provided, this address will be compared against the the address derived
31
+ // from the provide signature and a successful response will only be returned
32
+ // if they match.
33
+ optional string address = 3;
34
+
35
+ // The set of JWKs to use when verifying Zklogin signatures.
36
+ // If this is empty the current set of valid JWKs stored onchain will be used
37
+ repeated ActiveJwk jwks = 4;
38
+
39
+ // The epoch to use
40
+ // optional uint64 epoch = 5;
41
+ }
42
+
43
+ message VerifySignatureResponse {
44
+ // Indicates if the provided signature was valid given the requested parameters.
45
+ optional bool is_valid = 1;
46
+
47
+ // If `is_valid` is `false`, this is the reason for why the signature verification failed.
48
+ optional string reason = 2;
49
+ }
@@ -0,0 +1,300 @@
1
+ // Copyright (c) Mysten Labs, Inc.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ syntax = "proto3";
5
+
6
+ package sui.rpc.v2;
7
+
8
+ import "google/protobuf/field_mask.proto";
9
+ import "sui/rpc/v2/bcs.proto";
10
+ import "sui/rpc/v2/object.proto";
11
+
12
+ service StateService {
13
+ rpc ListDynamicFields(ListDynamicFieldsRequest) returns (ListDynamicFieldsResponse);
14
+ rpc ListOwnedObjects(ListOwnedObjectsRequest) returns (ListOwnedObjectsResponse);
15
+ rpc GetCoinInfo(GetCoinInfoRequest) returns (GetCoinInfoResponse);
16
+ rpc GetBalance(GetBalanceRequest) returns (GetBalanceResponse);
17
+ rpc ListBalances(ListBalancesRequest) returns (ListBalancesResponse);
18
+ }
19
+
20
+ // Request message for `NodeService.GetCoinInfo`.
21
+ message GetCoinInfoRequest {
22
+ // The coin type to request information about
23
+ optional string coin_type = 1;
24
+ }
25
+
26
+ // Response message for `NodeService.GetCoinInfo`.
27
+ message GetCoinInfoResponse {
28
+ // Required. The coin type.
29
+ optional string coin_type = 1;
30
+
31
+ // This field will be populated with information about this coin
32
+ // type's `0x2::coin::CoinMetadata` if it exists and has not been wrapped.
33
+ optional CoinMetadata metadata = 2;
34
+
35
+ // This field will be populated with information about this coin
36
+ // type's `0x2::coin::TreasuryCap` if it exists and has not been wrapped.
37
+ optional CoinTreasury treasury = 3;
38
+
39
+ // If this coin type is a regulated coin, this field will be
40
+ // populated with information either from its Currency object
41
+ // in the CoinRegistry, or from its `0x2::coin::RegulatedCoinMetadata`
42
+ // object for coins that have not been migrated to the CoinRegistry
43
+ //
44
+ // If this coin is not known to be regulated, only the
45
+ // coin_regulated_state field will be populated.
46
+ optional RegulatedCoinMetadata regulated_metadata = 4;
47
+ }
48
+
49
+ // Metadata for a coin type
50
+ message CoinMetadata {
51
+ // Information about the state of the coin's MetadataCap
52
+ enum MetadataCapState {
53
+ // Indicates the state of the MetadataCap is unknown.
54
+ // Set when the coin has not been migrated to the CoinRegistry.
55
+ METADATA_CAP_STATE_UNKNOWN = 0;
56
+ // Indicates the MetadataCap has been claimed.
57
+ CLAIMED = 1;
58
+ // Indicates the MetadataCap has not been claimed.
59
+ UNCLAIMED = 2;
60
+ // Indicates the MetadataCap has been deleted.
61
+ DELETED = 3;
62
+ }
63
+
64
+ // ObjectId of the `0x2::coin::CoinMetadata` object or
65
+ // 0x2::sui::coin_registry::Currency object (when registered with CoinRegistry).
66
+ optional string id = 1;
67
+ // Number of decimal places to coin uses.
68
+ optional uint32 decimals = 2;
69
+ // Name for the token
70
+ optional string name = 3;
71
+ // Symbol for the token
72
+ optional string symbol = 4;
73
+ // Description of the token
74
+ optional string description = 5;
75
+ // URL for the token logo
76
+ optional string icon_url = 6;
77
+ // The MetadataCap ID if it has been claimed for this coin type.
78
+ // This capability allows updating the coin's metadata fields.
79
+ // Only populated when metadata is from CoinRegistry.
80
+ optional string metadata_cap_id = 7;
81
+ // State of the MetadataCap for this coin type.
82
+ optional MetadataCapState metadata_cap_state = 8;
83
+ }
84
+
85
+ // Information about a coin type's `0x2::coin::TreasuryCap` and its total available supply
86
+ message CoinTreasury {
87
+ // Supply state of a coin, matching the Move SupplyState enum
88
+ enum SupplyState {
89
+ // Supply is unknown or TreasuryCap still exists (minting still possible)
90
+ SUPPLY_STATE_UNKNOWN = 0;
91
+ // Supply is fixed (TreasuryCap consumed, no more minting possible)
92
+ FIXED = 1;
93
+ // Supply can only decrease (burning allowed, minting not allowed)
94
+ BURN_ONLY = 2;
95
+ }
96
+ // ObjectId of the `0x2::coin::TreasuryCap` object.
97
+ optional string id = 1;
98
+ // Total available supply for this coin type.
99
+ optional uint64 total_supply = 2;
100
+ // Supply state indicating if the supply is fixed or can still be minted
101
+ optional SupplyState supply_state = 3;
102
+ }
103
+
104
+ // Information about a regulated coin, which indicates that it makes use of the transfer deny list.
105
+ message RegulatedCoinMetadata {
106
+ // Indicates the state of the regulation of the coin.
107
+ enum CoinRegulatedState {
108
+ // Indicates the regulation state of the coin is unknown.
109
+ // This is set when a coin has not been migrated to the
110
+ // coin registry and has no `0x2::coin::RegulatedCoinMetadata`
111
+ // object.
112
+ COIN_REGULATED_STATE_UNKNOWN = 0;
113
+ // Indicates a coin is regulated. RegulatedCoinMetadata will be populated.
114
+ REGULATED = 1;
115
+ // Indicates a coin is unregulated.
116
+ UNREGULATED = 2;
117
+ }
118
+
119
+ // ObjectId of the `0x2::coin::RegulatedCoinMetadata` object.
120
+ // Only present for coins that have not been migrated to CoinRegistry.
121
+ optional string id = 1;
122
+ // The ID of the coin's `CoinMetadata` or `CoinData` object.
123
+ optional string coin_metadata_object = 2;
124
+ // The ID of the coin's `DenyCap` object.
125
+ optional string deny_cap_object = 3;
126
+ // Whether the coin can be globally paused
127
+ optional bool allow_global_pause = 4;
128
+ // Variant of the regulated coin metadata
129
+ optional uint32 variant = 5;
130
+ // Indicates the coin's regulated state.
131
+ optional CoinRegulatedState coin_regulated_state = 6;
132
+ }
133
+
134
+ // Request message for `LiveDataService.GetBalance`.
135
+ message GetBalanceRequest {
136
+ // Required. The owner's Sui address.
137
+ optional string owner = 1;
138
+
139
+ // Required. The type names for the coin (e.g., 0x2::sui::SUI).
140
+ optional string coin_type = 2;
141
+ }
142
+
143
+ // Response message for `LiveDataService.GetBalance`.
144
+ // Return the total coin balance for one coin type, owned by the address owner.
145
+ message GetBalanceResponse {
146
+ // The balance information for the requested coin type.
147
+ optional Balance balance = 1;
148
+ }
149
+
150
+ // Request message for `LiveDataService.ListBalances`.
151
+ message ListBalancesRequest {
152
+ // Required. The owner's Sui address.
153
+ optional string owner = 1;
154
+
155
+ // The maximum number of balance entries to return. The service may return fewer than this value.
156
+ // If unspecified, at most `50` entries will be returned.
157
+ // The maximum value is `1000`; values above `1000` will be coerced to `1000`.
158
+ optional uint32 page_size = 2;
159
+
160
+ // A page token, received from a previous `ListBalances` call.
161
+ // Provide this to retrieve the subsequent page.
162
+ //
163
+ // When paginating, all other parameters provided to `ListBalances` must
164
+ // match the call that provided the page token.
165
+ optional bytes page_token = 3;
166
+ }
167
+
168
+ // Response message for `LiveDataService.ListBalances`.
169
+ // Return the total coin balance for all coin types, owned by the address owner.
170
+ message ListBalancesResponse {
171
+ // The list of coin types and their respective balances.
172
+ repeated Balance balances = 1;
173
+
174
+ // A token, which can be sent as `page_token` to retrieve the next page.
175
+ // If this field is omitted, there are no subsequent pages.
176
+ optional bytes next_page_token = 2;
177
+ }
178
+
179
+ // Balance information for a specific coin type.
180
+ message Balance {
181
+ // The type of the coin (e.g., 0x2::sui::SUI).
182
+ optional string coin_type = 1;
183
+
184
+ // Shows the total balance of the coin in its smallest unit.
185
+ optional uint64 balance = 3;
186
+ }
187
+
188
+ // Request message for `NodeService.ListDynamicFields`
189
+ message ListDynamicFieldsRequest {
190
+ // Required. The `UID` of the parent, which owns the collections of dynamic fields.
191
+ optional string parent = 1;
192
+
193
+ // The maximum number of dynamic fields to return. The service may return fewer than this value.
194
+ // If unspecified, at most `50` entries will be returned.
195
+ // The maximum value is `1000`; values above `1000` will be coerced to `1000`.
196
+ optional uint32 page_size = 2;
197
+
198
+ // A page token, received from a previous `ListDynamicFields` call.
199
+ // Provide this to retrieve the subsequent page.
200
+ //
201
+ // When paginating, all other parameters provided to `ListDynamicFields` must
202
+ // match the call that provided the page token.
203
+ optional bytes page_token = 3;
204
+
205
+ // Mask specifying which fields to read.
206
+ // If no mask is specified, defaults to `parent,field_id`.
207
+ optional google.protobuf.FieldMask read_mask = 4;
208
+ }
209
+
210
+ // Response message for `NodeService.ListDynamicFields`
211
+ message ListDynamicFieldsResponse {
212
+ // Page of dynamic fields owned by the specified parent.
213
+ repeated DynamicField dynamic_fields = 1;
214
+
215
+ // A token, which can be sent as `page_token` to retrieve the next page.
216
+ // If this field is omitted, there are no subsequent pages.
217
+ optional bytes next_page_token = 2;
218
+ }
219
+
220
+ message DynamicField {
221
+ enum DynamicFieldKind {
222
+ DYNAMIC_FIELD_KIND_UNKNOWN = 0;
223
+ FIELD = 1;
224
+ OBJECT = 2;
225
+ }
226
+
227
+ optional DynamicFieldKind kind = 1;
228
+
229
+ // ObjectId of this dynamic field's parent.
230
+ optional string parent = 2;
231
+
232
+ // ObjectId of this dynamic field.
233
+ optional string field_id = 3;
234
+
235
+ // The field object itself
236
+ optional Object field_object = 4;
237
+
238
+ // The dynamic field's "name"
239
+ optional Bcs name = 5;
240
+
241
+ // The dynamic field's "value"
242
+ optional Bcs value = 6;
243
+
244
+ // The type of the dynamic field "value".
245
+ //
246
+ // If this is a dynamic object field then this is the type of the object
247
+ // itself (which is a child of this field), otherwise this is the type of the
248
+ // value of this field.
249
+ optional string value_type = 7;
250
+
251
+ // The ObjectId of the child object when a child is a dynamic
252
+ // object field.
253
+ //
254
+ // The presence or absence of this field can be used to determine if a child
255
+ // is a dynamic field or a dynamic child object
256
+ optional string child_id = 8;
257
+
258
+ // The object itself when a child is a dynamic object field.
259
+ optional Object child_object = 9;
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
+ // Mask specifying which fields to read.
279
+ // If no mask is specified, defaults to `object_id,version,object_type`.
280
+ optional google.protobuf.FieldMask read_mask = 4;
281
+
282
+ // Optional type filter to limit the types of objects listed.
283
+ //
284
+ // Providing an object type with no type params will return objects of that
285
+ // type with any type parameter, e.g. `0x2::coin::Coin` will return all
286
+ // `Coin<T>` objects regardless of the type parameter `T`. Providing a type
287
+ // with a type param will restrict the returned objects to only those objects
288
+ // that match the provided type parameters, e.g.
289
+ // `0x2::coin::Coin<0x2::sui::SUI>` will only return `Coin<SUI>` objects.
290
+ optional string object_type = 5;
291
+ }
292
+
293
+ message ListOwnedObjectsResponse {
294
+ // Page of dynamic fields owned by the specified parent.
295
+ repeated Object objects = 1;
296
+
297
+ // A token, which can be sent as `page_token` to retrieve the next page.
298
+ // If this field is omitted, there are no subsequent pages.
299
+ optional bytes next_page_token = 2;
300
+ }
@@ -0,0 +1,41 @@
1
+ // Copyright (c) Mysten Labs, Inc.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ syntax = "proto3";
5
+
6
+ package sui.rpc.v2;
7
+
8
+ import "google/protobuf/field_mask.proto";
9
+ import "sui/rpc/v2/checkpoint.proto";
10
+
11
+ service SubscriptionService {
12
+ // Subscribe to the stream of checkpoints.
13
+ //
14
+ // This API provides a subscription to the checkpoint stream for the Sui
15
+ // blockchain. When a subscription is initialized the stream will begin with
16
+ // the latest executed checkpoint as seen by the server. Responses are
17
+ // guaranteed to return checkpoints in-order and without gaps. This enables
18
+ // clients to know exactly the last checkpoint they have processed and in the
19
+ // event the subscription terminates (either by the client/server or by the
20
+ // connection breaking), clients will be able to reinitialize a subscription
21
+ // and then leverage other APIs in order to request data for the checkpoints
22
+ // they missed.
23
+ rpc SubscribeCheckpoints(SubscribeCheckpointsRequest) returns (stream SubscribeCheckpointsResponse);
24
+ }
25
+
26
+ // Request message for SubscriptionService.SubscribeCheckpoints
27
+ message SubscribeCheckpointsRequest {
28
+ // Optional. Mask for specifying which parts of the
29
+ // SubscribeCheckpointsResponse should be returned.
30
+ optional google.protobuf.FieldMask read_mask = 1;
31
+ }
32
+
33
+ // Response message for SubscriptionService.SubscribeCheckpoints
34
+ message SubscribeCheckpointsResponse {
35
+ // Required. The checkpoint sequence number and value of the current cursor
36
+ // into the checkpoint stream
37
+ optional uint64 cursor = 1;
38
+
39
+ // The requested data for this checkpoint
40
+ optional Checkpoint checkpoint = 2;
41
+ }