signal

package
v0.179.21 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: MPL-2.0 Imports: 14 Imported by: 30

Documentation

Overview

Package signal implements event-based signalling interface between status-go and externally linked codebases like status-mobile or status-desktop. Events are send asynchronously using OS-specific linking mechanisms. See sources for implementation details.

Index

Constants

View Source
const (

	// EventHistoryArchivesEnabled triggered when the community history archive protocol
	// was enabled via the RPC API
	EventHistoryArchivesProtocolEnabled = "community.historyArchivesProtocolEnabled"
	// EventHistoryArchivesDisabled triggered when the community history archive protocol
	// was disabled via the RPC API
	EventHistoryArchivesProtocolDisabled = "community.historyArchivesProtocolDisabled"
	// EventCreatingHistoryArchives is triggered when the community owner node
	// starts to create archives torrents
	EventCreatingHistoryArchives = "community.creatingHistoryArchives"
	// EventHistoryArchivesCreated is triggered when the community owner node
	// has finished to create archives torrents
	EventHistoryArchivesCreated = "community.historyArchivesCreated"
	// EventNoHistoryArchivesCreated is triggered when the community owner node
	// tried to create archives but haven't because there were no new messages
	// to archive
	EventNoHistoryArchivesCreated = "community.noHistoryArchivesCreated"
	// EventHistoryArchivesSeeding is triggered when the community owner node
	// started seeding archives torrents
	EventHistoryArchivesSeeding = "community.historyArchivesSeeding"
	// EventHistoryArchivesUnseeded is triggered when the community owner node
	// drops a torrent for a particular community
	EventHistoryArchivesUnseeded = "community.historyArchivesUnseeded"
	// EventDownloadingHistoryArchivesFinished is triggered when the community member node
	// has downloaded all archives
	EventDownloadingHistoryArchivesStarted = "community.downloadingHistoryArchivesStarted"
	// EventHistoryArchiveDownloaded is triggered when the community member node
	// has downloaded an individual community archive
	EventHistoryArchiveDownloaded = "community.historyArchiveDownloaded"
	// EventImportingHistoryArchiveMessages is triggered when the community member node
	// has starts importing downloaded archive messages into the database
	EventImportingHistoryArchiveMessages = "community.importingHistoryArchiveMessages"
	// EventDownloadingHistoryArchivesFinished is triggered when the community member node
	// has downloaded all archives
	EventDownloadingHistoryArchivesFinished = "community.downloadingHistoryArchivesFinished"
)
View Source
const (
	// ReEncryptionStarted is sent when db reencryption was started.
	ReEncryptionStarted = "db.reEncryption.started"
	// ReEncryptionFinished is sent when db reencryption was finished.
	ReEncryptionFinished = "db.reEncryption.finished"
)
View Source
const (

	// EventDiscordCategoriesAndChannelsExtracted triggered when categories and
	// channels for exported discord files have been successfully extracted
	EventDiscordCategoriesAndChannelsExtracted = "community.discordCategoriesAndChannelsExtracted"

	// EventDiscordCommunityImportProgress is triggered during the import
	// of a discord community as it progresses
	EventDiscordCommunityImportProgress = "community.discordCommunityImportProgress"

	// EventDiscordCommunityImportFinished triggered when importing
	// the discord community into status was successful
	EventDiscordCommunityImportFinished = "community.discordCommunityImportFinished"

	// EventDiscordCommunityImportCancelled triggered when importing
	// the discord community was cancelled
	EventDiscordCommunityImportCancelled = "community.discordCommunityImportCancelled"

	// EventDiscordCommunityImportCleanedUp triggered when the community has been cleaned up (deleted)
	EventDiscordCommunityImportCleanedUp = "community.discordCommunityImportCleanedUp"

	// EventDiscordChannelImportProgress is triggered during the import
	// of a discord community channel as it progresses
	EventDiscordChannelImportProgress = "community.discordChannelImportProgress"

	// EventDiscordChannelImportFinished triggered when importing
	// the discord community channel into status was successful
	EventDiscordChannelImportFinished = "community.discordChannelImportFinished"

	// EventDiscordChannelImportCancelled triggered when importing
	// the discord community channel was cancelled
	EventDiscordChannelImportCancelled = "community.discordChannelImportCancelled"
)
View Source
const (
	// EventDiscoveryStarted is sent when node discv5 was started.
	EventDiscoveryStarted = "discovery.started"
	// EventDiscoveryStopped is sent when discv5 server was stopped.
	EventDiscoveryStopped = "discovery.stopped"

	// EventDiscoverySummary is sent when peer is added or removed.
	// it will be a map with capability=peer count k/v's.
	EventDiscoverySummary = "discovery.summary"
)
View Source
const (
	// EventMediaServerStarted triggers when the media server successfully binds a new port
	EventMediaServerStarted = "mediaserver.started"

	// EventMesssageDelivered triggered when we got acknowledge from datasync level, that means peer got message
	EventMesssageDelivered = "message.delivered"

	// EventCommunityInfoFound triggered when user requested info about some community and messenger successfully
	// retrieved it from mailserver
	EventCommunityInfoFound = "community.found"

	// EventStatusUpdatesTimedOut Event Automatic Status Updates Timed out
	EventStatusUpdatesTimedOut = "status.updates.timedout"

	// EventCuratedCommunitiesUpdate triggered when it is time to refresh the list of curated communities
	EventCuratedCommunitiesUpdate = "curated.communities.update"
)
View Source
const (
	// EventNodeStarted is triggered when underlying node is started
	EventNodeStarted = "node.started"

	// EventNodeReady is triggered when underlying node is fully ready
	// (consider backend to be fully registered)
	EventNodeReady = "node.ready"

	// EventNodeStopped is triggered when underlying node is fully stopped
	EventNodeStopped = "node.stopped"

	// EventNodeCrashed is triggered when node crashes
	EventNodeCrashed = "node.crashed"

	// EventChainDataRemoved is triggered when node's chain data is removed
	EventChainDataRemoved = "chaindata.removed"

	// EventLoggedIn is once node was injected with user account and ready to be used.
	EventLoggedIn = "node.login"
)
View Source
const (
	// EventEnvelopeSent is triggered when envelope was sent at least to a one peer.
	EventEnvelopeSent = "envelope.sent"

	// EventEnvelopeExpired is triggered when envelop was dropped by a whisper without being sent
	// to any peer
	EventEnvelopeExpired = "envelope.expired"

	// EventMailServerRequestCompleted is triggered when whisper receives a message ack from the mailserver
	EventMailServerRequestCompleted = "mailserver.request.completed"

	// EventMailServerRequestExpired is triggered when request TTL ends
	EventMailServerRequestExpired = "mailserver.request.expired"

	// EventEnodeDiscovered is tiggered when enode has been discovered.
	EventEnodeDiscovered = "enode.discovered"

	// EventDecryptMessageFailed is triggered when we receive a message from a bundle we don't have
	EventDecryptMessageFailed = "messages.decrypt.failed"

	// EventBundleAdded is triggered when we receive a bundle
	EventBundleAdded = "bundles.added"

	// EventNewMessages is triggered when we receive new messages
	EventNewMessages = "messages.new"

	// EventHistoryRequestStarted is triggered before processing a store request
	EventHistoryRequestStarted = "history.request.started"

	// EventHistoryRequestCompleted is triggered after processing all storenode requests
	EventHistoryRequestCompleted = "history.request.completed"

	// EventHistoryRequestFailed is triggered when requesting history messages fails
	EventHistoryRequestFailed = "history.request.failed"

	// EventBackupPerformed is triggered when a backup has been performed
	EventBackupPerformed = "backup.performed"

	// EventMailserverAvailable is triggered when a mailserver becomes available
	EventMailserverAvailable = "mailserver.available"

	// EventMailserverChanged is triggered when switching the active mailserver
	EventMailserverChanged = "mailserver.changed"

	// EventMailserverNotWorking is triggered when the mailserver has failed to connect or failed to respond to requests
	EventMailserverNotWorking = "mailserver.not.working"

	// EventUpdateAvailable is triggered after a update verification is performed
	EventUpdateAvailable = "update.available"
)
View Source
const (
	// EventSignRequestAdded is triggered when send transaction request is queued
	EventSignRequestAdded = "sign-request.queued"
	// EventSignRequestFailed is triggered when send transaction request fails
	EventSignRequestFailed = "sign-request.failed"
)
View Source
const (
	// EventSubscriptionsData is triggered when there is new data in any of the subscriptions
	EventSubscriptionsData = "subscriptions.data"
	// EventSubscriptionsError is triggered when subscriptions failed to get new data
	EventSubscriptionsError = "subscriptions.error"
)
View Source
const (
	// EventWakuFetchingBackupProgress is emitted while applying fetched data is ongoing
	EventWakuFetchingBackupProgress = "waku.fetching.backup.progress"

	// EventSyncFromWakuProfile is emitted while applying fetched profile data from waku
	EventWakuBackedUpProfile = "waku.backedup.profile"

	// EventWakuBackedUpSettings is emitted while applying fetched settings from waku
	EventWakuBackedUpSettings = "waku.backedup.settings"

	// EventWakuBackedUpKeypair is emitted while applying fetched keypair data from waku
	EventWakuBackedUpKeypair = "waku.backedup.keypair"

	// EventWakuBackedUpWatchOnlyAccount is emitted while applying fetched watch only account data from waku
	EventWakuBackedUpWatchOnlyAccount = "waku.backedup.watch-only-account" // #nosec G101
)
View Source
const (

	// EventCommunityTokenTransactionStatusChanged is triggered when community token contract
	// transaction changed its status
	EventCommunityTokenTransactionStatusChanged = "communityToken.communityTokenTransactionStatusChanged"
)
View Source
const (
	// EventPeerStats is sent when peer is added or removed.
	// it will be a map with capability=peer count k/v's.
	EventPeerStats = "wakuv2.peerstats"
)
View Source
const (
	// EventsStats is sent periodically with stats like upload/download rate
	EventStats = "stats"
)
View Source
const (
	MemberReevaluationStatus = "community.memberReevaluationStatus"
)

