Documentation
¶
Overview ¶
Package msg contains simple types to assist with transmitting and communicating across a network about a payment channel between two participants. It is rather rudimentary and intended for use in examples. There are no stability or compatibility guarantees for the messages or encoding format used.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Encoder ¶
Encoder is an encoder that can be used to encode messages. It is currently set as the encoding/gob.Encoder, but may be changed to another type at anytime to facilitate testing or to improve performance.
func NewEncoder ¶
type Hello ¶
type Hello struct { ChannelAccount keypair.FromAddress Signer keypair.FromAddress }
Hello can be used to signal to another participant a minimal amount of information the other participant needs to know about them.
type Message ¶
type Message struct { Type Type Hello *Hello OpenRequest *state.OpenEnvelope OpenResponse *state.OpenSignatures PaymentRequest *state.CloseEnvelope PaymentResponse *state.CloseSignatures CloseRequest *state.CloseEnvelope CloseResponse *state.CloseSignatures }
Message is a message that can be transmitted to support two participants in a payment channel communicating by signaling who they are with a hello, opening the channel, making payments, and closing the channel.