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/src/blst/index.ts

29 lines
671 B
TypeScript
Raw Normal View History

2020-11-30 18:01:13 +00:00
import {SecretKey} from "./secretKey";
2020-11-19 13:22:41 +00:00
import {PublicKey} from "./publicKey";
import {Signature} from "./signature";
2020-11-20 19:03:17 +00:00
import {IBls} from "../interface";
import {functionalInterfaceFactory} from "../functional";
2020-11-28 19:14:06 +00:00
export * from "../constants";
2020-11-19 13:22:41 +00:00
2020-11-30 18:01:13 +00:00
export {SecretKey, PublicKey, Signature};
2020-11-19 13:22:41 +00:00
2020-11-25 16:09:44 +00:00
export async function init(): Promise<void> {
2020-11-19 13:22:41 +00:00
// Native bindings require no init() call
}
2020-11-20 12:27:30 +00:00
export function destroy(): void {
2020-11-19 13:22:41 +00:00
// Native bindings require no destroy() call
}
export const bls: IBls = {
implementation: "blst-native",
2020-11-30 18:01:13 +00:00
SecretKey,
2020-11-19 13:22:41 +00:00
PublicKey,
Signature,
2020-11-30 18:01:13 +00:00
...functionalInterfaceFactory({SecretKey, PublicKey, Signature}),
2020-11-25 16:09:44 +00:00
init,
2020-11-19 13:22:41 +00:00
destroy,
};
2020-11-20 19:03:17 +00:00
export default bls;