proof

package
v0.3.1-0...-ee1233d Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidProofType = errors.New("invalid proof encoding type")
)

Functions

This section is empty.

Types

type Bytes

type Bytes []byte

func (Bytes) MarshalText

func (q Bytes) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler

func (*Bytes) UnmarshalText

func (q *Bytes) UnmarshalText(input []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

type HopParams

type HopParams struct {
	ChainID              *big.Int
	SignalServiceAddress common.Address
	SignalService        relayer.SignalService
	Key                  [32]byte
	Blocker              blocker
	Caller               relayer.Caller
	BlockNumber          uint64
}

type Prover

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

func New

func New(blocker blocker, cacheOption int) (*Prover, error)

func (*Prover) EncodedSignalProofWithHops

func (p *Prover) EncodedSignalProofWithHops(
	ctx context.Context,
	hopParams []HopParams,
) ([]byte, error)

type Slice

type Slice [][]byte

func (Slice) MarshalJSON

func (s Slice) MarshalJSON() ([]byte, error)

MarshalText implements encoding.TextMarshaler

func (*Slice) UnmarshalJSON

func (s *Slice) UnmarshalJSON(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

type StorageProof

type StorageProof struct {
	Height       *big.Int        `json:"height"`
	Address      common.Address  `json:"address"`
	Balance      *hexutil.Big    `json:"balance"`
	CodeHash     common.Hash     `json:"codeHash"`
	Nonce        hexutil.Uint64  `json:"nonce"`
	StateRoot    common.Hash     `json:"stateRoot"`
	StorageHash  common.Hash     `json:"storageHash"`
	AccountProof Slice           `json:"accountProof"`
	StorageProof []StorageResult `json:"storageProof"`
}

type StorageResult

type StorageResult struct {
	Key   Bytes `json:"key"`
	Value Bytes `json:"value"`
	Proof Slice `json:"proof"`
}

StorageResult is an object from StorageProof that contains a proof of storage.

Jump to

Keyboard shortcuts

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