Skip to content

Commit

Permalink
enhance: kaspa rpc connection (#289)
Browse files Browse the repository at this point in the history
  • Loading branch information
witter-deland authored Jan 2, 2025
1 parent 326d177 commit b76f2cc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/coin-kaspa/src/chain-wallet/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import {
Krc20RpcClient,
Krc20TransferOptions,
Krc20TransferParams,
SendKasParams
SendKasParams,
Resolver
} from '@kcoin/kaspa-web3.js';
import { createTransactions } from './utils';
import { CHAIN, CHAIN_NAME, DERIVING_PATH, FT_ASSET, NATIVE_ASSET } from './defaults';
Expand All @@ -30,9 +31,10 @@ export class KaspaChainWallet extends BaseChainWallet {
super(chainInfo, phrase);
this.validateChain(chainInfo);
this.networkId = chainInfo.isMainnet ? NetworkId.Mainnet : NetworkId.Testnet10;
const resolver = new Resolver();
this.rpcClient = new RpcClient({
networkId: this.networkId,
endpoint: this.getEndpoint(chainInfo)
resolver: resolver.createWithEndpoints([this.getEndpoint(chainInfo)])
});
this.krc20RpcClient = new Krc20RpcClient({ networkId: this.networkId });
}
Expand Down

0 comments on commit b76f2cc

Please sign in to comment.