goclient

package
v0.0.0-...-194be82 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2019 License: MIT Imports: 17 Imported by: 0

Documentation

Index

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
}

type LibraNetwork

type LibraNetwork int
const (
	TestNet LibraNetwork = iota
	MainNet
)

Jump to

Keyboard shortcuts

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