import type { ChainInfo } from '@particle-network/chains'; import { AAFeeMode, type Env } from '@particle-network/rn-base'; import { AccountInfo, DappMetaData, LoginResp, ParticleConnectConfig, RpcUrl, WalletType } from './Models'; import { ConnectKitConfig } from './Models/ConnectKitConfig'; export declare const ParticleConnectEvent: any; /** * Init Particle Connect Service * @param chainInfo ChainInfo * @param env Env * @param metadata Dapp meta data * @param rpcUrl Custom RpcUrl */ export declare function init(chainInfo: ChainInfo, env: Env, metadata: DappMetaData, rpcUrl?: RpcUrl | null): void; /** * Set WalletConnect ProjectId */ export declare function setWalletConnectProjectId(walletConnectProjectId: string): void; /** * Set the required chains for wallet connect v2. If not set, the current chain connection will be used. * @param chainInfos Chain info list */ export declare function setWalletConnectV2SupportChainInfos(chainInfos: ChainInfo[]): void; /** * Get accounts * @param walletType Wallet type * @returns Account list */ export declare function getAccounts(walletType: WalletType): Promise; /** * Connect wallet * @param walletType Wallet type * @param config Optional, works when connect with partile * @returns Result, account or error */ export declare function connect(walletType: WalletType, config?: ParticleConnectConfig): Promise; /** * connectWithConnectKitConfig is one click login function, which can present a customizable login UI * @param config can be derived from ConnectKitConfig * @returns */ export declare function connectWithConnectKitConfig(config: ConnectKitConfig): Promise; /** * Disconnect * @param walletType Wallet type * @param publicAddress Public address * @returns Result, success or error */ export declare function disconnect(walletType: WalletType, publicAddress: string): Promise; /** * Is connected * @param walletType Wallet type * @param publicAddress Public address * @returns Result, success or failure or error */ export declare function isConnected(walletType: WalletType, publicAddress: string): Promise; /** * Sign message * @param walletType Wallet type * @param publicAddress Public address * @param message Message that you want user to sign * @returns Result, signed message or error */ export declare function signMessage(walletType: WalletType, publicAddress: string, message: string): Promise; /** * Sign transaction * @param walletType Wallet type * @param publicAddress Public address * @param transaction Transaction that you want user to sign * @returns Result, signed transaction or error */ export declare function signTransaction(walletType: WalletType, publicAddress: string, transaction: string): Promise; /** * Sign all transactions * @param walletType Wallet type * @param publicAddress Public address * @param transactions Transactions that you want user to sign * @returns Result, signed transactions or error */ export declare function signAllTransactions(walletType: WalletType, publicAddress: string, transactions: string[]): Promise; /** * Sign and send transaction * @param walletType Wallet type * @param publicAddress Public address * @param transaction Transaction that you want user to sign and send * @returns Result, signature or error */ export declare function signAndSendTransaction(walletType: WalletType, publicAddress: string, transaction: string, feeMode?: AAFeeMode): Promise; /** * Batch send transactions, works with particle aa service * @param transactions Transactions that you want user to sign and send * @param feeMode Optional, default is native * @returns Result, signature or error */ export declare function batchSendTransactions(walletType: WalletType, publicAddress: string, transactions: string[], feeMode?: AAFeeMode): Promise; /** * Sign typed data * @param walletType Wallet type * @param publicAddress Public address * @param typedData Typed data that you want user to sign and send, support typed data version v4 * @returns Result, signature or error */ export declare function signTypedData(walletType: WalletType, publicAddress: string, typedData: string): Promise; /** * Sign in with Ethereum/Solana (EIP4361) * @param walletType Wallet type * @param publicAddress Public address * @param domain Domain, example "particle.network" * @param uri Uri, example "https://particle.network/demo#login" * @returns Result, source message and signature or error */ export declare function signInWithEthereum(walletType: WalletType, publicAddress: string, domain: string, uri: string): Promise; /** * Verify * @param walletType Wallet type * @param publicAddress Public address * @param message Source message * @param signature Signature * @returns Result, bool or error */ export declare function verify(walletType: WalletType, publicAddress: string, message: string, signature: string): Promise; /** * Import private key * @param walletType Wallet type, EvmPrivateKey or SolanaPrivateKey * @param privateKey Private key * @returns Result, account or error */ export declare function importPrivateKey(walletType: WalletType, privateKey: string): Promise>; /** * Import mnemonic * @param walletType Wallet type, EvmPrivateKey or SolanaPrivateKey * @param mnemonic Mnemonic, example "word1 work2 ... " at least 12 words. * @returns Result, account or error */ export declare function importMnemonic(walletType: WalletType, mnemonic: string): Promise>; /** * Export private key * @param walletType Wallet type, EvmPrivateKey or SolanaPrivateKey * @param publicAddress Public address * @returns Result, private key or error */ export declare function exportPrivateKey(walletType: WalletType, publicAddress: string): Promise; /** * Connect get a wallet connect qrcode uri, should use with NativeEventEmitter, event name 'qrCodeUri', * you can explore example for more details. * @returns Account */ export declare function connectWalletConnect(): Promise; export * from './Models'; export { ParticleConnectProvider } from './provider'; //# sourceMappingURL=index.d.ts.map