@@ -76,12 +76,36 @@ export const compileNetworkKey = (pair, point, revision) => {
7676 noun.Atom.fromInt(point),
7777 noun.Atom.fromInt(revision),
7878 noun.Atom.fromString(bnsec.toString()),
79− noun.Atom.yes
79+ noun.Atom.fromInt(0)
8080 );
8181
8282 return b64(jam(sed));
8383};
8484
85+/**
86+ * @param {number} point
87+ * @param {array<{revision: number, pair: object}>} keys
88+ * @return {string}
89+ */
90+export const compileMultiKey = (point, keys) => {
91+ const kyz = keys.map(k => {
92+ const bnsec = new BN(createRing(k.pair), 'hex');
93+ return noun.dwim(
94+ noun.Atom.fromInt(k.revision),
95+ noun.Atom.fromString(bnsec.toString())
96+ );
97+ });
98+ kyz.push(noun.Atom.fromInt(0));
99+
100+ const fed = noun.dwim(
101+ noun.dwim(noun.Atom.fromInt(1), noun.Atom.fromInt(0)), // version
102+ noun.Atom.fromInt(point), // ship
103+ noun.dwim(kyz) // keys
104+ );
105+
106+ return b64(jam(fed));
107+};
108+
85109/**
86110 * @param {object} urbitWallet
87111 * @param {number} revision