Documentation ¶
Index ¶
- Constants
- func AddStake(from string, sequenceNumber uint64, maxGasAmount uint64, gasUnitPrice uint64, ...) (string, error)
- func AddStakePayload(poolAddress string, amount uint64) (aptos_types.TransactionPayload, error)
- func BuildSignedTransaction(from string, sequenceNumber uint64, maxGasAmount uint64, gasUnitPrice uint64, ...) (string, error)
- func ClaimNFTTokenPayload(sender string, creator string, collectionName string, tokenName string, ...) (aptos_types.TransactionPayload, error)
- func CoinBurnPayload(amount uint64, tyArg string) (aptos_types.TransactionPayload, error)
- func CoinMintPayload(receiveAddress string, amount uint64, tyArg string) (aptos_types.TransactionPayload, error)
- func CoinRegisterPayload(tyArg string) (aptos_types.TransactionPayload, error)
- func CoinTransferPayload(to string, amount uint64, tyArg string) (aptos_types.TransactionPayload, error)
- func ConvertArgs(args []interface{}, arg_types []aptos_types.MoveType) ([][]byte, error)
- func ExpandAddress(address string) string
- func GetAddressByPubKey(pubKeyHex string, shortEnable bool) (string, error)
- func GetRawTxHash(rawTxn *aptos_types.RawTransaction) (string, error)
- func GetSigningHash(from string, sequenceNumber uint64, maxGasAmount uint64, gasUnitPrice uint64, ...) (string, error)
- func GetTransactionHash(hexStr string) (string, error)
- func Interface2U128(value interface{}) (*serde.Uint128, error)
- func Interface2U64(value interface{}) (uint64, error)
- func MakeRawTransaction(from string, sequenceNumber uint64, maxGasAmount uint64, gasUnitPrice uint64, ...) (*aptos_types.RawTransaction, error)
- func NewAddress(seedHex string, shortEnable bool) (string, error)
- func OfferNFTTokenPayload(receiver string, creator string, collectionName string, tokenName string, ...) (aptos_types.TransactionPayload, error)
- func PayloadFromJsonAndAbi(payload string, abi string) (aptos_types.TransactionPayload, error)
- func ReactivateStake(from string, sequenceNumber uint64, maxGasAmount uint64, gasUnitPrice uint64, ...) (string, error)
- func ReactivateStakePayload(poolAddress string, amount uint64) (aptos_types.TransactionPayload, error)
- func ShortenAddress(address string) string
- func SignMessage(priKey, message string) (string, error)
- func SignRawTransaction(rawTxn *aptos_types.RawTransaction, seedHex string) (string, error)
- func SignedTx(rawTxn *aptos_types.RawTransaction, signDataHex string, pubKey string) (string, error)
- func SimulateTransaction(rawTxn *aptos_types.RawTransaction, seedHex string) (string, error)
- func String2U128(str string) (*serde.Uint128, error)
- func Transfer(from string, sequenceNumber uint64, maxGasAmount uint64, gasUnitPrice uint64, ...) (string, error)
- func TransferPayload(to string, amount uint64) (aptos_types.TransactionPayload, error)
- func Unlock(from string, sequenceNumber uint64, maxGasAmount uint64, gasUnitPrice uint64, ...) (string, error)
- func UnlockPayload(poolAddress string, amount uint64) (aptos_types.TransactionPayload, error)
- func ValidateAddress(address string, shortEnable bool) bool
- func Withdraw(from string, sequenceNumber uint64, maxGasAmount uint64, gasUnitPrice uint64, ...) (string, error)
- func WithdrawPayload(poolAddress string, amount uint64) (aptos_types.TransactionPayload, error)
- type AptosWallet
Constants ¶
const HexPrefix = "0x"
Variables ¶
This section is empty.
Functions ¶
func AddStakePayload ¶
func AddStakePayload(poolAddress string, amount uint64) (aptos_types.TransactionPayload, error)
func BuildSignedTransaction ¶
func ClaimNFTTokenPayload ¶
func ClaimNFTTokenPayload(sender string, creator string, collectionName string, tokenName string, propertyVersion uint64) (aptos_types.TransactionPayload, error)
func CoinBurnPayload ¶
func CoinBurnPayload(amount uint64, tyArg string) (aptos_types.TransactionPayload, error)
func CoinMintPayload ¶
func CoinMintPayload(receiveAddress string, amount uint64, tyArg string) (aptos_types.TransactionPayload, error)
func CoinRegisterPayload ¶
func CoinRegisterPayload(tyArg string) (aptos_types.TransactionPayload, error)
func CoinTransferPayload ¶
func CoinTransferPayload(to string, amount uint64, tyArg string) (aptos_types.TransactionPayload, error)
func ConvertArgs ¶
func ConvertArgs(args []interface{}, arg_types []aptos_types.MoveType) ([][]byte, error)
func ExpandAddress ¶
func GetAddressByPubKey ¶
func GetRawTxHash ¶
func GetRawTxHash(rawTxn *aptos_types.RawTransaction) (string, error)
func GetSigningHash ¶
func GetTransactionHash ¶
pub enum Transaction { /// Transaction submitted by the user. e.g: P2P payment transaction, publishing module /// transaction, etc. /// TODO: We need to rename SignedTransaction to SignedUserTransaction, as well as all the other /// transaction aptos_types we had in our codebase. UserTransaction(SignedTransaction),
/// Transaction that applies a WriteSet to the current storage, it's applied manually via db-bootstrapper. GenesisTransaction(WriteSetPayload),
/// Transaction to update the block metadata resource at the beginning of a block. BlockMetadata(BlockMetadata),
/// Transaction to let the executor update the global state tree and record the root hash /// in the TransactionInfo /// The hash value inside is unique block id which can generate unique hash of state checkpoint transaction StateCheckpoint(HashValue), }
func Interface2U128 ¶
func Interface2U64 ¶
func MakeRawTransaction ¶
func MakeRawTransaction(from string, sequenceNumber uint64, maxGasAmount uint64, gasUnitPrice uint64, expirationTimestampSecs uint64, chainId uint8, payload aptos_types.TransactionPayload) (*aptos_types.RawTransaction, error)
func OfferNFTTokenPayload ¶
func OfferNFTTokenPayload(receiver string, creator string, collectionName string, tokenName string, propertyVersion uint64, amount uint64) (aptos_types.TransactionPayload, error)
func PayloadFromJsonAndAbi ¶
func PayloadFromJsonAndAbi(payload string, abi string) (aptos_types.TransactionPayload, error)
func ReactivateStake ¶
func ReactivateStakePayload ¶
func ReactivateStakePayload(poolAddress string, amount uint64) (aptos_types.TransactionPayload, error)
func ShortenAddress ¶
func SignMessage ¶
func SignRawTransaction ¶
func SignRawTransaction(rawTxn *aptos_types.RawTransaction, seedHex string) (string, error)
func SignedTx ¶
func SignedTx(rawTxn *aptos_types.RawTransaction, signDataHex string, pubKey string) (string, error)
func SimulateTransaction ¶
func SimulateTransaction(rawTxn *aptos_types.RawTransaction, seedHex string) (string, error)
func TransferPayload ¶
func TransferPayload(to string, amount uint64) (aptos_types.TransactionPayload, error)
func UnlockPayload ¶
func UnlockPayload(poolAddress string, amount uint64) (aptos_types.TransactionPayload, error)
func WithdrawPayload ¶
func WithdrawPayload(poolAddress string, amount uint64) (aptos_types.TransactionPayload, error)
Types ¶
type AptosWallet ¶
type AptosWallet struct {
wallet.WalletBase
}
func (*AptosWallet) GetRandomPrivateKey ¶
func (aw *AptosWallet) GetRandomPrivateKey() (string, error)