{"_id":"@defi-wonderland/interop-addresses","_rev":"3-034e18e7b78c6c222ea7a45d6b3525f8","name":"@defi-wonderland/interop-addresses","dist-tags":{"canary":"0.0.1","latest":"0.1.0","snapshot":"0.0.2"},"versions":{"0.0.1":{"name":"@defi-wonderland/interop-addresses","version":"0.0.1","author":{"name":"Wonderland"},"license":"MIT","_id":"@defi-wonderland/interop-addresses@0.0.1","maintainers":[{"name":"0xgorilla","email":"gori@wonderland.xyz"},{"name":"wonderland-bot","email":"alice@wonderland.xyz"},{"name":"turtlemoji","email":"turtlemoji@protonmail.com"}],"homepage":"https://github.com/defi-wonderland/interop-sdk#readme","bugs":{"url":"https://github.com/defi-wonderland/interop-sdk/issues"},"dist":{"shasum":"2cef275f90ef1b44b8268b76d38632d024dc8006","tarball":"https://registry.npmjs.org/@defi-wonderland/interop-addresses/-/interop-addresses-0.0.1.tgz","fileCount":198,"integrity":"sha512-zJz7sINilHgEx3vHmb/To9y/fckhrFZmj+q78oX5mWrASyO8fhfvwoW4ASOk+26UCKFC+PoxnCPiZgAyTgbjCg==","signatures":[{"sig":"MEQCIGYj8QE/swwv/MATkq9SnINfvvnXiAxHW9fw2C2QoXYeAiAm5+m3j2AwdCPNqO5ZP02T3sKJRp46GcPj+MN7BaKAqg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":266408},"main":"./dist/src/index.js","type":"module","types":"./dist/src/index.d.ts","gitHead":"0475b3b8bb8f2850bf5bb951d45b7cdb22b38b35","scripts":{"lint":"eslint \"{src,test}/**/*.{js,ts,json}\"","test":"vitest run --config vitest.config.ts --passWithNoTests","build":"tsc -p tsconfig.build.json","clean":"rm -rf dist/","format":"prettier --check \"{src,test}/**/*.{js,ts,json}\"","lint:fix":"pnpm lint --fix","test:cov":"vitest run --config vitest.config.ts --coverage","format:fix":"prettier --write \"{src,test}/**/*.{js,ts,json}\"","check-types":"tsc --noEmit -p ./tsconfig.json"},"_npmUser":{"name":"wonderland-bot","email":"alice@wonderland.xyz"},"repository":{"url":"git+https://github.com/defi-wonderland/interop-sdk.git","type":"git","directory":"packages/addresses"},"_npmVersion":"10.8.2","description":"A TypeScript library for handling interoperable blockchain addresses across different networks.","directories":{"src":"src"},"_nodeVersion":"20.19.4","dependencies":{"zod":"3.24.3","bs58":"6.0.0","viem":"2.28.0","axios":"1.9.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"5.5.4"},"_npmOperationalInternal":{"tmp":"tmp/interop-addresses_0.0.1_1753994282548_0.5423051031930757","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@defi-wonderland/interop-addresses","version":"0.0.2","author":{"name":"Wonderland"},"license":"MIT","_id":"@defi-wonderland/interop-addresses@0.0.2","maintainers":[{"name":"0xgorilla","email":"gori@wonderland.xyz"},{"name":"wonderland-bot","email":"alice@wonderland.xyz"},{"name":"turtlemoji","email":"turtlemoji@protonmail.com"}],"homepage":"https://github.com/defi-wonderland/interop-sdk#readme","bugs":{"url":"https://github.com/defi-wonderland/interop-sdk/issues"},"dist":{"shasum":"6cfbed6b2751c319b1fc545abc8cf111a6ac8a42","tarball":"https://registry.npmjs.org/@defi-wonderland/interop-addresses/-/interop-addresses-0.0.2.tgz","fileCount":198,"integrity":"sha512-cancivC4RvlPQP0/DP5sfag38Q+/nw7LqZI73Hl7CoHCf0tx1aILZCXJc9Ew8U7SIvHeTVlArNDQNaCu0GYJFg==","signatures":[{"sig":"MEYCIQD7M/HG5blz27eaVg1WTU3pmhf2DjouqieDActhTkb4nAIhALgf32QfhahVy72KiBlYXYTue4Bw0QHmuzooAbStlhGS","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@defi-wonderland%2finterop-addresses@0.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":266470},"main":"./dist/src/index.js","type":"module","types":"./dist/src/index.d.ts","gitHead":"3a9a8b2cbd2fcdca075273ae2994c04f7d4b109b","scripts":{"lint":"eslint \"{src,test}/**/*.{js,ts,json}\"","test":"vitest run --config vitest.config.ts --passWithNoTests","build":"tsc -p tsconfig.build.json","clean":"rm -rf dist/","format":"prettier --check \"{src,test}/**/*.{js,ts,json}\"","lint:fix":"pnpm lint --fix","test:cov":"vitest run --config vitest.config.ts --coverage","format:fix":"prettier --write \"{src,test}/**/*.{js,ts,json}\"","check-types":"tsc --noEmit -p ./tsconfig.json"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:d8708def-ba7d-4309-9d91-3655f5d55e0b"}},"repository":{"url":"git+https://github.com/defi-wonderland/interop-sdk.git","type":"git","directory":"packages/addresses"},"_npmVersion":"11.5.2","description":"Interoperable address utilities for cross-chain operations","directories":{"src":"src"},"_nodeVersion":"20.19.5","dependencies":{"zod":"3.24.3","bs58":"6.0.0","viem":"2.28.0","axios":"1.9.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"typescript":"5.5.4"},"_npmOperationalInternal":{"tmp":"tmp/interop-addresses_0.0.2_1762791475601_0.39552341925036916","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@defi-wonderland/interop-addresses","version":"0.1.0","description":"Interoperable address utilities for cross-chain operations","repository":{"type":"git","url":"git+https://github.com/defi-wonderland/interop-sdk.git","directory":"packages/addresses"},"license":"MIT","author":{"name":"Wonderland"},"type":"module","main":"./dist/src/index.js","types":"./dist/src/index.d.ts","directories":{"src":"src"},"scripts":{"build":"tsc -p tsconfig.build.json","check-types":"tsc --noEmit -p ./tsconfig.json","clean":"rm -rf dist/","format":"prettier --check \"{src,test}/**/*.{js,ts,json}\"","format:fix":"prettier --write \"{src,test}/**/*.{js,ts,json}\"","lint":"eslint \"{src,test}/**/*.{js,ts,json}\"","lint:fix":"pnpm lint --fix","test":"vitest run --config vitest.config.ts --passWithNoTests","test:cov":"vitest run --config vitest.config.ts --coverage"},"dependencies":{"axios":"1.9.0","bs58":"6.0.0","viem":"2.28.0","zod":"3.24.3"},"devDependencies":{"typescript":"5.5.4"},"_id":"@defi-wonderland/interop-addresses@0.1.0","gitHead":"5e6d70742d3b7363e6707217d4e5115283b028fe","bugs":{"url":"https://github.com/defi-wonderland/interop-sdk/issues"},"homepage":"https://github.com/defi-wonderland/interop-sdk#readme","_nodeVersion":"20.19.5","_npmVersion":"11.5.2","dist":{"integrity":"sha512-ovHyc3PmasugGwMx8SYkJZh7hGiFJeB1wVNEHrrygpkz2RYkxE8RSEvfqIA+Q/rOtriVbjjB8Nr1s8UiFf8+GQ==","shasum":"1d87b7e6c971d5c3b417bdde87b84ddebb93f6cd","tarball":"https://registry.npmjs.org/@defi-wonderland/interop-addresses/-/interop-addresses-0.1.0.tgz","fileCount":210,"unpackedSize":279819,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@defi-wonderland%2finterop-addresses@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBsZzmEI0/bl9a9LShW4T+QLHI7Flz1b0WzIm75ROtXFAiBgsGtmD3PeFJC4JDahJCpcZ1nkvsbfctvu0oCi62XOZg=="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:d8708def-ba7d-4309-9d91-3655f5d55e0b"}},"maintainers":[{"name":"0xgorilla","email":"gori@wonderland.xyz"},{"name":"wonderland-bot","email":"alice@wonderland.xyz"},{"name":"turtlemoji","email":"turtlemoji@protonmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/interop-addresses_0.1.0_1763135235748_0.20237978749667263"},"_hasShrinkwrap":false}},"time":{"created":"2025-07-31T20:38:02.437Z","modified":"2025-11-14T15:47:16.488Z","0.0.1":"2025-07-31T20:38:02.730Z","0.0.2":"2025-11-10T16:17:55.786Z","0.1.0":"2025-11-14T15:47:15.962Z"},"bugs":{"url":"https://github.com/defi-wonderland/interop-sdk/issues"},"author":{"name":"Wonderland"},"license":"MIT","homepage":"https://github.com/defi-wonderland/interop-sdk#readme","repository":{"type":"git","url":"git+https://github.com/defi-wonderland/interop-sdk.git","directory":"packages/addresses"},"description":"Interoperable address utilities for cross-chain operations","maintainers":[{"name":"0xgorilla","email":"gori@wonderland.xyz"},{"name":"wonderland-bot","email":"alice@wonderland.xyz"},{"name":"turtlemoji","email":"turtlemoji@protonmail.com"}],"readme":"# @interop-sdk/addresses\n\nA TypeScript library for handling interoperable blockchain addresses across different networks.\n\nThis package provides methods to convert between human-readable addresses and their binary string representation, both following the [ERC-7930](https://ethereum-magicians.org/t/erc-7930-interoperable-addresses/23365) and [ERC-7828](https://ethereum-magicians.org/t/erc-7828-chain-specific-addresses-using-ens/21930) standards. For backward compatibility with existing smart contracts, the package includes utilities to extract individual components (chainId and address) from the binary representation, allowing seamless integration with systems that haven't yet adopted the interop address format.\n\n## Setup\n\n1. Install dependencies running `pnpm install`\n\n## Available Scripts\n\nAvailable scripts that can be run using `pnpm`:\n\n| Script        | Description                                             |\n| ------------- | ------------------------------------------------------- |\n| `build`       | Build library using tsc                                 |\n| `check-types` | Check types issues using tsc                            |\n| `clean`       | Remove `dist` folder                                    |\n| `lint`        | Run ESLint to check for coding standards                |\n| `lint:fix`    | Run linter and automatically fix code formatting issues |\n| `format`      | Check code formatting and style using Prettier          |\n| `format:fix`  | Run formatter and automatically fix issues              |\n| `test`        | Run tests using vitest                                  |\n| `test:cov`    | Run tests with coverage report                          |\n\n## Usage\n\n```typescript\n// Using the Provider\nimport { InteropAddressProvider } from '@interop-sdk/addresses';\n\n// With checksum (recommended for sharing)\nconst humanReadableAddress = \"alice.eth@eip155:1#ABCD1234\"\nconst binaryAddress = await InteropAddressProvider.humanReadableToBinary(humanReadableAddress)\n\n// Or just importing the method\nimport { humanReadableToBinary } from '@interop-sdk/addresses';\nconst humanReadableAddress = \"alice.eth@eip155:1#ABCD1234\"\nconst binaryAddress = await humanReadableToBinary(humanReadableAddress)\n```\n\n## API\n\n### [InteropAddressProvider](./src/providers/InteropAddressProvider.ts)\n\nAvailable methods\n\n-   `humanReadableToBinary(humanReadableAddress: string)`\n-   `binaryToHumanReadable(binaryAddress: Hex)`\n-   `getChainId(humanReadableAddress | binaryAddress)`\n-   `getAddress(humanReadableAddress | binaryAddress)`\n-   `buildFromPayload(payload: InteropAddressFields)`\n-   `computeChecksum(humanReadableAddress: string)`\n\nAll methods are also exported as individual functions to allow maximum modularity and tree-shaking\n\n## References\n\n-   [ERC-7930: Interoperable Addresses - Fellowship of Ethereum Magicians](https://ethereum-magicians.org/t/erc-7930-interoperable-addresses/23365)\n-   [ERC-7828: Interoperable Names using ENS](https://ethereum-magicians.org/t/erc-7828-chain-specific-addresses-using-ens/21930)\n\n## ERC Compliance\n\nThis package implements:\n\n### ERC-7930 (Interoperable Addresses)\n\n-   ✅ Binary format with version, chain type, chain reference, and address\n-   ✅ Human-readable format: `<address>@<namespace>:<reference>#<checksum>`\n-   ✅ Checksum calculation (first 4 bytes of keccak256 hash)\n-   ✅ Support for zero-length addresses and chain references\n-   ✅ Versioning support\n\n### ERC-7828 (Interoperable Names using ENS)\n\n-   ✅ Optional checksums (required when sharing, optional when receiving)\n-   ✅ ENS name resolution for addresses (e.g., `alice.eth@eip155:1`)\n-   ✅ Validation: ENS names MUST include chain reference\n-   ✅ Context-aware error handling for ENS vs raw addresses\n-   ⚠️ ENS chain registry integration (pending - registry not yet deployed)\n\n### Not Yet Implemented\n\n-   ⏳ ENS chain label resolution (e.g., `address@ethereum` → resolves via ENS)\n-   ⏳ Reverse chain name lookup via ENS\n-   ⏳ Chain discovery via ENS registry (`chainCount`, `getChainAtIndex`)\n\nThe current SDK uses Across on testnet for demo purposes only. Performance may not reflect mainnet behavior and is not representative of the final production experience\n","readmeFilename":"README.md"}