requests

package
v0.184.50 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: MPL-2.0, MPL-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorLogLevel = "ERROR"
	WarnLogLevel  = "WARN"
	InfoLogLevel  = "INFO"
	DebugLogLevel = "DEBUG"
	TraceLogLevel = "TRACE"
)

Variables

View Source
var (
	ErrCheckCommunityChannelPermissionsInvalidID     = errors.New("check-community-channel-permissions: invalid id")
	ErrCheckCommunityChannelPermissionsInvalidChatID = errors.New("check-community-channel-permissions: invalid chat id")
)
View Source
var (
	ErrCreateCommunityInvalidName         = errors.New("create-community: invalid name")
	ErrCreateCommunityInvalidColor        = errors.New("create-community: invalid color")
	ErrCreateCommunityInvalidDescription  = errors.New("create-community: invalid description")
	ErrCreateCommunityInvalidIntroMessage = errors.New("create-community: invalid intro message")
	ErrCreateCommunityInvalidOutroMessage = errors.New("create-community: invalid outro message")
	ErrCreateCommunityInvalidMembership   = errors.New("create-community: invalid membership")
	ErrCreateCommunityInvalidTags         = errors.New("create-community: invalid tags")
)
View Source
var (
	ErrCreateCommunityTokenPermissionInvalidCommunityID    = errors.New("create community token permission needs a valid community id")
	ErrCreateCommunityTokenPermissionTooManyTokenCriteria  = errors.New("too many token criteria")
	ErrCreateCommunityTokenPermissionInvalidPermissionType = errors.New("invalid community token permission type")
	ErrCreateCommunityTokenPermissionInvalidTokenCriteria  = errors.New("invalid community permission token criteria data")
)
View Source
var (
	ErrImportDiscordChannelMissingFilesToImport = errors.New("import-discord-channel: missing files to import")
	ErrImportDiscordChannelChannelIDIsEmpty     = errors.New("import-discord-channel: discord channel id is empty")
	ErrImportDiscordChannelCommunityIDIsEmpty   = errors.New("import-discord-channel: community id is empty")
)

errrors

