state

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	Path   string
	Scheme byte
	// contains filtered or unexported fields
}

func (*Storage) AssetInfo

func (s *Storage) AssetInfo(asset crypto.Digest) (*data.AssetInfo, error)

func (*Storage) BlockID

func (s *Storage) BlockID(height int) (crypto.Signature, error)

func (*Storage) CandlesRange

func (s *Storage) CandlesRange(amountAsset, priceAsset crypto.Digest, from, to uint32, timeFrameScale int) ([]data.Candle, error)

func (*Storage) Close

func (s *Storage) Close() error

func (*Storage) DayCandle

func (s *Storage) DayCandle(amountAsset, priceAsset crypto.Digest) (data.Candle, error)

func (*Storage) HasBlock

func (s *Storage) HasBlock(height int, block crypto.Signature) (bool, error)

func (*Storage) Height

func (s *Storage) Height() (int, error)

func (*Storage) IssuerBalance

func (s *Storage) IssuerBalance(issuer proto.Address, asset crypto.Digest) (uint64, error)

func (*Storage) Markets

func (s *Storage) Markets() (map[data.MarketID]data.Market, error)

func (*Storage) Open

func (s *Storage) Open() error

func (*Storage) PutBalances

func (s *Storage) PutBalances(height int, block crypto.Signature, issues []data.IssueChange, assets []data.AssetChange, accounts []data.AccountChange, aliases []data.AliasBind) error

func (*Storage) PutTrades

func (s *Storage) PutTrades(height int, block crypto.Signature, trades []data.Trade) error

func (*Storage) Rollback

func (s *Storage) Rollback(removeHeight int) error

func (*Storage) SafeRollbackHeight

func (s *Storage) SafeRollbackHeight(height int) (int, error)

func (*Storage) Trades

func (s *Storage) Trades(amountAsset, priceAsset crypto.Digest, limit int) ([]data.Trade, error)

func (*Storage) TradesByAddress

func (s *Storage) TradesByAddress(amountAsset, priceAsset crypto.Digest, address proto.Address, limit int) ([]data.Trade, error)

func (*Storage) TradesRange

func (s *Storage) TradesRange(amountAsset, priceAsset crypto.Digest, from, to uint64) ([]data.Trade, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL