{"bugs":{"url":"https://github.com/EthWorks/Waffle/issues"},"dist":{"shasum":"f1577c2872d05955c8ca1d7e9a028e2f41511666","tarball":"https://registry.npmjs.org/@ethereum-waffle/ens/-/ens-4.0.0-alpha.22.tgz","fileCount":39,"integrity":"sha512-+kzLoTwuPqjDvaWjpN+avkRk1TGag9QGw5hmGffB8NB6f4GHlHTbCq2A/rj10ERBN9SW+IROM3I+ygdAOPeqGQ==","signatures":[{"sig":"MEQCIAzKRWCejx6FvNDIRT5X9lEQeQkuhM2zgD+2ba9cRK1CAiA8asyQwTkM3v3/ZHC/Mpkf7PAs1mXFQPFjr77O7rqbMg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2302844,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi1oWpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoa0A/9Gy1aXi8aIOX046uceE8dW52Q//M/s3jK2LlWnx/mtmig95xE\r\nVV7r+LPzqpjKGwBHomwd5Z6/kwWA4xT/FXG/BN90scmV1w/oP2YdA6vHjWWr\r\nwsKjf/SrEQ43dow2REx07Rs3aKyD25ezrVfdbyWgVkQM+OGhVXwvW6DrnX2H\r\nc5g6Awv35OfsY7ynQPOlwvItjLdcSrKzDvTEyHs9HyIrEPw1d1yRFyMwMbpX\r\nZonWR5rJa7GGVrikJBYk5OIeVzv/EM0h4+C0QP3IvMn30BypN+MQf3AuaPKY\r\n3wQcFo79phPW5CcWEelZscX/50mFmkxOD+lBIPDCflS7usa1OC9V+nYYgmuh\r\nDtfF09J9dgquQpPFz+sCpz2nfvUaVt7DiY5tszqApBoRGJjvF8Ag4Xd3sJIh\r\nSSzvV1V/JAPRCXfl+TmHFWMB32BG6CE+ctFMbM0HaG16H+eHGGoI2Ufo47FD\r\nwONtvHrBmwwNmYtpjj8j5VvF/5ddpRWR0ruqv4lR+qNkgv+oYJjk8jJwUxIY\r\nzKEXb3CimzGb2M366viDBb9yrZbt/JyN+BdUF3eTHqhdQR/99c+7v+qZBkVe\r\nhU3/vjwPfRmzkjdrJxI1hQ6vjNOZGnkrSjH9JzKspToxN2MH5WQuG4qF/ZPX\r\nBkXvL1ZVi+iXK/h+jutYeK7yQbNVVxZZfCQ=\r\n=oF82\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","name":"@ethereum-waffle/ens","_from":"file:ethereum-waffle-ens-4.0.0-alpha.22.tgz","types":"dist/esm/index.d.ts","author":{"url":"http://ethworks.io","name":"Marek Kirejczyk","email":"account@ethworks.io"},"module":"dist/esm/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 --declaration false","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/061377aaabd7c050064be9c370b97eea/ethereum-waffle-ens-4.0.0-alpha.22.tgz","_integrity":"sha512-+kzLoTwuPqjDvaWjpN+avkRk1TGag9QGw5hmGffB8NB6f4GHlHTbCq2A/rj10ERBN9SW+IROM3I+ygdAOPeqGQ==","repository":{"url":"git+ssh://git@github.com/EthWorks/Waffle.git","type":"git"},"_npmVersion":"8.11.0","description":"A mock ens implementation for testing.","directories":{},"maintainers":[{"name":"ethworks","email":"code@trusttoken.com"}],"_nodeVersion":"16.16.0","dependencies":{"ethers":"5.6.2"},"publishConfig":{"tag":"alpha","access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"mocha":"^8.2.1","eslint":"^7.14.0","rimraf":"^3.0.2","ganache":"^7.0.3","typescript":"^4.6.2","@ensdomains/ens":"^0.4.4","@ensdomains/resolver":"^0.2.4"},"_npmOperationalInternal":{"tmp":"tmp/ens_4.0.0-alpha.22_1658226089159_0.018703337959376398","host":"s3://npm-registry-packages"},"_id":"@ethereum-waffle/ens@4.0.0-alpha.22","version":"4.0.0-alpha.22"}