Documentation ¶
Index ¶
- type ChAPI
- func (_m *ChAPI) ChallengeDurSecs() uint64
- func (_m *ChAPI) Close(_a0 context.Context) (perun.ChInfo, perun.APIError)
- func (_m *ChAPI) Currency(symbol string) (int, perun.Currency, bool)
- func (_m *ChAPI) GetChInfo() perun.ChInfo
- func (_m *ChAPI) ID() string
- func (_m *ChAPI) Parts() []string
- func (_m *ChAPI) RespondChUpdate(_a0 context.Context, _a1 string, _a2 bool) (perun.ChInfo, perun.APIError)
- func (_m *ChAPI) SendChUpdate(_a0 context.Context, _a1 perun.StateUpdater) (perun.ChInfo, perun.APIError)
- func (_m *ChAPI) SubChUpdates(_a0 perun.ChUpdateNotifier) perun.APIError
- func (_m *ChAPI) UnsubChUpdates() perun.APIError
- type ChClient
- func (_m *ChClient) Channel(_a0 [32]byte) (session.PChannel, error)
- func (_m *ChClient) Close() error
- func (_m *ChClient) EnablePersistence(_a0 persistence.PersistRestorer)
- func (_m *ChClient) Handle(_a0 client.ProposalHandler, _a1 client.UpdateHandler)
- func (_m *ChClient) Log() log.Logger
- func (_m *ChClient) OnNewChannel(handler func(session.PChannel))
- func (_m *ChClient) ProposeChannel(_a0 context.Context, _a1 client.ChannelProposal) (session.PChannel, error)
- func (_m *ChClient) Register(offChainAddr wire.Address, commAddr string)
- func (_m *ChClient) Restore(_a0 context.Context) error
- func (_m *ChClient) RestoreChs(databaseDir string, timeout time.Duration, handler func(session.PChannel)) error
- type ChProposalResponder
- type ChUpdateResponder
- type ChannelProposal
- func (_m *ChannelProposal) Base() *client.BaseChannelProposal
- func (_m *ChannelProposal) Decode(_a0 io.Reader) error
- func (_m *ChannelProposal) Encode(_a0 io.Writer) error
- func (_m *ChannelProposal) Matches(_a0 client.ChannelProposalAccept) bool
- func (_m *ChannelProposal) ProposalID() [32]byte
- func (_m *ChannelProposal) Type() wire.Type
- func (_m *ChannelProposal) Valid() error
- type Closer
- type CommBackend
- type Dialer
- type PChannel
- func (_m *PChannel) Close() error
- func (_m *PChannel) ID() [32]byte
- func (_m *PChannel) Idx() channel.Index
- func (_m *PChannel) IsClosed() bool
- func (_m *PChannel) OnUpdate(cb func(*channel.State, *channel.State))
- func (_m *PChannel) Params() *channel.Params
- func (_m *PChannel) Peers() []wire.Address
- func (_m *PChannel) Phase() channel.Phase
- func (_m *PChannel) Settle(ctx context.Context, isSecondary bool) error
- func (_m *PChannel) State() *channel.State
- func (_m *PChannel) UpdateBy(ctx context.Context, update func(*channel.State) error) error
- func (_m *PChannel) Watch(_a0 client.AdjudicatorEventHandler) error
- type ROContractRegistry
- func (_m *ROContractRegistry) Adjudicator() wallet.Address
- func (_m *ROContractRegistry) Asset(symbol string) (wallet.Address, bool)
- func (_m *ROContractRegistry) AssetETH() wallet.Address
- func (_m *ROContractRegistry) Assets() map[string]string
- func (_m *ROContractRegistry) Symbol(asset wallet.Address) (string, bool)
- func (_m *ROContractRegistry) Token(symbol string) (wallet.Address, bool)
- type Registerer
- type SessionAPI
- func (_m *SessionAPI) AddPeerID(_a0 perun.PeerID) perun.APIError
- func (_m *SessionAPI) Close(force bool) ([]perun.ChInfo, perun.APIError)
- func (_m *SessionAPI) DeployAssetERC20(tokenERC20 string) (string, perun.APIError)
- func (_m *SessionAPI) GetCh(_a0 string) (perun.ChAPI, perun.APIError)
- func (_m *SessionAPI) GetChsInfo() []perun.ChInfo
- func (_m *SessionAPI) GetPeerID(alias string) (perun.PeerID, perun.APIError)
- func (_m *SessionAPI) ID() string
- func (_m *SessionAPI) OpenCh(_a0 context.Context, _a1 perun.BalInfo, _a2 perun.App, _a3 uint64) (perun.ChInfo, perun.APIError)
- func (_m *SessionAPI) RespondChProposal(_a0 context.Context, _a1 string, _a2 bool) (perun.ChInfo, perun.APIError)
- func (_m *SessionAPI) SubChProposals(_a0 perun.ChProposalNotifier) perun.APIError
- func (_m *SessionAPI) UnsubChProposals() perun.APIError
- type WireBus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChAPI ¶ added in v0.4.0
ChAPI is an autogenerated mock type for the ChAPI type
func (*ChAPI) ChallengeDurSecs ¶ added in v0.4.0
ChallengeDurSecs provides a mock function with given fields:
func (*ChAPI) Currency ¶ added in v0.4.0
Currency provides a mock function with given fields: symbol
func (*ChAPI) RespondChUpdate ¶ added in v0.4.0
func (_m *ChAPI) RespondChUpdate(_a0 context.Context, _a1 string, _a2 bool) (perun.ChInfo, perun.APIError)
RespondChUpdate provides a mock function with given fields: _a0, _a1, _a2
func (*ChAPI) SendChUpdate ¶ added in v0.4.0
func (_m *ChAPI) SendChUpdate(_a0 context.Context, _a1 perun.StateUpdater) (perun.ChInfo, perun.APIError)
SendChUpdate provides a mock function with given fields: _a0, _a1
func (*ChAPI) SubChUpdates ¶ added in v0.4.0
func (_m *ChAPI) SubChUpdates(_a0 perun.ChUpdateNotifier) perun.APIError
SubChUpdates provides a mock function with given fields: _a0
func (*ChAPI) UnsubChUpdates ¶ added in v0.4.0
UnsubChUpdates provides a mock function with given fields:
type ChClient ¶ added in v0.4.0
ChClient is an autogenerated mock type for the ChClient type
func (*ChClient) EnablePersistence ¶ added in v0.4.0
func (_m *ChClient) EnablePersistence(_a0 persistence.PersistRestorer)
EnablePersistence provides a mock function with given fields: _a0
func (*ChClient) Handle ¶ added in v0.4.0
func (_m *ChClient) Handle(_a0 client.ProposalHandler, _a1 client.UpdateHandler)
Handle provides a mock function with given fields: _a0, _a1
func (*ChClient) OnNewChannel ¶ added in v0.4.0
OnNewChannel provides a mock function with given fields: handler
func (*ChClient) ProposeChannel ¶ added in v0.4.0
func (_m *ChClient) ProposeChannel(_a0 context.Context, _a1 client.ChannelProposal) (session.PChannel, error)
ProposeChannel provides a mock function with given fields: _a0, _a1
func (*ChClient) Register ¶ added in v0.4.0
Register provides a mock function with given fields: offChainAddr, commAddr
type ChProposalResponder ¶ added in v0.5.0
ChProposalResponder is an autogenerated mock type for the ChProposalResponder type
func (*ChProposalResponder) Accept ¶ added in v0.5.0
func (_m *ChProposalResponder) Accept(_a0 context.Context, _a1 *client.LedgerChannelProposalAcc) (session.PChannel, error)
Accept provides a mock function with given fields: _a0, _a1
type ChUpdateResponder ¶ added in v0.5.0
ChUpdateResponder is an autogenerated mock type for the ChUpdateResponder type
type ChannelProposal ¶ added in v0.5.0
ChannelProposal is an autogenerated mock type for the ChannelProposal type
func (*ChannelProposal) Base ¶ added in v0.6.0
func (_m *ChannelProposal) Base() *client.BaseChannelProposal
Base provides a mock function with given fields:
func (*ChannelProposal) Decode ¶ added in v0.5.0
func (_m *ChannelProposal) Decode(_a0 io.Reader) error
Decode provides a mock function with given fields: _a0
func (*ChannelProposal) Encode ¶ added in v0.5.0
func (_m *ChannelProposal) Encode(_a0 io.Writer) error
Encode provides a mock function with given fields: _a0
func (*ChannelProposal) Matches ¶ added in v0.6.0
func (_m *ChannelProposal) Matches(_a0 client.ChannelProposalAccept) bool
Matches provides a mock function with given fields: _a0
func (*ChannelProposal) ProposalID ¶ added in v0.6.0
func (_m *ChannelProposal) ProposalID() [32]byte
ProposalID provides a mock function with given fields:
func (*ChannelProposal) Type ¶ added in v0.5.0
func (_m *ChannelProposal) Type() wire.Type
Type provides a mock function with given fields:
func (*ChannelProposal) Valid ¶ added in v0.6.0
func (_m *ChannelProposal) Valid() error
Valid provides a mock function with given fields:
type CommBackend ¶
CommBackend is an autogenerated mock type for the CommBackend type
func (*CommBackend) NewDialer ¶
func (_m *CommBackend) NewDialer() perun.Dialer
NewDialer provides a mock function with given fields:
func (*CommBackend) NewListener ¶
func (_m *CommBackend) NewListener(address string) (net.Listener, error)
NewListener provides a mock function with given fields: address
type Dialer ¶
Dialer is an autogenerated mock type for the Dialer type
type PChannel ¶ added in v0.6.0
PChannel is an autogenerated mock type for the PChannel type
func (*PChannel) Settle ¶ added in v0.6.0
Settle provides a mock function with given fields: ctx, isSecondary
type ROContractRegistry ¶ added in v0.6.0
ROContractRegistry is an autogenerated mock type for the ROContractRegistry type
func (*ROContractRegistry) Adjudicator ¶ added in v0.6.0
func (_m *ROContractRegistry) Adjudicator() wallet.Address
Adjudicator provides a mock function with given fields:
func (*ROContractRegistry) Asset ¶ added in v0.6.0
func (_m *ROContractRegistry) Asset(symbol string) (wallet.Address, bool)
Asset provides a mock function with given fields: symbol
func (*ROContractRegistry) AssetETH ¶ added in v0.6.0
func (_m *ROContractRegistry) AssetETH() wallet.Address
AssetETH provides a mock function with given fields:
func (*ROContractRegistry) Assets ¶ added in v0.6.0
func (_m *ROContractRegistry) Assets() map[string]string
Assets provides a mock function with given fields:
type Registerer ¶
Registerer is an autogenerated mock type for the Registerer type
type SessionAPI ¶
SessionAPI is an autogenerated mock type for the SessionAPI type
func (*SessionAPI) AddPeerID ¶ added in v0.5.0
func (_m *SessionAPI) AddPeerID(_a0 perun.PeerID) perun.APIError
AddPeerID provides a mock function with given fields: _a0
func (*SessionAPI) DeployAssetERC20 ¶ added in v0.6.0
func (_m *SessionAPI) DeployAssetERC20(tokenERC20 string) (string, perun.APIError)
DeployAssetERC20 provides a mock function with given fields: tokenERC20
func (*SessionAPI) GetChsInfo ¶ added in v0.4.0
func (_m *SessionAPI) GetChsInfo() []perun.ChInfo
GetChsInfo provides a mock function with given fields:
func (*SessionAPI) GetPeerID ¶ added in v0.5.0
GetPeerID provides a mock function with given fields: alias
func (*SessionAPI) ID ¶
func (_m *SessionAPI) ID() string
ID provides a mock function with given fields:
func (*SessionAPI) OpenCh ¶
func (_m *SessionAPI) OpenCh(_a0 context.Context, _a1 perun.BalInfo, _a2 perun.App, _a3 uint64) (perun.ChInfo, perun.APIError)
OpenCh provides a mock function with given fields: _a0, _a1, _a2, _a3
func (*SessionAPI) RespondChProposal ¶
func (_m *SessionAPI) RespondChProposal(_a0 context.Context, _a1 string, _a2 bool) (perun.ChInfo, perun.APIError)
RespondChProposal provides a mock function with given fields: _a0, _a1, _a2
func (*SessionAPI) SubChProposals ¶
func (_m *SessionAPI) SubChProposals(_a0 perun.ChProposalNotifier) perun.APIError
SubChProposals provides a mock function with given fields: _a0
func (*SessionAPI) UnsubChProposals ¶
func (_m *SessionAPI) UnsubChProposals() perun.APIError
UnsubChProposals provides a mock function with given fields: