@okxweb3/coin-kaia
Version:
An kaia SDK for building Web3 wallets and applications.
16 lines • 570 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.validPrivateKey = void 0;
const coin_base_1 = require("@okxweb3/coin-base");
function validPrivateKey(privateKeyHex) {
if (!coin_base_1.base.validateHexString(privateKeyHex)) {
return false;
}
const privateKey = coin_base_1.base.fromHex(privateKeyHex.toLowerCase());
if (privateKey.length != 32 || privateKey.every((byte) => byte === 0)) {
return false;
}
return true;
}
exports.validPrivateKey = validPrivateKey;
//# sourceMappingURL=api.js.map