{"bugs":{"url":"https://github.com/EthWorks/Waffle/issues"},"dist":{"shasum":"74eb0b5a1b5bc0ab1db6e534460b4f3b58c9ef9c","tarball":"https://registry.npmjs.org/@ethereum-waffle/ens/-/ens-4.0.3-dev.9bdd800.tgz","fileCount":66,"integrity":"sha512-HfXzNXAyWbBGl8R5Q0GRbhyQzU3/9dJIfjxQvU8nGQi03RSVYjScyhJ1ialY4C76V2b7tMPoMMhrxp+HxBKJ/w==","signatures":[{"sig":"MEUCIBOiLDM1ozNR99ksv1iEqDhnVk96Xg0++Lwc1lrb2xfSAiEAh3fUQyeY7MKAfrfUsJBe7tmnnbPvzpsWshh/4nXQp0A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2402874,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjOtPWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoG0g/+In9iTcEuuSiBqvzNTelepZwCqF2qH/yT3wL51Uwb1z3ViRta\r\n00TKNPQWjVIoJnxnnTXNkU5xVdQPXkaL8tlBGGgzcbI6X7XUaDhQ3RrcYDjU\r\n7ty8N8uROq/58XKlqSqsIn210R4yleeeRIMJ+VzeFmwcAqNSJUY+AGWMxl8N\r\nPudDZdOVY2Mc79mwLmRgC21V58ylMjth9Oshkt6OEIniLnAdVztAzv+r2d5J\r\nx5ZNbzULhq4mGrWONnwMuJfEB3KDirfzCr6Q5MbujK6dyGMOOUwED23SVW27\r\nMavUwAgRM0wDtvQSoVd/MNtiz0Pf/qlRDeY+oKz4LlG0tL8Eft7JHQA3WjKP\r\nlptaU3rAD14q0hTVN1LXkp5DL0cbeJuMujVqkqKpJ4X7YhSAmvbHJaAJxnh2\r\nLXIdwEVcnGOtr1bscONo/qu9Aguwk4oIMMYXlyRPRPTkiWKFCzGSzLcXinEa\r\nFb1L0XVP0muV6WlidX5o1QbByTZc//zrag1EQCxoar4Djtxzz/xmWgNxVB7J\r\nKZYlFdIt7y70zsNjRQktT87IZWZxT4U5KKhH/uobySnhoE9WWsMKu9L8+AX/\r\n610e5Kymc4jz7A/252Ai1qX5zVO6l4WaYHvtHfmcOpxGm2/O/vZJOTU4wn5Y\r\nNHrmy6ctBS5ZX+LIkA3iF3EE/OkbHwu07Ic=\r\n=4Db5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/src/index.js","name":"@ethereum-waffle/ens","_from":"file:ethereum-waffle-ens-4.0.3-dev.9bdd800.tgz","types":"dist/esm/src/index.d.ts","author":{"url":"http://ethworks.io","name":"Marek Kirejczyk","email":"account@ethworks.io"},"module":"dist/esm/src/index.ts","readme":"![CI](https://github.com/EthWorks/Waffle/workflows/CI/badge.svg)\n[![](https://img.shields.io/npm/v/@ethereum-waffle/ens.svg)](https://www.npmjs.com/package/@ethereum-waffle/ens)\n\n![Ethereum Waffle](https://raw.githubusercontent.com/EthWorks/Waffle/master/docs/source/logo.png)\n\n# @ethereum-waffle/ens\n\nA simple `ENS` for testing.\n\n## Installation\n\nIn the current version of waffle (v2.x.x) you will install this package as a dependency of the main waffle package - `ethereum-waffle`.\n\n```\nyarn add --dev ethereum-waffle\nnpm install --save-dev ethereum-waffle\n```\n\nIf you want to use this package directly, please install it via:\n```\nyarn add --dev @ethereum-waffle/ens\nnpm install --save-dev @ethereum-waffle/ens\n```\n\n## Feature overview\n\n**NOTE**: You do not need to use this package directly. You can install it through the main package (`ethereum-waffle`) and use it instead.\n\n### ENS\n\nThe `ENS` class allows to create ENS domains for testing.\n\nIt will deploy ENS smart contracts system to your test node.\n\nTo create `ENS`, you should submit your `wallet`, available in `MockProvider` class in package `@ethereum-waffle/provider`.\n\nYou can read more about ENS [in the ENS's documentation](https://docs.ens.domains/).\n\n### Examples:\nCreating ENS:\n```ts\nimport {MockProvider} from '@ethereum-waffle/provider';\nimport {deployENS, ENS} from '@ethereum-waffle/ens';\n\nconst provider = new MockProvider();\nconst [wallet] = provider.getWallets();\nconst ens: ENS = await deployENS(wallet);\n```\n\n### Usage\n\nUse `createTopLevelDomain` function to create a top level domain:\n\n```ts\nawait ens.createTopLevelDomain('test');\n```\n\nUse `createSubDomain` function for creating a sub domain:\n\n```ts\nawait ens.createSubDomain('ethworks.test');\n```\n\nAlso, it's possible to create a sub domain recursively, if the top domain doesn't exist, by specifying the appropriate option:\n\n```ts\nawait ens.createSubDomain('ethworks.tld', {recursive: true});\n```\n\nUse `setAddress` function for setting address for the domain:\n\n```ts\nawait ens.setAddress('vlad.ethworks.test', '0x001...03');\n```\nAlso, it's possible to set an address for the domain recursively, if the domain doesn't exist, by specifying the appropriate option:\n\n```ts\nawait ens.setAddress('vlad.ethworks.tld', '0x001...03', {recursive: true});\n```\n\nUse `setAddressWithReverse` function for setting address for the domain and make this domain reverse. Add recursive option if the domain doesn't exist:\n\n```ts\nawait ens.setAddressWithReverse('vlad.ethworks.tld', wallet, {recursive: true});\n```\n","engines":{"node":">=10.0"},"license":"MIT","private":false,"scripts":{"lint":"eslint '{src,test}/**/*.ts'","test":"mocha","build":"rimraf ./dist && pnpm build:artifacts && pnpm build:esm && pnpm build:cjs","lint:fix":"eslint --fix '{src,test}/**/*.ts'","build:cjs":"tsc -p tsconfig.build.json --outDir dist/cjs","build:esm":"tsc -p tsconfig.build.json --outDir dist/esm --module ES6","build:artifacts":"node build-artifacts.js"},"_npmUser":{"name":"ethworks","email":"code@trusttoken.com"},"homepage":"https://github.com/EthWorks/Waffle","keywords":["ethereum","smart-contracts","solidity","testing","javascript","typescript","library","ens"],"_resolved":"/tmp/a9c047dbce390b70400489a41bc8b477/ethereum-waffle-ens-4.0.3-dev.9bdd800.tgz","_integrity":"sha512-HfXzNXAyWbBGl8R5Q0GRbhyQzU3/9dJIfjxQvU8nGQi03RSVYjScyhJ1ialY4C76V2b7tMPoMMhrxp+HxBKJ/w==","repository":{"url":"git+ssh://git@github.com/EthWorks/Waffle.git","type":"git"},"_npmVersion":"8.15.0","description":"A mock ens implementation for testing.","directories":{},"maintainers":[{"name":"ethworks","email":"code@trusttoken.com"}],"_nodeVersion":"16.17.0","publishConfig":{"tag":"dev","access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"mocha":"^8.2.1","eslint":"^7.14.0","ethers":"5.6.2","rimraf":"^3.0.2","ganache":"7.4.3","typescript":"^4.6.2","@ensdomains/ens":"^0.4.4","@ensdomains/resolver":"^0.2.4"},"peerDependencies":{"ethers":"*"},"_npmOperationalInternal":{"tmp":"tmp/ens_4.0.3-dev.9bdd800_1664799702621_0.30782504023297275","host":"s3://npm-registry-packages"},"_id":"@ethereum-waffle/ens@4.0.3-dev.9bdd800","version":"4.0.3-dev.9bdd800"}