This repository has been archived on 2023-04-09. You can view files and clone it, but cannot push or open issues or pull requests.
chainsafe-bls/test/unit/keypair.test.ts

28 lines
869 B
TypeScript
Raw Normal View History

2020-11-20 19:03:17 +00:00
// import {expect} from "chai";
// import {IBls} from "../../src/interface";
2020-11-19 14:50:08 +00:00
2020-11-20 19:03:17 +00:00
// export function runKeypairTests(bls: IBls) {
// describe("Keypair", () => {
// it("should create from private and public key", () => {
// const sk = bls.PrivateKey.fromKeygen();
// const sk2 = bls.PrivateKey.fromKeygen();
// const pk = sk.toPublicKey();
2020-11-19 14:50:08 +00:00
2020-11-20 19:03:17 +00:00
// const keypair = new bls.Keypair(sk, pk);
2020-11-19 14:50:08 +00:00
2020-11-20 19:03:17 +00:00
// expect(keypair.publicKey).to.be.equal(pk);
// expect(keypair.privateKey).to.be.equal(sk);
// expect(keypair.privateKey).to.not.be.equal(sk2);
// });
2020-11-19 14:50:08 +00:00
2020-11-20 19:03:17 +00:00
// it("should create from PrivateKey", () => {
// const sk = bls.PrivateKey.fromKeygen();
// const pk = sk.toPublicKey();
2020-11-19 14:50:08 +00:00
2020-11-20 19:03:17 +00:00
// const keypair = new bls.Keypair(sk as any);
2020-11-19 14:50:08 +00:00
2020-11-20 19:03:17 +00:00
// expect(keypair.publicKey.toHex()).to.equal(pk.toHex());
// });
// });
// }