Skip to content

Commit d3334e5

Browse files
authored
sui-rpc: update protos (#121)
1 parent 91ff509 commit d3334e5

File tree

10 files changed

+235
-377
lines changed

10 files changed

+235
-377
lines changed
-50 Bytes
Binary file not shown.

crates/sui-rpc/src/proto/generated/sui.rpc.v2beta2.field_info.rs

Lines changed: 36 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1814,12 +1814,19 @@ mod _field_impls {
18141814
number: 3i32,
18151815
message_fields: None,
18161816
};
1817+
pub const READ_MASK_FIELD: &'static MessageField = &MessageField {
1818+
name: "read_mask",
1819+
json_name: "readMask",
1820+
number: 4i32,
1821+
message_fields: None,
1822+
};
18171823
}
18181824
impl MessageFields for ListDynamicFieldsRequest {
18191825
const FIELDS: &'static [&'static MessageField] = &[
18201826
Self::PARENT_FIELD,
18211827
Self::PAGE_SIZE_FIELD,
18221828
Self::PAGE_TOKEN_FIELD,
1829+
Self::READ_MASK_FIELD,
18231830
];
18241831
}
18251832
impl ListDynamicFieldsResponse {
@@ -1885,6 +1892,12 @@ mod _field_impls {
18851892
number: 7i32,
18861893
message_fields: None,
18871894
};
1895+
pub const OBJECT_FIELD: &'static MessageField = &MessageField {
1896+
name: "object",
1897+
json_name: "object",
1898+
number: 8i32,
1899+
message_fields: Some(Object::FIELDS),
1900+
};
18881901
}
18891902
impl MessageFields for DynamicField {
18901903
const FIELDS: &'static [&'static MessageField] = &[
@@ -1895,6 +1908,7 @@ mod _field_impls {
18951908
Self::NAME_VALUE_FIELD,
18961909
Self::VALUE_TYPE_FIELD,
18971910
Self::DYNAMIC_OBJECT_ID_FIELD,
1911+
Self::OBJECT_FIELD,
18981912
];
18991913
}
19001914
impl SimulateTransactionRequest {
@@ -2005,12 +2019,6 @@ mod _field_impls {
20052019
number: 1i32,
20062020
message_fields: None,
20072021
};
2008-
pub const OBJECT_TYPE_FIELD: &'static MessageField = &MessageField {
2009-
name: "object_type",
2010-
json_name: "objectType",
2011-
number: 4i32,
2012-
message_fields: None,
2013-
};
20142022
pub const PAGE_SIZE_FIELD: &'static MessageField = &MessageField {
20152023
name: "page_size",
20162024
json_name: "pageSize",
@@ -2023,21 +2031,34 @@ mod _field_impls {
20232031
number: 3i32,
20242032
message_fields: None,
20252033
};
2034+
pub const READ_MASK_FIELD: &'static MessageField = &MessageField {
2035+
name: "read_mask",
2036+
json_name: "readMask",
2037+
number: 4i32,
2038+
message_fields: None,
2039+
};
2040+
pub const OBJECT_TYPE_FIELD: &'static MessageField = &MessageField {
2041+
name: "object_type",
2042+
json_name: "objectType",
2043+
number: 5i32,
2044+
message_fields: None,
2045+
};
20262046
}
20272047
impl MessageFields for ListOwnedObjectsRequest {
20282048
const FIELDS: &'static [&'static MessageField] = &[
20292049
Self::OWNER_FIELD,
2030-
Self::OBJECT_TYPE_FIELD,
20312050
Self::PAGE_SIZE_FIELD,
20322051
Self::PAGE_TOKEN_FIELD,
2052+
Self::READ_MASK_FIELD,
2053+
Self::OBJECT_TYPE_FIELD,
20332054
];
20342055
}
20352056
impl ListOwnedObjectsResponse {
20362057
pub const OBJECTS_FIELD: &'static MessageField = &MessageField {
20372058
name: "objects",
20382059
json_name: "objects",
20392060
number: 1i32,
2040-
message_fields: Some(OwnedObject::FIELDS),
2061+
message_fields: Some(Object::FIELDS),
20412062
};
20422063
pub const NEXT_PAGE_TOKEN_FIELD: &'static MessageField = &MessageField {
20432064
name: "next_page_token",
@@ -2052,54 +2073,6 @@ mod _field_impls {
20522073
Self::NEXT_PAGE_TOKEN_FIELD,
20532074
];
20542075
}
2055-
impl OwnedObject {
2056-
pub const OBJECT_ID_FIELD: &'static MessageField = &MessageField {
2057-
name: "object_id",
2058-
json_name: "objectId",
2059-
number: 2i32,
2060-
message_fields: None,
2061-
};
2062-
pub const VERSION_FIELD: &'static MessageField = &MessageField {
2063-
name: "version",
2064-
json_name: "version",
2065-
number: 3i32,
2066-
message_fields: None,
2067-
};
2068-
pub const DIGEST_FIELD: &'static MessageField = &MessageField {
2069-
name: "digest",
2070-
json_name: "digest",
2071-
number: 4i32,
2072-
message_fields: None,
2073-
};
2074-
pub const OWNER_FIELD: &'static MessageField = &MessageField {
2075-
name: "owner",
2076-
json_name: "owner",
2077-
number: 5i32,
2078-
message_fields: Some(Owner::FIELDS),
2079-
};
2080-
pub const OBJECT_TYPE_FIELD: &'static MessageField = &MessageField {
2081-
name: "object_type",
2082-
json_name: "objectType",
2083-
number: 6i32,
2084-
message_fields: None,
2085-
};
2086-
pub const BALANCE_FIELD: &'static MessageField = &MessageField {
2087-
name: "balance",
2088-
json_name: "balance",
2089-
number: 200i32,
2090-
message_fields: None,
2091-
};
2092-
}
2093-
impl MessageFields for OwnedObject {
2094-
const FIELDS: &'static [&'static MessageField] = &[
2095-
Self::OBJECT_ID_FIELD,
2096-
Self::VERSION_FIELD,
2097-
Self::DIGEST_FIELD,
2098-
Self::OWNER_FIELD,
2099-
Self::OBJECT_TYPE_FIELD,
2100-
Self::BALANCE_FIELD,
2101-
];
2102-
}
21032076
impl Package {
21042077
pub const STORAGE_ID_FIELD: &'static MessageField = &MessageField {
21052078
name: "storage_id",
@@ -2719,6 +2692,12 @@ mod _field_impls {
27192692
number: 100i32,
27202693
message_fields: None,
27212694
};
2695+
pub const BALANCE_FIELD: &'static MessageField = &MessageField {
2696+
name: "balance",
2697+
json_name: "balance",
2698+
number: 101i32,
2699+
message_fields: None,
2700+
};
27222701
}
27232702
impl MessageFields for Object {
27242703
const FIELDS: &'static [&'static MessageField] = &[
@@ -2734,6 +2713,7 @@ mod _field_impls {
27342713
Self::PREVIOUS_TRANSACTION_FIELD,
27352714
Self::STORAGE_REBATE_FIELD,
27362715
Self::JSON_FIELD,
2716+
Self::BALANCE_FIELD,
27372717
];
27382718
}
27392719
impl ObjectReference {

crates/sui-rpc/src/proto/generated/sui.rpc.v2beta2.rs

Lines changed: 26 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,7 +1242,7 @@ pub mod package_upgrade_error {
12421242
/// Package upgrade is incompatible with previous version.
12431243
IncompatibleUpgrade = 3,
12441244
/// Digest in upgrade ticket and computed digest differ.
1245-
DigetsDoesNotMatch = 4,
1245+
DigestDoesNotMatch = 4,
12461246
/// Upgrade policy is not valid.
12471247
UnknownUpgradePolicy = 5,
12481248
/// Package ID does not match `PackageId` in upgrade ticket.
@@ -1259,7 +1259,7 @@ pub mod package_upgrade_error {
12591259
Self::UnableToFetchPackage => "UNABLE_TO_FETCH_PACKAGE",
12601260
Self::NotAPackage => "NOT_A_PACKAGE",
12611261
Self::IncompatibleUpgrade => "INCOMPATIBLE_UPGRADE",
1262-
Self::DigetsDoesNotMatch => "DIGETS_DOES_NOT_MATCH",
1262+
Self::DigestDoesNotMatch => "DIGEST_DOES_NOT_MATCH",
12631263
Self::UnknownUpgradePolicy => "UNKNOWN_UPGRADE_POLICY",
12641264
Self::PackageIdDoesNotMatch => "PACKAGE_ID_DOES_NOT_MATCH",
12651265
}
@@ -1271,7 +1271,7 @@ pub mod package_upgrade_error {
12711271
"UNABLE_TO_FETCH_PACKAGE" => Some(Self::UnableToFetchPackage),
12721272
"NOT_A_PACKAGE" => Some(Self::NotAPackage),
12731273
"INCOMPATIBLE_UPGRADE" => Some(Self::IncompatibleUpgrade),
1274-
"DIGETS_DOES_NOT_MATCH" => Some(Self::DigetsDoesNotMatch),
1274+
"DIGEST_DOES_NOT_MATCH" => Some(Self::DigestDoesNotMatch),
12751275
"UNKNOWN_UPGRADE_POLICY" => Some(Self::UnknownUpgradePolicy),
12761276
"PACKAGE_ID_DOES_NOT_MATCH" => Some(Self::PackageIdDoesNotMatch),
12771277
_ => None,
@@ -2536,6 +2536,8 @@ pub struct ListDynamicFieldsRequest {
25362536
/// match the call that provided the page token.
25372537
#[prost(bytes = "bytes", optional, tag = "3")]
25382538
pub page_token: ::core::option::Option<::prost::bytes::Bytes>,
2539+
#[prost(message, optional, tag = "4")]
2540+
pub read_mask: ::core::option::Option<::prost_types::FieldMask>,
25392541
}
25402542
/// Response message for `NodeService.ListDynamicFields`
25412543
#[derive(Clone, PartialEq, ::prost::Message)]
@@ -2578,6 +2580,9 @@ pub struct DynamicField {
25782580
/// is a dynamic field or a dynamic child object
25792581
#[prost(string, optional, tag = "7")]
25802582
pub dynamic_object_id: ::core::option::Option<::prost::alloc::string::String>,
2583+
/// The object itself when a child is a dynamic object field.
2584+
#[prost(message, optional, tag = "8")]
2585+
pub object: ::core::option::Option<Object>,
25812586
}
25822587
/// Nested message and enum types in `DynamicField`.
25832588
pub mod dynamic_field {
@@ -2711,16 +2716,6 @@ pub struct ListOwnedObjectsRequest {
27112716
/// Required. The address of the account that owns the objects.
27122717
#[prost(string, optional, tag = "1")]
27132718
pub owner: ::core::option::Option<::prost::alloc::string::String>,
2714-
/// Optional type filter to limit the types of objects listed.
2715-
///
2716-
/// Providing an object type with no type params will return objects of that
2717-
/// type with any type parameter, e.g. `0x2::coin::Coin` will return all
2718-
/// `Coin<T>` objects regardless of the type parameter `T`. Providing a type
2719-
/// with a type param will retrict the returned objects to only those objects
2720-
/// that match the provided type parameters, e.g.
2721-
/// `0x2::coin::Coin<0x2::sui::SUI>` will only return `Coin<SUI>` objects.
2722-
#[prost(string, optional, tag = "4")]
2723-
pub object_type: ::core::option::Option<::prost::alloc::string::String>,
27242719
/// The maximum number of entries return. The service may return fewer than this value.
27252720
/// If unspecified, at most `50` entries will be returned.
27262721
/// The maximum value is `1000`; values above `1000` will be coerced to `1000`.
@@ -2733,33 +2728,29 @@ pub struct ListOwnedObjectsRequest {
27332728
/// match the call that provided the page token.
27342729
#[prost(bytes = "bytes", optional, tag = "3")]
27352730
pub page_token: ::core::option::Option<::prost::bytes::Bytes>,
2731+
#[prost(message, optional, tag = "4")]
2732+
pub read_mask: ::core::option::Option<::prost_types::FieldMask>,
2733+
/// Optional type filter to limit the types of objects listed.
2734+
///
2735+
/// Providing an object type with no type params will return objects of that
2736+
/// type with any type parameter, e.g. `0x2::coin::Coin` will return all
2737+
/// `Coin<T>` objects regardless of the type parameter `T`. Providing a type
2738+
/// with a type param will retrict the returned objects to only those objects
2739+
/// that match the provided type parameters, e.g.
2740+
/// `0x2::coin::Coin<0x2::sui::SUI>` will only return `Coin<SUI>` objects.
2741+
#[prost(string, optional, tag = "5")]
2742+
pub object_type: ::core::option::Option<::prost::alloc::string::String>,
27362743
}
27372744
#[derive(Clone, PartialEq, ::prost::Message)]
27382745
pub struct ListOwnedObjectsResponse {
27392746
/// Page of dynamic fields owned by the specified parent.
27402747
#[prost(message, repeated, tag = "1")]
2741-
pub objects: ::prost::alloc::vec::Vec<OwnedObject>,
2748+
pub objects: ::prost::alloc::vec::Vec<Object>,
27422749
/// A token, which can be sent as `page_token` to retrieve the next page.
27432750
/// If this field is omitted, there are no subsequent pages.
27442751
#[prost(bytes = "bytes", optional, tag = "2")]
27452752
pub next_page_token: ::core::option::Option<::prost::bytes::Bytes>,
27462753
}
2747-
#[derive(Clone, PartialEq, ::prost::Message)]
2748-
pub struct OwnedObject {
2749-
#[prost(string, optional, tag = "2")]
2750-
pub object_id: ::core::option::Option<::prost::alloc::string::String>,
2751-
#[prost(uint64, optional, tag = "3")]
2752-
pub version: ::core::option::Option<u64>,
2753-
#[prost(string, optional, tag = "4")]
2754-
pub digest: ::core::option::Option<::prost::alloc::string::String>,
2755-
#[prost(message, optional, tag = "5")]
2756-
pub owner: ::core::option::Option<Owner>,
2757-
#[prost(string, optional, tag = "6")]
2758-
pub object_type: ::core::option::Option<::prost::alloc::string::String>,
2759-
/// Current balance if this object is a `0x2::coin::Coin<T>`
2760-
#[prost(uint64, optional, tag = "200")]
2761-
pub balance: ::core::option::Option<u64>,
2762-
}
27632754
/// Generated client implementations.
27642755
pub mod live_data_service_client {
27652756
#![allow(
@@ -4577,6 +4568,9 @@ pub struct Object {
45774568
/// JSON rendering of the object.
45784569
#[prost(message, optional, boxed, tag = "100")]
45794570
pub json: ::core::option::Option<::prost::alloc::boxed::Box<::prost_types::Value>>,
4571+
/// Current balance if this object is a `0x2::coin::Coin<T>`
4572+
#[prost(uint64, optional, tag = "101")]
4573+
pub balance: ::core::option::Option<u64>,
45804574
}
45814575
/// Reference to an object.
45824576
#[derive(Clone, PartialEq, ::prost::Message)]
@@ -5441,7 +5435,7 @@ pub mod subscription_service_client {
54415435
/// This API provides a subscription to the checkpoint stream for the Sui
54425436
/// blockchain. When a subscription is initialized the stream will begin with
54435437
/// the latest executed checkpoint as seen by the server. Responses are
5444-
/// gaurenteed to return checkpoints in-order and without gaps. This enables
5438+
/// guaranteed to return checkpoints in-order and without gaps. This enables
54455439
/// clients to know exactly the last checkpoint they have processed and in the
54465440
/// event the subscription terminates (either by the client/server or by the
54475441
/// connection breaking), clients will be able to reinitailize a subscription
@@ -5507,7 +5501,7 @@ pub mod subscription_service_server {
55075501
/// This API provides a subscription to the checkpoint stream for the Sui
55085502
/// blockchain. When a subscription is initialized the stream will begin with
55095503
/// the latest executed checkpoint as seen by the server. Responses are
5510-
/// gaurenteed to return checkpoints in-order and without gaps. This enables
5504+
/// guaranteed to return checkpoints in-order and without gaps. This enables
55115505
/// clients to know exactly the last checkpoint they have processed and in the
55125506
/// event the subscription terminates (either by the client/server or by the
55135507
/// connection breaking), clients will be able to reinitailize a subscription

0 commit comments

Comments
 (0)