UNPKG

@iqai/mcp-odos

Version:
28 lines 811 B
import { http, createPublicClient, createWalletClient, } from "viem"; import { privateKeyToAccount } from "viem/accounts"; import { fraxtal } from "viem/chains"; export class WalletService { publicClient; walletClient; constructor(privateKey, chain = fraxtal) { this.publicClient = createPublicClient({ chain, transport: http(), }); if (privateKey) { const account = privateKeyToAccount(`0x${privateKey}`); this.walletClient = createWalletClient({ account, chain, transport: http(), }); } } getPublicClient() { return this.publicClient; } getWalletClient() { return this.walletClient; } } //# sourceMappingURL=wallet.js.map