dkgnode

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2019 License: MIT Imports: 88 Imported by: 0

Documentation

Index

Constants

View Source
const CommitmentRequestMethod = "CommitmentRequest"
View Source
const ContextID = ContextKey("ID")
View Source
const KeyAssignMethod = "KeyAssign"
View Source
const KeyLookupRequestMethod = "KeyLookupRequest"
View Source
const PatchMappingRequestMethod = "PatchMapping"

patch003 TODO remove

View Source
const PingMethod = "Ping"
View Source
const ShareCountMethod = "ShareCount"

Debug Handelers

View Source
const ShareRequestMethod = "ShareRequest"
View Source
const VerifierLookupRequestMethod = "VerifierLookupRequest"

Variables

View Source
var Events = struct {
	ErrorEvent string
	StartEvent string
	StopEvent  string
}{
	ErrorEvent: "error",
	StartEvent: "start",
	StopEvent:  "stop",
}
View Source
var MessageSourceMapping = map[MessageSource]string{
	BFT: "BFT",
	P2P: "P2P",
}
View Source
var (

	// ProtocolVersion -
	ProtocolVersion version.Protocol = 0x1
)

DB Stuff for App state and mappings

Functions

func AwaitTopic

func AwaitTopic(eventBus eventbus.Bus, topic string) <-chan interface{}

func BytesArrayToPointsArray

func BytesArrayToPointsArray(byteArray []byte) (pointsArray []*common.Point)

func ECDSASigToHex

func ECDSASigToHex(ecdsaSig ECDSASignature) string

func ECDSAVerify

func ECDSAVerify(ecdsaPubKey ecdsa.PublicKey, ecdsaSignature ECDSASignature) bool

func ECDSAVerifyFromRaw

func ECDSAVerifyFromRaw(msg []byte, ecdsaPubKey ecdsa.PublicKey, signature []byte) bool

func ECDSAVerifyPtFromRaw

func ECDSAVerifyPtFromRaw(msg []byte, pubKeyPt common.Point, sig []byte) bool

func EmptyHandler

func EmptyHandler(name string) func()

func GETHealthz

func GETHealthz(w http.ResponseWriter, r *http.Request)

GETHealthz always responds with 200 and can be used for basic readiness checks

func GetBftStatus

func GetBftStatus(w http.ResponseWriter, r *http.Request)

func GetPeerIDFromP2pListenAddress

func GetPeerIDFromP2pListenAddress(p2pListenAddress string) (*peer.ID, error)

func HashToString

func HashToString(bytes []byte) string

Hashes to a hex string (only the first 6 chars)

func HexstringToInt

func HexstringToInt(hs hexstring) int

func IntToHexstring

func IntToHexstring(i int) hexstring

func New

func New()

func PointsArrayToBytesArray

func PointsArrayToBytesArray(pointsArray *[]common.Point) []byte

[X1, Y1, X2, Y2, X3, Y3 ... ]

Types

type ABCIApp

type ABCIApp struct {
	types.BaseApplication
	// contains filtered or unexported fields
}

func (*ABCIApp) BeginBlock

Track the block hash and header information

func (*ABCIApp) CheckTx

func (app *ABCIApp) CheckTx(req types.RequestCheckTx) types.ResponseCheckTx

func (*ABCIApp) Commit

func (app *ABCIApp) Commit() types.ResponseCommit

func (*ABCIApp) DeliverTx

func (*ABCIApp) EndBlock

func (app *ABCIApp) EndBlock(req types.RequestEndBlock) types.ResponseEndBlock

EndBlock

func (*ABCIApp) Info

func (app *ABCIApp) Info(req types.RequestInfo) (resInfo types.ResponseInfo)

func (*ABCIApp) LoadState

func (app *ABCIApp) LoadState() (State, bool)

func (*ABCIApp) Query

func (app *ABCIApp) Query(reqQuery types.RequestQuery) (resQuery types.ResponseQuery)

Query -

func (*ABCIApp) SaveState

func (app *ABCIApp) SaveState() State

func (*ABCIApp) ValidateAndUpdateAndTagBFTTx

func (app *ABCIApp) ValidateAndUpdateAndTagBFTTx(bftTx []byte, msgType byte) (bool, *[]tmcommon.KVPair, error)

Validates transactions to be delivered to the BFT. is the master switch for all tx TODO: create variables for types here and in bftrpc.go

type ABCIMethods

type ABCIMethods interface {
	SetOwner(owner string)
	GetOwner() (owner string)

	LastCreatedIndex() (keyIndex uint)
	LastUnassignedIndex() (keyIndex uint)
	RetrieveKeyMapping(keyIndex big.Int) (keyDetails KeyAssignmentPublic, err error)
	GetIndexesFromVerifierID(verifier, veriferID string) (keyIndexes []big.Int, err error)
}

type ABCIMethodsImpl

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

func (*ABCIMethodsImpl) GetIndexesFromVerifierID

func (a *ABCIMethodsImpl) GetIndexesFromVerifierID(verifier, verifierID string) (keyIndexes []big.Int, err error)

func (*ABCIMethodsImpl) GetOwner

func (m *ABCIMethodsImpl) GetOwner() (owner string)

func (*ABCIMethodsImpl) LastCreatedIndex

func (a *ABCIMethodsImpl) LastCreatedIndex() (keyIndex uint)

func (*ABCIMethodsImpl) LastUnassignedIndex

func (a *ABCIMethodsImpl) LastUnassignedIndex() (keyIndex uint)

func (*ABCIMethodsImpl) RetrieveKeyMapping

func (a *ABCIMethodsImpl) RetrieveKeyMapping(keyIndex big.Int) (keyDetails KeyAssignmentPublic, err error)

func (*ABCIMethodsImpl) SetOwner

func (m *ABCIMethodsImpl) SetOwner(owner string)

type ABCIService

type ABCIService struct {
	ABCIApp *ABCIApp
	// contains filtered or unexported fields
}

func (*ABCIService) Call

func (a *ABCIService) Call(method string, args ...interface{}) (interface{}, error)

TODO: (Zhen) We definitly have to create a state lock. A lot of our calls are working now cause deliverTx is synchornous, but our monitor and other calls to state will eventually break Delayed due so that we can get the app running first

func (*ABCIService) Name

func (a *ABCIService) Name() string

func (*ABCIService) NewABCIApp

func (a *ABCIService) NewABCIApp() *ABCIApp

func (*ABCIService) OnStart

func (a *ABCIService) OnStart() error

func (*ABCIService) OnStop

func (a *ABCIService) OnStop() error

func (*ABCIService) RunABCIServer

func (a *ABCIService) RunABCIServer(eventBus eventbus.Bus) error

func (*ABCIService) SetBaseService

func (a *ABCIService) SetBaseService(bs *BaseService)

type ABCITransaction

type ABCITransaction struct {
	Type    string      `json:"type"`
	Payload interface{} `json:"payload"`
}

ABCITransaction -

type AssignmentBFTTx

type AssignmentBFTTx struct {
	Verifier   string
	VerifierID string
}

type BFTRPC

type BFTRPC struct {
	client.Client
}

func (BFTRPC) Broadcast

func (bftrpc BFTRPC) Broadcast(bftTx interface{}) (*common.Hash, error)

BroadcastTxSync Wrapper (input should be bijsoned) to tendermint.

func (BFTRPC) Retrieve

func (bftrpc BFTRPC) Retrieve(hash []byte, txStruct BFTTxWrapper) (err error)

Retrieves tx from the bft and gives back results. Takes off the donut

type BFTRPCWSQueryHandler

type BFTRPCWSQueryHandler struct {
	idmutex.Mutex
	QueryMap   map[string]chan []byte
	QueryCount map[string]int
}

type BFTRPCWSStatus

type BFTRPCWSStatus int
const (
	BftRPCWSStatusDown BFTRPCWSStatus = iota
	BftRPCWSStatusUp
)

type BFTTxWrapper

type BFTTxWrapper interface {
	//Create byte type and attach nonce
	PrepareBFTTx() ([]byte, error)
	//Decode byte type
	DecodeBFTTx([]byte) error
	GetSerializedBody() []byte
}

type BaseService

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

BaseService provides the guarantees that a ServiceCore can only be started and stopped once.

func NewABCIService

func NewABCIService(ctx context.Context, eventBus eventbus.Bus) *BaseService

func NewBaseService

func NewBaseService(impl ServiceCore) *BaseService

NewBaseService returns a base service that wraps an implementation of ServiceCore and handles starting and stopping.

func NewCacheService

func NewCacheService(ctx context.Context, eventBus eventbus.Bus) *BaseService

func NewDatabaseService

func NewDatabaseService(ctx context.Context, eb eventbus.Bus) *BaseService

func NewEthereumService

func NewEthereumService(ctx context.Context, eventBus eventbus.Bus) *BaseService

func NewKeygennofsmService

func NewKeygennofsmService(ctx context.Context, eventBus eventbus.Bus) *BaseService

func NewP2PService

func NewP2PService(ctx context.Context, eventBus eventbus.Bus) *BaseService

func NewPSSService

func NewPSSService(ctx context.Context, eventBus eventbus.Bus) *BaseService

func NewServerService

func NewServerService(ctx context.Context, eventBus eventbus.Bus) *BaseService

func NewTelemetryService

func NewTelemetryService(ctx context.Context, eventBus eventbus.Bus) *BaseService

func NewTendermintService

