{"_id":"@crtxio/bproto-domain-lookup","name":"@crtxio/bproto-domain-lookup","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@crtxio/bproto-domain-lookup","type":"module","version":"0.0.1","license":"MIT","author":{"name":"Raphael Schmid","email":"rjschmid-npm@proton.me"},"keywords":["nuxt3","layer","component","bproto","domain","lookup","nft"],"main":"./nuxt.config.ts","scripts":{"dev":"nuxi dev .playground","build":"nuxt build .playground","generate":"nuxt generate .playground","preview":"nuxt preview .playground","lint":"eslint ."},"dependencies":{"@nuxtjs/apollo":"^5.0.0-alpha.5","alchemy-sdk":"^2.2.0","ethers":"^6.6.1"},"gitHead":"b11a6d00cff4c3a9dde4fc992107557955b287ff","description":"@crtxio/bproto-domain-lookup is a Nuxt3 layer which provides Nuxt 3 composables to look up the domains and subdomains associated with an account.","_id":"@crtxio/bproto-domain-lookup@0.0.1","_nodeVersion":"20.3.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-brPGn6TtFweFpgOlHXGhNB9liF3bt0x3VUjZ/FLFscZyjaaU510t/4Sa7FG/EaJJOUv+zqWH8ZrIGA1LCg2YbA==","shasum":"005a50482d551d6c630b2bd2a250af31d93c7112","tarball":"https://registry.npmjs.org/@crtxio/bproto-domain-lookup/-/bproto-domain-lookup-0.0.1.tgz","fileCount":11,"unpackedSize":8490,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEyJlPGgXPxpCp1jwi4q12yZ9nbD9Q4/IzEgc/49i3MIAiAwJyGUqOK58IBrrlOOH/Jz8xJO/9VGT+A8U4/RTXakSg=="}]},"_npmUser":{"name":"rajosch","email":"raphaeljschmid@protonmail.com"},"directories":{},"maintainers":[{"name":"rajosch","email":"raphaeljschmid@protonmail.com"},{"name":"hexorx","email":"hexorx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bproto-domain-lookup_0.0.1_1688095519937_0.0968623570830307"},"_hasShrinkwrap":false}},"time":{"created":"2023-06-30T03:25:19.846Z","0.0.1":"2023-06-30T03:25:20.184Z","modified":"2023-06-30T03:25:20.465Z"},"maintainers":[{"name":"rajosch","email":"raphaeljschmid@protonmail.com"},{"name":"hexorx","email":"hexorx@gmail.com"}],"description":"@crtxio/bproto-domain-lookup is a Nuxt3 layer which provides Nuxt 3 composables to look up the domains and subdomains associated with an account.","keywords":["nuxt3","layer","component","bproto","domain","lookup","nft"],"author":{"name":"Raphael Schmid","email":"rjschmid-npm@proton.me"},"license":"MIT","readme":"# @crtxio/bproto-domain-lookup\n\n@crtxio/bproto-domain-lookup is a Nuxt3 layer which provides Nuxt 3 composables to look up the domains and subdomains associated with an account. \n\n## Setup\n\nMake sure to install the dependencies:\n\n```bash\nnpm install --save @crtxio/bproto-domain-lookup\n```\n\nor\n\n```bash\nyarn add @crtxio/bproto-domain-lookup\n```\n\nAdd the dependency to your `extends` in `nuxt.config`:\n\n```ts\ndefineNuxtConfig({\n  extends: [\n    '@crtxio/bproto-domain-lookup'\n  ]\n})\n```\n\n## How to use it\n\n### Components\n\n```vue\n<template>\n  <div @click=\"getDomains()\" class=\"border rounded-md cursor-pointer w-fit p-1\">\n    Fetch\n  </div>\n  <div class=\"text-xl font-bold mb-3\">Press Lookup</div>\n  <div v-if=\"pressDomains\">\n   <div v-for=\"domain in pressDomains.subdomains\">\n      {{ domain.fqn }}\n      <div class=\"ml-5\">\n        <div v-for=\"domain in domain.subdomains\">\n            {{ domain.fqn }}\n        </div>\n      </div>\n    </div>\n  </div>\n  <div class=\"text-xl font-bold my-3\">Chain Lookup</div>\n  <div v-if=\"chainDomains\">\n   <div v-for=\"domain in chainDomains.subdomains\">\n      {{ domain.fqn }}\n      <div class=\"ml-5\">\n        <div v-for=\"domain in domain.subdomains\">\n            {{ domain.fqn }}\n        </div>\n      </div>\n    </div>\n  </div>\n</template>\n\n<script>\n  import { ethers } from 'ethers';\n  import { Network } from 'alchemy-sdk';\n  import { useRuntimeConfig } from \"#app\";\n\n  export default {\n    data() {\n      return {\n        pressDomains: undefined,\n        chainDomains: undefined\n      }\n    },\n    methods: {\n      async getDomains() {\n        const config = useRuntimeConfig();\n\n        this.pressDomains = await arrangeDomains('pepe', await queryDomains(config.public.ACCOUNT)); \n        const provider = new ethers.BrowserProvider(window.ethereum);\n        await provider.send(\"eth_requestAccounts\", [])\n        this.chainDomains = await arrangeDomains(\n          'pepe',\n          await getLogs(\n            config.public.ACCOUNT, \n            provider, \n            'pepe', \n            16369392, \n            '0x9bD43DCC42Ff2187fFe2101d483A08173582b82f',\n            config.public.API_KEY,\n            Network.ETH_MAINNET\n          )\n        );\n      }\n    }\n  }\n</script>\n```","readmeFilename":"README.md"}