Documentation ¶
Index ¶
- type AsyncCredential
- type ChannelProposal
- type Connection
- func (c *Connection) Close(ctx context.Context) error
- func (c *Connection) Disputed() bool
- func (conn *Connection) HandleUpdate(cur *channel.State, update client.ChannelUpdate, ...)
- func (c *Connection) NextCredentialRequest(ctx context.Context) (*CredentialRequest, error)
- func (c *Connection) RequestCredential(ctx context.Context, doc []byte, price channel.Bal, issuer common.Address) (*AsyncCredential, error)
- func (c *Connection) TryClose(ctx context.Context, attempts int) error
- func (c *Connection) WaitConcludadable(ctx context.Context) error
- type ConnectionRequest
- type CredentialProposal
- type CredentialRequest
- type CredentialRequestResponse
- type CredentialRequestResponseAccept
- type EventHandler
- type Registry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AsyncCredential ¶
type AsyncCredential struct {
// contains filtered or unexported fields
}
func (*AsyncCredential) Await ¶
func (c *AsyncCredential) Await(ctx context.Context) (*CredentialProposal, error)
type ChannelProposal ¶
type ChannelProposal struct {
// contains filtered or unexported fields
}
func NewChannelProposal ¶
func NewChannelProposal( p *client.LedgerChannelProposal, r *client.ProposalResponder, ) *ChannelProposal
type Connection ¶
func NewConnection ¶
func NewConnection(ch *client.Channel) *Connection
func (*Connection) Disputed ¶
func (c *Connection) Disputed() bool
func (*Connection) HandleUpdate ¶
func (conn *Connection) HandleUpdate(cur *channel.State, update client.ChannelUpdate, responder *client.UpdateResponder)
func (*Connection) NextCredentialRequest ¶
func (c *Connection) NextCredentialRequest(ctx context.Context) (*CredentialRequest, error)
func (*Connection) RequestCredential ¶
func (c *Connection) RequestCredential( ctx context.Context, doc []byte, price channel.Bal, issuer common.Address, ) (*AsyncCredential, error)
func (*Connection) TryClose ¶
func (c *Connection) TryClose(ctx context.Context, attempts int) error
func (*Connection) WaitConcludadable ¶
func (c *Connection) WaitConcludadable(ctx context.Context) error
type ConnectionRequest ¶
type ConnectionRequest struct {
// contains filtered or unexported fields
}
func NewConnectionRequest ¶
func NewConnectionRequest( p *ChannelProposal, acc wallet.Address, registry *Registry, ) *ConnectionRequest
func (*ConnectionRequest) Accept ¶
func (r *ConnectionRequest) Accept(ctx context.Context) (*Connection, error)
func (*ConnectionRequest) Peer ¶
func (r *ConnectionRequest) Peer() wallet.Address
type CredentialProposal ¶
type CredentialProposal struct { *client.UpdateResponder Signature []byte }
type CredentialRequest ¶
type CredentialRequest struct {
// contains filtered or unexported fields
}
func (*CredentialRequest) CheckDoc ¶
func (r *CredentialRequest) CheckDoc(doc []byte) error
func (*CredentialRequest) CheckPrice ¶
func (r *CredentialRequest) CheckPrice(p *big.Int) error
func (*CredentialRequest) IssueCredential ¶
type CredentialRequestResponseAccept ¶
type CredentialRequestResponseAccept struct {
// contains filtered or unexported fields
}
func (*CredentialRequestResponseAccept) Context ¶
func (r *CredentialRequestResponseAccept) Context() context.Context
func (*CredentialRequestResponseAccept) Result ¶
func (r *CredentialRequestResponseAccept) Result() chan error
type EventHandler ¶
type EventHandler struct {
*Connection
}
func NewEventHandler ¶
func NewEventHandler(conn *Connection) *EventHandler
func (*EventHandler) HandleAdjudicatorEvent ¶
func (h *EventHandler) HandleAdjudicatorEvent(e channel.AdjudicatorEvent)
Click to show internal directories.
Click to hide internal directories.