@iqai/mcp-odos
Version:
Mcp server for Odos access
28 lines • 811 B
JavaScript
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