Variables

This section is empty.

Functions

func NotifyNode

func NotifyNode(jsonEvent *C.char)

nolint: golint

func ResetDefaultNodeNotificationHandler

func ResetDefaultNodeNotificationHandler()

ResetDefaultNodeNotificationHandler sets notification handler to default one

func SendBackupPerformed added in v0.90.0

func SendBackupPerformed(lastBackup uint64)

func SendBundleAdded added in v0.16.4

func SendBundleAdded(identity string, installationID string)

func SendChainDataRemoved

func SendChainDataRemoved()

SendChainDataRemoved emits a signal when node's chain data has been removed.

func SendCommunityInfoFound added in v0.76.3

func SendCommunityInfoFound(community interface{})

SendMessageDelivered notifies about delivered message

func SendCommunityMemberReevaluationEnded added in v0.179.15

func SendCommunityMemberReevaluationEnded(communityID string)

func SendCommunityMemberReevaluationStarted added in v0.179.15

func SendCommunityMemberReevaluationStarted(communityID string)

func SendCommunityTokenTransactionStatusSignal added in v0.179.19

func SendCommunityTokenTransactionStatusSignal(transactionType string, success bool, hash common.Hash,
	communityToken *token.CommunityToken, ownerToken *token.CommunityToken, masterToken *token.CommunityToken, errorString string)

