Comments (5)
Okay, I'll make it. Please wait a moment.
from mcl-wasm.
I've solved it by adding a never
member to distinguish Fp and Fr.
from mcl-wasm.
I'm developing https://github.com/herumi/mcl-wasm/blob/typescript/src/index.d.ts and it seems to run mostly well.
But it has something wrong.
If I comment out mapToG1
,
% npx tsc test/test-ts.ts
test/test-ts.ts:247:13 - error TS2345: Argument of type 'Fr' is not assignable to parameter of type 'Fp'.
Property 'mapToG1' is missing in type 'IntType' but required in type 'Fp'.
247 z.set_a(c)
~
src/index.d.ts:49:5
49 mapToG1(): G1; // QQQ : why does this cause an error?
~~~~~~~
'mapToG1' is declared here.
test/test-ts.ts:447:25 - error TS2345: Argument of type 'Fr' is not assignable to parameter of type 'G1'.
Type 'IntType' is missing the following properties from type 'G1': setX, setY, setZ, getX, and 5 more.
447 const e = mcl.pairing(mcl.mul(mpk, r), Q)
I I wonder why mcl.add
for Fp
returns mcl.Fr
.
I'm just starting to study TypeScript and I'm not sure.
from mcl-wasm.
from mcl-wasm.
Thanks @herumi !
from mcl-wasm.
Related Issues (20)
- mulVec is not exposed HOT 5
- Beautify mcl_c.js and mcl_c512.js to reduce error size HOT 4
- Checking if a value is on curve? HOT 5
- Expose mclBnFp_mapToG1 and mclBnFp2_mapToG2 HOT 1
- Pairing: check if G1/G2 not in expected subgroup HOT 4
- Can't resolve 'perf_hooks' HOT 12
- index.d.ts isn't published with npm module HOT 4
- Expose G1.mapTo and G2.mapTo
- `ReferenceError: window is not defined` upon import HOT 16
- getStr() incorrect result HOT 1
- run `mcl-wasm` inside SES HOT 38
- Multiply point with scalar value HOT 3
- How to set the vaule of G? HOT 8
- BLS Fr setHashOf HOT 4
- err _wrapInput when trying to invoke setStr HOT 3
- Possible to mod order? HOT 3
- Use with webpack? HOT 8
- Intermittent issue with GT.setStr() HOT 3
- Cannot import scalar values from BLS12-381 Ethereum test suite HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mcl-wasm.