0.0.0-internal-20230228210051 • Published 3 years ago

@sei-js/react v0.0.0-internal-20230228210051

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

@sei-js/react

A React helper library for @sei-js/core written in Typescript.

Tutorial

For an in depth tutorial, please see our documentation.

Installation

yarn add @sei-js/react

WalletProvider

The first step is to wrap your entire application in a Sei wallet provider and pass in a chainId, rest url, and rpc url.

<SeiWalletProvider
  chainConfiguration={{
    chainId: 'sei-devnet-3',
    restUrl: 'https://rest.sei-devnet-3.seinetwork.io/',
    rpcUrl: 'https://rpc.sei-devnet-3.seinetwork.io'
  }}>
      <YourApp />
</SeiWalletProvider>

Hooks

HookParams
useWallet---
useQueryClient(rpcAddress?: string)
useSigningClient(rpcAddress?: string)
useSeiCosmWasmClient---

useWallet

A hook to connect one of our supported wallets to your application.

import { useWallet } from '@sei-js/react';

const { offlineSigner, accounts, connectedWallet } = useWallet();

Return Values

PropertyTypeDescription
connectedWalletstring?The currently connected wallet
supportedWalletsstring[]List of supported wallets
installedWalletsstring[]List of wallets installed
chainIdstringSei chain id
restUrlstringThe rest url associated with the connected wallet
rpcUrlstringThe rpc url associated with the connected wallet
offlineSignerobject?The offline signer associated with the connected wallet
accountsobject[]?The accounts associated with the connected wallet

useQueryClient

import { useQueryClient } from '@sei-js/react';

const { queryClient, isLoading } = useQueryClient();
PropertyTypeDescription
queryClientStargateSigningClient?A stargate signing client.
isLoadingbooleanBoolean value for when the initial loading is happening

useSigningClient

import { useSigningClient } from '@sei-js/react';

const { signingClient, isLoading } = useSigningClient();
PropertyTypeDescription
signingClientStargateSigningClient?A stargate signing client.
isLoadingbooleanBoolean value for when the initial loading is happening

useSeiCosmWasmClient

import { useSeiCosmWasmClient } from '@sei-js/react';

const { cosmWasmClient } = useSeiCosmWasmClient();
PropertyTypeDescription
cosmWasmClientCosmWasmClient?A cosm wasm client for smart contracts.
2.0.3

2 years ago

2.0.2

3 years ago

2.0.5

2 years ago

2.0.4

2 years ago

3.2.0

2 years ago

3.1.1

2 years ago

3.1.0

2 years ago

3.0.4

2 years ago

3.0.3

2 years ago

3.0.2

2 years ago

3.0.1

2 years ago

3.0.5

2 years ago

3.0.0

2 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.3.3

3 years ago

1.3.2

3 years ago

1.3.1

3 years ago

1.2.0

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.3.0

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.3

3 years ago

1.0.49

3 years ago

1.0.52

3 years ago

1.0.19

3 years ago

1.0.39

3 years ago

1.0.17

3 years ago

1.0.38

3 years ago

1.0.16

3 years ago

1.0.44

3 years ago

1.0.22

3 years ago

1.0.43

3 years ago

1.0.21

3 years ago

1.0.42

3 years ago

1.0.20

3 years ago

1.0.41

3 years ago

1.0.48

3 years ago

1.0.26

3 years ago

1.0.47

3 years ago

1.0.25

3 years ago

1.0.46

3 years ago

1.0.24

3 years ago

1.0.45

3 years ago

1.0.23

3 years ago

1.0.29

3 years ago

1.0.32

3 years ago

1.0.31

3 years ago

1.0.30

3 years ago

1.0.37

3 years ago

1.0.15

3 years ago

1.0.36

3 years ago

1.0.14

3 years ago

1.0.35

3 years ago

1.0.13

3 years ago

1.0.34

3 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago