gethbridge

package
v0.179.9 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MPL-2.0 Imports: 27 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGethWakuFrom

func GetGethWakuFrom(m types.Waku) *waku.Waku

GetGethWhisperFrom retrieves the underlying whisper Whisper struct from a wrapped Whisper interface

func GetGethWakuV2From added in v0.80.2

func GetGethWakuV2From(m types.Waku) *wakuv2.Waku

GetGethWhisperFrom retrieves the underlying whisper Whisper struct from a wrapped Whisper interface

func GetWakuFilterFrom

func GetWakuFilterFrom(f types.Filter) *wakucommon.Filter

GetWakuFilterFrom retrieves the underlying whisper Filter struct from a wrapped Filter interface

func GetWakuV2FilterFrom added in v0.80.2

func GetWakuV2FilterFrom(f types.Filter) *wakucommon.Filter

GetWakuFilterFrom retrieves the underlying whisper Filter struct from a wrapped Filter interface

func NewGethPublicWakuAPIWrapper

func NewGethPublicWakuAPIWrapper(api *waku.PublicWakuAPI) types.PublicWakuAPI

NewGethPublicWakuAPIWrapper returns an object that wraps Geth's PublicWakuAPI in a types interface

func NewGethPublicWakuV2APIWrapper added in v0.80.2

func NewGethPublicWakuV2APIWrapper(api *wakuv2.PublicWakuAPI) types.PublicWakuAPI

NewGethPublicWakuAPIWrapper returns an object that wraps Geth's PublicWakuAPI in a types interface

func NewGethSubscriptionWrapper

func NewGethSubscriptionWrapper(subscription event.Subscription) types.Subscription

NewGethSubscriptionWrapper returns an object that wraps Geth's Subscription in a types interface

func NewGethWakuV2Wrapper added in v0.80.2

func NewGethWakuV2Wrapper(w *wakuv2.Waku) types.Waku

NewGethWakuWrapper returns an object that wraps Geth's Waku in a types interface

func NewGethWakuWrapper

func NewGethWakuWrapper(w *waku.Waku) types.Waku

NewGethWakuWrapper returns an object that wraps Geth's Waku in a types interface

func NewNodeBridge

func NewNodeBridge(stack *node.Node, waku1 *waku.Waku, waku2 *wakuv2.Waku) types.Node

func NewWakuEnvelope

func NewWakuEnvelope(e *waku.Envelope) types.Envelope

NewWakuEnvelope returns an object that wraps Geth's Waku Envelope in a types interface.

func NewWakuEnvelopeErrorWrapper

func NewWakuEnvelopeErrorWrapper(envelopeError *waku.EnvelopeError) *types.EnvelopeError

NewWakuEnvelopeErrorWrapper returns a types.EnvelopeError object that mimics Geth's EnvelopeError

func NewWakuEnvelopeEventWrapper

func NewWakuEnvelopeEventWrapper(envelopeEvent *wakucommon.EnvelopeEvent) *types.EnvelopeEvent

NewWakuEnvelopeEventWrapper returns a types.EnvelopeEvent object that mimics Geth's EnvelopeEvent

func NewWakuFilterWrapper

func NewWakuFilterWrapper(f *wakucommon.Filter, id string) types.Filter

NewWakuFilterWrapper returns an object that wraps Geth's Filter in a types interface

func NewWakuMailServerResponseWrapper

func NewWakuMailServerResponseWrapper(mailServerResponse *waku.MailServerResponse) *types.MailServerResponse

NewWakuMailServerResponseWrapper returns a types.MailServerResponse object that mimics Geth's MailServerResponse

func NewWakuV2EnvelopeErrorWrapper added in v0.80.2

func NewWakuV2EnvelopeErrorWrapper(envelopeError *wakuv2.EnvelopeError) *types.EnvelopeError

NewWakuEnvelopeErrorWrapper returns a types.EnvelopeError object that mimics Geth's EnvelopeError

func NewWakuV2EnvelopeEventWrapper added in v0.80.2

func NewWakuV2EnvelopeEventWrapper(envelopeEvent *wakuv2common.EnvelopeEvent) *types.EnvelopeEvent

NewWakuV2EnvelopeEventWrapper returns a types.EnvelopeEvent object that mimics Geth's EnvelopeEvent

func NewWakuV2FilterWrapper added in v0.80.2

func NewWakuV2FilterWrapper(f *wakucommon.Filter, id string) types.Filter

NewWakuFilterWrapper returns an object that wraps Geth's Filter in a types interface

func NewWakuV2MailServerResponseWrapper added in v0.80.2

func NewWakuV2MailServerResponseWrapper(mailServerResponse *wakuv2.MailServerResponse) *types.MailServerResponse

NewWakuV2MailServerResponseWrapper returns a types.MailServerResponse object that mimics Geth's MailServerResponse

func WrapKeyStore

func WrapKeyStore(keystore *keystore.KeyStore) types.KeyStore

WrapKeyStore creates a types.KeyStore wrapper over a keystore.KeyStore object

Types