func SendCreatingHistoryArchives added in v0.98.1

func SendCreatingHistoryArchives(communityID string)

func SendCuratedCommunitiesUpdate added in v0.162.15

func SendCuratedCommunitiesUpdate(curatedCommunitiesUpdate interface{})

func SendDecryptMessageFailed added in v0.15.1

func SendDecryptMessageFailed(sender string)

func SendDiscordCategoriesAndChannelsExtracted added in v0.105.1

func SendDiscordCategoriesAndChannelsExtracted(categories []*discord.Category, channels []*discord.Channel, oldestMessageTimestamp int64, errors map[string]*discord.ImportError)

func SendDiscordChannelImportCancelled added in v0.171.11

func SendDiscordChannelImportCancelled(channelID string)

func SendDiscordChannelImportFinished added in v0.171.11

func SendDiscordChannelImportFinished(communityID string, channelID string)

func SendDiscordChannelImportProgress added in v0.171.11

func SendDiscordChannelImportProgress(importProgress *discord.ImportProgress)

func SendDiscordCommunityImportCancelled added in v0.114.1

func SendDiscordCommunityImportCancelled(communityID string)

func SendDiscordCommunityImportCleanedUp added in v0.174.5

func SendDiscordCommunityImportCleanedUp(communityID string)

func SendDiscordCommunityImportFinished added in v0.114.1

