Documentation ¶
Index ¶
- Constants
- Variables
- type Account
- func (acc *Account) Address() types.Address
- func (acc *Account) Balance(cli *Client) (balance uint64, err error)
- func (acc *Account) CreateAptosAccount(cli *Client) (account *framework.AptosAccount, err error)
- func (acc *Account) PrivateKey() string
- func (acc *Account) SendTransaction(cli *Client, tx *types.Transaction) (hash string, err error)
- func (acc *Account) Sequence() uint64
- func (acc *Account) Sign(msg []byte) ([]byte, error)
- func (acc *Account) SignTx(cli *Client, tx *types.Transaction) (err error)
- func (acc *Account) SignTxWithBCSPayload(tx *types.Transaction, payload types.RawTransactionPayload) (err error)
- func (acc *Account) SimulateTransaction(cli *Client, tx *types.Transaction) (err error)
- func (acc *Account) SyncSequence(cli *Client) error
- func (acc *Account) Transfer(cli *Client, to types.Address, amount uint64) (hash string, err error)
- type Client
- func (cli *Client) EstimateGasPrice(ctx context.Context) (info *v1.EstimateGasPrice, err error)
- func (cli *Client) GetAccount(ctx context.Context, address string, ledger uint64) (info *v1.AccountInfo, err error)
- func (cli *Client) GetAccountModule(ctx context.Context, address string, ledger uint64) (infos []*v1.AccountModuleInfo, err error)
- func (cli *Client) GetAccountModuleWithName(ctx context.Context, address string, name string, ledger uint64) (info *v1.AccountModuleInfo, err error)
- func (cli *Client) GetAccountResource(ctx context.Context, address string, ledger uint64) (infos []*v1.AccountResourceInfo, err error)
- func (cli *Client) GetAccountResourceWithType(ctx context.Context, address string, resType string, ledger uint64) (info *v1.AccountResourceInfo, err error)
- func (cli *Client) GetBlockByHeight(ctx context.Context, height uint64, withTransactions bool) (info *v1.BlockInfo, err error)
- func (cli *Client) GetBlockByVersion(ctx context.Context, version uint64, withTransactions bool) (info *v1.BlockInfo, err error)
- func (cli *Client) GetEventByCreationNumber(ctx context.Context, address string, number string, limit uint16, start uint64) (infos []*v1.EventInfo, err error)
- func (cli *Client) GetEventByHandler(ctx context.Context, address string, handler string, field string, ...) (infos []*v1.EventInfo, err error)
- func (cli *Client) GetTransactionByHash(ctx context.Context, hash string) (info *v1.TransactionInfo, err error)
- func (cli *Client) GetTransactionByVersion(ctx context.Context, version uint64) (info *v1.TransactionInfo, err error)
- func (cli *Client) GetTransactionEncoding(ctx context.Context, tx *types.Transaction) (code string, err error)
- func (cli *Client) GetTransactions(ctx context.Context, start uint64, limit uint16) (infos []*v1.TransactionInfo, err error)
- func (cli *Client) GetTransactionsOfAccount(ctx context.Context, address string, start uint64, limit uint16) (infos []*v1.TransactionInfo, err error)
- func (cli *Client) Healthy(ctx context.Context, duration uint32) error
- func (cli *Client) LedgerInfo(ctx context.Context) (info *v1.LedgerInfo, err error)
- func (cli *Client) SimulateTransaction(ctx context.Context, tx *types.Transaction) (result []*v1.TransactionInfo, err error)
- func (cli *Client) SubmitTransaction(ctx context.Context, tx *types.Transaction) (result *v1.TransactionInfo, err error)
- type HTTPError
Constants ¶
View Source
const ( Devnet string = "https://fullnode.devnet.aptoslabs.com" Mainnet string = "https://fullnode.mainnet.aptoslabs.com" )
Variables ¶
View Source
var ( Endpoint string MaxGasAmount = 10000 GasUnitPrice = 100 )
View Source
var (
ErrNilClient = errors.New("client is nil")
)
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct {
// contains filtered or unexported fields
}
func NewAccount ¶
func NewAccount() *Account
func NewAccountWithHexSeed ¶
func (*Account) CreateAptosAccount ¶
func (acc *Account) CreateAptosAccount(cli *Client) (account *framework.AptosAccount, err error)
func (*Account) PrivateKey ¶
func (*Account) SendTransaction ¶
func (*Account) SignTxWithBCSPayload ¶
func (acc *Account) SignTxWithBCSPayload(tx *types.Transaction, payload types.RawTransactionPayload) (err error)
func (*Account) SimulateTransaction ¶
func (acc *Account) SimulateTransaction(cli *Client, tx *types.Transaction) (err error)
func (*Account) SyncSequence ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represent a RPC Client
func DialContext ¶
Dial connects a client to the given URL and given context
func (*Client) EstimateGasPrice ¶
func (*Client) GetAccount ¶
func (*Client) GetAccountModule ¶
func (*Client) GetAccountModuleWithName ¶
func (*Client) GetAccountResource ¶
func (*Client) GetAccountResourceWithType ¶
func (*Client) GetBlockByHeight ¶
func (*Client) GetBlockByVersion ¶
func (*Client) GetEventByCreationNumber ¶
func (*Client) GetEventByHandler ¶
func (*Client) GetTransactionByHash ¶
func (*Client) GetTransactionByVersion ¶
func (*Client) GetTransactionEncoding ¶
func (*Client) GetTransactions ¶
func (*Client) GetTransactionsOfAccount ¶
func (*Client) LedgerInfo ¶
func (*Client) SimulateTransaction ¶
func (cli *Client) SimulateTransaction(ctx context.Context, tx *types.Transaction) (result []*v1.TransactionInfo, err error)
func (*Client) SubmitTransaction ¶
func (cli *Client) SubmitTransaction(ctx context.Context, tx *types.Transaction) (result *v1.TransactionInfo, err error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.