@mantle-rwa/react 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,193 +0,0 @@
1
- /**
2
- * Type definitions for @mantle-rwa/react components
3
- */
4
-
5
- // Re-export SDK types that are commonly used
6
- export { AccreditationTier } from '@mantle-rwa/sdk';
7
-
8
- /**
9
- * Theme options for components
10
- */
11
- export type Theme = 'light' | 'dark';
12
-
13
- /**
14
- * KYC Provider options
15
- */
16
- export type KYCProviderType = 'persona' | 'synaps' | 'jumio';
17
-
18
- /**
19
- * Required fields for KYC verification
20
- */
21
- export type KYCRequiredField = 'identity' | 'accreditation' | 'address' | 'tax';
22
-
23
- /**
24
- * KYC verification result
25
- */
26
- export interface KYCResult {
27
- verified: boolean;
28
- tier: number;
29
- identityHash: string;
30
- sessionId: string;
31
- }
32
-
33
- /**
34
- * KYCFlow component props
35
- * @see Requirements 10.1, 10.2, 10.3, 10.4, 10.5
36
- */
37
- export interface KYCFlowProps {
38
- /** KYC provider to use */
39
- provider: KYCProviderType;
40
- /** Callback when KYC verification completes */
41
- onComplete: (kycData: KYCResult) => void;
42
- /** Callback when an error occurs */
43
- onError?: (error: Error) => void;
44
- /** Required verification fields */
45
- requiredFields: KYCRequiredField[];
46
- /** Theme mode */
47
- theme?: Theme;
48
- /** Custom styles override */
49
- customStyles?: Partial<KYCFlowStyles>;
50
- /** KYC Registry contract address for auto-update */
51
- registryAddress?: string;
52
- /** Whether to automatically update the on-chain registry */
53
- autoUpdateRegistry?: boolean;
54
- }
55
-
56
- /**
57
- * Custom styles for KYCFlow component
58
- */
59
- export interface KYCFlowStyles {
60
- container?: string;
61
- header?: string;
62
- content?: string;
63
- button?: string;
64
- input?: string;
65
- error?: string;
66
- }
67
-
68
- /**
69
- * InvestorDashboard component props
70
- * @see Requirements 11.1, 11.2, 11.3, 11.4, 11.5
71
- */
72
- export interface InvestorDashboardProps {
73
- /** RWA Token contract address */
74
- tokenAddress: string;
75
- /** Yield Distributor contract address */
76
- yieldDistributorAddress: string;
77
- /** KYC Registry contract address */
78
- kycRegistryAddress: string;
79
- /** Theme mode */
80
- theme?: Theme;
81
- /** Callback when yield is claimed */
82
- onClaimYield?: (distributionId: number) => void;
83
- /** Whether to show portfolio value */
84
- showPortfolioValue?: boolean;
85
- /** Price oracle address for portfolio value calculation */
86
- priceOracle?: string;
87
- }
88
-
89
- /**
90
- * Yield history entry
91
- */
92
- export interface YieldHistoryEntry {
93
- distributionId: number;
94
- amount: bigint;
95
- paymentToken: string;
96
- claimedAt: Date;
97
- }
98
-
99
- /**
100
- * TokenMintForm component props
101
- * @see Requirements 12.1, 12.2, 12.3, 12.4
102
- */
103
- export interface TokenMintFormProps {
104
- /** RWA Token contract address */
105
- tokenAddress: string;
106
- /** KYC Registry contract address */
107
- kycRegistryAddress: string;
108
- /** Callback when minting completes */
109
- onMintComplete?: (txHash: string, recipient: string, amount: string) => void;
110
- /** Callback when an error occurs */
111
- onError?: (error: Error) => void;
112
- /** Whether to allow batch minting via CSV */
113
- allowBatchMint?: boolean;
114
- /** Maximum batch size for CSV uploads */
115
- maxBatchSize?: number;
116
- /** Theme mode */
117
- theme?: Theme;
118
- }
119
-
120
- /**
121
- * Batch mint entry from CSV
122
- */
123
- export interface BatchMintEntry {
124
- recipient: string;
125
- amount: string;
126
- }
127
-
128
- /**
129
- * YieldCalculator component props
130
- * @see Requirements 13.1, 13.2, 13.3, 13.4
131
- */
132
- export interface YieldCalculatorProps {
133
- /** RWA Token contract address */
134
- tokenAddress: string;
135
- /** Yield Distributor contract address */
136
- yieldDistributorAddress: string;
137
- /** Supported payment tokens */
138
- supportedPaymentTokens: PaymentToken[];
139
- /** Callback when distribution is initiated */
140
- onDistribute?: (config: DistributionConfig) => void;
141
- /** Whether to show distribution chart */
142
- showChart?: boolean;
143
- /** Whether to allow export functionality */
144
- allowExport?: boolean;
145
- /** Theme mode */
146
- theme?: Theme;
147
- }
148
-
149
- /**
150
- * Payment token configuration
151
- */
152
- export interface PaymentToken {
153
- address: string;
154
- symbol: string;
155
- decimals: number;
156
- }
157
-
158
- /**
159
- * Distribution configuration
160
- */
161
- export interface DistributionConfig {
162
- tokenAddress: string;
163
- paymentToken: string;
164
- totalAmount: string;
165
- snapshotDate?: Date;
166
- claimWindowDays?: number;
167
- }
168
-
169
- /**
170
- * Distribution preview entry
171
- */
172
- export interface DistributionPreviewEntry {
173
- address: string;
174
- balance: bigint;
175
- yieldAmount: bigint;
176
- percentage: number;
177
- }
178
-
179
- /**
180
- * useRWA hook return type
181
- */
182
- export interface UseRWAReturn {
183
- /** Whether the SDK client is initialized */
184
- isInitialized: boolean;
185
- /** Current network chain ID */
186
- chainId: number | undefined;
187
- /** Connected wallet address */
188
- address: string | undefined;
189
- /** Whether wallet is connected */
190
- isConnected: boolean;
191
- /** Error if initialization failed */
192
- error: Error | null;
193
- }