func SendDiscordCommunityImportFinished(communityID string)

func SendDiscordCommunityImportProgress added in v0.114.1

func SendDiscordCommunityImportProgress(importProgress *discord.ImportProgress)

func SendDiscoveryStarted

func SendDiscoveryStarted()

SendDiscoveryStarted sends discovery.started signal.

func SendDiscoveryStopped

func SendDiscoveryStopped()

SendDiscoveryStopped sends discovery.stopped signal.

func SendDiscoverySummary

func SendDiscoverySummary(summary interface{})

SendDiscoverySummary sends discovery.summary signal.

func SendDownloadingHistoryArchivesFinished added in v0.109.4

func SendDownloadingHistoryArchivesFinished(communityID string)

func SendDownloadingHistoryArchivesStarted added in v0.115.5

func SendDownloadingHistoryArchivesStarted(communityID string)

func SendEnodeDiscovered

func SendEnodeDiscovered(enode, topic string)

SendEnodeDiscovered tiggered when an enode is discovered. finds a new enode.

func SendEnvelopeExpired

func SendEnvelopeExpired(identifiers [][]byte, err error)

SendEnvelopeExpired triggered when envelope delivered at least to 1 peer.

func SendEnvelopeSent

func SendEnvelopeSent(identifiers [][]byte)

SendEnvelopeSent triggered when envelope delivered at least to 1 peer.

func SendHistoricMessagesRequestCompleted added in v0.89.2

func SendHistoricMessagesRequestCompleted()

func SendHistoricMessagesRequestFailed added in v0.89.2

func SendHistoricMessagesRequestFailed(requestID []byte, peerID peer.ID, err error)

func SendHistoricMessagesRequestStarted added in v0.89.2

func SendHistoricMessagesRequestStarted(numBatches int)

func SendHistoryArchiveDownloaded added in v0.98.1

func SendHistoryArchiveDownloaded(communityID string, from int, to int)

func SendHistoryArchivesCreated added in v0.98.1

func SendHistoryArchivesCreated(communityID string, from int, to int)

func SendHistoryArchivesProtocolDisabled added in v0.98.1

func SendHistoryArchivesProtocolDisabled()

func SendHistoryArchivesProtocolEnabled added in v0.98.1

func SendHistoryArchivesProtocolEnabled()

func SendHistoryArchivesSeeding added in v0.98.1

func SendHistoryArchivesSeeding(communityID string)

func SendHistoryArchivesUnseeded added in v0.98.1

func SendHistoryArchivesUnseeded(communityID string)

func SendImportingHistoryArchiveMessages added in v0.115.6

func SendImportingHistoryArchiveMessages(communityID string)

func SendLocalNotifications added in v0.62.16

func SendLocalNotifications(event interface{})

