forEach((k, v) => ...) should be forEach((v, k) => ...).
Below this line the share-value k is compared with the index x.
I currently don't understand the interpolate-function fully, but this doesn't look right to me.
A share is a binary blob, that is compared to an index, which is an integer...
I don't know if this is intentional, but the following line seems to be wrong: https://github.com/ilap/slip39-js/blob/4d4675c2c9e4cf52ba55bac233ca014086ed5840/src/slip39_helper.js#L285
forEach((k, v) => ...)
should beforEach((v, k) => ...)
. Below this line the share-valuek
is compared with the indexx
.I currently don't understand the interpolate-function fully, but this doesn't look right to me. A share is a binary blob, that is compared to an index, which is an integer...