diff --git a/package.json b/package.json index 36bb129..1ff6dc4 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "test": "test" }, "dependencies": { - "@bicycle-codes/identity": "^0.7.2", + "@bicycle-codes/identity": "^0.9.9", "@nichoth/nanoid": "^5.0.8", "@nichoth/nanoid-dictionary": "^5.0.2", "partysocket": "^1.0.1", diff --git a/src/index.ts b/src/index.ts index a14b4eb..347bb09 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,12 +2,13 @@ import { PartySocket } from 'partysocket' import { create as createMessage } from '@bicycle-codes/message' import Debug from '@nichoth/debug' import { - toString, - writeKeyToDid, - addDevice, - createDeviceName + // toString, + // writeKeyToDid, + // addDevice, + Identity, + createDeviceName, } from '@bicycle-codes/identity' -import type { DID, Crypto, Identity } from '@bicycle-codes/identity' +import type { DID, } from '@bicycle-codes/identity/types' import { customAlphabet } from '@nichoth/nanoid' import { numbers } from '@nichoth/nanoid-dictionary' const debug = Debug() @@ -61,7 +62,7 @@ export type Certificate = Awaited< * instance that includes the new device, after we get a message from the * new device. */ -export async function Parent (identity:Identity, oddCrypto:Crypto, { +export async function Parent (identity:Identity, { host, code, query @@ -70,7 +71,7 @@ export async function Parent (identity:Identity, oddCrypto:Crypto, { code:string; query?:string; }):Promise { - const myDid = await writeKeyToDid(oddCrypto) + const myDid = await publicKeyToDid(oddCrypto) debug('my did', myDid) const party = new PartySocket({ host,