func NewTendermintService(ctx context.Context, eventBus eventbus.Bus) *BaseService

func NewVerifierService

func NewVerifierService(ctx context.Context, eventBus eventbus.Bus) *BaseService

func (*BaseService) Call

func (bs *BaseService) Call(method string, args ...interface{}) (interface{}, error)

Query implements Service

func (*BaseService) IsRunning

func (bs *BaseService) IsRunning() bool

IsRunning implements Service

func (*BaseService) Name

func (bs *BaseService) Name() string

func (*BaseService) SetServiceCore

func (bs *BaseService) SetServiceCore(service ServiceCore)

SetServiceCore impleents SetServiceCore

func (*BaseService) Start

func (bs *BaseService) Start() (bool, error)

Start implements Service

func (*BaseService) Stop

func (bs *BaseService) Stop() bool

Stop implements Service

func (*BaseService) String

func (bs *BaseService) String() string

String implements Service

func (*BaseService) Wait

func (bs *BaseService) Wait()

type BftWorkerUpdates

type BftWorkerUpdates struct {
	Type    string
	Payload interface{}
}

type CacheMethods

type CacheMethods interface {
	SetOwner(owner string)
	GetOwner() (owner string)

	TokenCommitExists(verifier string, tokenCommitment string) (exists bool)
	RecordTokenCommit(verifier string, tokenCommitment string)
}

type CacheMethodsImpl

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

func (*CacheMethodsImpl) GetOwner

func (m *CacheMethodsImpl) GetOwner() (owner string)

func (*CacheMethodsImpl) RecordTokenCommit

func (cache *CacheMethodsImpl) RecordTokenCommit(verifier string, tokenCommitment string)

func (*CacheMethodsImpl) SetOwner

func (m *CacheMethodsImpl) SetOwner(owner string)

func (*CacheMethodsImpl) TokenCommitExists

func (cache *CacheMethodsImpl) TokenCommitExists(verifier string, tokenCommitment string) (exists bool)

type CacheService

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

func (*CacheService) Call

func (c *CacheService) Call(method string, args ...interface{}) (interface{}, error)

func (*CacheService) Name

func (c *CacheService) Name() string

func (*CacheService) OnStart

func (c *CacheService) OnStart() error

func (*CacheService) OnStop

func (c *CacheService) OnStop() error

func (*CacheService) SetBaseService

func (c *CacheService) SetBaseService(bs *BaseService)

type CacheSuite

type CacheSuite struct {
	CacheInstance *cache.Cache
	TokenCaches   map[string]*cache.Cache
}

CacheSuite - handles caching

type CommitmentRequestHandler

type CommitmentRequestHandler struct {
	TimeNow func() time.Time
	// contains filtered or unexported fields
}

func (CommitmentRequestHandler) ServeJSONRPC

func (h CommitmentRequestHandler) ServeJSONRPC(c context.Context, params *bijson.RawMessage) (interface{}, *jsonrpc.Error)

type CommitmentRequestParams

type CommitmentRequestParams struct {
	MessagePrefix      string `json:"messageprefix"`
	TokenCommitment    string `json:"tokencommitment"`
	TempPubX           string `json:"temppubx"`
	TempPubY           string `json:"temppuby"`
	VerifierIdentifier string `json:"verifieridentifier"`
}

func (*CommitmentRequestParams) ToString

func (p *CommitmentRequestParams) ToString() string

type CommitmentRequestResult

type CommitmentRequestResult struct {
	Signature string `json:"signature"`
	Data      string `json:"data"`
	NodePubX  string `json:"nodepubx"`
	NodePubY  string `json:"nodepuby"`
}

type CommitmentRequestResultData

type CommitmentRequestResultData struct {
	MessagePrefix      string `json:"messageprefix"`
	TokenCommitment    string `json:"tokencommitment"`
	TempPubX           string `json:"temppubx"`
	TempPubY           string `json:"temppuby"`
	VerifierIdentifier string `json:"verifieridentifier"`
	TimeSigned         string `json:"timesigned"`
}

func (*CommitmentRequestResultData) FromString

func (c *CommitmentRequestResultData) FromString(data string) (bool, error)

func (*CommitmentRequestResultData) ToString

func (c *CommitmentRequestResultData) ToString() string

type Config

type Config struct {
	HttpServerPort string `json:"httpServerPort" env:"HTTP_SERVER_PORT"`

	// Used to manage the node whilst in live
	ManagementRPCPort string `json:"managementRPCPort" env:"MANAGEMENT_RPC_PORT"`
	UseManagementRPC  bool   `json:"useManagementRPC" env:"USE_MANAGEMENT_RPC"`

	// NOTE: This is what is used for registering on the Ethereum network.
	MainServerAddress          string `json:"mainServerAddress" env:"MAIN_SERVER_ADDRESS"`
	EthConnection              string `json:"ethconnection" env:"ETH_CONNECTION"`
	EthPrivateKey              string `json:"ethprivatekey" env:"ETH_PRIVATE_KEY"`
	BftURI                     string `json:"bfturi" env:"BFT_URI"`
	ABCIServer                 string `json:"abciserver" env:"ABCI_SERVER"`
	TMP2PListenAddress         string `json:"tmp2plistenaddress" env:"TM_P2P_LISTEN_ADDRESS"`
	P2PListenAddress           string `json:"p2plistenaddress" env:"P2P_LISTEN_ADDRESS"`
	NodeListAddress            string `json:"nodelistaddress" env:"NODE_LIST_ADDRESS"`
	NumberOfNodes              int    `json:"numberofnodes" env:"NUMBER_OF_NODES"`
	Threshold                  int    `json:"threshold" env:"THRESHOLD"`     // k
	NumMalNodes                int    `json:"nummalnodes" env:"NUMMALNODES"` // t
	KeyBuffer                  int    `json:"keybuffer" env:"KEY_BUFFER"`
	KeysPerEpoch               int    `json:"keysperepoch" env:"KEYS_PER_EPOCH"`
	KeyBufferTriggerPercentage int    `json:"keybuffertriggerpercentage" env:"KEY_BUFFER_TRIGGER_PERCENTAGE"`

	// KeyBufferTriggerPercentage int    `json:"keybuffertriggerpercetage" env:"KEY_BUFFER_TRIGGER_PERCENTAGE"` // percetage threshold of keys left to trigger buffering 90 - 20
	BasePath  string `json:"basepath" env:"BASE_PATH"`
	InitEpoch int    `json:"initepoch" env:"INIT_EPOCH"`

	ShouldRegister    bool   `json:"register" env:"REGISTER"`
	CPUProfileToFile  string `json:"cpuProfile" env:"CPU_PROFILE"`
	IsDebug           bool   `json:"debug" env:"DEBUG"`
	PprofPort         string `json:"pprofPort" env:"PPROF_PORT"`
	PprofEnabled      bool   `json:"pprofEnabled" env:"PPROF_ENABLED"`
	ProvidedIPAddress string `json:"ipAddress" env:"IP_ADDRESS"`
	LogLevel          string `json:"loglevel" env:"LOG_LEVEL"`

	ServeUsingTLS    bool   `json:"useTLS" env:"USE_TLS"`
	UseAutoCert      bool   `json:"useAutoCert" env:"USE_AUTO_CERT"`
	AutoCertCacheDir string `json:"autoCertCacheDir" env:"AUTO_CERT_CACHE_DIR"`
	PublicURL        string `json:"publicURL" env:"PUBLIC_URL"`
	ServerCert       string `json:"serverCert" env:"SERVER_CERT"`
	ServerKey        string `json:"serverKey" env:"SERVER_KEY"`
	EthPollFreq      int    `json:"ethPollFreq" env:"ETH_POLL_FREQ"`

	// IDs used for oauth verification.
	GoogleClientID    string `json:"googleClientID" env:"GOOGLE_CLIENT_ID"`
	FacebookAppID     string `json:"facebookAppID" env:"FACEBOOK_APP_ID"`
	FacebookAppSecret string `json:"facebookAppSecret" env:"FACEBOOK_APP_SECRET"`
	TwitchClientID    string `json:"twitchClientID" env:"TWITCH_CLIENT_ID"`
}

type ConnectionStatus

type ConnectionStatus int
const (
	EthClientDisconnected ConnectionStatus = iota
	EthClientConnected
)

type ContextKey

type ContextKey string

type DBSuite

type DBSuite struct {
	Instance TorusDB
}

type DKGKeygennofsmTransport

type DKGKeygennofsmTransport struct {
	Prefix KeygenProtocolPrefix

	KeygenNode *keygennofsm.KeygenNode
	// contains filtered or unexported fields
}

func (*DKGKeygennofsmTransport) GetType

func (tp *DKGKeygennofsmTransport) GetType() string

func (*DKGKeygennofsmTransport) Init

func (tp *DKGKeygennofsmTransport) Init()

func (*DKGKeygennofsmTransport) Output

func (tp *DKGKeygennofsmTransport) Output(inter interface{})

func (*DKGKeygennofsmTransport) Receive

func (tp *DKGKeygennofsmTransport) Receive(senderDetails keygennofsm.NodeDetails, keygenMessage keygennofsm.KeygenMessage) error

func (*DKGKeygennofsmTransport) ReceiveBroadcast

func (tp *DKGKeygennofsmTransport) ReceiveBroadcast(keygenMessage keygennofsm.KeygenMessage) error

func (*DKGKeygennofsmTransport) Report

