Documentation ¶
Index ¶
- type SHH
- func (shh *SHH) AsymPost(asymKeyID string, recipientPubKey string, topic string, payload string, ...) (bool, error)
- func (shh *SHH) GenerateSymKeyFromPassword(pwd string) (string, error)
- func (shh *SHH) GetFilterMsgs(filterID string) []*dto.WhisperMsg
- func (shh *SHH) GetPublicKey(keyID string) (string, error)
- func (shh *SHH) GetVersion() (string, error)
- func (shh *SHH) NewKeyPair() (string, error)
- func (shh *SHH) NewMsgFilter(subscribeParams *dto.SHHSubscribeParam) (string, error)
- func (shh *SHH) SymPost(symKeyID string, recipientPubKey string, topic string, payload string, ...) (bool, error)
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 ¶
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 ¶
GetPublicKey by privateKey
func (*SHH) 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 (*SHH) NewKeyPair ¶
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