UNPKG

svm-pay

Version:

A payment solution for SVM networks (Solana, Sonic SVM, Eclipse, s00n)

105 lines 2.88 kB
/** * Angular Integration for SVM-Pay * * This module provides Angular-specific components, services, and utilities * for integrating SVM-Pay into Angular applications with proper dependency injection, * reactive patterns, and AOT compilation support. * * Note: This module requires Angular to be installed as a peer dependency. * Install with: npm install @angular/core rxjs */ export interface SVMPayConfig { debug?: boolean; network?: string; rpcEndpoint?: string; defaultGas?: number; timeout?: number; } export interface PaymentState { status: 'idle' | 'pending' | 'success' | 'error'; data?: any; error?: string; } export declare const SVM_PAY_CONFIG: any; /** * Angular service for SVM-Pay with dependency injection and reactive patterns */ export declare class SVMPayService { private config; private paymentState$; private balance$; private paymentHistory$; constructor(config?: SVMPayConfig); /** * Get current payment state as observable */ getPaymentState(): any; /** * Create transfer URL (synchronous) */ createTransferUrl(recipient: string, amount: string, options?: { label?: string; message?: string; memo?: string; }): string; /** * Create transaction URL (synchronous) */ createTransactionUrl(link: string, recipient: string): string; /** * Check wallet balance (reactive) */ checkWalletBalance(): any; /** * Get payment history (reactive) */ getPaymentHistory(): any; /** * Process payment with state updates */ processPayment(recipient: string, amount: string, options?: any): any; /** * Check API usage (reactive) */ checkApiUsage(): any; /** * Setup wallet configuration */ setupWallet(config: any): any; /** * Reset cached data and state */ reset(): void; private getSDKInstance; private executePayment; } /** * Angular component for payment button with proper decorators */ export declare class SVMPayButtonComponent { recipient: string; amount: string; label: string; disabled: boolean; paymentCompleted: any; paymentError: any; private svmPayService; constructor(svmPayService?: SVMPayService); onPaymentClick(): void; } /** * Angular module for SVM-Pay with proper module definition */ export declare class SVMPayModule { static forRoot(config?: SVMPayConfig): any; static forChild(): any; } /** * Utility function to check if Angular integration is properly set up */ export declare function validateAngularIntegration(): boolean; /** * Factory function for creating SVM-Pay service outside Angular DI */ export declare function createSVMPayService(config?: SVMPayConfig): SVMPayService; //# sourceMappingURL=angular-integration.d.ts.map