dkgapi

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2020 License: Apache-2.0, BSD-2-Clause Imports: 13 Imported by: 0

Documentation

Overview

handles dkgCache used during DKG process

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandlerAggregateDks

func HandlerAggregateDks(c echo.Context) error

func HandlerCommitDks

func HandlerCommitDks(c echo.Context) error

func HandlerExportDKShare

func HandlerExportDKShare(c echo.Context) error

func HandlerGetKeyPubInfo

func HandlerGetKeyPubInfo(c echo.Context) error

func HandlerImportDKShare

func HandlerImportDKShare(c echo.Context) error

func HandlerNewDks

func HandlerNewDks(c echo.Context) error

func HandlerSignDigest

func HandlerSignDigest(c echo.Context) error

func InitLogger

func InitLogger()

Types

type AggregateDKSRequest

type AggregateDKSRequest struct {
	TmpId     int      `json:"tmpId"`
	Index     uint16   `json:"index"`      // 0 to N-1
	PriShares []string `json:"pri_shares"` // base58
}

type AggregateDKSResponse

type AggregateDKSResponse struct {
	PubShare string `json:"pub_share"` // base58
	Err      string `json:"err"`
}

func AggregateDKSReq

func AggregateDKSReq(req *AggregateDKSRequest) *AggregateDKSResponse

type CommitDKSRequest

type CommitDKSRequest struct {
	TmpId     int      `json:"tmpId"`
	PubShares []string `json:"pub_shares"` // base58
}

type CommitDKSResponse

type CommitDKSResponse struct {
	Address string `json:"address"` //base58
	Err     string `json:"err"`
}

func CommitDKSReq

func CommitDKSReq(req *CommitDKSRequest) *CommitDKSResponse

type ExportDKShareRequest

type ExportDKShareRequest struct {
	Address string `json:"address"` //base58
}

type ExportDKShareResponse

type ExportDKShareResponse struct {
	DKShare string `json:"dkshare"` // base58
	Err     string `json:"err"`
}

type GetPubKeyInfoRequest

type GetPubKeyInfoRequest struct {
	Address string `json:"address"` //base58
}

type GetPubKeyInfoResponse

type GetPubKeyInfoResponse struct {
	Address      string   `json:"address"` //base58
	N            uint16   `json:"n"`
	T            uint16   `json:"t"`
	Index        uint16   `json:"index"`
	PubKeys      []string `json:"pub_keys"`       // base58
	PubKeyMaster string   `json:"pub_key_master"` // base58
	Err          string   `json:"err"`
}

type ImportDKShareRequest

type ImportDKShareRequest struct {
	Blob string `json:"blob"` //base58
}

type ImportDKShareResponse

type ImportDKShareResponse struct {
	Err string `json:"err"`
}

type NewDKSRequest

type NewDKSRequest struct {
	TmpId int    `json:"tmpId"`
	N     uint16 `json:"n"`
	T     uint16 `json:"t"`
	Index uint16 `json:"index"` // 0 to N-1
}

type NewDKSResponse

type NewDKSResponse struct {
	PriShares []string `json:"pri_shares"` // base58
	Err       string   `json:"err"`
}

func NewDKSetReq

func NewDKSetReq(req *NewDKSRequest) *NewDKSResponse

type SignDigestRequest

type SignDigestRequest struct {
	Address    string             `json:"address"`
	DataDigest *hashing.HashValue `json:"data_digest"`
}

type SignDigestResponse

type SignDigestResponse struct {
	SigShare string `json:"sig_share"`
	Err      string `json:"err"`
}

func SignDigestReq

func SignDigestReq(req *SignDigestRequest) *SignDigestResponse

Jump to

Keyboard shortcuts

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