Documentation ¶
Index ¶
- Variables
- func AddWallet(uid int) (*ljsonrpc.Wallet, error)
- func CreateWallet(uid int) (*ljsonrpc.Wallet, models.LbrynetServer, error)
- func InitializeWallet(uid int) (models.LbrynetServer, string, error)
- func NewWalletError(uid int, err error) error
- func Resolve(url string) (*ljsonrpc.Claim, error)
- func WalletRemove(uid int) (*ljsonrpc.Wallet, error)
- type AccountConflict
- type AccountNotFound
- type WalletAlreadyLoaded
- type WalletError
- type WalletExists
- type WalletNeedsLoading
- type WalletNotFound
- type WalletNotLoaded
Constants ¶
This section is empty.
Variables ¶
View Source
var ExampleStreamCreateRequest = `` /* 482-byte string literal not displayed */
View Source
var ExampleStreamCreateResponse = `` /* 4723-byte string literal not displayed */
View Source
var Logger = monitor.NewModuleLogger("lbrynet")
Functions ¶
func AddWallet ¶ added in v0.9.0
AddWallet loads an existing wallet in the LbrynetServer. May return errors:
WalletAlreadyLoaded - wallet is already loaded and operational WalletNotFound - wallet file does not exist and won't be loaded.
func CreateWallet ¶ added in v0.9.0
CreateWallet creates a new wallet with the LbrynetServer. Returned error doesn't necessarily mean that the wallet is not operational:
if errors.Is(err, lbrynet.WalletExists) { // Okay to proceed with the account } if errors.Is(err, lbrynet.WalletNeedsLoading) { // AddWallet() needs to be called before the wallet can be used }
func InitializeWallet ¶ added in v0.9.0
func InitializeWallet(uid int) (models.LbrynetServer, string, error)
InitializeWallet creates a wallet 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), AddWallet should be called instead.
func NewWalletError ¶ added in v0.9.0
NewWalletError converts plain SDK error to the typed one
Types ¶
type AccountConflict ¶
func (AccountConflict) Error ¶
func (e AccountConflict) Error() string
type AccountNotFound ¶
func (AccountNotFound) Error ¶
func (e AccountNotFound) Error() string
type WalletAlreadyLoaded ¶ added in v0.9.0
type WalletAlreadyLoaded struct {
WalletError
}
func (WalletAlreadyLoaded) Error ¶ added in v0.9.0
func (e WalletAlreadyLoaded) Error() string
type WalletError ¶ added in v0.9.0
func (WalletError) Error ¶ added in v0.9.0
func (e WalletError) Error() string
func (WalletError) Unwrap ¶ added in v0.9.0
func (e WalletError) Unwrap() error
type WalletExists ¶ added in v0.9.0
type WalletExists struct {
WalletError
}
func (WalletExists) Error ¶ added in v0.9.0
func (e WalletExists) Error() string
type WalletNeedsLoading ¶ added in v0.9.0
type WalletNeedsLoading struct {
WalletError
}
func (WalletNeedsLoading) Error ¶ added in v0.9.0
func (e WalletNeedsLoading) Error() string
type WalletNotFound ¶ added in v0.9.0
type WalletNotFound struct {
WalletError
}
type WalletNotLoaded ¶ added in v0.9.0
type WalletNotLoaded struct {
WalletError
}
func (WalletNotLoaded) Error ¶ added in v0.9.0
func (e WalletNotLoaded) Error() string
Click to show internal directories.
Click to hide internal directories.