Documentation ¶
Index ¶
Constants ¶
View Source
const EIP712Domain = "EIP712Domain"
Variables ¶
This section is empty.
Functions ¶
func SendTransaction ¶
func SendTransaction(ctx context.Context, meta MetaTransactor, message EIP712Message, signer Signer) (*types.Transaction, error)
SendTransaction signs the given message and submits it to the given Meta provider.
Types ¶
type EIP712Message ¶
type EIP712Message interface { // TypedData returns the typed data formatted message. TypedData() core.TypedDataMessage }
EIP712Message contains meta transaction data.
type MetaTransactor ¶
type MetaTransactor interface { // Types returns the typed data types. Types() core.Types // PrimaryType returns the typed data primary type. PrimaryType() string // Domain returns the typed data domain. Domain() core.TypedDataDomain // Nonce returns the latest nonce for the given address. Nonce(context.Context, common.Address) (*big.Int, error) // SendTransaction submits the meta transaction with the given signature. SendTransaction(context.Context, EIP712Message, []byte, []byte) (*types.Transaction, error) }
MetaTransactor is a meta transaction sender.
type Signer ¶
Signer is a function that returns a signature for the given typed data.
func NewPrivateKeySigner ¶
func NewPrivateKeySigner(private *ecdsa.PrivateKey) Signer
NewPrivateKeySigner returns a signer that uses an ECDSA private key.
Click to show internal directories.
Click to hide internal directories.