Skip to main content
Get your API key at hackathon-apikey.vercel.app.
Use the faucet helpers to fund test accounts during onboarding, demos, and QA. There are two different flows:
  • requestTestTokens() mints ERC-20 test tokens to an EVM wallet outside the unlink contract
  • requestPrivateTokens() transfers shielded test tokens directly into an Unlink account inside the unlink contract

Current test token

On the current Base Sepolia environment, the faucet token is:
0x7501de8ea37a21e20e6e65947d2ecab0e9f061a7
Use that address as the token parameter in the examples below unless your project specifies a different faucet token.

Mint to an EVM wallet

const result = await unlink.faucet.requestTestTokens({
  token: "0x7501de8ea37a21e20e6e65947d2ecab0e9f061a7",
});

console.log(result.tx_hash);
If you omit evmAddress, the SDK uses the connected EVM provider address.
const result = await unlink.faucet.requestTestTokens({
  token: "0x7501de8ea37a21e20e6e65947d2ecab0e9f061a7",
  evmAddress: "0xRecipient",
});
Omitting evmAddress requires an EVM provider on the client.
const result = await unlink.faucet.requestPrivateTokens({
  token: "0x7501de8ea37a21e20e6e65947d2ecab0e9f061a7",
});

console.log(result.tx_id, result.status);
If you omit unlinkAddress, the SDK automatically registers the caller if needed and uses the caller’s own Unlink address. You can also target another Unlink account explicitly:
const result = await unlink.faucet.requestPrivateTokens({
  token: "0x7501de8ea37a21e20e6e65947d2ecab0e9f061a7",
  unlinkAddress: "unlink1recipient...",
});

When to use which

  • Use requestTestTokens() when the user needs public ERC-20 balance for an approval or public wallet flow
  • Use requestPrivateTokens() when the user should start with funds already inside the unlink contract

Responses

requestTestTokens() returns an on-chain transaction hash:
type FaucetMintResponse = {
  tx_hash: string;
};
requestPrivateTokens() returns an internal transfer result:
type FaucetTransferResponse = {
  tx_id: string;
  status: string;
};
The faucet tx_id is scoped to the faucet and cannot be polled via pollTransactionStatus(). It is not the same as transaction IDs returned by deposit(), transfer(), or withdraw(). To confirm private tokens have arrived, use getBalances() (see Utilities).