Documentation ¶
Index ¶
- func AddRemoteHandler(db *gorm.DB, ctx context.Context, lotusClient jsonrpc.RPCClient, ...) (*model.Wallet, error)
- func AddWalletHandler(db *gorm.DB, datasetName string, wallet string) (*model.WalletAssignment, error)
- func ImportHandler(db *gorm.DB, ctx context.Context, lotusClient jsonrpc.RPCClient, ...) (*model.Wallet, error)
- func ListHandler(db *gorm.DB) ([]model.Wallet, error)
- func ListWalletHandler(db *gorm.DB, datasetName string) ([]model.Wallet, error)
- func RemoveHandler(db *gorm.DB, address string) error
- func RemoveWalletHandler(db *gorm.DB, datasetName string, wallet string) error
- type AddRemoteRequest
- type ImportRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddRemoteHandler ¶
func AddRemoteHandler( db *gorm.DB, ctx context.Context, lotusClient jsonrpc.RPCClient, request AddRemoteRequest, ) (*model.Wallet, error)
AddRemoteHandler godoc @Summary Add a remote wallet @Tags Wallet @Accept json @Produce json @Param request body AddRemoteRequest true "Request body" @Success 200 {object} model.Wallet @Failure 400 {object} handler.HTTPError @Failure 500 {object} handler.HTTPError @Router /wallet/remote [post]
func AddWalletHandler ¶
func AddWalletHandler( db *gorm.DB, datasetName string, wallet string, ) (*model.WalletAssignment, error)
AddWalletHandler godoc @Summary Associate a new wallet with a dataset @Tags Wallet Association @Produce json @Accept json @Param datasetName path string true "Dataset name" @Param wallet path string true "Wallet Address" @Success 200 {object} model.WalletAssignment @Failure 400 {object} handler.HTTPError @Failure 500 {object} handler.HTTPError @Router /dataset/{datasetName}/wallet/{wallet} [post]
func ImportHandler ¶
func ImportHandler( db *gorm.DB, ctx context.Context, lotusClient jsonrpc.RPCClient, request ImportRequest, ) (*model.Wallet, error)
ImportHandler godoc @Summary Import a private key @Tags Wallet @Accept json @Produce json @Param request body ImportRequest true "Request body" @Success 200 {object} model.Wallet @Failure 400 {object} handler.HTTPError @Failure 500 {object} handler.HTTPError @Router /wallet [post]
func ListHandler ¶
ListHandler godoc @Summary List all imported wallets @Tags Wallet @Produce json @Success 200 {array} model.Wallet @Failure 400 {object} handler.HTTPError @Failure 500 {object} handler.HTTPError @Router /wallet [get]
func ListWalletHandler ¶
ListWalletHandler godoc @Summary List all wallets of a dataset. @Tags Wallet @Produce json @Param datasetName path string true "Dataset name" @Success 200 {array} model.Wallet @Failure 400 {object} handler.HTTPError @Failure 500 {object} handler.HTTPError @Router /dataset/{datasetName}/wallet [get]
func RemoveHandler ¶
RemoveHandler godoc @Summary Remove a wallet @Tags Wallet @Param address path string true "Address" @Success 204 @Failure 400 {object} handler.HTTPError @Failure 500 {object} handler.HTTPError @Router /wallet/{address} [delete]
func RemoveWalletHandler ¶
RemoveWalletHandler godoc @Summary Remove an associated wallet from a dataset @Tags Wallet @Param datasetName path string true "Dataset name" @Param wallet path string true "Wallet Address" @Success 204 @Failure 400 {object} handler.HTTPError @Failure 500 {object} handler.HTTPError @Router /dataset/{datasetName}/wallet/{wallet} [delete]
Types ¶
type AddRemoteRequest ¶
type ImportRequest ¶
type ImportRequest struct {
PrivateKey string `json:"privateKey"` // This is the exported private key from lotus wallet export
}