SendLocalNotifications sends event with a local notification.

func SendLocalPairingEvent added in v0.109.1

func SendLocalPairingEvent(event interface{})

SendLocalPairingEvent sends event from services/pairing/events.

func SendLoggedIn added in v0.35.0

func SendLoggedIn(account *multiaccounts.Account, settings *settings.Settings, ensUsernames json.RawMessage, err error)

func SendMailServerRequestCompleted

func SendMailServerRequestCompleted(requestID types.Hash, lastEnvelopeHash types.Hash, cursor []byte, err error)

SendMailServerRequestCompleted triggered when mail server response has been received

func SendMailServerRequestExpired

func SendMailServerRequestExpired(hash types.Hash)

SendMailServerRequestExpired triggered when mail server request expires

func SendMailserverAvailable added in v0.93.2

func SendMailserverAvailable(nodeAddress, id string)

func SendMailserverChanged added in v0.93.2

func SendMailserverChanged(nodeAddress, id string)

func SendMailserverNotWorking added in v0.96.0

func SendMailserverNotWorking()

func SendMediaServerStarted added in v0.109.4

func SendMediaServerStarted(port int)

SendMediaServerStarted notifies about restarts of the media server

func SendMessageDelivered added in v0.71.5

func SendMessageDelivered(chatID string, messageID string)

SendMessageDelivered notifies about delivered message

func SendNewMessages added in v0.35.0

func SendNewMessages(obj json.Marshaler)

func SendNoHistoryArchivesCreated added in v0.98.1

func SendNoHistoryArchivesCreated(communityID string, from int, to int)

func SendNodeCrashed

func SendNodeCrashed(err error)

SendNodeCrashed emits a signal when status node has crashed, and provides error description.

func SendNodeReady

func SendNodeReady()

SendNodeReady emits a signal when status node has started and successfully completed startup.

func SendNodeStarted

func SendNodeStarted()

SendNodeStarted emits a signal when status node has just started (but not finished startup yet).

func SendNodeStopped

func SendNodeStopped()

SendNodeStopped emits a signal when underlying node has stopped.

func SendPeerStats added in v0.88.1

func SendPeerStats(peerStats types.ConnStatus)

SendPeerStats sends discovery.summary signal.

func SendReEncryptionFinished added in v0.158.0

func SendReEncryptionFinished()

Send db.reencryption.finished signal.

func SendReEncryptionStarted added in v0.158.0

func SendReEncryptionStarted()

Send db.reencryption.started signal.

func SendSignRequestAdded

func SendSignRequestAdded(event PendingRequestEvent)

SendSignRequestAdded sends a signal when a sign request is added.

func SendSignRequestFailed

func SendSignRequestFailed(event PendingRequestEvent, err error, errCode int)

SendSignRequestFailed sends a signal of failed sign request.

func SendStats added in v0.83.8

func SendStats(stats interface{})

SendStats sends stats signal.

func SendStatusUpdatesTimedOut added in v0.104.1

func SendStatusUpdatesTimedOut(statusUpdates interface{})

func SendSubscriptionDataEvent added in v0.35.0

func SendSubscriptionDataEvent(filterID string, data []interface{})

SendSubscriptionDataEvent

func SendSubscriptionErrorEvent added in v0.35.0

func SendSubscriptionErrorEvent(filterID string, err error)

SendSubscriptionErrorEvent

func SendTransactionsForSigningEvent added in v0.171.1

func SendTransactionsForSigningEvent(transactions []string)

func SendUpdateAvailable added in v0.101.1

func SendUpdateAvailable(available bool, latestVersion string, url string)

func SendWakuBackedUpKeypair added in v0.152.2

func SendWakuBackedUpKeypair(obj json.Marshaler)

func SendWakuBackedUpProfile added in v0.117.3

func SendWakuBackedUpProfile(obj json.Marshaler)

func SendWakuBackedUpSettings added in v0.117.3

