types

package
v0.0.0-...-0432942 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2024 License: MIT Imports: 2 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"`
	Vote          uint8    `json:"vote"`
}

type SignService

type SignService interface {
	SignMsgBatch(request SignMsgRequest) ([]byte, error)
}

Jump to

Keyboard shortcuts

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