{"_id":"@decentralizedauthority/nodewallet-react-sdk","_rev":"5-1b13a4010f6a1dbfe55acdf74f6857b0","name":"@decentralizedauthority/nodewallet-react-sdk","dist-tags":{"latest":"0.1.5"},"versions":{"0.1.0":{"name":"@decentralizedauthority/nodewallet-react-sdk","version":"0.1.0","main":"./dist/index.js","source":"./src/index.tsx","types":"./dist/index.d.ts","jest":{"preset":"jest-presets/jest/node"},"dependencies":{"@decentralizedauthority/nodewallet-sdk":"0.1.0","react":"^18.2.0"},"repository":{"type":"git","url":"git+https://github.com/decentralized-authority/pokt-browser-wallet.git"},"gitHead":"c49f0d2dac029f1612645ecf2734fff047737433","description":"Provides straightforward, programmatic access to the NodeWallet extension in React projects using the [NodeWallet SDK](https://github.com/decentralized-authority/nodewallet/tree/master/packages/sdk).","bugs":{"url":"https://github.com/decentralized-authority/pokt-browser-wallet/issues"},"homepage":"https://github.com/decentralized-authority/pokt-browser-wallet#readme","_id":"@decentralizedauthority/nodewallet-react-sdk@0.1.0","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-uQRxxmVqLw5d+TTSTUGOotqZlbx2ZOgspOEOakGEnPL7kN5rSfN0Usg+y70gXU8tUV96xaEzCY0sCHzP/Sa/ug==","shasum":"820a910b1550e498bf2bb3fe98b3c900693fdd1f","tarball":"https://registry.npmjs.org/@decentralizedauthority/nodewallet-react-sdk/-/nodewallet-react-sdk-0.1.0.tgz","fileCount":6,"unpackedSize":13678,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCWTRbrnvbbDn1b9/2LR9Q7cu9+htvDp4J0mdmpHu/0mwIhAPWBJnuc9l2mcOV+Ln4NI0iYZorGnaWWrXClwWguPMtw"}]},"_npmUser":{"name":"decentralizedauthority","email":"admin@decentralizedauthority.com"},"directories":{},"maintainers":[{"name":"decentralizedauthority","email":"admin@decentralizedauthority.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nodewallet-react-sdk_0.1.0_1705729804268_0.32605242241473054"},"_hasShrinkwrap":false},"0.1.1":{"name":"@decentralizedauthority/nodewallet-react-sdk","version":"0.1.1","main":"./dist/index.js","source":"./src/index.tsx","types":"./dist/index.d.ts","jest":{"preset":"jest-presets/jest/node"},"dependencies":{"@decentralizedauthority/nodewallet-sdk":"0.1.0","react":"^18.2.0"},"repository":{"type":"git","url":"git+https://github.com/decentralized-authority/pokt-browser-wallet.git"},"gitHead":"9f7e6f34d724a95f20c4a09b7a253fdd162aae9b","description":"Provides straightforward, programmatic access to the NodeWallet extension in React projects using the [NodeWallet SDK](https://github.com/decentralized-authority/nodewallet/tree/master/packages/sdk).","bugs":{"url":"https://github.com/decentralized-authority/pokt-browser-wallet/issues"},"homepage":"https://github.com/decentralized-authority/pokt-browser-wallet#readme","_id":"@decentralizedauthority/nodewallet-react-sdk@0.1.1","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-EwcgAEG/IaxcErhZteMI6WVZ6qyc106HF28yH0C4wKcpkfwruWjPeWCLkbUTK3QoHbvT2rqLrMepOnjTtutzvg==","shasum":"fd2972b670c767d1ac9f50eb4263c91633b5b9e8","tarball":"https://registry.npmjs.org/@decentralizedauthority/nodewallet-react-sdk/-/nodewallet-react-sdk-0.1.1.tgz","fileCount":6,"unpackedSize":13676,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCbsnPbXGa9ZcTrX96AV0qEMzwS5UDQhP5YYomY7VtSVwIgSalCJKgLCIwy5jGSQ4FlbJf7DcTOBpOzVtq2WhnuOvg="}]},"_npmUser":{"name":"decentralizedauthority","email":"admin@decentralizedauthority.com"},"directories":{},"maintainers":[{"name":"decentralizedauthority","email":"admin@decentralizedauthority.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nodewallet-react-sdk_0.1.1_1705735029644_0.3994473057217809"},"_hasShrinkwrap":false},"0.1.2":{"name":"@decentralizedauthority/nodewallet-react-sdk","version":"0.1.2","main":"./dist/index.js","source":"./src/index.tsx","types":"./dist/index.d.ts","jest":{"preset":"jest-presets/jest/node"},"dependencies":{"@decentralizedauthority/nodewallet-sdk":"0.1.0","react":"^18.2.0"},"repository":{"type":"git","url":"git+https://github.com/decentralized-authority/pokt-browser-wallet.git"},"gitHead":"88bacadf8f870e06e2c0fcbd7454b5516f07ce14","description":"Provides straightforward, programmatic access to the NodeWallet extension in React projects using the [NodeWallet SDK](https://github.com/decentralized-authority/nodewallet/tree/master/packages/sdk).","bugs":{"url":"https://github.com/decentralized-authority/pokt-browser-wallet/issues"},"homepage":"https://github.com/decentralized-authority/pokt-browser-wallet#readme","_id":"@decentralizedauthority/nodewallet-react-sdk@0.1.2","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-JWW/TiNWglkx98AkdNXjOwe+tjlVfVKyt8LXKxiXuYRB7WtTUEwji+b9yJTtJBypuMxj6BYXK4NZrcBZO+V2UQ==","shasum":"0dad3308f7d1fb51ec4f27dd66906627290fe1af","tarball":"https://registry.npmjs.org/@decentralizedauthority/nodewallet-react-sdk/-/nodewallet-react-sdk-0.1.2.tgz","fileCount":6,"unpackedSize":13675,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEwYL5Xzl2V1AsSoQj1thU81qRwXxOxLSJEI28iIFQ9uAiBsosCRF7JgwtJRmn9RUixdgs9ZZrorwDSkOBUqvOiv3g=="}]},"_npmUser":{"name":"decentralizedauthority","email":"admin@decentralizedauthority.com"},"directories":{},"maintainers":[{"name":"decentralizedauthority","email":"admin@decentralizedauthority.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nodewallet-react-sdk_0.1.2_1705735368147_0.7736559456341803"},"_hasShrinkwrap":false},"0.1.3":{"name":"@decentralizedauthority/nodewallet-react-sdk","version":"0.1.3","main":"./dist/index.js","source":"./src/index.tsx","types":"./dist/index.d.ts","jest":{"preset":"jest-presets/jest/node"},"dependencies":{"@decentralizedauthority/nodewallet-sdk":"0.1.0","@decentralizedauthority/nodewallet-ui":"0.1.0","react":"^18.2.0"},"repository":{"type":"git","url":"git+https://github.com/decentralized-authority/pokt-browser-wallet.git"},"gitHead":"ce0b5bcf0cea546318486a735fc84c08400c4a8a","description":"Provides straightforward, programmatic access to the NodeWallet extension in React projects using the [NodeWallet SDK](https://github.com/decentralized-authority/nodewallet/tree/master/packages/sdk).","bugs":{"url":"https://github.com/decentralized-authority/pokt-browser-wallet/issues"},"homepage":"https://github.com/decentralized-authority/pokt-browser-wallet#readme","_id":"@decentralizedauthority/nodewallet-react-sdk@0.1.3","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-uoKymJTYK88BUH/mpk2uCymSGtVPVINwg+AQuutyp89UtHZYjww6j1zFrFAq8WzEko/KBrT3xtORaMnTEKDTwg==","shasum":"080727de9c2ba1494740d1e4611d1085402b1ef4","tarball":"https://registry.npmjs.org/@decentralizedauthority/nodewallet-react-sdk/-/nodewallet-react-sdk-0.1.3.tgz","fileCount":6,"unpackedSize":15070,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICBQA5DqWAO37/Z/EGy9uC+SKprMX6Uxy/51kleOwMDuAiEA1ztdfrYNTjzKyHJnT+mj+56euVoYnwoKaF2AbFIbBWk="}]},"_npmUser":{"name":"decentralizedauthority","email":"admin@decentralizedauthority.com"},"directories":{},"maintainers":[{"name":"decentralizedauthority","email":"admin@decentralizedauthority.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nodewallet-react-sdk_0.1.3_1706047917438_0.3339770698479294"},"_hasShrinkwrap":false},"0.1.4":{"name":"@decentralizedauthority/nodewallet-react-sdk","version":"0.1.4","main":"./dist/index.js","source":"./src/index.tsx","types":"./dist/index.d.ts","jest":{"preset":"jest-presets/jest/node"},"dependencies":{"@decentralizedauthority/nodewallet-sdk":"0.1.0","@decentralizedauthority/nodewallet-ui":"0.1.0","react":"^18.2.0"},"repository":{"type":"git","url":"git+https://github.com/decentralized-authority/pokt-browser-wallet.git"},"gitHead":"ae636049ba189009d2d213f50f933cb04619203f","description":"Provides straightforward, programmatic access to the NodeWallet extension in React projects using the [NodeWallet SDK](https://github.com/decentralized-authority/nodewallet/tree/master/packages/sdk).","bugs":{"url":"https://github.com/decentralized-authority/pokt-browser-wallet/issues"},"homepage":"https://github.com/decentralized-authority/pokt-browser-wallet#readme","_id":"@decentralizedauthority/nodewallet-react-sdk@0.1.4","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-Pvd7czDgAtfbwxjMcoGn3515PguBDGyG7ZMFKe9WbRgdmFLgBqMx2tyYMZG/DKggED55srj8uYecxXZCjiP0sg==","shasum":"441ac880a47695823dd08b1fdeedb20e68d9244d","tarball":"https://registry.npmjs.org/@decentralizedauthority/nodewallet-react-sdk/-/nodewallet-react-sdk-0.1.4.tgz","fileCount":6,"unpackedSize":16327,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC1tc7bQ1GZAWN54FlBqoY1+7qFPFINl/2S6V4q2hXR4QIgGtFY9a0uRspaGUfoVWX1eZoB314+hmXWTPOwOvxprpM="}]},"_npmUser":{"name":"decentralizedauthority","email":"admin@decentralizedauthority.com"},"directories":{},"maintainers":[{"name":"decentralizedauthority","email":"admin@decentralizedauthority.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nodewallet-react-sdk_0.1.4_1706116314782_0.8452629665340887"},"_hasShrinkwrap":false},"0.1.5":{"name":"@decentralizedauthority/nodewallet-react-sdk","version":"0.1.5","main":"./dist/index.js","source":"./src/index.tsx","types":"./dist/index.d.ts","jest":{"preset":"jest-presets/jest/node"},"dependencies":{"@decentralizedauthority/nodewallet-sdk":"0.1.0","@decentralizedauthority/nodewallet-ui":"0.1.0","react":"^18.2.0"},"repository":{"type":"git","url":"git+https://github.com/decentralized-authority/pokt-browser-wallet.git"},"gitHead":"12476cc639b2ec3eaf64d13c75eba4c3c95b6f9b","description":"Provides straightforward, programmatic access to the NodeWallet extension in React projects using the [NodeWallet SDK](https://github.com/decentralized-authority/nodewallet/tree/master/packages/sdk).","bugs":{"url":"https://github.com/decentralized-authority/pokt-browser-wallet/issues"},"homepage":"https://github.com/decentralized-authority/pokt-browser-wallet#readme","_id":"@decentralizedauthority/nodewallet-react-sdk@0.1.5","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-/ouCkf8aKzj9mYJpaZ01YK/q1dsHvI8J4ew9/lnIcWnifq3VvRDYWN92g1z/Ld3flt52FvXpLpE3zgxD6qsCAQ==","shasum":"3b183edccb2ae9154831b720126dde5ec0da6ac8","tarball":"https://registry.npmjs.org/@decentralizedauthority/nodewallet-react-sdk/-/nodewallet-react-sdk-0.1.5.tgz","fileCount":6,"unpackedSize":16328,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBvwNKhLz9uBMD+M80lDaoJwyFQ7McUHl0JzPuCqS4TdAiAFRjxSglanlYDPA0o0ZV8HlcHgP0xQK9JBdzaDQE53Rg=="}]},"_npmUser":{"name":"decentralizedauthority","email":"admin@decentralizedauthority.com"},"directories":{},"maintainers":[{"name":"decentralizedauthority","email":"admin@decentralizedauthority.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nodewallet-react-sdk_0.1.5_1706116587977_0.03071811680801617"},"_hasShrinkwrap":false}},"time":{"created":"2024-01-20T05:50:04.179Z","0.1.0":"2024-01-20T05:50:04.400Z","modified":"2024-01-24T17:16:28.309Z","0.1.1":"2024-01-20T07:17:09.787Z","0.1.2":"2024-01-20T07:22:48.288Z","0.1.3":"2024-01-23T22:11:57.638Z","0.1.4":"2024-01-24T17:11:54.961Z","0.1.5":"2024-01-24T17:16:28.133Z"},"maintainers":[{"name":"decentralizedauthority","email":"admin@decentralizedauthority.com"}],"description":"Provides straightforward, programmatic access to the NodeWallet extension in React projects using the [NodeWallet SDK](https://github.com/decentralized-authority/nodewallet/tree/master/packages/sdk).","homepage":"https://github.com/decentralized-authority/pokt-browser-wallet#readme","repository":{"type":"git","url":"git+https://github.com/decentralized-authority/pokt-browser-wallet.git"},"bugs":{"url":"https://github.com/decentralized-authority/pokt-browser-wallet/issues"},"readme":"# Nodewallet React SDK\nProvides straightforward, programmatic access to the NodeWallet extension in React projects using the [NodeWallet SDK](https://github.com/decentralized-authority/nodewallet/tree/master/packages/sdk).\n\n## Usage\nAdd the NodeWallet React SDK to your project:\n```sh\nnpm install --save @decentralizedauthority/nodewallet-react-sdk\n```\nAdd `NodeWalletProvider` to the top level of your application:\n```tsx\nimport {\n  NodeWalletProvider,\n} from '@decentralizedauthority/nodewallet-react-sdk';\n\nconst AppContainer = () => {\n  \n  const nodeWalletOptions = {\n    autoConnect: false,                // Optional. Auto connect on load. Defaults to false.\n    connectTimeout: 10000,             // Optional. Timeout for connecting to the extension. Defaults to 10000ms.\n    requestTimeout: 30000,             // Optional. Timeout for requests to the extension. Defaults to 30000ms.\n    onConnectError: (err: Error) => {  // Optional. Called when there is an error on the initial connecting to the extension.\n      console.error(err);\n      alert('Unable to connect to the NodeWallet extension. Are you sure that you have it installed?');\n    },\n  };\n  \n  return (\n    <NodeWalletProvider options={nodeWalletOptions}>\n      <App />\n    </NodeWalletProvider>\n  );\n};\n```\n\nUse the available hooks to interact with the NodeWallet extension:\n```tsx\nimport {\n  ConnectButton,\n  useNodeWallet,\n  useNodeWalletConnect,\n} from '@decentralizedauthority/nodewallet-react-sdk';\n\nexport const App = () => {\n\n  const {\n    connected,\n    address,\n    publicKey,\n    chain,\n    pocket, // Instance of PocketProvider from the NodeWallet SDK\n  } = useNodeWallet();\n\n  // provides a function to initiate a connection to NodeWallet\n  // not needed if autoConnect is set to true or if using the\n  // ConnectButton component\n  // const connect = useNodeWalletConnect();\n  \n  return (\n    <div>\n      <h1>NodeWallet React SDK Demo</h1>\n      {!connected ?\n        <ConnectButton />\n        :\n        <div>\n          <p>Address: {address}</p>\n          <p>Public Key: {publicKey}</p>\n          <p>Chain: {chain}</p>\n        </div>\n      }\n    </div>\n  );\n};\n```\n\n## `ConnectButton` Component\nThe NodeWallet React SDK provides a `ConnectButton` component that can be used to initiate a connection to NodeWallet as long as you have the `NodeWalletProvider` added to the top level of your application. It is customizable via props:\n```tsx\ninterface ConnectButtonProps {\n  size?: 'sm'|'md'|'lg'\n  buttonStyle?: React.CSSProperties\n  buttonBackground?: string\n  buttonHoverBackground?: string\n  buttonOutlineColor?: string\n  buttonOutlineHoverColor?: string\n  buttonMinHeight?: number\n  buttonBorderRadius?: number\n  buttonProps?: React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>\n  logoContainerStyle?: React.CSSProperties\n  logoSize?: number\n  textContainerStyle?: React.CSSProperties\n  textColor?: string\n  textHoverColor?: string\n  textSize?: number\n  text?: string\n}\n```\nThere are three sizes available: `sm`, `md`, and `lg`. The default size is `md`. The `buttonProps` prop can be used to pass additional props to the underlying button element. The `text` prop can be used to customize the text displayed on the button. The default text is `Connect to NodeWallet`.\n\n![NodeWallet button sizes example](https://files.decentralizedauthority.com/connect_to_nodewallet_button-sm.png)\n","readmeFilename":"README.md"}