protocol

package
v0.160.1 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2023 License: MPL-2.0, MPL-2.0 Imports: 95 Imported by: 2

README

status-go/protocol

This is an implementation of the secure transport and payloads which are a part of the Status Client specification.

This implementation uses SQLite and SQLCipher for persistent storage.

The payloads are encoded using protocol-buffers.

Content

  • messenger.go is the main file which exports Messenger struct. This is a public API to interact with this implementation of the Status Chat Protocol.
  • protobuf/ contains protobuf files implementing payloads described in the Payloads spec.
  • encryption/ implements the Secure Transport spec.
  • transport/ connects the Status Chat Protocol with a wire-protocol which in our case is either Whisper or Waku.
  • datasync/ is an adapter for MVDS.
  • applicationmetadata/ is an outer layer wrapping a payload with an app-specific metadata like a signature.
  • identity/ implements details related to creating a three-word name and identicon.
  • migrations/ contains implementation specific migrations for the sqlite database which is used by Messenger as a persistent data store.

History

Originally this package was a dedicated repo called status-protocol-go and was migrated into status-go. The new status-go/protocol package maintained its own dependencies until sub modules were removed and the root go.mod file managed all dependencies for the entire status-go repo.

Documentation

Index

Constants

View Source
const (
	ActivityCenterQueryParamsReadRead = iota + 1
	ActivityCenterQueryParamsReadUnread
	ActivityCenterQueryParamsReadAll
)
View Source
const (
	FirstMessageTimestampUndefined = 0
	FirstMessageTimestampNoMessage = 1
)
View Source
const (
	MuteFor1MinDuration   = time.Minute
	MuteFor15MinsDuration = 15 * time.Minute
	MuteFor1HrsDuration   = time.Hour
	MuteFor8HrsDuration   = 8 * time.Hour
	MuteFor1WeekDuration  = 7 * 24 * time.Hour
)
View Source
const (
	MuteFor15Min requests.MutingVariation = iota + 1
	MuteFor1Hr
	MuteFor8Hr
	MuteFor1Week
	MuteTillUnmuted
	MuteTill1Min
	Unmuted
)
View Source
const (
	SyncWakuSectionKeyProfile           = "profile"
	SyncWakuSectionKeyContacts          = "contacts"
	SyncWakuSectionKeyCommunities       = "communities"
	SyncWakuSectionKeySettings          = "settings"
	SyncWakuSectionKeyKeypairs          = "keypairs"
	SyncWakuSectionKeyWatchOnlyAccounts = "watchOnlyAccounts"
)
View Source
const (
	BackupContactsPerBatch = 20
)
View Source
const (
	PubKeyStringLength = 132
)

Variables

View Source
var (
	ErrChatIDEmpty     = errors.New("chat ID is empty")
	ErrChatNotFound    = errors.New("can't find chat")
	ErrNotImplemented  = errors.New("not implemented")
	ErrContactNotFound = errors.New("contact not found")
)
View Source
var (
	ErrMessageNotAllowed                     = errors.New("message from a non-contact")
	ErrMessageForWrongChatType               = errors.New("message for the wrong chat type")
	ErrNotWalletAccount                      = errors.New("an account is not a wallet account")
	ErrWalletAccountNotSupportedForMobileApp = errors.New("handling account is not supported for mobile app")
	ErrTryingToStoreOldWalletAccount         = errors.New("trying to store an old wallet account")
	ErrSomeFieldsMissingForWalletAccount     = errors.New("some fields are missing for wallet account")
	ErrTryingToRemoveUnexistingWalletAccount = errors.New("trying to remove an unexisting wallet account")
	ErrUnknownKeypairForWalletAccount        = errors.New("keypair is not known for the wallet account")
)
View Source
var (
	// ErrMsgAlreadyExist returned if msg already exist.
	ErrMsgAlreadyExist = errors.New("message with given ID already exist")
	HoursInTwoWeeks    = 336
)
View Source
var (
	ErrCannotChangeKeypairName = errors.New("cannot change profile keypair name")
)
View Source
var ErrGroupChatAddedContacts = errors.New("group-chat: can't add members who are not mutual contacts")
View Source
var ErrInvalidActivityCenterNotification = errors.New("invalid activity center notification")
View Source
var ErrInvalidBioLength = errors.New("invalid bio length")
View Source
var ErrInvalidDeletePermission = errors.New("don't have enough permission to delete")
View Source
var ErrInvalidDeleteTypeAuthor = errors.New("message type cannot be deleted")
View Source
var ErrInvalidDisplayNameEthSuffix = errors.New(`usernames ending with "eth" are not allowed`)
View Source
var ErrInvalidDisplayNameNotAllowed = errors.New("name is not allowed")
View Source
var ErrInvalidDisplayNameRegExp = errors.New("only letters, numbers, underscores and hyphens allowed")
View Source
var ErrInvalidEditContentType = errors.New("only text or emoji messages can be replaced")
View Source
var ErrInvalidEditOrDeleteAuthor = errors.New("sender is not the author of the message")
View Source
var ErrInvalidSocialLinkTextLength = errors.New("invalid social link text length")
View Source
var ErrNoFiltersForChat = errors.New("no filter registered for given chat")

Functions

func DecryptIdentityImagesWithIdentityPrivateKey added in v0.89.2

func DecryptIdentityImagesWithIdentityPrivateKey(iis map[string]*protobuf.IdentityImage, recipientIdentity *ecdsa.PrivateKey, senderPubKey *ecdsa.PublicKey) error

func DeletedMessageNotification added in v0.83.15

func DeletedMessageNotification(id string, chat *Chat) *localnotifications.Notification

func EncryptIdentityImagesWithContactPubKeys added in v0.89.2

func EncryptIdentityImagesWithContactPubKeys(iis map[string]*protobuf.IdentityImage, m *Messenger) (err error)

func GenerateAlias

func GenerateAlias(id string) (string, error)

GenerateAlias name returns the generated name given a public key hex encoded prefixed with 0x

func Identicon

func Identicon(id string) (string, error)

Identicon returns an identicon based on the input string

func NewCommunityRequestToJoinNotification added in v0.74.2

func NewCommunityRequestToJoinNotification(id string, community *communities.Community, contact *Contact) *localnotifications.Notification

func NewMessageNotification added in v0.74.2

func NewMessageNotification(id string, message *common.Message, chat *Chat, contact *Contact, contacts *contactMap, profilePicturesVisibility int) (*localnotifications.Notification, error)

func NewPrivateGroupInviteNotification added in v0.88.4

func NewPrivateGroupInviteNotification(id string, chat *Chat, contact *Contact, profilePicturesVisibility int) *localnotifications.Notification

func ReplaceMentions added in v0.143.1

func ReplaceMentions(text string, users map[string]*MentionableUser) string

func SortByClock added in v0.111.5

func SortByClock(msgs HasClocks)

func ToVerificationRequest added in v0.102.6

func ToVerificationRequest(message protobuf.SyncVerificationRequest) *verification.Request

func ValidateAcceptContactVerification added in v0.102.6

func ValidateAcceptContactVerification(request protobuf.AcceptContactVerification) error

func ValidateBio added in v0.105.1

func ValidateBio(bio *string) error

func ValidateContactVerificationRequest added in v0.102.6

func ValidateContactVerificationRequest(request protobuf.RequestContactVerification) error

func ValidateDeleteForMeMessage added in v0.111.5

func ValidateDeleteForMeMessage(message protobuf.DeleteForMeMessage) error

func ValidateDeleteMessage added in v0.83.2

func ValidateDeleteMessage(message protobuf.DeleteMessage) error

func ValidateDisplayName added in v0.94.12

func ValidateDisplayName(displayName *string) error

func ValidateEditMessage added in v0.80.3

func ValidateEditMessage(message protobuf.EditMessage) error

func ValidateMembershipUpdateMessage

func ValidateMembershipUpdateMessage(message *protocol.MembershipUpdateMessage, timeNowMs uint64) error

func ValidateReceivedAcceptRequestAddressForTransaction

func ValidateReceivedAcceptRequestAddressForTransaction(message *protobuf.AcceptRequestAddressForTransaction, whisperTimestamp uint64) error

func ValidateReceivedChatMessage

func ValidateReceivedChatMessage(message *protobuf.ChatMessage, whisperTimestamp uint64) error

func ValidateReceivedDeclineRequestAddressForTransaction

func ValidateReceivedDeclineRequestAddressForTransaction(message *protobuf.DeclineRequestAddressForTransaction, whisperTimestamp uint64) error

func ValidateReceivedDeclineRequestTransaction

func ValidateReceivedDeclineRequestTransaction(message *protobuf.DeclineRequestTransaction, whisperTimestamp uint64) error

func ValidateReceivedEmojiReaction added in v0.56.4

func ValidateReceivedEmojiReaction(emoji *protobuf.EmojiReaction, whisperTimestamp uint64) error

func ValidateReceivedGroupChatInvitation added in v0.60.0

func ValidateReceivedGroupChatInvitation(invitation *protobuf.GroupChatInvitation) error

func ValidateReceivedPairInstallation

func ValidateReceivedPairInstallation(message *protobuf.PairInstallation, whisperTimestamp uint64) error

func ValidateReceivedRequestAddressForTransaction

func ValidateReceivedRequestAddressForTransaction(message *protobuf.RequestAddressForTransaction, whisperTimestamp uint64) error

func ValidateReceivedRequestTransaction

func ValidateReceivedRequestTransaction(message *protobuf.RequestTransaction, whisperTimestamp uint64) error

func ValidateReceivedSendTransaction

func ValidateReceivedSendTransaction(message *protobuf.SendTransaction, whisperTimestamp uint64) error
func ValidateSocialLink(link *identity.SocialLink) error
func ValidateSocialLinks(socialLinks identity.SocialLinks) error

func ValidateStatusUpdate added in v0.83.2

func ValidateStatusUpdate(message protobuf.StatusUpdate) error

func ValidateText added in v0.80.3

func ValidateText(text string) error

func WithDatasync

func WithDatasync() func(c *config) error

func WithPushNotifications added in v0.56.1

func WithPushNotifications() func(c *config) error

Types

type ActivityCenterCountRequest added in v0.136.0

type ActivityCenterCountRequest struct {
	ActivityTypes []ActivityCenterType          `json:"activityTypes"`
	ReadType      ActivityCenterQueryParamsRead `json:"readType"`
}

type ActivityCenterCountResponse added in v0.136.0

type ActivityCenterCountResponse = map[ActivityCenterType]uint64

type ActivityCenterMembershipStatus added in v0.113.0

type ActivityCenterMembershipStatus int
const (
	ActivityCenterMembershipStatusIdle ActivityCenterMembershipStatus = iota
	ActivityCenterMembershipStatusPending
	ActivityCenterMembershipStatusAccepted
	ActivityCenterMembershipStatusDeclined
)

type ActivityCenterNotification added in v0.76.0

type ActivityCenterNotification struct {
	ID                        types.HexBytes                 `json:"id"`
	ChatID                    string                         `json:"chatId"`
	CommunityID               string                         `json:"communityId"`
	MembershipStatus          ActivityCenterMembershipStatus `json:"membershipStatus"`
	Name                      string                         `json:"name"`
	Author                    string                         `json:"author"`
	Type                      ActivityCenterType             `json:"type"`
	LastMessage               *common.Message                `json:"lastMessage"`
	Message                   *common.Message                `json:"message"`
	ReplyMessage              *common.Message                `json:"replyMessage"`
	Timestamp                 uint64                         `json:"timestamp"`
	Read                      bool                           `json:"read"`
	Dismissed                 bool                           `json:"dismissed"`
	Deleted                   bool                           `json:"deleted"`
	Accepted                  bool                           `json:"accepted"`
	ContactVerificationStatus verification.RequestStatus     `json:"contactVerificationStatus"`
	//Used for synchronization. Each update should increment the UpdatedAt.
	//The value should represent the time when the update occurred.
	UpdatedAt uint64 `json:"updatedAt"`
}

func (*ActivityCenterNotification) Valid added in v0.76.0

func (n *ActivityCenterNotification) Valid() error

type ActivityCenterNotificationsRequest added in v0.136.0

type ActivityCenterNotificationsRequest struct {
	Cursor        string                        `json:"cursor"`
	Limit         uint64                        `json:"limit"`
	ActivityTypes []ActivityCenterType          `json:"activityTypes"`
	ReadType      ActivityCenterQueryParamsRead `json:"readType"`
}

type ActivityCenterPaginationResponse added in v0.76.0

type ActivityCenterPaginationResponse struct {
	Cursor        string                        `json:"cursor"`
	Notifications []*ActivityCenterNotification `json:"notifications"`
}

type ActivityCenterQueryParamsRead added in v0.114.3

type ActivityCenterQueryParamsRead uint

type ActivityCenterState added in v0.131.8

type ActivityCenterState struct {
	HasSeen   bool   `json:"hasSeen"`
	UpdatedAt uint64 `json:"updatedAt"`
}

type ActivityCenterType added in v0.76.0

type ActivityCenterType int
const (
	ActivityCenterNotificationNoType ActivityCenterType = iota
	ActivityCenterNotificationTypeNewOneToOne
	ActivityCenterNotificationTypeNewPrivateGroupChat
	ActivityCenterNotificationTypeMention
	ActivityCenterNotificationTypeReply
	ActivityCenterNotificationTypeContactRequest
	ActivityCenterNotificationTypeCommunityInvitation
	ActivityCenterNotificationTypeCommunityRequest
	ActivityCenterNotificationTypeCommunityMembershipRequest
	ActivityCenterNotificationTypeCommunityKicked
	ActivityCenterNotificationTypeContactVerification
	ActivityCenterNotificationTypeContactRemoved
)

type AtIndexEntry added in v0.143.1

type AtIndexEntry struct {
	From    int
	To      int
	Checked bool

	Mentioned bool
	NextAtIdx int
}

func (*AtIndexEntry) String added in v0.159.2

func (e *AtIndexEntry) String() string

type Chat

type Chat struct {
	// ID is the id of the chat, for public chats it is the name e.g. status, for one-to-one
	// is the hex encoded public key and for group chats is a random uuid appended with
	// the hex encoded pk of the creator of the chat
	ID          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	Color       string `json:"color"`
	Emoji       string `json:"emoji"`
	// Active indicates whether the chat has been soft deleted
	Active bool `json:"active"`

	ChatType ChatType `json:"chatType"`

	// Timestamp indicates the last time this chat has received/sent a message
	Timestamp int64 `json:"timestamp"`
	// LastClockValue indicates the last clock value to be used when sending messages
	LastClockValue uint64 `json:"lastClockValue"`
	// DeletedAtClockValue indicates the clock value at time of deletion, messages
	// with lower clock value of this should be discarded
	DeletedAtClockValue uint64 `json:"deletedAtClockValue"`
	// ReadMessagesAtClockValue indicates the clock value of time till all
	// messages are considered as read
	ReadMessagesAtClockValue uint64
	// Denormalized fields
	UnviewedMessagesCount uint            `json:"unviewedMessagesCount"`
	UnviewedMentionsCount uint            `json:"unviewedMentionsCount"`
	LastMessage           *common.Message `json:"lastMessage"`

	// Group chat fields
	// Members are the members who have been invited to the group chat
	Members []ChatMember `json:"members"`
	// MembershipUpdates is all the membership events in the chat
	MembershipUpdates []v1protocol.MembershipUpdateEvent `json:"membershipUpdateEvents"`

	// Generated username name of the chat for one-to-ones
	Alias string `json:"alias,omitempty"`
	// Identicon generated from public key
	Identicon string `json:"identicon"`

	// Muted is used to check whether we want to receive
	// push notifications for this chat
	Muted bool `json:"muted"`

	// Time in which chat was muted
	MuteTill time.Time `json:"muteTill,omitempty"`

	// Public key of administrator who created invitation link
	InvitationAdmin string `json:"invitationAdmin,omitempty"`

	// Public key of administrator who sent us group invitation
	ReceivedInvitationAdmin string `json:"receivedInvitationAdmin,omitempty"`

	// Public key of user profile
	Profile string `json:"profile,omitempty"`

	// CommunityID is the id of the community it belongs to
	CommunityID string `json:"communityId,omitempty"`

	// CategoryID is the id of the community category this chat belongs to.
	CategoryID string `json:"categoryId,omitempty"`

	// Joined is a timestamp that indicates when the chat was joined
	Joined int64 `json:"joined,omitempty"`

	// SyncedTo is the time up until it has synced with a mailserver
	SyncedTo uint32 `json:"syncedTo,omitempty"`

	// SyncedFrom is the time from when it was synced with a mailserver
	SyncedFrom uint32 `json:"syncedFrom,omitempty"`

	// FirstMessageTimestamp is the time when first message was sent/received on the chat
	// valid only for community chats
	// 0 - undefined
	// 1 - no messages
	FirstMessageTimestamp uint32 `json:"firstMessageTimestamp,omitempty"`

	// Highlight is used for highlight chats
	Highlight bool `json:"highlight,omitempty"`

	// Image of the chat in Base64 format
	Base64Image string `json:"image,omitempty"`
}