func (tp *DKGKeygennofsmTransport) Report(s string, inter interface{})

func (*DKGKeygennofsmTransport) Send

func (tp *DKGKeygennofsmTransport) Send(nodeDetails keygennofsm.NodeDetails, keygenMessage keygennofsm.KeygenMessage) error

func (*DKGKeygennofsmTransport) SendBroadcast

func (tp *DKGKeygennofsmTransport) SendBroadcast(keygenMessage keygennofsm.KeygenMessage) error

func (*DKGKeygennofsmTransport) SetKeygenNode

func (tp *DKGKeygennofsmTransport) SetKeygenNode(keygenNode *keygennofsm.KeygenNode) error

func (*DKGKeygennofsmTransport) Sign

func (tp *DKGKeygennofsmTransport) Sign(s []byte) ([]byte, error)

type DKGPSSTransport

type DKGPSSTransport struct {
	Prefix            PSSProtocolPrefix
	PSSNode           *pss.PSSNode
	MappingFrozen     MappingFrozen
	SendMiddleware    []Middleware
	ReceiveMiddleware []Middleware
	// contains filtered or unexported fields
}

func (*DKGPSSTransport) GetType

func (tp *DKGPSSTransport) GetType() string

func (*DKGPSSTransport) Init

func (tp *DKGPSSTransport) Init()

TODO: make sure this can only be called once

func (*DKGPSSTransport) Output

func (tp *DKGPSSTransport) Output(sinter interface{})

func (*DKGPSSTransport) Receive

func (tp *DKGPSSTransport) Receive(senderDetails pss.NodeDetails, originalPSSMessage pss.PSSMessage) error

func (*DKGPSSTransport) ReceiveBroadcast

func (tp *DKGPSSTransport) ReceiveBroadcast(originalPSSMessage pss.PSSMessage) error

func (*DKGPSSTransport) Report

func (tp *DKGPSSTransport) Report(s string, data interface{})

func (*DKGPSSTransport) Send

func (tp *DKGPSSTransport) Send(nodeDetails pss.NodeDetails, originalPSSMessage pss.PSSMessage) error

func (*DKGPSSTransport) SendBroadcast

func (tp *DKGPSSTransport) SendBroadcast(originalPSSMessage pss.PSSMessage) error

func (*DKGPSSTransport) SetEventBus

func (tp *DKGPSSTransport) SetEventBus(e eventbus.Bus)

func (*DKGPSSTransport) SetPSSNode

func (tp *DKGPSSTransport) SetPSSNode(ref *pss.PSSNode) error

func (*DKGPSSTransport) Sign

func (tp *DKGPSSTransport) Sign(s []byte) ([]byte, error)

type DatabaseMethods

type DatabaseMethods interface {
	SetOwner(owner string)
	GetOwner() (owner string)

	StoreCommitmentMatrix(keyIndex big.Int, c [][]common.Point) error
	StoreKEYGENSecret(keyIndex big.Int, secret keygen.KEYGENSecrets) error
	StoreCompletedShare(keyIndex big.Int, si big.Int, siprime big.Int) error
	StorePublicKeyToIndex(publicKey common.Point, keyIndex big.Int) error
	RetrieveCommitmentMatrix(keyIndex big.Int) (c [][]common.Point, err error)
	RetrievePublicKeyToIndex(publicKey common.Point) (keyIndex big.Int, err error)
	RetrieveIndexToPublicKey(keyIndex big.Int) (publicKey common.Point, err error)
	RetrieveCompletedShare(keyIndex big.Int) (Si big.Int, Siprime big.Int, err error)
	GetShareCount() (count int)
	GetKeygenStarted(keygenID string) (started bool)
	SetKeygenStarted(keygenID string, started bool) error
}

type DatabaseMethodsImpl

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

func (*DatabaseMethodsImpl) GetKeygenStarted

func (db *DatabaseMethodsImpl) GetKeygenStarted(keygenID string) (started bool)

func (*DatabaseMethodsImpl) GetOwner

func (m *DatabaseMethodsImpl) GetOwner() (owner string)

func (*DatabaseMethodsImpl) GetShareCount

func (db *DatabaseMethodsImpl) GetShareCount() (count int)

func (*DatabaseMethodsImpl) RetrieveCommitmentMatrix

func (db *DatabaseMethodsImpl) RetrieveCommitmentMatrix(keyIndex big.Int) (c [][]common.Point, err error)

func (*DatabaseMethodsImpl) RetrieveCompletedShare

func (db *DatabaseMethodsImpl) RetrieveCompletedShare(keyIndex big.Int) (Si big.Int, Siprime big.Int, err error)

func (*DatabaseMethodsImpl) RetrieveIndexToPublicKey

func (db *DatabaseMethodsImpl) RetrieveIndexToPublicKey(keyIndex big.Int) (publicKey common.Point, err error)

func (*DatabaseMethodsImpl) RetrievePublicKeyToIndex

func (db *DatabaseMethodsImpl) RetrievePublicKeyToIndex(publicKey common.Point) (keyIndex big.Int, err error)

func (*DatabaseMethodsImpl) SetKeygenStarted

func (db *DatabaseMethodsImpl) SetKeygenStarted(keygenID string, started bool) error

func (*DatabaseMethodsImpl) SetOwner

func (m *DatabaseMethodsImpl) SetOwner(owner string)

func (*DatabaseMethodsImpl) StoreCommitmentMatrix

func (db *DatabaseMethodsImpl) StoreCommitmentMatrix(keyIndex big.Int, c [][]common.Point) error

func (*DatabaseMethodsImpl) StoreCompletedShare

func (db *DatabaseMethodsImpl) StoreCompletedShare(keyIndex big.Int, si big.Int, siprime big.Int) error

func (*DatabaseMethodsImpl) StoreKEYGENSecret

func (db *DatabaseMethodsImpl) StoreKEYGENSecret(keyIndex big.Int, secret keygen.KEYGENSecrets) error

func (*DatabaseMethodsImpl) StorePublicKeyToIndex

func (db *DatabaseMethodsImpl) StorePublicKeyToIndex(publicKey common.Point, keyIndex big.Int) error

type DatabaseService

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

func (*DatabaseService) Call

func (d *DatabaseService) Call(method string, args ...interface{}) (interface{}, error)

func (*DatabaseService) Name

func (d *DatabaseService) Name() string

func (*DatabaseService) OnStart

func (d *DatabaseService) OnStart() error

func (*DatabaseService) OnStop

func (d *DatabaseService) OnStop() error

func (*DatabaseService) SetBaseService

func (d *DatabaseService) SetBaseService(bs *BaseService)

type DefaultBFTTxWrapper

type DefaultBFTTxWrapper struct {
	BFTTx     []byte       `json:"bft_tx,omitempty"`
	Nonce     uint32       `json:"nonce,omitempty"`
	PubKey    common.Point `json:"pub_key,omitempty"`
	MsgType   byte         `json:"msg_type,omitempty"`
	Signature []byte       `json:"signature,omitempty"`
}

func (*DefaultBFTTxWrapper) DecodeBFTTx

func (wrapper *DefaultBFTTxWrapper) DecodeBFTTx(data []byte) error

func (DefaultBFTTxWrapper) GetSerializedBody

func (wrapper DefaultBFTTxWrapper) GetSerializedBody() []byte

func (*DefaultBFTTxWrapper) PrepareBFTTx

func (wrapper *DefaultBFTTxWrapper) PrepareBFTTx(bftTx interface{}) ([]byte, error)

type ECDSASig

type ECDSASig struct {
	Raw []byte
	R   [32]byte
	S   [32]byte
	V   uint8
}

ECDSASig contains R S V and raw format of ecdsa signature. Does not contain the hashed message

func HexToECDSASig

func HexToECDSASig(hexString string) ECDSASig

type ECDSASignature

type ECDSASignature struct {
	Raw  []byte
	Hash [32]byte
	R    [32]byte
	S    [32]byte
	V    uint8
}

func ECDSASign

func ECDSASign(data []byte, ecdsaKey *ecdsa.PrivateKey) ECDSASignature

type EthEpochParams

type EthEpochParams struct {
	EpochID int
	N       int
	T       int
	K       int
}

type EthNodeDetails

type EthNodeDetails struct {
	DeclaredIp         string
	Position           big.Int
	TmP2PListenAddress string
	P2pListenAddress   string
}

type EthereumMethods

type EthereumMethods interface {
	SetOwner(owner string)
	GetOwner() (owner string)

	GetCurrentEpoch() (epoch int)
	GetPreviousEpoch() (epoch int)
	GetNextEpoch() (epoch int)
	GetEpochInfo(epoch int) (epochInfo epochInfo, err error)
	GetCurve() (curve elliptic.Curve)
	GetSelfIndex() (index int)
	GetSelfPrivateKey() (privKey big.Int)
	GetSelfPublicKey() (pubKey common.Point)
	GetSelfAddress() (address ethCommon.Address)
	SetSelfIndex(int)
	SelfSignData(data []byte) (rawSig []byte)

	GetCurrentNodeIndexes() (nodeIndexes []big.Int)
	// GetCompleteNodeList - retrieves node references from ethereum. its a blocking func and only returns the nodeList once allNodes have been registered and are connected
	// TODO: Factor out NodeRefernce
	GetCompleteNodeList(epoch int) []NodeReference
	GetNodeList(epoch int) []NodeReference
	GetNodeDetailsByAddress(address ethCommon.Address) NodeReference
	GetNodeDetailsByEpochAndIndex(epoch int, index int) NodeReference
	GetPeerIDFromIndex(index big.Int) (id peer.ID)
	GetNodeIndexFromPubKey(ptPk common.Point) (index big.Int)
	GetECPubKFromIndex(index big.Int) (pubKey common.Point)
	GetPSSReceivingStatus(epoch int) (isPSSReceiving bool)
	AwaitNodesConnected(epoch int)
	GetPSSStatus(oldEpoch int, newEpoch int) (pssStatus int, err error)
	VerifyDataWithNodelist(pk common.Point, sig []byte, data []byte) (err error)
	VerifyDataWithEpoch(pk common.Point, sig []byte, data []byte, epoch int) (err error)
}

