Instantiate a connection service
import { ConnectionService, Environments, Logger } from "@peersyst/ckb-wallet-sdk";
const rpcUrl = "http://localhost:8117/rpc";
const indexerUrl = "http://localhost:8117/indexer";
const connectionService = new ConnectionService(rpcUrl, indexerUrl, Environments.Testnet);
connectionService.getBlockchainInfo().then((blockchainInfo) => {
Logger.info(blockchainInfo);
});Last updated