nostr-tools

2.20.02.21.0
lib/cjs/nipb7.js
~lib/cjs/nipb7.jsModified
+3−3
Index: package/lib/cjs/nipb7.js
===================================================================
--- package/lib/cjs/nipb7.js
+++ package/lib/cjs/nipb7.js
@@ -22,12 +22,12 @@
 __export(nipb7_exports, {
   BlossomClient: () => BlossomClient
 });
 module.exports = __toCommonJS(nipb7_exports);
-var import_sha256 = require("@noble/hashes/sha256");
+var import_sha2 = require("@noble/hashes/sha2.js");
 
 // utils.ts
-var import_utils = require("@noble/hashes/utils");
+var import_utils = require("@noble/hashes/utils.js");
 var utf8Decoder = new TextDecoder("utf-8");
 var utf8Encoder = new TextEncoder();
 
 // nipb7.ts
@@ -98,9 +98,9 @@
       throw new Error(`failed to check for ${hash}: ${error}`);
     }
   }
   async uploadBlob(file, contentType) {
-    const hash = (0, import_utils.bytesToHex)((0, import_sha256.sha256)(new Uint8Array(await file.arrayBuffer())));
+    const hash = (0, import_utils.bytesToHex)((0, import_sha2.sha256)(new Uint8Array(await file.arrayBuffer())));
     const actualContentType = contentType || file.type || "application/octet-stream";
     const bd = await this.httpCall(
       "PUT",
       "upload",