View Source
var (
	ErrLoginInvalidKeyUID                   = errors.New("login: invalid key-uid")
	ErrLoginInvalidKeycardWhisperPrivateKey = errors.New("login: invalid keycard whisper private key")
)
View Source
var (
	ErrRestoreAccountInvalidMnemonic    = errors.New("restore-account: no mnemonic or keycard is set")
	ErrRestoreAccountMnemonicAndKeycard = errors.New("restore-account: both mnemonic and keycard info are set")
)
View Source
var (
	ErrSetCommunityStorenodesEmpty            = errors.New("set-community-storenodes: empty payload")
	ErrSetCommunityStorenodesTooMany          = errors.New("set-community-storenodes: too many")
	ErrSetCommunityStorenodesMismatch         = errors.New("set-community-storenodes: communityId mismatch")
	ErrSetCommunityStorenodesMissingCommunity = errors.New("set-community-storenodes: missing community")
	ErrSetCommunityStorenodesBadVersion       = errors.New("set-community-storenodes: bad version")
)
View Source
var ErrAcceptContactRequestInvalidID = errors.New("accept-contact-request: invalid id")
View Source
var ErrAcceptLatestContactRequestForContactInvalidID = errors.New("accept-latest-contact-request-for-contact: invalid id")
View Source
var ErrAcceptRequestToJoinCommunityInvalidID = errors.New("accept-request-to-join-community: invalid id")
View Source
var (
	ErrAddCentralizedMetricInvalidMetric = errors.New("add-centralized-metric: no metric")
)
View Source
var ErrAddContactInvalidID = errors.New("add-contact: invalid id")
View Source
var ErrAddRoleToMemberInvalidCommunityID = errors.New("add-role-to-member: invalid community id")
View Source
var ErrAddRoleToMemberInvalidRole = errors.New("add-role-to-member: invalid role")
View Source
var ErrAddRoleToMemberInvalidUser = errors.New("add-role-to-member: invalid user id")
View Source
var ErrAddWalletConnectSessionInvalidDAppName = errors.New("add-wallet-connect-session: invalid dapp name")
View Source
var ErrAddWalletConnectSessionInvalidDAppURL = errors.New("add-wallet-connect-session: invalid dapp url")
View Source
var ErrAddWalletConnectSessionInvalidID = errors.New("add-wallet-connect-session: invalid id")
View Source
var ErrAddWalletConnectSessionInvalidInfo = errors.New("add-wallet-connect-session: invalid info")
View Source
var ErrBanUserFromCommunityInvalidCommunityID = errors.New("ban-user-from-community: invalid community id")
View Source
var ErrBanUserFromCommunityInvalidUser = errors.New("ban-user-from-community: invalid user id")
View Source
var ErrCancelRequestToJoinCommunityInvalidID = errors.New("cancel-request-to-join-community: invalid id")
View Source
var (
	ErrCheckAllCommunityChannelsPermissionsInvalidID = errors.New("check-community-channel-permissions: invalid id")
)
View Source
var (
	ErrCheckPermissionToJoinCommunityInvalidID = errors.New("check-permission-to-join-community: invalid id")
)
View Source
var ErrClearHistoryInvalidID = errors.New("clear-history: invalid id")
View Source
var ErrCommunityMemberMessagesCommunityID = errors.New("community member messages: invalid id")
View Source
var ErrCommunityMemberMessagesMemberPK = errors.New("community member messages: invalid member PK")
View Source
var ErrCreateAccountInvalidCustomizationColor = errors.New("create-account: invalid customization color")
View Source
var ErrCreateAccountInvalidDisplayName = errors.New("create-account: invalid display name")
View Source
var ErrCreateAccountInvalidPassword = errors.New("create-account: invalid password")
View Source
var ErrCreateAccountInvalidRootDataDir = errors.New("create-account: invalid root data directory")
View Source
var ErrCreateAccountInvalidRootKeystoreDir = errors.New("create-account: invalid root keystore directory")
View Source
var ErrCreateCommunityCategoryInvalidCommunityID = errors.New("create-community-category: invalid community id")
View Source
var ErrCreateCommunityCategoryInvalidName = errors.New("create-community-category: invalid category name")
View Source
var ErrCreateOneToOneChatInvalidID = errors.New("create-one-to-one-chat: invalid id")
View Source
var ErrCreatePublicChatInvalidID = errors.New("create-public-chat: invalid id")
View Source
var ErrDeactivateChatInvalidID = errors.New("deactivate-chat: invalid id")
View Source
var ErrDeclineContactRequestInvalidID = errors.New("decline-contact-request: invalid id")
View Source
var ErrDeclineRequestToJoinCommunityInvalidID = errors.New("accept-request-to-join-community: invalid id")
View Source
var ErrDeleteCommunityCategoryInvalidCategoryID = errors.New("delete-community-category: invalid category id")
View Source
var ErrDeleteCommunityCategoryInvalidCommunityID = errors.New("delete-community-category: invalid community id")
View Source
var ErrDeleteCommunityMemberMessagesInvalidCommunityID = errors.New("delete-community-member-messages: invalid community id")
View Source
var ErrDeleteCommunityMemberMessagesInvalidData = errors.New("delete-community-member-messages: invalid data")
View Source
var ErrDeleteCommunityMemberMessagesInvalidDeleteAll = errors.New("delete-community-member-messages: invalid delete all setup")
View Source
var ErrDeleteCommunityMemberMessagesInvalidDeleteMessagesByID = errors.New("delete-community-member-messages: invalid delete messages by ID setups")
View Source
var ErrDeleteCommunityMemberMessagesInvalidMemberID = errors.New("delete-community-member-messages: invalid member id")
View Source
var ErrDeleteCommunityMemberMessagesInvalidMsgChatID = errors.New("delete-community-member-messages: invalid messages chatId")
View Source
var ErrDeleteCommunityMemberMessagesInvalidMsgID = errors.New("delete-community-member-messages: invalid messages Id")
View Source
var ErrDeleteCommunityTokenPermissionInvalidCommunityID = errors.New("delete community token permission needs a valid community id ")
View Source
var ErrDeleteCommunityTokenPermissionInvalidPermissionID = errors.New("invalid token permission id")
View Source
var (
	ErrDismissCommunityNotificationsInvalidID = errors.New("dismiss-community-notifications: invalid id")
)
View Source
var ErrDismissLatestContactRequestForContactInvalidID = errors.New("dismiss-latest-contact-request-for-contact: invalid id")
View Source
var ErrEditCommunityCategoryInvalidCategoryID = errors.New("edit-community-category: invalid category id")
View Source
var ErrEditCommunityCategoryInvalidCommunityID = errors.New("edit-community-category: invalid community id")
View Source
var ErrEditCommunityCategoryInvalidName = errors.New("edit-community-category: invalid category name")
View Source
var (
	ErrEditCommunityInvalidID = errors.New("edit-community: invalid id")
)
View Source
var (
	ErrEditCommunityTokenPermissionInvalidID = errors.New("invalid community token permission id")
)
View Source
var ErrEditMessageInvalidID = errors.New("edit-message: invalid id")
View Source
var ErrEditMessageInvalidText = errors.New("edit-message: invalid text")
View Source
var ErrEnableAndSyncInstallationInvalidID = errors.New("enable and sync installation: invalid installation id")
View Source
var ErrEnableInstallationAndPairInvalidID = errors.New("enable installation and pair: invalid installation id")
View Source
var ErrFetchMessagesInvalidID = errors.New("fetch-messages: invalid id")
View Source
var ErrGetPermissionedBalancesMissingID = errors.New("GetPermissionedBalances: missing community ID")
View Source
var (
	ErrImportDiscordCommunityMissingFilesToImport = errors.New("import-discord-community: missing files to import")
)
View Source
var (
	ErrInitializeApplicationInvalidDataDir = errors.New("initialize-centralized-metric: no dataDir")
)
View Source
var ErrInvalidCommunityID = errors.New("invalid community id")
View Source
var ErrInvalidMuteCategoryParams = errors.New("mute-category: invalid params")
View Source
var ErrInvalidMuteChatParams = errors.New("mute-chat: invalid params")
View Source
var ErrInvalidMuteCommunityParams = errors.New("mute-community: invalid params")
View Source
var ErrInvalidSignature = errors.New("invalid signature")
View Source
var ErrInvalidTimestampIntervals = errors.New("community metrics request invalid time intervals")
View Source
var ErrMissingAirdropAddress = errors.New("airdropAddress is needed")
View Source
var ErrMissingPassword = errors.New("password is necessary when sending a list of addresses")
View Source
var ErrMissingSharedAddresses = errors.New("list of shared addresses is needed")
View Source
var ErrNoAirdropAddressAmongAddressesToReveal = errors.New("airdropAddress must be in the set of addresses to reveal")
View Source
var ErrNoCommunityID = errors.New("community metrics request has no community id")
View Source
var ErrRemoveRoleFromMemberInvalidCommunityID = errors.New("remove-role-from-member: invalid community id")
View Source
var ErrRemoveRoleFromMemberInvalidRole = errors.New("remove-role-from-member: invalid role")
View Source
var ErrRemoveRoleFromMemberInvalidUser = errors.New("remove-role-from-member: invalid user id")
View Source
var ErrReorderCommunityCategoryInvalidCategoryID = errors.New("reorder-community-category: invalid category id")
View Source
var ErrReorderCommunityCategoryInvalidCommunityID = errors.New("reorder-community-category: invalid community id")
View Source
var ErrReorderCommunityCategoryInvalidPosition = errors.New("reorder-community-category: invalid position")
View Source
var ErrReorderCommunityChatInvalidChatID = errors.New("reorder-community-chat: invalid chat id")
View Source
var ErrReorderCommunityChatInvalidCommunityID = errors.New("reorder-community-chat: invalid community id")
View Source
var ErrReorderCommunityChatInvalidPosition = errors.New("reorder-community-chat: invalid position")
View Source
var ErrRequestToJoinCommunityInvalidCommunityID = errors.New("request-to-join-community: invalid community id")
View Source
var ErrRequestToJoinCommunityInvalidSignature = errors.New("request-to-join-community: invalid signature")
View Source
var ErrRequestToJoinCommunityMissingPassword = errors.New("request-to-join-community: password is necessary when sending a list of addresses")
View Source
var ErrRequestToJoinCommunityNoAddressesToReveal = errors.New("request-to-join-community: no addresses to reveal")
View Source
var ErrRequestToJoinNoAirdropAddress = errors.New("request-to-join-community: airdropAddress is necessary when sending a list of addresses")
View Source
var ErrRequestToJoinNoAirdropAddressAmongAddressesToReveal = errors.New("request-to-join-community: airdropAddress must be in the set of addresses to reveal")
View Source
var ErrRetractContactRequestInvalidContactID = errors.New("retract-contact-request: invalid id")
View Source
var ErrSendContactRequestInvalidID = errors.New("send-contact-request: invalid id")
View Source
var ErrSendContactRequestInvalidMessage = errors.New("send-contact-request: invalid message")
View Source
var ErrSendGroupChatMessageInvalidID = errors.New("send-group-chat-message: invalid id")
View Source
var ErrSendGroupChatMessageInvalidMessage = errors.New("send-group-chat-message: invalid message")
View Source
var ErrSendOneToOneMessageInvalidID = errors.New("send-one-to-one-message: invalid id")
View Source
var ErrSendOneToOneMessageInvalidMessage = errors.New("send-one-to-one-message: invalid message")
View Source
var ErrSetContactLocalNicknameInvalidID = errors.New("add-contact: invalid id")
View Source
var ErrSetCustomizationColorInvalidColor = errors.New("customizationColor: invalid color")
View Source
var ErrSetCustomizationColorInvalidKeyUID = errors.New("keyUid: invalid id")
View Source
var ErrSetLogLevelInvalidLogLevel = errors.New("set-log-level: invalid log level")
View Source
var ErrShareCommunityEmptyUsers = errors.New("share-community: empty users")
View Source
var ErrShareCommunityInvalidID = errors.New("share-community: invalid id")
View Source
var ErrShareMessageEmptyUsers = errors.New("share image message: empty users")
View Source
var ErrShareMessageInvalidID = errors.New("share image message: invalid id")
View Source
var ErrToggleCollapsedCommunityCategoryInvalidCommunityID = errors.New("toggle-collapsed-community-category: invalid community id")
View Source
var ErrToggleCollapsedCommunityCategoryInvalidName = errors.New("toggle-collapsed-community-category: invalid category name")
View Source
var ErrUnbanUserFromCommunityInvalidCommunityID = errors.New("unban-user-from-community: invalid community id")
View Source
var ErrUnbanUserFromCommunityInvalidUser = errors.New("unban-user-from-community: invalid user id")
View Source
var ErrUpsertSwitcherCardInvalidCardID = errors.New("upsert-switcher-card: invalid card id")
View Source
var ErrVerifiedTrustedInvalidID = errors.New("verified-trusted: invalid id")
View Source
var ErrVerifiedUntrustworthyInvalidID = errors.New("verified-untrustworthy: invalid id")