type EthereumMethodsImpl

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

func (*EthereumMethodsImpl) AwaitNodesConnected

func (e *EthereumMethodsImpl) AwaitNodesConnected(epoch int)

func (*EthereumMethodsImpl) GetCompleteNodeList

func (e *EthereumMethodsImpl) GetCompleteNodeList(epoch int) (nodeRefs []NodeReference)

func (*EthereumMethodsImpl) GetCurrentEpoch

func (e *EthereumMethodsImpl) GetCurrentEpoch() (epoch int)

func (*EthereumMethodsImpl) GetCurrentNodeIndexes

func (e *EthereumMethodsImpl) GetCurrentNodeIndexes() (nodeIndexes []big.Int)

func (*EthereumMethodsImpl) GetCurve

func (e *EthereumMethodsImpl) GetCurve() (curve elliptic.Curve)

func (*EthereumMethodsImpl) GetECPubKFromIndex

func (e *EthereumMethodsImpl) GetECPubKFromIndex(index big.Int) (pubKey common.Point)

func (*EthereumMethodsImpl) GetEpochInfo

func (e *EthereumMethodsImpl) GetEpochInfo(epoch int) (eInfo epochInfo, err error)

func (*EthereumMethodsImpl) GetNextEpoch

func (e *EthereumMethodsImpl) GetNextEpoch() (epoch int)

func (*EthereumMethodsImpl) GetNodeDetailsByAddress

func (e *EthereumMethodsImpl) GetNodeDetailsByAddress(address ethCommon.Address) (nodeRef NodeReference)

func (*EthereumMethodsImpl) GetNodeDetailsByEpochAndIndex

func (e *EthereumMethodsImpl) GetNodeDetailsByEpochAndIndex(epoch int, index int) (nodeRef NodeReference)

func (*EthereumMethodsImpl) GetNodeIndexFromPubKey

func (e *EthereumMethodsImpl) GetNodeIndexFromPubKey(pk common.Point) (index big.Int)

func (*EthereumMethodsImpl) GetNodeList

func (e *EthereumMethodsImpl) GetNodeList(epoch int) (nodeRefs []NodeReference)

func (*EthereumMethodsImpl) GetOwner

func (m *EthereumMethodsImpl) GetOwner() (owner string)

func (*EthereumMethodsImpl) GetPSSReceivingStatus

func (e *EthereumMethodsImpl) GetPSSReceivingStatus(epoch int) (isPSSReceiving bool)

func (*EthereumMethodsImpl) GetPSSStatus

func (e *EthereumMethodsImpl) GetPSSStatus(oldEpoch int, newEpoch int) (pssStatus int, err error)

func (*EthereumMethodsImpl) GetPeerIDFromIndex

func (e *EthereumMethodsImpl) GetPeerIDFromIndex(index big.Int) (id peer.ID)

func (*EthereumMethodsImpl) GetPreviousEpoch

func (e *EthereumMethodsImpl) GetPreviousEpoch() (epoch int)

func (*EthereumMethodsImpl) GetSelfAddress

func (e *EthereumMethodsImpl) GetSelfAddress() (address ethCommon.Address)

func (*EthereumMethodsImpl) GetSelfIndex

func (e *EthereumMethodsImpl) GetSelfIndex() (index int)

func (*EthereumMethodsImpl) GetSelfPrivateKey

func (e *EthereumMethodsImpl) GetSelfPrivateKey() (privKey big.Int)

func (*EthereumMethodsImpl) GetSelfPublicKey

func (e *EthereumMethodsImpl) GetSelfPublicKey() (pubKey common.Point)

func (*EthereumMethodsImpl) SelfSignData

func (e *EthereumMethodsImpl) SelfSignData(data []byte) (rawSig []byte)

func (*EthereumMethodsImpl) SetOwner

func (m *EthereumMethodsImpl) SetOwner(owner string)

func (*EthereumMethodsImpl) SetSelfIndex

func (e *EthereumMethodsImpl) SetSelfIndex(index int)

func (*EthereumMethodsImpl) VerifyDataWithEpoch

func (e *EthereumMethodsImpl) VerifyDataWithEpoch(pk common.Point, sig []byte, data []byte, epoch int) (err error)

func (*EthereumMethodsImpl) VerifyDataWithNodelist

func (e *EthereumMethodsImpl) VerifyDataWithNodelist(pk common.Point, sig []byte, data []byte) (err error)

type EthereumService

type EthereumService struct {
	idmutex.Mutex
	// contains filtered or unexported fields
}

func (*EthereumService) Call

func (e *EthereumService) Call(method string, args ...interface{}) (interface{}, error)

func (*EthereumService) GetEpochInfo

func (e *EthereumService) GetEpochInfo(epoch int) (epochInfo, error)

func (*EthereumService) GetNodeRef

func (e *EthereumService) GetNodeRef(nodeAddress ethCommon.Address) (*NodeReference, error)

func (*EthereumService) IsSelfRegistered

func (e *EthereumService) IsSelfRegistered(epoch int) (bool, error)

func (*EthereumService) Name

func (e *EthereumService) Name() string

func (*EthereumService) OnStart

func (e *EthereumService) OnStart() error

func (*EthereumService) OnStop

func (e *EthereumService) OnStop() error

func (*EthereumService) RegisterNode

func (e *EthereumService) RegisterNode(epoch int, declaredIP string, TMP2PConnection string, P2PConnection string) (*types.Transaction, error)

RegsiterNode - the main function that registered the node on Ethereum node list with the details provided

func (*EthereumService) SetBaseService

func (e *EthereumService) SetBaseService(bs *BaseService)

type KeyAssignHandler

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

func (KeyAssignHandler) ServeJSONRPC

func (h KeyAssignHandler) ServeJSONRPC(c context.Context, params *bijson.RawMessage) (interface{}, *jsonrpc.Error)

assigns a user a secret, returns the same index if the user has been previously assigned

type KeyAssignItem

type KeyAssignItem struct {
	KeyIndex string  `json:"key_index"`
	PubKeyX  big.Int `json:"pub_key_X"`
	PubKeyY  big.Int `json:"pub_key_Y"`
	Address  string  `json:"address"`
}

type KeyAssignParams

type KeyAssignParams struct {
	Verifier   string `json:"verifier"`
	VerifierID string `json:"verifier_id"`
}

type KeyAssignResult

type KeyAssignResult struct {
	Keys []KeyAssignItem `json:"keys"`
}

type KeyAssignment

type KeyAssignment struct {
	KeyAssignmentPublic
	Share big.Int // Or Si
}
KeyAssignment - contains fields necessary to derive/validate a users key

contains sensitive share data

type KeyAssignmentPublic

type KeyAssignmentPublic struct {
	Index     big.Int
	PublicKey common.Point
	Threshold int
	Verifiers map[string][]string // Verifier => VerifierID
}

KeyAssignmentPublic - holds key fields safe to be shown to non-keyholders

type KeyGenUpdates

type KeyGenUpdates struct {
	Type    string
	Payload interface{}
}

type KeyLookupHandler

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

func (KeyLookupHandler) ServeJSONRPC

func (h KeyLookupHandler) ServeJSONRPC(c context.Context, params *bijson.RawMessage) (interface{}, *jsonrpc.Error)

Looksup Verifier + VerifierIDs assigned to a key (access structure)

type KeyLookupParams

type KeyLookupParams struct {
	PubKeyX big.Int `json:"pub_key_X"`
	PubKeyY big.Int `json:"pub_key_Y"`
}

type KeyLookupResult

type KeyLookupResult struct {
	KeyAssignmentPublic
}

type KeygenDecision

type KeygenDecision struct {
	DKGID            string   `json:"dkgid"`
	Decided          bool     `json:"decided"`
	DecidedKeygenIDs []string `json:"decidedkeygenids"`
}

type KeygenProtocolPrefix

type KeygenProtocolPrefix string

type KeygenPubKey

type KeygenPubKey struct {
	DKGID     string       `json:"dkgid"`
	Decided   bool         `json:"decided"`
	GSHSprime common.Point `json:"gshsprime"`
	GS        common.Point `json:"gs"`
}

type KeygennofsmMethods

type KeygennofsmMethods interface {
	SetOwner(owner string)
	GetOwner() (owner string)

	ReceiveMessage(keygenMessage keygennofsm.KeygenMessage) error
	ReceiveBFTMessage(keygenMessage keygennofsm.KeygenMessage) error
}

type KeygennofsmMethodsImpl

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

func (*KeygennofsmMethodsImpl) GetOwner

func (k *KeygennofsmMethodsImpl) GetOwner() (owner string)

func (*KeygennofsmMethodsImpl) ReceiveBFTMessage

