Documentation
¶
Index ¶
- Variables
- func FindNewInstallations(m *protocol.Messenger, prevInstallationIds map[string]struct{}) *multidevice.Installation
- func GenerateCertFromKey(pk *ecdsa.PrivateKey, from time.Time, hostname string) (tls.Certificate, []byte, error)
- func GetMessengerInstallationsMap(m *protocol.Messenger) map[string]struct{}
- func MakeServerConfig(config *ServerConfig) error
- func NewPayloadMounters(logger *zap.Logger, pe *PayloadEncryptor, backend *api.GethStatusBackend, ...) (PayloadMounter, PayloadMounter, PayloadMounterReceiver, error)
- func NewPayloadReceivers(logger *zap.Logger, pe *PayloadEncryptor, backend *api.GethStatusBackend, ...) (PayloadReceiver, PayloadReceiver, PayloadMounterReceiver, error)
- func StartUpReceiverServer(backend *api.GethStatusBackend, configJSON string) (string, error)
- func StartUpReceivingClient(backend *api.GethStatusBackend, cs, configJSON string) error
- func StartUpSenderServer(backend *api.GethStatusBackend, configJSON string) (string, error)
- func StartUpSendingClient(backend *api.GethStatusBackend, cs, configJSON string) error
- func ValidateConnectionString(cs string) error
- type AccountPayload
- type AccountPayloadLoader
- type AccountPayloadMarshaller
- type AccountPayloadStorer
- type Action
- type BaseClient
- type BasePayloadMounter
- func NewAccountPayloadMounter(pe *PayloadEncryptor, config *SenderConfig, logger *zap.Logger) (*BasePayloadMounter, error)
- func NewBasePayloadMounter(loader PayloadLoader, marshaller ProtobufMarshaller, e *PayloadEncryptor) *BasePayloadMounter
- func NewInstallationPayloadMounter(pe *PayloadEncryptor, backend *api.GethStatusBackend, deviceType string) *BasePayloadMounter
- func NewRawMessagePayloadMounter(logger *zap.Logger, pe *PayloadEncryptor, backend *api.GethStatusBackend, ...) *BasePayloadMounter
- type BasePayloadReceiver
- func NewAccountPayloadReceiver(e *PayloadEncryptor, p *AccountPayload, config *ReceiverConfig, ...) (*BasePayloadReceiver, error)
- func NewBaseBasePayloadReceiver(e *PayloadEncryptor, um ProtobufUnmarshaller, s PayloadStorer, callback func()) *BasePayloadReceiver
- func NewInstallationPayloadReceiver(e *PayloadEncryptor, backend *api.GethStatusBackend, deviceType string) *BasePayloadReceiver
- func NewRawMessagePayloadReceiver(accountPayload *AccountPayload, e *PayloadEncryptor, ...) *BasePayloadReceiver
- type BaseServer
- type ChallengeError
- type ChallengeGiver
- type ChallengeTaker
- type ClientConfig
- type ConnectionParams
- type EncryptionPayload
- type Event
- type EventType
- type InstallationPayloadLoader
- type InstallationPayloadMounterReceiver
- type InstallationPayloadStorer
- type PayloadEncryptor
- type PayloadLoader
- type PayloadLockPayload
- type PayloadLocker
- type PayloadMounter
- type PayloadMounterReceiver
- type PayloadReceived
- type PayloadReceiver
- type PayloadRepository
- type PayloadStorer
- type PayloadToSend
- type PeerNotifier
- type ProtobufMarshaller
- type ProtobufUnmarshaller
- type RawMessageCollector
- type RawMessageLoader
- type RawMessagePayloadMarshaller
- type RawMessageStorer
- type RawMessagesPayload
- type ReceiverClient
- type ReceiverClientConfig
- type ReceiverConfig
- type ReceiverServer
- type ReceiverServerConfig
- type SenderClient
- type SenderClientConfig
- type SenderConfig
- type SenderServer
- type SenderServerConfig
- type ServerConfig
- type SyncRawMessageHandler
- func (s *SyncRawMessageHandler) CollectInstallationData(rawMessageCollector *RawMessageCollector, deviceType string) error
- func (s *SyncRawMessageHandler) HandleRawMessage(accountPayload *AccountPayload, nodeConfig *params.NodeConfig, ...) (err error)
- func (s *SyncRawMessageHandler) PrepareRawMessage(keyUID, deviceType string) (rm []*protobuf.RawMessage, as []*accounts.Account, ...)
Constants ¶
This section is empty.
Variables ¶
var ( ErrKeyFileAlreadyExists = errors.New("key file already exists") ErrKeyUIDEmptyAsSender = errors.New("keyUID must be provided as sender") ErrNodeConfigNilAsReceiver = errors.New("node config must be provided as receiver") ErrLoggedInKeyUIDConflict = errors.New("logged in keyUID not same as keyUID in payload") )
Functions ¶
func FindNewInstallations ¶ added in v0.148.1
func FindNewInstallations(m *protocol.Messenger, prevInstallationIds map[string]struct{}) *multidevice.Installation
func GenerateCertFromKey ¶
func GenerateCertFromKey(pk *ecdsa.PrivateKey, from time.Time, hostname string) (tls.Certificate, []byte, error)
func GetMessengerInstallationsMap ¶ added in v0.148.1
func MakeServerConfig ¶ added in v0.140.0
func MakeServerConfig(config *ServerConfig) error
func NewPayloadMounters ¶ added in v0.140.0
func NewPayloadMounters(logger *zap.Logger, pe *PayloadEncryptor, backend *api.GethStatusBackend, config *SenderConfig) (PayloadMounter, PayloadMounter, PayloadMounterReceiver, error)
NewPayloadMounters returns PayloadMounter s configured to handle local pairing transfers of:
- AccountPayload, RawMessagePayload and InstallationPayload
func NewPayloadReceivers ¶ added in v0.140.0
func NewPayloadReceivers(logger *zap.Logger, pe *PayloadEncryptor, backend *api.GethStatusBackend, config *ReceiverConfig) (PayloadReceiver, PayloadReceiver, PayloadMounterReceiver, error)
func StartUpReceiverServer ¶ added in v0.140.0
func StartUpReceiverServer(backend *api.GethStatusBackend, configJSON string) (string, error)
StartUpReceiverServer generates a ReceiverServer, starts the sending server and returns the ConnectionParams string to allow a SenderClient to make a successful connection.
func StartUpReceivingClient ¶ added in v0.140.0
func StartUpReceivingClient(backend *api.GethStatusBackend, cs, configJSON string) error
StartUpReceivingClient creates a ReceiverClient and triggers all `receive` calls in sequence to the SenderServer
func StartUpSenderServer ¶ added in v0.140.0
func StartUpSenderServer(backend *api.GethStatusBackend, configJSON string) (string, error)
StartUpSenderServer generates a SenderServer, starts the sending server and returns the ConnectionParams string to allow a ReceiverClient to make a successful connection.
func StartUpSendingClient ¶ added in v0.140.0
func StartUpSendingClient(backend *api.GethStatusBackend, cs, configJSON string) error
StartUpSendingClient creates a SenderClient and triggers all `send` calls in sequence to the ReceiverServer
func ValidateConnectionString ¶ added in v0.131.7
Types ¶
type AccountPayload ¶
type AccountPayload struct {
// contains filtered or unexported fields
}
AccountPayload represents the payload structure a Server handles
type AccountPayloadLoader ¶ added in v0.140.0
type AccountPayloadLoader struct { *AccountPayload // contains filtered or unexported fields }
AccountPayloadLoader is responsible for loading, parsing and validating AccountPayload data
func NewAccountPayloadLoader ¶ added in v0.140.0
func NewAccountPayloadLoader(p *AccountPayload, config *SenderConfig) (*AccountPayloadLoader, error)
func (*AccountPayloadLoader) Load ¶ added in v0.140.0
func (apl *AccountPayloadLoader) Load() error
type AccountPayloadMarshaller ¶
type AccountPayloadMarshaller struct { *AccountPayload // contains filtered or unexported fields }
AccountPayloadMarshaller is responsible for marshalling and unmarshalling Server payload data
func NewPairingPayloadMarshaller ¶
func NewPairingPayloadMarshaller(ap *AccountPayload, logger *zap.Logger) *AccountPayloadMarshaller
func (*AccountPayloadMarshaller) MarshalProtobuf ¶ added in v0.140.0
func (ppm *AccountPayloadMarshaller) MarshalProtobuf() ([]byte, error)
func (*AccountPayloadMarshaller) UnmarshalProtobuf ¶
func (ppm *AccountPayloadMarshaller) UnmarshalProtobuf(data []byte) error
type AccountPayloadStorer ¶ added in v0.140.0
type AccountPayloadStorer struct { *AccountPayload // contains filtered or unexported fields }
AccountPayloadStorer is responsible for parsing, validating and storing AccountPayload data
func NewAccountPayloadStorer ¶ added in v0.140.0
func NewAccountPayloadStorer(p *AccountPayload, config *ReceiverConfig) (*AccountPayloadStorer, error)
func (*AccountPayloadStorer) Store ¶ added in v0.140.0
func (aps *AccountPayloadStorer) Store() error
type BaseClient ¶ added in v0.140.0
BaseClient is responsible for lower level pairing.Client functionality common to dependent Client types
func NewBaseClient ¶ added in v0.140.0
func NewBaseClient(c *ConnectionParams) (*BaseClient, error)
NewBaseClient returns a fully qualified BaseClient from the given ConnectionParams
type BasePayloadMounter ¶ added in v0.142.9
type BasePayloadMounter struct { *PayloadLockPayload *PayloadToSend // contains filtered or unexported fields }
func NewAccountPayloadMounter ¶ added in v0.140.0
func NewAccountPayloadMounter(pe *PayloadEncryptor, config *SenderConfig, logger *zap.Logger) (*BasePayloadMounter, error)
NewAccountPayloadMounter generates a new and initialised AccountPayload flavoured BasePayloadMounter responsible for the whole lifecycle of an AccountPayload
func NewBasePayloadMounter ¶ added in v0.142.9
func NewBasePayloadMounter(loader PayloadLoader, marshaller ProtobufMarshaller, e *PayloadEncryptor) *BasePayloadMounter
func NewInstallationPayloadMounter ¶ added in v0.140.0
func NewInstallationPayloadMounter(pe *PayloadEncryptor, backend *api.GethStatusBackend, deviceType string) *BasePayloadMounter
NewInstallationPayloadMounter generates a new and initialised InstallationPayload flavoured BasePayloadMounter responsible for the whole lifecycle of an InstallationPayload
func NewRawMessagePayloadMounter ¶ added in v0.140.0
func NewRawMessagePayloadMounter(logger *zap.Logger, pe *PayloadEncryptor, backend *api.GethStatusBackend, config *SenderConfig) *BasePayloadMounter
NewRawMessagePayloadMounter generates a new and initialised RawMessagePayload flavoured BasePayloadMounter responsible for the whole lifecycle of an RawMessagePayload
func (*BasePayloadMounter) Mount ¶ added in v0.142.9
func (bpm *BasePayloadMounter) Mount() error
Mount loads and prepares the payload to be stored in the PayloadLoader's state ready for later access
type BasePayloadReceiver ¶ added in v0.142.9
type BasePayloadReceiver struct { *PayloadLockPayload *PayloadReceived // contains filtered or unexported fields }
func NewAccountPayloadReceiver ¶ added in v0.140.0
func NewAccountPayloadReceiver(e *PayloadEncryptor, p *AccountPayload, config *ReceiverConfig, logger *zap.Logger) (*BasePayloadReceiver, error)
NewAccountPayloadReceiver generates a new and initialised AccountPayload flavoured BasePayloadReceiver AccountPayloadReceiver is responsible for the whole receive and store cycle of an AccountPayload
func NewBaseBasePayloadReceiver ¶ added in v0.142.9
func NewBaseBasePayloadReceiver(e *PayloadEncryptor, um ProtobufUnmarshaller, s PayloadStorer, callback func()) *BasePayloadReceiver
func NewInstallationPayloadReceiver ¶ added in v0.140.0
func NewInstallationPayloadReceiver(e *PayloadEncryptor, backend *api.GethStatusBackend, deviceType string) *BasePayloadReceiver
NewInstallationPayloadReceiver generates a new and initialised InstallationPayload flavoured BasePayloadReceiver InstallationPayloadReceiver is responsible for the whole receive and store cycle of a RawMessagesPayload specifically for sending / requesting installation data from the Receiver device.
func NewRawMessagePayloadReceiver ¶ added in v0.140.0
func NewRawMessagePayloadReceiver(accountPayload *AccountPayload, e *PayloadEncryptor, backend *api.GethStatusBackend, config *ReceiverConfig) *BasePayloadReceiver
NewRawMessagePayloadReceiver generates a new and initialised RawMessagesPayload flavoured BasePayloadReceiver RawMessagePayloadReceiver is responsible for the whole receive and store cycle of a RawMessagesPayload
func (*BasePayloadReceiver) Receive ¶ added in v0.142.9
func (bpr *BasePayloadReceiver) Receive(data []byte) error
Receive takes a []byte representing raw data, parses and stores the data
type BaseServer ¶ added in v0.140.0
func NewBaseServer ¶ added in v0.140.0
func NewBaseServer(logger *zap.Logger, e *PayloadEncryptor, config *ServerConfig) (*BaseServer, error)
NewBaseServer returns a *BaseServer init from the given *SenderServerConfig
func (*BaseServer) MakeConnectionParams ¶ added in v0.140.0
func (s *BaseServer) MakeConnectionParams() (*ConnectionParams, error)
MakeConnectionParams generates a *ConnectionParams based on the Server's current state
type ChallengeError ¶ added in v0.140.2
func (*ChallengeError) Error ¶ added in v0.140.2
func (ce *ChallengeError) Error() string
type ChallengeGiver ¶ added in v0.140.2
type ChallengeGiver struct {
// contains filtered or unexported fields
}
ChallengeGiver is responsible for generating challenges and checking challenge responses
func NewChallengeGiver ¶ added in v0.140.2
func NewChallengeGiver(e *PayloadEncryptor, logger *zap.Logger) (*ChallengeGiver, error)
type ChallengeTaker ¶ added in v0.140.2
type ChallengeTaker struct {
// contains filtered or unexported fields
}
ChallengeTaker is responsible for storing and performing server challenges
func NewChallengeTaker ¶ added in v0.140.2
func NewChallengeTaker(e *PayloadEncryptor) *ChallengeTaker
func (*ChallengeTaker) DoChallenge ¶ added in v0.140.2
func (ct *ChallengeTaker) DoChallenge(req *http.Request) error
func (*ChallengeTaker) SetChallenge ¶ added in v0.140.2
func (ct *ChallengeTaker) SetChallenge(resp *http.Response) error
type ClientConfig ¶ added in v0.140.0
type ClientConfig struct{}
type ConnectionParams ¶
type ConnectionParams struct {
// contains filtered or unexported fields
}
func NewConnectionParams ¶
func (*ConnectionParams) FromString ¶
func (cp *ConnectionParams) FromString(s string) error
FromString parses a connection params string required for to securely connect to another Status device. This function parses a connection string generated by ToString
func (*ConnectionParams) ToString ¶
func (cp *ConnectionParams) ToString() string
ToString generates a string required for generating a secure connection to another Status device.
The returned string will look like below:
- "cs2:4FHRnp:H6G:uqnnMwVUfJc2Fkcaojet8F1ufKC3hZdGEt47joyBx9yd:BbnZ7Gc66t54a9kEFCf7FW8SGQuYypwHVeNkRYeNoqV6"
Format bytes encoded into a base58 string, delimited by ":"
- string type identifier
- version
- net.IP
- port
- ecdsa CompressedPublicKey
- AES encryption key
type EncryptionPayload ¶
type EncryptionPayload struct {
// contains filtered or unexported fields
}
EncryptionPayload represents the plain text and encrypted text of payload data
type Event ¶
type Event struct { Type EventType `json:"type"` Error string `json:"error,omitempty"` Action Action `json:"action"` Data any `json:"data,omitempty"` }
Event is a type for transfer events.
type EventType ¶
type EventType string
EventType type for event types.
const ( EventPeerDiscovered EventType = "peer-discovered" EventConnectionError EventType = "connection-error" EventConnectionSuccess EventType = "connection-success" EventTransferError EventType = "transfer-error" EventTransferSuccess EventType = "transfer-success" EventReceivedInstallation EventType = "received-installation" EventReceivedAccount EventType = "received-account" EventProcessSuccess EventType = "process-success" EventProcessError EventType = "process-error" )
type InstallationPayloadLoader ¶ added in v0.140.0
type InstallationPayloadLoader struct {
// contains filtered or unexported fields
}
func NewInstallationPayloadLoader ¶ added in v0.140.0
func NewInstallationPayloadLoader(backend *api.GethStatusBackend, payload *RawMessagesPayload, deviceType string) *InstallationPayloadLoader
func (*InstallationPayloadLoader) Load ¶ added in v0.140.0
func (r *InstallationPayloadLoader) Load() error
type InstallationPayloadMounterReceiver ¶ added in v0.140.0
type InstallationPayloadMounterReceiver struct { PayloadMounter PayloadReceiver }
InstallationPayloadMounterReceiver represents an InstallationPayload Repository
func NewInstallationPayloadMounterReceiver ¶ added in v0.140.0
func NewInstallationPayloadMounterReceiver(encryptor *PayloadEncryptor, backend *api.GethStatusBackend, deviceType string) *InstallationPayloadMounterReceiver
func (*InstallationPayloadMounterReceiver) LockPayload ¶ added in v0.140.0
func (i *InstallationPayloadMounterReceiver) LockPayload()
type InstallationPayloadStorer ¶ added in v0.140.0
type InstallationPayloadStorer struct {
// contains filtered or unexported fields
}
func NewInstallationPayloadStorer ¶ added in v0.140.0
func NewInstallationPayloadStorer(backend *api.GethStatusBackend, payload *RawMessagesPayload, deviceType string) *InstallationPayloadStorer
func (*InstallationPayloadStorer) Store ¶ added in v0.140.0
func (r *InstallationPayloadStorer) Store() error
type PayloadEncryptor ¶ added in v0.140.0
type PayloadEncryptor struct {
// contains filtered or unexported fields
}
PayloadEncryptor is responsible for encrypting and decrypting payload data
func NewPayloadEncryptor ¶ added in v0.140.0
func NewPayloadEncryptor(aesKey []byte) *PayloadEncryptor
func (*PayloadEncryptor) Renew ¶ added in v0.140.0
func (pem *PayloadEncryptor) Renew() *PayloadEncryptor
Renew regenerates the whole PayloadEncryptor and returns the new instance, only the aesKey is preserved
type PayloadLoader ¶ added in v0.140.0
type PayloadLoader interface {
Load() error
}
type PayloadLockPayload ¶ added in v0.142.9
type PayloadLockPayload struct {
*PayloadEncryptor
}
PayloadLockPayload Embeds a *PayloadEncryptor to give all embedding structs EncryptionPayload Locking
func (*PayloadLockPayload) LockPayload ¶ added in v0.142.9
func (pl *PayloadLockPayload) LockPayload()
type PayloadLocker ¶ added in v0.140.0
type PayloadLocker interface {
// LockPayload prevents future excess to outbound safe and received data
LockPayload()
}
type PayloadMounter ¶ added in v0.140.0
type PayloadMounter interface { PayloadLocker // Mount Loads the payload into the PayloadManager's state Mount() error // ToSend returns an outbound safe (encrypted) payload ToSend() []byte }
type PayloadMounterReceiver ¶ added in v0.140.0
type PayloadMounterReceiver interface { PayloadMounter PayloadReceiver }
PayloadMounterReceiver represents a struct that can:
- mount payload data from a PayloadRepository or a PayloadLoader into memory (PayloadMounter.Mount)
- prepare data to be sent encrypted (PayloadMounter.ToSend) via some transport
- receive and prepare encrypted transport data (PayloadReceiver.Receive) to be stored
- prepare the received (PayloadReceiver.Received) data to be stored to a PayloadRepository or a PayloadStorer
type PayloadReceived ¶ added in v0.142.9
type PayloadReceived struct {
*PayloadEncryptor
}
PayloadReceived Embeds a *PayloadEncryptor to give all embedding structs EncryptionPayload Received() functionality Useful to securely implement the PayloadReceiver interface
func (*PayloadReceived) Received ¶ added in v0.142.9
func (pr *PayloadReceived) Received() []byte
type PayloadReceiver ¶ added in v0.140.0
type PayloadReceiver interface { PayloadLocker // Receive accepts data from an inbound source into the PayloadReceiver's state Receive(data []byte) error // Received returns a decrypted and parsed payload from an inbound source Received() []byte }
type PayloadRepository ¶
type PayloadRepository interface { PayloadLoader PayloadStorer }
PayloadRepository represents a struct that can both load and store data to an internally managed data store
type PayloadStorer ¶ added in v0.140.0
type PayloadStorer interface {
Store() error
}
type PayloadToSend ¶ added in v0.142.9
type PayloadToSend struct {
*PayloadEncryptor
}
PayloadToSend Embeds a *PayloadEncryptor to give all embedding structs EncryptionPayload ToSend() functionality Useful to securely implement the PayloadMounter interface
func (*PayloadToSend) ToSend ¶ added in v0.142.9
func (pts *PayloadToSend) ToSend() []byte
type PeerNotifier ¶ added in v0.146.3
type PeerNotifier struct {
// contains filtered or unexported fields
}
func NewPeerNotifier ¶ added in v0.146.3
func NewPeerNotifier() *PeerNotifier
func (*PeerNotifier) Search ¶ added in v0.146.3
func (p *PeerNotifier) Search() error
type ProtobufMarshaller ¶ added in v0.142.9
type ProtobufUnmarshaller ¶ added in v0.142.9
type RawMessageCollector ¶
type RawMessageCollector struct {
// contains filtered or unexported fields
}
type RawMessageLoader ¶ added in v0.140.0
type RawMessageLoader struct {
// contains filtered or unexported fields
}
func NewRawMessageLoader ¶ added in v0.140.0
func NewRawMessageLoader(backend *api.GethStatusBackend, payload *RawMessagesPayload, config *SenderConfig) *RawMessageLoader
func (*RawMessageLoader) Load ¶ added in v0.140.0
func (r *RawMessageLoader) Load() (err error)
type RawMessagePayloadMarshaller ¶ added in v0.142.9
type RawMessagePayloadMarshaller struct {
// contains filtered or unexported fields
}
RawMessagePayloadMarshaller is responsible for marshalling and unmarshalling raw message data
func NewRawMessagePayloadMarshaller ¶ added in v0.142.9
func NewRawMessagePayloadMarshaller(payload *RawMessagesPayload) *RawMessagePayloadMarshaller
func (*RawMessagePayloadMarshaller) MarshalProtobuf ¶ added in v0.142.9
func (rmm *RawMessagePayloadMarshaller) MarshalProtobuf() (data []byte, err error)
func (*RawMessagePayloadMarshaller) UnmarshalProtobuf ¶ added in v0.142.9
func (rmm *RawMessagePayloadMarshaller) UnmarshalProtobuf(data []byte) error
type RawMessageStorer ¶ added in v0.140.0
type RawMessageStorer struct {
// contains filtered or unexported fields
}
func NewRawMessageStorer ¶ added in v0.140.0
func NewRawMessageStorer(backend *api.GethStatusBackend, payload *RawMessagesPayload, accountPayload *AccountPayload, config *ReceiverConfig) *RawMessageStorer
func (*RawMessageStorer) Store ¶ added in v0.140.0
func (r *RawMessageStorer) Store() error
type RawMessagesPayload ¶ added in v0.142.9
type RawMessagesPayload struct {
// contains filtered or unexported fields
}
func NewRawMessagesPayload ¶ added in v0.142.9
func NewRawMessagesPayload() *RawMessagesPayload
type ReceiverClient ¶ added in v0.140.0
type ReceiverClient struct { *BaseClient // contains filtered or unexported fields }
ReceiverClient is responsible for accepting pairing data to a SenderServer
func NewReceiverClient ¶ added in v0.140.0
func NewReceiverClient(backend *api.GethStatusBackend, c *ConnectionParams, config *ReceiverClientConfig) (*ReceiverClient, error)
NewReceiverClient returns a fully qualified ReceiverClient created with the incoming parameters
type ReceiverClientConfig ¶ added in v0.140.0
type ReceiverClientConfig struct { ReceiverConfig *ReceiverConfig `json:"receiverConfig" validate:"required"` ClientConfig *ClientConfig `json:"clientConfig"` }
func NewReceiverClientConfig ¶ added in v0.140.0
func NewReceiverClientConfig() *ReceiverClientConfig
type ReceiverConfig ¶ added in v0.140.0
type ReceiverConfig struct { // nodeConfig is required, but we'll validate it separately NodeConfig *params.NodeConfig `json:"nodeConfig"` // ReceiverConfig.KeystorePath must not end with keyUID (because keyUID is not known yet) KeystorePath string `json:"keystorePath" validate:"required,not_end_keyuid"` // DeviceType SendPairInstallation need this information DeviceType string `json:"deviceType" validate:"required"` KDFIterations int `json:"kdfIterations" validate:"gte=0"` // SettingCurrentNetwork corresponding to field current_network from table settings, so that we can override current network from sender SettingCurrentNetwork string `json:"settingCurrentNetwork" validate:"required"` DB *multiaccounts.Database `json:"-"` LoggedInKeyUID string `json:"-"` }
type ReceiverServer ¶ added in v0.140.0
type ReceiverServer struct { *BaseServer // contains filtered or unexported fields }
func MakeFullReceiverServer ¶ added in v0.140.0
func MakeFullReceiverServer(backend *api.GethStatusBackend, config *ReceiverServerConfig) (*ReceiverServer, error)
MakeFullReceiverServer generates a fully configured and randomly seeded ReceiverServer
func NewReceiverServer ¶ added in v0.140.0
func NewReceiverServer(backend *api.GethStatusBackend, config *ReceiverServerConfig) (*ReceiverServer, error)
NewReceiverServer returns a *SenderServer init from the given *ReceiverServerConfig
type ReceiverServerConfig ¶ added in v0.140.0
type ReceiverServerConfig struct { ReceiverConfig *ReceiverConfig `json:"receiverConfig" validate:"required"` ServerConfig *ServerConfig `json:"serverConfig" validate:"omitempty,dive"` }
func NewReceiverServerConfig ¶ added in v0.140.0
func NewReceiverServerConfig() *ReceiverServerConfig
type SenderClient ¶ added in v0.140.0
type SenderClient struct { *BaseClient // contains filtered or unexported fields }
SenderClient is responsible for sending pairing data to a ReceiverServer
func NewSenderClient ¶ added in v0.140.0
func NewSenderClient(backend *api.GethStatusBackend, c *ConnectionParams, config *SenderClientConfig) (*SenderClient, error)
NewSenderClient returns a fully qualified SenderClient created with the incoming parameters
type SenderClientConfig ¶ added in v0.140.0
type SenderClientConfig struct { SenderConfig *SenderConfig `json:"senderConfig" validate:"required"` ClientConfig *ClientConfig `json:"clientConfig"` }
func NewSenderClientConfig ¶ added in v0.140.0
func NewSenderClientConfig() *SenderClientConfig
type SenderConfig ¶ added in v0.140.0
type SenderConfig struct { // SenderConfig.KeystorePath must end with keyUID KeystorePath string `json:"keystorePath" validate:"required,keystorepath"` // DeviceType SendPairInstallation need this information DeviceType string `json:"deviceType" validate:"required"` KeyUID string `json:"keyUID" validate:"required,keyuid"` Password string `json:"password" validate:"required"` DB *multiaccounts.Database `json:"-"` }
type SenderServer ¶ added in v0.140.0
type SenderServer struct { *BaseServer // contains filtered or unexported fields }
func MakeFullSenderServer ¶ added in v0.140.0
func MakeFullSenderServer(backend *api.GethStatusBackend, config *SenderServerConfig) (*SenderServer, error)
MakeFullSenderServer generates a fully configured and randomly seeded SenderServer
func NewSenderServer ¶ added in v0.140.0
func NewSenderServer(backend *api.GethStatusBackend, config *SenderServerConfig) (*SenderServer, error)
NewSenderServer returns a *SenderServer init from the given *SenderServerConfig
type SenderServerConfig ¶ added in v0.140.0
type SenderServerConfig struct { SenderConfig *SenderConfig `json:"senderConfig" validate:"required"` ServerConfig *ServerConfig `json:"serverConfig" validate:"omitempty,dive"` }
func NewSenderServerConfig ¶ added in v0.140.0
func NewSenderServerConfig() *SenderServerConfig
type ServerConfig ¶ added in v0.140.0
type SyncRawMessageHandler ¶
type SyncRawMessageHandler struct {
// contains filtered or unexported fields
}
func NewSyncRawMessageHandler ¶
func NewSyncRawMessageHandler(backend *api.GethStatusBackend) *SyncRawMessageHandler
func (*SyncRawMessageHandler) CollectInstallationData ¶ added in v0.134.0
func (s *SyncRawMessageHandler) CollectInstallationData(rawMessageCollector *RawMessageCollector, deviceType string) error
func (*SyncRawMessageHandler) HandleRawMessage ¶
func (s *SyncRawMessageHandler) HandleRawMessage(accountPayload *AccountPayload, nodeConfig *params.NodeConfig, settingCurrentNetwork, deviceType string, rmp *RawMessagesPayload) (err error)
func (*SyncRawMessageHandler) PrepareRawMessage ¶
func (s *SyncRawMessageHandler) PrepareRawMessage(keyUID, deviceType string) (rm []*protobuf.RawMessage, as []*accounts.Account, syncSettings *settings.Settings, err error)