message_contents

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: MIT Imports: 4 Imported by: 1

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_xmtp_envelope_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 the payload of the message encoded and encrypted for transport. It is definited as a union to support cryptographic algorithm agility.

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"`
	GcmNonce []byte `protobuf:"bytes,2,opt,name=gcm_nonce,json=gcmNonce,proto3" json:"gcm_nonce,omitempty"`
	// payload MUST contain encoding of a EncodedContent message
	Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
	// contains filtered or unexported fields
}

The encrypted payload

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 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
	Version isContactBundle_Version `protobuf_oneof:"version"`
	// contains filtered or unexported fields
}

Contains a oneof of ContactBundle versions

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) 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
}

The PublicKeyBundle of the user on the network. Used to derive shared secrets for encrypted messaging

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 ContactBundle_V1

type ContactBundle_V1 struct {
	V1 *ContactBundleV1 `protobuf:"bytes,1,opt,name=v1,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 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 is the type embedded in Ciphertext.payload bytes, it bundles the encoded content with metadata identifying the type of content 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 Message

type Message struct {

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

The outermost wrapper for a message on the network

func (*Message) Descriptor deprecated

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

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetV1

func (x *Message) GetV1() *V1Message

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 MessageHeader

type MessageHeader 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
}

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

func (*MessageHeader) Descriptor deprecated

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

Deprecated: Use MessageHeader.ProtoReflect.Descriptor instead.

func (*MessageHeader) GetRecipient

func (x *MessageHeader) GetRecipient() *PublicKeyBundle

func (*MessageHeader) GetSender

func (x *MessageHeader) GetSender() *PublicKeyBundle

func (*MessageHeader) GetTimestamp

func (x *MessageHeader) GetTimestamp() uint64

func (*MessageHeader) ProtoMessage

func (*MessageHeader) ProtoMessage()

func (*MessageHeader) ProtoReflect

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

func (*MessageHeader) Reset

func (x *MessageHeader) Reset()

func (*MessageHeader) String

func (x *MessageHeader) String() string

type Message_V1

type Message_V1 struct {
	V1 *V1Message `protobuf:"bytes,1,opt,name=v1,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 {
	IdentityKey *PublicKey `protobuf:"bytes,1,opt,name=identity_key,json=identityKey,proto3" json:"identity_key,omitempty"`
	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 Signature

type Signature struct {

	// Types that are assignable to Union:
	//	*Signature_EcdsaCompact
	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) 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
}

The format for an 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 V1Message

type V1Message struct {
	HeaderBytes []byte      `protobuf:"bytes,1,opt,name=header_bytes,json=headerBytes,proto3" json:"header_bytes,omitempty"` // encapsulates the encoded MessageHeader
	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 (*V1Message) Descriptor deprecated

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

Deprecated: Use V1Message.ProtoReflect.Descriptor instead.

func (*V1Message) GetCiphertext

func (x *V1Message) GetCiphertext() *Ciphertext

func (*V1Message) GetHeaderBytes

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

func (*V1Message) ProtoMessage

func (*V1Message) ProtoMessage()

func (*V1Message) ProtoReflect

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

func (*V1Message) Reset

func (x *V1Message) Reset()

func (*V1Message) String

func (x *V1Message) String() string

Jump to

Keyboard shortcuts

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