Functions

func AvailableTagsCount added in v0.178.0

func AvailableTagsCount() int

func AvailableTagsEmojis added in v0.178.0

func AvailableTagsEmojis() map[string]string

func ConvertCompressedToLegacyKey added in v0.138.8

func ConvertCompressedToLegacyKey(k string) (string, error)

func RemoveUnknownAndDeduplicateTags added in v0.102.5

func RemoveUnknownAndDeduplicateTags(input []string) []string

func TagByIndex added in v0.178.0

func TagByIndex(i uint32) string

func TagEmoji added in v0.178.0

func TagEmoji(tag string) string

func TagIndex added in v0.178.0

func TagIndex(tag string) uint32

func ValidateTags added in v0.102.5

func ValidateTags(input []string) bool

Types

type APIConfig added in v0.179.2

type APIConfig struct {
	APIModules       string   `json:"apiModules"`
	ConnectorEnabled bool     `json:"connectorEnabled"`
	HTTPEnabled      bool     `json:"httpEnabled"`
	HTTPHost         string   `json:"httpHost"`
	HTTPPort         int      `json:"httpPort"`
	HTTPVirtualHosts []string `json:"httpVirtualHosts"`
	WSEnabled        bool     `json:"wsEnabled"`
	WSHost           string   `json:"wsHost"`
	WSPort           int      `json:"wsPort"`
}

type AcceptContactRequest added in v0.100.0

type AcceptContactRequest struct {
	ID types.HexBytes `json:"id"`
}

func (*AcceptContactRequest) Validate added in v0.100.0

func (a *AcceptContactRequest) Validate() error

type AcceptLatestContactRequestForContact added in v0.102.2

type AcceptLatestContactRequestForContact struct {
	ID types.HexBytes `json:"id"`
}

func (*AcceptLatestContactRequestForContact) Validate added in v0.102.2

type AcceptRequestToJoinCommunity

type AcceptRequestToJoinCommunity struct {
	ID types.HexBytes `json:"id"`
}

func (*AcceptRequestToJoinCommunity) Validate

func (j *AcceptRequestToJoinCommunity) Validate() error

type AddCentralizedMetric added in v0.181.35

type AddCentralizedMetric struct {
	Metric *common.Metric `json:"metric"`
}

func (*AddCentralizedMetric) Validate added in v0.181.35

func (a *AddCentralizedMetric) Validate() error

type AddContact added in v0.90.0

type AddContact struct {
	ID                 string `json:"id"`
	Nickname           string `json:"nickname"`
	DisplayName        string `json:"displayName"`
	ENSName            string `json:"ensName"`
	CustomizationColor string `json:"customizationColor,omitempty"`
}

func (*AddContact) HexID added in v0.138.8

func (a *AddContact) HexID() (string, error)

func (*AddContact) Validate added in v0.90.0

func (a *AddContact) Validate() error

type AddRoleToMember added in v0.115.5

type AddRoleToMember struct {
	CommunityID types.HexBytes                 `json:"communityId"`
	User        types.HexBytes                 `json:"user"`
	Role        protobuf.CommunityMember_Roles `json:"role"`
}

func (*AddRoleToMember) Validate added in v0.115.5

func (a *AddRoleToMember) Validate() error

type AddWalletConnectSession added in v0.105.1

type AddWalletConnectSession struct {
	PeerID   string `json:"id"`
	DAppName string `json:"dappName"`
	DAppURL  string `json:"dappUrl"`
	Info     string `json:"info"`
}

func (*AddWalletConnectSession) Validate added in v0.105.1

