Documentation ¶
Index ¶
- Variables
- func BindSSVApi(router *chi.Mux, node Ssv)
- func BindSidecarAPI(router *chi.Mux, node Sidecar)
- type Deal
- type Justification
- type JustificationShare
- type OperatorResponse
- type OperatorShare
- type PreviousDKGState
- type ReshareRequest
- type ReshareResponse
- type Response
- type Sidecar
- type SidecarClient
- func (s SidecarClient) BroadcastDKG(packet SidecarDKGPacket) error
- func (s SidecarClient) Health() error
- func (s SidecarClient) Identity(request SidecarIdentityRequest) (SidecarIdentityResponse, error)
- func (s SidecarClient) Reshare(request ReshareRequest) (ReshareResponse, error)
- func (s SidecarClient) Sign(request SignRequest) (SignResponse, error)
- type SidecarDKGPacket
- type SidecarIdentityRequest
- type SidecarIdentityResponse
- type SignRequest
- type SignResponse
- type SignedDepositData
- type SigningOutput
- type Ssv
- type SsvClient
- type SsvIdentityResponse
- type UnsignedDepositData
Constants ¶
This section is empty.
Variables ¶
View Source
var SidecarDKGPath = "/dkg"
View Source
var SidecarHealthPath = "/health"
View Source
var SidecarIdentityPath = "/identity"
View Source
var SidecarSignPath = "/sign"
View Source
var SsvHealthPath = "/health"
View Source
var SsvIdentityPath = "/identity"
Functions ¶
func BindSSVApi ¶
func BindSSVApi(router *chi.Mux, node Ssv)
func BindSidecarAPI ¶
func BindSidecarAPI(router *chi.Mux, node Sidecar)
Types ¶
type Deal ¶
type Deal struct { DealerIndex uint32 Deals []dkg.Deal Public [][]byte SessionID []byte Signature []byte }
func DealFromDomain ¶
func DealFromDomain(bundle *dkg.DealBundle) (*Deal, error)
DealFromDomain takes the kyber DKG packet and turns it into something that can be marshalled into an HTTP request
func (Deal) ToDomain ¶
func (d Deal) ToDomain(scheme crypto.ThresholdScheme) (dkg.DealBundle, error)
ToDomain takes the deal part of an HTTP request and maps it into a type usable by the kyber DKG
type Justification ¶
type Justification struct { DealerIndex uint32 Justifications []JustificationShare SessionID []byte Signature []byte }
func JustFromDomain ¶
func JustFromDomain(bundle *dkg.JustificationBundle) (*Justification, error)
JustFromDomain takes the kyber DKG packet and turns it into something that can be marshalled into an HTTP request
func (Justification) ToDomain ¶
func (j Justification) ToDomain(scheme crypto.ThresholdScheme) (dkg.JustificationBundle, error)
ToDomain takes the deal part of an HTTP request and maps it into a type usable by the kyber DKG
type JustificationShare ¶
type JustificationShare struct {}
type OperatorResponse ¶
type OperatorResponse struct { Identity crypto.Identity Response SignResponse }
type OperatorShare ¶
type OperatorShare struct {}
type PreviousDKGState ¶
type ReshareRequest ¶
type ReshareRequest struct {}
type ReshareResponse ¶
type Response ¶
type Response struct {
dkg.ResponseBundle
}
type Sidecar ¶
type Sidecar interface { Health() error Sign(request SignRequest) (SignResponse, error) Identity(request SidecarIdentityRequest) (SidecarIdentityResponse, error) BroadcastDKG(packet SidecarDKGPacket) error }
func NewSidecarClient ¶
type SidecarClient ¶
type SidecarClient struct {
// contains filtered or unexported fields
}
func (SidecarClient) BroadcastDKG ¶
func (s SidecarClient) BroadcastDKG(packet SidecarDKGPacket) error
func (SidecarClient) Health ¶
func (s SidecarClient) Health() error
func (SidecarClient) Identity ¶
func (s SidecarClient) Identity(request SidecarIdentityRequest) (SidecarIdentityResponse, error)
func (SidecarClient) Reshare ¶
func (s SidecarClient) Reshare(request ReshareRequest) (ReshareResponse, error)
func (SidecarClient) Sign ¶
func (s SidecarClient) Sign(request SignRequest) (SignResponse, error)
type SidecarDKGPacket ¶
type SidecarDKGPacket struct { Deal *Deal Response *Response Justification *Justification }
type SidecarIdentityRequest ¶
type SidecarIdentityRequest struct {
ValidatorNonce uint32 `json:"validator_nonce"`
}
type SidecarIdentityResponse ¶
type SignRequest ¶
type SignRequest struct { SessionID []byte `json:"session_id"` ValidatorNonce uint32 `json:"validator_nonce"` Data UnsignedDepositData `json:"data"` Operators []crypto.Identity `json:"operators"` }
type SignResponse ¶
type SignResponse struct { byte `json:"encrypted_share"` // the BLS12-381 public key for the group created during the DKG PublicPolynomial []byte `json:"public_polynomial"` // the BLS12-381 public key for the specific validator node NodePK []byte `json:"node_pk"` // a partial signature over the deposit data's SHA256 hash DepositDataPartialSignature []byte `json:"deposit_data_partial_signature"` // a partial signature over the validator's nonce's SHA256 hash DepositValidatorNonceSignature []byte `json:"deposit_validator_nonce_signature"` }EncryptedShare []
type SignedDepositData ¶
type SignedDepositData struct { UnsignedDepositData PubKey []byte `json:"pubkey"` Signature []byte `json:"signature"` }
type SigningOutput ¶
type SigningOutput struct { SessionID []byte `json:"session_id"` GroupSignature []byte `json:"group_signature"` PolynomialCommitments []byte `json:"group_public_commitments"` DepositData SignedDepositData `json:"deposit_data"` }
type Ssv ¶
type Ssv interface { Health() error Identity() (SsvIdentityResponse, error) }
type SsvClient ¶
type SsvClient struct {
// contains filtered or unexported fields
}
func NewSsvClient ¶
func (SsvClient) Identity ¶
func (s SsvClient) Identity() (SsvIdentityResponse, error)
type SsvIdentityResponse ¶
type SsvIdentityResponse struct {
PublicKey []byte `json:"publicKey"`
}
type UnsignedDepositData ¶
type UnsignedDepositData struct { WithdrawalCredentials []byte `json:"withdrawal_credentials"` DepositDataRoot []byte `json:"deposit_data_root"` DepositMessageRoot []byte `json:"deposit_message_root,omitempty"` Amount uint64 `json:"amount,omitempty"` ForkVersion string `json:"fork_version,omitempty"` NetworkName string `json:"network_name,omitempty"` DepositCLIVersion string `json:"deposit_cli_version,omitempty"` }
func (UnsignedDepositData) ExtractRequired ¶
func (u UnsignedDepositData) ExtractRequired() crypto.RequiredDepositFields
Source Files ¶
Click to show internal directories.
Click to hide internal directories.