func (k *KeygennofsmMethodsImpl) ReceiveBFTMessage(keygenMessage keygennofsm.KeygenMessage) error

func (*KeygennofsmMethodsImpl) ReceiveMessage

func (k *KeygennofsmMethodsImpl) ReceiveMessage(keygenMessage keygennofsm.KeygenMessage) error

func (*KeygennofsmMethodsImpl) SetOwner

func (k *KeygennofsmMethodsImpl) SetOwner(owner string)

type KeygennofsmService

type KeygennofsmService struct {
	idmutex.Mutex

	KeygenNode *keygennofsm.KeygenNode
	// contains filtered or unexported fields
}

func (*KeygennofsmService) Call

func (k *KeygennofsmService) Call(method string, args ...interface{}) (interface{}, error)

func (*KeygennofsmService) GetKeygenProtocolPrefix

func (k *KeygennofsmService) GetKeygenProtocolPrefix(currEpoch int) KeygenProtocolPrefix

func (*KeygennofsmService) Name

func (k *KeygennofsmService) Name() string

func (*KeygennofsmService) OnStart

func (k *KeygennofsmService) OnStart() error

func (*KeygennofsmService) OnStop

func (k *KeygennofsmService) OnStop() error

func (*KeygennofsmService) SetBaseService

func (k *KeygennofsmService) SetBaseService(bs *BaseService)

type MapFreeze

type MapFreeze struct {
	Frozen         bool
	ProposedFreeze map[hexstring]bool
}

MapFreeze -

type MapThaw

type MapThaw struct {
	Thawed       bool
	ProposedThaw map[mappingHash]map[hexstring]bool
}

MapThaw -

type MappingFreezeMsg

type MappingFreezeMsg struct {
	NodeDetails       pss.NodeDetails
	Epoch             int
	PSSProtocolPrefix PSSProtocolPrefix
	Signature         []byte
}

type MappingFrozen

type MappingFrozen struct {
	idmutex.Mutex
	SendCount    map[pss.NodeDetailsID]int
	Mappings     map[mappingHash]TransferState
	MappingCount map[mappingHash]int
}

type MappingFrozenMsg

type MappingFrozenMsg struct {
	NodeDetails       pss.NodeDetails
	Epoch             int
	PSSProtocolPrefix PSSProtocolPrefix
	TransferState     TransferState
	Signature         []byte
}

type MappingThawMsg

type MappingThawMsg struct {
	NodeDetails          pss.NodeDetails
	Epoch                int
	PSSProtocolPrefix    PSSProtocolPrefix
	DecidedTransferState TransferState
	Signature            []byte
}

type MessageSource

type MessageSource int
const (
	BFT MessageSource = iota
	P2P
)

type MethodRequest

type MethodRequest struct {
	Caller  string
	Service string
	Method  string
	ID      string
	Data    []interface{}
}

type MethodResponse

type MethodResponse struct {
	Request MethodRequest
	Error   error
	Data    interface{}
}

func ServiceMethod

func ServiceMethod(eventBus eventbus.Bus, caller string, service string, method string, data ...interface{}) MethodResponse

type Middleware

type Middleware func(pss.PSSMessage) (modifiedMessage pss.PSSMessage, end bool, err error)

type NodeListUpdates

type NodeListUpdates struct {
	Type    string
	Payload interface{}
}

type NodeReference

type NodeReference struct {
	Address         *ethCommon.Address
	Index           *big.Int
	PeerID          peer.ID
	PublicKey       *ecdsa.PublicKey
	TMP2PConnection string
	P2PConnection   string
}

func (NodeReference) Deserialize

func (nodeRef NodeReference) Deserialize(serializedNodeRef SerializedNodeReference) NodeReference

func (NodeReference) Serialize

func (nodeRef NodeReference) Serialize() SerializedNodeReference

type NodeRegister

type NodeRegister struct {
	AllConnected bool
	PSSReceiving bool
	PSSSending   bool
	NodeList     []*NodeReference
}

func (*NodeRegister) GetNodeByIndex

func (nr *NodeRegister) GetNodeByIndex(index int) *NodeReference

type NodeSignature

type NodeSignature struct {
	Signature   string `json:"signature"`
	Data        string `json:"data"`
	NodePubKeyX string `json:"nodepubx"`
	NodePubKeyY string `json:"nodepuby"`
}

func (*NodeSignature) NodeValidation

func (nodeSig *NodeSignature) NodeValidation(eventBus eventbus.Bus, tokenIssueTime time.Time) (*NodeReference, error)

type P2PBasicMsg

type P2PBasicMsg struct {
	// shared between all requests
	Timestamp  big.Int `json:"timestamp,omitempty"`  // unix time
	Id         string  `json:"id,omitempty"`         // allows requesters to use request data when processing a response
	Gossip     bool    `json:"gossip,omitempty"`     // true to have receiver peer gossip the message to neighbors
	NodeId     string  `json:"nodeId,omitempty"`     // id of node that created the message (not the peer that may have sent it). =base58(multihash(nodePubKey))
	NodePubKey []byte  `json:"nodePubKey,omitempty"` // Authoring node Secp256k1 public key (32bytes)
	Sign       []byte  `json:"sign,omitempty"`       // signature of message data + method specific data by message authoring node.
	MsgType    string  `json:"msgtype,omitempty"`    // identifyng message type
	Payload    []byte  `json:"payload"`              // payload data to be unmarshalled
}

func (*P2PBasicMsg) GetGossip

func (msg *P2PBasicMsg) GetGossip() bool

func (*P2PBasicMsg) GetId

func (msg *P2PBasicMsg) GetId() string

func (*P2PBasicMsg) GetMsgType

func (msg *P2PBasicMsg) GetMsgType() string

func (*P2PBasicMsg) GetNodeId

func (msg *P2PBasicMsg) GetNodeId() string

func (*P2PBasicMsg) GetNodePubKey

func (msg *P2PBasicMsg) GetNodePubKey() []byte

GetNodePubKey - in older versions <= v0.7.0 returns pubkey that is unmarshallable to p2pID secp pubkey Post v0.7.0 this returns a pubkey that is unmarshallable to common.Point{}

func (*P2PBasicMsg) GetPayload

func (msg *P2PBasicMsg) GetPayload() []byte

func (P2PBasicMsg) GetSerializedBody

func (msg P2PBasicMsg) GetSerializedBody() []byte

func (*P2PBasicMsg) GetSign

func (msg *P2PBasicMsg) GetSign() []byte

func (*P2PBasicMsg) GetTimestamp

func (msg *P2PBasicMsg) GetTimestamp() big.Int

func (*P2PBasicMsg) SetSign

func (msg *P2PBasicMsg) SetSign(sig []byte)

type P2PBasicMsgDeprecated

type P2PBasicMsgDeprecated struct {
	// shared between all requests
	Timestamp  int64  `json:"timestamp,omitempty"`  // unix time
	Id         string `json:"id,omitempty"`         // allows requesters to use request data when processing a response
	Gossip     bool   `json:"gossip,omitempty"`     // true to have receiver peer gossip the message to neighbors
	NodeId     string `json:"nodeId,omitempty"`     // id of node that created the message (not the peer that may have sent it). =base58(multihash(nodePubKey))
	NodePubKey []byte `json:"nodePubKey,omitempty"` // Authoring node Secp256k1 public key (32bytes)
	Sign       []byte `json:"sign,omitempty"`       // signature of message data + method specific data by message authoring node.
	MsgType    string `json:"msgtype,omitempty"`    // identifyng message type
	Payload    []byte `json:"payload"`              // payload data to be unmarshalled
}

patch002 TODO: remove

type P2PMessage

type P2PMessage interface {
	GetTimestamp() big.Int
	GetId() string
	GetGossip() bool
	GetNodeId() string
	GetNodePubKey() []byte
	GetSign() []byte
	SetSign(sig []byte)
	GetMsgType() string
	GetPayload() []byte
	GetSerializedBody() []byte
}

type P2PMethods

type P2PMethods interface {
	SetOwner(owner string)
	GetOwner() (owner string)

	ID() peer.ID
	SetStreamHandler(protoName string, handler func(StreamMessage)) (err error)
	RemoveStreamHandler(protoName string) (err error)
	AuthenticateMessage(p2pMsg P2PMessage) (err error)
	AuthenticateMessageInEpoch(p2pMsg P2PMessage, epoch int) (err error)
	NewP2PMessage(messageId string, gossip bool, payload []byte, msgType string) (newMsg P2PBasicMsg)
	SignP2PMessage(message P2PMessage) (signature []byte, err error)
	SendP2PMessage(id peer.ID, p protocol.ID, msg P2PMessage) error
	ConnectToP2PNode(nodeP2PConnection string, nodePeerID peer.ID) error
	GetHostAddress() (hostAddress ma.Multiaddr)
}

type P2PMethodsImpl

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

func (*P2PMethodsImpl) AuthenticateMessage

func (p2p *P2PMethodsImpl) AuthenticateMessage(p2pMsg P2PMessage) (err error)

func (*P2PMethodsImpl) AuthenticateMessageInEpoch

func (p2p *P2PMethodsImpl) AuthenticateMessageInEpoch(p2pMsg P2PMessage, epoch int) (err error)

func (*P2PMethodsImpl) ConnectToP2PNode

func (p2p *P2PMethodsImpl) ConnectToP2PNode(nodeP2PConnection string, nodePeerID peer.ID) error

func (*P2PMethodsImpl) GetHostAddress