func CreateCommunityChat added in v0.67.0

func CreateCommunityChat(orgID, chatID string, orgChat *protobuf.CommunityChat, timesource common.TimeSource) *Chat

func CreateCommunityChats added in v0.67.0

func CreateCommunityChats(org *communities.Community, timesource common.TimeSource) []*Chat

func CreateGroupChat

func CreateGroupChat(timesource common.TimeSource) Chat

func CreateOneToOneChat

func CreateOneToOneChat(name string, publicKey *ecdsa.PublicKey, timesource common.TimeSource) *Chat

func CreateProfileChat added in v0.62.14

func CreateProfileChat(pubkey string, timesource common.TimeSource) *Chat

func CreatePublicChat

func CreatePublicChat(name string, timesource common.TimeSource) *Chat

func CreateTimelineChat added in v0.79.0

func CreateTimelineChat(timesource common.TimeSource) *Chat

func OneToOneFromPublicKey

func OneToOneFromPublicKey(pk *ecdsa.PublicKey, timesource common.TimeSource) *Chat

func (*Chat) CommunityChat added in v0.74.2

func (c *Chat) CommunityChat() bool

func (*Chat) CommunityChatID added in v0.67.0

func (c *Chat) CommunityChatID() string
func (c *Chat) DeepLink() string

func (*Chat) HasMember added in v0.52.4

func (c *Chat) HasMember(memberID string) bool

func (*Chat) IsActivePersonalChat added in v0.140.2

func (c *Chat) IsActivePersonalChat() bool

func (*Chat) MembersAsPublicKeys

func (c *Chat) MembersAsPublicKeys() ([]*ecdsa.PublicKey, error)

func (*Chat) NextClockAndTimestamp

func (c *Chat) NextClockAndTimestamp(timesource common.TimeSource) (uint64, uint64)

NextClockAndTimestamp returns the next clock value and the current timestamp

func (*Chat) OneToOne

func (c *Chat) OneToOne() bool

func (*Chat) PrivateGroupChat added in v0.74.2

func (c *Chat) PrivateGroupChat() bool

func (*Chat) ProfileUpdates added in v0.62.14

func (c *Chat) ProfileUpdates() bool

func (*Chat) Public

func (c *Chat) Public() bool

func (*Chat) PublicKey

func (c *Chat) PublicKey() (*ecdsa.PublicKey, error)

func (*Chat) RemoveMember added in v0.101.0

func (c *Chat) RemoveMember(memberID string)

func (*Chat) Timeline added in v0.63.4

func (c *Chat) Timeline() bool

func (*Chat) UpdateFirstMessageTimestamp added in v0.109.1

func (c *Chat) UpdateFirstMessageTimestamp(timestamp uint32) bool

func (*Chat) UpdateFromMessage

func (c *Chat) UpdateFromMessage(message *common.Message, timesource common.TimeSource) error

func (*Chat) Validate

func (c *Chat) Validate() error

type ChatMember

type ChatMember struct {
	// ID is the hex encoded public key of the member
	ID string `json:"id"`
	// Admin indicates if the member is an admin of the group chat
	Admin bool `json:"admin"`
}

ChatMember represents a member who participates in a group chat

func (ChatMember) PublicKey

func (c ChatMember) PublicKey() (*ecdsa.PublicKey, error)

type ChatMembershipUpdate

type ChatMembershipUpdate struct {
	// Unique identifier for the event
	ID string `json:"id"`
	// Type indicates the kind of event
	Type protobuf.MembershipUpdateEvent_EventType `json:"type"`
	// Name represents the name in the event of changing name events
	Name string `json:"name,omitempty"`
	// Clock value of the event
	ClockValue uint64 `json:"clockValue"`
	// Signature of the event
	Signature string `json:"signature"`
	// Hex encoded public key of the creator of the event
	From string `json:"from"`
	// Target of the event for single-target events
	Member string `json:"member,omitempty"`
	// Target of the event for multi-target events
	Members []string `json:"members,omitempty"`
}

ChatMembershipUpdate represent an event on membership of the chat

type ChatMentionContext added in v0.143.1

type ChatMentionContext struct {
	ChatID             string
	InputSegments      []InputSegment
	MentionSuggestions map[string]*MentionableUser
	MentionState       *MentionState
	PreviousText       string // user input text before the last change
	NewText            string
}

func NewChatMentionContext added in v0.143.1

func NewChatMentionContext(chatID string) *ChatMentionContext

type ChatPreview added in v0.87.1

type ChatPreview struct {
	// ID is the id of the chat, for public chats it is the name e.g. status, for one-to-one
	// is the hex encoded public key and for group chats is a random uuid appended with
	// the hex encoded pk of the creator of the chat
	ID          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	Color       string `json:"color"`
	Emoji       string `json:"emoji"`
	// Active indicates whether the chat has been soft deleted
	Active bool `json:"active"`

	ChatType ChatType `json:"chatType"`

	// Timestamp indicates the last time this chat has received/sent a message
	Timestamp int64 `json:"timestamp"`
	// LastClockValue indicates the last clock value to be used when sending messages
	LastClockValue uint64 `json:"lastClockValue"`
	// DeletedAtClockValue indicates the clock value at time of deletion, messages
	// with lower clock value of this should be discarded
	DeletedAtClockValue uint64 `json:"deletedAtClockValue"`

	// Denormalized fields
	UnviewedMessagesCount uint `json:"unviewedMessagesCount"`
	UnviewedMentionsCount uint `json:"unviewedMentionsCount"`

	// Generated username name of the chat for one-to-ones
	Alias string `json:"alias,omitempty"`
	// Identicon generated from public key
	Identicon string `json:"identicon"`

	// Muted is used to check whether we want to receive
	// push notifications for this chat
	Muted bool `json:"muted,omitempty"`

	// Time in which chat will be  ummuted
	MuteTill time.Time `json:"muteTill,omitempty"`

	// Public key of user profile
	Profile string `json:"profile,omitempty"`

	// CommunityID is the id of the community it belongs to
	CommunityID string `json:"communityId,omitempty"`

	// CategoryID is the id of the community category this chat belongs to.
	CategoryID string `json:"categoryId,omitempty"`

	// Joined is a timestamp that indicates when the chat was joined
	Joined int64 `json:"joined,omitempty"`

	// SyncedTo is the time up until it has synced with a mailserver
	SyncedTo uint32 `json:"syncedTo,omitempty"`

	// SyncedFrom is the time from when it was synced with a mailserver
	SyncedFrom uint32 `json:"syncedFrom,omitempty"`

	// ParsedText is the parsed markdown for displaying
	ParsedText json.RawMessage `json:"parsedText,omitempty"`

	Text string `json:"text,omitempty"`

	ContentType protobuf.ChatMessage_ContentType `json:"contentType,omitempty"`

	// Highlight is used for highlight chats
	Highlight bool `json:"highlight,omitempty"`

	// Used for display invited community's name in the last message
	ContentCommunityID string `json:"contentCommunityId,omitempty"`

	// Members array to represent how many there are for chats preview of group chats
	Members []ChatMember `json:"members"`

	OutgoingStatus   string `json:"outgoingStatus,omitempty"`
	ResponseTo       string `json:"responseTo"`
	AlbumImagesCount uint32 `json:"albumImagesCount,omitempty"`
	From             string `json:"from"`
	Deleted          bool   `json:"deleted"`
	DeletedForMe     bool   `json:"deletedForMe"`
}

type ChatType

type ChatType int
const (
	ChatTypeOneToOne ChatType = iota + 1
	ChatTypePublic
	ChatTypePrivateGroupChat
	ChatTypeProfile
	ChatTypeTimeline
	ChatTypeCommunityChat
)

type ClearedHistory added in v0.94.3

type ClearedHistory struct {
	ChatID    string `json:"chatId"`
	ClearedAt uint64 `json:"clearedAt"`
}

type CollapsedCommunityCategory added in v0.138.4

type CollapsedCommunityCategory struct {
	CommunityID string `json:"communityId"`
	CategoryID  string `json:"categoryId"`
	Collapsed   bool   `json:"collapsed"`
}

type ConnectedPeer added in v0.96.0

type ConnectedPeer struct {
	UniqueID string
}

type Contact

type Contact struct {
	// ID of the contact. It's a hex-encoded public key (prefixed with 0x).
	ID string `json:"id"`
	// Ethereum address of the contact
	Address string `json:"address,omitempty"`
	// ENS name of contact
	EnsName string `json:"name,omitempty"`
	// EnsVerified whether we verified the name of the contact
	ENSVerified bool `json:"ensVerified"`
	// Generated username name of the contact
	Alias string `json:"alias,omitempty"`
	// Identicon generated from public key
	Identicon string `json:"identicon"`
	// LastUpdated is the last time we received an update from the contact
	// updates should be discarded if last updated is less than the one stored
	LastUpdated uint64 `json:"lastUpdated"`

	// LastUpdatedLocally is the last time we updated the contact locally
	LastUpdatedLocally uint64 `json:"lastUpdatedLocally"`

	LocalNickname string `json:"localNickname,omitempty"`

	// Display name of the contact
	DisplayName string `json:"displayName"`

	// Bio - description of the contact (tell us about yourself)
	Bio string `json:"bio"`

	SocialLinks identity.SocialLinks `json:"socialLinks"`

	Images map[string]images.IdentityImage `json:"images"`

	Blocked bool `json:"blocked"`

	// ContactRequestRemoteState is the state of the contact request
	// on the contact's end
	ContactRequestRemoteState ContactRequestState `json:"contactRequestRemoteState"`
	// ContactRequestRemoteClock is the clock for incoming contact requests
	ContactRequestRemoteClock uint64 `json:"contactRequestRemoteClock"`

	// ContactRequestLocalState is the state of the contact request
	// on our end
	ContactRequestLocalState ContactRequestState `json:"contactRequestLocalState"`
	// ContactRequestLocalClock is the clock for outgoing contact requests
	ContactRequestLocalClock uint64 `json:"contactRequestLocalClock"`

	IsSyncing bool
	Removed   bool

	VerificationStatus VerificationStatus       `json:"verificationStatus"`
	TrustStatus        verification.TrustStatus `json:"trustStatus"`
}

Contact has information about a "Contact"

func BuildContactFromPublicKey added in v0.79.0

func BuildContactFromPublicKey(publicKey *ecdsa.PublicKey) (*Contact, error)

func (*Contact) AcceptContactRequest added in v0.100.0

func (c *Contact) AcceptContactRequest(clock uint64) ContactRequestProcessingResponse

func (*Contact) Block added in v0.88.0

func (c *Contact) Block(clock uint64)

func (*Contact) BlockDesktop added in v0.98.3

func (c *Contact) BlockDesktop()

func (*Contact) CanonicalImage added in v0.74.2

func (c *Contact) CanonicalImage(profilePicturesVisibility settings.ProfilePicturesVisibilityType) string

func (*Contact) ContactRequestAccepted added in v0.100.0

func (c *Contact) ContactRequestAccepted(clock uint64) ContactRequestProcessingResponse

func (*Contact) ContactRequestPropagatedState added in v0.130.0

func (c *Contact) ContactRequestPropagatedState() *protobuf.ContactRequestPropagatedState

func (*Contact) ContactRequestPropagatedStateReceived added in v0.130.0

func (c *Contact) ContactRequestPropagatedStateReceived(state *protobuf.ContactRequestPropagatedState) ContactRequestProcessingResponse

ContactRequestPropagatedStateReceived handles the propagation of state from the other end.

func (*Contact) ContactRequestReceived added in v0.100.0

func (c *Contact) ContactRequestReceived(clock uint64) ContactRequestProcessingResponse

func (*Contact) ContactRequestRetracted added in v0.100.0

func (c *Contact) ContactRequestRetracted(clock uint64, syncing bool) ContactRequestProcessingResponse

func (*Contact) ContactRequestSent added in v0.100.0

func (c *Contact) ContactRequestSent(clock uint64) ContactRequestProcessingResponse

func (*Contact) DismissContactRequest added in v0.100.0

func (c *Contact) DismissContactRequest(clock uint64) ContactRequestProcessingResponse

func (Contact) IsTrusted added in v0.102.6

func (c Contact) IsTrusted() bool

func (Contact) IsUntrustworthy added in v0.102.6

func (c Contact) IsUntrustworthy() bool

func (Contact) IsUnverified added in v0.102.6

func (c Contact) IsUnverified() bool

func (Contact) IsVerified added in v0.102.6

func (c Contact) IsVerified() bool

func (Contact) IsVerifying added in v0.102.6

func (c Contact) IsVerifying() bool

func (*Contact) MarshalJSON added in v0.125.4

func (c *Contact) MarshalJSON() ([]byte, error)

func (*Contact) PrimaryName added in v0.133.2

func (c *Contact) PrimaryName() string

func (*Contact) ProcessSyncContactRequestState added in v0.135.2

func (c *Contact) ProcessSyncContactRequestState(remoteState ContactRequestState, remoteClock uint64, localState ContactRequestState, localClock uint64)

func (Contact) PublicKey

func (c Contact) PublicKey() (*ecdsa.PublicKey, error)

func (*Contact) RetractContactRequest added in v0.100.0

func (c *Contact) RetractContactRequest(clock uint64) ContactRequestProcessingResponse

func (*Contact) SecondaryName added in v0.133.2

func (c *Contact) SecondaryName() string

func (*Contact) Unblock added in v0.88.0

func (c *Contact) Unblock(clock uint64)

type ContactDeviceInfo

type ContactDeviceInfo struct {
	// The installation id of the device
	InstallationID string `json:"id"`
	// Timestamp represents the last time we received this info
	Timestamp int64 `json:"timestamp"`
	// FCMToken is to be used for push notifications
	FCMToken string `json:"fcmToken"`
}

ContactDeviceInfo is a struct containing information about a particular device owned by a contact

type ContactRequestProcessingResponse added in v0.126.0

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

type ContactRequestState added in v0.100.0

type ContactRequestState int
const (
	ContactRequestStateNone ContactRequestState = iota
	ContactRequestStateMutual
	ContactRequestStateSent
	// Received is a confusing state, we should use
	// sent for both, since they are now stored in different
	// states
	ContactRequestStateReceived
	ContactRequestStateDismissed
)

type CurrentMessageState

