Function useSendTransaction

  • Type Parameters

    • config extends Config = Config
    • context = unknown

    Parameters

    • parameters: {
          config?: Config | config;
          mutation?: {
              gcTime?: number;
              meta?: Record<string, unknown>;
              networkMode?: NetworkMode;
              onError?: ((error: SendTransactionErrorType, variables: {
                  [key in string | number | symbol]: SendTransactionVariables<config, (...)[(...)][number]["id"]>[key]
              }, context: undefined | context) => unknown);
              onMutate?: ((variables: {
                  [key in string | number | symbol]: SendTransactionVariables<config, (...)[(...)][number]["id"]>[key]
              }) => undefined | context | Promise<undefined | context>);
              onSettled?: ((data: undefined | `0x${string}`, error: null | SendTransactionErrorType, variables: {
                  [key in string | number | symbol]: SendTransactionVariables<config, (...)[(...)][number]["id"]>[key]
              }, context: undefined | context) => unknown);
              onSuccess?: ((data: `0x${string}`, variables: {
                  [key in string | number | symbol]: SendTransactionVariables<config, (...)[(...)][number]["id"]>[key]
              }, context: context) => unknown);
              retry?: RetryValue<SendTransactionErrorType>;
              retryDelay?: RetryDelayValue<SendTransactionErrorType>;
              scope?: MutationScope;
          };
      } = {}
      • Optionalconfig?: Config | config
      • Optionalmutation?: {
            gcTime?: number;
            meta?: Record<string, unknown>;
            networkMode?: NetworkMode;
            onError?: ((error: SendTransactionErrorType, variables: {
                [key in string | number | symbol]: SendTransactionVariables<config, (...)[(...)][number]["id"]>[key]
            }, context: undefined | context) => unknown);
            onMutate?: ((variables: {
                [key in string | number | symbol]: SendTransactionVariables<config, (...)[(...)][number]["id"]>[key]
            }) => undefined | context | Promise<undefined | context>);
            onSettled?: ((data: undefined | `0x${string}`, error: null | SendTransactionErrorType, variables: {
                [key in string | number | symbol]: SendTransactionVariables<config, (...)[(...)][number]["id"]>[key]
            }, context: undefined | context) => unknown);
            onSuccess?: ((data: `0x${string}`, variables: {
                [key in string | number | symbol]: SendTransactionVariables<config, (...)[(...)][number]["id"]>[key]
            }, context: context) => unknown);
            retry?: RetryValue<SendTransactionErrorType>;
            retryDelay?: RetryDelayValue<SendTransactionErrorType>;
            scope?: MutationScope;
        }
        • OptionalgcTime?: number
        • Optionalmeta?: Record<string, unknown>
        • OptionalnetworkMode?: NetworkMode
        • OptionalonError?: ((error: SendTransactionErrorType, variables: {
              [key in string | number | symbol]: SendTransactionVariables<config, (...)[(...)][number]["id"]>[key]
          }, context: undefined | context) => unknown)
            • (error, variables, context): unknown
            • Parameters

              • error: SendTransactionErrorType
              • variables: {
                    [key in string | number | symbol]: SendTransactionVariables<config, (...)[(...)][number]["id"]>[key]
                }
              • context: undefined | context

              Returns unknown

        • OptionalonMutate?: ((variables: {
              [key in string | number | symbol]: SendTransactionVariables<config, (...)[(...)][number]["id"]>[key]
          }) => undefined | context | Promise<undefined | context>)
            • (variables): undefined | context | Promise<undefined | context>
            • Parameters

              • variables: {
                    [key in string | number | symbol]: SendTransactionVariables<config, (...)[(...)][number]["id"]>[key]
                }

              Returns undefined | context | Promise<undefined | context>

        • OptionalonSettled?: ((data: undefined | `0x${string}`, error: null | SendTransactionErrorType, variables: {
              [key in string | number | symbol]: SendTransactionVariables<config, (...)[(...)][number]["id"]>[key]
          }, context: undefined | context) => unknown)
            • (data, error, variables, context): unknown
            • Parameters

              • data: undefined | `0x${string}`
              • error: null | SendTransactionErrorType
              • variables: {
                    [key in string | number | symbol]: SendTransactionVariables<config, (...)[(...)][number]["id"]>[key]
                }
              • context: undefined | context

              Returns unknown

        • OptionalonSuccess?: ((data: `0x${string}`, variables: {
              [key in string | number | symbol]: SendTransactionVariables<config, (...)[(...)][number]["id"]>[key]
          }, context: context) => unknown)
            • (data, variables, context): unknown
            • Parameters

              • data: `0x${string}`
              • variables: {
                    [key in string | number | symbol]: SendTransactionVariables<config, (...)[(...)][number]["id"]>[key]
                }
              • context: context

              Returns unknown

        • Optionalretry?: RetryValue<SendTransactionErrorType>
        • OptionalretryDelay?: RetryDelayValue<SendTransactionErrorType>
        • Optionalscope?: MutationScope

    Returns UseSendTransactionReturnType<config, context>