wallet

package
v0.13.5 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const TokenHeader = "X-Lbry-Auth-Token"

TokenHeader is the name of HTTP header which is supplied by client and should contain internal-api auth_token.

Variables

This section is empty.

Functions

func Create

func Create(serverAddress string, userID int) error

Create creates a wallet on an sdk that can be immediately used in subsequent commands. It can recover from errors like existing wallets, but if a wallet is known to exist (eg. a wallet ID stored in the database already), loadWallet() should be called instead.

func DisableLogger

func DisableLogger()

func GetUserWithSDKServer added in v0.13.5

func GetUserWithSDKServer(rt *sdkrouter.Router, internalAPIHost, token, metaRemoteIP string) (*models.User, error)

GetUserWithWallet gets user by internal-apis auth token. If the user does not have a wallet yet, they are assigned an SDK and a wallet is created for them on that SDK.

func UnloadWallet

func UnloadWallet(addr string, userID int) error

UnloadWallet unloads an existing wallet from the LbrynetServer. May return errors:

WalletAlreadyLoaded - wallet is already loaded and operational
WalletNotFound - wallet file does not exist and won't be loaded.

Types

This section is empty.

Jump to

Keyboard shortcuts

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