type CurrentMessageState struct {
	// Message is the protobuf message received
	Message protobuf.ChatMessage
	// MessageID is the ID of the message
	MessageID string
	// WhisperTimestamp is the whisper timestamp of the message
	WhisperTimestamp uint64
	// Contact is the contact associated with the author of the message
	Contact *Contact
	// PublicKey is the public key of the author of the message
	PublicKey *ecdsa.PublicKey
}

type DeleteMessage added in v0.83.2

type DeleteMessage struct {
	protobuf.DeleteMessage

	// ID is the ID of the message that has been edited
	ID string `json:"id,omitempty"`

	// From is a public key of the author of the edit reaction.
	From string `json:"from,omitempty"`

	// SigPubKey is the ecdsa encoded public key of the edit author
	SigPubKey *ecdsa.PublicKey `json:"-"`
}

DeleteMessage represents a delete of a message from a user in the application layer, used for persistence, querying and signaling

func (DeleteMessage) GetProtobuf added in v0.83.2

func (e DeleteMessage) GetProtobuf() proto.Message

GetProtoBuf returns the struct's embedded protobuf struct this function is required to implement the ChatEntity interface

func (DeleteMessage) GetSigPubKey added in v0.83.2

func (e DeleteMessage) GetSigPubKey() *ecdsa.PublicKey

GetSigPubKey returns an ecdsa encoded public key this function is required to implement the ChatEntity interface

func (*DeleteMessage) SetMessageType added in v0.83.2

func (e *DeleteMessage) SetMessageType(messageType protobuf.MessageType)

SetMessageType a setter for the MessageType field this function is required to implement the ChatEntity interface

func (DeleteMessage) WrapGroupMessage added in v0.83.2

func (e DeleteMessage) WrapGroupMessage() bool

WrapGroupMessage indicates whether we should wrap this in membership information

type EditMessage added in v0.80.3

type EditMessage struct {
	protobuf.EditMessage

	// ID is the ID of the message that has been edited
	ID string `json:"id,omitempty"`

	// From is a public key of the author of the edit reaction.
	From string `json:"from,omitempty"`

	// SigPubKey is the ecdsa encoded public key of the edit author
	SigPubKey *ecdsa.PublicKey `json:"-"`

	// LocalChatID is the chatID of the local chat (one-to-one are not symmetric)
	LocalChatID string `json:"localChatId"`
}

EditMessage represents an edit of a message from a user in the application layer, used for persistence, querying and signaling

func (EditMessage) GetProtobuf added in v0.80.3

func (e EditMessage) GetProtobuf() proto.Message

GetProtoBuf returns the struct's embedded protobuf struct this function is required to implement the ChatEntity interface

func (EditMessage) GetSigPubKey added in v0.80.3

func (e EditMessage) GetSigPubKey() *ecdsa.PublicKey

GetSigPubKey returns an ecdsa encoded public key this function is required to implement the ChatEntity interface

func (*EditMessage) SetMessageType added in v0.80.3

func (e *EditMessage) SetMessageType(messageType protobuf.MessageType)

SetMessageType a setter for the MessageType field this function is required to implement the ChatEntity interface

func (EditMessage) WrapGroupMessage added in v0.80.3

func (e EditMessage) WrapGroupMessage() bool

WrapGroupMessage indicates whether we should wrap this in membership information

type EmojiReaction added in v0.56.4

type EmojiReaction struct {
	protobuf.EmojiReaction

	// From is a public key of the author of the emoji reaction.
	From string `json:"from,omitempty"`

	// SigPubKey is the ecdsa encoded public key of the emoji reaction author
	SigPubKey *ecdsa.PublicKey `json:"-"`

	// LocalChatID is the chatID of the local chat (one-to-one are not symmetric)
	LocalChatID string `json:"localChatId"`
}

EmojiReaction represents an emoji reaction from a user in the application layer, used for persistence, querying and signaling

func (EmojiReaction) GetProtobuf added in v0.56.4

func (e EmojiReaction) GetProtobuf() proto.Message

GetProtoBuf returns the struct's embedded protobuf struct this function is required to implement the ChatEntity interface

func (EmojiReaction) GetSigPubKey added in v0.56.4

func (e EmojiReaction) GetSigPubKey() *ecdsa.PublicKey

GetSigPubKey returns an ecdsa encoded public key this function is required to implement the ChatEntity interface

func (EmojiReaction) ID added in v0.56.4

func (e EmojiReaction) ID() string

ID is the Keccak256() contatenation of From-MessageID-EmojiType

func (EmojiReaction) MarshalJSON added in v0.56.4

func (e EmojiReaction) MarshalJSON() ([]byte, error)

func (*EmojiReaction) SetMessageType added in v0.56.4

func (e *EmojiReaction) SetMessageType(messageType protobuf.MessageType)

SetMessageType a setter for the MessageType field this function is required to implement the ChatEntity interface

func (EmojiReaction) WrapGroupMessage added in v0.69.0

func (e EmojiReaction) WrapGroupMessage() bool

WrapGroupMessage indicates whether we should wrap this in membership information

type EnvelopeEventsInterceptor added in v0.64.7

type EnvelopeEventsInterceptor struct {
	EnvelopeEventsHandler transport.EnvelopeEventsHandler
	Messenger             *Messenger
}

func (EnvelopeEventsInterceptor) EnvelopeExpired added in v0.64.7

func (interceptor EnvelopeEventsInterceptor) EnvelopeExpired(identifiers [][]byte, err error)

EnvelopeExpired triggered when envelope is expired but wasn't delivered to any peer.

func (EnvelopeEventsInterceptor) EnvelopeSent added in v0.64.7

func (interceptor EnvelopeEventsInterceptor) EnvelopeSent(identifiers [][]byte)

EnvelopeSent triggered when envelope delivered at least to 1 peer.

func (EnvelopeEventsInterceptor) MailServerRequestCompleted added in v0.64.7

func (interceptor EnvelopeEventsInterceptor) MailServerRequestCompleted(requestID types.Hash, lastEnvelopeHash types.Hash, cursor []byte, err error)

MailServerRequestCompleted triggered when the mailserver sends a message to notify that the request has been completed

func (EnvelopeEventsInterceptor) MailServerRequestExpired added in v0.64.7

func (interceptor EnvelopeEventsInterceptor) MailServerRequestExpired(hash types.Hash)

MailServerRequestExpired triggered when the mailserver request expires

type EthClient

type EthClient interface {
	TransactionByHash(context.Context, types.Hash) (coretypes.Message, coretypes.TransactionStatus, error)
}

type GroupChatInvitation added in v0.60.0

type GroupChatInvitation struct {
	protobuf.GroupChatInvitation

	// From is a public key of the author of the invitation request.
	From string `json:"from,omitempty"`

	// SigPubKey is the ecdsa encoded public key of the invitation author
	SigPubKey *ecdsa.PublicKey `json:"-"`
}

Invitation represents a group chat invitation request from a user in the application layer, used for persistence, querying and signaling

func (GroupChatInvitation) GetProtobuf added in v0.60.0

func (g GroupChatInvitation) GetProtobuf() proto.Message

GetProtoBuf returns the struct's embedded protobuf struct this function is required to implement the ChatEntity interface

func (GroupChatInvitation) GetSigPubKey added in v0.60.0

func (g GroupChatInvitation) GetSigPubKey() *ecdsa.PublicKey

GetSigPubKey returns an ecdsa encoded public key this function is required to implement the ChatEntity interface

func (GroupChatInvitation) ID added in v0.60.0

func (g GroupChatInvitation) ID() string

ID is the Keccak256() contatenation of From-ChatId

func (GroupChatInvitation) MarshalJSON added in v0.60.0

func (g GroupChatInvitation) MarshalJSON() ([]byte, error)

type HasClocks added in v0.111.5

type HasClocks interface {
	GetClock(i int) uint64
}

type InputSegment added in v0.143.1

type InputSegment struct {
	Type  SegmentType `json:"type"`
	Value string      `json:"value"`
}

type MailserverBatch added in v0.79.0

type MailserverBatch struct {
	From    uint32
	To      uint32
	Cursor  string
	Topics  []types.TopicType
	ChatIDs []string
}

type MentionManager added in v0.143.1

type MentionManager struct {
	*Messenger
	// contains filtered or unexported fields
}

func NewMentionManager added in v0.143.1

func NewMentionManager(m *Messenger) *MentionManager

func (*MentionManager) ClearMentions added in v0.143.1

func (m *MentionManager) ClearMentions(chatID string)

func (*MentionManager) OnChangeText added in v0.148.3

func (m *MentionManager) OnChangeText(chatID, fullText string) (*ChatMentionContext, error)

func (*MentionManager) ReplaceWithPublicKey added in v0.151.5

func (m *MentionManager) ReplaceWithPublicKey(chatID, text string) (string, error)

func (*MentionManager) SelectMention added in v0.151.5

func (m *MentionManager) SelectMention(chatID, text, primaryName, publicKey string) (*ChatMentionContext, error)

func (*MentionManager) ToInputField added in v0.143.1

func (m *MentionManager) ToInputField(chatID, text string) (*ChatMentionContext, error)

type MentionState added in v0.143.1

type MentionState struct {
	AtSignIdx    int
	AtIdxs       []*AtIndexEntry
	MentionEnd   int
	PreviousText string
	NewText      string
	Start        int
	End          int
	// contains filtered or unexported fields
}

func (*MentionState) String added in v0.143.1

func (ms *MentionState) String() string

type MentionableUser added in v0.143.1

type MentionableUser struct {
	*Contact

	Key          string // a unique identifier of a mentionable user
	Match        string
	SearchedText string
	// contains filtered or unexported fields
}

func MatchMention added in v0.143.1

func MatchMention(text string, users map[string]*MentionableUser, mentionKeyIdx int) *MentionableUser

func (*MentionableUser) GetDisplayName added in v0.143.1

func (c *MentionableUser) GetDisplayName() string

func (*MentionableUser) MarshalJSON added in v0.143.1

func (c *MentionableUser) MarshalJSON() ([]byte, error)

type MessageDeliveredHandler added in v0.71.5

type MessageDeliveredHandler func(string, string)

type Messenger

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

Messenger is a entity managing chats and messages. It acts as a bridge between the application and encryption layers. It needs to expose an interface to manage installations because installations are managed by the user. Similarly, it needs to expose an interface to manage mailservers because they can also be managed by the user.

func NewMessenger

func NewMessenger(
	nodeName string,
	identity *ecdsa.PrivateKey,
	node types.Node,
	installationID string,
	peerStore *mailservers.PeerStore,
	accountsManager account.Manager,
	opts ...Option,
) (*Messenger, error)

func (*Messenger) AcceptActivityCenterNotifications added in v0.76.0

func (m *Messenger) AcceptActivityCenterNotifications(ctx context.Context, ids []types.HexBytes, updatedAt uint64, sync bool) (*MessengerResponse, error)

func (*Messenger) AcceptContactRequest added in v0.100.0

func (m *Messenger) AcceptContactRequest(ctx context.Context, request *requests.AcceptContactRequest) (*MessengerResponse, error)

func (*Messenger) AcceptContactVerificationRequest added in v0.102.6

func (m *Messenger) AcceptContactVerificationRequest(ctx context.Context, id string, response string) (*MessengerResponse, error)

func (*Messenger) AcceptLatestContactRequestForContact added in v0.102.2

func (m *Messenger) AcceptLatestContactRequestForContact(ctx context.Context, request *requests.AcceptLatestContactRequestForContact) (*MessengerResponse, error)

func (*Messenger) AcceptRequestAddressForTransaction

func (m *Messenger) AcceptRequestAddressForTransaction(ctx context.Context, messageID, address string) (*MessengerResponse, error)

func (*Messenger) AcceptRequestToJoinCommunity added in v0.72.0

func (m *Messenger) AcceptRequestToJoinCommunity(request *requests.AcceptRequestToJoinCommunity) (*MessengerResponse, error)

func (*Messenger) AcceptRequestTransaction

func (m *Messenger) AcceptRequestTransaction(ctx context.Context, transactionHash, messageID string, signature []byte) (*MessengerResponse, error)

func (*Messenger) AcceptedRequestsToJoinForCommunity added in v0.158.0

func (m *Messenger) AcceptedRequestsToJoinForCommunity(id types.HexBytes) ([]*communities.RequestToJoin, error)

func (*Messenger) ActiveChats added in v0.76.0

func (m *Messenger) ActiveChats() []*Chat

func (*Messenger) ActivityCenterNotification added in v0.125.4

func (m *Messenger) ActivityCenterNotification(id types.HexBytes) (*ActivityCenterNotification, error)

func (*Messenger) ActivityCenterNotifications added in v0.76.0

func (m *Messenger) ActivityCenterNotifications(request ActivityCenterNotificationsRequest) (*ActivityCenterPaginationResponse, error)

func (*Messenger) ActivityCenterNotificationsCount added in v0.136.0

func (m *Messenger) ActivityCenterNotificationsCount(request ActivityCenterCountRequest) (*ActivityCenterCountResponse, error)

func (*Messenger) AddAdminsToGroupChat

func (m *Messenger) AddAdminsToGroupChat(ctx context.Context, chatID string, members []string) (*MessengerResponse, error)

func (*Messenger) AddBookmark added in v0.102.2

func (m *Messenger) AddBookmark(ctx context.Context, bookmark browsers.Bookmark) error

func (*Messenger) AddBrowser added in v0.106.1

func (m *Messenger) AddBrowser(ctx context.Context, browser browsers.Browser) error

func (*Messenger) AddCommunityToken added in v0.133.2

func (m *Messenger) AddCommunityToken(token *communities.CommunityToken) (*communities.CommunityToken, error)

func (*Messenger) AddContact added in v0.68.4

func (m *Messenger) AddContact(ctx context.Context, request *requests.AddContact) (*MessengerResponse, error)

func (*Messenger) AddKeycardOrAddAccountsIfKeycardIsAdded added in v0.151.1

func (m *Messenger) AddKeycardOrAddAccountsIfKeycardIsAdded(ctx context.Context, kp *accounts.Keycard) (added bool, err error)

func (*Messenger) AddMailserver

func (m *Messenger) AddMailserver(enode string) error

NOT IMPLEMENTED

func (*Messenger) AddMembersToGroupChat

func (m *Messenger) AddMembersToGroupChat(ctx context.Context, chatID string, members []string) (*MessengerResponse, error)
func (m *Messenger) AddOrReplaceSocialLinks(socialLinks identity.SocialLinks) error

func (*Messenger) AddPushNotificationsServer added in v0.56.1

func (m *Messenger) AddPushNotificationsServer(ctx context.Context, publicKey *ecdsa.PublicKey, serverType pushnotificationclient.ServerType) error

AddPushNotificationsServer adds a push notification server

func (*Messenger) AddRelayPeer added in v0.88.4

func (m *Messenger) AddRelayPeer(address string) (peer.ID, error)

func (*Messenger) AddRoleToMember added in v0.115.5

func (m *Messenger) AddRoleToMember(request *requests.AddRoleToMember) (*MessengerResponse, error)

func (*Messenger) AddStorePeer added in v0.88.4

func (m *Messenger) AddStorePeer(address string) (peer.ID, error)

func (*Messenger) AddWalletConnectSession added in v0.105.1

func (m *Messenger) AddWalletConnectSession(request *requests.AddWalletConnectSession) error

func (*Messenger) AddedContacts added in v0.90.0

func (m *Messenger) AddedContacts() []*Contact

func (*Messenger) AllMessageByChatIDWhichMatchTerm added in v0.83.8

func (m *Messenger) AllMessageByChatIDWhichMatchTerm(chatID string, searchTerm string, caseSensitive bool) ([]*common.Message, error)

func (*Messenger) AllMessagesFromChatsAndCommunitiesWhichMatchTerm added in v0.83.14

