Documentation ¶
Index ¶
- Variables
- type Asset
- type CosiSignature
- func (s *CosiSignature) Bytes() []byte
- func (s *CosiSignature) FromBytes(bts []byte) error
- func (s *CosiSignature) MarshalBinary() (data []byte, err error)
- func (s *CosiSignature) MarshalJSON() ([]byte, error)
- func (s *CosiSignature) String() string
- func (s *CosiSignature) UnmarshalBinary(data []byte) error
- func (s *CosiSignature) UnmarshalJSON(b []byte) error
- type FeedConfig
- type Feeder
- type FeederStore
- type MarketStore
- type Member
- type PriceData
- type PriceProposal
- type Snapshot
- type System
- func (s *System) Me() *Member
- func (s *System) Member(id int64) *Member
- func (s *System) MemberIDs() []string
- func (s *System) MergeProposals(p0, p1 *PriceProposal) *PriceProposal
- func (s *System) SignProposal(p *PriceProposal) *PriceProposal
- func (s *System) VerifyData(p *PriceData) bool
- func (s *System) VerifyProposal(p *PriceProposal) bool
- type Ticker
- type Transfer
- type WalletService
- type WalletStore
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidTrace = errors.New("invalid trace")
)
Functions ¶
This section is empty.
Types ¶
type CosiSignature ¶ added in v0.0.2
func (*CosiSignature) Bytes ¶ added in v0.0.2
func (s *CosiSignature) Bytes() []byte
func (*CosiSignature) FromBytes ¶ added in v0.0.2
func (s *CosiSignature) FromBytes(bts []byte) error
func (*CosiSignature) MarshalBinary ¶ added in v0.0.2
func (s *CosiSignature) MarshalBinary() (data []byte, err error)
func (*CosiSignature) MarshalJSON ¶ added in v0.0.2
func (s *CosiSignature) MarshalJSON() ([]byte, error)
func (*CosiSignature) String ¶ added in v0.0.2
func (s *CosiSignature) String() string
func (*CosiSignature) UnmarshalBinary ¶ added in v0.0.2
func (s *CosiSignature) UnmarshalBinary(data []byte) error
func (*CosiSignature) UnmarshalJSON ¶ added in v0.0.2
func (s *CosiSignature) UnmarshalJSON(b []byte) error
type FeedConfig ¶
type FeederStore ¶
type MarketStore ¶
type Member ¶
type PriceData ¶
type PriceData struct { Timestamp int64 `json:"t,omitempty"` AssetID string `json:"a,omitempty"` Price decimal.Decimal `json:"p,omitempty"` Signature *CosiSignature `json:"s,omitempty"` }
type PriceProposal ¶
type Snapshot ¶ added in v0.0.2
type Snapshot struct { SnapshotID string `json:"snapshot_id"` CreatedAt time.Time `json:"created_at,omitempty"` TraceID string `json:"trace_id,omitempty"` AssetID string `json:"asset_id,omitempty"` OpponentID string `json:"opponent_id,omitempty"` Source string `json:"source,omitempty"` Amount decimal.Decimal `json:"amount,omitempty"` Memo string `json:"memo,omitempty"` TransactionHash string `json:"transaction_hash,omitempty"` }
type System ¶
type System struct { Admins []string ConversationID string ClientID string Members []*Member Threshold uint8 SignKey *blst.PrivateKey Version string GasAsset string GasAmount decimal.Decimal }
System stores system information.
func (*System) MergeProposals ¶
func (s *System) MergeProposals(p0, p1 *PriceProposal) *PriceProposal
func (*System) SignProposal ¶
func (s *System) SignProposal(p *PriceProposal) *PriceProposal
func (*System) VerifyData ¶
func (*System) VerifyProposal ¶
func (s *System) VerifyProposal(p *PriceProposal) bool
type Ticker ¶
type Ticker struct { AssetID string `json:"asset_id"` Source string `json:"source,omitempty"` Timestamp int64 `json:"timestamp,omitempty"` Price decimal.Decimal `json:"price,omitempty"` VolumeUSD decimal.Decimal `json:"volume_usd,omitempty"` }
func (*Ticker) ExportProposal ¶ added in v0.0.2
func (t *Ticker) ExportProposal() *PriceProposal
type Transfer ¶
type Transfer struct { ID int64 `sql:"PRIMARY_KEY" json:"id,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` TraceID string `sql:"type:char(36)" json:"trace_id,omitempty"` AssetID string `sql:"type:char(36)" json:"asset_id,omitempty"` Amount decimal.Decimal `sql:"type:decimal(64,8)" json:"amount,omitempty"` Memo string `sql:"size:200" json:"memo,omitempty"` Threshold uint8 `json:"threshold,omitempty"` Opponents pq.StringArray `sql:"type:varchar(1024)" json:"opponents,omitempty"` }
type WalletService ¶ added in v0.0.2
Click to show internal directories.
Click to hide internal directories.