ethereum

package
v0.0.0-...-d0512a4 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const PrivateKeySize = 256 / 8

Variables

View Source
var DefaultKeystore = "~/.ethereum/keystore"

Functions

func GetAccountAndSigner

func GetAccountAndSigner(accountString string, client *ethclient.Client) (*bind.TransactOpts, func(data []byte) ([]byte, error), error)

func GetClient

func GetClient(url string) (*ethclient.Client, error)

Types

type PaymentChannel

type PaymentChannel struct {
	Payment      *abi.Payment
	TransactOpts *bind.TransactOpts
	Publisher    common.Address
	PodID        common.Hash
	PricingTable resource.PricingTableMap
}

func (*PaymentChannel) Available

func (p *PaymentChannel) Available() (*big.Int, error)

func (*PaymentChannel) WithdrawIfOverMargin

func (p *PaymentChannel) WithdrawIfOverMargin(transferAddress common.Address, amount *big.Int, tolerance *big.Int) (*types.Transaction, error)

func (*PaymentChannel) WithdrawUpTo

func (p *PaymentChannel) WithdrawUpTo(transferAddress common.Address, amount *big.Int) (*types.Transaction, error)

func (*PaymentChannel) Withdrawn

func (p *PaymentChannel) Withdrawn() (*big.Int, error)

type PaymentChannelValidator

type PaymentChannelValidator struct {
	ChainID *big.Int
	// contains filtered or unexported fields
}

func NewPaymentChannelValidator

func NewPaymentChannelValidator(ethClient *ethclient.Client, pricingTables map[common.Address]resource.PricingTableMap, transactOpts *bind.TransactOpts) (*PaymentChannelValidator, error)

func (*PaymentChannelValidator) Parse

Jump to

Keyboard shortcuts

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