func (m *Messenger) AllMessagesFromChatsAndCommunitiesWhichMatchTerm(communityIds []string, chatIds []string, searchTerm string, caseSensitive bool) ([]*common.Message, error)

func (*Messenger) AutoMessageEnabled added in v0.91.12

func (m *Messenger) AutoMessageEnabled() (bool, error)

func (*Messenger) BackupData added in v0.90.0

func (m *Messenger) BackupData(ctx context.Context) (uint64, error)

func (*Messenger) BanUserFromCommunity added in v0.73.9

func (m *Messenger) BanUserFromCommunity(request *requests.BanUserFromCommunity) (*MessengerResponse, error)

func (*Messenger) BlockContact

func (m *Messenger) BlockContact(contactID string) (*MessengerResponse, error)

func (*Messenger) BlockContactDesktop added in v0.98.3

func (m *Messenger) BlockContactDesktop(contactID string) (*MessengerResponse, error)

The same function as the one above.

func (*Messenger) BlockedContacts added in v0.90.0

func (m *Messenger) BlockedContacts() []*Contact

func (*Messenger) BloomFilter added in v0.85.0

func (m *Messenger) BloomFilter() []byte

func (*Messenger) BuildContact added in v0.125.4

func (m *Messenger) BuildContact(request *requests.BuildContact) (*Contact, error)

func (*Messenger) CanDeleteMessageForEveryoneInCommunity added in v0.137.2

func (m *Messenger) CanDeleteMessageForEveryoneInCommunity(communityID string, publicKey *ecdsa.PublicKey) bool

func (*Messenger) CanDeleteMessageForEveryoneInPrivateGroupChat added in v0.137.2

func (m *Messenger) CanDeleteMessageForEveryoneInPrivateGroupChat(chat *Chat, publicKey *ecdsa.PublicKey) bool

func (*Messenger) CancelRequestToJoinCommunity added in v0.114.1

func (m *Messenger) CancelRequestToJoinCommunity(request *requests.CancelRequestToJoinCommunity) (*MessengerResponse, error)

func (*Messenger) CancelVerificationRequest added in v0.102.6

func (m *Messenger) CancelVerificationRequest(ctx context.Context, id string) (*MessengerResponse, error)

func (*Messenger) CanceledRequestsToJoinForCommunity added in v0.114.1

func (m *Messenger) CanceledRequestsToJoinForCommunity(id types.HexBytes) ([]*communities.RequestToJoin, error)

func (*Messenger) ChangeGroupChatName added in v0.52.1

func (m *Messenger) ChangeGroupChatName(ctx context.Context, chatID string, name string) (*MessengerResponse, error)

func (*Messenger) Chat added in v0.87.1

func (m *Messenger) Chat(chatID string) *Chat

func (*Messenger) Chats

func (m *Messenger) Chats() []*Chat

func (*Messenger) ChatsPreview added in v0.87.1

func (m *Messenger) ChatsPreview() []*ChatPreview

func (*Messenger) CheckAllCommunityChannelsPermissions added in v0.159.2

func (*Messenger) CheckAndDeletePendingRequestToJoinCommunity added in v0.146.4

func (m *Messenger) CheckAndDeletePendingRequestToJoinCommunity(sendResponse bool) (*MessengerResponse, error)

func (*Messenger) CheckCommunitiesToUnmute added in v0.159.2

func (m *Messenger) CheckCommunitiesToUnmute(response *MessengerResponse) error

func (*Messenger) CheckCommunityChannelPermissions added in v0.159.2

func (m *Messenger) CheckCommunityChannelPermissions(request *requests.CheckCommunityChannelPermissions) (*communities.CheckChannelPermissionsResponse, error)

func (*Messenger) CheckPermissionsToJoinCommunity added in v0.151.13

func (m *Messenger) CheckPermissionsToJoinCommunity(request *requests.CheckPermissionToJoinCommunity) (*communities.CheckPermissionToJoinResponse, error)

func (*Messenger) ClearHistory added in v0.68.4

func (m *Messenger) ClearHistory(request *requests.ClearHistory) (*MessengerResponse, error)

func (*Messenger) CollapsedCommunityCategories added in v0.138.4

func (m *Messenger) CollapsedCommunityCategories() ([]CollapsedCommunityCategory, error)

func (*Messenger) Communities added in v0.67.0

func (m *Messenger) Communities() ([]*communities.Community, error)

func (*Messenger) ConfirmJoiningGroup

func (m *Messenger) ConfirmJoiningGroup(ctx context.Context, chatID string) (*MessengerResponse, error)

Kept only for backward compatibility (auto-join), explicit join has been removed

func (*Messenger) ConnectionChanged added in v0.79.0

func (m *Messenger) ConnectionChanged(state connection.State)

func (*Messenger) Contacts

func (m *Messenger) Contacts() []*Contact

func (*Messenger) CreateCommunity added in v0.67.0

func (m *Messenger) CreateCommunity(request *requests.CreateCommunity, createDefaultChannel bool) (*MessengerResponse, error)

func (*Messenger) CreateCommunityCategory added in v0.79.3

func (m *Messenger) CreateCommunityCategory(request *requests.CreateCommunityCategory) (*MessengerResponse, error)

func (*Messenger) CreateCommunityChat added in v0.67.0

func (m *Messenger) CreateCommunityChat(communityID types.HexBytes, c *protobuf.CommunityChat) (*MessengerResponse, error)

func (*Messenger) CreateCommunityTokenPermission added in v0.136.0

func (m *Messenger) CreateCommunityTokenPermission(request *requests.CreateCommunityTokenPermission) (*MessengerResponse, error)

func (*Messenger) CreateGroupChatFromInvitation added in v0.60.0

func (m *Messenger) CreateGroupChatFromInvitation(name string, chatID string, adminPK string) (*MessengerResponse, error)

func (*Messenger) CreateGroupChatWithMembers

func (m *Messenger) CreateGroupChatWithMembers(ctx context.Context, name string, members []string) (*MessengerResponse, error)

func (*Messenger) CreateOneToOneChat added in v0.72.0

func (m *Messenger) CreateOneToOneChat(request *requests.CreateOneToOneChat) (*MessengerResponse, error)

func (*Messenger) CreateProfileChat added in v0.79.0

func (m *Messenger) CreateProfileChat(request *requests.CreateProfileChat) (*MessengerResponse, error)

func (*Messenger) CreatePublicChat added in v0.79.0

func (m *Messenger) CreatePublicChat(request *requests.CreatePublicChat) (*MessengerResponse, error)

func (*Messenger) CuratedCommunities added in v0.100.1

func (m *Messenger) CuratedCommunities() (*communities.KnownCommunitiesResponse, error)

func (*Messenger) DeactivateChat added in v0.68.4

func (m *Messenger) DeactivateChat(request *requests.DeactivateChat) (*MessengerResponse, error)

func (*Messenger) DeclineAllPendingGroupInvitesFromUser added in v0.91.8

func (m *Messenger) DeclineAllPendingGroupInvitesFromUser(response *MessengerResponse, userPublicKey string) (*MessengerResponse, error)

Decline all pending group invites from a user

func (*Messenger) DeclineContactRequest added in v0.131.11

func (m *Messenger) DeclineContactRequest(ctx context.Context, request *requests.DeclineContactRequest) (*MessengerResponse, error)

func (*Messenger) DeclineContactVerificationRequest added in v0.102.6

func (m *Messenger) DeclineContactVerificationRequest(ctx context.Context, id string) (*MessengerResponse, error)

func (*Messenger) DeclineRequestAddressForTransaction

func (m *Messenger) DeclineRequestAddressForTransaction(ctx context.Context, messageID string) (*MessengerResponse, error)

func (*Messenger) DeclineRequestToJoinCommunity added in v0.72.0

func (m *Messenger) DeclineRequestToJoinCommunity(request *requests.DeclineRequestToJoinCommunity) (*MessengerResponse, error)

func (*Messenger) DeclineRequestTransaction

func (m *Messenger) DeclineRequestTransaction(ctx context.Context, messageID string) (*MessengerResponse, error)

func (*Messenger) DeclinedRequestsToJoinForCommunity added in v0.106.1

func (m *Messenger) DeclinedRequestsToJoinForCommunity(id types.HexBytes) ([]*communities.RequestToJoin, error)

func (*Messenger) DeleteAccount added in v0.102.6

func (m *Messenger) DeleteAccount(address types.Address) error

func (*Messenger) DeleteActivityCenterNotifications added in v0.132.3

func (m *Messenger) DeleteActivityCenterNotifications(ctx context.Context, ids []types.HexBytes, sync bool) error

func (*Messenger) DeleteBrowser added in v0.106.1

func (m *Messenger) DeleteBrowser(ctx context.Context, id string) error

func (*Messenger) DeleteChat

func (m *Messenger) DeleteChat(chatID string) error

func (*Messenger) DeleteCommunityCategory added in v0.79.3

func (m *Messenger) DeleteCommunityCategory(request *requests.DeleteCommunityCategory) (*MessengerResponse, error)

func (*Messenger) DeleteCommunityChat added in v0.83.8

func (m *Messenger) DeleteCommunityChat(communityID types.HexBytes, chatID string) (*MessengerResponse, error)

func (*Messenger) DeleteCommunityTokenPermission added in v0.136.0

func (m *Messenger) DeleteCommunityTokenPermission(request *requests.DeleteCommunityTokenPermission) (*MessengerResponse, error)

func (*Messenger) DeleteKeycard added in v0.133.2

func (m *Messenger) DeleteKeycard(ctx context.Context, kcUID string, clock uint64) error

func (*Messenger) DeleteMessage

func (m *Messenger) DeleteMessage(id string) error

func (*Messenger) DeleteMessageAndSend added in v0.83.2

func (m *Messenger) DeleteMessageAndSend(ctx context.Context, messageID string) (*MessengerResponse, error)

func (*Messenger) DeleteMessageForMeAndSync added in v0.111.5

func (m *Messenger) DeleteMessageForMeAndSync(ctx context.Context, chatID string, messageID string) (*MessengerResponse, error)

func (*Messenger) DeleteMessagesByChatID

func (m *Messenger) DeleteMessagesByChatID(id string) error

func (*Messenger) DeleteSavedAddress added in v0.111.5

func (m *Messenger) DeleteSavedAddress(ctx context.Context, address gethcommon.Address, ens string, isTest bool) error

func (*Messenger) DeleteSwitcherCard added in v0.117.3

func (m *Messenger) DeleteSwitcherCard(cardID string) error

func (*Messenger) DestroyWalletConnectSession added in v0.105.1

func (m *Messenger) DestroyWalletConnectSession(peerID string) error

func (*Messenger) DialPeer added in v0.88.4

func (m *Messenger) DialPeer(address string) error

func (*Messenger) DialPeerByID added in v0.88.4

func (m *Messenger) DialPeerByID(peerID string) error

func (*Messenger) DisableCommunityHistoryArchiveProtocol added in v0.98.1

func (m *Messenger) DisableCommunityHistoryArchiveProtocol() error

func (*Messenger) DisableInstallation

func (m *Messenger) DisableInstallation(id string) error

func (*Messenger) DisablePushNotificationsBlockMentions added in v0.61.0

func (m *Messenger) DisablePushNotificationsBlockMentions() error

DisablePushNotificationsBlockMentions is used to indicate that we want to received push notifications for mentions

func (*Messenger) DisablePushNotificationsFromContactsOnly added in v0.56.1

func (m *Messenger) DisablePushNotificationsFromContactsOnly() error

DisablePushNotificationsFromContactsOnly is used to indicate that we want to received push notifications from anyone

func (*Messenger) DisableSendingPushNotifications added in v0.56.1

func (m *Messenger) DisableSendingPushNotifications() error

DisableSendingPushNotifications signals the client not to send any push notification

func (*Messenger) DisconnectActiveMailserver added in v0.93.2

func (m *Messenger) DisconnectActiveMailserver()

func (*Messenger) DiscordImportMarkedAsCancelled added in v0.114.1

func (m *Messenger) DiscordImportMarkedAsCancelled(communityID string) bool

func (*Messenger) DismissActivityCenterNotifications added in v0.76.0

func (m *Messenger) DismissActivityCenterNotifications(ctx context.Context, ids []types.HexBytes, updatedAt uint64, sync bool) (*MessengerResponse, error)

func (*Messenger) DismissLatestContactRequestForContact added in v0.102.2

func (m *Messenger) DismissLatestContactRequestForContact(ctx context.Context, request *requests.DismissLatestContactRequestForContact) (*MessengerResponse, error)

func (*Messenger) DropPeer added in v0.88.4

func (m *Messenger) DropPeer(peerID string) error

func (*Messenger) ENSVerified added in v0.72.0

func (m *Messenger) ENSVerified(pubkey, ensName string) error

func (*Messenger) EditCommunity added in v0.79.0

func (m *Messenger) EditCommunity(request *requests.EditCommunity) (*MessengerResponse, error)

func (*Messenger) EditCommunityCategory added in v0.79.3

func (m *Messenger) EditCommunityCategory(request *requests.EditCommunityCategory) (*MessengerResponse, error)

func (*Messenger) EditCommunityChat added in v0.79.8

func (m *Messenger) EditCommunityChat(communityID types.HexBytes, chatID string, c *protobuf.CommunityChat) (*MessengerResponse, error)

func (*Messenger) EditCommunityTokenPermission added in v0.136.0

func (m *Messenger) EditCommunityTokenPermission(request *requests.EditCommunityTokenPermission) (*MessengerResponse, error)

func (*Messenger) EditGroupChat added in v0.105.1

func (m *Messenger) EditGroupChat(ctx context.Context, chatID string, name string, color string, image images.CroppedImage) (*MessengerResponse, error)

func (*Messenger) EditMessage added in v0.80.3

func (m *Messenger) EditMessage(ctx context.Context, request *requests.EditMessage) (*MessengerResponse, error)

func (*Messenger) EmitMailserverAvailable added in v0.98.1

func (m *Messenger) EmitMailserverAvailable()

func (*Messenger) EmojiReactionsByChatID added in v0.56.4

func (m *Messenger) EmojiReactionsByChatID(chatID string, cursor string, limit int) ([]*EmojiReaction, error)

func (*Messenger) EmojiReactionsByChatIDMessageID added in v0.89.20

func (m *Messenger) EmojiReactionsByChatIDMessageID(chatID string, messageID string) ([]*EmojiReaction, error)

func (*Messenger) EnableCommunityHistoryArchiveProtocol added in v0.98.1

func (m *Messenger) EnableCommunityHistoryArchiveProtocol() error

func (*Messenger) EnableInstallation

func (m *Messenger) EnableInstallation(id string) error

func (*Messenger) EnablePushNotificationsBlockMentions added in v0.61.0

func (m *Messenger) EnablePushNotificationsBlockMentions() error

EnablePushNotificationsBlockMentions is used to indicate that we dont want to received push notifications for mentions

func (*Messenger) EnablePushNotificationsFromContactsOnly added in v0.56.1

func (m *Messenger) EnablePushNotificationsFromContactsOnly() error

EnablePushNotificationsFromContactsOnly is used to indicate that we want to received push notifications only from contacts

func (*Messenger) EnableSendingPushNotifications added in v0.56.1

func (m *Messenger) EnableSendingPushNotifications() error

EnableSendingPushNotifications signals the client to send push notifications

func (*Messenger) ExportCommunity added in v0.67.0

func (m *Messenger) ExportCommunity(id types.HexBytes) (*ecdsa.PrivateKey, error)

func (*Messenger) ExtractDiscordChannelsAndCategories added in v0.105.1

func (m *Messenger) ExtractDiscordChannelsAndCategories(filesToImport []string) (*MessengerResponse, map[string]*discord.ImportError)

func (*Messenger) ExtractDiscordDataFromImportFiles added in v0.105.1