func SendWakuBackedUpSettings(obj json.Marshaler)

func SendWakuBackedUpWatchOnlyAccount added in v0.152.2

func SendWakuBackedUpWatchOnlyAccount(obj json.Marshaler)

func SendWakuFetchingBackupProgress added in v0.117.3

func SendWakuFetchingBackupProgress(obj json.Marshaler)

func SendWalletEvent added in v0.35.0

func SendWalletEvent(event interface{})

SendWalletEvent sends event from services/wallet/events.

func SetDefaultNodeNotificationHandler

func SetDefaultNodeNotificationHandler(fn NodeNotificationHandler)

SetDefaultNodeNotificationHandler sets notification handler to invoke on Send

func SetMobileSignalHandler added in v0.35.0

func SetMobileSignalHandler(handler MobileSignalHandler)

SetMobileSignalHandler sets new handler for geth events this function uses pure go implementation

func SetSignalEventCallback

func SetSignalEventCallback(cb unsafe.Pointer)

SetSignalEventCallback set callback this function uses C implementation (see `signals.c` file)

func TriggerDefaultNodeNotificationHandler

func TriggerDefaultNodeNotificationHandler(jsonEvent string)

TriggerDefaultNodeNotificationHandler triggers default notification handler (helpful in tests)

func TriggerTestSignal

func TriggerTestSignal()

nolint: golint

Types

type BackupPerformedSignal added in v0.90.0

type BackupPerformedSignal struct {
	LastBackup uint64 `json:"lastBackup"`
}

BackupPerformedSignal signals that a backup has been performed

type BundleAddedSignal added in v0.16.4

type BundleAddedSignal struct {
	Identity       string `json:"identity"`
	InstallationID string `json:"installationID"`
}

BundleAddedSignal holds the identity and installation id of the user

type CommunityInfoFoundSignal added in v0.76.3

type CommunityInfoFoundSignal struct {
	Name         string `json:"name"`
	Description  string `json:"description"`
	MembersCount int    `json:"membersCount"`
	Verified     bool   `json:"verified"`
}

MessageDeliveredSignal specifies chat and message that was delivered

type CommunityMemberReevaluationSignal added in v0.179.15

type CommunityMemberReevaluationSignal struct {
	CommunityID string             `json:"communityId"`
	Status      ReevaluationStatus `json:"status"`
}

type CommunityTokenTransactionSignal added in v0.179.19

type CommunityTokenTransactionSignal struct {
	TransactionType string                `json:"transactionType"`
	Success         bool                  `json:"success"`                  // transaction's status
	Hash            common.Hash           `json:"hash"`                     // transaction hash
	CommunityToken  *token.CommunityToken `json:"communityToken,omitempty"` // community token changed by transaction
	OwnerToken      *token.CommunityToken `json:"ownerToken,omitempty"`     // owner token emitted by deployment transaction
	MasterToken     *token.CommunityToken `json:"masterToken,omitempty"`    // master token emitted by deployment transaction
	ErrorString     string                `json:"errorString"`              // information about failed operation
}

type CreatingHistoryArchivesSignal added in v0.98.1

type CreatingHistoryArchivesSignal struct {
	CommunityID string `json:"communityId"`
}

type DecryptMessageFailedSignal added in v0.15.1

type DecryptMessageFailedSignal struct {
	Sender string `json:"sender"`
}

DecryptMessageFailedSignal holds the sender of the message that could not be decrypted

type DiscordCategoriesAndChannelsExtractedSignal added in v0.105.1

type DiscordCategoriesAndChannelsExtractedSignal struct {
	Categories             []*discord.Category             `json:"discordCategories"`
	Channels               []*discord.Channel              `json:"discordChannels"`
	OldestMessageTimestamp int64                           `json:"oldestMessageTimestamp"`
	Errors                 map[string]*discord.ImportError `json:"errors"`
}

type DiscordChannelImportCancelledSignal added in v0.171.11

