IntrospectionuseQuery Curated

usePredictWallets

Compute the deterministic subwallet addresses for a deployer without registering.

Import
@tokenops/sdk/fhe-disperse/react
Return
{ data, isLoading, error, refetch }
Lifecycle
Introspection

Description

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.

PropertyTypeDescription
userAddressThe user whose wallet pair to predict. Hook is disabled until set.
Want to run a similar shape interactively? The Playground ships 8 ready presets across vesting / airdrop / disperse — deploy a manager, create a vesting, claim, and the airdrop / disperse equivalents. The deep-link above auto-selects the closest preset to usePredictWallets; pick another from the dropdown if you'd rather start there.

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: