import type { AccountImportData, Action, FinalExecutionOutcome } from "@near-wallet-selector/core"; export interface AccessKey { publicKey: { data: Uint8Array; keyType: number; }; secretKey: string; } interface RequestSignInResponse { accessKey: AccessKey; error: string | { type: string; }; notificationId: number; type: "bitget-wallet-result"; } export type SignOutResponse = true | { error: string | { type: string; }; }; 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; } export interface FunctionCallError { error: { index: number; kind: object; message: string; transaction_outcome: object; type: "FunctionCallError"; }; } export interface SignAndSendTransactionResponse { actionType: "DAPP/DAPP_POPUP_RESPONSE"; method: "signAndSendTransactions"; notificationId: number; error?: string; response?: Array | FunctionCallError; type: "bitget-wallet-extensionResult"; } interface SignAndSendTransactionsResponse { actionType: "DAPP/DAPP_POPUP_RESPONSE"; method: "signAndSendTransactions"; notificationId: number; error?: string; response?: Array | FunctionCallError; type: "bitget-wallet-extensionResult"; } export interface BitgetWalletEvents { signIn: () => void; signOut: () => void; accountChanged: (changedAccountId: string) => void; rpcChanged: (response: RpcChangedResponse) => void; } export interface batchImportParams { keystore: Array; network: string; } interface verifyOwnerResponse { accountId: string; message: string; blockId: string; publicKey: string; keyType: 0; signature: string; } interface SignAndSendTransactionParams { receiverId: string; actions: Array; } interface requestSignTransactionsParams { transactions: Array<{ receiverId: string; actions: Array; }>; } export interface InjectedBitgetWallet { isBitKeepChrome: boolean; callbacks: Record; getAccountId: () => string; requestSignIn: (params: RequestSignInParams) => Promise; signOut: () => Promise; isSignedIn: () => boolean; remove: (event: string) => void; getPublicKey: () => Promise; verifyOwner: (encoded: string, accountId: string | null, networkId: string) => Promise; on: (event: Event, callback: BitgetWalletEvents[Event]) => void; signAndSendTransaction: (params: SignAndSendTransactionParams) => Promise; requestSignTransactions: (params: requestSignTransactionsParams) => Promise; } export {};