![Pub](https://camo.githubusercontent.com/a24b7a466b9eac7240c7a1cfd326dcccaefd56a049389343a61e1f9a0a7d696d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7075622d76302e302e352d626c7565)
dependencies:
aptos: ^0.0.5
// Generate Aptos Account
final mnemonics = AptosAccount.generateMnemonic();
final sender = AptosAccount.generateAccount(mnemonics);
final receiver = AptosAccount();
// AptosClient connect with Aptos Node
final aptosClient = AptosClient(Constants.devnetAPI, enableDebugLog: true);
// Check and fund account
final amount = BigInt.from(10000000);
bool isExists = await aptosClient.accountExist(sender.address);
if (!isExists) {
final faucetClient = FaucetClient.fromClient(Constants.faucetDevAPI, aptosClient);
await faucetClient.fundAccount(sender.address, amount.toString());
await Future.delayed(const Duration(seconds: 2));
}
final coinClient = CoinClient(aptosClient);
// Check account balance
final balance = await coinClient.checkBalance(sender.address);
print(balance);
// Transfer Aptos Coin
final txHash = await coinClient.transfer(
sender,
receiver.address,
BigInt.from(10000),
createReceiverIfMissing: true);
print(txHash);