func (p2p *P2PMethodsImpl) GetHostAddress() (hostAddress ma.Multiaddr)

func (*P2PMethodsImpl) GetOwner

func (m *P2PMethodsImpl) GetOwner() (owner string)

func (*P2PMethodsImpl) ID

func (p2p *P2PMethodsImpl) ID() (peerID peer.ID)

func (*P2PMethodsImpl) NewP2PMessage

func (p2p *P2PMethodsImpl) NewP2PMessage(messageId string, gossip bool, payload []byte, msgType string) (newMsg P2PBasicMsg)

func (*P2PMethodsImpl) RemoveStreamHandler

func (p2p *P2PMethodsImpl) RemoveStreamHandler(proto string) error

func (*P2PMethodsImpl) SendP2PMessage

func (p2p *P2PMethodsImpl) SendP2PMessage(id peer.ID, p protocol.ID, msg P2PMessage) error

func (*P2PMethodsImpl) SetOwner

func (m *P2PMethodsImpl) SetOwner(owner string)

func (*P2PMethodsImpl) SetStreamHandler

func (p2p *P2PMethodsImpl) SetStreamHandler(proto string, handler func(StreamMessage)) error

func (*P2PMethodsImpl) SignP2PMessage

func (p2p *P2PMethodsImpl) SignP2PMessage(message P2PMessage) (signature []byte, err error)

type P2PService

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

func (*P2PService) Call

func (p2p *P2PService) Call(method string, args ...interface{}) (interface{}, error)

func (*P2PService) ConnectToP2PNode

func (p2p *P2PService) ConnectToP2PNode(nodeP2PConnection string, nodePeerID peer.ID) error

func (*P2PService) ForwardP2PToEventBus

func (p *P2PService) ForwardP2PToEventBus(proto string)

func (*P2PService) Name

func (p2p *P2PService) Name() string

func (*P2PService) NewP2PMessage

func (p2pService *P2PService) NewP2PMessage(messageId string, gossip bool, payload []byte, msgType string) *P2PBasicMsg

helper method - generate message data shared between all node's p2p protocols messageId: unique for requests, copied from request for responses

func (*P2PService) OnStart

func (p *P2PService) OnStart() error

func (*P2PService) OnStop

func (p2p *P2PService) OnStop() error

func (*P2PService) SetBaseService

func (p2p *P2PService) SetBaseService(bs *BaseService)

func (*P2PService) StopForwardP2PToEventBus

func (p *P2PService) StopForwardP2PToEventBus(proto string)

type P2PSuite

type P2PSuite struct {
	host.Host
	HostAddress ma.Multiaddr
	PingProto   *PingProtocol
}

type PSSDecision

type PSSDecision struct {
	SharingID     string   `json:"sharingid"`
	Decided       bool     `json:"decided"`
	DecidedPSSIDs []string `json:"decidedpssids"`
}

PSSDecision -

type PSSMethods

type PSSMethods interface {
	SetOwner(owner string)
	GetOwner() (owner string)

	PSSInstanceExists(protocolPrefix PSSProtocolPrefix) (exists bool)
	GetPSSProtocolPrefix(oldEpoch int, newEpoch int) (pssProtocolPrefix PSSProtocolPrefix)
	ReceiveBFTMessage(protocolPrefix PSSProtocolPrefix, pssMessage pss.PSSMessage) error
	GetFreezeState() (freezeState int)
	SetFreezeState(freezeState int)
	GetEndIndex() (endIndex int)
	SetEndIndex(endIndex int)
	GetNewNodesN(protocolPrefix PSSProtocolPrefix) (newN int)
	GetNewNodesK(protocolPrefix PSSProtocolPrefix) (newK int)
	GetNewNodesT(protocolPrefix PSSProtocolPrefix) (newT int)
	GetOldNodesN(protocolPrefix PSSProtocolPrefix) (oldN int)
	GetOldNodesK(protocolPrefix PSSProtocolPrefix) (oldK int)
	GetOldNodesT(protocolPrefix PSSProtocolPrefix) (oldT int)
	NewPSSNode(pssStartData PSSStartData, isDealer bool, isPlayer bool) error
	ProposeFreeze(protocolPrefix PSSProtocolPrefix) error
	UpdateShareStore(protocolPrefix PSSProtocolPrefix, keygenID pss.KeygenID, sharing pss.SharingData)
	SendPSSMessageToNode(protocolPrefix PSSProtocolPrefix, pssNodeDetails pss.NodeDetails, pssMessage pss.PSSMessage) error
	IncrementCounter(counterName string)
}

type PSSMethodsImpl

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

func (*PSSMethodsImpl) GetEndIndex

func (pss *PSSMethodsImpl) GetEndIndex() (endIndex int)

func (*PSSMethodsImpl) GetFreezeState

func (pss *PSSMethodsImpl) GetFreezeState() (freezeState int)

func (*PSSMethodsImpl) GetNewNodesK

func (pss *PSSMethodsImpl) GetNewNodesK(protocolPrefix PSSProtocolPrefix) (newK int)

func (*PSSMethodsImpl) GetNewNodesN

func (pss *PSSMethodsImpl) GetNewNodesN(protocolPrefix PSSProtocolPrefix) (newN int)

func (*PSSMethodsImpl) GetNewNodesT

func (pss *PSSMethodsImpl) GetNewNodesT(protocolPrefix PSSProtocolPrefix) (newT int)

func (*PSSMethodsImpl) GetOldNodesK

func (pss *PSSMethodsImpl) GetOldNodesK(protocolPrefix PSSProtocolPrefix) (oldK int)

func (*PSSMethodsImpl) GetOldNodesN

func (pss *PSSMethodsImpl) GetOldNodesN(protocolPrefix PSSProtocolPrefix) (oldN int)

func (*PSSMethodsImpl) GetOldNodesT

func (pss *PSSMethodsImpl) GetOldNodesT(protocolPrefix PSSProtocolPrefix) (oldT int)

func (*PSSMethodsImpl) GetOwner

func (pss *PSSMethodsImpl) GetOwner() (owner string)

func (*PSSMethodsImpl) GetPSSProtocolPrefix

func (pss *PSSMethodsImpl) GetPSSProtocolPrefix(oldEpoch int, newEpoch int) (pssProtocolPrefix PSSProtocolPrefix)

func (*PSSMethodsImpl) IncrementCounter

func (pss *PSSMethodsImpl) IncrementCounter(counterName string)

func (*PSSMethodsImpl) NewPSSNode

func (pss *PSSMethodsImpl) NewPSSNode(pssStartData PSSStartData, isDealer bool, isPlayer bool) error

func (*PSSMethodsImpl) PSSInstanceExists

func (pss *PSSMethodsImpl) PSSInstanceExists(protocolPrefix PSSProtocolPrefix) (exists bool)

func (*PSSMethodsImpl) ProposeFreeze

func (pss *PSSMethodsImpl) ProposeFreeze(pssProtocolPrefix PSSProtocolPrefix) error

func (*PSSMethodsImpl) ReceiveBFTMessage

func (pss *PSSMethodsImpl) ReceiveBFTMessage(protocolPrefix PSSProtocolPrefix, pssMessage pss.PSSMessage) error

func (*PSSMethodsImpl) SendPSSMessageToNode

func (pss *PSSMethodsImpl) SendPSSMessageToNode(protocolPrefix PSSProtocolPrefix, pssNodeDetails pss.NodeDetails, pssMessage pss.PSSMessage) error

func (*PSSMethodsImpl) SetEndIndex

func (pss *PSSMethodsImpl) SetEndIndex(endIndex int)

func (*PSSMethodsImpl) SetFreezeState

func (pss *PSSMethodsImpl) SetFreezeState(freezeState int)

func (*PSSMethodsImpl) SetOwner

func (pss *PSSMethodsImpl) SetOwner(owner string)

func (*PSSMethodsImpl) UpdateShareStore

func (pss *PSSMethodsImpl) UpdateShareStore(protocolPrefix PSSProtocolPrefix, keygenID pss.KeygenID, sharing pss.SharingData)

type PSSProtocolPrefix

type PSSProtocolPrefix string

type PSSService

type PSSService struct {
	PSSNodeInstances map[PSSProtocolPrefix]*pss.PSSNode
	// contains filtered or unexported fields
}

func (*PSSService) Call

func (p *PSSService) Call(method string, args ...interface{}) (interface{}, error)

func (*PSSService) GetPSSMsgPrefix

func (pss *PSSService) GetPSSMsgPrefix(prefix PSSProtocolPrefix, method string) string

func (*PSSService) GetPSSProtocolPrefix

func (pss *PSSService) GetPSSProtocolPrefix(oldEpoch int, newEpoch int) PSSProtocolPrefix

func (*PSSService) Name

func (p *PSSService) Name() string

func (*PSSService) OnStart

func (p *PSSService) OnStart() error

func (*PSSService) OnStop

func (p *PSSService) OnStop() error

func (*PSSService) PSSInstanceExists

func (p *PSSService) PSSInstanceExists(pssProtocolPrefix PSSProtocolPrefix) bool

func (*PSSService) SetBaseService

func (p *PSSService) SetBaseService(bs *BaseService)

type PSSStartData

type PSSStartData struct {
	Message   string
	OldEpoch  int
	OldEpochN int
	OldEpochK int
	OldEpochT int
	NewEpoch  int
	NewEpochN int
	NewEpochK int
	NewEpochT int
	NodeRefs  []*NodeReference
}