type GethPublicWakuAPIWrapper added in v0.174.5

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

func (*GethPublicWakuAPIWrapper) AddPrivateKey added in v0.174.5

func (w *GethPublicWakuAPIWrapper) AddPrivateKey(ctx context.Context, privateKey types.HexBytes) (string, error)

AddPrivateKey imports the given private key.

func (*GethPublicWakuAPIWrapper) BloomFilter added in v0.174.5

func (w *GethPublicWakuAPIWrapper) BloomFilter() []byte

func (*GethPublicWakuAPIWrapper) DeleteKeyPair added in v0.174.5

func (w *GethPublicWakuAPIWrapper) DeleteKeyPair(ctx context.Context, key string) (bool, error)

DeleteKeyPair removes the key with the given key if it exists.

func (*GethPublicWakuAPIWrapper) GenerateSymKeyFromPassword added in v0.174.5

func (w *GethPublicWakuAPIWrapper) GenerateSymKeyFromPassword(ctx context.Context, passwd string) (string, error)

GenerateSymKeyFromPassword derives a key from the given password, stores it, and returns its ID.

func (*GethPublicWakuAPIWrapper) GetFilterMessages added in v0.174.5

func (w *GethPublicWakuAPIWrapper) GetFilterMessages(id string) ([]*types.Message, error)

GetFilterMessages returns the messages that match the filter criteria and are received between the last poll and now.

func (*GethPublicWakuAPIWrapper) NewMessageFilter added in v0.174.5

func (w *GethPublicWakuAPIWrapper) NewMessageFilter(req types.Criteria) (string, error)

NewMessageFilter creates a new filter that can be used to poll for (new) messages that satisfy the given criteria.

func (*GethPublicWakuAPIWrapper) Post added in v0.174.5

Post posts a message on the network. returns the hash of the message in case of success.

type GethWakuWrapper added in v0.174.5

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

func (*GethWakuWrapper) AddKeyPair added in v0.174.5

func (w *GethWakuWrapper) AddKeyPair(key *ecdsa.PrivateKey) (string, error)

AddKeyPair imports a asymmetric private key and returns a deterministic identifier.

func (*GethWakuWrapper) AddRelayPeer added in v0.174.5

func (w *GethWakuWrapper) AddRelayPeer(address string) (peer.ID, error)

AddRelayPeer function only added for compatibility with waku V2

func (*GethWakuWrapper) AddStorePeer added in v0.174.5

func (w *GethWakuWrapper) AddStorePeer(address string) (peer.ID, error)

PeerCount function only added for compatibility with waku V2

func (*GethWakuWrapper) AddSymKeyDirect added in v0.174.5

func (w *GethWakuWrapper) AddSymKeyDirect(key []byte) (string, error)

func (*GethWakuWrapper) AddSymKeyFromPassword added in v0.174.5

func (w *GethWakuWrapper) AddSymKeyFromPassword(password string) (string, error)

func (*GethWakuWrapper) BloomFilter added in v0.174.5

func (w *GethWakuWrapper) BloomFilter() []byte

BloomFilter returns the aggregated bloom filter for all the topics of interest. The nodes are required to send only messages that match the advertised bloom filter. If a message does not match the bloom, it will tantamount to spam, and the peer will be disconnected.

func (*GethWakuWrapper) ClearEnvelopesCache added in v0.174.5

func (w *GethWakuWrapper) ClearEnvelopesCache()

func (*GethWakuWrapper) ConnectionChanged added in v0.174.5

func (w *GethWakuWrapper) ConnectionChanged(_ connection.State)

func (*GethWakuWrapper) DeleteKeyPair added in v0.174.5

func (w *GethWakuWrapper) DeleteKeyPair(keyID string) bool

DeleteKeyPair deletes the key with the specified ID if it exists.

func (*GethWakuWrapper) DeleteSymKey added in v0.174.5

func (w *GethWakuWrapper) DeleteSymKey(id string) bool

func (*GethWakuWrapper) DialPeer added in v0.174.5

func (w *GethWakuWrapper) DialPeer(address string) error

DialPeer function only added for compatibility with waku V2

func (*GethWakuWrapper) DialPeerByID added in v0.174.5

func (w *GethWakuWrapper) DialPeerByID(peerID string) error

DialPeerByID function only added for compatibility with waku V2

func (*GethWakuWrapper) DropPeer added in v0.174.5

func (w *GethWakuWrapper) DropPeer(peerID string) error

PeerCount function only added for compatibility with waku V2

func (*GethWakuWrapper) GetCurrentTime added in v0.174.5

func (w *GethWakuWrapper) GetCurrentTime() time.Time

GetCurrentTime returns current time.

func (*GethWakuWrapper) GetFilter added in v0.174.5

func (w *GethWakuWrapper) GetFilter(id string) types.Filter

func (*GethWakuWrapper) GetPrivateKey added in v0.174.5

func (w *GethWakuWrapper) GetPrivateKey(id string) (*ecdsa.PrivateKey, error)

func (*GethWakuWrapper) GetStats added in v0.174.5

func (w *GethWakuWrapper) GetStats() types.StatsSummary

