btc-wallet
Version:
BTC Wallet is a toolkit that enables Bitcoin usage on the NEAR blockchain through the Satoshi protocol.
46 lines (45 loc) • 1.75 kB
TypeScript
import { SmartAccount, type AAOptions, type AccountContract } from '@particle-network/aa';
import { type WalletOption } from '@particle-network/wallet';
import { type BaseConnector } from '../connector/base';
interface GlobalState {
connectorId?: string;
setConnectorId: (connectorId?: string) => void;
connector?: BaseConnector;
connectors: BaseConnector[];
connectModalOpen: boolean;
openConnectModal: () => void;
closeConnectModal: () => void;
accounts: string[];
provider: any;
disconnect: () => void;
requestDirectAccount: (connector: BaseConnector) => any;
getPublicKey: () => Promise<string>;
signMessage: (message: string) => Promise<string>;
evmAccount?: string;
smartAccount?: SmartAccount;
switchNetwork: (network: 'livenet' | 'testnet') => Promise<void>;
getNetwork: () => Promise<'livenet' | 'testnet'>;
sendBitcoin: (toAddress: string, satoshis: number, options?: {
feeRate: number;
}) => Promise<string>;
accountContract: AccountContract;
setAccountContract: (accountContract: AccountContract) => void;
}
interface ConnectOptions {
projectId: string;
clientKey: string;
appId: string;
aaOptions: AAOptions;
rpcUrls?: Record<number, string>;
walletOptions?: Omit<WalletOption, 'erc4337' | 'customStyle'> & {
customStyle?: Omit<WalletOption['customStyle'], 'supportChains'>;
};
}
export declare const ConnectProvider: ({ children, options, connectors, autoConnect, }: {
children: React.ReactNode;
options: ConnectOptions;
connectors: BaseConnector[];
autoConnect?: boolean;
}) => import("react/jsx-runtime").JSX.Element;
export declare const useConnectProvider: () => GlobalState;
export {};