type PSSSuite

type PSSSuite struct {
	idmutex.Mutex
	Version          string
	FreezeState      int
	EndIndex         uint
	PSSNodeInstances map[PSSProtocolPrefix]*pss.PSSNode
}

type PSSUpdate

type PSSUpdate struct {
	MessageSource MessageSource
	NodeDetails   *NodeReference
	PSSMessage    pss.PSSMessage
}

type PSSWorkerUpdate

type PSSWorkerUpdate struct {
	Type    string
	Payload interface{}
}

type PatchMappingHandler

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

patch003 TODO remove

func (PatchMappingHandler) ServeJSONRPC

func (h PatchMappingHandler) ServeJSONRPC(c context.Context, params *bijson.RawMessage) (interface{}, *jsonrpc.Error)

patch003 TODO remove

type PatchMappingParams

type PatchMappingParams struct {
	PSSProtocolPrefix PSSProtocolPrefix `json:"pss_protocol_prefix"`
	TransferState     TransferState     `json:"transfer_state"`
}

type PatchMappingResult

type PatchMappingResult struct {
}

type Ping

type Ping struct {
	Message string
}

type PingHandler

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

func (PingHandler) ServeJSONRPC

func (h PingHandler) ServeJSONRPC(c context.Context, params *bijson.RawMessage) (interface{}, *jsonrpc.Error)

type PingParams

type PingParams struct {
	Message string `json:"message"`
}

type PingProtocol

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

PingProtocol type

func NewPingProtocol

func NewPingProtocol(p2pService *P2PService) *PingProtocol

func (*PingProtocol) Ping

func (p *PingProtocol) Ping(peerid peer.ID) error

Pings a peer

type PingResult

type PingResult struct {
	Message string `json:"message"`
}

type SerializedNodeReference

type SerializedNodeReference struct {
	Address         [20]byte
	Index           big.Int
	PeerID          string
	PublicKey       common.Point
	TMP2PConnection string
	P2PConnection   string
}

type ServerMethods

type ServerMethods interface {
	SetOwner(owner string)
	GetOwner() (owner string)
}

type ServerMethodsImpl

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

func (*ServerMethodsImpl) GetOwner

func (m *ServerMethodsImpl) GetOwner() (owner string)

func (*ServerMethodsImpl) SetOwner

func (m *ServerMethodsImpl) SetOwner(owner string)

type ServerService

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

func (*ServerService) Call

func (s *ServerService) Call(method string, args ...interface{}) (interface{}, error)

func (*ServerService) Name

func (s *ServerService) Name() string

func (*ServerService) OnStart

func (s *ServerService) OnStart() error

func (*ServerService) OnStop

func (s *ServerService) OnStop() error

func (*ServerService) SetBaseService

func (s *ServerService) SetBaseService(bs *BaseService)

type Service

type Service interface {
	Start() error
	Stop() error
	IsRunning() bool
	SetServiceCore(ServiceCore)
	String() string
}

Service represents a way to start, stop and get the status of some service. BaseService is the default implementation and should be used by most users. SetServiceCore allows a user to set a ServiceCore. Users should implement their logic using ServiceCore.

type ServiceCore

type ServiceCore interface {
	Name() string
	OnStart() error
	OnStop() error
	Call(method string, args ...interface{}) (result interface{}, err error)
	SetBaseService(*BaseService)
}

ServiceCore is a service that is implemented by a user.

type ServiceLibrary

type ServiceLibrary interface {
	SetOwner(owner string)
	GetOwner() (owner string)
	GetEventBus() eventbus.Bus
	SetEventBus(eventbus.Bus)
	TelemetryMethods() TelemetryMethods
	EthereumMethods() EthereumMethods
	ABCIMethods() ABCIMethods
	TendermintMethods() TendermintMethods
	ServerMethods() ServerMethods
	P2PMethods() P2PMethods
	// KeygenMethods() KeygenMethods
	KeygennofsmMethods() KeygennofsmMethods
	PSSMethods() PSSMethods
	DatabaseMethods() DatabaseMethods
	VerifierMethods() VerifierMethods
	CacheMethods() CacheMethods
}

type ServiceLibraryImpl

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

func NewServiceLibrary

func NewServiceLibrary(eventBus eventbus.Bus, owner string) *ServiceLibraryImpl

func (*ServiceLibraryImpl) ABCIMethods

func (sL *ServiceLibraryImpl) ABCIMethods() ABCIMethods

func (*ServiceLibraryImpl) CacheMethods

func (sL *ServiceLibraryImpl) CacheMethods() CacheMethods

func (*ServiceLibraryImpl) DatabaseMethods

func (sL *ServiceLibraryImpl) DatabaseMethods() DatabaseMethods

func (*ServiceLibraryImpl) EthereumMethods

func (sL *ServiceLibraryImpl) EthereumMethods() EthereumMethods

func (*ServiceLibraryImpl) GetEventBus

func (sL *ServiceLibraryImpl) GetEventBus() eventbus.Bus

func (*ServiceLibraryImpl) GetOwner

func (sL *ServiceLibraryImpl) GetOwner() (owner string)

func (*ServiceLibraryImpl) KeygennofsmMethods

func (sL *ServiceLibraryImpl) KeygennofsmMethods() KeygennofsmMethods

func (*ServiceLibraryImpl) P2PMethods

func (sL *ServiceLibraryImpl) P2PMethods() P2PMethods

func (*ServiceLibraryImpl) PSSMethods

func (sL *ServiceLibraryImpl) PSSMethods() PSSMethods

func (*ServiceLibraryImpl) ServerMethods

func (sL *ServiceLibraryImpl) ServerMethods() ServerMethods

func (*ServiceLibraryImpl) SetEventBus

func (sL *ServiceLibraryImpl) SetEventBus(eventBus eventbus.Bus)

func (*ServiceLibraryImpl) SetOwner

func (sL *ServiceLibraryImpl) SetOwner(owner string)

func (*ServiceLibraryImpl) TelemetryMethods

func (sL *ServiceLibraryImpl) TelemetryMethods() TelemetryMethods

func (*ServiceLibraryImpl) TendermintMethods

func (sL *ServiceLibraryImpl) TendermintMethods() TendermintMethods

func (*ServiceLibraryImpl) VerifierMethods

func (sL *ServiceLibraryImpl) VerifierMethods() VerifierMethods

type ServiceRegistry

type ServiceRegistry struct {
	Services map[string]*BaseService
	// contains filtered or unexported fields
}

func NewServiceRegistry

func NewServiceRegistry(eventBus eventbus.Bus, baseServices ...*BaseService) *ServiceRegistry

func (*ServiceRegistry) AddRequestMiddleware

func (s *ServiceRegistry) AddRequestMiddleware(middleware *func(methodRequest MethodRequest) MethodRequest)

func (*ServiceRegistry) AddResponseMiddleware

func (s *ServiceRegistry) AddResponseMiddleware(middleware *func(methodResponse MethodResponse) MethodResponse)

func (*ServiceRegistry) RegisterService

func (s *ServiceRegistry) RegisterService(bs *BaseService)

func (*ServiceRegistry) RemoveRequestMiddleware

func (s *ServiceRegistry) RemoveRequestMiddleware(middleware *func(methodRequest MethodRequest) MethodRequest)

func (*ServiceRegistry) RemoveResponseMiddleware

func (s *ServiceRegistry) RemoveResponseMiddleware(middleware *func(methodResponse MethodResponse) MethodResponse)

func (*ServiceRegistry) SetEventBus

func (s *ServiceRegistry) SetEventBus(e eventbus.Bus)

func (*ServiceRegistry) SetupMethodRouting

func (s *ServiceRegistry) SetupMethodRouting()

type ShareCountHandler

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

func (ShareCountHandler) ServeJSONRPC

func (h ShareCountHandler) ServeJSONRPC(c context.Context, params *bijson.RawMessage) (interface{}, *jsonrpc.Error)

type ShareCountParams

type ShareCountParams struct {
}

type ShareCountResult

type ShareCountResult struct {
	Count int `json:"count"`
}

type ShareLog

type ShareLog struct {
	Timestamp          time.Time
	LogNumber          int
	ShareIndex         int
	UnsigncryptedShare []byte
}

type ShareRequestHandler

type ShareRequestHandler struct {
	TimeNow func() time.Time
	// contains filtered or unexported fields
}

func (ShareRequestHandler) ServeJSONRPC

func (h ShareRequestHandler) ServeJSONRPC(c context.Context, params *bijson.RawMessage) (interface{}, *jsonrpc.Error)

checks id for assignment and then the auth token for verification returns the node's share of the user's key

type ShareRequestItem

type ShareRequestItem struct {
	IDToken            string          `json:"idtoken"`
	NodeSignatures     []NodeSignature `json:"nodesignatures"`
	VerifierIdentifier string          `json:"verifieridentifier"`
}

type ShareRequestParams

type ShareRequestParams struct {
	Item []bijson.RawMessage `json:"item"`
}

type ShareRequestResult

type ShareRequestResult struct {
	Keys []KeyAssignment `json:"keys"`
}

type State

