diff --git a/common/protob/messages-nostr.proto b/common/protob/messages-nostr.proto index dfc9ea251a..d6957b8858 100644 --- a/common/protob/messages-nostr.proto +++ b/common/protob/messages-nostr.proto @@ -16,10 +16,6 @@ option (include_in_bitcoin_only) = true; */ message NostrGetPubkey { repeated uint32 address_n = 1; // used to derive the key - optional uint32 created_at = 2; - optional uint32 kind = 3; - repeated string tags = 4; - optional string content = 5; } /** diff --git a/core/src/trezor/messages.py b/core/src/trezor/messages.py index 97efa1caa3..817ca1b376 100644 --- a/core/src/trezor/messages.py +++ b/core/src/trezor/messages.py @@ -5194,19 +5194,11 @@ if TYPE_CHECKING: class NostrGetPubkey(protobuf.MessageType): address_n: "list[int]" - created_at: "int | None" - kind: "int | None" - tags: "list[str]" - content: "str | None" def __init__( self, *, address_n: "list[int] | None" = None, - tags: "list[str] | None" = None, - created_at: "int | None" = None, - kind: "int | None" = None, - content: "str | None" = None, ) -> None: pass diff --git a/python/src/trezorlib/messages.py b/python/src/trezorlib/messages.py index cf276a7525..50968c5708 100644 --- a/python/src/trezorlib/messages.py +++ b/python/src/trezorlib/messages.py @@ -6771,26 +6771,14 @@ class NostrGetPubkey(protobuf.MessageType): MESSAGE_WIRE_TYPE = 2001 FIELDS = { 1: protobuf.Field("address_n", "uint32", repeated=True, required=False, default=None), - 2: protobuf.Field("created_at", "uint32", repeated=False, required=False, default=None), - 3: protobuf.Field("kind", "uint32", repeated=False, required=False, default=None), - 4: protobuf.Field("tags", "string", repeated=True, required=False, default=None), - 5: protobuf.Field("content", "string", repeated=False, required=False, default=None), } def __init__( self, *, address_n: Optional[Sequence["int"]] = None, - tags: Optional[Sequence["str"]] = None, - created_at: Optional["int"] = None, - kind: Optional["int"] = None, - content: Optional["str"] = None, ) -> None: self.address_n: Sequence["int"] = address_n if address_n is not None else [] - self.tags: Sequence["str"] = tags if tags is not None else [] - self.created_at = created_at - self.kind = kind - self.content = content class NostrPubkey(protobuf.MessageType): diff --git a/rust/trezor-client/src/protos/generated/messages_nostr.rs b/rust/trezor-client/src/protos/generated/messages_nostr.rs index a19730c997..f1c7f8be96 100644 --- a/rust/trezor-client/src/protos/generated/messages_nostr.rs +++ b/rust/trezor-client/src/protos/generated/messages_nostr.rs @@ -31,14 +31,6 @@ pub struct NostrGetPubkey { // message fields // @@protoc_insertion_point(field:hw.trezor.messages.nostr.NostrGetPubkey.address_n) pub address_n: ::std::vec::Vec, - // @@protoc_insertion_point(field:hw.trezor.messages.nostr.NostrGetPubkey.created_at) - pub created_at: ::std::option::Option, - // @@protoc_insertion_point(field:hw.trezor.messages.nostr.NostrGetPubkey.kind) - pub kind: ::std::option::Option, - // @@protoc_insertion_point(field:hw.trezor.messages.nostr.NostrGetPubkey.tags) - pub tags: ::std::vec::Vec<::std::string::String>, - // @@protoc_insertion_point(field:hw.trezor.messages.nostr.NostrGetPubkey.content) - pub content: ::std::option::Option<::std::string::String>, // special fields // @@protoc_insertion_point(special_field:hw.trezor.messages.nostr.NostrGetPubkey.special_fields) pub special_fields: ::protobuf::SpecialFields, @@ -55,108 +47,14 @@ impl NostrGetPubkey { ::std::default::Default::default() } - // optional uint32 created_at = 2; - - pub fn created_at(&self) -> u32 { - self.created_at.unwrap_or(0) - } - - pub fn clear_created_at(&mut self) { - self.created_at = ::std::option::Option::None; - } - - pub fn has_created_at(&self) -> bool { - self.created_at.is_some() - } - - // Param is passed by value, moved - pub fn set_created_at(&mut self, v: u32) { - self.created_at = ::std::option::Option::Some(v); - } - - // optional uint32 kind = 3; - - pub fn kind(&self) -> u32 { - self.kind.unwrap_or(0) - } - - pub fn clear_kind(&mut self) { - self.kind = ::std::option::Option::None; - } - - pub fn has_kind(&self) -> bool { - self.kind.is_some() - } - - // Param is passed by value, moved - pub fn set_kind(&mut self, v: u32) { - self.kind = ::std::option::Option::Some(v); - } - - // optional string content = 5; - - pub fn content(&self) -> &str { - match self.content.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_content(&mut self) { - self.content = ::std::option::Option::None; - } - - pub fn has_content(&self) -> bool { - self.content.is_some() - } - - // Param is passed by value, moved - pub fn set_content(&mut self, v: ::std::string::String) { - self.content = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_content(&mut self) -> &mut ::std::string::String { - if self.content.is_none() { - self.content = ::std::option::Option::Some(::std::string::String::new()); - } - self.content.as_mut().unwrap() - } - - // Take field - pub fn take_content(&mut self) -> ::std::string::String { - self.content.take().unwrap_or_else(|| ::std::string::String::new()) - } - fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { - let mut fields = ::std::vec::Vec::with_capacity(5); + let mut fields = ::std::vec::Vec::with_capacity(1); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "address_n", |m: &NostrGetPubkey| { &m.address_n }, |m: &mut NostrGetPubkey| { &mut m.address_n }, )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "created_at", - |m: &NostrGetPubkey| { &m.created_at }, - |m: &mut NostrGetPubkey| { &mut m.created_at }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "kind", - |m: &NostrGetPubkey| { &m.kind }, - |m: &mut NostrGetPubkey| { &mut m.kind }, - )); - fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( - "tags", - |m: &NostrGetPubkey| { &m.tags }, - |m: &mut NostrGetPubkey| { &mut m.tags }, - )); - fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>( - "content", - |m: &NostrGetPubkey| { &m.content }, - |m: &mut NostrGetPubkey| { &mut m.content }, - )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "NostrGetPubkey", fields, @@ -181,18 +79,6 @@ impl ::protobuf::Message for NostrGetPubkey { 8 => { self.address_n.push(is.read_uint32()?); }, - 16 => { - self.created_at = ::std::option::Option::Some(is.read_uint32()?); - }, - 24 => { - self.kind = ::std::option::Option::Some(is.read_uint32()?); - }, - 34 => { - self.tags.push(is.read_string()?); - }, - 42 => { - self.content = ::std::option::Option::Some(is.read_string()?); - }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, @@ -208,18 +94,6 @@ impl ::protobuf::Message for NostrGetPubkey { for value in &self.address_n { my_size += ::protobuf::rt::uint32_size(1, *value); }; - if let Some(v) = self.created_at { - my_size += ::protobuf::rt::uint32_size(2, v); - } - if let Some(v) = self.kind { - my_size += ::protobuf::rt::uint32_size(3, v); - } - for value in &self.tags { - my_size += ::protobuf::rt::string_size(4, &value); - }; - if let Some(v) = self.content.as_ref() { - my_size += ::protobuf::rt::string_size(5, &v); - } my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); self.special_fields.cached_size().set(my_size as u32); my_size @@ -229,18 +103,6 @@ impl ::protobuf::Message for NostrGetPubkey { for v in &self.address_n { os.write_uint32(1, *v)?; }; - if let Some(v) = self.created_at { - os.write_uint32(2, v)?; - } - if let Some(v) = self.kind { - os.write_uint32(3, v)?; - } - for v in &self.tags { - os.write_string(4, &v)?; - }; - if let Some(v) = self.content.as_ref() { - os.write_string(5, v)?; - } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } @@ -259,20 +121,12 @@ impl ::protobuf::Message for NostrGetPubkey { fn clear(&mut self) { self.address_n.clear(); - self.created_at = ::std::option::Option::None; - self.kind = ::std::option::Option::None; - self.tags.clear(); - self.content = ::std::option::Option::None; self.special_fields.clear(); } fn default_instance() -> &'static NostrGetPubkey { static instance: NostrGetPubkey = NostrGetPubkey { address_n: ::std::vec::Vec::new(), - created_at: ::std::option::Option::None, - kind: ::std::option::Option::None, - tags: ::std::vec::Vec::new(), - content: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance @@ -1005,19 +859,16 @@ impl ::protobuf::reflect::ProtobufValue for NostrEventSignature { static file_descriptor_proto_data: &'static [u8] = b"\ \n\x14messages-nostr.proto\x12\x18hw.trezor.messages.nostr\x1a\roptions.\ - proto\"\x8e\x01\n\x0eNostrGetPubkey\x12\x1b\n\taddress_n\x18\x01\x20\x03\ - (\rR\x08addressN\x12\x1d\n\ncreated_at\x18\x02\x20\x01(\rR\tcreatedAt\ - \x12\x12\n\x04kind\x18\x03\x20\x01(\rR\x04kind\x12\x12\n\x04tags\x18\x04\ - \x20\x03(\tR\x04tags\x12\x18\n\x07content\x18\x05\x20\x01(\tR\x07content\ - \"%\n\x0bNostrPubkey\x12\x16\n\x06pubkey\x18\x01\x20\x02(\x0cR\x06pubkey\ - \"\x8e\x01\n\x0eNostrSignEvent\x12\x1b\n\taddress_n\x18\x01\x20\x03(\rR\ - \x08addressN\x12\x1d\n\ncreated_at\x18\x02\x20\x01(\rR\tcreatedAt\x12\ - \x12\n\x04kind\x18\x03\x20\x01(\rR\x04kind\x12\x12\n\x04tags\x18\x04\x20\ - \x03(\tR\x04tags\x12\x18\n\x07content\x18\x05\x20\x01(\tR\x07content\"[\ - \n\x13NostrEventSignature\x12\x16\n\x06pubkey\x18\x01\x20\x02(\x0cR\x06p\ - ubkey\x12\x0e\n\x02id\x18\x02\x20\x02(\x0cR\x02id\x12\x1c\n\tsignature\ - \x18\x03\x20\x02(\x0cR\tsignatureB=\n#com.satoshilabs.trezor.lib.protobu\ - fB\x12TrezorMessageNostr\x80\xa6\x1d\x01\ + proto\"-\n\x0eNostrGetPubkey\x12\x1b\n\taddress_n\x18\x01\x20\x03(\rR\ + \x08addressN\"%\n\x0bNostrPubkey\x12\x16\n\x06pubkey\x18\x01\x20\x02(\ + \x0cR\x06pubkey\"\x8e\x01\n\x0eNostrSignEvent\x12\x1b\n\taddress_n\x18\ + \x01\x20\x03(\rR\x08addressN\x12\x1d\n\ncreated_at\x18\x02\x20\x01(\rR\t\ + createdAt\x12\x12\n\x04kind\x18\x03\x20\x01(\rR\x04kind\x12\x12\n\x04tag\ + s\x18\x04\x20\x03(\tR\x04tags\x12\x18\n\x07content\x18\x05\x20\x01(\tR\ + \x07content\"[\n\x13NostrEventSignature\x12\x16\n\x06pubkey\x18\x01\x20\ + \x02(\x0cR\x06pubkey\x12\x0e\n\x02id\x18\x02\x20\x02(\x0cR\x02id\x12\x1c\ + \n\tsignature\x18\x03\x20\x02(\x0cR\tsignatureB=\n#com.satoshilabs.trezo\ + r.lib.protobufB\x12TrezorMessageNostr\x80\xa6\x1d\x01\ "; /// `FileDescriptorProto` object which was a source for this generated file