{"_id":"@aptos-labs/aptos-names-connector","_rev":"1-11ee59aa8c53f0491b7352a7ec134c65","name":"@aptos-labs/aptos-names-connector","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"name":"@aptos-labs/aptos-names-connector","version":"0.0.1","description":"Aptos names service connector","main":"./dist/index.js","repository":{"type":"git","url":"git+https://github.com/aptos-labs/aptos-names.git"},"author":{"name":"aptoslabs.com"},"license":"MIT","scripts":{"build":"tsup src/index.tsx --format esm,cjs --dts --external react","dev":"tsup src/index.tsx --format esm,cjs --watch --dts --external react","clean":"rm -rf .turbo && rm -rf node_modules && rm -rf dist","lint":"TIMING=1 eslint \"src/**/*.ts*\""},"exports":{".":{"require":"./dist/index.js","import":"./dist/index.mjs","types":"./dist/index.d.ts"},"./dist/index.css":{"import":"./dist/index.css","require":"./dist/index.css"}},"devDependencies":{"@types/react":"^18.0.17","@types/react-dom":"^18.0.6","eslint":"^8.15.0","tsup":"^5.10.1","typescript":"^4.5.3"},"dependencies":{"@mui/icons-material":"^5.10.3","@mui/material":"^5.10.5","aptos":"^1.3.17"},"peerDependencies":{"react":"^18.2.0","react-dom":"^18.2.0","react-copy-to-clipboard":"^5.1.0"},"types":"./dist/index.d.ts","gitHead":"c3c529d2236e5bfbec8c17a9897acd06bdfc150f","bugs":{"url":"https://github.com/aptos-labs/aptos-names/issues"},"homepage":"https://github.com/aptos-labs/aptos-names#readme","_id":"@aptos-labs/aptos-names-connector@0.0.1","_nodeVersion":"19.8.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-HTVqbnsaKyfaqGdf7fC9dJsj8hr9aLS4mB5XUb8KxN+o/KKW4Ui0KpoPeNoLasCC+CZAcQohCvcPWJeRd5UNsg==","shasum":"51f5ea6f6fc80b679ed4b03a29f35623231bcd25","tarball":"https://registry.npmjs.org/@aptos-labs/aptos-names-connector/-/aptos-names-connector-0.0.1.tgz","fileCount":25,"unpackedSize":70801,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFNZz7FBVHNnSyEF2ypbBHE7i0kVdKA1qQxe7enGwPAUAiEA2tWYR93N7lWHBOGwYm5aBfN/m12rLvu/76bY75xHSS8="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkGOk9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpGhg//TEhMwnstnrLPviR6iIfby1GIFTlGx/5sfbpE8XpbqESMz3E1\r\nMxqc9QStnFoPgXi73LAtuJen9/xQmLcIUwWQn7gZKqiCiYGtzLoBs+EAs5Ov\r\nbb/olmaa0+Xyqh3gfIo3PpnWe0GcGxopswQgess9ruSG/grE+QywaV+9n0hp\r\nrva7puQacya3mtbx5xHFbcQuYKBAAz+GSUvD2qeqKBE5yYWZu2OYmmUPI+P5\r\n8ojs1GUA4igoxzYtHuYNpchfRnDdCIDUKiNtt8xWnX9XlM0b5qCBUMV0EWfI\r\nus9MLGADaFiHg7dSzXlLIoDv470ftJ7d9+gHmNOY6sC0DMe+fb/XHrBKid5a\r\n7IG7hTvigjq/nC0p8u96/8su2Drjwmy+zIJNohNVPB+UmsH8ZXKxafnF9qaL\r\nriYy/pXwQYHoj0T5Qs2CT8lkp4bqzTQPNnmNxSc7BX1Qka/ptW+WndVSBGEN\r\nveiYqJxuHbjYMySaJCAD0UAbCjTiNCqLw9jHdQNgovecBBVNcjpvzOmOvYa7\r\nT/X2wzrreU3A9XvohtN85n9mOCFocOR4+P0eO4piOdzkxVverxyCoWXdtI94\r\nHyfLqw3LghwGLYe5xUi9oL7Xl7s6k/0a1L0cNwS2h53BQpm5fJwO0e8/lHFT\r\n34Sa2BKvWCadCjsx1JytAOvK4l14qC1KYB4=\r\n=ZG02\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"aptos-labs","email":"npmjs@aptoslabs.com"},"directories":{},"maintainers":[{"name":"aptos-labs","email":"npmjs@aptoslabs.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/aptos-names-connector_0.0.1_1679354172796_0.7052865061058016"},"_hasShrinkwrap":false},"0.0.2":{"name":"@aptos-labs/aptos-names-connector","version":"0.0.2","description":"Aptos names service connector","main":"./dist/index.js","repository":{"type":"git","url":"git+https://github.com/aptos-labs/aptos-names.git"},"author":{"name":"aptoslabs.com"},"license":"MIT","scripts":{"build":"tsup src/index.tsx --format esm,cjs --dts --external react","dev":"tsup src/index.tsx --format esm,cjs --watch --dts --external react","clean":"rm -rf .turbo && rm -rf node_modules && rm -rf dist","lint":"TIMING=1 eslint \"src/**/*.ts*\""},"exports":{".":{"require":"./dist/index.js","import":"./dist/index.mjs","types":"./dist/index.d.ts"},"./dist/index.css":{"import":"./dist/index.css","require":"./dist/index.css"}},"devDependencies":{"@types/react":"^18.0.17","@types/react-dom":"^18.0.6","eslint":"^8.15.0","tsup":"^5.10.1","typescript":"^4.5.3"},"dependencies":{"@mui/icons-material":"^5.10.3","@mui/material":"^5.11.15","@mui/styles":"^5.11.13","aptos":"^1.3.17"},"peerDependencies":{"react":"^18.2.0","react-copy-to-clipboard":"^5.1.0","react-dom":"^18.2.0"},"types":"./dist/index.d.ts","gitHead":"2cc7559dff445758f0633d6a8317fdc8d6cc6e8d","bugs":{"url":"https://github.com/aptos-labs/aptos-names/issues"},"homepage":"https://github.com/aptos-labs/aptos-names#readme","_id":"@aptos-labs/aptos-names-connector@0.0.2","_nodeVersion":"19.8.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-x8mB2Cjiq2y5tXhcaEcKT2/dK2QEz1QdJBBQZ132/HQlkFmINSCxlwjdwAG6xr0/6Om7m1Cmpbv2R+3XvXw6JQ==","shasum":"34b73ac54680d06baee408fa17af9a47d6d6f4b3","tarball":"https://registry.npmjs.org/@aptos-labs/aptos-names-connector/-/aptos-names-connector-0.0.2.tgz","fileCount":31,"unpackedSize":128700,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDzS+dqjUyAEft+AzbwHBPAbJJHdsBRCxdLoJe6f37vdAiBTzhzVcGF6isk/mUH0SASG4WIiHleedL81pgxF6M2uqg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkKwIrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoYow/+IAZlQxEzklE2nwa9DH1qwmOUUx1YVPdmlXWMRLky3gTPaq7u\r\n6WR4C9zL8w79ya0dtNq4uVoSO3kS8BVI5x6io6MW8ua29EXwJDK3QceNyu5C\r\n+LfZvsDri+H/Vf72doypr+bAq07/jiIXRuEaWliJ4K3czdGAL0xsS6QbD3nc\r\njRwqbZPa6Geggq3NKrlcLhJnWIdtwPKigUv3+abhkJgttvOR/vdeJHkaw4Ln\r\nhg9Y3VgJri8wo3ym+iVkWsUfASBYWZEqY7TraCoQZgbgdousefxaBvA9SM9K\r\nCPmhkGJMxMUpyQrh9GQU58aRirMdumAZjSfR86umK7H5eWqFG7MuS7eaedDQ\r\nBqaQ3/nwWDqsBMZTWxbpe0fBV/CHVtYHoIDP3m6ngXnYe6zrKV3h5r9zbpTu\r\n6apdKZNjxDYoPPY/ZRQSjp2s8ba5wqqG8dPbo1xgwg/ARNBRbOf28dRPBs6z\r\naHyQ6wfrPuq6DyiXf/xsuNDnjTBUC0CB4IyWpITFsXMJi4Qx9mEqVLVH9v18\r\nobSjfzprwJ6Tl+gpFB9BzeqGGTnidNPW866Og9aBA6vJfOIv0ai4eVHFMRFe\r\n2Mku5ufsF1Jzwqk+srI/YNYBpUaFkS86o09kMH/SWWaK3c7VnWRxjyCnSwTr\r\nN38bXaM9v1HO74cPEhxJHoVGaJNgUfz9aWg=\r\n=Luqu\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"aptos-labs","email":"npmjs@aptoslabs.com"},"directories":{},"maintainers":[{"name":"aptos-labs","email":"npmjs@aptoslabs.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/aptos-names-connector_0.0.2_1680540203267_0.2143956324007561"},"_hasShrinkwrap":false}},"time":{"created":"2023-03-20T23:16:12.678Z","0.0.1":"2023-03-20T23:16:13.002Z","modified":"2023-04-03T16:43:23.583Z","0.0.2":"2023-04-03T16:43:23.443Z"},"maintainers":[{"name":"aptos-labs","email":"npmjs@aptoslabs.com"}],"description":"Aptos names service connector","homepage":"https://github.com/aptos-labs/aptos-names#readme","repository":{"type":"git","url":"git+https://github.com/aptos-labs/aptos-names.git"},"author":{"name":"aptoslabs.com"},"bugs":{"url":"https://github.com/aptos-labs/aptos-names/issues"},"license":"MIT","readme":"# Integrate with Aptos Names Service\nThe Aptos Name Service provides a React UI package that offers developers a customizable button and modal to enable users to search for and mint Aptos names directly from their website.\n\n## Prerequisites\n- [React project](https://create-react-app.dev/docs/getting-started/)\n- Supporting dependencies installed in the root directory of your React project with npm or yarn:\n    - `npm install @emotion/styled @emotion/react`\n    - `yarn add @emotion/styled @emotion/react react-copy-to-clipboard`\n\n## Use Aptos Names Service Connector\n1. Open a terminal session and navigate to the root directory of your React project.\n1. Install the `aptos-names-connector` package using npm or yarn:\n    - `npm install \"@aptos-labs/aptos-names-connector\"`\n    - `yarn add \"@aptos-labs/aptos-names-connector\"`\n1. Once you have installed the package, you can import the `AptosNamesConnector` component and use it in your React application (by default in `./src/App.js`):\n    ```\n    import { AptosNamesConnector } from \"@aptos-labs/aptos-names-connector\";\n\n    function MyComponent() {\n      const handleSignTransaction = async () => {\n        // Handle signing of transaction\n      };\n\n      return (\n        <AptosNamesConnector\n          onSignTransaction={handleSignTransaction}\n          isWalletConnected={true}\n          network=\"mainnet\"\n          buttonLabel=\"Claim\"\n        />\n      );\n    }\n    ```\n1. To see your changes, start a development server using npm or yarn. The following commands will open the React application in your default web browser (typically to `localhost:3000`):\n    - `npm start`\n    - `yarn start`\n\n## Configure `AptosNamesConnector` properties\nThe `AptosNamesConnector` component accepts the following props:\n\n- `onSignTransaction`: A required callback function that is called when the user clicks the \"Mint\" button in the modal. This function should handle the signing of the transaction.\n- `isWalletConnected`: A boolean value that indicates whether the user's wallet is connected.\n- `network`: A string value that specifies whether the component should connect to the mainnet or testnet.\n- `buttonLabel`: A string value that specifies the text to display on the button.\n\n## Customize button label and appearance\nThe button label can be customized by passing a string value to the buttonLabel prop.\nThe appearance of the button in the `AptosNamesConnector` component can be customized to fit in your website. The button has the CSS class name of `ans_connector_button`:\n\n```\n.ans-connector-button {\n  background-color: #000000;\n  border: none;\n  border-radius: 4px;\n  color: #ffffff;\n  cursor: pointer;\n  font-size: 16px;\n  font-weight: bold;\n  padding: 12px 16px;\n}\n```\nTo use `ans_connector_button` in your React application, add `import \"@aptos-labs/aptos-names-connector/dist/index.css\";` to the top of your App.js file and reference it with `<button className=\"ans_connector_button\"></button>`\n\n## Supported networks\nThe `AptosNamesConnector` component supports both mainnet and testnet. To connect to the mainnet, set the network prop to \"mainnet\". To connect to the testnet, set the network prop to \"testnet\".\n","readmeFilename":"README.md"}