Documentation ¶
Index ¶
- type Account
- type AccountModule
- type AccountResource
- type AptosAccount
- type AptosClient
- func (ac *AptosClient) Account(address string) (*Account, error)
- func (ac *AptosClient) AccountBalance(address string) (int64, error)
- func (ac *AptosClient) AccountModuleByID(address, moduleID, version string) (*AccountModule, error)
- func (ac *AptosClient) AccountModules(address, version string) ([]AccountModule, error)
- func (ac *AptosClient) AccountResourceByType(address, resourceType, version string) (*AccountResource, error)
- func (ac *AptosClient) AccountResources(address, version string) ([]AccountResource, error)
- func (ac *AptosClient) AccountTransactions(address string, limit, start int) ([]Transaction, error)
- func (ac *AptosClient) CreateSigningMessage(unsignedTx *UnsignedTx) (*SigningMessage, error)
- func (ac *AptosClient) FundFromFaucet(faucetURL, address string, amount int64) error
- func (ac *AptosClient) GenerateTransaction(account *AptosAccount, payload interface{}) (*UnsignedTx, error)
- func (ac *AptosClient) LedgerInfo() (*LedgerInfo, error)
- func (ac *AptosClient) SendCoins(account *AptosAccount, destAddr string, amount int64) (*Transaction, error)
- func (ac *AptosClient) SendCoinsSync(account *AptosAccount, destAddr string, amount int64) (*Transaction, error)
- func (ac *AptosClient) SignTransaction(account *AptosAccount, unsignedTx *UnsignedTx) (*SignedTx, error)
- func (ac *AptosClient) SubmitTransaction(signedTx *SignedTx) (*Transaction, error)
- func (ac *AptosClient) Transaction(hashOrVersion string) (*Transaction, error)
- func (ac *AptosClient) TransactionPending(txnHash string) (bool, error)
- func (ac *AptosClient) Transactions(limit, start int) ([]Transaction, error)
- func (ac *AptosClient) WaitForTransaction(txnHash string) error
- type LedgerInfo
- type MoveFunction
- type MoveModuleABI
- type MoveStruct
- type MoveStructField
- type ScriptFunctionPayload
- type SignedTx
- type SigningMessage
- type Transaction
- type TxEvents
- type TxSignature
- type UnsignedTx
- type WriteSetPayload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountModule ¶
type AccountModule struct { ByteCode string `json:"bytecode"` ABI *MoveModuleABI `json:"abi"` }
type AccountResource ¶
type AptosAccount ¶
type AptosAccount struct {
// contains filtered or unexported fields
}
func AccountFromPrivateKey ¶
func AccountFromPrivateKey(privateKey string) (*AptosAccount, error)
func AccountFromRandomKey ¶
func AccountFromRandomKey() (*AptosAccount, error)
func (*AptosAccount) Address ¶
func (aa *AptosAccount) Address() string
func (*AptosAccount) PublicKey ¶
func (aa *AptosAccount) PublicKey() string
func (*AptosAccount) SignMessage ¶
func (aa *AptosAccount) SignMessage(msg []byte) []byte
func (*AptosAccount) VerifyMessage ¶
func (aa *AptosAccount) VerifyMessage(sig, msg []byte) bool
type AptosClient ¶
type AptosClient struct {
// contains filtered or unexported fields
}
func NewAptosClient ¶
func NewAptosClient(nodeURL string) *AptosClient
func (*AptosClient) AccountBalance ¶
func (ac *AptosClient) AccountBalance(address string) (int64, error)
func (*AptosClient) AccountModuleByID ¶
func (ac *AptosClient) AccountModuleByID(address, moduleID, version string) (*AccountModule, error)
TODO: test function
func (*AptosClient) AccountModules ¶
func (ac *AptosClient) AccountModules(address, version string) ([]AccountModule, error)
TODO: test function
func (*AptosClient) AccountResourceByType ¶
func (ac *AptosClient) AccountResourceByType(address, resourceType, version string) (*AccountResource, error)
func (*AptosClient) AccountResources ¶
func (ac *AptosClient) AccountResources(address, version string) ([]AccountResource, error)
func (*AptosClient) AccountTransactions ¶
func (ac *AptosClient) AccountTransactions(address string, limit, start int) ([]Transaction, error)
func (*AptosClient) CreateSigningMessage ¶
func (ac *AptosClient) CreateSigningMessage(unsignedTx *UnsignedTx) (*SigningMessage, error)
func (*AptosClient) FundFromFaucet ¶
func (ac *AptosClient) FundFromFaucet(faucetURL, address string, amount int64) error
TODO: decimal places
func (*AptosClient) GenerateTransaction ¶
func (ac *AptosClient) GenerateTransaction(account *AptosAccount, payload interface{}) (*UnsignedTx, error)
func (*AptosClient) LedgerInfo ¶
func (ac *AptosClient) LedgerInfo() (*LedgerInfo, error)
func (*AptosClient) SendCoins ¶
func (ac *AptosClient) SendCoins(account *AptosAccount, destAddr string, amount int64) (*Transaction, error)
func (*AptosClient) SendCoinsSync ¶
func (ac *AptosClient) SendCoinsSync(account *AptosAccount, destAddr string, amount int64) (*Transaction, error)
func (*AptosClient) SignTransaction ¶
func (ac *AptosClient) SignTransaction(account *AptosAccount, unsignedTx *UnsignedTx) (*SignedTx, error)
func (*AptosClient) SubmitTransaction ¶
func (ac *AptosClient) SubmitTransaction(signedTx *SignedTx) (*Transaction, error)
func (*AptosClient) Transaction ¶
func (ac *AptosClient) Transaction(hashOrVersion string) (*Transaction, error)
func (*AptosClient) TransactionPending ¶
func (ac *AptosClient) TransactionPending(txnHash string) (bool, error)
func (*AptosClient) Transactions ¶
func (ac *AptosClient) Transactions(limit, start int) ([]Transaction, error)
func (*AptosClient) WaitForTransaction ¶
func (ac *AptosClient) WaitForTransaction(txnHash string) error
type LedgerInfo ¶
type MoveFunction ¶
type MoveModuleABI ¶
type MoveStruct ¶
type MoveStructField ¶
type ScriptFunctionPayload ¶
type SignedTx ¶
type SignedTx struct { *UnsignedTx Signature *TxSignature `json:"signature"` }
type SigningMessage ¶
type SigningMessage struct {
Message string `json:"message"`
}
type Transaction ¶
type Transaction struct { Type string `json:"type"` Events []TxEvents `json:"events"` Payload *WriteSetPayload `json:"payload"` Version uint64 `json:"version,string"` SequenceNumber uint64 `json:"sequence_number,string"` MaxGasAmount uint64 `json:"max_gas_amount,string"` GasUnitPrice uint64 `json:"gas_unit_price,string"` GasCurrencyCode string `json:"gas_currency_code"` ExpirationTime uint64 `json:"expiration_timestamp_secs,string"` Sender string `json:"sender"` Hash string `json:"hash"` StateRootHash string `json:"state_root_hash"` EventRootHash string `json:"event_root_hash"` GasUsed uint64 `json:"gas_used,string"` Success bool `json:"success"` VMStatus string `json:"vm_status"` AccumulatorRootHash string `json:"accumulator_root_hash"` Changes interface{} `json:"changes"` Signature interface{} `json:"signature"` }
type TxSignature ¶
type UnsignedTx ¶
type UnsignedTx struct { Sender string `json:"sender"` SequenceNumber uint64 `json:"sequence_number,string"` MaxGasAmount uint64 `json:"max_gas_amount,string"` GasUnitPrice uint64 `json:"gas_unit_price,string"` GasCurrencyCode string `json:"gas_currency_code"` ExpirationTime uint64 `json:"expiration_timestamp_secs,string"` Payload interface{} `json:"payload"` }
type WriteSetPayload ¶
type WriteSetPayload struct { Type string `json:"type"` WriteSet interface{} `json:"write_set"` }
Click to show internal directories.
Click to hide internal directories.