Aptos SDK Functions
Methods
Description
addAccountFeePayers(walletAddress: string, feePayers: string[]): Promise<TransactionResponse>;
To add fee payers to the account
removeAccountFeePayers(walletAddress: string, feePayers: string[]): Promise<TransactionResponse>;
To remove fee payers from the account
getWalletBalance(wallet?: string): Promise<TokenBalance[]>;
To get the token balance of the wallet
getSmartWalletDetails(wallet?: string): Promise<SmartWalletDetails>;
To get the wallet details
computeAccountAddress(): Promise<string>;
To compute smart wallet address
getAccountAddress(controller?: string): Promise<string>;
To get smart wallet address
createAccount(seed: string, guardians: string[], feePayers: string[]): Promise<TransactionResponse>;
To create smart wallet
createAccountSponsored(seed: string, guardians: string[], feePayers: string[]): Promise<TransactionResponse>;
To create a sponsored smart wallet
changeControllerAccount(walletAddress: string, newController: string): Promise<TransactionResponse>;
To change the controller of the account
recoverAccount(walletAddress: string, newController: string): Promise<TransactionResponse>;
To recover the account. (Guardians can recover account in case when the controller key is lost)
addAccountGuardians(walletAddress: string, guardians: string[]): Promise<TransactionResponse>;
To add guardians to the smart wallet
removeAccountGuardians(walletAddress: string, guardians: string[]): Promise<TransactionResponse>;
To remove guardians from the smart wallet.
depositToAccount(walletAddress: string, coinType: string, amount: number): Promise<TransactionResponse>;
To deposit any coin to smart wallet (Doesn't need to register coins before sending when using this method)
withdrawFromAccount(walletAddress: string, coinType: string, amount: number): Promise<TransactionResponse>;
To withdraw coins smart wallet. (Only controller can call this method)
transferFromAccount(walletAddress: string, coinType: string, amount: number): Promise<TransactionResponse>;
To transfer coins to other addresses
executeAptosFunction(wallAddress: string, coinTypes: string[], payload: any[]): Promise<TransactionResponse>;
To execute swap, stake, crosschain swap
Last updated