agentwallet-sdk 4.0.5 → 5.0.1

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 (400) hide show
  1. package/README.md +154 -158
  2. package/dist/abi.d.ts +396 -46
  3. package/dist/abi.d.ts.map +1 -1
  4. package/dist/abi.js +0 -2
  5. package/dist/abi.js.map +1 -1
  6. package/dist/ap2/index.d.ts +185 -0
  7. package/dist/ap2/index.d.ts.map +1 -0
  8. package/dist/ap2/index.js +255 -0
  9. package/dist/ap2/index.js.map +1 -0
  10. package/dist/bridge/abis.d.ts.map +1 -1
  11. package/dist/bridge/abis.js +0 -2
  12. package/dist/bridge/abis.js.map +1 -1
  13. package/dist/bridge/client.d.ts +28 -43
  14. package/dist/bridge/client.d.ts.map +1 -1
  15. package/dist/bridge/client.js +0 -2
  16. package/dist/bridge/client.js.map +1 -1
  17. package/dist/bridge/index.d.ts +1 -0
  18. package/dist/bridge/index.d.ts.map +1 -1
  19. package/dist/bridge/index.js +0 -2
  20. package/dist/bridge/index.js.map +1 -1
  21. package/dist/bridge/types.d.ts +48 -32
  22. package/dist/bridge/types.d.ts.map +1 -1
  23. package/dist/bridge/types.js +0 -2
  24. package/dist/bridge/types.js.map +1 -1
  25. package/dist/bridge/unified.d.ts +101 -0
  26. package/dist/bridge/unified.d.ts.map +1 -0
  27. package/dist/bridge/unified.js +284 -0
  28. package/dist/bridge/unified.js.map +1 -0
  29. package/dist/chains.d.ts +62 -0
  30. package/dist/chains.d.ts.map +1 -0
  31. package/dist/chains.js +108 -0
  32. package/dist/chains.js.map +1 -0
  33. package/dist/escrow/MutualStakeEscrow.d.ts +75 -0
  34. package/dist/escrow/MutualStakeEscrow.d.ts.map +1 -0
  35. package/dist/escrow/MutualStakeEscrow.js +339 -0
  36. package/dist/escrow/MutualStakeEscrow.js.map +1 -0
  37. package/dist/escrow/types.d.ts +59 -0
  38. package/dist/escrow/types.d.ts.map +1 -0
  39. package/dist/escrow/types.js +11 -0
  40. package/dist/escrow/types.js.map +1 -0
  41. package/dist/escrow/verifiers.d.ts +26 -0
  42. package/dist/escrow/verifiers.d.ts.map +1 -0
  43. package/dist/escrow/verifiers.js +53 -0
  44. package/dist/escrow/verifiers.js.map +1 -0
  45. package/dist/fiat/index.d.ts +10 -0
  46. package/dist/fiat/index.d.ts.map +1 -0
  47. package/dist/fiat/index.js +9 -0
  48. package/dist/fiat/index.js.map +1 -0
  49. package/dist/fiat/onramp.d.ts +101 -0
  50. package/dist/fiat/onramp.d.ts.map +1 -0
  51. package/dist/fiat/onramp.js +155 -0
  52. package/dist/fiat/onramp.js.map +1 -0
  53. package/dist/fiat/providers/index.d.ts +16 -0
  54. package/dist/fiat/providers/index.d.ts.map +1 -0
  55. package/dist/fiat/providers/index.js +30 -0
  56. package/dist/fiat/providers/index.js.map +1 -0
  57. package/dist/fiat/providers/moonpay.d.ts +22 -0
  58. package/dist/fiat/providers/moonpay.d.ts.map +1 -0
  59. package/dist/fiat/providers/moonpay.js +107 -0
  60. package/dist/fiat/providers/moonpay.js.map +1 -0
  61. package/dist/fiat/providers/stripe.d.ts +26 -0
  62. package/dist/fiat/providers/stripe.d.ts.map +1 -0
  63. package/dist/fiat/providers/stripe.js +135 -0
  64. package/dist/fiat/providers/stripe.js.map +1 -0
  65. package/dist/fiat/providers/transak.d.ts +26 -0
  66. package/dist/fiat/providers/transak.d.ts.map +1 -0
  67. package/dist/fiat/providers/transak.js +119 -0
  68. package/dist/fiat/providers/transak.js.map +1 -0
  69. package/dist/fiat/types.d.ts +106 -0
  70. package/dist/fiat/types.d.ts.map +1 -0
  71. package/dist/fiat/types.js +13 -0
  72. package/dist/fiat/types.js.map +1 -0
  73. package/dist/flash/executor.d.ts +119 -0
  74. package/dist/flash/executor.d.ts.map +1 -0
  75. package/dist/flash/executor.js +195 -0
  76. package/dist/flash/executor.js.map +1 -0
  77. package/dist/flash/index.d.ts +28 -0
  78. package/dist/flash/index.d.ts.map +1 -0
  79. package/dist/flash/index.js +29 -0
  80. package/dist/flash/index.js.map +1 -0
  81. package/dist/flash/scanner.d.ts +133 -0
  82. package/dist/flash/scanner.d.ts.map +1 -0
  83. package/dist/flash/scanner.js +212 -0
  84. package/dist/flash/scanner.js.map +1 -0
  85. package/dist/flash/types.d.ts +136 -0
  86. package/dist/flash/types.d.ts.map +1 -0
  87. package/dist/flash/types.js +23 -0
  88. package/dist/flash/types.js.map +1 -0
  89. package/dist/gas/index.d.ts +4 -0
  90. package/dist/gas/index.d.ts.map +1 -0
  91. package/dist/gas/index.js +3 -0
  92. package/dist/gas/index.js.map +1 -0
  93. package/dist/gas/sponsor.d.ts +70 -0
  94. package/dist/gas/sponsor.d.ts.map +1 -0
  95. package/dist/gas/sponsor.js +193 -0
  96. package/dist/gas/sponsor.js.map +1 -0
  97. package/dist/gas/types.d.ts +76 -0
  98. package/dist/gas/types.d.ts.map +1 -0
  99. package/dist/gas/types.js +21 -0
  100. package/dist/gas/types.js.map +1 -0
  101. package/dist/identity/agent-identity.d.ts +276 -0
  102. package/dist/identity/agent-identity.d.ts.map +1 -0
  103. package/dist/identity/agent-identity.js +300 -0
  104. package/dist/identity/agent-identity.js.map +1 -0
  105. package/dist/identity/erc6551.d.ts +441 -0
  106. package/dist/identity/erc6551.d.ts.map +1 -0
  107. package/dist/identity/erc6551.js +517 -0
  108. package/dist/identity/erc6551.js.map +1 -0
  109. package/dist/identity/erc8004.d.ts +296 -141
  110. package/dist/identity/erc8004.d.ts.map +1 -1
  111. package/dist/identity/erc8004.js +43 -12
  112. package/dist/identity/erc8004.js.map +1 -1
  113. package/dist/identity/index.d.ts +6 -2
  114. package/dist/identity/index.d.ts.map +1 -1
  115. package/dist/identity/index.js +3 -2
  116. package/dist/identity/index.js.map +1 -1
  117. package/dist/identity/reputation.d.ts +318 -0
  118. package/dist/identity/reputation.d.ts.map +1 -0
  119. package/dist/identity/reputation.js +272 -0
  120. package/dist/identity/reputation.js.map +1 -0
  121. package/dist/identity/validation.d.ts +284 -0
  122. package/dist/identity/validation.d.ts.map +1 -0
  123. package/dist/identity/validation.js +226 -0
  124. package/dist/identity/validation.js.map +1 -0
  125. package/dist/index.d.ts +32624 -1011
  126. package/dist/index.d.ts.map +1 -1
  127. package/dist/index.js +16 -12
  128. package/dist/index.js.map +1 -1
  129. package/dist/mev/index.d.ts +4 -0
  130. package/dist/mev/index.d.ts.map +1 -0
  131. package/dist/mev/index.js +8 -0
  132. package/dist/mev/index.js.map +1 -0
  133. package/dist/mev/protection.d.ts +54 -0
  134. package/dist/mev/protection.d.ts.map +1 -0
  135. package/dist/mev/protection.js +185 -0
  136. package/dist/mev/protection.js.map +1 -0
  137. package/dist/mev/risk.d.ts +19 -0
  138. package/dist/mev/risk.d.ts.map +1 -0
  139. package/dist/mev/risk.js +95 -0
  140. package/dist/mev/risk.js.map +1 -0
  141. package/dist/mev/types.d.ts +49 -0
  142. package/dist/mev/types.d.ts.map +1 -0
  143. package/dist/mev/types.js +2 -0
  144. package/dist/mev/types.js.map +1 -0
  145. package/dist/plugins/elizaos.d.ts +26 -14
  146. package/dist/plugins/elizaos.d.ts.map +1 -1
  147. package/dist/plugins/elizaos.js +0 -2
  148. package/dist/plugins/elizaos.js.map +1 -1
  149. package/dist/policy/SpendingPolicy.d.ts +89 -15
  150. package/dist/policy/SpendingPolicy.d.ts.map +1 -1
  151. package/dist/policy/SpendingPolicy.js +0 -2
  152. package/dist/policy/SpendingPolicy.js.map +1 -1
  153. package/dist/policy/SpendingPolicy.test.d.ts +2 -0
  154. package/dist/policy/SpendingPolicy.test.d.ts.map +1 -0
  155. package/dist/policy/SpendingPolicy.test.js +143 -0
  156. package/dist/policy/SpendingPolicy.test.js.map +1 -0
  157. package/dist/settlement/index.d.ts +4 -0
  158. package/dist/settlement/index.d.ts.map +1 -0
  159. package/dist/settlement/index.js +3 -0
  160. package/dist/settlement/index.js.map +1 -0
  161. package/dist/settlement/types.d.ts +66 -0
  162. package/dist/settlement/types.d.ts.map +1 -0
  163. package/dist/settlement/types.js +37 -0
  164. package/dist/settlement/types.js.map +1 -0
  165. package/dist/settlement/verifier.d.ts +75 -0
  166. package/dist/settlement/verifier.d.ts.map +1 -0
  167. package/dist/settlement/verifier.js +354 -0
  168. package/dist/settlement/verifier.js.map +1 -0
  169. package/dist/solana/bridge.d.ts +144 -0
  170. package/dist/solana/bridge.d.ts.map +1 -0
  171. package/dist/solana/bridge.js +352 -0
  172. package/dist/solana/bridge.js.map +1 -0
  173. package/dist/solana/index.d.ts +8 -0
  174. package/dist/solana/index.d.ts.map +1 -0
  175. package/dist/solana/index.js +6 -0
  176. package/dist/solana/index.js.map +1 -0
  177. package/dist/solana/swap.d.ts +85 -0
  178. package/dist/solana/swap.d.ts.map +1 -0
  179. package/dist/solana/swap.js +173 -0
  180. package/dist/solana/swap.js.map +1 -0
  181. package/dist/solana/types.d.ts +126 -0
  182. package/dist/solana/types.d.ts.map +1 -0
  183. package/dist/solana/types.js +10 -0
  184. package/dist/solana/types.js.map +1 -0
  185. package/dist/solana/wallet.d.ts +83 -0
  186. package/dist/solana/wallet.d.ts.map +1 -0
  187. package/dist/solana/wallet.js +164 -0
  188. package/dist/solana/wallet.js.map +1 -0
  189. package/dist/solana/x402.d.ts +69 -0
  190. package/dist/solana/x402.d.ts.map +1 -0
  191. package/dist/solana/x402.js +154 -0
  192. package/dist/solana/x402.js.map +1 -0
  193. package/dist/solver/adapter.d.ts +47 -0
  194. package/dist/solver/adapter.d.ts.map +1 -0
  195. package/dist/solver/adapter.js +146 -0
  196. package/dist/solver/adapter.js.map +1 -0
  197. package/dist/solver/analyzer.d.ts +48 -0
  198. package/dist/solver/analyzer.d.ts.map +1 -0
  199. package/dist/solver/analyzer.js +171 -0
  200. package/dist/solver/analyzer.js.map +1 -0
  201. package/dist/solver/builder.d.ts +31 -0
  202. package/dist/solver/builder.d.ts.map +1 -0
  203. package/dist/solver/builder.js +60 -0
  204. package/dist/solver/builder.js.map +1 -0
  205. package/dist/solver/index.d.ts +22 -0
  206. package/dist/solver/index.d.ts.map +1 -0
  207. package/dist/solver/index.js +25 -0
  208. package/dist/solver/index.js.map +1 -0
  209. package/dist/solver/types.d.ts +115 -0
  210. package/dist/solver/types.d.ts.map +1 -0
  211. package/dist/solver/types.js +10 -0
  212. package/dist/solver/types.js.map +1 -0
  213. package/dist/spend-guard/index.d.ts +125 -0
  214. package/dist/spend-guard/index.d.ts.map +1 -0
  215. package/dist/spend-guard/index.js +150 -0
  216. package/dist/spend-guard/index.js.map +1 -0
  217. package/dist/swap/SwapModule.d.ts +28 -39
  218. package/dist/swap/SwapModule.d.ts.map +1 -1
  219. package/dist/swap/SwapModule.js +2 -4
  220. package/dist/swap/SwapModule.js.map +1 -1
  221. package/dist/swap/abi.d.ts.map +1 -1
  222. package/dist/swap/abi.js +0 -2
  223. package/dist/swap/abi.js.map +1 -1
  224. package/dist/swap/index.d.ts +1 -0
  225. package/dist/swap/index.d.ts.map +1 -1
  226. package/dist/swap/index.js +0 -2
  227. package/dist/swap/index.js.map +1 -1
  228. package/dist/swap/router/cache.d.ts +13 -0
  229. package/dist/swap/router/cache.d.ts.map +1 -0
  230. package/dist/swap/router/cache.js +30 -0
  231. package/dist/swap/router/cache.js.map +1 -0
  232. package/dist/swap/router/flashbots.d.ts +10 -0
  233. package/dist/swap/router/flashbots.d.ts.map +1 -0
  234. package/dist/swap/router/flashbots.js +43 -0
  235. package/dist/swap/router/flashbots.js.map +1 -0
  236. package/dist/swap/router/health.d.ts +17 -0
  237. package/dist/swap/router/health.d.ts.map +1 -0
  238. package/dist/swap/router/health.js +38 -0
  239. package/dist/swap/router/health.js.map +1 -0
  240. package/dist/swap/router/index.d.ts +10 -0
  241. package/dist/swap/router/index.d.ts.map +1 -0
  242. package/dist/swap/router/index.js +10 -0
  243. package/dist/swap/router/index.js.map +1 -0
  244. package/dist/swap/router/providers/cowswap.d.ts +11 -0
  245. package/dist/swap/router/providers/cowswap.d.ts.map +1 -0
  246. package/dist/swap/router/providers/cowswap.js +79 -0
  247. package/dist/swap/router/providers/cowswap.js.map +1 -0
  248. package/dist/swap/router/providers/index.d.ts +20 -0
  249. package/dist/swap/router/providers/index.d.ts.map +1 -0
  250. package/dist/swap/router/providers/index.js +32 -0
  251. package/dist/swap/router/providers/index.js.map +1 -0
  252. package/dist/swap/router/providers/jupiter.d.ts +12 -0
  253. package/dist/swap/router/providers/jupiter.d.ts.map +1 -0
  254. package/dist/swap/router/providers/jupiter.js +73 -0
  255. package/dist/swap/router/providers/jupiter.js.map +1 -0
  256. package/dist/swap/router/providers/lifi.d.ts +11 -0
  257. package/dist/swap/router/providers/lifi.d.ts.map +1 -0
  258. package/dist/swap/router/providers/lifi.js +123 -0
  259. package/dist/swap/router/providers/lifi.js.map +1 -0
  260. package/dist/swap/router/providers/oneinch.d.ts +13 -0
  261. package/dist/swap/router/providers/oneinch.d.ts.map +1 -0
  262. package/dist/swap/router/providers/oneinch.js +71 -0
  263. package/dist/swap/router/providers/oneinch.js.map +1 -0
  264. package/dist/swap/router/providers/paraswap.d.ts +11 -0
  265. package/dist/swap/router/providers/paraswap.d.ts.map +1 -0
  266. package/dist/swap/router/providers/paraswap.js +73 -0
  267. package/dist/swap/router/providers/paraswap.js.map +1 -0
  268. package/dist/swap/router/providers/uniswap.d.ts +31 -0
  269. package/dist/swap/router/providers/uniswap.d.ts.map +1 -0
  270. package/dist/swap/router/providers/uniswap.js +237 -0
  271. package/dist/swap/router/providers/uniswap.js.map +1 -0
  272. package/dist/swap/router/providers/zerox.d.ts +13 -0
  273. package/dist/swap/router/providers/zerox.d.ts.map +1 -0
  274. package/dist/swap/router/providers/zerox.js +94 -0
  275. package/dist/swap/router/providers/zerox.js.map +1 -0
  276. package/dist/swap/router/router.d.ts +86 -0
  277. package/dist/swap/router/router.d.ts.map +1 -0
  278. package/dist/swap/router/router.js +224 -0
  279. package/dist/swap/router/router.js.map +1 -0
  280. package/dist/swap/router/rsi/engine.d.ts +60 -0
  281. package/dist/swap/router/rsi/engine.d.ts.map +1 -0
  282. package/dist/swap/router/rsi/engine.js +483 -0
  283. package/dist/swap/router/rsi/engine.js.map +1 -0
  284. package/dist/swap/router/rsi/index.d.ts +3 -0
  285. package/dist/swap/router/rsi/index.d.ts.map +1 -0
  286. package/dist/swap/router/rsi/index.js +3 -0
  287. package/dist/swap/router/rsi/index.js.map +1 -0
  288. package/dist/swap/router/rsi/types.d.ts +106 -0
  289. package/dist/swap/router/rsi/types.d.ts.map +1 -0
  290. package/dist/swap/router/rsi/types.js +3 -0
  291. package/dist/swap/router/rsi/types.js.map +1 -0
  292. package/dist/swap/router/types.d.ts +120 -0
  293. package/dist/swap/router/types.d.ts.map +1 -0
  294. package/dist/swap/router/types.js +16 -0
  295. package/dist/swap/router/types.js.map +1 -0
  296. package/dist/swap/types.d.ts +41 -7
  297. package/dist/swap/types.d.ts.map +1 -1
  298. package/dist/swap/types.js +1 -3
  299. package/dist/swap/types.js.map +1 -1
  300. package/dist/tax/engine.d.ts +131 -0
  301. package/dist/tax/engine.d.ts.map +1 -0
  302. package/dist/tax/engine.js +307 -0
  303. package/dist/tax/engine.js.map +1 -0
  304. package/dist/tax/index.d.ts +9 -0
  305. package/dist/tax/index.d.ts.map +1 -0
  306. package/dist/tax/index.js +12 -0
  307. package/dist/tax/index.js.map +1 -0
  308. package/dist/tax/lots.d.ts +60 -0
  309. package/dist/tax/lots.d.ts.map +1 -0
  310. package/dist/tax/lots.js +129 -0
  311. package/dist/tax/lots.js.map +1 -0
  312. package/dist/tax/types.d.ts +113 -0
  313. package/dist/tax/types.d.ts.map +1 -0
  314. package/dist/tax/types.js +18 -0
  315. package/dist/tax/types.js.map +1 -0
  316. package/dist/types.d.ts +106 -5
  317. package/dist/types.d.ts.map +1 -1
  318. package/dist/types.js +0 -2
  319. package/dist/types.js.map +1 -1
  320. package/dist/x402/__tests__/budget.test.d.ts +2 -0
  321. package/dist/x402/__tests__/budget.test.d.ts.map +1 -0
  322. package/dist/x402/__tests__/budget.test.js +114 -0
  323. package/dist/x402/__tests__/budget.test.js.map +1 -0
  324. package/dist/x402/__tests__/client.test.d.ts +2 -0
  325. package/dist/x402/__tests__/client.test.d.ts.map +1 -0
  326. package/dist/x402/__tests__/client.test.js +107 -0
  327. package/dist/x402/__tests__/client.test.js.map +1 -0
  328. package/dist/x402/budget.d.ts +23 -15
  329. package/dist/x402/budget.d.ts.map +1 -1
  330. package/dist/x402/budget.js +0 -2
  331. package/dist/x402/budget.js.map +1 -1
  332. package/dist/x402/chains/abstract/index.d.ts +87 -59
  333. package/dist/x402/chains/abstract/index.d.ts.map +1 -1
  334. package/dist/x402/chains/abstract/index.js +0 -2
  335. package/dist/x402/chains/abstract/index.js.map +1 -1
  336. package/dist/x402/client.d.ts +27 -13
  337. package/dist/x402/client.d.ts.map +1 -1
  338. package/dist/x402/client.js +0 -2
  339. package/dist/x402/client.js.map +1 -1
  340. package/dist/x402/index.d.ts +2 -0
  341. package/dist/x402/index.d.ts.map +1 -1
  342. package/dist/x402/index.js +0 -2
  343. package/dist/x402/index.js.map +1 -1
  344. package/dist/x402/middleware.d.ts +4 -4
  345. package/dist/x402/middleware.d.ts.map +1 -1
  346. package/dist/x402/middleware.js +0 -2
  347. package/dist/x402/middleware.js.map +1 -1
  348. package/dist/x402/types.d.ts +88 -5
  349. package/dist/x402/types.d.ts.map +1 -1
  350. package/dist/x402/types.js +0 -2
  351. package/dist/x402/types.js.map +1 -1
  352. package/dist/yield/index.d.ts +26 -0
  353. package/dist/yield/index.d.ts.map +1 -0
  354. package/dist/yield/index.js +29 -0
  355. package/dist/yield/index.js.map +1 -0
  356. package/dist/yield/rates.d.ts +114 -0
  357. package/dist/yield/rates.d.ts.map +1 -0
  358. package/dist/yield/rates.js +351 -0
  359. package/dist/yield/rates.js.map +1 -0
  360. package/dist/yield/types.d.ts +134 -0
  361. package/dist/yield/types.d.ts.map +1 -0
  362. package/dist/yield/types.js +24 -0
  363. package/dist/yield/types.js.map +1 -0
  364. package/dist/yield/vault.d.ts +112 -0
  365. package/dist/yield/vault.d.ts.map +1 -0
  366. package/dist/yield/vault.js +264 -0
  367. package/dist/yield/vault.js.map +1 -0
  368. package/package.json +18 -32
  369. package/dist/__tests__/identity.did.test.d.ts +0 -2
  370. package/dist/__tests__/identity.did.test.d.ts.map +0 -1
  371. package/dist/__tests__/identity.did.test.js +0 -56
  372. package/dist/__tests__/identity.did.test.js.map +0 -1
  373. package/dist/__tests__/staking.test.d.ts +0 -2
  374. package/dist/__tests__/staking.test.d.ts.map +0 -1
  375. package/dist/__tests__/staking.test.js +0 -70
  376. package/dist/__tests__/staking.test.js.map +0 -1
  377. package/dist/__tests__/verify.test.d.ts +0 -2
  378. package/dist/__tests__/verify.test.d.ts.map +0 -1
  379. package/dist/__tests__/verify.test.js +0 -57
  380. package/dist/__tests__/verify.test.js.map +0 -1
  381. package/dist/identity/did.d.ts +0 -66
  382. package/dist/identity/did.d.ts.map +0 -1
  383. package/dist/identity/did.js +0 -186
  384. package/dist/identity/did.js.map +0 -1
  385. package/dist/staking/AgentStakingPool.d.ts +0 -100
  386. package/dist/staking/AgentStakingPool.d.ts.map +0 -1
  387. package/dist/staking/AgentStakingPool.js +0 -298
  388. package/dist/staking/AgentStakingPool.js.map +0 -1
  389. package/dist/staking/index.d.ts +0 -2
  390. package/dist/staking/index.d.ts.map +0 -1
  391. package/dist/staking/index.js +0 -2
  392. package/dist/staking/index.js.map +0 -1
  393. package/dist/verify/index.d.ts +0 -2
  394. package/dist/verify/index.d.ts.map +0 -1
  395. package/dist/verify/index.js +0 -2
  396. package/dist/verify/index.js.map +0 -1
  397. package/dist/verify/verifyAgent.d.ts +0 -42
  398. package/dist/verify/verifyAgent.d.ts.map +0 -1
  399. package/dist/verify/verifyAgent.js +0 -216
  400. package/dist/verify/verifyAgent.js.map +0 -1
