0.3.5 • Published 8 months ago

@renec-foundation/wallet-adapter-react v0.3.5

Weekly downloads
-
License
-
Repository
github
Last release
8 months ago

Carax Wallet adapter for React

How to use

Install the sdk
  npm install @renec-foundation/wallet-adapter-react
  // or
  yarn add @renec-foundation/wallet-adapter-react

In case you are using Next.js, install below module add this to your next.config.js file

  npm install next-transpile-modules --save-dev
  // or
  yarn add next-transpile-modules -D

next.config.js:

/** @type {import('next').NextConfig} */
const withTM = require("next-transpile-modules")([
  "@renec-foundation/wallet-adapter-react",
]);

module.exports = withTM({});
Integrate
  1. Import css

    import "@renec-foundation/wallet-adapter-react/src/style.css";
  2. Add provider

    import { Provider as WalletProvider } from "@renec-foundation/wallet-adapter-react";
    
    <WalletProvider isMainnet={true} e2eWalletPrivKey={""}>
      {children}
    </WalletProvider>;
    • Require
      • isMainnet: Choose either true or false to select the mainnet or testnet.
    • Optional
      • e2eWalletPrivKey: The passphrase of the test wallet used for end-to-end (e2e) testing.
    • Optional
      • locale: vi (Vietnamese) or en (English)
Import button connect
import { WalletMultiButton as CaraxWalletConnect } from "@renec-foundation/wallet-adapter-react";
// or
const CaraxWalletConnect = dynamic(
  async () =>
    (await import("@renec-foundation/wallet-adapter-react")).WalletMultiButton,
  { ssr: false }
);
  • using the button
// Default
<CaraxWalletConnect />

// Customs
<CaraxWalletConnect
  listMenuItems={
    <>
      <li onClick={undefine}>
        {'Title 1'}
      </li>
      <li onClick={undefine}>
        {'Title 2'}
      </li>
    </>
  }
/>
  • className?: string: The class add-ons for button
  • disabled?: boolean: Disabled button
  • endIcon?: ReactElement: The end icon in button
  • beginIcon?: ReactElement: The begin icon in button
  • style?: CSSProperties: The style of button
  • listMenuItems: The list contains custom add-ons
  • tabIndex?: number: The tab Index
0.3.5

8 months ago

0.3.0-alpha

8 months ago

0.3.4

8 months ago

0.3.3

8 months ago

0.2.14

1 year ago

0.2.12

1 year ago

0.2.11

1 year ago

0.2.9

1 year ago

0.2.7-beta

1 year ago

0.2.8

1 year ago

0.2.7

1 year ago

0.2.6

1 year ago

0.2.6-delta

1 year ago

0.2.5

2 years ago

0.2.6-beta

2 years ago

0.1.0

2 years ago

0.2.1

2 years ago

0.1.2

2 years ago

0.2.0

2 years ago

0.1.1

2 years ago

0.1.8

2 years ago

0.0.9

2 years ago

0.1.7

2 years ago

0.0.8

2 years ago

0.1.9

2 years ago

0.2.3

2 years ago

0.1.4

2 years ago

0.0.5

2 years ago

0.2.2

2 years ago

0.1.3

2 years ago

0.0.4

2 years ago

0.2.5-beta

2 years ago

0.1.6

2 years ago

0.2.4

2 years ago

0.1.5

2 years ago

0.0.6

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago