5e8266d1de
Add storjscan wallets DB to the satellite. For now this DB is a one to one mapping of the users account to a storjscan wallet that can be used by the account holder to make payments on their Storj account. relates to https://github.com/storj/storj/issues/4347 Change-Id: I6e65b15817b90ceb75641244f9bf173c3b4228a7
25 lines
783 B
Go
25 lines
783 B
Go
// Copyright (C) 2022 Storj Labs, Inc.
|
|
// See LICENSE for copying information.
|
|
|
|
package storjscan
|
|
|
|
import (
|
|
"context"
|
|
|
|
"storj.io/common/uuid"
|
|
"storj.io/storj/private/blockchain"
|
|
)
|
|
|
|
// WalletsDB is an interface which defines functionality
|
|
// of DB which stores user storjscan wallets.
|
|
//
|
|
// architecture: Database
|
|
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)
|
|
}
|