message_contents

package
v3.43.1 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Compression_name = map[int32]string{
		0: "COMPRESSION_DEFLATE",
		1: "COMPRESSION_GZIP",
	}
	Compression_value = map[string]int32{
		"COMPRESSION_DEFLATE": 0,
		"COMPRESSION_GZIP":    1,
	}
)

Enum value maps for Compression.

View Source
var File_message_contents_ciphertext_proto protoreflect.FileDescriptor
View Source
var File_message_contents_composite_proto protoreflect.FileDescriptor
View Source
var File_message_contents_contact_proto protoreflect.FileDescriptor
View Source
var File_message_contents_content_proto protoreflect.FileDescriptor
View Source
var File_message_contents_conversation_reference_proto protoreflect.FileDescriptor
View Source
var File_message_contents_invitation_proto protoreflect.FileDescriptor
View Source
var File_message_contents_message_proto protoreflect.FileDescriptor
View Source
var File_message_contents_private_key_proto protoreflect.FileDescriptor
View Source
var File_message_contents_public_key_proto protoreflect.FileDescriptor
View Source
var File_message_contents_signature_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Ciphertext

type Ciphertext struct {

	// Types that are assignable to Union:
	//
	//	*Ciphertext_Aes256GcmHkdfSha256
	Union isCiphertext_Union `protobuf_oneof:"union"`
	// contains filtered or unexported fields
}

Ciphertext represents encrypted payload. It is definited as a union to support cryptographic algorithm agility. The payload is accompanied by the cryptographic parameters required by the chosen encryption scheme.

func (*Ciphertext) Descriptor deprecated

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

Deprecated: Use Ciphertext.ProtoReflect.Descriptor instead.

func (*Ciphertext) GetAes256GcmHkdfSha256

func (x *Ciphertext) GetAes256GcmHkdfSha256() *Ciphertext_Aes256GcmHkdfsha256

func (*Ciphertext) GetUnion

func (m *Ciphertext) GetUnion() isCiphertext_Union

func (*Ciphertext) ProtoMessage

func (*Ciphertext) ProtoMessage()

func (*Ciphertext) ProtoReflect

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

func (*Ciphertext) Reset

func (x *Ciphertext) Reset()

func (*Ciphertext) String

func (x *Ciphertext) String() string

type Ciphertext_Aes256GcmHkdfSha256

type Ciphertext_Aes256GcmHkdfSha256 struct {
	Aes256GcmHkdfSha256 *Ciphertext_Aes256GcmHkdfsha256 `protobuf:"bytes,1,opt,name=aes256_gcm_hkdf_sha256,json=aes256GcmHkdfSha256,proto3,oneof"`
}

type Ciphertext_Aes256GcmHkdfsha256

type Ciphertext_Aes256GcmHkdfsha256 struct {
	HkdfSalt []byte `protobuf:"bytes,1,opt,name=hkdf_salt,json=hkdfSalt,proto3" json:"hkdf_salt,omitempty"` // 32 bytes
	GcmNonce []byte `protobuf:"bytes,2,opt,name=gcm_nonce,json=gcmNonce,proto3" json:"gcm_nonce,omitempty"` // 12 bytes
	Payload  []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`                   // encrypted payload
	// contains filtered or unexported fields
}

Encryption: AES256-GCM Key derivation function: HKDF-SHA256

func (*Ciphertext_Aes256GcmHkdfsha256) Descriptor deprecated

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

Deprecated: Use Ciphertext_Aes256GcmHkdfsha256.ProtoReflect.Descriptor instead.

func (*Ciphertext_Aes256GcmHkdfsha256) GetGcmNonce

func (x *Ciphertext_Aes256GcmHkdfsha256) GetGcmNonce() []byte

func (*Ciphertext_Aes256GcmHkdfsha256) GetHkdfSalt

func (x *Ciphertext_Aes256GcmHkdfsha256) GetHkdfSalt() []byte

func (*Ciphertext_Aes256GcmHkdfsha256) GetPayload

func (x *Ciphertext_Aes256GcmHkdfsha256) GetPayload() []byte

func (*Ciphertext_Aes256GcmHkdfsha256) ProtoMessage

func (*Ciphertext_Aes256GcmHkdfsha256) ProtoMessage()

func (*Ciphertext_Aes256GcmHkdfsha256) ProtoReflect

func (*Ciphertext_Aes256GcmHkdfsha256) Reset

func (x *Ciphertext_Aes256GcmHkdfsha256) Reset()

func (*Ciphertext_Aes256GcmHkdfsha256) String

type Composite

type Composite struct {
	Parts []*Composite_Part `protobuf:"bytes,1,rep,name=parts,proto3" json:"parts,omitempty"`
	// contains filtered or unexported fields
}

Composite is used to implement xmtp.org/composite content type

func (*Composite) Descriptor deprecated

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

Deprecated: Use Composite.ProtoReflect.Descriptor instead.

func (*Composite) GetParts

func (x *Composite) GetParts() []*Composite_Part

func (*Composite) ProtoMessage

func (*Composite) ProtoMessage()

func (*Composite) ProtoReflect

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

func (*Composite) Reset

func (x *Composite) Reset()

func (*Composite) String

func (x *Composite) String() string

type Composite_Part

type Composite_Part struct {

	// Types that are assignable to Element:
	//
	//	*Composite_Part_Part
	//	*Composite_Part_Composite
	Element isComposite_Part_Element `protobuf_oneof:"element"`
	// contains filtered or unexported fields
}

Part represents one section of a composite message

func (*Composite_Part) Descriptor deprecated

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

Deprecated: Use Composite_Part.ProtoReflect.Descriptor instead.

func (*Composite_Part) GetComposite

func (x *Composite_Part) GetComposite() *Composite

func (*Composite_Part) GetElement

func (m *Composite_Part) GetElement() isComposite_Part_Element

func (*Composite_Part) GetPart

func (x *Composite_Part) GetPart() *EncodedContent

func (*Composite_Part) ProtoMessage

func (*Composite_Part) ProtoMessage()

func (*Composite_Part) ProtoReflect

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

func (*Composite_Part) Reset

func (x *Composite_Part) Reset()

func (*Composite_Part) String

func (x *Composite_Part) String() string

type Composite_Part_Composite

type Composite_Part_Composite struct {
	Composite *Composite `protobuf:"bytes,2,opt,name=composite,proto3,oneof"`
}

type Composite_Part_Part

type Composite_Part_Part struct {
	Part *EncodedContent `protobuf:"bytes,1,opt,name=part,proto3,oneof"`
}

type Compression

type Compression int32

Recognized compression algorithms protolint:disable ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH

const (
	Compression_COMPRESSION_DEFLATE Compression = 0
	Compression_COMPRESSION_GZIP    Compression = 1
)

func (Compression) Descriptor

func (Compression) Enum

func (x Compression) Enum() *Compression

func (Compression) EnumDescriptor deprecated

func (Compression) EnumDescriptor() ([]byte, []int)

Deprecated: Use Compression.Descriptor instead.

func (Compression) Number

func (x Compression) Number() protoreflect.EnumNumber

func (Compression) String

func (x Compression) String() string

func (Compression) Type

type ContactBundle

type ContactBundle struct {

	// Types that are assignable to Version:
	//
	//	*ContactBundle_V1
	//	*ContactBundle_V2
	Version isContactBundle_Version `protobuf_oneof:"version"`
	// contains filtered or unexported fields
}

Versioned ContactBundle

func (*ContactBundle) Descriptor deprecated

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

Deprecated: Use ContactBundle.ProtoReflect.Descriptor instead.

func (*ContactBundle) GetV1

func (x *ContactBundle) GetV1() *ContactBundleV1

func (*ContactBundle) GetV2

func (x *ContactBundle) GetV2() *ContactBundleV2

func (*ContactBundle) GetVersion

func (m *ContactBundle) GetVersion() isContactBundle_Version

func (*ContactBundle) ProtoMessage

func (*ContactBundle) ProtoMessage()

func (*ContactBundle) ProtoReflect

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

func (*ContactBundle) Reset

func (x *ContactBundle) Reset()

func (*ContactBundle) String

func (x *ContactBundle) String() string

type ContactBundleV1

type ContactBundleV1 struct {
	KeyBundle *PublicKeyBundle `protobuf:"bytes,1,opt,name=key_bundle,json=keyBundle,proto3" json:"key_bundle,omitempty"`
	// contains filtered or unexported fields
}

LEGACY: User key bundle V1 using PublicKeys. The PublicKeys MUST be signed.

func (*ContactBundleV1) Descriptor deprecated

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

Deprecated: Use ContactBundleV1.ProtoReflect.Descriptor instead.

func (*ContactBundleV1) GetKeyBundle

func (x *ContactBundleV1) GetKeyBundle() *PublicKeyBundle

func (*ContactBundleV1) ProtoMessage

func (*ContactBundleV1) ProtoMessage()

func (*ContactBundleV1) ProtoReflect

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

func (*ContactBundleV1) Reset

func (x *ContactBundleV1) Reset()

func (*ContactBundleV1) String

func (x *ContactBundleV1) String() string

type ContactBundleV2

type ContactBundleV2 struct {
	KeyBundle *SignedPublicKeyBundle `protobuf:"bytes,1,opt,name=key_bundle,json=keyBundle,proto3" json:"key_bundle,omitempty"`
	// contains filtered or unexported fields
}

User key bundle V2 using SignedPublicKeys.

func (*ContactBundleV2) Descriptor deprecated

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

Deprecated: Use ContactBundleV2.ProtoReflect.Descriptor instead.

func (*ContactBundleV2) GetKeyBundle

func (x *ContactBundleV2) GetKeyBundle() *SignedPublicKeyBundle

func (*ContactBundleV2) ProtoMessage

func (*ContactBundleV2) ProtoMessage()

func (*ContactBundleV2) ProtoReflect

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

func (*ContactBundleV2) Reset

func (x *ContactBundleV2) Reset()

func (*ContactBundleV2) String

func (x *ContactBundleV2) String() string

type ContactBundle_V1

type ContactBundle_V1 struct {
	V1 *ContactBundleV1 `protobuf:"bytes,1,opt,name=v1,proto3,oneof"`
}

type ContactBundle_V2

type ContactBundle_V2 struct {
	V2 *ContactBundleV2 `protobuf:"bytes,2,opt,name=v2,proto3,oneof"`
}

type ContentTypeId

type ContentTypeId struct {
	AuthorityId  string `protobuf:"bytes,1,opt,name=authority_id,json=authorityId,proto3" json:"authority_id,omitempty"`     // authority governing this content type
	TypeId       string `protobuf:"bytes,2,opt,name=type_id,json=typeId,proto3" json:"type_id,omitempty"`                    // type identifier
	VersionMajor uint32 `protobuf:"varint,3,opt,name=version_major,json=versionMajor,proto3" json:"version_major,omitempty"` // major version of the type
	VersionMinor uint32 `protobuf:"varint,4,opt,name=version_minor,json=versionMinor,proto3" json:"version_minor,omitempty"` // minor version of the type
	// contains filtered or unexported fields
}

ContentTypeId is used to identify the type of content stored in a Message.

func (*ContentTypeId) Descriptor deprecated

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

Deprecated: Use ContentTypeId.ProtoReflect.Descriptor instead.

func (*ContentTypeId) GetAuthorityId

func (x *ContentTypeId) GetAuthorityId() string

func (*ContentTypeId) GetTypeId

func (x *ContentTypeId) GetTypeId() string

func (*ContentTypeId) GetVersionMajor

func (x *ContentTypeId) GetVersionMajor() uint32

func (*ContentTypeId) GetVersionMinor

func (x *ContentTypeId) GetVersionMinor() uint32

func (*ContentTypeId) ProtoMessage

func (*ContentTypeId) ProtoMessage()

func (*ContentTypeId) ProtoReflect

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

func (*ContentTypeId) Reset

func (x *ContentTypeId) Reset()

func (*ContentTypeId) String

func (x *ContentTypeId) String() string

type ConversationReference added in v3.23.1

type ConversationReference struct {
	Topic       string                `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
	PeerAddress string                `protobuf:"bytes,2,opt,name=peer_address,json=peerAddress,proto3" json:"peer_address,omitempty"`
	CreatedNs   uint64                `protobuf:"varint,3,opt,name=created_ns,json=createdNs,proto3" json:"created_ns,omitempty"`
	Context     *InvitationV1_Context `protobuf:"bytes,4,opt,name=context,proto3" json:"context,omitempty"`
	// contains filtered or unexported fields
}