type DiscordChannelImportCancelledSignal struct {
	ChannelID string `json:"channelId"`
}

type DiscordChannelImportFinishedSignal added in v0.171.11

type DiscordChannelImportFinishedSignal struct {
	CommunityID string `json:"communityId"`
	ChannelID   string `json:"channelId"`
}

type DiscordChannelImportProgressSignal added in v0.171.11

type DiscordChannelImportProgressSignal struct {
	ImportProgress *discord.ImportProgress `json:"importProgress"`
}

type DiscordCommunityImportCancelledSignal added in v0.114.1

type DiscordCommunityImportCancelledSignal struct {
	CommunityID string `json:"communityId"`
}

type DiscordCommunityImportCleanedUpSignal added in v0.174.5

type DiscordCommunityImportCleanedUpSignal struct {
	CommunityID string `json:"communityId"`
}

type DiscordCommunityImportFinishedSignal added in v0.114.1

type DiscordCommunityImportFinishedSignal struct {
	CommunityID string `json:"communityId"`
}

type DiscordCommunityImportProgressSignal added in v0.114.1

type DiscordCommunityImportProgressSignal struct {
	ImportProgress *discord.ImportProgress `json:"importProgress"`
}

type DownloadingHistoryArchivesFinishedSignal added in v0.109.4

type DownloadingHistoryArchivesFinishedSignal struct {
	CommunityID string `json:"communityId"`
}

type DownloadingHistoryArchivesStartedSignal added in v0.115.5

type DownloadingHistoryArchivesStartedSignal struct {
	CommunityID string `json:"communityId"`
}

type EnodeDiscoveredSignal

type EnodeDiscoveredSignal struct {
	Enode string `json:"enode"`
	Topic string `json:"topic"`
}

EnodeDiscoveredSignal includes enode address and topic

type Envelope

type Envelope struct {
	Type  string      `json:"type"`
	Event interface{} `json:"event"`
}

Envelope is a general signal sent upward from node to RN app

func NewEnvelope

func NewEnvelope(typ string, event interface{}) *Envelope

NewEnvelope creates new envlope of given type and event payload.

type EnvelopeSignal

type EnvelopeSignal struct {
	IDs     []hexutil.Bytes `json:"ids"`
	Hash    types.Hash      `json:"hash"`
	Message string          `json:"message"`
}

EnvelopeSignal includes hash of the envelope.

type Filter added in v0.35.0

type Filter struct {
	// ChatID is the identifier of the chat
	ChatID string `json:"chatId"`
	// SymKeyID is the symmetric key id used for symmetric chats
	SymKeyID string `json:"symKeyId"`
	// OneToOne tells us if we need to use asymmetric encryption for this chat
	Listen bool `json:"listen"`
	// FilterID the whisper filter id generated
	FilterID string `json:"filterId"`
	// Identity is the public key of the other recipient for non-public chats
	Identity string `json:"identity"`
	// Topic is the whisper topic
	Topic types.TopicType `json:"topic"`
}

type HistoryArchiveDownloadedSignal added in v0.98.1

type HistoryArchiveDownloadedSignal struct {
	CommunityID string `json:"communityId"`
	From        int    `json:"from"`
	To          int    `json:"to"`
}

type HistoryArchivesCreatedSignal added in v0.98.1

type HistoryArchivesCreatedSignal struct {
	CommunityID string `json:"communityId"`
	From        int    `json:"from"`
	To          int    `json:"to"`
}

type HistoryArchivesSeedingSignal added in v0.98.1

type HistoryArchivesSeedingSignal struct {
	CommunityID string `json:"communityId"`
}

type HistoryArchivesUnseededSignal added in v0.98.1

type HistoryArchivesUnseededSignal struct {
	CommunityID string `json:"communityId"`
}

type HistoryMessagesSignal added in v0.89.2

