@veridex/sdk 1.0.0-beta.17 → 1.0.0-beta.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +163 -111
- package/dist/chains/aptos/index.d.mts +1 -1
- package/dist/chains/aptos/index.d.ts +1 -1
- package/dist/chains/evm/index.d.mts +2 -2
- package/dist/chains/evm/index.d.ts +2 -2
- package/dist/chains/solana/index.d.mts +1 -1
- package/dist/chains/solana/index.d.ts +1 -1
- package/dist/chains/stacks/index.d.mts +1 -1
- package/dist/chains/stacks/index.d.ts +1 -1
- package/dist/chains/starknet/index.d.mts +1 -1
- package/dist/chains/starknet/index.d.ts +1 -1
- package/dist/chains/sui/index.d.mts +1 -1
- package/dist/chains/sui/index.d.ts +1 -1
- package/dist/{index-CYOyIE3b.d.mts → index-Dy29mvBf.d.mts} +1 -1
- package/dist/{index-BXcR_ypI.d.ts → index-eXXqodd0.d.ts} +1 -1
- package/dist/index.d.mts +107 -5
- package/dist/index.d.ts +107 -5
- package/dist/index.js +198 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +185 -1
- package/dist/index.mjs.map +1 -1
- package/dist/queries/index.js +36 -1
- package/dist/queries/index.js.map +1 -1
- package/dist/queries/index.mjs +36 -1
- package/dist/queries/index.mjs.map +1 -1
- package/dist/{types-DE2ICQik.d.mts → types-DakHNZIP.d.mts} +2 -0
- package/dist/{types-DE2ICQik.d.ts → types-DakHNZIP.d.ts} +2 -0
- package/dist/types.d.mts +2 -0
- package/dist/types.d.ts +2 -0
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1686,11 +1686,46 @@ var ETHEREUM_SEPOLIA_TOKENS = {
|
|
|
1686
1686
|
}
|
|
1687
1687
|
]
|
|
1688
1688
|
};
|
|
1689
|
+
var MONAD_TESTNET_TOKENS = {
|
|
1690
|
+
wormholeChainId: 10048,
|
|
1691
|
+
chainName: "Monad Testnet",
|
|
1692
|
+
nativeToken: {
|
|
1693
|
+
symbol: "MON",
|
|
1694
|
+
name: "Monad",
|
|
1695
|
+
decimals: 18,
|
|
1696
|
+
address: NATIVE_TOKEN_ADDRESS,
|
|
1697
|
+
isNative: true
|
|
1698
|
+
},
|
|
1699
|
+
tokens: [
|
|
1700
|
+
{
|
|
1701
|
+
symbol: "USDC",
|
|
1702
|
+
name: "USD Coin",
|
|
1703
|
+
decimals: 6,
|
|
1704
|
+
address: "0x754704Bc059F8C67012fEd69BC8A327a5aafb603",
|
|
1705
|
+
isNative: false
|
|
1706
|
+
},
|
|
1707
|
+
{
|
|
1708
|
+
symbol: "AUSD",
|
|
1709
|
+
name: "Agora Dollar",
|
|
1710
|
+
decimals: 18,
|
|
1711
|
+
address: "0x00000000eFE302BEAA2b3e6e1b18d08D69a9012a",
|
|
1712
|
+
isNative: false
|
|
1713
|
+
},
|
|
1714
|
+
{
|
|
1715
|
+
symbol: "WMON",
|
|
1716
|
+
name: "Wrapped MON",
|
|
1717
|
+
decimals: 18,
|
|
1718
|
+
address: "0x3bd359C1119dA7Da1D913D1C4D2B7c461115433A",
|
|
1719
|
+
isNative: false
|
|
1720
|
+
}
|
|
1721
|
+
]
|
|
1722
|
+
};
|
|
1689
1723
|
var TOKEN_REGISTRY = {
|
|
1690
1724
|
10004: BASE_SEPOLIA_TOKENS,
|
|
1691
1725
|
10005: OPTIMISM_SEPOLIA_TOKENS,
|
|
1692
1726
|
10003: ARBITRUM_SEPOLIA_TOKENS,
|
|
1693
|
-
10002: ETHEREUM_SEPOLIA_TOKENS
|
|
1727
|
+
10002: ETHEREUM_SEPOLIA_TOKENS,
|
|
1728
|
+
10048: MONAD_TESTNET_TOKENS
|
|
1694
1729
|
};
|
|
1695
1730
|
function getTokenList(wormholeChainId) {
|
|
1696
1731
|
return TOKEN_REGISTRY[wormholeChainId] ?? null;
|
|
@@ -12060,6 +12095,8 @@ var CHAIN_NAMES = {
|
|
|
12060
12095
|
FANTOM: "fantom",
|
|
12061
12096
|
CELO: "celo",
|
|
12062
12097
|
MOONBEAM: "moonbeam",
|
|
12098
|
+
// EVM L1s (High Performance)
|
|
12099
|
+
MONAD: "monad",
|
|
12063
12100
|
// Non-EVM
|
|
12064
12101
|
SOLANA: "solana",
|
|
12065
12102
|
APTOS: "aptos",
|
|
@@ -12497,6 +12534,45 @@ var CHAIN_PRESETS = {
|
|
|
12497
12534
|
}
|
|
12498
12535
|
},
|
|
12499
12536
|
// ────────────────────────────────────────────────────────────────────────
|
|
12537
|
+
// MONAD - High-Performance L1 with EIP-7951 P256 + Agent Gateway
|
|
12538
|
+
// ────────────────────────────────────────────────────────────────────────
|
|
12539
|
+
monad: {
|
|
12540
|
+
displayName: "Monad",
|
|
12541
|
+
type: "evm",
|
|
12542
|
+
canBeHub: true,
|
|
12543
|
+
// Has native P-256 precompile (EIP-7951)
|
|
12544
|
+
testnet: {
|
|
12545
|
+
name: "Monad Testnet",
|
|
12546
|
+
chainId: 10143,
|
|
12547
|
+
wormholeChainId: 10048,
|
|
12548
|
+
rpcUrl: "https://testnet-rpc.monad.xyz",
|
|
12549
|
+
explorerUrl: "https://testnet.monadvision.com",
|
|
12550
|
+
isEvm: true,
|
|
12551
|
+
contracts: {
|
|
12552
|
+
vaultFactory: "0x07F608AFf6d63b68029488b726d895c4Bb593038",
|
|
12553
|
+
vaultImplementation: "0xD66153fccFB6731fB6c4944FbD607ba86A76a1f6",
|
|
12554
|
+
wormholeCoreBridge: "0xBB73cB66C26740F31d1FabDC6b7A46a038A300dd",
|
|
12555
|
+
// Agent Gateway contracts
|
|
12556
|
+
serviceDirectory: "0x0D2B4193e78107678a5aC29d795e0EcD361aE3A7"
|
|
12557
|
+
},
|
|
12558
|
+
hubChainId: 10004
|
|
12559
|
+
// Base Sepolia
|
|
12560
|
+
},
|
|
12561
|
+
mainnet: {
|
|
12562
|
+
name: "Monad",
|
|
12563
|
+
chainId: 143,
|
|
12564
|
+
wormholeChainId: 0,
|
|
12565
|
+
// TBD
|
|
12566
|
+
rpcUrl: "https://rpc.monad.xyz",
|
|
12567
|
+
explorerUrl: "https://monadscan.com",
|
|
12568
|
+
isEvm: true,
|
|
12569
|
+
contracts: {
|
|
12570
|
+
wormholeCoreBridge: "0x194B123c5E96B9b2E49763619985790Dc241CAC0",
|
|
12571
|
+
tokenBridge: "0x0B2719cdA2F10595369e6673ceA3Ee2EDFa13BA7"
|
|
12572
|
+
}
|
|
12573
|
+
}
|
|
12574
|
+
},
|
|
12575
|
+
// ────────────────────────────────────────────────────────────────────────
|
|
12500
12576
|
// SEI
|
|
12501
12577
|
// ────────────────────────────────────────────────────────────────────────
|
|
12502
12578
|
sei: {
|
|
@@ -14529,6 +14605,101 @@ function getSuggestedAction(code) {
|
|
|
14529
14605
|
return "An error occurred. Please try again or contact support.";
|
|
14530
14606
|
}
|
|
14531
14607
|
}
|
|
14608
|
+
|
|
14609
|
+
// src/erc8004/contracts.ts
|
|
14610
|
+
var ERC8004_MAINNET_IDENTITY = "0x8004A169FB4a3325136EB29fA0ceB6D2e539a432";
|
|
14611
|
+
var ERC8004_MAINNET_REPUTATION = "0x8004BAa17C55a88189AE136b182e5fdA19dE9b63";
|
|
14612
|
+
var ERC8004_TESTNET_IDENTITY = "0x8004A818BFB912233c491871b3d84c89A494BD9e";
|
|
14613
|
+
var ERC8004_TESTNET_REPUTATION = "0x8004B663056A597Dffe9eCcC1965A193B7388713";
|
|
14614
|
+
function getERC8004Addresses(testnet) {
|
|
14615
|
+
return {
|
|
14616
|
+
identityRegistry: testnet ? ERC8004_TESTNET_IDENTITY : ERC8004_MAINNET_IDENTITY,
|
|
14617
|
+
reputationRegistry: testnet ? ERC8004_TESTNET_REPUTATION : ERC8004_MAINNET_REPUTATION
|
|
14618
|
+
};
|
|
14619
|
+
}
|
|
14620
|
+
function isERC8004Chain(chainName) {
|
|
14621
|
+
return ERC8004_CHAINS.mainnet.includes(chainName) || ERC8004_CHAINS.testnet.includes(chainName);
|
|
14622
|
+
}
|
|
14623
|
+
var ERC8004_CHAINS = {
|
|
14624
|
+
mainnet: [
|
|
14625
|
+
"ethereum",
|
|
14626
|
+
"base",
|
|
14627
|
+
"polygon",
|
|
14628
|
+
"arbitrum",
|
|
14629
|
+
"optimism",
|
|
14630
|
+
"linea",
|
|
14631
|
+
"megaeth",
|
|
14632
|
+
"monad"
|
|
14633
|
+
],
|
|
14634
|
+
testnet: [
|
|
14635
|
+
"ethereum-sepolia",
|
|
14636
|
+
"base-sepolia",
|
|
14637
|
+
"polygon-amoy",
|
|
14638
|
+
"arbitrum-sepolia",
|
|
14639
|
+
"optimism-sepolia",
|
|
14640
|
+
"monad-testnet"
|
|
14641
|
+
]
|
|
14642
|
+
};
|
|
14643
|
+
var IDENTITY_REGISTRY_READ_ABI = [
|
|
14644
|
+
"function ownerOf(uint256 tokenId) view returns (address)",
|
|
14645
|
+
"function balanceOf(address owner) view returns (uint256)",
|
|
14646
|
+
"function totalSupply() view returns (uint256)",
|
|
14647
|
+
"function agentURI(uint256 agentId) view returns (string)",
|
|
14648
|
+
"function agentWallet(uint256 agentId) view returns (address)",
|
|
14649
|
+
"function getMetadata(uint256 agentId, string key) view returns (string)"
|
|
14650
|
+
];
|
|
14651
|
+
var REPUTATION_REGISTRY_READ_ABI = [
|
|
14652
|
+
"function getSummary(uint256 agentId, address[] clientAddresses, string tag1, string tag2) view returns (uint256 count, int128 summaryValue, uint8 summaryValueDecimals)",
|
|
14653
|
+
"function readFeedback(uint256 agentId, address clientAddress, uint256 feedbackIndex) view returns (int128 value, uint8 valueDecimals, string tag1, string tag2, bool isRevoked)",
|
|
14654
|
+
"function getClients(uint256 agentId) view returns (address[])",
|
|
14655
|
+
"function getLastIndex(uint256 agentId, address clientAddress) view returns (uint256)"
|
|
14656
|
+
];
|
|
14657
|
+
var IDENTITY_REGISTRY_ABI = [
|
|
14658
|
+
// Registration
|
|
14659
|
+
"function register(string agentURI) returns (uint256)",
|
|
14660
|
+
"function register(string agentURI, tuple(string key, string value)[] metadata) returns (uint256)",
|
|
14661
|
+
// Read — ERC-721 standard
|
|
14662
|
+
"function ownerOf(uint256 tokenId) view returns (address)",
|
|
14663
|
+
"function balanceOf(address owner) view returns (uint256)",
|
|
14664
|
+
"function totalSupply() view returns (uint256)",
|
|
14665
|
+
// Read — ERC-8004 specific
|
|
14666
|
+
"function agentURI(uint256 agentId) view returns (string)",
|
|
14667
|
+
"function agentWallet(uint256 agentId) view returns (address)",
|
|
14668
|
+
"function getMetadata(uint256 agentId, string key) view returns (string)",
|
|
14669
|
+
// Write — URI and wallet management
|
|
14670
|
+
"function setAgentURI(uint256 agentId, string newURI)",
|
|
14671
|
+
"function setAgentWallet(uint256 agentId, address wallet, uint256 deadline, bytes signature)",
|
|
14672
|
+
"function unsetAgentWallet(uint256 agentId)",
|
|
14673
|
+
"function setMetadata(uint256 agentId, string key, string value)",
|
|
14674
|
+
// Events
|
|
14675
|
+
"event Transfer(address indexed from, address indexed to, uint256 indexed tokenId)",
|
|
14676
|
+
"event AgentURIUpdated(uint256 indexed agentId, string newURI)",
|
|
14677
|
+
"event AgentWalletSet(uint256 indexed agentId, address wallet)",
|
|
14678
|
+
"event AgentWalletUnset(uint256 indexed agentId)",
|
|
14679
|
+
"event MetadataUpdated(uint256 indexed agentId, string key, string value)"
|
|
14680
|
+
];
|
|
14681
|
+
var REPUTATION_REGISTRY_ABI = [
|
|
14682
|
+
// Write
|
|
14683
|
+
"function giveFeedback(uint256 agentId, int128 value, uint8 valueDecimals, string tag1, string tag2)",
|
|
14684
|
+
"function giveFeedback(uint256 agentId, int128 value, uint8 valueDecimals, string tag1, string tag2, string endpointURI, string feedbackURI, bytes32 feedbackHash)",
|
|
14685
|
+
"function revokeFeedback(uint256 agentId, uint256 feedbackIndex)",
|
|
14686
|
+
"function appendResponse(uint256 agentId, address clientAddress, uint256 feedbackIndex, string responseURI, bytes32 responseHash)",
|
|
14687
|
+
// Read
|
|
14688
|
+
"function getSummary(uint256 agentId, address[] clientAddresses, string tag1, string tag2) view returns (uint256 count, int128 summaryValue, uint8 summaryValueDecimals)",
|
|
14689
|
+
"function readFeedback(uint256 agentId, address clientAddress, uint256 feedbackIndex) view returns (int128 value, uint8 valueDecimals, string tag1, string tag2, bool isRevoked)",
|
|
14690
|
+
"function getClients(uint256 agentId) view returns (address[])",
|
|
14691
|
+
"function getLastIndex(uint256 agentId, address clientAddress) view returns (uint256)",
|
|
14692
|
+
// Events
|
|
14693
|
+
"event FeedbackGiven(uint256 indexed agentId, address indexed client, int128 value, uint8 valueDecimals)",
|
|
14694
|
+
"event FeedbackRevoked(uint256 indexed agentId, address indexed client, uint256 feedbackIndex)",
|
|
14695
|
+
"event ResponseAppended(uint256 indexed agentId, address indexed client, uint256 feedbackIndex)"
|
|
14696
|
+
];
|
|
14697
|
+
var VALIDATION_REGISTRY_ABI = [
|
|
14698
|
+
"function validationRequest(address validatorAddress, uint256 agentId, string requestURI, bytes32 requestHash) returns (bytes32)",
|
|
14699
|
+
"function getValidationStatus(bytes32 requestHash) view returns (address validatorAddress, uint256 agentId, uint8 response, bytes32 responseHash, string tag, uint256 lastUpdate)",
|
|
14700
|
+
"function getSummary(uint256 agentId, address[] validatorAddresses, string tag) view returns (uint256 count, uint256 averageResponse)",
|
|
14701
|
+
"function getAgentValidations(uint256 agentId) view returns (bytes32[])"
|
|
14702
|
+
];
|
|
14532
14703
|
export {
|
|
14533
14704
|
ACTION_BRIDGE,
|
|
14534
14705
|
ACTION_CONFIG,
|
|
@@ -14552,6 +14723,11 @@ export {
|
|
|
14552
14723
|
DEFAULT_REFRESH_BUFFER,
|
|
14553
14724
|
DEFAULT_RELAYER_URL,
|
|
14554
14725
|
DEFAULT_SESSION_DURATION,
|
|
14726
|
+
ERC8004_CHAINS,
|
|
14727
|
+
ERC8004_MAINNET_IDENTITY,
|
|
14728
|
+
ERC8004_MAINNET_REPUTATION,
|
|
14729
|
+
ERC8004_TESTNET_IDENTITY,
|
|
14730
|
+
ERC8004_TESTNET_REPUTATION,
|
|
14555
14731
|
ERROR_MESSAGES,
|
|
14556
14732
|
ERROR_RANGES,
|
|
14557
14733
|
ETHEREUM_SEPOLIA_TOKENS,
|
|
@@ -14561,18 +14737,23 @@ export {
|
|
|
14561
14737
|
GUARDIAN_CONFIG,
|
|
14562
14738
|
GasSponsor,
|
|
14563
14739
|
HUB_ABI,
|
|
14740
|
+
IDENTITY_REGISTRY_ABI,
|
|
14741
|
+
IDENTITY_REGISTRY_READ_ABI,
|
|
14564
14742
|
IndexedDBSessionStorage,
|
|
14565
14743
|
LIMIT_PRESETS,
|
|
14566
14744
|
LocalStorageSessionStorage,
|
|
14567
14745
|
MAINNET_CHAINS,
|
|
14568
14746
|
MAX_SESSION_DURATION,
|
|
14569
14747
|
MIN_SESSION_DURATION,
|
|
14748
|
+
MONAD_TESTNET_TOKENS,
|
|
14570
14749
|
NATIVE_TOKEN_ADDRESS,
|
|
14571
14750
|
OPTIMISM_SEPOLIA_TOKENS,
|
|
14572
14751
|
PROTOCOL_VERSION,
|
|
14573
14752
|
PasskeyManager,
|
|
14574
14753
|
QueryHubStateError,
|
|
14575
14754
|
QueryPortfolioError,
|
|
14755
|
+
REPUTATION_REGISTRY_ABI,
|
|
14756
|
+
REPUTATION_REGISTRY_READ_ABI,
|
|
14576
14757
|
RelayerClient,
|
|
14577
14758
|
STACKS_ACTION_TYPES,
|
|
14578
14759
|
SessionError,
|
|
@@ -14586,6 +14767,7 @@ export {
|
|
|
14586
14767
|
TOKEN_REGISTRY,
|
|
14587
14768
|
TransactionParser,
|
|
14588
14769
|
TransactionTracker,
|
|
14770
|
+
VALIDATION_REGISTRY_ABI,
|
|
14589
14771
|
VAULT_ABI,
|
|
14590
14772
|
VAULT_FACTORY_ABI,
|
|
14591
14773
|
VERIDEX_ERRORS,
|
|
@@ -14667,6 +14849,7 @@ export {
|
|
|
14667
14849
|
getChainPreset,
|
|
14668
14850
|
getConfigTypeName,
|
|
14669
14851
|
getDefaultHub,
|
|
14852
|
+
getERC8004Addresses,
|
|
14670
14853
|
getErrorCategory,
|
|
14671
14854
|
getErrorMessage,
|
|
14672
14855
|
getExplorerUrl,
|
|
@@ -14691,6 +14874,7 @@ export {
|
|
|
14691
14874
|
isAbiError,
|
|
14692
14875
|
isChainSupported,
|
|
14693
14876
|
isCoreError,
|
|
14877
|
+
isERC8004Chain,
|
|
14694
14878
|
isEvmChain,
|
|
14695
14879
|
isNativeToken,
|
|
14696
14880
|
isQueryError,
|