@kryptogo/kryptogokit-sdk-react
Version:
KryptogoKit offers a comprehensive web3 wallet solution with seamless KryptoGO Auth integration and multi-wallet connection support. Designed for users. Built for developers.
20 lines (19 loc) • 1.14 kB
TypeScript
import { type WalletClient } from 'viem';
import { type UseWalletClientReturnType } from 'wagmi';
import { Eip2612Props, PermitSignature, SignPermitProps } from '../constants/permit';
export declare function usePermit({ contractAddress, chainId, walletClient, ownerAddress, spenderAddress, permitVersion, }: UsePermitProps): {
signPermitDai: ((props: PartialBy<SignPermitProps, "chainId" | "ownerAddress" | "contractAddress" | "spenderAddress" | "nonce" | "erc20Name" | "permitVersion"> & {
walletClient?: WalletClient;
}) => Promise<PermitSignature>) | undefined;
signPermit: ((props: PartialBy<Eip2612Props, "chainId" | "ownerAddress" | "contractAddress" | "spenderAddress" | "nonce" | "erc20Name" | "permitVersion"> & {
walletClient?: WalletClient;
}) => Promise<PermitSignature>) | undefined;
signature: PermitSignature | undefined;
nonce: bigint | undefined;
error: Error | undefined;
};
export type UsePermitProps = Partial<SignPermitProps> & {
walletClient?: UseWalletClientReturnType['data'] | null;
};
type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
export {};