1- import { PublicClient , WalletClient , createPublicClient , createWalletClient , http , type Chain } from "viem"
1+ import { PublicClient , WalletClient , createPublicClient , createWalletClient , http , type Chain , type Transport } from "viem"
22import { generatePrivateKey } from "viem/accounts"
33import { Order , ChainConfig , getViemChain } from "@hyperbridge/sdk"
44import type { Account } from "viem/accounts"
@@ -11,7 +11,7 @@ import { createSimplexSigner, SignerType } from "./wallet"
1111 */
1212class ViemClientFactoryImpl {
1313 private publicClients : Map < number , PublicClient > = new Map ( )
14- private walletClients : Map < number , WalletClient > = new Map ( )
14+ private walletClients : Map < number , WalletClient < Transport , Chain , Account > > = new Map ( )
1515
1616 public getPublicClient ( chainConfig : ChainConfig ) : PublicClient {
1717 if ( ! this . publicClients . has ( chainConfig . chainId ) ) {
@@ -32,7 +32,7 @@ class ViemClientFactoryImpl {
3232 return this . publicClients . get ( chainConfig . chainId ) !
3333 }
3434
35- public getWalletClient ( chainConfig : ChainConfig , account : Account ) : WalletClient {
35+ public getWalletClient ( chainConfig : ChainConfig , account : Account ) : WalletClient < Transport , Chain , Account > {
3636 if ( ! this . walletClients . has ( chainConfig . chainId ) ) {
3737 const chain = getViemChain ( chainConfig . chainId ) as Chain
3838
@@ -78,7 +78,7 @@ export class ChainClientManager {
7878 return this . clientFactory . getPublicClient ( config )
7979 }
8080
81- getWalletClient ( chain : string ) : WalletClient {
81+ getWalletClient ( chain : string ) : WalletClient < Transport , Chain , Account > {
8282 const config = this . configService . getChainConfig ( chain )
8383 return this . clientFactory . getWalletClient ( config , this . signer . account )
8484 }
@@ -94,7 +94,7 @@ export class ChainClientManager {
9494 getClientsForOrder ( order : Order ) : {
9595 destClient : PublicClient
9696 sourceClient : PublicClient
97- walletClient : WalletClient
97+ walletClient : WalletClient < Transport , Chain , Account >
9898 } {
9999 return {
100100 destClient : this . getPublicClient ( order . destination ) ,
0 commit comments