account

package
v0.9.5 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

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

func NewKeyedAccount

func NewKeyedAccount(key *ecdsa.PrivateKey) Account

func NewKeyedAccountWithFeePayer

func NewKeyedAccountWithFeePayer(ctx context.Context, key *ecdsa.PrivateKey, feePayer FeePayer) (Account, error)

func NewWalletAccount

func NewWalletAccount(account accounts.Account, wallet accounts.Wallet) (Account, error)

func NewWalletAccountWithFeePayer

func NewWalletAccountWithFeePayer(ctx context.Context, account accounts.Account, wallet accounts.Wallet, feePayer FeePayer) (Account, error)

func (Account) Address

func (acc Account) Address() common.Address

func (Account) FeePayerAddress

func (acc Account) FeePayerAddress() common.Address

func (Account) IsDelegated

func (acc Account) IsDelegated() bool

func (Account) IsReadOnly

func (acc Account) IsReadOnly() bool

func (Account) PublicKey

func (acc Account) PublicKey() ecdsa.PublicKey

func (Account) SendTransaction

func (acc Account) SendTransaction(ctx context.Context, tx *types.Transaction) (common.Hash, error)

func (Account) SignMessage

func (acc Account) SignMessage(message []byte) ([]byte, error)

func (Account) TxOpts

func (acc Account) TxOpts() *ablbind.TransactOpts

type FeePayer

type FeePayer interface {
	Address(ctx context.Context) (common.Address, error)
	Transact(ctx context.Context, tx *types.Transaction) (common.Hash, error)
}

func NewFeePayer

func NewFeePayer(ctx context.Context, client *http.Client, rawurl string, token *string) (FeePayer, error)

type MessageSigner

type MessageSigner func(message []byte) (signature []byte, err error)

func NewKeyedMessageSigner

func NewKeyedMessageSigner(key *ecdsa.PrivateKey) MessageSigner

func NewWalletMessageSigner

func NewWalletMessageSigner(account accounts.Account, wallet accounts.Wallet, passphrase *string) MessageSigner

Jump to

Keyboard shortcuts

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