{"_id":"@ans-abstract-name-service/sdk","_rev":"10-1f0e898b400b72ad726674f89f6bcc92","name":"@ans-abstract-name-service/sdk","dist-tags":{"latest":"0.2.9"},"versions":{"0.2.0":{"name":"@ans-abstract-name-service/sdk","version":"0.2.0","license":"MIT","_id":"@ans-abstract-name-service/sdk@0.2.0","maintainers":[{"name":"0xshroomy","email":"avashroomy@gmail.com"}],"dist":{"shasum":"75426701fb9fb6d99ee8353fd420e554f7bab218","tarball":"https://registry.npmjs.org/@ans-abstract-name-service/sdk/-/sdk-0.2.0.tgz","fileCount":6,"integrity":"sha512-ONFe1OJhf8wzBTV66UDfZVizEa9gJLgyKH+Mrrmr54RiF/jRpIHVNuFMEQm4XXw7iS19HUfg5eMDtmWQMk7nwQ==","signatures":[{"sig":"MEQCIE2yiF/WGMd5RVMcn64QmoKpeQTbR2jzo5XOk9UgixAsAiAocao9Q2tJPajpFAZ4ql2nlM+fVwljiE0Tk83nZ7Y4xA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":108408},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"f97ee19030bcc403e424aced9a259a1e6b987a0c","scripts":{"build":"tsup src/index.ts --dts --format esm,cjs --clean","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"0xshroomy","email":"avashroomy@gmail.com"},"_npmVersion":"10.9.3","description":"Official SDK for ANS v2 on Abstract","directories":{},"sideEffects":false,"_nodeVersion":"22.20.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","typescript":"^5.7.3"},"peerDependencies":{"viem":"^2.38.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.2.0_1772110786407_0.08424041462380094","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@ans-abstract-name-service/sdk","version":"0.2.1","license":"MIT","_id":"@ans-abstract-name-service/sdk@0.2.1","maintainers":[{"name":"0xshroomy","email":"avashroomy@gmail.com"}],"dist":{"shasum":"ccf5906f5cf24e2a0989a9b36554131ebc28cf65","tarball":"https://registry.npmjs.org/@ans-abstract-name-service/sdk/-/sdk-0.2.1.tgz","fileCount":6,"integrity":"sha512-puSxxcQZd0hYTOrA+nGibAoD+RND71SMSPBNNFmmr0uVWTitp1eGSOQvQiguVm2zENeFOaeshXxcU/+uBwdxEw==","signatures":[{"sig":"MEYCIQDtPnXu5/EphiKLd+kwdWGKnPBoHBmGcrkhp2csofNi6wIhAOaxaCDres/TiWdCAw6dMPRObDsC1fYvlA7brU/WP9f9","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":108322},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"f97ee19030bcc403e424aced9a259a1e6b987a0c","scripts":{"build":"tsup src/index.ts --dts --format esm,cjs --clean","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"0xshroomy","email":"avashroomy@gmail.com"},"_npmVersion":"10.9.3","description":"Official SDK for ANS v2 on Abstract","directories":{},"sideEffects":false,"_nodeVersion":"22.20.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","typescript":"^5.7.3"},"peerDependencies":{"viem":"^2.38.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.2.1_1772111824782_0.16129484416787254","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@ans-abstract-name-service/sdk","version":"0.2.2","license":"MIT","_id":"@ans-abstract-name-service/sdk@0.2.2","maintainers":[{"name":"0xshroomy","email":"avashroomy@gmail.com"}],"dist":{"shasum":"9ebd013081915d778a5e5ace20038973d55a87ac","tarball":"https://registry.npmjs.org/@ans-abstract-name-service/sdk/-/sdk-0.2.2.tgz","fileCount":6,"integrity":"sha512-dm4W5J2HHDkq1XdZSOyEQcQpJ2TGyPMjJ3XnVcCHZ22qjac2+vbE/nvAisITIie6wcQ1q1v7iE5oiiQkNqXgcw==","signatures":[{"sig":"MEUCIQDu7zaescLMaJBhQZrVW2cIJgk2YXcRgmL5MPXoZxM4aQIgHG9yDlDDMBetXu3gKj2GZJZAuQh1tQJE11zc8zXudqs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":109656},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"7e791dc7992a63a9874f63667d3e3e9fb73dd138","scripts":{"build":"tsup src/index.ts --dts --format esm,cjs --clean","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"0xshroomy","email":"avashroomy@gmail.com"},"_npmVersion":"9.8.1","description":"Official SDK for ANS v2 on Abstract","directories":{},"sideEffects":false,"_nodeVersion":"18.18.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","typescript":"^5.7.3"},"peerDependencies":{"viem":"^2.38.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.2.2_1772124688128_0.7348338661793736","host":"s3://npm-registry-packages-npm-production"}},"0.2.3":{"name":"@ans-abstract-name-service/sdk","version":"0.2.3","license":"MIT","_id":"@ans-abstract-name-service/sdk@0.2.3","maintainers":[{"name":"0xshroomy","email":"avashroomy@gmail.com"}],"dist":{"shasum":"0293e50c21dbf6df9a29da7212fcb8f97c4b7e22","tarball":"https://registry.npmjs.org/@ans-abstract-name-service/sdk/-/sdk-0.2.3.tgz","fileCount":6,"integrity":"sha512-Fi1h5dhfQVeUEHkYBzzWSV5zXDeYJxp98JlGf60SyqxmszhwpY7R6TKIhimPhMykBDeV5kkY995iLEu4CHlrNg==","signatures":[{"sig":"MEUCIQDzDthqlylCKRUU2J0o1EXyD1dOLH6JSqhKmtnHBeBZZQIgYlB/DqySlSB7++7vo8jTMeOqYhnjJO3tjEj00okLH88=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":113371},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"ac97d6d3ca4e82d09ef6d6bc4ce2e39ee55d6da5","scripts":{"build":"tsup src/index.ts --dts --format esm,cjs --clean","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"0xshroomy","email":"avashroomy@gmail.com"},"_npmVersion":"11.6.2","description":"Official SDK for ANS v2 on Abstract","directories":{},"sideEffects":false,"_nodeVersion":"25.2.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","typescript":"^5.7.3"},"peerDependencies":{"viem":"^2.38.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.2.3_1772884467621_0.9895525898579998","host":"s3://npm-registry-packages-npm-production"}},"0.2.4":{"name":"@ans-abstract-name-service/sdk","version":"0.2.4","license":"MIT","_id":"@ans-abstract-name-service/sdk@0.2.4","maintainers":[{"name":"0xshroomy","email":"avashroomy@gmail.com"}],"dist":{"shasum":"7d5dd4e21d45b33e63bcc525996fd5807f912c69","tarball":"https://registry.npmjs.org/@ans-abstract-name-service/sdk/-/sdk-0.2.4.tgz","fileCount":6,"integrity":"sha512-0quabWMSfot34YK/C25fkUK8vB2K5WIyCiqpxhCQdza/vYS5a9cB8ezZbNhL9MR1oTsQc3YyrAriUukBTmGW/w==","signatures":[{"sig":"MEUCIGZNyL5rPhsqLEvGZxpHl/8T3WHo88yeEQNEA+yZWu8/AiEAulgV3gJSpxYW96Q8leHce6Isnpkc3wbc5WUkcN/SceY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":114149},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"ac97d6d3ca4e82d09ef6d6bc4ce2e39ee55d6da5","scripts":{"build":"tsup src/index.ts --dts --format esm,cjs --clean","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"0xshroomy","email":"avashroomy@gmail.com"},"_npmVersion":"11.6.2","description":"Official SDK for ANS v2 on Abstract","directories":{},"sideEffects":false,"_nodeVersion":"25.2.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","typescript":"^5.7.3"},"peerDependencies":{"viem":"^2.38.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.2.4_1772884914199_0.9331739651394659","host":"s3://npm-registry-packages-npm-production"}},"0.2.5":{"name":"@ans-abstract-name-service/sdk","version":"0.2.5","license":"MIT","_id":"@ans-abstract-name-service/sdk@0.2.5","maintainers":[{"name":"0xshroomy","email":"avashroomy@gmail.com"}],"dist":{"shasum":"d8fae36a9181ccb31c967aebbc595173773d1ad9","tarball":"https://registry.npmjs.org/@ans-abstract-name-service/sdk/-/sdk-0.2.5.tgz","fileCount":6,"integrity":"sha512-cJ6UF7GDytOBQYCGq5e5s5+0bCXk8wMKmUNKE+RorXrdZr+ujuuZViWym9KuuNY5umd7Umf+4NhgR7A6NeexHQ==","signatures":[{"sig":"MEUCIQCvnLgVdbx2nRWsGoLbNlX2Qnu3QnrdVrm/Gr/j9AgaewIgFU+ZJWX50UgDTAzDQI9jXhBvkEl/Y6loc3htWTAl6W0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":114149},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"ac97d6d3ca4e82d09ef6d6bc4ce2e39ee55d6da5","scripts":{"build":"tsup src/index.ts --dts --format esm,cjs --clean","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"0xshroomy","email":"avashroomy@gmail.com"},"_npmVersion":"11.6.2","description":"Official SDK for ANS v2 on Abstract","directories":{},"sideEffects":false,"_nodeVersion":"25.2.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","typescript":"^5.7.3"},"peerDependencies":{"viem":"^2.38.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.2.5_1772885184809_0.22848994789182875","host":"s3://npm-registry-packages-npm-production"}},"0.2.6":{"name":"@ans-abstract-name-service/sdk","version":"0.2.6","license":"MIT","_id":"@ans-abstract-name-service/sdk@0.2.6","maintainers":[{"name":"0xshroomy","email":"avashroomy@gmail.com"}],"dist":{"shasum":"933da4e94ed1db94a8574111519b645d5488891d","tarball":"https://registry.npmjs.org/@ans-abstract-name-service/sdk/-/sdk-0.2.6.tgz","fileCount":6,"integrity":"sha512-PKr4IeFOp8Pw/eozV3pHv2KhMJV9yYQbl7g4lS4ne52x+SMHEK+Veg31ZapHK65ekxgdUvGVXc4pv7tnrp/mfw==","signatures":[{"sig":"MEQCIGU4bshh/FawGV+4YeHTzxJ2wlgxKOgjPsZMzIDg3FMlAiBRMsS1tEk0oot2agpH1rjCBHrglcSToYgQu4F2iP6kWw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":136479},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"f9eefe1e195e2a67c31617a4d056f417ef9300a2","scripts":{"build":"tsup src/index.ts --dts --format esm,cjs --clean","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"0xshroomy","email":"avashroomy@gmail.com"},"_npmVersion":"11.6.2","description":"Official SDK for ANS v2 on Abstract","directories":{},"sideEffects":false,"_nodeVersion":"25.2.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","typescript":"^5.7.3"},"peerDependencies":{"viem":"^2.38.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.2.6_1772911003091_0.01991352192630469","host":"s3://npm-registry-packages-npm-production"}},"0.2.7":{"name":"@ans-abstract-name-service/sdk","version":"0.2.7","license":"MIT","_id":"@ans-abstract-name-service/sdk@0.2.7","maintainers":[{"name":"0xshroomy","email":"avashroomy@gmail.com"}],"dist":{"shasum":"d954bca502559f3a4a43012049aeab06966b3a15","tarball":"https://registry.npmjs.org/@ans-abstract-name-service/sdk/-/sdk-0.2.7.tgz","fileCount":6,"integrity":"sha512-Re3zprOrcBBbKKdJN0CRhiUw17eNlnwE3WnY89qD7rDmFz6YmFNQXENNOPvHVQrI7w6yLSPj8qJStEwq3+NlKA==","signatures":[{"sig":"MEUCIBxzmHl4Xi8XipGoTlPDlc+BndchkqPBxOA7ptpdqt7LAiEArbfQ0Gk99/LqRHXG8s2/uI/gAEBM5dPLyj9oQMpkfNs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":139093},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"e5e99b878e44f52a2f7a074c8020c5a39114d87f","scripts":{"build":"tsup src/index.ts --dts --format esm,cjs --clean","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"0xshroomy","email":"avashroomy@gmail.com"},"_npmVersion":"10.9.3","description":"Official SDK for ANS v2 on Abstract","directories":{},"sideEffects":false,"_nodeVersion":"22.20.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","typescript":"^5.7.3"},"peerDependencies":{"viem":"^2.38.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.2.7_1775738182547_0.31055108479578464","host":"s3://npm-registry-packages-npm-production"}},"0.2.8":{"name":"@ans-abstract-name-service/sdk","version":"0.2.8","keywords":["abstract","ans","domains","web3","sdk","viem"],"license":"MIT","_id":"@ans-abstract-name-service/sdk@0.2.8","maintainers":[{"name":"0xshroomy","email":"avashroomy@gmail.com"}],"homepage":"https://github.com/0xShroomy/ANS-Abstract-Name-Service/tree/main/packages/ans-sdk","bugs":{"url":"https://github.com/0xShroomy/ANS-Abstract-Name-Service/issues"},"dist":{"shasum":"bfd81ac158eba62af65eb692960b34c66a3b0bf2","tarball":"https://registry.npmjs.org/@ans-abstract-name-service/sdk/-/sdk-0.2.8.tgz","fileCount":6,"integrity":"sha512-DVhcnU9IgpJhO3S27EPxnMcj0L3KFce1LW9CePLCDJuV2SJ6A4t0h87Y/payo0Jdf50DLmDSnD2h8FQSr033Ug==","signatures":[{"sig":"MEUCIDn2wFJiRdyj0PulBU7iM4alKrIcdQ+wmtxUER13cmUMAiEAwYCqC6IrzSFo+ZN7P4lj1HzalBHdi30m45EosUDGai8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":139585},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"e5e99b878e44f52a2f7a074c8020c5a39114d87f","scripts":{"build":"tsup src/index.ts --dts --format esm,cjs --clean","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"0xshroomy","email":"avashroomy@gmail.com"},"repository":{"url":"git+https://github.com/0xShroomy/ANS-Abstract-Name-Service.git","type":"git","directory":"packages/ans-sdk"},"_npmVersion":"10.9.3","description":"Official SDK for ANS v2 on Abstract","directories":{},"sideEffects":false,"_nodeVersion":"22.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","typescript":"^5.7.3"},"peerDependencies":{"viem":"^2.38.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.2.8_1775738332703_0.8056791540182973","host":"s3://npm-registry-packages-npm-production"}},"0.2.9":{"name":"@ans-abstract-name-service/sdk","version":"0.2.9","description":"Official SDK for ANS v2 on Abstract","license":"MIT","type":"module","homepage":"https://github.com/0xShroomy/ANS-Abstract-Name-Service/tree/main/packages/ans-sdk","repository":{"type":"git","url":"git+https://github.com/0xShroomy/ANS-Abstract-Name-Service.git","directory":"packages/ans-sdk"},"bugs":{"url":"https://github.com/0xShroomy/ANS-Abstract-Name-Service/issues"},"keywords":["abstract","ans","domains","web3","sdk","viem"],"main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"publishConfig":{"access":"public"},"sideEffects":false,"scripts":{"build":"tsup src/index.ts --dts --format esm,cjs --clean","typecheck":"tsc --noEmit","prepack":"node scripts/sync-package-readme.cjs apply","postpack":"node scripts/sync-package-readme.cjs restore","prepublishOnly":"npm run build"},"peerDependencies":{"viem":"^2.38.0"},"devDependencies":{"tsup":"^8.5.0","typescript":"^5.7.3"},"_id":"@ans-abstract-name-service/sdk@0.2.9","gitHead":"e5e99b878e44f52a2f7a074c8020c5a39114d87f","_nodeVersion":"22.20.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-aB3mpiwLEKkAimmh2Th8WjYKu4+mx3ZNEHR35DSO4P8ZpGhsiRsGont2ZOPbc02BuFUwpyUb6ApGFtiBfyV0og==","shasum":"447cd342e63748f7b8dcf52151063845f0726adf","tarball":"https://registry.npmjs.org/@ans-abstract-name-service/sdk/-/sdk-0.2.9.tgz","fileCount":6,"unpackedSize":148154,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGjVspIGNT8WN5UPgI9IKnaIZM+1NPxMYqA+gdC0GpJcAiAvKNvm/RTATkqI8fIX7/8BFhbz9SP5+iSoYgygn9JZ7Q=="}]},"_npmUser":{"name":"0xshroomy","email":"avashroomy@gmail.com"},"directories":{},"maintainers":[{"name":"0xshroomy","email":"avashroomy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk_0.2.9_1775739153748_0.32057107921482153"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-26T12:59:46.301Z","modified":"2026-04-09T12:52:34.074Z","0.2.0":"2026-02-26T12:59:46.556Z","0.2.1":"2026-02-26T13:17:04.926Z","0.2.2":"2026-02-26T16:51:28.279Z","0.2.3":"2026-03-07T11:54:27.798Z","0.2.4":"2026-03-07T12:01:54.366Z","0.2.5":"2026-03-07T12:06:24.944Z","0.2.6":"2026-03-07T19:16:43.253Z","0.2.7":"2026-04-09T12:36:22.734Z","0.2.8":"2026-04-09T12:38:52.857Z","0.2.9":"2026-04-09T12:52:33.914Z"},"bugs":{"url":"https://github.com/0xShroomy/ANS-Abstract-Name-Service/issues"},"license":"MIT","homepage":"https://github.com/0xShroomy/ANS-Abstract-Name-Service/tree/main/packages/ans-sdk","keywords":["abstract","ans","domains","web3","sdk","viem"],"repository":{"type":"git","url":"git+https://github.com/0xShroomy/ANS-Abstract-Name-Service.git","directory":"packages/ans-sdk"},"description":"Official SDK for ANS v2 on Abstract","maintainers":[{"name":"0xshroomy","email":"avashroomy@gmail.com"}],"readme":"# @ans-abstract-name-service/sdk\n\nOfficial TypeScript SDK for ANS v2 on Abstract.\n\n## What This SDK Covers\n\n- Contract reads: resolve names, records, reverse lookup, owner domains, pricing, subdomain root config.\n- Contract writes: registration (price-update flows only), coupon registration, record updates, text records, transfer, migration.\n- Event watchers: `DomainRegistered`, `DomainTransferred`, `RecordSet`, `TextRecordSet`.\n- Pyth helpers: fetch matched latest price + update payloads from Hermes.\n- Revert decoding: convert ANS custom errors into readable app messages.\n- Prepare-only helper: return calldata, args, and payable value before signing.\n- Coupon helpers: validate coupon status and build coupon-aware registration quotes.\n\n## Supported Registration Methods\n\nANS pricing is oracle-driven and requires a price update payload.\n\n- `registerWithPriceUpdate(name, priceUpdateData)`\n- `registerWithCouponAndPriceUpdate(name, couponCode, priceUpdateData)`\n\n## Install\n\n```bash\nnpm install @ans-abstract-name-service/sdk viem\n```\n\n```bash\npnpm add @ans-abstract-name-service/sdk viem\n```\n\n```bash\nyarn add @ans-abstract-name-service/sdk viem\n```\n\n## Requirements\n\n- Node.js 18+\n- `viem` 2.38+\n- Abstract mainnet RPC\n- Wallet provider for writes (for example `window.ethereum`)\n\n## Backend Private-Key Note\n\n- For backend/private-key signing, pass a viem `Account` object (for example `privateKeyToAccount(...)`) to write calls, not only an address string.\n- This forces raw signed transaction flow (`eth_sendRawTransaction`) and avoids 403 RPC errors like `\"rpc method is not whitelisted\"`.\n\n## Pyth Oracle Configuration\n\nANS V2 registration pricing uses Pyth ETH/USD. The SDK ships with the same defaults used in ANS deployment:\n\n- Hermes URL: `https://hermes.pyth.network` (`DEFAULT_PYTH_HERMES_URL`)\n- ETH/USD Price ID: `0xff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace` (`DEFAULT_PYTH_ETH_USD_PRICE_ID`)\n\nExample before register:\n\n```ts\nimport {\n  fetchPythLatestUpdate,\n  DEFAULT_PYTH_ETH_USD_PRICE_ID,\n} from \"@ans-abstract-name-service/sdk\";\n\nconst latestUpdate = await fetchPythLatestUpdate(DEFAULT_PYTH_ETH_USD_PRICE_ID);\nconst priceUpdateData = latestUpdate.updateData;\n\nconst quote = await ans.quoteRegisterValue({\n  name: \"newname.abs\",\n  account,\n  priceUpdateData,\n});\n```\n\nIf you override `priceId`, make sure it matches the on-chain oracle feed configured for ANS V2.\n\n## Quick Start (Vite)\n\n```ts\nimport { createAnsClient, fetchPythUpdateData } from \"@ans-abstract-name-service/sdk\";\nimport {\n  createPublicClient,\n  createWalletClient,\n  custom,\n  defineChain,\n  http,\n} from \"viem\";\n\nconst abstract = defineChain({\n  id: 2741,\n  name: \"Abstract\",\n  nativeCurrency: { name: \"ETH\", symbol: \"ETH\", decimals: 18 },\n  rpcUrls: { default: { http: [\"https://api.mainnet.abs.xyz\"] } },\n});\n\nconst publicClient = createPublicClient({ chain: abstract, transport: http() });\nconst walletClient = createWalletClient({ chain: abstract, transport: custom(window.ethereum) });\n\nconst ans = createAnsClient({ publicClient, walletClient });\n```\n\n## Read Examples\n\n```ts\nconst owner = await ans.resolve(\"luca.abs\");\nconst record = await ans.getRecord(\"luca.abs\");\nconst avatar = await ans.getTextRecord(\"luca.abs\", \"avatar\");\nconst reverse = await ans.getNameByAddress(\"0x1234...abcd\");\nconst domains = await ans.getDomainsByOwner(\"0x1234...abcd\");\nconst allNames = await ans.getAllNames();\nconst roots = await ans.getSubdomainRoots();\nconst available = await ans.isNameAvailable(\"fresh.abs\");\n```\n\n## Registration Flow (Pyth Update Required)\n\n```ts\nconst [account] = await walletClient.getAddresses();\n\n// 1) Fetch the latest matched oracle price + update payload (Hermes)\nconst latestUpdate = await fetchPythLatestUpdate();\nconst priceUpdateData = latestUpdate.updateData;\n\n// 2) Quote total value (registration + required pyth fee)\nconst quote = await ans.quoteRegisterValue({\n  name: \"newname.abs\",\n  account,\n  priceUpdateData,\n});\n\n// 3) Submit supported registration tx\nconst txHash = await ans.registerWithPriceUpdate({\n  name: \"newname.abs\",\n  priceUpdateData,\n  value: quote.total,\n  account,\n});\n\n// 4) Wait for confirmation\nawait ans.waitForReceipt(txHash);\n```\n\n## Prepare Transaction Without Signing\n\n```ts\nconst prepared = await ans.prepareRegisterTransaction({\n  name: \"newname.abs\",\n  account,\n  priceUpdateData,\n});\n\nconsole.log(prepared.functionName);\nconsole.log(prepared.args);\nconsole.log(prepared.data);\nconsole.log(prepared.value.toString());\n```\n\nThis is useful when your app, agent, or backend wants the SDK to build registration calldata and\nthe exact required value first, while execution still happens elsewhere.\n\n## Coupon + Price Update Flow\n\n```ts\nconst quote = await ans.quoteRegisterValue({\n  name: \"newname.abs\",\n  account,\n  couponCode: \"SAVE10\",\n  priceUpdateData,\n});\n\nconst prepared = await ans.prepareRegisterTransaction({\n  name: \"newname.abs\",\n  account,\n  couponCode: \"SAVE10\",\n  priceUpdateData,\n});\n\nconst txHash = await ans.registerWithCouponAndPriceUpdate({\n  name: \"newname.abs\",\n  couponCode: \"SAVE10\",\n  priceUpdateData,\n  value: quote.total,\n  account,\n});\n\nawait ans.waitForReceipt(txHash);\n```\n\nWhen a valid coupon applies, `quoteRegisterValue()` and `prepareRegisterTransaction()` automatically\nswitch to the coupon-adjusted total and return `registerWithCouponAndPriceUpdate` calldata.\n\n## Records and Profile Data\n\n```ts\nawait ans.setRecord({\n  name: \"luca.abs\",\n  record: \"0xabc...def\",\n  account,\n});\n\nawait ans.setTextRecord({\n  name: \"luca.abs\",\n  key: \"twitter\",\n  value: \"@handle\",\n  account,\n});\n```\n\nAllowed text keys are:\n\n- `twitter`\n- `discord`\n- `avatar`\n- `url`\n- `email`\n\n## Other Write Methods\n\n```ts\nawait ans.transferDomain({ name: \"luca.abs\", to: \"0x...\", account });\nawait ans.migrateFromOldContract({ oldTokenId: 123n, newName: \"luca.abs\", account });\n```\n\n## Events / Indexing\n\n```ts\nconst unwatch = ans.watchDomainRegistered((logs) => {\n  console.log(\"new domains\", logs);\n});\n\n// later\nunwatch();\n```\n\nAlso available:\n\n- `watchDomainTransferred`\n- `watchRecordSet`\n- `watchTextRecordSet`\n\n## Error Handling\n\n```ts\nimport { decodeAnsContractError } from \"@ans-abstract-name-service/sdk\";\n\ntry {\n  // write call...\n} catch (error) {\n  const parsed = decodeAnsContractError(error);\n  console.error(parsed.code, parsed.message);\n}\n```\n\n## Price and Discount Notes\n\n- `price(name)` is sender-sensitive in ANS (discount logic checks caller holdings).\n- `quoteRegisterValue()` and `prepareRegisterTransaction()` no longer rely on a raw on-chain `price(name)` preflight. They compute the registration price from the same length/root/discount rules as the contract and then add the live Pyth update fee.\n- Always pass the real user wallet as `account` when quoting via `quoteRegisterValue`.\n- `couponCode` is optional on `quoteRegisterValue()` and `prepareRegisterTransaction()`.\n- `priceUpdateData` must be non-empty for SDK registration flows.\n\n## Troubleshooting\n\n- `403 \"rpc method is not whitelisted\"` usually means the call tried `eth_sendTransaction` on a restricted public RPC. For backend/private-key writes, pass an `Account` object so viem signs locally and sends via `eth_sendRawTransaction`.\n\n## API Surface\n\nCore methods from `createAnsClient`:\n\n- Reads: `resolve`, `getRecord`, `getTextRecord`, `getNameByAddress`, `getDomainsByOwner`, `getAllNames`, `isNameAvailable`, `getPrice`, `getSubdomainRoot`, `getSubdomainRoots`, `getPythUpdateFee`, `quoteRegisterValue`\n- Writes: `registerWithPriceUpdate`, `registerWithCouponAndPriceUpdate`, `setRecord`, `setTextRecord`, `transferDomain`, `migrateFromOldContract`\n- Utilities: `prepareRegisterTransaction`, `waitForReceipt`, event watchers\n\nTop-level exports also include:\n\n- `fetchPythLatestUpdate`, `fetchPythUpdateData`, `fetchPythPriceInfo`\n- coupon helpers: `normalizeCouponCode`, `assertCouponUsable`, `applyCouponDiscount`\n- `decodeAnsContractError`\n- name helpers: `normalizeName`, `validateName`\n- constants: `ABSTRACT_MAINNET_CHAIN_ID`, `DEFAULT_ANS_V2_CONTRACT_ADDRESS`\n","readmeFilename":"README.md"}