Closed segmond closed 6 years ago
Thanks for the report! It's great to know someone's using it.
Fixed in 075f2a603e03f2e42bcc41d3fcac7856f890507c and published to npm as v0.4.2
Refactored NodeJS and Web platform handling in v0.5.0 to be DRY and avoid this problem in the future.
The code in js-shamir-tss-gf256/code/index.nodejs.jsy doesn't match what's installed from npm. It fails as a module.
"WEBPACK_IMPORTED_MODULE_28_shamir_tss_gf256.generateShares_64 is not a function"
// github
export function generateShares_b64(secret, thresholdShares, totalShares) :: return new ShamirSecretShare().generate_b64(secret, thresholdShares, totalShares) export function generatorShares_b64(secret, thresholdShares, totalShares) :: return new ShamirSecretShare().generator_b64(secret, thresholdShares, totalShares) export function unlockShares_b64(shares_of_secret, valueIfUnderThreshold) :: return new ShamirSecretShare().unlock_b64(shares_of_secret, valueIfUnderThreshold)
// npm in shamir-tss-gf256.dbg.js
function generateShares_b64(secret, thresholdShares, totalShares) { return new ShamirSecretShare().generateShares_b64(secret, thresholdShares, totalShares)} function generatorShares_b64(secret, thresholdShares, totalShares) { return new ShamirSecretShare().generatorShares_b64(secret, thresholdShares, totalShares)}