func (c *AddWalletConnectSession) Validate() error

type BanUserFromCommunity added in v0.73.9

type BanUserFromCommunity struct {
	CommunityID       types.HexBytes `json:"communityId"`
	User              types.HexBytes `json:"user"`
	DeleteAllMessages bool           `json:"deleteAllMessages"`
}

func (*BanUserFromCommunity) Validate added in v0.73.9

func (b *BanUserFromCommunity) Validate() error

type BuildContact added in v0.138.3

type BuildContact struct {
	PublicKey string `json:"publicKey"`
	ENSName   string `json:"ENSName"`
}

type CancelRequestToJoinCommunity added in v0.114.1

type CancelRequestToJoinCommunity struct {
	ID types.HexBytes `json:"id"`
}

func (*CancelRequestToJoinCommunity) Validate added in v0.114.1

func (j *CancelRequestToJoinCommunity) Validate() error

type CheckAllCommunityChannelsPermissions added in v0.159.2

type CheckAllCommunityChannelsPermissions struct {
	CommunityID types.HexBytes
	Addresses   []string `json:"addresses"`
}

func (*CheckAllCommunityChannelsPermissions) Validate added in v0.159.2

type CheckCommunityChannelPermissions added in v0.159.2

type CheckCommunityChannelPermissions struct {
	CommunityID types.HexBytes
	ChatID      string
	Addresses   []string `json:"addresses"`
}

func (*CheckCommunityChannelPermissions) Validate added in v0.159.2

type CheckPermissionToJoinCommunity added in v0.151.13

type CheckPermissionToJoinCommunity struct {
	CommunityID types.HexBytes `json:"communityId"`
	Addresses   []string       `json:"addresses"`
}

func (*CheckPermissionToJoinCommunity) Validate added in v0.151.13

func (u *CheckPermissionToJoinCommunity) Validate() error

type ClearHistory added in v0.79.0

type ClearHistory struct {
	ID string `json:"id"`
}

func (*ClearHistory) Validate added in v0.79.0

func (c *ClearHistory) Validate() error

type CommunityChannelShareURL added in v0.161.2

type CommunityChannelShareURL struct {
	CommunityID types.HexBytes
	ChannelID   string
}

func (*CommunityChannelShareURL) Validate added in v0.161.2

func (r *CommunityChannelShareURL) Validate() error

type CommunityMemberMessages added in v0.177.0

type CommunityMemberMessages struct {
	CommunityID     string `json:"communityId"`
	MemberPublicKey string `json:"memberPublicKey"`
}

func (*CommunityMemberMessages) Validate added in v0.177.0

func (c *CommunityMemberMessages) Validate() error

type CommunityMetricsRequest added in v0.162.14

type CommunityMetricsRequest struct {
	CommunityID types.HexBytes              `json:"communityId"`
	Type        CommunityMetricsRequestType `json:"type"`
	Intervals   []MetricsIntervalRequest    `json:"intervals"`
}

func (*CommunityMetricsRequest) Validate added in v0.162.14

func (r *CommunityMetricsRequest) Validate() error

type CommunityMetricsRequestType added in v0.162.14

type CommunityMetricsRequestType uint
const (
	CommunityMetricsRequestMessagesTimestamps CommunityMetricsRequestType = iota
	CommunityMetricsRequestMessagesCount
	CommunityMetricsRequestMembers
	CommunityMetricsRequestControlNodeUptime
)

type CreateAccount added in v0.138.8

type CreateAccount struct {
	// RootDataDir is an absolute path to the root directory where all data will be stored.
	RootDataDir   string `json:"rootDataDir"`
	KdfIterations int    `json:"kdfIterations"`

	DeviceName         string              `json:"deviceName"`
	DisplayName        string              `json:"displayName"`
	Password           string              `json:"password"`
	ImagePath          string              `json:"imagePath"`
	ImageCropRectangle *ImageCropRectangle `json:"imageCropRectangle"`
	CustomizationColor string              `json:"customizationColor"`

	WakuV2Nameserver                             *string `json:"wakuV2Nameserver"`
	WakuV2LightClient                            bool    `json:"wakuV2LightClient"`
	WakuV2EnableStoreConfirmationForMessagesSent bool    `json:"wakuV2EnableStoreConfirmationForMessagesSent"`
	WakuV2EnableMissingMessageVerification       bool    `json:"wakuV2EnableMissingMessageVerification"`
	WakuV2Fleet                                  string  `json:"wakuV2Fleet"`

	LogLevel    *string `json:"logLevel"`
	LogFilePath string  `json:"logFilePath"` // absolute path
	LogEnabled  bool    `json:"logEnabled"`

	PreviewPrivacy bool `json:"previewPrivacy"`

	VerifyTransactionURL     *string `json:"verifyTransactionURL"`
	VerifyENSURL             *string `json:"verifyENSURL"`
	VerifyENSContractAddress *string `json:"verifyENSContractAddress"`
	VerifyTransactionChainID *int64  `json:"verifyTransactionChainID"`
	UpstreamConfig           string  `json:"upstreamConfig"`

	// Deprecated: CurrentNetwork is deprecated. It was passed and not used, so nothing should be passed instead.
	// If you want to use non-default network, use NetworkID.
	CurrentNetwork       string           `json:"currentNetwork"`
	NetworkID            *uint64          `json:"networkId"`
	TestOverrideNetworks []params.Network `json:"-"` // This is used for testing purposes only

	TestNetworksEnabled bool `json:"testNetworksEnabled"`

	WalletSecretsConfig

	TorrentConfigEnabled *bool
	TorrentConfigPort    *int

	TelemetryServerURL string `json:"telemetryServerURL"`

	APIConfig *APIConfig `json:"apiConfig"`

	KeycardInstanceUID     string  `json:"keycardInstanceUID"`
	KeycardPairingDataFile *string `json:"keycardPairingDataFile"`
	StatusProxyEnabled     bool    `json:"statusProxyEnabled"`
}

func (*CreateAccount) Validate added in v0.138.8

func (c *CreateAccount) Validate(validation *CreateAccountValidation) error

type CreateAccountValidation added in v0.178.0

type CreateAccountValidation struct {
	AllowEmptyDisplayName        bool
	AllowEmptyPassword           bool
	AllowEmptyCustomizationColor bool
}

