@anchor-protocol/wallet-provider
    TypeScript icon, indicating that this package has built-in type declarations

    0.4.0 • Public • Published

    @anchor-protocol/wallet-provider

    https://anchor-storybook.vercel.app/?path=/story/core-wallet-provider--handle-status

    Usage

    import { WalletProvider } from '@anchor-protocol/wallet-provider';
    
    const mainnet = {
      chainID: 'columbus-4',
      fcd: 'https://fcd.terra.dev',
      lcd: 'https://lcd.terra.dev',
      name: 'mainnet',
      ws: 'wss://fcd.terra.dev',
    };
    
    const testnet = {
      chainID: 'tequila-0004',
      fcd: 'https://tequila-fcd.terra.dev',
      lcd: 'https://tequila-lcd.terra.dev',
      name: 'testnet',
      ws: 'wss://tequila-ws.terra.dev',
    };
    
    function App() {
      return (
        <WalletProvider
          defaultNetwork={mainnet}
          walletConnectChainIds={
            new Map([
              [1, mainnet],
              [2, testnet],
            ])
          }
        >
          <YOUR_APP />
        </WalletProvider>
      );
    }
    import { useWallet } from '@anchor-protocol/wallet-provider';
    
    function Component() {
      const {
        status,
        network,
        walletAddress,
        availableExtension,
        connect,
        disconnect,
      } = useWallet();
    
      return null;
    }

    Keywords

    none

    Install

    npm i @anchor-protocol/wallet-provider

    DownloadsWeekly Downloads

    11

    Version

    0.4.0

    License

    Apache-2.0

    Unpacked Size

    57 kB

    Total Files

    35

    Last publish

    Collaborators

    • cosullivan
    • jarcodallo
    • ssen
    • hanjukim
    • saad.najafi
    • kjessec
    • etienne.napoleone