Files

47 lines
911 B
Markdown
Raw Permalink Normal View History

2026-01-01 08:04:06 -08:00
# @dbis-thirdweb/wallets
Wallet connectors and configuration for Chain 138.
## Usage
### Wallet Configuration
```typescript
import { getWalletConfig } from '@dbis-thirdweb/wallets';
const config = getWalletConfig({
confirmationBlocks: 2,
gasStrategy: {
multiplier: 1.5,
},
});
```
### Chain Switching
```typescript
import { switchToChain138, ensureChain138 } from '@dbis-thirdweb/wallets';
import { useWallet } from '@thirdweb-dev/react';
function MyComponent() {
const wallet = useWallet();
const handleSwitch = async () => {
await switchToChain138(wallet);
};
// Or use ensure (switches only if not already on Chain 138)
const handleEnsure = async () => {
await ensureChain138(wallet);
};
}
```
## Features
- Chain 138 wallet configuration defaults
- Gas strategy configuration
- RPC failover support
- Chain switching utilities
- Automatic chain addition if missing