Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rift to keyfile and bump feed version number #1135

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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