Documentation
¶
Index ¶
Constants ¶
View Source
const ( MaxReputationEntries = 100 TierIncrement = 20 MaxScore = MaxReputationEntries EpochLength = time.Second * 15 )
View Source
const PeerIDLength = secp256k1.PubKeyBytesLenCompressed
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MarketParameters ¶
type Match ¶
type MatchAcceptance ¶
type Order ¶
type Order struct {
From PeerID `json:"from"`
BaseID uint32 `json:"baseID"`
QuoteID uint32 `json:"quoteID"`
Sell bool `json:"sell"`
Qty uint64 `json:"qty"`
Rate uint64 `json:"rate"`
// LotSize: Tatankanet does not prescribe a lot size. Instead, users must
// select their own minimum minimum lot size. The user's UI should ignore
// orderbook orders that don't have the requisite lot size. The UI should
// show lot size selection in terms of a sliding scale of fee exposure.
// Lot sizes can only be powers of 2.
LotSize uint64 `json:"lotSize"`
// MinFeeRate: Tatankanet does not prescribe a fee rate on an order, but it
// does supply a suggested fee rate that is updated periodically. The user's
// UI should ignore an order from the order book if its MinFeeRate falls
// below the Tatnkanet suggested rate.
MinFeeRate uint64 `json:"minFeeRate"`
Stamp time.Time `json:"stamp"`
Expiration time.Time `json:"expiration"`
}
type Peer ¶
type Peer struct {
ID PeerID `json:"-"`
PubKey *secp256k1.PublicKey `json:"-"`
Bonds []*Bond `json:"-"`
Reputation *Reputation `json:"reputation"`
}
Peer is a network peer, which could be a client or a server node.
type PeerID ¶
type PeerID [PeerIDLength]byte
PeerID is the primary identifier for both clients and servers on Tatanka Mesh. The PeerID is the compressed-format serialized secp256k1.PublicKey.
type Reputation ¶
type Sender ¶
type Sender interface {
Send(*msgjson.Message) error
SendRaw([]byte) error
Request(msg *msgjson.Message, respHandler func(*msgjson.Message)) error
RequestRaw(msgID uint64, rawMsg []byte, respHandler func(*msgjson.Message)) error
SetPeerID(PeerID)
PeerID() PeerID
Disconnect()
}
Sender is an interface that is implemented by all network connections.
Click to show internal directories.
Click to hide internal directories.