chaingate
Version:
A complete TypeScript library for connecting to and making transactions on different blockchains
14 lines • 742 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const PrivateKey_1 = require("../PrivateKey");
describe('Private key', () => {
it('New private key', async () => {
process.env.I_AM_SURE_I_AM_NOT_IN_PRODUCTION = String(true);
const privateKey = new PrivateKey_1.PrivateKey('741745080050f2ce656aaa2a983a6b510caa706643e1ad05214feac6677ba657');
expect(privateKey.hexa).toBe('741745080050f2ce656aaa2a983a6b510caa706643e1ad05214feac6677ba657');
});
it('Invalid private key', async () => {
await expect(async () => new PrivateKey_1.PrivateKey('Invalid hexadecimal')).rejects.toThrow(PrivateKey_1.PrivateKeyEncodingError);
});
});
//# sourceMappingURL=PrivateKey.test.js.map