secret-polar
Version:
Polar is a development environment to compile, deploy, test, run scrt contracts on different networks.
22 lines (21 loc) • 716 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getSigningClient = exports.getClient = void 0;
const secretjs_1 = require("secretjs");
function getClient(network) {
return new secretjs_1.SecretNetworkClient({
chainId: network.config.chainId,
url: network.config.endpoint
});
}
exports.getClient = getClient;
function getSigningClient(network, account) {
const wall = new secretjs_1.Wallet(account.mnemonic);
return new secretjs_1.SecretNetworkClient({
url: network.config.endpoint,
chainId: network.config.chainId,
wallet: wall,
walletAddress: account.address
});
}
exports.getSigningClient = getSigningClient;