gun-eth 1.2.12 → 1.2.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +3 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gun-eth",
3
- "version": "1.2.12",
3
+ "version": "1.2.14",
4
4
  "description": "A GunDB plugin for Ethereum, and Web3",
5
5
  "main": "./src/index.js",
6
6
  "scripts": {
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 this.getSigner();
204
+ const signer = await getSigner();
204
205
  const contract = new ethers.Contract(
205
206
  SHINE_CONTRACT_ADDRESS,
206
207
  SHINE_ABI,