Skip to main content

Method Signature

align.blockchain.transactions.sendNativeToken(
  wallet: Wallet,
  to: string,
  amount: string,
  network: Network
): Promise<Transaction>

Parameters

wallet
Wallet
required
The sender’s wallet (must have private key)
to
string
required
Recipient address
amount
string
required
Amount to send in human-readable format (e.g., "0.1")
network
string
required
Network: ethereum, polygon, base, arbitrum, optimism

Returns

Returns a Transaction object with:
hash
string
The transaction hash
from
string
Sender address
to
string
Recipient address
value
string
Amount sent in wei

Examples

import Align from "@tolbel/align";

const align = new Align({
  apiKey: process.env.ALIGN_API_KEY!,
  environment: "sandbox",
});

const wallet = await align.blockchain.wallets.createFromPrivateKey(
  process.env.PRIVATE_KEY!
);

// Send 0.1 POL on Polygon
const tx = await align.blockchain.transactions.sendNativeToken(
  wallet,
  "0xRecipientAddress...",
  "0.1",
  "polygon"
);

console.log(`TX Hash: ${tx.hash}`);

// Wait for confirmation
const receipt = await align.blockchain.transactions.waitForConfirmation(
  tx.hash,
  "polygon"
);
console.log(`Confirmed in block ${receipt.blockNumber}`);
Ensure the wallet has sufficient balance to cover both the amount and gas fees.