@@ -2,6 +2,7 @@ import ob from 'urbit-ob';
2import kg from 'urbit-key-generation';
2import kg from 'urbit-key-generation';
3import * as more from 'more-entropy';
3import * as more from 'more-entropy';
4import { chunk, flatMap, zipWith } from 'lodash';
4import { chunk, flatMap, zipWith } from 'lodash';
5+import { shax, shas } from 'lib/networkCode';
@@ -44,6 +45,27 @@ export const makeTicket = point => {
48+export const makeDeterministicTicket = (point, seed) => {
51+ ? GALAXY_ENTROPY_BITS
54+ : PLANET_ENTROPY_BITS;
56+ const bytes = bits / 8;
58+ const pointSalt = Buffer.concat([
59+ Buffer.from(point.toString()),
60+ Buffer.from('invites'),
62+ const entropy = shas(seed, pointSalt);
64+ const buf = entropy.slice(0, bytes);
65+ const patq = ob.hex2patq(buf.toString('hex'));
47// return a wallet object
69// return a wallet object
48export const generateWallet = async (point, ticket, boot) => {
70export const generateWallet = async (point, ticket, boot) => {
49 const config = {
71 const config = {