enclave-wallet-sdk
Version:
A simple enclave wallet SDK for React applications
30 lines (29 loc) • 769 B
TypeScript
import React from "react";
import WalletSDK from "../index";
interface swapToken {
amount: string;
chainId: number;
tokenAddress: string;
}
interface SwapParams {
fromToken: swapToken;
toToken: Omit<swapToken, "amount">;
}
interface WalletContextType {
walletSDK: WalletSDK | null;
isLoggedIn: boolean;
username: string | null;
walletAddress: string | null;
solanaAddress: string | null;
balance: any | null;
connect: () => void;
disconnect: () => void;
swap: (params: SwapParams) => void;
}
export declare const useWallet: () => WalletContextType;
interface WalletProviderProps {
children: React.ReactNode;
sdkKey: string;
}
export declare const WalletProvider: React.FC<WalletProviderProps>;
export {};