agentwallet-sdk 6.0.5 → 6.2.0

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.
Files changed (40) hide show
  1. package/README.md +201 -1
  2. package/dist/bridge/solana.d.ts.map +1 -1
  3. package/dist/bridge/types.d.ts.map +1 -1
  4. package/dist/identity/index.d.ts +2 -0
  5. package/dist/identity/index.d.ts.map +1 -1
  6. package/dist/identity/index.js +2 -0
  7. package/dist/identity/index.js.map +1 -1
  8. package/dist/identity/uaid.d.ts +193 -0
  9. package/dist/identity/uaid.d.ts.map +1 -0
  10. package/dist/identity/uaid.js +296 -0
  11. package/dist/identity/uaid.js.map +1 -0
  12. package/dist/index.d.ts +4994 -13961
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +6 -0
  15. package/dist/index.js.map +1 -1
  16. package/dist/policy/UptoBillingPolicy.d.ts +88 -0
  17. package/dist/policy/UptoBillingPolicy.d.ts.map +1 -0
  18. package/dist/policy/UptoBillingPolicy.js +183 -0
  19. package/dist/policy/UptoBillingPolicy.js.map +1 -0
  20. package/dist/policy/UptoBillingPolicy.test.d.ts +2 -0
  21. package/dist/policy/UptoBillingPolicy.test.d.ts.map +1 -0
  22. package/dist/policy/UptoBillingPolicy.test.js +102 -0
  23. package/dist/policy/UptoBillingPolicy.test.js.map +1 -0
  24. package/dist/router/PaymentRouter.d.ts +79 -0
  25. package/dist/router/PaymentRouter.d.ts.map +1 -0
  26. package/dist/router/PaymentRouter.js +144 -0
  27. package/dist/router/PaymentRouter.js.map +1 -0
  28. package/dist/router/index.d.ts +3 -0
  29. package/dist/router/index.d.ts.map +1 -0
  30. package/dist/router/index.js +2 -0
  31. package/dist/router/index.js.map +1 -0
  32. package/dist/swap/SwapModule.d.ts +2 -2
  33. package/dist/swap/SwapModule.d.ts.map +1 -1
  34. package/dist/swap/types.d.ts.map +1 -1
  35. package/dist/tokens/solana.d.ts.map +1 -1
  36. package/package.json +2 -2
  37. package/dist/x402/chains/stellar/index.d.ts +0 -149
  38. package/dist/x402/chains/stellar/index.d.ts.map +0 -1
  39. package/dist/x402/chains/stellar/index.js +0 -199
  40. package/dist/x402/chains/stellar/index.js.map +0 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # AgentWallet SDK
2
2
 
3
- > **v6.0.0** · MIT · **Patent Pending**
3
+ > **v6.2.0** · MIT · **Patent Pending**
4
4
  >
5
5
  > USPTO Provisional filed March 2026: "Non-Custodial Multi-Chain Financial Infrastructure System for Autonomous AI Agents"
6
6
 
@@ -58,6 +58,67 @@ await setSpendPolicy(wallet, {
58
58
  });