A light pointer for a conversation that contains no decryption keys

func (*ConversationReference) Descriptor deprecated added in v3.23.1

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

Deprecated: Use ConversationReference.ProtoReflect.Descriptor instead.

func (*ConversationReference) GetContext added in v3.23.1

func (*ConversationReference) GetCreatedNs added in v3.23.1

func (x *ConversationReference) GetCreatedNs() uint64

func (*ConversationReference) GetPeerAddress added in v3.23.1

func (x *ConversationReference) GetPeerAddress() string

func (*ConversationReference) GetTopic added in v3.23.1

func (x *ConversationReference) GetTopic() string

func (*ConversationReference) ProtoMessage added in v3.23.1

func (*ConversationReference) ProtoMessage()

func (*ConversationReference) ProtoReflect added in v3.23.1

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

func (*ConversationReference) Reset added in v3.23.1

func (x *ConversationReference) Reset()

func (*ConversationReference) String added in v3.23.1

func (x *ConversationReference) String() string

type DecodedMessage added in v3.20.0

type DecodedMessage struct {
	Id               string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	MessageVersion   string                 `protobuf:"bytes,2,opt,name=message_version,json=messageVersion,proto3" json:"message_version,omitempty"`
	SenderAddress    string                 `protobuf:"bytes,3,opt,name=sender_address,json=senderAddress,proto3" json:"sender_address,omitempty"`
	RecipientAddress *string                `protobuf:"bytes,4,opt,name=recipient_address,json=recipientAddress,proto3,oneof" json:"recipient_address,omitempty"`
	SentNs           uint64                 `protobuf:"varint,5,opt,name=sent_ns,json=sentNs,proto3" json:"sent_ns,omitempty"`
	ContentTopic     string                 `protobuf:"bytes,6,opt,name=content_topic,json=contentTopic,proto3" json:"content_topic,omitempty"`
	Conversation     *ConversationReference `protobuf:"bytes,7,opt,name=conversation,proto3" json:"conversation,omitempty"`
	ContentBytes     []byte                 `protobuf:"bytes,8,opt,name=content_bytes,json=contentBytes,proto3" json:"content_bytes,omitempty"` // encapsulates EncodedContent
	// contains filtered or unexported fields
}

DecodedMessage represents the decrypted message contents. DecodedMessage instances are not stored on the network, but may be serialized and stored by clients

func (*DecodedMessage) Descriptor deprecated added in v3.20.0

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

Deprecated: Use DecodedMessage.ProtoReflect.Descriptor instead.

func (*DecodedMessage) GetContentBytes added in v3.20.0

func (x *DecodedMessage) GetContentBytes() []byte

func (*DecodedMessage) GetContentTopic added in v3.20.0

func (x *DecodedMessage) GetContentTopic() string

func (*DecodedMessage) GetConversation added in v3.20.0

func (x *DecodedMessage) GetConversation() *ConversationReference

func (*DecodedMessage) GetId added in v3.20.0

func (x *DecodedMessage) GetId() string

func (*DecodedMessage) GetMessageVersion added in v3.20.0

func (x *DecodedMessage) GetMessageVersion() string

func (*DecodedMessage) GetRecipientAddress added in v3.20.0

func (x *DecodedMessage) GetRecipientAddress() string

func (*DecodedMessage) GetSenderAddress added in v3.20.0

func (x *DecodedMessage) GetSenderAddress() string

func (*DecodedMessage) GetSentNs added in v3.20.0

func (x *DecodedMessage) GetSentNs() uint64

