v2.1.0 stable
SDK 2.1 is the stable release on the latest dist-tag. Install it with pnpm add @tokenops/sdk. The receipt-free and Safe create surface of /fhe-airdrop remains @beta.IntrospectionuseQuery Curated
usePredictWallets
Compute the deterministic subwallet addresses for a deployer without registering.
Import
@tokenops/sdk/fhe-disperse/reactReturn
{ data, isLoading, error, refetch }Lifecycle
IntrospectionDescription
Deterministically predict the wallet addresses a user would get after
calling register(), without requiring the user to be registered.
Use this to compute the addresses that need ERC-7984 operator approval
before the user calls register() — set approvals on the predicted
addresses first so the first disperse works without a follow-up tx.
Signature
@tokenops/sdk/fhe-disperse/react
ts
function usePredictWallets(args?: UsePredictWalletsArgs): UseQueryResult<[Address, Address], Error>;Parameters
Shape of the options object passed to the hook itself.
| Property | Type | Description |
|---|---|---|
| user | Address | The user whose wallet pair to predict. Hook is disabled until set. |
Example
@tokenops/sdk/fhe-disperse/react · @example
tsx
const { data: predicted } = usePredictWallets({ user });Pulled directly from the hook's TSDoc block — the same snippet your IDE shows on hover.
See also
Other Introspection hooks in disperse 2.x:
useDeploymentBlockNumberRead the block number at which the singleton was deployed — useful as the fromBlock argument to getLogs when subscribing to events.useWalletImplementationRead the WALLET_IMPLEMENTATION address — the singleton clones this deterministically (Clones.cloneDeterministic) for each registered user to derive their wallet pair.