@@ -89,7 +89,7 @@ const eqAddr = (addr0, addr1) =>
89 toChecksumAddress(addr0) === toChecksumAddress(addr1)
89 toChecksumAddress(addr0) === toChecksumAddress(addr1)
91const urbitWalletFromTicket = async (ticket, point, passphrase) => {
91const urbitWalletFromTicket = async (ticket, point, passphrase) => {
92− if (typeof point === 'string') {
92+ if (typeof point === 'string') { //TODO why not in kg?
93 point = ob.patp2dec(point);
93 point = ob.patp2dec(point);
95 let uhdw = await kg.generateWallet({
95 let uhdw = await kg.generateWallet({
@@ -97,12 +97,21 @@ const urbitWalletFromTicket = async (ticket, point, passphrase) => {
97 ship: point,
97 ship: point,
98 passphrase: passphrase
98 passphrase: passphrase
100− //TODO remove after keygen-js#61 gets released
101− uhdw.meta.ship = point;
102− uhdw.meta.passphrase = passphrase;
103 return uhdw;
100 return uhdw;
104+const ownershipWalletFromTicket = async (ticket, point, passphrase) => {
105+ if (typeof point === 'string') { //TODO why not in kg?
106+ point = ob.patp2dec(point);
108+ return await kg.generateOwnershipWallet({
106const walletFromMnemonic = (mnemonic, hdpath, passphrase) => {
115const walletFromMnemonic = (mnemonic, hdpath, passphrase) => {
107 const seed =
116 const seed =
108 bip39.validateMnemonic(mnemonic)
117 bip39.validateMnemonic(mnemonic)
@@ -135,6 +144,7 @@ export {
135 addressFromSecp256k1Public,
144 addressFromSecp256k1Public,
137 urbitWalletFromTicket,
146 urbitWalletFromTicket,
147+ ownershipWalletFromTicket,
138 walletFromMnemonic,
148 walletFromMnemonic,
139 addHexPrefix,
149 addHexPrefix,
140 EthereumWallet
150 EthereumWallet