@exagent/sdk 0.1.3 → 0.1.4

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
@@ -2,6 +2,52 @@ import * as viem from 'viem';
2
2
  import { Address, Hash, Chain, Account, Hex, WalletClient } from 'viem';
3
3
  import * as viem_chains from 'viem/chains';
4
4
 
5
+ /**
6
+ * ERC-8004 Global Agent Identifier
7
+ * Format: eip155:{chainId}:{registryAddress}:{agentId}
8
+ *
9
+ * This creates a universally unique identifier for any agent across
10
+ * all EVM chains, enabling cross-protocol agent discovery.
11
+ *
12
+ * @example
13
+ * ```
14
+ * // Base mainnet agent #42
15
+ * "eip155:8453:0xABC...DEF:42"
16
+ *
17
+ * // Base Sepolia testnet agent #7
18
+ * "eip155:84532:0x123...789:7"
19
+ * ```
20
+ */
21
+ type GlobalAgentId = `eip155:${number}:${Address}:${number}`;
22
+ /**
23
+ * Build an ERC-8004 compliant global agent identifier
24
+ *
25
+ * @param chainId - EVM chain ID (8453 for Base, 84532 for Base Sepolia)
26
+ * @param registryAddress - ExagentRegistry contract address
27
+ * @param agentId - On-chain agent ID (from ExagentRegistry)
28
+ * @returns Global agent identifier string
29
+ *
30
+ * @example
31
+ * ```typescript
32
+ * import { buildGlobalAgentId } from '@exagent/sdk';
33
+ *
34
+ * const globalId = buildGlobalAgentId(8453, '0xABC...DEF', 42);
35
+ * // => "eip155:8453:0xABC...DEF:42"
36
+ * ```
37
+ */
38
+ declare function buildGlobalAgentId(chainId: number, registryAddress: Address, agentId: number | bigint): GlobalAgentId;
39
+ /**
40
+ * Parse an ERC-8004 global agent identifier into its components
41
+ *
42
+ * @param globalId - The global agent identifier string
43
+ * @returns Parsed components: chainId, registryAddress, agentId
44
+ * @throws Error if the format is invalid
45
+ */
46
+ declare function parseGlobalAgentId(globalId: string): {
47
+ chainId: number;
48
+ registryAddress: Address;
49
+ agentId: number;
50
+ };
5
51
  /**
6
52
  * Agent profile as stored on-chain
7
53
  */
@@ -27,7 +73,7 @@ interface AgentMetadata {
27
73
  website?: string;
28
74
  social?: {
29
75
  twitter?: string;
30
- moltbook?: string;
76
+ github?: string;
31
77
  };
32
78
  }
33
79
  /**
@@ -176,23 +222,6 @@ interface StakingInfo$1 extends StakeInfo {
176
222
  /** Remaining time until unlock in seconds */
177
223
  remainingLockTime: bigint;
178
224
  }
179
- /**
180
- * Delegation info for an agent
181
- */
182
- interface DelegationInfo$1 {
183
- /** Total vEXA delegated to this agent */
184
- totalVeEXA: bigint;
185
- /** Number of unique delegators */
186
- delegatorCount: bigint;
187
- }
188
- /**
189
- * Discount tier for trading fee reductions based on vEXA holdings
190
- * - none: 0% discount (0 vEXA)
191
- * - bronze: 10% discount (10,000+ vEXA)
192
- * - silver: 25% discount (50,000+ vEXA)
193
- * - gold: 50% discount (100,000+ vEXA)
194
- */
195
- type DiscountTier$1 = 'none' | 'bronze' | 'silver' | 'gold';
196
225
  /**
197
226
  * Vault configuration for creating a new vault
198
227
  */
