Documentation ¶
Overview ¶
Package server implements a DiceMix Light server for CoinShuffle++.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Joiner ¶
type Joiner interface { Join(unmixed []byte, pid int) error ValidateUnmixed(unmixed []byte, mcount int) error }
Joiner is any data which can be joined with binary unmixed data of similar type. The pid describes the submitting peer ID for blame assignment. Joiner must be implemented by the Mixer when the server is used for CoinJoins.
type Mixer ¶
type Mixer interface { encoding.BinaryMarshaler encoding.BinaryUnmarshaler // Mix adds a mixed message. Mix(m []byte) // Confirm extracts signatures from confirm from a specific peer and // includes them in the Mixer. Confirm(confirm interface{}, pid int) error }
Mixer is any binary-representable data which can add mixed messages and be confirmed with signatures.
type NewMixer ¶
NewMixer returns a Mixer to join data with described features. The result should contain no initial messages. If the BinaryMixer is also a Joiner, it will be joined with the unmixed data from a pairing request message.
type PublishMixer ¶
PublishMixer is a Mixer which is capable of using the server to publish the data. If Mixer implements PublishMixer, the mix will be published (and blame may be assigned for bad submitted data if the publish fails).
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implements pairing of clients performing compatible mixes, and coordinates a DiceMix Light session between paired clients.
func New ¶
New creates a Server that will perform DiceMix Light with messages of length msize. When newm creates a CoinJoin transaction, this implements CoinShuffle++.
If the Mixer returned by newm implements the Joiner and Shuffler interfaces, these will be called to join and shuffle non-anonymous portions of a mix.