Skip to main content

polyester/gen/buffa/
chain.guard.v1.rs

1// @generated by buffa-codegen. DO NOT EDIT.
2
3/// ProtectedAction identifies one server-owned action that can receive a guard
4/// approval. The server derives target, selector, paramsHash, nonce, and deadline.
5#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
6#[repr(i32)]
7pub enum ProtectedAction {
8    /// Action is not specified.
9    PROTECTED_ACTION_UNSPECIFIED = 0i32,
10    /// Set the external whitelist requirement to false. Enabling the requirement
11    /// does not need GuardSigner approval and should not be routed here.
12    PROTECTED_ACTION_FUNDING_SET_EXTERNAL_WHITELIST_REQUIRED = 1i32,
13    /// Add external withdrawal destinations to the funding-account whitelist.
14    PROTECTED_ACTION_FUNDING_ADD_EXTERNAL_WHITELIST = 2i32,
15    /// Remove external withdrawal destinations from the funding-account whitelist.
16    PROTECTED_ACTION_FUNDING_REMOVE_EXTERNAL_WHITELIST = 3i32,
17    /// Add internal transfer destinations to the funding-account whitelist.
18    PROTECTED_ACTION_FUNDING_ADD_INTERNAL_WHITELIST = 4i32,
19    /// Remove internal transfer destinations from the funding-account whitelist.
20    PROTECTED_ACTION_FUNDING_REMOVE_INTERNAL_WHITELIST = 5i32,
21    /// Set the internal whitelist requirement to false. Enabling the requirement
22    /// does not need GuardSigner approval and should not be routed here.
23    PROTECTED_ACTION_FUNDING_SET_INTERNAL_WHITELIST_REQUIRED = 6i32,
24}
25impl ProtectedAction {
26    ///Idiomatic alias for [`Self::PROTECTED_ACTION_UNSPECIFIED`]; `Debug` prints the variant name.
27    #[allow(non_upper_case_globals)]
28    pub const Unspecified: Self = Self::PROTECTED_ACTION_UNSPECIFIED;
29    ///Idiomatic alias for [`Self::PROTECTED_ACTION_FUNDING_SET_EXTERNAL_WHITELIST_REQUIRED`]; `Debug` prints the variant name.
30    #[allow(non_upper_case_globals)]
31    pub const FundingSetExternalWhitelistRequired: Self = Self::PROTECTED_ACTION_FUNDING_SET_EXTERNAL_WHITELIST_REQUIRED;
32    ///Idiomatic alias for [`Self::PROTECTED_ACTION_FUNDING_ADD_EXTERNAL_WHITELIST`]; `Debug` prints the variant name.
33    #[allow(non_upper_case_globals)]
34    pub const FundingAddExternalWhitelist: Self = Self::PROTECTED_ACTION_FUNDING_ADD_EXTERNAL_WHITELIST;
35    ///Idiomatic alias for [`Self::PROTECTED_ACTION_FUNDING_REMOVE_EXTERNAL_WHITELIST`]; `Debug` prints the variant name.
36    #[allow(non_upper_case_globals)]
37    pub const FundingRemoveExternalWhitelist: Self = Self::PROTECTED_ACTION_FUNDING_REMOVE_EXTERNAL_WHITELIST;
38    ///Idiomatic alias for [`Self::PROTECTED_ACTION_FUNDING_ADD_INTERNAL_WHITELIST`]; `Debug` prints the variant name.
39    #[allow(non_upper_case_globals)]
40    pub const FundingAddInternalWhitelist: Self = Self::PROTECTED_ACTION_FUNDING_ADD_INTERNAL_WHITELIST;
41    ///Idiomatic alias for [`Self::PROTECTED_ACTION_FUNDING_REMOVE_INTERNAL_WHITELIST`]; `Debug` prints the variant name.
42    #[allow(non_upper_case_globals)]
43    pub const FundingRemoveInternalWhitelist: Self = Self::PROTECTED_ACTION_FUNDING_REMOVE_INTERNAL_WHITELIST;
44    ///Idiomatic alias for [`Self::PROTECTED_ACTION_FUNDING_SET_INTERNAL_WHITELIST_REQUIRED`]; `Debug` prints the variant name.
45    #[allow(non_upper_case_globals)]
46    pub const FundingSetInternalWhitelistRequired: Self = Self::PROTECTED_ACTION_FUNDING_SET_INTERNAL_WHITELIST_REQUIRED;
47}
48impl ::core::default::Default for ProtectedAction {
49    fn default() -> Self {
50        Self::PROTECTED_ACTION_UNSPECIFIED
51    }
52}
53impl ::serde::Serialize for ProtectedAction {
54    fn serialize<S: ::serde::Serializer>(
55        &self,
56        s: S,
57    ) -> ::core::result::Result<S::Ok, S::Error> {
58        s.serialize_str(::buffa::Enumeration::proto_name(self))
59    }
60}
61impl<'de> ::serde::Deserialize<'de> for ProtectedAction {
62    fn deserialize<D: ::serde::Deserializer<'de>>(
63        d: D,
64    ) -> ::core::result::Result<Self, D::Error> {
65        struct _V;
66        impl ::serde::de::Visitor<'_> for _V {
67            type Value = ProtectedAction;
68            fn expecting(
69                &self,
70                f: &mut ::core::fmt::Formatter<'_>,
71            ) -> ::core::fmt::Result {
72                f.write_str(
73                    concat!(
74                        "a string, integer, or null for ", stringify!(ProtectedAction)
75                    ),
76                )
77            }
78            fn visit_str<E: ::serde::de::Error>(
79                self,
80                v: &str,
81            ) -> ::core::result::Result<ProtectedAction, E> {
82                <ProtectedAction as ::buffa::Enumeration>::from_proto_name(v)
83                    .ok_or_else(|| { ::serde::de::Error::unknown_variant(v, &[]) })
84            }
85            fn visit_i64<E: ::serde::de::Error>(
86                self,
87                v: i64,
88            ) -> ::core::result::Result<ProtectedAction, E> {
89                let v32 = i32::try_from(v)
90                    .map_err(|_| {
91                        ::serde::de::Error::custom(
92                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
93                        )
94                    })?;
95                <ProtectedAction as ::buffa::Enumeration>::from_i32(v32)
96                    .ok_or_else(|| {
97                        ::serde::de::Error::custom(
98                            ::buffa::alloc::format!("unknown enum value {v32}"),
99                        )
100                    })
101            }
102            fn visit_u64<E: ::serde::de::Error>(
103                self,
104                v: u64,
105            ) -> ::core::result::Result<ProtectedAction, E> {
106                let v32 = i32::try_from(v)
107                    .map_err(|_| {
108                        ::serde::de::Error::custom(
109                            ::buffa::alloc::format!("enum value {v} out of i32 range"),
110                        )
111                    })?;
112                <ProtectedAction as ::buffa::Enumeration>::from_i32(v32)
113                    .ok_or_else(|| {
114                        ::serde::de::Error::custom(
115                            ::buffa::alloc::format!("unknown enum value {v32}"),
116                        )
117                    })
118            }
119            fn visit_unit<E: ::serde::de::Error>(
120                self,
121            ) -> ::core::result::Result<ProtectedAction, E> {
122                ::core::result::Result::Ok(::core::default::Default::default())
123            }
124        }
125        d.deserialize_any(_V)
126    }
127}
128impl ::buffa::json_helpers::ProtoElemJson for ProtectedAction {
129    fn serialize_proto_json<S: ::serde::Serializer>(
130        v: &Self,
131        s: S,
132    ) -> ::core::result::Result<S::Ok, S::Error> {
133        ::serde::Serialize::serialize(v, s)
134    }
135    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
136        d: D,
137    ) -> ::core::result::Result<Self, D::Error> {
138        <Self as ::serde::Deserialize>::deserialize(d)
139    }
140}
141impl ::buffa::Enumeration for ProtectedAction {
142    fn from_i32(value: i32) -> ::core::option::Option<Self> {
143        match value {
144            0i32 => ::core::option::Option::Some(Self::PROTECTED_ACTION_UNSPECIFIED),
145            1i32 => {
146                ::core::option::Option::Some(
147                    Self::PROTECTED_ACTION_FUNDING_SET_EXTERNAL_WHITELIST_REQUIRED,
148                )
149            }
150            2i32 => {
151                ::core::option::Option::Some(
152                    Self::PROTECTED_ACTION_FUNDING_ADD_EXTERNAL_WHITELIST,
153                )
154            }
155            3i32 => {
156                ::core::option::Option::Some(
157                    Self::PROTECTED_ACTION_FUNDING_REMOVE_EXTERNAL_WHITELIST,
158                )
159            }
160            4i32 => {
161                ::core::option::Option::Some(
162                    Self::PROTECTED_ACTION_FUNDING_ADD_INTERNAL_WHITELIST,
163                )
164            }
165            5i32 => {
166                ::core::option::Option::Some(
167                    Self::PROTECTED_ACTION_FUNDING_REMOVE_INTERNAL_WHITELIST,
168                )
169            }
170            6i32 => {
171                ::core::option::Option::Some(
172                    Self::PROTECTED_ACTION_FUNDING_SET_INTERNAL_WHITELIST_REQUIRED,
173                )
174            }
175            _ => ::core::option::Option::None,
176        }
177    }
178    fn to_i32(&self) -> i32 {
179        *self as i32
180    }
181    fn proto_name(&self) -> &'static str {
182        match self {
183            Self::PROTECTED_ACTION_UNSPECIFIED => "PROTECTED_ACTION_UNSPECIFIED",
184            Self::PROTECTED_ACTION_FUNDING_SET_EXTERNAL_WHITELIST_REQUIRED => {
185                "PROTECTED_ACTION_FUNDING_SET_EXTERNAL_WHITELIST_REQUIRED"
186            }
187            Self::PROTECTED_ACTION_FUNDING_ADD_EXTERNAL_WHITELIST => {
188                "PROTECTED_ACTION_FUNDING_ADD_EXTERNAL_WHITELIST"
189            }
190            Self::PROTECTED_ACTION_FUNDING_REMOVE_EXTERNAL_WHITELIST => {
191                "PROTECTED_ACTION_FUNDING_REMOVE_EXTERNAL_WHITELIST"
192            }
193            Self::PROTECTED_ACTION_FUNDING_ADD_INTERNAL_WHITELIST => {
194                "PROTECTED_ACTION_FUNDING_ADD_INTERNAL_WHITELIST"
195            }
196            Self::PROTECTED_ACTION_FUNDING_REMOVE_INTERNAL_WHITELIST => {
197                "PROTECTED_ACTION_FUNDING_REMOVE_INTERNAL_WHITELIST"
198            }
199            Self::PROTECTED_ACTION_FUNDING_SET_INTERNAL_WHITELIST_REQUIRED => {
200                "PROTECTED_ACTION_FUNDING_SET_INTERNAL_WHITELIST_REQUIRED"
201            }
202        }
203    }
204    fn from_proto_name(name: &str) -> ::core::option::Option<Self> {
205        match name {
206            "PROTECTED_ACTION_UNSPECIFIED" => {
207                ::core::option::Option::Some(Self::PROTECTED_ACTION_UNSPECIFIED)
208            }
209            "PROTECTED_ACTION_FUNDING_SET_EXTERNAL_WHITELIST_REQUIRED" => {
210                ::core::option::Option::Some(
211                    Self::PROTECTED_ACTION_FUNDING_SET_EXTERNAL_WHITELIST_REQUIRED,
212                )
213            }
214            "PROTECTED_ACTION_FUNDING_ADD_EXTERNAL_WHITELIST" => {
215                ::core::option::Option::Some(
216                    Self::PROTECTED_ACTION_FUNDING_ADD_EXTERNAL_WHITELIST,
217                )
218            }
219            "PROTECTED_ACTION_FUNDING_REMOVE_EXTERNAL_WHITELIST" => {
220                ::core::option::Option::Some(
221                    Self::PROTECTED_ACTION_FUNDING_REMOVE_EXTERNAL_WHITELIST,
222                )
223            }
224            "PROTECTED_ACTION_FUNDING_ADD_INTERNAL_WHITELIST" => {
225                ::core::option::Option::Some(
226                    Self::PROTECTED_ACTION_FUNDING_ADD_INTERNAL_WHITELIST,
227                )
228            }
229            "PROTECTED_ACTION_FUNDING_REMOVE_INTERNAL_WHITELIST" => {
230                ::core::option::Option::Some(
231                    Self::PROTECTED_ACTION_FUNDING_REMOVE_INTERNAL_WHITELIST,
232                )
233            }
234            "PROTECTED_ACTION_FUNDING_SET_INTERNAL_WHITELIST_REQUIRED" => {
235                ::core::option::Option::Some(
236                    Self::PROTECTED_ACTION_FUNDING_SET_INTERNAL_WHITELIST_REQUIRED,
237                )
238            }
239            _ => ::core::option::Option::None,
240        }
241    }
242    fn values() -> &'static [Self] {
243        &[
244            Self::PROTECTED_ACTION_UNSPECIFIED,
245            Self::PROTECTED_ACTION_FUNDING_SET_EXTERNAL_WHITELIST_REQUIRED,
246            Self::PROTECTED_ACTION_FUNDING_ADD_EXTERNAL_WHITELIST,
247            Self::PROTECTED_ACTION_FUNDING_REMOVE_EXTERNAL_WHITELIST,
248            Self::PROTECTED_ACTION_FUNDING_ADD_INTERNAL_WHITELIST,
249            Self::PROTECTED_ACTION_FUNDING_REMOVE_INTERNAL_WHITELIST,
250            Self::PROTECTED_ACTION_FUNDING_SET_INTERNAL_WHITELIST_REQUIRED,
251        ]
252    }
253}
254/// GuardSignerStatus describes stored and live signer state for one account.
255#[derive(Clone, PartialEq, Default)]
256#[derive(::serde::Serialize, ::serde::Deserialize)]
257#[serde(default)]
258pub struct GuardSignerStatus {
259    /// Stored guard signer EVM address, if a wallet exists for the selected account.
260    ///
261    /// Field 1: `signer_address`
262    #[serde(
263        rename = "signerAddress",
264        alias = "signer_address",
265        with = "::buffa::json_helpers::proto_string",
266        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
267    )]
268    pub signer_address: ::buffa::alloc::string::String,
269    /// Live on-chain signer value when chain reads are available.
270    ///
271    /// Field 2: `onchain_signer_address`
272    #[serde(
273        rename = "onchainSignerAddress",
274        alias = "onchain_signer_address",
275        with = "::buffa::json_helpers::proto_string",
276        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
277    )]
278    pub onchain_signer_address: ::buffa::alloc::string::String,
279    /// True when the stored signer matches the live on-chain signer.
280    ///
281    /// Field 3: `initialized`
282    #[serde(
283        rename = "initialized",
284        with = "::buffa::json_helpers::proto_bool",
285        skip_serializing_if = "::buffa::json_helpers::skip_if::is_false"
286    )]
287    pub initialized: bool,
288    /// Current guard signer nonce for the default nonce space, encoded as a base-10 decimal string.
289    ///
290    /// Field 4: `nonce`
291    #[serde(
292        rename = "nonce",
293        with = "::buffa::json_helpers::proto_string",
294        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
295    )]
296    pub nonce: ::buffa::alloc::string::String,
297    /// Default nonce space used for normal approvals.
298    ///
299    /// Field 5: `nonce_space`
300    #[serde(
301        rename = "nonceSpace",
302        alias = "nonce_space",
303        with = "::buffa::json_helpers::uint64",
304        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
305    )]
306    pub nonce_space: u64,
307    #[serde(skip)]
308    #[doc(hidden)]
309    pub __buffa_unknown_fields: ::buffa::UnknownFields,
310}
311impl ::core::fmt::Debug for GuardSignerStatus {
312    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
313        f.debug_struct("GuardSignerStatus")
314            .field("signer_address", &self.signer_address)
315            .field("onchain_signer_address", &self.onchain_signer_address)
316            .field("initialized", &self.initialized)
317            .field("nonce", &self.nonce)
318            .field("nonce_space", &self.nonce_space)
319            .finish()
320    }
321}
322impl GuardSignerStatus {
323    /// Protobuf type URL for this message, for use with `Any::pack` and
324    /// `Any::unpack_if`.
325    ///
326    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
327    pub const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.GuardSignerStatus";
328}
329::buffa::impl_default_instance!(GuardSignerStatus);
330impl ::buffa::MessageName for GuardSignerStatus {
331    const PACKAGE: &'static str = "chain.guard.v1";
332    const NAME: &'static str = "GuardSignerStatus";
333    const FULL_NAME: &'static str = "chain.guard.v1.GuardSignerStatus";
334    const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.GuardSignerStatus";
335}
336impl ::buffa::Message for GuardSignerStatus {
337    /// Returns the total encoded size in bytes.
338    ///
339    /// The result is a `u32`; the protobuf specification requires all
340    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
341    /// compliant message will never overflow this type.
342    #[allow(clippy::let_and_return)]
343    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
344        #[allow(unused_imports)]
345        use ::buffa::Enumeration as _;
346        let mut size = 0u32;
347        if !self.signer_address.is_empty() {
348            size
349                += 1u32
350                    + ::buffa::types::string_encoded_len(&self.signer_address) as u32;
351        }
352        if !self.onchain_signer_address.is_empty() {
353            size
354                += 1u32
355                    + ::buffa::types::string_encoded_len(&self.onchain_signer_address)
356                        as u32;
357        }
358        if self.initialized {
359            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
360        }
361        if !self.nonce.is_empty() {
362            size += 1u32 + ::buffa::types::string_encoded_len(&self.nonce) as u32;
363        }
364        if self.nonce_space != 0u64 {
365            size += 1u32 + ::buffa::types::uint64_encoded_len(self.nonce_space) as u32;
366        }
367        size += self.__buffa_unknown_fields.encoded_len() as u32;
368        size
369    }
370    fn write_to(
371        &self,
372        _cache: &mut ::buffa::SizeCache,
373        buf: &mut impl ::buffa::bytes::BufMut,
374    ) {
375        #[allow(unused_imports)]
376        use ::buffa::Enumeration as _;
377        if !self.signer_address.is_empty() {
378            ::buffa::types::put_string_field(1u32, &self.signer_address, buf);
379        }
380        if !self.onchain_signer_address.is_empty() {
381            ::buffa::types::put_string_field(2u32, &self.onchain_signer_address, buf);
382        }
383        if self.initialized {
384            ::buffa::types::put_bool_field(3u32, self.initialized, buf);
385        }
386        if !self.nonce.is_empty() {
387            ::buffa::types::put_string_field(4u32, &self.nonce, buf);
388        }
389        if self.nonce_space != 0u64 {
390            ::buffa::types::put_uint64_field(5u32, self.nonce_space, buf);
391        }
392        self.__buffa_unknown_fields.write_to(buf);
393    }
394    fn merge_field(
395        &mut self,
396        tag: ::buffa::encoding::Tag,
397        buf: &mut impl ::buffa::bytes::Buf,
398        ctx: ::buffa::DecodeContext<'_>,
399    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
400        #[allow(unused_imports)]
401        use ::buffa::bytes::Buf as _;
402        #[allow(unused_imports)]
403        use ::buffa::Enumeration as _;
404        match tag.field_number() {
405            1u32 => {
406                ::buffa::encoding::check_wire_type(
407                    tag,
408                    ::buffa::encoding::WireType::LengthDelimited,
409                )?;
410                ::buffa::types::merge_string(&mut self.signer_address, buf)?;
411            }
412            2u32 => {
413                ::buffa::encoding::check_wire_type(
414                    tag,
415                    ::buffa::encoding::WireType::LengthDelimited,
416                )?;
417                ::buffa::types::merge_string(&mut self.onchain_signer_address, buf)?;
418            }
419            3u32 => {
420                ::buffa::encoding::check_wire_type(
421                    tag,
422                    ::buffa::encoding::WireType::Varint,
423                )?;
424                self.initialized = ::buffa::types::decode_bool(buf)?;
425            }
426            4u32 => {
427                ::buffa::encoding::check_wire_type(
428                    tag,
429                    ::buffa::encoding::WireType::LengthDelimited,
430                )?;
431                ::buffa::types::merge_string(&mut self.nonce, buf)?;
432            }
433            5u32 => {
434                ::buffa::encoding::check_wire_type(
435                    tag,
436                    ::buffa::encoding::WireType::Varint,
437                )?;
438                self.nonce_space = ::buffa::types::decode_uint64(buf)?;
439            }
440            _ => {
441                self.__buffa_unknown_fields
442                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
443            }
444        }
445        ::core::result::Result::Ok(())
446    }
447    fn clear(&mut self) {
448        self.signer_address.clear();
449        self.onchain_signer_address.clear();
450        self.initialized = false;
451        self.nonce.clear();
452        self.nonce_space = 0u64;
453        self.__buffa_unknown_fields.clear();
454    }
455}
456impl ::buffa::ExtensionSet for GuardSignerStatus {
457    const PROTO_FQN: &'static str = "chain.guard.v1.GuardSignerStatus";
458    fn unknown_fields(&self) -> &::buffa::UnknownFields {
459        &self.__buffa_unknown_fields
460    }
461    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
462        &mut self.__buffa_unknown_fields
463    }
464}
465impl ::buffa::json_helpers::ProtoElemJson for GuardSignerStatus {
466    fn serialize_proto_json<S: ::serde::Serializer>(
467        v: &Self,
468        s: S,
469    ) -> ::core::result::Result<S::Ok, S::Error> {
470        ::serde::Serialize::serialize(v, s)
471    }
472    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
473        d: D,
474    ) -> ::core::result::Result<Self, D::Error> {
475        <Self as ::serde::Deserialize>::deserialize(d)
476    }
477}
478#[doc(hidden)]
479pub const __GUARD_SIGNER_STATUS_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
480    type_url: "type.googleapis.com/chain.guard.v1.GuardSignerStatus",
481    to_json: ::buffa::type_registry::any_to_json::<GuardSignerStatus>,
482    from_json: ::buffa::type_registry::any_from_json::<GuardSignerStatus>,
483    is_wkt: false,
484};
485/// GuardApproval is the exact approval payload clients submit to protected
486/// contract calls.
487#[derive(Clone, PartialEq, Default)]
488#[derive(::serde::Serialize, ::serde::Deserialize)]
489#[serde(default)]
490pub struct GuardApproval {
491    /// Nonce space used for the signed approval. Normal flows use 0.
492    ///
493    /// Field 1: `nonce_space`
494    #[serde(
495        rename = "nonceSpace",
496        alias = "nonce_space",
497        with = "::buffa::json_helpers::uint64",
498        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
499    )]
500    pub nonce_space: u64,
501    /// Deadline as a unix timestamp in seconds, derived from chain time.
502    ///
503    /// Field 2: `deadline_unix`
504    #[serde(
505        rename = "deadlineUnix",
506        alias = "deadline_unix",
507        with = "::buffa::json_helpers::uint64",
508        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
509    )]
510    pub deadline_unix: u64,
511    /// EIP-712 signature over the guard approval message.
512    ///
513    /// Field 3: `signature`
514    #[serde(
515        rename = "signature",
516        with = "::buffa::json_helpers::bytes",
517        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_bytes"
518    )]
519    pub signature: ::buffa::alloc::vec::Vec<u8>,
520    #[serde(skip)]
521    #[doc(hidden)]
522    pub __buffa_unknown_fields: ::buffa::UnknownFields,
523}
524impl ::core::fmt::Debug for GuardApproval {
525    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
526        f.debug_struct("GuardApproval")
527            .field("nonce_space", &self.nonce_space)
528            .field("deadline_unix", &self.deadline_unix)
529            .field("signature", &self.signature)
530            .finish()
531    }
532}
533impl GuardApproval {
534    /// Protobuf type URL for this message, for use with `Any::pack` and
535    /// `Any::unpack_if`.
536    ///
537    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
538    pub const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.GuardApproval";
539}
540::buffa::impl_default_instance!(GuardApproval);
541impl ::buffa::MessageName for GuardApproval {
542    const PACKAGE: &'static str = "chain.guard.v1";
543    const NAME: &'static str = "GuardApproval";
544    const FULL_NAME: &'static str = "chain.guard.v1.GuardApproval";
545    const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.GuardApproval";
546}
547impl ::buffa::Message for GuardApproval {
548    /// Returns the total encoded size in bytes.
549    ///
550    /// The result is a `u32`; the protobuf specification requires all
551    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
552    /// compliant message will never overflow this type.
553    #[allow(clippy::let_and_return)]
554    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
555        #[allow(unused_imports)]
556        use ::buffa::Enumeration as _;
557        let mut size = 0u32;
558        if self.nonce_space != 0u64 {
559            size += 1u32 + ::buffa::types::uint64_encoded_len(self.nonce_space) as u32;
560        }
561        if self.deadline_unix != 0u64 {
562            size += 1u32 + ::buffa::types::uint64_encoded_len(self.deadline_unix) as u32;
563        }
564        if !self.signature.is_empty() {
565            size += 1u32 + ::buffa::types::bytes_encoded_len(&self.signature) as u32;
566        }
567        size += self.__buffa_unknown_fields.encoded_len() as u32;
568        size
569    }
570    fn write_to(
571        &self,
572        _cache: &mut ::buffa::SizeCache,
573        buf: &mut impl ::buffa::bytes::BufMut,
574    ) {
575        #[allow(unused_imports)]
576        use ::buffa::Enumeration as _;
577        if self.nonce_space != 0u64 {
578            ::buffa::types::put_uint64_field(1u32, self.nonce_space, buf);
579        }
580        if self.deadline_unix != 0u64 {
581            ::buffa::types::put_uint64_field(2u32, self.deadline_unix, buf);
582        }
583        if !self.signature.is_empty() {
584            ::buffa::types::put_bytes_field(3u32, &self.signature, buf);
585        }
586        self.__buffa_unknown_fields.write_to(buf);
587    }
588    fn merge_field(
589        &mut self,
590        tag: ::buffa::encoding::Tag,
591        buf: &mut impl ::buffa::bytes::Buf,
592        ctx: ::buffa::DecodeContext<'_>,
593    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
594        #[allow(unused_imports)]
595        use ::buffa::bytes::Buf as _;
596        #[allow(unused_imports)]
597        use ::buffa::Enumeration as _;
598        match tag.field_number() {
599            1u32 => {
600                ::buffa::encoding::check_wire_type(
601                    tag,
602                    ::buffa::encoding::WireType::Varint,
603                )?;
604                self.nonce_space = ::buffa::types::decode_uint64(buf)?;
605            }
606            2u32 => {
607                ::buffa::encoding::check_wire_type(
608                    tag,
609                    ::buffa::encoding::WireType::Varint,
610                )?;
611                self.deadline_unix = ::buffa::types::decode_uint64(buf)?;
612            }
613            3u32 => {
614                ::buffa::encoding::check_wire_type(
615                    tag,
616                    ::buffa::encoding::WireType::LengthDelimited,
617                )?;
618                ::buffa::types::merge_bytes(&mut self.signature, buf)?;
619            }
620            _ => {
621                self.__buffa_unknown_fields
622                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
623            }
624        }
625        ::core::result::Result::Ok(())
626    }
627    fn clear(&mut self) {
628        self.nonce_space = 0u64;
629        self.deadline_unix = 0u64;
630        self.signature.clear();
631        self.__buffa_unknown_fields.clear();
632    }
633}
634impl ::buffa::ExtensionSet for GuardApproval {
635    const PROTO_FQN: &'static str = "chain.guard.v1.GuardApproval";
636    fn unknown_fields(&self) -> &::buffa::UnknownFields {
637        &self.__buffa_unknown_fields
638    }
639    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
640        &mut self.__buffa_unknown_fields
641    }
642}
643impl ::buffa::json_helpers::ProtoElemJson for GuardApproval {
644    fn serialize_proto_json<S: ::serde::Serializer>(
645        v: &Self,
646        s: S,
647    ) -> ::core::result::Result<S::Ok, S::Error> {
648        ::serde::Serialize::serialize(v, s)
649    }
650    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
651        d: D,
652    ) -> ::core::result::Result<Self, D::Error> {
653        <Self as ::serde::Deserialize>::deserialize(d)
654    }
655}
656#[doc(hidden)]
657pub const __GUARD_APPROVAL_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
658    type_url: "type.googleapis.com/chain.guard.v1.GuardApproval",
659    to_json: ::buffa::type_registry::any_to_json::<GuardApproval>,
660    from_json: ::buffa::type_registry::any_from_json::<GuardApproval>,
661    is_wkt: false,
662};
663/// ExternalWhitelistArgs contains the final external-chain destination bytes for
664/// whitelist updates. For EVM destinations, callers should pass the same
665/// string-encoded normalized address bytes used in WithdrawRequest.to, e.g.
666/// stringToHex(address.toLowerCase()), not raw address bytes.
667#[derive(Clone, PartialEq, Default)]
668#[derive(::serde::Serialize, ::serde::Deserialize)]
669#[serde(default)]
670pub struct ExternalWhitelistArgs {
671    /// External network identifier for the whitelist update.
672    ///
673    /// Field 1: `polychain_chain_id`
674    #[serde(
675        rename = "polychainChainId",
676        alias = "polychain_chain_id",
677        with = "::buffa::json_helpers::uint32",
678        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u32"
679    )]
680    pub polychain_chain_id: u32,
681    /// Hex-encoded destination payloads to add or remove. Each value must be 0x-prefixed bytes.
682    ///
683    /// Field 2: `addresses`
684    #[serde(
685        rename = "addresses",
686        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
687        deserialize_with = "::buffa::json_helpers::null_as_default"
688    )]
689    pub addresses: ::buffa::alloc::vec::Vec<::buffa::alloc::string::String>,
690    #[serde(skip)]
691    #[doc(hidden)]
692    pub __buffa_unknown_fields: ::buffa::UnknownFields,
693}
694impl ::core::fmt::Debug for ExternalWhitelistArgs {
695    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
696        f.debug_struct("ExternalWhitelistArgs")
697            .field("polychain_chain_id", &self.polychain_chain_id)
698            .field("addresses", &self.addresses)
699            .finish()
700    }
701}
702impl ExternalWhitelistArgs {
703    /// Protobuf type URL for this message, for use with `Any::pack` and
704    /// `Any::unpack_if`.
705    ///
706    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
707    pub const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.ExternalWhitelistArgs";
708}
709::buffa::impl_default_instance!(ExternalWhitelistArgs);
710impl ::buffa::MessageName for ExternalWhitelistArgs {
711    const PACKAGE: &'static str = "chain.guard.v1";
712    const NAME: &'static str = "ExternalWhitelistArgs";
713    const FULL_NAME: &'static str = "chain.guard.v1.ExternalWhitelistArgs";
714    const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.ExternalWhitelistArgs";
715}
716impl ::buffa::Message for ExternalWhitelistArgs {
717    /// Returns the total encoded size in bytes.
718    ///
719    /// The result is a `u32`; the protobuf specification requires all
720    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
721    /// compliant message will never overflow this type.
722    #[allow(clippy::let_and_return)]
723    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
724        #[allow(unused_imports)]
725        use ::buffa::Enumeration as _;
726        let mut size = 0u32;
727        if self.polychain_chain_id != 0u32 {
728            size
729                += 1u32
730                    + ::buffa::types::uint32_encoded_len(self.polychain_chain_id) as u32;
731        }
732        for v in &self.addresses {
733            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
734        }
735        size += self.__buffa_unknown_fields.encoded_len() as u32;
736        size
737    }
738    fn write_to(
739        &self,
740        _cache: &mut ::buffa::SizeCache,
741        buf: &mut impl ::buffa::bytes::BufMut,
742    ) {
743        #[allow(unused_imports)]
744        use ::buffa::Enumeration as _;
745        if self.polychain_chain_id != 0u32 {
746            ::buffa::types::put_uint32_field(1u32, self.polychain_chain_id, buf);
747        }
748        for v in &self.addresses {
749            ::buffa::types::put_string_field(2u32, v, buf);
750        }
751        self.__buffa_unknown_fields.write_to(buf);
752    }
753    fn merge_field(
754        &mut self,
755        tag: ::buffa::encoding::Tag,
756        buf: &mut impl ::buffa::bytes::Buf,
757        ctx: ::buffa::DecodeContext<'_>,
758    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
759        #[allow(unused_imports)]
760        use ::buffa::bytes::Buf as _;
761        #[allow(unused_imports)]
762        use ::buffa::Enumeration as _;
763        match tag.field_number() {
764            1u32 => {
765                ::buffa::encoding::check_wire_type(
766                    tag,
767                    ::buffa::encoding::WireType::Varint,
768                )?;
769                self.polychain_chain_id = ::buffa::types::decode_uint32(buf)?;
770            }
771            2u32 => {
772                ::buffa::encoding::check_wire_type(
773                    tag,
774                    ::buffa::encoding::WireType::LengthDelimited,
775                )?;
776                self.addresses.push(::buffa::types::decode_string(buf)?);
777            }
778            _ => {
779                self.__buffa_unknown_fields
780                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
781            }
782        }
783        ::core::result::Result::Ok(())
784    }
785    fn clear(&mut self) {
786        self.polychain_chain_id = 0u32;
787        self.addresses.clear();
788        self.__buffa_unknown_fields.clear();
789    }
790}
791impl ::buffa::ExtensionSet for ExternalWhitelistArgs {
792    const PROTO_FQN: &'static str = "chain.guard.v1.ExternalWhitelistArgs";
793    fn unknown_fields(&self) -> &::buffa::UnknownFields {
794        &self.__buffa_unknown_fields
795    }
796    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
797        &mut self.__buffa_unknown_fields
798    }
799}
800impl ::buffa::json_helpers::ProtoElemJson for ExternalWhitelistArgs {
801    fn serialize_proto_json<S: ::serde::Serializer>(
802        v: &Self,
803        s: S,
804    ) -> ::core::result::Result<S::Ok, S::Error> {
805        ::serde::Serialize::serialize(v, s)
806    }
807    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
808        d: D,
809    ) -> ::core::result::Result<Self, D::Error> {
810        <Self as ::serde::Deserialize>::deserialize(d)
811    }
812}
813#[doc(hidden)]
814pub const __EXTERNAL_WHITELIST_ARGS_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
815    type_url: "type.googleapis.com/chain.guard.v1.ExternalWhitelistArgs",
816    to_json: ::buffa::type_registry::any_to_json::<ExternalWhitelistArgs>,
817    from_json: ::buffa::type_registry::any_from_json::<ExternalWhitelistArgs>,
818    is_wkt: false,
819};
820/// InternalWhitelistArgs contains EVM account addresses for internal whitelist
821/// updates.
822#[derive(Clone, PartialEq, Default)]
823#[derive(::serde::Serialize, ::serde::Deserialize)]
824#[serde(default)]
825pub struct InternalWhitelistArgs {
826    /// EVM account addresses to add or remove from the internal transfer whitelist.
827    ///
828    /// Field 1: `addresses`
829    #[serde(
830        rename = "addresses",
831        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
832        deserialize_with = "::buffa::json_helpers::null_as_default"
833    )]
834    pub addresses: ::buffa::alloc::vec::Vec<::buffa::alloc::string::String>,
835    #[serde(skip)]
836    #[doc(hidden)]
837    pub __buffa_unknown_fields: ::buffa::UnknownFields,
838}
839impl ::core::fmt::Debug for InternalWhitelistArgs {
840    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
841        f.debug_struct("InternalWhitelistArgs")
842            .field("addresses", &self.addresses)
843            .finish()
844    }
845}
846impl InternalWhitelistArgs {
847    /// Protobuf type URL for this message, for use with `Any::pack` and
848    /// `Any::unpack_if`.
849    ///
850    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
851    pub const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.InternalWhitelistArgs";
852}
853::buffa::impl_default_instance!(InternalWhitelistArgs);
854impl ::buffa::MessageName for InternalWhitelistArgs {
855    const PACKAGE: &'static str = "chain.guard.v1";
856    const NAME: &'static str = "InternalWhitelistArgs";
857    const FULL_NAME: &'static str = "chain.guard.v1.InternalWhitelistArgs";
858    const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.InternalWhitelistArgs";
859}
860impl ::buffa::Message for InternalWhitelistArgs {
861    /// Returns the total encoded size in bytes.
862    ///
863    /// The result is a `u32`; the protobuf specification requires all
864    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
865    /// compliant message will never overflow this type.
866    #[allow(clippy::let_and_return)]
867    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
868        #[allow(unused_imports)]
869        use ::buffa::Enumeration as _;
870        let mut size = 0u32;
871        for v in &self.addresses {
872            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
873        }
874        size += self.__buffa_unknown_fields.encoded_len() as u32;
875        size
876    }
877    fn write_to(
878        &self,
879        _cache: &mut ::buffa::SizeCache,
880        buf: &mut impl ::buffa::bytes::BufMut,
881    ) {
882        #[allow(unused_imports)]
883        use ::buffa::Enumeration as _;
884        for v in &self.addresses {
885            ::buffa::types::put_string_field(1u32, v, buf);
886        }
887        self.__buffa_unknown_fields.write_to(buf);
888    }
889    fn merge_field(
890        &mut self,
891        tag: ::buffa::encoding::Tag,
892        buf: &mut impl ::buffa::bytes::Buf,
893        ctx: ::buffa::DecodeContext<'_>,
894    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
895        #[allow(unused_imports)]
896        use ::buffa::bytes::Buf as _;
897        #[allow(unused_imports)]
898        use ::buffa::Enumeration as _;
899        match tag.field_number() {
900            1u32 => {
901                ::buffa::encoding::check_wire_type(
902                    tag,
903                    ::buffa::encoding::WireType::LengthDelimited,
904                )?;
905                self.addresses.push(::buffa::types::decode_string(buf)?);
906            }
907            _ => {
908                self.__buffa_unknown_fields
909                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
910            }
911        }
912        ::core::result::Result::Ok(())
913    }
914    fn clear(&mut self) {
915        self.addresses.clear();
916        self.__buffa_unknown_fields.clear();
917    }
918}
919impl ::buffa::ExtensionSet for InternalWhitelistArgs {
920    const PROTO_FQN: &'static str = "chain.guard.v1.InternalWhitelistArgs";
921    fn unknown_fields(&self) -> &::buffa::UnknownFields {
922        &self.__buffa_unknown_fields
923    }
924    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
925        &mut self.__buffa_unknown_fields
926    }
927}
928impl ::buffa::json_helpers::ProtoElemJson for InternalWhitelistArgs {
929    fn serialize_proto_json<S: ::serde::Serializer>(
930        v: &Self,
931        s: S,
932    ) -> ::core::result::Result<S::Ok, S::Error> {
933        ::serde::Serialize::serialize(v, s)
934    }
935    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
936        d: D,
937    ) -> ::core::result::Result<Self, D::Error> {
938        <Self as ::serde::Deserialize>::deserialize(d)
939    }
940}
941#[doc(hidden)]
942pub const __INTERNAL_WHITELIST_ARGS_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
943    type_url: "type.googleapis.com/chain.guard.v1.InternalWhitelistArgs",
944    to_json: ::buffa::type_registry::any_to_json::<InternalWhitelistArgs>,
945    from_json: ::buffa::type_registry::any_from_json::<InternalWhitelistArgs>,
946    is_wkt: false,
947};
948/// WhitelistRequirementArgs contains the requested whitelist requirement state.
949/// Guard approvals are only needed to disable a requirement.
950#[derive(Clone, PartialEq, Default)]
951#[derive(::serde::Serialize, ::serde::Deserialize)]
952#[serde(default)]
953pub struct WhitelistRequirementArgs {
954    /// Required must be false for GuardSigner approvals. Enabling a requirement
955    /// uses an empty approval on-chain and should not be signed here.
956    ///
957    /// Field 1: `required`
958    #[serde(
959        rename = "required",
960        with = "::buffa::json_helpers::proto_bool",
961        skip_serializing_if = "::buffa::json_helpers::skip_if::is_false"
962    )]
963    pub required: bool,
964    #[serde(skip)]
965    #[doc(hidden)]
966    pub __buffa_unknown_fields: ::buffa::UnknownFields,
967}
968impl ::core::fmt::Debug for WhitelistRequirementArgs {
969    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
970        f.debug_struct("WhitelistRequirementArgs")
971            .field("required", &self.required)
972            .finish()
973    }
974}
975impl WhitelistRequirementArgs {
976    /// Protobuf type URL for this message, for use with `Any::pack` and
977    /// `Any::unpack_if`.
978    ///
979    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
980    pub const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.WhitelistRequirementArgs";
981}
982::buffa::impl_default_instance!(WhitelistRequirementArgs);
983impl ::buffa::MessageName for WhitelistRequirementArgs {
984    const PACKAGE: &'static str = "chain.guard.v1";
985    const NAME: &'static str = "WhitelistRequirementArgs";
986    const FULL_NAME: &'static str = "chain.guard.v1.WhitelistRequirementArgs";
987    const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.WhitelistRequirementArgs";
988}
989impl ::buffa::Message for WhitelistRequirementArgs {
990    /// Returns the total encoded size in bytes.
991    ///
992    /// The result is a `u32`; the protobuf specification requires all
993    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
994    /// compliant message will never overflow this type.
995    #[allow(clippy::let_and_return)]
996    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
997        #[allow(unused_imports)]
998        use ::buffa::Enumeration as _;
999        let mut size = 0u32;
1000        if self.required {
1001            size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
1002        }
1003        size += self.__buffa_unknown_fields.encoded_len() as u32;
1004        size
1005    }
1006    fn write_to(
1007        &self,
1008        _cache: &mut ::buffa::SizeCache,
1009        buf: &mut impl ::buffa::bytes::BufMut,
1010    ) {
1011        #[allow(unused_imports)]
1012        use ::buffa::Enumeration as _;
1013        if self.required {
1014            ::buffa::types::put_bool_field(1u32, self.required, buf);
1015        }
1016        self.__buffa_unknown_fields.write_to(buf);
1017    }
1018    fn merge_field(
1019        &mut self,
1020        tag: ::buffa::encoding::Tag,
1021        buf: &mut impl ::buffa::bytes::Buf,
1022        ctx: ::buffa::DecodeContext<'_>,
1023    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1024        #[allow(unused_imports)]
1025        use ::buffa::bytes::Buf as _;
1026        #[allow(unused_imports)]
1027        use ::buffa::Enumeration as _;
1028        match tag.field_number() {
1029            1u32 => {
1030                ::buffa::encoding::check_wire_type(
1031                    tag,
1032                    ::buffa::encoding::WireType::Varint,
1033                )?;
1034                self.required = ::buffa::types::decode_bool(buf)?;
1035            }
1036            _ => {
1037                self.__buffa_unknown_fields
1038                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
1039            }
1040        }
1041        ::core::result::Result::Ok(())
1042    }
1043    fn clear(&mut self) {
1044        self.required = false;
1045        self.__buffa_unknown_fields.clear();
1046    }
1047}
1048impl ::buffa::ExtensionSet for WhitelistRequirementArgs {
1049    const PROTO_FQN: &'static str = "chain.guard.v1.WhitelistRequirementArgs";
1050    fn unknown_fields(&self) -> &::buffa::UnknownFields {
1051        &self.__buffa_unknown_fields
1052    }
1053    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1054        &mut self.__buffa_unknown_fields
1055    }
1056}
1057impl ::buffa::json_helpers::ProtoElemJson for WhitelistRequirementArgs {
1058    fn serialize_proto_json<S: ::serde::Serializer>(
1059        v: &Self,
1060        s: S,
1061    ) -> ::core::result::Result<S::Ok, S::Error> {
1062        ::serde::Serialize::serialize(v, s)
1063    }
1064    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1065        d: D,
1066    ) -> ::core::result::Result<Self, D::Error> {
1067        <Self as ::serde::Deserialize>::deserialize(d)
1068    }
1069}
1070#[doc(hidden)]
1071pub const __WHITELIST_REQUIREMENT_ARGS_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1072    type_url: "type.googleapis.com/chain.guard.v1.WhitelistRequirementArgs",
1073    to_json: ::buffa::type_registry::any_to_json::<WhitelistRequirementArgs>,
1074    from_json: ::buffa::type_registry::any_from_json::<WhitelistRequirementArgs>,
1075    is_wkt: false,
1076};
1077/// ProtectedActionArgs contains business arguments for the selected protected
1078/// action. It intentionally excludes trusted account, nonce, and deadline fields.
1079#[derive(Clone, PartialEq, Default)]
1080#[derive(::serde::Serialize)]
1081#[serde(default)]
1082pub struct ProtectedActionArgs {
1083    #[serde(flatten)]
1084    pub args: ::core::option::Option<__buffa::oneof::protected_action_args::Args>,
1085    #[serde(skip)]
1086    #[doc(hidden)]
1087    pub __buffa_unknown_fields: ::buffa::UnknownFields,
1088}
1089impl ::core::fmt::Debug for ProtectedActionArgs {
1090    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1091        f.debug_struct("ProtectedActionArgs").field("args", &self.args).finish()
1092    }
1093}
1094impl ProtectedActionArgs {
1095    /// Protobuf type URL for this message, for use with `Any::pack` and
1096    /// `Any::unpack_if`.
1097    ///
1098    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1099    pub const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.ProtectedActionArgs";
1100}
1101::buffa::impl_default_instance!(ProtectedActionArgs);
1102impl ::buffa::MessageName for ProtectedActionArgs {
1103    const PACKAGE: &'static str = "chain.guard.v1";
1104    const NAME: &'static str = "ProtectedActionArgs";
1105    const FULL_NAME: &'static str = "chain.guard.v1.ProtectedActionArgs";
1106    const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.ProtectedActionArgs";
1107}
1108impl ::buffa::Message for ProtectedActionArgs {
1109    /// Returns the total encoded size in bytes.
1110    ///
1111    /// The result is a `u32`; the protobuf specification requires all
1112    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1113    /// compliant message will never overflow this type.
1114    #[allow(clippy::let_and_return)]
1115    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
1116        #[allow(unused_imports)]
1117        use ::buffa::Enumeration as _;
1118        let mut size = 0u32;
1119        if let ::core::option::Option::Some(ref v) = self.args {
1120            match v {
1121                __buffa::oneof::protected_action_args::Args::ExternalWhitelist(x) => {
1122                    let __slot = __cache.reserve();
1123                    let inner = x.compute_size(__cache);
1124                    __cache.set(__slot, inner);
1125                    size
1126                        += 1u32 + ::buffa::encoding::varint_len(inner as u64) as u32
1127                            + inner;
1128                }
1129                __buffa::oneof::protected_action_args::Args::InternalWhitelist(x) => {
1130                    let __slot = __cache.reserve();
1131                    let inner = x.compute_size(__cache);
1132                    __cache.set(__slot, inner);
1133                    size
1134                        += 1u32 + ::buffa::encoding::varint_len(inner as u64) as u32
1135                            + inner;
1136                }
1137                __buffa::oneof::protected_action_args::Args::WhitelistRequirement(x) => {
1138                    let __slot = __cache.reserve();
1139                    let inner = x.compute_size(__cache);
1140                    __cache.set(__slot, inner);
1141                    size
1142                        += 1u32 + ::buffa::encoding::varint_len(inner as u64) as u32
1143                            + inner;
1144                }
1145            }
1146        }
1147        size += self.__buffa_unknown_fields.encoded_len() as u32;
1148        size
1149    }
1150    fn write_to(
1151        &self,
1152        __cache: &mut ::buffa::SizeCache,
1153        buf: &mut impl ::buffa::bytes::BufMut,
1154    ) {
1155        #[allow(unused_imports)]
1156        use ::buffa::Enumeration as _;
1157        if let ::core::option::Option::Some(ref v) = self.args {
1158            match v {
1159                __buffa::oneof::protected_action_args::Args::ExternalWhitelist(x) => {
1160                    ::buffa::types::put_len_delimited_header(
1161                        1u32,
1162                        __cache.consume_next(),
1163                        buf,
1164                    );
1165                    x.write_to(__cache, buf);
1166                }
1167                __buffa::oneof::protected_action_args::Args::InternalWhitelist(x) => {
1168                    ::buffa::types::put_len_delimited_header(
1169                        2u32,
1170                        __cache.consume_next(),
1171                        buf,
1172                    );
1173                    x.write_to(__cache, buf);
1174                }
1175                __buffa::oneof::protected_action_args::Args::WhitelistRequirement(x) => {
1176                    ::buffa::types::put_len_delimited_header(
1177                        3u32,
1178                        __cache.consume_next(),
1179                        buf,
1180                    );
1181                    x.write_to(__cache, buf);
1182                }
1183            }
1184        }
1185        self.__buffa_unknown_fields.write_to(buf);
1186    }
1187    fn merge_field(
1188        &mut self,
1189        tag: ::buffa::encoding::Tag,
1190        buf: &mut impl ::buffa::bytes::Buf,
1191        ctx: ::buffa::DecodeContext<'_>,
1192    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1193        #[allow(unused_imports)]
1194        use ::buffa::bytes::Buf as _;
1195        #[allow(unused_imports)]
1196        use ::buffa::Enumeration as _;
1197        match tag.field_number() {
1198            1u32 => {
1199                ::buffa::encoding::check_wire_type(
1200                    tag,
1201                    ::buffa::encoding::WireType::LengthDelimited,
1202                )?;
1203                if let ::core::option::Option::Some(
1204                    __buffa::oneof::protected_action_args::Args::ExternalWhitelist(
1205                        ref mut existing,
1206                    ),
1207                ) = self.args
1208                {
1209                    ::buffa::Message::merge_length_delimited(&mut **existing, buf, ctx)?;
1210                } else {
1211                    let mut val = ::core::default::Default::default();
1212                    ::buffa::Message::merge_length_delimited(&mut val, buf, ctx)?;
1213                    self.args = ::core::option::Option::Some(
1214                        __buffa::oneof::protected_action_args::Args::ExternalWhitelist(
1215                            ::buffa::alloc::boxed::Box::new(val),
1216                        ),
1217                    );
1218                }
1219            }
1220            2u32 => {
1221                ::buffa::encoding::check_wire_type(
1222                    tag,
1223                    ::buffa::encoding::WireType::LengthDelimited,
1224                )?;
1225                if let ::core::option::Option::Some(
1226                    __buffa::oneof::protected_action_args::Args::InternalWhitelist(
1227                        ref mut existing,
1228                    ),
1229                ) = self.args
1230                {
1231                    ::buffa::Message::merge_length_delimited(&mut **existing, buf, ctx)?;
1232                } else {
1233                    let mut val = ::core::default::Default::default();
1234                    ::buffa::Message::merge_length_delimited(&mut val, buf, ctx)?;
1235                    self.args = ::core::option::Option::Some(
1236                        __buffa::oneof::protected_action_args::Args::InternalWhitelist(
1237                            ::buffa::alloc::boxed::Box::new(val),
1238                        ),
1239                    );
1240                }
1241            }
1242            3u32 => {
1243                ::buffa::encoding::check_wire_type(
1244                    tag,
1245                    ::buffa::encoding::WireType::LengthDelimited,
1246                )?;
1247                if let ::core::option::Option::Some(
1248                    __buffa::oneof::protected_action_args::Args::WhitelistRequirement(
1249                        ref mut existing,
1250                    ),
1251                ) = self.args
1252                {
1253                    ::buffa::Message::merge_length_delimited(&mut **existing, buf, ctx)?;
1254                } else {
1255                    let mut val = ::core::default::Default::default();
1256                    ::buffa::Message::merge_length_delimited(&mut val, buf, ctx)?;
1257                    self.args = ::core::option::Option::Some(
1258                        __buffa::oneof::protected_action_args::Args::WhitelistRequirement(
1259                            ::buffa::alloc::boxed::Box::new(val),
1260                        ),
1261                    );
1262                }
1263            }
1264            _ => {
1265                self.__buffa_unknown_fields
1266                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
1267            }
1268        }
1269        ::core::result::Result::Ok(())
1270    }
1271    fn clear(&mut self) {
1272        self.args = ::core::option::Option::None;
1273        self.__buffa_unknown_fields.clear();
1274    }
1275}
1276impl ::buffa::ExtensionSet for ProtectedActionArgs {
1277    const PROTO_FQN: &'static str = "chain.guard.v1.ProtectedActionArgs";
1278    fn unknown_fields(&self) -> &::buffa::UnknownFields {
1279        &self.__buffa_unknown_fields
1280    }
1281    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1282        &mut self.__buffa_unknown_fields
1283    }
1284}
1285impl<'de> serde::Deserialize<'de> for ProtectedActionArgs {
1286    fn deserialize<D: serde::Deserializer<'de>>(
1287        d: D,
1288    ) -> ::core::result::Result<Self, D::Error> {
1289        struct _V;
1290        impl<'de> serde::de::Visitor<'de> for _V {
1291            type Value = ProtectedActionArgs;
1292            fn expecting(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1293                f.write_str("struct ProtectedActionArgs")
1294            }
1295            #[allow(clippy::field_reassign_with_default)]
1296            fn visit_map<A: serde::de::MapAccess<'de>>(
1297                self,
1298                mut map: A,
1299            ) -> ::core::result::Result<ProtectedActionArgs, A::Error> {
1300                let mut __oneof_args: ::core::option::Option<
1301                    __buffa::oneof::protected_action_args::Args,
1302                > = None;
1303                while let Some(key) = map.next_key::<::buffa::alloc::string::String>()? {
1304                    match key.as_str() {
1305                        "externalWhitelist" | "external_whitelist" => {
1306                            let v: ::core::option::Option<ExternalWhitelistArgs> = map
1307                                .next_value_seed(
1308                                    ::buffa::json_helpers::NullableDeserializeSeed(
1309                                        ::buffa::json_helpers::DefaultDeserializeSeed::<
1310                                            ExternalWhitelistArgs,
1311                                        >::new(),
1312                                    ),
1313                                )?;
1314                            if let Some(v) = v {
1315                                if __oneof_args.is_some() {
1316                                    return Err(
1317                                        serde::de::Error::custom(
1318                                            "multiple oneof fields set for 'args'",
1319                                        ),
1320                                    );
1321                                }
1322                                __oneof_args = Some(
1323                                    __buffa::oneof::protected_action_args::Args::ExternalWhitelist(
1324                                        ::buffa::alloc::boxed::Box::new(v),
1325                                    ),
1326                                );
1327                            }
1328                        }
1329                        "internalWhitelist" | "internal_whitelist" => {
1330                            let v: ::core::option::Option<InternalWhitelistArgs> = map
1331                                .next_value_seed(
1332                                    ::buffa::json_helpers::NullableDeserializeSeed(
1333                                        ::buffa::json_helpers::DefaultDeserializeSeed::<
1334                                            InternalWhitelistArgs,
1335                                        >::new(),
1336                                    ),
1337                                )?;
1338                            if let Some(v) = v {
1339                                if __oneof_args.is_some() {
1340                                    return Err(
1341                                        serde::de::Error::custom(
1342                                            "multiple oneof fields set for 'args'",
1343                                        ),
1344                                    );
1345                                }
1346                                __oneof_args = Some(
1347                                    __buffa::oneof::protected_action_args::Args::InternalWhitelist(
1348                                        ::buffa::alloc::boxed::Box::new(v),
1349                                    ),
1350                                );
1351                            }
1352                        }
1353                        "whitelistRequirement" | "whitelist_requirement" => {
1354                            let v: ::core::option::Option<WhitelistRequirementArgs> = map
1355                                .next_value_seed(
1356                                    ::buffa::json_helpers::NullableDeserializeSeed(
1357                                        ::buffa::json_helpers::DefaultDeserializeSeed::<
1358                                            WhitelistRequirementArgs,
1359                                        >::new(),
1360                                    ),
1361                                )?;
1362                            if let Some(v) = v {
1363                                if __oneof_args.is_some() {
1364                                    return Err(
1365                                        serde::de::Error::custom(
1366                                            "multiple oneof fields set for 'args'",
1367                                        ),
1368                                    );
1369                                }
1370                                __oneof_args = Some(
1371                                    __buffa::oneof::protected_action_args::Args::WhitelistRequirement(
1372                                        ::buffa::alloc::boxed::Box::new(v),
1373                                    ),
1374                                );
1375                            }
1376                        }
1377                        _ => {
1378                            map.next_value::<serde::de::IgnoredAny>()?;
1379                        }
1380                    }
1381                }
1382                let mut __r = <ProtectedActionArgs as ::core::default::Default>::default();
1383                __r.args = __oneof_args;
1384                Ok(__r)
1385            }
1386        }
1387        d.deserialize_map(_V)
1388    }
1389}
1390impl ::buffa::json_helpers::ProtoElemJson for ProtectedActionArgs {
1391    fn serialize_proto_json<S: ::serde::Serializer>(
1392        v: &Self,
1393        s: S,
1394    ) -> ::core::result::Result<S::Ok, S::Error> {
1395        ::serde::Serialize::serialize(v, s)
1396    }
1397    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1398        d: D,
1399    ) -> ::core::result::Result<Self, D::Error> {
1400        <Self as ::serde::Deserialize>::deserialize(d)
1401    }
1402}
1403#[doc(hidden)]
1404pub const __PROTECTED_ACTION_ARGS_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1405    type_url: "type.googleapis.com/chain.guard.v1.ProtectedActionArgs",
1406    to_json: ::buffa::type_registry::any_to_json::<ProtectedActionArgs>,
1407    from_json: ::buffa::type_registry::any_from_json::<ProtectedActionArgs>,
1408    is_wkt: false,
1409};
1410pub mod protected_action_args {
1411    #[allow(unused_imports)]
1412    use super::*;
1413    #[doc(inline)]
1414    pub use super::__buffa::oneof::protected_action_args::Args;
1415    #[doc(inline)]
1416    pub use super::__buffa::view::oneof::protected_action_args::Args as ArgsView;
1417}
1418/// CreateGuardSignerWalletRequest creates a guard signer wallet for the selected
1419/// account target.
1420#[derive(Clone, PartialEq, Default)]
1421#[derive(::serde::Serialize, ::serde::Deserialize)]
1422#[serde(default)]
1423pub struct CreateGuardSignerWalletRequest {
1424    /// Optional subaccount public id. When omitted, the authenticated caller's
1425    /// root account is used as the target account.
1426    ///
1427    /// Field 1: `subaccount_id`
1428    #[serde(
1429        rename = "subaccountId",
1430        alias = "subaccount_id",
1431        with = "::buffa::json_helpers::uint64",
1432        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
1433    )]
1434    pub subaccount_id: u64,
1435    #[serde(skip)]
1436    #[doc(hidden)]
1437    pub __buffa_unknown_fields: ::buffa::UnknownFields,
1438}
1439impl ::core::fmt::Debug for CreateGuardSignerWalletRequest {
1440    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1441        f.debug_struct("CreateGuardSignerWalletRequest")
1442            .field("subaccount_id", &self.subaccount_id)
1443            .finish()
1444    }
1445}
1446impl CreateGuardSignerWalletRequest {
1447    /// Protobuf type URL for this message, for use with `Any::pack` and
1448    /// `Any::unpack_if`.
1449    ///
1450    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1451    pub const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.CreateGuardSignerWalletRequest";
1452}
1453::buffa::impl_default_instance!(CreateGuardSignerWalletRequest);
1454impl ::buffa::MessageName for CreateGuardSignerWalletRequest {
1455    const PACKAGE: &'static str = "chain.guard.v1";
1456    const NAME: &'static str = "CreateGuardSignerWalletRequest";
1457    const FULL_NAME: &'static str = "chain.guard.v1.CreateGuardSignerWalletRequest";
1458    const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.CreateGuardSignerWalletRequest";
1459}
1460impl ::buffa::Message for CreateGuardSignerWalletRequest {
1461    /// Returns the total encoded size in bytes.
1462    ///
1463    /// The result is a `u32`; the protobuf specification requires all
1464    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1465    /// compliant message will never overflow this type.
1466    #[allow(clippy::let_and_return)]
1467    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1468        #[allow(unused_imports)]
1469        use ::buffa::Enumeration as _;
1470        let mut size = 0u32;
1471        if self.subaccount_id != 0u64 {
1472            size += 1u32 + ::buffa::types::FIXED64_ENCODED_LEN as u32;
1473        }
1474        size += self.__buffa_unknown_fields.encoded_len() as u32;
1475        size
1476    }
1477    fn write_to(
1478        &self,
1479        _cache: &mut ::buffa::SizeCache,
1480        buf: &mut impl ::buffa::bytes::BufMut,
1481    ) {
1482        #[allow(unused_imports)]
1483        use ::buffa::Enumeration as _;
1484        if self.subaccount_id != 0u64 {
1485            ::buffa::types::put_fixed64_field(1u32, self.subaccount_id, buf);
1486        }
1487        self.__buffa_unknown_fields.write_to(buf);
1488    }
1489    fn merge_field(
1490        &mut self,
1491        tag: ::buffa::encoding::Tag,
1492        buf: &mut impl ::buffa::bytes::Buf,
1493        ctx: ::buffa::DecodeContext<'_>,
1494    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1495        #[allow(unused_imports)]
1496        use ::buffa::bytes::Buf as _;
1497        #[allow(unused_imports)]
1498        use ::buffa::Enumeration as _;
1499        match tag.field_number() {
1500            1u32 => {
1501                ::buffa::encoding::check_wire_type(
1502                    tag,
1503                    ::buffa::encoding::WireType::Fixed64,
1504                )?;
1505                self.subaccount_id = ::buffa::types::decode_fixed64(buf)?;
1506            }
1507            _ => {
1508                self.__buffa_unknown_fields
1509                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
1510            }
1511        }
1512        ::core::result::Result::Ok(())
1513    }
1514    fn clear(&mut self) {
1515        self.subaccount_id = 0u64;
1516        self.__buffa_unknown_fields.clear();
1517    }
1518}
1519impl ::buffa::ExtensionSet for CreateGuardSignerWalletRequest {
1520    const PROTO_FQN: &'static str = "chain.guard.v1.CreateGuardSignerWalletRequest";
1521    fn unknown_fields(&self) -> &::buffa::UnknownFields {
1522        &self.__buffa_unknown_fields
1523    }
1524    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1525        &mut self.__buffa_unknown_fields
1526    }
1527}
1528impl ::buffa::json_helpers::ProtoElemJson for CreateGuardSignerWalletRequest {
1529    fn serialize_proto_json<S: ::serde::Serializer>(
1530        v: &Self,
1531        s: S,
1532    ) -> ::core::result::Result<S::Ok, S::Error> {
1533        ::serde::Serialize::serialize(v, s)
1534    }
1535    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1536        d: D,
1537    ) -> ::core::result::Result<Self, D::Error> {
1538        <Self as ::serde::Deserialize>::deserialize(d)
1539    }
1540}
1541#[doc(hidden)]
1542pub const __CREATE_GUARD_SIGNER_WALLET_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1543    type_url: "type.googleapis.com/chain.guard.v1.CreateGuardSignerWalletRequest",
1544    to_json: ::buffa::type_registry::any_to_json::<CreateGuardSignerWalletRequest>,
1545    from_json: ::buffa::type_registry::any_from_json::<CreateGuardSignerWalletRequest>,
1546    is_wkt: false,
1547};
1548/// CreateGuardSignerWalletResponse returns the generated signer address.
1549#[derive(Clone, PartialEq, Default)]
1550#[derive(::serde::Serialize, ::serde::Deserialize)]
1551#[serde(default)]
1552pub struct CreateGuardSignerWalletResponse {
1553    /// EVM address of the created guard signer wallet.
1554    ///
1555    /// Field 1: `signer_address`
1556    #[serde(
1557        rename = "signerAddress",
1558        alias = "signer_address",
1559        with = "::buffa::json_helpers::proto_string",
1560        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
1561    )]
1562    pub signer_address: ::buffa::alloc::string::String,
1563    #[serde(skip)]
1564    #[doc(hidden)]
1565    pub __buffa_unknown_fields: ::buffa::UnknownFields,
1566}
1567impl ::core::fmt::Debug for CreateGuardSignerWalletResponse {
1568    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1569        f.debug_struct("CreateGuardSignerWalletResponse")
1570            .field("signer_address", &self.signer_address)
1571            .finish()
1572    }
1573}
1574impl CreateGuardSignerWalletResponse {
1575    /// Protobuf type URL for this message, for use with `Any::pack` and
1576    /// `Any::unpack_if`.
1577    ///
1578    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1579    pub const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.CreateGuardSignerWalletResponse";
1580}
1581::buffa::impl_default_instance!(CreateGuardSignerWalletResponse);
1582impl ::buffa::MessageName for CreateGuardSignerWalletResponse {
1583    const PACKAGE: &'static str = "chain.guard.v1";
1584    const NAME: &'static str = "CreateGuardSignerWalletResponse";
1585    const FULL_NAME: &'static str = "chain.guard.v1.CreateGuardSignerWalletResponse";
1586    const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.CreateGuardSignerWalletResponse";
1587}
1588impl ::buffa::Message for CreateGuardSignerWalletResponse {
1589    /// Returns the total encoded size in bytes.
1590    ///
1591    /// The result is a `u32`; the protobuf specification requires all
1592    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1593    /// compliant message will never overflow this type.
1594    #[allow(clippy::let_and_return)]
1595    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1596        #[allow(unused_imports)]
1597        use ::buffa::Enumeration as _;
1598        let mut size = 0u32;
1599        if !self.signer_address.is_empty() {
1600            size
1601                += 1u32
1602                    + ::buffa::types::string_encoded_len(&self.signer_address) as u32;
1603        }
1604        size += self.__buffa_unknown_fields.encoded_len() as u32;
1605        size
1606    }
1607    fn write_to(
1608        &self,
1609        _cache: &mut ::buffa::SizeCache,
1610        buf: &mut impl ::buffa::bytes::BufMut,
1611    ) {
1612        #[allow(unused_imports)]
1613        use ::buffa::Enumeration as _;
1614        if !self.signer_address.is_empty() {
1615            ::buffa::types::put_string_field(1u32, &self.signer_address, buf);
1616        }
1617        self.__buffa_unknown_fields.write_to(buf);
1618    }
1619    fn merge_field(
1620        &mut self,
1621        tag: ::buffa::encoding::Tag,
1622        buf: &mut impl ::buffa::bytes::Buf,
1623        ctx: ::buffa::DecodeContext<'_>,
1624    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1625        #[allow(unused_imports)]
1626        use ::buffa::bytes::Buf as _;
1627        #[allow(unused_imports)]
1628        use ::buffa::Enumeration as _;
1629        match tag.field_number() {
1630            1u32 => {
1631                ::buffa::encoding::check_wire_type(
1632                    tag,
1633                    ::buffa::encoding::WireType::LengthDelimited,
1634                )?;
1635                ::buffa::types::merge_string(&mut self.signer_address, buf)?;
1636            }
1637            _ => {
1638                self.__buffa_unknown_fields
1639                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
1640            }
1641        }
1642        ::core::result::Result::Ok(())
1643    }
1644    fn clear(&mut self) {
1645        self.signer_address.clear();
1646        self.__buffa_unknown_fields.clear();
1647    }
1648}
1649impl ::buffa::ExtensionSet for CreateGuardSignerWalletResponse {
1650    const PROTO_FQN: &'static str = "chain.guard.v1.CreateGuardSignerWalletResponse";
1651    fn unknown_fields(&self) -> &::buffa::UnknownFields {
1652        &self.__buffa_unknown_fields
1653    }
1654    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1655        &mut self.__buffa_unknown_fields
1656    }
1657}
1658impl ::buffa::json_helpers::ProtoElemJson for CreateGuardSignerWalletResponse {
1659    fn serialize_proto_json<S: ::serde::Serializer>(
1660        v: &Self,
1661        s: S,
1662    ) -> ::core::result::Result<S::Ok, S::Error> {
1663        ::serde::Serialize::serialize(v, s)
1664    }
1665    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1666        d: D,
1667    ) -> ::core::result::Result<Self, D::Error> {
1668        <Self as ::serde::Deserialize>::deserialize(d)
1669    }
1670}
1671#[doc(hidden)]
1672pub const __CREATE_GUARD_SIGNER_WALLET_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1673    type_url: "type.googleapis.com/chain.guard.v1.CreateGuardSignerWalletResponse",
1674    to_json: ::buffa::type_registry::any_to_json::<CreateGuardSignerWalletResponse>,
1675    from_json: ::buffa::type_registry::any_from_json::<CreateGuardSignerWalletResponse>,
1676    is_wkt: false,
1677};
1678/// GetGuardSignerStatusRequest queries stored and live signer status for one
1679/// account target.
1680#[derive(Clone, PartialEq, Default)]
1681#[derive(::serde::Serialize, ::serde::Deserialize)]
1682#[serde(default)]
1683pub struct GetGuardSignerStatusRequest {
1684    /// Optional subaccount public id. When omitted, the authenticated caller's
1685    /// root account is used as the target account.
1686    ///
1687    /// Field 1: `subaccount_id`
1688    #[serde(
1689        rename = "subaccountId",
1690        alias = "subaccount_id",
1691        with = "::buffa::json_helpers::uint64",
1692        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
1693    )]
1694    pub subaccount_id: u64,
1695    #[serde(skip)]
1696    #[doc(hidden)]
1697    pub __buffa_unknown_fields: ::buffa::UnknownFields,
1698}
1699impl ::core::fmt::Debug for GetGuardSignerStatusRequest {
1700    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1701        f.debug_struct("GetGuardSignerStatusRequest")
1702            .field("subaccount_id", &self.subaccount_id)
1703            .finish()
1704    }
1705}
1706impl GetGuardSignerStatusRequest {
1707    /// Protobuf type URL for this message, for use with `Any::pack` and
1708    /// `Any::unpack_if`.
1709    ///
1710    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1711    pub const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.GetGuardSignerStatusRequest";
1712}
1713::buffa::impl_default_instance!(GetGuardSignerStatusRequest);
1714impl ::buffa::MessageName for GetGuardSignerStatusRequest {
1715    const PACKAGE: &'static str = "chain.guard.v1";
1716    const NAME: &'static str = "GetGuardSignerStatusRequest";
1717    const FULL_NAME: &'static str = "chain.guard.v1.GetGuardSignerStatusRequest";
1718    const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.GetGuardSignerStatusRequest";
1719}
1720impl ::buffa::Message for GetGuardSignerStatusRequest {
1721    /// Returns the total encoded size in bytes.
1722    ///
1723    /// The result is a `u32`; the protobuf specification requires all
1724    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1725    /// compliant message will never overflow this type.
1726    #[allow(clippy::let_and_return)]
1727    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
1728        #[allow(unused_imports)]
1729        use ::buffa::Enumeration as _;
1730        let mut size = 0u32;
1731        if self.subaccount_id != 0u64 {
1732            size += 1u32 + ::buffa::types::FIXED64_ENCODED_LEN as u32;
1733        }
1734        size += self.__buffa_unknown_fields.encoded_len() as u32;
1735        size
1736    }
1737    fn write_to(
1738        &self,
1739        _cache: &mut ::buffa::SizeCache,
1740        buf: &mut impl ::buffa::bytes::BufMut,
1741    ) {
1742        #[allow(unused_imports)]
1743        use ::buffa::Enumeration as _;
1744        if self.subaccount_id != 0u64 {
1745            ::buffa::types::put_fixed64_field(1u32, self.subaccount_id, buf);
1746        }
1747        self.__buffa_unknown_fields.write_to(buf);
1748    }
1749    fn merge_field(
1750        &mut self,
1751        tag: ::buffa::encoding::Tag,
1752        buf: &mut impl ::buffa::bytes::Buf,
1753        ctx: ::buffa::DecodeContext<'_>,
1754    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1755        #[allow(unused_imports)]
1756        use ::buffa::bytes::Buf as _;
1757        #[allow(unused_imports)]
1758        use ::buffa::Enumeration as _;
1759        match tag.field_number() {
1760            1u32 => {
1761                ::buffa::encoding::check_wire_type(
1762                    tag,
1763                    ::buffa::encoding::WireType::Fixed64,
1764                )?;
1765                self.subaccount_id = ::buffa::types::decode_fixed64(buf)?;
1766            }
1767            _ => {
1768                self.__buffa_unknown_fields
1769                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
1770            }
1771        }
1772        ::core::result::Result::Ok(())
1773    }
1774    fn clear(&mut self) {
1775        self.subaccount_id = 0u64;
1776        self.__buffa_unknown_fields.clear();
1777    }
1778}
1779impl ::buffa::ExtensionSet for GetGuardSignerStatusRequest {
1780    const PROTO_FQN: &'static str = "chain.guard.v1.GetGuardSignerStatusRequest";
1781    fn unknown_fields(&self) -> &::buffa::UnknownFields {
1782        &self.__buffa_unknown_fields
1783    }
1784    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1785        &mut self.__buffa_unknown_fields
1786    }
1787}
1788impl ::buffa::json_helpers::ProtoElemJson for GetGuardSignerStatusRequest {
1789    fn serialize_proto_json<S: ::serde::Serializer>(
1790        v: &Self,
1791        s: S,
1792    ) -> ::core::result::Result<S::Ok, S::Error> {
1793        ::serde::Serialize::serialize(v, s)
1794    }
1795    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1796        d: D,
1797    ) -> ::core::result::Result<Self, D::Error> {
1798        <Self as ::serde::Deserialize>::deserialize(d)
1799    }
1800}
1801#[doc(hidden)]
1802pub const __GET_GUARD_SIGNER_STATUS_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1803    type_url: "type.googleapis.com/chain.guard.v1.GetGuardSignerStatusRequest",
1804    to_json: ::buffa::type_registry::any_to_json::<GetGuardSignerStatusRequest>,
1805    from_json: ::buffa::type_registry::any_from_json::<GetGuardSignerStatusRequest>,
1806    is_wkt: false,
1807};
1808/// GetGuardSignerStatusResponse returns stored and on-chain signer state.
1809#[derive(Clone, PartialEq, Default)]
1810#[derive(::serde::Serialize, ::serde::Deserialize)]
1811#[serde(default)]
1812pub struct GetGuardSignerStatusResponse {
1813    /// Stored and live guard signer status for the selected account target.
1814    ///
1815    /// Field 1: `status`
1816    #[serde(
1817        rename = "status",
1818        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
1819    )]
1820    pub status: ::buffa::MessageField<GuardSignerStatus>,
1821    #[serde(skip)]
1822    #[doc(hidden)]
1823    pub __buffa_unknown_fields: ::buffa::UnknownFields,
1824}
1825impl ::core::fmt::Debug for GetGuardSignerStatusResponse {
1826    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1827        f.debug_struct("GetGuardSignerStatusResponse")
1828            .field("status", &self.status)
1829            .finish()
1830    }
1831}
1832impl GetGuardSignerStatusResponse {
1833    /// Protobuf type URL for this message, for use with `Any::pack` and
1834    /// `Any::unpack_if`.
1835    ///
1836    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1837    pub const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.GetGuardSignerStatusResponse";
1838}
1839::buffa::impl_default_instance!(GetGuardSignerStatusResponse);
1840impl ::buffa::MessageName for GetGuardSignerStatusResponse {
1841    const PACKAGE: &'static str = "chain.guard.v1";
1842    const NAME: &'static str = "GetGuardSignerStatusResponse";
1843    const FULL_NAME: &'static str = "chain.guard.v1.GetGuardSignerStatusResponse";
1844    const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.GetGuardSignerStatusResponse";
1845}
1846impl ::buffa::Message for GetGuardSignerStatusResponse {
1847    /// Returns the total encoded size in bytes.
1848    ///
1849    /// The result is a `u32`; the protobuf specification requires all
1850    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
1851    /// compliant message will never overflow this type.
1852    #[allow(clippy::let_and_return)]
1853    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
1854        #[allow(unused_imports)]
1855        use ::buffa::Enumeration as _;
1856        let mut size = 0u32;
1857        if self.status.is_set() {
1858            let __slot = __cache.reserve();
1859            let inner_size = self.status.compute_size(__cache);
1860            __cache.set(__slot, inner_size);
1861            size
1862                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
1863                    + inner_size;
1864        }
1865        size += self.__buffa_unknown_fields.encoded_len() as u32;
1866        size
1867    }
1868    fn write_to(
1869        &self,
1870        __cache: &mut ::buffa::SizeCache,
1871        buf: &mut impl ::buffa::bytes::BufMut,
1872    ) {
1873        #[allow(unused_imports)]
1874        use ::buffa::Enumeration as _;
1875        if self.status.is_set() {
1876            ::buffa::types::put_len_delimited_header(1u32, __cache.consume_next(), buf);
1877            self.status.write_to(__cache, buf);
1878        }
1879        self.__buffa_unknown_fields.write_to(buf);
1880    }
1881    fn merge_field(
1882        &mut self,
1883        tag: ::buffa::encoding::Tag,
1884        buf: &mut impl ::buffa::bytes::Buf,
1885        ctx: ::buffa::DecodeContext<'_>,
1886    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
1887        #[allow(unused_imports)]
1888        use ::buffa::bytes::Buf as _;
1889        #[allow(unused_imports)]
1890        use ::buffa::Enumeration as _;
1891        match tag.field_number() {
1892            1u32 => {
1893                ::buffa::encoding::check_wire_type(
1894                    tag,
1895                    ::buffa::encoding::WireType::LengthDelimited,
1896                )?;
1897                ::buffa::Message::merge_length_delimited(
1898                    self.status.get_or_insert_default(),
1899                    buf,
1900                    ctx,
1901                )?;
1902            }
1903            _ => {
1904                self.__buffa_unknown_fields
1905                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
1906            }
1907        }
1908        ::core::result::Result::Ok(())
1909    }
1910    fn clear(&mut self) {
1911        self.status = ::buffa::MessageField::none();
1912        self.__buffa_unknown_fields.clear();
1913    }
1914}
1915impl ::buffa::ExtensionSet for GetGuardSignerStatusResponse {
1916    const PROTO_FQN: &'static str = "chain.guard.v1.GetGuardSignerStatusResponse";
1917    fn unknown_fields(&self) -> &::buffa::UnknownFields {
1918        &self.__buffa_unknown_fields
1919    }
1920    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
1921        &mut self.__buffa_unknown_fields
1922    }
1923}
1924impl ::buffa::json_helpers::ProtoElemJson for GetGuardSignerStatusResponse {
1925    fn serialize_proto_json<S: ::serde::Serializer>(
1926        v: &Self,
1927        s: S,
1928    ) -> ::core::result::Result<S::Ok, S::Error> {
1929        ::serde::Serialize::serialize(v, s)
1930    }
1931    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
1932        d: D,
1933    ) -> ::core::result::Result<Self, D::Error> {
1934        <Self as ::serde::Deserialize>::deserialize(d)
1935    }
1936}
1937#[doc(hidden)]
1938pub const __GET_GUARD_SIGNER_STATUS_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
1939    type_url: "type.googleapis.com/chain.guard.v1.GetGuardSignerStatusResponse",
1940    to_json: ::buffa::type_registry::any_to_json::<GetGuardSignerStatusResponse>,
1941    from_json: ::buffa::type_registry::any_from_json::<GetGuardSignerStatusResponse>,
1942    is_wkt: false,
1943};
1944/// SignProtectedActionRequest requests an approval for a supported FundingAccount
1945/// protected action.
1946#[derive(Clone, PartialEq, Default)]
1947#[derive(::serde::Serialize, ::serde::Deserialize)]
1948#[serde(default)]
1949pub struct SignProtectedActionRequest {
1950    /// Optional subaccount public id. When omitted, the authenticated caller's
1951    /// root account is used as the target account.
1952    ///
1953    /// Field 1: `subaccount_id`
1954    #[serde(
1955        rename = "subaccountId",
1956        alias = "subaccount_id",
1957        with = "::buffa::json_helpers::uint64",
1958        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
1959    )]
1960    pub subaccount_id: u64,
1961    /// Protected action to approve.
1962    ///
1963    /// Field 2: `action`
1964    #[serde(
1965        rename = "action",
1966        with = "::buffa::json_helpers::proto_enum",
1967        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
1968    )]
1969    pub action: ::buffa::EnumValue<ProtectedAction>,
1970    /// Business arguments for the selected protected action.
1971    ///
1972    /// Field 3: `args`
1973    #[serde(
1974        rename = "args",
1975        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
1976    )]
1977    pub args: ::buffa::MessageField<ProtectedActionArgs>,
1978    #[serde(skip)]
1979    #[doc(hidden)]
1980    pub __buffa_unknown_fields: ::buffa::UnknownFields,
1981}
1982impl ::core::fmt::Debug for SignProtectedActionRequest {
1983    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1984        f.debug_struct("SignProtectedActionRequest")
1985            .field("subaccount_id", &self.subaccount_id)
1986            .field("action", &self.action)
1987            .field("args", &self.args)
1988            .finish()
1989    }
1990}
1991impl SignProtectedActionRequest {
1992    /// Protobuf type URL for this message, for use with `Any::pack` and
1993    /// `Any::unpack_if`.
1994    ///
1995    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
1996    pub const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.SignProtectedActionRequest";
1997}
1998::buffa::impl_default_instance!(SignProtectedActionRequest);
1999impl ::buffa::MessageName for SignProtectedActionRequest {
2000    const PACKAGE: &'static str = "chain.guard.v1";
2001    const NAME: &'static str = "SignProtectedActionRequest";
2002    const FULL_NAME: &'static str = "chain.guard.v1.SignProtectedActionRequest";
2003    const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.SignProtectedActionRequest";
2004}
2005impl ::buffa::Message for SignProtectedActionRequest {
2006    /// Returns the total encoded size in bytes.
2007    ///
2008    /// The result is a `u32`; the protobuf specification requires all
2009    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
2010    /// compliant message will never overflow this type.
2011    #[allow(clippy::let_and_return)]
2012    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
2013        #[allow(unused_imports)]
2014        use ::buffa::Enumeration as _;
2015        let mut size = 0u32;
2016        if self.subaccount_id != 0u64 {
2017            size += 1u32 + ::buffa::types::FIXED64_ENCODED_LEN as u32;
2018        }
2019        {
2020            let val = self.action.to_i32();
2021            if val != 0 {
2022                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
2023            }
2024        }
2025        if self.args.is_set() {
2026            let __slot = __cache.reserve();
2027            let inner_size = self.args.compute_size(__cache);
2028            __cache.set(__slot, inner_size);
2029            size
2030                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
2031                    + inner_size;
2032        }
2033        size += self.__buffa_unknown_fields.encoded_len() as u32;
2034        size
2035    }
2036    fn write_to(
2037        &self,
2038        __cache: &mut ::buffa::SizeCache,
2039        buf: &mut impl ::buffa::bytes::BufMut,
2040    ) {
2041        #[allow(unused_imports)]
2042        use ::buffa::Enumeration as _;
2043        if self.subaccount_id != 0u64 {
2044            ::buffa::types::put_fixed64_field(1u32, self.subaccount_id, buf);
2045        }
2046        {
2047            let val = self.action.to_i32();
2048            if val != 0 {
2049                ::buffa::types::put_int32_field(2u32, val, buf);
2050            }
2051        }
2052        if self.args.is_set() {
2053            ::buffa::types::put_len_delimited_header(3u32, __cache.consume_next(), buf);
2054            self.args.write_to(__cache, buf);
2055        }
2056        self.__buffa_unknown_fields.write_to(buf);
2057    }
2058    fn merge_field(
2059        &mut self,
2060        tag: ::buffa::encoding::Tag,
2061        buf: &mut impl ::buffa::bytes::Buf,
2062        ctx: ::buffa::DecodeContext<'_>,
2063    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2064        #[allow(unused_imports)]
2065        use ::buffa::bytes::Buf as _;
2066        #[allow(unused_imports)]
2067        use ::buffa::Enumeration as _;
2068        match tag.field_number() {
2069            1u32 => {
2070                ::buffa::encoding::check_wire_type(
2071                    tag,
2072                    ::buffa::encoding::WireType::Fixed64,
2073                )?;
2074                self.subaccount_id = ::buffa::types::decode_fixed64(buf)?;
2075            }
2076            2u32 => {
2077                ::buffa::encoding::check_wire_type(
2078                    tag,
2079                    ::buffa::encoding::WireType::Varint,
2080                )?;
2081                self.action = ::buffa::EnumValue::from(
2082                    ::buffa::types::decode_int32(buf)?,
2083                );
2084            }
2085            3u32 => {
2086                ::buffa::encoding::check_wire_type(
2087                    tag,
2088                    ::buffa::encoding::WireType::LengthDelimited,
2089                )?;
2090                ::buffa::Message::merge_length_delimited(
2091                    self.args.get_or_insert_default(),
2092                    buf,
2093                    ctx,
2094                )?;
2095            }
2096            _ => {
2097                self.__buffa_unknown_fields
2098                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
2099            }
2100        }
2101        ::core::result::Result::Ok(())
2102    }
2103    fn clear(&mut self) {
2104        self.subaccount_id = 0u64;
2105        self.action = ::buffa::EnumValue::from(0);
2106        self.args = ::buffa::MessageField::none();
2107        self.__buffa_unknown_fields.clear();
2108    }
2109}
2110impl ::buffa::ExtensionSet for SignProtectedActionRequest {
2111    const PROTO_FQN: &'static str = "chain.guard.v1.SignProtectedActionRequest";
2112    fn unknown_fields(&self) -> &::buffa::UnknownFields {
2113        &self.__buffa_unknown_fields
2114    }
2115    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2116        &mut self.__buffa_unknown_fields
2117    }
2118}
2119impl ::buffa::json_helpers::ProtoElemJson for SignProtectedActionRequest {
2120    fn serialize_proto_json<S: ::serde::Serializer>(
2121        v: &Self,
2122        s: S,
2123    ) -> ::core::result::Result<S::Ok, S::Error> {
2124        ::serde::Serialize::serialize(v, s)
2125    }
2126    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2127        d: D,
2128    ) -> ::core::result::Result<Self, D::Error> {
2129        <Self as ::serde::Deserialize>::deserialize(d)
2130    }
2131}
2132#[doc(hidden)]
2133pub const __SIGN_PROTECTED_ACTION_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
2134    type_url: "type.googleapis.com/chain.guard.v1.SignProtectedActionRequest",
2135    to_json: ::buffa::type_registry::any_to_json::<SignProtectedActionRequest>,
2136    from_json: ::buffa::type_registry::any_from_json::<SignProtectedActionRequest>,
2137    is_wkt: false,
2138};
2139/// SignProtectedActionResponse returns the contract submission approval.
2140#[derive(Clone, PartialEq, Default)]
2141#[derive(::serde::Serialize, ::serde::Deserialize)]
2142#[serde(default)]
2143pub struct SignProtectedActionResponse {
2144    /// Approval signature payload for the requested protected action.
2145    ///
2146    /// Field 1: `approval`
2147    #[serde(
2148        rename = "approval",
2149        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
2150    )]
2151    pub approval: ::buffa::MessageField<GuardApproval>,
2152    #[serde(skip)]
2153    #[doc(hidden)]
2154    pub __buffa_unknown_fields: ::buffa::UnknownFields,
2155}
2156impl ::core::fmt::Debug for SignProtectedActionResponse {
2157    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2158        f.debug_struct("SignProtectedActionResponse")
2159            .field("approval", &self.approval)
2160            .finish()
2161    }
2162}
2163impl SignProtectedActionResponse {
2164    /// Protobuf type URL for this message, for use with `Any::pack` and
2165    /// `Any::unpack_if`.
2166    ///
2167    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
2168    pub const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.SignProtectedActionResponse";
2169}
2170::buffa::impl_default_instance!(SignProtectedActionResponse);
2171impl ::buffa::MessageName for SignProtectedActionResponse {
2172    const PACKAGE: &'static str = "chain.guard.v1";
2173    const NAME: &'static str = "SignProtectedActionResponse";
2174    const FULL_NAME: &'static str = "chain.guard.v1.SignProtectedActionResponse";
2175    const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.SignProtectedActionResponse";
2176}
2177impl ::buffa::Message for SignProtectedActionResponse {
2178    /// Returns the total encoded size in bytes.
2179    ///
2180    /// The result is a `u32`; the protobuf specification requires all
2181    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
2182    /// compliant message will never overflow this type.
2183    #[allow(clippy::let_and_return)]
2184    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
2185        #[allow(unused_imports)]
2186        use ::buffa::Enumeration as _;
2187        let mut size = 0u32;
2188        if self.approval.is_set() {
2189            let __slot = __cache.reserve();
2190            let inner_size = self.approval.compute_size(__cache);
2191            __cache.set(__slot, inner_size);
2192            size
2193                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
2194                    + inner_size;
2195        }
2196        size += self.__buffa_unknown_fields.encoded_len() as u32;
2197        size
2198    }
2199    fn write_to(
2200        &self,
2201        __cache: &mut ::buffa::SizeCache,
2202        buf: &mut impl ::buffa::bytes::BufMut,
2203    ) {
2204        #[allow(unused_imports)]
2205        use ::buffa::Enumeration as _;
2206        if self.approval.is_set() {
2207            ::buffa::types::put_len_delimited_header(1u32, __cache.consume_next(), buf);
2208            self.approval.write_to(__cache, buf);
2209        }
2210        self.__buffa_unknown_fields.write_to(buf);
2211    }
2212    fn merge_field(
2213        &mut self,
2214        tag: ::buffa::encoding::Tag,
2215        buf: &mut impl ::buffa::bytes::Buf,
2216        ctx: ::buffa::DecodeContext<'_>,
2217    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2218        #[allow(unused_imports)]
2219        use ::buffa::bytes::Buf as _;
2220        #[allow(unused_imports)]
2221        use ::buffa::Enumeration as _;
2222        match tag.field_number() {
2223            1u32 => {
2224                ::buffa::encoding::check_wire_type(
2225                    tag,
2226                    ::buffa::encoding::WireType::LengthDelimited,
2227                )?;
2228                ::buffa::Message::merge_length_delimited(
2229                    self.approval.get_or_insert_default(),
2230                    buf,
2231                    ctx,
2232                )?;
2233            }
2234            _ => {
2235                self.__buffa_unknown_fields
2236                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
2237            }
2238        }
2239        ::core::result::Result::Ok(())
2240    }
2241    fn clear(&mut self) {
2242        self.approval = ::buffa::MessageField::none();
2243        self.__buffa_unknown_fields.clear();
2244    }
2245}
2246impl ::buffa::ExtensionSet for SignProtectedActionResponse {
2247    const PROTO_FQN: &'static str = "chain.guard.v1.SignProtectedActionResponse";
2248    fn unknown_fields(&self) -> &::buffa::UnknownFields {
2249        &self.__buffa_unknown_fields
2250    }
2251    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2252        &mut self.__buffa_unknown_fields
2253    }
2254}
2255impl ::buffa::json_helpers::ProtoElemJson for SignProtectedActionResponse {
2256    fn serialize_proto_json<S: ::serde::Serializer>(
2257        v: &Self,
2258        s: S,
2259    ) -> ::core::result::Result<S::Ok, S::Error> {
2260        ::serde::Serialize::serialize(v, s)
2261    }
2262    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2263        d: D,
2264    ) -> ::core::result::Result<Self, D::Error> {
2265        <Self as ::serde::Deserialize>::deserialize(d)
2266    }
2267}
2268#[doc(hidden)]
2269pub const __SIGN_PROTECTED_ACTION_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
2270    type_url: "type.googleapis.com/chain.guard.v1.SignProtectedActionResponse",
2271    to_json: ::buffa::type_registry::any_to_json::<SignProtectedActionResponse>,
2272    from_json: ::buffa::type_registry::any_from_json::<SignProtectedActionResponse>,
2273    is_wkt: false,
2274};
2275/// BatchSignProtectedActionItem is one protected FundingAccount action inside a
2276/// batched SmartAccount submission. The service signs items in this exact order.
2277#[derive(Clone, PartialEq, Default)]
2278#[derive(::serde::Serialize, ::serde::Deserialize)]
2279#[serde(default)]
2280pub struct BatchSignProtectedActionItem {
2281    /// Protected action to approve for this batch item.
2282    ///
2283    /// Field 1: `action`
2284    #[serde(
2285        rename = "action",
2286        with = "::buffa::json_helpers::proto_enum",
2287        skip_serializing_if = "::buffa::json_helpers::skip_if::is_default_enum_value"
2288    )]
2289    pub action: ::buffa::EnumValue<ProtectedAction>,
2290    /// Business arguments for this batch item.
2291    ///
2292    /// Field 2: `args`
2293    #[serde(
2294        rename = "args",
2295        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
2296    )]
2297    pub args: ::buffa::MessageField<ProtectedActionArgs>,
2298    #[serde(skip)]
2299    #[doc(hidden)]
2300    pub __buffa_unknown_fields: ::buffa::UnknownFields,
2301}
2302impl ::core::fmt::Debug for BatchSignProtectedActionItem {
2303    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2304        f.debug_struct("BatchSignProtectedActionItem")
2305            .field("action", &self.action)
2306            .field("args", &self.args)
2307            .finish()
2308    }
2309}
2310impl BatchSignProtectedActionItem {
2311    /// Protobuf type URL for this message, for use with `Any::pack` and
2312    /// `Any::unpack_if`.
2313    ///
2314    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
2315    pub const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.BatchSignProtectedActionItem";
2316}
2317::buffa::impl_default_instance!(BatchSignProtectedActionItem);
2318impl ::buffa::MessageName for BatchSignProtectedActionItem {
2319    const PACKAGE: &'static str = "chain.guard.v1";
2320    const NAME: &'static str = "BatchSignProtectedActionItem";
2321    const FULL_NAME: &'static str = "chain.guard.v1.BatchSignProtectedActionItem";
2322    const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.BatchSignProtectedActionItem";
2323}
2324impl ::buffa::Message for BatchSignProtectedActionItem {
2325    /// Returns the total encoded size in bytes.
2326    ///
2327    /// The result is a `u32`; the protobuf specification requires all
2328    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
2329    /// compliant message will never overflow this type.
2330    #[allow(clippy::let_and_return)]
2331    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
2332        #[allow(unused_imports)]
2333        use ::buffa::Enumeration as _;
2334        let mut size = 0u32;
2335        {
2336            let val = self.action.to_i32();
2337            if val != 0 {
2338                size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
2339            }
2340        }
2341        if self.args.is_set() {
2342            let __slot = __cache.reserve();
2343            let inner_size = self.args.compute_size(__cache);
2344            __cache.set(__slot, inner_size);
2345            size
2346                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
2347                    + inner_size;
2348        }
2349        size += self.__buffa_unknown_fields.encoded_len() as u32;
2350        size
2351    }
2352    fn write_to(
2353        &self,
2354        __cache: &mut ::buffa::SizeCache,
2355        buf: &mut impl ::buffa::bytes::BufMut,
2356    ) {
2357        #[allow(unused_imports)]
2358        use ::buffa::Enumeration as _;
2359        {
2360            let val = self.action.to_i32();
2361            if val != 0 {
2362                ::buffa::types::put_int32_field(1u32, val, buf);
2363            }
2364        }
2365        if self.args.is_set() {
2366            ::buffa::types::put_len_delimited_header(2u32, __cache.consume_next(), buf);
2367            self.args.write_to(__cache, buf);
2368        }
2369        self.__buffa_unknown_fields.write_to(buf);
2370    }
2371    fn merge_field(
2372        &mut self,
2373        tag: ::buffa::encoding::Tag,
2374        buf: &mut impl ::buffa::bytes::Buf,
2375        ctx: ::buffa::DecodeContext<'_>,
2376    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2377        #[allow(unused_imports)]
2378        use ::buffa::bytes::Buf as _;
2379        #[allow(unused_imports)]
2380        use ::buffa::Enumeration as _;
2381        match tag.field_number() {
2382            1u32 => {
2383                ::buffa::encoding::check_wire_type(
2384                    tag,
2385                    ::buffa::encoding::WireType::Varint,
2386                )?;
2387                self.action = ::buffa::EnumValue::from(
2388                    ::buffa::types::decode_int32(buf)?,
2389                );
2390            }
2391            2u32 => {
2392                ::buffa::encoding::check_wire_type(
2393                    tag,
2394                    ::buffa::encoding::WireType::LengthDelimited,
2395                )?;
2396                ::buffa::Message::merge_length_delimited(
2397                    self.args.get_or_insert_default(),
2398                    buf,
2399                    ctx,
2400                )?;
2401            }
2402            _ => {
2403                self.__buffa_unknown_fields
2404                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
2405            }
2406        }
2407        ::core::result::Result::Ok(())
2408    }
2409    fn clear(&mut self) {
2410        self.action = ::buffa::EnumValue::from(0);
2411        self.args = ::buffa::MessageField::none();
2412        self.__buffa_unknown_fields.clear();
2413    }
2414}
2415impl ::buffa::ExtensionSet for BatchSignProtectedActionItem {
2416    const PROTO_FQN: &'static str = "chain.guard.v1.BatchSignProtectedActionItem";
2417    fn unknown_fields(&self) -> &::buffa::UnknownFields {
2418        &self.__buffa_unknown_fields
2419    }
2420    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2421        &mut self.__buffa_unknown_fields
2422    }
2423}
2424impl ::buffa::json_helpers::ProtoElemJson for BatchSignProtectedActionItem {
2425    fn serialize_proto_json<S: ::serde::Serializer>(
2426        v: &Self,
2427        s: S,
2428    ) -> ::core::result::Result<S::Ok, S::Error> {
2429        ::serde::Serialize::serialize(v, s)
2430    }
2431    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2432        d: D,
2433    ) -> ::core::result::Result<Self, D::Error> {
2434        <Self as ::serde::Deserialize>::deserialize(d)
2435    }
2436}
2437#[doc(hidden)]
2438pub const __BATCH_SIGN_PROTECTED_ACTION_ITEM_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
2439    type_url: "type.googleapis.com/chain.guard.v1.BatchSignProtectedActionItem",
2440    to_json: ::buffa::type_registry::any_to_json::<BatchSignProtectedActionItem>,
2441    from_json: ::buffa::type_registry::any_from_json::<BatchSignProtectedActionItem>,
2442    is_wkt: false,
2443};
2444/// BatchSignProtectedActionsRequest requests ordered approvals for one batched
2445/// SmartAccount transaction. The server reads the first nonce from chain and
2446/// assigns subsequent nonces by incrementing locally within this response.
2447#[derive(Clone, PartialEq, Default)]
2448#[derive(::serde::Serialize, ::serde::Deserialize)]
2449#[serde(default)]
2450pub struct BatchSignProtectedActionsRequest {
2451    /// Optional subaccount public id. When omitted, the authenticated caller's
2452    /// root account is used as the target account.
2453    ///
2454    /// Field 1: `subaccount_id`
2455    #[serde(
2456        rename = "subaccountId",
2457        alias = "subaccount_id",
2458        with = "::buffa::json_helpers::uint64",
2459        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
2460    )]
2461    pub subaccount_id: u64,
2462    /// Ordered protected actions to sign, max 20 items.
2463    ///
2464    /// Field 2: `actions`
2465    #[serde(
2466        rename = "actions",
2467        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
2468        deserialize_with = "::buffa::json_helpers::null_as_default"
2469    )]
2470    pub actions: ::buffa::alloc::vec::Vec<BatchSignProtectedActionItem>,
2471    #[serde(skip)]
2472    #[doc(hidden)]
2473    pub __buffa_unknown_fields: ::buffa::UnknownFields,
2474}
2475impl ::core::fmt::Debug for BatchSignProtectedActionsRequest {
2476    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2477        f.debug_struct("BatchSignProtectedActionsRequest")
2478            .field("subaccount_id", &self.subaccount_id)
2479            .field("actions", &self.actions)
2480            .finish()
2481    }
2482}
2483impl BatchSignProtectedActionsRequest {
2484    /// Protobuf type URL for this message, for use with `Any::pack` and
2485    /// `Any::unpack_if`.
2486    ///
2487    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
2488    pub const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.BatchSignProtectedActionsRequest";
2489}
2490::buffa::impl_default_instance!(BatchSignProtectedActionsRequest);
2491impl ::buffa::MessageName for BatchSignProtectedActionsRequest {
2492    const PACKAGE: &'static str = "chain.guard.v1";
2493    const NAME: &'static str = "BatchSignProtectedActionsRequest";
2494    const FULL_NAME: &'static str = "chain.guard.v1.BatchSignProtectedActionsRequest";
2495    const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.BatchSignProtectedActionsRequest";
2496}
2497impl ::buffa::Message for BatchSignProtectedActionsRequest {
2498    /// Returns the total encoded size in bytes.
2499    ///
2500    /// The result is a `u32`; the protobuf specification requires all
2501    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
2502    /// compliant message will never overflow this type.
2503    #[allow(clippy::let_and_return)]
2504    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
2505        #[allow(unused_imports)]
2506        use ::buffa::Enumeration as _;
2507        let mut size = 0u32;
2508        if self.subaccount_id != 0u64 {
2509            size += 1u32 + ::buffa::types::FIXED64_ENCODED_LEN as u32;
2510        }
2511        for v in &self.actions {
2512            let __slot = __cache.reserve();
2513            let inner_size = v.compute_size(__cache);
2514            __cache.set(__slot, inner_size);
2515            size
2516                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
2517                    + inner_size;
2518        }
2519        size += self.__buffa_unknown_fields.encoded_len() as u32;
2520        size
2521    }
2522    fn write_to(
2523        &self,
2524        __cache: &mut ::buffa::SizeCache,
2525        buf: &mut impl ::buffa::bytes::BufMut,
2526    ) {
2527        #[allow(unused_imports)]
2528        use ::buffa::Enumeration as _;
2529        if self.subaccount_id != 0u64 {
2530            ::buffa::types::put_fixed64_field(1u32, self.subaccount_id, buf);
2531        }
2532        for v in &self.actions {
2533            ::buffa::types::put_len_delimited_header(2u32, __cache.consume_next(), buf);
2534            v.write_to(__cache, buf);
2535        }
2536        self.__buffa_unknown_fields.write_to(buf);
2537    }
2538    fn merge_field(
2539        &mut self,
2540        tag: ::buffa::encoding::Tag,
2541        buf: &mut impl ::buffa::bytes::Buf,
2542        ctx: ::buffa::DecodeContext<'_>,
2543    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2544        #[allow(unused_imports)]
2545        use ::buffa::bytes::Buf as _;
2546        #[allow(unused_imports)]
2547        use ::buffa::Enumeration as _;
2548        match tag.field_number() {
2549            1u32 => {
2550                ::buffa::encoding::check_wire_type(
2551                    tag,
2552                    ::buffa::encoding::WireType::Fixed64,
2553                )?;
2554                self.subaccount_id = ::buffa::types::decode_fixed64(buf)?;
2555            }
2556            2u32 => {
2557                ::buffa::encoding::check_wire_type(
2558                    tag,
2559                    ::buffa::encoding::WireType::LengthDelimited,
2560                )?;
2561                let mut elem = ::core::default::Default::default();
2562                ::buffa::Message::merge_length_delimited(&mut elem, buf, ctx)?;
2563                self.actions.push(elem);
2564            }
2565            _ => {
2566                self.__buffa_unknown_fields
2567                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
2568            }
2569        }
2570        ::core::result::Result::Ok(())
2571    }
2572    fn clear(&mut self) {
2573        self.subaccount_id = 0u64;
2574        self.actions.clear();
2575        self.__buffa_unknown_fields.clear();
2576    }
2577}
2578impl ::buffa::ExtensionSet for BatchSignProtectedActionsRequest {
2579    const PROTO_FQN: &'static str = "chain.guard.v1.BatchSignProtectedActionsRequest";
2580    fn unknown_fields(&self) -> &::buffa::UnknownFields {
2581        &self.__buffa_unknown_fields
2582    }
2583    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2584        &mut self.__buffa_unknown_fields
2585    }
2586}
2587impl ::buffa::json_helpers::ProtoElemJson for BatchSignProtectedActionsRequest {
2588    fn serialize_proto_json<S: ::serde::Serializer>(
2589        v: &Self,
2590        s: S,
2591    ) -> ::core::result::Result<S::Ok, S::Error> {
2592        ::serde::Serialize::serialize(v, s)
2593    }
2594    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2595        d: D,
2596    ) -> ::core::result::Result<Self, D::Error> {
2597        <Self as ::serde::Deserialize>::deserialize(d)
2598    }
2599}
2600#[doc(hidden)]
2601pub const __BATCH_SIGN_PROTECTED_ACTIONS_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
2602    type_url: "type.googleapis.com/chain.guard.v1.BatchSignProtectedActionsRequest",
2603    to_json: ::buffa::type_registry::any_to_json::<BatchSignProtectedActionsRequest>,
2604    from_json: ::buffa::type_registry::any_from_json::<BatchSignProtectedActionsRequest>,
2605    is_wkt: false,
2606};
2607/// BatchSignProtectedActionsResponse returns approvals in the same order as the
2608/// requested actions. Clients must submit them with the matching batched calls.
2609#[derive(Clone, PartialEq, Default)]
2610#[derive(::serde::Serialize, ::serde::Deserialize)]
2611#[serde(default)]
2612pub struct BatchSignProtectedActionsResponse {
2613    /// Approval signatures in the same order as the requested actions.
2614    ///
2615    /// Field 1: `approvals`
2616    #[serde(
2617        rename = "approvals",
2618        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_vec",
2619        deserialize_with = "::buffa::json_helpers::null_as_default"
2620    )]
2621    pub approvals: ::buffa::alloc::vec::Vec<GuardApproval>,
2622    #[serde(skip)]
2623    #[doc(hidden)]
2624    pub __buffa_unknown_fields: ::buffa::UnknownFields,
2625}
2626impl ::core::fmt::Debug for BatchSignProtectedActionsResponse {
2627    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2628        f.debug_struct("BatchSignProtectedActionsResponse")
2629            .field("approvals", &self.approvals)
2630            .finish()
2631    }
2632}
2633impl BatchSignProtectedActionsResponse {
2634    /// Protobuf type URL for this message, for use with `Any::pack` and
2635    /// `Any::unpack_if`.
2636    ///
2637    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
2638    pub const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.BatchSignProtectedActionsResponse";
2639}
2640::buffa::impl_default_instance!(BatchSignProtectedActionsResponse);
2641impl ::buffa::MessageName for BatchSignProtectedActionsResponse {
2642    const PACKAGE: &'static str = "chain.guard.v1";
2643    const NAME: &'static str = "BatchSignProtectedActionsResponse";
2644    const FULL_NAME: &'static str = "chain.guard.v1.BatchSignProtectedActionsResponse";
2645    const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.BatchSignProtectedActionsResponse";
2646}
2647impl ::buffa::Message for BatchSignProtectedActionsResponse {
2648    /// Returns the total encoded size in bytes.
2649    ///
2650    /// The result is a `u32`; the protobuf specification requires all
2651    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
2652    /// compliant message will never overflow this type.
2653    #[allow(clippy::let_and_return)]
2654    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
2655        #[allow(unused_imports)]
2656        use ::buffa::Enumeration as _;
2657        let mut size = 0u32;
2658        for v in &self.approvals {
2659            let __slot = __cache.reserve();
2660            let inner_size = v.compute_size(__cache);
2661            __cache.set(__slot, inner_size);
2662            size
2663                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
2664                    + inner_size;
2665        }
2666        size += self.__buffa_unknown_fields.encoded_len() as u32;
2667        size
2668    }
2669    fn write_to(
2670        &self,
2671        __cache: &mut ::buffa::SizeCache,
2672        buf: &mut impl ::buffa::bytes::BufMut,
2673    ) {
2674        #[allow(unused_imports)]
2675        use ::buffa::Enumeration as _;
2676        for v in &self.approvals {
2677            ::buffa::types::put_len_delimited_header(1u32, __cache.consume_next(), buf);
2678            v.write_to(__cache, buf);
2679        }
2680        self.__buffa_unknown_fields.write_to(buf);
2681    }
2682    fn merge_field(
2683        &mut self,
2684        tag: ::buffa::encoding::Tag,
2685        buf: &mut impl ::buffa::bytes::Buf,
2686        ctx: ::buffa::DecodeContext<'_>,
2687    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2688        #[allow(unused_imports)]
2689        use ::buffa::bytes::Buf as _;
2690        #[allow(unused_imports)]
2691        use ::buffa::Enumeration as _;
2692        match tag.field_number() {
2693            1u32 => {
2694                ::buffa::encoding::check_wire_type(
2695                    tag,
2696                    ::buffa::encoding::WireType::LengthDelimited,
2697                )?;
2698                let mut elem = ::core::default::Default::default();
2699                ::buffa::Message::merge_length_delimited(&mut elem, buf, ctx)?;
2700                self.approvals.push(elem);
2701            }
2702            _ => {
2703                self.__buffa_unknown_fields
2704                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
2705            }
2706        }
2707        ::core::result::Result::Ok(())
2708    }
2709    fn clear(&mut self) {
2710        self.approvals.clear();
2711        self.__buffa_unknown_fields.clear();
2712    }
2713}
2714impl ::buffa::ExtensionSet for BatchSignProtectedActionsResponse {
2715    const PROTO_FQN: &'static str = "chain.guard.v1.BatchSignProtectedActionsResponse";
2716    fn unknown_fields(&self) -> &::buffa::UnknownFields {
2717        &self.__buffa_unknown_fields
2718    }
2719    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2720        &mut self.__buffa_unknown_fields
2721    }
2722}
2723impl ::buffa::json_helpers::ProtoElemJson for BatchSignProtectedActionsResponse {
2724    fn serialize_proto_json<S: ::serde::Serializer>(
2725        v: &Self,
2726        s: S,
2727    ) -> ::core::result::Result<S::Ok, S::Error> {
2728        ::serde::Serialize::serialize(v, s)
2729    }
2730    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2731        d: D,
2732    ) -> ::core::result::Result<Self, D::Error> {
2733        <Self as ::serde::Deserialize>::deserialize(d)
2734    }
2735}
2736#[doc(hidden)]
2737pub const __BATCH_SIGN_PROTECTED_ACTIONS_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
2738    type_url: "type.googleapis.com/chain.guard.v1.BatchSignProtectedActionsResponse",
2739    to_json: ::buffa::type_registry::any_to_json::<BatchSignProtectedActionsResponse>,
2740    from_json: ::buffa::type_registry::any_from_json::<
2741        BatchSignProtectedActionsResponse,
2742    >,
2743    is_wkt: false,
2744};
2745/// RotateGuardSignerWalletRequest asks the backend to generate a replacement
2746/// guard signer wallet and sign the on-chain rotation approval.
2747#[derive(Clone, PartialEq, Default)]
2748#[derive(::serde::Serialize, ::serde::Deserialize)]
2749#[serde(default)]
2750pub struct RotateGuardSignerWalletRequest {
2751    /// Optional subaccount public id. When omitted, the authenticated caller's
2752    /// root account is used as the target account.
2753    ///
2754    /// Field 1: `subaccount_id`
2755    #[serde(
2756        rename = "subaccountId",
2757        alias = "subaccount_id",
2758        with = "::buffa::json_helpers::uint64",
2759        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
2760    )]
2761    pub subaccount_id: u64,
2762    #[serde(skip)]
2763    #[doc(hidden)]
2764    pub __buffa_unknown_fields: ::buffa::UnknownFields,
2765}
2766impl ::core::fmt::Debug for RotateGuardSignerWalletRequest {
2767    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2768        f.debug_struct("RotateGuardSignerWalletRequest")
2769            .field("subaccount_id", &self.subaccount_id)
2770            .finish()
2771    }
2772}
2773impl RotateGuardSignerWalletRequest {
2774    /// Protobuf type URL for this message, for use with `Any::pack` and
2775    /// `Any::unpack_if`.
2776    ///
2777    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
2778    pub const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.RotateGuardSignerWalletRequest";
2779}
2780::buffa::impl_default_instance!(RotateGuardSignerWalletRequest);
2781impl ::buffa::MessageName for RotateGuardSignerWalletRequest {
2782    const PACKAGE: &'static str = "chain.guard.v1";
2783    const NAME: &'static str = "RotateGuardSignerWalletRequest";
2784    const FULL_NAME: &'static str = "chain.guard.v1.RotateGuardSignerWalletRequest";
2785    const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.RotateGuardSignerWalletRequest";
2786}
2787impl ::buffa::Message for RotateGuardSignerWalletRequest {
2788    /// Returns the total encoded size in bytes.
2789    ///
2790    /// The result is a `u32`; the protobuf specification requires all
2791    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
2792    /// compliant message will never overflow this type.
2793    #[allow(clippy::let_and_return)]
2794    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
2795        #[allow(unused_imports)]
2796        use ::buffa::Enumeration as _;
2797        let mut size = 0u32;
2798        if self.subaccount_id != 0u64 {
2799            size += 1u32 + ::buffa::types::FIXED64_ENCODED_LEN as u32;
2800        }
2801        size += self.__buffa_unknown_fields.encoded_len() as u32;
2802        size
2803    }
2804    fn write_to(
2805        &self,
2806        _cache: &mut ::buffa::SizeCache,
2807        buf: &mut impl ::buffa::bytes::BufMut,
2808    ) {
2809        #[allow(unused_imports)]
2810        use ::buffa::Enumeration as _;
2811        if self.subaccount_id != 0u64 {
2812            ::buffa::types::put_fixed64_field(1u32, self.subaccount_id, buf);
2813        }
2814        self.__buffa_unknown_fields.write_to(buf);
2815    }
2816    fn merge_field(
2817        &mut self,
2818        tag: ::buffa::encoding::Tag,
2819        buf: &mut impl ::buffa::bytes::Buf,
2820        ctx: ::buffa::DecodeContext<'_>,
2821    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2822        #[allow(unused_imports)]
2823        use ::buffa::bytes::Buf as _;
2824        #[allow(unused_imports)]
2825        use ::buffa::Enumeration as _;
2826        match tag.field_number() {
2827            1u32 => {
2828                ::buffa::encoding::check_wire_type(
2829                    tag,
2830                    ::buffa::encoding::WireType::Fixed64,
2831                )?;
2832                self.subaccount_id = ::buffa::types::decode_fixed64(buf)?;
2833            }
2834            _ => {
2835                self.__buffa_unknown_fields
2836                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
2837            }
2838        }
2839        ::core::result::Result::Ok(())
2840    }
2841    fn clear(&mut self) {
2842        self.subaccount_id = 0u64;
2843        self.__buffa_unknown_fields.clear();
2844    }
2845}
2846impl ::buffa::ExtensionSet for RotateGuardSignerWalletRequest {
2847    const PROTO_FQN: &'static str = "chain.guard.v1.RotateGuardSignerWalletRequest";
2848    fn unknown_fields(&self) -> &::buffa::UnknownFields {
2849        &self.__buffa_unknown_fields
2850    }
2851    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
2852        &mut self.__buffa_unknown_fields
2853    }
2854}
2855impl ::buffa::json_helpers::ProtoElemJson for RotateGuardSignerWalletRequest {
2856    fn serialize_proto_json<S: ::serde::Serializer>(
2857        v: &Self,
2858        s: S,
2859    ) -> ::core::result::Result<S::Ok, S::Error> {
2860        ::serde::Serialize::serialize(v, s)
2861    }
2862    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
2863        d: D,
2864    ) -> ::core::result::Result<Self, D::Error> {
2865        <Self as ::serde::Deserialize>::deserialize(d)
2866    }
2867}
2868#[doc(hidden)]
2869pub const __ROTATE_GUARD_SIGNER_WALLET_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
2870    type_url: "type.googleapis.com/chain.guard.v1.RotateGuardSignerWalletRequest",
2871    to_json: ::buffa::type_registry::any_to_json::<RotateGuardSignerWalletRequest>,
2872    from_json: ::buffa::type_registry::any_from_json::<RotateGuardSignerWalletRequest>,
2873    is_wkt: false,
2874};
2875/// RotateGuardSignerWalletResponse returns the backend-generated replacement
2876/// signer and the approval needed to submit signer rotation on-chain.
2877#[derive(Clone, PartialEq, Default)]
2878#[derive(::serde::Serialize, ::serde::Deserialize)]
2879#[serde(default)]
2880pub struct RotateGuardSignerWalletResponse {
2881    /// EVM address of the replacement guard signer wallet.
2882    ///
2883    /// Field 1: `new_signer_address`
2884    #[serde(
2885        rename = "newSignerAddress",
2886        alias = "new_signer_address",
2887        with = "::buffa::json_helpers::proto_string",
2888        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
2889    )]
2890    pub new_signer_address: ::buffa::alloc::string::String,
2891    /// Approval signature payload needed to submit the signer rotation.
2892    ///
2893    /// Field 2: `approval`
2894    #[serde(
2895        rename = "approval",
2896        skip_serializing_if = "::buffa::json_helpers::skip_if::is_unset_message_field"
2897    )]
2898    pub approval: ::buffa::MessageField<GuardApproval>,
2899    #[serde(skip)]
2900    #[doc(hidden)]
2901    pub __buffa_unknown_fields: ::buffa::UnknownFields,
2902}
2903impl ::core::fmt::Debug for RotateGuardSignerWalletResponse {
2904    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2905        f.debug_struct("RotateGuardSignerWalletResponse")
2906            .field("new_signer_address", &self.new_signer_address)
2907            .field("approval", &self.approval)
2908            .finish()
2909    }
2910}
2911impl RotateGuardSignerWalletResponse {
2912    /// Protobuf type URL for this message, for use with `Any::pack` and
2913    /// `Any::unpack_if`.
2914    ///
2915    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
2916    pub const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.RotateGuardSignerWalletResponse";
2917}
2918::buffa::impl_default_instance!(RotateGuardSignerWalletResponse);
2919impl ::buffa::MessageName for RotateGuardSignerWalletResponse {
2920    const PACKAGE: &'static str = "chain.guard.v1";
2921    const NAME: &'static str = "RotateGuardSignerWalletResponse";
2922    const FULL_NAME: &'static str = "chain.guard.v1.RotateGuardSignerWalletResponse";
2923    const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.RotateGuardSignerWalletResponse";
2924}
2925impl ::buffa::Message for RotateGuardSignerWalletResponse {
2926    /// Returns the total encoded size in bytes.
2927    ///
2928    /// The result is a `u32`; the protobuf specification requires all
2929    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
2930    /// compliant message will never overflow this type.
2931    #[allow(clippy::let_and_return)]
2932    fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
2933        #[allow(unused_imports)]
2934        use ::buffa::Enumeration as _;
2935        let mut size = 0u32;
2936        if !self.new_signer_address.is_empty() {
2937            size
2938                += 1u32
2939                    + ::buffa::types::string_encoded_len(&self.new_signer_address)
2940                        as u32;
2941        }
2942        if self.approval.is_set() {
2943            let __slot = __cache.reserve();
2944            let inner_size = self.approval.compute_size(__cache);
2945            __cache.set(__slot, inner_size);
2946            size
2947                += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
2948                    + inner_size;
2949        }
2950        size += self.__buffa_unknown_fields.encoded_len() as u32;
2951        size
2952    }
2953    fn write_to(
2954        &self,
2955        __cache: &mut ::buffa::SizeCache,
2956        buf: &mut impl ::buffa::bytes::BufMut,
2957    ) {
2958        #[allow(unused_imports)]
2959        use ::buffa::Enumeration as _;
2960        if !self.new_signer_address.is_empty() {
2961            ::buffa::types::put_string_field(1u32, &self.new_signer_address, buf);
2962        }
2963        if self.approval.is_set() {
2964            ::buffa::types::put_len_delimited_header(2u32, __cache.consume_next(), buf);
2965            self.approval.write_to(__cache, buf);
2966        }
2967        self.__buffa_unknown_fields.write_to(buf);
2968    }
2969    fn merge_field(
2970        &mut self,
2971        tag: ::buffa::encoding::Tag,
2972        buf: &mut impl ::buffa::bytes::Buf,
2973        ctx: ::buffa::DecodeContext<'_>,
2974    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
2975        #[allow(unused_imports)]
2976        use ::buffa::bytes::Buf as _;
2977        #[allow(unused_imports)]
2978        use ::buffa::Enumeration as _;
2979        match tag.field_number() {
2980            1u32 => {
2981                ::buffa::encoding::check_wire_type(
2982                    tag,
2983                    ::buffa::encoding::WireType::LengthDelimited,
2984                )?;
2985                ::buffa::types::merge_string(&mut self.new_signer_address, buf)?;
2986            }
2987            2u32 => {
2988                ::buffa::encoding::check_wire_type(
2989                    tag,
2990                    ::buffa::encoding::WireType::LengthDelimited,
2991                )?;
2992                ::buffa::Message::merge_length_delimited(
2993                    self.approval.get_or_insert_default(),
2994                    buf,
2995                    ctx,
2996                )?;
2997            }
2998            _ => {
2999                self.__buffa_unknown_fields
3000                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
3001            }
3002        }
3003        ::core::result::Result::Ok(())
3004    }
3005    fn clear(&mut self) {
3006        self.new_signer_address.clear();
3007        self.approval = ::buffa::MessageField::none();
3008        self.__buffa_unknown_fields.clear();
3009    }
3010}
3011impl ::buffa::ExtensionSet for RotateGuardSignerWalletResponse {
3012    const PROTO_FQN: &'static str = "chain.guard.v1.RotateGuardSignerWalletResponse";
3013    fn unknown_fields(&self) -> &::buffa::UnknownFields {
3014        &self.__buffa_unknown_fields
3015    }
3016    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
3017        &mut self.__buffa_unknown_fields
3018    }
3019}
3020impl ::buffa::json_helpers::ProtoElemJson for RotateGuardSignerWalletResponse {
3021    fn serialize_proto_json<S: ::serde::Serializer>(
3022        v: &Self,
3023        s: S,
3024    ) -> ::core::result::Result<S::Ok, S::Error> {
3025        ::serde::Serialize::serialize(v, s)
3026    }
3027    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
3028        d: D,
3029    ) -> ::core::result::Result<Self, D::Error> {
3030        <Self as ::serde::Deserialize>::deserialize(d)
3031    }
3032}
3033#[doc(hidden)]
3034pub const __ROTATE_GUARD_SIGNER_WALLET_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
3035    type_url: "type.googleapis.com/chain.guard.v1.RotateGuardSignerWalletResponse",
3036    to_json: ::buffa::type_registry::any_to_json::<RotateGuardSignerWalletResponse>,
3037    from_json: ::buffa::type_registry::any_from_json::<RotateGuardSignerWalletResponse>,
3038    is_wkt: false,
3039};
3040/// ExportGuardSignerWalletRequest exports guard signer key material for an
3041/// explicitly authorized account target. This is a high-risk sovereignty flow.
3042#[derive(Clone, PartialEq, Default)]
3043#[derive(::serde::Serialize, ::serde::Deserialize)]
3044#[serde(default)]
3045pub struct ExportGuardSignerWalletRequest {
3046    /// Optional subaccount public id. When omitted, the authenticated caller's
3047    /// root account is used as the target account.
3048    ///
3049    /// Field 1: `subaccount_id`
3050    #[serde(
3051        rename = "subaccountId",
3052        alias = "subaccount_id",
3053        with = "::buffa::json_helpers::uint64",
3054        skip_serializing_if = "::buffa::json_helpers::skip_if::is_zero_u64"
3055    )]
3056    pub subaccount_id: u64,
3057    #[serde(skip)]
3058    #[doc(hidden)]
3059    pub __buffa_unknown_fields: ::buffa::UnknownFields,
3060}
3061impl ::core::fmt::Debug for ExportGuardSignerWalletRequest {
3062    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3063        f.debug_struct("ExportGuardSignerWalletRequest")
3064            .field("subaccount_id", &self.subaccount_id)
3065            .finish()
3066    }
3067}
3068impl ExportGuardSignerWalletRequest {
3069    /// Protobuf type URL for this message, for use with `Any::pack` and
3070    /// `Any::unpack_if`.
3071    ///
3072    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
3073    pub const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.ExportGuardSignerWalletRequest";
3074}
3075::buffa::impl_default_instance!(ExportGuardSignerWalletRequest);
3076impl ::buffa::MessageName for ExportGuardSignerWalletRequest {
3077    const PACKAGE: &'static str = "chain.guard.v1";
3078    const NAME: &'static str = "ExportGuardSignerWalletRequest";
3079    const FULL_NAME: &'static str = "chain.guard.v1.ExportGuardSignerWalletRequest";
3080    const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.ExportGuardSignerWalletRequest";
3081}
3082impl ::buffa::Message for ExportGuardSignerWalletRequest {
3083    /// Returns the total encoded size in bytes.
3084    ///
3085    /// The result is a `u32`; the protobuf specification requires all
3086    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
3087    /// compliant message will never overflow this type.
3088    #[allow(clippy::let_and_return)]
3089    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
3090        #[allow(unused_imports)]
3091        use ::buffa::Enumeration as _;
3092        let mut size = 0u32;
3093        if self.subaccount_id != 0u64 {
3094            size += 1u32 + ::buffa::types::FIXED64_ENCODED_LEN as u32;
3095        }
3096        size += self.__buffa_unknown_fields.encoded_len() as u32;
3097        size
3098    }
3099    fn write_to(
3100        &self,
3101        _cache: &mut ::buffa::SizeCache,
3102        buf: &mut impl ::buffa::bytes::BufMut,
3103    ) {
3104        #[allow(unused_imports)]
3105        use ::buffa::Enumeration as _;
3106        if self.subaccount_id != 0u64 {
3107            ::buffa::types::put_fixed64_field(1u32, self.subaccount_id, buf);
3108        }
3109        self.__buffa_unknown_fields.write_to(buf);
3110    }
3111    fn merge_field(
3112        &mut self,
3113        tag: ::buffa::encoding::Tag,
3114        buf: &mut impl ::buffa::bytes::Buf,
3115        ctx: ::buffa::DecodeContext<'_>,
3116    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3117        #[allow(unused_imports)]
3118        use ::buffa::bytes::Buf as _;
3119        #[allow(unused_imports)]
3120        use ::buffa::Enumeration as _;
3121        match tag.field_number() {
3122            1u32 => {
3123                ::buffa::encoding::check_wire_type(
3124                    tag,
3125                    ::buffa::encoding::WireType::Fixed64,
3126                )?;
3127                self.subaccount_id = ::buffa::types::decode_fixed64(buf)?;
3128            }
3129            _ => {
3130                self.__buffa_unknown_fields
3131                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
3132            }
3133        }
3134        ::core::result::Result::Ok(())
3135    }
3136    fn clear(&mut self) {
3137        self.subaccount_id = 0u64;
3138        self.__buffa_unknown_fields.clear();
3139    }
3140}
3141impl ::buffa::ExtensionSet for ExportGuardSignerWalletRequest {
3142    const PROTO_FQN: &'static str = "chain.guard.v1.ExportGuardSignerWalletRequest";
3143    fn unknown_fields(&self) -> &::buffa::UnknownFields {
3144        &self.__buffa_unknown_fields
3145    }
3146    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
3147        &mut self.__buffa_unknown_fields
3148    }
3149}
3150impl ::buffa::json_helpers::ProtoElemJson for ExportGuardSignerWalletRequest {
3151    fn serialize_proto_json<S: ::serde::Serializer>(
3152        v: &Self,
3153        s: S,
3154    ) -> ::core::result::Result<S::Ok, S::Error> {
3155        ::serde::Serialize::serialize(v, s)
3156    }
3157    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
3158        d: D,
3159    ) -> ::core::result::Result<Self, D::Error> {
3160        <Self as ::serde::Deserialize>::deserialize(d)
3161    }
3162}
3163#[doc(hidden)]
3164pub const __EXPORT_GUARD_SIGNER_WALLET_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
3165    type_url: "type.googleapis.com/chain.guard.v1.ExportGuardSignerWalletRequest",
3166    to_json: ::buffa::type_registry::any_to_json::<ExportGuardSignerWalletRequest>,
3167    from_json: ::buffa::type_registry::any_from_json::<ExportGuardSignerWalletRequest>,
3168    is_wkt: false,
3169};
3170/// ExportGuardSignerWalletResponse returns the authorized high-risk wallet export.
3171#[derive(Clone, PartialEq, Default)]
3172#[derive(::serde::Serialize, ::serde::Deserialize)]
3173#[serde(default)]
3174pub struct ExportGuardSignerWalletResponse {
3175    /// Hex-encoded private key returned only after export authorization succeeds.
3176    ///
3177    /// Field 1: `private_key`
3178    #[serde(
3179        rename = "privateKey",
3180        alias = "private_key",
3181        with = "::buffa::json_helpers::proto_string",
3182        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
3183    )]
3184    pub private_key: ::buffa::alloc::string::String,
3185    #[serde(skip)]
3186    #[doc(hidden)]
3187    pub __buffa_unknown_fields: ::buffa::UnknownFields,
3188}
3189impl ::core::fmt::Debug for ExportGuardSignerWalletResponse {
3190    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3191        f.debug_struct("ExportGuardSignerWalletResponse")
3192            .field("private_key", &self.private_key)
3193            .finish()
3194    }
3195}
3196impl ExportGuardSignerWalletResponse {
3197    /// Protobuf type URL for this message, for use with `Any::pack` and
3198    /// `Any::unpack_if`.
3199    ///
3200    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
3201    pub const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.ExportGuardSignerWalletResponse";
3202}
3203::buffa::impl_default_instance!(ExportGuardSignerWalletResponse);
3204impl ::buffa::MessageName for ExportGuardSignerWalletResponse {
3205    const PACKAGE: &'static str = "chain.guard.v1";
3206    const NAME: &'static str = "ExportGuardSignerWalletResponse";
3207    const FULL_NAME: &'static str = "chain.guard.v1.ExportGuardSignerWalletResponse";
3208    const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.ExportGuardSignerWalletResponse";
3209}
3210impl ::buffa::Message for ExportGuardSignerWalletResponse {
3211    /// Returns the total encoded size in bytes.
3212    ///
3213    /// The result is a `u32`; the protobuf specification requires all
3214    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
3215    /// compliant message will never overflow this type.
3216    #[allow(clippy::let_and_return)]
3217    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
3218        #[allow(unused_imports)]
3219        use ::buffa::Enumeration as _;
3220        let mut size = 0u32;
3221        if !self.private_key.is_empty() {
3222            size += 1u32 + ::buffa::types::string_encoded_len(&self.private_key) as u32;
3223        }
3224        size += self.__buffa_unknown_fields.encoded_len() as u32;
3225        size
3226    }
3227    fn write_to(
3228        &self,
3229        _cache: &mut ::buffa::SizeCache,
3230        buf: &mut impl ::buffa::bytes::BufMut,
3231    ) {
3232        #[allow(unused_imports)]
3233        use ::buffa::Enumeration as _;
3234        if !self.private_key.is_empty() {
3235            ::buffa::types::put_string_field(1u32, &self.private_key, buf);
3236        }
3237        self.__buffa_unknown_fields.write_to(buf);
3238    }
3239    fn merge_field(
3240        &mut self,
3241        tag: ::buffa::encoding::Tag,
3242        buf: &mut impl ::buffa::bytes::Buf,
3243        ctx: ::buffa::DecodeContext<'_>,
3244    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
3245        #[allow(unused_imports)]
3246        use ::buffa::bytes::Buf as _;
3247        #[allow(unused_imports)]
3248        use ::buffa::Enumeration as _;
3249        match tag.field_number() {
3250            1u32 => {
3251                ::buffa::encoding::check_wire_type(
3252                    tag,
3253                    ::buffa::encoding::WireType::LengthDelimited,
3254                )?;
3255                ::buffa::types::merge_string(&mut self.private_key, buf)?;
3256            }
3257            _ => {
3258                self.__buffa_unknown_fields
3259                    .push(::buffa::encoding::decode_unknown_field(tag, buf, ctx)?);
3260            }
3261        }
3262        ::core::result::Result::Ok(())
3263    }
3264    fn clear(&mut self) {
3265        self.private_key.clear();
3266        self.__buffa_unknown_fields.clear();
3267    }
3268}
3269impl ::buffa::ExtensionSet for ExportGuardSignerWalletResponse {
3270    const PROTO_FQN: &'static str = "chain.guard.v1.ExportGuardSignerWalletResponse";
3271    fn unknown_fields(&self) -> &::buffa::UnknownFields {
3272        &self.__buffa_unknown_fields
3273    }
3274    fn unknown_fields_mut(&mut self) -> &mut ::buffa::UnknownFields {
3275        &mut self.__buffa_unknown_fields
3276    }
3277}
3278impl ::buffa::json_helpers::ProtoElemJson for ExportGuardSignerWalletResponse {
3279    fn serialize_proto_json<S: ::serde::Serializer>(
3280        v: &Self,
3281        s: S,
3282    ) -> ::core::result::Result<S::Ok, S::Error> {
3283        ::serde::Serialize::serialize(v, s)
3284    }
3285    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
3286        d: D,
3287    ) -> ::core::result::Result<Self, D::Error> {
3288        <Self as ::serde::Deserialize>::deserialize(d)
3289    }
3290}
3291#[doc(hidden)]
3292pub const __EXPORT_GUARD_SIGNER_WALLET_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
3293    type_url: "type.googleapis.com/chain.guard.v1.ExportGuardSignerWalletResponse",
3294    to_json: ::buffa::type_registry::any_to_json::<ExportGuardSignerWalletResponse>,
3295    from_json: ::buffa::type_registry::any_from_json::<ExportGuardSignerWalletResponse>,
3296    is_wkt: false,
3297};
3298#[allow(
3299    non_camel_case_types,
3300    dead_code,
3301    unused_imports,
3302    unused_qualifications,
3303    clippy::derivable_impls,
3304    clippy::match_single_binding,
3305    clippy::uninlined_format_args,
3306    clippy::doc_lazy_continuation,
3307    clippy::module_inception
3308)]
3309pub mod __buffa {
3310    #[allow(unused_imports)]
3311    use super::*;
3312    pub mod view {
3313        #[allow(unused_imports)]
3314        use super::*;
3315        /// GuardSignerStatus describes stored and live signer state for one account.
3316        #[derive(Clone, Debug, Default)]
3317        pub struct GuardSignerStatusView<'a> {
3318            /// Stored guard signer EVM address, if a wallet exists for the selected account.
3319            ///
3320            /// Field 1: `signer_address`
3321            pub signer_address: &'a str,
3322            /// Live on-chain signer value when chain reads are available.
3323            ///
3324            /// Field 2: `onchain_signer_address`
3325            pub onchain_signer_address: &'a str,
3326            /// True when the stored signer matches the live on-chain signer.
3327            ///
3328            /// Field 3: `initialized`
3329            pub initialized: bool,
3330            /// Current guard signer nonce for the default nonce space, encoded as a base-10 decimal string.
3331            ///
3332            /// Field 4: `nonce`
3333            pub nonce: &'a str,
3334            /// Default nonce space used for normal approvals.
3335            ///
3336            /// Field 5: `nonce_space`
3337            pub nonce_space: u64,
3338            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
3339        }
3340        impl<'a> ::buffa::MessageView<'a> for GuardSignerStatusView<'a> {
3341            type Owned = super::super::GuardSignerStatus;
3342            fn decode_view(
3343                buf: &'a [u8],
3344            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3345                let __limit = ::core::cell::Cell::new(
3346                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
3347                );
3348                <Self as ::buffa::MessageView>::decode_view_ctx(
3349                    buf,
3350                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
3351                )
3352            }
3353            fn decode_view_with_ctx(
3354                buf: &'a [u8],
3355                ctx: ::buffa::DecodeContext<'_>,
3356            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3357                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
3358            }
3359            fn merge_view_field(
3360                &mut self,
3361                tag: ::buffa::encoding::Tag,
3362                cur: &'a [u8],
3363                before_tag: &'a [u8],
3364                ctx: ::buffa::DecodeContext<'_>,
3365            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
3366                let _ = ctx;
3367                #[allow(unused_variables)]
3368                let view = self;
3369                let mut cur = cur;
3370                match tag.field_number() {
3371                    1u32 => {
3372                        ::buffa::encoding::check_wire_type(
3373                            tag,
3374                            ::buffa::encoding::WireType::LengthDelimited,
3375                        )?;
3376                        view.signer_address = ::buffa::types::borrow_str(&mut cur)?;
3377                    }
3378                    2u32 => {
3379                        ::buffa::encoding::check_wire_type(
3380                            tag,
3381                            ::buffa::encoding::WireType::LengthDelimited,
3382                        )?;
3383                        view.onchain_signer_address = ::buffa::types::borrow_str(
3384                            &mut cur,
3385                        )?;
3386                    }
3387                    3u32 => {
3388                        ::buffa::encoding::check_wire_type(
3389                            tag,
3390                            ::buffa::encoding::WireType::Varint,
3391                        )?;
3392                        view.initialized = ::buffa::types::decode_bool(&mut cur)?;
3393                    }
3394                    4u32 => {
3395                        ::buffa::encoding::check_wire_type(
3396                            tag,
3397                            ::buffa::encoding::WireType::LengthDelimited,
3398                        )?;
3399                        view.nonce = ::buffa::types::borrow_str(&mut cur)?;
3400                    }
3401                    5u32 => {
3402                        ::buffa::encoding::check_wire_type(
3403                            tag,
3404                            ::buffa::encoding::WireType::Varint,
3405                        )?;
3406                        view.nonce_space = ::buffa::types::decode_uint64(&mut cur)?;
3407                    }
3408                    _ => {
3409                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
3410                        let span_len = before_tag.len() - cur.len();
3411                        view.__buffa_unknown_fields
3412                            .push_record(before_tag, span_len, ctx)?;
3413                    }
3414                }
3415                ::core::result::Result::Ok(cur)
3416            }
3417            fn to_owned_message(
3418                &self,
3419            ) -> ::core::result::Result<
3420                super::super::GuardSignerStatus,
3421                ::buffa::DecodeError,
3422            > {
3423                self.to_owned_from_source(None)
3424            }
3425            #[allow(clippy::useless_conversion, clippy::needless_update)]
3426            fn to_owned_from_source(
3427                &self,
3428                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
3429            ) -> ::core::result::Result<
3430                super::super::GuardSignerStatus,
3431                ::buffa::DecodeError,
3432            > {
3433                #[allow(unused_imports)]
3434                use ::buffa::alloc::string::ToString as _;
3435                let _ = __buffa_src;
3436                ::core::result::Result::Ok(super::super::GuardSignerStatus {
3437                    signer_address: self.signer_address.to_string(),
3438                    onchain_signer_address: self.onchain_signer_address.to_string(),
3439                    initialized: self.initialized,
3440                    nonce: self.nonce.to_string(),
3441                    nonce_space: self.nonce_space,
3442                    __buffa_unknown_fields: self
3443                        .__buffa_unknown_fields
3444                        .to_owned()?
3445                        .into(),
3446                    ..::core::default::Default::default()
3447                })
3448            }
3449        }
3450        impl<'a> ::buffa::ViewEncode<'a> for GuardSignerStatusView<'a> {
3451            #[allow(clippy::needless_borrow, clippy::let_and_return)]
3452            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
3453                #[allow(unused_imports)]
3454                use ::buffa::Enumeration as _;
3455                let mut size = 0u32;
3456                if !self.signer_address.is_empty() {
3457                    size
3458                        += 1u32
3459                            + ::buffa::types::string_encoded_len(&self.signer_address)
3460                                as u32;
3461                }
3462                if !self.onchain_signer_address.is_empty() {
3463                    size
3464                        += 1u32
3465                            + ::buffa::types::string_encoded_len(
3466                                &self.onchain_signer_address,
3467                            ) as u32;
3468                }
3469                if self.initialized {
3470                    size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
3471                }
3472                if !self.nonce.is_empty() {
3473                    size
3474                        += 1u32 + ::buffa::types::string_encoded_len(&self.nonce) as u32;
3475                }
3476                if self.nonce_space != 0u64 {
3477                    size
3478                        += 1u32
3479                            + ::buffa::types::uint64_encoded_len(self.nonce_space)
3480                                as u32;
3481                }
3482                size += self.__buffa_unknown_fields.encoded_len() as u32;
3483                size
3484            }
3485            #[allow(clippy::needless_borrow)]
3486            fn write_to(
3487                &self,
3488                _cache: &mut ::buffa::SizeCache,
3489                buf: &mut impl ::buffa::bytes::BufMut,
3490            ) {
3491                #[allow(unused_imports)]
3492                use ::buffa::Enumeration as _;
3493                if !self.signer_address.is_empty() {
3494                    ::buffa::types::put_string_field(1u32, &self.signer_address, buf);
3495                }
3496                if !self.onchain_signer_address.is_empty() {
3497                    ::buffa::types::put_string_field(
3498                        2u32,
3499                        &self.onchain_signer_address,
3500                        buf,
3501                    );
3502                }
3503                if self.initialized {
3504                    ::buffa::types::put_bool_field(3u32, self.initialized, buf);
3505                }
3506                if !self.nonce.is_empty() {
3507                    ::buffa::types::put_string_field(4u32, &self.nonce, buf);
3508                }
3509                if self.nonce_space != 0u64 {
3510                    ::buffa::types::put_uint64_field(5u32, self.nonce_space, buf);
3511                }
3512                self.__buffa_unknown_fields.write_to(buf);
3513            }
3514        }
3515        /// Serializes this view as protobuf JSON.
3516        ///
3517        /// Implicit-presence fields with default values are omitted, `required`
3518        /// fields are always emitted, explicit-presence (`optional`) fields are
3519        /// emitted only when set, bytes fields are base64-encoded, and enum
3520        /// values are their proto name strings.
3521        ///
3522        /// This impl uses `serialize_map(None)` because the number of emitted
3523        /// fields depends on default-omission rules; serializers that require
3524        /// known map lengths (e.g. `bincode`) will return a runtime error.
3525        /// Use the owned message type for those formats.
3526        impl<'__a> ::serde::Serialize for GuardSignerStatusView<'__a> {
3527            fn serialize<__S: ::serde::Serializer>(
3528                &self,
3529                __s: __S,
3530            ) -> ::core::result::Result<__S::Ok, __S::Error> {
3531                use ::serde::ser::SerializeMap as _;
3532                let mut __map = __s.serialize_map(::core::option::Option::None)?;
3533                if !::buffa::json_helpers::skip_if::is_empty_str(self.signer_address) {
3534                    __map.serialize_entry("signerAddress", self.signer_address)?;
3535                }
3536                if !::buffa::json_helpers::skip_if::is_empty_str(
3537                    self.onchain_signer_address,
3538                ) {
3539                    __map
3540                        .serialize_entry(
3541                            "onchainSignerAddress",
3542                            self.onchain_signer_address,
3543                        )?;
3544                }
3545                if self.initialized {
3546                    __map.serialize_entry("initialized", &self.initialized)?;
3547                }
3548                if !::buffa::json_helpers::skip_if::is_empty_str(self.nonce) {
3549                    __map.serialize_entry("nonce", self.nonce)?;
3550                }
3551                if !::buffa::json_helpers::skip_if::is_zero_u64(&self.nonce_space) {
3552                    __map
3553                        .serialize_entry(
3554                            "nonceSpace",
3555                            &::buffa::json_helpers::ProtoJson(&self.nonce_space),
3556                        )?;
3557                }
3558                __map.end()
3559            }
3560        }
3561        impl<'a> ::buffa::MessageName for GuardSignerStatusView<'a> {
3562            const PACKAGE: &'static str = "chain.guard.v1";
3563            const NAME: &'static str = "GuardSignerStatus";
3564            const FULL_NAME: &'static str = "chain.guard.v1.GuardSignerStatus";
3565            const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.GuardSignerStatus";
3566        }
3567        ::buffa::impl_default_view_instance!(GuardSignerStatusView);
3568        ::buffa::impl_view_reborrow!(GuardSignerStatusView);
3569        /** Self-contained, `'static` owned view of a `GuardSignerStatus` message.
3570
3571 Wraps [`::buffa::OwnedView`]`<`[`GuardSignerStatusView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
3572
3573 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`GuardSignerStatusView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
3574        #[derive(Clone, Debug)]
3575        pub struct GuardSignerStatusOwnedView(
3576            ::buffa::OwnedView<GuardSignerStatusView<'static>>,
3577        );
3578        impl GuardSignerStatusOwnedView {
3579            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
3580            ///
3581            /// The view borrows directly from the buffer's data; the buffer is
3582            /// retained inside the returned handle.
3583            ///
3584            /// # Errors
3585            ///
3586            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
3587            /// protobuf data.
3588            pub fn decode(
3589                bytes: ::buffa::bytes::Bytes,
3590            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3591                ::core::result::Result::Ok(
3592                    GuardSignerStatusOwnedView(::buffa::OwnedView::decode(bytes)?),
3593                )
3594            }
3595            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
3596            /// max message size).
3597            ///
3598            /// # Errors
3599            ///
3600            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
3601            /// exceeds the configured limits.
3602            pub fn decode_with_options(
3603                bytes: ::buffa::bytes::Bytes,
3604                opts: &::buffa::DecodeOptions,
3605            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3606                ::core::result::Result::Ok(
3607                    GuardSignerStatusOwnedView(
3608                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
3609                    ),
3610                )
3611            }
3612            /// Build from an owned message via an encode → decode round-trip.
3613            ///
3614            /// # Errors
3615            ///
3616            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
3617            /// somehow invalid (should not happen for well-formed messages).
3618            pub fn from_owned(
3619                msg: &super::super::GuardSignerStatus,
3620            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3621                ::core::result::Result::Ok(
3622                    GuardSignerStatusOwnedView(::buffa::OwnedView::from_owned(msg)?),
3623                )
3624            }
3625            /// Borrow the full [`GuardSignerStatusView`] with its lifetime tied to `&self`.
3626            #[must_use]
3627            pub fn view(&self) -> &GuardSignerStatusView<'_> {
3628                self.0.reborrow()
3629            }
3630            /// Convert to the owned message type.
3631            ///
3632            /// # Errors
3633            ///
3634            /// Returns an error if re-materializing preserved unknown fields
3635            /// fails (e.g. the unknown-field limit is exceeded).
3636            pub fn to_owned_message(
3637                &self,
3638            ) -> ::core::result::Result<
3639                super::super::GuardSignerStatus,
3640                ::buffa::DecodeError,
3641            > {
3642                self.0.to_owned_message()
3643            }
3644            /// The underlying bytes buffer.
3645            #[must_use]
3646            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
3647                self.0.bytes()
3648            }
3649            /// Consume the handle, returning the underlying bytes buffer.
3650            #[must_use]
3651            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
3652                self.0.into_bytes()
3653            }
3654            /// Stored guard signer EVM address, if a wallet exists for the selected account.
3655            ///
3656            /// Field 1: `signer_address`
3657            #[must_use]
3658            pub fn signer_address(&self) -> &'_ str {
3659                self.0.reborrow().signer_address
3660            }
3661            /// Live on-chain signer value when chain reads are available.
3662            ///
3663            /// Field 2: `onchain_signer_address`
3664            #[must_use]
3665            pub fn onchain_signer_address(&self) -> &'_ str {
3666                self.0.reborrow().onchain_signer_address
3667            }
3668            /// True when the stored signer matches the live on-chain signer.
3669            ///
3670            /// Field 3: `initialized`
3671            #[must_use]
3672            pub fn initialized(&self) -> bool {
3673                self.0.reborrow().initialized
3674            }
3675            /// Current guard signer nonce for the default nonce space, encoded as a base-10 decimal string.
3676            ///
3677            /// Field 4: `nonce`
3678            #[must_use]
3679            pub fn nonce(&self) -> &'_ str {
3680                self.0.reborrow().nonce
3681            }
3682            /// Default nonce space used for normal approvals.
3683            ///
3684            /// Field 5: `nonce_space`
3685            #[must_use]
3686            pub fn nonce_space(&self) -> u64 {
3687                self.0.reborrow().nonce_space
3688            }
3689        }
3690        impl ::core::convert::From<::buffa::OwnedView<GuardSignerStatusView<'static>>>
3691        for GuardSignerStatusOwnedView {
3692            fn from(inner: ::buffa::OwnedView<GuardSignerStatusView<'static>>) -> Self {
3693                GuardSignerStatusOwnedView(inner)
3694            }
3695        }
3696        impl ::core::convert::From<GuardSignerStatusOwnedView>
3697        for ::buffa::OwnedView<GuardSignerStatusView<'static>> {
3698            fn from(wrapper: GuardSignerStatusOwnedView) -> Self {
3699                wrapper.0
3700            }
3701        }
3702        impl ::core::convert::AsRef<::buffa::OwnedView<GuardSignerStatusView<'static>>>
3703        for GuardSignerStatusOwnedView {
3704            fn as_ref(&self) -> &::buffa::OwnedView<GuardSignerStatusView<'static>> {
3705                &self.0
3706            }
3707        }
3708        impl ::buffa::HasMessageView for super::super::GuardSignerStatus {
3709            type View<'a> = GuardSignerStatusView<'a>;
3710            type ViewHandle = GuardSignerStatusOwnedView;
3711        }
3712        impl ::serde::Serialize for GuardSignerStatusOwnedView {
3713            fn serialize<__S: ::serde::Serializer>(
3714                &self,
3715                __s: __S,
3716            ) -> ::core::result::Result<__S::Ok, __S::Error> {
3717                ::serde::Serialize::serialize(&self.0, __s)
3718            }
3719        }
3720        /// GuardApproval is the exact approval payload clients submit to protected
3721        /// contract calls.
3722        #[derive(Clone, Debug, Default)]
3723        pub struct GuardApprovalView<'a> {
3724            /// Nonce space used for the signed approval. Normal flows use 0.
3725            ///
3726            /// Field 1: `nonce_space`
3727            pub nonce_space: u64,
3728            /// Deadline as a unix timestamp in seconds, derived from chain time.
3729            ///
3730            /// Field 2: `deadline_unix`
3731            pub deadline_unix: u64,
3732            /// EIP-712 signature over the guard approval message.
3733            ///
3734            /// Field 3: `signature`
3735            pub signature: &'a [u8],
3736            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
3737        }
3738        impl<'a> ::buffa::MessageView<'a> for GuardApprovalView<'a> {
3739            type Owned = super::super::GuardApproval;
3740            fn decode_view(
3741                buf: &'a [u8],
3742            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3743                let __limit = ::core::cell::Cell::new(
3744                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
3745                );
3746                <Self as ::buffa::MessageView>::decode_view_ctx(
3747                    buf,
3748                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
3749                )
3750            }
3751            fn decode_view_with_ctx(
3752                buf: &'a [u8],
3753                ctx: ::buffa::DecodeContext<'_>,
3754            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3755                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
3756            }
3757            fn merge_view_field(
3758                &mut self,
3759                tag: ::buffa::encoding::Tag,
3760                cur: &'a [u8],
3761                before_tag: &'a [u8],
3762                ctx: ::buffa::DecodeContext<'_>,
3763            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
3764                let _ = ctx;
3765                #[allow(unused_variables)]
3766                let view = self;
3767                let mut cur = cur;
3768                match tag.field_number() {
3769                    1u32 => {
3770                        ::buffa::encoding::check_wire_type(
3771                            tag,
3772                            ::buffa::encoding::WireType::Varint,
3773                        )?;
3774                        view.nonce_space = ::buffa::types::decode_uint64(&mut cur)?;
3775                    }
3776                    2u32 => {
3777                        ::buffa::encoding::check_wire_type(
3778                            tag,
3779                            ::buffa::encoding::WireType::Varint,
3780                        )?;
3781                        view.deadline_unix = ::buffa::types::decode_uint64(&mut cur)?;
3782                    }
3783                    3u32 => {
3784                        ::buffa::encoding::check_wire_type(
3785                            tag,
3786                            ::buffa::encoding::WireType::LengthDelimited,
3787                        )?;
3788                        view.signature = ::buffa::types::borrow_bytes(&mut cur)?;
3789                    }
3790                    _ => {
3791                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
3792                        let span_len = before_tag.len() - cur.len();
3793                        view.__buffa_unknown_fields
3794                            .push_record(before_tag, span_len, ctx)?;
3795                    }
3796                }
3797                ::core::result::Result::Ok(cur)
3798            }
3799            fn to_owned_message(
3800                &self,
3801            ) -> ::core::result::Result<
3802                super::super::GuardApproval,
3803                ::buffa::DecodeError,
3804            > {
3805                self.to_owned_from_source(None)
3806            }
3807            #[allow(clippy::useless_conversion, clippy::needless_update)]
3808            fn to_owned_from_source(
3809                &self,
3810                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
3811            ) -> ::core::result::Result<
3812                super::super::GuardApproval,
3813                ::buffa::DecodeError,
3814            > {
3815                #[allow(unused_imports)]
3816                use ::buffa::alloc::string::ToString as _;
3817                let _ = __buffa_src;
3818                ::core::result::Result::Ok(super::super::GuardApproval {
3819                    nonce_space: self.nonce_space,
3820                    deadline_unix: self.deadline_unix,
3821                    signature: (self.signature).to_vec(),
3822                    __buffa_unknown_fields: self
3823                        .__buffa_unknown_fields
3824                        .to_owned()?
3825                        .into(),
3826                    ..::core::default::Default::default()
3827                })
3828            }
3829        }
3830        impl<'a> ::buffa::ViewEncode<'a> for GuardApprovalView<'a> {
3831            #[allow(clippy::needless_borrow, clippy::let_and_return)]
3832            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
3833                #[allow(unused_imports)]
3834                use ::buffa::Enumeration as _;
3835                let mut size = 0u32;
3836                if self.nonce_space != 0u64 {
3837                    size
3838                        += 1u32
3839                            + ::buffa::types::uint64_encoded_len(self.nonce_space)
3840                                as u32;
3841                }
3842                if self.deadline_unix != 0u64 {
3843                    size
3844                        += 1u32
3845                            + ::buffa::types::uint64_encoded_len(self.deadline_unix)
3846                                as u32;
3847                }
3848                if !self.signature.is_empty() {
3849                    size
3850                        += 1u32
3851                            + ::buffa::types::bytes_encoded_len(&self.signature) as u32;
3852                }
3853                size += self.__buffa_unknown_fields.encoded_len() as u32;
3854                size
3855            }
3856            #[allow(clippy::needless_borrow)]
3857            fn write_to(
3858                &self,
3859                _cache: &mut ::buffa::SizeCache,
3860                buf: &mut impl ::buffa::bytes::BufMut,
3861            ) {
3862                #[allow(unused_imports)]
3863                use ::buffa::Enumeration as _;
3864                if self.nonce_space != 0u64 {
3865                    ::buffa::types::put_uint64_field(1u32, self.nonce_space, buf);
3866                }
3867                if self.deadline_unix != 0u64 {
3868                    ::buffa::types::put_uint64_field(2u32, self.deadline_unix, buf);
3869                }
3870                if !self.signature.is_empty() {
3871                    ::buffa::types::put_bytes_field(3u32, &self.signature, buf);
3872                }
3873                self.__buffa_unknown_fields.write_to(buf);
3874            }
3875        }
3876        /// Serializes this view as protobuf JSON.
3877        ///
3878        /// Implicit-presence fields with default values are omitted, `required`
3879        /// fields are always emitted, explicit-presence (`optional`) fields are
3880        /// emitted only when set, bytes fields are base64-encoded, and enum
3881        /// values are their proto name strings.
3882        ///
3883        /// This impl uses `serialize_map(None)` because the number of emitted
3884        /// fields depends on default-omission rules; serializers that require
3885        /// known map lengths (e.g. `bincode`) will return a runtime error.
3886        /// Use the owned message type for those formats.
3887        impl<'__a> ::serde::Serialize for GuardApprovalView<'__a> {
3888            fn serialize<__S: ::serde::Serializer>(
3889                &self,
3890                __s: __S,
3891            ) -> ::core::result::Result<__S::Ok, __S::Error> {
3892                use ::serde::ser::SerializeMap as _;
3893                let mut __map = __s.serialize_map(::core::option::Option::None)?;
3894                if !::buffa::json_helpers::skip_if::is_zero_u64(&self.nonce_space) {
3895                    __map
3896                        .serialize_entry(
3897                            "nonceSpace",
3898                            &::buffa::json_helpers::ProtoJson(&self.nonce_space),
3899                        )?;
3900                }
3901                if !::buffa::json_helpers::skip_if::is_zero_u64(&self.deadline_unix) {
3902                    __map
3903                        .serialize_entry(
3904                            "deadlineUnix",
3905                            &::buffa::json_helpers::ProtoJson(&self.deadline_unix),
3906                        )?;
3907                }
3908                if !::buffa::json_helpers::skip_if::is_empty_bytes(self.signature) {
3909                    __map
3910                        .serialize_entry(
3911                            "signature",
3912                            &::buffa::json_helpers::BytesJson(self.signature),
3913                        )?;
3914                }
3915                __map.end()
3916            }
3917        }
3918        impl<'a> ::buffa::MessageName for GuardApprovalView<'a> {
3919            const PACKAGE: &'static str = "chain.guard.v1";
3920            const NAME: &'static str = "GuardApproval";
3921            const FULL_NAME: &'static str = "chain.guard.v1.GuardApproval";
3922            const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.GuardApproval";
3923        }
3924        ::buffa::impl_default_view_instance!(GuardApprovalView);
3925        ::buffa::impl_view_reborrow!(GuardApprovalView);
3926        /** Self-contained, `'static` owned view of a `GuardApproval` message.
3927
3928 Wraps [`::buffa::OwnedView`]`<`[`GuardApprovalView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
3929
3930 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`GuardApprovalView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
3931        #[derive(Clone, Debug)]
3932        pub struct GuardApprovalOwnedView(
3933            ::buffa::OwnedView<GuardApprovalView<'static>>,
3934        );
3935        impl GuardApprovalOwnedView {
3936            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
3937            ///
3938            /// The view borrows directly from the buffer's data; the buffer is
3939            /// retained inside the returned handle.
3940            ///
3941            /// # Errors
3942            ///
3943            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
3944            /// protobuf data.
3945            pub fn decode(
3946                bytes: ::buffa::bytes::Bytes,
3947            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3948                ::core::result::Result::Ok(
3949                    GuardApprovalOwnedView(::buffa::OwnedView::decode(bytes)?),
3950                )
3951            }
3952            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
3953            /// max message size).
3954            ///
3955            /// # Errors
3956            ///
3957            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
3958            /// exceeds the configured limits.
3959            pub fn decode_with_options(
3960                bytes: ::buffa::bytes::Bytes,
3961                opts: &::buffa::DecodeOptions,
3962            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3963                ::core::result::Result::Ok(
3964                    GuardApprovalOwnedView(
3965                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
3966                    ),
3967                )
3968            }
3969            /// Build from an owned message via an encode → decode round-trip.
3970            ///
3971            /// # Errors
3972            ///
3973            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
3974            /// somehow invalid (should not happen for well-formed messages).
3975            pub fn from_owned(
3976                msg: &super::super::GuardApproval,
3977            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
3978                ::core::result::Result::Ok(
3979                    GuardApprovalOwnedView(::buffa::OwnedView::from_owned(msg)?),
3980                )
3981            }
3982            /// Borrow the full [`GuardApprovalView`] with its lifetime tied to `&self`.
3983            #[must_use]
3984            pub fn view(&self) -> &GuardApprovalView<'_> {
3985                self.0.reborrow()
3986            }
3987            /// Convert to the owned message type.
3988            ///
3989            /// # Errors
3990            ///
3991            /// Returns an error if re-materializing preserved unknown fields
3992            /// fails (e.g. the unknown-field limit is exceeded).
3993            pub fn to_owned_message(
3994                &self,
3995            ) -> ::core::result::Result<
3996                super::super::GuardApproval,
3997                ::buffa::DecodeError,
3998            > {
3999                self.0.to_owned_message()
4000            }
4001            /// The underlying bytes buffer.
4002            #[must_use]
4003            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
4004                self.0.bytes()
4005            }
4006            /// Consume the handle, returning the underlying bytes buffer.
4007            #[must_use]
4008            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
4009                self.0.into_bytes()
4010            }
4011            /// Nonce space used for the signed approval. Normal flows use 0.
4012            ///
4013            /// Field 1: `nonce_space`
4014            #[must_use]
4015            pub fn nonce_space(&self) -> u64 {
4016                self.0.reborrow().nonce_space
4017            }
4018            /// Deadline as a unix timestamp in seconds, derived from chain time.
4019            ///
4020            /// Field 2: `deadline_unix`
4021            #[must_use]
4022            pub fn deadline_unix(&self) -> u64 {
4023                self.0.reborrow().deadline_unix
4024            }
4025            /// EIP-712 signature over the guard approval message.
4026            ///
4027            /// Field 3: `signature`
4028            #[must_use]
4029            pub fn signature(&self) -> &'_ [u8] {
4030                self.0.reborrow().signature
4031            }
4032        }
4033        impl ::core::convert::From<::buffa::OwnedView<GuardApprovalView<'static>>>
4034        for GuardApprovalOwnedView {
4035            fn from(inner: ::buffa::OwnedView<GuardApprovalView<'static>>) -> Self {
4036                GuardApprovalOwnedView(inner)
4037            }
4038        }
4039        impl ::core::convert::From<GuardApprovalOwnedView>
4040        for ::buffa::OwnedView<GuardApprovalView<'static>> {
4041            fn from(wrapper: GuardApprovalOwnedView) -> Self {
4042                wrapper.0
4043            }
4044        }
4045        impl ::core::convert::AsRef<::buffa::OwnedView<GuardApprovalView<'static>>>
4046        for GuardApprovalOwnedView {
4047            fn as_ref(&self) -> &::buffa::OwnedView<GuardApprovalView<'static>> {
4048                &self.0
4049            }
4050        }
4051        impl ::buffa::HasMessageView for super::super::GuardApproval {
4052            type View<'a> = GuardApprovalView<'a>;
4053            type ViewHandle = GuardApprovalOwnedView;
4054        }
4055        impl ::serde::Serialize for GuardApprovalOwnedView {
4056            fn serialize<__S: ::serde::Serializer>(
4057                &self,
4058                __s: __S,
4059            ) -> ::core::result::Result<__S::Ok, __S::Error> {
4060                ::serde::Serialize::serialize(&self.0, __s)
4061            }
4062        }
4063        /// ExternalWhitelistArgs contains the final external-chain destination bytes for
4064        /// whitelist updates. For EVM destinations, callers should pass the same
4065        /// string-encoded normalized address bytes used in WithdrawRequest.to, e.g.
4066        /// stringToHex(address.toLowerCase()), not raw address bytes.
4067        #[derive(Clone, Debug, Default)]
4068        pub struct ExternalWhitelistArgsView<'a> {
4069            /// External network identifier for the whitelist update.
4070            ///
4071            /// Field 1: `polychain_chain_id`
4072            pub polychain_chain_id: u32,
4073            /// Hex-encoded destination payloads to add or remove. Each value must be 0x-prefixed bytes.
4074            ///
4075            /// Field 2: `addresses`
4076            pub addresses: ::buffa::RepeatedView<'a, &'a str>,
4077            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
4078        }
4079        impl<'a> ::buffa::MessageView<'a> for ExternalWhitelistArgsView<'a> {
4080            type Owned = super::super::ExternalWhitelistArgs;
4081            fn decode_view(
4082                buf: &'a [u8],
4083            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4084                let __limit = ::core::cell::Cell::new(
4085                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
4086                );
4087                <Self as ::buffa::MessageView>::decode_view_ctx(
4088                    buf,
4089                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
4090                )
4091            }
4092            fn decode_view_with_ctx(
4093                buf: &'a [u8],
4094                ctx: ::buffa::DecodeContext<'_>,
4095            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4096                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
4097            }
4098            fn merge_view_field(
4099                &mut self,
4100                tag: ::buffa::encoding::Tag,
4101                cur: &'a [u8],
4102                before_tag: &'a [u8],
4103                ctx: ::buffa::DecodeContext<'_>,
4104            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
4105                let _ = ctx;
4106                #[allow(unused_variables)]
4107                let view = self;
4108                let mut cur = cur;
4109                match tag.field_number() {
4110                    1u32 => {
4111                        ::buffa::encoding::check_wire_type(
4112                            tag,
4113                            ::buffa::encoding::WireType::Varint,
4114                        )?;
4115                        view.polychain_chain_id = ::buffa::types::decode_uint32(
4116                            &mut cur,
4117                        )?;
4118                    }
4119                    2u32 => {
4120                        ::buffa::encoding::check_wire_type(
4121                            tag,
4122                            ::buffa::encoding::WireType::LengthDelimited,
4123                        )?;
4124                        view.addresses.push(::buffa::types::borrow_str(&mut cur)?);
4125                    }
4126                    _ => {
4127                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
4128                        let span_len = before_tag.len() - cur.len();
4129                        view.__buffa_unknown_fields
4130                            .push_record(before_tag, span_len, ctx)?;
4131                    }
4132                }
4133                ::core::result::Result::Ok(cur)
4134            }
4135            fn to_owned_message(
4136                &self,
4137            ) -> ::core::result::Result<
4138                super::super::ExternalWhitelistArgs,
4139                ::buffa::DecodeError,
4140            > {
4141                self.to_owned_from_source(None)
4142            }
4143            #[allow(clippy::useless_conversion, clippy::needless_update)]
4144            fn to_owned_from_source(
4145                &self,
4146                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
4147            ) -> ::core::result::Result<
4148                super::super::ExternalWhitelistArgs,
4149                ::buffa::DecodeError,
4150            > {
4151                #[allow(unused_imports)]
4152                use ::buffa::alloc::string::ToString as _;
4153                let _ = __buffa_src;
4154                ::core::result::Result::Ok(super::super::ExternalWhitelistArgs {
4155                    polychain_chain_id: self.polychain_chain_id,
4156                    addresses: self.addresses.iter().map(|s| s.to_string()).collect(),
4157                    __buffa_unknown_fields: self
4158                        .__buffa_unknown_fields
4159                        .to_owned()?
4160                        .into(),
4161                    ..::core::default::Default::default()
4162                })
4163            }
4164        }
4165        impl<'a> ::buffa::ViewEncode<'a> for ExternalWhitelistArgsView<'a> {
4166            #[allow(clippy::needless_borrow, clippy::let_and_return)]
4167            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
4168                #[allow(unused_imports)]
4169                use ::buffa::Enumeration as _;
4170                let mut size = 0u32;
4171                if self.polychain_chain_id != 0u32 {
4172                    size
4173                        += 1u32
4174                            + ::buffa::types::uint32_encoded_len(self.polychain_chain_id)
4175                                as u32;
4176                }
4177                for v in &self.addresses {
4178                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
4179                }
4180                size += self.__buffa_unknown_fields.encoded_len() as u32;
4181                size
4182            }
4183            #[allow(clippy::needless_borrow)]
4184            fn write_to(
4185                &self,
4186                _cache: &mut ::buffa::SizeCache,
4187                buf: &mut impl ::buffa::bytes::BufMut,
4188            ) {
4189                #[allow(unused_imports)]
4190                use ::buffa::Enumeration as _;
4191                if self.polychain_chain_id != 0u32 {
4192                    ::buffa::types::put_uint32_field(1u32, self.polychain_chain_id, buf);
4193                }
4194                for v in &self.addresses {
4195                    ::buffa::types::put_string_field(2u32, v, buf);
4196                }
4197                self.__buffa_unknown_fields.write_to(buf);
4198            }
4199        }
4200        /// Serializes this view as protobuf JSON.
4201        ///
4202        /// Implicit-presence fields with default values are omitted, `required`
4203        /// fields are always emitted, explicit-presence (`optional`) fields are
4204        /// emitted only when set, bytes fields are base64-encoded, and enum
4205        /// values are their proto name strings.
4206        ///
4207        /// This impl uses `serialize_map(None)` because the number of emitted
4208        /// fields depends on default-omission rules; serializers that require
4209        /// known map lengths (e.g. `bincode`) will return a runtime error.
4210        /// Use the owned message type for those formats.
4211        impl<'__a> ::serde::Serialize for ExternalWhitelistArgsView<'__a> {
4212            fn serialize<__S: ::serde::Serializer>(
4213                &self,
4214                __s: __S,
4215            ) -> ::core::result::Result<__S::Ok, __S::Error> {
4216                use ::serde::ser::SerializeMap as _;
4217                let mut __map = __s.serialize_map(::core::option::Option::None)?;
4218                if !::buffa::json_helpers::skip_if::is_zero_u32(
4219                    &self.polychain_chain_id,
4220                ) {
4221                    __map
4222                        .serialize_entry(
4223                            "polychainChainId",
4224                            &::buffa::json_helpers::ProtoJson(&self.polychain_chain_id),
4225                        )?;
4226                }
4227                if !self.addresses.is_empty() {
4228                    __map.serialize_entry("addresses", &*self.addresses)?;
4229                }
4230                __map.end()
4231            }
4232        }
4233        impl<'a> ::buffa::MessageName for ExternalWhitelistArgsView<'a> {
4234            const PACKAGE: &'static str = "chain.guard.v1";
4235            const NAME: &'static str = "ExternalWhitelistArgs";
4236            const FULL_NAME: &'static str = "chain.guard.v1.ExternalWhitelistArgs";
4237            const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.ExternalWhitelistArgs";
4238        }
4239        ::buffa::impl_default_view_instance!(ExternalWhitelistArgsView);
4240        ::buffa::impl_view_reborrow!(ExternalWhitelistArgsView);
4241        /** Self-contained, `'static` owned view of a `ExternalWhitelistArgs` message.
4242
4243 Wraps [`::buffa::OwnedView`]`<`[`ExternalWhitelistArgsView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
4244
4245 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`ExternalWhitelistArgsView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
4246        #[derive(Clone, Debug)]
4247        pub struct ExternalWhitelistArgsOwnedView(
4248            ::buffa::OwnedView<ExternalWhitelistArgsView<'static>>,
4249        );
4250        impl ExternalWhitelistArgsOwnedView {
4251            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
4252            ///
4253            /// The view borrows directly from the buffer's data; the buffer is
4254            /// retained inside the returned handle.
4255            ///
4256            /// # Errors
4257            ///
4258            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
4259            /// protobuf data.
4260            pub fn decode(
4261                bytes: ::buffa::bytes::Bytes,
4262            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4263                ::core::result::Result::Ok(
4264                    ExternalWhitelistArgsOwnedView(::buffa::OwnedView::decode(bytes)?),
4265                )
4266            }
4267            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
4268            /// max message size).
4269            ///
4270            /// # Errors
4271            ///
4272            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
4273            /// exceeds the configured limits.
4274            pub fn decode_with_options(
4275                bytes: ::buffa::bytes::Bytes,
4276                opts: &::buffa::DecodeOptions,
4277            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4278                ::core::result::Result::Ok(
4279                    ExternalWhitelistArgsOwnedView(
4280                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
4281                    ),
4282                )
4283            }
4284            /// Build from an owned message via an encode → decode round-trip.
4285            ///
4286            /// # Errors
4287            ///
4288            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
4289            /// somehow invalid (should not happen for well-formed messages).
4290            pub fn from_owned(
4291                msg: &super::super::ExternalWhitelistArgs,
4292            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4293                ::core::result::Result::Ok(
4294                    ExternalWhitelistArgsOwnedView(::buffa::OwnedView::from_owned(msg)?),
4295                )
4296            }
4297            /// Borrow the full [`ExternalWhitelistArgsView`] with its lifetime tied to `&self`.
4298            #[must_use]
4299            pub fn view(&self) -> &ExternalWhitelistArgsView<'_> {
4300                self.0.reborrow()
4301            }
4302            /// Convert to the owned message type.
4303            ///
4304            /// # Errors
4305            ///
4306            /// Returns an error if re-materializing preserved unknown fields
4307            /// fails (e.g. the unknown-field limit is exceeded).
4308            pub fn to_owned_message(
4309                &self,
4310            ) -> ::core::result::Result<
4311                super::super::ExternalWhitelistArgs,
4312                ::buffa::DecodeError,
4313            > {
4314                self.0.to_owned_message()
4315            }
4316            /// The underlying bytes buffer.
4317            #[must_use]
4318            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
4319                self.0.bytes()
4320            }
4321            /// Consume the handle, returning the underlying bytes buffer.
4322            #[must_use]
4323            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
4324                self.0.into_bytes()
4325            }
4326            /// External network identifier for the whitelist update.
4327            ///
4328            /// Field 1: `polychain_chain_id`
4329            #[must_use]
4330            pub fn polychain_chain_id(&self) -> u32 {
4331                self.0.reborrow().polychain_chain_id
4332            }
4333            /// Hex-encoded destination payloads to add or remove. Each value must be 0x-prefixed bytes.
4334            ///
4335            /// Field 2: `addresses`
4336            #[must_use]
4337            pub fn addresses(&self) -> &::buffa::RepeatedView<'_, &'_ str> {
4338                &self.0.reborrow().addresses
4339            }
4340        }
4341        impl ::core::convert::From<
4342            ::buffa::OwnedView<ExternalWhitelistArgsView<'static>>,
4343        > for ExternalWhitelistArgsOwnedView {
4344            fn from(
4345                inner: ::buffa::OwnedView<ExternalWhitelistArgsView<'static>>,
4346            ) -> Self {
4347                ExternalWhitelistArgsOwnedView(inner)
4348            }
4349        }
4350        impl ::core::convert::From<ExternalWhitelistArgsOwnedView>
4351        for ::buffa::OwnedView<ExternalWhitelistArgsView<'static>> {
4352            fn from(wrapper: ExternalWhitelistArgsOwnedView) -> Self {
4353                wrapper.0
4354            }
4355        }
4356        impl ::core::convert::AsRef<
4357            ::buffa::OwnedView<ExternalWhitelistArgsView<'static>>,
4358        > for ExternalWhitelistArgsOwnedView {
4359            fn as_ref(&self) -> &::buffa::OwnedView<ExternalWhitelistArgsView<'static>> {
4360                &self.0
4361            }
4362        }
4363        impl ::buffa::HasMessageView for super::super::ExternalWhitelistArgs {
4364            type View<'a> = ExternalWhitelistArgsView<'a>;
4365            type ViewHandle = ExternalWhitelistArgsOwnedView;
4366        }
4367        impl ::serde::Serialize for ExternalWhitelistArgsOwnedView {
4368            fn serialize<__S: ::serde::Serializer>(
4369                &self,
4370                __s: __S,
4371            ) -> ::core::result::Result<__S::Ok, __S::Error> {
4372                ::serde::Serialize::serialize(&self.0, __s)
4373            }
4374        }
4375        /// InternalWhitelistArgs contains EVM account addresses for internal whitelist
4376        /// updates.
4377        #[derive(Clone, Debug, Default)]
4378        pub struct InternalWhitelistArgsView<'a> {
4379            /// EVM account addresses to add or remove from the internal transfer whitelist.
4380            ///
4381            /// Field 1: `addresses`
4382            pub addresses: ::buffa::RepeatedView<'a, &'a str>,
4383            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
4384        }
4385        impl<'a> ::buffa::MessageView<'a> for InternalWhitelistArgsView<'a> {
4386            type Owned = super::super::InternalWhitelistArgs;
4387            fn decode_view(
4388                buf: &'a [u8],
4389            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4390                let __limit = ::core::cell::Cell::new(
4391                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
4392                );
4393                <Self as ::buffa::MessageView>::decode_view_ctx(
4394                    buf,
4395                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
4396                )
4397            }
4398            fn decode_view_with_ctx(
4399                buf: &'a [u8],
4400                ctx: ::buffa::DecodeContext<'_>,
4401            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4402                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
4403            }
4404            fn merge_view_field(
4405                &mut self,
4406                tag: ::buffa::encoding::Tag,
4407                cur: &'a [u8],
4408                before_tag: &'a [u8],
4409                ctx: ::buffa::DecodeContext<'_>,
4410            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
4411                let _ = ctx;
4412                #[allow(unused_variables)]
4413                let view = self;
4414                let mut cur = cur;
4415                match tag.field_number() {
4416                    1u32 => {
4417                        ::buffa::encoding::check_wire_type(
4418                            tag,
4419                            ::buffa::encoding::WireType::LengthDelimited,
4420                        )?;
4421                        view.addresses.push(::buffa::types::borrow_str(&mut cur)?);
4422                    }
4423                    _ => {
4424                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
4425                        let span_len = before_tag.len() - cur.len();
4426                        view.__buffa_unknown_fields
4427                            .push_record(before_tag, span_len, ctx)?;
4428                    }
4429                }
4430                ::core::result::Result::Ok(cur)
4431            }
4432            fn to_owned_message(
4433                &self,
4434            ) -> ::core::result::Result<
4435                super::super::InternalWhitelistArgs,
4436                ::buffa::DecodeError,
4437            > {
4438                self.to_owned_from_source(None)
4439            }
4440            #[allow(clippy::useless_conversion, clippy::needless_update)]
4441            fn to_owned_from_source(
4442                &self,
4443                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
4444            ) -> ::core::result::Result<
4445                super::super::InternalWhitelistArgs,
4446                ::buffa::DecodeError,
4447            > {
4448                #[allow(unused_imports)]
4449                use ::buffa::alloc::string::ToString as _;
4450                let _ = __buffa_src;
4451                ::core::result::Result::Ok(super::super::InternalWhitelistArgs {
4452                    addresses: self.addresses.iter().map(|s| s.to_string()).collect(),
4453                    __buffa_unknown_fields: self
4454                        .__buffa_unknown_fields
4455                        .to_owned()?
4456                        .into(),
4457                    ..::core::default::Default::default()
4458                })
4459            }
4460        }
4461        impl<'a> ::buffa::ViewEncode<'a> for InternalWhitelistArgsView<'a> {
4462            #[allow(clippy::needless_borrow, clippy::let_and_return)]
4463            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
4464                #[allow(unused_imports)]
4465                use ::buffa::Enumeration as _;
4466                let mut size = 0u32;
4467                for v in &self.addresses {
4468                    size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
4469                }
4470                size += self.__buffa_unknown_fields.encoded_len() as u32;
4471                size
4472            }
4473            #[allow(clippy::needless_borrow)]
4474            fn write_to(
4475                &self,
4476                _cache: &mut ::buffa::SizeCache,
4477                buf: &mut impl ::buffa::bytes::BufMut,
4478            ) {
4479                #[allow(unused_imports)]
4480                use ::buffa::Enumeration as _;
4481                for v in &self.addresses {
4482                    ::buffa::types::put_string_field(1u32, v, buf);
4483                }
4484                self.__buffa_unknown_fields.write_to(buf);
4485            }
4486        }
4487        /// Serializes this view as protobuf JSON.
4488        ///
4489        /// Implicit-presence fields with default values are omitted, `required`
4490        /// fields are always emitted, explicit-presence (`optional`) fields are
4491        /// emitted only when set, bytes fields are base64-encoded, and enum
4492        /// values are their proto name strings.
4493        ///
4494        /// This impl uses `serialize_map(None)` because the number of emitted
4495        /// fields depends on default-omission rules; serializers that require
4496        /// known map lengths (e.g. `bincode`) will return a runtime error.
4497        /// Use the owned message type for those formats.
4498        impl<'__a> ::serde::Serialize for InternalWhitelistArgsView<'__a> {
4499            fn serialize<__S: ::serde::Serializer>(
4500                &self,
4501                __s: __S,
4502            ) -> ::core::result::Result<__S::Ok, __S::Error> {
4503                use ::serde::ser::SerializeMap as _;
4504                let mut __map = __s.serialize_map(::core::option::Option::None)?;
4505                if !self.addresses.is_empty() {
4506                    __map.serialize_entry("addresses", &*self.addresses)?;
4507                }
4508                __map.end()
4509            }
4510        }
4511        impl<'a> ::buffa::MessageName for InternalWhitelistArgsView<'a> {
4512            const PACKAGE: &'static str = "chain.guard.v1";
4513            const NAME: &'static str = "InternalWhitelistArgs";
4514            const FULL_NAME: &'static str = "chain.guard.v1.InternalWhitelistArgs";
4515            const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.InternalWhitelistArgs";
4516        }
4517        ::buffa::impl_default_view_instance!(InternalWhitelistArgsView);
4518        ::buffa::impl_view_reborrow!(InternalWhitelistArgsView);
4519        /** Self-contained, `'static` owned view of a `InternalWhitelistArgs` message.
4520
4521 Wraps [`::buffa::OwnedView`]`<`[`InternalWhitelistArgsView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
4522
4523 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`InternalWhitelistArgsView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
4524        #[derive(Clone, Debug)]
4525        pub struct InternalWhitelistArgsOwnedView(
4526            ::buffa::OwnedView<InternalWhitelistArgsView<'static>>,
4527        );
4528        impl InternalWhitelistArgsOwnedView {
4529            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
4530            ///
4531            /// The view borrows directly from the buffer's data; the buffer is
4532            /// retained inside the returned handle.
4533            ///
4534            /// # Errors
4535            ///
4536            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
4537            /// protobuf data.
4538            pub fn decode(
4539                bytes: ::buffa::bytes::Bytes,
4540            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4541                ::core::result::Result::Ok(
4542                    InternalWhitelistArgsOwnedView(::buffa::OwnedView::decode(bytes)?),
4543                )
4544            }
4545            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
4546            /// max message size).
4547            ///
4548            /// # Errors
4549            ///
4550            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
4551            /// exceeds the configured limits.
4552            pub fn decode_with_options(
4553                bytes: ::buffa::bytes::Bytes,
4554                opts: &::buffa::DecodeOptions,
4555            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4556                ::core::result::Result::Ok(
4557                    InternalWhitelistArgsOwnedView(
4558                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
4559                    ),
4560                )
4561            }
4562            /// Build from an owned message via an encode → decode round-trip.
4563            ///
4564            /// # Errors
4565            ///
4566            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
4567            /// somehow invalid (should not happen for well-formed messages).
4568            pub fn from_owned(
4569                msg: &super::super::InternalWhitelistArgs,
4570            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4571                ::core::result::Result::Ok(
4572                    InternalWhitelistArgsOwnedView(::buffa::OwnedView::from_owned(msg)?),
4573                )
4574            }
4575            /// Borrow the full [`InternalWhitelistArgsView`] with its lifetime tied to `&self`.
4576            #[must_use]
4577            pub fn view(&self) -> &InternalWhitelistArgsView<'_> {
4578                self.0.reborrow()
4579            }
4580            /// Convert to the owned message type.
4581            ///
4582            /// # Errors
4583            ///
4584            /// Returns an error if re-materializing preserved unknown fields
4585            /// fails (e.g. the unknown-field limit is exceeded).
4586            pub fn to_owned_message(
4587                &self,
4588            ) -> ::core::result::Result<
4589                super::super::InternalWhitelistArgs,
4590                ::buffa::DecodeError,
4591            > {
4592                self.0.to_owned_message()
4593            }
4594            /// The underlying bytes buffer.
4595            #[must_use]
4596            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
4597                self.0.bytes()
4598            }
4599            /// Consume the handle, returning the underlying bytes buffer.
4600            #[must_use]
4601            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
4602                self.0.into_bytes()
4603            }
4604            /// EVM account addresses to add or remove from the internal transfer whitelist.
4605            ///
4606            /// Field 1: `addresses`
4607            #[must_use]
4608            pub fn addresses(&self) -> &::buffa::RepeatedView<'_, &'_ str> {
4609                &self.0.reborrow().addresses
4610            }
4611        }
4612        impl ::core::convert::From<
4613            ::buffa::OwnedView<InternalWhitelistArgsView<'static>>,
4614        > for InternalWhitelistArgsOwnedView {
4615            fn from(
4616                inner: ::buffa::OwnedView<InternalWhitelistArgsView<'static>>,
4617            ) -> Self {
4618                InternalWhitelistArgsOwnedView(inner)
4619            }
4620        }
4621        impl ::core::convert::From<InternalWhitelistArgsOwnedView>
4622        for ::buffa::OwnedView<InternalWhitelistArgsView<'static>> {
4623            fn from(wrapper: InternalWhitelistArgsOwnedView) -> Self {
4624                wrapper.0
4625            }
4626        }
4627        impl ::core::convert::AsRef<
4628            ::buffa::OwnedView<InternalWhitelistArgsView<'static>>,
4629        > for InternalWhitelistArgsOwnedView {
4630            fn as_ref(&self) -> &::buffa::OwnedView<InternalWhitelistArgsView<'static>> {
4631                &self.0
4632            }
4633        }
4634        impl ::buffa::HasMessageView for super::super::InternalWhitelistArgs {
4635            type View<'a> = InternalWhitelistArgsView<'a>;
4636            type ViewHandle = InternalWhitelistArgsOwnedView;
4637        }
4638        impl ::serde::Serialize for InternalWhitelistArgsOwnedView {
4639            fn serialize<__S: ::serde::Serializer>(
4640                &self,
4641                __s: __S,
4642            ) -> ::core::result::Result<__S::Ok, __S::Error> {
4643                ::serde::Serialize::serialize(&self.0, __s)
4644            }
4645        }
4646        /// WhitelistRequirementArgs contains the requested whitelist requirement state.
4647        /// Guard approvals are only needed to disable a requirement.
4648        #[derive(Clone, Debug, Default)]
4649        pub struct WhitelistRequirementArgsView<'a> {
4650            /// Required must be false for GuardSigner approvals. Enabling a requirement
4651            /// uses an empty approval on-chain and should not be signed here.
4652            ///
4653            /// Field 1: `required`
4654            pub required: bool,
4655            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
4656        }
4657        impl<'a> ::buffa::MessageView<'a> for WhitelistRequirementArgsView<'a> {
4658            type Owned = super::super::WhitelistRequirementArgs;
4659            fn decode_view(
4660                buf: &'a [u8],
4661            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4662                let __limit = ::core::cell::Cell::new(
4663                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
4664                );
4665                <Self as ::buffa::MessageView>::decode_view_ctx(
4666                    buf,
4667                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
4668                )
4669            }
4670            fn decode_view_with_ctx(
4671                buf: &'a [u8],
4672                ctx: ::buffa::DecodeContext<'_>,
4673            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4674                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
4675            }
4676            fn merge_view_field(
4677                &mut self,
4678                tag: ::buffa::encoding::Tag,
4679                cur: &'a [u8],
4680                before_tag: &'a [u8],
4681                ctx: ::buffa::DecodeContext<'_>,
4682            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
4683                let _ = ctx;
4684                #[allow(unused_variables)]
4685                let view = self;
4686                let mut cur = cur;
4687                match tag.field_number() {
4688                    1u32 => {
4689                        ::buffa::encoding::check_wire_type(
4690                            tag,
4691                            ::buffa::encoding::WireType::Varint,
4692                        )?;
4693                        view.required = ::buffa::types::decode_bool(&mut cur)?;
4694                    }
4695                    _ => {
4696                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
4697                        let span_len = before_tag.len() - cur.len();
4698                        view.__buffa_unknown_fields
4699                            .push_record(before_tag, span_len, ctx)?;
4700                    }
4701                }
4702                ::core::result::Result::Ok(cur)
4703            }
4704            fn to_owned_message(
4705                &self,
4706            ) -> ::core::result::Result<
4707                super::super::WhitelistRequirementArgs,
4708                ::buffa::DecodeError,
4709            > {
4710                self.to_owned_from_source(None)
4711            }
4712            #[allow(clippy::useless_conversion, clippy::needless_update)]
4713            fn to_owned_from_source(
4714                &self,
4715                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
4716            ) -> ::core::result::Result<
4717                super::super::WhitelistRequirementArgs,
4718                ::buffa::DecodeError,
4719            > {
4720                #[allow(unused_imports)]
4721                use ::buffa::alloc::string::ToString as _;
4722                let _ = __buffa_src;
4723                ::core::result::Result::Ok(super::super::WhitelistRequirementArgs {
4724                    required: self.required,
4725                    __buffa_unknown_fields: self
4726                        .__buffa_unknown_fields
4727                        .to_owned()?
4728                        .into(),
4729                    ..::core::default::Default::default()
4730                })
4731            }
4732        }
4733        impl<'a> ::buffa::ViewEncode<'a> for WhitelistRequirementArgsView<'a> {
4734            #[allow(clippy::needless_borrow, clippy::let_and_return)]
4735            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
4736                #[allow(unused_imports)]
4737                use ::buffa::Enumeration as _;
4738                let mut size = 0u32;
4739                if self.required {
4740                    size += 1u32 + ::buffa::types::BOOL_ENCODED_LEN as u32;
4741                }
4742                size += self.__buffa_unknown_fields.encoded_len() as u32;
4743                size
4744            }
4745            #[allow(clippy::needless_borrow)]
4746            fn write_to(
4747                &self,
4748                _cache: &mut ::buffa::SizeCache,
4749                buf: &mut impl ::buffa::bytes::BufMut,
4750            ) {
4751                #[allow(unused_imports)]
4752                use ::buffa::Enumeration as _;
4753                if self.required {
4754                    ::buffa::types::put_bool_field(1u32, self.required, buf);
4755                }
4756                self.__buffa_unknown_fields.write_to(buf);
4757            }
4758        }
4759        /// Serializes this view as protobuf JSON.
4760        ///
4761        /// Implicit-presence fields with default values are omitted, `required`
4762        /// fields are always emitted, explicit-presence (`optional`) fields are
4763        /// emitted only when set, bytes fields are base64-encoded, and enum
4764        /// values are their proto name strings.
4765        ///
4766        /// This impl uses `serialize_map(None)` because the number of emitted
4767        /// fields depends on default-omission rules; serializers that require
4768        /// known map lengths (e.g. `bincode`) will return a runtime error.
4769        /// Use the owned message type for those formats.
4770        impl<'__a> ::serde::Serialize for WhitelistRequirementArgsView<'__a> {
4771            fn serialize<__S: ::serde::Serializer>(
4772                &self,
4773                __s: __S,
4774            ) -> ::core::result::Result<__S::Ok, __S::Error> {
4775                use ::serde::ser::SerializeMap as _;
4776                let mut __map = __s.serialize_map(::core::option::Option::None)?;
4777                if self.required {
4778                    __map.serialize_entry("required", &self.required)?;
4779                }
4780                __map.end()
4781            }
4782        }
4783        impl<'a> ::buffa::MessageName for WhitelistRequirementArgsView<'a> {
4784            const PACKAGE: &'static str = "chain.guard.v1";
4785            const NAME: &'static str = "WhitelistRequirementArgs";
4786            const FULL_NAME: &'static str = "chain.guard.v1.WhitelistRequirementArgs";
4787            const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.WhitelistRequirementArgs";
4788        }
4789        ::buffa::impl_default_view_instance!(WhitelistRequirementArgsView);
4790        ::buffa::impl_view_reborrow!(WhitelistRequirementArgsView);
4791        /** Self-contained, `'static` owned view of a `WhitelistRequirementArgs` message.
4792
4793 Wraps [`::buffa::OwnedView`]`<`[`WhitelistRequirementArgsView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
4794
4795 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`WhitelistRequirementArgsView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
4796        #[derive(Clone, Debug)]
4797        pub struct WhitelistRequirementArgsOwnedView(
4798            ::buffa::OwnedView<WhitelistRequirementArgsView<'static>>,
4799        );
4800        impl WhitelistRequirementArgsOwnedView {
4801            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
4802            ///
4803            /// The view borrows directly from the buffer's data; the buffer is
4804            /// retained inside the returned handle.
4805            ///
4806            /// # Errors
4807            ///
4808            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
4809            /// protobuf data.
4810            pub fn decode(
4811                bytes: ::buffa::bytes::Bytes,
4812            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4813                ::core::result::Result::Ok(
4814                    WhitelistRequirementArgsOwnedView(::buffa::OwnedView::decode(bytes)?),
4815                )
4816            }
4817            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
4818            /// max message size).
4819            ///
4820            /// # Errors
4821            ///
4822            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
4823            /// exceeds the configured limits.
4824            pub fn decode_with_options(
4825                bytes: ::buffa::bytes::Bytes,
4826                opts: &::buffa::DecodeOptions,
4827            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4828                ::core::result::Result::Ok(
4829                    WhitelistRequirementArgsOwnedView(
4830                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
4831                    ),
4832                )
4833            }
4834            /// Build from an owned message via an encode → decode round-trip.
4835            ///
4836            /// # Errors
4837            ///
4838            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
4839            /// somehow invalid (should not happen for well-formed messages).
4840            pub fn from_owned(
4841                msg: &super::super::WhitelistRequirementArgs,
4842            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4843                ::core::result::Result::Ok(
4844                    WhitelistRequirementArgsOwnedView(
4845                        ::buffa::OwnedView::from_owned(msg)?,
4846                    ),
4847                )
4848            }
4849            /// Borrow the full [`WhitelistRequirementArgsView`] with its lifetime tied to `&self`.
4850            #[must_use]
4851            pub fn view(&self) -> &WhitelistRequirementArgsView<'_> {
4852                self.0.reborrow()
4853            }
4854            /// Convert to the owned message type.
4855            ///
4856            /// # Errors
4857            ///
4858            /// Returns an error if re-materializing preserved unknown fields
4859            /// fails (e.g. the unknown-field limit is exceeded).
4860            pub fn to_owned_message(
4861                &self,
4862            ) -> ::core::result::Result<
4863                super::super::WhitelistRequirementArgs,
4864                ::buffa::DecodeError,
4865            > {
4866                self.0.to_owned_message()
4867            }
4868            /// The underlying bytes buffer.
4869            #[must_use]
4870            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
4871                self.0.bytes()
4872            }
4873            /// Consume the handle, returning the underlying bytes buffer.
4874            #[must_use]
4875            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
4876                self.0.into_bytes()
4877            }
4878            /// Required must be false for GuardSigner approvals. Enabling a requirement
4879            /// uses an empty approval on-chain and should not be signed here.
4880            ///
4881            /// Field 1: `required`
4882            #[must_use]
4883            pub fn required(&self) -> bool {
4884                self.0.reborrow().required
4885            }
4886        }
4887        impl ::core::convert::From<
4888            ::buffa::OwnedView<WhitelistRequirementArgsView<'static>>,
4889        > for WhitelistRequirementArgsOwnedView {
4890            fn from(
4891                inner: ::buffa::OwnedView<WhitelistRequirementArgsView<'static>>,
4892            ) -> Self {
4893                WhitelistRequirementArgsOwnedView(inner)
4894            }
4895        }
4896        impl ::core::convert::From<WhitelistRequirementArgsOwnedView>
4897        for ::buffa::OwnedView<WhitelistRequirementArgsView<'static>> {
4898            fn from(wrapper: WhitelistRequirementArgsOwnedView) -> Self {
4899                wrapper.0
4900            }
4901        }
4902        impl ::core::convert::AsRef<
4903            ::buffa::OwnedView<WhitelistRequirementArgsView<'static>>,
4904        > for WhitelistRequirementArgsOwnedView {
4905            fn as_ref(
4906                &self,
4907            ) -> &::buffa::OwnedView<WhitelistRequirementArgsView<'static>> {
4908                &self.0
4909            }
4910        }
4911        impl ::buffa::HasMessageView for super::super::WhitelistRequirementArgs {
4912            type View<'a> = WhitelistRequirementArgsView<'a>;
4913            type ViewHandle = WhitelistRequirementArgsOwnedView;
4914        }
4915        impl ::serde::Serialize for WhitelistRequirementArgsOwnedView {
4916            fn serialize<__S: ::serde::Serializer>(
4917                &self,
4918                __s: __S,
4919            ) -> ::core::result::Result<__S::Ok, __S::Error> {
4920                ::serde::Serialize::serialize(&self.0, __s)
4921            }
4922        }
4923        /// ProtectedActionArgs contains business arguments for the selected protected
4924        /// action. It intentionally excludes trusted account, nonce, and deadline fields.
4925        #[derive(Clone, Debug, Default)]
4926        pub struct ProtectedActionArgsView<'a> {
4927            pub args: ::core::option::Option<
4928                super::super::__buffa::view::oneof::protected_action_args::Args<'a>,
4929            >,
4930            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
4931        }
4932        impl<'a> ::buffa::MessageView<'a> for ProtectedActionArgsView<'a> {
4933            type Owned = super::super::ProtectedActionArgs;
4934            fn decode_view(
4935                buf: &'a [u8],
4936            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4937                let __limit = ::core::cell::Cell::new(
4938                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
4939                );
4940                <Self as ::buffa::MessageView>::decode_view_ctx(
4941                    buf,
4942                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
4943                )
4944            }
4945            fn decode_view_with_ctx(
4946                buf: &'a [u8],
4947                ctx: ::buffa::DecodeContext<'_>,
4948            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
4949                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
4950            }
4951            fn merge_view_field(
4952                &mut self,
4953                tag: ::buffa::encoding::Tag,
4954                cur: &'a [u8],
4955                before_tag: &'a [u8],
4956                ctx: ::buffa::DecodeContext<'_>,
4957            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
4958                let _ = ctx;
4959                #[allow(unused_variables)]
4960                let view = self;
4961                let mut cur = cur;
4962                match tag.field_number() {
4963                    1u32 => {
4964                        ::buffa::encoding::check_wire_type(
4965                            tag,
4966                            ::buffa::encoding::WireType::LengthDelimited,
4967                        )?;
4968                        let __sub_ctx = ctx.descend()?;
4969                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
4970                        if let Some(
4971                            super::super::__buffa::view::oneof::protected_action_args::Args::ExternalWhitelist(
4972                                ref mut existing,
4973                            ),
4974                        ) = view.args
4975                        {
4976                            ::buffa::MessageView::merge_into_view(
4977                                &mut **existing,
4978                                sub,
4979                                __sub_ctx,
4980                            )?;
4981                        } else {
4982                            view.args = Some(
4983                                super::super::__buffa::view::oneof::protected_action_args::Args::ExternalWhitelist(
4984                                    ::buffa::alloc::boxed::Box::new(
4985                                        <super::super::__buffa::view::ExternalWhitelistArgsView as ::buffa::MessageView>::decode_view_ctx(
4986                                            sub,
4987                                            __sub_ctx,
4988                                        )?,
4989                                    ),
4990                                ),
4991                            );
4992                        }
4993                    }
4994                    2u32 => {
4995                        ::buffa::encoding::check_wire_type(
4996                            tag,
4997                            ::buffa::encoding::WireType::LengthDelimited,
4998                        )?;
4999                        let __sub_ctx = ctx.descend()?;
5000                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
5001                        if let Some(
5002                            super::super::__buffa::view::oneof::protected_action_args::Args::InternalWhitelist(
5003                                ref mut existing,
5004                            ),
5005                        ) = view.args
5006                        {
5007                            ::buffa::MessageView::merge_into_view(
5008                                &mut **existing,
5009                                sub,
5010                                __sub_ctx,
5011                            )?;
5012                        } else {
5013                            view.args = Some(
5014                                super::super::__buffa::view::oneof::protected_action_args::Args::InternalWhitelist(
5015                                    ::buffa::alloc::boxed::Box::new(
5016                                        <super::super::__buffa::view::InternalWhitelistArgsView as ::buffa::MessageView>::decode_view_ctx(
5017                                            sub,
5018                                            __sub_ctx,
5019                                        )?,
5020                                    ),
5021                                ),
5022                            );
5023                        }
5024                    }
5025                    3u32 => {
5026                        ::buffa::encoding::check_wire_type(
5027                            tag,
5028                            ::buffa::encoding::WireType::LengthDelimited,
5029                        )?;
5030                        let __sub_ctx = ctx.descend()?;
5031                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
5032                        if let Some(
5033                            super::super::__buffa::view::oneof::protected_action_args::Args::WhitelistRequirement(
5034                                ref mut existing,
5035                            ),
5036                        ) = view.args
5037                        {
5038                            ::buffa::MessageView::merge_into_view(
5039                                &mut **existing,
5040                                sub,
5041                                __sub_ctx,
5042                            )?;
5043                        } else {
5044                            view.args = Some(
5045                                super::super::__buffa::view::oneof::protected_action_args::Args::WhitelistRequirement(
5046                                    ::buffa::alloc::boxed::Box::new(
5047                                        <super::super::__buffa::view::WhitelistRequirementArgsView as ::buffa::MessageView>::decode_view_ctx(
5048                                            sub,
5049                                            __sub_ctx,
5050                                        )?,
5051                                    ),
5052                                ),
5053                            );
5054                        }
5055                    }
5056                    _ => {
5057                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
5058                        let span_len = before_tag.len() - cur.len();
5059                        view.__buffa_unknown_fields
5060                            .push_record(before_tag, span_len, ctx)?;
5061                    }
5062                }
5063                ::core::result::Result::Ok(cur)
5064            }
5065            fn to_owned_message(
5066                &self,
5067            ) -> ::core::result::Result<
5068                super::super::ProtectedActionArgs,
5069                ::buffa::DecodeError,
5070            > {
5071                self.to_owned_from_source(None)
5072            }
5073            #[allow(clippy::useless_conversion, clippy::needless_update)]
5074            fn to_owned_from_source(
5075                &self,
5076                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
5077            ) -> ::core::result::Result<
5078                super::super::ProtectedActionArgs,
5079                ::buffa::DecodeError,
5080            > {
5081                #[allow(unused_imports)]
5082                use ::buffa::alloc::string::ToString as _;
5083                let _ = __buffa_src;
5084                ::core::result::Result::Ok(super::super::ProtectedActionArgs {
5085                    args: match self.args.as_ref() {
5086                        ::core::option::Option::Some(v) => {
5087                            ::core::option::Option::Some(
5088                                match v {
5089                                    super::super::__buffa::view::oneof::protected_action_args::Args::ExternalWhitelist(
5090                                        v,
5091                                    ) => {
5092                                        super::super::__buffa::oneof::protected_action_args::Args::ExternalWhitelist(
5093                                            ::buffa::alloc::boxed::Box::new(
5094                                                v.to_owned_from_source(__buffa_src)?,
5095                                            ),
5096                                        )
5097                                    }
5098                                    super::super::__buffa::view::oneof::protected_action_args::Args::InternalWhitelist(
5099                                        v,
5100                                    ) => {
5101                                        super::super::__buffa::oneof::protected_action_args::Args::InternalWhitelist(
5102                                            ::buffa::alloc::boxed::Box::new(
5103                                                v.to_owned_from_source(__buffa_src)?,
5104                                            ),
5105                                        )
5106                                    }
5107                                    super::super::__buffa::view::oneof::protected_action_args::Args::WhitelistRequirement(
5108                                        v,
5109                                    ) => {
5110                                        super::super::__buffa::oneof::protected_action_args::Args::WhitelistRequirement(
5111                                            ::buffa::alloc::boxed::Box::new(
5112                                                v.to_owned_from_source(__buffa_src)?,
5113                                            ),
5114                                        )
5115                                    }
5116                                },
5117                            )
5118                        }
5119                        ::core::option::Option::None => ::core::option::Option::None,
5120                    },
5121                    __buffa_unknown_fields: self
5122                        .__buffa_unknown_fields
5123                        .to_owned()?
5124                        .into(),
5125                    ..::core::default::Default::default()
5126                })
5127            }
5128        }
5129        impl<'a> ::buffa::ViewEncode<'a> for ProtectedActionArgsView<'a> {
5130            #[allow(clippy::needless_borrow, clippy::let_and_return)]
5131            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
5132                #[allow(unused_imports)]
5133                use ::buffa::Enumeration as _;
5134                let mut size = 0u32;
5135                if let ::core::option::Option::Some(ref v) = self.args {
5136                    match v {
5137                        super::super::__buffa::view::oneof::protected_action_args::Args::ExternalWhitelist(
5138                            x,
5139                        ) => {
5140                            let __slot = __cache.reserve();
5141                            let inner = x.compute_size(__cache);
5142                            __cache.set(__slot, inner);
5143                            size
5144                                += 1u32 + ::buffa::encoding::varint_len(inner as u64) as u32
5145                                    + inner;
5146                        }
5147                        super::super::__buffa::view::oneof::protected_action_args::Args::InternalWhitelist(
5148                            x,
5149                        ) => {
5150                            let __slot = __cache.reserve();
5151                            let inner = x.compute_size(__cache);
5152                            __cache.set(__slot, inner);
5153                            size
5154                                += 1u32 + ::buffa::encoding::varint_len(inner as u64) as u32
5155                                    + inner;
5156                        }
5157                        super::super::__buffa::view::oneof::protected_action_args::Args::WhitelistRequirement(
5158                            x,
5159                        ) => {
5160                            let __slot = __cache.reserve();
5161                            let inner = x.compute_size(__cache);
5162                            __cache.set(__slot, inner);
5163                            size
5164                                += 1u32 + ::buffa::encoding::varint_len(inner as u64) as u32
5165                                    + inner;
5166                        }
5167                    }
5168                }
5169                size += self.__buffa_unknown_fields.encoded_len() as u32;
5170                size
5171            }
5172            #[allow(clippy::needless_borrow)]
5173            fn write_to(
5174                &self,
5175                __cache: &mut ::buffa::SizeCache,
5176                buf: &mut impl ::buffa::bytes::BufMut,
5177            ) {
5178                #[allow(unused_imports)]
5179                use ::buffa::Enumeration as _;
5180                if let ::core::option::Option::Some(ref v) = self.args {
5181                    match v {
5182                        super::super::__buffa::view::oneof::protected_action_args::Args::ExternalWhitelist(
5183                            x,
5184                        ) => {
5185                            ::buffa::types::put_len_delimited_header(
5186                                1u32,
5187                                __cache.consume_next(),
5188                                buf,
5189                            );
5190                            x.write_to(__cache, buf);
5191                        }
5192                        super::super::__buffa::view::oneof::protected_action_args::Args::InternalWhitelist(
5193                            x,
5194                        ) => {
5195                            ::buffa::types::put_len_delimited_header(
5196                                2u32,
5197                                __cache.consume_next(),
5198                                buf,
5199                            );
5200                            x.write_to(__cache, buf);
5201                        }
5202                        super::super::__buffa::view::oneof::protected_action_args::Args::WhitelistRequirement(
5203                            x,
5204                        ) => {
5205                            ::buffa::types::put_len_delimited_header(
5206                                3u32,
5207                                __cache.consume_next(),
5208                                buf,
5209                            );
5210                            x.write_to(__cache, buf);
5211                        }
5212                    }
5213                }
5214                self.__buffa_unknown_fields.write_to(buf);
5215            }
5216        }
5217        /// Serializes this view as protobuf JSON.
5218        ///
5219        /// Implicit-presence fields with default values are omitted, `required`
5220        /// fields are always emitted, explicit-presence (`optional`) fields are
5221        /// emitted only when set, bytes fields are base64-encoded, and enum
5222        /// values are their proto name strings.
5223        ///
5224        /// This impl uses `serialize_map(None)` because the number of emitted
5225        /// fields depends on default-omission rules; serializers that require
5226        /// known map lengths (e.g. `bincode`) will return a runtime error.
5227        /// Use the owned message type for those formats.
5228        impl<'__a> ::serde::Serialize for ProtectedActionArgsView<'__a> {
5229            fn serialize<__S: ::serde::Serializer>(
5230                &self,
5231                __s: __S,
5232            ) -> ::core::result::Result<__S::Ok, __S::Error> {
5233                use ::serde::ser::SerializeMap as _;
5234                let mut __map = __s.serialize_map(::core::option::Option::None)?;
5235                if let ::core::option::Option::Some(ref __ov) = self.args {
5236                    match __ov {
5237                        super::super::__buffa::view::oneof::protected_action_args::Args::ExternalWhitelist(
5238                            v,
5239                        ) => {
5240                            __map.serialize_entry("externalWhitelist", v)?;
5241                        }
5242                        super::super::__buffa::view::oneof::protected_action_args::Args::InternalWhitelist(
5243                            v,
5244                        ) => {
5245                            __map.serialize_entry("internalWhitelist", v)?;
5246                        }
5247                        super::super::__buffa::view::oneof::protected_action_args::Args::WhitelistRequirement(
5248                            v,
5249                        ) => {
5250                            __map.serialize_entry("whitelistRequirement", v)?;
5251                        }
5252                    }
5253                }
5254                __map.end()
5255            }
5256        }
5257        impl<'a> ::buffa::MessageName for ProtectedActionArgsView<'a> {
5258            const PACKAGE: &'static str = "chain.guard.v1";
5259            const NAME: &'static str = "ProtectedActionArgs";
5260            const FULL_NAME: &'static str = "chain.guard.v1.ProtectedActionArgs";
5261            const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.ProtectedActionArgs";
5262        }
5263        ::buffa::impl_default_view_instance!(ProtectedActionArgsView);
5264        ::buffa::impl_view_reborrow!(ProtectedActionArgsView);
5265        /** Self-contained, `'static` owned view of a `ProtectedActionArgs` message.
5266
5267 Wraps [`::buffa::OwnedView`]`<`[`ProtectedActionArgsView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
5268
5269 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`ProtectedActionArgsView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
5270        #[derive(Clone, Debug)]
5271        pub struct ProtectedActionArgsOwnedView(
5272            ::buffa::OwnedView<ProtectedActionArgsView<'static>>,
5273        );
5274        impl ProtectedActionArgsOwnedView {
5275            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
5276            ///
5277            /// The view borrows directly from the buffer's data; the buffer is
5278            /// retained inside the returned handle.
5279            ///
5280            /// # Errors
5281            ///
5282            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
5283            /// protobuf data.
5284            pub fn decode(
5285                bytes: ::buffa::bytes::Bytes,
5286            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5287                ::core::result::Result::Ok(
5288                    ProtectedActionArgsOwnedView(::buffa::OwnedView::decode(bytes)?),
5289                )
5290            }
5291            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
5292            /// max message size).
5293            ///
5294            /// # Errors
5295            ///
5296            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
5297            /// exceeds the configured limits.
5298            pub fn decode_with_options(
5299                bytes: ::buffa::bytes::Bytes,
5300                opts: &::buffa::DecodeOptions,
5301            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5302                ::core::result::Result::Ok(
5303                    ProtectedActionArgsOwnedView(
5304                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
5305                    ),
5306                )
5307            }
5308            /// Build from an owned message via an encode → decode round-trip.
5309            ///
5310            /// # Errors
5311            ///
5312            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
5313            /// somehow invalid (should not happen for well-formed messages).
5314            pub fn from_owned(
5315                msg: &super::super::ProtectedActionArgs,
5316            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5317                ::core::result::Result::Ok(
5318                    ProtectedActionArgsOwnedView(::buffa::OwnedView::from_owned(msg)?),
5319                )
5320            }
5321            /// Borrow the full [`ProtectedActionArgsView`] with its lifetime tied to `&self`.
5322            #[must_use]
5323            pub fn view(&self) -> &ProtectedActionArgsView<'_> {
5324                self.0.reborrow()
5325            }
5326            /// Convert to the owned message type.
5327            ///
5328            /// # Errors
5329            ///
5330            /// Returns an error if re-materializing preserved unknown fields
5331            /// fails (e.g. the unknown-field limit is exceeded).
5332            pub fn to_owned_message(
5333                &self,
5334            ) -> ::core::result::Result<
5335                super::super::ProtectedActionArgs,
5336                ::buffa::DecodeError,
5337            > {
5338                self.0.to_owned_message()
5339            }
5340            /// The underlying bytes buffer.
5341            #[must_use]
5342            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
5343                self.0.bytes()
5344            }
5345            /// Consume the handle, returning the underlying bytes buffer.
5346            #[must_use]
5347            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
5348                self.0.into_bytes()
5349            }
5350            /// Oneof `args`.
5351            #[must_use]
5352            pub fn args(
5353                &self,
5354            ) -> ::core::option::Option<
5355                &super::super::__buffa::view::oneof::protected_action_args::Args<'_>,
5356            > {
5357                self.0.reborrow().args.as_ref()
5358            }
5359        }
5360        impl ::core::convert::From<::buffa::OwnedView<ProtectedActionArgsView<'static>>>
5361        for ProtectedActionArgsOwnedView {
5362            fn from(
5363                inner: ::buffa::OwnedView<ProtectedActionArgsView<'static>>,
5364            ) -> Self {
5365                ProtectedActionArgsOwnedView(inner)
5366            }
5367        }
5368        impl ::core::convert::From<ProtectedActionArgsOwnedView>
5369        for ::buffa::OwnedView<ProtectedActionArgsView<'static>> {
5370            fn from(wrapper: ProtectedActionArgsOwnedView) -> Self {
5371                wrapper.0
5372            }
5373        }
5374        impl ::core::convert::AsRef<::buffa::OwnedView<ProtectedActionArgsView<'static>>>
5375        for ProtectedActionArgsOwnedView {
5376            fn as_ref(&self) -> &::buffa::OwnedView<ProtectedActionArgsView<'static>> {
5377                &self.0
5378            }
5379        }
5380        impl ::buffa::HasMessageView for super::super::ProtectedActionArgs {
5381            type View<'a> = ProtectedActionArgsView<'a>;
5382            type ViewHandle = ProtectedActionArgsOwnedView;
5383        }
5384        impl ::serde::Serialize for ProtectedActionArgsOwnedView {
5385            fn serialize<__S: ::serde::Serializer>(
5386                &self,
5387                __s: __S,
5388            ) -> ::core::result::Result<__S::Ok, __S::Error> {
5389                ::serde::Serialize::serialize(&self.0, __s)
5390            }
5391        }
5392        /// CreateGuardSignerWalletRequest creates a guard signer wallet for the selected
5393        /// account target.
5394        #[derive(Clone, Debug, Default)]
5395        pub struct CreateGuardSignerWalletRequestView<'a> {
5396            /// Optional subaccount public id. When omitted, the authenticated caller's
5397            /// root account is used as the target account.
5398            ///
5399            /// Field 1: `subaccount_id`
5400            pub subaccount_id: u64,
5401            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
5402        }
5403        impl<'a> ::buffa::MessageView<'a> for CreateGuardSignerWalletRequestView<'a> {
5404            type Owned = super::super::CreateGuardSignerWalletRequest;
5405            fn decode_view(
5406                buf: &'a [u8],
5407            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5408                let __limit = ::core::cell::Cell::new(
5409                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
5410                );
5411                <Self as ::buffa::MessageView>::decode_view_ctx(
5412                    buf,
5413                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
5414                )
5415            }
5416            fn decode_view_with_ctx(
5417                buf: &'a [u8],
5418                ctx: ::buffa::DecodeContext<'_>,
5419            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5420                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
5421            }
5422            fn merge_view_field(
5423                &mut self,
5424                tag: ::buffa::encoding::Tag,
5425                cur: &'a [u8],
5426                before_tag: &'a [u8],
5427                ctx: ::buffa::DecodeContext<'_>,
5428            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
5429                let _ = ctx;
5430                #[allow(unused_variables)]
5431                let view = self;
5432                let mut cur = cur;
5433                match tag.field_number() {
5434                    1u32 => {
5435                        ::buffa::encoding::check_wire_type(
5436                            tag,
5437                            ::buffa::encoding::WireType::Fixed64,
5438                        )?;
5439                        view.subaccount_id = ::buffa::types::decode_fixed64(&mut cur)?;
5440                    }
5441                    _ => {
5442                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
5443                        let span_len = before_tag.len() - cur.len();
5444                        view.__buffa_unknown_fields
5445                            .push_record(before_tag, span_len, ctx)?;
5446                    }
5447                }
5448                ::core::result::Result::Ok(cur)
5449            }
5450            fn to_owned_message(
5451                &self,
5452            ) -> ::core::result::Result<
5453                super::super::CreateGuardSignerWalletRequest,
5454                ::buffa::DecodeError,
5455            > {
5456                self.to_owned_from_source(None)
5457            }
5458            #[allow(clippy::useless_conversion, clippy::needless_update)]
5459            fn to_owned_from_source(
5460                &self,
5461                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
5462            ) -> ::core::result::Result<
5463                super::super::CreateGuardSignerWalletRequest,
5464                ::buffa::DecodeError,
5465            > {
5466                #[allow(unused_imports)]
5467                use ::buffa::alloc::string::ToString as _;
5468                let _ = __buffa_src;
5469                ::core::result::Result::Ok(super::super::CreateGuardSignerWalletRequest {
5470                    subaccount_id: self.subaccount_id,
5471                    __buffa_unknown_fields: self
5472                        .__buffa_unknown_fields
5473                        .to_owned()?
5474                        .into(),
5475                    ..::core::default::Default::default()
5476                })
5477            }
5478        }
5479        impl<'a> ::buffa::ViewEncode<'a> for CreateGuardSignerWalletRequestView<'a> {
5480            #[allow(clippy::needless_borrow, clippy::let_and_return)]
5481            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
5482                #[allow(unused_imports)]
5483                use ::buffa::Enumeration as _;
5484                let mut size = 0u32;
5485                if self.subaccount_id != 0u64 {
5486                    size += 1u32 + ::buffa::types::FIXED64_ENCODED_LEN as u32;
5487                }
5488                size += self.__buffa_unknown_fields.encoded_len() as u32;
5489                size
5490            }
5491            #[allow(clippy::needless_borrow)]
5492            fn write_to(
5493                &self,
5494                _cache: &mut ::buffa::SizeCache,
5495                buf: &mut impl ::buffa::bytes::BufMut,
5496            ) {
5497                #[allow(unused_imports)]
5498                use ::buffa::Enumeration as _;
5499                if self.subaccount_id != 0u64 {
5500                    ::buffa::types::put_fixed64_field(1u32, self.subaccount_id, buf);
5501                }
5502                self.__buffa_unknown_fields.write_to(buf);
5503            }
5504        }
5505        /// Serializes this view as protobuf JSON.
5506        ///
5507        /// Implicit-presence fields with default values are omitted, `required`
5508        /// fields are always emitted, explicit-presence (`optional`) fields are
5509        /// emitted only when set, bytes fields are base64-encoded, and enum
5510        /// values are their proto name strings.
5511        ///
5512        /// This impl uses `serialize_map(None)` because the number of emitted
5513        /// fields depends on default-omission rules; serializers that require
5514        /// known map lengths (e.g. `bincode`) will return a runtime error.
5515        /// Use the owned message type for those formats.
5516        impl<'__a> ::serde::Serialize for CreateGuardSignerWalletRequestView<'__a> {
5517            fn serialize<__S: ::serde::Serializer>(
5518                &self,
5519                __s: __S,
5520            ) -> ::core::result::Result<__S::Ok, __S::Error> {
5521                use ::serde::ser::SerializeMap as _;
5522                let mut __map = __s.serialize_map(::core::option::Option::None)?;
5523                if !::buffa::json_helpers::skip_if::is_zero_u64(&self.subaccount_id) {
5524                    __map
5525                        .serialize_entry(
5526                            "subaccountId",
5527                            &::buffa::json_helpers::ProtoJson(&self.subaccount_id),
5528                        )?;
5529                }
5530                __map.end()
5531            }
5532        }
5533        impl<'a> ::buffa::MessageName for CreateGuardSignerWalletRequestView<'a> {
5534            const PACKAGE: &'static str = "chain.guard.v1";
5535            const NAME: &'static str = "CreateGuardSignerWalletRequest";
5536            const FULL_NAME: &'static str = "chain.guard.v1.CreateGuardSignerWalletRequest";
5537            const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.CreateGuardSignerWalletRequest";
5538        }
5539        ::buffa::impl_default_view_instance!(CreateGuardSignerWalletRequestView);
5540        ::buffa::impl_view_reborrow!(CreateGuardSignerWalletRequestView);
5541        /** Self-contained, `'static` owned view of a `CreateGuardSignerWalletRequest` message.
5542
5543 Wraps [`::buffa::OwnedView`]`<`[`CreateGuardSignerWalletRequestView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
5544
5545 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`CreateGuardSignerWalletRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
5546        #[derive(Clone, Debug)]
5547        pub struct CreateGuardSignerWalletRequestOwnedView(
5548            ::buffa::OwnedView<CreateGuardSignerWalletRequestView<'static>>,
5549        );
5550        impl CreateGuardSignerWalletRequestOwnedView {
5551            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
5552            ///
5553            /// The view borrows directly from the buffer's data; the buffer is
5554            /// retained inside the returned handle.
5555            ///
5556            /// # Errors
5557            ///
5558            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
5559            /// protobuf data.
5560            pub fn decode(
5561                bytes: ::buffa::bytes::Bytes,
5562            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5563                ::core::result::Result::Ok(
5564                    CreateGuardSignerWalletRequestOwnedView(
5565                        ::buffa::OwnedView::decode(bytes)?,
5566                    ),
5567                )
5568            }
5569            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
5570            /// max message size).
5571            ///
5572            /// # Errors
5573            ///
5574            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
5575            /// exceeds the configured limits.
5576            pub fn decode_with_options(
5577                bytes: ::buffa::bytes::Bytes,
5578                opts: &::buffa::DecodeOptions,
5579            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5580                ::core::result::Result::Ok(
5581                    CreateGuardSignerWalletRequestOwnedView(
5582                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
5583                    ),
5584                )
5585            }
5586            /// Build from an owned message via an encode → decode round-trip.
5587            ///
5588            /// # Errors
5589            ///
5590            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
5591            /// somehow invalid (should not happen for well-formed messages).
5592            pub fn from_owned(
5593                msg: &super::super::CreateGuardSignerWalletRequest,
5594            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5595                ::core::result::Result::Ok(
5596                    CreateGuardSignerWalletRequestOwnedView(
5597                        ::buffa::OwnedView::from_owned(msg)?,
5598                    ),
5599                )
5600            }
5601            /// Borrow the full [`CreateGuardSignerWalletRequestView`] with its lifetime tied to `&self`.
5602            #[must_use]
5603            pub fn view(&self) -> &CreateGuardSignerWalletRequestView<'_> {
5604                self.0.reborrow()
5605            }
5606            /// Convert to the owned message type.
5607            ///
5608            /// # Errors
5609            ///
5610            /// Returns an error if re-materializing preserved unknown fields
5611            /// fails (e.g. the unknown-field limit is exceeded).
5612            pub fn to_owned_message(
5613                &self,
5614            ) -> ::core::result::Result<
5615                super::super::CreateGuardSignerWalletRequest,
5616                ::buffa::DecodeError,
5617            > {
5618                self.0.to_owned_message()
5619            }
5620            /// The underlying bytes buffer.
5621            #[must_use]
5622            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
5623                self.0.bytes()
5624            }
5625            /// Consume the handle, returning the underlying bytes buffer.
5626            #[must_use]
5627            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
5628                self.0.into_bytes()
5629            }
5630            /// Optional subaccount public id. When omitted, the authenticated caller's
5631            /// root account is used as the target account.
5632            ///
5633            /// Field 1: `subaccount_id`
5634            #[must_use]
5635            pub fn subaccount_id(&self) -> u64 {
5636                self.0.reborrow().subaccount_id
5637            }
5638        }
5639        impl ::core::convert::From<
5640            ::buffa::OwnedView<CreateGuardSignerWalletRequestView<'static>>,
5641        > for CreateGuardSignerWalletRequestOwnedView {
5642            fn from(
5643                inner: ::buffa::OwnedView<CreateGuardSignerWalletRequestView<'static>>,
5644            ) -> Self {
5645                CreateGuardSignerWalletRequestOwnedView(inner)
5646            }
5647        }
5648        impl ::core::convert::From<CreateGuardSignerWalletRequestOwnedView>
5649        for ::buffa::OwnedView<CreateGuardSignerWalletRequestView<'static>> {
5650            fn from(wrapper: CreateGuardSignerWalletRequestOwnedView) -> Self {
5651                wrapper.0
5652            }
5653        }
5654        impl ::core::convert::AsRef<
5655            ::buffa::OwnedView<CreateGuardSignerWalletRequestView<'static>>,
5656        > for CreateGuardSignerWalletRequestOwnedView {
5657            fn as_ref(
5658                &self,
5659            ) -> &::buffa::OwnedView<CreateGuardSignerWalletRequestView<'static>> {
5660                &self.0
5661            }
5662        }
5663        impl ::buffa::HasMessageView for super::super::CreateGuardSignerWalletRequest {
5664            type View<'a> = CreateGuardSignerWalletRequestView<'a>;
5665            type ViewHandle = CreateGuardSignerWalletRequestOwnedView;
5666        }
5667        impl ::serde::Serialize for CreateGuardSignerWalletRequestOwnedView {
5668            fn serialize<__S: ::serde::Serializer>(
5669                &self,
5670                __s: __S,
5671            ) -> ::core::result::Result<__S::Ok, __S::Error> {
5672                ::serde::Serialize::serialize(&self.0, __s)
5673            }
5674        }
5675        /// CreateGuardSignerWalletResponse returns the generated signer address.
5676        #[derive(Clone, Debug, Default)]
5677        pub struct CreateGuardSignerWalletResponseView<'a> {
5678            /// EVM address of the created guard signer wallet.
5679            ///
5680            /// Field 1: `signer_address`
5681            pub signer_address: &'a str,
5682            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
5683        }
5684        impl<'a> ::buffa::MessageView<'a> for CreateGuardSignerWalletResponseView<'a> {
5685            type Owned = super::super::CreateGuardSignerWalletResponse;
5686            fn decode_view(
5687                buf: &'a [u8],
5688            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5689                let __limit = ::core::cell::Cell::new(
5690                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
5691                );
5692                <Self as ::buffa::MessageView>::decode_view_ctx(
5693                    buf,
5694                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
5695                )
5696            }
5697            fn decode_view_with_ctx(
5698                buf: &'a [u8],
5699                ctx: ::buffa::DecodeContext<'_>,
5700            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5701                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
5702            }
5703            fn merge_view_field(
5704                &mut self,
5705                tag: ::buffa::encoding::Tag,
5706                cur: &'a [u8],
5707                before_tag: &'a [u8],
5708                ctx: ::buffa::DecodeContext<'_>,
5709            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
5710                let _ = ctx;
5711                #[allow(unused_variables)]
5712                let view = self;
5713                let mut cur = cur;
5714                match tag.field_number() {
5715                    1u32 => {
5716                        ::buffa::encoding::check_wire_type(
5717                            tag,
5718                            ::buffa::encoding::WireType::LengthDelimited,
5719                        )?;
5720                        view.signer_address = ::buffa::types::borrow_str(&mut cur)?;
5721                    }
5722                    _ => {
5723                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
5724                        let span_len = before_tag.len() - cur.len();
5725                        view.__buffa_unknown_fields
5726                            .push_record(before_tag, span_len, ctx)?;
5727                    }
5728                }
5729                ::core::result::Result::Ok(cur)
5730            }
5731            fn to_owned_message(
5732                &self,
5733            ) -> ::core::result::Result<
5734                super::super::CreateGuardSignerWalletResponse,
5735                ::buffa::DecodeError,
5736            > {
5737                self.to_owned_from_source(None)
5738            }
5739            #[allow(clippy::useless_conversion, clippy::needless_update)]
5740            fn to_owned_from_source(
5741                &self,
5742                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
5743            ) -> ::core::result::Result<
5744                super::super::CreateGuardSignerWalletResponse,
5745                ::buffa::DecodeError,
5746            > {
5747                #[allow(unused_imports)]
5748                use ::buffa::alloc::string::ToString as _;
5749                let _ = __buffa_src;
5750                ::core::result::Result::Ok(super::super::CreateGuardSignerWalletResponse {
5751                    signer_address: self.signer_address.to_string(),
5752                    __buffa_unknown_fields: self
5753                        .__buffa_unknown_fields
5754                        .to_owned()?
5755                        .into(),
5756                    ..::core::default::Default::default()
5757                })
5758            }
5759        }
5760        impl<'a> ::buffa::ViewEncode<'a> for CreateGuardSignerWalletResponseView<'a> {
5761            #[allow(clippy::needless_borrow, clippy::let_and_return)]
5762            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
5763                #[allow(unused_imports)]
5764                use ::buffa::Enumeration as _;
5765                let mut size = 0u32;
5766                if !self.signer_address.is_empty() {
5767                    size
5768                        += 1u32
5769                            + ::buffa::types::string_encoded_len(&self.signer_address)
5770                                as u32;
5771                }
5772                size += self.__buffa_unknown_fields.encoded_len() as u32;
5773                size
5774            }
5775            #[allow(clippy::needless_borrow)]
5776            fn write_to(
5777                &self,
5778                _cache: &mut ::buffa::SizeCache,
5779                buf: &mut impl ::buffa::bytes::BufMut,
5780            ) {
5781                #[allow(unused_imports)]
5782                use ::buffa::Enumeration as _;
5783                if !self.signer_address.is_empty() {
5784                    ::buffa::types::put_string_field(1u32, &self.signer_address, buf);
5785                }
5786                self.__buffa_unknown_fields.write_to(buf);
5787            }
5788        }
5789        /// Serializes this view as protobuf JSON.
5790        ///
5791        /// Implicit-presence fields with default values are omitted, `required`
5792        /// fields are always emitted, explicit-presence (`optional`) fields are
5793        /// emitted only when set, bytes fields are base64-encoded, and enum
5794        /// values are their proto name strings.
5795        ///
5796        /// This impl uses `serialize_map(None)` because the number of emitted
5797        /// fields depends on default-omission rules; serializers that require
5798        /// known map lengths (e.g. `bincode`) will return a runtime error.
5799        /// Use the owned message type for those formats.
5800        impl<'__a> ::serde::Serialize for CreateGuardSignerWalletResponseView<'__a> {
5801            fn serialize<__S: ::serde::Serializer>(
5802                &self,
5803                __s: __S,
5804            ) -> ::core::result::Result<__S::Ok, __S::Error> {
5805                use ::serde::ser::SerializeMap as _;
5806                let mut __map = __s.serialize_map(::core::option::Option::None)?;
5807                if !::buffa::json_helpers::skip_if::is_empty_str(self.signer_address) {
5808                    __map.serialize_entry("signerAddress", self.signer_address)?;
5809                }
5810                __map.end()
5811            }
5812        }
5813        impl<'a> ::buffa::MessageName for CreateGuardSignerWalletResponseView<'a> {
5814            const PACKAGE: &'static str = "chain.guard.v1";
5815            const NAME: &'static str = "CreateGuardSignerWalletResponse";
5816            const FULL_NAME: &'static str = "chain.guard.v1.CreateGuardSignerWalletResponse";
5817            const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.CreateGuardSignerWalletResponse";
5818        }
5819        ::buffa::impl_default_view_instance!(CreateGuardSignerWalletResponseView);
5820        ::buffa::impl_view_reborrow!(CreateGuardSignerWalletResponseView);
5821        /** Self-contained, `'static` owned view of a `CreateGuardSignerWalletResponse` message.
5822
5823 Wraps [`::buffa::OwnedView`]`<`[`CreateGuardSignerWalletResponseView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
5824
5825 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`CreateGuardSignerWalletResponseView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
5826        #[derive(Clone, Debug)]
5827        pub struct CreateGuardSignerWalletResponseOwnedView(
5828            ::buffa::OwnedView<CreateGuardSignerWalletResponseView<'static>>,
5829        );
5830        impl CreateGuardSignerWalletResponseOwnedView {
5831            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
5832            ///
5833            /// The view borrows directly from the buffer's data; the buffer is
5834            /// retained inside the returned handle.
5835            ///
5836            /// # Errors
5837            ///
5838            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
5839            /// protobuf data.
5840            pub fn decode(
5841                bytes: ::buffa::bytes::Bytes,
5842            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5843                ::core::result::Result::Ok(
5844                    CreateGuardSignerWalletResponseOwnedView(
5845                        ::buffa::OwnedView::decode(bytes)?,
5846                    ),
5847                )
5848            }
5849            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
5850            /// max message size).
5851            ///
5852            /// # Errors
5853            ///
5854            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
5855            /// exceeds the configured limits.
5856            pub fn decode_with_options(
5857                bytes: ::buffa::bytes::Bytes,
5858                opts: &::buffa::DecodeOptions,
5859            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5860                ::core::result::Result::Ok(
5861                    CreateGuardSignerWalletResponseOwnedView(
5862                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
5863                    ),
5864                )
5865            }
5866            /// Build from an owned message via an encode → decode round-trip.
5867            ///
5868            /// # Errors
5869            ///
5870            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
5871            /// somehow invalid (should not happen for well-formed messages).
5872            pub fn from_owned(
5873                msg: &super::super::CreateGuardSignerWalletResponse,
5874            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5875                ::core::result::Result::Ok(
5876                    CreateGuardSignerWalletResponseOwnedView(
5877                        ::buffa::OwnedView::from_owned(msg)?,
5878                    ),
5879                )
5880            }
5881            /// Borrow the full [`CreateGuardSignerWalletResponseView`] with its lifetime tied to `&self`.
5882            #[must_use]
5883            pub fn view(&self) -> &CreateGuardSignerWalletResponseView<'_> {
5884                self.0.reborrow()
5885            }
5886            /// Convert to the owned message type.
5887            ///
5888            /// # Errors
5889            ///
5890            /// Returns an error if re-materializing preserved unknown fields
5891            /// fails (e.g. the unknown-field limit is exceeded).
5892            pub fn to_owned_message(
5893                &self,
5894            ) -> ::core::result::Result<
5895                super::super::CreateGuardSignerWalletResponse,
5896                ::buffa::DecodeError,
5897            > {
5898                self.0.to_owned_message()
5899            }
5900            /// The underlying bytes buffer.
5901            #[must_use]
5902            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
5903                self.0.bytes()
5904            }
5905            /// Consume the handle, returning the underlying bytes buffer.
5906            #[must_use]
5907            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
5908                self.0.into_bytes()
5909            }
5910            /// EVM address of the created guard signer wallet.
5911            ///
5912            /// Field 1: `signer_address`
5913            #[must_use]
5914            pub fn signer_address(&self) -> &'_ str {
5915                self.0.reborrow().signer_address
5916            }
5917        }
5918        impl ::core::convert::From<
5919            ::buffa::OwnedView<CreateGuardSignerWalletResponseView<'static>>,
5920        > for CreateGuardSignerWalletResponseOwnedView {
5921            fn from(
5922                inner: ::buffa::OwnedView<CreateGuardSignerWalletResponseView<'static>>,
5923            ) -> Self {
5924                CreateGuardSignerWalletResponseOwnedView(inner)
5925            }
5926        }
5927        impl ::core::convert::From<CreateGuardSignerWalletResponseOwnedView>
5928        for ::buffa::OwnedView<CreateGuardSignerWalletResponseView<'static>> {
5929            fn from(wrapper: CreateGuardSignerWalletResponseOwnedView) -> Self {
5930                wrapper.0
5931            }
5932        }
5933        impl ::core::convert::AsRef<
5934            ::buffa::OwnedView<CreateGuardSignerWalletResponseView<'static>>,
5935        > for CreateGuardSignerWalletResponseOwnedView {
5936            fn as_ref(
5937                &self,
5938            ) -> &::buffa::OwnedView<CreateGuardSignerWalletResponseView<'static>> {
5939                &self.0
5940            }
5941        }
5942        impl ::buffa::HasMessageView for super::super::CreateGuardSignerWalletResponse {
5943            type View<'a> = CreateGuardSignerWalletResponseView<'a>;
5944            type ViewHandle = CreateGuardSignerWalletResponseOwnedView;
5945        }
5946        impl ::serde::Serialize for CreateGuardSignerWalletResponseOwnedView {
5947            fn serialize<__S: ::serde::Serializer>(
5948                &self,
5949                __s: __S,
5950            ) -> ::core::result::Result<__S::Ok, __S::Error> {
5951                ::serde::Serialize::serialize(&self.0, __s)
5952            }
5953        }
5954        /// GetGuardSignerStatusRequest queries stored and live signer status for one
5955        /// account target.
5956        #[derive(Clone, Debug, Default)]
5957        pub struct GetGuardSignerStatusRequestView<'a> {
5958            /// Optional subaccount public id. When omitted, the authenticated caller's
5959            /// root account is used as the target account.
5960            ///
5961            /// Field 1: `subaccount_id`
5962            pub subaccount_id: u64,
5963            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
5964        }
5965        impl<'a> ::buffa::MessageView<'a> for GetGuardSignerStatusRequestView<'a> {
5966            type Owned = super::super::GetGuardSignerStatusRequest;
5967            fn decode_view(
5968                buf: &'a [u8],
5969            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5970                let __limit = ::core::cell::Cell::new(
5971                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
5972                );
5973                <Self as ::buffa::MessageView>::decode_view_ctx(
5974                    buf,
5975                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
5976                )
5977            }
5978            fn decode_view_with_ctx(
5979                buf: &'a [u8],
5980                ctx: ::buffa::DecodeContext<'_>,
5981            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
5982                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
5983            }
5984            fn merge_view_field(
5985                &mut self,
5986                tag: ::buffa::encoding::Tag,
5987                cur: &'a [u8],
5988                before_tag: &'a [u8],
5989                ctx: ::buffa::DecodeContext<'_>,
5990            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
5991                let _ = ctx;
5992                #[allow(unused_variables)]
5993                let view = self;
5994                let mut cur = cur;
5995                match tag.field_number() {
5996                    1u32 => {
5997                        ::buffa::encoding::check_wire_type(
5998                            tag,
5999                            ::buffa::encoding::WireType::Fixed64,
6000                        )?;
6001                        view.subaccount_id = ::buffa::types::decode_fixed64(&mut cur)?;
6002                    }
6003                    _ => {
6004                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
6005                        let span_len = before_tag.len() - cur.len();
6006                        view.__buffa_unknown_fields
6007                            .push_record(before_tag, span_len, ctx)?;
6008                    }
6009                }
6010                ::core::result::Result::Ok(cur)
6011            }
6012            fn to_owned_message(
6013                &self,
6014            ) -> ::core::result::Result<
6015                super::super::GetGuardSignerStatusRequest,
6016                ::buffa::DecodeError,
6017            > {
6018                self.to_owned_from_source(None)
6019            }
6020            #[allow(clippy::useless_conversion, clippy::needless_update)]
6021            fn to_owned_from_source(
6022                &self,
6023                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
6024            ) -> ::core::result::Result<
6025                super::super::GetGuardSignerStatusRequest,
6026                ::buffa::DecodeError,
6027            > {
6028                #[allow(unused_imports)]
6029                use ::buffa::alloc::string::ToString as _;
6030                let _ = __buffa_src;
6031                ::core::result::Result::Ok(super::super::GetGuardSignerStatusRequest {
6032                    subaccount_id: self.subaccount_id,
6033                    __buffa_unknown_fields: self
6034                        .__buffa_unknown_fields
6035                        .to_owned()?
6036                        .into(),
6037                    ..::core::default::Default::default()
6038                })
6039            }
6040        }
6041        impl<'a> ::buffa::ViewEncode<'a> for GetGuardSignerStatusRequestView<'a> {
6042            #[allow(clippy::needless_borrow, clippy::let_and_return)]
6043            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
6044                #[allow(unused_imports)]
6045                use ::buffa::Enumeration as _;
6046                let mut size = 0u32;
6047                if self.subaccount_id != 0u64 {
6048                    size += 1u32 + ::buffa::types::FIXED64_ENCODED_LEN as u32;
6049                }
6050                size += self.__buffa_unknown_fields.encoded_len() as u32;
6051                size
6052            }
6053            #[allow(clippy::needless_borrow)]
6054            fn write_to(
6055                &self,
6056                _cache: &mut ::buffa::SizeCache,
6057                buf: &mut impl ::buffa::bytes::BufMut,
6058            ) {
6059                #[allow(unused_imports)]
6060                use ::buffa::Enumeration as _;
6061                if self.subaccount_id != 0u64 {
6062                    ::buffa::types::put_fixed64_field(1u32, self.subaccount_id, buf);
6063                }
6064                self.__buffa_unknown_fields.write_to(buf);
6065            }
6066        }
6067        /// Serializes this view as protobuf JSON.
6068        ///
6069        /// Implicit-presence fields with default values are omitted, `required`
6070        /// fields are always emitted, explicit-presence (`optional`) fields are
6071        /// emitted only when set, bytes fields are base64-encoded, and enum
6072        /// values are their proto name strings.
6073        ///
6074        /// This impl uses `serialize_map(None)` because the number of emitted
6075        /// fields depends on default-omission rules; serializers that require
6076        /// known map lengths (e.g. `bincode`) will return a runtime error.
6077        /// Use the owned message type for those formats.
6078        impl<'__a> ::serde::Serialize for GetGuardSignerStatusRequestView<'__a> {
6079            fn serialize<__S: ::serde::Serializer>(
6080                &self,
6081                __s: __S,
6082            ) -> ::core::result::Result<__S::Ok, __S::Error> {
6083                use ::serde::ser::SerializeMap as _;
6084                let mut __map = __s.serialize_map(::core::option::Option::None)?;
6085                if !::buffa::json_helpers::skip_if::is_zero_u64(&self.subaccount_id) {
6086                    __map
6087                        .serialize_entry(
6088                            "subaccountId",
6089                            &::buffa::json_helpers::ProtoJson(&self.subaccount_id),
6090                        )?;
6091                }
6092                __map.end()
6093            }
6094        }
6095        impl<'a> ::buffa::MessageName for GetGuardSignerStatusRequestView<'a> {
6096            const PACKAGE: &'static str = "chain.guard.v1";
6097            const NAME: &'static str = "GetGuardSignerStatusRequest";
6098            const FULL_NAME: &'static str = "chain.guard.v1.GetGuardSignerStatusRequest";
6099            const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.GetGuardSignerStatusRequest";
6100        }
6101        ::buffa::impl_default_view_instance!(GetGuardSignerStatusRequestView);
6102        ::buffa::impl_view_reborrow!(GetGuardSignerStatusRequestView);
6103        /** Self-contained, `'static` owned view of a `GetGuardSignerStatusRequest` message.
6104
6105 Wraps [`::buffa::OwnedView`]`<`[`GetGuardSignerStatusRequestView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
6106
6107 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`GetGuardSignerStatusRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
6108        #[derive(Clone, Debug)]
6109        pub struct GetGuardSignerStatusRequestOwnedView(
6110            ::buffa::OwnedView<GetGuardSignerStatusRequestView<'static>>,
6111        );
6112        impl GetGuardSignerStatusRequestOwnedView {
6113            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
6114            ///
6115            /// The view borrows directly from the buffer's data; the buffer is
6116            /// retained inside the returned handle.
6117            ///
6118            /// # Errors
6119            ///
6120            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
6121            /// protobuf data.
6122            pub fn decode(
6123                bytes: ::buffa::bytes::Bytes,
6124            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6125                ::core::result::Result::Ok(
6126                    GetGuardSignerStatusRequestOwnedView(
6127                        ::buffa::OwnedView::decode(bytes)?,
6128                    ),
6129                )
6130            }
6131            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
6132            /// max message size).
6133            ///
6134            /// # Errors
6135            ///
6136            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
6137            /// exceeds the configured limits.
6138            pub fn decode_with_options(
6139                bytes: ::buffa::bytes::Bytes,
6140                opts: &::buffa::DecodeOptions,
6141            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6142                ::core::result::Result::Ok(
6143                    GetGuardSignerStatusRequestOwnedView(
6144                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
6145                    ),
6146                )
6147            }
6148            /// Build from an owned message via an encode → decode round-trip.
6149            ///
6150            /// # Errors
6151            ///
6152            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
6153            /// somehow invalid (should not happen for well-formed messages).
6154            pub fn from_owned(
6155                msg: &super::super::GetGuardSignerStatusRequest,
6156            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6157                ::core::result::Result::Ok(
6158                    GetGuardSignerStatusRequestOwnedView(
6159                        ::buffa::OwnedView::from_owned(msg)?,
6160                    ),
6161                )
6162            }
6163            /// Borrow the full [`GetGuardSignerStatusRequestView`] with its lifetime tied to `&self`.
6164            #[must_use]
6165            pub fn view(&self) -> &GetGuardSignerStatusRequestView<'_> {
6166                self.0.reborrow()
6167            }
6168            /// Convert to the owned message type.
6169            ///
6170            /// # Errors
6171            ///
6172            /// Returns an error if re-materializing preserved unknown fields
6173            /// fails (e.g. the unknown-field limit is exceeded).
6174            pub fn to_owned_message(
6175                &self,
6176            ) -> ::core::result::Result<
6177                super::super::GetGuardSignerStatusRequest,
6178                ::buffa::DecodeError,
6179            > {
6180                self.0.to_owned_message()
6181            }
6182            /// The underlying bytes buffer.
6183            #[must_use]
6184            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
6185                self.0.bytes()
6186            }
6187            /// Consume the handle, returning the underlying bytes buffer.
6188            #[must_use]
6189            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
6190                self.0.into_bytes()
6191            }
6192            /// Optional subaccount public id. When omitted, the authenticated caller's
6193            /// root account is used as the target account.
6194            ///
6195            /// Field 1: `subaccount_id`
6196            #[must_use]
6197            pub fn subaccount_id(&self) -> u64 {
6198                self.0.reborrow().subaccount_id
6199            }
6200        }
6201        impl ::core::convert::From<
6202            ::buffa::OwnedView<GetGuardSignerStatusRequestView<'static>>,
6203        > for GetGuardSignerStatusRequestOwnedView {
6204            fn from(
6205                inner: ::buffa::OwnedView<GetGuardSignerStatusRequestView<'static>>,
6206            ) -> Self {
6207                GetGuardSignerStatusRequestOwnedView(inner)
6208            }
6209        }
6210        impl ::core::convert::From<GetGuardSignerStatusRequestOwnedView>
6211        for ::buffa::OwnedView<GetGuardSignerStatusRequestView<'static>> {
6212            fn from(wrapper: GetGuardSignerStatusRequestOwnedView) -> Self {
6213                wrapper.0
6214            }
6215        }
6216        impl ::core::convert::AsRef<
6217            ::buffa::OwnedView<GetGuardSignerStatusRequestView<'static>>,
6218        > for GetGuardSignerStatusRequestOwnedView {
6219            fn as_ref(
6220                &self,
6221            ) -> &::buffa::OwnedView<GetGuardSignerStatusRequestView<'static>> {
6222                &self.0
6223            }
6224        }
6225        impl ::buffa::HasMessageView for super::super::GetGuardSignerStatusRequest {
6226            type View<'a> = GetGuardSignerStatusRequestView<'a>;
6227            type ViewHandle = GetGuardSignerStatusRequestOwnedView;
6228        }
6229        impl ::serde::Serialize for GetGuardSignerStatusRequestOwnedView {
6230            fn serialize<__S: ::serde::Serializer>(
6231                &self,
6232                __s: __S,
6233            ) -> ::core::result::Result<__S::Ok, __S::Error> {
6234                ::serde::Serialize::serialize(&self.0, __s)
6235            }
6236        }
6237        /// GetGuardSignerStatusResponse returns stored and on-chain signer state.
6238        #[derive(Clone, Debug, Default)]
6239        pub struct GetGuardSignerStatusResponseView<'a> {
6240            /// Stored and live guard signer status for the selected account target.
6241            ///
6242            /// Field 1: `status`
6243            pub status: ::buffa::MessageFieldView<
6244                super::super::__buffa::view::GuardSignerStatusView<'a>,
6245            >,
6246            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
6247        }
6248        impl<'a> ::buffa::MessageView<'a> for GetGuardSignerStatusResponseView<'a> {
6249            type Owned = super::super::GetGuardSignerStatusResponse;
6250            fn decode_view(
6251                buf: &'a [u8],
6252            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6253                let __limit = ::core::cell::Cell::new(
6254                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
6255                );
6256                <Self as ::buffa::MessageView>::decode_view_ctx(
6257                    buf,
6258                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
6259                )
6260            }
6261            fn decode_view_with_ctx(
6262                buf: &'a [u8],
6263                ctx: ::buffa::DecodeContext<'_>,
6264            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6265                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
6266            }
6267            fn merge_view_field(
6268                &mut self,
6269                tag: ::buffa::encoding::Tag,
6270                cur: &'a [u8],
6271                before_tag: &'a [u8],
6272                ctx: ::buffa::DecodeContext<'_>,
6273            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
6274                let _ = ctx;
6275                #[allow(unused_variables)]
6276                let view = self;
6277                let mut cur = cur;
6278                match tag.field_number() {
6279                    1u32 => {
6280                        ::buffa::encoding::check_wire_type(
6281                            tag,
6282                            ::buffa::encoding::WireType::LengthDelimited,
6283                        )?;
6284                        let __sub_ctx = ctx.descend()?;
6285                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
6286                        match view.status.as_mut() {
6287                            Some(existing) => {
6288                                ::buffa::MessageView::merge_into_view(
6289                                    existing,
6290                                    sub,
6291                                    __sub_ctx,
6292                                )?
6293                            }
6294                            None => {
6295                                view.status = ::buffa::MessageFieldView::set(
6296                                    <super::super::__buffa::view::GuardSignerStatusView as ::buffa::MessageView>::decode_view_ctx(
6297                                        sub,
6298                                        __sub_ctx,
6299                                    )?,
6300                                );
6301                            }
6302                        }
6303                    }
6304                    _ => {
6305                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
6306                        let span_len = before_tag.len() - cur.len();
6307                        view.__buffa_unknown_fields
6308                            .push_record(before_tag, span_len, ctx)?;
6309                    }
6310                }
6311                ::core::result::Result::Ok(cur)
6312            }
6313            fn to_owned_message(
6314                &self,
6315            ) -> ::core::result::Result<
6316                super::super::GetGuardSignerStatusResponse,
6317                ::buffa::DecodeError,
6318            > {
6319                self.to_owned_from_source(None)
6320            }
6321            #[allow(clippy::useless_conversion, clippy::needless_update)]
6322            fn to_owned_from_source(
6323                &self,
6324                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
6325            ) -> ::core::result::Result<
6326                super::super::GetGuardSignerStatusResponse,
6327                ::buffa::DecodeError,
6328            > {
6329                #[allow(unused_imports)]
6330                use ::buffa::alloc::string::ToString as _;
6331                let _ = __buffa_src;
6332                ::core::result::Result::Ok(super::super::GetGuardSignerStatusResponse {
6333                    status: match self.status.as_option() {
6334                        Some(v) => {
6335                            ::buffa::MessageField::<
6336                                super::super::GuardSignerStatus,
6337                            >::some(v.to_owned_from_source(__buffa_src)?)
6338                        }
6339                        None => ::buffa::MessageField::none(),
6340                    },
6341                    __buffa_unknown_fields: self
6342                        .__buffa_unknown_fields
6343                        .to_owned()?
6344                        .into(),
6345                    ..::core::default::Default::default()
6346                })
6347            }
6348        }
6349        impl<'a> ::buffa::ViewEncode<'a> for GetGuardSignerStatusResponseView<'a> {
6350            #[allow(clippy::needless_borrow, clippy::let_and_return)]
6351            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
6352                #[allow(unused_imports)]
6353                use ::buffa::Enumeration as _;
6354                let mut size = 0u32;
6355                if self.status.is_set() {
6356                    let __slot = __cache.reserve();
6357                    let inner_size = self.status.compute_size(__cache);
6358                    __cache.set(__slot, inner_size);
6359                    size
6360                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
6361                            + inner_size;
6362                }
6363                size += self.__buffa_unknown_fields.encoded_len() as u32;
6364                size
6365            }
6366            #[allow(clippy::needless_borrow)]
6367            fn write_to(
6368                &self,
6369                __cache: &mut ::buffa::SizeCache,
6370                buf: &mut impl ::buffa::bytes::BufMut,
6371            ) {
6372                #[allow(unused_imports)]
6373                use ::buffa::Enumeration as _;
6374                if self.status.is_set() {
6375                    ::buffa::types::put_len_delimited_header(
6376                        1u32,
6377                        __cache.consume_next(),
6378                        buf,
6379                    );
6380                    self.status.write_to(__cache, buf);
6381                }
6382                self.__buffa_unknown_fields.write_to(buf);
6383            }
6384        }
6385        /// Serializes this view as protobuf JSON.
6386        ///
6387        /// Implicit-presence fields with default values are omitted, `required`
6388        /// fields are always emitted, explicit-presence (`optional`) fields are
6389        /// emitted only when set, bytes fields are base64-encoded, and enum
6390        /// values are their proto name strings.
6391        ///
6392        /// This impl uses `serialize_map(None)` because the number of emitted
6393        /// fields depends on default-omission rules; serializers that require
6394        /// known map lengths (e.g. `bincode`) will return a runtime error.
6395        /// Use the owned message type for those formats.
6396        impl<'__a> ::serde::Serialize for GetGuardSignerStatusResponseView<'__a> {
6397            fn serialize<__S: ::serde::Serializer>(
6398                &self,
6399                __s: __S,
6400            ) -> ::core::result::Result<__S::Ok, __S::Error> {
6401                use ::serde::ser::SerializeMap as _;
6402                let mut __map = __s.serialize_map(::core::option::Option::None)?;
6403                {
6404                    if let ::core::option::Option::Some(__v) = self.status.as_option() {
6405                        __map.serialize_entry("status", __v)?;
6406                    }
6407                }
6408                __map.end()
6409            }
6410        }
6411        impl<'a> ::buffa::MessageName for GetGuardSignerStatusResponseView<'a> {
6412            const PACKAGE: &'static str = "chain.guard.v1";
6413            const NAME: &'static str = "GetGuardSignerStatusResponse";
6414            const FULL_NAME: &'static str = "chain.guard.v1.GetGuardSignerStatusResponse";
6415            const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.GetGuardSignerStatusResponse";
6416        }
6417        ::buffa::impl_default_view_instance!(GetGuardSignerStatusResponseView);
6418        ::buffa::impl_view_reborrow!(GetGuardSignerStatusResponseView);
6419        /** Self-contained, `'static` owned view of a `GetGuardSignerStatusResponse` message.
6420
6421 Wraps [`::buffa::OwnedView`]`<`[`GetGuardSignerStatusResponseView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
6422
6423 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`GetGuardSignerStatusResponseView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
6424        #[derive(Clone, Debug)]
6425        pub struct GetGuardSignerStatusResponseOwnedView(
6426            ::buffa::OwnedView<GetGuardSignerStatusResponseView<'static>>,
6427        );
6428        impl GetGuardSignerStatusResponseOwnedView {
6429            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
6430            ///
6431            /// The view borrows directly from the buffer's data; the buffer is
6432            /// retained inside the returned handle.
6433            ///
6434            /// # Errors
6435            ///
6436            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
6437            /// protobuf data.
6438            pub fn decode(
6439                bytes: ::buffa::bytes::Bytes,
6440            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6441                ::core::result::Result::Ok(
6442                    GetGuardSignerStatusResponseOwnedView(
6443                        ::buffa::OwnedView::decode(bytes)?,
6444                    ),
6445                )
6446            }
6447            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
6448            /// max message size).
6449            ///
6450            /// # Errors
6451            ///
6452            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
6453            /// exceeds the configured limits.
6454            pub fn decode_with_options(
6455                bytes: ::buffa::bytes::Bytes,
6456                opts: &::buffa::DecodeOptions,
6457            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6458                ::core::result::Result::Ok(
6459                    GetGuardSignerStatusResponseOwnedView(
6460                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
6461                    ),
6462                )
6463            }
6464            /// Build from an owned message via an encode → decode round-trip.
6465            ///
6466            /// # Errors
6467            ///
6468            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
6469            /// somehow invalid (should not happen for well-formed messages).
6470            pub fn from_owned(
6471                msg: &super::super::GetGuardSignerStatusResponse,
6472            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6473                ::core::result::Result::Ok(
6474                    GetGuardSignerStatusResponseOwnedView(
6475                        ::buffa::OwnedView::from_owned(msg)?,
6476                    ),
6477                )
6478            }
6479            /// Borrow the full [`GetGuardSignerStatusResponseView`] with its lifetime tied to `&self`.
6480            #[must_use]
6481            pub fn view(&self) -> &GetGuardSignerStatusResponseView<'_> {
6482                self.0.reborrow()
6483            }
6484            /// Convert to the owned message type.
6485            ///
6486            /// # Errors
6487            ///
6488            /// Returns an error if re-materializing preserved unknown fields
6489            /// fails (e.g. the unknown-field limit is exceeded).
6490            pub fn to_owned_message(
6491                &self,
6492            ) -> ::core::result::Result<
6493                super::super::GetGuardSignerStatusResponse,
6494                ::buffa::DecodeError,
6495            > {
6496                self.0.to_owned_message()
6497            }
6498            /// The underlying bytes buffer.
6499            #[must_use]
6500            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
6501                self.0.bytes()
6502            }
6503            /// Consume the handle, returning the underlying bytes buffer.
6504            #[must_use]
6505            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
6506                self.0.into_bytes()
6507            }
6508            /// Stored and live guard signer status for the selected account target.
6509            ///
6510            /// Field 1: `status`
6511            #[must_use]
6512            pub fn status(
6513                &self,
6514            ) -> &::buffa::MessageFieldView<
6515                super::super::__buffa::view::GuardSignerStatusView<'_>,
6516            > {
6517                &self.0.reborrow().status
6518            }
6519        }
6520        impl ::core::convert::From<
6521            ::buffa::OwnedView<GetGuardSignerStatusResponseView<'static>>,
6522        > for GetGuardSignerStatusResponseOwnedView {
6523            fn from(
6524                inner: ::buffa::OwnedView<GetGuardSignerStatusResponseView<'static>>,
6525            ) -> Self {
6526                GetGuardSignerStatusResponseOwnedView(inner)
6527            }
6528        }
6529        impl ::core::convert::From<GetGuardSignerStatusResponseOwnedView>
6530        for ::buffa::OwnedView<GetGuardSignerStatusResponseView<'static>> {
6531            fn from(wrapper: GetGuardSignerStatusResponseOwnedView) -> Self {
6532                wrapper.0
6533            }
6534        }
6535        impl ::core::convert::AsRef<
6536            ::buffa::OwnedView<GetGuardSignerStatusResponseView<'static>>,
6537        > for GetGuardSignerStatusResponseOwnedView {
6538            fn as_ref(
6539                &self,
6540            ) -> &::buffa::OwnedView<GetGuardSignerStatusResponseView<'static>> {
6541                &self.0
6542            }
6543        }
6544        impl ::buffa::HasMessageView for super::super::GetGuardSignerStatusResponse {
6545            type View<'a> = GetGuardSignerStatusResponseView<'a>;
6546            type ViewHandle = GetGuardSignerStatusResponseOwnedView;
6547        }
6548        impl ::serde::Serialize for GetGuardSignerStatusResponseOwnedView {
6549            fn serialize<__S: ::serde::Serializer>(
6550                &self,
6551                __s: __S,
6552            ) -> ::core::result::Result<__S::Ok, __S::Error> {
6553                ::serde::Serialize::serialize(&self.0, __s)
6554            }
6555        }
6556        /// SignProtectedActionRequest requests an approval for a supported FundingAccount
6557        /// protected action.
6558        #[derive(Clone, Debug, Default)]
6559        pub struct SignProtectedActionRequestView<'a> {
6560            /// Optional subaccount public id. When omitted, the authenticated caller's
6561            /// root account is used as the target account.
6562            ///
6563            /// Field 1: `subaccount_id`
6564            pub subaccount_id: u64,
6565            /// Protected action to approve.
6566            ///
6567            /// Field 2: `action`
6568            pub action: ::buffa::EnumValue<super::super::ProtectedAction>,
6569            /// Business arguments for the selected protected action.
6570            ///
6571            /// Field 3: `args`
6572            pub args: ::buffa::MessageFieldView<
6573                super::super::__buffa::view::ProtectedActionArgsView<'a>,
6574            >,
6575            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
6576        }
6577        impl<'a> ::buffa::MessageView<'a> for SignProtectedActionRequestView<'a> {
6578            type Owned = super::super::SignProtectedActionRequest;
6579            fn decode_view(
6580                buf: &'a [u8],
6581            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6582                let __limit = ::core::cell::Cell::new(
6583                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
6584                );
6585                <Self as ::buffa::MessageView>::decode_view_ctx(
6586                    buf,
6587                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
6588                )
6589            }
6590            fn decode_view_with_ctx(
6591                buf: &'a [u8],
6592                ctx: ::buffa::DecodeContext<'_>,
6593            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6594                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
6595            }
6596            fn merge_view_field(
6597                &mut self,
6598                tag: ::buffa::encoding::Tag,
6599                cur: &'a [u8],
6600                before_tag: &'a [u8],
6601                ctx: ::buffa::DecodeContext<'_>,
6602            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
6603                let _ = ctx;
6604                #[allow(unused_variables)]
6605                let view = self;
6606                let mut cur = cur;
6607                match tag.field_number() {
6608                    1u32 => {
6609                        ::buffa::encoding::check_wire_type(
6610                            tag,
6611                            ::buffa::encoding::WireType::Fixed64,
6612                        )?;
6613                        view.subaccount_id = ::buffa::types::decode_fixed64(&mut cur)?;
6614                    }
6615                    2u32 => {
6616                        ::buffa::encoding::check_wire_type(
6617                            tag,
6618                            ::buffa::encoding::WireType::Varint,
6619                        )?;
6620                        view.action = ::buffa::EnumValue::from(
6621                            ::buffa::types::decode_int32(&mut cur)?,
6622                        );
6623                    }
6624                    3u32 => {
6625                        ::buffa::encoding::check_wire_type(
6626                            tag,
6627                            ::buffa::encoding::WireType::LengthDelimited,
6628                        )?;
6629                        let __sub_ctx = ctx.descend()?;
6630                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
6631                        match view.args.as_mut() {
6632                            Some(existing) => {
6633                                ::buffa::MessageView::merge_into_view(
6634                                    existing,
6635                                    sub,
6636                                    __sub_ctx,
6637                                )?
6638                            }
6639                            None => {
6640                                view.args = ::buffa::MessageFieldView::set(
6641                                    <super::super::__buffa::view::ProtectedActionArgsView as ::buffa::MessageView>::decode_view_ctx(
6642                                        sub,
6643                                        __sub_ctx,
6644                                    )?,
6645                                );
6646                            }
6647                        }
6648                    }
6649                    _ => {
6650                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
6651                        let span_len = before_tag.len() - cur.len();
6652                        view.__buffa_unknown_fields
6653                            .push_record(before_tag, span_len, ctx)?;
6654                    }
6655                }
6656                ::core::result::Result::Ok(cur)
6657            }
6658            fn to_owned_message(
6659                &self,
6660            ) -> ::core::result::Result<
6661                super::super::SignProtectedActionRequest,
6662                ::buffa::DecodeError,
6663            > {
6664                self.to_owned_from_source(None)
6665            }
6666            #[allow(clippy::useless_conversion, clippy::needless_update)]
6667            fn to_owned_from_source(
6668                &self,
6669                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
6670            ) -> ::core::result::Result<
6671                super::super::SignProtectedActionRequest,
6672                ::buffa::DecodeError,
6673            > {
6674                #[allow(unused_imports)]
6675                use ::buffa::alloc::string::ToString as _;
6676                let _ = __buffa_src;
6677                ::core::result::Result::Ok(super::super::SignProtectedActionRequest {
6678                    subaccount_id: self.subaccount_id,
6679                    action: self.action,
6680                    args: match self.args.as_option() {
6681                        Some(v) => {
6682                            ::buffa::MessageField::<
6683                                super::super::ProtectedActionArgs,
6684                            >::some(v.to_owned_from_source(__buffa_src)?)
6685                        }
6686                        None => ::buffa::MessageField::none(),
6687                    },
6688                    __buffa_unknown_fields: self
6689                        .__buffa_unknown_fields
6690                        .to_owned()?
6691                        .into(),
6692                    ..::core::default::Default::default()
6693                })
6694            }
6695        }
6696        impl<'a> ::buffa::ViewEncode<'a> for SignProtectedActionRequestView<'a> {
6697            #[allow(clippy::needless_borrow, clippy::let_and_return)]
6698            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
6699                #[allow(unused_imports)]
6700                use ::buffa::Enumeration as _;
6701                let mut size = 0u32;
6702                if self.subaccount_id != 0u64 {
6703                    size += 1u32 + ::buffa::types::FIXED64_ENCODED_LEN as u32;
6704                }
6705                {
6706                    let val = self.action.to_i32();
6707                    if val != 0 {
6708                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
6709                    }
6710                }
6711                if self.args.is_set() {
6712                    let __slot = __cache.reserve();
6713                    let inner_size = self.args.compute_size(__cache);
6714                    __cache.set(__slot, inner_size);
6715                    size
6716                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
6717                            + inner_size;
6718                }
6719                size += self.__buffa_unknown_fields.encoded_len() as u32;
6720                size
6721            }
6722            #[allow(clippy::needless_borrow)]
6723            fn write_to(
6724                &self,
6725                __cache: &mut ::buffa::SizeCache,
6726                buf: &mut impl ::buffa::bytes::BufMut,
6727            ) {
6728                #[allow(unused_imports)]
6729                use ::buffa::Enumeration as _;
6730                if self.subaccount_id != 0u64 {
6731                    ::buffa::types::put_fixed64_field(1u32, self.subaccount_id, buf);
6732                }
6733                {
6734                    let val = self.action.to_i32();
6735                    if val != 0 {
6736                        ::buffa::types::put_int32_field(2u32, val, buf);
6737                    }
6738                }
6739                if self.args.is_set() {
6740                    ::buffa::types::put_len_delimited_header(
6741                        3u32,
6742                        __cache.consume_next(),
6743                        buf,
6744                    );
6745                    self.args.write_to(__cache, buf);
6746                }
6747                self.__buffa_unknown_fields.write_to(buf);
6748            }
6749        }
6750        /// Serializes this view as protobuf JSON.
6751        ///
6752        /// Implicit-presence fields with default values are omitted, `required`
6753        /// fields are always emitted, explicit-presence (`optional`) fields are
6754        /// emitted only when set, bytes fields are base64-encoded, and enum
6755        /// values are their proto name strings.
6756        ///
6757        /// This impl uses `serialize_map(None)` because the number of emitted
6758        /// fields depends on default-omission rules; serializers that require
6759        /// known map lengths (e.g. `bincode`) will return a runtime error.
6760        /// Use the owned message type for those formats.
6761        impl<'__a> ::serde::Serialize for SignProtectedActionRequestView<'__a> {
6762            fn serialize<__S: ::serde::Serializer>(
6763                &self,
6764                __s: __S,
6765            ) -> ::core::result::Result<__S::Ok, __S::Error> {
6766                use ::serde::ser::SerializeMap as _;
6767                let mut __map = __s.serialize_map(::core::option::Option::None)?;
6768                if !::buffa::json_helpers::skip_if::is_zero_u64(&self.subaccount_id) {
6769                    __map
6770                        .serialize_entry(
6771                            "subaccountId",
6772                            &::buffa::json_helpers::ProtoJson(&self.subaccount_id),
6773                        )?;
6774                }
6775                if !::buffa::json_helpers::skip_if::is_default_enum_value(&self.action) {
6776                    __map.serialize_entry("action", &self.action)?;
6777                }
6778                {
6779                    if let ::core::option::Option::Some(__v) = self.args.as_option() {
6780                        __map.serialize_entry("args", __v)?;
6781                    }
6782                }
6783                __map.end()
6784            }
6785        }
6786        impl<'a> ::buffa::MessageName for SignProtectedActionRequestView<'a> {
6787            const PACKAGE: &'static str = "chain.guard.v1";
6788            const NAME: &'static str = "SignProtectedActionRequest";
6789            const FULL_NAME: &'static str = "chain.guard.v1.SignProtectedActionRequest";
6790            const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.SignProtectedActionRequest";
6791        }
6792        ::buffa::impl_default_view_instance!(SignProtectedActionRequestView);
6793        ::buffa::impl_view_reborrow!(SignProtectedActionRequestView);
6794        /** Self-contained, `'static` owned view of a `SignProtectedActionRequest` message.
6795
6796 Wraps [`::buffa::OwnedView`]`<`[`SignProtectedActionRequestView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
6797
6798 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`SignProtectedActionRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
6799        #[derive(Clone, Debug)]
6800        pub struct SignProtectedActionRequestOwnedView(
6801            ::buffa::OwnedView<SignProtectedActionRequestView<'static>>,
6802        );
6803        impl SignProtectedActionRequestOwnedView {
6804            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
6805            ///
6806            /// The view borrows directly from the buffer's data; the buffer is
6807            /// retained inside the returned handle.
6808            ///
6809            /// # Errors
6810            ///
6811            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
6812            /// protobuf data.
6813            pub fn decode(
6814                bytes: ::buffa::bytes::Bytes,
6815            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6816                ::core::result::Result::Ok(
6817                    SignProtectedActionRequestOwnedView(
6818                        ::buffa::OwnedView::decode(bytes)?,
6819                    ),
6820                )
6821            }
6822            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
6823            /// max message size).
6824            ///
6825            /// # Errors
6826            ///
6827            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
6828            /// exceeds the configured limits.
6829            pub fn decode_with_options(
6830                bytes: ::buffa::bytes::Bytes,
6831                opts: &::buffa::DecodeOptions,
6832            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6833                ::core::result::Result::Ok(
6834                    SignProtectedActionRequestOwnedView(
6835                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
6836                    ),
6837                )
6838            }
6839            /// Build from an owned message via an encode → decode round-trip.
6840            ///
6841            /// # Errors
6842            ///
6843            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
6844            /// somehow invalid (should not happen for well-formed messages).
6845            pub fn from_owned(
6846                msg: &super::super::SignProtectedActionRequest,
6847            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6848                ::core::result::Result::Ok(
6849                    SignProtectedActionRequestOwnedView(
6850                        ::buffa::OwnedView::from_owned(msg)?,
6851                    ),
6852                )
6853            }
6854            /// Borrow the full [`SignProtectedActionRequestView`] with its lifetime tied to `&self`.
6855            #[must_use]
6856            pub fn view(&self) -> &SignProtectedActionRequestView<'_> {
6857                self.0.reborrow()
6858            }
6859            /// Convert to the owned message type.
6860            ///
6861            /// # Errors
6862            ///
6863            /// Returns an error if re-materializing preserved unknown fields
6864            /// fails (e.g. the unknown-field limit is exceeded).
6865            pub fn to_owned_message(
6866                &self,
6867            ) -> ::core::result::Result<
6868                super::super::SignProtectedActionRequest,
6869                ::buffa::DecodeError,
6870            > {
6871                self.0.to_owned_message()
6872            }
6873            /// The underlying bytes buffer.
6874            #[must_use]
6875            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
6876                self.0.bytes()
6877            }
6878            /// Consume the handle, returning the underlying bytes buffer.
6879            #[must_use]
6880            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
6881                self.0.into_bytes()
6882            }
6883            /// Optional subaccount public id. When omitted, the authenticated caller's
6884            /// root account is used as the target account.
6885            ///
6886            /// Field 1: `subaccount_id`
6887            #[must_use]
6888            pub fn subaccount_id(&self) -> u64 {
6889                self.0.reborrow().subaccount_id
6890            }
6891            /// Protected action to approve.
6892            ///
6893            /// Field 2: `action`
6894            #[must_use]
6895            pub fn action(&self) -> ::buffa::EnumValue<super::super::ProtectedAction> {
6896                self.0.reborrow().action
6897            }
6898            /// Business arguments for the selected protected action.
6899            ///
6900            /// Field 3: `args`
6901            #[must_use]
6902            pub fn args(
6903                &self,
6904            ) -> &::buffa::MessageFieldView<
6905                super::super::__buffa::view::ProtectedActionArgsView<'_>,
6906            > {
6907                &self.0.reborrow().args
6908            }
6909        }
6910        impl ::core::convert::From<
6911            ::buffa::OwnedView<SignProtectedActionRequestView<'static>>,
6912        > for SignProtectedActionRequestOwnedView {
6913            fn from(
6914                inner: ::buffa::OwnedView<SignProtectedActionRequestView<'static>>,
6915            ) -> Self {
6916                SignProtectedActionRequestOwnedView(inner)
6917            }
6918        }
6919        impl ::core::convert::From<SignProtectedActionRequestOwnedView>
6920        for ::buffa::OwnedView<SignProtectedActionRequestView<'static>> {
6921            fn from(wrapper: SignProtectedActionRequestOwnedView) -> Self {
6922                wrapper.0
6923            }
6924        }
6925        impl ::core::convert::AsRef<
6926            ::buffa::OwnedView<SignProtectedActionRequestView<'static>>,
6927        > for SignProtectedActionRequestOwnedView {
6928            fn as_ref(
6929                &self,
6930            ) -> &::buffa::OwnedView<SignProtectedActionRequestView<'static>> {
6931                &self.0
6932            }
6933        }
6934        impl ::buffa::HasMessageView for super::super::SignProtectedActionRequest {
6935            type View<'a> = SignProtectedActionRequestView<'a>;
6936            type ViewHandle = SignProtectedActionRequestOwnedView;
6937        }
6938        impl ::serde::Serialize for SignProtectedActionRequestOwnedView {
6939            fn serialize<__S: ::serde::Serializer>(
6940                &self,
6941                __s: __S,
6942            ) -> ::core::result::Result<__S::Ok, __S::Error> {
6943                ::serde::Serialize::serialize(&self.0, __s)
6944            }
6945        }
6946        /// SignProtectedActionResponse returns the contract submission approval.
6947        #[derive(Clone, Debug, Default)]
6948        pub struct SignProtectedActionResponseView<'a> {
6949            /// Approval signature payload for the requested protected action.
6950            ///
6951            /// Field 1: `approval`
6952            pub approval: ::buffa::MessageFieldView<
6953                super::super::__buffa::view::GuardApprovalView<'a>,
6954            >,
6955            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
6956        }
6957        impl<'a> ::buffa::MessageView<'a> for SignProtectedActionResponseView<'a> {
6958            type Owned = super::super::SignProtectedActionResponse;
6959            fn decode_view(
6960                buf: &'a [u8],
6961            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6962                let __limit = ::core::cell::Cell::new(
6963                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
6964                );
6965                <Self as ::buffa::MessageView>::decode_view_ctx(
6966                    buf,
6967                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
6968                )
6969            }
6970            fn decode_view_with_ctx(
6971                buf: &'a [u8],
6972                ctx: ::buffa::DecodeContext<'_>,
6973            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
6974                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
6975            }
6976            fn merge_view_field(
6977                &mut self,
6978                tag: ::buffa::encoding::Tag,
6979                cur: &'a [u8],
6980                before_tag: &'a [u8],
6981                ctx: ::buffa::DecodeContext<'_>,
6982            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
6983                let _ = ctx;
6984                #[allow(unused_variables)]
6985                let view = self;
6986                let mut cur = cur;
6987                match tag.field_number() {
6988                    1u32 => {
6989                        ::buffa::encoding::check_wire_type(
6990                            tag,
6991                            ::buffa::encoding::WireType::LengthDelimited,
6992                        )?;
6993                        let __sub_ctx = ctx.descend()?;
6994                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
6995                        match view.approval.as_mut() {
6996                            Some(existing) => {
6997                                ::buffa::MessageView::merge_into_view(
6998                                    existing,
6999                                    sub,
7000                                    __sub_ctx,
7001                                )?
7002                            }
7003                            None => {
7004                                view.approval = ::buffa::MessageFieldView::set(
7005                                    <super::super::__buffa::view::GuardApprovalView as ::buffa::MessageView>::decode_view_ctx(
7006                                        sub,
7007                                        __sub_ctx,
7008                                    )?,
7009                                );
7010                            }
7011                        }
7012                    }
7013                    _ => {
7014                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
7015                        let span_len = before_tag.len() - cur.len();
7016                        view.__buffa_unknown_fields
7017                            .push_record(before_tag, span_len, ctx)?;
7018                    }
7019                }
7020                ::core::result::Result::Ok(cur)
7021            }
7022            fn to_owned_message(
7023                &self,
7024            ) -> ::core::result::Result<
7025                super::super::SignProtectedActionResponse,
7026                ::buffa::DecodeError,
7027            > {
7028                self.to_owned_from_source(None)
7029            }
7030            #[allow(clippy::useless_conversion, clippy::needless_update)]
7031            fn to_owned_from_source(
7032                &self,
7033                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
7034            ) -> ::core::result::Result<
7035                super::super::SignProtectedActionResponse,
7036                ::buffa::DecodeError,
7037            > {
7038                #[allow(unused_imports)]
7039                use ::buffa::alloc::string::ToString as _;
7040                let _ = __buffa_src;
7041                ::core::result::Result::Ok(super::super::SignProtectedActionResponse {
7042                    approval: match self.approval.as_option() {
7043                        Some(v) => {
7044                            ::buffa::MessageField::<
7045                                super::super::GuardApproval,
7046                            >::some(v.to_owned_from_source(__buffa_src)?)
7047                        }
7048                        None => ::buffa::MessageField::none(),
7049                    },
7050                    __buffa_unknown_fields: self
7051                        .__buffa_unknown_fields
7052                        .to_owned()?
7053                        .into(),
7054                    ..::core::default::Default::default()
7055                })
7056            }
7057        }
7058        impl<'a> ::buffa::ViewEncode<'a> for SignProtectedActionResponseView<'a> {
7059            #[allow(clippy::needless_borrow, clippy::let_and_return)]
7060            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
7061                #[allow(unused_imports)]
7062                use ::buffa::Enumeration as _;
7063                let mut size = 0u32;
7064                if self.approval.is_set() {
7065                    let __slot = __cache.reserve();
7066                    let inner_size = self.approval.compute_size(__cache);
7067                    __cache.set(__slot, inner_size);
7068                    size
7069                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
7070                            + inner_size;
7071                }
7072                size += self.__buffa_unknown_fields.encoded_len() as u32;
7073                size
7074            }
7075            #[allow(clippy::needless_borrow)]
7076            fn write_to(
7077                &self,
7078                __cache: &mut ::buffa::SizeCache,
7079                buf: &mut impl ::buffa::bytes::BufMut,
7080            ) {
7081                #[allow(unused_imports)]
7082                use ::buffa::Enumeration as _;
7083                if self.approval.is_set() {
7084                    ::buffa::types::put_len_delimited_header(
7085                        1u32,
7086                        __cache.consume_next(),
7087                        buf,
7088                    );
7089                    self.approval.write_to(__cache, buf);
7090                }
7091                self.__buffa_unknown_fields.write_to(buf);
7092            }
7093        }
7094        /// Serializes this view as protobuf JSON.
7095        ///
7096        /// Implicit-presence fields with default values are omitted, `required`
7097        /// fields are always emitted, explicit-presence (`optional`) fields are
7098        /// emitted only when set, bytes fields are base64-encoded, and enum
7099        /// values are their proto name strings.
7100        ///
7101        /// This impl uses `serialize_map(None)` because the number of emitted
7102        /// fields depends on default-omission rules; serializers that require
7103        /// known map lengths (e.g. `bincode`) will return a runtime error.
7104        /// Use the owned message type for those formats.
7105        impl<'__a> ::serde::Serialize for SignProtectedActionResponseView<'__a> {
7106            fn serialize<__S: ::serde::Serializer>(
7107                &self,
7108                __s: __S,
7109            ) -> ::core::result::Result<__S::Ok, __S::Error> {
7110                use ::serde::ser::SerializeMap as _;
7111                let mut __map = __s.serialize_map(::core::option::Option::None)?;
7112                {
7113                    if let ::core::option::Option::Some(__v) = self.approval.as_option()
7114                    {
7115                        __map.serialize_entry("approval", __v)?;
7116                    }
7117                }
7118                __map.end()
7119            }
7120        }
7121        impl<'a> ::buffa::MessageName for SignProtectedActionResponseView<'a> {
7122            const PACKAGE: &'static str = "chain.guard.v1";
7123            const NAME: &'static str = "SignProtectedActionResponse";
7124            const FULL_NAME: &'static str = "chain.guard.v1.SignProtectedActionResponse";
7125            const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.SignProtectedActionResponse";
7126        }
7127        ::buffa::impl_default_view_instance!(SignProtectedActionResponseView);
7128        ::buffa::impl_view_reborrow!(SignProtectedActionResponseView);
7129        /** Self-contained, `'static` owned view of a `SignProtectedActionResponse` message.
7130
7131 Wraps [`::buffa::OwnedView`]`<`[`SignProtectedActionResponseView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
7132
7133 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`SignProtectedActionResponseView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
7134        #[derive(Clone, Debug)]
7135        pub struct SignProtectedActionResponseOwnedView(
7136            ::buffa::OwnedView<SignProtectedActionResponseView<'static>>,
7137        );
7138        impl SignProtectedActionResponseOwnedView {
7139            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
7140            ///
7141            /// The view borrows directly from the buffer's data; the buffer is
7142            /// retained inside the returned handle.
7143            ///
7144            /// # Errors
7145            ///
7146            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
7147            /// protobuf data.
7148            pub fn decode(
7149                bytes: ::buffa::bytes::Bytes,
7150            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7151                ::core::result::Result::Ok(
7152                    SignProtectedActionResponseOwnedView(
7153                        ::buffa::OwnedView::decode(bytes)?,
7154                    ),
7155                )
7156            }
7157            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
7158            /// max message size).
7159            ///
7160            /// # Errors
7161            ///
7162            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
7163            /// exceeds the configured limits.
7164            pub fn decode_with_options(
7165                bytes: ::buffa::bytes::Bytes,
7166                opts: &::buffa::DecodeOptions,
7167            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7168                ::core::result::Result::Ok(
7169                    SignProtectedActionResponseOwnedView(
7170                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
7171                    ),
7172                )
7173            }
7174            /// Build from an owned message via an encode → decode round-trip.
7175            ///
7176            /// # Errors
7177            ///
7178            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
7179            /// somehow invalid (should not happen for well-formed messages).
7180            pub fn from_owned(
7181                msg: &super::super::SignProtectedActionResponse,
7182            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7183                ::core::result::Result::Ok(
7184                    SignProtectedActionResponseOwnedView(
7185                        ::buffa::OwnedView::from_owned(msg)?,
7186                    ),
7187                )
7188            }
7189            /// Borrow the full [`SignProtectedActionResponseView`] with its lifetime tied to `&self`.
7190            #[must_use]
7191            pub fn view(&self) -> &SignProtectedActionResponseView<'_> {
7192                self.0.reborrow()
7193            }
7194            /// Convert to the owned message type.
7195            ///
7196            /// # Errors
7197            ///
7198            /// Returns an error if re-materializing preserved unknown fields
7199            /// fails (e.g. the unknown-field limit is exceeded).
7200            pub fn to_owned_message(
7201                &self,
7202            ) -> ::core::result::Result<
7203                super::super::SignProtectedActionResponse,
7204                ::buffa::DecodeError,
7205            > {
7206                self.0.to_owned_message()
7207            }
7208            /// The underlying bytes buffer.
7209            #[must_use]
7210            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
7211                self.0.bytes()
7212            }
7213            /// Consume the handle, returning the underlying bytes buffer.
7214            #[must_use]
7215            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
7216                self.0.into_bytes()
7217            }
7218            /// Approval signature payload for the requested protected action.
7219            ///
7220            /// Field 1: `approval`
7221            #[must_use]
7222            pub fn approval(
7223                &self,
7224            ) -> &::buffa::MessageFieldView<
7225                super::super::__buffa::view::GuardApprovalView<'_>,
7226            > {
7227                &self.0.reborrow().approval
7228            }
7229        }
7230        impl ::core::convert::From<
7231            ::buffa::OwnedView<SignProtectedActionResponseView<'static>>,
7232        > for SignProtectedActionResponseOwnedView {
7233            fn from(
7234                inner: ::buffa::OwnedView<SignProtectedActionResponseView<'static>>,
7235            ) -> Self {
7236                SignProtectedActionResponseOwnedView(inner)
7237            }
7238        }
7239        impl ::core::convert::From<SignProtectedActionResponseOwnedView>
7240        for ::buffa::OwnedView<SignProtectedActionResponseView<'static>> {
7241            fn from(wrapper: SignProtectedActionResponseOwnedView) -> Self {
7242                wrapper.0
7243            }
7244        }
7245        impl ::core::convert::AsRef<
7246            ::buffa::OwnedView<SignProtectedActionResponseView<'static>>,
7247        > for SignProtectedActionResponseOwnedView {
7248            fn as_ref(
7249                &self,
7250            ) -> &::buffa::OwnedView<SignProtectedActionResponseView<'static>> {
7251                &self.0
7252            }
7253        }
7254        impl ::buffa::HasMessageView for super::super::SignProtectedActionResponse {
7255            type View<'a> = SignProtectedActionResponseView<'a>;
7256            type ViewHandle = SignProtectedActionResponseOwnedView;
7257        }
7258        impl ::serde::Serialize for SignProtectedActionResponseOwnedView {
7259            fn serialize<__S: ::serde::Serializer>(
7260                &self,
7261                __s: __S,
7262            ) -> ::core::result::Result<__S::Ok, __S::Error> {
7263                ::serde::Serialize::serialize(&self.0, __s)
7264            }
7265        }
7266        /// BatchSignProtectedActionItem is one protected FundingAccount action inside a
7267        /// batched SmartAccount submission. The service signs items in this exact order.
7268        #[derive(Clone, Debug, Default)]
7269        pub struct BatchSignProtectedActionItemView<'a> {
7270            /// Protected action to approve for this batch item.
7271            ///
7272            /// Field 1: `action`
7273            pub action: ::buffa::EnumValue<super::super::ProtectedAction>,
7274            /// Business arguments for this batch item.
7275            ///
7276            /// Field 2: `args`
7277            pub args: ::buffa::MessageFieldView<
7278                super::super::__buffa::view::ProtectedActionArgsView<'a>,
7279            >,
7280            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
7281        }
7282        impl<'a> ::buffa::MessageView<'a> for BatchSignProtectedActionItemView<'a> {
7283            type Owned = super::super::BatchSignProtectedActionItem;
7284            fn decode_view(
7285                buf: &'a [u8],
7286            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7287                let __limit = ::core::cell::Cell::new(
7288                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
7289                );
7290                <Self as ::buffa::MessageView>::decode_view_ctx(
7291                    buf,
7292                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
7293                )
7294            }
7295            fn decode_view_with_ctx(
7296                buf: &'a [u8],
7297                ctx: ::buffa::DecodeContext<'_>,
7298            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7299                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
7300            }
7301            fn merge_view_field(
7302                &mut self,
7303                tag: ::buffa::encoding::Tag,
7304                cur: &'a [u8],
7305                before_tag: &'a [u8],
7306                ctx: ::buffa::DecodeContext<'_>,
7307            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
7308                let _ = ctx;
7309                #[allow(unused_variables)]
7310                let view = self;
7311                let mut cur = cur;
7312                match tag.field_number() {
7313                    1u32 => {
7314                        ::buffa::encoding::check_wire_type(
7315                            tag,
7316                            ::buffa::encoding::WireType::Varint,
7317                        )?;
7318                        view.action = ::buffa::EnumValue::from(
7319                            ::buffa::types::decode_int32(&mut cur)?,
7320                        );
7321                    }
7322                    2u32 => {
7323                        ::buffa::encoding::check_wire_type(
7324                            tag,
7325                            ::buffa::encoding::WireType::LengthDelimited,
7326                        )?;
7327                        let __sub_ctx = ctx.descend()?;
7328                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
7329                        match view.args.as_mut() {
7330                            Some(existing) => {
7331                                ::buffa::MessageView::merge_into_view(
7332                                    existing,
7333                                    sub,
7334                                    __sub_ctx,
7335                                )?
7336                            }
7337                            None => {
7338                                view.args = ::buffa::MessageFieldView::set(
7339                                    <super::super::__buffa::view::ProtectedActionArgsView as ::buffa::MessageView>::decode_view_ctx(
7340                                        sub,
7341                                        __sub_ctx,
7342                                    )?,
7343                                );
7344                            }
7345                        }
7346                    }
7347                    _ => {
7348                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
7349                        let span_len = before_tag.len() - cur.len();
7350                        view.__buffa_unknown_fields
7351                            .push_record(before_tag, span_len, ctx)?;
7352                    }
7353                }
7354                ::core::result::Result::Ok(cur)
7355            }
7356            fn to_owned_message(
7357                &self,
7358            ) -> ::core::result::Result<
7359                super::super::BatchSignProtectedActionItem,
7360                ::buffa::DecodeError,
7361            > {
7362                self.to_owned_from_source(None)
7363            }
7364            #[allow(clippy::useless_conversion, clippy::needless_update)]
7365            fn to_owned_from_source(
7366                &self,
7367                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
7368            ) -> ::core::result::Result<
7369                super::super::BatchSignProtectedActionItem,
7370                ::buffa::DecodeError,
7371            > {
7372                #[allow(unused_imports)]
7373                use ::buffa::alloc::string::ToString as _;
7374                let _ = __buffa_src;
7375                ::core::result::Result::Ok(super::super::BatchSignProtectedActionItem {
7376                    action: self.action,
7377                    args: match self.args.as_option() {
7378                        Some(v) => {
7379                            ::buffa::MessageField::<
7380                                super::super::ProtectedActionArgs,
7381                            >::some(v.to_owned_from_source(__buffa_src)?)
7382                        }
7383                        None => ::buffa::MessageField::none(),
7384                    },
7385                    __buffa_unknown_fields: self
7386                        .__buffa_unknown_fields
7387                        .to_owned()?
7388                        .into(),
7389                    ..::core::default::Default::default()
7390                })
7391            }
7392        }
7393        impl<'a> ::buffa::ViewEncode<'a> for BatchSignProtectedActionItemView<'a> {
7394            #[allow(clippy::needless_borrow, clippy::let_and_return)]
7395            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
7396                #[allow(unused_imports)]
7397                use ::buffa::Enumeration as _;
7398                let mut size = 0u32;
7399                {
7400                    let val = self.action.to_i32();
7401                    if val != 0 {
7402                        size += 1u32 + ::buffa::types::int32_encoded_len(val) as u32;
7403                    }
7404                }
7405                if self.args.is_set() {
7406                    let __slot = __cache.reserve();
7407                    let inner_size = self.args.compute_size(__cache);
7408                    __cache.set(__slot, inner_size);
7409                    size
7410                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
7411                            + inner_size;
7412                }
7413                size += self.__buffa_unknown_fields.encoded_len() as u32;
7414                size
7415            }
7416            #[allow(clippy::needless_borrow)]
7417            fn write_to(
7418                &self,
7419                __cache: &mut ::buffa::SizeCache,
7420                buf: &mut impl ::buffa::bytes::BufMut,
7421            ) {
7422                #[allow(unused_imports)]
7423                use ::buffa::Enumeration as _;
7424                {
7425                    let val = self.action.to_i32();
7426                    if val != 0 {
7427                        ::buffa::types::put_int32_field(1u32, val, buf);
7428                    }
7429                }
7430                if self.args.is_set() {
7431                    ::buffa::types::put_len_delimited_header(
7432                        2u32,
7433                        __cache.consume_next(),
7434                        buf,
7435                    );
7436                    self.args.write_to(__cache, buf);
7437                }
7438                self.__buffa_unknown_fields.write_to(buf);
7439            }
7440        }
7441        /// Serializes this view as protobuf JSON.
7442        ///
7443        /// Implicit-presence fields with default values are omitted, `required`
7444        /// fields are always emitted, explicit-presence (`optional`) fields are
7445        /// emitted only when set, bytes fields are base64-encoded, and enum
7446        /// values are their proto name strings.
7447        ///
7448        /// This impl uses `serialize_map(None)` because the number of emitted
7449        /// fields depends on default-omission rules; serializers that require
7450        /// known map lengths (e.g. `bincode`) will return a runtime error.
7451        /// Use the owned message type for those formats.
7452        impl<'__a> ::serde::Serialize for BatchSignProtectedActionItemView<'__a> {
7453            fn serialize<__S: ::serde::Serializer>(
7454                &self,
7455                __s: __S,
7456            ) -> ::core::result::Result<__S::Ok, __S::Error> {
7457                use ::serde::ser::SerializeMap as _;
7458                let mut __map = __s.serialize_map(::core::option::Option::None)?;
7459                if !::buffa::json_helpers::skip_if::is_default_enum_value(&self.action) {
7460                    __map.serialize_entry("action", &self.action)?;
7461                }
7462                {
7463                    if let ::core::option::Option::Some(__v) = self.args.as_option() {
7464                        __map.serialize_entry("args", __v)?;
7465                    }
7466                }
7467                __map.end()
7468            }
7469        }
7470        impl<'a> ::buffa::MessageName for BatchSignProtectedActionItemView<'a> {
7471            const PACKAGE: &'static str = "chain.guard.v1";
7472            const NAME: &'static str = "BatchSignProtectedActionItem";
7473            const FULL_NAME: &'static str = "chain.guard.v1.BatchSignProtectedActionItem";
7474            const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.BatchSignProtectedActionItem";
7475        }
7476        ::buffa::impl_default_view_instance!(BatchSignProtectedActionItemView);
7477        ::buffa::impl_view_reborrow!(BatchSignProtectedActionItemView);
7478        /** Self-contained, `'static` owned view of a `BatchSignProtectedActionItem` message.
7479
7480 Wraps [`::buffa::OwnedView`]`<`[`BatchSignProtectedActionItemView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
7481
7482 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`BatchSignProtectedActionItemView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
7483        #[derive(Clone, Debug)]
7484        pub struct BatchSignProtectedActionItemOwnedView(
7485            ::buffa::OwnedView<BatchSignProtectedActionItemView<'static>>,
7486        );
7487        impl BatchSignProtectedActionItemOwnedView {
7488            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
7489            ///
7490            /// The view borrows directly from the buffer's data; the buffer is
7491            /// retained inside the returned handle.
7492            ///
7493            /// # Errors
7494            ///
7495            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
7496            /// protobuf data.
7497            pub fn decode(
7498                bytes: ::buffa::bytes::Bytes,
7499            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7500                ::core::result::Result::Ok(
7501                    BatchSignProtectedActionItemOwnedView(
7502                        ::buffa::OwnedView::decode(bytes)?,
7503                    ),
7504                )
7505            }
7506            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
7507            /// max message size).
7508            ///
7509            /// # Errors
7510            ///
7511            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
7512            /// exceeds the configured limits.
7513            pub fn decode_with_options(
7514                bytes: ::buffa::bytes::Bytes,
7515                opts: &::buffa::DecodeOptions,
7516            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7517                ::core::result::Result::Ok(
7518                    BatchSignProtectedActionItemOwnedView(
7519                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
7520                    ),
7521                )
7522            }
7523            /// Build from an owned message via an encode → decode round-trip.
7524            ///
7525            /// # Errors
7526            ///
7527            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
7528            /// somehow invalid (should not happen for well-formed messages).
7529            pub fn from_owned(
7530                msg: &super::super::BatchSignProtectedActionItem,
7531            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7532                ::core::result::Result::Ok(
7533                    BatchSignProtectedActionItemOwnedView(
7534                        ::buffa::OwnedView::from_owned(msg)?,
7535                    ),
7536                )
7537            }
7538            /// Borrow the full [`BatchSignProtectedActionItemView`] with its lifetime tied to `&self`.
7539            #[must_use]
7540            pub fn view(&self) -> &BatchSignProtectedActionItemView<'_> {
7541                self.0.reborrow()
7542            }
7543            /// Convert to the owned message type.
7544            ///
7545            /// # Errors
7546            ///
7547            /// Returns an error if re-materializing preserved unknown fields
7548            /// fails (e.g. the unknown-field limit is exceeded).
7549            pub fn to_owned_message(
7550                &self,
7551            ) -> ::core::result::Result<
7552                super::super::BatchSignProtectedActionItem,
7553                ::buffa::DecodeError,
7554            > {
7555                self.0.to_owned_message()
7556            }
7557            /// The underlying bytes buffer.
7558            #[must_use]
7559            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
7560                self.0.bytes()
7561            }
7562            /// Consume the handle, returning the underlying bytes buffer.
7563            #[must_use]
7564            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
7565                self.0.into_bytes()
7566            }
7567            /// Protected action to approve for this batch item.
7568            ///
7569            /// Field 1: `action`
7570            #[must_use]
7571            pub fn action(&self) -> ::buffa::EnumValue<super::super::ProtectedAction> {
7572                self.0.reborrow().action
7573            }
7574            /// Business arguments for this batch item.
7575            ///
7576            /// Field 2: `args`
7577            #[must_use]
7578            pub fn args(
7579                &self,
7580            ) -> &::buffa::MessageFieldView<
7581                super::super::__buffa::view::ProtectedActionArgsView<'_>,
7582            > {
7583                &self.0.reborrow().args
7584            }
7585        }
7586        impl ::core::convert::From<
7587            ::buffa::OwnedView<BatchSignProtectedActionItemView<'static>>,
7588        > for BatchSignProtectedActionItemOwnedView {
7589            fn from(
7590                inner: ::buffa::OwnedView<BatchSignProtectedActionItemView<'static>>,
7591            ) -> Self {
7592                BatchSignProtectedActionItemOwnedView(inner)
7593            }
7594        }
7595        impl ::core::convert::From<BatchSignProtectedActionItemOwnedView>
7596        for ::buffa::OwnedView<BatchSignProtectedActionItemView<'static>> {
7597            fn from(wrapper: BatchSignProtectedActionItemOwnedView) -> Self {
7598                wrapper.0
7599            }
7600        }
7601        impl ::core::convert::AsRef<
7602            ::buffa::OwnedView<BatchSignProtectedActionItemView<'static>>,
7603        > for BatchSignProtectedActionItemOwnedView {
7604            fn as_ref(
7605                &self,
7606            ) -> &::buffa::OwnedView<BatchSignProtectedActionItemView<'static>> {
7607                &self.0
7608            }
7609        }
7610        impl ::buffa::HasMessageView for super::super::BatchSignProtectedActionItem {
7611            type View<'a> = BatchSignProtectedActionItemView<'a>;
7612            type ViewHandle = BatchSignProtectedActionItemOwnedView;
7613        }
7614        impl ::serde::Serialize for BatchSignProtectedActionItemOwnedView {
7615            fn serialize<__S: ::serde::Serializer>(
7616                &self,
7617                __s: __S,
7618            ) -> ::core::result::Result<__S::Ok, __S::Error> {
7619                ::serde::Serialize::serialize(&self.0, __s)
7620            }
7621        }
7622        /// BatchSignProtectedActionsRequest requests ordered approvals for one batched
7623        /// SmartAccount transaction. The server reads the first nonce from chain and
7624        /// assigns subsequent nonces by incrementing locally within this response.
7625        #[derive(Clone, Debug, Default)]
7626        pub struct BatchSignProtectedActionsRequestView<'a> {
7627            /// Optional subaccount public id. When omitted, the authenticated caller's
7628            /// root account is used as the target account.
7629            ///
7630            /// Field 1: `subaccount_id`
7631            pub subaccount_id: u64,
7632            /// Ordered protected actions to sign, max 20 items.
7633            ///
7634            /// Field 2: `actions`
7635            pub actions: ::buffa::RepeatedView<
7636                'a,
7637                super::super::__buffa::view::BatchSignProtectedActionItemView<'a>,
7638            >,
7639            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
7640        }
7641        impl<'a> ::buffa::MessageView<'a> for BatchSignProtectedActionsRequestView<'a> {
7642            type Owned = super::super::BatchSignProtectedActionsRequest;
7643            fn decode_view(
7644                buf: &'a [u8],
7645            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7646                let __limit = ::core::cell::Cell::new(
7647                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
7648                );
7649                <Self as ::buffa::MessageView>::decode_view_ctx(
7650                    buf,
7651                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
7652                )
7653            }
7654            fn decode_view_with_ctx(
7655                buf: &'a [u8],
7656                ctx: ::buffa::DecodeContext<'_>,
7657            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7658                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
7659            }
7660            fn merge_view_field(
7661                &mut self,
7662                tag: ::buffa::encoding::Tag,
7663                cur: &'a [u8],
7664                before_tag: &'a [u8],
7665                ctx: ::buffa::DecodeContext<'_>,
7666            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
7667                let _ = ctx;
7668                #[allow(unused_variables)]
7669                let view = self;
7670                let mut cur = cur;
7671                match tag.field_number() {
7672                    1u32 => {
7673                        ::buffa::encoding::check_wire_type(
7674                            tag,
7675                            ::buffa::encoding::WireType::Fixed64,
7676                        )?;
7677                        view.subaccount_id = ::buffa::types::decode_fixed64(&mut cur)?;
7678                    }
7679                    2u32 => {
7680                        ::buffa::encoding::check_wire_type(
7681                            tag,
7682                            ::buffa::encoding::WireType::LengthDelimited,
7683                        )?;
7684                        let __sub_ctx = ctx.descend()?;
7685                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
7686                        view.actions
7687                            .push(
7688                                <super::super::__buffa::view::BatchSignProtectedActionItemView as ::buffa::MessageView>::decode_view_ctx(
7689                                    sub,
7690                                    __sub_ctx,
7691                                )?,
7692                            );
7693                    }
7694                    _ => {
7695                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
7696                        let span_len = before_tag.len() - cur.len();
7697                        view.__buffa_unknown_fields
7698                            .push_record(before_tag, span_len, ctx)?;
7699                    }
7700                }
7701                ::core::result::Result::Ok(cur)
7702            }
7703            fn to_owned_message(
7704                &self,
7705            ) -> ::core::result::Result<
7706                super::super::BatchSignProtectedActionsRequest,
7707                ::buffa::DecodeError,
7708            > {
7709                self.to_owned_from_source(None)
7710            }
7711            #[allow(clippy::useless_conversion, clippy::needless_update)]
7712            fn to_owned_from_source(
7713                &self,
7714                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
7715            ) -> ::core::result::Result<
7716                super::super::BatchSignProtectedActionsRequest,
7717                ::buffa::DecodeError,
7718            > {
7719                #[allow(unused_imports)]
7720                use ::buffa::alloc::string::ToString as _;
7721                let _ = __buffa_src;
7722                ::core::result::Result::Ok(super::super::BatchSignProtectedActionsRequest {
7723                    subaccount_id: self.subaccount_id,
7724                    actions: self
7725                        .actions
7726                        .iter()
7727                        .map(|v| v.to_owned_from_source(__buffa_src))
7728                        .collect::<::core::result::Result<_, ::buffa::DecodeError>>()?,
7729                    __buffa_unknown_fields: self
7730                        .__buffa_unknown_fields
7731                        .to_owned()?
7732                        .into(),
7733                    ..::core::default::Default::default()
7734                })
7735            }
7736        }
7737        impl<'a> ::buffa::ViewEncode<'a> for BatchSignProtectedActionsRequestView<'a> {
7738            #[allow(clippy::needless_borrow, clippy::let_and_return)]
7739            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
7740                #[allow(unused_imports)]
7741                use ::buffa::Enumeration as _;
7742                let mut size = 0u32;
7743                if self.subaccount_id != 0u64 {
7744                    size += 1u32 + ::buffa::types::FIXED64_ENCODED_LEN as u32;
7745                }
7746                for v in &self.actions {
7747                    let __slot = __cache.reserve();
7748                    let inner_size = v.compute_size(__cache);
7749                    __cache.set(__slot, inner_size);
7750                    size
7751                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
7752                            + inner_size;
7753                }
7754                size += self.__buffa_unknown_fields.encoded_len() as u32;
7755                size
7756            }
7757            #[allow(clippy::needless_borrow)]
7758            fn write_to(
7759                &self,
7760                __cache: &mut ::buffa::SizeCache,
7761                buf: &mut impl ::buffa::bytes::BufMut,
7762            ) {
7763                #[allow(unused_imports)]
7764                use ::buffa::Enumeration as _;
7765                if self.subaccount_id != 0u64 {
7766                    ::buffa::types::put_fixed64_field(1u32, self.subaccount_id, buf);
7767                }
7768                for v in &self.actions {
7769                    ::buffa::types::put_len_delimited_header(
7770                        2u32,
7771                        __cache.consume_next(),
7772                        buf,
7773                    );
7774                    v.write_to(__cache, buf);
7775                }
7776                self.__buffa_unknown_fields.write_to(buf);
7777            }
7778        }
7779        /// Serializes this view as protobuf JSON.
7780        ///
7781        /// Implicit-presence fields with default values are omitted, `required`
7782        /// fields are always emitted, explicit-presence (`optional`) fields are
7783        /// emitted only when set, bytes fields are base64-encoded, and enum
7784        /// values are their proto name strings.
7785        ///
7786        /// This impl uses `serialize_map(None)` because the number of emitted
7787        /// fields depends on default-omission rules; serializers that require
7788        /// known map lengths (e.g. `bincode`) will return a runtime error.
7789        /// Use the owned message type for those formats.
7790        impl<'__a> ::serde::Serialize for BatchSignProtectedActionsRequestView<'__a> {
7791            fn serialize<__S: ::serde::Serializer>(
7792                &self,
7793                __s: __S,
7794            ) -> ::core::result::Result<__S::Ok, __S::Error> {
7795                use ::serde::ser::SerializeMap as _;
7796                let mut __map = __s.serialize_map(::core::option::Option::None)?;
7797                if !::buffa::json_helpers::skip_if::is_zero_u64(&self.subaccount_id) {
7798                    __map
7799                        .serialize_entry(
7800                            "subaccountId",
7801                            &::buffa::json_helpers::ProtoJson(&self.subaccount_id),
7802                        )?;
7803                }
7804                if !self.actions.is_empty() {
7805                    __map.serialize_entry("actions", &*self.actions)?;
7806                }
7807                __map.end()
7808            }
7809        }
7810        impl<'a> ::buffa::MessageName for BatchSignProtectedActionsRequestView<'a> {
7811            const PACKAGE: &'static str = "chain.guard.v1";
7812            const NAME: &'static str = "BatchSignProtectedActionsRequest";
7813            const FULL_NAME: &'static str = "chain.guard.v1.BatchSignProtectedActionsRequest";
7814            const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.BatchSignProtectedActionsRequest";
7815        }
7816        ::buffa::impl_default_view_instance!(BatchSignProtectedActionsRequestView);
7817        ::buffa::impl_view_reborrow!(BatchSignProtectedActionsRequestView);
7818        /** Self-contained, `'static` owned view of a `BatchSignProtectedActionsRequest` message.
7819
7820 Wraps [`::buffa::OwnedView`]`<`[`BatchSignProtectedActionsRequestView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
7821
7822 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`BatchSignProtectedActionsRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
7823        #[derive(Clone, Debug)]
7824        pub struct BatchSignProtectedActionsRequestOwnedView(
7825            ::buffa::OwnedView<BatchSignProtectedActionsRequestView<'static>>,
7826        );
7827        impl BatchSignProtectedActionsRequestOwnedView {
7828            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
7829            ///
7830            /// The view borrows directly from the buffer's data; the buffer is
7831            /// retained inside the returned handle.
7832            ///
7833            /// # Errors
7834            ///
7835            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
7836            /// protobuf data.
7837            pub fn decode(
7838                bytes: ::buffa::bytes::Bytes,
7839            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7840                ::core::result::Result::Ok(
7841                    BatchSignProtectedActionsRequestOwnedView(
7842                        ::buffa::OwnedView::decode(bytes)?,
7843                    ),
7844                )
7845            }
7846            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
7847            /// max message size).
7848            ///
7849            /// # Errors
7850            ///
7851            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
7852            /// exceeds the configured limits.
7853            pub fn decode_with_options(
7854                bytes: ::buffa::bytes::Bytes,
7855                opts: &::buffa::DecodeOptions,
7856            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7857                ::core::result::Result::Ok(
7858                    BatchSignProtectedActionsRequestOwnedView(
7859                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
7860                    ),
7861                )
7862            }
7863            /// Build from an owned message via an encode → decode round-trip.
7864            ///
7865            /// # Errors
7866            ///
7867            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
7868            /// somehow invalid (should not happen for well-formed messages).
7869            pub fn from_owned(
7870                msg: &super::super::BatchSignProtectedActionsRequest,
7871            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7872                ::core::result::Result::Ok(
7873                    BatchSignProtectedActionsRequestOwnedView(
7874                        ::buffa::OwnedView::from_owned(msg)?,
7875                    ),
7876                )
7877            }
7878            /// Borrow the full [`BatchSignProtectedActionsRequestView`] with its lifetime tied to `&self`.
7879            #[must_use]
7880            pub fn view(&self) -> &BatchSignProtectedActionsRequestView<'_> {
7881                self.0.reborrow()
7882            }
7883            /// Convert to the owned message type.
7884            ///
7885            /// # Errors
7886            ///
7887            /// Returns an error if re-materializing preserved unknown fields
7888            /// fails (e.g. the unknown-field limit is exceeded).
7889            pub fn to_owned_message(
7890                &self,
7891            ) -> ::core::result::Result<
7892                super::super::BatchSignProtectedActionsRequest,
7893                ::buffa::DecodeError,
7894            > {
7895                self.0.to_owned_message()
7896            }
7897            /// The underlying bytes buffer.
7898            #[must_use]
7899            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
7900                self.0.bytes()
7901            }
7902            /// Consume the handle, returning the underlying bytes buffer.
7903            #[must_use]
7904            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
7905                self.0.into_bytes()
7906            }
7907            /// Optional subaccount public id. When omitted, the authenticated caller's
7908            /// root account is used as the target account.
7909            ///
7910            /// Field 1: `subaccount_id`
7911            #[must_use]
7912            pub fn subaccount_id(&self) -> u64 {
7913                self.0.reborrow().subaccount_id
7914            }
7915            /// Ordered protected actions to sign, max 20 items.
7916            ///
7917            /// Field 2: `actions`
7918            #[must_use]
7919            pub fn actions(
7920                &self,
7921            ) -> &::buffa::RepeatedView<
7922                '_,
7923                super::super::__buffa::view::BatchSignProtectedActionItemView<'_>,
7924            > {
7925                &self.0.reborrow().actions
7926            }
7927        }
7928        impl ::core::convert::From<
7929            ::buffa::OwnedView<BatchSignProtectedActionsRequestView<'static>>,
7930        > for BatchSignProtectedActionsRequestOwnedView {
7931            fn from(
7932                inner: ::buffa::OwnedView<BatchSignProtectedActionsRequestView<'static>>,
7933            ) -> Self {
7934                BatchSignProtectedActionsRequestOwnedView(inner)
7935            }
7936        }
7937        impl ::core::convert::From<BatchSignProtectedActionsRequestOwnedView>
7938        for ::buffa::OwnedView<BatchSignProtectedActionsRequestView<'static>> {
7939            fn from(wrapper: BatchSignProtectedActionsRequestOwnedView) -> Self {
7940                wrapper.0
7941            }
7942        }
7943        impl ::core::convert::AsRef<
7944            ::buffa::OwnedView<BatchSignProtectedActionsRequestView<'static>>,
7945        > for BatchSignProtectedActionsRequestOwnedView {
7946            fn as_ref(
7947                &self,
7948            ) -> &::buffa::OwnedView<BatchSignProtectedActionsRequestView<'static>> {
7949                &self.0
7950            }
7951        }
7952        impl ::buffa::HasMessageView for super::super::BatchSignProtectedActionsRequest {
7953            type View<'a> = BatchSignProtectedActionsRequestView<'a>;
7954            type ViewHandle = BatchSignProtectedActionsRequestOwnedView;
7955        }
7956        impl ::serde::Serialize for BatchSignProtectedActionsRequestOwnedView {
7957            fn serialize<__S: ::serde::Serializer>(
7958                &self,
7959                __s: __S,
7960            ) -> ::core::result::Result<__S::Ok, __S::Error> {
7961                ::serde::Serialize::serialize(&self.0, __s)
7962            }
7963        }
7964        /// BatchSignProtectedActionsResponse returns approvals in the same order as the
7965        /// requested actions. Clients must submit them with the matching batched calls.
7966        #[derive(Clone, Debug, Default)]
7967        pub struct BatchSignProtectedActionsResponseView<'a> {
7968            /// Approval signatures in the same order as the requested actions.
7969            ///
7970            /// Field 1: `approvals`
7971            pub approvals: ::buffa::RepeatedView<
7972                'a,
7973                super::super::__buffa::view::GuardApprovalView<'a>,
7974            >,
7975            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
7976        }
7977        impl<'a> ::buffa::MessageView<'a> for BatchSignProtectedActionsResponseView<'a> {
7978            type Owned = super::super::BatchSignProtectedActionsResponse;
7979            fn decode_view(
7980                buf: &'a [u8],
7981            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7982                let __limit = ::core::cell::Cell::new(
7983                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
7984                );
7985                <Self as ::buffa::MessageView>::decode_view_ctx(
7986                    buf,
7987                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
7988                )
7989            }
7990            fn decode_view_with_ctx(
7991                buf: &'a [u8],
7992                ctx: ::buffa::DecodeContext<'_>,
7993            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
7994                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
7995            }
7996            fn merge_view_field(
7997                &mut self,
7998                tag: ::buffa::encoding::Tag,
7999                cur: &'a [u8],
8000                before_tag: &'a [u8],
8001                ctx: ::buffa::DecodeContext<'_>,
8002            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
8003                let _ = ctx;
8004                #[allow(unused_variables)]
8005                let view = self;
8006                let mut cur = cur;
8007                match tag.field_number() {
8008                    1u32 => {
8009                        ::buffa::encoding::check_wire_type(
8010                            tag,
8011                            ::buffa::encoding::WireType::LengthDelimited,
8012                        )?;
8013                        let __sub_ctx = ctx.descend()?;
8014                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
8015                        view.approvals
8016                            .push(
8017                                <super::super::__buffa::view::GuardApprovalView as ::buffa::MessageView>::decode_view_ctx(
8018                                    sub,
8019                                    __sub_ctx,
8020                                )?,
8021                            );
8022                    }
8023                    _ => {
8024                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
8025                        let span_len = before_tag.len() - cur.len();
8026                        view.__buffa_unknown_fields
8027                            .push_record(before_tag, span_len, ctx)?;
8028                    }
8029                }
8030                ::core::result::Result::Ok(cur)
8031            }
8032            fn to_owned_message(
8033                &self,
8034            ) -> ::core::result::Result<
8035                super::super::BatchSignProtectedActionsResponse,
8036                ::buffa::DecodeError,
8037            > {
8038                self.to_owned_from_source(None)
8039            }
8040            #[allow(clippy::useless_conversion, clippy::needless_update)]
8041            fn to_owned_from_source(
8042                &self,
8043                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
8044            ) -> ::core::result::Result<
8045                super::super::BatchSignProtectedActionsResponse,
8046                ::buffa::DecodeError,
8047            > {
8048                #[allow(unused_imports)]
8049                use ::buffa::alloc::string::ToString as _;
8050                let _ = __buffa_src;
8051                ::core::result::Result::Ok(super::super::BatchSignProtectedActionsResponse {
8052                    approvals: self
8053                        .approvals
8054                        .iter()
8055                        .map(|v| v.to_owned_from_source(__buffa_src))
8056                        .collect::<::core::result::Result<_, ::buffa::DecodeError>>()?,
8057                    __buffa_unknown_fields: self
8058                        .__buffa_unknown_fields
8059                        .to_owned()?
8060                        .into(),
8061                    ..::core::default::Default::default()
8062                })
8063            }
8064        }
8065        impl<'a> ::buffa::ViewEncode<'a> for BatchSignProtectedActionsResponseView<'a> {
8066            #[allow(clippy::needless_borrow, clippy::let_and_return)]
8067            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
8068                #[allow(unused_imports)]
8069                use ::buffa::Enumeration as _;
8070                let mut size = 0u32;
8071                for v in &self.approvals {
8072                    let __slot = __cache.reserve();
8073                    let inner_size = v.compute_size(__cache);
8074                    __cache.set(__slot, inner_size);
8075                    size
8076                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
8077                            + inner_size;
8078                }
8079                size += self.__buffa_unknown_fields.encoded_len() as u32;
8080                size
8081            }
8082            #[allow(clippy::needless_borrow)]
8083            fn write_to(
8084                &self,
8085                __cache: &mut ::buffa::SizeCache,
8086                buf: &mut impl ::buffa::bytes::BufMut,
8087            ) {
8088                #[allow(unused_imports)]
8089                use ::buffa::Enumeration as _;
8090                for v in &self.approvals {
8091                    ::buffa::types::put_len_delimited_header(
8092                        1u32,
8093                        __cache.consume_next(),
8094                        buf,
8095                    );
8096                    v.write_to(__cache, buf);
8097                }
8098                self.__buffa_unknown_fields.write_to(buf);
8099            }
8100        }
8101        /// Serializes this view as protobuf JSON.
8102        ///
8103        /// Implicit-presence fields with default values are omitted, `required`
8104        /// fields are always emitted, explicit-presence (`optional`) fields are
8105        /// emitted only when set, bytes fields are base64-encoded, and enum
8106        /// values are their proto name strings.
8107        ///
8108        /// This impl uses `serialize_map(None)` because the number of emitted
8109        /// fields depends on default-omission rules; serializers that require
8110        /// known map lengths (e.g. `bincode`) will return a runtime error.
8111        /// Use the owned message type for those formats.
8112        impl<'__a> ::serde::Serialize for BatchSignProtectedActionsResponseView<'__a> {
8113            fn serialize<__S: ::serde::Serializer>(
8114                &self,
8115                __s: __S,
8116            ) -> ::core::result::Result<__S::Ok, __S::Error> {
8117                use ::serde::ser::SerializeMap as _;
8118                let mut __map = __s.serialize_map(::core::option::Option::None)?;
8119                if !self.approvals.is_empty() {
8120                    __map.serialize_entry("approvals", &*self.approvals)?;
8121                }
8122                __map.end()
8123            }
8124        }
8125        impl<'a> ::buffa::MessageName for BatchSignProtectedActionsResponseView<'a> {
8126            const PACKAGE: &'static str = "chain.guard.v1";
8127            const NAME: &'static str = "BatchSignProtectedActionsResponse";
8128            const FULL_NAME: &'static str = "chain.guard.v1.BatchSignProtectedActionsResponse";
8129            const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.BatchSignProtectedActionsResponse";
8130        }
8131        ::buffa::impl_default_view_instance!(BatchSignProtectedActionsResponseView);
8132        ::buffa::impl_view_reborrow!(BatchSignProtectedActionsResponseView);
8133        /** Self-contained, `'static` owned view of a `BatchSignProtectedActionsResponse` message.
8134
8135 Wraps [`::buffa::OwnedView`]`<`[`BatchSignProtectedActionsResponseView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
8136
8137 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`BatchSignProtectedActionsResponseView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
8138        #[derive(Clone, Debug)]
8139        pub struct BatchSignProtectedActionsResponseOwnedView(
8140            ::buffa::OwnedView<BatchSignProtectedActionsResponseView<'static>>,
8141        );
8142        impl BatchSignProtectedActionsResponseOwnedView {
8143            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
8144            ///
8145            /// The view borrows directly from the buffer's data; the buffer is
8146            /// retained inside the returned handle.
8147            ///
8148            /// # Errors
8149            ///
8150            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
8151            /// protobuf data.
8152            pub fn decode(
8153                bytes: ::buffa::bytes::Bytes,
8154            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8155                ::core::result::Result::Ok(
8156                    BatchSignProtectedActionsResponseOwnedView(
8157                        ::buffa::OwnedView::decode(bytes)?,
8158                    ),
8159                )
8160            }
8161            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
8162            /// max message size).
8163            ///
8164            /// # Errors
8165            ///
8166            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
8167            /// exceeds the configured limits.
8168            pub fn decode_with_options(
8169                bytes: ::buffa::bytes::Bytes,
8170                opts: &::buffa::DecodeOptions,
8171            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8172                ::core::result::Result::Ok(
8173                    BatchSignProtectedActionsResponseOwnedView(
8174                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
8175                    ),
8176                )
8177            }
8178            /// Build from an owned message via an encode → decode round-trip.
8179            ///
8180            /// # Errors
8181            ///
8182            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
8183            /// somehow invalid (should not happen for well-formed messages).
8184            pub fn from_owned(
8185                msg: &super::super::BatchSignProtectedActionsResponse,
8186            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8187                ::core::result::Result::Ok(
8188                    BatchSignProtectedActionsResponseOwnedView(
8189                        ::buffa::OwnedView::from_owned(msg)?,
8190                    ),
8191                )
8192            }
8193            /// Borrow the full [`BatchSignProtectedActionsResponseView`] with its lifetime tied to `&self`.
8194            #[must_use]
8195            pub fn view(&self) -> &BatchSignProtectedActionsResponseView<'_> {
8196                self.0.reborrow()
8197            }
8198            /// Convert to the owned message type.
8199            ///
8200            /// # Errors
8201            ///
8202            /// Returns an error if re-materializing preserved unknown fields
8203            /// fails (e.g. the unknown-field limit is exceeded).
8204            pub fn to_owned_message(
8205                &self,
8206            ) -> ::core::result::Result<
8207                super::super::BatchSignProtectedActionsResponse,
8208                ::buffa::DecodeError,
8209            > {
8210                self.0.to_owned_message()
8211            }
8212            /// The underlying bytes buffer.
8213            #[must_use]
8214            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
8215                self.0.bytes()
8216            }
8217            /// Consume the handle, returning the underlying bytes buffer.
8218            #[must_use]
8219            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
8220                self.0.into_bytes()
8221            }
8222            /// Approval signatures in the same order as the requested actions.
8223            ///
8224            /// Field 1: `approvals`
8225            #[must_use]
8226            pub fn approvals(
8227                &self,
8228            ) -> &::buffa::RepeatedView<
8229                '_,
8230                super::super::__buffa::view::GuardApprovalView<'_>,
8231            > {
8232                &self.0.reborrow().approvals
8233            }
8234        }
8235        impl ::core::convert::From<
8236            ::buffa::OwnedView<BatchSignProtectedActionsResponseView<'static>>,
8237        > for BatchSignProtectedActionsResponseOwnedView {
8238            fn from(
8239                inner: ::buffa::OwnedView<BatchSignProtectedActionsResponseView<'static>>,
8240            ) -> Self {
8241                BatchSignProtectedActionsResponseOwnedView(inner)
8242            }
8243        }
8244        impl ::core::convert::From<BatchSignProtectedActionsResponseOwnedView>
8245        for ::buffa::OwnedView<BatchSignProtectedActionsResponseView<'static>> {
8246            fn from(wrapper: BatchSignProtectedActionsResponseOwnedView) -> Self {
8247                wrapper.0
8248            }
8249        }
8250        impl ::core::convert::AsRef<
8251            ::buffa::OwnedView<BatchSignProtectedActionsResponseView<'static>>,
8252        > for BatchSignProtectedActionsResponseOwnedView {
8253            fn as_ref(
8254                &self,
8255            ) -> &::buffa::OwnedView<BatchSignProtectedActionsResponseView<'static>> {
8256                &self.0
8257            }
8258        }
8259        impl ::buffa::HasMessageView
8260        for super::super::BatchSignProtectedActionsResponse {
8261            type View<'a> = BatchSignProtectedActionsResponseView<'a>;
8262            type ViewHandle = BatchSignProtectedActionsResponseOwnedView;
8263        }
8264        impl ::serde::Serialize for BatchSignProtectedActionsResponseOwnedView {
8265            fn serialize<__S: ::serde::Serializer>(
8266                &self,
8267                __s: __S,
8268            ) -> ::core::result::Result<__S::Ok, __S::Error> {
8269                ::serde::Serialize::serialize(&self.0, __s)
8270            }
8271        }
8272        /// RotateGuardSignerWalletRequest asks the backend to generate a replacement
8273        /// guard signer wallet and sign the on-chain rotation approval.
8274        #[derive(Clone, Debug, Default)]
8275        pub struct RotateGuardSignerWalletRequestView<'a> {
8276            /// Optional subaccount public id. When omitted, the authenticated caller's
8277            /// root account is used as the target account.
8278            ///
8279            /// Field 1: `subaccount_id`
8280            pub subaccount_id: u64,
8281            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
8282        }
8283        impl<'a> ::buffa::MessageView<'a> for RotateGuardSignerWalletRequestView<'a> {
8284            type Owned = super::super::RotateGuardSignerWalletRequest;
8285            fn decode_view(
8286                buf: &'a [u8],
8287            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8288                let __limit = ::core::cell::Cell::new(
8289                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
8290                );
8291                <Self as ::buffa::MessageView>::decode_view_ctx(
8292                    buf,
8293                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
8294                )
8295            }
8296            fn decode_view_with_ctx(
8297                buf: &'a [u8],
8298                ctx: ::buffa::DecodeContext<'_>,
8299            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8300                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
8301            }
8302            fn merge_view_field(
8303                &mut self,
8304                tag: ::buffa::encoding::Tag,
8305                cur: &'a [u8],
8306                before_tag: &'a [u8],
8307                ctx: ::buffa::DecodeContext<'_>,
8308            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
8309                let _ = ctx;
8310                #[allow(unused_variables)]
8311                let view = self;
8312                let mut cur = cur;
8313                match tag.field_number() {
8314                    1u32 => {
8315                        ::buffa::encoding::check_wire_type(
8316                            tag,
8317                            ::buffa::encoding::WireType::Fixed64,
8318                        )?;
8319                        view.subaccount_id = ::buffa::types::decode_fixed64(&mut cur)?;
8320                    }
8321                    _ => {
8322                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
8323                        let span_len = before_tag.len() - cur.len();
8324                        view.__buffa_unknown_fields
8325                            .push_record(before_tag, span_len, ctx)?;
8326                    }
8327                }
8328                ::core::result::Result::Ok(cur)
8329            }
8330            fn to_owned_message(
8331                &self,
8332            ) -> ::core::result::Result<
8333                super::super::RotateGuardSignerWalletRequest,
8334                ::buffa::DecodeError,
8335            > {
8336                self.to_owned_from_source(None)
8337            }
8338            #[allow(clippy::useless_conversion, clippy::needless_update)]
8339            fn to_owned_from_source(
8340                &self,
8341                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
8342            ) -> ::core::result::Result<
8343                super::super::RotateGuardSignerWalletRequest,
8344                ::buffa::DecodeError,
8345            > {
8346                #[allow(unused_imports)]
8347                use ::buffa::alloc::string::ToString as _;
8348                let _ = __buffa_src;
8349                ::core::result::Result::Ok(super::super::RotateGuardSignerWalletRequest {
8350                    subaccount_id: self.subaccount_id,
8351                    __buffa_unknown_fields: self
8352                        .__buffa_unknown_fields
8353                        .to_owned()?
8354                        .into(),
8355                    ..::core::default::Default::default()
8356                })
8357            }
8358        }
8359        impl<'a> ::buffa::ViewEncode<'a> for RotateGuardSignerWalletRequestView<'a> {
8360            #[allow(clippy::needless_borrow, clippy::let_and_return)]
8361            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
8362                #[allow(unused_imports)]
8363                use ::buffa::Enumeration as _;
8364                let mut size = 0u32;
8365                if self.subaccount_id != 0u64 {
8366                    size += 1u32 + ::buffa::types::FIXED64_ENCODED_LEN as u32;
8367                }
8368                size += self.__buffa_unknown_fields.encoded_len() as u32;
8369                size
8370            }
8371            #[allow(clippy::needless_borrow)]
8372            fn write_to(
8373                &self,
8374                _cache: &mut ::buffa::SizeCache,
8375                buf: &mut impl ::buffa::bytes::BufMut,
8376            ) {
8377                #[allow(unused_imports)]
8378                use ::buffa::Enumeration as _;
8379                if self.subaccount_id != 0u64 {
8380                    ::buffa::types::put_fixed64_field(1u32, self.subaccount_id, buf);
8381                }
8382                self.__buffa_unknown_fields.write_to(buf);
8383            }
8384        }
8385        /// Serializes this view as protobuf JSON.
8386        ///
8387        /// Implicit-presence fields with default values are omitted, `required`
8388        /// fields are always emitted, explicit-presence (`optional`) fields are
8389        /// emitted only when set, bytes fields are base64-encoded, and enum
8390        /// values are their proto name strings.
8391        ///
8392        /// This impl uses `serialize_map(None)` because the number of emitted
8393        /// fields depends on default-omission rules; serializers that require
8394        /// known map lengths (e.g. `bincode`) will return a runtime error.
8395        /// Use the owned message type for those formats.
8396        impl<'__a> ::serde::Serialize for RotateGuardSignerWalletRequestView<'__a> {
8397            fn serialize<__S: ::serde::Serializer>(
8398                &self,
8399                __s: __S,
8400            ) -> ::core::result::Result<__S::Ok, __S::Error> {
8401                use ::serde::ser::SerializeMap as _;
8402                let mut __map = __s.serialize_map(::core::option::Option::None)?;
8403                if !::buffa::json_helpers::skip_if::is_zero_u64(&self.subaccount_id) {
8404                    __map
8405                        .serialize_entry(
8406                            "subaccountId",
8407                            &::buffa::json_helpers::ProtoJson(&self.subaccount_id),
8408                        )?;
8409                }
8410                __map.end()
8411            }
8412        }
8413        impl<'a> ::buffa::MessageName for RotateGuardSignerWalletRequestView<'a> {
8414            const PACKAGE: &'static str = "chain.guard.v1";
8415            const NAME: &'static str = "RotateGuardSignerWalletRequest";
8416            const FULL_NAME: &'static str = "chain.guard.v1.RotateGuardSignerWalletRequest";
8417            const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.RotateGuardSignerWalletRequest";
8418        }
8419        ::buffa::impl_default_view_instance!(RotateGuardSignerWalletRequestView);
8420        ::buffa::impl_view_reborrow!(RotateGuardSignerWalletRequestView);
8421        /** Self-contained, `'static` owned view of a `RotateGuardSignerWalletRequest` message.
8422
8423 Wraps [`::buffa::OwnedView`]`<`[`RotateGuardSignerWalletRequestView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
8424
8425 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`RotateGuardSignerWalletRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
8426        #[derive(Clone, Debug)]
8427        pub struct RotateGuardSignerWalletRequestOwnedView(
8428            ::buffa::OwnedView<RotateGuardSignerWalletRequestView<'static>>,
8429        );
8430        impl RotateGuardSignerWalletRequestOwnedView {
8431            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
8432            ///
8433            /// The view borrows directly from the buffer's data; the buffer is
8434            /// retained inside the returned handle.
8435            ///
8436            /// # Errors
8437            ///
8438            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
8439            /// protobuf data.
8440            pub fn decode(
8441                bytes: ::buffa::bytes::Bytes,
8442            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8443                ::core::result::Result::Ok(
8444                    RotateGuardSignerWalletRequestOwnedView(
8445                        ::buffa::OwnedView::decode(bytes)?,
8446                    ),
8447                )
8448            }
8449            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
8450            /// max message size).
8451            ///
8452            /// # Errors
8453            ///
8454            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
8455            /// exceeds the configured limits.
8456            pub fn decode_with_options(
8457                bytes: ::buffa::bytes::Bytes,
8458                opts: &::buffa::DecodeOptions,
8459            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8460                ::core::result::Result::Ok(
8461                    RotateGuardSignerWalletRequestOwnedView(
8462                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
8463                    ),
8464                )
8465            }
8466            /// Build from an owned message via an encode → decode round-trip.
8467            ///
8468            /// # Errors
8469            ///
8470            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
8471            /// somehow invalid (should not happen for well-formed messages).
8472            pub fn from_owned(
8473                msg: &super::super::RotateGuardSignerWalletRequest,
8474            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8475                ::core::result::Result::Ok(
8476                    RotateGuardSignerWalletRequestOwnedView(
8477                        ::buffa::OwnedView::from_owned(msg)?,
8478                    ),
8479                )
8480            }
8481            /// Borrow the full [`RotateGuardSignerWalletRequestView`] with its lifetime tied to `&self`.
8482            #[must_use]
8483            pub fn view(&self) -> &RotateGuardSignerWalletRequestView<'_> {
8484                self.0.reborrow()
8485            }
8486            /// Convert to the owned message type.
8487            ///
8488            /// # Errors
8489            ///
8490            /// Returns an error if re-materializing preserved unknown fields
8491            /// fails (e.g. the unknown-field limit is exceeded).
8492            pub fn to_owned_message(
8493                &self,
8494            ) -> ::core::result::Result<
8495                super::super::RotateGuardSignerWalletRequest,
8496                ::buffa::DecodeError,
8497            > {
8498                self.0.to_owned_message()
8499            }
8500            /// The underlying bytes buffer.
8501            #[must_use]
8502            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
8503                self.0.bytes()
8504            }
8505            /// Consume the handle, returning the underlying bytes buffer.
8506            #[must_use]
8507            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
8508                self.0.into_bytes()
8509            }
8510            /// Optional subaccount public id. When omitted, the authenticated caller's
8511            /// root account is used as the target account.
8512            ///
8513            /// Field 1: `subaccount_id`
8514            #[must_use]
8515            pub fn subaccount_id(&self) -> u64 {
8516                self.0.reborrow().subaccount_id
8517            }
8518        }
8519        impl ::core::convert::From<
8520            ::buffa::OwnedView<RotateGuardSignerWalletRequestView<'static>>,
8521        > for RotateGuardSignerWalletRequestOwnedView {
8522            fn from(
8523                inner: ::buffa::OwnedView<RotateGuardSignerWalletRequestView<'static>>,
8524            ) -> Self {
8525                RotateGuardSignerWalletRequestOwnedView(inner)
8526            }
8527        }
8528        impl ::core::convert::From<RotateGuardSignerWalletRequestOwnedView>
8529        for ::buffa::OwnedView<RotateGuardSignerWalletRequestView<'static>> {
8530            fn from(wrapper: RotateGuardSignerWalletRequestOwnedView) -> Self {
8531                wrapper.0
8532            }
8533        }
8534        impl ::core::convert::AsRef<
8535            ::buffa::OwnedView<RotateGuardSignerWalletRequestView<'static>>,
8536        > for RotateGuardSignerWalletRequestOwnedView {
8537            fn as_ref(
8538                &self,
8539            ) -> &::buffa::OwnedView<RotateGuardSignerWalletRequestView<'static>> {
8540                &self.0
8541            }
8542        }
8543        impl ::buffa::HasMessageView for super::super::RotateGuardSignerWalletRequest {
8544            type View<'a> = RotateGuardSignerWalletRequestView<'a>;
8545            type ViewHandle = RotateGuardSignerWalletRequestOwnedView;
8546        }
8547        impl ::serde::Serialize for RotateGuardSignerWalletRequestOwnedView {
8548            fn serialize<__S: ::serde::Serializer>(
8549                &self,
8550                __s: __S,
8551            ) -> ::core::result::Result<__S::Ok, __S::Error> {
8552                ::serde::Serialize::serialize(&self.0, __s)
8553            }
8554        }
8555        /// RotateGuardSignerWalletResponse returns the backend-generated replacement
8556        /// signer and the approval needed to submit signer rotation on-chain.
8557        #[derive(Clone, Debug, Default)]
8558        pub struct RotateGuardSignerWalletResponseView<'a> {
8559            /// EVM address of the replacement guard signer wallet.
8560            ///
8561            /// Field 1: `new_signer_address`
8562            pub new_signer_address: &'a str,
8563            /// Approval signature payload needed to submit the signer rotation.
8564            ///
8565            /// Field 2: `approval`
8566            pub approval: ::buffa::MessageFieldView<
8567                super::super::__buffa::view::GuardApprovalView<'a>,
8568            >,
8569            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
8570        }
8571        impl<'a> ::buffa::MessageView<'a> for RotateGuardSignerWalletResponseView<'a> {
8572            type Owned = super::super::RotateGuardSignerWalletResponse;
8573            fn decode_view(
8574                buf: &'a [u8],
8575            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8576                let __limit = ::core::cell::Cell::new(
8577                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
8578                );
8579                <Self as ::buffa::MessageView>::decode_view_ctx(
8580                    buf,
8581                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
8582                )
8583            }
8584            fn decode_view_with_ctx(
8585                buf: &'a [u8],
8586                ctx: ::buffa::DecodeContext<'_>,
8587            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8588                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
8589            }
8590            fn merge_view_field(
8591                &mut self,
8592                tag: ::buffa::encoding::Tag,
8593                cur: &'a [u8],
8594                before_tag: &'a [u8],
8595                ctx: ::buffa::DecodeContext<'_>,
8596            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
8597                let _ = ctx;
8598                #[allow(unused_variables)]
8599                let view = self;
8600                let mut cur = cur;
8601                match tag.field_number() {
8602                    1u32 => {
8603                        ::buffa::encoding::check_wire_type(
8604                            tag,
8605                            ::buffa::encoding::WireType::LengthDelimited,
8606                        )?;
8607                        view.new_signer_address = ::buffa::types::borrow_str(&mut cur)?;
8608                    }
8609                    2u32 => {
8610                        ::buffa::encoding::check_wire_type(
8611                            tag,
8612                            ::buffa::encoding::WireType::LengthDelimited,
8613                        )?;
8614                        let __sub_ctx = ctx.descend()?;
8615                        let sub = ::buffa::types::borrow_bytes(&mut cur)?;
8616                        match view.approval.as_mut() {
8617                            Some(existing) => {
8618                                ::buffa::MessageView::merge_into_view(
8619                                    existing,
8620                                    sub,
8621                                    __sub_ctx,
8622                                )?
8623                            }
8624                            None => {
8625                                view.approval = ::buffa::MessageFieldView::set(
8626                                    <super::super::__buffa::view::GuardApprovalView as ::buffa::MessageView>::decode_view_ctx(
8627                                        sub,
8628                                        __sub_ctx,
8629                                    )?,
8630                                );
8631                            }
8632                        }
8633                    }
8634                    _ => {
8635                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
8636                        let span_len = before_tag.len() - cur.len();
8637                        view.__buffa_unknown_fields
8638                            .push_record(before_tag, span_len, ctx)?;
8639                    }
8640                }
8641                ::core::result::Result::Ok(cur)
8642            }
8643            fn to_owned_message(
8644                &self,
8645            ) -> ::core::result::Result<
8646                super::super::RotateGuardSignerWalletResponse,
8647                ::buffa::DecodeError,
8648            > {
8649                self.to_owned_from_source(None)
8650            }
8651            #[allow(clippy::useless_conversion, clippy::needless_update)]
8652            fn to_owned_from_source(
8653                &self,
8654                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
8655            ) -> ::core::result::Result<
8656                super::super::RotateGuardSignerWalletResponse,
8657                ::buffa::DecodeError,
8658            > {
8659                #[allow(unused_imports)]
8660                use ::buffa::alloc::string::ToString as _;
8661                let _ = __buffa_src;
8662                ::core::result::Result::Ok(super::super::RotateGuardSignerWalletResponse {
8663                    new_signer_address: self.new_signer_address.to_string(),
8664                    approval: match self.approval.as_option() {
8665                        Some(v) => {
8666                            ::buffa::MessageField::<
8667                                super::super::GuardApproval,
8668                            >::some(v.to_owned_from_source(__buffa_src)?)
8669                        }
8670                        None => ::buffa::MessageField::none(),
8671                    },
8672                    __buffa_unknown_fields: self
8673                        .__buffa_unknown_fields
8674                        .to_owned()?
8675                        .into(),
8676                    ..::core::default::Default::default()
8677                })
8678            }
8679        }
8680        impl<'a> ::buffa::ViewEncode<'a> for RotateGuardSignerWalletResponseView<'a> {
8681            #[allow(clippy::needless_borrow, clippy::let_and_return)]
8682            fn compute_size(&self, __cache: &mut ::buffa::SizeCache) -> u32 {
8683                #[allow(unused_imports)]
8684                use ::buffa::Enumeration as _;
8685                let mut size = 0u32;
8686                if !self.new_signer_address.is_empty() {
8687                    size
8688                        += 1u32
8689                            + ::buffa::types::string_encoded_len(
8690                                &self.new_signer_address,
8691                            ) as u32;
8692                }
8693                if self.approval.is_set() {
8694                    let __slot = __cache.reserve();
8695                    let inner_size = self.approval.compute_size(__cache);
8696                    __cache.set(__slot, inner_size);
8697                    size
8698                        += 1u32 + ::buffa::encoding::varint_len(inner_size as u64) as u32
8699                            + inner_size;
8700                }
8701                size += self.__buffa_unknown_fields.encoded_len() as u32;
8702                size
8703            }
8704            #[allow(clippy::needless_borrow)]
8705            fn write_to(
8706                &self,
8707                __cache: &mut ::buffa::SizeCache,
8708                buf: &mut impl ::buffa::bytes::BufMut,
8709            ) {
8710                #[allow(unused_imports)]
8711                use ::buffa::Enumeration as _;
8712                if !self.new_signer_address.is_empty() {
8713                    ::buffa::types::put_string_field(
8714                        1u32,
8715                        &self.new_signer_address,
8716                        buf,
8717                    );
8718                }
8719                if self.approval.is_set() {
8720                    ::buffa::types::put_len_delimited_header(
8721                        2u32,
8722                        __cache.consume_next(),
8723                        buf,
8724                    );
8725                    self.approval.write_to(__cache, buf);
8726                }
8727                self.__buffa_unknown_fields.write_to(buf);
8728            }
8729        }
8730        /// Serializes this view as protobuf JSON.
8731        ///
8732        /// Implicit-presence fields with default values are omitted, `required`
8733        /// fields are always emitted, explicit-presence (`optional`) fields are
8734        /// emitted only when set, bytes fields are base64-encoded, and enum
8735        /// values are their proto name strings.
8736        ///
8737        /// This impl uses `serialize_map(None)` because the number of emitted
8738        /// fields depends on default-omission rules; serializers that require
8739        /// known map lengths (e.g. `bincode`) will return a runtime error.
8740        /// Use the owned message type for those formats.
8741        impl<'__a> ::serde::Serialize for RotateGuardSignerWalletResponseView<'__a> {
8742            fn serialize<__S: ::serde::Serializer>(
8743                &self,
8744                __s: __S,
8745            ) -> ::core::result::Result<__S::Ok, __S::Error> {
8746                use ::serde::ser::SerializeMap as _;
8747                let mut __map = __s.serialize_map(::core::option::Option::None)?;
8748                if !::buffa::json_helpers::skip_if::is_empty_str(
8749                    self.new_signer_address,
8750                ) {
8751                    __map.serialize_entry("newSignerAddress", self.new_signer_address)?;
8752                }
8753                {
8754                    if let ::core::option::Option::Some(__v) = self.approval.as_option()
8755                    {
8756                        __map.serialize_entry("approval", __v)?;
8757                    }
8758                }
8759                __map.end()
8760            }
8761        }
8762        impl<'a> ::buffa::MessageName for RotateGuardSignerWalletResponseView<'a> {
8763            const PACKAGE: &'static str = "chain.guard.v1";
8764            const NAME: &'static str = "RotateGuardSignerWalletResponse";
8765            const FULL_NAME: &'static str = "chain.guard.v1.RotateGuardSignerWalletResponse";
8766            const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.RotateGuardSignerWalletResponse";
8767        }
8768        ::buffa::impl_default_view_instance!(RotateGuardSignerWalletResponseView);
8769        ::buffa::impl_view_reborrow!(RotateGuardSignerWalletResponseView);
8770        /** Self-contained, `'static` owned view of a `RotateGuardSignerWalletResponse` message.
8771
8772 Wraps [`::buffa::OwnedView`]`<`[`RotateGuardSignerWalletResponseView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
8773
8774 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`RotateGuardSignerWalletResponseView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
8775        #[derive(Clone, Debug)]
8776        pub struct RotateGuardSignerWalletResponseOwnedView(
8777            ::buffa::OwnedView<RotateGuardSignerWalletResponseView<'static>>,
8778        );
8779        impl RotateGuardSignerWalletResponseOwnedView {
8780            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
8781            ///
8782            /// The view borrows directly from the buffer's data; the buffer is
8783            /// retained inside the returned handle.
8784            ///
8785            /// # Errors
8786            ///
8787            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
8788            /// protobuf data.
8789            pub fn decode(
8790                bytes: ::buffa::bytes::Bytes,
8791            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8792                ::core::result::Result::Ok(
8793                    RotateGuardSignerWalletResponseOwnedView(
8794                        ::buffa::OwnedView::decode(bytes)?,
8795                    ),
8796                )
8797            }
8798            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
8799            /// max message size).
8800            ///
8801            /// # Errors
8802            ///
8803            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
8804            /// exceeds the configured limits.
8805            pub fn decode_with_options(
8806                bytes: ::buffa::bytes::Bytes,
8807                opts: &::buffa::DecodeOptions,
8808            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8809                ::core::result::Result::Ok(
8810                    RotateGuardSignerWalletResponseOwnedView(
8811                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
8812                    ),
8813                )
8814            }
8815            /// Build from an owned message via an encode → decode round-trip.
8816            ///
8817            /// # Errors
8818            ///
8819            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
8820            /// somehow invalid (should not happen for well-formed messages).
8821            pub fn from_owned(
8822                msg: &super::super::RotateGuardSignerWalletResponse,
8823            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8824                ::core::result::Result::Ok(
8825                    RotateGuardSignerWalletResponseOwnedView(
8826                        ::buffa::OwnedView::from_owned(msg)?,
8827                    ),
8828                )
8829            }
8830            /// Borrow the full [`RotateGuardSignerWalletResponseView`] with its lifetime tied to `&self`.
8831            #[must_use]
8832            pub fn view(&self) -> &RotateGuardSignerWalletResponseView<'_> {
8833                self.0.reborrow()
8834            }
8835            /// Convert to the owned message type.
8836            ///
8837            /// # Errors
8838            ///
8839            /// Returns an error if re-materializing preserved unknown fields
8840            /// fails (e.g. the unknown-field limit is exceeded).
8841            pub fn to_owned_message(
8842                &self,
8843            ) -> ::core::result::Result<
8844                super::super::RotateGuardSignerWalletResponse,
8845                ::buffa::DecodeError,
8846            > {
8847                self.0.to_owned_message()
8848            }
8849            /// The underlying bytes buffer.
8850            #[must_use]
8851            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
8852                self.0.bytes()
8853            }
8854            /// Consume the handle, returning the underlying bytes buffer.
8855            #[must_use]
8856            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
8857                self.0.into_bytes()
8858            }
8859            /// EVM address of the replacement guard signer wallet.
8860            ///
8861            /// Field 1: `new_signer_address`
8862            #[must_use]
8863            pub fn new_signer_address(&self) -> &'_ str {
8864                self.0.reborrow().new_signer_address
8865            }
8866            /// Approval signature payload needed to submit the signer rotation.
8867            ///
8868            /// Field 2: `approval`
8869            #[must_use]
8870            pub fn approval(
8871                &self,
8872            ) -> &::buffa::MessageFieldView<
8873                super::super::__buffa::view::GuardApprovalView<'_>,
8874            > {
8875                &self.0.reborrow().approval
8876            }
8877        }
8878        impl ::core::convert::From<
8879            ::buffa::OwnedView<RotateGuardSignerWalletResponseView<'static>>,
8880        > for RotateGuardSignerWalletResponseOwnedView {
8881            fn from(
8882                inner: ::buffa::OwnedView<RotateGuardSignerWalletResponseView<'static>>,
8883            ) -> Self {
8884                RotateGuardSignerWalletResponseOwnedView(inner)
8885            }
8886        }
8887        impl ::core::convert::From<RotateGuardSignerWalletResponseOwnedView>
8888        for ::buffa::OwnedView<RotateGuardSignerWalletResponseView<'static>> {
8889            fn from(wrapper: RotateGuardSignerWalletResponseOwnedView) -> Self {
8890                wrapper.0
8891            }
8892        }
8893        impl ::core::convert::AsRef<
8894            ::buffa::OwnedView<RotateGuardSignerWalletResponseView<'static>>,
8895        > for RotateGuardSignerWalletResponseOwnedView {
8896            fn as_ref(
8897                &self,
8898            ) -> &::buffa::OwnedView<RotateGuardSignerWalletResponseView<'static>> {
8899                &self.0
8900            }
8901        }
8902        impl ::buffa::HasMessageView for super::super::RotateGuardSignerWalletResponse {
8903            type View<'a> = RotateGuardSignerWalletResponseView<'a>;
8904            type ViewHandle = RotateGuardSignerWalletResponseOwnedView;
8905        }
8906        impl ::serde::Serialize for RotateGuardSignerWalletResponseOwnedView {
8907            fn serialize<__S: ::serde::Serializer>(
8908                &self,
8909                __s: __S,
8910            ) -> ::core::result::Result<__S::Ok, __S::Error> {
8911                ::serde::Serialize::serialize(&self.0, __s)
8912            }
8913        }
8914        /// ExportGuardSignerWalletRequest exports guard signer key material for an
8915        /// explicitly authorized account target. This is a high-risk sovereignty flow.
8916        #[derive(Clone, Debug, Default)]
8917        pub struct ExportGuardSignerWalletRequestView<'a> {
8918            /// Optional subaccount public id. When omitted, the authenticated caller's
8919            /// root account is used as the target account.
8920            ///
8921            /// Field 1: `subaccount_id`
8922            pub subaccount_id: u64,
8923            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
8924        }
8925        impl<'a> ::buffa::MessageView<'a> for ExportGuardSignerWalletRequestView<'a> {
8926            type Owned = super::super::ExportGuardSignerWalletRequest;
8927            fn decode_view(
8928                buf: &'a [u8],
8929            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8930                let __limit = ::core::cell::Cell::new(
8931                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
8932                );
8933                <Self as ::buffa::MessageView>::decode_view_ctx(
8934                    buf,
8935                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
8936                )
8937            }
8938            fn decode_view_with_ctx(
8939                buf: &'a [u8],
8940                ctx: ::buffa::DecodeContext<'_>,
8941            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
8942                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
8943            }
8944            fn merge_view_field(
8945                &mut self,
8946                tag: ::buffa::encoding::Tag,
8947                cur: &'a [u8],
8948                before_tag: &'a [u8],
8949                ctx: ::buffa::DecodeContext<'_>,
8950            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
8951                let _ = ctx;
8952                #[allow(unused_variables)]
8953                let view = self;
8954                let mut cur = cur;
8955                match tag.field_number() {
8956                    1u32 => {
8957                        ::buffa::encoding::check_wire_type(
8958                            tag,
8959                            ::buffa::encoding::WireType::Fixed64,
8960                        )?;
8961                        view.subaccount_id = ::buffa::types::decode_fixed64(&mut cur)?;
8962                    }
8963                    _ => {
8964                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
8965                        let span_len = before_tag.len() - cur.len();
8966                        view.__buffa_unknown_fields
8967                            .push_record(before_tag, span_len, ctx)?;
8968                    }
8969                }
8970                ::core::result::Result::Ok(cur)
8971            }
8972            fn to_owned_message(
8973                &self,
8974            ) -> ::core::result::Result<
8975                super::super::ExportGuardSignerWalletRequest,
8976                ::buffa::DecodeError,
8977            > {
8978                self.to_owned_from_source(None)
8979            }
8980            #[allow(clippy::useless_conversion, clippy::needless_update)]
8981            fn to_owned_from_source(
8982                &self,
8983                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
8984            ) -> ::core::result::Result<
8985                super::super::ExportGuardSignerWalletRequest,
8986                ::buffa::DecodeError,
8987            > {
8988                #[allow(unused_imports)]
8989                use ::buffa::alloc::string::ToString as _;
8990                let _ = __buffa_src;
8991                ::core::result::Result::Ok(super::super::ExportGuardSignerWalletRequest {
8992                    subaccount_id: self.subaccount_id,
8993                    __buffa_unknown_fields: self
8994                        .__buffa_unknown_fields
8995                        .to_owned()?
8996                        .into(),
8997                    ..::core::default::Default::default()
8998                })
8999            }
9000        }
9001        impl<'a> ::buffa::ViewEncode<'a> for ExportGuardSignerWalletRequestView<'a> {
9002            #[allow(clippy::needless_borrow, clippy::let_and_return)]
9003            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
9004                #[allow(unused_imports)]
9005                use ::buffa::Enumeration as _;
9006                let mut size = 0u32;
9007                if self.subaccount_id != 0u64 {
9008                    size += 1u32 + ::buffa::types::FIXED64_ENCODED_LEN as u32;
9009                }
9010                size += self.__buffa_unknown_fields.encoded_len() as u32;
9011                size
9012            }
9013            #[allow(clippy::needless_borrow)]
9014            fn write_to(
9015                &self,
9016                _cache: &mut ::buffa::SizeCache,
9017                buf: &mut impl ::buffa::bytes::BufMut,
9018            ) {
9019                #[allow(unused_imports)]
9020                use ::buffa::Enumeration as _;
9021                if self.subaccount_id != 0u64 {
9022                    ::buffa::types::put_fixed64_field(1u32, self.subaccount_id, buf);
9023                }
9024                self.__buffa_unknown_fields.write_to(buf);
9025            }
9026        }
9027        /// Serializes this view as protobuf JSON.
9028        ///
9029        /// Implicit-presence fields with default values are omitted, `required`
9030        /// fields are always emitted, explicit-presence (`optional`) fields are
9031        /// emitted only when set, bytes fields are base64-encoded, and enum
9032        /// values are their proto name strings.
9033        ///
9034        /// This impl uses `serialize_map(None)` because the number of emitted
9035        /// fields depends on default-omission rules; serializers that require
9036        /// known map lengths (e.g. `bincode`) will return a runtime error.
9037        /// Use the owned message type for those formats.
9038        impl<'__a> ::serde::Serialize for ExportGuardSignerWalletRequestView<'__a> {
9039            fn serialize<__S: ::serde::Serializer>(
9040                &self,
9041                __s: __S,
9042            ) -> ::core::result::Result<__S::Ok, __S::Error> {
9043                use ::serde::ser::SerializeMap as _;
9044                let mut __map = __s.serialize_map(::core::option::Option::None)?;
9045                if !::buffa::json_helpers::skip_if::is_zero_u64(&self.subaccount_id) {
9046                    __map
9047                        .serialize_entry(
9048                            "subaccountId",
9049                            &::buffa::json_helpers::ProtoJson(&self.subaccount_id),
9050                        )?;
9051                }
9052                __map.end()
9053            }
9054        }
9055        impl<'a> ::buffa::MessageName for ExportGuardSignerWalletRequestView<'a> {
9056            const PACKAGE: &'static str = "chain.guard.v1";
9057            const NAME: &'static str = "ExportGuardSignerWalletRequest";
9058            const FULL_NAME: &'static str = "chain.guard.v1.ExportGuardSignerWalletRequest";
9059            const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.ExportGuardSignerWalletRequest";
9060        }
9061        ::buffa::impl_default_view_instance!(ExportGuardSignerWalletRequestView);
9062        ::buffa::impl_view_reborrow!(ExportGuardSignerWalletRequestView);
9063        /** Self-contained, `'static` owned view of a `ExportGuardSignerWalletRequest` message.
9064
9065 Wraps [`::buffa::OwnedView`]`<`[`ExportGuardSignerWalletRequestView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
9066
9067 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`ExportGuardSignerWalletRequestView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
9068        #[derive(Clone, Debug)]
9069        pub struct ExportGuardSignerWalletRequestOwnedView(
9070            ::buffa::OwnedView<ExportGuardSignerWalletRequestView<'static>>,
9071        );
9072        impl ExportGuardSignerWalletRequestOwnedView {
9073            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
9074            ///
9075            /// The view borrows directly from the buffer's data; the buffer is
9076            /// retained inside the returned handle.
9077            ///
9078            /// # Errors
9079            ///
9080            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
9081            /// protobuf data.
9082            pub fn decode(
9083                bytes: ::buffa::bytes::Bytes,
9084            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9085                ::core::result::Result::Ok(
9086                    ExportGuardSignerWalletRequestOwnedView(
9087                        ::buffa::OwnedView::decode(bytes)?,
9088                    ),
9089                )
9090            }
9091            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
9092            /// max message size).
9093            ///
9094            /// # Errors
9095            ///
9096            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
9097            /// exceeds the configured limits.
9098            pub fn decode_with_options(
9099                bytes: ::buffa::bytes::Bytes,
9100                opts: &::buffa::DecodeOptions,
9101            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9102                ::core::result::Result::Ok(
9103                    ExportGuardSignerWalletRequestOwnedView(
9104                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
9105                    ),
9106                )
9107            }
9108            /// Build from an owned message via an encode → decode round-trip.
9109            ///
9110            /// # Errors
9111            ///
9112            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
9113            /// somehow invalid (should not happen for well-formed messages).
9114            pub fn from_owned(
9115                msg: &super::super::ExportGuardSignerWalletRequest,
9116            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9117                ::core::result::Result::Ok(
9118                    ExportGuardSignerWalletRequestOwnedView(
9119                        ::buffa::OwnedView::from_owned(msg)?,
9120                    ),
9121                )
9122            }
9123            /// Borrow the full [`ExportGuardSignerWalletRequestView`] with its lifetime tied to `&self`.
9124            #[must_use]
9125            pub fn view(&self) -> &ExportGuardSignerWalletRequestView<'_> {
9126                self.0.reborrow()
9127            }
9128            /// Convert to the owned message type.
9129            ///
9130            /// # Errors
9131            ///
9132            /// Returns an error if re-materializing preserved unknown fields
9133            /// fails (e.g. the unknown-field limit is exceeded).
9134            pub fn to_owned_message(
9135                &self,
9136            ) -> ::core::result::Result<
9137                super::super::ExportGuardSignerWalletRequest,
9138                ::buffa::DecodeError,
9139            > {
9140                self.0.to_owned_message()
9141            }
9142            /// The underlying bytes buffer.
9143            #[must_use]
9144            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
9145                self.0.bytes()
9146            }
9147            /// Consume the handle, returning the underlying bytes buffer.
9148            #[must_use]
9149            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
9150                self.0.into_bytes()
9151            }
9152            /// Optional subaccount public id. When omitted, the authenticated caller's
9153            /// root account is used as the target account.
9154            ///
9155            /// Field 1: `subaccount_id`
9156            #[must_use]
9157            pub fn subaccount_id(&self) -> u64 {
9158                self.0.reborrow().subaccount_id
9159            }
9160        }
9161        impl ::core::convert::From<
9162            ::buffa::OwnedView<ExportGuardSignerWalletRequestView<'static>>,
9163        > for ExportGuardSignerWalletRequestOwnedView {
9164            fn from(
9165                inner: ::buffa::OwnedView<ExportGuardSignerWalletRequestView<'static>>,
9166            ) -> Self {
9167                ExportGuardSignerWalletRequestOwnedView(inner)
9168            }
9169        }
9170        impl ::core::convert::From<ExportGuardSignerWalletRequestOwnedView>
9171        for ::buffa::OwnedView<ExportGuardSignerWalletRequestView<'static>> {
9172            fn from(wrapper: ExportGuardSignerWalletRequestOwnedView) -> Self {
9173                wrapper.0
9174            }
9175        }
9176        impl ::core::convert::AsRef<
9177            ::buffa::OwnedView<ExportGuardSignerWalletRequestView<'static>>,
9178        > for ExportGuardSignerWalletRequestOwnedView {
9179            fn as_ref(
9180                &self,
9181            ) -> &::buffa::OwnedView<ExportGuardSignerWalletRequestView<'static>> {
9182                &self.0
9183            }
9184        }
9185        impl ::buffa::HasMessageView for super::super::ExportGuardSignerWalletRequest {
9186            type View<'a> = ExportGuardSignerWalletRequestView<'a>;
9187            type ViewHandle = ExportGuardSignerWalletRequestOwnedView;
9188        }
9189        impl ::serde::Serialize for ExportGuardSignerWalletRequestOwnedView {
9190            fn serialize<__S: ::serde::Serializer>(
9191                &self,
9192                __s: __S,
9193            ) -> ::core::result::Result<__S::Ok, __S::Error> {
9194                ::serde::Serialize::serialize(&self.0, __s)
9195            }
9196        }
9197        /// ExportGuardSignerWalletResponse returns the authorized high-risk wallet export.
9198        #[derive(Clone, Debug, Default)]
9199        pub struct ExportGuardSignerWalletResponseView<'a> {
9200            /// Hex-encoded private key returned only after export authorization succeeds.
9201            ///
9202            /// Field 1: `private_key`
9203            pub private_key: &'a str,
9204            pub __buffa_unknown_fields: ::buffa::UnknownFieldsView<'a>,
9205        }
9206        impl<'a> ::buffa::MessageView<'a> for ExportGuardSignerWalletResponseView<'a> {
9207            type Owned = super::super::ExportGuardSignerWalletResponse;
9208            fn decode_view(
9209                buf: &'a [u8],
9210            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9211                let __limit = ::core::cell::Cell::new(
9212                    ::buffa::DEFAULT_UNKNOWN_FIELD_LIMIT,
9213                );
9214                <Self as ::buffa::MessageView>::decode_view_ctx(
9215                    buf,
9216                    ::buffa::DecodeContext::new(::buffa::RECURSION_LIMIT, &__limit),
9217                )
9218            }
9219            fn decode_view_with_ctx(
9220                buf: &'a [u8],
9221                ctx: ::buffa::DecodeContext<'_>,
9222            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9223                <Self as ::buffa::MessageView>::decode_view_ctx(buf, ctx)
9224            }
9225            fn merge_view_field(
9226                &mut self,
9227                tag: ::buffa::encoding::Tag,
9228                cur: &'a [u8],
9229                before_tag: &'a [u8],
9230                ctx: ::buffa::DecodeContext<'_>,
9231            ) -> ::core::result::Result<&'a [u8], ::buffa::DecodeError> {
9232                let _ = ctx;
9233                #[allow(unused_variables)]
9234                let view = self;
9235                let mut cur = cur;
9236                match tag.field_number() {
9237                    1u32 => {
9238                        ::buffa::encoding::check_wire_type(
9239                            tag,
9240                            ::buffa::encoding::WireType::LengthDelimited,
9241                        )?;
9242                        view.private_key = ::buffa::types::borrow_str(&mut cur)?;
9243                    }
9244                    _ => {
9245                        ::buffa::encoding::skip_field_depth(tag, &mut cur, ctx.depth())?;
9246                        let span_len = before_tag.len() - cur.len();
9247                        view.__buffa_unknown_fields
9248                            .push_record(before_tag, span_len, ctx)?;
9249                    }
9250                }
9251                ::core::result::Result::Ok(cur)
9252            }
9253            fn to_owned_message(
9254                &self,
9255            ) -> ::core::result::Result<
9256                super::super::ExportGuardSignerWalletResponse,
9257                ::buffa::DecodeError,
9258            > {
9259                self.to_owned_from_source(None)
9260            }
9261            #[allow(clippy::useless_conversion, clippy::needless_update)]
9262            fn to_owned_from_source(
9263                &self,
9264                __buffa_src: ::core::option::Option<&::buffa::bytes::Bytes>,
9265            ) -> ::core::result::Result<
9266                super::super::ExportGuardSignerWalletResponse,
9267                ::buffa::DecodeError,
9268            > {
9269                #[allow(unused_imports)]
9270                use ::buffa::alloc::string::ToString as _;
9271                let _ = __buffa_src;
9272                ::core::result::Result::Ok(super::super::ExportGuardSignerWalletResponse {
9273                    private_key: self.private_key.to_string(),
9274                    __buffa_unknown_fields: self
9275                        .__buffa_unknown_fields
9276                        .to_owned()?
9277                        .into(),
9278                    ..::core::default::Default::default()
9279                })
9280            }
9281        }
9282        impl<'a> ::buffa::ViewEncode<'a> for ExportGuardSignerWalletResponseView<'a> {
9283            #[allow(clippy::needless_borrow, clippy::let_and_return)]
9284            fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
9285                #[allow(unused_imports)]
9286                use ::buffa::Enumeration as _;
9287                let mut size = 0u32;
9288                if !self.private_key.is_empty() {
9289                    size
9290                        += 1u32
9291                            + ::buffa::types::string_encoded_len(&self.private_key)
9292                                as u32;
9293                }
9294                size += self.__buffa_unknown_fields.encoded_len() as u32;
9295                size
9296            }
9297            #[allow(clippy::needless_borrow)]
9298            fn write_to(
9299                &self,
9300                _cache: &mut ::buffa::SizeCache,
9301                buf: &mut impl ::buffa::bytes::BufMut,
9302            ) {
9303                #[allow(unused_imports)]
9304                use ::buffa::Enumeration as _;
9305                if !self.private_key.is_empty() {
9306                    ::buffa::types::put_string_field(1u32, &self.private_key, buf);
9307                }
9308                self.__buffa_unknown_fields.write_to(buf);
9309            }
9310        }
9311        /// Serializes this view as protobuf JSON.
9312        ///
9313        /// Implicit-presence fields with default values are omitted, `required`
9314        /// fields are always emitted, explicit-presence (`optional`) fields are
9315        /// emitted only when set, bytes fields are base64-encoded, and enum
9316        /// values are their proto name strings.
9317        ///
9318        /// This impl uses `serialize_map(None)` because the number of emitted
9319        /// fields depends on default-omission rules; serializers that require
9320        /// known map lengths (e.g. `bincode`) will return a runtime error.
9321        /// Use the owned message type for those formats.
9322        impl<'__a> ::serde::Serialize for ExportGuardSignerWalletResponseView<'__a> {
9323            fn serialize<__S: ::serde::Serializer>(
9324                &self,
9325                __s: __S,
9326            ) -> ::core::result::Result<__S::Ok, __S::Error> {
9327                use ::serde::ser::SerializeMap as _;
9328                let mut __map = __s.serialize_map(::core::option::Option::None)?;
9329                if !::buffa::json_helpers::skip_if::is_empty_str(self.private_key) {
9330                    __map.serialize_entry("privateKey", self.private_key)?;
9331                }
9332                __map.end()
9333            }
9334        }
9335        impl<'a> ::buffa::MessageName for ExportGuardSignerWalletResponseView<'a> {
9336            const PACKAGE: &'static str = "chain.guard.v1";
9337            const NAME: &'static str = "ExportGuardSignerWalletResponse";
9338            const FULL_NAME: &'static str = "chain.guard.v1.ExportGuardSignerWalletResponse";
9339            const TYPE_URL: &'static str = "type.googleapis.com/chain.guard.v1.ExportGuardSignerWalletResponse";
9340        }
9341        ::buffa::impl_default_view_instance!(ExportGuardSignerWalletResponseView);
9342        ::buffa::impl_view_reborrow!(ExportGuardSignerWalletResponseView);
9343        /** Self-contained, `'static` owned view of a `ExportGuardSignerWalletResponse` message.
9344
9345 Wraps [`::buffa::OwnedView`]`<`[`ExportGuardSignerWalletResponseView`]`<'static>>`: the decoded view and the [`::buffa::bytes::Bytes`] buffer it borrows from travel together, so the handle is `'static` and `Send + Sync` — suitable for async handlers, spawned tasks, and anywhere a `'static` bound is required.
9346
9347 Field accessors return borrows tied to `&self`. Use [`Self::view`] to get the full [`ExportGuardSignerWalletResponseView`] when you need struct patterns, iteration helpers, or to pass the view to lifetime-parameterised code.*/
9348        #[derive(Clone, Debug)]
9349        pub struct ExportGuardSignerWalletResponseOwnedView(
9350            ::buffa::OwnedView<ExportGuardSignerWalletResponseView<'static>>,
9351        );
9352        impl ExportGuardSignerWalletResponseOwnedView {
9353            /// Decode an owned view from a [`::buffa::bytes::Bytes`] buffer.
9354            ///
9355            /// The view borrows directly from the buffer's data; the buffer is
9356            /// retained inside the returned handle.
9357            ///
9358            /// # Errors
9359            ///
9360            /// Returns [`::buffa::DecodeError`] if the buffer contains invalid
9361            /// protobuf data.
9362            pub fn decode(
9363                bytes: ::buffa::bytes::Bytes,
9364            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9365                ::core::result::Result::Ok(
9366                    ExportGuardSignerWalletResponseOwnedView(
9367                        ::buffa::OwnedView::decode(bytes)?,
9368                    ),
9369                )
9370            }
9371            /// Decode with custom [`::buffa::DecodeOptions`] (recursion limit,
9372            /// max message size).
9373            ///
9374            /// # Errors
9375            ///
9376            /// Returns [`::buffa::DecodeError`] if the buffer is invalid or
9377            /// exceeds the configured limits.
9378            pub fn decode_with_options(
9379                bytes: ::buffa::bytes::Bytes,
9380                opts: &::buffa::DecodeOptions,
9381            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9382                ::core::result::Result::Ok(
9383                    ExportGuardSignerWalletResponseOwnedView(
9384                        ::buffa::OwnedView::decode_with_options(bytes, opts)?,
9385                    ),
9386                )
9387            }
9388            /// Build from an owned message via an encode → decode round-trip.
9389            ///
9390            /// # Errors
9391            ///
9392            /// Returns [`::buffa::DecodeError`] if the re-encoded bytes are
9393            /// somehow invalid (should not happen for well-formed messages).
9394            pub fn from_owned(
9395                msg: &super::super::ExportGuardSignerWalletResponse,
9396            ) -> ::core::result::Result<Self, ::buffa::DecodeError> {
9397                ::core::result::Result::Ok(
9398                    ExportGuardSignerWalletResponseOwnedView(
9399                        ::buffa::OwnedView::from_owned(msg)?,
9400                    ),
9401                )
9402            }
9403            /// Borrow the full [`ExportGuardSignerWalletResponseView`] with its lifetime tied to `&self`.
9404            #[must_use]
9405            pub fn view(&self) -> &ExportGuardSignerWalletResponseView<'_> {
9406                self.0.reborrow()
9407            }
9408            /// Convert to the owned message type.
9409            ///
9410            /// # Errors
9411            ///
9412            /// Returns an error if re-materializing preserved unknown fields
9413            /// fails (e.g. the unknown-field limit is exceeded).
9414            pub fn to_owned_message(
9415                &self,
9416            ) -> ::core::result::Result<
9417                super::super::ExportGuardSignerWalletResponse,
9418                ::buffa::DecodeError,
9419            > {
9420                self.0.to_owned_message()
9421            }
9422            /// The underlying bytes buffer.
9423            #[must_use]
9424            pub fn bytes(&self) -> &::buffa::bytes::Bytes {
9425                self.0.bytes()
9426            }
9427            /// Consume the handle, returning the underlying bytes buffer.
9428            #[must_use]
9429            pub fn into_bytes(self) -> ::buffa::bytes::Bytes {
9430                self.0.into_bytes()
9431            }
9432            /// Hex-encoded private key returned only after export authorization succeeds.
9433            ///
9434            /// Field 1: `private_key`
9435            #[must_use]
9436            pub fn private_key(&self) -> &'_ str {
9437                self.0.reborrow().private_key
9438            }
9439        }
9440        impl ::core::convert::From<
9441            ::buffa::OwnedView<ExportGuardSignerWalletResponseView<'static>>,
9442        > for ExportGuardSignerWalletResponseOwnedView {
9443            fn from(
9444                inner: ::buffa::OwnedView<ExportGuardSignerWalletResponseView<'static>>,
9445            ) -> Self {
9446                ExportGuardSignerWalletResponseOwnedView(inner)
9447            }
9448        }
9449        impl ::core::convert::From<ExportGuardSignerWalletResponseOwnedView>
9450        for ::buffa::OwnedView<ExportGuardSignerWalletResponseView<'static>> {
9451            fn from(wrapper: ExportGuardSignerWalletResponseOwnedView) -> Self {
9452                wrapper.0
9453            }
9454        }
9455        impl ::core::convert::AsRef<
9456            ::buffa::OwnedView<ExportGuardSignerWalletResponseView<'static>>,
9457        > for ExportGuardSignerWalletResponseOwnedView {
9458            fn as_ref(
9459                &self,
9460            ) -> &::buffa::OwnedView<ExportGuardSignerWalletResponseView<'static>> {
9461                &self.0
9462            }
9463        }
9464        impl ::buffa::HasMessageView for super::super::ExportGuardSignerWalletResponse {
9465            type View<'a> = ExportGuardSignerWalletResponseView<'a>;
9466            type ViewHandle = ExportGuardSignerWalletResponseOwnedView;
9467        }
9468        impl ::serde::Serialize for ExportGuardSignerWalletResponseOwnedView {
9469            fn serialize<__S: ::serde::Serializer>(
9470                &self,
9471                __s: __S,
9472            ) -> ::core::result::Result<__S::Ok, __S::Error> {
9473                ::serde::Serialize::serialize(&self.0, __s)
9474            }
9475        }
9476        pub mod oneof {
9477            #[allow(unused_imports)]
9478            use super::*;
9479            pub mod protected_action_args {
9480                #[allow(unused_imports)]
9481                use super::*;
9482                #[derive(Clone, Debug)]
9483                pub enum Args<'a> {
9484                    ExternalWhitelist(
9485                        ::buffa::alloc::boxed::Box<
9486                            super::super::super::super::__buffa::view::ExternalWhitelistArgsView<
9487                                'a,
9488                            >,
9489                        >,
9490                    ),
9491                    InternalWhitelist(
9492                        ::buffa::alloc::boxed::Box<
9493                            super::super::super::super::__buffa::view::InternalWhitelistArgsView<
9494                                'a,
9495                            >,
9496                        >,
9497                    ),
9498                    WhitelistRequirement(
9499                        ::buffa::alloc::boxed::Box<
9500                            super::super::super::super::__buffa::view::WhitelistRequirementArgsView<
9501                                'a,
9502                            >,
9503                        >,
9504                    ),
9505                }
9506            }
9507        }
9508    }
9509    pub mod oneof {
9510        #[allow(unused_imports)]
9511        use super::*;
9512        pub mod protected_action_args {
9513            #[allow(unused_imports)]
9514            use super::*;
9515            /// Business arguments required by the selected protected action.
9516            #[derive(Clone, PartialEq, Debug)]
9517            pub enum Args {
9518                ExternalWhitelist(
9519                    ::buffa::alloc::boxed::Box<
9520                        super::super::super::ExternalWhitelistArgs,
9521                    >,
9522                ),
9523                InternalWhitelist(
9524                    ::buffa::alloc::boxed::Box<
9525                        super::super::super::InternalWhitelistArgs,
9526                    >,
9527                ),
9528                WhitelistRequirement(
9529                    ::buffa::alloc::boxed::Box<
9530                        super::super::super::WhitelistRequirementArgs,
9531                    >,
9532                ),
9533            }
9534            impl ::buffa::Oneof for Args {}
9535            impl From<super::super::super::ExternalWhitelistArgs> for Args {
9536                fn from(v: super::super::super::ExternalWhitelistArgs) -> Self {
9537                    Self::ExternalWhitelist(::buffa::alloc::boxed::Box::new(v))
9538                }
9539            }
9540            impl From<super::super::super::ExternalWhitelistArgs>
9541            for ::core::option::Option<Args> {
9542                fn from(v: super::super::super::ExternalWhitelistArgs) -> Self {
9543                    Self::Some(Args::from(v))
9544                }
9545            }
9546            impl From<super::super::super::InternalWhitelistArgs> for Args {
9547                fn from(v: super::super::super::InternalWhitelistArgs) -> Self {
9548                    Self::InternalWhitelist(::buffa::alloc::boxed::Box::new(v))
9549                }
9550            }
9551            impl From<super::super::super::InternalWhitelistArgs>
9552            for ::core::option::Option<Args> {
9553                fn from(v: super::super::super::InternalWhitelistArgs) -> Self {
9554                    Self::Some(Args::from(v))
9555                }
9556            }
9557            impl From<super::super::super::WhitelistRequirementArgs> for Args {
9558                fn from(v: super::super::super::WhitelistRequirementArgs) -> Self {
9559                    Self::WhitelistRequirement(::buffa::alloc::boxed::Box::new(v))
9560                }
9561            }
9562            impl From<super::super::super::WhitelistRequirementArgs>
9563            for ::core::option::Option<Args> {
9564                fn from(v: super::super::super::WhitelistRequirementArgs) -> Self {
9565                    Self::Some(Args::from(v))
9566                }
9567            }
9568            impl serde::Serialize for Args {
9569                fn serialize<S: serde::Serializer>(
9570                    &self,
9571                    s: S,
9572                ) -> ::core::result::Result<S::Ok, S::Error> {
9573                    use serde::ser::SerializeMap;
9574                    let mut map = s.serialize_map(Some(1))?;
9575                    match self {
9576                        Self::ExternalWhitelist(v) => {
9577                            map.serialize_entry("externalWhitelist", v)?;
9578                        }
9579                        Self::InternalWhitelist(v) => {
9580                            map.serialize_entry("internalWhitelist", v)?;
9581                        }
9582                        Self::WhitelistRequirement(v) => {
9583                            map.serialize_entry("whitelistRequirement", v)?;
9584                        }
9585                    }
9586                    map.end()
9587                }
9588            }
9589        }
9590    }
9591    /// Register this package's `Any` type entries and extension entries.
9592    pub fn register_types(reg: &mut ::buffa::type_registry::TypeRegistry) {
9593        reg.register_json_any(super::__GUARD_SIGNER_STATUS_JSON_ANY);
9594        reg.register_json_any(super::__GUARD_APPROVAL_JSON_ANY);
9595        reg.register_json_any(super::__EXTERNAL_WHITELIST_ARGS_JSON_ANY);
9596        reg.register_json_any(super::__INTERNAL_WHITELIST_ARGS_JSON_ANY);
9597        reg.register_json_any(super::__WHITELIST_REQUIREMENT_ARGS_JSON_ANY);
9598        reg.register_json_any(super::__PROTECTED_ACTION_ARGS_JSON_ANY);
9599        reg.register_json_any(super::__CREATE_GUARD_SIGNER_WALLET_REQUEST_JSON_ANY);
9600        reg.register_json_any(super::__CREATE_GUARD_SIGNER_WALLET_RESPONSE_JSON_ANY);
9601        reg.register_json_any(super::__GET_GUARD_SIGNER_STATUS_REQUEST_JSON_ANY);
9602        reg.register_json_any(super::__GET_GUARD_SIGNER_STATUS_RESPONSE_JSON_ANY);
9603        reg.register_json_any(super::__SIGN_PROTECTED_ACTION_REQUEST_JSON_ANY);
9604        reg.register_json_any(super::__SIGN_PROTECTED_ACTION_RESPONSE_JSON_ANY);
9605        reg.register_json_any(super::__BATCH_SIGN_PROTECTED_ACTION_ITEM_JSON_ANY);
9606        reg.register_json_any(super::__BATCH_SIGN_PROTECTED_ACTIONS_REQUEST_JSON_ANY);
9607        reg.register_json_any(super::__BATCH_SIGN_PROTECTED_ACTIONS_RESPONSE_JSON_ANY);
9608        reg.register_json_any(super::__ROTATE_GUARD_SIGNER_WALLET_REQUEST_JSON_ANY);
9609        reg.register_json_any(super::__ROTATE_GUARD_SIGNER_WALLET_RESPONSE_JSON_ANY);
9610        reg.register_json_any(super::__EXPORT_GUARD_SIGNER_WALLET_REQUEST_JSON_ANY);
9611        reg.register_json_any(super::__EXPORT_GUARD_SIGNER_WALLET_RESPONSE_JSON_ANY);
9612    }
9613}
9614#[doc(inline)]
9615pub use self::__buffa::view::GuardSignerStatusView;
9616#[doc(inline)]
9617pub use self::__buffa::view::GuardSignerStatusOwnedView;
9618#[doc(inline)]
9619pub use self::__buffa::view::GuardApprovalView;
9620#[doc(inline)]
9621pub use self::__buffa::view::GuardApprovalOwnedView;
9622#[doc(inline)]
9623pub use self::__buffa::view::ExternalWhitelistArgsView;
9624#[doc(inline)]
9625pub use self::__buffa::view::ExternalWhitelistArgsOwnedView;
9626#[doc(inline)]
9627pub use self::__buffa::view::InternalWhitelistArgsView;
9628#[doc(inline)]
9629pub use self::__buffa::view::InternalWhitelistArgsOwnedView;
9630#[doc(inline)]
9631pub use self::__buffa::view::WhitelistRequirementArgsView;
9632#[doc(inline)]
9633pub use self::__buffa::view::WhitelistRequirementArgsOwnedView;
9634#[doc(inline)]
9635pub use self::__buffa::view::ProtectedActionArgsView;
9636#[doc(inline)]
9637pub use self::__buffa::view::ProtectedActionArgsOwnedView;
9638#[doc(inline)]
9639pub use self::__buffa::view::CreateGuardSignerWalletRequestView;
9640#[doc(inline)]
9641pub use self::__buffa::view::CreateGuardSignerWalletRequestOwnedView;
9642#[doc(inline)]
9643pub use self::__buffa::view::CreateGuardSignerWalletResponseView;
9644#[doc(inline)]
9645pub use self::__buffa::view::CreateGuardSignerWalletResponseOwnedView;
9646#[doc(inline)]
9647pub use self::__buffa::view::GetGuardSignerStatusRequestView;
9648#[doc(inline)]
9649pub use self::__buffa::view::GetGuardSignerStatusRequestOwnedView;
9650#[doc(inline)]
9651pub use self::__buffa::view::GetGuardSignerStatusResponseView;
9652#[doc(inline)]
9653pub use self::__buffa::view::GetGuardSignerStatusResponseOwnedView;
9654#[doc(inline)]
9655pub use self::__buffa::view::SignProtectedActionRequestView;
9656#[doc(inline)]
9657pub use self::__buffa::view::SignProtectedActionRequestOwnedView;
9658#[doc(inline)]
9659pub use self::__buffa::view::SignProtectedActionResponseView;
9660#[doc(inline)]
9661pub use self::__buffa::view::SignProtectedActionResponseOwnedView;
9662#[doc(inline)]
9663pub use self::__buffa::view::BatchSignProtectedActionItemView;
9664#[doc(inline)]
9665pub use self::__buffa::view::BatchSignProtectedActionItemOwnedView;
9666#[doc(inline)]
9667pub use self::__buffa::view::BatchSignProtectedActionsRequestView;
9668#[doc(inline)]
9669pub use self::__buffa::view::BatchSignProtectedActionsRequestOwnedView;
9670#[doc(inline)]
9671pub use self::__buffa::view::BatchSignProtectedActionsResponseView;
9672#[doc(inline)]
9673pub use self::__buffa::view::BatchSignProtectedActionsResponseOwnedView;
9674#[doc(inline)]
9675pub use self::__buffa::view::RotateGuardSignerWalletRequestView;
9676#[doc(inline)]
9677pub use self::__buffa::view::RotateGuardSignerWalletRequestOwnedView;
9678#[doc(inline)]
9679pub use self::__buffa::view::RotateGuardSignerWalletResponseView;
9680#[doc(inline)]
9681pub use self::__buffa::view::RotateGuardSignerWalletResponseOwnedView;
9682#[doc(inline)]
9683pub use self::__buffa::view::ExportGuardSignerWalletRequestView;
9684#[doc(inline)]
9685pub use self::__buffa::view::ExportGuardSignerWalletRequestOwnedView;
9686#[doc(inline)]
9687pub use self::__buffa::view::ExportGuardSignerWalletResponseView;
9688#[doc(inline)]
9689pub use self::__buffa::view::ExportGuardSignerWalletResponseOwnedView;
9690#[doc(inline)]
9691pub use self::__buffa::register_types;