client

package
v0.1.24 Latest Latest
Warning

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

Go to latest
Published: May 25, 2021 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultGRPCServer = "localhost:9092"
View Source
const DefaultSecureConnection = false

Variables

This section is empty.

Functions

This section is empty.

Types

type WalletBackend added in v0.1.19

type WalletBackend struct {
	// contains filtered or unexported fields
}

WalletBackend wallet holder

func OpenConnection added in v0.1.19

func OpenConnection(grpcServer string, secureConnection bool, wd string) (wbx *WalletBackend, err error)

OpenConnection opens a connection but not the wallet

func OpenWalletBackend added in v0.1.19

func OpenWalletBackend(wallet string, grpcServer string, secureConnection bool) (wbx *WalletBackend, err error)

OpenWalletBackend opens an existing wallet

func (WalletBackend) AccountRewards added in v0.1.19

func (c WalletBackend) AccountRewards(address gosmtypes.Address, offset uint32, maxResults uint32) ([]*apitypes.Reward, uint32, error)

AccountRewards returns rewards for an account

func (WalletBackend) AccountRewardsStream added in v0.1.23

func (c WalletBackend) AccountRewardsStream(address gosmtypes.Address) (apitypes.GlobalStateService_AccountDataStreamClient, error)

AccountRewardsStream returns a stream of account rewards

func (WalletBackend) AccountState added in v0.1.19

func (c WalletBackend) AccountState(address gosmtypes.Address) (*apitypes.Account, error)

AccountInfo returns basic account data such as balance and nonce from the global state

func (WalletBackend) AccountTransactionsReceipts added in v0.1.19

func (c WalletBackend) AccountTransactionsReceipts(address gosmtypes.Address, offset uint32, maxResults uint32) ([]*apitypes.TransactionReceipt, uint32, error)

AccountTransactionsReceipts returns transaction receipts for an account

func (WalletBackend) AccountUpdatesStream added in v0.1.23

func (c WalletBackend) AccountUpdatesStream(address gosmtypes.Address) (apitypes.GlobalStateService_AccountDataStreamClient, error)

AccountRewardsStream returns a stream of account changes

func (WalletBackend) Close added in v0.1.19

func (c WalletBackend) Close() error

func (*WalletBackend) CloseWallet added in v0.1.19

func (w *WalletBackend) CloseWallet()

func (WalletBackend) Connect added in v0.1.19

func (c WalletBackend) Connect() error

func (*WalletBackend) CreateAccount added in v0.1.19

func (w *WalletBackend) CreateAccount(displayName string) (la *common.LocalAccount, err error)

func (WalletBackend) CreatePostData added in v0.1.19

func (c WalletBackend) CreatePostData(data *apitypes.PostData) (*status.Status, error)

CreatePostData starts or continues pos data creation operation

func (*WalletBackend) CurrentAccount added in v0.1.19

func (w *WalletBackend) CurrentAccount() (*common.LocalAccount, error)

CurrentAccount - get the latest account into cli-wallet format

func (WalletBackend) DebugAllAccounts added in v0.1.19

func (c WalletBackend) DebugAllAccounts() ([]*apitypes.Account, error)

func (WalletBackend) Echo added in v0.1.19

func (c WalletBackend) Echo() error

Echo is a basic api sanity test. It verifies that the client can connect to the node service and get a response from it to an echo request. todo: change this to api health-check service as node service might not be available

func (*WalletBackend) GetAccount added in v0.1.19

func (w *WalletBackend) GetAccount(accountName string) (*common.LocalAccount, error)

func (WalletBackend) GetMeshActivations added in v0.1.19

func (c WalletBackend) GetMeshActivations(address gosmtypes.Address, offset uint32, maxResults uint32) ([]*apitypes.Activation, uint32, error)

GetMeshActivations returns activations where the address is the coinbase

func (WalletBackend) GetMeshInfo added in v0.1.19

func (c WalletBackend) GetMeshInfo() (*common.NetInfo, error)

func (WalletBackend) GetMeshTransactions added in v0.1.19

func (c WalletBackend) GetMeshTransactions(address gosmtypes.Address, offset uint32, maxResults uint32) ([]*apitypes.Transaction, uint32, error)

GetMeshTransactions returns the transactions on the mesh to or from an address.

func (WalletBackend) GetPostComputeProviders added in v0.1.19

