shh

package
v0.0.0-...-3750b41 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2018 License: GPL-3.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SHH

type SHH struct {
	// contains filtered or unexported fields
}

SHH - The Net Module

func NewSHH

func NewSHH(provider providers.ProviderInterface) *SHH

NewSHH - Net Module constructor to set the default provider

func (*SHH) AsymPost

func (shh *SHH) AsymPost(asymKeyID string, recipientPubKey string, topic string, payload string, ttl *big.Int) (bool, error)

AsymPost - Sends a whisper message Asymetric

func (*SHH) GenerateSymKeyFromPassword

func (shh *SHH) GenerateSymKeyFromPassword(pwd string) (string, error)

GenerateSymKeyFromPassword Generates the key from password, stores it, and returns its ID.

func (*SHH) GetFilterMsgs

func (shh *SHH) GetFilterMsgs(filterID string) []*dto.WhisperMsg

GetFilterMsgs Gets all messages based on provided filterID

func (*SHH) GetPublicKey

func (shh *SHH) GetPublicKey(keyID string) (string, error)

GetPublicKey by privateKey

func (*SHH) GetVersion

func (shh *SHH) 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 (*SHH) NewKeyPair

func (shh *SHH) NewKeyPair() (string, error)

NewKeyPair - Generates a new public and private key pair for message decryption and encryption. Reference: https://github.com/ethereum/go-ethereum/wiki/Whisper-v5-RPC-API#shh_newkeypair Parameters: - none Returns:

  • String - returns Key ID on success and an error on failure.

func (*SHH) NewMsgFilter

func (shh *SHH) NewMsgFilter(subscribeParams *dto.SHHSubscribeParam) (string, error)

NewMsgFilter filters messages based on critirias like keyID and topic

func (*SHH) SymPost

func (shh *SHH) SymPost(symKeyID string, recipientPubKey string, topic string, payload string, ttl *big.Int) (bool, error)

SymPost - Sends a whisper message Asymetric

Jump to

Keyboard shortcuts

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