0.0.15 • Published 1 year ago

ngweb3login v0.0.15

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

web3login: Integrate Web3 with your casino

Overview

web3login is an innovative solution designed to seamlessly integrate Web3 functionalities into your casino.

Installation

To get started with web3login, follow these steps:

  1. Install the required dependencies:

    npm i ngweb3login

    Usage

    After installation, you can integrate web3login into your project by following these steps:

  2. Add the Provide to the _app.js page:

    import { Web3Provider } from "ngweb3login";
    
    function MyApp({ Component, pageProps }) {
    
    ...
          <Web3Provider web3loginKey={key} >
                <Component {...pageProps} />
          </Web3Provider >
    ...
  3. You can aquire the key by registering an account on web3login Website.

  1. In your homepage you can add the button to allow users to access their wallet.

    import { Web3Login } from "ngweb3login";
    
    function Page() {
    
    ...
       <Web3Login
             projectId=''
             onError={(e) => { console.error(e) }}
             onSuccess={(e) => { console.log(e) }}
             metadata={{
                name: 'Fomo',
                description: 'AppKit Example',
                url: 'https://web3modal.com', // origin must match your domain & subdomain
                icons: ['https://avatars.githubusercontent.com/u/37784886']
             }}
       />
    ...
  1. In your homepage you can add a widget for the futures by adding the slug.

       import { FutureWidget } from "ngweb3login";
    
       function Page() {
    
       ...
          <FutureWidget
                slug={"btc"}
          />
       ...
  2. In your a new page you can load the full futures by just adding the slug.

       import { FutureChart } from "ngweb3login";
    
       function Page() {
    
       ...
          <FutureChart
                slug={"btc"}
          />
       ...
    
       Refer to our [documentation](https://doc.web3login.com) for detailed usage instructions.
    
       ## License
       This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.