1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-12 17:38:13 +00:00
trezor-firmware/common/protob/messages-nostr.proto

53 lines
1.3 KiB
Protocol Buffer

syntax = "proto2";
package hw.trezor.messages.nostr;
// Sugar for easier handling in Java
option java_package = "com.satoshilabs.trezor.lib.protobuf";
option java_outer_classname = "TrezorMessageNostr";
import "options.proto";
option (include_in_bitcoin_only) = true;
/**
* Request: Ask the device for the Nostr public key
* @start
* @next NostrMessageSignature
*/
message NostrGetPubkey {
repeated uint32 address_n = 1; // used to derive the key
optional bool show_display = 2; // optionally show on display before sending the result
}
/**
* Response: Nostr pubkey
* @end
*/
message NostrPubkey {
required bytes pubkey = 1; // pubkey derived from the seed
}
/**
* Request: Ask device to sign event
* @start
* @next NostrEventSignature
* @next Failure
*/
message NostrSignEvent {
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;
}
/**
* Response: Computed event ID and signature
* @end
*/
message NostrEventSignature {
required bytes pubkey = 1; // pubkey used to sign the event
required bytes id = 2; // ID of the event
required bytes signature = 3; // signature of the event
}