Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SSH ¶
type SSH struct {
// contains filtered or unexported fields
}
SSH - The Net Module
func NewSSH ¶
func NewSSH(provider providers.ProviderInterface) *SSH
NewSSH - Net Module constructor to set the default provider
func (*SSH) GetVersion ¶
GetVersion - Returns the current whisper protocol version. Reference: https://github.com/ethereum/wiki/wiki/JSON-RPC#shh_version Parameters:
- none
Returns:
- String - The current whisper protocol version
func (*SSH) Post ¶
func (ssh *SSH) Post(from string, to string, topics []string, payload string, priority types.ComplexIntParameter, ttl types.ComplexIntParameter) (bool, error)
Post - Sends a whisper message. Reference: https://github.com/ethereum/wiki/wiki/JSON-RPC#shh_post Parameters:
1 .Object - The whisper post object: - from: DATA, 60 Bytes - (optional) The identity of the sender. - to: DATA, 60 Bytes - (optional) The identity of the receiver. When present whisper will encrypt the message so that only the receiver can decrypt it. - topics: Array of DATA - Array of DATA topics, for the receiver to identify messages. - payload: DATA - The payload of the message. - priority: QUANTITY - The integer of the priority in a rang from ... (?). - ttl: QUANTITY - integer of the time to live in seconds.
Returns:
- Boolean - returns true if the message was send, otherwise false.
Click to show internal directories.
Click to hide internal directories.