@rialo/frost 0.5.0-alpha.0 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +7 -6
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -290,7 +290,7 @@ function SendTx({ transaction }: { transaction: Uint8Array }) {
290
290
  | Hook | Returns | Description |
291
291
  |------|---------|-------------|
292
292
  | `useWallets()` | `WalletEntity[]` | All discovered wallets |
293
- | `useWalletsReady()` | `boolean` | True when wallet discovery is complete |
293
+ | `useWalletsReady()` | `boolean` | True when at least one wallet has been discovered |
294
294
  | `useConnectWallet()` | Mutation | Connect to a wallet |
295
295
  | `useDisconnectWallet()` | Mutation | Disconnect current wallet |
296
296
  | `useConnectionStatus()` | `ConnectionStatus` | `"disconnected"` \| `"connecting"` \| `"connected"` \| `"reconnecting"` |
@@ -309,7 +309,7 @@ function SendTx({ transaction }: { transaction: Uint8Array }) {
309
309
  | Hook | Returns | Description |
310
310
  |------|---------|-------------|
311
311
  | `useChainId()` | `string` | Current chain ID (e.g., `"rialo:devnet"`) |
312
- | `useSwitchChain()` | Mutation | Switch to a different network |
312
+ | `useSwitchChain()` | `(clientConfig: RialoClientConfig) => void` | Switch to a different network |
313
313
  | `useClient()` | `RialoClient` | Direct RPC client access |
314
314
 
315
315
  ### Balance
@@ -331,7 +331,7 @@ function SendTx({ transaction }: { transaction: Uint8Array }) {
331
331
 
332
332
  ## Async/Await with mutateAsync
333
333
 
334
- All mutation hooks (`useConnectWallet`, `useSignMessage`, `useSignTransaction`, `useSendTransaction`, `useSignAndSendTransaction`, `useDisconnectWallet`, `useSwitchChain`) return both `mutate` and `mutateAsync`.
334
+ All mutation hooks (`useConnectWallet`, `useSignMessage`, `useSignTransaction`, `useSendTransaction`, `useSignAndSendTransaction`, `useDisconnectWallet`) return both `mutate` and `mutateAsync`. Note: `useSwitchChain` is not a mutation hook — it returns a plain function directly.
335
335
 
336
336
  ### Callback Pattern (mutate)
337
337
 
@@ -429,8 +429,8 @@ const { mutateAsync: disconnectAsync } = useDisconnectWallet();
429
429
  await disconnectAsync();
430
430
 
431
431
  // Switch chain
432
- const { mutateAsync: switchChainAsync } = useSwitchChain();
433
- await switchChainAsync(getDefaultRialoClientConfig("mainnet"));
432
+ const switchChain = useSwitchChain();
433
+ switchChain(getDefaultRialoClientConfig("mainnet"));
434
434
  ```
435
435
 
436
436
  ---
@@ -499,7 +499,7 @@ const {
499
499
  ```tsx
500
500
  import { getDefaultRialoClientConfig } from "@rialo/frost";
501
501
 
502
- const { mutate: switchChain } = useSwitchChain();
502
+ const switchChain = useSwitchChain();
503
503
 
504
504
  // Switch to mainnet
505
505
  switchChain(getDefaultRialoClientConfig("mainnet"));
@@ -524,6 +524,7 @@ A complete, styled connect button with dropdown:
524
524
  `${addr.slice(0, 6)}...`
525
525
  }
526
526
  showDropdown={true} // Show dropdown when connected
527
+ dropdownClassName="my-dropdown" // CSS class for dropdown container
527
528
  onConnect={(wallet, address) => {}} // Connection callback
528
529
  onDisconnect={() => {}} // Disconnect callback
529
530
  onError={(error) => {}} // Error callback
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rialo/frost",
3
- "version": "0.5.0-alpha.0",
3
+ "version": "0.10.1",
4
4
  "description": "React wallet integration library for Rialo DApps",
5
5
  "keywords": [
6
6
  "rialo",
@@ -42,10 +42,10 @@
42
42
  "react": "^18.0.0 || ^19.0.0"
43
43
  },
44
44
  "dependencies": {
45
- "@rialo/ts-cdk": "^0.5.0-alpha.0",
45
+ "@rialo/ts-cdk": "^0.10.1",
46
46
  "@tanstack/react-query": "5.90.10",
47
47
  "@tanstack/react-store": "0.8.0",
48
- "@rialo/frost-core": "^0.5.0-alpha.0"
48
+ "@rialo/frost-core": "^0.10.1"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@testing-library/jest-dom": "6.9.1",