@exagent/sdk 0.1.14 → 0.1.16

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/dist/index.d.mts CHANGED
@@ -204,26 +204,6 @@ interface TradeResult {
204
204
  amountIn: string;
205
205
  expectedAmountOut: string;
206
206
  }
207
- /**
208
- * Basic staking info (raw contract data)
209
- */
210
- interface StakeInfo {
211
- amount: bigint;
212
- unlockTime: bigint;
213
- lockDuration: bigint;
214
- vEXABalance: bigint;
215
- }
216
- /**
217
- * Extended staking info with computed fields
218
- */
219
- interface StakingInfo$1 extends StakeInfo {
220
- /** Current vEXA balance (with time decay applied) */
221
- currentVeEXA: bigint;
222
- /** Whether the lock has expired */
223
- isUnlocked: boolean;
224
- /** Remaining time until unlock in seconds */
225
- remainingLockTime: bigint;
226
- }
227
207
  /**
228
208
  * Vault configuration for creating a new vault
229
209
  */
@@ -1102,698 +1082,6 @@ declare class ExagentVault {
1102
1082
  approveAsset(assetAddress: Address, amount: bigint): Promise<Hash>;
1103
1083
  }
1104
1084
 
1105
- /**
1106
- * ExagentStaking ABI (Mainnet — Two-Phase: Deposit → Lock)
1107
- */
1108
- declare const EXAGENT_STAKING_ABI: readonly [{
1109
- readonly type: "function";
1110
- readonly name: "exaToken";
1111
- readonly inputs: readonly [];
1112
- readonly outputs: readonly [{
1113
- readonly type: "address";
1114
- }];
1115
- readonly stateMutability: "view";
1116
- }, {
1117
- readonly type: "function";
1118
- readonly name: "totalDeposited";
1119
- readonly inputs: readonly [];
1120
- readonly outputs: readonly [{
1121
- readonly type: "uint256";
1122
- }];
1123
- readonly stateMutability: "view";
1124
- }, {
1125
- readonly type: "function";
1126
- readonly name: "totalLocked";
1127
- readonly inputs: readonly [];
1128
- readonly outputs: readonly [{
1129
- readonly type: "uint256";
1130
- }];
1131
- readonly stateMutability: "view";
1132
- }, {
1133
- readonly type: "function";
1134
- readonly name: "totalVeEXA";
1135
- readonly inputs: readonly [];
1136
- readonly outputs: readonly [{
1137
- readonly type: "uint256";
1138
- }];
1139
- readonly stateMutability: "view";
1140
- }, {
1141
- readonly type: "function";
1142
- readonly name: "totalEffectiveVeEXA";
1143
- readonly inputs: readonly [];
1144
- readonly outputs: readonly [{
1145
- readonly type: "uint256";
1146
- }];
1147
- readonly stateMutability: "view";
1148
- }, {
1149
- readonly type: "function";
1150
- readonly name: "MIN_LOCK_DURATION";
1151
- readonly inputs: readonly [];
1152
- readonly outputs: readonly [{
1153
- readonly type: "uint256";
1154
- }];
1155
- readonly stateMutability: "view";
1156
- }, {
1157
- readonly type: "function";
1158
- readonly name: "MAX_LOCK_DURATION";
1159
- readonly inputs: readonly [];
1160
- readonly outputs: readonly [{
1161
- readonly type: "uint256";
1162
- }];
1163
- readonly stateMutability: "view";
1164
- }, {
1165
- readonly type: "function";
1166
- readonly name: "VAULT_ACCESS_THRESHOLD";
1167
- readonly inputs: readonly [];
1168
- readonly outputs: readonly [{
1169
- readonly type: "uint256";
1170
- }];
1171
- readonly stateMutability: "view";
1172
- }, {
1173
- readonly type: "function";
1174
- readonly name: "PRECISION";
1175
- readonly inputs: readonly [];
1176
- readonly outputs: readonly [{
1177
- readonly type: "uint256";
1178
- }];
1179
- readonly stateMutability: "view";
1180
- }, {
1181
- readonly type: "function";
1182
- readonly name: "deposit";
1183
- readonly inputs: readonly [{
1184
- readonly name: "amount";
1185
- readonly type: "uint256";
1186
- }];
1187
- readonly outputs: readonly [];
1188
- readonly stateMutability: "nonpayable";
1189
- }, {
1190
- readonly type: "function";
1191
- readonly name: "withdraw";
1192
- readonly inputs: readonly [{
1193
- readonly name: "amount";
1194
- readonly type: "uint256";
1195
- }];
1196
- readonly outputs: readonly [];
1197
- readonly stateMutability: "nonpayable";
1198
- }, {
1199
- readonly type: "function";
1200
- readonly name: "lock";
1201
- readonly inputs: readonly [{
1202
- readonly name: "amount";
1203
- readonly type: "uint256";
1204
- }, {
1205
- readonly name: "lockDuration";
1206
- readonly type: "uint256";
1207
- }];
1208
- readonly outputs: readonly [];
1209
- readonly stateMutability: "nonpayable";
1210
- }, {
1211
- readonly type: "function";
1212
- readonly name: "extendLock";
1213
- readonly inputs: readonly [{
1214
- readonly name: "newLockDuration";
1215
- readonly type: "uint256";
1216
- }];
1217
- readonly outputs: readonly [];
1218
- readonly stateMutability: "nonpayable";
1219
- }, {
1220
- readonly type: "function";
1221
- readonly name: "unlock";
1222
- readonly inputs: readonly [];
1223
- readonly outputs: readonly [];
1224
- readonly stateMutability: "nonpayable";
1225
- }, {
1226
- readonly type: "function";
1227
- readonly name: "emergencyWithdraw";
1228
- readonly inputs: readonly [];
1229
- readonly outputs: readonly [];
1230
- readonly stateMutability: "nonpayable";
1231
- }, {
1232
- readonly type: "function";
1233
- readonly name: "claimRewards";
1234
- readonly inputs: readonly [];
1235
- readonly outputs: readonly [];
1236
- readonly stateMutability: "nonpayable";
1237
- }, {
1238
- readonly type: "function";
1239
- readonly name: "claimRewardsMulti";
1240
- readonly inputs: readonly [];
1241
- readonly outputs: readonly [];
1242
- readonly stateMutability: "nonpayable";
1243
- }, {
1244
- readonly type: "function";
1245
- readonly name: "claimRewardsToken";
1246
- readonly inputs: readonly [{
1247
- readonly name: "token";
1248
- readonly type: "address";
1249
- }];
1250
- readonly outputs: readonly [];
1251
- readonly stateMutability: "nonpayable";
1252
- }, {
1253
- readonly type: "function";
1254
- readonly name: "depositedAmount";
1255
- readonly inputs: readonly [{
1256
- readonly name: "user";
1257
- readonly type: "address";
1258
- }];
1259
- readonly outputs: readonly [{
1260
- readonly type: "uint256";
1261
- }];
1262
- readonly stateMutability: "view";
1263
- }, {
1264
- readonly type: "function";
1265
- readonly name: "locks";
1266
- readonly inputs: readonly [{
1267
- readonly name: "user";
1268
- readonly type: "address";
1269
- }];
1270
- readonly outputs: readonly [{
1271
- readonly name: "amount";
1272
- readonly type: "uint256";
1273
- }, {
1274
- readonly name: "unlockTime";
1275
- readonly type: "uint256";
1276
- }, {
1277
- readonly name: "lockDuration";
1278
- readonly type: "uint256";
1279
- }, {
1280
- readonly name: "vEXABalance";
1281
- readonly type: "uint256";
1282
- }];
1283
- readonly stateMutability: "view";
1284
- }, {
1285
- readonly type: "function";
1286
- readonly name: "getVeEXABalance";
1287
- readonly inputs: readonly [{
1288
- readonly name: "user";
1289
- readonly type: "address";
1290
- }];
1291
- readonly outputs: readonly [{
1292
- readonly type: "uint256";
1293
- }];
1294
- readonly stateMutability: "view";
1295
- }, {
1296
- readonly type: "function";
1297
- readonly name: "getEffectiveVeEXA";
1298
- readonly inputs: readonly [{
1299
- readonly name: "user";
1300
- readonly type: "address";
1301
- }];
1302
- readonly outputs: readonly [{
1303
- readonly type: "uint256";
1304
- }];
1305
- readonly stateMutability: "view";
1306
- }, {
1307
- readonly type: "function";
1308
- readonly name: "calculateVeEXA";
1309
- readonly inputs: readonly [{
1310
- readonly name: "amount";
1311
- readonly type: "uint256";
1312
- }, {
1313
- readonly name: "lockDuration";
1314
- readonly type: "uint256";
1315
- }];
1316
- readonly outputs: readonly [{
1317
- readonly type: "uint256";
1318
- }];
1319
- readonly stateMutability: "pure";
1320
- }, {
1321
- readonly type: "function";
1322
- readonly name: "pendingRewards";
1323
- readonly inputs: readonly [{
1324
- readonly name: "user";
1325
- readonly type: "address";
1326
- }];
1327
- readonly outputs: readonly [{
1328
- readonly type: "uint256";
1329
- }];
1330
- readonly stateMutability: "view";
1331
- }, {
1332
- readonly type: "function";
1333
- readonly name: "pendingRewardsForToken";
1334
- readonly inputs: readonly [{
1335
- readonly name: "user";
1336
- readonly type: "address";
1337
- }, {
1338
- readonly name: "token";
1339
- readonly type: "address";
1340
- }];
1341
- readonly outputs: readonly [{
1342
- readonly type: "uint256";
1343
- }];
1344
- readonly stateMutability: "view";
1345
- }, {
1346
- readonly type: "function";
1347
- readonly name: "getEarningsTier";
1348
- readonly inputs: readonly [{
1349
- readonly name: "user";
1350
- readonly type: "address";
1351
- }];
1352
- readonly outputs: readonly [{
1353
- readonly name: "multiplierBps";
1354
- readonly type: "uint256";
1355
- }, {
1356
- readonly name: "tierName";
1357
- readonly type: "string";
1358
- }];
1359
- readonly stateMutability: "view";
1360
- }, {
1361
- readonly type: "function";
1362
- readonly name: "getEmergencyWithdrawPenalty";
1363
- readonly inputs: readonly [{
1364
- readonly name: "user";
1365
- readonly type: "address";
1366
- }];
1367
- readonly outputs: readonly [{
1368
- readonly name: "penaltyBps";
1369
- readonly type: "uint256";
1370
- }];
1371
- readonly stateMutability: "view";
1372
- }, {
1373
- readonly type: "function";
1374
- readonly name: "hasVaultAccess";
1375
- readonly inputs: readonly [{
1376
- readonly name: "user";
1377
- readonly type: "address";
1378
- }];
1379
- readonly outputs: readonly [{
1380
- readonly type: "bool";
1381
- }];
1382
- readonly stateMutability: "view";
1383
- }, {
1384
- readonly type: "function";
1385
- readonly name: "getUnlockedBalance";
1386
- readonly inputs: readonly [{
1387
- readonly name: "user";
1388
- readonly type: "address";
1389
- }];
1390
- readonly outputs: readonly [{
1391
- readonly type: "uint256";
1392
- }];
1393
- readonly stateMutability: "view";
1394
- }, {
1395
- readonly type: "function";
1396
- readonly name: "getRewardTokens";
1397
- readonly inputs: readonly [];
1398
- readonly outputs: readonly [{
1399
- readonly type: "address[]";
1400
- }];
1401
- readonly stateMutability: "view";
1402
- }, {
1403
- readonly type: "function";
1404
- readonly name: "isRewardToken";
1405
- readonly inputs: readonly [{
1406
- readonly name: "token";
1407
- readonly type: "address";
1408
- }];
1409
- readonly outputs: readonly [{
1410
- readonly type: "bool";
1411
- }];
1412
- readonly stateMutability: "view";
1413
- }, {
1414
- readonly type: "event";
1415
- readonly name: "Deposited";
1416
- readonly inputs: readonly [{
1417
- readonly name: "user";
1418
- readonly type: "address";
1419
- readonly indexed: true;
1420
- }, {
1421
- readonly name: "amount";
1422
- readonly type: "uint256";
1423
- readonly indexed: false;
1424
- }, {
1425
- readonly name: "totalDeposited";
1426
- readonly type: "uint256";
1427
- readonly indexed: false;
1428
- }];
1429
- }, {
1430
- readonly type: "event";
1431
- readonly name: "Withdrawn";
1432
- readonly inputs: readonly [{
1433
- readonly name: "user";
1434
- readonly type: "address";
1435
- readonly indexed: true;
1436
- }, {
1437
- readonly name: "amount";
1438
- readonly type: "uint256";
1439
- readonly indexed: false;
1440
- }, {
1441
- readonly name: "totalDeposited";
1442
- readonly type: "uint256";
1443
- readonly indexed: false;
1444
- }];
1445
- }, {
1446
- readonly type: "event";
1447
- readonly name: "Locked";
1448
- readonly inputs: readonly [{
1449
- readonly name: "user";
1450
- readonly type: "address";
1451
- readonly indexed: true;
1452
- }, {
1453
- readonly name: "amount";
1454
- readonly type: "uint256";
1455
- readonly indexed: false;
1456
- }, {
1457
- readonly name: "lockDuration";
1458
- readonly type: "uint256";
1459
- readonly indexed: false;
1460
- }, {
1461
- readonly name: "unlockTime";
1462
- readonly type: "uint256";
1463
- readonly indexed: false;
1464
- }, {
1465
- readonly name: "vEXABalance";
1466
- readonly type: "uint256";
1467
- readonly indexed: false;
1468
- }];
1469
- }, {
1470
- readonly type: "event";
1471
- readonly name: "Unlocked";
1472
- readonly inputs: readonly [{
1473
- readonly name: "user";
1474
- readonly type: "address";
1475
- readonly indexed: true;
1476
- }, {
1477
- readonly name: "amount";
1478
- readonly type: "uint256";
1479
- readonly indexed: false;
1480
- }];
1481
- }, {
1482
- readonly type: "event";
1483
- readonly name: "EmergencyWithdrawal";
1484
- readonly inputs: readonly [{
1485
- readonly name: "user";
1486
- readonly type: "address";
1487
- readonly indexed: true;
1488
- }, {
1489
- readonly name: "returned";
1490
- readonly type: "uint256";
1491
- readonly indexed: false;
1492
- }, {
1493
- readonly name: "penalty";
1494
- readonly type: "uint256";
1495
- readonly indexed: false;
1496
- }, {
1497
- readonly name: "penaltyBps";
1498
- readonly type: "uint256";
1499
- readonly indexed: false;
1500
- }];
1501
- }, {
1502
- readonly type: "event";
1503
- readonly name: "LockExtended";
1504
- readonly inputs: readonly [{
1505
- readonly name: "user";
1506
- readonly type: "address";
1507
- readonly indexed: true;
1508
- }, {
1509
- readonly name: "newUnlockTime";
1510
- readonly type: "uint256";
1511
- readonly indexed: false;
1512
- }, {
1513
- readonly name: "newVeEXABalance";
1514
- readonly type: "uint256";
1515
- readonly indexed: false;
1516
- }];
1517
- }, {
1518
- readonly type: "event";
1519
- readonly name: "RewardsClaimed";
1520
- readonly inputs: readonly [{
1521
- readonly name: "user";
1522
- readonly type: "address";
1523
- readonly indexed: true;
1524
- }, {
1525
- readonly name: "amount";
1526
- readonly type: "uint256";
1527
- readonly indexed: false;
1528
- }];
1529
- }, {
1530
- readonly type: "event";
1531
- readonly name: "MultiTokenRewardsClaimed";
1532
- readonly inputs: readonly [{
1533
- readonly name: "user";
1534
- readonly type: "address";
1535
- readonly indexed: true;
1536
- }, {
1537
- readonly name: "token";
1538
- readonly type: "address";
1539
- readonly indexed: true;
1540
- }, {
1541
- readonly name: "amount";
1542
- readonly type: "uint256";
1543
- readonly indexed: false;
1544
- }];
1545
- }];
1546
- /**
1547
- * Deposit info for a user (Phase 1 — no lock)
1548
- */
1549
- interface DepositInfo {
1550
- /** Total EXA deposited (locked + unlocked) */
1551
- deposited: bigint;
1552
- /** EXA currently locked */
1553
- locked: bigint;
1554
- /** EXA available for withdrawal or locking */
1555
- unlocked: bigint;
1556
- /** Whether user has vault access (meets deposit threshold) */
1557
- hasVaultAccess: boolean;
1558
- }
1559
- /**
1560
- * Lock info for a user (Phase 2)
1561
- */
1562
- interface LockInfo {
1563
- /** Amount of EXA locked */
1564
- amount: bigint;
1565
- /** Timestamp when lock expires */
1566
- unlockTime: bigint;
1567
- /** Original lock duration in seconds */
1568
- lockDuration: bigint;
1569
- /** vEXA balance at lock time (before time decay) */
1570
- vEXABalance: bigint;
1571
- /** Current vEXA balance (with time decay applied) */
1572
- currentVeEXA: bigint;
1573
- /** Whether the lock has expired */
1574
- isUnlocked: boolean;
1575
- /** Remaining time until unlock in seconds */
1576
- remainingLockTime: bigint;
1577
- }
1578
- /**
1579
- * Combined staking info (deposit + lock)
1580
- */
1581
- interface StakingInfo {
1582
- /** Deposit phase info */
1583
- deposit: DepositInfo;
1584
- /** Lock phase info (null if no active lock) */
1585
- lock: LockInfo | null;
1586
- }
1587
- /**
1588
- * Earnings tier info from the mainnet staking contract
1589
- */
1590
- interface EarningsTierInfo {
1591
- /** Earnings multiplier in basis points (e.g. 10000 = 1x, 25000 = 2.5x) */
1592
- multiplierBps: bigint;
1593
- /** Tier name: None, Bronze, Silver, Gold, Platinum, Diamond */
1594
- tierName: string;
1595
- }
1596
- /**
1597
- * ExagentStaking SDK — Two-Phase Staking: Deposit for Vault Access, Lock for vEXA + Rewards
1598
- *
1599
- * Phase 1: deposit() → withdraw()
1600
- * Deposit EXA to get vault access. No lock, no vEXA, no rewards. Instant withdraw.
1601
- *
1602
- * Phase 2: lock() → unlock() / emergencyWithdraw()
1603
- * Lock deposited EXA for vEXA voting power and tiered earnings.
1604
- * unlock() after expiry (0% penalty). emergencyWithdraw() before expiry (50%→20% penalty).
1605
- */
1606
- declare class ExagentStaking {
1607
- readonly address: Address;
1608
- private readonly publicClient;
1609
- private readonly walletClient?;
1610
- private readonly chain;
1611
- private readonly account?;
1612
- constructor(stakingAddress: Address, publicClient: any, walletClient?: any, chain?: Chain, account?: Account);
1613
- /**
1614
- * Deposit EXA tokens for vault access (no lock required)
1615
- * @param amount Amount of EXA to deposit (in wei)
1616
- * @returns Transaction hash
1617
- *
1618
- * @example
1619
- * ```typescript
1620
- * // Deposit 1000 EXA to unlock vault access
1621
- * const tx = await staking.deposit(parseEther('1000'));
1622
- * ```
1623
- */
1624
- deposit(amount: bigint): Promise<Hash>;
1625
- /**
1626
- * Withdraw unlocked EXA tokens (instant, no penalty)
1627
- * @param amount Amount of EXA to withdraw (in wei)
1628
- * @returns Transaction hash
1629
- */
1630
- withdraw(amount: bigint): Promise<Hash>;
1631
- /**
1632
- * Lock deposited EXA to receive vEXA voting power and earn rewards
1633
- * @param amount Amount of deposited EXA to lock (in wei)
1634
- * @param lockDuration Lock duration in seconds (30 days to 2 years)
1635
- * @returns Transaction hash
1636
- *
1637
- * @example
1638
- * ```typescript
1639
- * // Lock 1000 EXA for 6 months
1640
- * const tx = await staking.lock(
1641
- * parseEther('1000'),
1642
- * ExagentStaking.LOCK_6_MONTHS
1643
- * );
1644
- * ```
1645
- */
1646
- lock(amount: bigint, lockDuration: bigint): Promise<Hash>;
1647
- /**
1648
- * Extend lock duration for additional voting power
1649
- * @param newLockDuration New lock duration in seconds (must be longer than remaining)
1650
- * @returns Transaction hash
1651
- */
1652
- extendLock(newLockDuration: bigint): Promise<Hash>;
1653
- /**
1654
- * Unlock EXA after lock expires (normal path — no penalty)
1655
- * Returns locked amount to unlocked deposited balance.
1656
- * @returns Transaction hash
1657
- */
1658
- unlock(): Promise<Hash>;
1659
- /**
1660
- * Emergency withdrawal — instant exit from lock with graduated penalty
1661
- * Two-phase penalty: 50%→20% over the first quarter of the lock, then flat 20% until expiry.
1662
- * Penalty goes to treasury. Remaining returns to unlocked deposit balance.
1663
- * @returns Transaction hash
1664
- */
1665
- emergencyWithdraw(): Promise<Hash>;
1666
- /**
1667
- * Claim accumulated EXA rewards
1668
- * @returns Transaction hash
1669
- */
1670
- claimRewards(): Promise<Hash>;
1671
- /**
1672
- * Claim all pending multi-token rewards (ETH, USDC, etc.)
1673
- * @returns Transaction hash
1674
- */
1675
- claimRewardsMulti(): Promise<Hash>;
1676
- /**
1677
- * Claim pending rewards for a specific token
1678
- * @param token The reward token address to claim
1679
- * @returns Transaction hash
1680
- */
1681
- claimRewardsToken(token: Address): Promise<Hash>;
1682
- /**
1683
- * Get comprehensive staking info for a user (deposit + lock)
1684
- * @param userAddress Address to check (defaults to connected wallet)
1685
- * @returns Combined staking info
1686
- */
1687
- getStakingInfo(userAddress?: Address): Promise<StakingInfo>;
1688
- /**
1689
- * Get deposit info for a user
1690
- * @param userAddress Address to check (defaults to connected wallet)
1691
- * @returns Deposit info
1692
- */
1693
- getDepositInfo(userAddress?: Address): Promise<DepositInfo>;
1694
- /**
1695
- * Get current vEXA balance (with time decay applied)
1696
- * @param userAddress Address to check (defaults to connected wallet)
1697
- * @returns Current vEXA balance
1698
- */
1699
- getVeEXABalance(userAddress?: Address): Promise<bigint>;
1700
- /**
1701
- * Get effective vEXA (with tier multiplier applied)
1702
- * @param userAddress Address to check (defaults to connected wallet)
1703
- * @returns Effective vEXA balance
1704
- */
1705
- getEffectiveVeEXA(userAddress?: Address): Promise<bigint>;
1706
- /**
1707
- * Check if user has vault access (meets deposit threshold)
1708
- * @param userAddress Address to check (defaults to connected wallet)
1709
- * @returns True if user can access vaults
1710
- */
1711
- hasVaultAccess(userAddress?: Address): Promise<boolean>;
1712
- /**
1713
- * Get earnings tier for a user (Bronze/Silver/Gold/Platinum/Diamond)
1714
- * @param userAddress Address to check (defaults to connected wallet)
1715
- * @returns Tier info with multiplier and name
1716
- */
1717
- getEarningsTier(userAddress?: Address): Promise<EarningsTierInfo>;
1718
- /**
1719
- * Get current emergency withdrawal penalty for a user
1720
- * @param userAddress Address to check (defaults to connected wallet)
1721
- * @returns Penalty in basis points (5000 = 50% at lock start, ramps to 2000 over first 25% of lock, then flat 2000)
1722
- */
1723
- getEmergencyWithdrawPenalty(userAddress?: Address): Promise<bigint>;
1724
- /**
1725
- * Get pending EXA rewards for a user
1726
- * @param userAddress Address to check (defaults to connected wallet)
1727
- * @returns Pending reward amount in wei
1728
- */
1729
- pendingRewards(userAddress?: Address): Promise<bigint>;
1730
- /**
1731
- * Get pending rewards for a specific token
1732
- * @param token The reward token address
1733
- * @param userAddress Address to check (defaults to connected wallet)
1734
- * @returns Pending reward amount in wei
1735
- */
1736
- pendingRewardsMulti(token: Address, userAddress?: Address): Promise<bigint>;
1737
- /**
1738
- * Get list of whitelisted reward tokens
1739
- * @returns Array of reward token addresses
1740
- */
1741
- getRewardTokens(): Promise<Address[]>;
1742
- /**
1743
- * Check if a token is whitelisted for rewards
1744
- * @param token The token address to check
1745
- * @returns True if token is whitelisted
1746
- */
1747
- isRewardToken(token: Address): Promise<boolean>;
1748
- /**
1749
- * Get total EXA deposited across all users
1750
- * @returns Total deposited amount in wei
1751
- */
1752
- getTotalDeposited(): Promise<bigint>;
1753
- /**
1754
- * Get total EXA locked across all users
1755
- * @returns Total locked amount in wei
1756
- */
1757
- getTotalLocked(): Promise<bigint>;
1758
- /**
1759
- * Get total vEXA supply across all users
1760
- * @returns Total vEXA supply
1761
- */
1762
- getTotalVeEXA(): Promise<bigint>;
1763
- /**
1764
- * Calculate vEXA balance for a given lock (preview)
1765
- * @param amount Amount of EXA to lock
1766
- * @param lockDuration Lock duration in seconds
1767
- * @returns Expected vEXA balance
1768
- */
1769
- calculateVeEXA(amount: bigint, lockDuration: bigint): Promise<bigint>;
1770
- /**
1771
- * Get the EXA token address
1772
- * @returns EXA token contract address
1773
- */
1774
- getExaTokenAddress(): Promise<Address>;
1775
- /**
1776
- * Approve EXA token spending for deposits
1777
- * @param amount Amount to approve
1778
- * @returns Transaction hash
1779
- */
1780
- approveExa(amount: bigint): Promise<Hash>;
1781
- /** Minimum lock duration: 30 days in seconds */
1782
- static readonly MIN_LOCK_DURATION: bigint;
1783
- /** Maximum lock duration: 2 years in seconds */
1784
- static readonly MAX_LOCK_DURATION: bigint;
1785
- /** 1 month lock duration in seconds */
1786
- static readonly LOCK_1_MONTH: bigint;
1787
- /** 3 months lock duration in seconds */
1788
- static readonly LOCK_3_MONTHS: bigint;
1789
- /** 6 months lock duration in seconds */
1790
- static readonly LOCK_6_MONTHS: bigint;
1791
- /** 1 year lock duration in seconds */
1792
- static readonly LOCK_1_YEAR: bigint;
1793
- /** 2 years lock duration in seconds */
1794
- static readonly LOCK_2_YEARS: bigint;
1795
- }
1796
-
1797
1085
  /** SDK version — sent to API for version gating */