NOTE: Reasoning for this struct here: https://github.com/status-im/status-go/pull/4980#discussion_r1539219099

type CreateCommunity

type CreateCommunity struct {
	Name                         string                               `json:"name"`
	Description                  string                               `json:"description"`
	IntroMessage                 string                               `json:"introMessage,omitempty"`
	OutroMessage                 string                               `json:"outroMessage,omitempty"`
	Color                        string                               `json:"color"`
	Emoji                        string                               `json:"emoji"`
	Membership                   protobuf.CommunityPermissions_Access `json:"membership"`
	EnsOnly                      bool                                 `json:"ensOnly"`
	Image                        string                               `json:"image"`
	ImageAx                      int                                  `json:"imageAx"`
	ImageAy                      int                                  `json:"imageAy"`
	ImageBx                      int                                  `json:"imageBx"`
	ImageBy                      int                                  `json:"imageBy"`
	Banner                       images.CroppedImage                  `json:"banner"`
	HistoryArchiveSupportEnabled bool                                 `json:"historyArchiveSupportEnabled,omitempty"`
	PinMessageAllMembersEnabled  bool                                 `json:"pinMessageAllMembersEnabled,omitempty"`
	Tags                         []string                             `json:"tags,omitempty"`
}

func (*CreateCommunity) ToCommunityDescription

func (c *CreateCommunity) ToCommunityDescription() (*protobuf.CommunityDescription, error)

func (*CreateCommunity) Validate

func (c *CreateCommunity) Validate() error

type CreateCommunityCategory added in v0.79.3

type CreateCommunityCategory struct {
	CommunityID  types.HexBytes `json:"communityId"`
	CategoryName string         `json:"categoryName"`
	ChatIDs      []string       `json:"chatIds"`
	ThirdPartyID string         `json:"thirdPartyID,omitempty"`
}

func (*CreateCommunityCategory) Validate added in v0.79.3

func (j *CreateCommunityCategory) Validate() error

type CreateCommunityTokenPermission added in v0.136.0

type CreateCommunityTokenPermission struct {
	CommunityID   types.HexBytes                         `json:"communityId"`
	Type          protobuf.CommunityTokenPermission_Type `json:"type"`
	TokenCriteria []*protobuf.TokenCriteria              `json:"tokenCriteria"`
	IsPrivate     bool                                   `json:"isPrivate"`
	ChatIds       []string                               `json:"chat_ids"`
}

func (*CreateCommunityTokenPermission) FillDeprecatedAmount added in v0.176.1

func (p *CreateCommunityTokenPermission) FillDeprecatedAmount()

func (*CreateCommunityTokenPermission) ToCommunityTokenPermission added in v0.136.0

func (p *CreateCommunityTokenPermission) ToCommunityTokenPermission() protobuf.CommunityTokenPermission

func (*CreateCommunityTokenPermission) Validate added in v0.136.0

func (p *CreateCommunityTokenPermission) Validate() error

type CreateOneToOneChat

type CreateOneToOneChat struct {
	ID      types.HexBytes `json:"id"`
	ENSName string         `json:"ensName"`
}

func (*CreateOneToOneChat) Validate

func (c *CreateOneToOneChat) Validate() error

type CreateProfileChat deprecated added in v0.79.0

type CreateProfileChat struct {
	ID string `json:"id"`
}

Deprecated: CreateProfileChat shouldn't be used and is only left here in case profile chat feature is re-introduced.

func (*CreateProfileChat) Validate deprecated added in v0.79.0

func (c *CreateProfileChat) Validate() error

Deprecated: Validate shouldn't be used and is only left here in case profile chat feature is re-introduced.

type CreatePublicChat added in v0.79.0

type CreatePublicChat struct {
	ID string `json:"id"`
}

func (*CreatePublicChat) Validate added in v0.79.0

func (c *CreatePublicChat) Validate() error

type DeactivateChat added in v0.79.0

type DeactivateChat struct {
	ID              string `json:"id"`
	PreserveHistory bool   `json:"preserveHistory"`
}

func (*DeactivateChat) Validate added in v0.79.0

func (j *DeactivateChat) Validate() error

type DeclineContactRequest added in v0.131.11

type DeclineContactRequest struct {
	ID types.HexBytes `json:"id"`
}

func (*DeclineContactRequest) Validate added in v0.131.11

func (a *DeclineContactRequest) Validate() error

type DeclineRequestToJoinCommunity

type DeclineRequestToJoinCommunity struct {
	ID types.HexBytes `json:"id"`
}

func (*DeclineRequestToJoinCommunity) Validate

func (j *DeclineRequestToJoinCommunity) Validate() error

type DeleteCommunityCategory added in v0.79.3

type DeleteCommunityCategory struct {
	CommunityID types.HexBytes `json:"communityId"`
	CategoryID  string         `json:"categoryId"`
}

func (*DeleteCommunityCategory) Validate added in v0.79.3

func (j *DeleteCommunityCategory) Validate() error

type DeleteCommunityMemberMessages added in v0.177.0

type DeleteCommunityMemberMessages struct {
	CommunityID  types.HexBytes                           `json:"communityId"`
	MemberPubKey string                                   `json:"memberPubKey"`
	Messages     []*protobuf.DeleteCommunityMemberMessage `json:"messages"`
	DeleteAll    bool                                     `json:"deleteAll"`
}

func (*DeleteCommunityMemberMessages) Validate added in v0.177.0

func (d *DeleteCommunityMemberMessages) Validate() error

type DeleteCommunityTokenPermission added in v0.136.0

type DeleteCommunityTokenPermission struct {
	CommunityID  types.HexBytes `json:"communityId"`
	PermissionID string         `json:"permissionId"`
}

func (*DeleteCommunityTokenPermission) Validate added in v0.136.0

func (r *DeleteCommunityTokenPermission) Validate() error

type DismissCommunityNotifications added in v0.171.27

type DismissCommunityNotifications struct {
	CommunityID types.HexBytes `json:"communityId"`
}

func (*DismissCommunityNotifications) Validate added in v0.171.27

func (r *DismissCommunityNotifications) Validate() error

type DismissLatestContactRequestForContact added in v0.102.2

type DismissLatestContactRequestForContact struct {
	ID types.HexBytes `json:"id"`
}

