atproto explorer

fix uint8array type errors

+6 -2
+6 -2
src/utils/verify.ts
··· 149 const { sig, ...unsigned } = commit; 150 151 const data = CBOR.encode(unsigned); 152 - const valid = await verifySig(publicKey, CBOR.fromBytes(sig), data); 153 154 if (!valid) { 155 errors.push({ message: `signature verification failed` }); ··· 234 key = key.substring(0, entry.p) + decoder.decode(CBOR.fromBytes(entry.k)); 235 236 // Calculate depth based on leading zeros in the hash 237 - const keyDigest = await toSha256(encoder.encode(key)); 238 let zeroCount = 0; 239 240 outerLoop: for (const byte of keyDigest) {
··· 149 const { sig, ...unsigned } = commit; 150 151 const data = CBOR.encode(unsigned); 152 + const valid = await verifySig( 153 + publicKey, 154 + CBOR.fromBytes(sig) as Uint8Array<ArrayBuffer>, 155 + data as Uint8Array<ArrayBuffer>, 156 + ); 157 158 if (!valid) { 159 errors.push({ message: `signature verification failed` }); ··· 238 key = key.substring(0, entry.p) + decoder.decode(CBOR.fromBytes(entry.k)); 239 240 // Calculate depth based on leading zeros in the hash 241 + const keyDigest = await toSha256(encoder.encode(key) as Uint8Array<ArrayBuffer>); 242 let zeroCount = 0; 243 244 outerLoop: for (const byte of keyDigest) {