UNPKG

@nexuspay/sdk

Version:

🚀 Ultra-simple cross-chain wallet SDK - Initialize with just projectName + apiKey. Bulletproof gasless transactions across EVM/SVM chains with ANY social identifier support

147 lines (146 loc) • 3.66 kB
/** * NexusSDK v1.0.1 - Simplified Cross-Chain Wallet SDK * * Production-ready SDK for real blockchain wallet creation */ export interface NexusConfig { apiKey: string; environment?: 'production' | 'development'; chains?: string[]; endpoints?: { api?: string; }; } export interface WalletInfo { socialId: string; socialType: string; addresses: { [chain: string]: string; }; metadata?: any; deploymentStatus?: { [chain: string]: 'deployed' | 'pending' | 'failed'; }; } /** * Simple NexusSDK class for cross-chain wallet creation */ export declare class NexusSDK { private config; private initialized; constructor(config: NexusConfig); initialize(): Promise<void>; private ensureInitialized; private makeRequest; /** * Create and deploy real blockchain wallets */ createWallet(options: { socialId: string; socialType?: string; chains?: string[]; paymaster?: boolean; metadata?: any; }): Promise<WalletInfo>; /** * Get wallet information */ getWallet(socialId: string, socialType?: string): Promise<WalletInfo>; /** * Send cross-chain payment */ sendPayment(options: { from: { socialId: string; chain: string; }; to: { socialId: string; chain: string; }; amount: string; asset?: string; gasless?: boolean; }): Promise<any>; /** * Bridge assets between chains */ bridgeAssets(options: { from: { chain: string; asset: string; }; to: { chain: string; asset: string; }; amount: string; }): Promise<any>; /** * Fund company gas tank */ fundGasTank(options: { companyId: string; amount: string; chain: string; token?: string; }): Promise<any>; /** * Get gas tank status */ getGasTankStatus(options: { companyId: string; }): Promise<any>; /** * Get private key (tracked for compliance) */ getPrivateKey(options: { socialId: string; socialType?: string; reason?: string; ipAddress?: string; userAgent?: string; }): Promise<any>; /** * Get usage analytics */ getUsageAnalytics(options?: { timeframe?: string; }): Promise<any>; /** * Get SDK configuration */ getConfig(): NexusConfig; } export declare const COMMON_SOCIAL_TYPES: { readonly EMAIL: "email"; readonly PHONE: "phone"; readonly GOOGLE: "google"; readonly TWITTER: "twitter"; readonly DISCORD: "discord"; readonly GITHUB: "github"; readonly GAME_ID: "gameId"; readonly USER_ID: "userId"; readonly PLAYER_TAG: "playerTag"; readonly NFT_HOLDER: "nftHolder"; readonly WALLET_ADDRESS: "walletAddress"; }; export declare const SUPPORTED_CHAINS: { readonly EVM: readonly ["ethereum", "polygon", "arbitrum", "base", "optimism", "avalanche", "bsc"]; readonly SVM: readonly ["solana"]; }; export declare const Utils: { createConfig: (apiKey: string, options?: Partial<NexusConfig>) => { apiKey: string; environment: 'production' | 'development'; chains: string[]; endpoints: { api?: string; }; }; isEVMChain: (chain: string) => boolean; isSVMChain: (chain: string) => boolean; }; export declare const VERSION = "1.0.1"; export declare const SDK_NAME = "NexusSDK"; export default NexusSDK;