@@ -89,7 +89,7 @@ const eqAddr = (addr0, addr1) =>
8989 toChecksumAddress(addr0) === toChecksumAddress(addr1)
9090
9191const urbitWalletFromTicket = async (ticket, point, passphrase) => {
92− if (typeof point === 'string') {
92+ if (typeof point === 'string') { //TODO why not in kg?
9393 point = ob.patp2dec(point);
9494 }
9595 let uhdw = await kg.generateWallet({
@@ -97,12 +97,21 @@ const urbitWalletFromTicket = async (ticket, point, passphrase) => {
9797 ship: point,
9898 passphrase: passphrase
9999 });
100− //TODO remove after keygen-js#61 gets released
101− uhdw.meta.ship = point;
102− uhdw.meta.passphrase = passphrase;
103100 return uhdw;
104101}
105102
103+
104+const ownershipWalletFromTicket = async (ticket, point, passphrase) => {
105+ if (typeof point === 'string') { //TODO why not in kg?
106+ point = ob.patp2dec(point);
107+ }
108+ return await kg.generateOwnershipWallet({
109+ ticket,
110+ ship: point,
111+ passphrase
112+ })
113+}
114+
106115const walletFromMnemonic = (mnemonic, hdpath, passphrase) => {
107116 const seed =
108117 bip39.validateMnemonic(mnemonic)
@@ -135,6 +144,7 @@ export {
135144 addressFromSecp256k1Public,
136145 eqAddr,
137146 urbitWalletFromTicket,
147+ ownershipWalletFromTicket,
138148 walletFromMnemonic,
139149 addHexPrefix,
140150 EthereumWallet