Documentation
¶
Overview ¶
Package client provides an abstraction over the channel client used for running the off-chain network implemented by go-perun project.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEthereumPaymentClient ¶
NewEthereumPaymentClient initializes a two party, ethereum payment channel client for the given user. It establishes a connection to the blockchain and verifies the integrity of contracts at the given address. It uses the comm backend to initialize adapters for off-chain communication network.
Types ¶
type ChainConfig ¶
type ChainConfig struct {
// Addresses of on-chain contracts used for establishing state channel network.
Adjudicator string
Asset string
// URL for connecting to the blockchain node.
URL string
// ConnTimeout is the timeout used when dialing for new connections to the on-chain node.
ConnTimeout time.Duration
// OnChainTxTimeout is the timeout to wait for a blockchain transaction to be finalized.
OnChainTxTimeout time.Duration
}
ChainConfig represents the configuration parameters for connecting to blockchain.
type Config ¶
type Config struct {
Chain ChainConfig
// Path to directory containing persistence database.
DatabaseDir string
// Timeout for re-establishing all open channels (if any) that was persisted during the
// previous running instance of the node.
PeerReconnTimeout time.Duration
}
Config represents the configuration parameters for state channel client.
Click to show internal directories.
Click to hide internal directories.