TypeScript icon, indicating that this package has built-in type declarations

1.4.0 • Public • Published

Automata Network Wallet SDK

A monorepo consists of Web3 wallet SDK and React UI component to connect dApp web app to popular web3 wallet like MetaMask and WalletConnect.


npm install @automata-network/wallet-react /
@solana/wallet-adapter-react /
@solana/wallet-adapter-wallets /
@polkadot/api /
@polkadot/extension-inject /
@web3-onboard/coinbase /
@web3-onboard/core /
@web3-onboard/enkrypt /
@web3-onboard/fortmatic /
@web3-onboard/gnosis /
@web3-onboard/injected-wallets /
@web3-onboard/ledger /
@web3-onboard/mew-wallet /
@web3-onboard/portis /
@web3-onboard/torus /
@web3-onboard/trezor /
@web3-onboard/walletconnect /
ethers /
react /
react-dom -S

How To

Here's the example.

import '@automata-network/wallet-react/style.css'

createRoot(document.getElementById('root') as HTMLElement).render(
      appName="Automata Wallet Demo"
          type: ChainType.EVM,
          chainId: "5",
          chainName: "Ethereum Goerli",
          nativeCurrency: {
            decimals: 18,
            name: "GoerliETH",
            symbol: "GoerliETH",
          rpcUrls: [
          blockExplorerUrls: ["https://goerli.etherscan.io/"],
          type: ChainType.EVM,
          chainId: "80001",
          chainName: "Polygon",
          nativeCurrency: {
            decimals: 18,
            name: "MATIC",
            symbol: "MATIC",
          rpcUrls: ["https://rpc.ankr.com/polygon_mumbai"],
          blockExplorerUrls: ["https://mumbai.polygonscan.com/"],
          type: ChainType.Polkadot,
          chainId: "Westend",
          chainName: "Westend",
          rpcUrls: ["wss://westend-rpc.polkadot.io"],
          blockExplorerUrls: ["https://westend.subscan.io/"],
          type: ChainType.Solana,
          chainId: "Solana Testnet",
          chainName: "Solana Testnet",
          rpcUrls: ["https://api.testnet.solana.com"],
          blockExplorerUrls: ["https://explorer.solana.com/?cluster=testnet"],
          iconUrl: "https://solana.com/src/img/branding/solanaLogoMark.svg",
        evm: {
          fortmatic: process.env.VITE_FORTMATIC_API_KEY
            ? {
                apiKey: process.env.VITE_FORTMATIC_API_KEY,
            : undefined,
          walletconnect: {},
          // coinbase: {},
          portis: process.env.VITE_PORTIS_API_KEY
            ? {
                apiKey: process.env.VITE_PORTIS_API_KEY,
            : undefined,
          gnosis: {},
          torus: process.env.VITE_TORUS_API_KEY
            ? { apiKey: process.env.VITE_TORUS_API_KEY, showTorusButton: false }
            : undefined,
            process.env.VITE_TREZOR_EMAIL && process.env.VITE_TREZOR_APP_URL
              ? {
                  email: process.env.VITE_TREZOR_EMAIL,
                  appUrl: process.env.VITE_TREZOR_APP_URL,
              : undefined,
          mew: true,
          enkrypt: true,
          subwallet: true,
          talisman: true,
          ledger: {},
        polkadot: {
          enkrypt: true,
          subwallet: true,
          talisman: true,
          polkadotJsExtension: true,
        solana: {
          math: {},
          solflare: {},
          phantom: {},
        <Wallet />
      <App />

If you want to use the json rpc provider or get the account address, chain ID, etc.. you can use the useWallet hook.

const { account, chainId, rpcRequest } = useWallet()

Customize styles and class name prefix

If you want to customize your style you can copy the content from @automata-network/wallet-react/src/style.less and use your own variables or component style file. then compile your less to css on your build phase and import it to your website.

If our class name prefix conflict with your code, you can modify the @selector-prefix variable on the @automata-network/wallet-react/src/style.less and compile your customized css.

Then you need to set up the customized class name prefix on the wallet provider.


Integeration with ViteJS


Integeration with Create React App


Integeration with NextJS


Trouble shooting

Uncaught ReferenceError: process is not defined

That caused by the @walletconnect/web3-provider, it required the process object from Node.js, but there is no process on the browser.

so we need to set up an alias to point @walletconnect/web3-provider to its prebuilt bundle.

  alias: {
    '@walletconnect/web3-provider': '@walletconnect/web3-provider/dist/umd/index.min.js'

Contribute on Development

Clone this repo and run the script below to install all required dependencies.

# First we install the dependencies and link
cd wallet_sdk_dir && npm install

Then build the SDK and link the dist directory so you can use the SDK in the example site.

npm run build
npm link

When you've made some changes on the SDK part, just rebuild it and the example site will be reloaded automatically.

Don't forget to unlink the SDK when you've finished with the development, using npm unlink @automata-network/wallet-sdk.




DownloadsWeekly Downloads






Unpacked Size

603 kB

Total Files


Last publish


  • jojotyty
  • goldfinger87
  • arvianto.dwi
  • xatadev
  • linyao7
  • 297951292