Skip to content

Commit

Permalink
Add rift to keyfile and bump feed version number
Browse files Browse the repository at this point in the history
  • Loading branch information
ripperi committed May 24, 2024
1 parent 8862a81 commit f6af024
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/lib/keys.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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
);

Expand Down
1 change: 1 addition & 0 deletions src/lib/useKeyfileGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ function useKeyfileGenerator({ point, seeds }: useKeyfileGeneratorArgs) {
setKeyfile(
compileMultiKey(
resolvedPoint.value,
resolvedPoint.continuityNumber,
pairs.map((pair, k) => {
return { revision: networkRevision + k, pair };
})
Expand Down

0 comments on commit f6af024

Please sign in to comment.