func (*DismissLatestContactRequestForContact) Validate added in v0.102.2

type EditCommunity added in v0.79.0

type EditCommunity struct {
	CommunityID types.HexBytes
	CreateCommunity
}

func (*EditCommunity) Validate added in v0.79.0

func (u *EditCommunity) Validate() error

type EditCommunityCategory added in v0.79.3

type EditCommunityCategory struct {
	CommunityID  types.HexBytes `json:"communityId"`
	CategoryID   string         `json:"categoryId"`
	CategoryName string         `json:"categoryName"`
	ChatIDs      []string       `json:"chatIds"`
}

func (*EditCommunityCategory) Validate added in v0.79.3

func (j *EditCommunityCategory) Validate() error

type EditCommunityTokenPermission added in v0.136.0

type EditCommunityTokenPermission struct {
	PermissionID string `json:"permissionId"`
	CreateCommunityTokenPermission
}

func (*EditCommunityTokenPermission) ToCommunityTokenPermission added in v0.136.0

func (u *EditCommunityTokenPermission) ToCommunityTokenPermission() protobuf.CommunityTokenPermission

func (*EditCommunityTokenPermission) Validate added in v0.136.0

func (u *EditCommunityTokenPermission) Validate() error

type EditMessage added in v0.80.3

type EditMessage struct {
	ID                 types.HexBytes                   `json:"id"`
	Text               string                           `json:"text"`
	ContentType        protobuf.ChatMessage_ContentType `json:"content-type"`
	LinkPreviews       []common.LinkPreview             `json:"linkPreviews"`
	StatusLinkPreviews []common.StatusLinkPreview       `json:"statusLinkPreviews"`
}

func (*EditMessage) Validate added in v0.80.3

func (e *EditMessage) Validate() error

type EditSharedAddresses added in v0.161.4

type EditSharedAddresses struct {
	CommunityID       types.HexBytes   `json:"communityId"`
	AddressesToReveal []string         `json:"addressesToReveal"`
	Signatures        []types.HexBytes `json:"signatures"` // the order of signatures should match the order of addresses
	AirdropAddress    string           `json:"airdropAddress"`
}

func (*EditSharedAddresses) Validate added in v0.161.4

func (j *EditSharedAddresses) Validate() error

type EnableAndSyncInstallation added in v0.182.40

type EnableAndSyncInstallation struct {
	InstallationID string `json:"installationId"`
}

func (*EnableAndSyncInstallation) Validate added in v0.182.40

func (j *EnableAndSyncInstallation) Validate() error

type EnableInstallationAndPair added in v0.182.40

type EnableInstallationAndPair struct {
	InstallationID string `json:"installationId"`
}

func (*EnableInstallationAndPair) Validate added in v0.182.40

func (j *EnableInstallationAndPair) Validate() error

type FetchMessages added in v0.171.21

type FetchMessages struct {
	ID string `json:"id"`
}

func (*FetchMessages) Validate added in v0.171.21

func (c *FetchMessages) Validate() error

type GetPermissionedBalances added in v0.174.3

type GetPermissionedBalances struct {
	CommunityID types.HexBytes `json:"communityId"`
}

func (*GetPermissionedBalances) Validate added in v0.174.3

func (r *GetPermissionedBalances) Validate() error

type ImageCropRectangle added in v0.178.0

type ImageCropRectangle struct {
	Ax int `json:"ax"`
	Ay int `json:"ay"`
	Bx int `json:"bx"`
	By int `json:"by"`
}

type ImportDiscordChannel added in v0.171.6

type ImportDiscordChannel struct {
	Name             string         `json:"name"`
	DiscordChannelID string         `json:"discordChannelID"`
	CommunityID      types.HexBytes `json:"communityId"`
	Description      string         `json:"description"`
	Color            string         `json:"color"`
	Emoji            string         `json:"emoji"`
	FilesToImport    []string       `json:"filesToImport"`
	From             int64          `json:"from"`
}

func (*ImportDiscordChannel) Validate added in v0.171.6

func (r *ImportDiscordChannel) Validate() error

type ImportDiscordCommunity added in v0.114.1

type ImportDiscordCommunity struct {
	CreateCommunity
	FilesToImport []string
	From          int64
}

func (*ImportDiscordCommunity) ToCreateCommunityRequest added in v0.114.1

func (u *ImportDiscordCommunity) ToCreateCommunityRequest() *CreateCommunity

func (*ImportDiscordCommunity) Validate added in v0.114.1

func (u *ImportDiscordCommunity) Validate() error

type InitializeApplication added in v0.181.35

type InitializeApplication struct {
	DataDir       string `json:"dataDir"`
	MixpanelAppID string `json:"mixpanelAppId"`
	MixpanelToken string `json:"mixpanelToken"`
}

func (*InitializeApplication) Validate added in v0.181.35

func (i *InitializeApplication) Validate() error

type KeycardData added in v0.181.31

type KeycardData struct {
	KeyUID              string `json:"keyUID"`
	Address             string `json:"address"`
	WhisperPrivateKey   string `json:"whisperPrivateKey"`
	WhisperPublicKey    string `json:"whisperPublicKey"`
	WhisperAddress      string `json:"whisperAddress"`
	WalletPublicKey     string `json:"walletPublicKey"`
	WalletAddress       string `json:"walletAddress"`
	WalletRootAddress   string `json:"walletRootAddress"`
	Eip1581Address      string `json:"eip1581Address"`
	EncryptionPublicKey string `json:"encryptionPublicKey"`
}

type Login added in v0.154.2

type Login struct {
	Password string `json:"password"`
	KeyUID   string `json:"keyUid"`

	KdfIterations         int    `json:"kdfIterations"` // FIXME: KdfIterations should be loaded from multiaccounts db.
	RuntimeLogLevel       string `json:"runtimeLogLevel"`
	WakuV2Nameserver      string `json:"wakuV2Nameserver"`
	BandwidthStatsEnabled bool   `json:"bandwidthStatsEnabled"`

	KeycardWhisperPrivateKey string `json:"keycardWhisperPrivateKey"`

	// Mnemonic allows to log in to an account when password is lost.
	// This is needed for the "Lost keycard -> Start using without keycard" flow, when a keycard account database
	// exists locally, but now the keycard is lost. In this case client is responsible for calling
	// `convertToRegularAccount` after a successful login. This could be improved in the future.
	// When non-empty, mnemonic is used to generate required keypairs and:
	// - Password is ignored and replaced with encryption public key
	// - KeycardWhisperPrivateKey is ignored and replaced with chat private key
	Mnemonic string `json:"mnemonic"`

	WalletSecretsConfig

	APIConfig          *APIConfig `json:"apiConfig"`
	StatusProxyEnabled bool       `json:"statusProxyEnabled"`
}