package/README.md CHANGED
@@ -1,224 +1,220 @@
1
- # agentwallet-sdk
1
+ # AgentWallet SDK
2
2
 
3
- **The only non-custodial agent wallet SDK. Unlike Coinbase Agentic Wallets your keys, your agent.**
3
+ Non-custodial AI agent wallet with ERC-8004 on-chain identity, ERC-6551 token-bound accounts, x402 payments, mutual stake escrow, and programmable spending guardrails.
4
4
 
5
- Non-custodial agent wallet SDK. Your agent holds its own keys no custodian, no KYC, no freeze risk.
5
+ Agent Wallet gives AI agents autonomous spending power with hard on-chain limits. No more choosing between "agent can drain everything" and "every transaction needs manual approval."
6
6
 
7
- [![npm](https://img.shields.io/npm/v/agentwallet-sdk?style=flat-square)](https://www.npmjs.com/package/agentwallet-sdk)
8
- [![Discord](https://img.shields.io/discord/1475549260140253194?label=Community&logo=discord&color=5865F2)](https://discord.gg/958AACqf7Y)
9
- ![x402](https://img.shields.io/badge/x402-native-green?style=flat-square)
10
- ![CCTP V2](https://img.shields.io/badge/CCTP_V2-17_chains-red?style=flat-square)
11
- ![Tests](https://img.shields.io/badge/tests-629_passing-brightgreen?style=flat-square)
12
- ![Swap Fee](https://img.shields.io/badge/swap_fee-0.77%25-blue?style=flat-square)
7
+ > **ERC-8004 Ready:** Maps directly to [ERC-8004 (Trustless Agents)](https://eips.ethereum.org/EIPS/eip-8004) — your agent's ERC-6551 wallet NFT doubles as its on-chain identity handle, with built-in Identity Registry, Reputation Registry, and Validation Registry clients.
13
8
 
14
- ```bash
15
- npm i agentwallet-sdk
16
9
  ```
17
-
18
- ---
19
-
20
- ## Why agentwallet-sdk?
21
-
22
- Most agent wallet solutions compromise on the thing that matters most: who controls the keys.
23
-
24
- | | agentwallet-sdk | Coinbase Agentic Wallets | MoonPay Agents |
25
- |---|---|---|---|
26
- | **Key custody** | Agent holds own keys | Coinbase TEE (custodial) | MoonPay managed |
27
- | **Freeze risk** | None — on-chain only | Yes — platform can freeze | Yes — KYC-gated |
28
- | **Cross-chain** | 17 chains via CCTP V2 | Base only | Limited |
29
- | **Swap fee** | **0.77%** | 0.875% | N/A |
30
- | **x402 support** | Native (v2.0.1+) | No public x402 client | No |
31
- | **Spend limits** | On-chain, enforced by contract | Platform-enforced | Platform-enforced |
32
- | **Agent identity** | DID + Verifiable Credentials | No | No |
33
- | **Agent staking** | AAVE USDC yield pool | No | No |
34
- | **KYC required** | No | No | Yes |
35
- | **MCP compatible** | Yes | No | No |
36
-
37
- ### 0.77% swap fee — 12% cheaper than MetaMask and Coinbase Wallet
38
-
39
- Both MetaMask and Coinbase Wallet charge **0.875%** on every swap. We charge **0.77%** — the lowest fee from any major wallet SDK. Built for agents that execute hundreds of swaps autonomously. Every basis point compounds.
40
-
41
- ```typescript
42
- import { SwapModule } from 'agentwallet-sdk/swap';
43
-
44
- const swap = new SwapModule(publicClient, walletClient, accountAddress);
45
-
46
- // 0.77% fee — cheaper than MetaMask, cheaper than Coinbase Wallet
47
- const result = await swap.executeSwap(USDC_ADDRESS, WETH_ADDRESS, 1000_000000n);
10
+ Agent wants to spend $15 → ✅ Auto-approved (under $25 limit)
11
+ Agent wants to spend $500 → ⏳ Queued for your approval
12
+ Agent spent $490 today → 🛑 Next tx queued ($500/day limit hit)
48
13
  ```
49
14
 
50
- ### True non-custody
15
+ ## Why Agent Wallet?
51
16
 
52
- The wallet is an ERC-6551 token-bound account on-chain. The agent's private key lives in the agent's environment, controlled by whoever runs the agent. Nobody else has it. Spend limits are enforced by the smart contract — not by a platform policy that can change overnight.
17
+ | Approach | Problem |
18
+ |----------|---------|
19
+ | Raw EOA wallet | Agent can drain everything. One prompt injection = rugged. |
20
+ | Multisig (Safe) | Every tx needs human sigs. Kills agent autonomy. |
21
+ | Custodial API (Stripe) | Centralized, KYC friction, not crypto-native. |
22
+ | **Agent Wallet** | **Agents spend freely within limits. Everything else queues for approval.** |
53
23
 
54
- ```typescript
55
- import { createWallet, createX402Fetch, NATIVE_TOKEN } from 'agentwallet-sdk';
24
+ Built on **ERC-6551** (token-bound accounts). Your agent's wallet is tied to an NFT — portable, auditable, fully on-chain.
56
25
 
57
- const wallet = createWallet({ accountAddress: '0x...', chain: 'base', walletClient });
26
+ ## Quick Start
58
27
 
59
- // x402 payments: agent pays APIs automatically, no human needed
60
- const fetch = createX402Fetch(wallet, { globalDailyLimit: 10_000_000n });
61
- const data = await fetch('https://api.example.com/premium');
62
- // Server returned 402? Payment handled. Original request retried. Human not consulted.
28
+ ```bash
29
+ npm install agentwallet-sdk viem
63
30
  ```
64
31
 
65
- ### Agent identity — permanent DID + Verifiable Credentials
66
-
67
- Every agent gets a permanent, self-sovereign decentralized identity derived directly from its wallet key. No external registry. No KYC. Just cryptographic proof that this agent is who it claims to be.
32
+ ### Create a Wallet
68
33
 
69
34
  ```typescript
70
- import { deriveAgentDID, issueCredential, verifyCredential } from 'agentwallet-sdk/identity';
35
+ import { createWallet, setSpendPolicy, agentExecute, NATIVE_TOKEN } from 'agentwallet-sdk';
36
+ import { createWalletClient, http } from 'viem';
37
+ import { privateKeyToAccount } from 'viem/accounts';
38
+ import { base } from 'viem/chains';
71
39
 
72
- // Permanent DID — same key always produces the same DID
73
- const did = deriveAgentDID(privateKey);
74
- // → "did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK"
40
+ const account = privateKeyToAccount('0x...');
41
+ const walletClient = createWalletClient({ account, chain: base, transport: http() });
75
42
 
76
- // Issue a signed Verifiable Credential
77
- const vc = issueCredential(did, privateKey, {
78
- agentName: 'TradingAgent-01',
79
- capabilities: ['swap', 'bridge', 'pay'],
80
- owner: '0xff86...',
43
+ const wallet = createWallet({
44
+ accountAddress: '0xYourAgentWallet',
45
+ chain: 'base',
46
+ walletClient,
81
47
  });
82
48
 
83
- // Any counterparty can verify without phoning home
84
- console.log(verifyCredential(vc)); // true
49
+ // Set a $25/tx, $500/day spend policy for ETH
50
+ await setSpendPolicy(wallet, {
51
+ token: NATIVE_TOKEN,
52
+ perTxLimit: 25000000000000000n, // 0.025 ETH
53
+ periodLimit: 500000000000000000n, // 0.5 ETH
54
+ periodLength: 86400,
55
+ });
56
+
57
+ // Agent executes — auto-approved if within limits, queued if over
58
+ const result = await agentExecute(wallet, {
59
+ to: '0xRecipient',
60
+ value: 10000000000000000n, // 0.01 ETH
61
+ });
62
+ console.log(result.executed ? 'Sent!' : 'Queued for approval');
85
63
  ```
86
64
 
87
- ### Agent staking — earn yield on idle USDC
65
+ ## ERC-8004 On-Chain Identity
88
66
 
89
- Agents can deposit USDC into an AAVE V3-backed staking pool and earn yield on earnings instead of holding cash in a wallet. **Agent participants only** verified by DID at deposit time. No human participants.
67
+ Register your agent on the ERC-8004 Identity Registry a portable, censorship-resistant on-chain identity using ERC-721.
90
68
 
91
69
  ```typescript
92
- import { AgentStakingPool } from 'agentwallet-sdk/staking';
70
+ import { ERC8004Client } from 'agentwallet-sdk';
93
71
 
94
- const pool = new AgentStakingPool();
72
+ const identity = new ERC8004Client({ chain: 'base' });
95
73
 
96
- // Deposit TaskBridge earnings — starts earning yield immediately
97
- await pool.deposit({
98
- agentDID: did,
99
- amountUsdc: 500_000000n, // 500 USDC
100
- walletClient,
101
- chain: 'base',
74
+ // Register agent
75
+ const { txHash, agentId } = await identity.registerAgent(walletClient, {
76
+ name: 'MyAgent',
77
+ description: 'Autonomous trading agent',
102
78
  });
103
79
 
104
- // Check balance (principal + yield, minus 0.5% annual management fee)
105
- const balance = await pool.getBalance(did, 'base');
106
- console.log(balance.currentBalanceUsdc); // growing
80
+ // Look up any agent
81
+ const agent = await identity.lookupAgentIdentity(agentId!);
82
+ console.log(agent.owner, agent.agentURI);
107
83
  ```
108
84
 
109
- ### Agent verification — machine-readable trust score
85
+ ## ERC-8004 Reputation Registry
110
86
 
111
- Before transacting with an unknown agent, request a trust bundle. Staking balance, task history, wallet age — all signed by the agent's DID. No PII. No central authority.
87
+ On-chain reputation signals scored feedback from clients, aggregated summaries, revocable.
112
88
 
113
89
  ```typescript
114
- import { verifyAgent, verifyTrustBundle } from 'agentwallet-sdk/verify';
115
-
116
- const bundle = await verifyAgent({ privateKey, chain: 'base' });
117
- // {
118
- // did: "did:key:z6Mk...",
119
- // walletAddress: "0x...",
120
- // stakingBalance: 500000000n, // 500 USDC staked
121
- // reputationScore: 87, // 0-100
122
- // taskBridgeTasksCompleted: 47,
123
- // walletAgeDays: 183,
124
- // signature: "..." // tamper-proof
125
- // }
126
-
127
- // Counterparty verifies before accepting payment or task
128
- console.log(verifyTrustBundle(bundle)); // true
90
+ import { ReputationClient } from 'agentwallet-sdk';
91
+
92
+ const reputation = new ReputationClient({ chain: 'base' });
93
+
94
+ // Leave feedback for an agent
95
+ await reputation.giveFeedback(walletClient, {
96
+ agentId: 42n,
97
+ score: 95n,
98
+ category: 1,
99
+ comment: 'Fast execution, accurate results',
100
+ taskRef: 'task-abc-123',
101
+ verifierRef: '',
102
+ clientRef: '',
103
+ contentHash: '0x0000000000000000000000000000000000000000000000000000000000000000',
104
+ });
105
+
106
+ // Read aggregated reputation
107
+ const rep = await reputation.getAgentReputation(42n);
108
+ console.log(`Score: ${rep.totalScore} from ${rep.count} reviews`);
129
109
  ```
130
110
 
131
- ### Cross-chain without the ceremony
111
+ ## ERC-8004 Validation Registry
132
112
 
133
- One bridge interface across 17 chains. Coinbase Agentic Wallets are Base-only.
113
+ Request and receive on-chain validation from validator contracts (TEE attestations, capability proofs, compliance checks).
134
114
 
135
115
  ```typescript
136
- import { UnifiedBridge } from 'agentwallet-sdk';
116
+ import { ValidationClient } from 'agentwallet-sdk';
117
+ import { keccak256, toBytes } from 'viem';
137
118
 
138
- const bridge = new UnifiedBridge({ evmSigner, solanaWallet });
139
-
140
- await bridge.bridge({
141
- amount: 1_000_000n,
142
- sourceChain: 'solana',
143
- destinationChain: 'base',
144
- destinationAddress: '0x...',
119
+ const validation = new ValidationClient({
120
+ chain: 'base',
121
+ validationAddress: '0xYourValidationRegistry', // address required until official deployment
145
122
  });
146
- ```
147
123
 
148
- Supported chains: Base, Ethereum, Solana, Arbitrum, Optimism, Polygon, Avalanche, Unichain, Linea, Codex, Sonic, World Chain, Sei, XDC, HyperEVM, Ink, Plume.
149
-
150
- ---
124
+ // Request validation from a validator
125
+ const requestHash = keccak256(toBytes('my-validation-request-v1'));
126
+ await validation.requestValidation(walletClient, {
127
+ validator: '0xValidatorContract',
128
+ agentId: 42n,
129
+ requestURI: 'https://example.com/validation-spec.json',
130
+ requestHash,
131
+ });
151
132
 
152
- ## Install
133
+ // Check validation status
134
+ const status = await validation.getValidationStatus(requestHash);
135
+ console.log(status.responded ? `Result: ${status.response}` : 'Pending');
153
136
 
154
- ```bash
155
- npm i agentwallet-sdk
137
+ // Get summary for an agent
138
+ const summary = await validation.getSummary(42n);
139
+ console.log(`${summary.passCount} passed, ${summary.failCount} failed`);
156
140
  ```
157
141
 
158
- ## Quick Start
142
+ ## Mutual Stake Escrow
159
143
 
160
- ```typescript
161
- import { createWallet, setSpendPolicy, agentExecute, NATIVE_TOKEN } from 'agentwallet-sdk';
162
- import { createWalletClient, http } from 'viem';
163
- import { privateKeyToAccount } from 'viem/accounts';
144
+ Reciprocal collateral for agent-to-agent task settlement. Both parties stake, both lose if the task fails.
164
145
 
165
- const walletClient = createWalletClient({
166
- account: privateKeyToAccount(process.env.AGENT_PRIVATE_KEY),
167
- transport: http('https://mainnet.base.org'),
168
- });
146
+ ```typescript
147
+ import { MutualStakeEscrow } from 'agentwallet-sdk';
169
148
 
170
- const wallet = createWallet({
171
- accountAddress: '0xYOUR_AGENT_ACCOUNT',
149
+ const escrow = new MutualStakeEscrow({
172
150
  chain: 'base',
173
151
  walletClient,
174
152
  });
175
153
 
176
- // Set spend limits once (owner operation)
177
- await setSpendPolicy(wallet, {
178
- token: NATIVE_TOKEN,
179
- perTxLimit: 25_000000000000000n, // 0.025 ETH per tx
180
- periodLimit: 500_000000000000000n, // 0.5 ETH per day
181
- periodLength: 86400,
154
+ // Create escrow both agent and client stake
155
+ const { escrowId, txHash } = await escrow.create({
156
+ counterparty: '0xOtherAgent',
157
+ token: '0xUSDC',
158
+ stakeAmount: 100000000n, // 100 USDC
159
+ taskHash: '0x...',
160
+ deadline: BigInt(Math.floor(Date.now() / 1000) + 86400),
182
161
  });
183
162
 
184
- // Agent executes autonomously within limits
185
- await agentExecute(wallet, { to: '0xSOME_SERVICE', value: 10_000000000000000n });
163
+ // Counterparty funds their side
164
+ await escrow.fund(escrowId);
165
+
166
+ // After task completion, fulfill
167
+ await escrow.fulfill(escrowId, proofHash);
168
+
169
+ // Verify and release stakes
170
+ await escrow.verify(escrowId);
186
171
  ```
187
172
 
188
- ## Modules
173
+ ## Feature Tiers
174
+
175
+ ### Base (Free)
176
+
177
+ | Feature | Description |
178
+ |---------|-------------|
179
+ | Agent Identity | ERC-8004 Identity Registry — on-chain ERC-721 agent IDs |
180
+ | Agent Reputation | ERC-8004 Reputation Registry — scored feedback and summaries |
181
+ | Agent Validation | ERC-8004 Validation Registry — validator request/response |
182
+ | ERC-6551 TBA | NFT-bound wallets with autonomous spending |
183
+ | Mutual Stake Escrow | Reciprocal collateral task settlement |
184
+ | Optimistic Escrow | Time-locked optimistic verification |
185
+ | x402 Payments | HTTP 402 auto-pay for agent-to-service payments |
186
+ | CCTP Bridge | Circle CCTP V2 across 17 chains + Solana |
187
+ | Spend Policies | Per-token, per-period on-chain spending limits |
188
+ | Swap | Uniswap V3 on Base/Arbitrum/Optimism |
189
+ | Fiat Onramp | Opt-in fiat-to-crypto |
190
+ | AP2 Protocol | Agent-to-Agent task delegation and payment |
191
+ | Settlement | On-chain settlement finalization |
192
+ | Gas Sponsorship | ERC-4337 paymaster-based gas sponsorship |
193
+ | Solana Support | Cross-chain Solana bridging via CCTP |
194
+
195
+ ### Premium
189
196
 
190
- | Module | Import | What it does |
191
- |---|---|---|
192
- | Core | `agentwallet-sdk` | Wallet creation, spend limits, agent execution |
193
- | x402 | `agentwallet-sdk/x402` | Automatic API payment handling (HTTP 402) |
194
- | Bridge | `agentwallet-sdk/bridge` | CCTP V2 cross-chain USDC (17 chains) |
195
- | Swap | `agentwallet-sdk/swap` | Uniswap V3 token swaps @ **0.77% fee** |
196
- | Policy | `agentwallet-sdk/policy` | SpendingPolicy allowlists, rolling caps |
197
- | Identity | `agentwallet-sdk/identity` | Agent DID (W3C did:key) + Verifiable Credentials |
198
- | Staking | `agentwallet-sdk/staking` | Agent-only AAVE USDC yield pool |
199
- | Verify | `agentwallet-sdk/verify` | Trust bundle — DID + staking + reputation |
197
+ | Feature | Description |
198
+ |---------|-------------|
199
+ | CowSwap Solver | Batch auction solutions, earn COW tokens |
200
+ | Flash Executor | Atomic flash loan execution |
201
+ | MEV Protection | Private mempool via Flashbots/MEV Blocker |
202
+ | Yield Staking | Aave V3, Compound V3, Morpho Blue strategies |
203
+ | Tax Reporting | Cost basis and gain/loss reporting |
200
204
 
201
- ## vs. MoonPay Agents
205
+ Premium access: [github.com/up2itnow/AgentNexus2](https://github.com/up2itnow/AgentNexus2)
202
206
 
203
- MoonPay entered the agent wallet space with a managed offering. Here's why builders choose `agentwallet-sdk` instead:
207
+ ## Supported Chains
204
208
 
205
- | | agentwallet-sdk | MoonPay Agents |
206
- |---|---|---|
207
- | **Open source** | ✅ MIT licensed | ❌ Closed enterprise product |
208
- | **x402-native** | ✅ Built-in (v2.0.1+) | ❌ No x402 support |
209
- | **Key custody** | Agent holds own keys | MoonPay managed |
210
- | **KYC required** | ❌ None | ✅ KYC-gated |
211
- | **Vendor lock-in** | ❌ On-chain, permissionless | ✅ Platform-dependent |
212
- | **Cross-chain** | 17 chains via CCTP V2 | Limited |
213
- | **DID / identity** | ✅ W3C did:key standard | ❌ No |
209
+ Mainnet: Ethereum, Base, Arbitrum, Polygon, Optimism, Avalanche, BSC, Celo, Gnosis, Linea, Mantle, Scroll, and more.
214
210
 
215
- The difference isn't just technical. MoonPay Agents is a closed enterprise product — your agent's payment capability depends on MoonPay's platform staying available, compliant, and willing to serve you. `agentwallet-sdk` is open-source, x402-native, and permissionless. Your agent pays because it has keys, not because a vendor approved the transaction.
211
+ Testnet: Base Sepolia, Arbitrum Sepolia, and corresponding testnets.
216
212
 
217
- ## Resources
213
+ ## Links
218
214
 
219
- - [npm package](https://www.npmjs.com/package/agentwallet-sdk)
220
- - [Discord community](https://discord.gg/958AACqf7Y)
221
- - [x402 docs](https://docs.x402.org)
215
+ - [ERC-8004 Spec](https://eips.ethereum.org/EIPS/eip-8004)
216
+ - [GitHub](https://github.com/agentnexus/agent-wallet-sdk)
217
+ - [npm](https://www.npmjs.com/package/agentwallet-sdk)
222
218
 
223
219
  ## License
224
220