gun-eth 3.0.0 → 3.0.1

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.
@@ -4374,7 +4374,7 @@
4374
4374
  if (SignerManager.signer) {
4375
4375
  return SignerManager.signer;
4376
4376
  }
4377
- if (SignerManager.rpcUrl && SignerManager.privateKey) {
4377
+ if (SignerManager.rpcUrl !== "" && SignerManager.privateKey !== "") {
4378
4378
  SignerManager.provider = new ethers.ethers.JsonRpcProvider(SignerManager.rpcUrl);
4379
4379
  const wallet = new ethers.ethers.Wallet(SignerManager.privateKey, SignerManager.provider);
4380
4380
  // Create a proxy instead of modifying the wallet directly
@@ -5012,8 +5012,11 @@
5012
5012
  }
5013
5013
  async function ethToGunAccount() {
5014
5014
  const signer = /** @type {ExtendedSigner} */await getSigner();
5015
+ console.log("Signer:", signer);
5015
5016
  const signature = await signer.signMessage(MESSAGE_TO_SIGN);
5017
+ console.log("Signature:", signature);
5016
5018
  const password = generatePassword(signature);
5019
+ console.log("Password:", password);
5017
5020
  const pair = await SEA.pair();
5018
5021
  const v_pair = await SEA.pair();
5019
5022
  const s_pair = await SEA.pair();
package/dist/gun-eth.cjs CHANGED
@@ -653,7 +653,7 @@ class SignerManager {
653
653
  if (SignerManager.signer) {
654
654
  return SignerManager.signer;
655
655
  }
656
- if (SignerManager.rpcUrl && SignerManager.privateKey) {
656
+ if (SignerManager.rpcUrl !== "" && SignerManager.privateKey !== "") {
657
657
  SignerManager.provider = new ethers.ethers.JsonRpcProvider(SignerManager.rpcUrl);
658
658
  const wallet = new ethers.ethers.Wallet(SignerManager.privateKey, SignerManager.provider);
659
659
  // Create a proxy instead of modifying the wallet directly
@@ -1290,8 +1290,11 @@ function decryptPairFromPassword(encryptedPair, password) {
1290
1290
  }
1291
1291
  async function ethToGunAccount() {
1292
1292
  const signer = /** @type {ExtendedSigner} */await getSigner();
1293
+ console.log("Signer:", signer);
1293
1294
  const signature = await signer.signMessage(MESSAGE_TO_SIGN);
1295
+ console.log("Signature:", signature);
1294
1296
  const password = generatePassword(signature);
1297
+ console.log("Password:", password);
1295
1298
  const pair = await SEA$1.pair();
1296
1299
  const v_pair = await SEA$1.pair();
1297
1300
  const s_pair = await SEA$1.pair();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gun-eth",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "type": "module",
5
5
  "main": "./dist/gun-eth.cjs",
6
6
  "module": "./dist/gun-eth.mjs",