import type { providers } from "near-api-js"; interface AccessKey { publicKey: { data: Uint8Array; keyType: number; }; secretKey: string; } interface RequestSignInResponse { accessKey: AccessKey; error: string | { type: string; }; notificationId: number; type: "nearfi-wallet-result"; } type SignOutResponse = true | { error: string | { type: string; }; }; interface RpcInfo { explorerUrl: string; helperUrl: string; index: number; name: string; network: string; networkId: string; nodeUrl: string; walletUrl: string; wrapNearContract: string; } interface GetRpcResponse { method: "getRpc"; notificationId: number; rpc: RpcInfo; type: "nearfi-wallet-result"; } interface RequestSignInParams { contractId: string; methodNames?: Array; amount?: string; } interface RpcChangedResponse { explorerUrl: string; helperUrl: string; index: number; name: string; network: string; networkId: string; nodeUrl: string; walletUrl: string; wrapNearContract: string; } interface SendMoneyParams { receiverId: string; amount: string; } interface SendMoneyResponse { transactionHash: string; error?: string; } interface Action { methodName: string; args: object; gas: string; deposit: string; } interface SignAndSendTransactionParams { receiverId: string; actions: Array; } interface SignAndSendTransactionResponse { actionType: "DAPP/DAPP_POPUP_RESPONSE"; method: "signAndSendTransactions"; notificationId: number; error?: string; response?: Array; type: "nearfi-wallet-extensionResult"; } interface SignAndSendTransactionsResponse { actionType: "DAPP/DAPP_POPUP_RESPONSE"; method: "signAndSendTransactions"; notificationId: number; error?: string; response?: Array; type: "nearfi-wallet-extensionResult"; } interface Transaction { receiverId: string; actions: Array; } interface RequestSignTransactionsParams { transactions: Array; } interface NearFiEvents { signIn: () => void; signOut: () => void; accountChanged: (changedAccountId: string) => void; rpcChanged: (response: RpcChangedResponse) => void; } export interface InjectedNearFi { isNearFi: boolean; getAccountId: () => string | null; getRpc: () => Promise; requestSignIn: (params: RequestSignInParams) => Promise; signOut: () => Promise; isSignedIn: () => boolean; removeEventListener: (event: string) => void; on: (event: Event, callback: NearFiEvents[Event]) => void; sendMoney: (params: SendMoneyParams) => Promise; signAndSendTransaction: (params: SignAndSendTransactionParams) => Promise; requestSignTransactions: (params: RequestSignTransactionsParams) => Promise; log: (...msg: Array) => void; resolveSignInState: () => Promise; } export {};