-
Notifications
You must be signed in to change notification settings - Fork 244
/
transport.go
42 lines (35 loc) · 1.39 KB
/
transport.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package transport
import (
"context"
"crypto/ecdsa"
"github.com/status-im/status-go/eth-node/types"
)
type Transport interface {
Stop() error
JoinPrivate(publicKey *ecdsa.PublicKey) error
LeavePrivate(publicKey *ecdsa.PublicKey) error
JoinGroup(publicKeys []*ecdsa.PublicKey) error
LeaveGroup(publicKeys []*ecdsa.PublicKey) error
JoinPublic(chatID string) error
LeavePublic(chatID string) error
GetCurrentTime() uint64
MaxMessageSize() uint32
SendPublic(ctx context.Context, newMessage *types.NewMessage, chatName string) ([]byte, error)
SendPrivateWithSharedSecret(ctx context.Context, newMessage *types.NewMessage, publicKey *ecdsa.PublicKey, secret []byte) ([]byte, error)
SendPrivateWithPartitioned(ctx context.Context, newMessage *types.NewMessage, publicKey *ecdsa.PublicKey) ([]byte, error)
SendMessagesRequest(
ctx context.Context,
peerID []byte,
from, to uint32,
previousCursor []byte,
) (cursor []byte, err error)
Track(identifiers [][]byte, hash []byte, newMessage *types.NewMessage)
InitFilters(chatIDs []string, publicKeys []*ecdsa.PublicKey) ([]*Filter, error)
LoadFilters(filters []*Filter) ([]*Filter, error)
RemoveFilters(filters []*Filter) error
ResetFilters() error
Filters() []*Filter
LoadKeyFilters(*ecdsa.PrivateKey) (*Filter, error)
ProcessNegotiatedSecret(secret types.NegotiatedSecret) (*Filter, error)
RetrieveRawAll() (map[Filter][]*types.Message, error)
}