Skip to main content

Usage

Parameters

  • params (GetWalletParams):
    • externalUserId (string): User ID from your auth provider
  • getBearerToken (() => Promise<string>): Function returning the auth token
  • queryOptions (UseQueryOptions, optional): React Query options (e.g. enabled)

Return Value

Returns an object containing:
  • fetchWallet: Function to manually fetch wallet data with custom params
  • data: The wallet object (publicKey, encryptedPrivateKey, walletType, etc.)
  • isLoading: Boolean indicating if the operation is in progress
  • isError: Boolean indicating if an error occurred
  • isSuccess: Boolean indicating if the query succeeded
  • error: Any error that occurred during the process
  • refetch: Function to re-run the query

Example Implementation

Chipi never stores your decrypted sensitive data. All private keys and authentication tokens remain secure and are never accessible to Chipi servers.