ethereum

package
v2.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 13, 2019 License: LGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TxStatusSuccess is the status emitted on a successfuly transaction for onrik/ethrpc
	TxStatusSuccess = "0x1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	ETH                    *ethclient.Client
	RPC                    *ethrpc.EthRPC
	Auth                   *bind.TransactOpts
	RTCAddress             string
	PaymentContractAddress string
	ConfirmationCount      int
}

Client is our connection to ethereum

func NewClient

func NewClient(cfg *config.TemporalConfig, connectionType string) (*Client, error)

NewClient is used to generate our Ethereum client wrapper

func (*Client) ProcessPaymentTx

func (c *Client) ProcessPaymentTx(txHash string) error

func (*Client) UnlockAccount

func (c *Client) UnlockAccount(keys ...string) error

UnlockAccount is used to unlck our main account

func (*Client) WaitForConfirmations

func (c *Client) WaitForConfirmations(tx *types.Transaction) error

WaitForConfirmations is used to wait for enough block confirmations for a tx to be considered valid

Jump to

Keyboard shortcuts

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