type State struct {
	// Epoch                    uint                             `json:"epoch"`
	Height                   int64                            `json:"height"`
	AppHash                  []byte                           `json:"app_hash"`
	LastUnassignedIndex      uint                             `json:"last_unassigned_index"`
	LastUnassignedTorusIndex uint                             `json:"last_unassigned_torus_index"`
	LastCreatedIndex         uint                             `json:"last_created_index"`
	KeyMapping               map[string]KeyAssignmentPublic   `json:"key_mapping"`           // KeyIndex => KeyAssignmentPublic
	VerifierToKeyIndex       map[string](map[string]TorusID)  `json:"verifier_to_key_index"` // Verifier => VerifierID => KeyIndex
	BlockTime                time.Time                        `json:"-"`                     //  updated every start of block
	PSSDecisions             map[string]PSSDecision           `json:"pss_decisions"`
	KeygenDecisions          map[string]KeygenDecision        `json:"keygen_decisions"`
	KeygenPubKeys            map[string]KeygenPubKey          `json:"keygen_pubkeys"`
	Frozen                   bool                             `json:"frozen"`
	Thawed                   bool                             `json:"thawed"`
	MapFreezes               map[PSSProtocolPrefix]*MapFreeze `json:"map_freezes"`
	MapThaws                 map[PSSProtocolPrefix]*MapThaw   `json:"map_thaws"`
}

State - nothing in state should be a pointer Remember to initialize mappings in NewABCIApp()

type StreamMessage

type StreamMessage struct {
	Protocol string
	Message  P2PBasicMsg
}

type TelemetryMethods

type TelemetryMethods interface {
	SetOwner(owner string)
	GetOwner() (owner string)
}

type TelemetryMethodsImpl

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

func (*TelemetryMethodsImpl) GetOwner

func (m *TelemetryMethodsImpl) GetOwner() (owner string)

func (*TelemetryMethodsImpl) SetOwner

func (m *TelemetryMethodsImpl) SetOwner(owner string)

type TelemetryService

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

func (*TelemetryService) Call

func (t *TelemetryService) Call(method string, args ...interface{}) (interface{}, error)

func (*TelemetryService) Name

func (t *TelemetryService) Name() string

func (*TelemetryService) OnStart

func (t *TelemetryService) OnStart() error

func (*TelemetryService) OnStop

func (t *TelemetryService) OnStop() error

func (*TelemetryService) SetBaseService

func (t *TelemetryService) SetBaseService(bs *BaseService)

type TendermintMethodResponse

type TendermintMethodResponse struct {
	Error     error
	ByteSlice []byte
}

type TendermintMethods

type TendermintMethods interface {
	SetOwner(owner string)
	GetOwner() (owner string)

	GetNodeKey() (nodeKey tmp2p.NodeKey)
	GetStatus() (status BFTRPCWSStatus)

	Broadcast(tx interface{}) (txHash common.Hash, err error)
	RegisterQuery(query string, count int) (respChannel chan []byte, err error)
	DeregisterQuery(query string) (err error)
}

type TendermintMethodsImpl

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

func (*TendermintMethodsImpl) ABCIQuery

func (t *TendermintMethodsImpl) ABCIQuery(path string, data []byte) (*ctypes.ResultABCIQuery, error)

func (*TendermintMethodsImpl) Broadcast

func (t *TendermintMethodsImpl) Broadcast(tx interface{}) (txHash common.Hash, err error)

func (*TendermintMethodsImpl) DeregisterQuery

func (t *TendermintMethodsImpl) DeregisterQuery(query string) error

func (*TendermintMethodsImpl) GetNodeKey

func (t *TendermintMethodsImpl) GetNodeKey() (nodeKey tmp2p.NodeKey)

func (*TendermintMethodsImpl) GetOwner

func (m *TendermintMethodsImpl) GetOwner() (owner string)

func (*TendermintMethodsImpl) GetStatus

func (t *TendermintMethodsImpl) GetStatus() (status BFTRPCWSStatus)

func (*TendermintMethodsImpl) RegisterQuery

func (t *TendermintMethodsImpl) RegisterQuery(query string, count int) (respChannel chan []byte, err error)

func (*TendermintMethodsImpl) SetOwner

func (m *TendermintMethodsImpl) SetOwner(owner string)

type TendermintService

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

func (*TendermintService) Call

func (t *TendermintService) Call(method string, args ...interface{}) (interface{}, error)

func (*TendermintService) DeregisterQuery

func (t *TendermintService) DeregisterQuery(query string) error

func (*TendermintService) Name

func (t *TendermintService) Name() string

func (*TendermintService) OnStart

func (t *TendermintService) OnStart() error

func (*TendermintService) OnStop

func (t *TendermintService) OnStop() error

func (*TendermintService) RegisterQuery

func (t *TendermintService) RegisterQuery(query string, count int) (chan []byte, error)

func (*TendermintService) RouteWSMessage

func (t *TendermintService) RouteWSMessage(e rpctypes.RPCResponse) error

func (*TendermintService) SetBaseService

func (t *TendermintService) SetBaseService(bs *BaseService)

type TorusDB

type TorusDB interface {
	StorePublicKeyToKeyIndex(publicKey common.Point, keyIndex big.Int) error
	StoreCompletedShare(keyIndex big.Int, si big.Int, siprime big.Int, publicKey common.Point) error

	RetrieveCommitmentMatrix(keyIndex big.Int) ([][]common.Point, error)
	RetrieveCompletedShare(keyIndex big.Int) (Si *big.Int, Siprime *big.Int, PublicKey *common.Point, err error)
	RetrievePublicKeyToKeyIndex(publicKey common.Point) (*big.Int, error)

	keygen.AVSSKeygenStorage

	GetKeygenStarted(keygenID string) bool
	SetKeygenStarted(keygenID string, started bool) error

	// Some Stats
	GetShareCount() int
}

TorusDB represents a set of methods necessary for the operation of torus node NOTE: work in progress

type TorusID

type TorusID struct {
	Index      int
	KeyIndexes []big.Int
}

TorusID - an arbitrary struct used to chain multiple keyindexes together forming an access relationship that forms a users ID

type TransferState

type TransferState struct {
	LastUnassignedIndex      uint                            `json:"last_unassigned_index"`
	LastUnassignedTorusIndex uint                            `json:"last_unassigned_torus_index"`
	LastCreatedIndex         uint                            `json:"last_created_index"`
	KeyMapping               map[string]KeyAssignmentPublic  `json:"key_mapping"`           // KeyIndex => KeyAssignmentPublic
	VerifierToKeyIndex       map[string](map[string]TorusID) `json:"verifier_to_key_index"` // Verifier => VerifierID => KeyIndex
	PubKeyMappings           map[string]common.Point         `json:"pubkey_mapping"`
}

type TransportMessage

type TransportMessage struct {
	Sender common.Point
	Data   []byte
	Sig    []byte
}

type ValidatedNodeSignature

type ValidatedNodeSignature struct {
	NodeSignature
	NodeIndex big.Int
}

type VerifierLookupHandler

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

func (VerifierLookupHandler) ServeJSONRPC

func (h VerifierLookupHandler) ServeJSONRPC(c context.Context, params *bijson.RawMessage) (interface{}, *jsonrpc.Error)

Looksup Keys assigned to a Verifier + VerifierID

type VerifierLookupItem

type VerifierLookupItem struct {
	KeyIndex string  `json:"key_index"`
	PubKeyX  big.Int `json:"pub_key_X"`
	PubKeyY  big.Int `json:"pub_key_Y"`
	Address  string  `json:"address"`
}

type VerifierLookupParams

type VerifierLookupParams struct {
	Verifier   string `json:"verifier"`
	VerifierID string `json:"verifier_id"`
}

type VerifierLookupResult

type VerifierLookupResult struct {
	Keys []VerifierLookupItem `json:"keys"`
}

type VerifierMethods

type VerifierMethods interface {
	SetOwner(owner string)
	GetOwner() (owner string)

	Verify(rawMessage *bijson.RawMessage) (valid bool, verifierID string, timeIssued time.Time, err error)
	CleanToken(verifierIdentifier string, idtoken string) (cleanedToken string, err error)
	// Lookup(verifierIdentifier string) (verifier auth.Verifier, err error) // TODO: no pointers on eventBus message data
	ListVerifiers() (verifiers []string)
}

type VerifierMethodsImpl

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

func (*VerifierMethodsImpl) CleanToken

func (v *VerifierMethodsImpl) CleanToken(verifierIdentifier string, idtoken string) (cleanedToken string, err error)

func (*VerifierMethodsImpl) GetOwner

func (m *VerifierMethodsImpl) GetOwner() (owner string)

func (*VerifierMethodsImpl) ListVerifiers

func (v *VerifierMethodsImpl) ListVerifiers() (verifiers []string)

func (*VerifierMethodsImpl) SetOwner

func (m *VerifierMethodsImpl) SetOwner(owner string)

func (*VerifierMethodsImpl) Verify

func (v *VerifierMethodsImpl) Verify(rawMessage *bijson.RawMessage) (valid bool, verifierID string, timeIssued time.Time, err error)

type VerifierService

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

func (*VerifierService) Call

func (v *VerifierService) Call(method string, args ...interface{}) (interface{}, error)

func (*VerifierService) Name

func (v *VerifierService) Name() string

func (*VerifierService) OnStart

func (v *VerifierService) OnStart() error

func (*VerifierService) OnStop

func (v *VerifierService) OnStop() error

func (*VerifierService) SetBaseService

func (v *VerifierService) SetBaseService(bs *BaseService)

type WhitelistMonitorUpdates

type WhitelistMonitorUpdates struct {
	Type    string
	Payload interface{}
}

Jump to

Keyboard shortcuts

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