{"bugs":{"url":"https://github.com/EthWorks/Waffle/issues"},"dist":{"shasum":"92b6eb651607efe597976a189eab645d8b137ece","tarball":"https://registry.npmjs.org/@ethereum-waffle/ens/-/ens-4.0.0-dev.51e05d8.tgz","fileCount":20,"integrity":"sha512-wyrlQLn9lOc+IyUBhtDe6d7wZ7Bifj2tDFfVtJIHi4rQ1wItmIsvFTi/4UlS2EgKm0pLgiChqPlNNXr691luRw==","signatures":[{"sig":"MEUCIQCbCE1dy+5jFc2fs29mYlF5+4eUBPuJCMaFEFBDuLSGmgIgB4snMmL/KaiNkbGDgx48VGintVxgC8wjVefy6fZRk28=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":30493,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiYWNmACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrVMA//TkcDInvFBtLhOekSocw9a0KG+/QES9gdvnCjMoLK41SzbYB4\r\ndRuau1+NX3xvLHnDbaQUSZeai3B5M0wxK+p7ZDYP4QuGzjPFdtxSpOWuFgAQ\r\nMwXO6Sdk3W2bMTppn7Ro9M9tjphj1x2Njg0CERBCmhLHudClUlMFcF2VHknQ\r\nj07BQcSEBuVDnUIalMYajV7ZAuWtM87hwtM8/9Y1E7vqXI5OZxSl3KZrJe37\r\n933s6UoQJpiK9icgtoJTG0xQCJdd+RctWJn/eBmWPhOeExjhotI5uLpsg7RH\r\n5NBPKJxFsrzW2pgvtRodlQRJ9t1x3k0HVlksMIPQdv49y7ynliLzJGH/QI23\r\nylAg/HP9Mj4U7NmjgKVkKy2/HhFRopPJrlgpj89JdnjphBzrVE+noA4R7uUe\r\n25Z3vm3b0xDUXwaV4OVAYVtv6E8zGaQ5qDT28gEGe2Zr0EzNbCPR9HJb4Kk8\r\nkDlgiCpy4coyB268U2Vcp8RKcz7W+jkEhtObe/8KVOBmLMheHPOyTFiXTSJC\r\n5pnjeFsv+vzG1+DPGzTVQIoZfJXL1OJ8CTA3pz5X9Jzr9hB2ORUWCgz+nl3/\r\nY0P+MvOoC15uooI4DHlgmDjMUhDbYrcpP155w3FcBDmP5JDTsNMYp1hHKsqi\r\n4u5D1UlpZhORzfzapJUQQeBxQP97QTs2P4M=\r\n=FIu4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","name":"@ethereum-waffle/ens","_from":"file:ethereum-waffle-ens-4.0.0-dev.51e05d8.tgz","types":"dist/esm/index.d.ts","author":"Marek Kirejczyk <account@ethworks.io> (http://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 && yarn build:esm && yarn 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"},"_npmUser":{"name":"ethworks","email":"account@ethworks.io"},"homepage":"https://github.com/EthWorks/Waffle","keywords":["ethereum","smart-contracts","solidity","testing","javascript","typescript","library","ens"],"_resolved":"/home/runner/work/Waffle/Waffle/waffle-ens/ethereum-waffle-ens-4.0.0-dev.51e05d8.tgz","_integrity":"sha512-wyrlQLn9lOc+IyUBhtDe6d7wZ7Bifj2tDFfVtJIHi4rQ1wItmIsvFTi/4UlS2EgKm0pLgiChqPlNNXr691luRw==","repository":"git@github.com:EthWorks/Waffle.git","_npmVersion":"8.5.0","description":"A mock ens implementation for testing.","directories":{},"maintainers":[{"name":"ethworks","email":"account@ethworks.io"}],"_nodeVersion":"16.14.2","dependencies":{"ethers":"5.6.2","@ensdomains/ens":"^0.4.4","@ensdomains/resolver":"^0.2.4"},"publishConfig":{"tag":"dev","access":"public"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^8.2.1","eslint":"^7.14.0","rimraf":"^3.0.2","ganache":"^7.0.3","typescript":"^4.6.2"},"_npmOperationalInternal":{"tmp":"tmp/ens_4.0.0-dev.51e05d8_1650549606291_0.9224103175369036","host":"s3://npm-registry-packages"},"_id":"@ethereum-waffle/ens@4.0.0-dev.51e05d8","version":"4.0.0-dev.51e05d8"}