Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ClientErr is general purpose storjscan client error class. ClientErr = errs.Class("storjscan client") ClientErrUnauthorized = errs.Class("storjscan client unauthorized") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is storjscan HTTP API client.
type DB ¶
type DB interface { // Wallets is getter for wallets db. Wallets() WalletsDB }
DB is storjscan DB interface.
architecture: Database
type Header ¶
type Header struct { Hash blockchain.Hash Number int64 Timestamp time.Time }
Header holds ethereum blockchain block header data.
type LatestPayments ¶
LatestPayments contains latest payments and latest chain block header.
type Payment ¶
type Payment struct { From blockchain.Address To blockchain.Address TokenValue *big.Int BlockHash blockchain.Hash BlockNumber int64 Transaction blockchain.Hash LogIndex int Timestamp time.Time }
Payment holds storjscan payment data.
type WalletsDB ¶
type WalletsDB interface { // Add adds a new storjscan wallet to the DB and associates it with a user. Add(ctx context.Context, userID uuid.UUID, walletAddress blockchain.Address) error // Get returns the wallet address associated with the given user. Get(ctx context.Context, userID uuid.UUID) (blockchain.Address, error) // GetAllUsers returns all user IDs that have associated storjscan wallets. GetAllUsers(ctx context.Context) (_ []uuid.UUID, err error) }
WalletsDB is an interface which defines functionality of DB which stores user storjscan wallets.
architecture: Database
Click to show internal directories.
Click to hide internal directories.