@getpara/react-sdk, @getpara/react-sdk-lite or @getpara/react-native-wallet, and call them inside your Para provider. Each hook wraps a Para client method and keeps its access rules and Portal behavior. The link under each hook goes to that method.
Errors
A query hook reports a failed request inerror; a mutation rejects from its Async function and sets error. The error is the one the client method throws, described on each method page. A mutation called without a Para client fails with no para instance, and one called before the user is fully logged in fails with User must be authenticated. Permissions errors lists every server error.
Query hooks
Query hooks take the same positional arguments as their client method. They return TanStack QueryUseQueryResult<Result, Error> with data, error, isPending, and refetch. Public discovery runs when a client exists; other queries wait for a fully authenticated user.
usePolicies
Lists your app's active policies that do not target specific users or wallets.
usePolicy
Reads the active version of a policy that does not target specific users or wallets.
useApplicablePolicies
Lists the active policies that apply to a wallet of the signed-in user.
useApplicablePolicy
Reads one active policy that applies to a wallet of the signed-in user.
useUserPolicyConsents
Lists the consent requests for a wallet of the signed-in user, with the status of each.
useUserPolicyConsent
Reads the consent status of one policy for a wallet of the signed-in user.
useUserAdjustablePolicies
Lists the policies whose parameters the signed-in user can adjust, with the user's current values.
useUserPolicyParameters
Reads the signed-in user's values for one policy's adjustable parameters, with the declarations and current revision.
useUserPolicyParameterHistory
Lists the saved revisions of the signed-in user's values for one policy, newest first.
useConfigurableApprovalRequirements
Lists the approval requirements the signed-in user can configure in an authorization scope.
useConfigurableApprovalRequirement
Reads one approval requirement the signed-in user can configure, in a specific policy version.
useApprovalConfiguration
Reads the stored settings and revision for an approval requirement in an authorization scope.
useEffectiveApprovalConfiguration
Reads an approval requirement with the stored settings for an authorization scope applied.
useApprovalConfigurationHistory
Lists every stored revision of an approval requirement's settings in an authorization scope, newest first.
useUserApprovalAssignments
Reads the signed-in user's roles and attributes in an authorization scope.
useUserApprovalCapabilities
Lists the approval requirements the signed-in user can configure in an authorization scope.
useAccessibleApprovalCases
Lists the approval cases the signed-in user can review, and the signature collections they started.
useAccessibleApprovalCase
Reads an approval case the signed-in user can review, with the user's decision options.
useInitiatedApprovalCases
Lists the approval cases for requests the signed-in user started, newest first.
useInitiatedApprovalCase
Reads an approval case for a request the signed-in user started.
useApprovalSigningPayload
Reads what the signed-in approver signs in the current stage of a signature collection.
useApprovalSignatures
Reads the collected signatures once a signature collection is complete.
useUserPolicyUsage
Reads the current spend usage of a policy for a wallet of the signed-in user.
Mutation hooks
Mutation hooks take no arguments. The returned functions are named after the client method:method(variables) starts a mutation and methodAsync(variables) returns its promise. Results also include data, error, isPending, and reset. Successful writes invalidate the current user’s permissions queries; generating a Portal URL does not.
useUpdateUserPolicyParameters
Saves the signed-in user's values for a policy's adjustable parameters.
useResetUserPolicyParameters
Restores the policy defaults as the signed-in user's values for its adjustable parameters.
useUpdateApprovalConfiguration
Saves new values for an approval requirement's configurable settings in an authorization scope.
useResetApprovalConfiguration
Clears the stored settings for an approval requirement so the authored defaults apply again.
useApproveApprovalCase
Records the signed-in approver's approval on an approval case.
useRejectApprovalCase
Records the signed-in approver's rejection, which ends the approval case.
useCancelApprovalCase
Cancels a pending approval case for a request the signed-in user started.
useCreateApprovalSignatureCollection
Opens an approval case that collects approvers' signatures for a transaction.
useSubmitApprovalSignature
Submits the signed-in approver's signature to a signature collection.
useSignApprovalTransaction
Signs a signature collection's payload with one of the signed-in approver's wallets and submits the signature.
useGetPolicyConsentUrl
Builds the Portal URL where the signed-in user reviews a policy and consents to it.
useGetApprovalCaseReviewUrl
Builds the Portal URL where the signed-in approver reviews an approval case.