@@ -267,7 +296,7 @@ interface VaultTradeEntry {
267
296
  * Wrapper for ExagentRegistry contract interactions
268
297
  */
269
298
  declare class ExagentRegistry {
270
- private readonly address;
299
+ readonly address: Address;
271
300
  private readonly publicClient;
272
301
  private readonly walletClient?;
273
302
  private readonly chain;
@@ -277,9 +306,12 @@ declare class ExagentRegistry {
277
306
  * Register a new agent
278
307
  * @param name Unique agent name (3-32 chars, alphanumeric + spaces/hyphens/underscores)
279
308
  * @param metadataURI IPFS URI for agent metadata
309
+ * @param riskUniverse Risk tier: 0=Core, 1=Established, 2=Derivatives, 3=Emerging, 4=Frontier
310
+ * @param maxPositionSizeBps Maximum position size in basis points (1-10000)
311
+ * @param maxDailyLossBps Maximum daily loss in basis points (1-10000)
280
312
  * @returns Transaction hash
281
313
  */
282
- register(name: string, metadataURI: string): Promise<Hash>;
314
+ register(name: string, metadataURI: string, riskUniverse?: number, maxPositionSizeBps?: bigint, maxDailyLossBps?: bigint): Promise<Hash>;
283
315
  /**
284
316
  * Check if a name is available for registration
285
317
  * @param name The name to check
@@ -429,6 +461,38 @@ declare class ExagentRegistry {
429
461
  * @returns keccak256 hash of the config
430
462
  */
431
463
  static calculateConfigHash(provider: string, model: string): `0x${string}`;
464
+ /**
465
+ * Retire an agent — marks it as retired, unlinks all wallets, allows new agent registration
466
+ * @param agentId The agent's ID
467
+ * @returns Transaction hash
468
+ */
469
+ retireAgent(agentId: bigint): Promise<Hash>;
470
+ /**
471
+ * Check if an agent is retired
472
+ * @param agentId The agent's ID
473
+ * @returns True if agent is retired
474
+ */
475
+ isRetired(agentId: bigint): Promise<boolean>;
476
+ /**
477
+ * Check if a token trade is allowed for an agent's risk universe
478
+ * @param agentId The agent's ID
479
+ * @param token The token address to check
480
+ * @param aggregator The aggregator being used (for trusted aggregator bypass)
481
+ * @returns True if the trade is allowed
482
+ */
483
+ isTradeAllowed(agentId: bigint, token: Address, aggregator: Address): Promise<boolean>;
484
+ /**
485
+ * Get the risk universe for an agent
486
+ * @param agentId The agent's ID
487
+ * @returns Risk universe (0=Core, 1=Established, 2=Derivatives, 3=Emerging, 4=Frontier)
488
+ */
489
+ getRiskUniverse(agentId: bigint): Promise<number>;
490
+ /**
491
+ * Get trade count for an agent
492
+ * @param agentId The agent's ID
493
+ * @returns Number of recorded trades
494
+ */
495
+ getTradeCount(agentId: bigint): Promise<bigint>;
432
496
  }
433
497
 
434
498
  /**
@@ -581,7 +645,7 @@ declare class ExagentVault {
581
645
  }
582
646
 
583
647
  /**
584
- * ExagentStaking ABI
648
+ * ExagentStaking ABI (Mainnet — Two-Phase: Deposit → Lock)
585
649
  */
586
650
  declare const EXAGENT_STAKING_ABI: readonly [{
587
651
  readonly type: "function";
@@ -593,7 +657,15 @@ declare const EXAGENT_STAKING_ABI: readonly [{
593
657
  readonly stateMutability: "view";
594
658
  }, {
595
659
  readonly type: "function";
596
- readonly name: "totalStaked";
660
+ readonly name: "totalDeposited";
661
+ readonly inputs: readonly [];
662
+ readonly outputs: readonly [{
663
+ readonly type: "uint256";
664
+ }];
665
+ readonly stateMutability: "view";
666
+ }, {
667
+ readonly type: "function";
668
+ readonly name: "totalLocked";
597
669
  readonly inputs: readonly [];
598
670
  readonly outputs: readonly [{
599
671
  readonly type: "uint256";
@@ -609,10 +681,10 @@ declare const EXAGENT_STAKING_ABI: readonly [{
609
681
  readonly stateMutability: "view";
610
682
  }, {
611
683
  readonly type: "function";
612
- readonly name: "registry";
684
+ readonly name: "totalEffectiveVeEXA";
613
685
  readonly inputs: readonly [];
614
686
  readonly outputs: readonly [{
615
- readonly type: "address";
687
+ readonly type: "uint256";
616
688
  }];
617
689
  readonly stateMutability: "view";
618
690
  }, {
@@ -631,6 +703,14 @@ declare const EXAGENT_STAKING_ABI: readonly [{
631
703
  readonly type: "uint256";
632
704
  }];
633
705
  readonly stateMutability: "view";
706
+ }, {
707
+ readonly type: "function";
708
+ readonly name: "VAULT_ACCESS_THRESHOLD";
709
+ readonly inputs: readonly [];
710
+ readonly outputs: readonly [{
711
+ readonly type: "uint256";
712
+ }];
713
+ readonly stateMutability: "view";
634
714
  }, {
635
715
  readonly type: "function";
636
716
  readonly name: "PRECISION";
@@ -641,20 +721,32 @@ declare const EXAGENT_STAKING_ABI: readonly [{
641
721
  readonly stateMutability: "view";
642
722
  }, {
643
723
  readonly type: "function";
644
- readonly name: "stake";
724
+ readonly name: "deposit";
645
725
  readonly inputs: readonly [{
646
726
  readonly name: "amount";
647
727
  readonly type: "uint256";
648
- }, {
649
- readonly name: "lockDuration";
728
+ }];
729
+ readonly outputs: readonly [];
730
+ readonly stateMutability: "nonpayable";
731
+ }, {
732
+ readonly type: "function";
733
+ readonly name: "withdraw";
734
+ readonly inputs: readonly [{
735
+ readonly name: "amount";
650
736
  readonly type: "uint256";
651
737
  }];
652
738
  readonly outputs: readonly [];
653
739
  readonly stateMutability: "nonpayable";
654
740
  }, {
655
741
  readonly type: "function";
656
- readonly name: "unstake";
657
- readonly inputs: readonly [];
742
+ readonly name: "lock";
743
+ readonly inputs: readonly [{
744
+ readonly name: "amount";
745
+ readonly type: "uint256";
746
+ }, {
747
+ readonly name: "lockDuration";
748
+ readonly type: "uint256";
749
+ }];
658
750
  readonly outputs: readonly [];
659
751
  readonly stateMutability: "nonpayable";
660
752
  }, {
@@ -668,52 +760,51 @@ declare const EXAGENT_STAKING_ABI: readonly [{
668
760
  readonly stateMutability: "nonpayable";
669
761
  }, {
670
762
  readonly type: "function";
671
- readonly name: "claimRewards";
763
+ readonly name: "unlock";
672
764
  readonly inputs: readonly [];
673
765
  readonly outputs: readonly [];
674
766
  readonly stateMutability: "nonpayable";
675
767
  }, {
676
768
  readonly type: "function";
677
- readonly name: "claimRewardsMulti";
769
+ readonly name: "emergencyWithdraw";
678
770
  readonly inputs: readonly [];
679
771
  readonly outputs: readonly [];
680
772
  readonly stateMutability: "nonpayable";
681
773
  }, {
682
774
  readonly type: "function";
683
- readonly name: "claimRewardsToken";
684
- readonly inputs: readonly [{
685
- readonly name: "token";
686
- readonly type: "address";
687
- }];
775
+ readonly name: "claimRewards";
776
+ readonly inputs: readonly [];
688
777
  readonly outputs: readonly [];
689
778
  readonly stateMutability: "nonpayable";
690
779
  }, {
691
780
  readonly type: "function";
692
- readonly name: "delegate";
693
- readonly inputs: readonly [{
694
- readonly name: "agentId";
695
- readonly type: "uint256";
696
- }];
781
+ readonly name: "claimRewardsMulti";
782
+ readonly inputs: readonly [];
697
783
  readonly outputs: readonly [];
698
784
  readonly stateMutability: "nonpayable";
699
785
  }, {
700
786
  readonly type: "function";
701
- readonly name: "undelegate";
702
- readonly inputs: readonly [];
787
+ readonly name: "claimRewardsToken";
788
+ readonly inputs: readonly [{
789
+ readonly name: "token";
790
+ readonly type: "address";
791
+ }];
703
792
  readonly outputs: readonly [];
704
793
  readonly stateMutability: "nonpayable";
705
794
  }, {
706
795
  readonly type: "function";
707
- readonly name: "redelegate";
796
+ readonly name: "depositedAmount";
708
797
  readonly inputs: readonly [{
709
- readonly name: "newAgentId";
798
+ readonly name: "user";
799
+ readonly type: "address";
800
+ }];
801
+ readonly outputs: readonly [{
710
802
  readonly type: "uint256";
711
803
  }];
712
- readonly outputs: readonly [];
713
- readonly stateMutability: "nonpayable";
804
+ readonly stateMutability: "view";
714
805
  }, {
715
806
  readonly type: "function";
716
- readonly name: "stakes";
807
+ readonly name: "locks";
717
808
  readonly inputs: readonly [{
718
809
  readonly name: "user";
719
810
  readonly type: "address";
@@ -743,6 +834,17 @@ declare const EXAGENT_STAKING_ABI: readonly [{
743
834
  readonly type: "uint256";
744
835
  }];
745
836
  readonly stateMutability: "view";
837
+ }, {
838
+ readonly type: "function";
839
+ readonly name: "getEffectiveVeEXA";
840
+ readonly inputs: readonly [{
841
+ readonly name: "user";
842
+ readonly type: "address";
843
+ }];
844
+ readonly outputs: readonly [{
845
+ readonly type: "uint256";
846
+ }];
847
+ readonly stateMutability: "view";
746
848
  }, {
747
849
  readonly type: "function";
748
850
  readonly name: "calculateVeEXA";
@@ -784,64 +886,45 @@ declare const EXAGENT_STAKING_ABI: readonly [{
784
886
  readonly stateMutability: "view";
785
887
  }, {
786
888
  readonly type: "function";
787
- readonly name: "getDelegatedAgent";
889
+ readonly name: "getEarningsTier";
788
890
  readonly inputs: readonly [{
789
891
  readonly name: "user";
790
892
  readonly type: "address";
791
893
  }];
792
894
  readonly outputs: readonly [{
793
- readonly type: "uint256";
794
- }];
795
- readonly stateMutability: "view";
796
- }, {
797
- readonly type: "function";
798
- readonly name: "getAgentDelegation";
799
- readonly inputs: readonly [{
800
- readonly name: "agentId";
801
- readonly type: "uint256";
802
- }];
803
- readonly outputs: readonly [{
804
- readonly name: "vexa";
895
+ readonly name: "multiplierBps";
805
896
  readonly type: "uint256";
806
897
  }, {
807
- readonly name: "count";
808
- readonly type: "uint256";
898
+ readonly name: "tierName";
899
+ readonly type: "string";
809
900
  }];
810
901
  readonly stateMutability: "view";
811
902
  }, {
812
903
  readonly type: "function";
813
- readonly name: "getDiscountTier";
904
+ readonly name: "getEmergencyWithdrawPenalty";
814
905
  readonly inputs: readonly [{
815
906
  readonly name: "user";
816
907
  readonly type: "address";
817
908
  }];
818
909
  readonly outputs: readonly [{
819
- readonly name: "discountBps";
910
+ readonly name: "penaltyBps";
820
911
  readonly type: "uint256";
821
912
  }];
822
913
  readonly stateMutability: "view";
823
914
  }, {
824
915
  readonly type: "function";
825
- readonly name: "getRewardTokens";
826
- readonly inputs: readonly [];
827
- readonly outputs: readonly [{
828
- readonly type: "address[]";
829
- }];
830
- readonly stateMutability: "view";
831
- }, {
832
- readonly type: "function";
833
- readonly name: "delegatedTo";
916
+ readonly name: "hasVaultAccess";
834
917
  readonly inputs: readonly [{
835
918
  readonly name: "user";
836
919
  readonly type: "address";
837
920
  }];
838
921
  readonly outputs: readonly [{
839
- readonly type: "uint256";
922
+ readonly type: "bool";
840
923
  }];
841
924
  readonly stateMutability: "view";
842
925
  }, {
843
926
  readonly type: "function";
844
- readonly name: "userDelegatedVeEXA";
927
+ readonly name: "getUnlockedBalance";
845
928
  readonly inputs: readonly [{
846
929
  readonly name: "user";
847
930
  readonly type: "address";
@@ -852,24 +935,10 @@ declare const EXAGENT_STAKING_ABI: readonly [{
852
935
  readonly stateMutability: "view";
853
936
  }, {
854
937
  readonly type: "function";
855
- readonly name: "agentDelegatedVeEXA";
856
- readonly inputs: readonly [{
857
- readonly name: "agentId";
858
- readonly type: "uint256";
859
- }];
860
- readonly outputs: readonly [{
861
- readonly type: "uint256";
862
- }];
863
- readonly stateMutability: "view";
864
- }, {
865
- readonly type: "function";
866
- readonly name: "agentDelegatorCount";
867
- readonly inputs: readonly [{
868
- readonly name: "agentId";
869
- readonly type: "uint256";
870
- }];
938
+ readonly name: "getRewardTokens";
939
+ readonly inputs: readonly [];
871
940
  readonly outputs: readonly [{
872
- readonly type: "uint256";
941
+ readonly type: "address[]";
873
942
  }];
874
943
  readonly stateMutability: "view";
875
944
  }, {
@@ -885,7 +954,7 @@ declare const EXAGENT_STAKING_ABI: readonly [{
885
954
  readonly stateMutability: "view";
886
955
  }, {
887
956
  readonly type: "event";
888
- readonly name: "Staked";
957
+ readonly name: "Deposited";
889
958
  readonly inputs: readonly [{
890
959
  readonly name: "user";
891
960
  readonly type: "address";
@@ -895,21 +964,13 @@ declare const EXAGENT_STAKING_ABI: readonly [{
895
964
  readonly type: "uint256";
896
965
  readonly indexed: false;
897
966
  }, {
898
- readonly name: "lockDuration";
899
- readonly type: "uint256";
900
- readonly indexed: false;
901
- }, {
902
- readonly name: "unlockTime";
903
- readonly type: "uint256";
904
- readonly indexed: false;
905
- }, {
906
- readonly name: "vEXABalance";
967
+ readonly name: "totalDeposited";
907
968
  readonly type: "uint256";
908
969
  readonly indexed: false;
909
970
  }];
910
971
  }, {
911
972
  readonly type: "event";
912
- readonly name: "Unstaked";
973
+ readonly name: "Withdrawn";
913
974
  readonly inputs: readonly [{
914
975
  readonly name: "user";
915
976
  readonly type: "address";
@@ -918,26 +979,38 @@ declare const EXAGENT_STAKING_ABI: readonly [{
918
979
  readonly name: "amount";
919
980
  readonly type: "uint256";
920
981
  readonly indexed: false;
982
+ }, {
983
+ readonly name: "totalDeposited";
984
+ readonly type: "uint256";
985
+ readonly indexed: false;
921
986
  }];
922
987
  }, {
923
988
  readonly type: "event";
924
- readonly name: "LockExtended";
989
+ readonly name: "Locked";
925
990
  readonly inputs: readonly [{
926
991
  readonly name: "user";
927
992
  readonly type: "address";
928
993
  readonly indexed: true;
929
994
  }, {
930
- readonly name: "newUnlockTime";
995
+ readonly name: "amount";
931
996
  readonly type: "uint256";
932
997
  readonly indexed: false;
933
998
  }, {
934
- readonly name: "newVeEXABalance";
999
+ readonly name: "lockDuration";
1000
+ readonly type: "uint256";
1001
+ readonly indexed: false;
1002
+ }, {
1003
+ readonly name: "unlockTime";
1004
+ readonly type: "uint256";
1005
+ readonly indexed: false;
1006
+ }, {
1007
+ readonly name: "vEXABalance";
935
1008
  readonly type: "uint256";
936
1009
  readonly indexed: false;
937
1010
  }];
938
1011
  }, {
939
1012
  readonly type: "event";
940
- readonly name: "RewardsClaimed";
1013
+ readonly name: "Unlocked";
941
1014
  readonly inputs: readonly [{
942
1015
  readonly name: "user";
943
1016
  readonly type: "address";
@@ -949,33 +1022,49 @@ declare const EXAGENT_STAKING_ABI: readonly [{
949
1022
  }];
950
1023
  }, {
951
1024
  readonly type: "event";
952
- readonly name: "Delegated";
1025
+ readonly name: "EmergencyWithdrawal";
953
1026
  readonly inputs: readonly [{
954
- readonly name: "delegator";
1027
+ readonly name: "user";
955
1028
  readonly type: "address";
956
1029
  readonly indexed: true;
957
1030
  }, {
958
- readonly name: "agentId";
1031
+ readonly name: "returned";
959
1032
  readonly type: "uint256";
960
- readonly indexed: true;
1033
+ readonly indexed: false;
1034
+ }, {
1035
+ readonly name: "penalty";
1036
+ readonly type: "uint256";
1037
+ readonly indexed: false;
961
1038
  }, {
962
- readonly name: "veEXAAmount";
1039
+ readonly name: "penaltyBps";
963
1040
  readonly type: "uint256";
964
1041
  readonly indexed: false;
965
1042
  }];
966
1043
  }, {
967
1044
  readonly type: "event";
968
- readonly name: "Undelegated";
1045
+ readonly name: "LockExtended";
969
1046
  readonly inputs: readonly [{
970
- readonly name: "delegator";
1047
+ readonly name: "user";
971
1048
  readonly type: "address";
972
1049
  readonly indexed: true;
973
1050
  }, {
974
- readonly name: "agentId";
1051
+ readonly name: "newUnlockTime";
975
1052
  readonly type: "uint256";
1053
+ readonly indexed: false;
1054
+ }, {
1055
+ readonly name: "newVeEXABalance";
1056
+ readonly type: "uint256";
1057
+ readonly indexed: false;
1058
+ }];
1059
+ }, {
1060
+ readonly type: "event";
1061
+ readonly name: "RewardsClaimed";
1062
+ readonly inputs: readonly [{
1063
+ readonly name: "user";
1064
+ readonly type: "address";
976
1065
  readonly indexed: true;
977
1066
  }, {
978
- readonly name: "veEXAAmount";
1067
+ readonly name: "amount";
979
1068
  readonly type: "uint256";
980
1069
  readonly indexed: false;
981
1070
  }];
@@ -997,16 +1086,29 @@ declare const EXAGENT_STAKING_ABI: readonly [{
997
1086
  }];
998
1087
  }];
999
1088
  /**
1000
- * Staking info for a user
1089
+ * Deposit info for a user (Phase 1 — no lock)
1001
1090
  */
1002
- interface StakingInfo {
1003
- /** Amount of EXA staked */
1091
+ interface DepositInfo {
1092
+ /** Total EXA deposited (locked + unlocked) */
1093
+ deposited: bigint;
1094
+ /** EXA currently locked */
1095
+ locked: bigint;
1096
+ /** EXA available for withdrawal or locking */
1097
+ unlocked: bigint;
1098
+ /** Whether user has vault access (meets deposit threshold) */
1099
+ hasVaultAccess: boolean;
1100
+ }
1101
+ /**
1102
+ * Lock info for a user (Phase 2)
1103
+ */
1104
+ interface LockInfo {
1105
+ /** Amount of EXA locked */
1004
1106
  amount: bigint;
1005
- /** Timestamp when stake can be withdrawn */
1107
+ /** Timestamp when lock expires */
1006
1108
  unlockTime: bigint;
1007
1109
  /** Original lock duration in seconds */
1008
1110
  lockDuration: bigint;
1009
- /** vEXA balance at stake time (before time decay) */
1111
+ /** vEXA balance at lock time (before time decay) */
1010
1112
  vEXABalance: bigint;
1011
1113
  /** Current vEXA balance (with time decay applied) */
1012
1114
  currentVeEXA: bigint;
@@ -1016,29 +1118,32 @@ interface StakingInfo {
1016
1118
  remainingLockTime: bigint;
1017
1119
  }
1018
1120
  /**
1019
- * Delegation info for an agent
1121
+ * Combined staking info (deposit + lock)
1020
1122
  */
1021
- interface DelegationInfo {
1022
- /** Total vEXA delegated to this agent */
1023
- totalVeEXA: bigint;
1024
- /** Number of unique delegators */
1025
- delegatorCount: bigint;
1123
+ interface StakingInfo {
1124
+ /** Deposit phase info */
1125
+ deposit: DepositInfo;
1126
+ /** Lock phase info (null if no active lock) */
1127
+ lock: LockInfo | null;
1026
1128
  }
1027
1129
  /**
1028
- * Discount tier for trading fee reductions
1130
+ * Earnings tier info from the mainnet staking contract
1029
1131
  */
1030
- type DiscountTier = 'none' | 'bronze' | 'silver' | 'gold';
1031
- /**
1032
- * Discount tier thresholds in basis points
1033
- */
1034
- declare const DISCOUNT_TIERS: {
1035
- readonly none: 0;
1036
- readonly bronze: 1000;
1037
- readonly silver: 2500;
1038
- readonly gold: 5000;
1039
- };
1132
+ interface EarningsTierInfo {
1133
+ /** Earnings multiplier in basis points (e.g. 10000 = 1x, 25000 = 2.5x) */
1134
+ multiplierBps: bigint;
1135
+ /** Tier name: None, Bronze, Silver, Gold, Platinum, Diamond */
1136
+ tierName: string;
1137
+ }
1040
1138
  /**
1041
- * ExagentStaking SDK interface for vEXA staking, rewards, and delegation
1139
+ * ExagentStaking SDK Two-Phase Staking: Deposit for Vault Access, Lock for vEXA + Rewards
1140
+ *
1141
+ * Phase 1: deposit() → withdraw()
1142
+ * Deposit EXA to get vault access. No lock, no vEXA, no rewards. Instant withdraw.
1143
+ *
1144
+ * Phase 2: lock() → unlock() / emergencyWithdraw()
1145
+ * Lock deposited EXA for vEXA voting power and tiered earnings.
1146
+ * unlock() after expiry (0% penalty). emergencyWithdraw() before expiry (50%→20% penalty).
1042
1147
  */
1043
1148
  declare class ExagentStaking {
1044
1149
  readonly address: Address;
@@ -1048,33 +1153,58 @@ declare class ExagentStaking {
1048
1153
  private readonly account?;
1049
1154
  constructor(stakingAddress: Address, publicClient: any, walletClient?: any, chain?: Chain, account?: Account);
1050
1155
  /**
1051
- * Stake EXA tokens to receive vEXA voting power
1052
- * @param amount Amount of EXA to stake (in wei)
1053
- * @param lockDuration Lock duration in seconds (30 days to 2 years)
1156
+ * Deposit EXA tokens for vault access (no lock required)
1157
+ * @param amount Amount of EXA to deposit (in wei)
1054
1158
  * @returns Transaction hash
1055
1159
  *
1056
1160
  * @example
1057
1161
  * ```typescript
1058
- * // Stake 1000 EXA for 6 months
1059
- * const tx = await staking.stake(
1060
- * parseEther('1000'),
1061
- * BigInt(180 * 24 * 60 * 60) // 180 days in seconds
1062
- * );
1162
+ * // Deposit 1000 EXA to unlock vault access
1163
+ * const tx = await staking.deposit(parseEther('1000'));
1063
1164
  * ```
1064
1165
  */
1065
- stake(amount: bigint, lockDuration: bigint): Promise<Hash>;
1166
+ deposit(amount: bigint): Promise<Hash>;
1066
1167
  /**
1067
- * Unstake EXA tokens after lock expires
1168
+ * Withdraw unlocked EXA tokens (instant, no penalty)
1169
+ * @param amount Amount of EXA to withdraw (in wei)
1068
1170
  * @returns Transaction hash
1069
- * @throws Error if lock has not expired
1070
1171
  */
1071
- unstake(): Promise<Hash>;
1172
+ withdraw(amount: bigint): Promise<Hash>;
1173
+ /**
1174
+ * Lock deposited EXA to receive vEXA voting power and earn rewards
1175
+ * @param amount Amount of deposited EXA to lock (in wei)
1176
+ * @param lockDuration Lock duration in seconds (30 days to 2 years)
1177
+ * @returns Transaction hash
1178
+ *
1179
+ * @example
1180
+ * ```typescript
1181
+ * // Lock 1000 EXA for 6 months
1182
+ * const tx = await staking.lock(
1183
+ * parseEther('1000'),
1184
+ * ExagentStaking.LOCK_6_MONTHS
1185
+ * );
1186
+ * ```
1187
+ */
1188
+ lock(amount: bigint, lockDuration: bigint): Promise<Hash>;
1072
1189
  /**
1073
1190
  * Extend lock duration for additional voting power
1074
1191
  * @param newLockDuration New lock duration in seconds (must be longer than remaining)
1075
1192
  * @returns Transaction hash
1076
1193
  */
1077
1194
  extendLock(newLockDuration: bigint): Promise<Hash>;
1195
+ /**
1196
+ * Unlock EXA after lock expires (normal path — no penalty)
1197
+ * Returns locked amount to unlocked deposited balance.
1198
+ * @returns Transaction hash
1199
+ */
1200
+ unlock(): Promise<Hash>;
1201
+ /**
1202
+ * Emergency withdrawal — instant exit from lock with graduated penalty
1203
+ * Two-phase penalty: 50%→20% over the first quarter of the lock, then flat 20% until expiry.
1204
+ * Penalty goes to treasury. Remaining returns to unlocked deposit balance.
1205
+ * @returns Transaction hash
1206
+ */
1207
+ emergencyWithdraw(): Promise<Hash>;
1078
1208
  /**
1079
1209
  * Claim accumulated EXA rewards
1080
1210
  * @returns Transaction hash
@@ -1092,28 +1222,17 @@ declare class ExagentStaking {
1092
1222
  */
1093
1223
  claimRewardsToken(token: Address): Promise<Hash>;
1094
1224
  /**
1095
- * Delegate vEXA voting power to an agent ("Agent Wars")
1096
- * @param agentId The agent ID to delegate to
1097
- * @returns Transaction hash
1098
- */
1099
- delegate(agentId: bigint): Promise<Hash>;
1100
- /**
1101
- * Remove delegation from current agent
1102
- * @returns Transaction hash
1103
- */
1104
- undelegate(): Promise<Hash>;
1105
- /**
1106
- * Re-delegate to a different agent (undelegate + delegate in one tx)
1107
- * @param newAgentId The new agent ID to delegate to
1108
- * @returns Transaction hash
1225
+ * Get comprehensive staking info for a user (deposit + lock)
1226
+ * @param userAddress Address to check (defaults to connected wallet)
1227
+ * @returns Combined staking info
1109
1228
  */
1110
- redelegate(newAgentId: bigint): Promise<Hash>;
1229
+ getStakingInfo(userAddress?: Address): Promise<StakingInfo>;
1111
1230
  /**
1112
- * Get comprehensive staking info for a user
1231
+ * Get deposit info for a user
1113
1232
  * @param userAddress Address to check (defaults to connected wallet)
1114
- * @returns Staking info with amount, unlock time, and vEXA balance
1233
+ * @returns Deposit info
1115
1234
  */
1116
- getStakeInfo(userAddress?: Address): Promise<StakingInfo>;
1235
+ getDepositInfo(userAddress?: Address): Promise<DepositInfo>;
1117
1236
  /**
1118
1237
  * Get current vEXA balance (with time decay applied)
1119
1238
  * @param userAddress Address to check (defaults to connected wallet)
@@ -1121,26 +1240,29 @@ declare class ExagentStaking {
1121
1240
  */
1122
1241
  getVeEXABalance(userAddress?: Address): Promise<bigint>;
1123
1242
  /**
1124
- * Get the agent ID a user is delegating to
1243
+ * Get effective vEXA (with tier multiplier applied)
1125
1244
  * @param userAddress Address to check (defaults to connected wallet)
1126
- * @returns Agent ID (0 if not delegating)
1245
+ * @returns Effective vEXA balance
1127
1246
  */
1128
- getDelegatedAgent(userAddress?: Address): Promise<bigint>;
1247
+ getEffectiveVeEXA(userAddress?: Address): Promise<bigint>;
1129
1248
  /**
1130
- * Get delegation stats for an agent
1131
- * @param agentId The agent ID to check
1132
- * @returns Delegation info with total vEXA and delegator count
1249
+ * Check if user has vault access (meets deposit threshold)
1250
+ * @param userAddress Address to check (defaults to connected wallet)
1251
+ * @returns True if user can access vaults
1133
1252
  */
1134
- getAgentDelegation(agentId: bigint): Promise<DelegationInfo>;
1253
+ hasVaultAccess(userAddress?: Address): Promise<boolean>;
1135
1254
  /**
1136
- * Get trading fee discount tier for a user
1255
+ * Get earnings tier for a user (Bronze/Silver/Gold/Platinum/Diamond)
1137
1256
  * @param userAddress Address to check (defaults to connected wallet)
1138
- * @returns Discount tier name and basis points
1257
+ * @returns Tier info with multiplier and name
1139
1258
  */
1140
- getDiscountTier(userAddress?: Address): Promise<{
1141
- tier: DiscountTier;
1142
- discountBps: bigint;
1143
- }>;
1259
+ getEarningsTier(userAddress?: Address): Promise<EarningsTierInfo>;
1260
+ /**
1261
+ * Get current emergency withdrawal penalty for a user
1262
+ * @param userAddress Address to check (defaults to connected wallet)
1263
+ * @returns Penalty in basis points (5000 = 50% at lock start, ramps to 2000 over first 25% of lock, then flat 2000)
1264
+ */
1265
+ getEmergencyWithdrawPenalty(userAddress?: Address): Promise<bigint>;
1144
1266
  /**
1145
1267
  * Get pending EXA rewards for a user
1146
1268
  * @param userAddress Address to check (defaults to connected wallet)
@@ -1166,18 +1288,23 @@ declare class ExagentStaking {
1166
1288
  */
1167
1289
  isRewardToken(token: Address): Promise<boolean>;
1168
1290
  /**
1169
- * Get total staked EXA across all users
1170
- * @returns Total staked amount in wei
1291
+ * Get total EXA deposited across all users
1292
+ * @returns Total deposited amount in wei
1171
1293
  */
1172
- getTotalStaked(): Promise<bigint>;
1294
+ getTotalDeposited(): Promise<bigint>;
1295
+ /**
1296
+ * Get total EXA locked across all users
1297
+ * @returns Total locked amount in wei
1298
+ */
1299
+ getTotalLocked(): Promise<bigint>;
1173
1300
  /**
1174
1301
  * Get total vEXA supply across all users
1175
1302
  * @returns Total vEXA supply
1176
1303
  */
1177
1304
  getTotalVeEXA(): Promise<bigint>;
1178
1305
  /**
1179
- * Calculate vEXA balance for a given stake (preview)
1180
- * @param amount Amount of EXA to stake
1306
+ * Calculate vEXA balance for a given lock (preview)
1307
+ * @param amount Amount of EXA to lock
1181
1308
  * @param lockDuration Lock duration in seconds
1182
1309
  * @returns Expected vEXA balance
1183
1310
  */
@@ -1188,7 +1315,7 @@ declare class ExagentStaking {
1188
1315
  */
1189
1316
  getExaTokenAddress(): Promise<Address>;
1190
1317
  /**
1191
- * Approve EXA token spending for staking
1318
+ * Approve EXA token spending for deposits
1192
1319
  * @param amount Amount to approve
1193
1320
  * @returns Transaction hash
1194
1321
  */
@@ -1209,6 +1336,8 @@ declare class ExagentStaking {
1209
1336
  static readonly LOCK_2_YEARS: bigint;
1210
1337
  }
1211
1338
 
1339
+ /** SDK version — sent to API for version gating */
1340
+ declare const SDK_VERSION = "0.1.4";
1212
1341
  declare const CHAIN_CONFIG: {
1213
1342
  readonly mainnet: {
1214
1343
  blockExplorers: {
@@ -1604,7 +1733,13 @@ declare const CHAIN_CONFIG: {
1604
1733
  formatters: {
1605
1734
  readonly block: {
1606
1735
  exclude: [] | undefined;
1607
- format: (args: viem_chains.OpStackRpcBlock, action?: string | undefined) => {
1736
+ format: (args: viem_chains.OpStackRpcBlock, action
1737
+ /**
1738
+ * Validate that contract addresses are set for the given network.
1739
+ * Throws if mainnet addresses are all zero (not yet deployed).
1740
+ */
1741
+ /** Phase 1 contracts — must be deployed on mainnet */
1742
+ ?: string | undefined) => {
1608
1743
  baseFeePerGas: bigint | null;
1609
1744
  blobGasUsed: bigint;
1610
1745
  difficulty: bigint;
@@ -1882,8 +2017,8 @@ declare const ZERO_X_CONFIG: {
1882
2017
  * Exagent API configuration
1883
2018
  */
1884
2019
  declare const EXAGENT_API_CONFIG: {
1885
- readonly mainnet: "https://api.exagent.io";
1886
- readonly testnet: "https://api.testnet.exagent.io";
2020
+ readonly mainnet: "https://exagent-api.onrender.com";
2021
+ readonly testnet: "https://exagent-api.onrender.com";
1887
2022
  };
1888
2023
 
1889
2024
  /**
@@ -1920,13 +2055,14 @@ interface ExagentClientConfig {
1920
2055
  * capabilities: ['spot_trading'],
1921
2056
  * });
1922
2057
  *
1923
- * // Execute trade
1924
- * const route = await exagent.getRoute({
2058
+ * // Execute trade (always through ExagentRouter for attribution + fees)
2059
+ * const result = await exagent.trade({
1925
2060
  * tokenIn: WETH,
1926
2061
  * tokenOut: USDC,
1927
2062
  * amountIn: parseEther('1'),
2063
+ * maxSlippageBps: 50,
1928
2064
  * });
1929
- * await exagent.executeTrade(route);
2065
+ * console.log('Trade submitted:', result.hash);
1930
2066
  * ```
1931
2067
  */
1932
2068
  declare class ExagentClient {
@@ -1939,6 +2075,8 @@ declare class ExagentClient {
1939
2075
  readonly staking: ExagentStaking;
1940
2076
  private _agentId?;
1941
2077
  constructor(config: ExagentClientConfig);
2078
+ /** Standard headers for all API requests (includes SDK version for gating) */
2079
+ private apiHeaders;
1942
2080
  /**
1943
2081
  * Register as a new agent on Exagent
1944
2082
  * @param metadata Agent metadata (will be uploaded to IPFS)
@@ -1980,42 +2118,15 @@ declare class ExagentClient {
1980
2118
  */
1981
2119
  getLinkedWallets(): Promise<Address[]>;
1982
2120
  /**
1983
- * Get optimal DEX route for a trade
1984
- * Uses 0x API for aggregation across Aerodrome, Uniswap, etc.
1985
- */
1986
- getRoute(intent: TradeIntent): Promise<RouteQuote>;
1987
- /**
1988
- * Get price quote without transaction data (faster)
1989
- */
1990
- getPrice(tokenIn: Address, tokenOut: Address, amountIn: bigint): Promise<PriceQuote>;
1991
- /**
1992
- * Execute a trade using a pre-fetched route
1993
- * @param route Route quote from getRoute()
1994
- * @param options Trade execution options
1995
- * @returns Transaction hash
1996
- */
1997
- executeTrade(route: RouteQuote, options?: {
1998
- validateSlippage?: boolean;
1999
- }): Promise<Hash>;
2000
- /**
2001
- * Get and execute a trade in one call
2002
- * Convenience method that fetches route and executes
2003
- */
2004
- swap(intent: TradeIntent): Promise<{
2005
- hash: Hash;
2006
- route: RouteQuote;
2007
- }>;
2008
- /**
2009
- * Broadcast a trade intent to the network
2010
- * Other agents can see this and potentially provide better execution
2011
- */
2012
- broadcastIntent(intent: TradeIntent): Promise<void>;
2013
- /**
2014
- * Execute a trade through ExagentRouter for full attribution
2121
+ * Execute a trade through ExagentRouter
2122
+ *
2123
+ * All trades MUST go through the ExagentRouter. This ensures:
2124
+ * - Trade attribution for leaderboard ranking
2125
+ * - Protocol fee collection (0.2%)
2126
+ * - On-chain performance tracking
2127
+ * - Token whitelist enforcement per risk universe
2015
2128
  *
2016
- * This is the recommended way for agents to trade. All trades routed through
2017
- * the ExagentRouter emit TradeExecuted events that are captured by the indexer
2018
- * for accurate performance tracking and rankings.
2129
+ * There is no way to trade outside the router. This is by design.
2019
2130
  *
2020
2131
  * @param intent Trade parameters
2021
2132
  * @returns Trade result with transaction hash
@@ -2114,48 +2225,79 @@ declare class ExagentClient {
2114
2225
  */
2115
2226
  redeemFromVault(vaultAddress: Address, shares: bigint): Promise<Hash>;
2116
2227
  /**
2117
- * Stake EXA tokens to receive vEXA voting power
2118
- * @param amount Amount of EXA to stake (in wei)
2228
+ * Deposit EXA tokens for vault access (no lock required)
2229
+ * @param amount Amount of EXA to deposit (in wei)
2230
+ * @returns Transaction hash
2231
+ *
2232
+ * @example
2233
+ * ```typescript
2234
+ * // Deposit 1000 EXA to unlock vault access
2235
+ * const tx = await exagent.depositExa(parseEther('1000'));
2236
+ * ```
2237
+ */
2238
+ depositExa(amount: bigint): Promise<Hash>;
2239
+ /**
2240
+ * Withdraw unlocked EXA tokens (instant, no penalty)
2241
+ * @param amount Amount of EXA to withdraw (in wei)
2242
+ * @returns Transaction hash
2243
+ */
2244
+ withdrawExa(amount: bigint): Promise<Hash>;
2245
+ /**
2246
+ * Lock deposited EXA to receive vEXA voting power and earn rewards
2247
+ * @param amount Amount of deposited EXA to lock (in wei)
2119
2248
  * @param lockDuration Lock duration in seconds (30 days to 2 years)
2120
2249
  * @returns Transaction hash
2121
2250
  *
2122
2251
  * @example
2123
2252
  * ```typescript
2124
- * // Stake 1000 EXA for 6 months
2125
- * const tx = await exagent.stakeExa(
2253
+ * // Lock 1000 EXA for 6 months
2254
+ * const tx = await exagent.lockExa(
2126
2255
  * parseEther('1000'),
2127
2256
  * ExagentStaking.LOCK_6_MONTHS
2128
2257
  * );
2129
2258
  * ```
2130
2259
  */
2131
- stakeExa(amount: bigint, lockDuration: bigint): Promise<Hash>;
2260
+ lockExa(amount: bigint, lockDuration: bigint): Promise<Hash>;
2132
2261
  /**
2133
- * Unstake EXA tokens after lock expires
2262
+ * Unlock EXA after lock expires (no penalty)
2134
2263
  * @returns Transaction hash
2135
2264
  */
2136
- unstakeExa(): Promise<Hash>;
2265
+ unlockExa(): Promise<Hash>;
2137
2266
  /**
2138
- * Get staking info for the connected wallet
2139
- * @returns Staking info including amount, unlock time, and vEXA balance
2267
+ * Emergency withdrawal from active lock (graduated 50%→20% penalty)
2268
+ * @returns Transaction hash
2269
+ */
2270
+ emergencyWithdrawExa(): Promise<Hash>;
2271
+ /**
2272
+ * Get comprehensive staking info (deposit + lock) for the connected wallet
2273
+ * @returns Staking info including deposit status and lock status
2140
2274
  */
2141
2275
  getStakingInfo(): Promise<StakingInfo>;
2276
+ /**
2277
+ * Get deposit info for the connected wallet
2278
+ * @returns Deposit info (deposited, locked, unlocked, vault access)
2279
+ */
2280
+ getDepositInfo(): Promise<DepositInfo>;
2142
2281
  /**
2143
2282
  * Get current vEXA balance for the connected wallet
2144
2283
  * @returns Current vEXA balance (with time decay applied)
2145
2284
  */
2146
2285
  getVeEXABalance(): Promise<bigint>;
2147
2286
  /**
2148
- * Delegate vEXA voting power to an agent
2149
- * @param agentId The agent ID to delegate to
2150
- * @returns Transaction hash
2287
+ * Check if connected wallet has vault access (meets deposit threshold)
2288
+ * @returns True if user can access vaults
2289
+ */
2290
+ hasVaultAccess(): Promise<boolean>;
2291
+ /**
2292
+ * Get earnings tier for the connected wallet
2293
+ * @returns Tier info with multiplier and name
2151
2294
  */
2152
- delegateToAgent(agentId: bigint): Promise<Hash>;
2295
+ getEarningsTier(): Promise<EarningsTierInfo>;
2153
2296
  /**
2154
- * Get delegation stats for an agent
2155
- * @param agentId The agent ID to check
2156
- * @returns Delegation info with total vEXA and delegator count
2297
+ * Get emergency withdrawal penalty for the connected wallet
2298
+ * @returns Penalty in basis points (5000 = 50% at start, 2000 = 20% near expiry)
2157
2299
  */
2158
- getAgentDelegation(agentId: bigint): Promise<DelegationInfo>;
2300
+ getEmergencyWithdrawPenalty(): Promise<bigint>;
2159
2301
  /**
2160
2302
  * Claim all pending staking rewards (EXA + multi-token)
2161
2303
  * @returns Transaction hashes for EXA and multi-token claims
@@ -2164,6 +2306,33 @@ declare class ExagentClient {
2164
2306
  exaRewards: Hash;
2165
2307
  multiTokenRewards: Hash;
2166
2308
  }>;
2309
+ /**
2310
+ * Get the ERC-8004 global agent identifier for the current agent
2311
+ *
2312
+ * Format: eip155:{chainId}:{registryAddress}:{agentId}
2313
+ *
2314
+ * This creates a universally unique identifier that can be used for
2315
+ * cross-protocol agent discovery and interoperability.
2316
+ *
2317
+ * @returns The global agent ID string
2318
+ * @throws Error if agent is not registered
2319
+ *
2320
+ * @example
2321
+ * ```typescript
2322
+ * const globalId = await exagent.getGlobalAgentId();
2323
+ * // => "eip155:8453:0xABC...DEF:42"
2324
+ * ```
2325
+ */
2326
+ getGlobalAgentId(): Promise<GlobalAgentId>;
2327
+ /**
2328
+ * Build a global agent ID for any agent (static utility)
2329
+ *
2330
+ * @param chainId - EVM chain ID
2331
+ * @param registryAddress - ExagentRegistry contract address
2332
+ * @param agentId - On-chain agent ID
2333
+ * @returns ERC-8004 global agent identifier
2334
+ */
2335
+ static buildGlobalAgentId(chainId: number, registryAddress: Address, agentId: number | bigint): GlobalAgentId;
2167
2336
  /**
2168
2337
  * Get the agent's wallet address
2169
2338
  */
@@ -2177,12 +2346,11 @@ declare class ExagentClient {
2177
2346
  raw: `0x${string}`;
2178
2347
  }): Promise<`0x${string}`>;
2179
2348
  private uploadMetadata;
2180
- private signIntent;
2181
2349
  private parseAgentIdFromReceipt;
2182
2350
  }
2183
2351
 
2184
2352
  /**
2185
- * ExagentVaultFactory ABI
2353
+ * ExagentVaultFactory ABI (Mainnet — no burn fee, seed-based creation)
2186
2354
  */
2187
2355
  declare const EXAGENT_VAULT_FACTORY_ABI: readonly [{
2188
2356
  readonly type: "function";
@@ -2210,7 +2378,31 @@ declare const EXAGENT_VAULT_FACTORY_ABI: readonly [{
2210
2378
  readonly stateMutability: "view";
2211
2379
  }, {
2212
2380
  readonly type: "function";
2213
- readonly name: "minimumVeEXARequired";
2381
+ readonly name: "feeCollector";
2382
+ readonly inputs: readonly [];
2383
+ readonly outputs: readonly [{
2384
+ readonly type: "address";
2385
+ }];
2386
+ readonly stateMutability: "view";
2387
+ }, {
2388
+ readonly type: "function";
2389
+ readonly name: "stakingContract";
2390
+ readonly inputs: readonly [];
2391
+ readonly outputs: readonly [{
2392
+ readonly type: "address";
2393
+ }];
2394
+ readonly stateMutability: "view";
2395
+ }, {
2396
+ readonly type: "function";
2397
+ readonly name: "VERIFIED_VEXA_REQUIREMENT";
2398
+ readonly inputs: readonly [];
2399
+ readonly outputs: readonly [{
2400
+ readonly type: "uint256";
2401
+ }];
2402
+ readonly stateMutability: "view";
2403
+ }, {
2404
+ readonly type: "function";
2405
+ readonly name: "MIN_SEED_AMOUNT";
2214
2406
  readonly inputs: readonly [];
2215
2407
  readonly outputs: readonly [{
2216
2408
  readonly type: "uint256";
@@ -2218,7 +2410,15 @@ declare const EXAGENT_VAULT_FACTORY_ABI: readonly [{
2218
2410
  readonly stateMutability: "view";
2219
2411
  }, {
2220
2412
  readonly type: "function";
2221
- readonly name: "eXABurnFee";
2413
+ readonly name: "UNVERIFIED_CAP_MULTIPLIER";
2414
+ readonly inputs: readonly [];
2415
+ readonly outputs: readonly [{
2416
+ readonly type: "uint256";
2417
+ }];
2418
+ readonly stateMutability: "view";
2419
+ }, {
2420
+ readonly type: "function";
2421
+ readonly name: "VERIFIED_CAP_MULTIPLIER";
2222
2422
  readonly inputs: readonly [];
2223
2423
  readonly outputs: readonly [{
2224
2424
  readonly type: "uint256";
@@ -2277,20 +2477,17 @@ declare const EXAGENT_VAULT_FACTORY_ABI: readonly [{
2277
2477
  readonly stateMutability: "view";
2278
2478
  }, {
2279
2479
  readonly type: "function";
2280
- readonly name: "getVaultCreationRequirements";
2281
- readonly inputs: readonly [];
2282
- readonly outputs: readonly [{
2283
- readonly name: "veXARequired";
2284
- readonly type: "uint256";
2285
- }, {
2286
- readonly name: "burnFee";
2480
+ readonly name: "canCreateVerifiedVault";
2481
+ readonly inputs: readonly [{
2482
+ readonly name: "agentId";
2287
2483
  readonly type: "uint256";
2484
+ }];
2485
+ readonly outputs: readonly [{
2486
+ readonly name: "isVerified";
2487
+ readonly type: "bool";
2288
2488
  }, {
2289
- readonly name: "stakingContract";
2290
- readonly type: "address";
2291
- }, {
2292
- readonly name: "exaToken";
2293
- readonly type: "address";
2489
+ readonly name: "reason";
2490
+ readonly type: "string";
2294
2491
  }];
2295
2492
  readonly stateMutability: "view";
2296
2493
  }, {
@@ -2302,6 +2499,9 @@ declare const EXAGENT_VAULT_FACTORY_ABI: readonly [{
2302
2499
  }, {
2303
2500
  readonly name: "asset";
2304
2501
  readonly type: "address";
2502
+ }, {
2503
+ readonly name: "seedAmount";
2504
+ readonly type: "uint256";
2305
2505
  }, {
2306
2506
  readonly name: "name";
2307
2507
  readonly type: "string";
@@ -2358,15 +2558,14 @@ declare const EXAGENT_VAULT_FACTORY_ABI: readonly [{
2358
2558
  }];
2359
2559
  }];
2360
2560
  /**
2361
- * Vault creation requirements from the factory
2561
+ * Vault creation requirements from the mainnet factory
2362
2562
  */
2363
2563
  interface VaultCreationRequirements {
2364
2564
  veXARequired: bigint;
2365
- burnFee: bigint;
2565
+ minSeedAmount: bigint;
2566
+ unverifiedCapMultiplier: bigint;
2567
+ verifiedCapMultiplier: bigint;
2366
2568
  stakingContract: Address;
2367
- exaToken: Address;
2368
- /** Whether requirements are effectively bypassed (testnet mode) */
2369
- isBypassed: boolean;
2370
2569
  }
2371
2570
  /**
2372
2571
  * Result of checking if an address can create a vault
@@ -2381,6 +2580,7 @@ interface CanCreateVaultResult {
2381
2580
  interface CreateVaultOptions {
2382
2581
  agentId: bigint;
2383
2582
  asset: Address;
2583
+ seedAmount: bigint;
2384
2584
  name: string;
2385
2585
  symbol: string;
2386
2586
  feeRecipient?: Address;
@@ -2396,7 +2596,7 @@ declare class ExagentVaultFactory {
2396
2596
  private readonly account?;
2397
2597
  constructor(factoryAddress: Address, publicClient: any, walletClient?: any, chain?: Chain, account?: Account);
2398
2598
  /**
2399
- * Get vault creation requirements
2599
+ * Get vault creation requirements (mainnet: seed-based, no burn fee)
2400
2600
  */
2401
2601
  getRequirements(): Promise<VaultCreationRequirements>;
2402
2602
  /**
@@ -2404,6 +2604,14 @@ declare class ExagentVaultFactory {
2404
2604
  * @param creator Address to check
2405
2605
  */
2406
2606
  canCreateVault(creator: Address): Promise<CanCreateVaultResult>;
2607
+ /**
2608
+ * Check if an agent can create a verified vault (higher deposit cap)
2609
+ * @param agentId Agent ID to check
2610
+ */
2611
+ canCreateVerifiedVault(agentId: bigint): Promise<{
2612
+ isVerified: boolean;
2613
+ reason: string;
2614
+ }>;
2407
2615
  /**
2408
2616
  * Check if an asset is whitelisted for vault creation
2409
2617
  * @param asset Asset address to check
@@ -2428,8 +2636,8 @@ declare class ExagentVaultFactory {
2428
2636
  */
2429
2637
  hasVault(agentId: bigint, asset: Address): Promise<boolean>;
2430
2638
  /**
2431
- * Create a new vault for an agent
2432
- * @param options Vault creation options
2639
+ * Create a new vault for an agent (mainnet: requires seed amount)
2640
+ * @param options Vault creation options including seedAmount
2433
2641
  * @returns Transaction hash
2434
2642
  */
2435
2643
  createVault(options: CreateVaultOptions): Promise<Hash>;
@@ -2437,7 +2645,7 @@ declare class ExagentVaultFactory {
2437
2645
  * Check all requirements and create a vault if possible
2438
2646
  * Returns detailed status about each requirement
2439
2647
  */
2440
- checkAndCreateVault(agentId: bigint, asset: Address, name: string, symbol: string, feeRecipient?: Address): Promise<{
2648
+ checkAndCreateVault(agentId: bigint, asset: Address, seedAmount: bigint, name: string, symbol: string, feeRecipient?: Address): Promise<{
2441
2649
  success: boolean;
2442
2650
  vaultAddress?: Address;
2443
2651
  txHash?: Hash;
@@ -2467,4 +2675,4 @@ declare const TESTNET_ADDRESSES: {
2467
2675
  readonly usdc: "0x036CbD53842c5426634e7929541eC2318f3dCF7e";
2468
2676
  };
2469
2677
 
2470
- export { type AgentMetadata, type AgentProfile, CHAIN_CONFIG, CONTRACT_ADDRESSES, type CanCreateVaultResult, type CreateVaultOptions, DEX_ADDRESSES, DISCOUNT_TIERS, type DelegationInfo$1 as DelegationInfo, type DelegationInfo as DelegationInfoExtended, type DiscountTier$1 as DiscountTier, type DiscountTier as DiscountTierType, EXAGENT_API_CONFIG, EXAGENT_STAKING_ABI, EXAGENT_VAULT_FACTORY_ABI, ExagentClient, type ExagentClientConfig, ExagentRegistry, ExagentStaking, ExagentVault, ExagentVaultFactory, type NetworkType, type PerformanceSnapshot, type PriceQuote, type RouteQuote, type RouteStep, type RouterTradeResponse, type ServiceRequest, type StakeInfo, type StakingInfo$1 as StakingInfo, type StakingInfo as StakingInfoExtended, TESTNET_ADDRESSES, 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 };
2678
+ export { type AgentMetadata, type AgentProfile, type StakingInfo$1 as ApiStakingInfo, CHAIN_CONFIG, CONTRACT_ADDRESSES, type CanCreateVaultResult, type CreateVaultOptions, DEX_ADDRESSES, type DepositInfo, EXAGENT_API_CONFIG, 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, TESTNET_ADDRESSES, 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, parseGlobalAgentId };