{"bugs":{"url":"https://github.com/EthWorks/Waffle/issues"},"dist":{"shasum":"262c9908edc9cef5b5cd343cf869d628346c9385","tarball":"https://registry.npmjs.org/@ethereum-waffle/ens/-/ens-4.0.2-dev.b96f0af.tgz","fileCount":39,"integrity":"sha512-tI7wtQZwCb5aLrxoQXJvKIi7UeQat+P0+KDmkfq9Zh1xKn/wAQ6T2MQpqqjYjMbMjYpMLF5GGqAVXexgU4O2fQ==","signatures":[{"sig":"MEYCIQDUZBbvWhS6LmeoNpsScRddROMx43Xaq8fPGdop0Nx83AIhALC3vBzrfydRX9DvH2Fr0AMJK2QAqCv4FmvYLxNa3bGT","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\nwsFzBAEBCAAGBQJjDcnuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrJMg//ebgh10HBT1VwPRHExi8M2DqZDh83W5yQES23etAdQ1d0NPAS\r\nHnRpEPhrCRx3qEaIgE5Ieu+PW1bzp0ZZkAl2R1q5fl6IfKNq3QfmiCf/J6Wa\r\nlpcYItQ1em6BNttFEoqHfbXqPMdk0gJnsAWP/7a4fDscrW38psBAlfct4t77\r\n5EjbTf3C6Fbfsl8po9twUddrwoDuWi1Bvp03VifcjC+L01JFYLrxsnEzlw/n\r\nGWf8YYAWTDolSyPqxGU/EsT5vp7f2zZ0HWDf5dpkDsLE3b0C7dkywzbKCf1U\r\n4Ymc8RBD17l7FJVFGdhhP+CMgZbMaKOFATwvsVHNCCwzTGSwQQ9Rocfcmpu1\r\nOJoVPTtjViuTji/E/eC7VQ5Yii1xs4EsTpn/qzWGmBlv95QWhOI7RZ1ww1no\r\n+SvNIsUIIKeTbqwmn5Yqz6e00+1WC9i2H44Y6g2CQTTlI8V2JKLzmp6kfG5K\r\npMD4/1rPdiuvBASwSVtzdtrZFXw65ah+NJ6ZNTocy1crMcMLaAVTDRncEwwI\r\nDtRmj+8xKs3YkB493wB8x8Hw7B7rH7cmUAslpLg6swpOGLpQfd4mLuffKYX3\r\nqzUFgsTGvAu+Z9Yy8fnoBgP34h19OKSPo20o6zpfGf8NRBfJciKyUgVE+4RH\r\n+6WTl+JFR9mDdH3IhTokPKAjriG/EHUtyb8=\r\n=h6/x\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","name":"@ethereum-waffle/ens","_from":"file:ethereum-waffle-ens-4.0.2-dev.b96f0af.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/fae54a8c7f3d6347a0ed2c710375d224/ethereum-waffle-ens-4.0.2-dev.b96f0af.tgz","_integrity":"sha512-tI7wtQZwCb5aLrxoQXJvKIi7UeQat+P0+KDmkfq9Zh1xKn/wAQ6T2MQpqqjYjMbMjYpMLF5GGqAVXexgU4O2fQ==","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","dependencies":{"ethers":"5.6.2"},"publishConfig":{"tag":"dev","access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"mocha":"^8.2.1","eslint":"^7.14.0","rimraf":"^3.0.2","ganache":"7.4.0","typescript":"^4.6.2","@ensdomains/ens":"^0.4.4","@ensdomains/resolver":"^0.2.4"},"_npmOperationalInternal":{"tmp":"tmp/ens_4.0.2-dev.b96f0af_1661848046168_0.7369930994967104","host":"s3://npm-registry-packages"},"_id":"@ethereum-waffle/ens@4.0.2-dev.b96f0af","version":"4.0.2-dev.b96f0af"}