auth

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package auth provides ability to generate bind.TransactOpts using admin account

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateAuth

func GenerateAuth(ctx context.Context, client *ethclient.Client, privateKeyBytes []byte) (*bind.TransactOpts, error)

GenerateAuth generates a new keyed transactor with the given private key bytes and context

Types

type Admin

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

func NewAdmin

func NewAdmin(privateKeyHex string, client *ethclient.Client) (*Admin, error)

func (*Admin) GenerateAuth

func (a *Admin) GenerateAuth(ctx context.Context) (*bind.TransactOpts, error)

type ContractSigner added in v0.3.0

type ContractSigner interface {
	GenerateAuth(ctx context.Context) (*bind.TransactOpts, error)
}

type MockContractSigner added in v0.3.0

type MockContractSigner struct {
	mock.Mock
}

MockContractSigner is a mock implementation of the ContractSigner interface.

func (*MockContractSigner) GenerateAuth added in v0.3.0

func (m *MockContractSigner) GenerateAuth(ctx context.Context) (*bind.TransactOpts, error)

Jump to

Keyboard shortcuts

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