59
59
  ```
60
60
 
61
+ ### Contract Source, Deployment Status, and `AGENT_WALLET_ADDRESS`
62
+
63
+ Today this package ships the contract ABIs in `src/abi.ts` and the TypeScript deployment helpers in `deployWallet()` and `getWalletAddress()`. It does **not** currently publish Solidity sources or an official multi-network deployment manifest in this repo.
64
+
65
+ That means:
66
+
67
+ - `AgentAccountV2Abi` and `AgentAccountFactoryV2Abi` are public and versioned here
68
+ - `deployWallet()` can deploy a new `AgentAccountV2` through a factory you control
69
+ - `getWalletAddress()` returns the deterministic CREATE2 wallet address before deployment
70
+ - `AGENT_WALLET_ADDRESS` is the deployed or predicted `AgentAccountV2` address, not an EOA
71
+ - No canonical Base/Ethereum/Hedera deployment address list is published here yet
72
+
73
+ If you need reproducible deployments, use your own verified factory deployment and pass its address explicitly:
74
+
75
+ ```typescript
76
+ import { deployWallet, getWalletAddress } from 'agentwallet-sdk';
77
+
78
+ const walletAddress = await getWalletAddress({
79
+ factoryAddress: '0xFactory',
80
+ tokenContract: '0xIdentityToken',
81
+ tokenId: 1n,
82
+ chain: 'base',
83
+ });
84
+
85
+ const deployment = await deployWallet({
86
+ factoryAddress: '0xFactory',
87
+ tokenContract: '0xIdentityToken',
88
+ tokenId: 1n,
89
+ chain: 'base',
90
+ walletClient,
91
+ });
92
+
93
+ console.log(walletAddress, deployment.txHash);
94
+ ```
95
+
96
+ ### External Signers and MoonPay OWS
97
+
98
+ `privateKeyToAccount()` in the quick-start is a convenience path, not a hard requirement. The core SDK entrypoint is `createWallet({ accountAddress, chain, walletClient })`, so any signer that can produce a viem-compatible `WalletClient` can be used.
99
+
100
+ That includes:
101
+
102
+ - local private keys
103
+ - HSM-backed signers
104
+ - MPC or custodial signers you control
105
+ - an Open Wallet Standard (OWS) adapter that exposes a viem `WalletClient`
106
+
107
+ There is **not** a first-party MoonPay OWS adapter bundled in this repo today. The integration point is the injected `walletClient`.
108
+
109
+ ### Custody, Execution Flow, and Gas
110
+
111
+ The intended model is:
112
+
113
+ - funds live in the on-chain `AgentAccountV2` smart wallet
114
+ - the signer attached to `walletClient` authorizes contract calls
115
+ - policy enforcement happens in the wallet contract before execution
116
+ - `AGENT_PRIVATE_KEY` signs the contract interaction, not an off-chain bypass transaction that can skip policy checks
117
+
118
+ So the SDK is not using an "EOA holds the funds and the contract only validates metadata" model. The smart wallet is the custody boundary.
119
+
120
+ Gas is still paid by the execution signer unless you add your own account-abstraction or paymaster stack. This repo does not ship a first-party paymaster integration yet, so sponsored transactions should currently be treated as an external integration layer.
121
+
61
122
  ### Pay for an API (the 402 Flow)
62
123
 
63
124
  ```typescript
@@ -77,6 +138,35 @@ const data = await response.json();
77
138
  // Every payment: tx hash on Base, auditable on basescan.org
78
139
  ```
79
140
 
141
+ ### Usage-based billing with x402 "upto"
142
+
143
+ ```typescript
144
+ import { UptoBillingPolicy } from 'agentwallet-sdk';
145
+
146
+ const upto = new UptoBillingPolicy();
147
+
148
+ const auth = upto.authorize({
149
+ authorizationId: 'req-42',
150
+ service: 'api.example.com',
151
+ resource: 'POST /v1/generate',
152
+ network: 'base:8453',
153
+ asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913',
154
+ payTo: '0xMerchant',
155
+ maxAmount: 2_000_000n, // authorize up to $2.00 USDC
156
+ });
157
+
158
+ const snapshot = upto.recordSettlement(auth.authorizationId, 740_000n, {
159
+ txHash: '0xsettlement',
160
+ finalize: true,
161
+ });
162
+
163
+ console.log(snapshot.authorization.settledAmount); // 740000n
164
+ console.log(snapshot.authorization.releasedAmount); // 1260000n
165
+ console.log(upto.getNetWalletDelta(auth.authorizationId)); // -740000n
166
+ ```
167
+
168
+ This gives the wallet a clean local ledger for x402 usage-based billing: max authorized, actual settlement, and explicit release of unused capacity.
169
+
80
170
  ## The Trust Layer
81
171
 
82
172
  This is what makes supervised payments different from autonomous payments.
@@ -373,6 +463,44 @@ const rep = await reputation.getAgentReputation(agentId!);
373
463
  console.log(`Score: ${rep.totalScore} from ${rep.count} reviews`);
374
464
  ```
