A client to interact with gxchain implemented in GO
import "github.com/gxchain/gxclient-go"
//init client
func NewClient(actPriKeyWif, memoPriKeyWif, accountName, url string) (*Client, error)
//Generates the key pair
func GenerateKeyPair(brainKey string) (*KeyPair, error)
//Export public key from private key
func PrivateToPublic(priWif string) (string, error)
//Check if privateKey is valid or not
func IsValidPrivate(priWif string) bool
//Check if publicKey is valid or not
func IsValidPublic(priWif string) bool
//broadcast transaction
func (client *Client) broadcast(stx *types.SignedTransaction) error
//broadcast transaction
func (client *Client) broadcastSync(stx *types.SignedTransaction) (*types.BroadcastResponse, error)
// GET ChainId of entry point
func (api *API) GetChainId() (string, error)
// Gets dynamic global properties of current blockchain
func (api *API) GetDynamicGlobalProperties() (*DynamicGlobalProperties, error)
// Get block by block height
func (api *API) GetBlock(blockNum uint32) (*Block, error)
//get block objects
func (api *API) GetObjects(objectIds ...string) ([]json.RawMessage, error)
//get block object
func (api *API) GetObject(objectId string) (json.RawMessage, error)
//send transfer request to entryPoint node
func (client *Client) Transfer(to, memo, amountAsset, feeSymbol string, broadcast bool) (*types.TransactionResult, error)
//register account
func Register(faucet, account, activeKey, ownerKey, memoKey string) (*types.Transaction, error)
// get account info by account name
func (api *API) GetAccount(account string) (*types.Account, error)
// get accounts info by account names
func (api *API) GetAccounts(accounts ...string) ([]*types.Account, error)
//get account balances by account name
func (api *API) GetAccountBalances(accountID string, assets ...string) ([]*types.AssetAmount, error)
//get account_ids by public key
func (api *API) GetAccountsByPublicKey(publicKeys string) ([]string, error)
// get assets corresponding to the provided symbols or IDs
func (api *API) GetAssets(symbols ...string) ([]*Asset, error)
// get assets corresponding to the provided symbol or ID
func (api *API) GetAsset(symbol string) (*Asset, error)
//Get staking programs
func (api *API) GetStakingPrograms() ([]*types.StakingProgram, error)
//create staking
func (client *Client) CreateStaking(to string, amount float64, programId, feeSymbol string, broadcast bool) (*types.TransactionResult, error)
//update staking by stakingId
func (client *Client) UpdateStaking(to, stakingId, feeSymbol string, broadcast bool) (*types.TransactionResult, error)
//claim staking by stakingId
func (client *Client) ClaimStaking(stakingId, feeSymbol string, broadcast bool) (*types.TransactionResult, error)