@@ -122,27 +122,27 @@ export class NativeEd25519Signer<ID extends DIDKey> implements Signer<ID> {
122122 "verify" ,
123123 ] ,
124124 ) ;
125- let did = bytesToDid ( new Uint8Array ( rawPublic ) ) ;
125+ const did = bytesToDid ( new Uint8Array ( rawPublic ) ) ;
126126 return new NativeEd25519Signer ( { publicKey, privateKey } , did as ID ) ;
127127 }
128128
129129 static async generate < ID extends DIDKey > ( ) : Promise < NativeEd25519Signer < ID > > {
130130 // This notably sets only the public key as extractable, ideal as we need
131131 // access to the public key for DID generation.
132- let keypair = await globalThis . crypto . subtle . generateKey (
132+ const keypair = await globalThis . crypto . subtle . generateKey (
133133 ED25519_ALG ,
134134 false ,
135135 [
136136 "sign" ,
137137 "verify" ,
138138 ] ,
139139 ) ;
140- let did = await didFromPublicKey ( keypair . publicKey ) ;
140+ const did = await didFromPublicKey ( keypair . publicKey ) ;
141141 return new NativeEd25519Signer ( keypair , did as ID ) ;
142142 }
143143
144144 static async deserialize < ID extends DIDKey > ( keypair : CryptoKeyPair ) {
145- let did = await didFromPublicKey ( keypair . publicKey ) ;
145+ const did = await didFromPublicKey ( keypair . publicKey ) ;
146146 return new NativeEd25519Signer ( keypair , did as ID ) ;
147147 }
148148}
@@ -179,14 +179,14 @@ export class NativeEd25519Verifier<ID extends DIDKey> implements Verifier<ID> {
179179 static async fromDid < ID extends DIDKey > (
180180 did : ID ,
181181 ) : Promise < NativeEd25519Verifier < ID > > {
182- let bytes = didToBytes ( did ) ;
182+ const bytes = didToBytes ( did ) ;
183183 return await NativeEd25519Verifier . fromRaw ( bytes ) ;
184184 }
185185
186186 static async fromRaw < ID extends DIDKey > (
187187 rawPublicKey : Uint8Array ,
188188 ) : Promise < NativeEd25519Verifier < ID > > {
189- let did = bytesToDid ( new Uint8Array ( rawPublicKey ) ) as ID ;
189+ const did = bytesToDid ( new Uint8Array ( rawPublicKey ) ) as ID ;
190190 // Set the public key to be extractable for DID generation.
191191 const publicKey = await globalThis . crypto . subtle . importKey (
192192 "raw" ,
@@ -233,6 +233,6 @@ function ed25519RawToPkcs8(rawSignerKey: Uint8Array): Uint8Array {
233233}
234234
235235async function didFromPublicKey ( publicKey : CryptoKey ) : Promise < DIDKey > {
236- let rawPublicKey = await globalThis . crypto . subtle . exportKey ( "raw" , publicKey ) ;
236+ const rawPublicKey = await globalThis . crypto . subtle . exportKey ( "raw" , publicKey ) ;
237237 return bytesToDid ( new Uint8Array ( rawPublicKey ) ) ;
238238}
0 commit comments