type HistoryMessagesSignal struct {
	RequestID  string `json:"requestId"`
	PeerID     string `json:"peerId"`
	BatchIndex int    `json:"batchIndex"`
	NumBatches int    `json:"numBatches,omitempty"`
	ErrorMsg   string `json:"errorMessage,omitempty"`
}

type ImportingHistoryArchiveMessagesSignal added in v0.115.6

type ImportingHistoryArchiveMessagesSignal struct {
	CommunityID string `json:"communityId"`
}

type MailServerResponseSignal

type MailServerResponseSignal struct {
	RequestID        types.Hash `json:"requestID"`
	LastEnvelopeHash types.Hash `json:"lastEnvelopeHash"`
	Cursor           string     `json:"cursor"`
	ErrorMsg         string     `json:"errorMessage"`
}

MailServerResponseSignal holds the data received in the response from the mailserver.

type MailserverSignal added in v0.93.2

type MailserverSignal struct {
	Address string `json:"address"`
	ID      string `json:"id"`
}

type MediaServerStarted added in v0.109.4

type MediaServerStarted struct {
	Port int `json:"port"`
}

MediaServerStarted specifies chat and message that was delivered

type MessageDeliveredSignal added in v0.71.5

type MessageDeliveredSignal struct {
	ChatID    string `json:"chatID"`
	MessageID string `json:"messageID"`
}

MessageDeliveredSignal specifies chat and message that was delivered

type MobileSignalHandler added in v0.35.0

type MobileSignalHandler func([]byte)

MobileSignalHandler is a simple callback function that gets called when any signal is received

type NoHistoryArchivesCreatedSignal added in v0.98.1

type NoHistoryArchivesCreatedSignal struct {
	CommunityID string `json:"communityId"`
	From        int    `json:"from"`
	To          int    `json:"to"`
}

type NodeCrashEvent

type NodeCrashEvent struct {
	Error string `json:"error"`
}

NodeCrashEvent is special kind of error, used to report node crashes

type NodeLoginEvent added in v0.35.0

type NodeLoginEvent struct {
	Error        string                 `json:"error,omitempty"`
	Settings     *settings.Settings     `json:"settings,omitempty"`
	Account      *multiaccounts.Account `json:"account,omitempty"`
	EnsUsernames json.RawMessage        `json:"ensUsernames,omitempty"`
}

NodeLoginEvent returns the result of the login event

type NodeNotificationHandler

type NodeNotificationHandler func(jsonEvent string)

NodeNotificationHandler defines a handler able to process incoming node events. Events are encoded as JSON strings.

type PendingRequestErrorEvent

type PendingRequestErrorEvent struct {
	PendingRequestEvent
	ErrorMessage string `json:"error_message"`
	ErrorCode    int    `json:"error_code,string"`
}

PendingRequestErrorEvent is a signal sent when sign request has failed

type PendingRequestEvent

type PendingRequestEvent struct {
	ID        string      `json:"id"`
	Method    string      `json:"method"`
	Args      interface{} `json:"args"`
	MessageID string      `json:"message_id"`
}

PendingRequestEvent is a signal sent when a sign request is added

type ReevaluationStatus added in v0.179.15

type ReevaluationStatus uint
const (
	None ReevaluationStatus = iota
	InProgress
	Done
)

type SubscriptionDataEvent added in v0.35.0

type SubscriptionDataEvent struct {
	FilterID string        `json:"subscription_id"`
	Data     []interface{} `json:"data"`
}

type SubscriptionErrorEvent added in v0.35.0

type SubscriptionErrorEvent struct {
	FilterID     string `json:"subscription_id"`
	ErrorMessage string `json:"error_message"`
}

type UnsignedTransactions added in v0.171.1

type UnsignedTransactions struct {
	Type         string   `json:"type"`
	Transactions []string `json:"transactions"`
}

type UpdateAvailableSignal added in v0.101.1

type UpdateAvailableSignal struct {
	Available bool   `json:"available"`
	Version   string `json:"version"`
	URL       string `json:"url"`
}

Jump to

Keyboard shortcuts

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