1798
1086
  declare const SDK_VERSION = "0.1.14";
1799
1087
  /**
@@ -2131,12 +1419,9 @@ type NetworkType = 'mainnet';
2131
1419
  */
2132
1420
  declare const CONTRACT_ADDRESSES: Record<NetworkType, {
2133
1421
  agentRegistry: Address;
2134
- exaToken: Address;
2135
- staking: Address;
2136
1422
  router: Address;
2137
1423
  vaultFactory: Address;
2138
1424
  feeCollector: Address;
2139
- buyback: Address;
2140
1425
  serviceEscrow: Address;
2141
1426
  }>;
2142
1427
  /**
@@ -2215,7 +1500,6 @@ declare class ExagentClient {
2215
1500
  private readonly network;
2216
1501
  private readonly apiKey?;
2217
1502
  readonly registry: ExagentRegistry;
2218
- readonly staking: ExagentStaking;
2219
1503
  private _agentId?;
2220
1504
  constructor(config: ExagentClientConfig);
2221
1505
  /** Standard headers for all API requests (includes SDK version for gating) */
@@ -2296,7 +1580,9 @@ declare class ExagentClient {
2296
1580
  */
2297
1581
  private getAllowance;
2298
1582
  /**
2299
- * Approve token spending for router
1583
+ * Approve token spending for router.
1584
+ * Verifies the approval receipt succeeded — previous version silently continued
1585
+ * on reverted approvals, causing downstream "transfer amount exceeds allowance" errors.
2300
1586
  */
2301
1587
  private approveToken;
2302
1588
  /**
@@ -2371,88 +1657,6 @@ declare class ExagentClient {
2371
1657
  * @returns Transaction hash
2372
1658
  */
2373
1659
  redeemFromVault(vaultAddress: Address, shares: bigint): Promise<Hash>;
2374
- /**
2375
- * Deposit EXA tokens for vault access (no lock required)
2376
- * @param amount Amount of EXA to deposit (in wei)
2377
- * @returns Transaction hash
2378
- *
2379
- * @example
2380
- * ```typescript
2381
- * // Deposit 1000 EXA to unlock vault access
2382
- * const tx = await exagent.depositExa(parseEther('1000'));
2383
- * ```
2384
- */
2385
- depositExa(amount: bigint): Promise<Hash>;
2386
- /**
2387
- * Withdraw unlocked EXA tokens (instant, no penalty)
2388
- * @param amount Amount of EXA to withdraw (in wei)
2389
- * @returns Transaction hash
2390
- */
2391
- withdrawExa(amount: bigint): Promise<Hash>;
2392
- /**
2393
- * Lock deposited EXA to receive vEXA voting power and earn rewards
2394
- * @param amount Amount of deposited EXA to lock (in wei)
2395
- * @param lockDuration Lock duration in seconds (30 days to 2 years)
2396
- * @returns Transaction hash
2397
- *
2398
- * @example
2399
- * ```typescript
2400
- * // Lock 1000 EXA for 6 months
2401
- * const tx = await exagent.lockExa(
2402
- * parseEther('1000'),
2403
- * ExagentStaking.LOCK_6_MONTHS
2404
- * );
2405
- * ```
2406
- */
2407
- lockExa(amount: bigint, lockDuration: bigint): Promise<Hash>;
2408
- /**
2409
- * Unlock EXA after lock expires (no penalty)
2410
- * @returns Transaction hash
2411
- */
2412
- unlockExa(): Promise<Hash>;
2413
- /**
2414
- * Emergency withdrawal from active lock (graduated 50%→20% penalty)
2415
- * @returns Transaction hash
2416
- */
2417
- emergencyWithdrawExa(): Promise<Hash>;
2418
- /**
2419
- * Get comprehensive staking info (deposit + lock) for the connected wallet
2420
- * @returns Staking info including deposit status and lock status
2421
- */
2422
- getStakingInfo(): Promise<StakingInfo>;
2423
- /**
2424
- * Get deposit info for the connected wallet
2425
- * @returns Deposit info (deposited, locked, unlocked, vault access)
2426
- */
2427
- getDepositInfo(): Promise<DepositInfo>;
2428
- /**
2429
- * Get current vEXA balance for the connected wallet
2430
- * @returns Current vEXA balance (with time decay applied)
2431
- */
2432
- getVeEXABalance(): Promise<bigint>;
2433
- /**
2434
- * Check if connected wallet has vault access (meets deposit threshold)
2435
- * @returns True if user can access vaults
2436
- */
2437
- hasVaultAccess(): Promise<boolean>;
2438
- /**
2439
- * Get earnings tier for the connected wallet
2440
- * @returns Tier info with multiplier and name
2441
- */
2442
- getEarningsTier(): Promise<EarningsTierInfo>;
2443
- /**
2444
- * Get emergency withdrawal penalty for the connected wallet
2445
- * @returns Penalty in basis points (5000 = 50% at start, 2000 = 20% near expiry)
2446
- */
2447
- getEmergencyWithdrawPenalty(): Promise<bigint>;
2448
- /**
2449
- * Claim all pending staking rewards (EXA + multi-token)
2450
- * @returns Transaction hashes for EXA and multi-token claims
2451
- */
2452
- claimAllRewards(): Promise<{
2453
- exaRewards: Hash;
2454
- multiTokenRewards: Hash;
2455
- }>;
2456
1660
  /**
2457
1661
  * Get the ERC-8004 global agent identifier for the current agent
2458
1662
  *
@@ -2805,11 +2009,9 @@ declare const EXAGENT_VAULT_FACTORY_ABI: readonly [{
2805
2009
  * Vault creation requirements from the mainnet factory
2806
2010
  */
2807
2011
  interface VaultCreationRequirements {
2808
- veXARequired: bigint;
2809
2012
  minSeedAmount: bigint;
2810
2013
  unverifiedCapMultiplier: bigint;
2811
2014
  verifiedCapMultiplier: bigint;
2812
- stakingContract: Address;
2813
2015
  }
2814
2016
  /**
2815
2017
  * Result of checking if an address can create a vault
@@ -2903,4 +2105,4 @@ declare class ExagentVaultFactory {
2903
2105
  }>;
2904
2106
  }
2905
2107
 
2906
- export { type AgentMetadata, type AgentProfile, type StakingInfo$1 as ApiStakingInfo, CHAIN_CONFIG, CONTRACT_ADDRESSES, type CanCreateVaultResult, type CreateVaultOptions, DEFAULT_RPC_URL, DEX_ADDRESSES, type DepositInfo, EXAGENT_API_CONFIG, EXAGENT_REGISTRY_ABI, EXAGENT_ROUTER_ABI, EXAGENT_STAKING_ABI, EXAGENT_VAULT_FACTORY_ABI, type EarningsTierInfo, ExagentClient, type ExagentClientConfig, ExagentRegistry, ExagentStaking, ExagentVault, ExagentVaultFactory, type GlobalAgentId, type LockInfo, type NetworkType, type PerformanceSnapshot, type PriceQuote, type RouteQuote, type RouteStep, type RouterTradeResponse, SDK_VERSION, type ServiceRequest, type StakeInfo, type StakingInfo, type TradeIntent, type TradeResult, type UserVaultPosition, type VaultActivityEntry, type VaultConfig, type VaultCreationRequirements, type VaultInfo, type VaultPosition, type VaultSummary, type VaultTradeEntry, type WithdrawalRequest, ZERO_X_CONFIG, buildGlobalAgentId, getRpcUrl, parseGlobalAgentId };
2108
+ export { type AgentMetadata, type AgentProfile, CHAIN_CONFIG, CONTRACT_ADDRESSES, type CanCreateVaultResult, type CreateVaultOptions, DEFAULT_RPC_URL, DEX_ADDRESSES, EXAGENT_API_CONFIG, EXAGENT_REGISTRY_ABI, EXAGENT_ROUTER_ABI, EXAGENT_VAULT_FACTORY_ABI, ExagentClient, type ExagentClientConfig, ExagentRegistry, ExagentVault, ExagentVaultFactory, type GlobalAgentId, type NetworkType, type PerformanceSnapshot, type PriceQuote, type RouteQuote, type RouteStep, type RouterTradeResponse, SDK_VERSION, type ServiceRequest, type TradeIntent, type TradeResult, type UserVaultPosition, type VaultActivityEntry, type VaultConfig, type VaultCreationRequirements, type VaultInfo, type VaultPosition, type VaultSummary, type VaultTradeEntry, type WithdrawalRequest, ZERO_X_CONFIG, buildGlobalAgentId, getRpcUrl, parseGlobalAgentId };