aptos

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockTx

type BlockTx struct {
	ErrMsg
	Transactions []RpcTx `json:"transactions"`
}

types

type CoinInfoData

type CoinInfoData struct {
	Decimals int    `json:"decimals"`
	Name     string `json:"name"`
	Symbol   string `json:"symbol"`
}

types

type ErrMsg

type ErrMsg struct {
	Message     string `json:"message"`
	ErrorCode   string `json:"error_code"`
	VmErrorCode int    `json:"vm_error_code"`
}

types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(rpcUrl string) (*Handler, error)

func (*Handler) CallContract

func (h *Handler) CallContract(ctx context.Context, contractAddress, params, blockNumber string) ([]byte, error)

func (*Handler) CheckTx

func (h *Handler) CheckTx(ctx context.Context, hash string) (*chainrpc.TxResult, error)

func (*Handler) GetBalance

func (h *Handler) GetBalance(ctx context.Context, address, contractAddress, blockNumber string) (string, error)

func (*Handler) GetHeight

func (h *Handler) GetHeight(ctx context.Context) (string, error)

func (*Handler) InquireChain

func (h *Handler) InquireChain(ctx context.Context, instruction, params string) (string, error)

func (*Handler) SendTx

func (h *Handler) SendTx(ctx context.Context, signedHex string) (string, error)

type RpcTx

type RpcTx struct {
	ErrMsg
	Version                 string `json:"version"`
	Hash                    string `json:"hash"`
	StateChangeHash         string `json:"state_change_hash"`
	EventRootHash           string `json:"event_root_hash"`
	GasUsed                 string `json:"gas_used"`
	Success                 bool   `json:"success"`
	VmStatus                string `json:"vm_status"`
	AccumulatorRootHash     string `json:"accumulator_root_hash"`
	Sender                  string `json:"sender"`
	SequenceNumber          string `json:"sequence_number"`
	MaxGasAmount            string `json:"max_gas_amount"`
	GasUnitPrice            string `json:"gas_unit_price"`
	ExpirationTimestampSecs string `json:"expiration_timestamp_secs"`
	Payload                 struct {
		Function      string        `json:"function"`
		TypeArguments []interface{} `json:"type_arguments"`
		Arguments     []interface{} `json:"arguments"`
		//TypeArguments []string `json:"type_arguments"`
		//Arguments     []string `json:"arguments"`
		Type string `json:"type"`
	} `json:"payload"`
	Signature struct {
		PublicKey interface{} `json:"public_key"`
		Signature interface{} `json:"signature"`
		Type      string      `json:"type"`
	} `json:"signature"`
	Timestamp string `json:"timestamp"`
	Type      string `json:"type"`
}

types

Jump to

Keyboard shortcuts

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