func (*Login) ChatPrivateKey added in v0.181.31

func (c *Login) ChatPrivateKey() *ecdsa.PrivateKey

func (*Login) Validate added in v0.154.2

func (c *Login) Validate() error

type MetricsIntervalRequest added in v0.162.14

type MetricsIntervalRequest struct {
	StartTimestamp uint64 `json:"startTimestamp"`
	EndTimestamp   uint64 `json:"endTimestamp"`
}

type MuteCategory added in v0.154.4

type MuteCategory struct {
	CommunityID string
	CategoryID  string
	MutedType   MutingVariation
}

func (*MuteCategory) Validate added in v0.154.4

func (a *MuteCategory) Validate() error

type MuteChat added in v0.145.2

type MuteChat struct {
	ChatID    string
	MutedType MutingVariation
}

func (*MuteChat) Validate added in v0.145.2

func (a *MuteChat) Validate() error

type MuteCommunity added in v0.159.2

type MuteCommunity struct {
	CommunityID types.HexBytes  `json:"communityId"`
	MutedType   MutingVariation `json:"mutedType"`
}

func (*MuteCommunity) Validate added in v0.159.2

func (a *MuteCommunity) Validate() error

type MutingVariation added in v0.145.2

type MutingVariation int

type ReevaluateCommunityMembersPermissions added in v0.163.14

type ReevaluateCommunityMembersPermissions struct {
	CommunityID types.HexBytes `json:"communityId"`
}

func (*ReevaluateCommunityMembersPermissions) Validate added in v0.163.14

type RemoveRoleFromMember added in v0.115.5

type RemoveRoleFromMember struct {
	CommunityID types.HexBytes                 `json:"communityId"`
	User        types.HexBytes                 `json:"user"`
	Role        protobuf.CommunityMember_Roles `json:"role"`
}

func (*RemoveRoleFromMember) Validate added in v0.115.5

func (r *RemoveRoleFromMember) Validate() error

type ReorderCommunityCategories added in v0.79.3

type ReorderCommunityCategories struct {
	CommunityID types.HexBytes `json:"communityId"`
	CategoryID  string         `json:"categoryId"`
	Position    int            `json:"position"`
}

func (*ReorderCommunityCategories) Validate added in v0.79.3

func (j *ReorderCommunityCategories) Validate() error

type ReorderCommunityChat added in v0.79.3

type ReorderCommunityChat struct {
	CommunityID types.HexBytes `json:"communityId"`
	CategoryID  string         `json:"categoryId"`
	ChatID      string         `json:"chatId"`
	Position    int            `json:"position"`
}

func (*ReorderCommunityChat) Validate added in v0.79.3

func (j *ReorderCommunityChat) Validate() error

type RequestToJoinCommunity

type RequestToJoinCommunity struct {
	CommunityID          types.HexBytes   `json:"communityId"`
	ENSName              string           `json:"ensName"`
	AddressesToReveal    []string         `json:"addressesToReveal"`
	Signatures           []types.HexBytes `json:"signatures"` // the order of signatures should match the order of addresses
	AirdropAddress       string           `json:"airdropAddress"`
	ShareFutureAddresses bool             `json:"shareFutureAddresses"`
}

func (*RequestToJoinCommunity) Validate

func (j *RequestToJoinCommunity) Validate() error

type RestoreAccount added in v0.139.1

type RestoreAccount struct {
	Mnemonic string `json:"mnemonic"`

	// Keycard info can be set instead of Mnemonic.
	// This is to log in using a keycard with existing account.
	Keycard *KeycardData `json:"keycard"`

	FetchBackup bool `json:"fetchBackup"`

	CreateAccount
}

func (*RestoreAccount) Validate added in v0.139.1

func (c *RestoreAccount) Validate() error

type RetractContactRequest added in v0.100.0

type RetractContactRequest struct {
	ID types.HexBytes `json:"id"`
}

func (*RetractContactRequest) Validate added in v0.100.0

func (a *RetractContactRequest) Validate() error

type SaveNewWakuNode added in v0.179.27

type SaveNewWakuNode struct {
	NodeAddress string `json:"nodeAddress"`
}

func (*SaveNewWakuNode) Validate added in v0.179.27

func (r *SaveNewWakuNode) Validate() error

type SendContactRequest added in v0.100.0

type SendContactRequest struct {
	ID      string `json:"id"`
	Message string `json:"message"`
}

func (*SendContactRequest) HexID added in v0.138.8

func (a *SendContactRequest) HexID() (string, error)

func (*SendContactRequest) Validate added in v0.100.0

func (a *SendContactRequest) Validate() error

type SendGroupChatMessage added in v0.138.8

type SendGroupChatMessage struct {
	ID      string `json:"id"`
	Message string `json:"message"`
}

func (*SendGroupChatMessage) Validate added in v0.138.8

func (a *SendGroupChatMessage) Validate() error

type SendOneToOneMessage added in v0.138.8

type SendOneToOneMessage struct {
	ID      string `json:"id"`
	Message string `json:"message"`
}

func (*SendOneToOneMessage) HexID added in v0.138.8

func (a *SendOneToOneMessage) HexID() (string, error)

func (*SendOneToOneMessage) Validate added in v0.138.8

func (a *SendOneToOneMessage) Validate() error

type SetCommunityShard added in v0.170.0

type SetCommunityShard struct {
	CommunityID types.HexBytes  `json:"communityId"`
	Shard       *shard.Shard    `json:"shard,omitempty"`
	PrivateKey  *types.HexBytes `json:"privateKey,omitempty"`
}

func (*SetCommunityShard) Validate added in v0.170.0

func (s *SetCommunityShard) Validate() error

type SetCommunityStorenodes added in v0.175.3

