Documentation
¶
Index ¶
Constants ¶
View Source
const ( // StatusSecureMessagingProtocolAPIName is a name of the API namespace // with the protocol specific methods. StatusSecureMessagingProtocolAPIName = "ssm" )
Variables ¶
View Source
var ( // ErrProtocolNotSet tells that the protocol was not set in the Service. ErrProtocolNotSet = errors.New("protocol is not set") // ErrMessengerNotSet tells that the messenger was not set in the Service. ErrMessengerNotSet = errors.New("messenger is not set") )
Functions ¶
This section is empty.
Types ¶
type KeysGetter ¶
type KeysGetter interface {
PrivateKey() (*ecdsa.PrivateKey, error)
}
KeysGetter is an interface that specifies what kind of keys should an implementation provide.
type MessagesParams ¶
MessagesParams is an object with JSON-serializable parameters for Messages method.
type PublicAPI ¶
type PublicAPI struct {
// contains filtered or unexported fields
}
PublicAPI provides an JSON-RPC API to interact with the Status Messaging Protocol through a geth node.
func NewPublicAPI ¶
func (*PublicAPI) SendChatMessage ¶
func (api *PublicAPI) SendChatMessage(ctx context.Context, chatID string, text string) (*protocol.MessengerResponse, error)
SendChatMessage sends a plain text message to specified chat. Chat should be added before sending message, otherwise error will be received.
type SendParams ¶
SendParams is an object with JSON-serializable parameters for Send method.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is a wrapper around Protocol.
func (*Service) SetMessenger ¶
SetMessenger sets a Messenger.
Click to show internal directories.
Click to hide internal directories.