func (m *Messenger) ExtractDiscordDataFromImportFiles(filesToImport []string) (*discord.ExtractedData, map[string]*discord.ImportError)

func (*Messenger) FillGaps added in v0.79.0

func (m *Messenger) FillGaps(chatID string, messageIDs []string) error

func (*Messenger) FirstUnseenMessageID added in v0.117.1

func (m *Messenger) FirstUnseenMessageID(chatID string) (string, error)

func (*Messenger) GarbageCollectRemovedBookmarks added in v0.102.2

func (m *Messenger) GarbageCollectRemovedBookmarks() error

func (*Messenger) GetActivityCenterState added in v0.131.8

func (m *Messenger) GetActivityCenterState() (*ActivityCenterState, error)

func (*Messenger) GetAllCommunityTokens added in v0.148.4

func (m *Messenger) GetAllCommunityTokens() ([]*communities.CommunityToken, error)

func (*Messenger) GetBrowsers added in v0.106.1

func (m *Messenger) GetBrowsers(ctx context.Context) (browsers []*browsers.Browser, err error)

func (*Messenger) GetCommunitiesSettings added in v0.96.4

func (m *Messenger) GetCommunitiesSettings() ([]communities.CommunitySettings, error)

func (*Messenger) GetCommunityByID added in v0.94.12

func (m *Messenger) GetCommunityByID(communityID types.HexBytes) (*communities.Community, error)

func (*Messenger) GetCommunityCheckChannelPermissionResponses added in v0.159.7

func (m *Messenger) GetCommunityCheckChannelPermissionResponses(communityID types.HexBytes) (*communities.CheckAllChannelsPermissionsResponse, error)

func (*Messenger) GetCommunityTokens added in v0.133.2

func (m *Messenger) GetCommunityTokens(communityID string) ([]*communities.CommunityToken, error)

func (*Messenger) GetContactByID added in v0.44.2

func (m *Messenger) GetContactByID(pubKey string) *Contact

GetContactByID assumes pubKey includes 0x prefix

func (*Messenger) GetCurrentUserStatus added in v0.83.2

func (m *Messenger) GetCurrentUserStatus() (*UserStatus, error)

func (*Messenger) GetDeleteForMeMessages added in v0.151.4

func (m *Messenger) GetDeleteForMeMessages() ([]*protobuf.DeleteForMeMessage, error)

func (*Messenger) GetGroupChatInvitations added in v0.60.0

func (m *Messenger) GetGroupChatInvitations() ([]*GroupChatInvitation, error)

func (*Messenger) GetLatestVerificationRequestFrom added in v0.114.1

func (m *Messenger) GetLatestVerificationRequestFrom(contactID string) (*verification.Request, error)

func (*Messenger) GetMentionsManager added in v0.143.1

func (m *Messenger) GetMentionsManager() *MentionManager

func (*Messenger) GetPushNotificationsServers added in v0.59.0

func (m *Messenger) GetPushNotificationsServers() ([]*pushnotificationclient.PushNotificationServer, error)

GetPushNotificationsServers returns the servers used for push notifications

func (*Messenger) GetReceivedVerificationRequests added in v0.102.6

func (m *Messenger) GetReceivedVerificationRequests(ctx context.Context) ([]*verification.Request, error)
func (m *Messenger) GetSocialLinks() (identity.SocialLinks, error)

func (*Messenger) GetStats added in v0.83.8

func (m *Messenger) GetStats() types.StatsSummary

func (*Messenger) GetTrustStatus added in v0.102.6

func (m *Messenger) GetTrustStatus(contactID string) (verification.TrustStatus, error)

func (*Messenger) GetVerificationRequestSentTo added in v0.102.6

func (m *Messenger) GetVerificationRequestSentTo(ctx context.Context, contactID string) (*verification.Request, error)

func (*Messenger) GetWalletConnectSession added in v0.105.1

func (m *Messenger) GetWalletConnectSession() ([]WalletConnectSession, error)

func (*Messenger) HandleAcceptContactRequest added in v0.100.0

func (m *Messenger) HandleAcceptContactRequest(state *ReceivedMessageState, message protobuf.AcceptContactRequest, senderID string) error

func (*Messenger) HandleAcceptContactVerification added in v0.102.6

func (m *Messenger) HandleAcceptContactVerification(state *ReceivedMessageState, request protobuf.AcceptContactVerification) error

func (*Messenger) HandleAcceptRequestAddressForTransaction added in v0.80.3

func (m *Messenger) HandleAcceptRequestAddressForTransaction(messageState *ReceivedMessageState, command protobuf.AcceptRequestAddressForTransaction) error

func (*Messenger) HandleAnonymousMetricBatch added in v0.86.2

func (m *Messenger) HandleAnonymousMetricBatch(amb protobuf.AnonymousMetricBatch) error

func (*Messenger) HandleBackup added in v0.90.0

func (m *Messenger) HandleBackup(state *ReceivedMessageState, message protobuf.Backup) []error

func (*Messenger) HandleCancelContactVerification added in v0.117.1

func (m *Messenger) HandleCancelContactVerification(state *ReceivedMessageState, request protobuf.CancelContactVerification) error

func (*Messenger) HandleChatIdentity added in v0.80.3

func (m *Messenger) HandleChatIdentity(state *ReceivedMessageState, ci protobuf.ChatIdentity) error

HandleChatIdentity handles an incoming protobuf.ChatIdentity extracts contact information stored in the protobuf and adds it to the user's contact for update.

func (*Messenger) HandleChatMessage added in v0.80.3

func (m *Messenger) HandleChatMessage(state *ReceivedMessageState) error

func (*Messenger) HandleCommunityCancelRequestToJoin added in v0.114.1

func (m *Messenger) HandleCommunityCancelRequestToJoin(state *ReceivedMessageState, signer *ecdsa.PublicKey, cancelRequestToJoinProto protobuf.CommunityCancelRequestToJoin) error

func (*Messenger) HandleCommunityInvitation added in v0.80.3

func (m *Messenger) HandleCommunityInvitation(state *ReceivedMessageState, signer *ecdsa.PublicKey, invitation protobuf.CommunityInvitation, rawPayload []byte) error

HandleCommunityInvitation handles an community invitation

func (*Messenger) HandleCommunityRequestToJoin added in v0.80.3

func (m *Messenger) HandleCommunityRequestToJoin(state *ReceivedMessageState, signer *ecdsa.PublicKey, requestToJoinProto protobuf.CommunityRequestToJoin) error

HandleCommunityRequestToJoin handles an community request to join

func (*Messenger) HandleCommunityRequestToJoinResponse added in v0.103.2

func (m *Messenger) HandleCommunityRequestToJoinResponse(state *ReceivedMessageState, signer *ecdsa.PublicKey, requestToJoinResponseProto protobuf.CommunityRequestToJoinResponse) error

func (*Messenger) HandleCommunityRequestToLeave added in v0.106.3

func (m *Messenger) HandleCommunityRequestToLeave(state *ReceivedMessageState, signer *ecdsa.PublicKey, requestToLeaveProto protobuf.CommunityRequestToLeave) error

func (*Messenger) HandleContactUpdate added in v0.80.3

func (m *Messenger) HandleContactUpdate(state *ReceivedMessageState, message protobuf.ContactUpdate) error

func (*Messenger) HandleDeclineContactVerification added in v0.102.6

func (m *Messenger) HandleDeclineContactVerification(state *ReceivedMessageState, request protobuf.DeclineContactVerification) error

func (*Messenger) HandleDeclineRequestAddressForTransaction added in v0.80.3

func (m *Messenger) HandleDeclineRequestAddressForTransaction(messageState *ReceivedMessageState, command protobuf.DeclineRequestAddressForTransaction) error

func (*Messenger) HandleDeclineRequestTransaction added in v0.80.3

func (m *Messenger) HandleDeclineRequestTransaction(messageState *ReceivedMessageState, command protobuf.DeclineRequestTransaction) error

func (*Messenger) HandleDeleteForMeMessage added in v0.111.5

func (m *Messenger) HandleDeleteForMeMessage(state *ReceivedMessageState, deleteForMeMessage protobuf.DeleteForMeMessage) error

func (*Messenger) HandleDeleteMessage added in v0.83.2

func (m *Messenger) HandleDeleteMessage(state *ReceivedMessageState, deleteMessage DeleteMessage) error

func (*Messenger) HandleEditMessage added in v0.80.3

func (m *Messenger) HandleEditMessage(state *ReceivedMessageState, editMessage EditMessage) error

func (*Messenger) HandleEmojiReaction added in v0.80.3

func (m *Messenger) HandleEmojiReaction(state *ReceivedMessageState, pbEmojiR protobuf.EmojiReaction) error

func (*Messenger) HandleGroupChatInvitation added in v0.80.3

func (m *Messenger) HandleGroupChatInvitation(state *ReceivedMessageState, pbGHInvitations protobuf.GroupChatInvitation) error

func (*Messenger) HandleHistoryArchiveMagnetlinkMessage added in v0.100.0

func (m *Messenger) HandleHistoryArchiveMagnetlinkMessage(state *ReceivedMessageState, communityPubKey *ecdsa.PublicKey, magnetlink string, clock uint64) error

func (*Messenger) HandleImportedChatMessage added in v0.151.4

func (m *Messenger) HandleImportedChatMessage(state *ReceivedMessageState) error

func (*Messenger) HandleMembershipUpdate added in v0.80.3

func (m *Messenger) HandleMembershipUpdate(messageState *ReceivedMessageState, chat *Chat, rawMembershipUpdate protobuf.MembershipUpdateMessage, translations *systemMessageTranslationsMap) error

HandleMembershipUpdate updates a Chat instance according to the membership updates. It retrieves chat, if exists, and merges membership updates from the message. Finally, the Chat is updated with the new group events.

func (*Messenger) HandlePairInstallation added in v0.80.3

func (m *Messenger) HandlePairInstallation(state *ReceivedMessageState, message protobuf.PairInstallation) error

func (*Messenger) HandlePinMessage added in v0.80.3

func (m *Messenger) HandlePinMessage(state *ReceivedMessageState, message protobuf.PinMessage) error

func (*Messenger) HandleRequestAddressForTransaction added in v0.80.3

func (m *Messenger) HandleRequestAddressForTransaction(messageState *ReceivedMessageState, command protobuf.RequestAddressForTransaction) error

func (*Messenger) HandleRequestContactVerification added in v0.102.6

func (m *Messenger) HandleRequestContactVerification(state *ReceivedMessageState, request protobuf.RequestContactVerification) error

func (*Messenger) HandleRequestTransaction added in v0.80.3

func (m *Messenger) HandleRequestTransaction(messageState *ReceivedMessageState, command protobuf.RequestTransaction) error

func (*Messenger) HandleRetractContactRequest added in v0.100.0

func (m *Messenger) HandleRetractContactRequest(state *ReceivedMessageState, message protobuf.RetractContactRequest) error

func (*Messenger) HandleSendTransaction added in v0.80.3

func (m *Messenger) HandleSendTransaction(messageState *ReceivedMessageState, command protobuf.SendTransaction) error

func (*Messenger) HandleStatusUpdate added in v0.83.2

func (m *Messenger) HandleStatusUpdate(state *ReceivedMessageState, statusMessage protobuf.StatusUpdate) error

func (*Messenger) HandleSyncChatMessagesRead added in v0.89.18

func (m *Messenger) HandleSyncChatMessagesRead(state *ReceivedMessageState, message protobuf.SyncChatMessagesRead) error

func (*Messenger) HandleSyncChatRemoved added in v0.89.7

func (m *Messenger) HandleSyncChatRemoved(state *ReceivedMessageState, message protobuf.SyncChatRemoved) error

func (*Messenger) HandleSyncContactRequestDecision added in v0.106.2

func (m *Messenger) HandleSyncContactRequestDecision(state *ReceivedMessageState, message protobuf.SyncContactRequestDecision) error

func (*Messenger) HandleSyncInstallationContact added in v0.80.3

func (m *Messenger) HandleSyncInstallationContact(state *ReceivedMessageState, message protobuf.SyncInstallationContactV2) error

func (*Messenger) HandleSyncInstallationPublicChat added in v0.80.3

func (m *Messenger) HandleSyncInstallationPublicChat(state *ReceivedMessageState, message protobuf.SyncInstallationPublicChat) *Chat

func (*Messenger) HandleSyncKeypair added in v0.152.2

func (m *Messenger) HandleSyncKeypair(state *ReceivedMessageState, message protobuf.SyncKeypair) error

func (*Messenger) HandleSyncKeypairFull added in v0.152.2

func (m *Messenger) HandleSyncKeypairFull(state *ReceivedMessageState, message protobuf.SyncKeypairFull) error

func (*Messenger) HandleSyncProfilePictures added in v0.98.4

func (m *Messenger) HandleSyncProfilePictures(state *ReceivedMessageState, message protobuf.SyncProfilePictures) error

func (*Messenger) HandleSyncRawMessages added in v0.118.0

func (m *Messenger) HandleSyncRawMessages(rawMessages []*protobuf.RawMessage) error
func (m *Messenger) HandleSyncSocialLinks(state *ReceivedMessageState, message protobuf.SyncSocialLinks) error

func (*Messenger) HandleSyncWalletAccount added in v0.100.0

func (m *Messenger) HandleSyncWalletAccount(state *ReceivedMessageState, message protobuf.SyncAccount, syncedFrom string) error

func (*Messenger) HasPairedDevices added in v0.134.0

func (m *Messenger) HasPairedDevices() bool

func (*Messenger) HasUnseenActivityCenterNotifications added in v0.131.8

func (m *Messenger) HasUnseenActivityCenterNotifications() (bool, error)

func (*Messenger) IdentityPublicKey added in v0.94.12

func (m *Messenger) IdentityPublicKey() *ecdsa.PublicKey

func (*Messenger) IdentityPublicKeyCompressed added in v0.134.0

func (m *Messenger) IdentityPublicKeyCompressed() []byte

func (*Messenger) ImageServerURL added in v0.94.6

func (m *Messenger) ImageServerURL() string

func (*Messenger) ImportCommunity added in v0.67.0

func (m *Messenger) ImportCommunity(ctx context.Context, key *ecdsa.PrivateKey) (*MessengerResponse, error)

func (*Messenger) Init

func (m *Messenger) Init() error

Init analyzes chats and contacts in order to setup filters which are responsible for retrieving messages.

func (*Messenger) InitHistoryArchiveTasks added in v0.98.1

func (m *Messenger) InitHistoryArchiveTasks(communities []*communities.Community)

func (*Messenger) Installations

func (m *Messenger) Installations() []*multidevice.Installation

func (*Messenger) InviteUsersToCommunity added in v0.72.0

func (m *Messenger) InviteUsersToCommunity(request *requests.InviteUsersToCommunity) (*MessengerResponse, error)

func (*Messenger) Join

func (m *Messenger) Join(chat *Chat) ([]*transport.Filter, error)

func (*Messenger) JoinCommunity added in v0.67.0

func (m *Messenger) JoinCommunity(ctx context.Context, communityID types.HexBytes, forceJoin bool) (*MessengerResponse, error)

func (*Messenger) JoinedCommunities added in v0.67.0

func (m *Messenger) JoinedCommunities() ([]*communities.Community, error)

func (*Messenger) KeycardLocked added in v0.133.2

func (m *Messenger) KeycardLocked(ctx context.Context, kcUID string, clock uint64) error

func (*Messenger) KeycardUnlocked added in v0.133.2

func (m *Messenger) KeycardUnlocked(ctx context.Context, kcUID string, clock uint64) error

func (*Messenger) LeaveCommunity added in v0.67.0

func (m *Messenger) LeaveCommunity(communityID types.HexBytes) (*MessengerResponse, error)