type SetCommunityStorenodes struct {
	CommunityID types.HexBytes         `json:"communityId"`
	Storenodes  []storenodes.Storenode `json:"storenodes"`
}

func (*SetCommunityStorenodes) Validate added in v0.175.3

func (s *SetCommunityStorenodes) Validate() error

type SetContactLocalNickname added in v0.90.0

type SetContactLocalNickname struct {
	ID       types.HexBytes `json:"id"`
	Nickname string         `json:"nickname"`
}

func (*SetContactLocalNickname) Validate added in v0.90.0

func (a *SetContactLocalNickname) Validate() error

type SetCustomNodes added in v0.171.21

type SetCustomNodes struct {
	CustomNodes map[string]string `json:"customNodes"`
}

type SetCustomizationColor added in v0.174.1

type SetCustomizationColor struct {
	CustomizationColor common.CustomizationColor `json:"customizationColor"`
	KeyUID             string                    `json:"keyUid"`
}

func (*SetCustomizationColor) Validate added in v0.174.1

func (a *SetCustomizationColor) Validate() error

type SetLightClient added in v0.171.21

type SetLightClient struct {
	Enabled bool `json:"enabled"`
}

type SetLogLevel added in v0.171.21

type SetLogLevel struct {
	LogLevel string `json:"logLevel"`
}

func (*SetLogLevel) Validate added in v0.171.21

func (c *SetLogLevel) Validate() error

type SetMaxLogBackups added in v0.179.27

type SetMaxLogBackups struct {
	MaxLogBackups uint `json:"maxLogBackups" validate:"omitempty,gte=0"`
}

type SetStoreConfirmationForMessagesSent added in v0.182.35

type SetStoreConfirmationForMessagesSent struct {
	Enabled bool `json:"enabled"`
}

type SetSyncingOnMobileNetwork added in v0.182.39

type SetSyncingOnMobileNetwork struct {
	Enabled bool `json:"enabled"`
}

func (*SetSyncingOnMobileNetwork) Validate added in v0.182.39

func (r *SetSyncingOnMobileNetwork) Validate() error

type ShareCommunity

type ShareCommunity struct {
	CommunityID   types.HexBytes   `json:"communityId"`
	Users         []types.HexBytes `json:"users"`
	InviteMessage string           `json:"inviteMessage,omitempty"`
}

func (*ShareCommunity) Validate

func (j *ShareCommunity) Validate() error

type ShareImageMessage added in v0.94.8

type ShareImageMessage struct {
	MessageID string           `json:"id"`
	Users     []types.HexBytes `json:"users"`
}

func (*ShareImageMessage) Validate added in v0.94.8

func (s *ShareImageMessage) Validate() error

type ToggleCentralizedMetrics added in v0.181.35

type ToggleCentralizedMetrics struct {
	Enabled bool `json:"enabled"`
}

func (*ToggleCentralizedMetrics) Validate added in v0.181.35

func (a *ToggleCentralizedMetrics) Validate() error

type ToggleCollapsedCommunityCategory added in v0.138.4

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

func (*ToggleCollapsedCommunityCategory) Validate added in v0.138.4

type TogglePeerSyncingRequest added in v0.176.3

type TogglePeerSyncingRequest struct {
	Enabled bool `json:"enabled"`
}

func (*TogglePeerSyncingRequest) Validate added in v0.176.3

func (a *TogglePeerSyncingRequest) Validate() error

type UnbanUserFromCommunity added in v0.102.6

type UnbanUserFromCommunity struct {
	CommunityID types.HexBytes `json:"communityId"`
	User        types.HexBytes `json:"user"`
}

func (*UnbanUserFromCommunity) Validate added in v0.102.6

func (b *UnbanUserFromCommunity) Validate() error

type UpsertSwitcherCard added in v0.117.3

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

func (*UpsertSwitcherCard) Validate added in v0.117.3

func (a *UpsertSwitcherCard) Validate() error

type VerifiedTrusted added in v0.115.1

type VerifiedTrusted struct {
	ID types.HexBytes `json:"id"`
}

func (*VerifiedTrusted) Validate added in v0.115.1

func (a *VerifiedTrusted) Validate() error

type VerifiedUntrustworthy added in v0.115.1

type VerifiedUntrustworthy struct {
	ID types.HexBytes `json:"id"`
}

func (*VerifiedUntrustworthy) Validate added in v0.115.1

func (a *VerifiedUntrustworthy) Validate() error

type WalletSecretsConfig added in v0.154.2

type WalletSecretsConfig struct {
	PoktToken            string `json:"poktToken"`
	InfuraToken          string `json:"infuraToken"`
	InfuraSecret         string `json:"infuraSecret"`
	OpenseaAPIKey        string `json:"openseaApiKey"`
	RaribleMainnetAPIKey string `json:"raribleMainnetApiKey"`
	RaribleTestnetAPIKey string `json:"raribleTestnetApiKey"`

	AlchemyEthereumMainnetToken string `json:"alchemyEthereumMainnetToken"`
	AlchemyEthereumGoerliToken  string `json:"alchemyEthereumGoerliToken"`
	AlchemyEthereumSepoliaToken string `json:"alchemyEthereumSepoliaToken"`
	AlchemyArbitrumMainnetToken string `json:"alchemyArbitrumMainnetToken"`
	AlchemyArbitrumGoerliToken  string `json:"alchemyArbitrumGoerliToken"`
	AlchemyArbitrumSepoliaToken string `json:"alchemyArbitrumSepoliaToken"`
	AlchemyOptimismMainnetToken string `json:"alchemyOptimismMainnetToken"`
	AlchemyOptimismGoerliToken  string `json:"alchemyOptimismGoerliToken"`
	AlchemyOptimismSepoliaToken string `json:"alchemyOptimismSepoliaToken"`

	StatusProxyStageName          string `json:"statusProxyStageName"`
	StatusProxyMarketUser         string `json:"statusProxyMarketUser"`
	StatusProxyMarketPassword     string `json:"statusProxyMarketPassword"`
	StatusProxyBlockchainUser     string `json:"statusProxyBlockchainUser"`
	StatusProxyBlockchainPassword string `json:"statusProxyBlockchainPassword"`

	// Testing
	GanacheURL string `json:"ganacheURL"`
}

Source Files

Jump to

Keyboard shortcuts

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