ssh

package
v0.0.0-...-2d5cd87 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2018 License: GPL-3.0 Imports: 3 Imported by: 0

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

func (ssh *SSH) GetVersion() (string, error)

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.

Jump to

Keyboard shortcuts

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