func (*Messenger) LeaveGroupChat

func (m *Messenger) LeaveGroupChat(ctx context.Context, chatID string, remove bool) (*MessengerResponse, error)

func (*Messenger) ListenAddresses added in v0.115.4

func (m *Messenger) ListenAddresses() ([]string, error)

func (*Messenger) LoadFilters

func (m *Messenger) LoadFilters(filters []*transport.Filter) ([]*transport.Filter, error)

func (*Messenger) Mailservers

func (m *Messenger) Mailservers() ([]string, error)

NOT IMPLEMENTED

func (*Messenger) MarkActivityCenterNotificationsRead added in v0.80.2

func (m *Messenger) MarkActivityCenterNotificationsRead(ctx context.Context, ids []types.HexBytes, updatedAt uint64, sync bool) (*MessengerResponse, error)

func (*Messenger) MarkActivityCenterNotificationsUnread added in v0.91.0

func (m *Messenger) MarkActivityCenterNotificationsUnread(ids []types.HexBytes) (*MessengerResponse, error)

func (*Messenger) MarkAllActivityCenterNotificationsRead added in v0.76.0

func (m *Messenger) MarkAllActivityCenterNotificationsRead(ctx context.Context) (*MessengerResponse, error)

func (*Messenger) MarkAllRead added in v0.47.0

func (m *Messenger) MarkAllRead(chatID string) error

func (*Messenger) MarkAllReadInCommunity added in v0.87.0

func (m *Messenger) MarkAllReadInCommunity(communityID string) ([]string, error)

func (*Messenger) MarkAsSeenActivityCenterNotifications added in v0.131.8

func (m *Messenger) MarkAsSeenActivityCenterNotifications() (*MessengerResponse, error)

func (*Messenger) MarkAsTrusted added in v0.102.6

func (m *Messenger) MarkAsTrusted(ctx context.Context, contactID string) error

func (*Messenger) MarkAsUntrustworthy added in v0.102.6

func (m *Messenger) MarkAsUntrustworthy(ctx context.Context, contactID string) error

func (*Messenger) MarkDiscordCommunityImportAsCancelled added in v0.114.1

func (m *Messenger) MarkDiscordCommunityImportAsCancelled(communityID string)

func (*Messenger) MarkMessagesSeen

func (m *Messenger) MarkMessagesSeen(chatID string, ids []string) (uint64, uint64, error)

MarkMessagesSeen marks messages with `ids` as seen in the chat `chatID`. It returns the number of affected messages or error. If there is an error, the number of affected messages is always zero.

func (*Messenger) MessageByChatID

func (m *Messenger) MessageByChatID(chatID, cursor string, limit int) ([]*common.Message, string, error)

func (*Messenger) MessageByID

func (m *Messenger) MessageByID(id string) (*common.Message, error)

func (*Messenger) MessagesExist

func (m *Messenger) MessagesExist(ids []string) (map[string]bool, error)

func (*Messenger) MuteChat added in v0.56.1

func (m *Messenger) MuteChat(request *requests.MuteChat) (time.Time, error)

MuteChat signals to the messenger that we don't want to be notified on new messages from this chat

func (*Messenger) MuteChatV2 added in v0.145.2

func (m *Messenger) MuteChatV2(muteParams *requests.MuteChat) (time.Time, error)

func (*Messenger) MutualContacts added in v0.100.0

func (m *Messenger) MutualContacts() []*Contact

func (*Messenger) MyCanceledRequestsToJoin added in v0.114.1

func (m *Messenger) MyCanceledRequestsToJoin() ([]*communities.RequestToJoin, error)

func (*Messenger) MyPendingRequestsToJoin added in v0.72.0

func (m *Messenger) MyPendingRequestsToJoin() ([]*communities.RequestToJoin, error)

func (*Messenger) Peers added in v0.88.4

func (m *Messenger) Peers() map[string]types.WakuV2Peer

func (*Messenger) PendingContactRequests added in v0.100.0

func (m *Messenger) PendingContactRequests(cursor string, limit int) ([]*common.Message, string, error)

func (*Messenger) PendingNotificationContactRequest added in v0.102.2

func (m *Messenger) PendingNotificationContactRequest(contactID string) (*ActivityCenterNotification, error)

func (*Messenger) PendingRequestsToJoinForCommunity added in v0.72.0

func (m *Messenger) PendingRequestsToJoinForCommunity(id types.HexBytes) ([]*communities.RequestToJoin, error)

func (*Messenger) PinnedMessageByChatID added in v0.78.0

func (m *Messenger) PinnedMessageByChatID(chatID, cursor string, limit int) ([]*common.PinnedMessage, string, error)

func (*Messenger) PublishIdentityImage added in v0.89.10

func (m *Messenger) PublishIdentityImage() error

func (*Messenger) ReSendChatMessage

func (m *Messenger) ReSendChatMessage(ctx context.Context, messageID string) error

ReSendChatMessage pulls a message from the database and sends it again

func (*Messenger) RegisterForPushNotifications added in v0.56.1

func (m *Messenger) RegisterForPushNotifications(ctx context.Context, deviceToken, apnTopic string, tokenType protobuf.PushNotificationRegistration_TokenType) error

RegisterForPushNotification register deviceToken with any push notification server enabled

func (*Messenger) RegisteredForPushNotifications added in v0.56.1

func (m *Messenger) RegisteredForPushNotifications() (bool, error)

RegisteredForPushNotifications returns whether we successfully registered with all the servers

func (*Messenger) RemoveBookmark added in v0.102.2

func (m *Messenger) RemoveBookmark(ctx context.Context, url string) error

func (*Messenger) RemoveContact added in v0.68.4

func (m *Messenger) RemoveContact(ctx context.Context, pubKey string) (*MessengerResponse, error)

func (*Messenger) RemoveFilters

func (m *Messenger) RemoveFilters(filters []*transport.Filter) error

func (*Messenger) RemoveMailserver

func (m *Messenger) RemoveMailserver(id string) error

NOT IMPLEMENTED

func (*Messenger) RemoveMembersFromGroupChat added in v0.117.1

func (m *Messenger) RemoveMembersFromGroupChat(ctx context.Context, chatID string, members []string) (*MessengerResponse, error)

func (*Messenger) RemoveMigratedAccountsForKeycard added in v0.133.2

func (m *Messenger) RemoveMigratedAccountsForKeycard(ctx context.Context, kcUID string, addresses []types.Address, clock uint64) error

func (*Messenger) RemovePushNotificationServer added in v0.56.1

func (m *Messenger) RemovePushNotificationServer(ctx context.Context, publicKey *ecdsa.PublicKey) error

RemovePushNotificationServer removes a push notification server

func (*Messenger) RemoveRoleFromMember added in v0.115.5

func (m *Messenger) RemoveRoleFromMember(request *requests.RemoveRoleFromMember) (*MessengerResponse, error)

func (*Messenger) RemoveTrustStatus added in v0.102.6

func (m *Messenger) RemoveTrustStatus(ctx context.Context, contactID string) error

func (*Messenger) RemoveUserFromCommunity added in v0.67.0

func (m *Messenger) RemoveUserFromCommunity(id types.HexBytes, pkString string) (*MessengerResponse, error)

func (*Messenger) ReorderCommunityCategories added in v0.79.3

func (m *Messenger) ReorderCommunityCategories(request *requests.ReorderCommunityCategories) (*MessengerResponse, error)

func (*Messenger) ReorderCommunityChat added in v0.79.3

func (m *Messenger) ReorderCommunityChat(request *requests.ReorderCommunityChat) (*MessengerResponse, error)

func (*Messenger) RequestAddressForTransaction

func (m *Messenger) RequestAddressForTransaction(ctx context.Context, chatID, from, value, contract string) (*MessengerResponse, error)

func (*Messenger) RequestAllHistoricMessages added in v0.79.0

func (m *Messenger) RequestAllHistoricMessages(forceFetchingBackup bool) (*MessengerResponse, error)

RequestAllHistoricMessages requests all the historic messages for any topic

func (*Messenger) RequestAllHistoricMessagesWithRetries added in v0.96.0

func (m *Messenger) RequestAllHistoricMessagesWithRetries(forceFetchingBackup bool) (*MessengerResponse, error)

func (*Messenger) RequestCommunityInfoFromMailserver added in v0.76.3

func (m *Messenger) RequestCommunityInfoFromMailserver(communityID string, useDatabase bool) (*communities.Community, error)

RequestCommunityInfoFromMailserver installs filter for community and requests its details from mailserver. It waits until it has the community before returning it. If useDatabase is true, it searches for community in database and does not request mailserver.

func (*Messenger) RequestCommunityInfoFromMailserverAsync added in v0.94.3

func (m *Messenger) RequestCommunityInfoFromMailserverAsync(communityID string) error

RequestCommunityInfoFromMailserverAsync installs filter for community and requests its details from mailserver. When response received it will be passed through signals handler

func (*Messenger) RequestContactInfoFromMailserver added in v0.143.0

func (m *Messenger) RequestContactInfoFromMailserver(pubkey string, waitForResponse bool) (*Contact, error)

func (*Messenger) RequestExtractDiscordChannelsAndCategories added in v0.105.1

func (m *Messenger) RequestExtractDiscordChannelsAndCategories(filesToImport []string)

func (*Messenger) RequestHistoricMessagesForFilter added in v0.76.3

func (m *Messenger) RequestHistoricMessagesForFilter(
	ctx context.Context,
	from, to uint32,
	cursor []byte,
	previousStoreCursor *types.StoreRequestCursor,
	filter *transport.Filter,
	waitForResponse bool,
) ([]byte, *types.StoreRequestCursor, error)

func (*Messenger) RequestImportDiscordCommunity added in v0.114.1

func (m *Messenger) RequestImportDiscordCommunity(request *requests.ImportDiscordCommunity)

func (*Messenger) RequestToJoinCommunity added in v0.72.0

func (m *Messenger) RequestToJoinCommunity(request *requests.RequestToJoinCommunity) (*MessengerResponse, error)

func (*Messenger) RequestTransaction

func (m *Messenger) RequestTransaction(ctx context.Context, chatID, value, contract, address string) (*MessengerResponse, error)

func (*Messenger) RetractContactRequest added in v0.100.0

func (m *Messenger) RetractContactRequest(request *requests.RetractContactRequest) (*MessengerResponse, error)

func (*Messenger) RetrieveAll

func (m *Messenger) RetrieveAll() (*MessengerResponse, error)

RetrieveAll retrieves messages from all filters, processes them and returns a MessengerResponse to the client

func (*Messenger) SaveChat

func (m *Messenger) SaveChat(chat *Chat) error

func (*Messenger) SaveMessages

func (m *Messenger) SaveMessages(messages []*common.Message) error

func (*Messenger) SaveOrUpdateAccount added in v0.152.2

func (m *Messenger) SaveOrUpdateAccount(acc *accounts.Account) error

func (*Messenger) SaveOrUpdateKeypair added in v0.152.2

func (m *Messenger) SaveOrUpdateKeypair(keypair *accounts.Keypair) error

func (*Messenger) SavePinMessages added in v0.78.0

func (m *Messenger) SavePinMessages(messages []*common.PinMessage) error

func (*Messenger) SaveSyncDisplayName added in v0.142.9

func (m *Messenger) SaveSyncDisplayName(displayName string, clock uint64) error

func (*Messenger) SelectMailserver

func (m *Messenger) SelectMailserver(id string) error

NOT IMPLEMENTED

func (*Messenger) SendChatMessage

func (m *Messenger) SendChatMessage(ctx context.Context, message *common.Message) (*MessengerResponse, error)

SendChatMessage takes a minimal message and sends it based on the corresponding chat

func (*Messenger) SendChatMessages added in v0.64.3

func (m *Messenger) SendChatMessages(ctx context.Context, messages []*common.Message) (*MessengerResponse, error)

SendChatMessages takes a array of messages and sends it based on the corresponding chats

func (*Messenger) SendContactRequest added in v0.100.0

func (m *Messenger) SendContactRequest(ctx context.Context, request *requests.SendContactRequest) (*MessengerResponse, error)

func (*Messenger) SendContactUpdate

func (m *Messenger) SendContactUpdate(ctx context.Context, chatID, ensName, profileImage string) (*MessengerResponse, error)

SendContactUpdate sends a contact update to a user and adds the user to contacts

func (*Messenger) SendContactUpdates

func (m *Messenger) SendContactUpdates(ctx context.Context, ensName, profileImage string) (err error)

Send contact updates to all contacts added by us

func (*Messenger) SendContactVerificationRequest added in v0.102.6

func (m *Messenger) SendContactVerificationRequest(ctx context.Context, contactID string, challenge string) (*MessengerResponse, error)

func (*Messenger) SendEmojiReaction added in v0.56.4

func (m *Messenger) SendEmojiReaction(ctx context.Context, chatID, messageID string, emojiID protobuf.EmojiReaction_Type) (*MessengerResponse, error)

func (*Messenger) SendEmojiReactionRetraction added in v0.56.4

func (m *Messenger) SendEmojiReactionRetraction(ctx context.Context, emojiReactionID string) (*MessengerResponse, error)

func (*Messenger) SendGroupChatInvitationRejection added in v0.60.0

func (m *Messenger) SendGroupChatInvitationRejection(ctx context.Context, invitationRequestID string) (*MessengerResponse, error)

func (*Messenger) SendGroupChatInvitationRequest added in v0.60.0

func (m *Messenger) SendGroupChatInvitationRequest(ctx context.Context, chatID string, adminPK string,
	message string) (*MessengerResponse, error)

func (*Messenger) SendGroupChatMessage added in v0.138.8

func (m *Messenger) SendGroupChatMessage(request *requests.SendGroupChatMessage) (*MessengerResponse, error)

func (*Messenger) SendKeyExchangeMessage added in v0.102.2

func (m *Messenger) SendKeyExchangeMessage(communityID []byte, pubkeys []*ecdsa.PublicKey, msgType common.CommKeyExMsgType) error

func (*Messenger) SendOneToOneMessage added in v0.138.8

func (m *Messenger) SendOneToOneMessage(request *requests.SendOneToOneMessage) (*MessengerResponse, error)

func (*Messenger) SendPairInstallation

func (m *Messenger) SendPairInstallation(ctx context.Context, rawMessageHandler RawMessageHandler) (*MessengerResponse, error)

SendPairInstallation sends a pair installation message

func (*Messenger) SendPinMessage added in v0.78.0

func (m *Messenger) SendPinMessage(ctx context.Context, message *common.PinMessage) (*MessengerResponse, error)

SendPinMessage sends the PinMessage to the corresponding chat

func (*Messenger) SendTransaction

func (m *Messenger) SendTransaction(ctx context.Context, chatID, value, contract, transactionHash string, signature []byte) (*MessengerResponse, error)

func (*Messenger) SetBio added in v0.105.1

func (m *Messenger) SetBio(bio string) error

func (*Messenger) SetContactLocalNickname added in v0.90.0

func (m *Messenger) SetContactLocalNickname(request *requests.SetContactLocalNickname) (*MessengerResponse, error)

func (*Messenger) SetDisplayName added in v0.94.12

func (m *Messenger) SetDisplayName(displayName string) error

func (*Messenger) SetInstallationDeviceType added in v0.134.0

func (m *Messenger) SetInstallationDeviceType(deviceType string) error

func (*Messenger) SetInstallationMetadata

func (m *Messenger) SetInstallationMetadata(id string, data *multidevice.InstallationMetadata) error

func (*Messenger) SetInstallationName added in v0.138.8

func (m *Messenger) SetInstallationName(id string, name string) error

func (*Messenger) SetKeycardName added in v0.133.2

func (m *Messenger) SetKeycardName(ctx context.Context, kcUID string, kpName string, clock uint64) error

