@@ -15,7 +15,7 @@ export function generatePublicKey (privateKey: string): string {
1515 return bytesToHex ( schnorr . getPublicKey ( privateKey ) )
1616}
1717
18- export async function getPublicKey ( webId ) {
18+ export async function getPublicKey ( webId : NamedNode ) {
1919 await store . fetcher . load ( webId )
2020 const publicKeyDoc = await pubKeyUrl ( webId )
2121 try {
@@ -43,7 +43,7 @@ export async function getPrivateKey (webId: NamedNode) {
4343 // is publicKey valid ?
4444 let validPublicKey = true
4545 if ( privateKey && ( publicKey !== generatePublicKey ( privateKey as string ) ) ) {
46- if ( confirm ( 'This is strange the publicKey is not valid for\n' + webId +
46+ if ( confirm ( 'This is strange the publicKey is not valid for\n' + webId ?. uri +
4747 '\'shall we repair keeping the private key ?' ) ) validPublicKey = false
4848 }
4949
@@ -125,7 +125,7 @@ const keyAclBody = (keyDoc, me) => {
125125 * @param keyDoc
126126 * @param aclBody
127127 */
128- async function setAcl ( keyDoc , aclBody ) {
128+ async function setAcl ( keyDoc : string , aclBody : string ) {
129129 // Some servers don't present a Link http response header
130130 // if the container doesn't exist yet, refetch the resource
131131
@@ -158,7 +158,7 @@ async function setAcl (keyDoc, aclBody) {
158158 * create/edit keyDoc
159159 * set keyDoc acl
160160 */
161- async function saveKey ( keyDoc , del , add , me = '' ) {
161+ async function saveKey ( keyDoc : string , del , add , me : string = '' ) {
162162 await store . fetcher . load ( keyDoc )
163163 // delete keyAclDoc
164164 try {
0 commit comments