diff --git a/src/lib/keys.js b/src/lib/keys.js index 00a8e3fe..bc079f91 100644 --- a/src/lib/keys.js +++ b/src/lib/keys.js @@ -83,10 +83,11 @@ export const compileNetworkKey = (pair, point, revision) => { /** * @param {number} point + * @param {number} continuityNumber * @param {array<{revision: number, pair: object}>} keys * @return {string} */ -export const compileMultiKey = (point, keys) => { +export const compileMultiKey = (point, continuityNumber, keys) => { const kyz = keys.map(k => { const bnsec = new BN(createRing(k.pair), 'hex'); return noun.dwim( @@ -97,8 +98,9 @@ export const compileMultiKey = (point, keys) => { kyz.push(noun.Atom.fromInt(0)); const fed = noun.dwim( - noun.dwim(noun.Atom.fromInt(1), noun.Atom.fromInt(0)), // version + noun.dwim(noun.Atom.fromInt(2), noun.Atom.fromInt(0)), // version noun.Atom.fromInt(point), // ship + noun.Atom.fromInt(continuityNumber), noun.dwim(kyz) // keys ); diff --git a/src/lib/useKeyfileGenerator.ts b/src/lib/useKeyfileGenerator.ts index 2005c125..06187945 100644 --- a/src/lib/useKeyfileGenerator.ts +++ b/src/lib/useKeyfileGenerator.ts @@ -96,6 +96,7 @@ function useKeyfileGenerator({ point, seeds }: useKeyfileGeneratorArgs) { setKeyfile( compileMultiKey( resolvedPoint.value, + resolvedPoint.continuityNumber, pairs.map((pair, k) => { return { revision: networkRevision + k, pair }; })