Documentation ¶
Index ¶
- Constants
- type LibraClient
- func (g *LibraClient) GetAccountBlob(address string) (*gowrapper.GetAccountStateResponse, error)
- func (l *LibraClient) GetAccountState(address string) (*types.AccountState, error)
- func (l *LibraClient) GetAccountTransaction(address string, sequenceNumber uint64, fetchEvents bool) (*types.SignedTransactionWithProof, error)
- func (g *LibraClient) GetLatestWithProof(requestItems []*gowrapper.RequestItem) (*gowrapper.UpdateToLatestLedgerResponse, error)
- func (l *LibraClient) GetSequenceNumber(address types.AccountAddress) (uint64, error)
- func (l *LibraClient) GetTransactions(startVersion, limit uint64, fetchEvents bool) ([]*types.SignedTransactionWithProof, error)
- func (l *LibraClient) MintWithFaucetService(address string, num_coins uint64, is_blocking bool) error
- func (l *LibraClient) TransferCoins(sender *librawallet.Account, receipientAddress string, amount uint64, ...) error
- type LibraClientConfig
- type LibraNetwork
Constants ¶
View Source
const ( DefaultFaucetServerHost string = "faucet.testnet.libra.org" DefaultTestnetServerHost string = "ac.testnet.libra.org" )
View Source
const GAS_UNIT_PRICE uint64 = 0
View Source
const HEX_PEER_TO_PEER_TRANSFER_CODE = "" /* 366-byte string literal not displayed */
Const of transaction program
View Source
const MAX_GAS_AMOUNT uint64 = 10000
View Source
const TX_EXPIRATION int64 = 100
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LibraClient ¶
type LibraClient struct {
// contains filtered or unexported fields
}
func NewLibraClient ¶
func NewLibraClient(config LibraClientConfig) *LibraClient
func (*LibraClient) GetAccountBlob ¶
func (g *LibraClient) GetAccountBlob(address string) (*gowrapper.GetAccountStateResponse, error)
func (*LibraClient) GetAccountState ¶
func (l *LibraClient) GetAccountState(address string) (*types.AccountState, error)
func (*LibraClient) GetAccountTransaction ¶
func (l *LibraClient) GetAccountTransaction(address string, sequenceNumber uint64, fetchEvents bool) (*types.SignedTransactionWithProof, error)
Get Transaction by address and sequenceNumber.
func (*LibraClient) GetLatestWithProof ¶
func (g *LibraClient) GetLatestWithProof(requestItems []*gowrapper.RequestItem) (*gowrapper.UpdateToLatestLedgerResponse, error)
func (*LibraClient) GetSequenceNumber ¶
func (l *LibraClient) GetSequenceNumber(address types.AccountAddress) (uint64, error)
func (*LibraClient) GetTransactions ¶
func (l *LibraClient) GetTransactions(startVersion, limit uint64, fetchEvents bool) ([]*types.SignedTransactionWithProof, error)
Get Transactions from starting version to number of limit. startVersion is Transaction to start from limit is number of transactions to return
func (*LibraClient) MintWithFaucetService ¶
func (l *LibraClient) MintWithFaucetService(address string, num_coins uint64, is_blocking bool) error
Mint coins on testnet to reciever address num_coin should be in microlibra.
func (*LibraClient) TransferCoins ¶
func (l *LibraClient) TransferCoins(sender *librawallet.Account, receipientAddress string, amount uint64, gasUnitPrice uint64, maxGasAmount uint64, isBlocking bool) error
type LibraClientConfig ¶
type LibraClientConfig struct { Host string Port string Network LibraNetwork }
Click to show internal directories.
Click to hide internal directories.