func (*DecodedMessage) ProtoMessage added in v3.20.0

func (*DecodedMessage) ProtoMessage()

func (*DecodedMessage) ProtoReflect added in v3.20.0

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

func (*DecodedMessage) Reset added in v3.20.0

func (x *DecodedMessage) Reset()

func (*DecodedMessage) String added in v3.20.0

func (x *DecodedMessage) String() string

type EncodedContent

type EncodedContent struct {

	// content type identifier used to match the payload with
	// the correct decoding machinery
	Type *ContentTypeId `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	// optional encoding parameters required to correctly decode the content
	Parameters map[string]string `` /* 161-byte string literal not displayed */
	// optional fallback description of the content that can be used in case
	// the client cannot decode or render the content
	Fallback *string `protobuf:"bytes,3,opt,name=fallback,proto3,oneof" json:"fallback,omitempty"`
	// optional compression; the value indicates algorithm used to
	// compress the encoded content bytes
	Compression *Compression `protobuf:"varint,5,opt,name=compression,proto3,enum=xmtp.message_contents.Compression,oneof" json:"compression,omitempty"`
	// encoded content itself
	Content []byte `protobuf:"bytes,4,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

EncodedContent bundles the content with metadata identifying its type and parameters required for correct decoding and presentation of the content.

func (*EncodedContent) Descriptor deprecated

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

Deprecated: Use EncodedContent.ProtoReflect.Descriptor instead.

func (*EncodedContent) GetCompression

func (x *EncodedContent) GetCompression() Compression

func (*EncodedContent) GetContent

func (x *EncodedContent) GetContent() []byte

func (*EncodedContent) GetFallback

func (x *EncodedContent) GetFallback() string

func (*EncodedContent) GetParameters

func (x *EncodedContent) GetParameters() map[string]string

func (*EncodedContent) GetType

func (x *EncodedContent) GetType() *ContentTypeId

func (*EncodedContent) ProtoMessage

func (*EncodedContent) ProtoMessage()

func (*EncodedContent) ProtoReflect

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

func (*EncodedContent) Reset

func (x *EncodedContent) Reset()

func (*EncodedContent) String

func (x *EncodedContent) String() string

type EncryptedPrivateKeyBundle

type EncryptedPrivateKeyBundle struct {

	// Types that are assignable to Version:
	//
	//	*EncryptedPrivateKeyBundle_V1
	Version isEncryptedPrivateKeyBundle_Version `protobuf_oneof:"version"`
	// contains filtered or unexported fields
}

Versioned encrypted PrivateKeyBundle

func (*EncryptedPrivateKeyBundle) Descriptor deprecated

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

Deprecated: Use EncryptedPrivateKeyBundle.ProtoReflect.Descriptor instead.

func (*EncryptedPrivateKeyBundle) GetV1

func (*EncryptedPrivateKeyBundle) GetVersion

func (m *EncryptedPrivateKeyBundle) GetVersion() isEncryptedPrivateKeyBundle_Version

func (*EncryptedPrivateKeyBundle) ProtoMessage

func (*EncryptedPrivateKeyBundle) ProtoMessage()

func (*EncryptedPrivateKeyBundle) ProtoReflect

func (*EncryptedPrivateKeyBundle) Reset

func (x *EncryptedPrivateKeyBundle) Reset()

func (*EncryptedPrivateKeyBundle) String

func (x *EncryptedPrivateKeyBundle) String() string

type EncryptedPrivateKeyBundleV1

type EncryptedPrivateKeyBundleV1 struct {

	// randomly generated pre-key
	WalletPreKey []byte `protobuf:"bytes,1,opt,name=wallet_pre_key,json=walletPreKey,proto3" json:"wallet_pre_key,omitempty"` // 32 bytes
	// MUST contain encrypted PrivateKeyBundle
	Ciphertext *Ciphertext `protobuf:"bytes,2,opt,name=ciphertext,proto3" json:"ciphertext,omitempty"`
	// contains filtered or unexported fields
}

PrivateKeyBundle encrypted with key material generated by signing a randomly generated "pre-key" with the user's wallet, i.e. EIP-191 signature of a "storage signature" message with the pre-key embedded in it. (see xmtp-js::PrivateKeyBundle.toEncryptedBytes for details)

func (*EncryptedPrivateKeyBundleV1) Descriptor deprecated

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

Deprecated: Use EncryptedPrivateKeyBundleV1.ProtoReflect.Descriptor instead.

func (*EncryptedPrivateKeyBundleV1) GetCiphertext

func (x *EncryptedPrivateKeyBundleV1) GetCiphertext() *Ciphertext

func (*EncryptedPrivateKeyBundleV1) GetWalletPreKey

func (x *EncryptedPrivateKeyBundleV1) GetWalletPreKey() []byte

func (*EncryptedPrivateKeyBundleV1) ProtoMessage

func (*EncryptedPrivateKeyBundleV1) ProtoMessage()

func (*EncryptedPrivateKeyBundleV1) ProtoReflect

func (*EncryptedPrivateKeyBundleV1) Reset

func (x *EncryptedPrivateKeyBundleV1) Reset()

func (*EncryptedPrivateKeyBundleV1) String

func (x *EncryptedPrivateKeyBundleV1) String() string

type EncryptedPrivateKeyBundle_V1

type EncryptedPrivateKeyBundle_V1 struct {
	V1 *EncryptedPrivateKeyBundleV1 `protobuf:"bytes,1,opt,name=v1,proto3,oneof"`
}

type InvitationV1

type InvitationV1 struct {

	// topic name chosen for this conversation.
	// It MUST be randomly generated bytes (length >= 32),
	// then base64 encoded without padding
	Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
	// A context object defining metadata
	Context *InvitationV1_Context `protobuf:"bytes,2,opt,name=context,proto3" json:"context,omitempty"`
	// message encryption scheme and keys for this conversation.
	//
	// Types that are assignable to Encryption:
	//
	//	*InvitationV1_Aes256GcmHkdfSha256
	Encryption isInvitationV1_Encryption `protobuf_oneof:"encryption"`
	// contains filtered or unexported fields
}

Unsealed invitation V1

func (*InvitationV1) Descriptor deprecated

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

Deprecated: Use InvitationV1.ProtoReflect.Descriptor instead.

func (*InvitationV1) GetAes256GcmHkdfSha256

func (x *InvitationV1) GetAes256GcmHkdfSha256() *InvitationV1_Aes256GcmHkdfsha256

func (*InvitationV1) GetContext

func (x *InvitationV1) GetContext() *InvitationV1_Context

func (*InvitationV1) GetEncryption

func (m *InvitationV1) GetEncryption() isInvitationV1_Encryption

func (*InvitationV1) GetTopic

func (x *InvitationV1) GetTopic() string

func (*InvitationV1) ProtoMessage

func (*InvitationV1) ProtoMessage()

func (*InvitationV1) ProtoReflect

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

func (*InvitationV1) Reset

func (x *InvitationV1) Reset()

func (*InvitationV1) String

func (x *InvitationV1) String() string

type InvitationV1_Aes256GcmHkdfSha256

type InvitationV1_Aes256GcmHkdfSha256 struct {
	// Specify the encryption method to process the key material properly.
	Aes256GcmHkdfSha256 *InvitationV1_Aes256GcmHkdfsha256 `protobuf:"bytes,3,opt,name=aes256_gcm_hkdf_sha256,json=aes256GcmHkdfSha256,proto3,oneof"`
}

type InvitationV1_Aes256GcmHkdfsha256

type InvitationV1_Aes256GcmHkdfsha256 struct {
	KeyMaterial []byte `protobuf:"bytes,1,opt,name=key_material,json=keyMaterial,proto3" json:"key_material,omitempty"` // randomly generated key material (32 bytes)
	// contains filtered or unexported fields
}

Supported encryption schemes AES256-GCM-HKDF-SHA256

func (*InvitationV1_Aes256GcmHkdfsha256) Descriptor deprecated

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

Deprecated: Use InvitationV1_Aes256GcmHkdfsha256.ProtoReflect.Descriptor instead.

func (*InvitationV1_Aes256GcmHkdfsha256) GetKeyMaterial

func (x *InvitationV1_Aes256GcmHkdfsha256) GetKeyMaterial() []byte

func (*InvitationV1_Aes256GcmHkdfsha256) ProtoMessage

func (*InvitationV1_Aes256GcmHkdfsha256) ProtoMessage()

func (*InvitationV1_Aes256GcmHkdfsha256) ProtoReflect

func (*InvitationV1_Aes256GcmHkdfsha256) Reset

func (*InvitationV1_Aes256GcmHkdfsha256) String

type InvitationV1_Context

type InvitationV1_Context struct {

	// Expected to be a URI (ie xmtp.org/convo1)
	ConversationId string `protobuf:"bytes,1,opt,name=conversation_id,json=conversationId,proto3" json:"conversation_id,omitempty"`
	// Key value map of additional metadata that would be exposed to
	// application developers and could be used for filtering
	Metadata map[string]string `` /* 157-byte string literal not displayed */
	// contains filtered or unexported fields
}

The context type

func (*InvitationV1_Context) Descriptor deprecated

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

Deprecated: Use InvitationV1_Context.ProtoReflect.Descriptor instead.

func (*InvitationV1_Context) GetConversationId

func (x *InvitationV1_Context) GetConversationId() string

func (*InvitationV1_Context) GetMetadata

func (x *InvitationV1_Context) GetMetadata() map[string]string

func (*InvitationV1_Context) ProtoMessage

func (*InvitationV1_Context) ProtoMessage()

func (*InvitationV1_Context) ProtoReflect

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

func (*InvitationV1_Context) Reset

func (x *InvitationV1_Context) Reset()

func (*InvitationV1_Context) String

func (x *InvitationV1_Context) String() string

type Message

type Message struct {

	// Types that are assignable to Version:
	//
	//	*Message_V1
	//	*Message_V2
	Version isMessage_Version `protobuf_oneof:"version"`
	// contains filtered or unexported fields
}

Versioned Message

func (*Message) Descriptor deprecated

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

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetV1

func (x *Message) GetV1() *MessageV1

func (*Message) GetV2

func (x *Message) GetV2() *MessageV2

func (*Message) GetVersion

func (m *Message) GetVersion() isMessage_Version

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect

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

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

type MessageHeaderV1

type MessageHeaderV1 struct {
	Sender    *PublicKeyBundle `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
	Recipient *PublicKeyBundle `protobuf:"bytes,2,opt,name=recipient,proto3" json:"recipient,omitempty"`
	Timestamp uint64           `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

Message header is encoded separately as the bytes are also used as associated data for authenticated encryption

func (*MessageHeaderV1) Descriptor deprecated

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

Deprecated: Use MessageHeaderV1.ProtoReflect.Descriptor instead.

func (*MessageHeaderV1) GetRecipient

func (x *MessageHeaderV1) GetRecipient() *PublicKeyBundle

func (*MessageHeaderV1) GetSender

func (x *MessageHeaderV1) GetSender() *PublicKeyBundle

func (*MessageHeaderV1) GetTimestamp

func (x *MessageHeaderV1) GetTimestamp() uint64

func (*MessageHeaderV1) ProtoMessage

func (*MessageHeaderV1) ProtoMessage()

func (*MessageHeaderV1) ProtoReflect

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

func (*MessageHeaderV1) Reset

func (x *MessageHeaderV1) Reset()

func (*MessageHeaderV1) String

func (x *MessageHeaderV1) String() string

type MessageHeaderV2

type MessageHeaderV2 struct {

	// sender specified message creation time
	CreatedNs uint64 `protobuf:"varint,1,opt,name=created_ns,json=createdNs,proto3" json:"created_ns,omitempty"`
	// the topic the message belongs to
	Topic string `protobuf:"bytes,2,opt,name=topic,proto3" json:"topic,omitempty"`
	// contains filtered or unexported fields
}

Message header carries information that is not encrypted, and is therefore observable by the network. It is however authenticated as associated data of the AEAD encryption used to protect the message, thus providing tamper evidence.

func (*MessageHeaderV2) Descriptor deprecated

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

Deprecated: Use MessageHeaderV2.ProtoReflect.Descriptor instead.

func (*MessageHeaderV2) GetCreatedNs

func (x *MessageHeaderV2) GetCreatedNs() uint64

func (*MessageHeaderV2) GetTopic

func (x *MessageHeaderV2) GetTopic() string

func (*MessageHeaderV2) ProtoMessage

func (*MessageHeaderV2) ProtoMessage()

func (*MessageHeaderV2) ProtoReflect

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

func (*MessageHeaderV2) Reset

func (x *MessageHeaderV2) Reset()

func (*MessageHeaderV2) String

func (x *MessageHeaderV2) String() string

type MessageV1

type MessageV1 struct {
	HeaderBytes []byte `protobuf:"bytes,1,opt,name=header_bytes,json=headerBytes,proto3" json:"header_bytes,omitempty"` // encapsulates encoded MessageHeaderV1
	// Ciphertext.payload MUST contain encrypted EncodedContent
	Ciphertext *Ciphertext `protobuf:"bytes,2,opt,name=ciphertext,proto3" json:"ciphertext,omitempty"`
	// contains filtered or unexported fields
}

Message is the top level protocol element

func (*MessageV1) Descriptor deprecated

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

Deprecated: Use MessageV1.ProtoReflect.Descriptor instead.

func (*MessageV1) GetCiphertext

func (x *MessageV1) GetCiphertext() *Ciphertext

func (*MessageV1) GetHeaderBytes

func (x *MessageV1) GetHeaderBytes() []byte

func (*MessageV1) ProtoMessage

func (*MessageV1) ProtoMessage()

func (*MessageV1) ProtoReflect

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

func (*MessageV1) Reset

func (x *MessageV1) Reset()

func (*MessageV1) String

func (x *MessageV1) String() string

type MessageV2

type MessageV2 struct {
	HeaderBytes []byte `protobuf:"bytes,1,opt,name=header_bytes,json=headerBytes,proto3" json:"header_bytes,omitempty"` // encapsulates encoded MessageHeaderV2
	// Ciphertext.payload MUST contain encrypted SignedContent
	Ciphertext *Ciphertext `protobuf:"bytes,2,opt,name=ciphertext,proto3" json:"ciphertext,omitempty"`
	// HMAC of the message ciphertext, with the HMAC key derived from the topic key
	SenderHmac []byte `protobuf:"bytes,3,opt,name=sender_hmac,json=senderHmac,proto3,oneof" json:"sender_hmac,omitempty"`
	// Flag indicating whether the message should be pushed from a notification server
	ShouldPush *bool `protobuf:"varint,4,opt,name=should_push,json=shouldPush,proto3,oneof" json:"should_push,omitempty"`
	// contains filtered or unexported fields
}

Message combines the encoded header with the encrypted payload.

func (*MessageV2) Descriptor deprecated

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

Deprecated: Use MessageV2.ProtoReflect.Descriptor instead.

func (*MessageV2) GetCiphertext

func (x *MessageV2) GetCiphertext() *Ciphertext

func (*MessageV2) GetHeaderBytes

func (x *MessageV2) GetHeaderBytes() []byte

func (*MessageV2) GetSenderHmac added in v3.42.0

func (x *MessageV2) GetSenderHmac() []byte

func (*MessageV2) GetShouldPush added in v3.42.0

func (x *MessageV2) GetShouldPush() bool

func (*MessageV2) ProtoMessage

func (*MessageV2) ProtoMessage()

func (*MessageV2) ProtoReflect

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

func (*MessageV2) Reset

func (x *MessageV2) Reset()

func (*MessageV2) String

func (x *MessageV2) String() string

type Message_V1

type Message_V1 struct {
	V1 *MessageV1 `protobuf:"bytes,1,opt,name=v1,proto3,oneof"`
}

type Message_V2

type Message_V2 struct {
	V2 *MessageV2 `protobuf:"bytes,2,opt,name=v2,proto3,oneof"`
}

type PrivateKey

type PrivateKey struct {

	// time the key was created
	Timestamp uint64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// private key
	//
	// Types that are assignable to Union:
	//
	//	*PrivateKey_Secp256K1_
	Union isPrivateKey_Union `protobuf_oneof:"union"`
	// public key for this private key
	PublicKey *PublicKey `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	// contains filtered or unexported fields
}

LEGACY: PrivateKey generalized to support different key types

func (*PrivateKey) Descriptor deprecated

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

Deprecated: Use PrivateKey.ProtoReflect.Descriptor instead.

func (*PrivateKey) GetPublicKey

func (x *PrivateKey) GetPublicKey() *PublicKey

func (*PrivateKey) GetSecp256K1

func (x *PrivateKey) GetSecp256K1() *PrivateKey_Secp256K1

func (*PrivateKey) GetTimestamp

func (x *PrivateKey) GetTimestamp() uint64

func (*PrivateKey) GetUnion

func (m *PrivateKey) GetUnion() isPrivateKey_Union

func (*PrivateKey) ProtoMessage

func (*PrivateKey) ProtoMessage()

func (*PrivateKey) ProtoReflect

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

func (*PrivateKey) Reset

func (x *PrivateKey) Reset()

func (*PrivateKey) String

func (x *PrivateKey) String() string

type PrivateKeyBundle

type PrivateKeyBundle struct {

	// Types that are assignable to Version:
	//
	//	*PrivateKeyBundle_V1
	//	*PrivateKeyBundle_V2
	Version isPrivateKeyBundle_Version `protobuf_oneof:"version"`
	// contains filtered or unexported fields
}

Versioned PrivateKeyBundle

func (*PrivateKeyBundle) Descriptor deprecated

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

Deprecated: Use PrivateKeyBundle.ProtoReflect.Descriptor instead.

func (*PrivateKeyBundle) GetV1

func (*PrivateKeyBundle) GetV2

func (*PrivateKeyBundle) GetVersion

func (m *PrivateKeyBundle) GetVersion() isPrivateKeyBundle_Version

func (*PrivateKeyBundle) ProtoMessage

func (*PrivateKeyBundle) ProtoMessage()

func (*PrivateKeyBundle) ProtoReflect

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

func (*PrivateKeyBundle) Reset

func (x *PrivateKeyBundle) Reset()

func (*PrivateKeyBundle) String

func (x *PrivateKeyBundle) String() string

type PrivateKeyBundleV1

type PrivateKeyBundleV1 struct {
	IdentityKey *PrivateKey `protobuf:"bytes,1,opt,name=identity_key,json=identityKey,proto3" json:"identity_key,omitempty"`
	// all the known pre-keys, newer keys first,
	PreKeys []*PrivateKey `protobuf:"bytes,2,rep,name=pre_keys,json=preKeys,proto3" json:"pre_keys,omitempty"`
	// contains filtered or unexported fields
}

LEGACY: PrivateKeyBundleV1 wraps the identityKey and the preKeys

func (*PrivateKeyBundleV1) Descriptor deprecated

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

Deprecated: Use PrivateKeyBundleV1.ProtoReflect.Descriptor instead.

func (*PrivateKeyBundleV1) GetIdentityKey

func (x *PrivateKeyBundleV1) GetIdentityKey() *PrivateKey

func (*PrivateKeyBundleV1) GetPreKeys

func (x *PrivateKeyBundleV1) GetPreKeys() []*PrivateKey

func (*PrivateKeyBundleV1) ProtoMessage

func (*PrivateKeyBundleV1) ProtoMessage()

func (*PrivateKeyBundleV1) ProtoReflect

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

func (*PrivateKeyBundleV1) Reset

func (x *PrivateKeyBundleV1) Reset()

func (*PrivateKeyBundleV1) String

func (x *PrivateKeyBundleV1) String() string

type PrivateKeyBundleV2

type PrivateKeyBundleV2 struct {
	IdentityKey *SignedPrivateKey `protobuf:"bytes,1,opt,name=identity_key,json=identityKey,proto3" json:"identity_key,omitempty"`
	// all the known pre-keys, newer keys first,
	PreKeys []*SignedPrivateKey `protobuf:"bytes,2,rep,name=pre_keys,json=preKeys,proto3" json:"pre_keys,omitempty"`
	// contains filtered or unexported fields
}

PrivateKeyBundle wraps the identityKey and the preKeys, enforces usage of signed keys.

func (*PrivateKeyBundleV2) Descriptor deprecated

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

Deprecated: Use PrivateKeyBundleV2.ProtoReflect.Descriptor instead.

func (*PrivateKeyBundleV2) GetIdentityKey

func (x *PrivateKeyBundleV2) GetIdentityKey() *SignedPrivateKey

func (*PrivateKeyBundleV2) GetPreKeys

func (x *PrivateKeyBundleV2) GetPreKeys() []*SignedPrivateKey

func (*PrivateKeyBundleV2) ProtoMessage

func (*PrivateKeyBundleV2) ProtoMessage()

func (*PrivateKeyBundleV2) ProtoReflect

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

func (*PrivateKeyBundleV2) Reset

func (x *PrivateKeyBundleV2) Reset()

func (*PrivateKeyBundleV2) String

func (x *PrivateKeyBundleV2) String() string

type PrivateKeyBundle_V1

type PrivateKeyBundle_V1 struct {
	V1 *PrivateKeyBundleV1 `protobuf:"bytes,1,opt,name=v1,proto3,oneof"`
}

type PrivateKeyBundle_V2

type PrivateKeyBundle_V2 struct {
	V2 *PrivateKeyBundleV2 `protobuf:"bytes,2,opt,name=v2,proto3,oneof"`
}

type PrivateKey_Secp256K1

type PrivateKey_Secp256K1 struct {
	Bytes []byte `protobuf:"bytes,1,opt,name=bytes,proto3" json:"bytes,omitempty"` // D big-endian, 32 bytes
	// contains filtered or unexported fields
}

EC: SECP256k1

func (*PrivateKey_Secp256K1) Descriptor deprecated

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

Deprecated: Use PrivateKey_Secp256K1.ProtoReflect.Descriptor instead.

func (*PrivateKey_Secp256K1) GetBytes

func (x *PrivateKey_Secp256K1) GetBytes() []byte

func (*PrivateKey_Secp256K1) ProtoMessage

func (*PrivateKey_Secp256K1) ProtoMessage()

func (*PrivateKey_Secp256K1) ProtoReflect

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

func (*PrivateKey_Secp256K1) Reset

func (x *PrivateKey_Secp256K1) Reset()

func (*PrivateKey_Secp256K1) String

func (x *PrivateKey_Secp256K1) String() string

type PrivateKey_Secp256K1_

type PrivateKey_Secp256K1_ struct {
	Secp256K1 *PrivateKey_Secp256K1 `protobuf:"bytes,2,opt,name=secp256k1,proto3,oneof"`
}

type PublicKey

type PublicKey struct {
	Timestamp uint64     `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3,oneof" json:"signature,omitempty"`
	// Types that are assignable to Union:
	//
	//	*PublicKey_Secp256K1Uncompressed_
	Union isPublicKey_Union `protobuf_oneof:"union"`
	// contains filtered or unexported fields
}

PublicKey represents a generalized public key, defined as a union to support cryptographic algorithm agility.

func (*PublicKey) Descriptor deprecated

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

Deprecated: Use PublicKey.ProtoReflect.Descriptor instead.

func (*PublicKey) GetSecp256K1Uncompressed

func (x *PublicKey) GetSecp256K1Uncompressed() *PublicKey_Secp256K1Uncompressed

func (*PublicKey) GetSignature

func (x *PublicKey) GetSignature() *Signature

func (*PublicKey) GetTimestamp

func (x *PublicKey) GetTimestamp() uint64

func (*PublicKey) GetUnion

func (m *PublicKey) GetUnion() isPublicKey_Union

func (*PublicKey) ProtoMessage

func (*PublicKey) ProtoMessage()

func (*PublicKey) ProtoReflect

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

func (*PublicKey) Reset

func (x *PublicKey) Reset()

func (*PublicKey) String

func (x *PublicKey) String() string

type PublicKeyBundle

type PublicKeyBundle struct {

	// Identity key MUST be signed by the wallet.
	IdentityKey *PublicKey `protobuf:"bytes,1,opt,name=identity_key,json=identityKey,proto3" json:"identity_key,omitempty"`
	// Pre-key MUST be signed by the identity key.
	PreKey *PublicKey `protobuf:"bytes,2,opt,name=pre_key,json=preKey,proto3" json:"pre_key,omitempty"`
	// contains filtered or unexported fields
}

PublicKeyBundle packages the cryptographic keys associated with a wallet, both senders and recipients are identified by their key bundles.

func (*PublicKeyBundle) Descriptor deprecated

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

Deprecated: Use PublicKeyBundle.ProtoReflect.Descriptor instead.

func (*PublicKeyBundle) GetIdentityKey

func (x *PublicKeyBundle) GetIdentityKey() *PublicKey

func (*PublicKeyBundle) GetPreKey

func (x *PublicKeyBundle) GetPreKey() *PublicKey

func (*PublicKeyBundle) ProtoMessage

func (*PublicKeyBundle) ProtoMessage()

func (*PublicKeyBundle) ProtoReflect

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

func (*PublicKeyBundle) Reset

func (x *PublicKeyBundle) Reset()

func (*PublicKeyBundle) String

func (x *PublicKeyBundle) String() string

type PublicKey_Secp256K1Uncompressed

type PublicKey_Secp256K1Uncompressed struct {

	// uncompressed point with prefix (0x04) [ P || X || Y ], 65 bytes
	Bytes []byte `protobuf:"bytes,1,opt,name=bytes,proto3" json:"bytes,omitempty"`
	// contains filtered or unexported fields
}

The key bytes

func (*PublicKey_Secp256K1Uncompressed) Descriptor deprecated

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

Deprecated: Use PublicKey_Secp256K1Uncompressed.ProtoReflect.Descriptor instead.

func (*PublicKey_Secp256K1Uncompressed) GetBytes

func (x *PublicKey_Secp256K1Uncompressed) GetBytes() []byte

func (*PublicKey_Secp256K1Uncompressed) ProtoMessage

func (*PublicKey_Secp256K1Uncompressed) ProtoMessage()

func (*PublicKey_Secp256K1Uncompressed) ProtoReflect

func (*PublicKey_Secp256K1Uncompressed) Reset

func (*PublicKey_Secp256K1Uncompressed) String

type PublicKey_Secp256K1Uncompressed_

type PublicKey_Secp256K1Uncompressed_ struct {
	Secp256K1Uncompressed *PublicKey_Secp256K1Uncompressed `protobuf:"bytes,3,opt,name=secp256k1_uncompressed,json=secp256k1Uncompressed,proto3,oneof"`
}

type SealedInvitation

type SealedInvitation struct {

	// Types that are assignable to Version:
	//
	//	*SealedInvitation_V1
	Version isSealedInvitation_Version `protobuf_oneof:"version"`
	// contains filtered or unexported fields
}

Versioned Sealed Invitation

func (*SealedInvitation) Descriptor deprecated

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

Deprecated: Use SealedInvitation.ProtoReflect.Descriptor instead.

func (*SealedInvitation) GetV1

func (*SealedInvitation) GetVersion

func (m *SealedInvitation) GetVersion() isSealedInvitation_Version

func (*SealedInvitation) ProtoMessage

func (*SealedInvitation) ProtoMessage()

func (*SealedInvitation) ProtoReflect

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

func (*SealedInvitation) Reset

func (x *SealedInvitation) Reset()

func (*SealedInvitation) String

func (x *SealedInvitation) String() string

type SealedInvitationHeaderV1

type SealedInvitationHeaderV1 struct {
	Sender    *SignedPublicKeyBundle `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
	Recipient *SignedPublicKeyBundle `protobuf:"bytes,2,opt,name=recipient,proto3" json:"recipient,omitempty"`
	CreatedNs uint64                 `protobuf:"varint,3,opt,name=created_ns,json=createdNs,proto3" json:"created_ns,omitempty"`
	// contains filtered or unexported fields
}

Sealed Invitation V1 Header Header carries information that is unencrypted, thus readable by the network it is however authenticated as associated data with the AEAD scheme used to encrypt the invitation body, thus providing tamper evidence.

func (*SealedInvitationHeaderV1) Descriptor deprecated

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

Deprecated: Use SealedInvitationHeaderV1.ProtoReflect.Descriptor instead.

func (*SealedInvitationHeaderV1) GetCreatedNs

func (x *SealedInvitationHeaderV1) GetCreatedNs() uint64

func (*SealedInvitationHeaderV1) GetRecipient

func (*SealedInvitationHeaderV1) GetSender

func (*SealedInvitationHeaderV1) ProtoMessage

func (*SealedInvitationHeaderV1) ProtoMessage()

func (*SealedInvitationHeaderV1) ProtoReflect

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

func (*SealedInvitationHeaderV1) Reset

func (x *SealedInvitationHeaderV1) Reset()

func (*SealedInvitationHeaderV1) String

func (x *SealedInvitationHeaderV1) String() string

type SealedInvitationV1

type SealedInvitationV1 struct {

	// encoded SealedInvitationHeaderV1 used as associated data for Ciphertext
	HeaderBytes []byte `protobuf:"bytes,1,opt,name=header_bytes,json=headerBytes,proto3" json:"header_bytes,omitempty"`
	// Ciphertext.payload MUST contain encrypted InvitationV1.
	Ciphertext *Ciphertext `protobuf:"bytes,2,opt,name=ciphertext,proto3" json:"ciphertext,omitempty"`
	// contains filtered or unexported fields
}

Sealed Invitation V1 Invitation encrypted with key material derived from the sender's and recipient's public key bundles using simplified X3DH where the sender's ephemeral key is replaced with sender's pre-key.

func (*SealedInvitationV1) Descriptor deprecated

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

Deprecated: Use SealedInvitationV1.ProtoReflect.Descriptor instead.

func (*SealedInvitationV1) GetCiphertext

func (x *SealedInvitationV1) GetCiphertext() *Ciphertext

func (*SealedInvitationV1) GetHeaderBytes

func (x *SealedInvitationV1) GetHeaderBytes() []byte

func (*SealedInvitationV1) ProtoMessage

func (*SealedInvitationV1) ProtoMessage()

func (*SealedInvitationV1) ProtoReflect

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

func (*SealedInvitationV1) Reset

func (x *SealedInvitationV1) Reset()

func (*SealedInvitationV1) String

func (x *SealedInvitationV1) String() string

type SealedInvitation_V1

type SealedInvitation_V1 struct {
	V1 *SealedInvitationV1 `protobuf:"bytes,1,opt,name=v1,proto3,oneof"`
}

type Signature

type Signature struct {

	// Types that are assignable to Union:
	//
	//	*Signature_EcdsaCompact
	//	*Signature_WalletEcdsaCompact
	Union isSignature_Union `protobuf_oneof:"union"`
	// contains filtered or unexported fields
}

Signature represents a generalized public key signature, defined as a union to support cryptographic algorithm agility.

func (*Signature) Descriptor deprecated

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

Deprecated: Use Signature.ProtoReflect.Descriptor instead.

func (*Signature) GetEcdsaCompact

func (x *Signature) GetEcdsaCompact() *Signature_ECDSACompact

func (*Signature) GetUnion

func (m *Signature) GetUnion() isSignature_Union

func (*Signature) GetWalletEcdsaCompact

func (x *Signature) GetWalletEcdsaCompact() *Signature_WalletECDSACompact

func (*Signature) ProtoMessage

func (*Signature) ProtoMessage()

func (*Signature) ProtoReflect

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

func (*Signature) Reset

func (x *Signature) Reset()

func (*Signature) String

func (x *Signature) String() string

type Signature_ECDSACompact

type Signature_ECDSACompact struct {
	Bytes    []byte `protobuf:"bytes,1,opt,name=bytes,proto3" json:"bytes,omitempty"`        // compact representation [ R || S ], 64 bytes
	Recovery uint32 `protobuf:"varint,2,opt,name=recovery,proto3" json:"recovery,omitempty"` // recovery bit
	// contains filtered or unexported fields
}

ECDSA signature bytes and the recovery bit

func (*Signature_ECDSACompact) Descriptor deprecated

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

Deprecated: Use Signature_ECDSACompact.ProtoReflect.Descriptor instead.

func (*Signature_ECDSACompact) GetBytes

func (x *Signature_ECDSACompact) GetBytes() []byte

func (*Signature_ECDSACompact) GetRecovery

func (x *Signature_ECDSACompact) GetRecovery() uint32

func (*Signature_ECDSACompact) ProtoMessage

func (*Signature_ECDSACompact) ProtoMessage()

func (*Signature_ECDSACompact) ProtoReflect

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

func (*Signature_ECDSACompact) Reset

func (x *Signature_ECDSACompact) Reset()

func (*Signature_ECDSACompact) String

func (x *Signature_ECDSACompact) String() string

type Signature_EcdsaCompact

type Signature_EcdsaCompact struct {
	EcdsaCompact *Signature_ECDSACompact `protobuf:"bytes,1,opt,name=ecdsa_compact,json=ecdsaCompact,proto3,oneof"`
}

type Signature_WalletECDSACompact

type Signature_WalletECDSACompact struct {
	Bytes    []byte `protobuf:"bytes,1,opt,name=bytes,proto3" json:"bytes,omitempty"`        // compact representation [ R || S ], 64 bytes
	Recovery uint32 `protobuf:"varint,2,opt,name=recovery,proto3" json:"recovery,omitempty"` // recovery bit
	// contains filtered or unexported fields
}

ECDSA signature bytes and the recovery bit produced by xmtp-js::PublicKey.signWithWallet function, i.e. EIP-191 signature of a "Create Identity" message with the key embedded. Used to sign identity keys.

func (*Signature_WalletECDSACompact) Descriptor deprecated

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

Deprecated: Use Signature_WalletECDSACompact.ProtoReflect.Descriptor instead.

func (*Signature_WalletECDSACompact) GetBytes

func (x *Signature_WalletECDSACompact) GetBytes() []byte

func (*Signature_WalletECDSACompact) GetRecovery

func (x *Signature_WalletECDSACompact) GetRecovery() uint32

func (*Signature_WalletECDSACompact) ProtoMessage

func (*Signature_WalletECDSACompact) ProtoMessage()

func (*Signature_WalletECDSACompact) ProtoReflect

func (*Signature_WalletECDSACompact) Reset

func (x *Signature_WalletECDSACompact) Reset()

func (*Signature_WalletECDSACompact) String

type Signature_WalletEcdsaCompact

type Signature_WalletEcdsaCompact struct {
	WalletEcdsaCompact *Signature_WalletECDSACompact `protobuf:"bytes,2,opt,name=wallet_ecdsa_compact,json=walletEcdsaCompact,proto3,oneof"`
}

type SignedContent

type SignedContent struct {

	// MUST contain EncodedContent
	Payload []byte                 `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	Sender  *SignedPublicKeyBundle `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"`
	// MUST be a signature of a concatenation of
	// the message header bytes and the payload bytes,
	// signed by the sender's pre-key.
	Signature *Signature `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

SignedContent attaches a signature to EncodedContent.

func (*SignedContent) Descriptor deprecated

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

Deprecated: Use SignedContent.ProtoReflect.Descriptor instead.

func (*SignedContent) GetPayload

func (x *SignedContent) GetPayload() []byte

func (*SignedContent) GetSender

func (x *SignedContent) GetSender() *SignedPublicKeyBundle

func (*SignedContent) GetSignature

func (x *SignedContent) GetSignature() *Signature

func (*SignedContent) ProtoMessage

func (*SignedContent) ProtoMessage()

func (*SignedContent) ProtoReflect

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

func (*SignedContent) Reset

func (x *SignedContent) Reset()

func (*SignedContent) String

func (x *SignedContent) String() string

type SignedEciesCiphertext added in v3.21.0

type SignedEciesCiphertext struct {

	// serialized Ecies message
	EciesBytes []byte `protobuf:"bytes,1,opt,name=ecies_bytes,json=eciesBytes,proto3" json:"ecies_bytes,omitempty"`
	// signature of sha256(ecies_bytes) signed with the IdentityKey
	Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

SignedEciesCiphertext represents an ECIES encrypted payload and a signature

func (*SignedEciesCiphertext) Descriptor deprecated added in v3.21.0

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

Deprecated: Use SignedEciesCiphertext.ProtoReflect.Descriptor instead.

func (*SignedEciesCiphertext) GetEciesBytes added in v3.21.0

func (x *SignedEciesCiphertext) GetEciesBytes() []byte

func (*SignedEciesCiphertext) GetSignature added in v3.21.0

func (x *SignedEciesCiphertext) GetSignature() *Signature

func (*SignedEciesCiphertext) ProtoMessage added in v3.21.0

func (*SignedEciesCiphertext) ProtoMessage()

func (*SignedEciesCiphertext) ProtoReflect added in v3.21.0

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

func (*SignedEciesCiphertext) Reset added in v3.21.0

func (x *SignedEciesCiphertext) Reset()

func (*SignedEciesCiphertext) String added in v3.21.0

func (x *SignedEciesCiphertext) String() string

type SignedEciesCiphertext_Ecies added in v3.21.0

type SignedEciesCiphertext_Ecies struct {
	EphemeralPublicKey []byte `protobuf:"bytes,1,opt,name=ephemeral_public_key,json=ephemeralPublicKey,proto3" json:"ephemeral_public_key,omitempty"` // 65 bytes
	Iv                 []byte `protobuf:"bytes,2,opt,name=iv,proto3" json:"iv,omitempty"`                                                             // 16 bytes
	Mac                []byte `protobuf:"bytes,3,opt,name=mac,proto3" json:"mac,omitempty"`                                                           // 32 bytes
	Ciphertext         []byte `protobuf:"bytes,4,opt,name=ciphertext,proto3" json:"ciphertext,omitempty"`                                             // encrypted payload with block size of 16
	// contains filtered or unexported fields
}

Ecies is ciphertext encrypted using ECIES with a MAC

func (*SignedEciesCiphertext_Ecies) Descriptor deprecated added in v3.21.0

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

Deprecated: Use SignedEciesCiphertext_Ecies.ProtoReflect.Descriptor instead.

func (*SignedEciesCiphertext_Ecies) GetCiphertext added in v3.21.0

func (x *SignedEciesCiphertext_Ecies) GetCiphertext() []byte

func (*SignedEciesCiphertext_Ecies) GetEphemeralPublicKey added in v3.21.0

func (x *SignedEciesCiphertext_Ecies) GetEphemeralPublicKey() []byte

func (*SignedEciesCiphertext_Ecies) GetIv added in v3.21.0

func (x *SignedEciesCiphertext_Ecies) GetIv() []byte

func (*SignedEciesCiphertext_Ecies) GetMac added in v3.21.0

func (x *SignedEciesCiphertext_Ecies) GetMac() []byte

func (*SignedEciesCiphertext_Ecies) ProtoMessage added in v3.21.0

func (*SignedEciesCiphertext_Ecies) ProtoMessage()

func (*SignedEciesCiphertext_Ecies) ProtoReflect added in v3.21.0

func (*SignedEciesCiphertext_Ecies) Reset added in v3.21.0

func (x *SignedEciesCiphertext_Ecies) Reset()

func (*SignedEciesCiphertext_Ecies) String added in v3.21.0

func (x *SignedEciesCiphertext_Ecies) String() string

type SignedPrivateKey

type SignedPrivateKey struct {

	// time the key was created
	CreatedNs uint64 `protobuf:"varint,1,opt,name=created_ns,json=createdNs,proto3" json:"created_ns,omitempty"`
	// private key
	//
	// Types that are assignable to Union:
	//
	//	*SignedPrivateKey_Secp256K1_
	Union isSignedPrivateKey_Union `protobuf_oneof:"union"`
	// public key for this private key
	PublicKey *SignedPublicKey `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	// contains filtered or unexported fields
}

PrivateKey generalized to support different key types

func (*SignedPrivateKey) Descriptor deprecated

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

Deprecated: Use SignedPrivateKey.ProtoReflect.Descriptor instead.

func (*SignedPrivateKey) GetCreatedNs

func (x *SignedPrivateKey) GetCreatedNs() uint64

func (*SignedPrivateKey) GetPublicKey

func (x *SignedPrivateKey) GetPublicKey() *SignedPublicKey

func (*SignedPrivateKey) GetSecp256K1

func (x *SignedPrivateKey) GetSecp256K1() *SignedPrivateKey_Secp256K1

func (*SignedPrivateKey) GetUnion

func (m *SignedPrivateKey) GetUnion() isSignedPrivateKey_Union

func (*SignedPrivateKey) ProtoMessage

func (*SignedPrivateKey) ProtoMessage()

func (*SignedPrivateKey) ProtoReflect

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

func (*SignedPrivateKey) Reset

func (x *SignedPrivateKey) Reset()

func (*SignedPrivateKey) String

func (x *SignedPrivateKey) String() string

type SignedPrivateKey_Secp256K1

type SignedPrivateKey_Secp256K1 struct {
	Bytes []byte `protobuf:"bytes,1,opt,name=bytes,proto3" json:"bytes,omitempty"` // D big-endian, 32 bytes
	// contains filtered or unexported fields
}

EC: SECP256k1

func (*SignedPrivateKey_Secp256K1) Descriptor deprecated

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

Deprecated: Use SignedPrivateKey_Secp256K1.ProtoReflect.Descriptor instead.

func (*SignedPrivateKey_Secp256K1) GetBytes

func (x *SignedPrivateKey_Secp256K1) GetBytes() []byte

func (*SignedPrivateKey_Secp256K1) ProtoMessage

func (*SignedPrivateKey_Secp256K1) ProtoMessage()

func (*SignedPrivateKey_Secp256K1) ProtoReflect

func (*SignedPrivateKey_Secp256K1) Reset

func (x *SignedPrivateKey_Secp256K1) Reset()

func (*SignedPrivateKey_Secp256K1) String

func (x *SignedPrivateKey_Secp256K1) String() string

type SignedPrivateKey_Secp256K1_

type SignedPrivateKey_Secp256K1_ struct {
	Secp256K1 *SignedPrivateKey_Secp256K1 `protobuf:"bytes,2,opt,name=secp256k1,proto3,oneof"`
}

type SignedPublicKey

type SignedPublicKey struct {
	KeyBytes  []byte     `protobuf:"bytes,1,opt,name=key_bytes,json=keyBytes,proto3" json:"key_bytes,omitempty"` // embeds an UnsignedPublicKey
	Signature *Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`               // signs key_bytes
	// contains filtered or unexported fields
}

SignedPublicKey

func (*SignedPublicKey) Descriptor deprecated

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

Deprecated: Use SignedPublicKey.ProtoReflect.Descriptor instead.

func (*SignedPublicKey) GetKeyBytes

func (x *SignedPublicKey) GetKeyBytes() []byte

func (*SignedPublicKey) GetSignature

func (x *SignedPublicKey) GetSignature() *Signature

func (*SignedPublicKey) ProtoMessage

func (*SignedPublicKey) ProtoMessage()

func (*SignedPublicKey) ProtoReflect

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

func (*SignedPublicKey) Reset

func (x *SignedPublicKey) Reset()

func (*SignedPublicKey) String

func (x *SignedPublicKey) String() string

type SignedPublicKeyBundle

type SignedPublicKeyBundle struct {

	// Identity key MUST be signed by the wallet.
	IdentityKey *SignedPublicKey `protobuf:"bytes,1,opt,name=identity_key,json=identityKey,proto3" json:"identity_key,omitempty"`
	// Pre-key MUST be signed by the identity key.
	PreKey *SignedPublicKey `protobuf:"bytes,2,opt,name=pre_key,json=preKey,proto3" json:"pre_key,omitempty"`
	// contains filtered or unexported fields
}

PublicKeyBundle packages the cryptographic keys associated with a wallet.

func (*SignedPublicKeyBundle) Descriptor deprecated

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

Deprecated: Use SignedPublicKeyBundle.ProtoReflect.Descriptor instead.

func (*SignedPublicKeyBundle) GetIdentityKey

func (x *SignedPublicKeyBundle) GetIdentityKey() *SignedPublicKey

func (*SignedPublicKeyBundle) GetPreKey

func (x *SignedPublicKeyBundle) GetPreKey() *SignedPublicKey

func (*SignedPublicKeyBundle) ProtoMessage

func (*SignedPublicKeyBundle) ProtoMessage()

func (*SignedPublicKeyBundle) ProtoReflect

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

func (*SignedPublicKeyBundle) Reset

func (x *SignedPublicKeyBundle) Reset()

func (*SignedPublicKeyBundle) String

func (x *SignedPublicKeyBundle) String() string

type UnsignedPublicKey

type UnsignedPublicKey struct {
	CreatedNs uint64 `protobuf:"varint,1,opt,name=created_ns,json=createdNs,proto3" json:"created_ns,omitempty"`
	// Types that are assignable to Union:
	//
	//	*UnsignedPublicKey_Secp256K1Uncompressed_
	Union isUnsignedPublicKey_Union `protobuf_oneof:"union"`
	// contains filtered or unexported fields
}

UnsignedPublicKey represents a generalized public key, defined as a union to support cryptographic algorithm agility.

func (*UnsignedPublicKey) Descriptor deprecated

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

Deprecated: Use UnsignedPublicKey.ProtoReflect.Descriptor instead.

func (*UnsignedPublicKey) GetCreatedNs

func (x *UnsignedPublicKey) GetCreatedNs() uint64

func (*UnsignedPublicKey) GetSecp256K1Uncompressed

func (x *UnsignedPublicKey) GetSecp256K1Uncompressed() *UnsignedPublicKey_Secp256K1Uncompressed

func (*UnsignedPublicKey) GetUnion

func (m *UnsignedPublicKey) GetUnion() isUnsignedPublicKey_Union

func (*UnsignedPublicKey) ProtoMessage

func (*UnsignedPublicKey) ProtoMessage()

func (*UnsignedPublicKey) ProtoReflect

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

func (*UnsignedPublicKey) Reset

func (x *UnsignedPublicKey) Reset()

func (*UnsignedPublicKey) String

func (x *UnsignedPublicKey) String() string

type UnsignedPublicKey_Secp256K1Uncompressed

type UnsignedPublicKey_Secp256K1Uncompressed struct {

	// uncompressed point with prefix (0x04) [ P || X || Y ], 65 bytes
	Bytes []byte `protobuf:"bytes,1,opt,name=bytes,proto3" json:"bytes,omitempty"`
	// contains filtered or unexported fields
}

EC: SECP256k1

func (*UnsignedPublicKey_Secp256K1Uncompressed) Descriptor deprecated

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

Deprecated: Use UnsignedPublicKey_Secp256K1Uncompressed.ProtoReflect.Descriptor instead.

func (*UnsignedPublicKey_Secp256K1Uncompressed) GetBytes

func (*UnsignedPublicKey_Secp256K1Uncompressed) ProtoMessage

func (*UnsignedPublicKey_Secp256K1Uncompressed) ProtoReflect

func (*UnsignedPublicKey_Secp256K1Uncompressed) Reset

func (*UnsignedPublicKey_Secp256K1Uncompressed) String

type UnsignedPublicKey_Secp256K1Uncompressed_

type UnsignedPublicKey_Secp256K1Uncompressed_ struct {
	Secp256K1Uncompressed *UnsignedPublicKey_Secp256K1Uncompressed `protobuf:"bytes,3,opt,name=secp256k1_uncompressed,json=secp256k1Uncompressed,proto3,oneof"`
}

Jump to

Keyboard shortcuts

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