types

package
v0.0.0-...-8b4944a Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

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

Context ---------------------------------------------

func NewContext

func NewContext() Context

func (Context) Approvers

func (c Context) Approvers() []string

func (Context) AvailableNodes

func (c Context) AvailableNodes() []string

func (Context) RequestId

func (c Context) RequestId() string

func (Context) StateBatchRoot

func (c Context) StateBatchRoot() [32]byte

func (Context) UnApprovers

func (c Context) UnApprovers() []string

func (Context) WithApprovers

func (c Context) WithApprovers(nodes []string) Context

func (Context) WithAvailableNodes

func (c Context) WithAvailableNodes(nodes []string) Context

func (Context) WithRequestId

func (c Context) WithRequestId(requestId string) Context

func (Context) WithStateBatchRoot

func (c Context) WithStateBatchRoot(stateBatchRoot [32]byte) Context

func (Context) WithUnApprovers

func (c Context) WithUnApprovers(nodes []string) Context

type Method

type Method string
const (
	SignMsgBatch Method = "signMsgBatch"
)

func (Method) String

func (m Method) String() string

type NodeSignRequest

type NodeSignRequest struct {
	Timestamp   int64       `json:"timestamp"`
	Nodes       []string    `json:"nodes"`
	RequestBody interface{} `json:"request_body"`
}

type SignMsgRequest

type SignMsgRequest struct {
	BlockNumber *big.Int `json:"block_number"`
	TxHash      []byte   `json:"tx_hash"`
	TxType      string   `json:"tx_type"`
}

type SignMsgResponse

type SignMsgResponse struct {
	Signature       []byte   `json:"signature"`
	G2Point         []byte   `json:"g2_point"`
	L2BlockNumber   *big.Int `json:"l2_block_number"`
	NonSignerPubkey []byte   `json:"non_signer_pubkey"`
	Vote            uint8    `json:"vote"`
}

type SignResult

type SignResult struct {
	Signature        *sign.G1Point   `json:"signature"`
	G2Point          *sign.G2Point   `json:"g2_point"`
	NonSignerPubkeys []*sign.G1Point `json:"non_signer_pubkeys"`
}

type SignService

type SignService interface {
	SignMsgBatch(request SignMsgRequest) (*SignResult, error)
}

type StakerDelegationRequest

type StakerDelegationRequest struct {
	Address string `json:"address"`
}

type StakerDelegationResult

type StakerDelegationResult struct {
	Amount uint64 `json:"amount"`
}

Jump to

Keyboard shortcuts

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