Function useSendSponsoredTransaction
- useSendSponsoredTransaction(mutationProps?): UseMutationResult<UserOpResponse, any, UseSendSponsoredTransactionProps, any>
Parameters
Optional
mutationProps: {
gcTime?: number;
meta?: Record<string, unknown>;
networkMode?: NetworkMode;
onError?: ((error, variables, context) => unknown);
onMutate?: ((variables) => any);
onSettled?: ((data, error, variables, context) => unknown);
onSuccess?: ((data, variables, context) => unknown);
retry?: RetryValue<any>;
retryDelay?: RetryDelayValue<any>;
scope?: MutationScope;
throwOnError?: boolean | ((error) => boolean);
}Optional
gcTime?: number
Optional
meta?: Record<string, unknown>
Optional
networkMode?: NetworkMode
Optional
onError?: ((error, variables, context) => unknown)
- (error, variables, context): unknown
Parameters
- error: any
- variables: any
- context: any
Returns unknown
Optional
onMutate?: ((variables) => any)
- (variables): any
Returns any
Optional
onSettled?: ((data, error, variables, context) => unknown)
- (data, error, variables, context): unknown
Parameters
- data: any
- error: any
- variables: any
- context: any
Returns unknown
Optional
onSuccess?: ((data, variables, context) => unknown)
- (data, variables, context): unknown
Parameters
- data: any
- variables: any
- context: any
Returns unknown
Optional
retry?: RetryValue<any>
Optional
retryDelay?: RetryDelayValue<any>
Optional
scope?: MutationScope
Optional
throwOnError?: boolean | ((error) => boolean)
Description
Sends a transaction, using a paymaster for sponsorship.
Mutation function args: UseSendSponsoredTransactionProps
Example