@rainbow-me/kit-hooks
Advanced tools
+14
-3
@@ -96,3 +96,4 @@ export * from 'use-ens'; | ||
| /** | ||
| * Returns all pending txes | ||
| * A React hook to manage transaction history state with manual updating | ||
| * @returns transactions array | ||
| */ | ||
@@ -163,2 +164,7 @@ const useTxHistory = ({ initialTxes, rememberHistory, provider }) => { | ||
| /** | ||
| * A React hook to get most recently used wallet information from storage | ||
| * @param initialValue | ||
| * @returns | ||
| */ | ||
| const useWalletInfo = (initialValue = { name: '', logoURI: '' }) => { | ||
@@ -179,2 +185,6 @@ const [info, set] = useState(initialValue); | ||
| /** | ||
| * Outputs a balance of BigNumber to a human-readable format | ||
| * @returns formatted balance | ||
| */ | ||
| const useSignificantBalance = ({ provider, address, initialValue }) => { | ||
@@ -204,3 +214,3 @@ const [bal, setBal] = useState('0'); | ||
| /** | ||
| * | ||
| * A React hook to sign Ethereum messages with a Web3 provider | ||
| * @example | ||
@@ -212,5 +222,6 @@ * ```ts | ||
| * ``` | ||
| * @returns a function to sign a message | ||
| */ | ||
| const useSignMessage = ({ provider, message }) => { | ||
| return async () => { | ||
| return async function sign() { | ||
| return await provider.getSigner().signMessage(message); | ||
@@ -217,0 +228,0 @@ }; |
| import { BigNumber } from '@ethersproject/bignumber'; | ||
| import { BaseProvider } from '@ethersproject/providers'; | ||
| /** | ||
| * Outputs a balance of BigNumber to a human-readable format | ||
| * @returns formatted balance | ||
| */ | ||
| export declare const useSignificantBalance: ({ provider, address, initialValue }: { | ||
@@ -4,0 +8,0 @@ provider: BaseProvider; |
| import { Web3Provider } from '@ethersproject/providers'; | ||
| /** | ||
| * | ||
| * A React hook to sign Ethereum messages with a Web3 provider | ||
| * @example | ||
@@ -10,2 +10,3 @@ * ```ts | ||
| * ``` | ||
| * @returns a function to sign a message | ||
| */ | ||
@@ -12,0 +13,0 @@ export declare const useSignMessage: ({ provider, message }: { |
@@ -8,3 +8,4 @@ import { Transaction } from '@ethersproject/transactions'; | ||
| /** | ||
| * Returns all pending txes | ||
| * A React hook to manage transaction history state with manual updating | ||
| * @returns transactions array | ||
| */ | ||
@@ -11,0 +12,0 @@ export declare const useTxHistory: ({ initialTxes, rememberHistory, provider }: { |
@@ -0,1 +1,6 @@ | ||
| /** | ||
| * A React hook to get most recently used wallet information from storage | ||
| * @param initialValue | ||
| * @returns | ||
| */ | ||
| export declare const useWalletInfo: (initialValue?: { | ||
@@ -2,0 +7,0 @@ name: string; |
+1
-1
| { | ||
| "name": "@rainbow-me/kit-hooks", | ||
| "type": "module", | ||
| "version": "0.0.14", | ||
| "version": "0.0.15", | ||
| "exports": "./dist/index.js", | ||
@@ -6,0 +6,0 @@ "types": "./dist/index.d.ts", |
13544
6.24%350
6.71%