gasless

package module
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2021 License: MPL-2.0 Imports: 7 Imported by: 4

README

Gasless

Ethereum meta transaction library.

Contributing

Found a bug or have an idea for a feature? Create an issue.

Maintainers

@awantoch

@jiyuu-jin

@nasdf

License

Valist is licensed under the Mozilla Public License Version 2.0.

Documentation

Index

Constants

View Source
const EIP712Domain = "EIP712Domain"

Variables

This section is empty.

Functions

This section is empty.

Types

type MetaSignerFn added in v0.0.5

type MetaSignerFn func(from common.Address, typedData core.TypedData) ([]byte, error)

MetaSignerFn is a function used to sign typed data.

type TransactOpts added in v0.0.3

type TransactOpts struct {
	bind.TransactOpts
	MetaSigner MetaSignerFn
}

TransactOpts contains transaction settings.

func NewWalletTransactor added in v0.0.5

func NewWalletTransactor(account accounts.Account, wallet Wallet) *TransactOpts

NewWalletTransactor returns transact opts using a gasless wallet.

type Transactor added in v0.0.3

type Transactor interface {
	// Transact creates and submits a meta transaction.
	Transact(opts *TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
}

Transactor defines methods for creating meta transactions.

type Wallet added in v0.0.5

type Wallet struct {
	accounts.Wallet
}

Wallet is used to sign typed data for meta transactions.

func NewWallet added in v0.0.5

func NewWallet(wallet accounts.Wallet) Wallet

NewWallet returns a wrapped ethereum wallet.

func (Wallet) SignTypedData added in v0.0.5

func (w Wallet) SignTypedData(account accounts.Account, typedData core.TypedData) ([]byte, error)

SignTypedData returns a signature derived from the typed data.

func (Wallet) SignTypedDataWithPassphrase added in v0.0.5

func (w Wallet) SignTypedDataWithPassphrase(account accounts.Account, passphrase string, typedData core.TypedData) ([]byte, error)

SignTypedData is identical to SignTypedData, but also takes a passphrase.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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