package pb
import "github.com/libp2p/go-libp2p/core/record/pb"
Index ¶
- Variables
- type Envelope
- func (*Envelope) Descriptor() ([]byte, []int)
- func (x *Envelope) GetPayload() []byte
- func (x *Envelope) GetPayloadType() []byte
- func (x *Envelope) GetPublicKey() *pb.PublicKey
- func (x *Envelope) GetSignature() []byte
- func (*Envelope) ProtoMessage()
- func (x *Envelope) ProtoReflect() protoreflect.Message
- func (x *Envelope) Reset()
- func (x *Envelope) String() string
Variables ¶
var File_core_record_pb_envelope_proto protoreflect.FileDescriptor
Types ¶
type Envelope ¶
type Envelope struct { // public_key is the public key of the keypair the enclosed payload was // signed with. PublicKey *pb.PublicKey `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` // payload_type encodes the type of payload, so that it can be deserialized // deterministically. PayloadType []byte `protobuf:"bytes,2,opt,name=payload_type,json=payloadType,proto3" json:"payload_type,omitempty"` // payload is the actual payload carried inside this envelope. Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"` // signature is the signature produced by the private key corresponding to // the enclosed public key, over the payload, prefixing a domain string for // additional security. Signature []byte `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"` // contains filtered or unexported fields }
Envelope encloses a signed payload produced by a peer, along with the public key of the keypair it was signed with so that it can be statelessly validated by the receiver.
The payload is prefixed with a byte string that determines the type, so it can be deserialized deterministically. Often, this byte string is a multicodec.
func (*Envelope) Descriptor ¶
Deprecated: Use Envelope.ProtoReflect.Descriptor instead.
func (*Envelope) GetPayload ¶
func (*Envelope) GetPayloadType ¶
func (*Envelope) GetPublicKey ¶
func (*Envelope) GetSignature ¶
func (*Envelope) ProtoMessage ¶
func (*Envelope) ProtoMessage()
func (*Envelope) ProtoReflect ¶
func (x *Envelope) ProtoReflect() protoreflect.Message
func (*Envelope) Reset ¶
func (x *Envelope) Reset()
func (*Envelope) String ¶
Source Files ¶
- Version
- v0.42.0 (latest)
- Published
- Jun 18, 2025
- Platform
- linux/amd64
- Imports
- 6 packages
- Last checked
- 1 month ago –
Tools for package owners.