@straton/types 1.1.2

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.
@@ -0,0 +1,588 @@
1
+ import { Address, Hash } from 'viem';
2
+
3
+ /**
4
+ * Database types generated by Supabase CLI
5
+ * Run: pnpm db:generate to update this file
6
+ *
7
+ * This is a placeholder. The actual types will be generated from your Supabase schema.
8
+ */
9
+ interface Database {
10
+ public: {
11
+ Tables: {
12
+ profiles: {
13
+ Row: {
14
+ id: string;
15
+ user_type: 'INDIVIDUAL' | 'INSTITUTIONAL';
16
+ kyc_status: 'PENDING' | 'IN_REVIEW' | 'VERIFIED' | 'REJECTED' | 'EXPIRED';
17
+ accreditation_level: 'RETAIL' | 'QUALIFIED' | 'PROFESSIONAL' | null;
18
+ primary_jurisdiction: string | null;
19
+ allowed_jurisdictions: string[];
20
+ kyc_provider_id: string | null;
21
+ kyc_verified_at: string | null;
22
+ kyc_expires_at: string | null;
23
+ aml_status: 'PENDING' | 'IN_REVIEW' | 'VERIFIED' | 'REJECTED' | 'EXPIRED';
24
+ aml_last_check: string | null;
25
+ metadata: Record<string, unknown>;
26
+ created_at: string;
27
+ updated_at: string;
28
+ };
29
+ Insert: Omit<Database['public']['Tables']['profiles']['Row'], 'created_at' | 'updated_at'>;
30
+ Update: Partial<Database['public']['Tables']['profiles']['Insert']>;
31
+ };
32
+ organizations: {
33
+ Row: {
34
+ id: string;
35
+ name: string;
36
+ legal_name: string;
37
+ tax_id: string;
38
+ jurisdiction: string;
39
+ kyb_status: 'PENDING' | 'IN_REVIEW' | 'VERIFIED' | 'REJECTED' | 'EXPIRED';
40
+ licenses: Record<string, unknown>[];
41
+ representatives: string[];
42
+ metadata: Record<string, unknown>;
43
+ created_at: string;
44
+ updated_at: string;
45
+ };
46
+ Insert: Omit<Database['public']['Tables']['organizations']['Row'], 'id' | 'created_at' | 'updated_at'>;
47
+ Update: Partial<Database['public']['Tables']['organizations']['Insert']>;
48
+ };
49
+ assets: {
50
+ Row: {
51
+ id: string;
52
+ issuer_id: string | null;
53
+ asset_type: 'REAL_ESTATE' | 'CREDIT' | 'COMMODITY' | 'EQUITY';
54
+ name: string;
55
+ symbol: string;
56
+ description: string | null;
57
+ underlying_asset: Record<string, unknown>;
58
+ legal_documents: Record<string, unknown>[];
59
+ compliance_rules: Record<string, unknown>;
60
+ eligible_jurisdictions: string[];
61
+ eligible_accreditation: ('RETAIL' | 'QUALIFIED' | 'PROFESSIONAL')[];
62
+ metadata: Record<string, unknown>;
63
+ created_at: string;
64
+ updated_at: string;
65
+ };
66
+ Insert: Omit<Database['public']['Tables']['assets']['Row'], 'id' | 'created_at' | 'updated_at'>;
67
+ Update: Partial<Database['public']['Tables']['assets']['Insert']>;
68
+ };
69
+ site_content: {
70
+ Row: {
71
+ key: string;
72
+ value: string;
73
+ value_type: 'text' | 'json' | 'richtext';
74
+ updated_at: string;
75
+ updated_by: string | null;
76
+ };
77
+ Insert: {
78
+ key: string;
79
+ value: string;
80
+ value_type?: 'text' | 'json' | 'richtext';
81
+ updated_by?: string | null;
82
+ };
83
+ Update: {
84
+ key?: string;
85
+ value?: string;
86
+ value_type?: 'text' | 'json' | 'richtext';
87
+ updated_by?: string | null;
88
+ };
89
+ };
90
+ };
91
+ Views: Record<string, never>;
92
+ Functions: Record<string, never>;
93
+ Enums: {
94
+ user_type: 'INDIVIDUAL' | 'INSTITUTIONAL';
95
+ kyc_status: 'PENDING' | 'IN_REVIEW' | 'VERIFIED' | 'REJECTED' | 'EXPIRED';
96
+ accreditation_level: 'RETAIL' | 'QUALIFIED' | 'PROFESSIONAL';
97
+ asset_type: 'REAL_ESTATE' | 'CREDIT' | 'COMMODITY' | 'EQUITY';
98
+ offering_status: 'DRAFT' | 'PENDING_APPROVAL' | 'OPEN' | 'CLOSED' | 'CANCELLED';
99
+ order_side: 'BUY' | 'SELL';
100
+ order_type: 'MARKET' | 'LIMIT';
101
+ order_status: 'PENDING' | 'OPEN' | 'PARTIAL' | 'FILLED' | 'CANCELLED';
102
+ wallet_type: 'CUSTODIAL' | 'SELF_CUSTODY';
103
+ chain: 'ETHEREUM' | 'POLYGON' | 'ARBITRUM';
104
+ vault_strategy: 'STAKING' | 'FIXED_INCOME' | 'LENDING' | 'LP_REWARDS';
105
+ vault_status: 'ACTIVE' | 'PAUSED' | 'DEPRECATED';
106
+ loan_status: 'ACTIVE' | 'REPAID' | 'LIQUIDATED' | 'DEFAULTED';
107
+ };
108
+ };
109
+ }
110
+
111
+ interface SiteContent {
112
+ key: string;
113
+ value: string;
114
+ value_type: 'text' | 'json' | 'richtext';
115
+ updated_at: string;
116
+ updated_by: string | null;
117
+ }
118
+
119
+ type UserType = 'INDIVIDUAL' | 'INSTITUTIONAL';
120
+ type KYCStatus = 'PENDING' | 'IN_REVIEW' | 'VERIFIED' | 'REJECTED' | 'EXPIRED';
121
+ type AccreditationLevel = 'RETAIL' | 'QUALIFIED' | 'PROFESSIONAL';
122
+ interface User {
123
+ id: string;
124
+ email: string;
125
+ userType: UserType;
126
+ kycStatus: KYCStatus;
127
+ accreditationLevel?: AccreditationLevel;
128
+ primaryJurisdiction?: string;
129
+ allowedJurisdictions: string[];
130
+ kycProviderId?: string;
131
+ kycVerifiedAt?: Date;
132
+ kycExpiresAt?: Date;
133
+ amlStatus: KYCStatus;
134
+ amlLastCheck?: Date;
135
+ metadata: Record<string, unknown>;
136
+ createdAt: Date;
137
+ updatedAt: Date;
138
+ }
139
+ interface Organization {
140
+ id: string;
141
+ name: string;
142
+ legalName: string;
143
+ taxId: string;
144
+ jurisdiction: string;
145
+ kybStatus: KYCStatus;
146
+ licenses: License[];
147
+ representatives: string[];
148
+ metadata: Record<string, unknown>;
149
+ createdAt: Date;
150
+ updatedAt: Date;
151
+ }
152
+ interface License {
153
+ type: string;
154
+ number: string;
155
+ issuedBy: string;
156
+ issuedAt: Date;
157
+ expiresAt?: Date;
158
+ jurisdiction: string;
159
+ }
160
+
161
+ type AssetType = 'REAL_ESTATE' | 'CREDIT' | 'COMMODITY' | 'EQUITY';
162
+ type Chain = 'ETHEREUM' | 'POLYGON' | 'ARBITRUM';
163
+ type TokenStandard = 'ERC3643' | 'ERC1400' | 'ERC20';
164
+ interface Asset {
165
+ id: string;
166
+ issuerId: string;
167
+ assetType: AssetType;
168
+ name: string;
169
+ symbol: string;
170
+ description?: string;
171
+ underlyingAsset: UnderlyingAsset;
172
+ legalDocuments: LegalDocument[];
173
+ complianceRules: ComplianceRules;
174
+ eligibleJurisdictions: string[];
175
+ eligibleAccreditation: AccreditationLevel[];
176
+ metadata: Record<string, unknown>;
177
+ createdAt: Date;
178
+ updatedAt: Date;
179
+ }
180
+ interface UnderlyingAsset {
181
+ type: string;
182
+ description: string;
183
+ location?: string;
184
+ valuation: number;
185
+ valuationDate: Date;
186
+ valuationCurrency: string;
187
+ documents: string[];
188
+ attributes: Record<string, unknown>;
189
+ }
190
+ interface LegalDocument {
191
+ type: string;
192
+ name: string;
193
+ url: string;
194
+ hash?: string;
195
+ uploadedAt: Date;
196
+ }
197
+ interface ComplianceRules {
198
+ maxHolders?: number;
199
+ maxBalancePerHolder?: bigint;
200
+ transferRestrictions?: TransferRestriction[];
201
+ lockupPeriod?: number;
202
+ whitelistOnly?: boolean;
203
+ }
204
+ interface TransferRestriction {
205
+ type: 'COUNTRY' | 'ACCREDITATION' | 'TIMELOCK' | 'CUSTOM';
206
+ params: Record<string, unknown>;
207
+ }
208
+ interface TokenContract {
209
+ id: string;
210
+ assetId: string;
211
+ chain: Chain;
212
+ address: string;
213
+ standard: TokenStandard;
214
+ identityRegistryAddress?: string;
215
+ complianceAddress?: string;
216
+ totalSupply: bigint;
217
+ decimals: number;
218
+ isTransferable: boolean;
219
+ deployTxHash?: string;
220
+ deployedAt?: Date;
221
+ metadata: Record<string, unknown>;
222
+ createdAt: Date;
223
+ }
224
+
225
+ type OfferingStatus = 'DRAFT' | 'PENDING_APPROVAL' | 'OPEN' | 'CLOSED' | 'CANCELLED';
226
+ type OfferingType = 'PRIMARY' | 'SECONDARY';
227
+ interface Offering {
228
+ id: string;
229
+ assetId: string;
230
+ status: OfferingStatus;
231
+ offeringType: OfferingType;
232
+ pricePerToken: number;
233
+ currency: string;
234
+ minInvestment?: number;
235
+ maxInvestment?: number;
236
+ softCap?: number;
237
+ hardCap?: number;
238
+ tokensAvailable: bigint;
239
+ tokensSold: bigint;
240
+ startsAt?: Date;
241
+ endsAt?: Date;
242
+ escrowAddress?: string;
243
+ legalDocuments: string[];
244
+ metadata: Record<string, unknown>;
245
+ createdAt: Date;
246
+ updatedAt: Date;
247
+ }
248
+ interface Subscription {
249
+ id: string;
250
+ offeringId: string;
251
+ userId: string;
252
+ walletId: string;
253
+ amount: number;
254
+ tokensAllocated?: bigint;
255
+ status: SubscriptionStatus;
256
+ paymentTxHash?: string;
257
+ settlementTxHash?: string;
258
+ complianceApproved?: boolean;
259
+ createdAt: Date;
260
+ updatedAt: Date;
261
+ }
262
+ type SubscriptionStatus = 'PENDING' | 'CONFIRMED' | 'SETTLED' | 'REFUNDED' | 'CANCELLED';
263
+
264
+ type OrderSide = 'BUY' | 'SELL';
265
+ type OrderType = 'MARKET' | 'LIMIT';
266
+ type OrderStatus = 'PENDING' | 'OPEN' | 'PARTIAL' | 'FILLED' | 'CANCELLED';
267
+ interface Order {
268
+ id: string;
269
+ userId: string;
270
+ walletId: string;
271
+ assetId: string;
272
+ orderSide: OrderSide;
273
+ orderType: OrderType;
274
+ status: OrderStatus;
275
+ quantity: bigint;
276
+ price?: number;
277
+ filledQuantity: bigint;
278
+ averageFillPrice?: number;
279
+ complianceCheckPassed?: boolean;
280
+ complianceCheckDetails?: Record<string, unknown>;
281
+ expiresAt?: Date;
282
+ cancelledAt?: Date;
283
+ createdAt: Date;
284
+ updatedAt: Date;
285
+ }
286
+ interface Trade {
287
+ id: string;
288
+ buyOrderId: string;
289
+ sellOrderId: string;
290
+ assetId: string;
291
+ quantity: bigint;
292
+ price: number;
293
+ totalValue: number;
294
+ feeAmount: number;
295
+ settlementStatus: SettlementStatus;
296
+ settlementTxHash?: string;
297
+ settledAt?: Date;
298
+ createdAt: Date;
299
+ }
300
+ type SettlementStatus = 'PENDING' | 'SETTLED' | 'FAILED';
301
+
302
+ type WalletType = 'CUSTODIAL' | 'SELF_CUSTODY';
303
+ type CustodianProvider = 'FIREBLOCKS' | 'BITGO' | 'SELF';
304
+ interface Wallet {
305
+ id: string;
306
+ ownerId: string;
307
+ walletType: WalletType;
308
+ chain: Chain;
309
+ address: string;
310
+ custodianProvider?: CustodianProvider;
311
+ custodianVaultId?: string;
312
+ custodianAccountId?: string;
313
+ isPrimary: boolean;
314
+ isVerified: boolean;
315
+ attestationSignature?: string;
316
+ metadata: Record<string, unknown>;
317
+ createdAt: Date;
318
+ }
319
+ interface TokenBalance {
320
+ walletId: string;
321
+ tokenAddress: string;
322
+ chain: Chain;
323
+ balance: bigint;
324
+ lockedBalance: bigint;
325
+ lastUpdated: Date;
326
+ }
327
+
328
+ type VaultStrategy = 'STAKING' | 'FIXED_INCOME' | 'LENDING' | 'LP_REWARDS';
329
+ type VaultStatus = 'ACTIVE' | 'PAUSED' | 'DEPRECATED';
330
+ type LoanStatus = 'ACTIVE' | 'REPAID' | 'LIQUIDATED' | 'DEFAULTED';
331
+ interface YieldVault {
332
+ id: string;
333
+ assetId: string;
334
+ name: string;
335
+ strategy: VaultStrategy;
336
+ status: VaultStatus;
337
+ apyCurrent?: number;
338
+ apy7dAvg?: number;
339
+ apy30dAvg?: number;
340
+ tvl: number;
341
+ minDeposit?: number;
342
+ maxDeposit?: number;
343
+ lockPeriodDays: number;
344
+ performanceFee: number;
345
+ managementFee: number;
346
+ vaultAddress?: string;
347
+ chain: Chain;
348
+ riskRating?: string;
349
+ metadata: Record<string, unknown>;
350
+ createdAt: Date;
351
+ updatedAt: Date;
352
+ }
353
+ interface VaultDeposit {
354
+ id: string;
355
+ vaultId: string;
356
+ userId: string;
357
+ walletId: string;
358
+ shares: bigint;
359
+ depositedAmount: number;
360
+ currentValue?: number;
361
+ unrealizedYield: number;
362
+ depositTxHash?: string;
363
+ depositedAt: Date;
364
+ lastClaimAt?: Date;
365
+ metadata: Record<string, unknown>;
366
+ createdAt: Date;
367
+ }
368
+ interface LendingPosition {
369
+ id: string;
370
+ borrowerId: string;
371
+ collateralAssetId: string;
372
+ collateralAmount: bigint;
373
+ collateralValueAtOrigination: number;
374
+ borrowedAmount: number;
375
+ interestRate: number;
376
+ accruedInterest: number;
377
+ ltvAtOrigination: number;
378
+ currentLtv?: number;
379
+ liquidationThreshold: number;
380
+ status: LoanStatus;
381
+ originationDate: Date;
382
+ maturityDate?: Date;
383
+ repaidAmount: number;
384
+ liquidationTxHash?: string;
385
+ chain: Chain;
386
+ metadata: Record<string, unknown>;
387
+ createdAt: Date;
388
+ updatedAt: Date;
389
+ }
390
+ interface YieldDistribution {
391
+ id: string;
392
+ vaultId: string;
393
+ periodStart: Date;
394
+ periodEnd: Date;
395
+ totalYield: number;
396
+ platformFee: number;
397
+ distributedYield: number;
398
+ distributionTxHash?: string;
399
+ distributedAt?: Date;
400
+ metadata: Record<string, unknown>;
401
+ createdAt: Date;
402
+ }
403
+ interface RiskParameters {
404
+ assetType: string;
405
+ maxLTV: number;
406
+ liquidationThreshold: number;
407
+ interestBase: number;
408
+ }
409
+
410
+ interface ComplianceCheck {
411
+ id: string;
412
+ userId: string;
413
+ checkType: ComplianceCheckType;
414
+ status: ComplianceCheckStatus;
415
+ provider: string;
416
+ result?: ComplianceCheckResult;
417
+ externalId?: string;
418
+ checkedAt: Date;
419
+ expiresAt?: Date;
420
+ metadata: Record<string, unknown>;
421
+ }
422
+ type ComplianceCheckType = 'KYC' | 'KYB' | 'AML' | 'SANCTIONS' | 'PEP' | 'ACCREDITATION';
423
+ type ComplianceCheckStatus = 'PENDING' | 'IN_PROGRESS' | 'PASSED' | 'FAILED' | 'EXPIRED';
424
+ interface ComplianceCheckResult {
425
+ passed: boolean;
426
+ score?: number;
427
+ riskLevel?: 'LOW' | 'MEDIUM' | 'HIGH';
428
+ alerts?: ComplianceAlert[];
429
+ details?: Record<string, unknown>;
430
+ }
431
+ interface ComplianceAlert {
432
+ type: string;
433
+ severity: 'INFO' | 'WARNING' | 'CRITICAL';
434
+ message: string;
435
+ data?: Record<string, unknown>;
436
+ }
437
+ interface Claim {
438
+ topic: number;
439
+ scheme: number;
440
+ issuer: string;
441
+ signature: string;
442
+ data: string;
443
+ uri?: string;
444
+ }
445
+ declare const CLAIM_TOPICS: {
446
+ readonly KYC: 1;
447
+ readonly ACCREDITATION: 2;
448
+ readonly COUNTRY: 3;
449
+ readonly AML_CLEAR: 4;
450
+ readonly INVESTOR_TYPE: 5;
451
+ };
452
+ type ClaimTopic = (typeof CLAIM_TOPICS)[keyof typeof CLAIM_TOPICS];
453
+
454
+ interface ApiResponse<T> {
455
+ success: boolean;
456
+ data?: T;
457
+ error?: ApiError;
458
+ meta?: ApiMeta;
459
+ }
460
+ interface ApiError {
461
+ code: string;
462
+ message: string;
463
+ details?: Record<string, unknown>;
464
+ }
465
+ interface ApiMeta {
466
+ page?: number;
467
+ perPage?: number;
468
+ total?: number;
469
+ hasMore?: boolean;
470
+ }
471
+ interface PaginatedResponse<T> {
472
+ items: T[];
473
+ meta: Required<Pick<ApiMeta, 'page' | 'perPage' | 'total' | 'hasMore'>>;
474
+ }
475
+
476
+ interface PaginationParams {
477
+ page?: number;
478
+ perPage?: number;
479
+ sortBy?: string;
480
+ sortOrder?: 'asc' | 'desc';
481
+ }
482
+ interface CreateAssetRequest {
483
+ assetType: AssetType;
484
+ name: string;
485
+ symbol: string;
486
+ description?: string;
487
+ underlyingAsset: {
488
+ type: string;
489
+ description: string;
490
+ valuation: number;
491
+ valuationCurrency: string;
492
+ };
493
+ eligibleJurisdictions: string[];
494
+ }
495
+ interface CreateOfferingRequest {
496
+ assetId: string;
497
+ pricePerToken: number;
498
+ currency: string;
499
+ minInvestment?: number;
500
+ maxInvestment?: number;
501
+ softCap?: number;
502
+ hardCap?: number;
503
+ tokensAvailable: string;
504
+ startsAt?: string;
505
+ endsAt?: string;
506
+ }
507
+ interface CreateOrderRequest {
508
+ assetId: string;
509
+ walletId: string;
510
+ orderSide: OrderSide;
511
+ orderType: OrderType;
512
+ quantity: string;
513
+ price?: number;
514
+ expiresAt?: string;
515
+ }
516
+ interface CreateVaultDepositRequest {
517
+ vaultId: string;
518
+ walletId: string;
519
+ amount: number;
520
+ }
521
+ interface CreateLendingPositionRequest {
522
+ collateralAssetId: string;
523
+ collateralAmount: string;
524
+ borrowAmount: number;
525
+ chain: Chain;
526
+ }
527
+ interface TokenizeAssetRequest {
528
+ assetId: string;
529
+ chain: Chain;
530
+ totalSupply: string;
531
+ decimals?: number;
532
+ complianceModules?: string[];
533
+ }
534
+
535
+ interface ContractAddresses {
536
+ rwaTokenImplementation: Address;
537
+ tokenFactory: Address;
538
+ }
539
+ interface DeployedToken {
540
+ address: Address;
541
+ chain: number;
542
+ deployTxHash: Hash;
543
+ blockNumber: bigint;
544
+ }
545
+ interface TransactionReceipt {
546
+ hash: Hash;
547
+ blockNumber: bigint;
548
+ blockHash: Hash;
549
+ status: 'success' | 'reverted';
550
+ gasUsed: bigint;
551
+ effectiveGasPrice: bigint;
552
+ }
553
+
554
+ interface TokenInfo {
555
+ address: Address;
556
+ name: string;
557
+ symbol: string;
558
+ decimals: number;
559
+ totalSupply: bigint;
560
+ chainId: number;
561
+ }
562
+ interface OnchainTokenBalance {
563
+ token: Address;
564
+ balance: bigint;
565
+ lockedBalance: bigint;
566
+ }
567
+ interface TokenTransfer {
568
+ from: Address;
569
+ to: Address;
570
+ amount: bigint;
571
+ txHash: string;
572
+ blockNumber: bigint;
573
+ timestamp: number;
574
+ }
575
+ interface TokenHolder {
576
+ address: Address;
577
+ balance: bigint;
578
+ percentage: number;
579
+ }
580
+ interface VaultShareInfo {
581
+ vaultAddress: Address;
582
+ shares: bigint;
583
+ assetsDeposited: bigint;
584
+ currentValue: bigint;
585
+ pendingYield: bigint;
586
+ }
587
+
588
+ export { type AccreditationLevel, type ApiError, type ApiMeta, type ApiResponse, type Asset, type AssetType, CLAIM_TOPICS, type Chain, type Claim, type ClaimTopic, type ComplianceAlert, type ComplianceCheck, type ComplianceCheckResult, type ComplianceCheckStatus, type ComplianceCheckType, type ComplianceRules, type ContractAddresses, type CreateAssetRequest, type CreateLendingPositionRequest, type CreateOfferingRequest, type CreateOrderRequest, type CreateVaultDepositRequest, type CustodianProvider, type Database, type DeployedToken, type KYCStatus, type LegalDocument, type LendingPosition, type License, type LoanStatus, type Offering, type OfferingStatus, type OfferingType, type OnchainTokenBalance, type Order, type OrderSide, type OrderStatus, type OrderType, type Organization, type PaginatedResponse, type PaginationParams, type RiskParameters, type SettlementStatus, type SiteContent, type Subscription, type SubscriptionStatus, type TokenBalance, type TokenContract, type TokenHolder, type TokenInfo, type TokenStandard, type TokenTransfer, type TokenizeAssetRequest, type Trade, type TransactionReceipt, type TransferRestriction, type UnderlyingAsset, type User, type UserType, type VaultDeposit, type VaultShareInfo, type VaultStatus, type VaultStrategy, type Wallet, type WalletType, type YieldDistribution, type YieldVault };
@@ -0,0 +1,588 @@
1
+ import { Address, Hash } from 'viem';
2
+
3
+ /**
4
+ * Database types generated by Supabase CLI
5
+ * Run: pnpm db:generate to update this file
6
+ *
7
+ * This is a placeholder. The actual types will be generated from your Supabase schema.
8
+ */
9
+ interface Database {
10
+ public: {
11
+ Tables: {
12
+ profiles: {
13
+ Row: {
14
+ id: string;
15
+ user_type: 'INDIVIDUAL' | 'INSTITUTIONAL';
16
+ kyc_status: 'PENDING' | 'IN_REVIEW' | 'VERIFIED' | 'REJECTED' | 'EXPIRED';
17
+ accreditation_level: 'RETAIL' | 'QUALIFIED' | 'PROFESSIONAL' | null;
18
+ primary_jurisdiction: string | null;
19
+ allowed_jurisdictions: string[];
20
+ kyc_provider_id: string | null;
21
+ kyc_verified_at: string | null;
22
+ kyc_expires_at: string | null;
23
+ aml_status: 'PENDING' | 'IN_REVIEW' | 'VERIFIED' | 'REJECTED' | 'EXPIRED';
24
+ aml_last_check: string | null;
25
+ metadata: Record<string, unknown>;
26
+ created_at: string;
27
+ updated_at: string;
28
+ };
29
+ Insert: Omit<Database['public']['Tables']['profiles']['Row'], 'created_at' | 'updated_at'>;
30
+ Update: Partial<Database['public']['Tables']['profiles']['Insert']>;
31
+ };
32
+ organizations: {
33
+ Row: {
34
+ id: string;
35
+ name: string;
36
+ legal_name: string;
37
+ tax_id: string;
38
+ jurisdiction: string;
39
+ kyb_status: 'PENDING' | 'IN_REVIEW' | 'VERIFIED' | 'REJECTED' | 'EXPIRED';
40
+ licenses: Record<string, unknown>[];
41
+ representatives: string[];
42
+ metadata: Record<string, unknown>;
43
+ created_at: string;
44
+ updated_at: string;
45
+ };
46
+ Insert: Omit<Database['public']['Tables']['organizations']['Row'], 'id' | 'created_at' | 'updated_at'>;
47
+ Update: Partial<Database['public']['Tables']['organizations']['Insert']>;
48
+ };
49
+ assets: {
50
+ Row: {
51
+ id: string;
52
+ issuer_id: string | null;
53
+ asset_type: 'REAL_ESTATE' | 'CREDIT' | 'COMMODITY' | 'EQUITY';
54
+ name: string;
55
+ symbol: string;
56
+ description: string | null;
57
+ underlying_asset: Record<string, unknown>;
58
+ legal_documents: Record<string, unknown>[];
59
+ compliance_rules: Record<string, unknown>;
60
+ eligible_jurisdictions: string[];
61
+ eligible_accreditation: ('RETAIL' | 'QUALIFIED' | 'PROFESSIONAL')[];
62
+ metadata: Record<string, unknown>;
63
+ created_at: string;
64
+ updated_at: string;
65
+ };
66
+ Insert: Omit<Database['public']['Tables']['assets']['Row'], 'id' | 'created_at' | 'updated_at'>;
67
+ Update: Partial<Database['public']['Tables']['assets']['Insert']>;
68
+ };
69
+ site_content: {
70
+ Row: {
71
+ key: string;
72
+ value: string;
73
+ value_type: 'text' | 'json' | 'richtext';
74
+ updated_at: string;
75
+ updated_by: string | null;
76
+ };
77
+ Insert: {
78
+ key: string;
79
+ value: string;
80
+ value_type?: 'text' | 'json' | 'richtext';
81
+ updated_by?: string | null;
82
+ };
83
+ Update: {
84
+ key?: string;
85
+ value?: string;
86
+ value_type?: 'text' | 'json' | 'richtext';
87
+ updated_by?: string | null;
88
+ };
89
+ };
90
+ };
91
+ Views: Record<string, never>;
92
+ Functions: Record<string, never>;
93
+ Enums: {
94
+ user_type: 'INDIVIDUAL' | 'INSTITUTIONAL';
95
+ kyc_status: 'PENDING' | 'IN_REVIEW' | 'VERIFIED' | 'REJECTED' | 'EXPIRED';
96
+ accreditation_level: 'RETAIL' | 'QUALIFIED' | 'PROFESSIONAL';
97
+ asset_type: 'REAL_ESTATE' | 'CREDIT' | 'COMMODITY' | 'EQUITY';
98
+ offering_status: 'DRAFT' | 'PENDING_APPROVAL' | 'OPEN' | 'CLOSED' | 'CANCELLED';
99
+ order_side: 'BUY' | 'SELL';
100
+ order_type: 'MARKET' | 'LIMIT';
101
+ order_status: 'PENDING' | 'OPEN' | 'PARTIAL' | 'FILLED' | 'CANCELLED';
102
+ wallet_type: 'CUSTODIAL' | 'SELF_CUSTODY';
103
+ chain: 'ETHEREUM' | 'POLYGON' | 'ARBITRUM';
104
+ vault_strategy: 'STAKING' | 'FIXED_INCOME' | 'LENDING' | 'LP_REWARDS';
105
+ vault_status: 'ACTIVE' | 'PAUSED' | 'DEPRECATED';
106
+ loan_status: 'ACTIVE' | 'REPAID' | 'LIQUIDATED' | 'DEFAULTED';
107
+ };
108
+ };
109
+ }
110
+
111
+ interface SiteContent {
112
+ key: string;
113
+ value: string;
114
+ value_type: 'text' | 'json' | 'richtext';
115
+ updated_at: string;
116
+ updated_by: string | null;
117
+ }
118
+
119
+ type UserType = 'INDIVIDUAL' | 'INSTITUTIONAL';
120
+ type KYCStatus = 'PENDING' | 'IN_REVIEW' | 'VERIFIED' | 'REJECTED' | 'EXPIRED';
121
+ type AccreditationLevel = 'RETAIL' | 'QUALIFIED' | 'PROFESSIONAL';
122
+ interface User {
123
+ id: string;
124
+ email: string;
125
+ userType: UserType;
126
+ kycStatus: KYCStatus;
127
+ accreditationLevel?: AccreditationLevel;
128
+ primaryJurisdiction?: string;
129
+ allowedJurisdictions: string[];
130
+ kycProviderId?: string;
131
+ kycVerifiedAt?: Date;
132
+ kycExpiresAt?: Date;
133
+ amlStatus: KYCStatus;
134
+ amlLastCheck?: Date;
135
+ metadata: Record<string, unknown>;
136
+ createdAt: Date;
137
+ updatedAt: Date;
138
+ }
139
+ interface Organization {
140
+ id: string;
141
+ name: string;
142
+ legalName: string;
143
+ taxId: string;
144
+ jurisdiction: string;
145
+ kybStatus: KYCStatus;
146
+ licenses: License[];
147
+ representatives: string[];
148
+ metadata: Record<string, unknown>;
149
+ createdAt: Date;
150
+ updatedAt: Date;
151
+ }
152
+ interface License {
153
+ type: string;
154
+ number: string;
155
+ issuedBy: string;
156
+ issuedAt: Date;
157
+ expiresAt?: Date;
158
+ jurisdiction: string;
159
+ }
160
+
161
+ type AssetType = 'REAL_ESTATE' | 'CREDIT' | 'COMMODITY' | 'EQUITY';
162
+ type Chain = 'ETHEREUM' | 'POLYGON' | 'ARBITRUM';
163
+ type TokenStandard = 'ERC3643' | 'ERC1400' | 'ERC20';
164
+ interface Asset {
165
+ id: string;
166
+ issuerId: string;
167
+ assetType: AssetType;
168
+ name: string;
169
+ symbol: string;
170
+ description?: string;
171
+ underlyingAsset: UnderlyingAsset;
172
+ legalDocuments: LegalDocument[];
173
+ complianceRules: ComplianceRules;
174
+ eligibleJurisdictions: string[];
175
+ eligibleAccreditation: AccreditationLevel[];
176
+ metadata: Record<string, unknown>;
177
+ createdAt: Date;
178
+ updatedAt: Date;
179
+ }
180
+ interface UnderlyingAsset {
181
+ type: string;
182
+ description: string;
183
+ location?: string;
184
+ valuation: number;
185
+ valuationDate: Date;
186
+ valuationCurrency: string;
187
+ documents: string[];
188
+ attributes: Record<string, unknown>;
189
+ }
190
+ interface LegalDocument {
191
+ type: string;
192
+ name: string;
193
+ url: string;
194
+ hash?: string;
195
+ uploadedAt: Date;
196
+ }
197
+ interface ComplianceRules {
198
+ maxHolders?: number;
199
+ maxBalancePerHolder?: bigint;
200
+ transferRestrictions?: TransferRestriction[];
201
+ lockupPeriod?: number;
202
+ whitelistOnly?: boolean;
203
+ }
204
+ interface TransferRestriction {
205
+ type: 'COUNTRY' | 'ACCREDITATION' | 'TIMELOCK' | 'CUSTOM';
206
+ params: Record<string, unknown>;
207
+ }
208
+ interface TokenContract {
209
+ id: string;
210
+ assetId: string;
211
+ chain: Chain;
212
+ address: string;
213
+ standard: TokenStandard;
214
+ identityRegistryAddress?: string;
215
+ complianceAddress?: string;
216
+ totalSupply: bigint;
217
+ decimals: number;
218
+ isTransferable: boolean;
219
+ deployTxHash?: string;
220
+ deployedAt?: Date;
221
+ metadata: Record<string, unknown>;
222
+ createdAt: Date;
223
+ }
224
+
225
+ type OfferingStatus = 'DRAFT' | 'PENDING_APPROVAL' | 'OPEN' | 'CLOSED' | 'CANCELLED';
226
+ type OfferingType = 'PRIMARY' | 'SECONDARY';
227
+ interface Offering {
228
+ id: string;
229
+ assetId: string;
230
+ status: OfferingStatus;
231
+ offeringType: OfferingType;
232
+ pricePerToken: number;
233
+ currency: string;
234
+ minInvestment?: number;
235
+ maxInvestment?: number;
236
+ softCap?: number;
237
+ hardCap?: number;
238
+ tokensAvailable: bigint;
239
+ tokensSold: bigint;
240
+ startsAt?: Date;
241
+ endsAt?: Date;
242
+ escrowAddress?: string;
243
+ legalDocuments: string[];
244
+ metadata: Record<string, unknown>;
245
+ createdAt: Date;
246
+ updatedAt: Date;
247
+ }
248
+ interface Subscription {
249
+ id: string;
250
+ offeringId: string;
251
+ userId: string;
252
+ walletId: string;
253
+ amount: number;
254
+ tokensAllocated?: bigint;
255
+ status: SubscriptionStatus;
256
+ paymentTxHash?: string;
257
+ settlementTxHash?: string;
258
+ complianceApproved?: boolean;
259
+ createdAt: Date;
260
+ updatedAt: Date;
261
+ }
262
+ type SubscriptionStatus = 'PENDING' | 'CONFIRMED' | 'SETTLED' | 'REFUNDED' | 'CANCELLED';
263
+
264
+ type OrderSide = 'BUY' | 'SELL';
265
+ type OrderType = 'MARKET' | 'LIMIT';
266
+ type OrderStatus = 'PENDING' | 'OPEN' | 'PARTIAL' | 'FILLED' | 'CANCELLED';
267
+ interface Order {
268
+ id: string;
269
+ userId: string;
270
+ walletId: string;
271
+ assetId: string;
272
+ orderSide: OrderSide;
273
+ orderType: OrderType;
274
+ status: OrderStatus;
275
+ quantity: bigint;
276
+ price?: number;
277
+ filledQuantity: bigint;
278
+ averageFillPrice?: number;
279
+ complianceCheckPassed?: boolean;
280
+ complianceCheckDetails?: Record<string, unknown>;
281
+ expiresAt?: Date;
282
+ cancelledAt?: Date;
283
+ createdAt: Date;
284
+ updatedAt: Date;
285
+ }
286
+ interface Trade {
287
+ id: string;
288
+ buyOrderId: string;
289
+ sellOrderId: string;
290
+ assetId: string;
291
+ quantity: bigint;
292
+ price: number;
293
+ totalValue: number;
294
+ feeAmount: number;
295
+ settlementStatus: SettlementStatus;
296
+ settlementTxHash?: string;
297
+ settledAt?: Date;
298
+ createdAt: Date;
299
+ }
300
+ type SettlementStatus = 'PENDING' | 'SETTLED' | 'FAILED';
301
+
302
+ type WalletType = 'CUSTODIAL' | 'SELF_CUSTODY';
303
+ type CustodianProvider = 'FIREBLOCKS' | 'BITGO' | 'SELF';
304
+ interface Wallet {
305
+ id: string;
306
+ ownerId: string;
307
+ walletType: WalletType;
308
+ chain: Chain;
309
+ address: string;
310
+ custodianProvider?: CustodianProvider;
311
+ custodianVaultId?: string;
312
+ custodianAccountId?: string;
313
+ isPrimary: boolean;
314
+ isVerified: boolean;
315
+ attestationSignature?: string;
316
+ metadata: Record<string, unknown>;
317
+ createdAt: Date;
318
+ }
319
+ interface TokenBalance {
320
+ walletId: string;
321
+ tokenAddress: string;
322
+ chain: Chain;
323
+ balance: bigint;
324
+ lockedBalance: bigint;
325
+ lastUpdated: Date;
326
+ }
327
+
328
+ type VaultStrategy = 'STAKING' | 'FIXED_INCOME' | 'LENDING' | 'LP_REWARDS';
329
+ type VaultStatus = 'ACTIVE' | 'PAUSED' | 'DEPRECATED';
330
+ type LoanStatus = 'ACTIVE' | 'REPAID' | 'LIQUIDATED' | 'DEFAULTED';
331
+ interface YieldVault {
332
+ id: string;
333
+ assetId: string;
334
+ name: string;
335
+ strategy: VaultStrategy;
336
+ status: VaultStatus;
337
+ apyCurrent?: number;
338
+ apy7dAvg?: number;
339
+ apy30dAvg?: number;
340
+ tvl: number;
341
+ minDeposit?: number;
342
+ maxDeposit?: number;
343
+ lockPeriodDays: number;
344
+ performanceFee: number;
345
+ managementFee: number;
346
+ vaultAddress?: string;
347
+ chain: Chain;
348
+ riskRating?: string;
349
+ metadata: Record<string, unknown>;
350
+ createdAt: Date;
351
+ updatedAt: Date;
352
+ }
353
+ interface VaultDeposit {
354
+ id: string;
355
+ vaultId: string;
356
+ userId: string;
357
+ walletId: string;
358
+ shares: bigint;
359
+ depositedAmount: number;
360
+ currentValue?: number;
361
+ unrealizedYield: number;
362
+ depositTxHash?: string;
363
+ depositedAt: Date;
364
+ lastClaimAt?: Date;
365
+ metadata: Record<string, unknown>;
366
+ createdAt: Date;
367
+ }
368
+ interface LendingPosition {
369
+ id: string;
370
+ borrowerId: string;
371
+ collateralAssetId: string;
372
+ collateralAmount: bigint;
373
+ collateralValueAtOrigination: number;
374
+ borrowedAmount: number;
375
+ interestRate: number;
376
+ accruedInterest: number;
377
+ ltvAtOrigination: number;
378
+ currentLtv?: number;
379
+ liquidationThreshold: number;
380
+ status: LoanStatus;
381
+ originationDate: Date;
382
+ maturityDate?: Date;
383
+ repaidAmount: number;
384
+ liquidationTxHash?: string;
385
+ chain: Chain;
386
+ metadata: Record<string, unknown>;
387
+ createdAt: Date;
388
+ updatedAt: Date;
389
+ }
390
+ interface YieldDistribution {
391
+ id: string;
392
+ vaultId: string;
393
+ periodStart: Date;
394
+ periodEnd: Date;
395
+ totalYield: number;
396
+ platformFee: number;
397
+ distributedYield: number;
398
+ distributionTxHash?: string;
399
+ distributedAt?: Date;
400
+ metadata: Record<string, unknown>;
401
+ createdAt: Date;
402
+ }
403
+ interface RiskParameters {
404
+ assetType: string;
405
+ maxLTV: number;
406
+ liquidationThreshold: number;
407
+ interestBase: number;
408
+ }
409
+
410
+ interface ComplianceCheck {
411
+ id: string;
412
+ userId: string;
413
+ checkType: ComplianceCheckType;
414
+ status: ComplianceCheckStatus;
415
+ provider: string;
416
+ result?: ComplianceCheckResult;
417
+ externalId?: string;
418
+ checkedAt: Date;
419
+ expiresAt?: Date;
420
+ metadata: Record<string, unknown>;
421
+ }
422
+ type ComplianceCheckType = 'KYC' | 'KYB' | 'AML' | 'SANCTIONS' | 'PEP' | 'ACCREDITATION';
423
+ type ComplianceCheckStatus = 'PENDING' | 'IN_PROGRESS' | 'PASSED' | 'FAILED' | 'EXPIRED';
424
+ interface ComplianceCheckResult {
425
+ passed: boolean;
426
+ score?: number;
427
+ riskLevel?: 'LOW' | 'MEDIUM' | 'HIGH';
428
+ alerts?: ComplianceAlert[];
429
+ details?: Record<string, unknown>;
430
+ }
431
+ interface ComplianceAlert {
432
+ type: string;
433
+ severity: 'INFO' | 'WARNING' | 'CRITICAL';
434
+ message: string;
435
+ data?: Record<string, unknown>;
436
+ }
437
+ interface Claim {
438
+ topic: number;
439
+ scheme: number;
440
+ issuer: string;
441
+ signature: string;
442
+ data: string;
443
+ uri?: string;
444
+ }
445
+ declare const CLAIM_TOPICS: {
446
+ readonly KYC: 1;
447
+ readonly ACCREDITATION: 2;
448
+ readonly COUNTRY: 3;
449
+ readonly AML_CLEAR: 4;
450
+ readonly INVESTOR_TYPE: 5;
451
+ };
452
+ type ClaimTopic = (typeof CLAIM_TOPICS)[keyof typeof CLAIM_TOPICS];
453
+
454
+ interface ApiResponse<T> {
455
+ success: boolean;
456
+ data?: T;
457
+ error?: ApiError;
458
+ meta?: ApiMeta;
459
+ }
460
+ interface ApiError {
461
+ code: string;
462
+ message: string;
463
+ details?: Record<string, unknown>;
464
+ }
465
+ interface ApiMeta {
466
+ page?: number;
467
+ perPage?: number;
468
+ total?: number;
469
+ hasMore?: boolean;
470
+ }
471
+ interface PaginatedResponse<T> {
472
+ items: T[];
473
+ meta: Required<Pick<ApiMeta, 'page' | 'perPage' | 'total' | 'hasMore'>>;
474
+ }
475
+
476
+ interface PaginationParams {
477
+ page?: number;
478
+ perPage?: number;
479
+ sortBy?: string;
480
+ sortOrder?: 'asc' | 'desc';
481
+ }
482
+ interface CreateAssetRequest {
483
+ assetType: AssetType;
484
+ name: string;
485
+ symbol: string;
486
+ description?: string;
487
+ underlyingAsset: {
488
+ type: string;
489
+ description: string;
490
+ valuation: number;
491
+ valuationCurrency: string;
492
+ };
493
+ eligibleJurisdictions: string[];
494
+ }
495
+ interface CreateOfferingRequest {
496
+ assetId: string;
497
+ pricePerToken: number;
498
+ currency: string;
499
+ minInvestment?: number;
500
+ maxInvestment?: number;
501
+ softCap?: number;
502
+ hardCap?: number;
503
+ tokensAvailable: string;
504
+ startsAt?: string;
505
+ endsAt?: string;
506
+ }
507
+ interface CreateOrderRequest {
508
+ assetId: string;
509
+ walletId: string;
510
+ orderSide: OrderSide;
511
+ orderType: OrderType;
512
+ quantity: string;
513
+ price?: number;
514
+ expiresAt?: string;
515
+ }
516
+ interface CreateVaultDepositRequest {
517
+ vaultId: string;
518
+ walletId: string;
519
+ amount: number;
520
+ }
521
+ interface CreateLendingPositionRequest {
522
+ collateralAssetId: string;
523
+ collateralAmount: string;
524
+ borrowAmount: number;
525
+ chain: Chain;
526
+ }
527
+ interface TokenizeAssetRequest {
528
+ assetId: string;
529
+ chain: Chain;
530
+ totalSupply: string;
531
+ decimals?: number;
532
+ complianceModules?: string[];
533
+ }
534
+
535
+ interface ContractAddresses {
536
+ rwaTokenImplementation: Address;
537
+ tokenFactory: Address;
538
+ }
539
+ interface DeployedToken {
540
+ address: Address;
541
+ chain: number;
542
+ deployTxHash: Hash;
543
+ blockNumber: bigint;
544
+ }
545
+ interface TransactionReceipt {
546
+ hash: Hash;
547
+ blockNumber: bigint;
548
+ blockHash: Hash;
549
+ status: 'success' | 'reverted';
550
+ gasUsed: bigint;
551
+ effectiveGasPrice: bigint;
552
+ }
553
+
554
+ interface TokenInfo {
555
+ address: Address;
556
+ name: string;
557
+ symbol: string;
558
+ decimals: number;
559
+ totalSupply: bigint;
560
+ chainId: number;
561
+ }
562
+ interface OnchainTokenBalance {
563
+ token: Address;
564
+ balance: bigint;
565
+ lockedBalance: bigint;
566
+ }
567
+ interface TokenTransfer {
568
+ from: Address;
569
+ to: Address;
570
+ amount: bigint;
571
+ txHash: string;
572
+ blockNumber: bigint;
573
+ timestamp: number;
574
+ }
575
+ interface TokenHolder {
576
+ address: Address;
577
+ balance: bigint;
578
+ percentage: number;
579
+ }
580
+ interface VaultShareInfo {
581
+ vaultAddress: Address;
582
+ shares: bigint;
583
+ assetsDeposited: bigint;
584
+ currentValue: bigint;
585
+ pendingYield: bigint;
586
+ }
587
+
588
+ export { type AccreditationLevel, type ApiError, type ApiMeta, type ApiResponse, type Asset, type AssetType, CLAIM_TOPICS, type Chain, type Claim, type ClaimTopic, type ComplianceAlert, type ComplianceCheck, type ComplianceCheckResult, type ComplianceCheckStatus, type ComplianceCheckType, type ComplianceRules, type ContractAddresses, type CreateAssetRequest, type CreateLendingPositionRequest, type CreateOfferingRequest, type CreateOrderRequest, type CreateVaultDepositRequest, type CustodianProvider, type Database, type DeployedToken, type KYCStatus, type LegalDocument, type LendingPosition, type License, type LoanStatus, type Offering, type OfferingStatus, type OfferingType, type OnchainTokenBalance, type Order, type OrderSide, type OrderStatus, type OrderType, type Organization, type PaginatedResponse, type PaginationParams, type RiskParameters, type SettlementStatus, type SiteContent, type Subscription, type SubscriptionStatus, type TokenBalance, type TokenContract, type TokenHolder, type TokenInfo, type TokenStandard, type TokenTransfer, type TokenizeAssetRequest, type Trade, type TransactionReceipt, type TransferRestriction, type UnderlyingAsset, type User, type UserType, type VaultDeposit, type VaultShareInfo, type VaultStatus, type VaultStrategy, type Wallet, type WalletType, type YieldDistribution, type YieldVault };
package/dist/index.js ADDED
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ CLAIM_TOPICS: () => CLAIM_TOPICS
24
+ });
25
+ module.exports = __toCommonJS(index_exports);
26
+
27
+ // src/domain/compliance.ts
28
+ var CLAIM_TOPICS = {
29
+ KYC: 1,
30
+ ACCREDITATION: 2,
31
+ COUNTRY: 3,
32
+ AML_CLEAR: 4,
33
+ INVESTOR_TYPE: 5
34
+ };
35
+ // Annotate the CommonJS export names for ESM import in node:
36
+ 0 && (module.exports = {
37
+ CLAIM_TOPICS
38
+ });
package/dist/index.mjs ADDED
@@ -0,0 +1,11 @@
1
+ // src/domain/compliance.ts
2
+ var CLAIM_TOPICS = {
3
+ KYC: 1,
4
+ ACCREDITATION: 2,
5
+ COUNTRY: 3,
6
+ AML_CLEAR: 4,
7
+ INVESTOR_TYPE: 5
8
+ };
9
+ export {
10
+ CLAIM_TOPICS
11
+ };
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@straton/types",
3
+ "version": "1.1.2",
4
+ "description": "Shared TypeScript types for the Straton RWAFi platform",
5
+ "private": false,
6
+ "publishConfig": {
7
+ "access": "public"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/Straton-Finance/Straton-Packages.git",
12
+ "directory": "packages/types"
13
+ },
14
+ "main": "./dist/index.js",
15
+ "types": "./dist/index.d.ts",
16
+ "exports": {
17
+ ".": {
18
+ "types": "./dist/index.d.ts",
19
+ "import": "./dist/index.mjs",
20
+ "require": "./dist/index.js"
21
+ },
22
+ "./*": {
23
+ "types": "./dist/*.d.ts",
24
+ "import": "./dist/*.mjs",
25
+ "require": "./dist/*.js"
26
+ }
27
+ },
28
+ "files": [
29
+ "dist"
30
+ ],
31
+ "devDependencies": {
32
+ "tsup": "^8.3.5",
33
+ "typescript": "^5.7.2",
34
+ "viem": "^2.21.54"
35
+ },
36
+ "peerDependencies": {
37
+ "viem": "^2.0.0"
38
+ },
39
+ "peerDependenciesMeta": {
40
+ "viem": {
41
+ "optional": true
42
+ }
43
+ },
44
+ "module": "./dist/index.mjs",
45
+ "scripts": {
46
+ "build": "tsup src/index.ts --format esm,cjs --dts",
47
+ "typecheck": "tsc --noEmit",
48
+ "clean": "rm -rf dist"
49
+ }
50
+ }