/** * Copyright (c) TonTech. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ 'use client'; import type { MutateFunction, MutateOptions } from '@tanstack/react-query'; import type { TransferJettonData, TransferJettonErrorType, TransferJettonOptions, TransferJettonVariables, } from '@ton/appkit/queries'; import { transferJettonMutationOptions } from '@ton/appkit/queries'; import { useMutation } from '../../../libs/query'; import type { UseMutationReturnType } from '../../../libs/query'; import { useAppKit } from '../../settings'; export type UseTransferJettonParameters = TransferJettonOptions; export type UseTransferJettonReturnType = UseMutationReturnType< TransferJettonData, TransferJettonErrorType, TransferJettonVariables, context, ( variables: TransferJettonVariables, options?: MutateOptions, ) => void, MutateFunction >; export const useTransferJetton = ( parameters: UseTransferJettonParameters = {}, ): UseTransferJettonReturnType => { const appKit = useAppKit(); return useMutation(transferJettonMutationOptions(appKit, parameters)); };