Versions in this module Expand all Collapse all v0 v0.1.0 Aug 3, 2021 Changes in this version + func NewChequebook(opts ...Option) chequebook.Service + type Option interface + func WithChequebookAddressFunc(f func() common.Address) Option + func WithChequebookAvailableBalanceFunc(f func(ctx context.Context) (*big.Int, error)) Option + func WithChequebookBalanceFunc(f func(ctx context.Context) (*big.Int, error)) Option + func WithChequebookDepositFunc(f func(ctx context.Context, amount *big.Int) (hash common.Hash, err error)) Option + func WithChequebookIssueFunc(...) Option + func WithChequebookWithdrawFunc(f func(ctx context.Context, amount *big.Int) (hash common.Hash, err error)) Option + func WithLastChequeFunc(f func(beneficiary common.Address) (*chequebook.SignedCheque, error)) Option + func WithLastChequesFunc(f func() (map[common.Address]*chequebook.SignedCheque, error)) Option + type Service struct + func (s *Service) Address() common.Address + func (s *Service) AvailableBalance(ctx context.Context) (bal *big.Int, err error) + func (s *Service) Balance(ctx context.Context) (bal *big.Int, err error) + func (s *Service) Deposit(ctx context.Context, amount *big.Int) (hash common.Hash, err error) + func (s *Service) Issue(ctx context.Context, beneficiary common.Address, amount *big.Int, ...) (*big.Int, error) + func (s *Service) LastCheque(beneficiary common.Address) (*chequebook.SignedCheque, error) + func (s *Service) LastCheques() (map[common.Address]*chequebook.SignedCheque, error) + func (s *Service) WaitForDeposit(ctx context.Context, txHash common.Hash) error + func (s *Service) Withdraw(ctx context.Context, amount *big.Int) (hash common.Hash, err error)