requestTestTokens()mints ERC-20 test tokens to an EVM wallet outside the unlink contractrequestPrivateTokens()transfers shielded test tokens directly into an Unlink account inside the unlink contract
Token
Use a test token configured for the environment you selected. In hosted projects, this comes from your project or environment config. In the Unlink dashboard, the faucet token cards show each hosted mock token’s truncated address. Use the copy button on the token card to copy the full address for SDK or API calls.Mint to an EVM wallet
evmAddress, the SDK uses the connected EVM provider address.
Omitting
evmAddress requires an EVM provider on the client.amount (in wei, as a
decimal string) to request a specific amount, up to the faucet’s configured
maximum. Requests above the maximum, or for 0, are rejected.
Fund a private Unlink account
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:
amount works the same way here — wei as a decimal string, capped by the
faucet’s configured maximum:
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
TherequestTestTokens() method returns an on-chain transaction hash:
requestPrivateTokens() method returns an internal transfer result:
TransactionStatus is "accepted" | "prepared" | "proving" | "proved" | "broadcasting" | "relayed" | "processed" | "failed" (see Transaction
status).
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 Reading
data).