375
465
 
466
+ ## Cross-Chain Identity (UAID)
467
+
468
+ ERC-8004 identities live on EVM chains. For agents on Solana, Hedera, or off-chain frameworks, the UAID (Universal Agent Identifier) resolver bridges identities across all chains via the [HOL Registry](https://hol.org).
469
+
470
+ ```typescript
471
+ import { UAIDResolver, ERC8004Client } from 'agentwallet-sdk';
472
+
473
+ const resolver = new UAIDResolver();
474
+
475
+ // Resolve any agent by UAID — works across all chains
476
+ const result = await resolver.resolve(
477
+ 'uaid:aid:eip155:8453:0x8004...;uid=42;proto=erc8004'
478
+ );
479
+ if (result.resolved) {
480
+ console.log(result.identity?.paymentAddress); // Payment address, any chain
481
+ console.log(result.trustScore); // Trust score (0-100)
482
+ }
483
+
484
+ // Convert your ERC-8004 identity to universal format
485
+ const erc8004 = new ERC8004Client({ chain: 'base' });
486
+ const identity = await erc8004.lookupAgentIdentity(42n);
487
+ const universal = resolver.erc8004ToUniversal(identity, 'base');
488
+ console.log(universal.uaid); // Cross-chain discoverable ID
489
+
490
+ // Verify any agent before transacting (chain-agnostic)
491
+ const check = await resolver.verify('uaid:aid:hedera:0.0.5678;uid=x;proto=openconvai');
492
+ if (check.verified) { /* safe to transact */ }
493
+
494
+ // Register for cross-chain discovery (requires HOL API key)
495
+ const registrar = new UAIDResolver({ apiKey: process.env.HOL_API_KEY });
496
+ const uaid = await registrar.registerERC8004Agent({
497
+ agentId: 42n, chain: 'base',
498
+ name: 'My Agent', description: 'Trading agent with x402 support',
499
+ });
500
+ ```
501
+
502
+ See [`examples/cross-chain-identity.ts`](./examples/cross-chain-identity.ts) for the full walkthrough.
503
+
376
504
  ## Decimal Helpers
377
505
 
378
506
  ```typescript
@@ -419,11 +547,83 @@ Stateless design — wallet state lives on-chain, not in application memory. Mul
419
547
  - SpendingPolicy changes are on-chain events — tamper-proof
420
548
  - NFT transfer = instant revocation of all agent permissions — no "forgot to deprovision" risk
421
549
 
550
+ ## Supported Payment Rails — Three-Rail Architecture
551
+
552
+ AgentWallet SDK routes payments across three independent rails, selecting the optimal one based on amount, session context, autonomy level, and ecosystem preference:
553
+
554
+ | Rail | Status | Use Case | Overhead |
555
+ |------|--------|----------|----------|
556
+ | ✅ **x402** (Base, EVM) | **Live** | Autonomous micropayments, API access, agent-to-agent commerce | 0 bps (no protocol fee) |
557
+ | ✅ **Stripe MPP** | **Live** | High-frequency session payments, fiat-connected merchants, dispute resolution | ~290 bps |
558
+ | 🔜 **Google AP2** | **Roadmap** | Google-managed identity + payment bundle, enterprise SSO integration | ~100 bps (est.) |
559
+ | 🔜 **Solana x402** | **Roadmap Q2** | Solana-native agent payments via Solana Foundation gateway | 0 bps |
560
+
561
+ ### How the Router Decides
562
+
563
+ The `PaymentRouter` evaluates each transaction and selects the rail automatically:
564
+
565
+ - **Micropayments (< $1) + autonomous agent** → x402 (zero overhead, on-chain audit)
566
+ - **High-frequency session (5+ txns)** → MPP (batching efficiency)
567
+ - **Larger amounts or supervised agent** → MPP (fiat rails, dispute resolution)
568
+ - **Google ecosystem preference** → Google AP2 (when live — managed identity + payment)
569
+ - **Solana preference** → x402-solana (when live)
570
+
571
+ AgentWallet SDK is the **multi-rail abstraction layer** — your agent code doesn't change when you add a new payment rail. Write once, pay on any chain or protocol.
572
+
573
+ ```typescript
574
+ import { createX402Client } from 'agentwallet-sdk';
575
+
576
+ // Same API regardless of underlying rail
577
+ const client = createX402Client(wallet, {
578
+ supportedNetworks: ['base:8453'], // Solana coming soon
579
+ globalDailyLimit: 50_000_000n,
580
+ });
581
+ ```
582
+
583
+ ## Open Wallet Standard (OWS) Compatibility
584
+
585
+ AgentWallet SDK is designed to work **on top of** [MoonPay's Open Wallet Standard](https://github.com/moonpay/open-wallet-standard) — not compete with it. OWS handles wallet key management (multi-chain signing, hardware-backed vaults, encrypted local storage). AgentWallet SDK handles everything above that: MCP integration, framework abstraction, spend-policy enforcement, payment routing, and human-in-the-loop approval.
586
+
587
+ **The complete stack:**
588
+
589
+ | Layer | Component | Responsibility |
590
+ |-------|-----------|---------------|
591
+ | Wallet & Key Management | **Open Wallet Standard (OWS)** | Multi-chain signing, hardware-backed keys (Ledger), encrypted vault, policy engine |
592
+ | Framework & Integration | **AgentWallet SDK** | On-chain spend limits, payment routing (x402/MPP/AP2), human approval, framework adapters |
593
+ | MCP Server | **[agentpay-mcp](https://github.com/up2itnow0822/agentpay-mcp)** | MCP-native payment tools for any MCP-compatible agent |
594
+
595
+ If your agent framework or wallet provider already implements OWS, AgentWallet SDK plugs in as the payment execution and policy layer. Your agent gets supervised spending, multi-rail routing, and auditable on-chain payments without replacing your existing key management.
596
+
597
+ ## Enterprise Compliance (August 2026)
598
+
599
+ The EU AI Act's high-risk compliance deadline lands **August 2, 2026**. AI systems that execute or facilitate financial transactions fall under Annex III high-risk classification. For agent developers, this means four mandatory controls:
600
+
601
+ | Requirement | AgentWallet SDK Feature |
602
+ |---|---|
603
+ | **Spend caps** | `setSpendPolicy()` — per-transaction and daily limits enforced on-chain. The agent cannot override them, even if instructed to. |
604
+ | **Audit trails** | Every transaction recorded on-chain with block number, timestamp, amount, and recipient. Immutable and independently verifiable on basescan.org. |
605
+ | **Session controls** | Session-scoped budgets, safe abort (`safeAbort()`), and NFT-based instant revocation of all agent permissions. |
606
+ | **Human oversight** | Human-in-the-loop approval for transactions above configurable thresholds. Fail-closed — any policy engine error produces rejection. |
607
+
608
+ These aren't optional features — they're regulatory requirements with fines up to €35M or 7% of global annual revenue. Germany published its national enforcement bill in February 2026.
609
+
610
+ For enterprises evaluating agent payment infrastructure: AgentWallet SDK satisfies EU AI Act high-risk requirements out of the box, with on-chain enforcement (not application-level trust) and zero third-party custody.
611
+
612
+ ---
613
+
614
+ ## Market Context
615
+
616
+ The agentic AI SDK market is projected to grow from **$2.4B (2025) to $16B by 2030** (Mordor Intelligence). AI agents are forecast to drive **$262B in bank sales** via embedded payments and lending by 2026. x402 alone has processed **140M+ agent payment transactions** ($43M) in 9 months, with 98.6% USDC settlement.
617
+
618
+ AgentWallet SDK is [production-validated with NVIDIA NeMo](https://github.com/NVIDIA/NeMo-Agent-Toolkit-Examples/pull/17) — demonstrating enterprise-grade agent payment integration at scale. NVIDIA reports 88% revenue impact and 87% cost reduction from AI agent deployments.
619
+
422
620
  ## Links
423
621
 
424
622
  - [GitHub](https://github.com/up2itnow0822/agent-wallet-sdk)
425
623
  - [npm](https://www.npmjs.com/package/agentwallet-sdk)
426
624
  - [ERC-8004 Spec](https://eips.ethereum.org/EIPS/eip-8004)
625
+ - [Open Wallet Standard](https://github.com/moonpay/open-wallet-standard) — wallet key management layer
626
+ - [HOL Registry](https://hol.org) — Cross-chain agent identity registry (UAID resolution)
427
627
  - [agentpay-mcp](https://github.com/up2itnow0822/agentpay-mcp) — MCP server wrapping this SDK
428
628
 
429
629
  ## Patent Notice
@@ -1 +1 @@
1
- {"version":3,"file":"solana.d.ts","sourceRoot":"","sources":["../../src/bridge/solana.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAML,KAAK,OAAO,EACZ,KAAK,IAAI,EACT,KAAK,GAAG,EAER,KAAK,YAAY,EAClB,MAAM,MAAM,CAAC;AAGd,OAAO,EASL,KAAK,cAAc,EACpB,MAAM,YAAY,CAAC;AAIpB,4BAA4B;AAC5B,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC,yCAAyC;AACzC,eAAO,MAAM,gBAAgB,gDAA0D,CAAC;AAExF;;;;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WAAW,UAAU;IACzB,UAAU,EAAE,IAAI,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,GAAG,CAAC;IACjB,YAAY,EAAE,GAAG,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,gCAAgC;AAChC,MAAM,MAAM,iBAAiB,GAAG,uBAAuB,GAAG,UAAU,GAAG,OAAO,CAAC;AAE/E,kDAAkD;AAClD,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,iBAAiB,CAAC;IAC1B,WAAW,EAAE,GAAG,GAAG,IAAI,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,oDAAoD;AACpD,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,IAAI,CAAC;IACjB,UAAU,EAAE,IAAI,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,cAAc,CAAC;IAC1B,OAAO,EAAE,cAAc,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,uDAAuD;AACvD,MAAM,MAAM,eAAe,GACvB,mBAAmB,GACnB,wBAAwB,GACxB,sBAAsB,GACtB,aAAa,GACb,qBAAqB,GACrB,mBAAmB,GACnB,aAAa,GACb,gBAAgB,GAChB,kBAAkB,CAAC"}
@@ -4,4 +4,6 @@ export { ReputationClient, ReputationRegistryAbi } from './reputation.js';
4
4
  export type { ReputationClientConfig, GiveFeedbackParams, FeedbackEntry, AgentReputationSummary, FeedbackFilters, RespondToFeedbackParams, } from './reputation.js';
5
5
  export { ValidationClient, ValidationRegistryAbi } from './validation.js';
6
6
  export type { ValidationClientConfig, RequestValidationParams, RespondToValidationParams, ValidationStatus, ValidationSummary, } from './validation.js';
7
+ export { UAIDResolver } from './uaid.js';
8
+ export type { UAIDProtocol, ParsedUAID, UAIDResolution, UniversalAgentIdentity, UAIDResolverConfig, RegisterUAIDParams, } from './uaid.js';
7
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/identity/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAAE,0BAA0B,EAAE,aAAa,EACxD,sBAAsB,EAAE,wBAAwB,EAChD,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,wBAAwB,EAAE,mBAAmB,GAC3F,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,oBAAoB,EAAE,uBAAuB,EAAE,oBAAoB,EACnE,qBAAqB,EAAE,kBAAkB,EAAE,aAAa,EACxD,aAAa,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,cAAc,GACvE,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAC1E,YAAY,EACV,sBAAsB,EAAE,kBAAkB,EAAE,aAAa,EACzD,sBAAsB,EAAE,eAAe,EAAE,uBAAuB,GACjE,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAC1E,YAAY,EACV,sBAAsB,EAAE,uBAAuB,EAAE,yBAAyB,EAC1E,gBAAgB,EAAE,iBAAiB,GACpC,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/identity/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAAE,0BAA0B,EAAE,aAAa,EACxD,sBAAsB,EAAE,wBAAwB,EAChD,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,wBAAwB,EAAE,mBAAmB,GAC3F,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,oBAAoB,EAAE,uBAAuB,EAAE,oBAAoB,EACnE,qBAAqB,EAAE,kBAAkB,EAAE,aAAa,EACxD,aAAa,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,cAAc,GACvE,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAC1E,YAAY,EACV,sBAAsB,EAAE,kBAAkB,EAAE,aAAa,EACzD,sBAAsB,EAAE,eAAe,EAAE,uBAAuB,GACjE,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAC1E,YAAY,EACV,sBAAsB,EAAE,uBAAuB,EAAE,yBAAyB,EAC1E,gBAAgB,EAAE,iBAAiB,GACpC,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,YAAY,EACV,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,sBAAsB,EAChE,kBAAkB,EAAE,kBAAkB,GACvC,MAAM,WAAW,CAAC"}
@@ -1,4 +1,6 @@
1
1
  export { ERC8004Client, ERC8004IdentityRegistryAbi, METADATA_KEYS, REGISTRATION_FILE_TYPE, KNOWN_REGISTRY_ADDRESSES, buildDataURI, parseDataURI, resolveAgentURI, validateRegistrationFile, formatAgentRegistry, } from './erc8004.js';
2
2
  export { ReputationClient, ReputationRegistryAbi } from './reputation.js';
3
3
  export { ValidationClient, ValidationRegistryAbi } from './validation.js';
4
+ // ─── UAID: Cross-Chain Identity Resolution ─────────────────────────────────
5
+ export { UAIDResolver } from './uaid.js';
4
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/identity/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAAE,0BAA0B,EAAE,aAAa,EACxD,sBAAsB,EAAE,wBAAwB,EAChD,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,wBAAwB,EAAE,mBAAmB,GAC3F,MAAM,cAAc,CAAC;AAOtB,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAM1E,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/identity/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAAE,0BAA0B,EAAE,aAAa,EACxD,sBAAsB,EAAE,wBAAwB,EAChD,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,wBAAwB,EAAE,mBAAmB,GAC3F,MAAM,cAAc,CAAC;AAOtB,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAM1E,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAM1E,8EAA8E;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC"}
@@ -0,0 +1,193 @@
1
+ /**
2
+ * uaid.ts — Universal Agent Identifier (UAID) Resolution Layer
3
+ *
4
+ * Provides cross-chain agent identity resolution via the HOL Registry Broker.
5
+ * UAIDs are chain-agnostic identifiers that bridge ERC-8004 tokens on EVM chains
6
+ * to agents on Solana, Hedera, off-chain frameworks, and any other protocol.
7
+ *
8
+ * This module is an optional extension — agents that only operate on EVM chains
9
+ * can continue using ERC8004Client directly.
10
+ *
11
+ * Registry: https://hol.org
12
+ * SDK: @hol-org/rb-client (peer dependency — install only if needed)
13
+ *
14
+ * @module identity/uaid
15
+ */
16
+ import type { AgentIdentity, AgentRegistrationFile, SupportedChain } from './erc8004.js';
17
+ import type { Address } from 'viem';
18
+ /** Supported protocol types in the UAID ecosystem */
19
+ export type UAIDProtocol = 'erc8004' | 'a2a' | 'openconvai' | 'virtuals' | 'x402' | 'hedera' | 'solana' | string;
20
+ /** A parsed UAID with its component parts */
21
+ export interface ParsedUAID {
22
+ /** Raw UAID string */
23
+ raw: string;
24
+ /** Agent identifier portion */
25
+ aid: string;
26
+ /** Unique identifier portion */
27
+ uid: string;
28
+ /** Protocol used for resolution */
29
+ protocol: UAIDProtocol;
30
+ /** Native identifier on the protocol's own chain/system */
31
+ nativeId?: string;
32
+ }
33
+ /** Result of resolving a UAID to a known identity */
34
+ export interface UAIDResolution {
35
+ /** Whether resolution succeeded */
36
+ resolved: boolean;
37
+ /** The UAID that was resolved */
38
+ uaid: string;
39
+ /** Resolved agent identity (if ERC-8004 backed) */
40
+ identity: UniversalAgentIdentity | null;
41
+ /** Protocol the agent was resolved through */
42
+ protocol: UAIDProtocol;
43
+ /** Chain the identity lives on (if applicable) */
44
+ chain?: string;
45
+ /** Trust score from the registry (0-100) */
46
+ trustScore?: number;
47
+ /** Whether the agent is verified in the HOL registry */
48
+ registryVerified: boolean;
49
+ /** Error message if resolution failed */
50
+ error?: string;
51
+ }
52
+ /**
53
+ * Universal agent identity — superset of ERC-8004 AgentIdentity that works
54
+ * across chains. For EVM agents, this mirrors AgentIdentity. For non-EVM
55
+ * agents, it provides equivalent fields using native identifiers.
56
+ */
57
+ export interface UniversalAgentIdentity {
58
+ /** Identifier — ERC-8004 tokenId for EVM, native ID for others */
59
+ agentId: string;
60
+ /** Owner — EVM address, Hedera account, Solana pubkey, etc. */
61
+ owner: string;
62
+ /** Agent URI / metadata endpoint */
63
+ agentURI: string;
64
+ /** Payment address (chain-native format) */
65
+ paymentAddress: string;
66
+ /** Registration metadata (if available) */
67
+ registrationFile: AgentRegistrationFile | null;
68
+ /** Source protocol */
69
+ protocol: UAIDProtocol;
70
+ /** Source chain */
71
+ chain: string;
72
+ /** UAID for cross-chain reference */
73
+ uaid: string;
74
+ }
75
+ /** Configuration for the UAID resolver */
76
+ export interface UAIDResolverConfig {
77
+ /** HOL Registry Broker API key (optional for read-only resolution) */
78
+ apiKey?: string;
79
+ /** Custom broker base URL (defaults to production) */
80
+ brokerUrl?: string;
81
+ /** Request timeout in ms (default: 10000) */
82
+ timeoutMs?: number;
83
+ /** Cache resolved identities for this many ms (default: 300000 = 5 min) */
84
+ cacheTtlMs?: number;
85
+ }
86
+ /** Parameters for registering an ERC-8004 identity as a UAID */
87
+ export interface RegisterUAIDParams {
88
+ /** ERC-8004 agent ID (tokenId) */
89
+ agentId: bigint;
90
+ /** Chain the identity is registered on */
91
+ chain: SupportedChain;
92
+ /** Registry contract address (uses known defaults if omitted) */
93
+ registryAddress?: Address;
94
+ /** Agent name for the registry */
95
+ name: string;
96
+ /** Agent description */
97
+ description: string;
98
+ /** Optional: additional capabilities to advertise */
99
+ capabilities?: string[];
100
+ }
101
+ export declare class UAIDResolver {
102
+ private readonly brokerUrl;
103
+ private readonly apiKey?;
104
+ private readonly timeoutMs;
105
+ private readonly cacheTtlMs;
106
+ private readonly cache;
107
+ constructor(config?: UAIDResolverConfig);
108
+ /**
109
+ * Resolve a UAID to an agent identity.
110
+ *
111
+ * Works across chains — the resolver contacts the HOL Registry Broker to
112
+ * find the agent's identity regardless of whether it lives on EVM, Hedera,
113
+ * Solana, or off-chain.
114
+ *
115
+ * @param uaid - Universal Agent Identifier string
116
+ * @returns Resolution result with identity details
117
+ *
118
+ * @example
119
+ * ```ts
120
+ * const resolver = new UAIDResolver();
121
+ * const result = await resolver.resolve('uaid:aid:0x8004...;uid=42;proto=erc8004');
122
+ * if (result.resolved) {
123
+ * console.log(result.identity?.paymentAddress);
124
+ * }
125
+ * ```
126
+ */
127
+ resolve(uaid: string): Promise<UAIDResolution>;
128
+ /**
129
+ * Search the HOL registry for agents matching criteria.
130
+ *
131
+ * @param query - Search terms (name, capability, protocol)
132
+ * @param options - Optional filters
133
+ * @returns Array of matching UAIDResolution results
134
+ */
135
+ search(query: string, options?: {
136
+ protocol?: UAIDProtocol;
137
+ limit?: number;
138
+ minTrustScore?: number;
139
+ }): Promise<UAIDResolution[]>;
140
+ /**
141
+ * Convert an ERC-8004 AgentIdentity to a UniversalAgentIdentity.
142
+ *
143
+ * Useful when you already have an on-chain identity and want to work
144
+ * with the universal format (e.g., for cross-chain discovery).
145
+ */
146
+ erc8004ToUniversal(identity: AgentIdentity, chain: SupportedChain): UniversalAgentIdentity;
147
+ /**
148
+ * Build a UAID string for an ERC-8004 agent.
149
+ *
150
+ * This creates the identifier — it does NOT register with the HOL registry.
151
+ * Use registerERC8004Agent() to make the agent discoverable cross-chain.
152
+ */
153
+ buildERC8004UAID(agentId: bigint, chain: SupportedChain, ownerAddress: Address): string;
154
+ /**
155
+ * Register an ERC-8004 agent in the HOL registry for cross-chain discovery.
156
+ *
157
+ * After registration, agents on Solana, Hedera, or any protocol can
158
+ * discover and verify this agent's identity via its UAID.
159
+ *
160
+ * Requires an API key with write permissions.
161
+ *
162
+ * @param params - Registration parameters
163
+ * @returns The assigned UAID
164
+ */
165
+ registerERC8004Agent(params: RegisterUAIDParams): Promise<string>;
166
+ /**
167
+ * Verify an agent's identity via UAID — works across any chain.
168
+ *
169
+ * This is the cross-chain equivalent of ERC8004Client.lookupAgentIdentity().
170
+ * For EVM agents, it verifies the UAID maps to a valid on-chain ERC-8004 token.
171
+ * For non-EVM agents, it verifies through the registry's native trust mechanism.
172
+ *
173
+ * @param uaid - Universal Agent Identifier to verify
174
+ * @returns Verification result
175
+ */
176
+ verify(uaid: string): Promise<{
177
+ verified: boolean;
178
+ identity: UniversalAgentIdentity | null;
179
+ trustScore: number;
180
+ protocol: UAIDProtocol;
181
+ error?: string;
182
+ }>;
183
+ /**
184
+ * Parse a UAID string into its components.
185
+ *
186
+ * Format: `uaid:aid:<identifier>;uid=<unique-id>;proto=<protocol>[;nativeId=<id>]`
187
+ */
188
+ static parseUAID(uaid: string): ParsedUAID | null;
189
+ /** Clear the resolution cache */
190
+ clearCache(): void;
191
+ private brokerRequest;
192
+ }
193
+ //# sourceMappingURL=uaid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uaid.d.ts","sourceRoot":"","sources":["../../src/identity/uaid.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAqB,EAAE,cAAc,EAA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