func (*Messenger) SetLocalPairing added in v0.118.0

func (m *Messenger) SetLocalPairing(localPairing bool)

func (*Messenger) SetMutePropertyOnChatsByCategory added in v0.102.6

func (m *Messenger) SetMutePropertyOnChatsByCategory(request *requests.MuteCategory, muted bool) error

func (*Messenger) SetMuted added in v0.81.0

func (m *Messenger) SetMuted(request *requests.MuteCommunity) error

func (*Messenger) SetP2PServer added in v0.93.2

func (m *Messenger) SetP2PServer(server *p2p.Server)

func (*Messenger) SetPinnedMailservers added in v0.96.0

func (m *Messenger) SetPinnedMailservers(mailservers map[string]string) error

func (*Messenger) SetUserStatus added in v0.83.2

func (m *Messenger) SetUserStatus(ctx context.Context, newStatus int, newCustomText string) error

func (*Messenger) ShareCommunity added in v0.72.0

func (m *Messenger) ShareCommunity(request *requests.ShareCommunity) (*MessengerResponse, error)

func (*Messenger) ShareImageMessage added in v0.94.8

func (m *Messenger) ShareImageMessage(request *requests.ShareImageMessage) (*MessengerResponse, error)

func (*Messenger) Shutdown

func (m *Messenger) Shutdown() (err error)

Shutdown takes care of ensuring a clean shutdown of Messenger

func (*Messenger) SignMessage added in v0.56.6

func (m *Messenger) SignMessage(message string) ([]byte, error)

func (*Messenger) SlowdownArchivesImport added in v0.156.1

func (m *Messenger) SlowdownArchivesImport()

func (*Messenger) SpectateCommunity added in v0.111.5

func (m *Messenger) SpectateCommunity(communityID types.HexBytes) (*MessengerResponse, error)

func (*Messenger) SpectatedCommunities added in v0.111.5

func (m *Messenger) SpectatedCommunities() ([]*communities.Community, error)

func (*Messenger) SpeedupArchivesImport added in v0.156.1

func (m *Messenger) SpeedupArchivesImport()

func (*Messenger) Start

func (m *Messenger) Start() (*MessengerResponse, error)

func (*Messenger) StartDiscV5 added in v0.91.8

func (m *Messenger) StartDiscV5() error

func (*Messenger) StartMailserverCycle added in v0.93.2

func (m *Messenger) StartMailserverCycle() error

func (*Messenger) StartPushNotificationsServer added in v0.56.1

func (m *Messenger) StartPushNotificationsServer() error

StartPushNotificationsServer initialize and start a push notification server, using the current messenger identity key

func (*Messenger) StatusUpdates added in v0.83.2

func (m *Messenger) StatusUpdates() ([]UserStatus, error)

func (*Messenger) StopDiscV5 added in v0.91.8

func (m *Messenger) StopDiscV5() error

func (*Messenger) StopPushNotificationsServer added in v0.56.1

func (m *Messenger) StopPushNotificationsServer() error

StopPushNotificationServer stops the push notification server if running

func (*Messenger) SubscribeMailserverAvailable added in v0.98.1

func (m *Messenger) SubscribeMailserverAvailable() chan struct{}

func (*Messenger) SwitcherCards added in v0.117.3

func (m *Messenger) SwitcherCards() ([]SwitcherCard, error)

func (*Messenger) SyncBookmark added in v0.94.4

func (m *Messenger) SyncBookmark(ctx context.Context, bookmark *browsers.Bookmark, rawMessageHandler RawMessageHandler) error

func (*Messenger) SyncChatFromSyncedFrom added in v0.79.0

func (m *Messenger) SyncChatFromSyncedFrom(chatID string) (uint32, error)

func (*Messenger) SyncCommunitySettings added in v0.102.2

func (m *Messenger) SyncCommunitySettings(ctx context.Context, settings *communities.CommunitySettings) error

func (*Messenger) SyncDevices

func (m *Messenger) SyncDevices(ctx context.Context, ensName, photoPath string, rawMessageHandler RawMessageHandler) (err error)

SyncDevices sends all public chats and contacts to paired devices TODO remove use of photoPath in contacts

func (*Messenger) SyncEnsNamesWithDispatchMessage added in v0.148.3

func (m *Messenger) SyncEnsNamesWithDispatchMessage(ctx context.Context, usernameDetail *ensservice.UsernameDetail) error

func (*Messenger) SyncTrustedUser added in v0.102.6

func (m *Messenger) SyncTrustedUser(ctx context.Context, publicKey string, ts verification.TrustStatus, rawMessageHandler RawMessageHandler) error

func (*Messenger) SyncVerificationRequest added in v0.102.6

func (m *Messenger) SyncVerificationRequest(ctx context.Context, vr *verification.Request, rawMessageHandler RawMessageHandler) error

func (*Messenger) ToBackground added in v0.94.0

func (m *Messenger) ToBackground()

func (*Messenger) ToForeground added in v0.94.0

func (m *Messenger) ToForeground()

func (*Messenger) ToggleCollapsedCommunityCategory added in v0.138.4

func (m *Messenger) ToggleCollapsedCommunityCategory(request *requests.ToggleCollapsedCommunityCategory) error

func (*Messenger) ToggleUseMailservers added in v0.96.0

func (m *Messenger) ToggleUseMailservers(value bool) error

func (*Messenger) UnbanUserFromCommunity added in v0.102.6

func (m *Messenger) UnbanUserFromCommunity(request *requests.UnbanUserFromCommunity) (*MessengerResponse, error)

func (*Messenger) UnblockContact added in v0.90.0

func (m *Messenger) UnblockContact(contactID string) (*MessengerResponse, error)

func (*Messenger) UnfurlURLs added in v0.151.12

func (m *Messenger) UnfurlURLs(urls []string) ([]common.LinkPreview, error)

func (*Messenger) UnmuteChat added in v0.56.1

func (m *Messenger) UnmuteChat(chatID string) error

UnmuteChat signals to the messenger that we want to be notified on new messages from this chat

func (*Messenger) UnregisterFromPushNotifications added in v0.56.1

func (m *Messenger) UnregisterFromPushNotifications(ctx context.Context) error

UnregisterFromPushNotifications unregister from any server

func (*Messenger) UpdateBookmark added in v0.102.2

func (m *Messenger) UpdateBookmark(ctx context.Context, oldURL string, bookmark browsers.Bookmark) error

func (*Messenger) UpdateCommunityEncryption added in v0.148.4

func (m *Messenger) UpdateCommunityEncryption(community *communities.Community) error

UpdateCommunityEncryption takes a community and encrypts / decrypts the community based on TokenPermission. Community is republished along with any keys if needed.

Note: This function cannot decrypt previously encrypted messages, and it cannot encrypt previous unencrypted messages. This functionality introduces some race conditions:

  • community description is processed by members before the receiving the key exchange messages
  • members maybe sending encrypted messages after the community description is updated and a new member joins

func (*Messenger) UpdateCommunityTokenState added in v0.133.2

func (m *Messenger) UpdateCommunityTokenState(chainID int, contractAddress string, deployState communities.DeployState) error

func (*Messenger) UpdateCommunityTokenSupply added in v0.158.0

func (m *Messenger) UpdateCommunityTokenSupply(chainID int, contractAddress string, supply int) error

func (*Messenger) UpdateKeycardUID added in v0.133.2

func (m *Messenger) UpdateKeycardUID(ctx context.Context, oldKcUID string, newKcUID string, clock uint64) error

func (*Messenger) UpdateKeypairName added in v0.152.2

func (m *Messenger) UpdateKeypairName(keyUID string, name string) error

func (*Messenger) UpdateMessageOutgoingStatus

func (m *Messenger) UpdateMessageOutgoingStatus(id, newOutgoingStatus string) error

func (*Messenger) UpsertSavedAddress added in v0.111.5

func (m *Messenger) UpsertSavedAddress(ctx context.Context, sa wallet.SavedAddress) error

func (*Messenger) UpsertSwitcherCard added in v0.117.3

func (m *Messenger) UpsertSwitcherCard(request *requests.UpsertSwitcherCard) error

func (*Messenger) ValidateTransactions

func (m *Messenger) ValidateTransactions(ctx context.Context, addresses []types.Address) (*MessengerResponse, error)

func (*Messenger) VerifiedTrusted added in v0.102.6

func (m *Messenger) VerifiedTrusted(ctx context.Context, request *requests.VerifiedTrusted) (*MessengerResponse, error)

func (*Messenger) VerifiedUntrustworthy added in v0.102.6

func (m *Messenger) VerifiedUntrustworthy(ctx context.Context, request *requests.VerifiedUntrustworthy) (*MessengerResponse, error)

type MessengerResponse

type MessengerResponse struct {
	Contacts                      []*Contact
	Installations                 []*multidevice.Installation
	Invitations                   []*GroupChatInvitation
	CommunityChanges              []*communities.CommunityChanges
	RequestsToJoinCommunity       []*communities.RequestToJoin
	AnonymousMetrics              []*appmetrics.AppMetric
	Mailservers                   []mailservers.Mailserver
	Bookmarks                     []*browsers.Bookmark
	Settings                      []*settings.SyncSettingField
	IdentityImages                []images.IdentityImage
	Accounts                      []*accounts.Account
	Keypairs                      []*accounts.Keypair
	DiscordCategories             []*discord.Category
	DiscordChannels               []*discord.Channel
	DiscordOldestMessageTimestamp int
	BackupHandled                 bool

	Keycards []*accounts.Keycard

	SocialLinksInfo *identity.SocialLinksInfo
	// contains filtered or unexported fields
}

func (*MessengerResponse) ActivityCenterNotifications added in v0.76.0

func (r *MessengerResponse) ActivityCenterNotifications() []*ActivityCenterNotification

func (*MessengerResponse) ActivityCenterState added in v0.131.8

func (r *MessengerResponse) ActivityCenterState() *ActivityCenterState

func (*MessengerResponse) AddActivityCenterNotification added in v0.76.0

func (r *MessengerResponse) AddActivityCenterNotification(n *ActivityCenterNotification)

func (*MessengerResponse) AddActivityCenterNotifications added in v0.76.0

func (r *MessengerResponse) AddActivityCenterNotifications(ns []*ActivityCenterNotification)

func (*MessengerResponse) AddBookmark added in v0.94.4

func (r *MessengerResponse) AddBookmark(bookmark *browsers.Bookmark)

func (*MessengerResponse) AddBookmarks added in v0.94.4

func (r *MessengerResponse) AddBookmarks(bookmarks []*browsers.Bookmark)

func (*MessengerResponse) AddChat added in v0.72.0

func (r *MessengerResponse) AddChat(c *Chat)

func (*MessengerResponse) AddChats added in v0.72.0

func (r *MessengerResponse) AddChats(chats []*Chat)

func (*MessengerResponse) AddClearedHistory added in v0.94.3

func (r *MessengerResponse) AddClearedHistory(ch *ClearedHistory)

func (*MessengerResponse) AddCommunities added in v0.72.0

func (r *MessengerResponse) AddCommunities(communities []*communities.Community)

func (*MessengerResponse) AddCommunity added in v0.72.0

func (r *MessengerResponse) AddCommunity(c *communities.Community)

func (*MessengerResponse) AddCommunitySettings added in v0.96.4

func (r *MessengerResponse) AddCommunitySettings(c *communities.CommunitySettings)

func (*MessengerResponse) AddContact added in v0.100.0

func (r *MessengerResponse) AddContact(c *Contact)

func (*MessengerResponse) AddContacts added in v0.130.3

func (r *MessengerResponse) AddContacts(contacts []*Contact)

func (*MessengerResponse) AddDiscordCategory added in v0.105.1

func (r *MessengerResponse) AddDiscordCategory(dc *discord.Category)

func (*MessengerResponse) AddDiscordChannel added in v0.105.1

func (r *MessengerResponse) AddDiscordChannel(dc *discord.Channel)

func (*MessengerResponse) AddDiscordMessage added in v0.114.1

func (r *MessengerResponse) AddDiscordMessage(message *protobuf.DiscordMessage)

func (*MessengerResponse) AddDiscordMessageAttachment added in v0.114.1

func (r *MessengerResponse) AddDiscordMessageAttachment(attachment *protobuf.DiscordMessageAttachment)

func (*MessengerResponse) AddDiscordMessageAttachments added in v0.114.1

func (r *MessengerResponse) AddDiscordMessageAttachments(attachments []*protobuf.DiscordMessageAttachment)

func (*MessengerResponse) AddDiscordMessageAuthor added in v0.114.1

func (r *MessengerResponse) AddDiscordMessageAuthor(author *protobuf.DiscordMessageAuthor)

func (*MessengerResponse) AddEmojiReaction added in v0.131.2

func (r *MessengerResponse) AddEmojiReaction(er *EmojiReaction)

func (*MessengerResponse) AddEmojiReactions added in v0.131.2

func (r *MessengerResponse) AddEmojiReactions(ers []*EmojiReaction)

func (*MessengerResponse) AddEnsUsernameDetail added in v0.148.3

func (r *MessengerResponse) AddEnsUsernameDetail(detail *ensservice.UsernameDetail)

func (*MessengerResponse) AddEnsUsernameDetails added in v0.148.3

func (r *MessengerResponse) AddEnsUsernameDetails(details []*ensservice.UsernameDetail)

func (*MessengerResponse) AddInstallation added in v0.131.2

func (r *MessengerResponse) AddInstallation(i *multidevice.Installation)

func (*MessengerResponse) AddInstallations added in v0.131.2

func (r *MessengerResponse) AddInstallations(installations []*multidevice.Installation)

func (*MessengerResponse) AddKeycardAction added in v0.133.2

func (r *MessengerResponse) AddKeycardAction(keycardAction *accounts.KeycardAction)

func (*MessengerResponse) AddKeycardActions added in v0.133.2

func (r *MessengerResponse) AddKeycardActions(keycardActions []*accounts.KeycardAction)

func (*MessengerResponse) AddMessage added in v0.79.0

func (r *MessengerResponse) AddMessage(message *common.Message)

func (*MessengerResponse) AddMessages added in v0.80.3

func (r *MessengerResponse) AddMessages(ms []*common.Message)

func (*MessengerResponse) AddNotification added in v0.74.2

func (r *MessengerResponse) AddNotification(n *localnotifications.Notification)

func (*MessengerResponse) AddNotifications added in v0.74.2

func (r *MessengerResponse) AddNotifications(notifications []*localnotifications.Notification)

func (*MessengerResponse) AddPinMessage added in v0.78.0

func (r *MessengerResponse) AddPinMessage(pm *common.PinMessage)

func (*MessengerResponse) AddPinMessages added in v0.78.0

func (r *MessengerResponse) AddPinMessages(pms []*common.PinMessage)

func (*MessengerResponse) AddRemovedChat added in v0.72.0

func (r *MessengerResponse) AddRemovedChat(chatID string)

func (*MessengerResponse) AddRemovedChats added in v0.72.0

func (r *MessengerResponse) AddRemovedChats(chats []string)

func (*MessengerResponse) AddRemovedMessage added in v0.83.2

func (r *MessengerResponse) AddRemovedMessage(rm *RemovedMessage)

func (*MessengerResponse) AddRemovedMessages added in v0.83.2

func (r *MessengerResponse) AddRemovedMessages(messages []*RemovedMessage)

func (*MessengerResponse) AddRequestToJoinCommunity added in v0.146.4

func (r *MessengerResponse) AddRequestToJoinCommunity(requestToJoin *communities.RequestToJoin)

func (*MessengerResponse) AddRequestsToJoinCommunity added in v0.158.0

func (r *MessengerResponse) AddRequestsToJoinCommunity(requestsToJoin []*communities.RequestToJoin)

