https://github.com/azeth-protocol/common
Shared types, constants, ABIs, and errors for Azeth — trust infrastructure for the machine economy
https://github.com/azeth-protocol/common
account-abstraction ai-agents base blockchain erc-4337 erc-8004 ethereum machine-economy payments smart-accounts trust-registry typescript usdc viem x402
Last synced: 18 days ago
JSON representation
Shared types, constants, ABIs, and errors for Azeth — trust infrastructure for the machine economy
- Host: GitHub
- URL: https://github.com/azeth-protocol/common
- Owner: azeth-protocol
- License: mit
- Created: 2026-03-05T16:16:06.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2026-06-03T11:13:54.000Z (about 2 months ago)
- Last Synced: 2026-06-03T12:09:15.950Z (about 2 months ago)
- Topics: account-abstraction, ai-agents, base, blockchain, erc-4337, erc-8004, ethereum, machine-economy, payments, smart-accounts, trust-registry, typescript, usdc, viem, x402
- Language: TypeScript
- Homepage: https://azeth.ai
- Size: 14.5 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @azeth/common
Shared types, constants, ABIs, and errors for the [Azeth](https://azeth.ai) trust infrastructure.
## Installation
```bash
npm install @azeth/common
# or
pnpm add @azeth/common
```
## What's Included
### Types
- **Account** -- `ParticipantIdentity`, `Guardrails`, `AzethContractAddresses`
- **Payments** -- `X402PaymentRequirement`, `PaymentAgreement`
- **Reputation** -- `OnChainOpinion`, `WeightedReputation`, `PaymentDelta`
- **Registry** -- `RegistryEntry`, `DiscoveryParams`, `CatalogEntry`
- **Messaging** -- `XMTPMessage`, `StructuredMessage`, `MessageRouterOptions`
- **Balances** -- `TokenBalanceUSD`, `AccountBalanceUSD`, `AggregatedBalanceResult`
### Constants
- `AZETH_CONTRACTS` -- deployed contract addresses per chain
- `ERC8004_REGISTRY` / `ERC8004_REPUTATION_REGISTRY` -- external registry addresses
- `ENTRYPOINT_V07` -- ERC-4337 EntryPoint v0.7
- `SUPPORTED_CHAINS` -- Base, Base Sepolia, Ethereum, Ethereum Sepolia
- `TOKENS` -- USDC and WETH addresses per chain
- `getBundlerUrl()`, `getPaymasterUrl()` -- chain-aware URL helpers
### ABIs
```typescript
import { AzethFactoryABI, GuardianModuleABI } from '@azeth/common/abis';
```
### Errors
```typescript
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, ...
}
}
```
### Validation Utilities
```typescript
import { validateAddress, validateChainName, isValidUrl } from '@azeth/common';
validateAddress('0x...'); // throws AzethError on invalid
validateChainName('base'); // resolves aliases like 'base-sepolia' -> 'baseSepolia'
```
## License
MIT