Skip to content

paulayo93/react-native-mcl

 
 

Repository files navigation

react-native-mcl

React Native MCL

Installation

npm install react-native-mcl

Usage

import * as mcl from "react-native-mcl";


mcl.init.then(() => {
    let g1 = new mcl.G1();
    g1.deserialize(new Uint8Array([
      0xc0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0,
    ]));
    let fr = new mcl.Fr();
    fr.deserialize(new Uint8Array([
      2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 0, 0,
    ]))

    const result = mcl.mul(g1, fr);
}

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

About

React Native MCL

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Assembly 53.9%
  • C++ 25.6%
  • LLVM 12.4%
  • C 2.6%
  • Java 1.5%
  • C# 1.2%
  • Other 2.8%