@exagent/sdk 0.1.4 → 0.1.5
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 +5 -346
- package/dist/index.d.ts +5 -346
- package/dist/index.js +8 -43
- package/dist/index.mjs +9 -43
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -14,15 +14,15 @@ import * as viem_chains from 'viem/chains';
|
|
|
14
14
|
* // Base mainnet agent #42
|
|
15
15
|
* "eip155:8453:0xABC...DEF:42"
|
|
16
16
|
*
|
|
17
|
-
* // Base
|
|
18
|
-
* "eip155:
|
|
17
|
+
* // Another Base mainnet agent
|
|
18
|
+
* "eip155:8453:0x123...789:7"
|
|
19
19
|
* ```
|
|
20
20
|
*/
|
|
21
21
|
type GlobalAgentId = `eip155:${number}:${Address}:${number}`;
|
|
22
22
|
/**
|
|
23
23
|
* Build an ERC-8004 compliant global agent identifier
|
|
24
24
|
*
|
|
25
|
-
* @param chainId - EVM chain ID (8453 for Base
|
|
25
|
+
* @param chainId - EVM chain ID (8453 for Base)
|
|
26
26
|
* @param registryAddress - ExagentRegistry contract address
|
|
27
27
|
* @param agentId - On-chain agent ID (from ExagentRegistry)
|
|
28
28
|
* @returns Global agent identifier string
|
|
@@ -1656,332 +1656,8 @@ declare const CHAIN_CONFIG: {
|
|
|
1656
1656
|
};
|
|
1657
1657
|
verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
|
|
1658
1658
|
};
|
|
1659
|
-
readonly testnet: {
|
|
1660
|
-
blockExplorers: {
|
|
1661
|
-
readonly default: {
|
|
1662
|
-
readonly name: "Basescan";
|
|
1663
|
-
readonly url: "https://sepolia.basescan.org";
|
|
1664
|
-
readonly apiUrl: "https://api-sepolia.basescan.org/api";
|
|
1665
|
-
};
|
|
1666
|
-
};
|
|
1667
|
-
blockTime: 2000;
|
|
1668
|
-
contracts: {
|
|
1669
|
-
readonly disputeGameFactory: {
|
|
1670
|
-
readonly 11155111: {
|
|
1671
|
-
readonly address: "0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1";
|
|
1672
|
-
};
|
|
1673
|
-
};
|
|
1674
|
-
readonly l2OutputOracle: {
|
|
1675
|
-
readonly 11155111: {
|
|
1676
|
-
readonly address: "0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254";
|
|
1677
|
-
};
|
|
1678
|
-
};
|
|
1679
|
-
readonly portal: {
|
|
1680
|
-
readonly 11155111: {
|
|
1681
|
-
readonly address: "0x49f53e41452c74589e85ca1677426ba426459e85";
|
|
1682
|
-
readonly blockCreated: 4446677;
|
|
1683
|
-
};
|
|
1684
|
-
};
|
|
1685
|
-
readonly l1StandardBridge: {
|
|
1686
|
-
readonly 11155111: {
|
|
1687
|
-
readonly address: "0xfd0Bf71F60660E2f608ed56e1659C450eB113120";
|
|
1688
|
-
readonly blockCreated: 4446677;
|
|
1689
|
-
};
|
|
1690
|
-
};
|
|
1691
|
-
readonly multicall3: {
|
|
1692
|
-
readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
|
|
1693
|
-
readonly blockCreated: 1059647;
|
|
1694
|
-
};
|
|
1695
|
-
readonly gasPriceOracle: {
|
|
1696
|
-
readonly address: "0x420000000000000000000000000000000000000F";
|
|
1697
|
-
};
|
|
1698
|
-
readonly l1Block: {
|
|
1699
|
-
readonly address: "0x4200000000000000000000000000000000000015";
|
|
1700
|
-
};
|
|
1701
|
-
readonly l2CrossDomainMessenger: {
|
|
1702
|
-
readonly address: "0x4200000000000000000000000000000000000007";
|
|
1703
|
-
};
|
|
1704
|
-
readonly l2Erc721Bridge: {
|
|
1705
|
-
readonly address: "0x4200000000000000000000000000000000000014";
|
|
1706
|
-
};
|
|
1707
|
-
readonly l2StandardBridge: {
|
|
1708
|
-
readonly address: "0x4200000000000000000000000000000000000010";
|
|
1709
|
-
};
|
|
1710
|
-
readonly l2ToL1MessagePasser: {
|
|
1711
|
-
readonly address: "0x4200000000000000000000000000000000000016";
|
|
1712
|
-
};
|
|
1713
|
-
};
|
|
1714
|
-
ensTlds?: readonly string[] | undefined;
|
|
1715
|
-
id: 84532;
|
|
1716
|
-
name: "Base Sepolia";
|
|
1717
|
-
nativeCurrency: {
|
|
1718
|
-
readonly name: "Sepolia Ether";
|
|
1719
|
-
readonly symbol: "ETH";
|
|
1720
|
-
readonly decimals: 18;
|
|
1721
|
-
};
|
|
1722
|
-
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
1723
|
-
rpcUrls: {
|
|
1724
|
-
readonly default: {
|
|
1725
|
-
readonly http: readonly ["https://sepolia.base.org"];
|
|
1726
|
-
};
|
|
1727
|
-
};
|
|
1728
|
-
sourceId: 11155111;
|
|
1729
|
-
testnet: true;
|
|
1730
|
-
custom?: Record<string, unknown> | undefined;
|
|
1731
|
-
extendSchema?: Record<string, unknown> | undefined;
|
|
1732
|
-
fees?: viem.ChainFees<undefined> | undefined;
|
|
1733
|
-
formatters: {
|
|
1734
|
-
readonly block: {
|
|
1735
|
-
exclude: [] | 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) => {
|
|
1743
|
-
baseFeePerGas: bigint | null;
|
|
1744
|
-
blobGasUsed: bigint;
|
|
1745
|
-
difficulty: bigint;
|
|
1746
|
-
excessBlobGas: bigint;
|
|
1747
|
-
extraData: viem.Hex;
|
|
1748
|
-
gasLimit: bigint;
|
|
1749
|
-
gasUsed: bigint;
|
|
1750
|
-
hash: `0x${string}` | null;
|
|
1751
|
-
logsBloom: `0x${string}` | null;
|
|
1752
|
-
miner: `0x${string}`;
|
|
1753
|
-
mixHash: viem.Hash;
|
|
1754
|
-
nonce: `0x${string}` | null;
|
|
1755
|
-
number: bigint | null;
|
|
1756
|
-
parentBeaconBlockRoot?: `0x${string}` | undefined;
|
|
1757
|
-
parentHash: viem.Hash;
|
|
1758
|
-
receiptsRoot: viem.Hex;
|
|
1759
|
-
sealFields: viem.Hex[];
|
|
1760
|
-
sha3Uncles: viem.Hash;
|
|
1761
|
-
size: bigint;
|
|
1762
|
-
stateRoot: viem.Hash;
|
|
1763
|
-
timestamp: bigint;
|
|
1764
|
-
totalDifficulty: bigint | null;
|
|
1765
|
-
transactions: `0x${string}`[] | viem_chains.OpStackTransaction<boolean>[];
|
|
1766
|
-
transactionsRoot: viem.Hash;
|
|
1767
|
-
uncles: viem.Hash[];
|
|
1768
|
-
withdrawals?: viem.Withdrawal[] | undefined | undefined;
|
|
1769
|
-
withdrawalsRoot?: `0x${string}` | undefined;
|
|
1770
|
-
} & {};
|
|
1771
|
-
type: "block";
|
|
1772
|
-
};
|
|
1773
|
-
readonly transaction: {
|
|
1774
|
-
exclude: [] | undefined;
|
|
1775
|
-
format: (args: viem_chains.OpStackRpcTransaction, action?: string | undefined) => ({
|
|
1776
|
-
blockHash: `0x${string}` | null;
|
|
1777
|
-
blockNumber: bigint | null;
|
|
1778
|
-
from: `0x${string}`;
|
|
1779
|
-
gas: bigint;
|
|
1780
|
-
hash: viem.Hash;
|
|
1781
|
-
input: viem.Hex;
|
|
1782
|
-
nonce: number;
|
|
1783
|
-
r: viem.Hex;
|
|
1784
|
-
s: viem.Hex;
|
|
1785
|
-
to: `0x${string}` | null;
|
|
1786
|
-
transactionIndex: number | null;
|
|
1787
|
-
typeHex: viem.Hex | null;
|
|
1788
|
-
v: bigint;
|
|
1789
|
-
value: bigint;
|
|
1790
|
-
yParity: number;
|
|
1791
|
-
gasPrice?: undefined | undefined;
|
|
1792
|
-
maxFeePerBlobGas?: undefined | undefined;
|
|
1793
|
-
maxFeePerGas: bigint;
|
|
1794
|
-
maxPriorityFeePerGas: bigint;
|
|
1795
|
-
isSystemTx?: boolean;
|
|
1796
|
-
mint?: bigint | undefined | undefined;
|
|
1797
|
-
sourceHash: viem.Hex;
|
|
1798
|
-
type: "deposit";
|
|
1799
|
-
} | {
|
|
1800
|
-
r: viem.Hex;
|
|
1801
|
-
s: viem.Hex;
|
|
1802
|
-
v: bigint;
|
|
1803
|
-
to: `0x${string}` | null;
|
|
1804
|
-
from: `0x${string}`;
|
|
1805
|
-
gas: bigint;
|
|
1806
|
-
nonce: number;
|
|
1807
|
-
value: bigint;
|
|
1808
|
-
blockHash: `0x${string}` | null;
|
|
1809
|
-
blockNumber: bigint | null;
|
|
1810
|
-
hash: viem.Hash;
|
|
1811
|
-
input: viem.Hex;
|
|
1812
|
-
transactionIndex: number | null;
|
|
1813
|
-
typeHex: viem.Hex | null;
|
|
1814
|
-
accessList?: undefined | undefined;
|
|
1815
|
-
authorizationList?: undefined | undefined;
|
|
1816
|
-
blobVersionedHashes?: undefined | undefined;
|
|
1817
|
-
chainId?: number | undefined;
|
|
1818
|
-
yParity?: undefined | undefined;
|
|
1819
|
-
type: "legacy";
|
|
1820
|
-
gasPrice: bigint;
|
|
1821
|
-
maxFeePerBlobGas?: undefined | undefined;
|
|
1822
|
-
maxFeePerGas?: undefined | undefined;
|
|
1823
|
-
maxPriorityFeePerGas?: undefined | undefined;
|
|
1824
|
-
isSystemTx?: undefined | undefined;
|
|
1825
|
-
mint?: undefined | undefined;
|
|
1826
|
-
sourceHash?: undefined | undefined;
|
|
1827
|
-
} | {
|
|
1828
|
-
blockHash: `0x${string}` | null;
|
|
1829
|
-
blockNumber: bigint | null;
|
|
1830
|
-
from: `0x${string}`;
|
|
1831
|
-
gas: bigint;
|
|
1832
|
-
hash: viem.Hash;
|
|
1833
|
-
input: viem.Hex;
|
|
1834
|
-
nonce: number;
|
|
1835
|
-
r: viem.Hex;
|
|
1836
|
-
s: viem.Hex;
|
|
1837
|
-
to: `0x${string}` | null;
|
|
1838
|
-
transactionIndex: number | null;
|
|
1839
|
-
typeHex: viem.Hex | null;
|
|
1840
|
-
v: bigint;
|
|
1841
|
-
value: bigint;
|
|
1842
|
-
yParity: number;
|
|
1843
|
-
accessList: viem.AccessList;
|
|
1844
|
-
authorizationList?: undefined | undefined;
|
|
1845
|
-
blobVersionedHashes?: undefined | undefined;
|
|
1846
|
-
chainId: number;
|
|
1847
|
-
type: "eip2930";
|
|
1848
|
-
gasPrice: bigint;
|
|
1849
|
-
maxFeePerBlobGas?: undefined | undefined;
|
|
1850
|
-
maxFeePerGas?: undefined | undefined;
|
|
1851
|
-
maxPriorityFeePerGas?: undefined | undefined;
|
|
1852
|
-
isSystemTx?: undefined | undefined;
|
|
1853
|
-
mint?: undefined | undefined;
|
|
1854
|
-
sourceHash?: undefined | undefined;
|
|
1855
|
-
} | {
|
|
1856
|
-
blockHash: `0x${string}` | null;
|
|
1857
|
-
blockNumber: bigint | null;
|
|
1858
|
-
from: `0x${string}`;
|
|
1859
|
-
gas: bigint;
|
|
1860
|
-
hash: viem.Hash;
|
|
1861
|
-
input: viem.Hex;
|
|
1862
|
-
nonce: number;
|
|
1863
|
-
r: viem.Hex;
|
|
1864
|
-
s: viem.Hex;
|
|
1865
|
-
to: `0x${string}` | null;
|
|
1866
|
-
transactionIndex: number | null;
|
|
1867
|
-
typeHex: viem.Hex | null;
|
|
1868
|
-
v: bigint;
|
|
1869
|
-
value: bigint;
|
|
1870
|
-
yParity: number;
|
|
1871
|
-
accessList: viem.AccessList;
|
|
1872
|
-
authorizationList?: undefined | undefined;
|
|
1873
|
-
blobVersionedHashes?: undefined | undefined;
|
|
1874
|
-
chainId: number;
|
|
1875
|
-
type: "eip1559";
|
|
1876
|
-
gasPrice?: undefined | undefined;
|
|
1877
|
-
maxFeePerBlobGas?: undefined | undefined;
|
|
1878
|
-
maxFeePerGas: bigint;
|
|
1879
|
-
maxPriorityFeePerGas: bigint;
|
|
1880
|
-
isSystemTx?: undefined | undefined;
|
|
1881
|
-
mint?: undefined | undefined;
|
|
1882
|
-
sourceHash?: undefined | undefined;
|
|
1883
|
-
} | {
|
|
1884
|
-
blockHash: `0x${string}` | null;
|
|
1885
|
-
blockNumber: bigint | null;
|
|
1886
|
-
from: `0x${string}`;
|
|
1887
|
-
gas: bigint;
|
|
1888
|
-
hash: viem.Hash;
|
|
1889
|
-
input: viem.Hex;
|
|
1890
|
-
nonce: number;
|
|
1891
|
-
r: viem.Hex;
|
|
1892
|
-
s: viem.Hex;
|
|
1893
|
-
to: `0x${string}` | null;
|
|
1894
|
-
transactionIndex: number | null;
|
|
1895
|
-
typeHex: viem.Hex | null;
|
|
1896
|
-
v: bigint;
|
|
1897
|
-
value: bigint;
|
|
1898
|
-
yParity: number;
|
|
1899
|
-
accessList: viem.AccessList;
|
|
1900
|
-
authorizationList?: undefined | undefined;
|
|
1901
|
-
blobVersionedHashes: readonly viem.Hex[];
|
|
1902
|
-
chainId: number;
|
|
1903
|
-
type: "eip4844";
|
|
1904
|
-
gasPrice?: undefined | undefined;
|
|
1905
|
-
maxFeePerBlobGas: bigint;
|
|
1906
|
-
maxFeePerGas: bigint;
|
|
1907
|
-
maxPriorityFeePerGas: bigint;
|
|
1908
|
-
isSystemTx?: undefined | undefined;
|
|
1909
|
-
mint?: undefined | undefined;
|
|
1910
|
-
sourceHash?: undefined | undefined;
|
|
1911
|
-
} | {
|
|
1912
|
-
blockHash: `0x${string}` | null;
|
|
1913
|
-
blockNumber: bigint | null;
|
|
1914
|
-
from: `0x${string}`;
|
|
1915
|
-
gas: bigint;
|
|
1916
|
-
hash: viem.Hash;
|
|
1917
|
-
input: viem.Hex;
|
|
1918
|
-
nonce: number;
|
|
1919
|
-
r: viem.Hex;
|
|
1920
|
-
s: viem.Hex;
|
|
1921
|
-
to: `0x${string}` | null;
|
|
1922
|
-
transactionIndex: number | null;
|
|
1923
|
-
typeHex: viem.Hex | null;
|
|
1924
|
-
v: bigint;
|
|
1925
|
-
value: bigint;
|
|
1926
|
-
yParity: number;
|
|
1927
|
-
accessList: viem.AccessList;
|
|
1928
|
-
authorizationList: viem.SignedAuthorizationList;
|
|
1929
|
-
blobVersionedHashes?: undefined | undefined;
|
|
1930
|
-
chainId: number;
|
|
1931
|
-
type: "eip7702";
|
|
1932
|
-
gasPrice?: undefined | undefined;
|
|
1933
|
-
maxFeePerBlobGas?: undefined | undefined;
|
|
1934
|
-
maxFeePerGas: bigint;
|
|
1935
|
-
maxPriorityFeePerGas: bigint;
|
|
1936
|
-
isSystemTx?: undefined | undefined;
|
|
1937
|
-
mint?: undefined | undefined;
|
|
1938
|
-
sourceHash?: undefined | undefined;
|
|
1939
|
-
}) & {};
|
|
1940
|
-
type: "transaction";
|
|
1941
|
-
};
|
|
1942
|
-
readonly transactionReceipt: {
|
|
1943
|
-
exclude: [] | undefined;
|
|
1944
|
-
format: (args: viem_chains.OpStackRpcTransactionReceipt, action?: string | undefined) => {
|
|
1945
|
-
blobGasPrice?: bigint | undefined;
|
|
1946
|
-
blobGasUsed?: bigint | undefined;
|
|
1947
|
-
blockHash: viem.Hash;
|
|
1948
|
-
blockNumber: bigint;
|
|
1949
|
-
contractAddress: `0x${string}` | null | undefined;
|
|
1950
|
-
cumulativeGasUsed: bigint;
|
|
1951
|
-
effectiveGasPrice: bigint;
|
|
1952
|
-
from: `0x${string}`;
|
|
1953
|
-
gasUsed: bigint;
|
|
1954
|
-
logs: viem.Log<bigint, number, false>[];
|
|
1955
|
-
logsBloom: viem.Hex;
|
|
1956
|
-
root?: `0x${string}` | undefined;
|
|
1957
|
-
status: "success" | "reverted";
|
|
1958
|
-
to: `0x${string}` | null;
|
|
1959
|
-
transactionHash: viem.Hash;
|
|
1960
|
-
transactionIndex: number;
|
|
1961
|
-
type: viem.TransactionType;
|
|
1962
|
-
l1GasPrice: bigint | null;
|
|
1963
|
-
l1GasUsed: bigint | null;
|
|
1964
|
-
l1Fee: bigint | null;
|
|
1965
|
-
l1FeeScalar: number | null;
|
|
1966
|
-
} & {};
|
|
1967
|
-
type: "transactionReceipt";
|
|
1968
|
-
};
|
|
1969
|
-
};
|
|
1970
|
-
prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
1971
|
-
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
1972
|
-
}) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
1973
|
-
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
1974
|
-
}) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
|
|
1975
|
-
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
1976
|
-
}] | undefined;
|
|
1977
|
-
serializers: {
|
|
1978
|
-
readonly transaction: typeof viem_chains.serializeTransactionOpStack;
|
|
1979
|
-
};
|
|
1980
|
-
verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
|
|
1981
|
-
readonly network: "base-sepolia";
|
|
1982
|
-
};
|
|
1983
1659
|
};
|
|
1984
|
-
type NetworkType =
|
|
1660
|
+
type NetworkType = 'mainnet';
|
|
1985
1661
|
/**
|
|
1986
1662
|
* Contract addresses by network
|
|
1987
1663
|
*/
|
|
@@ -2018,7 +1694,6 @@ declare const ZERO_X_CONFIG: {
|
|
|
2018
1694
|
*/
|
|
2019
1695
|
declare const EXAGENT_API_CONFIG: {
|
|
2020
1696
|
readonly mainnet: "https://exagent-api.onrender.com";
|
|
2021
|
-
readonly testnet: "https://exagent-api.onrender.com";
|
|
2022
1697
|
};
|
|
2023
1698
|
|
|
2024
1699
|
/**
|
|
@@ -2659,20 +2334,4 @@ declare class ExagentVaultFactory {
|
|
|
2659
2334
|
}>;
|
|
2660
2335
|
}
|
|
2661
2336
|
|
|
2662
|
-
|
|
2663
|
-
* Quick access to testnet (Base Sepolia) contract addresses
|
|
2664
|
-
* Use these when interacting with contracts directly via viem
|
|
2665
|
-
*/
|
|
2666
|
-
declare const TESTNET_ADDRESSES: {
|
|
2667
|
-
readonly registry: "0xCF48C341e3FebeCA5ECB7eb2535f61A2Ba855d9C";
|
|
2668
|
-
readonly token: "0x66c39b0ad96B3f5eE198Fef913c6636353a48A87";
|
|
2669
|
-
readonly staking: "0x439441468e1b1b616E9D36b80969C241F261A011";
|
|
2670
|
-
readonly router: "0xc0c27eEE047E414CD716D06C2444CF2073113d5C";
|
|
2671
|
-
readonly vaultFactory: "0x5c099daaE33801a907Bb57011c6749655b55dc75";
|
|
2672
|
-
readonly feeCollector: "0xcB57b03a50df054b9C738Df1324C17A4fDe4fe46";
|
|
2673
|
-
readonly buyback: "0x35cdEa810A130A846265682e5c71A68A507aB895";
|
|
2674
|
-
readonly serviceEscrow: "0x74a3496b148DEE735ac388299aF9Ac2F7C4EdCBf";
|
|
2675
|
-
readonly usdc: "0x036CbD53842c5426634e7929541eC2318f3dCF7e";
|
|
2676
|
-
};
|
|
2677
|
-
|
|
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 };
|
|
2337
|
+
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, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -14,15 +14,15 @@ import * as viem_chains from 'viem/chains';
|
|
|
14
14
|
* // Base mainnet agent #42
|
|
15
15
|
* "eip155:8453:0xABC...DEF:42"
|
|
16
16
|
*
|
|
17
|
-
* // Base
|
|
18
|
-
* "eip155:
|
|
17
|
+
* // Another Base mainnet agent
|
|
18
|
+
* "eip155:8453:0x123...789:7"
|
|
19
19
|
* ```
|
|
20
20
|
*/
|
|
21
21
|
type GlobalAgentId = `eip155:${number}:${Address}:${number}`;
|
|
22
22
|
/**
|
|
23
23
|
* Build an ERC-8004 compliant global agent identifier
|
|
24
24
|
*
|
|
25
|
-
* @param chainId - EVM chain ID (8453 for Base
|
|
25
|
+
* @param chainId - EVM chain ID (8453 for Base)
|
|
26
26
|
* @param registryAddress - ExagentRegistry contract address
|
|
27
27
|
* @param agentId - On-chain agent ID (from ExagentRegistry)
|
|
28
28
|
* @returns Global agent identifier string
|
|
@@ -1656,332 +1656,8 @@ declare const CHAIN_CONFIG: {
|
|
|
1656
1656
|
};
|
|
1657
1657
|
verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
|
|
1658
1658
|
};
|
|
1659
|
-
readonly testnet: {
|
|
1660
|
-
blockExplorers: {
|
|
1661
|
-
readonly default: {
|
|
1662
|
-
readonly name: "Basescan";
|
|
1663
|
-
readonly url: "https://sepolia.basescan.org";
|
|
1664
|
-
readonly apiUrl: "https://api-sepolia.basescan.org/api";
|
|
1665
|
-
};
|
|
1666
|
-
};
|
|
1667
|
-
blockTime: 2000;
|
|
1668
|
-
contracts: {
|
|
1669
|
-
readonly disputeGameFactory: {
|
|
1670
|
-
readonly 11155111: {
|
|
1671
|
-
readonly address: "0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1";
|
|
1672
|
-
};
|
|
1673
|
-
};
|
|
1674
|
-
readonly l2OutputOracle: {
|
|
1675
|
-
readonly 11155111: {
|
|
1676
|
-
readonly address: "0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254";
|
|
1677
|
-
};
|
|
1678
|
-
};
|
|
1679
|
-
readonly portal: {
|
|
1680
|
-
readonly 11155111: {
|
|
1681
|
-
readonly address: "0x49f53e41452c74589e85ca1677426ba426459e85";
|
|
1682
|
-
readonly blockCreated: 4446677;
|
|
1683
|
-
};
|
|
1684
|
-
};
|
|
1685
|
-
readonly l1StandardBridge: {
|
|
1686
|
-
readonly 11155111: {
|
|
1687
|
-
readonly address: "0xfd0Bf71F60660E2f608ed56e1659C450eB113120";
|
|
1688
|
-
readonly blockCreated: 4446677;
|
|
1689
|
-
};
|
|
1690
|
-
};
|
|
1691
|
-
readonly multicall3: {
|
|
1692
|
-
readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
|
|
1693
|
-
readonly blockCreated: 1059647;
|
|
1694
|
-
};
|
|
1695
|
-
readonly gasPriceOracle: {
|
|
1696
|
-
readonly address: "0x420000000000000000000000000000000000000F";
|
|
1697
|
-
};
|
|
1698
|
-
readonly l1Block: {
|
|
1699
|
-
readonly address: "0x4200000000000000000000000000000000000015";
|
|
1700
|
-
};
|
|
1701
|
-
readonly l2CrossDomainMessenger: {
|
|
1702
|
-
readonly address: "0x4200000000000000000000000000000000000007";
|
|
1703
|
-
};
|
|
1704
|
-
readonly l2Erc721Bridge: {
|
|
1705
|
-
readonly address: "0x4200000000000000000000000000000000000014";
|
|
1706
|
-
};
|
|
1707
|
-
readonly l2StandardBridge: {
|
|
1708
|
-
readonly address: "0x4200000000000000000000000000000000000010";
|
|
1709
|
-
};
|
|
1710
|
-
readonly l2ToL1MessagePasser: {
|
|
1711
|
-
readonly address: "0x4200000000000000000000000000000000000016";
|
|
1712
|
-
};
|
|
1713
|
-
};
|
|
1714
|
-
ensTlds?: readonly string[] | undefined;
|
|
1715
|
-
id: 84532;
|
|
1716
|
-
name: "Base Sepolia";
|
|
1717
|
-
nativeCurrency: {
|
|
1718
|
-
readonly name: "Sepolia Ether";
|
|
1719
|
-
readonly symbol: "ETH";
|
|
1720
|
-
readonly decimals: 18;
|
|
1721
|
-
};
|
|
1722
|
-
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
1723
|
-
rpcUrls: {
|
|
1724
|
-
readonly default: {
|
|
1725
|
-
readonly http: readonly ["https://sepolia.base.org"];
|
|
1726
|
-
};
|
|
1727
|
-
};
|
|
1728
|
-
sourceId: 11155111;
|
|
1729
|
-
testnet: true;
|
|
1730
|
-
custom?: Record<string, unknown> | undefined;
|
|
1731
|
-
extendSchema?: Record<string, unknown> | undefined;
|
|
1732
|
-
fees?: viem.ChainFees<undefined> | undefined;
|
|
1733
|
-
formatters: {
|
|
1734
|
-
readonly block: {
|
|
1735
|
-
exclude: [] | 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) => {
|
|
1743
|
-
baseFeePerGas: bigint | null;
|
|
1744
|
-
blobGasUsed: bigint;
|
|
1745
|
-
difficulty: bigint;
|
|
1746
|
-
excessBlobGas: bigint;
|
|
1747
|
-
extraData: viem.Hex;
|
|
1748
|
-
gasLimit: bigint;
|
|
1749
|
-
gasUsed: bigint;
|
|
1750
|
-
hash: `0x${string}` | null;
|
|
1751
|
-
logsBloom: `0x${string}` | null;
|
|
1752
|
-
miner: `0x${string}`;
|
|
1753
|
-
mixHash: viem.Hash;
|
|
1754
|
-
nonce: `0x${string}` | null;
|
|
1755
|
-
number: bigint | null;
|
|
1756
|
-
parentBeaconBlockRoot?: `0x${string}` | undefined;
|
|
1757
|
-
parentHash: viem.Hash;
|
|
1758
|
-
receiptsRoot: viem.Hex;
|
|
1759
|
-
sealFields: viem.Hex[];
|
|
1760
|
-
sha3Uncles: viem.Hash;
|
|
1761
|
-
size: bigint;
|
|
1762
|
-
stateRoot: viem.Hash;
|
|
1763
|
-
timestamp: bigint;
|
|
1764
|
-
totalDifficulty: bigint | null;
|
|
1765
|
-
transactions: `0x${string}`[] | viem_chains.OpStackTransaction<boolean>[];
|
|
1766
|
-
transactionsRoot: viem.Hash;
|
|
1767
|
-
uncles: viem.Hash[];
|
|
1768
|
-
withdrawals?: viem.Withdrawal[] | undefined | undefined;
|
|
1769
|
-
withdrawalsRoot?: `0x${string}` | undefined;
|
|
1770
|
-
} & {};
|
|
1771
|
-
type: "block";
|
|
1772
|
-
};
|
|
1773
|
-
readonly transaction: {
|
|
1774
|
-
exclude: [] | undefined;
|
|
1775
|
-
format: (args: viem_chains.OpStackRpcTransaction, action?: string | undefined) => ({
|
|
1776
|
-
blockHash: `0x${string}` | null;
|
|
1777
|
-
blockNumber: bigint | null;
|
|
1778
|
-
from: `0x${string}`;
|
|
1779
|
-
gas: bigint;
|
|
1780
|
-
hash: viem.Hash;
|
|
1781
|
-
input: viem.Hex;
|
|
1782
|
-
nonce: number;
|
|
1783
|
-
r: viem.Hex;
|
|
1784
|
-
s: viem.Hex;
|
|
1785
|
-
to: `0x${string}` | null;
|
|
1786
|
-
transactionIndex: number | null;
|
|
1787
|
-
typeHex: viem.Hex | null;
|
|
1788
|
-
v: bigint;
|
|
1789
|
-
value: bigint;
|
|
1790
|
-
yParity: number;
|
|
1791
|
-
gasPrice?: undefined | undefined;
|
|
1792
|
-
maxFeePerBlobGas?: undefined | undefined;
|
|
1793
|
-
maxFeePerGas: bigint;
|
|
1794
|
-
maxPriorityFeePerGas: bigint;
|
|
1795
|
-
isSystemTx?: boolean;
|
|
1796
|
-
mint?: bigint | undefined | undefined;
|
|
1797
|
-
sourceHash: viem.Hex;
|
|
1798
|
-
type: "deposit";
|
|
1799
|
-
} | {
|
|
1800
|
-
r: viem.Hex;
|
|
1801
|
-
s: viem.Hex;
|
|
1802
|
-
v: bigint;
|
|
1803
|
-
to: `0x${string}` | null;
|
|
1804
|
-
from: `0x${string}`;
|
|
1805
|
-
gas: bigint;
|
|
1806
|
-
nonce: number;
|
|
1807
|
-
value: bigint;
|
|
1808
|
-
blockHash: `0x${string}` | null;
|
|
1809
|
-
blockNumber: bigint | null;
|
|
1810
|
-
hash: viem.Hash;
|
|
1811
|
-
input: viem.Hex;
|
|
1812
|
-
transactionIndex: number | null;
|
|
1813
|
-
typeHex: viem.Hex | null;
|
|
1814
|
-
accessList?: undefined | undefined;
|
|
1815
|
-
authorizationList?: undefined | undefined;
|
|
1816
|
-
blobVersionedHashes?: undefined | undefined;
|
|
1817
|
-
chainId?: number | undefined;
|
|
1818
|
-
yParity?: undefined | undefined;
|
|
1819
|
-
type: "legacy";
|
|
1820
|
-
gasPrice: bigint;
|
|
1821
|
-
maxFeePerBlobGas?: undefined | undefined;
|
|
1822
|
-
maxFeePerGas?: undefined | undefined;
|
|
1823
|
-
maxPriorityFeePerGas?: undefined | undefined;
|
|
1824
|
-
isSystemTx?: undefined | undefined;
|
|
1825
|
-
mint?: undefined | undefined;
|
|
1826
|
-
sourceHash?: undefined | undefined;
|
|
1827
|
-
} | {
|
|
1828
|
-
blockHash: `0x${string}` | null;
|
|
1829
|
-
blockNumber: bigint | null;
|
|
1830
|
-
from: `0x${string}`;
|
|
1831
|
-
gas: bigint;
|
|
1832
|
-
hash: viem.Hash;
|
|
1833
|
-
input: viem.Hex;
|
|
1834
|
-
nonce: number;
|
|
1835
|
-
r: viem.Hex;
|
|
1836
|
-
s: viem.Hex;
|
|
1837
|
-
to: `0x${string}` | null;
|
|
1838
|
-
transactionIndex: number | null;
|
|
1839
|
-
typeHex: viem.Hex | null;
|
|
1840
|
-
v: bigint;
|
|
1841
|
-
value: bigint;
|
|
1842
|
-
yParity: number;
|
|
1843
|
-
accessList: viem.AccessList;
|
|
1844
|
-
authorizationList?: undefined | undefined;
|
|
1845
|
-
blobVersionedHashes?: undefined | undefined;
|
|
1846
|
-
chainId: number;
|
|
1847
|
-
type: "eip2930";
|
|
1848
|
-
gasPrice: bigint;
|
|
1849
|
-
maxFeePerBlobGas?: undefined | undefined;
|
|
1850
|
-
maxFeePerGas?: undefined | undefined;
|
|
1851
|
-
maxPriorityFeePerGas?: undefined | undefined;
|
|
1852
|
-
isSystemTx?: undefined | undefined;
|
|
1853
|
-
mint?: undefined | undefined;
|
|
1854
|
-
sourceHash?: undefined | undefined;
|
|
1855
|
-
} | {
|
|
1856
|
-
blockHash: `0x${string}` | null;
|
|
1857
|
-
blockNumber: bigint | null;
|
|
1858
|
-
from: `0x${string}`;
|
|
1859
|
-
gas: bigint;
|
|
1860
|
-
hash: viem.Hash;
|
|
1861
|
-
input: viem.Hex;
|
|
1862
|
-
nonce: number;
|
|
1863
|
-
r: viem.Hex;
|
|
1864
|
-
s: viem.Hex;
|
|
1865
|
-
to: `0x${string}` | null;
|
|
1866
|
-
transactionIndex: number | null;
|
|
1867
|
-
typeHex: viem.Hex | null;
|
|
1868
|
-
v: bigint;
|
|
1869
|
-
value: bigint;
|
|
1870
|
-
yParity: number;
|
|
1871
|
-
accessList: viem.AccessList;
|
|
1872
|
-
authorizationList?: undefined | undefined;
|
|
1873
|
-
blobVersionedHashes?: undefined | undefined;
|
|
1874
|
-
chainId: number;
|
|
1875
|
-
type: "eip1559";
|
|
1876
|
-
gasPrice?: undefined | undefined;
|
|
1877
|
-
maxFeePerBlobGas?: undefined | undefined;
|
|
1878
|
-
maxFeePerGas: bigint;
|
|
1879
|
-
maxPriorityFeePerGas: bigint;
|
|
1880
|
-
isSystemTx?: undefined | undefined;
|
|
1881
|
-
mint?: undefined | undefined;
|
|
1882
|
-
sourceHash?: undefined | undefined;
|
|
1883
|
-
} | {
|
|
1884
|
-
blockHash: `0x${string}` | null;
|
|
1885
|
-
blockNumber: bigint | null;
|
|
1886
|
-
from: `0x${string}`;
|
|
1887
|
-
gas: bigint;
|
|
1888
|
-
hash: viem.Hash;
|
|
1889
|
-
input: viem.Hex;
|
|
1890
|
-
nonce: number;
|
|
1891
|
-
r: viem.Hex;
|
|
1892
|
-
s: viem.Hex;
|
|
1893
|
-
to: `0x${string}` | null;
|
|
1894
|
-
transactionIndex: number | null;
|
|
1895
|
-
typeHex: viem.Hex | null;
|
|
1896
|
-
v: bigint;
|
|
1897
|
-
value: bigint;
|
|
1898
|
-
yParity: number;
|
|
1899
|
-
accessList: viem.AccessList;
|
|
1900
|
-
authorizationList?: undefined | undefined;
|
|
1901
|
-
blobVersionedHashes: readonly viem.Hex[];
|
|
1902
|
-
chainId: number;
|
|
1903
|
-
type: "eip4844";
|
|
1904
|
-
gasPrice?: undefined | undefined;
|
|
1905
|
-
maxFeePerBlobGas: bigint;
|
|
1906
|
-
maxFeePerGas: bigint;
|
|
1907
|
-
maxPriorityFeePerGas: bigint;
|
|
1908
|
-
isSystemTx?: undefined | undefined;
|
|
1909
|
-
mint?: undefined | undefined;
|
|
1910
|
-
sourceHash?: undefined | undefined;
|
|
1911
|
-
} | {
|
|
1912
|
-
blockHash: `0x${string}` | null;
|
|
1913
|
-
blockNumber: bigint | null;
|
|
1914
|
-
from: `0x${string}`;
|
|
1915
|
-
gas: bigint;
|
|
1916
|
-
hash: viem.Hash;
|
|
1917
|
-
input: viem.Hex;
|
|
1918
|
-
nonce: number;
|
|
1919
|
-
r: viem.Hex;
|
|
1920
|
-
s: viem.Hex;
|
|
1921
|
-
to: `0x${string}` | null;
|
|
1922
|
-
transactionIndex: number | null;
|
|
1923
|
-
typeHex: viem.Hex | null;
|
|
1924
|
-
v: bigint;
|
|
1925
|
-
value: bigint;
|
|
1926
|
-
yParity: number;
|
|
1927
|
-
accessList: viem.AccessList;
|
|
1928
|
-
authorizationList: viem.SignedAuthorizationList;
|
|
1929
|
-
blobVersionedHashes?: undefined | undefined;
|
|
1930
|
-
chainId: number;
|
|
1931
|
-
type: "eip7702";
|
|
1932
|
-
gasPrice?: undefined | undefined;
|
|
1933
|
-
maxFeePerBlobGas?: undefined | undefined;
|
|
1934
|
-
maxFeePerGas: bigint;
|
|
1935
|
-
maxPriorityFeePerGas: bigint;
|
|
1936
|
-
isSystemTx?: undefined | undefined;
|
|
1937
|
-
mint?: undefined | undefined;
|
|
1938
|
-
sourceHash?: undefined | undefined;
|
|
1939
|
-
}) & {};
|
|
1940
|
-
type: "transaction";
|
|
1941
|
-
};
|
|
1942
|
-
readonly transactionReceipt: {
|
|
1943
|
-
exclude: [] | undefined;
|
|
1944
|
-
format: (args: viem_chains.OpStackRpcTransactionReceipt, action?: string | undefined) => {
|
|
1945
|
-
blobGasPrice?: bigint | undefined;
|
|
1946
|
-
blobGasUsed?: bigint | undefined;
|
|
1947
|
-
blockHash: viem.Hash;
|
|
1948
|
-
blockNumber: bigint;
|
|
1949
|
-
contractAddress: `0x${string}` | null | undefined;
|
|
1950
|
-
cumulativeGasUsed: bigint;
|
|
1951
|
-
effectiveGasPrice: bigint;
|
|
1952
|
-
from: `0x${string}`;
|
|
1953
|
-
gasUsed: bigint;
|
|
1954
|
-
logs: viem.Log<bigint, number, false>[];
|
|
1955
|
-
logsBloom: viem.Hex;
|
|
1956
|
-
root?: `0x${string}` | undefined;
|
|
1957
|
-
status: "success" | "reverted";
|
|
1958
|
-
to: `0x${string}` | null;
|
|
1959
|
-
transactionHash: viem.Hash;
|
|
1960
|
-
transactionIndex: number;
|
|
1961
|
-
type: viem.TransactionType;
|
|
1962
|
-
l1GasPrice: bigint | null;
|
|
1963
|
-
l1GasUsed: bigint | null;
|
|
1964
|
-
l1Fee: bigint | null;
|
|
1965
|
-
l1FeeScalar: number | null;
|
|
1966
|
-
} & {};
|
|
1967
|
-
type: "transactionReceipt";
|
|
1968
|
-
};
|
|
1969
|
-
};
|
|
1970
|
-
prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
1971
|
-
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
1972
|
-
}) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
1973
|
-
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
1974
|
-
}) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
|
|
1975
|
-
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
1976
|
-
}] | undefined;
|
|
1977
|
-
serializers: {
|
|
1978
|
-
readonly transaction: typeof viem_chains.serializeTransactionOpStack;
|
|
1979
|
-
};
|
|
1980
|
-
verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
|
|
1981
|
-
readonly network: "base-sepolia";
|
|
1982
|
-
};
|
|
1983
1659
|
};
|
|
1984
|
-
type NetworkType =
|
|
1660
|
+
type NetworkType = 'mainnet';
|
|
1985
1661
|
/**
|
|
1986
1662
|
* Contract addresses by network
|
|
1987
1663
|
*/
|
|
@@ -2018,7 +1694,6 @@ declare const ZERO_X_CONFIG: {
|
|
|
2018
1694
|
*/
|
|
2019
1695
|
declare const EXAGENT_API_CONFIG: {
|
|
2020
1696
|
readonly mainnet: "https://exagent-api.onrender.com";
|
|
2021
|
-
readonly testnet: "https://exagent-api.onrender.com";
|
|
2022
1697
|
};
|
|
2023
1698
|
|
|
2024
1699
|
/**
|
|
@@ -2659,20 +2334,4 @@ declare class ExagentVaultFactory {
|
|
|
2659
2334
|
}>;
|
|
2660
2335
|
}
|
|
2661
2336
|
|
|
2662
|
-
|
|
2663
|
-
* Quick access to testnet (Base Sepolia) contract addresses
|
|
2664
|
-
* Use these when interacting with contracts directly via viem
|
|
2665
|
-
*/
|
|
2666
|
-
declare const TESTNET_ADDRESSES: {
|
|
2667
|
-
readonly registry: "0xCF48C341e3FebeCA5ECB7eb2535f61A2Ba855d9C";
|
|
2668
|
-
readonly token: "0x66c39b0ad96B3f5eE198Fef913c6636353a48A87";
|
|
2669
|
-
readonly staking: "0x439441468e1b1b616E9D36b80969C241F261A011";
|
|
2670
|
-
readonly router: "0xc0c27eEE047E414CD716D06C2444CF2073113d5C";
|
|
2671
|
-
readonly vaultFactory: "0x5c099daaE33801a907Bb57011c6749655b55dc75";
|
|
2672
|
-
readonly feeCollector: "0xcB57b03a50df054b9C738Df1324C17A4fDe4fe46";
|
|
2673
|
-
readonly buyback: "0x35cdEa810A130A846265682e5c71A68A507aB895";
|
|
2674
|
-
readonly serviceEscrow: "0x74a3496b148DEE735ac388299aF9Ac2F7C4EdCBf";
|
|
2675
|
-
readonly usdc: "0x036CbD53842c5426634e7929541eC2318f3dCF7e";
|
|
2676
|
-
};
|
|
2677
|
-
|
|
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 };
|
|
2337
|
+
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, 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 };
|
package/dist/index.js
CHANGED
|
@@ -32,7 +32,6 @@ __export(index_exports, {
|
|
|
32
32
|
ExagentVault: () => ExagentVault,
|
|
33
33
|
ExagentVaultFactory: () => ExagentVaultFactory,
|
|
34
34
|
SDK_VERSION: () => SDK_VERSION,
|
|
35
|
-
TESTNET_ADDRESSES: () => TESTNET_ADDRESSES,
|
|
36
35
|
ZERO_X_CONFIG: () => ZERO_X_CONFIG,
|
|
37
36
|
buildGlobalAgentId: () => buildGlobalAgentId,
|
|
38
37
|
parseGlobalAgentId: () => parseGlobalAgentId
|
|
@@ -2060,8 +2059,7 @@ var ExagentStaking = class {
|
|
|
2060
2059
|
var import_chains = require("viem/chains");
|
|
2061
2060
|
var SDK_VERSION = "0.1.4";
|
|
2062
2061
|
var CHAIN_CONFIG = {
|
|
2063
|
-
mainnet: import_chains.base
|
|
2064
|
-
testnet: import_chains.baseSepolia
|
|
2062
|
+
mainnet: import_chains.base
|
|
2065
2063
|
};
|
|
2066
2064
|
var CONTRACT_ADDRESSES = {
|
|
2067
2065
|
mainnet: {
|
|
@@ -2076,20 +2074,6 @@ var CONTRACT_ADDRESSES = {
|
|
|
2076
2074
|
// Phase 2 — pending deploy
|
|
2077
2075
|
serviceEscrow: "0x0000000000000000000000000000000000000000"
|
|
2078
2076
|
// Phase 2 — pending deploy
|
|
2079
|
-
},
|
|
2080
|
-
testnet: {
|
|
2081
|
-
agentRegistry: "0xCF48C341e3FebeCA5ECB7eb2535f61A2Ba855d9C",
|
|
2082
|
-
// one-agent-per-wallet
|
|
2083
|
-
exaToken: "0x66c39b0ad96B3f5eE198Fef913c6636353a48A87",
|
|
2084
|
-
staking: "0x439441468e1b1b616E9D36b80969C241F261A011",
|
|
2085
|
-
// V2 with delegation
|
|
2086
|
-
router: "0xc0c27eEE047E414CD716D06C2444CF2073113d5C",
|
|
2087
|
-
// V3 with config epochs
|
|
2088
|
-
vaultFactory: "0x5c099daaE33801a907Bb57011c6749655b55dc75",
|
|
2089
|
-
// V2 with requirements
|
|
2090
|
-
feeCollector: "0xcB57b03a50df054b9C738Df1324C17A4fDe4fe46",
|
|
2091
|
-
buyback: "0x35cdEa810A130A846265682e5c71A68A507aB895",
|
|
2092
|
-
serviceEscrow: "0x74a3496b148DEE735ac388299aF9Ac2F7C4EdCBf"
|
|
2093
2077
|
}
|
|
2094
2078
|
};
|
|
2095
2079
|
var DEX_ADDRESSES = {
|
|
@@ -2109,8 +2093,7 @@ var ZERO_X_CONFIG = {
|
|
|
2109
2093
|
// Base
|
|
2110
2094
|
};
|
|
2111
2095
|
var EXAGENT_API_CONFIG = {
|
|
2112
|
-
mainnet: "https://exagent-api.onrender.com"
|
|
2113
|
-
testnet: "https://exagent-api.onrender.com"
|
|
2096
|
+
mainnet: "https://exagent-api.onrender.com"
|
|
2114
2097
|
};
|
|
2115
2098
|
var ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
|
|
2116
2099
|
var PHASE_1_CONTRACTS = /* @__PURE__ */ new Set([
|
|
@@ -2122,13 +2105,11 @@ var PHASE_1_CONTRACTS = /* @__PURE__ */ new Set([
|
|
|
2122
2105
|
]);
|
|
2123
2106
|
function validateContractAddresses(network) {
|
|
2124
2107
|
const addresses = CONTRACT_ADDRESSES[network];
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
);
|
|
2131
|
-
}
|
|
2108
|
+
const missingPhase1 = Object.entries(addresses).filter(([name, addr]) => PHASE_1_CONTRACTS.has(name) && addr === ZERO_ADDRESS).map(([name]) => name);
|
|
2109
|
+
if (missingPhase1.length > 0) {
|
|
2110
|
+
throw new Error(
|
|
2111
|
+
`Mainnet Phase 1 contracts not deployed. Missing: ${missingPhase1.join(", ")}. Update @exagent/sdk to the latest version.`
|
|
2112
|
+
);
|
|
2132
2113
|
}
|
|
2133
2114
|
}
|
|
2134
2115
|
|
|
@@ -2163,7 +2144,7 @@ var ExagentClient = class {
|
|
|
2163
2144
|
// Cached agent ID
|
|
2164
2145
|
_agentId;
|
|
2165
2146
|
constructor(config) {
|
|
2166
|
-
this.network = config.network ?? "
|
|
2147
|
+
this.network = config.network ?? "mainnet";
|
|
2167
2148
|
this.apiKey = config.apiKey;
|
|
2168
2149
|
validateContractAddresses(this.network);
|
|
2169
2150
|
const chain = CHAIN_CONFIG[this.network];
|
|
@@ -3029,21 +3010,6 @@ var ExagentVaultFactory = class {
|
|
|
3029
3010
|
}
|
|
3030
3011
|
}
|
|
3031
3012
|
};
|
|
3032
|
-
|
|
3033
|
-
// src/index.ts
|
|
3034
|
-
var TESTNET_ADDRESSES = {
|
|
3035
|
-
registry: "0xCF48C341e3FebeCA5ECB7eb2535f61A2Ba855d9C",
|
|
3036
|
-
token: "0x66c39b0ad96B3f5eE198Fef913c6636353a48A87",
|
|
3037
|
-
staking: "0x439441468e1b1b616E9D36b80969C241F261A011",
|
|
3038
|
-
router: "0xc0c27eEE047E414CD716D06C2444CF2073113d5C",
|
|
3039
|
-
// V3 with config epochs
|
|
3040
|
-
vaultFactory: "0x5c099daaE33801a907Bb57011c6749655b55dc75",
|
|
3041
|
-
feeCollector: "0xcB57b03a50df054b9C738Df1324C17A4fDe4fe46",
|
|
3042
|
-
buyback: "0x35cdEa810A130A846265682e5c71A68A507aB895",
|
|
3043
|
-
serviceEscrow: "0x74a3496b148DEE735ac388299aF9Ac2F7C4EdCBf",
|
|
3044
|
-
usdc: "0x036CbD53842c5426634e7929541eC2318f3dCF7e"
|
|
3045
|
-
// Circle's Base Sepolia USDC (only vault asset)
|
|
3046
|
-
};
|
|
3047
3013
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3048
3014
|
0 && (module.exports = {
|
|
3049
3015
|
CHAIN_CONFIG,
|
|
@@ -3058,7 +3024,6 @@ var TESTNET_ADDRESSES = {
|
|
|
3058
3024
|
ExagentVault,
|
|
3059
3025
|
ExagentVaultFactory,
|
|
3060
3026
|
SDK_VERSION,
|
|
3061
|
-
TESTNET_ADDRESSES,
|
|
3062
3027
|
ZERO_X_CONFIG,
|
|
3063
3028
|
buildGlobalAgentId,
|
|
3064
3029
|
parseGlobalAgentId
|
package/dist/index.mjs
CHANGED
|
@@ -2023,11 +2023,10 @@ var ExagentStaking = class {
|
|
|
2023
2023
|
};
|
|
2024
2024
|
|
|
2025
2025
|
// src/constants.ts
|
|
2026
|
-
import { base
|
|
2026
|
+
import { base } from "viem/chains";
|
|
2027
2027
|
var SDK_VERSION = "0.1.4";
|
|
2028
2028
|
var CHAIN_CONFIG = {
|
|
2029
|
-
mainnet: base
|
|
2030
|
-
testnet: baseSepolia
|
|
2029
|
+
mainnet: base
|
|
2031
2030
|
};
|
|
2032
2031
|
var CONTRACT_ADDRESSES = {
|
|
2033
2032
|
mainnet: {
|
|
@@ -2042,20 +2041,6 @@ var CONTRACT_ADDRESSES = {
|
|
|
2042
2041
|
// Phase 2 — pending deploy
|
|
2043
2042
|
serviceEscrow: "0x0000000000000000000000000000000000000000"
|
|
2044
2043
|
// Phase 2 — pending deploy
|
|
2045
|
-
},
|
|
2046
|
-
testnet: {
|
|
2047
|
-
agentRegistry: "0xCF48C341e3FebeCA5ECB7eb2535f61A2Ba855d9C",
|
|
2048
|
-
// one-agent-per-wallet
|
|
2049
|
-
exaToken: "0x66c39b0ad96B3f5eE198Fef913c6636353a48A87",
|
|
2050
|
-
staking: "0x439441468e1b1b616E9D36b80969C241F261A011",
|
|
2051
|
-
// V2 with delegation
|
|
2052
|
-
router: "0xc0c27eEE047E414CD716D06C2444CF2073113d5C",
|
|
2053
|
-
// V3 with config epochs
|
|
2054
|
-
vaultFactory: "0x5c099daaE33801a907Bb57011c6749655b55dc75",
|
|
2055
|
-
// V2 with requirements
|
|
2056
|
-
feeCollector: "0xcB57b03a50df054b9C738Df1324C17A4fDe4fe46",
|
|
2057
|
-
buyback: "0x35cdEa810A130A846265682e5c71A68A507aB895",
|
|
2058
|
-
serviceEscrow: "0x74a3496b148DEE735ac388299aF9Ac2F7C4EdCBf"
|
|
2059
2044
|
}
|
|
2060
2045
|
};
|
|
2061
2046
|
var DEX_ADDRESSES = {
|
|
@@ -2075,8 +2060,7 @@ var ZERO_X_CONFIG = {
|
|
|
2075
2060
|
// Base
|
|
2076
2061
|
};
|
|
2077
2062
|
var EXAGENT_API_CONFIG = {
|
|
2078
|
-
mainnet: "https://exagent-api.onrender.com"
|
|
2079
|
-
testnet: "https://exagent-api.onrender.com"
|
|
2063
|
+
mainnet: "https://exagent-api.onrender.com"
|
|
2080
2064
|
};
|
|
2081
2065
|
var ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
|
|
2082
2066
|
var PHASE_1_CONTRACTS = /* @__PURE__ */ new Set([
|
|
@@ -2088,13 +2072,11 @@ var PHASE_1_CONTRACTS = /* @__PURE__ */ new Set([
|
|
|
2088
2072
|
]);
|
|
2089
2073
|
function validateContractAddresses(network) {
|
|
2090
2074
|
const addresses = CONTRACT_ADDRESSES[network];
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
);
|
|
2097
|
-
}
|
|
2075
|
+
const missingPhase1 = Object.entries(addresses).filter(([name, addr]) => PHASE_1_CONTRACTS.has(name) && addr === ZERO_ADDRESS).map(([name]) => name);
|
|
2076
|
+
if (missingPhase1.length > 0) {
|
|
2077
|
+
throw new Error(
|
|
2078
|
+
`Mainnet Phase 1 contracts not deployed. Missing: ${missingPhase1.join(", ")}. Update @exagent/sdk to the latest version.`
|
|
2079
|
+
);
|
|
2098
2080
|
}
|
|
2099
2081
|
}
|
|
2100
2082
|
|
|
@@ -2129,7 +2111,7 @@ var ExagentClient = class {
|
|
|
2129
2111
|
// Cached agent ID
|
|
2130
2112
|
_agentId;
|
|
2131
2113
|
constructor(config) {
|
|
2132
|
-
this.network = config.network ?? "
|
|
2114
|
+
this.network = config.network ?? "mainnet";
|
|
2133
2115
|
this.apiKey = config.apiKey;
|
|
2134
2116
|
validateContractAddresses(this.network);
|
|
2135
2117
|
const chain = CHAIN_CONFIG[this.network];
|
|
@@ -2995,21 +2977,6 @@ var ExagentVaultFactory = class {
|
|
|
2995
2977
|
}
|
|
2996
2978
|
}
|
|
2997
2979
|
};
|
|
2998
|
-
|
|
2999
|
-
// src/index.ts
|
|
3000
|
-
var TESTNET_ADDRESSES = {
|
|
3001
|
-
registry: "0xCF48C341e3FebeCA5ECB7eb2535f61A2Ba855d9C",
|
|
3002
|
-
token: "0x66c39b0ad96B3f5eE198Fef913c6636353a48A87",
|
|
3003
|
-
staking: "0x439441468e1b1b616E9D36b80969C241F261A011",
|
|
3004
|
-
router: "0xc0c27eEE047E414CD716D06C2444CF2073113d5C",
|
|
3005
|
-
// V3 with config epochs
|
|
3006
|
-
vaultFactory: "0x5c099daaE33801a907Bb57011c6749655b55dc75",
|
|
3007
|
-
feeCollector: "0xcB57b03a50df054b9C738Df1324C17A4fDe4fe46",
|
|
3008
|
-
buyback: "0x35cdEa810A130A846265682e5c71A68A507aB895",
|
|
3009
|
-
serviceEscrow: "0x74a3496b148DEE735ac388299aF9Ac2F7C4EdCBf",
|
|
3010
|
-
usdc: "0x036CbD53842c5426634e7929541eC2318f3dCF7e"
|
|
3011
|
-
// Circle's Base Sepolia USDC (only vault asset)
|
|
3012
|
-
};
|
|
3013
2980
|
export {
|
|
3014
2981
|
CHAIN_CONFIG,
|
|
3015
2982
|
CONTRACT_ADDRESSES,
|
|
@@ -3023,7 +2990,6 @@ export {
|
|
|
3023
2990
|
ExagentVault,
|
|
3024
2991
|
ExagentVaultFactory,
|
|
3025
2992
|
SDK_VERSION,
|
|
3026
|
-
TESTNET_ADDRESSES,
|
|
3027
2993
|
ZERO_X_CONFIG,
|
|
3028
2994
|
buildGlobalAgentId,
|
|
3029
2995
|
parseGlobalAgentId
|