Documentation
¶
Index ¶
- Variables
- func GenerateCertFromKey(pk *ecdsa.PrivateKey, from time.Time, hostname string) (tls.Certificate, []byte, error)
- func MakeServerConfig(config *ServerConfig) error
- func NewPayloadMounters(logger *zap.Logger, pe *PayloadEncryptor, backend *api.GethStatusBackend, ...) (*AccountPayloadMounter, *RawMessagePayloadMounter, ...)
- func NewPayloadReceivers(logger *zap.Logger, pe *PayloadEncryptor, backend *api.GethStatusBackend, ...) (*AccountPayloadReceiver, *RawMessagePayloadReceiver, ...)
- 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 AccountPayloadMounter
- type AccountPayloadReceiver
- type AccountPayloadStorer
- type Action
- type BaseClient
- type BaseServer
- type ChallengeError
- type ChallengeGiver
- type ChallengeTaker
- type ClientConfig
- type ConnectionParamVersion
- type ConnectionParams
- type EncryptionPayload
- type Event
- type EventType
- type HandlerServer
- type InstallationPayloadLoader
- type InstallationPayloadMounter
- type InstallationPayloadMounterReceiver
- type InstallationPayloadReceiver
- type InstallationPayloadStorer
- type PayloadEncryptor
- type PayloadLoader
- type PayloadLocker
- type PayloadMounter
- type PayloadMounterReceiver
- type PayloadReceiver
- type PayloadRepository
- type PayloadStorer
- type ProtobufMarshaler
- type ProtobufUnmarshaler
- type RawMessageCollector
- type RawMessageLoader
- type RawMessagePayloadMounter
- type RawMessagePayloadReceiver
- type RawMessageStorer
- 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, ...) error
- func (s *SyncRawMessageHandler) PrepareRawMessage(keyUID, deviceType string) ([]byte, error)
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 GenerateCertFromKey ¶
func GenerateCertFromKey(pk *ecdsa.PrivateKey, from time.Time, hostname string) (tls.Certificate, []byte, error)
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) (*AccountPayloadMounter, *RawMessagePayloadMounter, *InstallationPayloadMounterReceiver, error)
func NewPayloadReceivers ¶ added in v0.140.0
func NewPayloadReceivers(logger *zap.Logger, pe *PayloadEncryptor, backend *api.GethStatusBackend, config *ReceiverConfig) (*AccountPayloadReceiver, *RawMessagePayloadReceiver, *InstallationPayloadMounterReceiver, 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 AccountPayloadMounter ¶ added in v0.140.0
type AccountPayloadMounter struct {
// contains filtered or unexported fields
}
AccountPayloadMounter is responsible for the whole lifecycle of an AccountPayload
func NewAccountPayloadMounter ¶ added in v0.140.0
func NewAccountPayloadMounter(pe *PayloadEncryptor, config *SenderConfig, logger *zap.Logger) (*AccountPayloadMounter, error)
NewAccountPayloadMounter generates a new and initialised AccountPayloadMounter
func (*AccountPayloadMounter) LockPayload ¶ added in v0.140.0
func (apm *AccountPayloadMounter) LockPayload()
func (*AccountPayloadMounter) Mount ¶ added in v0.140.0
func (apm *AccountPayloadMounter) Mount() error
Mount loads and prepares the payload to be stored in the AccountPayloadLoader's state ready for later access
func (*AccountPayloadMounter) ToSend ¶ added in v0.140.0
func (apm *AccountPayloadMounter) ToSend() []byte
type AccountPayloadReceiver ¶ added in v0.140.0
type AccountPayloadReceiver struct {
// contains filtered or unexported fields
}
AccountPayloadReceiver is responsible for the whole lifecycle of a AccountPayload
func NewAccountPayloadReceiver ¶ added in v0.140.0
func NewAccountPayloadReceiver(encryptor *PayloadEncryptor, config *ReceiverConfig, logger *zap.Logger) (*AccountPayloadReceiver, error)
NewAccountPayloadReceiver generates a new and initialised AccountPayloadManager
func (*AccountPayloadReceiver) LockPayload ¶ added in v0.140.0
func (apr *AccountPayloadReceiver) LockPayload()
func (*AccountPayloadReceiver) Receive ¶ added in v0.140.0
func (apr *AccountPayloadReceiver) Receive(data []byte) error
Receive takes a []byte representing raw data, parses and stores the data
func (*AccountPayloadReceiver) Received ¶ added in v0.140.0
func (apr *AccountPayloadReceiver) Received() []byte
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 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 ConnectionParamVersion ¶
type ConnectionParamVersion int
const (
Version1 ConnectionParamVersion = iota + 1
)
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 ( EventConnectionError EventType = "connection-error" EventConnectionSuccess EventType = "connection-success" EventTransferError EventType = "transfer-error" EventTransferSuccess EventType = "transfer-success" EventReceivedAccount EventType = "received-account" EventProcessSuccess EventType = "process-success" EventProcessError EventType = "process-error" )
type HandlerServer ¶ added in v0.140.0
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, deviceType string) *InstallationPayloadLoader
func (*InstallationPayloadLoader) Load ¶ added in v0.140.0
func (r *InstallationPayloadLoader) Load() error
type InstallationPayloadMounter ¶ added in v0.140.0
type InstallationPayloadMounter struct {
// contains filtered or unexported fields
}
func NewInstallationPayloadMounter ¶ added in v0.140.0
func NewInstallationPayloadMounter(logger *zap.Logger, pe *PayloadEncryptor, backend *api.GethStatusBackend, deviceType string) *InstallationPayloadMounter
func (*InstallationPayloadMounter) LockPayload ¶ added in v0.140.0
func (i *InstallationPayloadMounter) LockPayload()
func (*InstallationPayloadMounter) Mount ¶ added in v0.140.0
func (i *InstallationPayloadMounter) Mount() error
func (*InstallationPayloadMounter) ToSend ¶ added in v0.140.0
func (i *InstallationPayloadMounter) ToSend() []byte
type InstallationPayloadMounterReceiver ¶ added in v0.140.0
type InstallationPayloadMounterReceiver struct { *InstallationPayloadMounter *InstallationPayloadReceiver }
InstallationPayloadMounterReceiver represents an InstallationPayload Repository
func NewInstallationPayloadMounterReceiver ¶ added in v0.140.0
func NewInstallationPayloadMounterReceiver(logger *zap.Logger, encryptor *PayloadEncryptor, backend *api.GethStatusBackend, deviceType string) *InstallationPayloadMounterReceiver
func (*InstallationPayloadMounterReceiver) LockPayload ¶ added in v0.140.0
func (i *InstallationPayloadMounterReceiver) LockPayload()
type InstallationPayloadReceiver ¶ added in v0.140.0
type InstallationPayloadReceiver struct {
// contains filtered or unexported fields
}
func NewInstallationPayloadReceiver ¶ added in v0.140.0
func NewInstallationPayloadReceiver(logger *zap.Logger, encryptor *PayloadEncryptor, backend *api.GethStatusBackend, deviceType string) *InstallationPayloadReceiver
func (*InstallationPayloadReceiver) LockPayload ¶ added in v0.140.0
func (i *InstallationPayloadReceiver) LockPayload()
func (*InstallationPayloadReceiver) Receive ¶ added in v0.140.0
func (i *InstallationPayloadReceiver) Receive(data []byte) error
func (*InstallationPayloadReceiver) Received ¶ added in v0.140.0
func (i *InstallationPayloadReceiver) Received() []byte
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, 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 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 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 ProtobufMarshaler ¶ added in v0.140.0
type ProtobufUnmarshaler ¶ added in v0.140.0
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, config *SenderConfig) *RawMessageLoader
func (*RawMessageLoader) Load ¶ added in v0.140.0
func (r *RawMessageLoader) Load() (err error)
type RawMessagePayloadMounter ¶ added in v0.140.0
type RawMessagePayloadMounter struct {
// contains filtered or unexported fields
}
func NewRawMessagePayloadMounter ¶ added in v0.140.0
func NewRawMessagePayloadMounter(logger *zap.Logger, pe *PayloadEncryptor, backend *api.GethStatusBackend, config *SenderConfig) *RawMessagePayloadMounter
func (*RawMessagePayloadMounter) LockPayload ¶ added in v0.140.0
func (r *RawMessagePayloadMounter) LockPayload()
func (*RawMessagePayloadMounter) Mount ¶ added in v0.140.0
func (r *RawMessagePayloadMounter) Mount() error
func (*RawMessagePayloadMounter) ToSend ¶ added in v0.140.0
func (r *RawMessagePayloadMounter) ToSend() []byte
type RawMessagePayloadReceiver ¶ added in v0.140.0
type RawMessagePayloadReceiver struct {
// contains filtered or unexported fields
}
func NewRawMessagePayloadReceiver ¶ added in v0.140.0
func NewRawMessagePayloadReceiver(logger *zap.Logger, accountPayload *AccountPayload, encryptor *PayloadEncryptor, backend *api.GethStatusBackend, config *ReceiverConfig) *RawMessagePayloadReceiver
func (*RawMessagePayloadReceiver) LockPayload ¶ added in v0.140.0
func (r *RawMessagePayloadReceiver) LockPayload()
func (*RawMessagePayloadReceiver) Receive ¶ added in v0.140.0
func (r *RawMessagePayloadReceiver) Receive(data []byte) error
func (*RawMessagePayloadReceiver) Received ¶ added in v0.140.0
func (r *RawMessagePayloadReceiver) Received() []byte
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, accountPayload *AccountPayload, config *ReceiverConfig) *RawMessageStorer
func (*RawMessageStorer) Store ¶ added in v0.140.0
func (r *RawMessageStorer) Store() error
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, rawMessagePayload []byte) error
func (*SyncRawMessageHandler) PrepareRawMessage ¶
func (s *SyncRawMessageHandler) PrepareRawMessage(keyUID, deviceType string) ([]byte, error)