Shared types, constants, ABIs, and errors for the Azeth trust infrastructure.
npm install @azeth/common
# or
pnpm add @azeth/common- Account --
ParticipantIdentity,Guardrails,AzethContractAddresses - Payments --
X402PaymentRequirement,PaymentAgreement - Reputation --
OnChainOpinion,WeightedReputation,PaymentDelta - Registry --
RegistryEntry,DiscoveryParams,CatalogEntry - Messaging --
XMTPMessage,StructuredMessage,MessageRouterOptions - Balances --
TokenBalanceUSD,AccountBalanceUSD,AggregatedBalanceResult
AZETH_CONTRACTS-- deployed contract addresses per chainERC8004_REGISTRY/ERC8004_REPUTATION_REGISTRY-- external registry addressesENTRYPOINT_V07-- ERC-4337 EntryPoint v0.7SUPPORTED_CHAINS-- Base, Base Sepolia, Ethereum, Ethereum SepoliaTOKENS-- USDC and WETH addresses per chaingetBundlerUrl(),getPaymasterUrl()-- chain-aware URL helpers
import { AzethFactoryABI, GuardianModuleABI } from '@azeth/common/abis';import { AzethError } from '@azeth/common';
try {
// ...
} catch (err) {
if (err instanceof AzethError) {
console.error(err.code, err.message);
// codes: BUDGET_EXCEEDED, GUARDIAN_REJECTED, INSUFFICIENT_BALANCE, ...
}
}import { validateAddress, validateChainName, isValidUrl } from '@azeth/common';
validateAddress('0x...'); // throws AzethError on invalid
validateChainName('base'); // resolves aliases like 'base-sepolia' -> 'baseSepolia'MIT