Documentation ¶
Index ¶
- Constants
- type WalletBackend
- func (c WalletBackend) AccountRewards(address gosmtypes.Address, offset uint32, maxResults uint32) ([]*apitypes.Reward, uint32, error)
- func (c WalletBackend) AccountRewardsStream(address gosmtypes.Address) (apitypes.GlobalStateService_AccountDataStreamClient, error)
- func (c WalletBackend) AccountState(address gosmtypes.Address) (*apitypes.Account, error)
- func (c WalletBackend) AccountTransactionsReceipts(address gosmtypes.Address, offset uint32, maxResults uint32) ([]*apitypes.TransactionReceipt, uint32, error)
- func (c WalletBackend) AccountUpdatesStream(address gosmtypes.Address) (apitypes.GlobalStateService_AccountDataStreamClient, error)
- func (c WalletBackend) Close() error
- func (w *WalletBackend) CloseWallet()
- func (c WalletBackend) Connect() error
- func (w *WalletBackend) CreateAccount(displayName string) (la *common.LocalAccount, err error)
- func (c WalletBackend) CreatePostData(data *apitypes.PostData) (*status.Status, error)
- func (w *WalletBackend) CurrentAccount() (*common.LocalAccount, error)
- func (c WalletBackend) DebugAllAccounts() ([]*apitypes.Account, error)
- func (c WalletBackend) Echo() error
- func (w *WalletBackend) GetAccount(accountName string) (*common.LocalAccount, error)
- func (c WalletBackend) GetMeshActivations(address gosmtypes.Address, offset uint32, maxResults uint32) ([]*apitypes.Activation, uint32, error)
- func (c WalletBackend) GetMeshInfo() (*common.NetInfo, error)
- func (c WalletBackend) GetMeshTransactions(address gosmtypes.Address, offset uint32, maxResults uint32) ([]*apitypes.Transaction, uint32, error)
- func (c WalletBackend) GetPostComputeProviders() ([]*apitypes.PostComputeProvider, error)
- func (c WalletBackend) GetPostStatus() (*apitypes.PostStatus, error)
- func (c WalletBackend) GetRewardsAddress() (*gosmtypes.Address, error)
- func (c WalletBackend) GetSmesherId() ([]byte, error)
- func (c WalletBackend) GlobalStateHash() (*apitypes.GlobalStateHash, error)
- func (w *WalletBackend) IsOpen() bool
- func (c WalletBackend) IsSmeshing() (bool, error)
- func (w *WalletBackend) ListAccounts() (res []string, err error)
- func (w *WalletBackend) NewWallet() bool
- func (c WalletBackend) NodeInfo() (*common.NodeInfo, error)
- func (c WalletBackend) NodeStatus() (*apitypes.NodeStatus, error)
- func (w *WalletBackend) OpenWallet() bool
- func (c WalletBackend) ServerInfo() string
- func (w *WalletBackend) SetCurrentAccount(accountNumber int) error
- func (c WalletBackend) SetRewardsAddress(address gosmtypes.Address) (*status.Status, error)
- func (c WalletBackend) SmesherRewards(smesherId []byte, offset uint32, maxResults uint32) ([]*apitypes.Reward, uint32, error)
- func (c WalletBackend) StartSmeshing(address gosmtypes.Address, dataDir string, dataSizeBytes uint64) (*status.Status, error)
- func (c WalletBackend) StopSmeshing(deleteFiles bool) (*status.Status, error)
- func (w *WalletBackend) StoreAccounts() error
- func (c WalletBackend) SubmitCoinTransaction(tx []byte) (*apitypes.TransactionState, error)
- func (c WalletBackend) TransactionState(txId []byte, includeTx bool) (*apitypes.TransactionState, *apitypes.Transaction, error)
- func (w *WalletBackend) Transfer(recipient gosmtypes.Address, nonce, amount, gasPrice, gasLimit uint64, ...) (*pb.TransactionState, error)
- func (w *WalletBackend) WalletInfo()
Constants ¶
const DefaultGRPCServer = "localhost:9092"
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
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) CloseWallet ¶ added in v0.1.19
func (w *WalletBackend) CloseWallet()
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
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 (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 (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
GetRewardsAddress get the smesher's current rewards address
func (WalletBackend) GetSmesherId ¶ added in v0.1.19
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
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
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
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
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()