credgate-sdk 1.0.2 → 1.0.3
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.
- package/README.md +69 -191
- package/dist/types.d.ts +0 -5
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -2
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# credgate-sdk
|
|
2
2
|
|
|
3
|
-
On-chain credit scoring for onchain
|
|
3
|
+
On-chain credit scoring for onchain protocols, powered by CreditCoin ZK proofs.
|
|
4
4
|
|
|
5
5
|
Any onchain protocol can use this SDK to:
|
|
6
6
|
- Analyze a wallet's on-chain credit score
|
|
@@ -8,6 +8,8 @@ Any onchain protocol can use this SDK to:
|
|
|
8
8
|
- Poll CreditCoin ZK proof status
|
|
9
9
|
- Gate loan disbursement by credit tier
|
|
10
10
|
|
|
11
|
+
> **API key required.** Generate yours free at [credgate.vercel.app/get-api-key](https://credgate.vercel.app/get-api-key) — connect your wallet and get a key in seconds.
|
|
12
|
+
|
|
11
13
|
---
|
|
12
14
|
|
|
13
15
|
## Installation
|
|
@@ -18,39 +20,18 @@ npm install credgate-sdk
|
|
|
18
20
|
|
|
19
21
|
---
|
|
20
22
|
|
|
21
|
-
##
|
|
23
|
+
## Get an API Key
|
|
22
24
|
|
|
23
|
-
|
|
25
|
+
1. Visit [credgate.vercel.app/get-api-key](https://credgate.vercel.app/get-api-key)
|
|
26
|
+
2. Connect your wallet (MetaMask, WalletConnect, or any EVM wallet)
|
|
27
|
+
3. Enter a project name and click **Generate API Key**
|
|
28
|
+
4. Copy your key — it's only shown once
|
|
24
29
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
│ ──── GET /wallet/result/:address
|
|
31
|
-
│ ──── GET /proof/status/address/:address
|
|
32
|
-
│ ──── GET /wallet/onchain/:address
|
|
33
|
-
▼
|
|
34
|
-
CredGate Backend (NestJS)
|
|
35
|
-
│
|
|
36
|
-
├── Aave history (Sepolia)
|
|
37
|
-
├── Stablecoin treasury analysis
|
|
38
|
-
├── CrossChain maturity
|
|
39
|
-
├── DEX activity
|
|
40
|
-
├── Wallet activity and age
|
|
41
|
-
│
|
|
42
|
-
▼
|
|
43
|
-
CreditScoreRegistry (Sepolia)
|
|
44
|
-
│
|
|
45
|
-
▼ ZK Proof via CreditCoin SDK
|
|
46
|
-
CreditScoreUSC (CreditCoin USC Testnet)
|
|
47
|
-
│
|
|
48
|
-
▼
|
|
49
|
-
CreditAggregator (CreditCoin USC Testnet)
|
|
50
|
-
│
|
|
51
|
-
▼
|
|
52
|
-
CreditVault.getCreditLine(user) → loan amount
|
|
53
|
-
```
|
|
30
|
+
Your key looks like: `cg_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`
|
|
31
|
+
|
|
32
|
+
Pass it as `apiKey` when initializing the client. All requests are authenticated via the `x-api-key` header automatically.
|
|
33
|
+
|
|
34
|
+
Rate limit: **100 requests/minute** per key.
|
|
54
35
|
|
|
55
36
|
---
|
|
56
37
|
|
|
@@ -62,18 +43,18 @@ Your Lending Protocol
|
|
|
62
43
|
import { CredGateClient } from "credgate-sdk";
|
|
63
44
|
|
|
64
45
|
const client = new CredGateClient({
|
|
65
|
-
apiUrl: "https://
|
|
66
|
-
apiKey: "
|
|
46
|
+
apiUrl: "https://api.credgate.xyz",
|
|
47
|
+
apiKey: "cg_your_key_here", // get yours at credgate.vercel.app/get-api-key
|
|
67
48
|
});
|
|
68
49
|
|
|
69
50
|
const result = await client.analyzeWallet("0xabc...123");
|
|
70
51
|
|
|
71
|
-
console.log(result.score.creditScore);
|
|
72
|
-
console.log(result.score.tier);
|
|
73
|
-
console.log(result.score.loanProfile.maxLoanSizeUSD);
|
|
74
|
-
console.log(result.score.loanProfile.recommendedLTV);
|
|
75
|
-
console.log(result.score.loanProfile.interestTier);
|
|
76
|
-
console.log(result.proof?.status);
|
|
52
|
+
console.log(result.score.creditScore); // 87
|
|
53
|
+
console.log(result.score.tier); // "PRIME"
|
|
54
|
+
console.log(result.score.loanProfile.maxLoanSizeUSD); // 25000
|
|
55
|
+
console.log(result.score.loanProfile.recommendedLTV); // 70
|
|
56
|
+
console.log(result.score.loanProfile.interestTier); // "PRIME"
|
|
57
|
+
console.log(result.proof?.status); // "waiting_attestation"
|
|
77
58
|
```
|
|
78
59
|
|
|
79
60
|
### React Hook
|
|
@@ -84,7 +65,10 @@ import { useCredGate } from "credgate-sdk/react";
|
|
|
84
65
|
import { useAccount } from "wagmi";
|
|
85
66
|
|
|
86
67
|
// Create once — outside your component, or in a context
|
|
87
|
-
const client = new CredGateClient({
|
|
68
|
+
const client = new CredGateClient({
|
|
69
|
+
apiUrl: "https://api.credgate.xyz",
|
|
70
|
+
apiKey: "cg_your_key_here", // get yours at credgate.vercel.app/get-api-key
|
|
71
|
+
});
|
|
88
72
|
|
|
89
73
|
export function CreditWidget() {
|
|
90
74
|
const { address } = useAccount();
|
|
@@ -153,6 +137,40 @@ function LoanGate({ address }: { address: string }) {
|
|
|
153
137
|
|
|
154
138
|
---
|
|
155
139
|
|
|
140
|
+
## Architecture
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
Your Lending Protocol
|
|
144
|
+
│
|
|
145
|
+
▼
|
|
146
|
+
credgate-sdk ──── POST /wallet/analyze/:address
|
|
147
|
+
│ ──── GET /wallet/result/:address
|
|
148
|
+
│ ──── GET /proof/status/address/:address
|
|
149
|
+
│ ──── GET /wallet/onchain/:address
|
|
150
|
+
▼
|
|
151
|
+
CredGate Backend (NestJS)
|
|
152
|
+
│
|
|
153
|
+
├── Aave history (Sepolia)
|
|
154
|
+
├── Stablecoin treasury analysis
|
|
155
|
+
├── CrossChain maturity
|
|
156
|
+
├── DEX activity
|
|
157
|
+
├── Wallet activity and age
|
|
158
|
+
│
|
|
159
|
+
▼
|
|
160
|
+
CreditScoreRegistry (Sepolia)
|
|
161
|
+
│
|
|
162
|
+
▼ ZK Proof via CreditCoin SDK
|
|
163
|
+
CreditScoreUSC (CreditCoin USC Testnet)
|
|
164
|
+
│
|
|
165
|
+
▼
|
|
166
|
+
CreditAggregator (CreditCoin USC Testnet)
|
|
167
|
+
│
|
|
168
|
+
▼
|
|
169
|
+
CreditVault.getCreditLine(user) → loan amount
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
156
174
|
## Credit Tiers
|
|
157
175
|
|
|
158
176
|
| Tier | Score | LTV | Interest |
|
|
@@ -204,7 +222,7 @@ submitting ← calls CreditScoreUSC.submitScoreFromQuery()
|
|
|
204
222
|
```typescript
|
|
205
223
|
const client = new CredGateClient({
|
|
206
224
|
apiUrl: "https://api.credgate.xyz", // required
|
|
207
|
-
apiKey: "
|
|
225
|
+
apiKey: "cg_your_key_here", // required — get yours at credgate.vercel.app/get-api-key
|
|
208
226
|
pollInterval: 3000, // ms between polls (default: 3000)
|
|
209
227
|
timeout: 120_000, // analysis timeout ms (default: 120000)
|
|
210
228
|
});
|
|
@@ -224,128 +242,6 @@ const result = await client.analyzeWallet("0x...", {
|
|
|
224
242
|
});
|
|
225
243
|
```
|
|
226
244
|
|
|
227
|
-
**Response shape:**
|
|
228
|
-
```typescript
|
|
229
|
-
{
|
|
230
|
-
"status": "DONE",
|
|
231
|
-
"result": {
|
|
232
|
-
"address": "0xa81a12e0c285b234a9c801b2bd215eabb3dda461",
|
|
233
|
-
"basic": {
|
|
234
|
-
"ethBalance": "0.0",
|
|
235
|
-
"txCount": 0,
|
|
236
|
-
"walletAgeBlocks": null
|
|
237
|
-
},
|
|
238
|
-
"aave": {
|
|
239
|
-
"borrows": [],
|
|
240
|
-
"repays": [],
|
|
241
|
-
"liquidations": []
|
|
242
|
-
},
|
|
243
|
-
"meta": {
|
|
244
|
-
"analyzedAt": 1772742968948
|
|
245
|
-
},
|
|
246
|
-
"intelligence": {
|
|
247
|
-
"metrics": {
|
|
248
|
-
"totalBorrows": 0,
|
|
249
|
-
"totalRepays": 0,
|
|
250
|
-
"totalLiquidations": 0,
|
|
251
|
-
"repayRatio": 0,
|
|
252
|
-
"liquidationRate": 0,
|
|
253
|
-
"borrowRepayCycles": 0
|
|
254
|
-
},
|
|
255
|
-
"risk": {
|
|
256
|
-
"riskScore": 60,
|
|
257
|
-
"riskLevel": "MEDIUM"
|
|
258
|
-
},
|
|
259
|
-
"creditScore": 0,
|
|
260
|
-
"scoreBreakdown": {
|
|
261
|
-
"lending": 0,
|
|
262
|
-
"stable": 0,
|
|
263
|
-
"crossChain": 0,
|
|
264
|
-
"dex": 0,
|
|
265
|
-
"ageBonus": 0,
|
|
266
|
-
"riskPenalty": 12
|
|
267
|
-
},
|
|
268
|
-
"stable": {
|
|
269
|
-
"totalInflow": 0,
|
|
270
|
-
"totalOutflow": 0,
|
|
271
|
-
"netFlow": 0,
|
|
272
|
-
"transferCount": 0,
|
|
273
|
-
"inflowCount": 0,
|
|
274
|
-
"outflowCount": 0,
|
|
275
|
-
"avgMonthlyNetFlow": 0,
|
|
276
|
-
"netFlowVolatility": 0,
|
|
277
|
-
"retentionRatio": 0,
|
|
278
|
-
"recentActivityScore": 0,
|
|
279
|
-
"activeMonths": 0,
|
|
280
|
-
"avgHoldingDays": 0,
|
|
281
|
-
"largestInflowSourceShare": 0,
|
|
282
|
-
"churnRatio": 0,
|
|
283
|
-
"stableScore": 0,
|
|
284
|
-
"stableLevel": "WEAK"
|
|
285
|
-
},
|
|
286
|
-
"crossChain": {
|
|
287
|
-
"chainsUsedCount": 0,
|
|
288
|
-
"activeChains": [],
|
|
289
|
-
"totalTxAcrossChains": 0,
|
|
290
|
-
"chainDetails": [
|
|
291
|
-
{
|
|
292
|
-
"chain": "ethereum",
|
|
293
|
-
"txCount": 0,
|
|
294
|
-
"firstTxBlock": null,
|
|
295
|
-
"walletAgeDays": null
|
|
296
|
-
},
|
|
297
|
-
{
|
|
298
|
-
"chain": "arbitrum",
|
|
299
|
-
"txCount": 0,
|
|
300
|
-
"firstTxBlock": null,
|
|
301
|
-
"walletAgeDays": null
|
|
302
|
-
},
|
|
303
|
-
{
|
|
304
|
-
"chain": "optimism",
|
|
305
|
-
"txCount": 0,
|
|
306
|
-
"firstTxBlock": null,
|
|
307
|
-
"walletAgeDays": null
|
|
308
|
-
},
|
|
309
|
-
{
|
|
310
|
-
"chain": "base",
|
|
311
|
-
"txCount": 0,
|
|
312
|
-
"firstTxBlock": null,
|
|
313
|
-
"walletAgeDays": null
|
|
314
|
-
},
|
|
315
|
-
{
|
|
316
|
-
"chain": "polygon",
|
|
317
|
-
"txCount": 0,
|
|
318
|
-
"firstTxBlock": null,
|
|
319
|
-
"walletAgeDays": null
|
|
320
|
-
}
|
|
321
|
-
],
|
|
322
|
-
"crossChainMaturityScore": 0,
|
|
323
|
-
"crossChainRiskImpact": 10
|
|
324
|
-
},
|
|
325
|
-
"dex": {
|
|
326
|
-
"totalSwaps": 0,
|
|
327
|
-
"totalVolumeUSD": 0,
|
|
328
|
-
"uniqueTokensTraded": 0,
|
|
329
|
-
"avgSwapSizeUSD": 0,
|
|
330
|
-
"swapFrequencyPerMonth": 0,
|
|
331
|
-
"dexMaturityScore": 0,
|
|
332
|
-
"dexRiskImpact": 0
|
|
333
|
-
},
|
|
334
|
-
"loanProfile": {
|
|
335
|
-
"recommendedLTV": 0,
|
|
336
|
-
"interestTier": "REJECT",
|
|
337
|
-
"maxLoanSizeUSD": 0
|
|
338
|
-
}
|
|
339
|
-
},
|
|
340
|
-
"onchain": {
|
|
341
|
-
"status": "UPDATED",
|
|
342
|
-
"txHash": "0x8f4b45d041e6d4a502407f8dd5fda49e73d882136db7e2d25096e1269cb211fd",
|
|
343
|
-
"reportHash": "0xf44b9f3a31ac3bb921289f6823b523ad01f3df9f543d01a573aab3c0bdb9386b"
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
```
|
|
348
|
-
|
|
349
245
|
---
|
|
350
246
|
|
|
351
247
|
### `client.getScore(address)`
|
|
@@ -355,7 +251,6 @@ Returns cached `ScoreResult | null`. Does NOT trigger new analysis.
|
|
|
355
251
|
```typescript
|
|
356
252
|
const score = await client.getScore("0x...");
|
|
357
253
|
if (!score) {
|
|
358
|
-
// Wallet never analyzed — trigger analysis
|
|
359
254
|
await client.analyzeWallet("0x...");
|
|
360
255
|
}
|
|
361
256
|
```
|
|
@@ -364,8 +259,6 @@ if (!score) {
|
|
|
364
259
|
|
|
365
260
|
### `client.getProofStatus(address)`
|
|
366
261
|
|
|
367
|
-
Returns current ZK proof status for a wallet.
|
|
368
|
-
|
|
369
262
|
```typescript
|
|
370
263
|
const proof = await client.getProofStatus("0x...");
|
|
371
264
|
// { status: "waiting_attestation", blocksRemaining: 42, estimatedWaitSeconds: 504 }
|
|
@@ -378,9 +271,7 @@ const proof = await client.getProofStatus("0x...");
|
|
|
378
271
|
Polls until proof reaches `success` or throws on `failed`.
|
|
379
272
|
|
|
380
273
|
```typescript
|
|
381
|
-
const proof = await client.waitForProof("0x...", {
|
|
382
|
-
timeout: 1_800_000, // 30 min (matches backend max)
|
|
383
|
-
});
|
|
274
|
+
const proof = await client.waitForProof("0x...", { timeout: 1_800_000 });
|
|
384
275
|
console.log(proof.txHash); // CreditCoin USC transaction hash
|
|
385
276
|
```
|
|
386
277
|
|
|
@@ -388,8 +279,6 @@ console.log(proof.txHash); // CreditCoin USC transaction hash
|
|
|
388
279
|
|
|
389
280
|
### `client.getOnChainStatus(address)`
|
|
390
281
|
|
|
391
|
-
Returns on-chain credit registry status from Sepolia `CreditScoreRegistry`.
|
|
392
|
-
|
|
393
282
|
```typescript
|
|
394
283
|
const status = await client.getOnChainStatus("0x...");
|
|
395
284
|
// { status: "UPDATED", txHash: "0x...", reportHash: "0x...", remainingSeconds: 0 }
|
|
@@ -399,10 +288,7 @@ const status = await client.getOnChainStatus("0x...");
|
|
|
399
288
|
|
|
400
289
|
### `client.isEligible(address)`
|
|
401
290
|
|
|
402
|
-
Quick boolean check. Returns `false` if tier is REJECT or maxLoanSizeUSD is 0.
|
|
403
|
-
|
|
404
291
|
```typescript
|
|
405
|
-
// Server-side loan gating
|
|
406
292
|
if (!(await client.isEligible(userAddress))) {
|
|
407
293
|
return res.status(403).json({ error: "Insufficient credit score" });
|
|
408
294
|
}
|
|
@@ -412,8 +298,6 @@ if (!(await client.isEligible(userAddress))) {
|
|
|
412
298
|
|
|
413
299
|
### `client.getMaxLoan(address)`
|
|
414
300
|
|
|
415
|
-
Returns max loan in USD. Returns 0 if wallet is ineligible or unanalyzed.
|
|
416
|
-
|
|
417
301
|
```typescript
|
|
418
302
|
const max = await client.getMaxLoan(userAddress);
|
|
419
303
|
if (requestedAmount > max) {
|
|
@@ -434,29 +318,21 @@ try {
|
|
|
434
318
|
if (err instanceof CredGateError) {
|
|
435
319
|
switch (err.code) {
|
|
436
320
|
case ErrorCode.COOLDOWN_ACTIVE:
|
|
437
|
-
// Wallet was analyzed recently — wait for cooldown
|
|
438
321
|
const seconds = err.meta?.remainingSeconds as number;
|
|
439
322
|
console.log(`Try again in ${Math.ceil(seconds / 3600)}h`);
|
|
440
323
|
break;
|
|
441
|
-
|
|
442
324
|
case ErrorCode.ANALYSIS_TIMEOUT:
|
|
443
|
-
// Backend took too long — retry
|
|
444
325
|
console.log("Timed out, retrying...");
|
|
445
326
|
break;
|
|
446
|
-
|
|
447
327
|
case ErrorCode.PROOF_FAILED:
|
|
448
|
-
// CreditCoin proof submission failed
|
|
449
328
|
console.log("Proof failed:", err.meta?.txHash);
|
|
450
329
|
break;
|
|
451
|
-
|
|
452
330
|
case ErrorCode.WALLET_NOT_FOUND:
|
|
453
331
|
console.log("Wallet never analyzed");
|
|
454
332
|
break;
|
|
455
|
-
|
|
456
333
|
case ErrorCode.UNAUTHORIZED:
|
|
457
|
-
console.log("
|
|
334
|
+
console.log("Invalid API key — get yours at credgate.vercel.app/get-api-key");
|
|
458
335
|
break;
|
|
459
|
-
|
|
460
336
|
case ErrorCode.NETWORK_ERROR:
|
|
461
337
|
console.log("Backend unreachable:", err.message);
|
|
462
338
|
break;
|
|
@@ -480,11 +356,11 @@ const {
|
|
|
480
356
|
analyzing, // true while analysis job is running
|
|
481
357
|
error, // string | null
|
|
482
358
|
cooldownRemaining, // number (seconds, counts down)
|
|
483
|
-
analyze, // () => Promise<void>
|
|
484
|
-
refetch, // () => Promise<void>
|
|
359
|
+
analyze, // () => Promise<void>
|
|
360
|
+
refetch, // () => Promise<void>
|
|
485
361
|
} = useCredGate(client, address, {
|
|
486
|
-
autoAnalyze: false,
|
|
487
|
-
proofPollInterval: 5000,
|
|
362
|
+
autoAnalyze: false,
|
|
363
|
+
proofPollInterval: 5000,
|
|
488
364
|
});
|
|
489
365
|
```
|
|
490
366
|
|
|
@@ -535,6 +411,8 @@ import type {
|
|
|
535
411
|
| `GET` | `/proof/status/address/:address` | ZK proof status by address |
|
|
536
412
|
| `GET` | `/proof/status/:jobId` | ZK proof status by job ID |
|
|
537
413
|
|
|
414
|
+
All endpoints require the `x-api-key` header. Requests without a valid key return `401 Unauthorized`.
|
|
415
|
+
|
|
538
416
|
---
|
|
539
417
|
|
|
540
418
|
## Score Breakdown Explained
|
|
@@ -552,4 +430,4 @@ import type {
|
|
|
552
430
|
|
|
553
431
|
## License
|
|
554
432
|
|
|
555
|
-
MIT
|
|
433
|
+
MIT
|
package/dist/types.d.ts
CHANGED
|
@@ -58,19 +58,14 @@ export interface CreditLineResult {
|
|
|
58
58
|
utilizationPct: number;
|
|
59
59
|
}
|
|
60
60
|
export interface CredGateConfig {
|
|
61
|
-
/** Your CredGate backend URL, e.g. https://api.credgate.xyz */
|
|
62
61
|
apiUrl: string;
|
|
63
|
-
/** Optional API key forwarded as x-api-key header */
|
|
64
62
|
apiKey?: string;
|
|
65
|
-
/** Poll interval in ms (default: 3000) */
|
|
66
63
|
pollInterval?: number;
|
|
67
|
-
/** Analysis timeout in ms (default: 120000) */
|
|
68
64
|
timeout?: number;
|
|
69
65
|
}
|
|
70
66
|
export interface AnalyzeOptions {
|
|
71
67
|
pollInterval?: number;
|
|
72
68
|
timeout?: number;
|
|
73
|
-
/** If true, also waits for CreditCoin ZK proof to reach success/failed */
|
|
74
69
|
waitForProof?: boolean;
|
|
75
70
|
}
|
|
76
71
|
export declare enum ErrorCode {
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,OAAO,GAAG,WAAW,GAAG,UAAU,GAAG,QAAQ,CAAC;AACjF,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;AAClD,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAC;AAKzD,MAAM,MAAM,gBAAgB,GACtB,WAAW,GACX,QAAQ,GACR,mBAAmB,GACnB,aAAa,GACb,qBAAqB,GACrB,kBAAkB,GAClB,YAAY,GACZ,SAAS,GACT,QAAQ,CAAC;AAEf,MAAM,WAAW,WAAW;IACxB,MAAM,EAAE,gBAAgB,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oBAAoB,CAAC,EAAE,MAAM,CAAC;CACjC;AAKD,MAAM,MAAM,kBAAkB,GACxB,eAAe,GACf,SAAS,GACT,iBAAiB,GACjB,QAAQ,CAAC;AAEf,MAAM,WAAW,aAAa;IAC1B,MAAM,EAAE,kBAAkB,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,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;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B;AAID,oBAAY,SAAS;IACjB,eAAe,oBAAoB;IACnC,gBAAgB,qBAAqB;IACrC,gBAAgB,qBAAqB;IACrC,YAAY,iBAAiB;IAC7B,YAAY,iBAAiB;IAC7B,aAAa,kBAAkB;IAC/B,OAAO,YAAY;CACtB;AAED,qBAAa,aAAc,SAAQ,KAAK;aAEhB,IAAI,EAAE,SAAS;aAEf,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;gBAF9B,IAAI,EAAE,SAAS,EAC/B,OAAO,EAAE,MAAM,EACC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,YAAA;CAKrD"}
|
package/dist/types.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
// Credit Tiers (matches wallet.processor.ts buildLoanProfile)
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
4
|
exports.CredGateError = exports.ErrorCode = void 0;
|
|
4
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
5
5
|
// Error handling
|
|
6
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
7
6
|
var ErrorCode;
|
|
8
7
|
(function (ErrorCode) {
|
|
9
8
|
ErrorCode["COOLDOWN_ACTIVE"] = "COOLDOWN_ACTIVE";
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AACA,+DAA+D;;;AAwH/D,iBAAiB;AACjB,IAAY,SAQX;AARD,WAAY,SAAS;IACjB,gDAAmC,CAAA;IACnC,kDAAqC,CAAA;IACrC,kDAAqC,CAAA;IACrC,0CAA6B,CAAA;IAC7B,0CAA6B,CAAA;IAC7B,4CAA+B,CAAA;IAC/B,gCAAmB,CAAA;AACvB,CAAC,EARW,SAAS,yBAAT,SAAS,QAQpB;AAED,MAAa,aAAc,SAAQ,KAAK;IACpC,YACoB,IAAe,EAC/B,OAAe,EACC,IAA8B;QAE9C,KAAK,CAAC,OAAO,CAAC,CAAC;QAJC,SAAI,GAAJ,IAAI,CAAW;QAEf,SAAI,GAAJ,IAAI,CAA0B;QAG9C,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAChC,CAAC;CACJ;AATD,sCASC"}
|
package/package.json
CHANGED