authmailboxrpc

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 5, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package authmailboxrpc is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_authmailboxrpc_mailbox_proto protoreflect.FileDescriptor
View Source
var Mailbox_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "authmailboxrpc.Mailbox",
	HandlerType: (*MailboxServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SendMessage",
			Handler:    _Mailbox_SendMessage_Handler,
		},
		{
			MethodName: "MailboxInfo",
			Handler:    _Mailbox_MailboxInfo_Handler,
		},
		{
			MethodName: "RemoveMessage",
			Handler:    _Mailbox_RemoveMessage_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "ReceiveMessages",
			Handler:       _Mailbox_ReceiveMessages_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "authmailboxrpc/mailbox.proto",
}

Mailbox_ServiceDesc is the grpc.ServiceDesc for Mailbox service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterMailboxHandler

func RegisterMailboxHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterMailboxHandler registers the http handlers for service Mailbox to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterMailboxHandlerClient

func RegisterMailboxHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MailboxClient) error

RegisterMailboxHandlerClient registers the http handlers for service Mailbox to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MailboxClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MailboxClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "MailboxClient" to call the correct interceptors.

func RegisterMailboxHandlerFromEndpoint

func RegisterMailboxHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterMailboxHandlerFromEndpoint is same as RegisterMailboxHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterMailboxHandlerServer

func RegisterMailboxHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MailboxServer) error

RegisterMailboxHandlerServer registers the http handlers for service Mailbox to "mux". UnaryRPC :call MailboxServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMailboxHandlerFromEndpoint instead.

func RegisterMailboxServer

func RegisterMailboxServer(s grpc.ServiceRegistrar, srv MailboxServer)

Types

type AuthSignature

