@gethashd/bytecave-browser 1.0.44 → 1.0.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-M5BKEAWD.js → chunk-LTSO3FCE.js} +4 -1
- package/dist/index.cjs +4 -1
- package/dist/index.js +1 -1
- package/dist/react/index.js +1 -1
- package/package.json +1 -1
- package/src/client.ts +11 -1
|
@@ -6682,7 +6682,10 @@ Nonce: ${nonce}`;
|
|
|
6682
6682
|
CONTENT_REGISTRY_ABI,
|
|
6683
6683
|
signer
|
|
6684
6684
|
);
|
|
6685
|
-
const
|
|
6685
|
+
const cidBytes32 = "0x" + cid;
|
|
6686
|
+
const appIdBytes32 = ethers2.keccak256(ethers2.toUtf8Bytes(appId));
|
|
6687
|
+
const owner = await signer.getAddress();
|
|
6688
|
+
const tx = await contract.registerContent(cidBytes32, owner, appIdBytes32, hashIdToken);
|
|
6686
6689
|
console.log("[ByteCave] ContentRegistry transaction sent:", tx.hash);
|
|
6687
6690
|
const receipt = await tx.wait();
|
|
6688
6691
|
console.log("[ByteCave] ContentRegistry registration confirmed:", receipt.hash);
|
package/dist/index.cjs
CHANGED
|
@@ -6735,7 +6735,10 @@ Nonce: ${nonce}`;
|
|
|
6735
6735
|
CONTENT_REGISTRY_ABI,
|
|
6736
6736
|
signer
|
|
6737
6737
|
);
|
|
6738
|
-
const
|
|
6738
|
+
const cidBytes32 = "0x" + cid;
|
|
6739
|
+
const appIdBytes32 = import_ethers2.ethers.keccak256(import_ethers2.ethers.toUtf8Bytes(appId));
|
|
6740
|
+
const owner = await signer.getAddress();
|
|
6741
|
+
const tx = await contract.registerContent(cidBytes32, owner, appIdBytes32, hashIdToken);
|
|
6739
6742
|
console.log("[ByteCave] ContentRegistry transaction sent:", tx.hash);
|
|
6740
6743
|
const receipt = await tx.wait();
|
|
6741
6744
|
console.log("[ByteCave] ContentRegistry registration confirmed:", receipt.hash);
|
package/dist/index.js
CHANGED
package/dist/react/index.js
CHANGED
package/package.json
CHANGED
package/src/client.ts
CHANGED
|
@@ -589,7 +589,17 @@ Nonce: ${nonce}`;
|
|
|
589
589
|
signer
|
|
590
590
|
);
|
|
591
591
|
|
|
592
|
-
|
|
592
|
+
// Convert CID to bytes32 (CID is already a SHA-256 hash, don't double-hash it)
|
|
593
|
+
const cidBytes32 = '0x' + cid;
|
|
594
|
+
|
|
595
|
+
// Hash appId to bytes32
|
|
596
|
+
const appIdBytes32 = ethers.keccak256(ethers.toUtf8Bytes(appId));
|
|
597
|
+
|
|
598
|
+
// Get signer address for owner parameter
|
|
599
|
+
const owner = await signer.getAddress();
|
|
600
|
+
|
|
601
|
+
// Use bytes32 overload to avoid double-hashing the CID
|
|
602
|
+
const tx = await contract.registerContent(cidBytes32, owner, appIdBytes32, hashIdToken);
|
|
593
603
|
console.log('[ByteCave] ContentRegistry transaction sent:', tx.hash);
|
|
594
604
|
|
|
595
605
|
const receipt = await tx.wait();
|