gun-eth 1.2.12 → 1.2.14
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/package.json +1 -1
- package/src/index.js +3 -2
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -140,7 +140,7 @@ Gun.chain.createAndStoreEncryptedPair = async function (address, signature) {
|
|
|
140
140
|
const gun = this;
|
|
141
141
|
const pair = await SEA.pair();
|
|
142
142
|
const encryptedPair = await SEA.encrypt(JSON.stringify(pair), signature);
|
|
143
|
-
await gun.get("users").get(address).put({ encryptedPair });
|
|
143
|
+
await gun.get("gun-eth").get("users").get(address).put({ encryptedPair });
|
|
144
144
|
console.log("Encrypted pair stored for:", address);
|
|
145
145
|
} catch (error) {
|
|
146
146
|
console.error("Error creating and storing encrypted pair:", error);
|
|
@@ -157,6 +157,7 @@ Gun.chain.getAndDecryptPair = async function (address, signature) {
|
|
|
157
157
|
try {
|
|
158
158
|
const gun = this;
|
|
159
159
|
const encryptedData = await gun
|
|
160
|
+
.get("gun-eth")
|
|
160
161
|
.get("users")
|
|
161
162
|
.get(address)
|
|
162
163
|
.get("encryptedPair")
|
|
@@ -200,7 +201,7 @@ Gun.chain.shine = function (chain, nodeId, data, callback) {
|
|
|
200
201
|
// Funzione per verificare on-chain
|
|
201
202
|
const verifyOnChain = async (nodeId, contentHash) => {
|
|
202
203
|
console.log("Verifying on chain:", { nodeId, contentHash });
|
|
203
|
-
const signer = await
|
|
204
|
+
const signer = await getSigner();
|
|
204
205
|
const contract = new ethers.Contract(
|
|
205
206
|
SHINE_CONTRACT_ADDRESS,
|
|
206
207
|
SHINE_ABI,
|