type AuthSignature struct {

	// The client's Schnorr signature over the challenge hash provided by
	// the server.
	Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

Carries the client's signature in response to the server's challenge.

func (*AuthSignature) Descriptor deprecated

func (*AuthSignature) Descriptor() ([]byte, []int)

Deprecated: Use AuthSignature.ProtoReflect.Descriptor instead.

func (*AuthSignature) GetSignature

func (x *AuthSignature) GetSignature() []byte

func (*AuthSignature) ProtoMessage

func (*AuthSignature) ProtoMessage()

func (*AuthSignature) ProtoReflect

func (x *AuthSignature) ProtoReflect() protoreflect.Message

func (*AuthSignature) Reset

func (x *AuthSignature) Reset()

func (*AuthSignature) String

func (x *AuthSignature) String() string

type BitcoinMerkleInclusionProof

type BitcoinMerkleInclusionProof struct {

	// The raw Bitcoin transaction bytes, in standard Bitcoin serialization
	// format, containing the outpoint being claimed. The server will hash this
	// to get the TXID.
	RawTxData []byte `protobuf:"bytes,1,opt,name=raw_tx_data,json=rawTxData,proto3" json:"raw_tx_data,omitempty"`
	// The raw block header bytes (typically 80 bytes) of the block in which the
	// transaction was mined. Contains the Merkle root against which the proof
	// is verified.
	RawBlockHeaderData []byte `protobuf:"bytes,2,opt,name=raw_block_header_data,json=rawBlockHeaderData,proto3" json:"raw_block_header_data,omitempty"`
	// The height at which the block was mined. This is used to determine the
	// block's validity and to ensure the transaction is not too old.
	BlockHeight uint32 `protobuf:"varint,3,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"`
	// The Merkle path proving the transaction's inclusion in the block header's
	// Merkle root.
	MerkleProof *MerkleProof `protobuf:"bytes,4,opt,name=merkle_proof,json=merkleProof,proto3" json:"merkle_proof,omitempty"`
	// The specific output within the provided transaction being claimed as the
	// proof "token". The output at the given index must be a P2TR output.
	// The server must verify that the txid_hex matches the hash of the provided
	// transaction data, and that this specific outpoint index exists in the
	// transaction.
	ClaimedOutpoint *taprpc.OutPoint `protobuf:"bytes,5,opt,name=claimed_outpoint,json=claimedOutpoint,proto3" json:"claimed_outpoint,omitempty"`
	// The Taproot internal key used to construct the P2TR output that is
	// claimed by the outpoint above. Must be provided alongside the Taproot
	// Merkle root to prove knowledge of the output's construction.
	InternalKey []byte `protobuf:"bytes,6,opt,name=internal_key,json=internalKey,proto3" json:"internal_key,omitempty"`
	// The Taproot Merkle root, if applicable. This, alongside the internal key,
	// is used to prove knowledge of the output's construction. If this is not
	// provided (empty or nil), a BIP-0086 construction is assumed.
	MerkleRoot []byte `protobuf:"bytes,7,opt,name=merkle_root,json=merkleRoot,proto3" json:"merkle_root,omitempty"`
	// contains filtered or unexported fields
}

Encapsulates the full proof required for sender authentication, demonstrating that a specific P2TR transaction output was included in a Bitcoin block. To prove knowledge of the claimed output, the proof must include the output's internal key and, optionally, the Taproot Merkle root.

func (*BitcoinMerkleInclusionProof) Descriptor deprecated

func (*BitcoinMerkleInclusionProof) Descriptor() ([]byte, []int)

Deprecated: Use BitcoinMerkleInclusionProof.ProtoReflect.Descriptor instead.

func (*BitcoinMerkleInclusionProof) GetBlockHeight

func (x *BitcoinMerkleInclusionProof) GetBlockHeight() uint32

func (*BitcoinMerkleInclusionProof) GetClaimedOutpoint

func (x *BitcoinMerkleInclusionProof) GetClaimedOutpoint() *taprpc.OutPoint

func (*BitcoinMerkleInclusionProof) GetInternalKey

func (x *BitcoinMerkleInclusionProof) GetInternalKey() []byte

func (*BitcoinMerkleInclusionProof) GetMerkleProof

func (x *BitcoinMerkleInclusionProof) GetMerkleProof() *MerkleProof

func (*BitcoinMerkleInclusionProof) GetMerkleRoot

func (x *BitcoinMerkleInclusionProof) GetMerkleRoot() []byte

func (*BitcoinMerkleInclusionProof) GetRawBlockHeaderData

func (x *BitcoinMerkleInclusionProof) GetRawBlockHeaderData() []byte

func (*BitcoinMerkleInclusionProof) GetRawTxData

func (x *BitcoinMerkleInclusionProof) GetRawTxData() []byte

func (*BitcoinMerkleInclusionProof) ProtoMessage

func (*BitcoinMerkleInclusionProof) ProtoMessage()

func (*BitcoinMerkleInclusionProof) ProtoReflect

func (*BitcoinMerkleInclusionProof) Reset

func (x *BitcoinMerkleInclusionProof) Reset()

func (*BitcoinMerkleInclusionProof) String

func (x *BitcoinMerkleInclusionProof) String() string

type Challenge

type Challenge struct {

	// The challenge hash that the client must sign to prove ownership of the
	// receiver's public key.
	ChallengeHash []byte `protobuf:"bytes,1,opt,name=challenge_hash,json=challengeHash,proto3" json:"challenge_hash,omitempty"`
	// contains filtered or unexported fields
}

Carries the challenge hash sent by the server to the client.

func (*Challenge) Descriptor deprecated

func (*Challenge) Descriptor() ([]byte, []int)

Deprecated: Use Challenge.ProtoReflect.Descriptor instead.

func (*Challenge) GetChallengeHash

func (x *Challenge) GetChallengeHash() []byte

func (*Challenge) ProtoMessage

func (*Challenge) ProtoMessage()

func (*Challenge) ProtoReflect

func (x *Challenge) ProtoReflect() protoreflect.Message

func (*Challenge) Reset

func (x *Challenge) Reset()

func (*Challenge) String

func (x *Challenge) String() string

type EndOfStream

type EndOfStream struct {
	// contains filtered or unexported fields
}

An empty message used to explicitly signal the normal end of the message stream.

func (*EndOfStream) Descriptor deprecated

func (*EndOfStream) Descriptor() ([]byte, []int)

Deprecated: Use EndOfStream.ProtoReflect.Descriptor instead.

func (*EndOfStream) ProtoMessage

func (*EndOfStream) ProtoMessage()

func (*EndOfStream) ProtoReflect

func (x *EndOfStream) ProtoReflect() protoreflect.Message

func (*EndOfStream) Reset

func (x *EndOfStream) Reset()

func (*EndOfStream) String

func (x *EndOfStream) String() string

type InitReceive

type InitReceive struct {

	// The public key identifier of the receiver of the messages that should be
	// received through a message receive stream, encoded as the raw bytes of
	// the compressed public key.
	ReceiverId []byte `protobuf:"bytes,1,opt,name=receiver_id,json=receiverId,proto3" json:"receiver_id,omitempty"`
	// The exclusive start message ID, meaning messages with this ID or higher
	// will be included in the response. This allows the client to resume
	// receiving messages from a specific point without missing any. One of
	// start_message_id_exclusive, start_block_height_inclusive or
	// start_timestamp_exclusive must be at their non-default values for any
	// existing messages to be returned!
	StartMessageIdExclusive uint64 `` /* 135-byte string literal not displayed */
	// The inclusive start block height, meaning messages from this block height
	// or higher will be included in the response. This allows the client to
	// filter messages based on the block height at which they were produced.
	// One of start_message_id_exclusive, start_block_height_inclusive or
	// start_timestamp_exclusive must be at their non-default values for any
	// existing messages to be returned!
	StartBlockHeightInclusive uint32 `` /* 141-byte string literal not displayed */
	// The exclusive start timestamp in Unix epoch seconds, meaning messages
	// with a timestamp strictly greater than this value will be included in the
	// response. This allows the client to filter messages based on their
	// arrival time at the server. One of start_message_id_exclusive,
	// start_block_height_inclusive or start_timestamp_exclusive must be at
	// their non-default values for any existing messages to be returned!
	StartTimestampExclusive int64 `` /* 133-byte string literal not displayed */
	// contains filtered or unexported fields
}

Carries the initial parameters from the client to start receiving messages.

func (*InitReceive) Descriptor deprecated

func (*InitReceive) Descriptor() ([]byte, []int)

Deprecated: Use InitReceive.ProtoReflect.Descriptor instead.

func (*InitReceive) GetReceiverId

func (x *InitReceive) GetReceiverId() []byte

func (*InitReceive) GetStartBlockHeightInclusive

func (x *InitReceive) GetStartBlockHeightInclusive() uint32

func (*InitReceive) GetStartMessageIdExclusive

func (x *InitReceive) GetStartMessageIdExclusive() uint64

func (*InitReceive) GetStartTimestampExclusive

func (x *InitReceive) GetStartTimestampExclusive() int64

func (*InitReceive) ProtoMessage

func (*InitReceive) ProtoMessage()

func (*InitReceive) ProtoReflect

func (x *InitReceive) ProtoReflect() protoreflect.Message

func (*InitReceive) Reset

func (x *InitReceive) Reset()

func (*InitReceive) String

func (x *InitReceive) String() string

type MailboxClient

type MailboxClient interface {
	// Sends a single message to a receiver's mailbox. Requires a valid, unused
	// Bitcoin P2TR transaction outpoint as proof of uniqueness, included in a
	// block as proof of work.
	SendMessage(ctx context.Context, in *SendMessageRequest, opts ...grpc.CallOption) (*SendMessageResponse, error)
	// Initiates a bidirectional stream to receive messages for a specific
	// receiver. This stream implements the challenge-response handshake required
	// for receiver authentication before messages are delivered.
	//
	// Expected flow:
	// 1. Client -> Server: ReceiveMessagesRequest(init = InitReceive{...})
	// 2. Server -> Client: ReceiveMessagesResponse(challenge = Challenge{...})
	// 3. Client -> Server: ReceiveMessagesRequest(auth_sig = AuthSignature{...})
	// 4. Server -> Client: [Stream of ReceiveMessagesResponse(
	// message = MailboxMessage{...}
	// )]
	// 5. Server -> Client: ReceiveMessagesResponse(eos = EndOfStream{})
	ReceiveMessages(ctx context.Context, opts ...grpc.CallOption) (Mailbox_ReceiveMessagesClient, error)
	// Returns basic server information.
	MailboxInfo(ctx context.Context, in *MailboxInfoRequest, opts ...grpc.CallOption) (*MailboxInfoResponse, error)
	// Removes one or more messages from the mailbox. The caller must prove
	// ownership of the receiver key by providing a Schnorr signature over
	// SHA256(receiver_id || big-endian uint64 message_id_1 || ...).
	// Only messages that belong to the authenticated receiver are deleted.
	RemoveMessage(ctx context.Context, in *RemoveMessageRequest, opts ...grpc.CallOption) (*RemoveMessageResponse, error)
}

MailboxClient is the client API for Mailbox service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewMailboxClient

func NewMailboxClient(cc grpc.ClientConnInterface) MailboxClient

type MailboxInfoRequest added in v1.0.9

type MailboxInfoRequest struct {
	// contains filtered or unexported fields
}

Request message for the MailboxInfo RPC.

func (*MailboxInfoRequest) Descriptor deprecated added in v1.0.9

func (*MailboxInfoRequest) Descriptor() ([]byte, []int)

Deprecated: Use MailboxInfoRequest.ProtoReflect.Descriptor instead.

func (*MailboxInfoRequest) ProtoMessage added in v1.0.9

func (*MailboxInfoRequest) ProtoMessage()

func (*MailboxInfoRequest) ProtoReflect added in v1.0.9

func (x *MailboxInfoRequest) ProtoReflect() protoreflect.Message

func (*MailboxInfoRequest) Reset added in v1.0.9

func (x *MailboxInfoRequest) Reset()

func (*MailboxInfoRequest) String added in v1.0.9

func (x *MailboxInfoRequest) String() string

type MailboxInfoResponse added in v1.0.9

type MailboxInfoResponse struct {

	// The current server time in Unix epoch seconds.
	ServerTime int64 `protobuf:"varint,1,opt,name=server_time,json=serverTime,proto3" json:"server_time,omitempty"`
	// The number of messages currently stored on the server.
	MessageCount uint64 `protobuf:"varint,2,opt,name=message_count,json=messageCount,proto3" json:"message_count,omitempty"`
	// contains filtered or unexported fields
}

Response message for the MailboxInfo RPC.

func (*MailboxInfoResponse) Descriptor deprecated added in v1.0.9

func (*MailboxInfoResponse) Descriptor() ([]byte, []int)

Deprecated: Use MailboxInfoResponse.ProtoReflect.Descriptor instead.

func (*MailboxInfoResponse) GetMessageCount added in v1.0.9

func (x *MailboxInfoResponse) GetMessageCount() uint64

func (*MailboxInfoResponse) GetServerTime added in v1.0.9

func (x *MailboxInfoResponse) GetServerTime() int64

func (*MailboxInfoResponse) ProtoMessage added in v1.0.9

func (*MailboxInfoResponse) ProtoMessage()

func (*MailboxInfoResponse) ProtoReflect added in v1.0.9

func (x *MailboxInfoResponse) ProtoReflect() protoreflect.Message

func (*MailboxInfoResponse) Reset added in v1.0.9

func (x *MailboxInfoResponse) Reset()

func (*MailboxInfoResponse) String added in v1.0.9

func (x *MailboxInfoResponse) String() string

type MailboxMessage

type MailboxMessage struct {

	// The unique ID assigned to the message by the server upon storage.
	MessageId uint64 `protobuf:"varint,1,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"`
	// The ECIES encrypted message payload, intended for the receiver.
	EncryptedPayload []byte `protobuf:"bytes,2,opt,name=encrypted_payload,json=encryptedPayload,proto3" json:"encrypted_payload,omitempty"`
	// Timestamp (Unix epoch seconds) when the message arrived at the server.
	ArrivalTimestamp int64 `protobuf:"varint,3,opt,name=arrival_timestamp,json=arrivalTimestamp,proto3" json:"arrival_timestamp,omitempty"`
	// contains filtered or unexported fields
}

Represents a single message as stored and retrieved from the mailbox.

func (*MailboxMessage) Descriptor deprecated

func (*MailboxMessage) Descriptor() ([]byte, []int)

Deprecated: Use MailboxMessage.ProtoReflect.Descriptor instead.

func (*MailboxMessage) GetArrivalTimestamp

func (x *MailboxMessage) GetArrivalTimestamp() int64

func (*MailboxMessage) GetEncryptedPayload

func (x *MailboxMessage) GetEncryptedPayload() []byte

func (*MailboxMessage) GetMessageId

func (x *MailboxMessage) GetMessageId() uint64

func (*MailboxMessage) ProtoMessage

func (*MailboxMessage) ProtoMessage()

func (*MailboxMessage) ProtoReflect

func (x *MailboxMessage) ProtoReflect() protoreflect.Message

func (*MailboxMessage) Reset

func (x *MailboxMessage) Reset()

func (*MailboxMessage) String

func (x *MailboxMessage) String() string

type MailboxMessages

type MailboxMessages struct {

	// The list of mailbox messages.
	Messages []*MailboxMessage `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"`
	// contains filtered or unexported fields
}

Represents a list of messages.

func (*MailboxMessages) Descriptor deprecated

func (*MailboxMessages) Descriptor() ([]byte, []int)

Deprecated: Use MailboxMessages.ProtoReflect.Descriptor instead.

func (*MailboxMessages) GetMessages

func (x *MailboxMessages) GetMessages() []*MailboxMessage

func (*MailboxMessages) ProtoMessage

func (*MailboxMessages) ProtoMessage()

func (*MailboxMessages) ProtoReflect

func (x *MailboxMessages) ProtoReflect() protoreflect.Message

func (*MailboxMessages) Reset

func (x *MailboxMessages) Reset()

func (*MailboxMessages) String

func (x *MailboxMessages) String() string

type MailboxServer

type MailboxServer interface {
	// Sends a single message to a receiver's mailbox. Requires a valid, unused
	// Bitcoin P2TR transaction outpoint as proof of uniqueness, included in a
	// block as proof of work.
	SendMessage(context.Context, *SendMessageRequest) (*SendMessageResponse, error)
	// Initiates a bidirectional stream to receive messages for a specific
	// receiver. This stream implements the challenge-response handshake required
	// for receiver authentication before messages are delivered.
	//
	// Expected flow:
	// 1. Client -> Server: ReceiveMessagesRequest(init = InitReceive{...})
	// 2. Server -> Client: ReceiveMessagesResponse(challenge = Challenge{...})
	// 3. Client -> Server: ReceiveMessagesRequest(auth_sig = AuthSignature{...})
	// 4. Server -> Client: [Stream of ReceiveMessagesResponse(
	// message = MailboxMessage{...}
	// )]
	// 5. Server -> Client: ReceiveMessagesResponse(eos = EndOfStream{})
	ReceiveMessages(Mailbox_ReceiveMessagesServer) error
	// Returns basic server information.
	MailboxInfo(context.Context, *MailboxInfoRequest) (*MailboxInfoResponse, error)
	// Removes one or more messages from the mailbox. The caller must prove
	// ownership of the receiver key by providing a Schnorr signature over
	// SHA256(receiver_id || big-endian uint64 message_id_1 || ...).
	// Only messages that belong to the authenticated receiver are deleted.
	RemoveMessage(context.Context, *RemoveMessageRequest) (*RemoveMessageResponse, error)
	// contains filtered or unexported methods
}

MailboxServer is the server API for Mailbox service. All implementations must embed UnimplementedMailboxServer for forward compatibility

type Mailbox_ReceiveMessagesClient

type Mailbox_ReceiveMessagesClient interface {
	Send(*ReceiveMessagesRequest) error
	Recv() (*ReceiveMessagesResponse, error)
	grpc.ClientStream
}

type Mailbox_ReceiveMessagesServer

type Mailbox_ReceiveMessagesServer interface {
	Send(*ReceiveMessagesResponse) error
	Recv() (*ReceiveMessagesRequest, error)
	grpc.ServerStream
}

type MerkleProof

type MerkleProof struct {

	// List of sibling hashes in the Merkle path, ordered from the transaction's
	// sibling up towards the root. Each hash is typically 32 bytes.
	SiblingHashes [][]byte `protobuf:"bytes,1,rep,name=sibling_hashes,json=siblingHashes,proto3" json:"sibling_hashes,omitempty"`
	// The bitmask indicating the direction (left/right) of each sibling hash
	// in the Merkle tree. Each bit corresponds to a sibling hash in the
	// sibling_hashes list. 0 indicates left, 1 indicates right.
	Bits []bool `protobuf:"varint,2,rep,packed,name=bits,proto3" json:"bits,omitempty"`
	// contains filtered or unexported fields
}

Represents the Merkle proof hashes needed to link a transaction to the Merkle root within a Bitcoin block header.

func (*MerkleProof) Descriptor deprecated

func (*MerkleProof) Descriptor() ([]byte, []int)

Deprecated: Use MerkleProof.ProtoReflect.Descriptor instead.

func (*MerkleProof) GetBits

func (x *MerkleProof) GetBits() []bool

func (*MerkleProof) GetSiblingHashes

func (x *MerkleProof) GetSiblingHashes() [][]byte

func (*MerkleProof) ProtoMessage

func (*MerkleProof) ProtoMessage()

func (*MerkleProof) ProtoReflect

func (x *MerkleProof) ProtoReflect() protoreflect.Message

func (*MerkleProof) Reset

func (x *MerkleProof) Reset()

func (*MerkleProof) String

func (x *MerkleProof) String() string

type ReceiveMessagesRequest

type ReceiveMessagesRequest struct {

	// Types that are valid to be assigned to RequestType:
	//
	//	*ReceiveMessagesRequest_Init
	//	*ReceiveMessagesRequest_AuthSig
	RequestType isReceiveMessagesRequest_RequestType `protobuf_oneof:"request_type"`
	// contains filtered or unexported fields
}

Wrapper message for requests sent FROM the client TO the server during the ReceiveMessages stream.

func (*ReceiveMessagesRequest) Descriptor deprecated

func (*ReceiveMessagesRequest) Descriptor() ([]byte, []int)

Deprecated: Use ReceiveMessagesRequest.ProtoReflect.Descriptor instead.

func (*ReceiveMessagesRequest) GetAuthSig

func (x *ReceiveMessagesRequest) GetAuthSig() *AuthSignature

func (*ReceiveMessagesRequest) GetInit

func (x *ReceiveMessagesRequest) GetInit() *InitReceive

func (*ReceiveMessagesRequest) GetRequestType

func (x *ReceiveMessagesRequest) GetRequestType() isReceiveMessagesRequest_RequestType

func (*ReceiveMessagesRequest) ProtoMessage

func (*ReceiveMessagesRequest) ProtoMessage()

func (*ReceiveMessagesRequest) ProtoReflect

func (x *ReceiveMessagesRequest) ProtoReflect() protoreflect.Message

func (*ReceiveMessagesRequest) Reset

func (x *ReceiveMessagesRequest) Reset()

func (*ReceiveMessagesRequest) String

func (x *ReceiveMessagesRequest) String() string

type ReceiveMessagesRequest_AuthSig

type ReceiveMessagesRequest_AuthSig struct {
	// The client's signature in response to the server's challenge.
	AuthSig *AuthSignature `protobuf:"bytes,2,opt,name=auth_sig,json=authSig,proto3,oneof"`
}

type ReceiveMessagesRequest_Init

type ReceiveMessagesRequest_Init struct {
	// The initial parameters sent by the client to start receiving
	// messages.
	Init *InitReceive `protobuf:"bytes,1,opt,name=init,proto3,oneof"`
}

type ReceiveMessagesResponse

type ReceiveMessagesResponse struct {

	// Types that are valid to be assigned to ResponseType:
	//
	//	*ReceiveMessagesResponse_Challenge
	//	*ReceiveMessagesResponse_AuthSuccess
	//	*ReceiveMessagesResponse_Messages
	//	*ReceiveMessagesResponse_Eos
	ResponseType isReceiveMessagesResponse_ResponseType `protobuf_oneof:"response_type"`
	// contains filtered or unexported fields
}

Wrapper message for responses sent FROM the server TO the client during the ReceiveMessages stream.

func (*ReceiveMessagesResponse) Descriptor deprecated

func (*ReceiveMessagesResponse) Descriptor() ([]byte, []int)

Deprecated: Use ReceiveMessagesResponse.ProtoReflect.Descriptor instead.

func (*ReceiveMessagesResponse) GetAuthSuccess

func (x *ReceiveMessagesResponse) GetAuthSuccess() bool

func (*ReceiveMessagesResponse) GetChallenge

func (x *ReceiveMessagesResponse) GetChallenge() *Challenge

func (*ReceiveMessagesResponse) GetEos

func (x *ReceiveMessagesResponse) GetEos() *EndOfStream

func (*ReceiveMessagesResponse) GetMessages

func (x *ReceiveMessagesResponse) GetMessages() *MailboxMessages

func (*ReceiveMessagesResponse) GetResponseType

func (x *ReceiveMessagesResponse) GetResponseType() isReceiveMessagesResponse_ResponseType

func (*ReceiveMessagesResponse) ProtoMessage

func (*ReceiveMessagesResponse) ProtoMessage()

func (*ReceiveMessagesResponse) ProtoReflect

func (x *ReceiveMessagesResponse) ProtoReflect() protoreflect.Message

func (*ReceiveMessagesResponse) Reset

func (x *ReceiveMessagesResponse) Reset()

func (*ReceiveMessagesResponse) String

func (x *ReceiveMessagesResponse) String() string

type ReceiveMessagesResponse_AuthSuccess

type ReceiveMessagesResponse_AuthSuccess struct {
	// A successful authentication response, indicating the client has
	// successfully signed the challenge and is now authenticated to receive
	// messages.
	AuthSuccess bool `protobuf:"varint,2,opt,name=auth_success,json=authSuccess,proto3,oneof"`
}

type ReceiveMessagesResponse_Challenge

type ReceiveMessagesResponse_Challenge struct {
	// The challenge sent by the server to the client, which the client
	// must sign to prove ownership of the receiver's public key.
	Challenge *Challenge `protobuf:"bytes,1,opt,name=challenge,proto3,oneof"`
}

type ReceiveMessagesResponse_Eos

type ReceiveMessagesResponse_Eos struct {
	// An EndOfStream message indicating that the server is shutting down.
	Eos *EndOfStream `protobuf:"bytes,4,opt,name=eos,proto3,oneof"`
}

type ReceiveMessagesResponse_Messages

type ReceiveMessagesResponse_Messages struct {
	// A list of mailbox messages sent to the client. This will be
	// sent after the client has successfully authenticated by signing the
	// challenge. The client should expect a stream of these messages
	// until the server sends an EndOfStream message.
	Messages *MailboxMessages `protobuf:"bytes,3,opt,name=messages,proto3,oneof"`
}

type RemoveMessageRequest added in v1.1.0

type RemoveMessageRequest struct {

	// The public key identifier of the receiver whose messages should be
	// removed, encoded as the raw bytes of the compressed public key. This
	// is the same key used when subscribing for messages via ReceiveMessages.
	ReceiverId []byte `protobuf:"bytes,1,opt,name=receiver_id,json=receiverId,proto3" json:"receiver_id,omitempty"`
	// The IDs of the messages to remove. Only messages that belong to the
	// specified receiver will be deleted. IDs that don't exist or belong to
	// a different receiver are silently skipped.
	MessageIds []uint64 `protobuf:"varint,2,rep,packed,name=message_ids,json=messageIds,proto3" json:"message_ids,omitempty"`
	// A Schnorr signature proving ownership of the receiver key. The
	// signature must be over SHA256(receiver_id || msg_id_1 || msg_id_2 ||
	// ...) where each message ID is encoded as a big-endian uint64.
	Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

Request message for the RemoveMessage RPC.

func (*RemoveMessageRequest) Descriptor deprecated added in v1.1.0

func (*RemoveMessageRequest) Descriptor() ([]byte, []int)

Deprecated: Use RemoveMessageRequest.ProtoReflect.Descriptor instead.

func (*RemoveMessageRequest) GetMessageIds added in v1.1.0

func (x *RemoveMessageRequest) GetMessageIds() []uint64

func (*RemoveMessageRequest) GetReceiverId added in v1.1.0

func (x *RemoveMessageRequest) GetReceiverId() []byte

func (*RemoveMessageRequest) GetSignature added in v1.1.0

func (x *RemoveMessageRequest) GetSignature() []byte

func (*RemoveMessageRequest) ProtoMessage added in v1.1.0

func (*RemoveMessageRequest) ProtoMessage()

func (*RemoveMessageRequest) ProtoReflect added in v1.1.0

func (x *RemoveMessageRequest) ProtoReflect() protoreflect.Message

func (*RemoveMessageRequest) Reset added in v1.1.0

func (x *RemoveMessageRequest) Reset()

func (*RemoveMessageRequest) String added in v1.1.0

func (x *RemoveMessageRequest) String() string

type RemoveMessageResponse added in v1.1.0

type RemoveMessageResponse struct {

	// The number of messages that were actually removed.
	NumRemoved uint64 `protobuf:"varint,1,opt,name=num_removed,json=numRemoved,proto3" json:"num_removed,omitempty"`
	// contains filtered or unexported fields
}

Response message for the RemoveMessage RPC.

func (*RemoveMessageResponse) Descriptor deprecated added in v1.1.0

func (*RemoveMessageResponse) Descriptor() ([]byte, []int)

Deprecated: Use RemoveMessageResponse.ProtoReflect.Descriptor instead.

func (*RemoveMessageResponse) GetNumRemoved added in v1.1.0

func (x *RemoveMessageResponse) GetNumRemoved() uint64

func (*RemoveMessageResponse) ProtoMessage added in v1.1.0

func (*RemoveMessageResponse) ProtoMessage()

func (*RemoveMessageResponse) ProtoReflect added in v1.1.0

func (x *RemoveMessageResponse) ProtoReflect() protoreflect.Message

func (*RemoveMessageResponse) Reset added in v1.1.0

func (x *RemoveMessageResponse) Reset()

func (*RemoveMessageResponse) String added in v1.1.0

func (x *RemoveMessageResponse) String() string

type SendMessageRequest

type SendMessageRequest struct {

	// The public key identifier of the intended receiver (ReceiverID), encoded
	// as the raw bytes of the compressed public key.
	ReceiverId []byte `protobuf:"bytes,1,opt,name=receiver_id,json=receiverId,proto3" json:"receiver_id,omitempty"`
	// The ECIES encrypted message payload.
	EncryptedPayload []byte `protobuf:"bytes,2,opt,name=encrypted_payload,json=encryptedPayload,proto3" json:"encrypted_payload,omitempty"`
	// A proof of the sender's identity, typically a Bitcoin transaction or
	// another proof that work was done to create the message.
	//
	// Types that are valid to be assigned to Proof:
	//
	//	*SendMessageRequest_TxProof
	Proof isSendMessageRequest_Proof `protobuf_oneof:"proof"`
	// contains filtered or unexported fields
}

Request message for the SendMessage RPC.

func (*SendMessageRequest) Descriptor deprecated

func (*SendMessageRequest) Descriptor() ([]byte, []int)

Deprecated: Use SendMessageRequest.ProtoReflect.Descriptor instead.

func (*SendMessageRequest) GetEncryptedPayload

func (x *SendMessageRequest) GetEncryptedPayload() []byte

func (*SendMessageRequest) GetProof

func (x *SendMessageRequest) GetProof() isSendMessageRequest_Proof

func (*SendMessageRequest) GetReceiverId

func (x *SendMessageRequest) GetReceiverId() []byte

func (*SendMessageRequest) GetTxProof

func (*SendMessageRequest) ProtoMessage

func (*SendMessageRequest) ProtoMessage()

func (*SendMessageRequest) ProtoReflect

func (x *SendMessageRequest) ProtoReflect() protoreflect.Message

func (*SendMessageRequest) Reset

func (x *SendMessageRequest) Reset()

func (*SendMessageRequest) String

func (x *SendMessageRequest) String() string

type SendMessageRequest_TxProof

type SendMessageRequest_TxProof struct {
	// The Bitcoin Merkle Inclusion Proof used as the sender's
	// authentication. The server MUST perform full validation of this
	// proof:
	//  1. Verify claimed_outpoint.txid_hex matches hash(raw_tx_data).
	//  2. Verify claimed_outpoint.index is valid for the transaction.
	//  3. Verify merkle_proof connects the transaction hash to the
	//     raw_block_header_data's Merkle root.
	//  4. Verify block_header validity (e.g., PoW, potentially chain
	//     context).
	//  5. Ensure the claimed_outpoint has not been used previously (check
	//     used_proofs table).
	TxProof *BitcoinMerkleInclusionProof `protobuf:"bytes,4,opt,name=tx_proof,json=txProof,proto3,oneof"`
}

type SendMessageResponse

type SendMessageResponse struct {

	// The unique ID assigned to the stored message by the server.
	MessageId uint64 `protobuf:"varint,1,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"`
	// contains filtered or unexported fields
}

Response message for the SendMessage RPC.

func (*SendMessageResponse) Descriptor deprecated

func (*SendMessageResponse) Descriptor() ([]byte, []int)

Deprecated: Use SendMessageResponse.ProtoReflect.Descriptor instead.

func (*SendMessageResponse) GetMessageId

func (x *SendMessageResponse) GetMessageId() uint64

func (*SendMessageResponse) ProtoMessage

func (*SendMessageResponse) ProtoMessage()

func (*SendMessageResponse) ProtoReflect

func (x *SendMessageResponse) ProtoReflect() protoreflect.Message

func (*SendMessageResponse) Reset

func (x *SendMessageResponse) Reset()

func (*SendMessageResponse) String

func (x *SendMessageResponse) String() string

type UnimplementedMailboxServer

type UnimplementedMailboxServer struct {
}

UnimplementedMailboxServer must be embedded to have forward compatible implementations.

func (UnimplementedMailboxServer) MailboxInfo added in v1.0.9

func (UnimplementedMailboxServer) ReceiveMessages

func (UnimplementedMailboxServer) RemoveMessage added in v1.1.0

func (UnimplementedMailboxServer) SendMessage

type UnsafeMailboxServer

type UnsafeMailboxServer interface {
	// contains filtered or unexported methods
}

UnsafeMailboxServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MailboxServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL