0.0.44 • Published 10 months ago
@unielon/wallet-connect-react v0.0.44
Dogeuni Wallet browser extension & React Provider
Powering the future for Dogeuni DRC20 Wallet. Connecting the Unielon Wallet to the base library through React Provider.
Installation
yarn add @unielon/wallet-connect-reactnpm i @unielon/wallet-connect-react --saveInitialize
/* App.jsx */
import { WalletConnect } from '@unielon/wallet-connect-react'
export default App(){
return (
<WalletProvider blockRefresh={5000}>
...
</WalletProvider>
)
}WalletProvider coinfig state
| state | type | default | description |
|---|---|---|---|
| blockRefresh | number | 1000 * 60 | Interval in milliseconds to refresh the block data |
connect to dogeuni wallet
/* ConnectButton.jsx */
import { useWallet } from './provider'
export default function ConnectButton() {
const { connect, connectLoading, address } = useWallet()
return <button onClick={() => connect()}>{connectLoading ? 'connecting...' : address || 'Connect Wallet'}</button>
}wallet state
| state | type | default | description |
|---|---|---|---|
address | string | null | The currently connected wallet address |
installed | boolean | false | Whether the extension is installed |
connected | boolean | false | Whether it is connected to the wallet extension |
sendLoading | boolean | false | Loading state for sending transactions |
connectLoading | boolean | false | Loading state for connecting to the wallet |
sendError | string | Error message for sending transactions | |
dogecoinBalance | number | null | Balance of Dogecoin |
publicKey | string | null | Public key of the wallet |
network | string | null | Current network |
currency | string | usd | Current currency |
currentCurrency | string | { name: 'USD', symbol: '$' } | Current selected currency |
currencyList | array | CurrencyItemType[] | List of available currencies, CurrencyItemType[] |
uniBlock | function | null | get the current Unielon block |
dogeBlock | function | null | get the current Dogecoin block |
price | function | null | get the current price |
fee | function | null | get the current fee |
wallet actions
| action | type | default | description |
|---|---|---|---|
sendTransfer | function | null | base wallet action |
connect | function | null | connect to the wallet |
sendInscribe | function | null | mint & inscribe DRC20 tick |
sendTransfer | function | null | DRC20 tick transfer |
sendSwap | function | null | DRC20 swap exchange |
sendExchange | function | null | DRC20 market exchange |
sendBox | function | null | send box exchange |
sendNft | function | null | NFT exchange |
sendStake | function | null | stake |
sendPump | function | null | pump swap & transfer |
sendDoge | function | null | send doge |
getBalance | function | null | get Dogecoin balance |
networkChange | function | null | current Dogecoin network |
accountChange | function | null | address account change |
currencyChange | function | null | current currency change |
getBlockNumber | function | null | get the current block number |
getFee | function | null | retrieve the fee |
getPrice | function | null | retrieve the price |
initPriceFee | function | null | initialize the price and fee |
0.0.44
10 months ago
0.0.42
10 months ago
0.0.43
10 months ago
0.0.40
10 months ago
0.0.41
10 months ago
0.0.37
11 months ago
0.0.38
11 months ago
0.0.39
11 months ago
0.0.35
11 months ago
0.0.36
11 months ago
0.0.34
11 months ago
0.0.30
11 months ago
0.0.31
11 months ago
0.0.32
11 months ago
0.0.33
11 months ago
0.0.28
11 months ago
0.0.29
11 months ago
0.0.22
11 months ago
0.0.24
11 months ago
0.0.25
11 months ago
0.0.26
11 months ago
0.0.27
11 months ago
0.0.20
11 months ago
0.0.21
11 months ago
0.0.19
11 months ago
0.0.15
12 months ago
0.0.16
12 months ago
0.0.17
12 months ago
0.0.18
12 months ago
0.0.14
1 year ago
0.0.13
1 year ago
0.0.12
1 year ago
0.0.11
1 year ago
0.0.10
1 year ago
0.0.9
1 year ago
0.0.8
1 year ago
0.0.7
1 year ago
0.0.6
1 year ago
0.0.5
1 year ago
0.0.4
1 year ago
0.0.3
1 year ago
0.0.2
1 year ago
0.0.1
1 year ago