tx

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: AGPL-3.0, AGPL-3.0-or-later Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SignedTx

type SignedTx struct {
	Tx        Tx             `json:"tx"`
	Signature types.ArgBytes `json:"signature"`
}

func (*SignedTx) Signer

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

Signer returns the address of the signer

type Tx

type Tx struct {
	// L1Consensus      L1Consensus
	// Batches          []types.Batch
	RollupID          uint32
	LastVerifiedBatch types.ArgUint64 `json:"lastVerifiedBatch"`
	NewVerifiedBatch  types.ArgUint64 `json:"newVerifiedBatch"`
	ZKP               ZKP             `json:"ZKP"`
}

func (*Tx) Hash

func (t *Tx) Hash() common.Hash

Hash returns a hash that uniquely identifies the tx

func (*Tx) Sign

func (t *Tx) Sign(privateKey *ecdsa.PrivateKey) (*SignedTx, error)

Sign returns a signed batch by the private key

type ZKP

type ZKP struct {
	NewStateRoot     common.Hash    `json:"newStateRoot"`
	NewLocalExitRoot common.Hash    `json:"newLocalExitRoot"`
	Proof            types.ArgBytes `json:"proof"`
}

Jump to

Keyboard shortcuts

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