func (*MessengerResponse) AddSavedAddress added in v0.131.2

func (r *MessengerResponse) AddSavedAddress(er *wallet.SavedAddress)

func (*MessengerResponse) AddSavedAddresses added in v0.131.2

func (r *MessengerResponse) AddSavedAddresses(ers []*wallet.SavedAddress)

func (*MessengerResponse) AddSetting added in v0.117.3

func (r *MessengerResponse) AddSetting(s *settings.SyncSettingField)

func (*MessengerResponse) AddStatusUpdate added in v0.83.2

func (r *MessengerResponse) AddStatusUpdate(upd UserStatus)

func (*MessengerResponse) AddTrustStatus added in v0.102.6

func (r *MessengerResponse) AddTrustStatus(contactID string, trustStatus verification.TrustStatus)

func (*MessengerResponse) AddTrustStatuses added in v0.102.6

func (r *MessengerResponse) AddTrustStatuses(ts map[string]verification.TrustStatus)

func (*MessengerResponse) AddVerificationRequest added in v0.102.6

func (r *MessengerResponse) AddVerificationRequest(vr *verification.Request)

func (*MessengerResponse) AddVerificationRequests added in v0.102.6

func (r *MessengerResponse) AddVerificationRequests(vrs []*verification.Request)

func (*MessengerResponse) Chats

func (r *MessengerResponse) Chats() []*Chat

func (*MessengerResponse) ClearNotifications added in v0.74.2

func (r *MessengerResponse) ClearNotifications()

func (*MessengerResponse) ClearedHistories added in v0.94.3

func (r *MessengerResponse) ClearedHistories() []*ClearedHistory

func (*MessengerResponse) Communities added in v0.67.0

func (r *MessengerResponse) Communities() []*communities.Community

func (*MessengerResponse) CommunitiesSettings added in v0.96.4

func (r *MessengerResponse) CommunitiesSettings() []*communities.CommunitySettings

func (*MessengerResponse) DiscordMessageAttachments added in v0.114.1

func (r *MessengerResponse) DiscordMessageAttachments() []*protobuf.DiscordMessageAttachment

func (*MessengerResponse) DiscordMessageAuthors added in v0.114.1

func (r *MessengerResponse) DiscordMessageAuthors() []*protobuf.DiscordMessageAuthor

func (*MessengerResponse) DiscordMessages added in v0.114.1

func (r *MessengerResponse) DiscordMessages() []*protobuf.DiscordMessage

func (*MessengerResponse) EmojiReactions added in v0.56.4

func (r *MessengerResponse) EmojiReactions() []*EmojiReaction

func (*MessengerResponse) EnsUsernameDetails added in v0.148.3

func (r *MessengerResponse) EnsUsernameDetails() []*ensservice.UsernameDetail

func (*MessengerResponse) GetBookmarks added in v0.148.3

func (r *MessengerResponse) GetBookmarks() []*browsers.Bookmark

func (*MessengerResponse) GetMessage added in v0.80.3

func (r *MessengerResponse) GetMessage(messageID string) *common.Message

func (*MessengerResponse) HasDiscordCategory added in v0.105.1

func (r *MessengerResponse) HasDiscordCategory(id string) bool

func (*MessengerResponse) HasDiscordChannel added in v0.105.1

func (r *MessengerResponse) HasDiscordChannel(id string) bool

func (*MessengerResponse) IsEmpty

func (r *MessengerResponse) IsEmpty() bool

func (*MessengerResponse) KeycardActions added in v0.133.2

func (r *MessengerResponse) KeycardActions() []*accounts.KeycardAction

func (*MessengerResponse) MarshalJSON added in v0.72.0

func (r *MessengerResponse) MarshalJSON() ([]byte, error)

func (*MessengerResponse) Merge added in v0.64.3

func (r *MessengerResponse) Merge(response *MessengerResponse) error

Merge takes another response and appends the new Chats & new Messages and replaces the existing Messages & Chats if they have the same ID

func (*MessengerResponse) Messages

func (r *MessengerResponse) Messages() []*common.Message

func (*MessengerResponse) Notifications added in v0.68.4

func (r *MessengerResponse) Notifications() []*localnotifications.Notification

func (*MessengerResponse) PinMessages added in v0.78.0

func (r *MessengerResponse) PinMessages() []*common.PinMessage

func (*MessengerResponse) RemoveActivityCenterNotification added in v0.102.2

func (r *MessengerResponse) RemoveActivityCenterNotification(id string) bool

func (*MessengerResponse) RemovedChats added in v0.67.0

func (r *MessengerResponse) RemovedChats() []string

func (*MessengerResponse) RemovedMessages added in v0.83.2

func (r *MessengerResponse) RemovedMessages() []*RemovedMessage

func (*MessengerResponse) SavedAddresses added in v0.111.5

func (r *MessengerResponse) SavedAddresses() []*wallet.SavedAddress

func (*MessengerResponse) SetActivityCenterState added in v0.131.8

func (r *MessengerResponse) SetActivityCenterState(activityCenterState *ActivityCenterState)

func (*MessengerResponse) SetCurrentStatus added in v0.83.2

func (r *MessengerResponse) SetCurrentStatus(status UserStatus)

func (*MessengerResponse) SetMessages added in v0.80.3

func (r *MessengerResponse) SetMessages(messages []*common.Message)

func (*MessengerResponse) StatusUpdates added in v0.83.2

func (r *MessengerResponse) StatusUpdates() []UserStatus

func (*MessengerResponse) TrustStatus added in v0.102.6

func (r *MessengerResponse) TrustStatus() map[string]verification.TrustStatus

func (*MessengerResponse) VerificationRequests added in v0.102.6

func (r *MessengerResponse) VerificationRequests() []*verification.Request

type MessengerSignalsHandler added in v0.76.3

type MessengerSignalsHandler interface {
	MessageDelivered(chatID string, messageID string)
	CommunityInfoFound(community *communities.Community)
	MessengerResponse(response *MessengerResponse)
	HistoryRequestStarted(numBatches int)
	HistoryRequestCompleted()

	BackupPerformed(uint64)
	HistoryArchivesProtocolEnabled()
	HistoryArchivesProtocolDisabled()
	CreatingHistoryArchives(communityID string)
	NoHistoryArchivesCreated(communityID string, from int, to int)
	HistoryArchivesCreated(communityID string, from int, to int)
	HistoryArchivesSeeding(communityID string)
	HistoryArchivesUnseeded(communityID string)
	HistoryArchiveDownloaded(communityID string, from int, to int)
	DownloadingHistoryArchivesStarted(communityID string)
	DownloadingHistoryArchivesFinished(communityID string)
	ImportingHistoryArchiveMessages(communityID string)
	StatusUpdatesTimedOut(statusUpdates *[]UserStatus)
	DiscordCategoriesAndChannelsExtracted(categories []*discord.Category, channels []*discord.Channel, oldestMessageTimestamp int64, errors map[string]*discord.ImportError)
	DiscordCommunityImportProgress(importProgress *discord.ImportProgress)
	DiscordCommunityImportFinished(communityID string)
	DiscordCommunityImportCancelled(communityID string)
	SendWakuFetchingBackupProgress(response *wakusync.WakuBackedUpDataResponse)
	SendWakuBackedUpProfile(response *wakusync.WakuBackedUpDataResponse)
	SendWakuBackedUpSettings(response *wakusync.WakuBackedUpDataResponse)
	SendWakuBackedUpKeypair(response *wakusync.WakuBackedUpDataResponse)
	SendWakuBackedUpKeycards(response *wakusync.WakuBackedUpDataResponse)
	SendWakuBackedUpWatchOnlyAccount(response *wakusync.WakuBackedUpDataResponse)
}

type MutualStateUpdateType added in v0.157.2

type MutualStateUpdateType int
const (
	MutualStateUpdateTypeSent MutualStateUpdateType = iota + 1
	MutualStateUpdateTypeAdded
	MutualStateUpdateTypeRemoved
)

type NotificationBody added in v0.74.2

type NotificationBody struct {
	Message   *common.Message        `json:"message"`
	Contact   *Contact               `json:"contact"`
	Chat      *Chat                  `json:"chat"`
	Community *communities.Community `json:"community"`
}

func (NotificationBody) MarshalJSON added in v0.74.2

func (n NotificationBody) MarshalJSON() ([]byte, error)

type Option

type Option func(*config) error

func WithAccount added in v0.65.0

func WithAccount(acc *multiaccounts.Account) Option

func WithAnonMetricsClientConfig added in v0.86.2

func WithAnonMetricsClientConfig(anonMetricsClientConfig *anonmetrics.ClientConfig) Option

func WithAnonMetricsServerConfig added in v0.86.2

func WithAnonMetricsServerConfig(anonMetricsServerConfig *anonmetrics.ServerConfig) Option

func WithAppSettings added in v0.89.2

func WithAppSettings(s settings.Settings, nc params.NodeConfig) Option

func WithBrowserDatabase added in v0.94.4

func WithBrowserDatabase(bd *browsers.Database) Option

func WithClusterConfig added in v0.93.2

func WithClusterConfig(cc params.ClusterConfig) Option

func WithCustomLogger

func WithCustomLogger(logger *zap.Logger) Option

func WithDatabase

func WithDatabase(db *sql.DB) Option

func WithDatabaseConfig

func WithDatabaseConfig(dbPath string, dbKey string, dbKDFIterations int) Option

func WithENSVerificationConfig added in v0.72.0

func WithENSVerificationConfig(onENSVerified func(*MessengerResponse), url, address string) Option

func WithEnvelopesMonitorConfig

func WithEnvelopesMonitorConfig(emc *transport.EnvelopesMonitorConfig) Option

func WithHTTPServer added in v0.98.6

func WithHTTPServer(s *server.MediaServer) Option

func WithMailserversDatabase added in v0.69.0

func WithMailserversDatabase(ma *mailservers.Database) Option

func WithMessageCSV added in v0.106.1

func WithMessageCSV(enabled bool) Option

func WithMultiAccounts added in v0.65.0

func WithMultiAccounts(ma *multiaccounts.Database) Option

func WithPushNotificationClientConfig added in v0.56.1

func WithPushNotificationClientConfig(pushNotificationClientConfig *pushnotificationclient.Config) Option

func WithPushNotificationServerConfig added in v0.56.1

func WithPushNotificationServerConfig(pushNotificationServerConfig *pushnotificationserver.Config) Option

func WithRPCClient added in v0.100.1

func WithRPCClient(r *rpc.Client) Option

func WithSignalsHandler added in v0.76.3

func WithSignalsHandler(h MessengerSignalsHandler) Option

func WithSystemMessagesTranslations

func WithSystemMessagesTranslations(t map[protobuf.MembershipUpdateEvent_EventType]string) Option

WithSystemMessagesTranslations is required for Group Chats which are currently disabled. nolint: unused

func WithTelemetry added in v0.89.20

func WithTelemetry(serverURL string) Option

func WithTokenManager added in v0.159.2

func WithTokenManager(tokenManager communities.TokenManager) Option

func WithToplevelDatabaseMigrations added in v0.89.2

func WithToplevelDatabaseMigrations() Option

func WithTorrentConfig added in v0.96.2

func WithTorrentConfig(tc *params.TorrentConfig) Option

func WithVerifyTransactionClient

func WithVerifyTransactionClient(client EthClient) Option

func WithWalletConfig added in v0.142.2

func WithWalletConfig(wc *params.WalletConfig) Option

func WithWalletService added in v0.151.13

func WithWalletService(s *wallet.Service) Option

type RawMessageHandler added in v0.118.0

type RawMessageHandler func(ctx context.Context, rawMessage common.RawMessage) (common.RawMessage, error)

type ReceivedMessageState

type ReceivedMessageState struct {
	// State on the message being processed
	CurrentMessageState *CurrentMessageState
	// AllChats in memory
	AllChats *chatMap
	// All contacts in memory
	AllContacts *contactMap
	// List of contacts modified
	ModifiedContacts *stringBoolMap
	// All installations in memory
	AllInstallations *installationMap
	// List of communities modified
	ModifiedInstallations *stringBoolMap
	// Map of existing messages
	ExistingMessagesMap map[string]bool
	// EmojiReactions is a list of emoji reactions for the current batch
	// indexed by from-message-id-emoji-type
	EmojiReactions map[string]*EmojiReaction
	// GroupChatInvitations is a list of invitation requests or rejections
	GroupChatInvitations map[string]*GroupChatInvitation
	// Response to the client
	Response *MessengerResponse
	// Timesource is a time source for clock values/timestamps.
	Timesource              common.TimeSource
	AllBookmarks            map[string]*browsers.Bookmark
	AllVerificationRequests []*verification.Request
	AllTrustStatus          map[string]verification.TrustStatus
}

type RemovedMessage added in v0.84.1

type RemovedMessage struct {
	ChatID    string `json:"chatId"`
	MessageID string `json:"messageId"`
	DeletedBy string `json:"deletedBy,omitempty"`
}

type SegmentType added in v0.143.1

type SegmentType int
const (
	Text SegmentType = iota
	Mention
)

type SortedMailserver added in v0.96.0

type SortedMailserver struct {
	Address         string
	RTTMs           int
	CanConnectAfter time.Time
}

type SwitcherCard added in v0.117.3

type SwitcherCard struct {
	CardID   string `json:"cardId,omitempty"`
	Type     int    `json:"type"`
	Clock    uint64 `json:"clock"`
	ScreenID string `json:"screenId"`
}

type TextDiff added in v0.148.3

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

type TransactionToValidate

type TransactionToValidate struct {
	TransactionHash string
	CommandID       string
	MessageID       string
	RetryCount      int
	// First seen indicates the whisper timestamp of the first time we seen this
	FirstSeen uint64
	// Validate indicates whether we should be validating this transaction
	Validate  bool
	Signature []byte
	From      *ecdsa.PublicKey
}

type TransactionValidator

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

func NewTransactionValidator

func NewTransactionValidator(addresses []types.Address, persistence *sqlitePersistence, client EthClient, logger *zap.Logger) *TransactionValidator

func (*TransactionValidator) ValidateTransaction

func (t *TransactionValidator) ValidateTransaction(ctx context.Context, parameters *common.CommandParameters, from *ecdsa.PublicKey) (*VerifyTransactionResponse, error)

func (*TransactionValidator) ValidateTransactions

func (t *TransactionValidator) ValidateTransactions(ctx context.Context) ([]*VerifyTransactionResponse, error)

type UserStatus added in v0.83.2

type UserStatus struct {
	PublicKey  string `json:"publicKey,omitempty"`
	StatusType int    `json:"statusType"`
	Clock      uint64 `json:"clock"`
	CustomText string `json:"text"`
}

func ToUserStatus added in v0.83.2

func ToUserStatus(msg protobuf.StatusUpdate) UserStatus

type VerificationStatus added in v0.102.6

type VerificationStatus int
const (
	VerificationStatusUNVERIFIED VerificationStatus = iota
	VerificationStatusVERIFYING
	VerificationStatusVERIFIED
)

type VerifyTransactionResponse

type VerifyTransactionResponse struct {
	Pending bool
	// AccordingToSpec means that the transaction is valid,
	// the user should be notified, but is not the same as
	// what was requested, for example because the value is different
	AccordingToSpec bool
	// Valid means that the transaction is valid
	Valid bool
	// The actual value received
	Value string
	// The contract used in case of tokens
	Contract string
	// The address the transaction was actually sent
	Address string

	Message     *common.Message
	Transaction *TransactionToValidate
}

type WalletConnectSession added in v0.105.1

type WalletConnectSession struct {
	PeerID   string `json:"peerId"`
	DAppName string `json:"dappName"`
	DAppURL  string `json:"dappURL"`
	Info     string `json:"info"`
}

Jump to

Keyboard shortcuts

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