UI Components
TestnetFaucetButton

TestnetFaucetButton

The TestnetFaucetButton is a pre-built UI component that wraps the useMintTestPusd hook. It renders a styled button that users can click to instantly mint testnet PUSD to their connected wallet.

Usage

import { TestnetFaucetButton } from "@paystreamer/sdk/ui";
 
<TestnetFaucetButton 
  amountMist={100000000000n} // 100 PUSD
  onSuccess={(digest) => console.log('Minted:', digest)}
  onError={(err) => console.error('Mint failed:', err)}
/>

Props

PropTypeDescription
amountMist?bigintThe amount of PUSD (in MIST units) to mint. Defaults to 100_000_000_000n (100 PUSD).
onSuccess?(digest: string) => voidCallback fired when the minting transaction completes successfully.
onError?(error: string) => voidCallback fired if the minting transaction fails.
containerClassName?stringCustom CSS classes to apply to the wrapper div.
className?stringCustom CSS classes to apply directly to the button element.