func (*GethWakuWrapper) GetSymKey added in v0.174.5

func (w *GethWakuWrapper) GetSymKey(id string) ([]byte, error)

func (*GethWakuWrapper) ListenAddresses added in v0.174.5

func (w *GethWakuWrapper) ListenAddresses() ([]string, error)

ListenAddresses function only added for compatibility with waku V2

func (*GethWakuWrapper) MarkP2PMessageAsProcessed added in v0.174.5

func (w *GethWakuWrapper) MarkP2PMessageAsProcessed(hash common.Hash)

func (*GethWakuWrapper) MaxMessageSize added in v0.174.5

func (w *GethWakuWrapper) MaxMessageSize() uint32

MaxMessageSize returns the MaxMessageSize set

func (*GethWakuWrapper) MinPow added in v0.174.5

func (w *GethWakuWrapper) MinPow() float64

MinPow returns the PoW value required by this node.

func (*GethWakuWrapper) PeerCount added in v0.174.5

func (w *GethWakuWrapper) PeerCount() int

Added for compatibility with waku V2

func (*GethWakuWrapper) Peers added in v0.174.5

func (w *GethWakuWrapper) Peers() map[string]types.WakuV2Peer

Peers function only added for compatibility with waku V2

func (*GethWakuWrapper) ProcessingP2PMessages added in v0.174.5

func (w *GethWakuWrapper) ProcessingP2PMessages() bool

func (*GethWakuWrapper) PublicWakuAPI added in v0.174.5

func (w *GethWakuWrapper) PublicWakuAPI() types.PublicWakuAPI

func (*GethWakuWrapper) RemovePubsubTopicKey added in v0.174.5

func (w *GethWakuWrapper) RemovePubsubTopicKey(topic string) error

func (*GethWakuWrapper) RequestHistoricMessagesWithTimeout added in v0.174.5

func (w *GethWakuWrapper) RequestHistoricMessagesWithTimeout(peerID []byte, envelope types.Envelope, timeout time.Duration) error

RequestHistoricMessages sends a message with p2pRequestCode to a specific peer, which is known to implement MailServer interface, and is supposed to process this request and respond with a number of peer-to-peer messages (possibly expired), which are not supposed to be forwarded any further. The whisper protocol is agnostic of the format and contents of envelope.

func (*GethWakuWrapper) RequestStoreMessages added in v0.174.5

func (w *GethWakuWrapper) RequestStoreMessages(ctx context.Context, peerID []byte, r types.MessagesRequest, processEnvelopes bool) (*types.StoreRequestCursor, int, error)

func (*GethWakuWrapper) RetrievePubsubTopicKey added in v0.174.5

func (w *GethWakuWrapper) RetrievePubsubTopicKey(topic string) (*ecdsa.PrivateKey, error)

func (*GethWakuWrapper) SendMessagesRequest added in v0.174.5

func (w *GethWakuWrapper) SendMessagesRequest(peerID []byte, r types.MessagesRequest) error

func (*GethWakuWrapper) StartDiscV5 added in v0.174.5

func (w *GethWakuWrapper) StartDiscV5() error

Added for compatibility with waku V2

func (*GethWakuWrapper) StopDiscV5 added in v0.174.5

func (w *GethWakuWrapper) StopDiscV5() error

Added for compatibility with waku V2

func (*GethWakuWrapper) StorePubsubTopicKey added in v0.174.5

func (w *GethWakuWrapper) StorePubsubTopicKey(topic string, privKey *ecdsa.PrivateKey) error

func (*GethWakuWrapper) Subscribe added in v0.174.5

func (w *GethWakuWrapper) Subscribe(opts *types.SubscriptionOptions) (string, error)

func (*GethWakuWrapper) SubscribeEnvelopeEvents added in v0.174.5

func (w *GethWakuWrapper) SubscribeEnvelopeEvents(eventsProxy chan<- types.EnvelopeEvent) types.Subscription

func (*GethWakuWrapper) SubscribeToConnStatusChanges added in v0.174.5

func (w *GethWakuWrapper) SubscribeToConnStatusChanges() (*types.ConnStatusSubscription, error)

func (*GethWakuWrapper) SubscribeToPubsubTopic added in v0.174.5

func (w *GethWakuWrapper) SubscribeToPubsubTopic(topic string, optPublicKey *ecdsa.PublicKey) error

SubscribeToPubsubTopic function only added for compatibility with waku V2

func (*GethWakuWrapper) Unsubscribe added in v0.174.5

func (w *GethWakuWrapper) Unsubscribe(ctx context.Context, id string) error

func (*GethWakuWrapper) UnsubscribeFromPubsubTopic added in v0.174.5

func (w *GethWakuWrapper) UnsubscribeFromPubsubTopic(topic string) error

func (*GethWakuWrapper) UnsubscribeMany added in v0.174.5

func (w *GethWakuWrapper) UnsubscribeMany(ids []string) error

func (*GethWakuWrapper) Version added in v0.174.5

func (w *GethWakuWrapper) Version() uint

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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