sequence

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: AGPL-3.0, AGPL-3.0-or-later Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sequence

type Sequence struct {
	Batches         []batch.Batch `json:"batches"`
	OldAccInputHash common.Hash   `json:"oldAccInputhash"`
}

Sequence represents the data that the sequencer will send to L1 and other metadata needed to build the accumulated input hash aka accInputHash

func (*Sequence) HashToSign

func (s *Sequence) HashToSign() []byte

HashToSign returns the accumulated input hash of the sequence. Note that this is equivalent to what happens on the smart contract

func (*Sequence) OffChainData

func (s *Sequence) OffChainData() []offchaindata.OffChainData

OffChainData returns the data that needs to be stored off chain from a given sequence

func (*Sequence) Sign

func (s *Sequence) Sign(privateKey *ecdsa.PrivateKey) (*SignedSequence, error)

Sign returns a signed sequence by the private key. Note that what's being signed is the accumulated input hash

type SignedSequence

type SignedSequence struct {
	Sequence  Sequence     `json:"sequence"`
	Signature rpc.ArgBytes `json:"signature"`
}

SignedSequence is a sequence but signed

func (*SignedSequence) Signer

func (s *SignedSequence) Signer() (common.Address, error)

Signer returns the address of the signer

Jump to

Keyboard shortcuts

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