func (c WalletBackend) GetPostComputeProviders() ([]*apitypes.PostComputeProvider, error)

GetPostComputeProviders returns the proof of space generators available on the system

func (WalletBackend) GetPostStatus added in v0.1.19

func (c WalletBackend) GetPostStatus() (*apitypes.PostStatus, error)

GetPostStatus returns the current node proof of space status

func (WalletBackend) GetRewardsAddress added in v0.1.22

func (c WalletBackend) GetRewardsAddress() (*gosmtypes.Address, error)

GetRewardsAddress get the smesher's current rewards address

func (WalletBackend) GetSmesherId added in v0.1.19

func (c WalletBackend) GetSmesherId() ([]byte, error)

GetSmesherId returns the current smesher id configured in the node

func (WalletBackend) GlobalStateHash added in v0.1.19

func (c WalletBackend) GlobalStateHash() (*apitypes.GlobalStateHash, error)

GlobalStateHash returns the current global state hash

func (*WalletBackend) IsOpen added in v0.1.19

func (w *WalletBackend) IsOpen() bool

func (WalletBackend) IsSmeshing added in v0.1.19

func (c WalletBackend) IsSmeshing() (bool, error)

IsSmeshing returns true iff the node is currently setup to smesh

func (*WalletBackend) ListAccounts added in v0.1.19

func (w *WalletBackend) ListAccounts() (res []string, err error)

func (*WalletBackend) NewWallet added in v0.1.19

func (w *WalletBackend) NewWallet() bool

func (WalletBackend) NodeInfo added in v0.1.19

func (c WalletBackend) NodeInfo() (*common.NodeInfo, error)

NodeInfo returns static node info such as build, version and api server url

func (WalletBackend) NodeStatus added in v0.1.19

func (c WalletBackend) NodeStatus() (*apitypes.NodeStatus, error)

NodeStatus returns dynamic node status such as sync status and number of connected peers

func (*WalletBackend) OpenWallet added in v0.1.19

func (w *WalletBackend) OpenWallet() bool

OpenWallet opens a wallet from file

func (WalletBackend) ServerInfo added in v0.1.19

func (c WalletBackend) ServerInfo() string

ServerInfo

func (*WalletBackend) SetCurrentAccount added in v0.1.19

func (w *WalletBackend) SetCurrentAccount(accountNumber int) error

func (WalletBackend) SetRewardsAddress added in v0.1.22

func (c WalletBackend) SetRewardsAddress(address gosmtypes.Address) (*status.Status, error)

SetRewardsAddress sets the smesher's rewards address

func (WalletBackend) SmesherRewards added in v0.1.19

func (c WalletBackend) SmesherRewards(smesherId []byte, offset uint32, maxResults uint32) ([]*apitypes.Reward, uint32, error)

SmesherRewards returns rewards for a smesher identified by a smesher id

func (WalletBackend) StartSmeshing added in v0.1.19

func (c WalletBackend) StartSmeshing(address gosmtypes.Address, dataDir string, dataSizeBytes uint64) (*status.Status, error)

StartSmeshing instructs the node to start smeshing using user's provider params

func (WalletBackend) StopSmeshing added in v0.1.19

func (c WalletBackend) StopSmeshing(deleteFiles bool) (*status.Status, error)

StopSmeshing instructs the node to stop smeshing and optionally delete smeshing data file(s)

func (*WalletBackend) StoreAccounts added in v0.1.19

func (w *WalletBackend) StoreAccounts() error

func (WalletBackend) SubmitCoinTransaction added in v0.1.19

func (c WalletBackend) SubmitCoinTransaction(tx []byte) (*apitypes.TransactionState, error)

SubmitCoinTransaction submits a signed binary transaction to the node.

func (WalletBackend) TransactionState added in v0.1.19

func (c WalletBackend) TransactionState(txId []byte, includeTx bool) (*apitypes.TransactionState, *apitypes.Transaction, error)

TransactionState returns the state and optionally the transaction for a single transaction based on tx id

func (*WalletBackend) Transfer added in v0.1.19

func (w *WalletBackend) Transfer(recipient gosmtypes.Address, nonce, amount, gasPrice, gasLimit uint64, key ed25519.PrivateKey) (*pb.TransactionState, error)

Transfer creates a sign coin transaction and submits it

func (*WalletBackend) WalletInfo added in v0.1.19

func (w *WalletBackend) WalletInfo()

Jump to

Keyboard shortcuts

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