Documentation ¶
Overview ¶
Package walletrpc implements calls to the walletserver
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultClientFactory = jsonclient.New
DefaultClientFactory is the default factory for new clients
View Source
var ( // ErrParams is returned if a call returned bad parameters ErrParams = errors.New("walletrpc: bad RPC parameters") )
View Source
var ServiceURL = constants.WalletServerURL
ServiceURL is the default URL for the wallet service
Functions ¶
This section is empty.
Types ¶
type WalletClient ¶
type WalletClient struct { ClientFactory func(string, []byte) (*jsonclient.URLClient, error) ServiceGuardCA []byte // The CA of the serviceguard, if any PubKey *[ed25519.PublicKeySize]byte // Public key of client PrivKey *[ed25519.PrivateKeySize]byte // Private key of PrivKey LastAuthCounter uint64 // Last authentication counter LastAuthToken []byte // Last authtoken used, required for call caching }
WalletClient implements a wallet service client
func New ¶
func New(pubKey *[ed25519.PublicKeySize]byte, PrivKey *[ed25519.PrivateKeySize]byte, cacert []byte) *WalletClient
New returns a new walletservice client
func (*WalletClient) GetBalance ¶
func (wc *WalletClient) GetBalance() (SubscriptionTokens, PrepayTokens, LastSubscribeLoad uint64, err error)
GetBalance inquires the wallet service for the client's balance. It tries to escape replay errors.
Click to show internal directories.
Click to hide internal directories.