gun-eth 1.5.4 → 1.5.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- export { G as GunEth, M as MESSAGE_TO_SIGN, G as default, f as deriveStealthAddress, b as generatePassword, a as generateRandomId, e as getSigner, d as gunToEthAccount, i as initialize } from './index-7a06fa4c.browser.mjs';
1
+ export { G as GunEth, M as MESSAGE_TO_SIGN, G as default, f as deriveStealthAddress, b as generatePassword, a as generateRandomId, e as getSigner, d as gunToEthAccount, i as initialize } from './index-0399263c.browser.mjs';
package/dist/gun-eth.cjs CHANGED
@@ -2930,10 +2930,9 @@ Gun$1.chain.proof = function (chain, nodeId, data, callback) {
2930
2930
  return this;
2931
2931
  }
2932
2932
  try {
2933
- // Se siamo in localhost e in development, usa automaticamente la chain locale
2934
- const targetChain = isLocalEnvironment() ? 'localhost' : chain;
2935
- const chainConfig = getAddressesForChain(targetChain);
2936
- console.log(`Using ${targetChain} configuration:`, chainConfig);
2933
+ // Usa getAddressesForChain per ottenere la configurazione corretta
2934
+ const chainConfig = getAddressesForChain(chain);
2935
+ console.log(`Using ${chain} configuration:`, chainConfig);
2937
2936
 
2938
2937
  // Usa gli indirizzi dalla configurazione
2939
2938
  const contract = new ethers.ethers.Contract(chainConfig.PROOF_OF_INTEGRITY_ADDRESS, PROOF_OF_INTEGRITY_ABI, signer);
@@ -3266,8 +3265,8 @@ Gun$1.chain.announceStealthPayment = async function (stealthAddress, senderPubli
3266
3265
  if (options.onChain) {
3267
3266
  // On-chain announcement
3268
3267
  const signer = await getSigner();
3269
- const chainAddresses = getAddressesForChain(options.chain);
3270
- const contractAddress = chainAddresses.STEALTH_ANNOUNCER_ADDRESS;
3268
+ const chainConfig = getAddressesForChain(options.chain);
3269
+ const contractAddress = chainConfig.STEALTH_ANNOUNCER_ADDRESS;
3271
3270
  console.log("Using contract address:", contractAddress);
3272
3271
  const contract = new ethers.ethers.Contract(contractAddress, STEALTH_ANNOUNCER_ABI, signer);
3273
3272
 
@@ -3308,14 +3307,15 @@ Gun$1.chain.announceStealthPayment = async function (stealthAddress, senderPubli
3308
3307
  */
3309
3308
  Gun$1.chain.getStealthPayments = async function (signature) {
3310
3309
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
3311
- source: 'both'
3310
+ source: 'both',
3311
+ chain: 'optimismSepolia'
3312
3312
  };
3313
3313
  try {
3314
3314
  const payments = [];
3315
3315
  if (options.source === 'onChain' || options.source === 'both') {
3316
- // Get on-chain payments
3317
3316
  const signer = await getSigner();
3318
- const contractAddress = undefined === 'development' ? LOCAL_CONFIG.STEALTH_ANNOUNCER_ADDRESS : STEALTH_ANNOUNCER_ADDRESS;
3317
+ const chainConfig = getAddressesForChain(options.chain);
3318
+ const contractAddress = chainConfig.STEALTH_ANNOUNCER_ADDRESS;
3319
3319
  const contract = new ethers.ethers.Contract(contractAddress, STEALTH_ANNOUNCER_ABI, signer);
3320
3320
  try {
3321
3321
  // Get total number of announcements
package/dist/gun-eth.mjs CHANGED
@@ -2925,10 +2925,9 @@ Gun$1.chain.proof = function (chain, nodeId, data, callback) {
2925
2925
  return this;
2926
2926
  }
2927
2927
  try {
2928
- // Se siamo in localhost e in development, usa automaticamente la chain locale
2929
- const targetChain = isLocalEnvironment() ? 'localhost' : chain;
2930
- const chainConfig = getAddressesForChain(targetChain);
2931
- console.log(`Using ${targetChain} configuration:`, chainConfig);
2928
+ // Usa getAddressesForChain per ottenere la configurazione corretta
2929
+ const chainConfig = getAddressesForChain(chain);
2930
+ console.log(`Using ${chain} configuration:`, chainConfig);
2932
2931
 
2933
2932
  // Usa gli indirizzi dalla configurazione
2934
2933
  const contract = new ethers.Contract(chainConfig.PROOF_OF_INTEGRITY_ADDRESS, PROOF_OF_INTEGRITY_ABI, signer);
@@ -3261,8 +3260,8 @@ Gun$1.chain.announceStealthPayment = async function (stealthAddress, senderPubli
3261
3260
  if (options.onChain) {
3262
3261
  // On-chain announcement
3263
3262
  const signer = await getSigner();
3264
- const chainAddresses = getAddressesForChain(options.chain);
3265
- const contractAddress = chainAddresses.STEALTH_ANNOUNCER_ADDRESS;
3263
+ const chainConfig = getAddressesForChain(options.chain);
3264
+ const contractAddress = chainConfig.STEALTH_ANNOUNCER_ADDRESS;
3266
3265
  console.log("Using contract address:", contractAddress);
3267
3266
  const contract = new ethers.Contract(contractAddress, STEALTH_ANNOUNCER_ABI, signer);
3268
3267
 
@@ -3303,14 +3302,15 @@ Gun$1.chain.announceStealthPayment = async function (stealthAddress, senderPubli
3303
3302
  */
3304
3303
  Gun$1.chain.getStealthPayments = async function (signature) {
3305
3304
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
3306
- source: 'both'
3305
+ source: 'both',
3306
+ chain: 'optimismSepolia'
3307
3307
  };
3308
3308
  try {
3309
3309
  const payments = [];
3310
3310
  if (options.source === 'onChain' || options.source === 'both') {
3311
- // Get on-chain payments
3312
3311
  const signer = await getSigner();
3313
- const contractAddress = undefined === 'development' ? LOCAL_CONFIG.STEALTH_ANNOUNCER_ADDRESS : STEALTH_ANNOUNCER_ADDRESS;
3312
+ const chainConfig = getAddressesForChain(options.chain);
3313
+ const contractAddress = chainConfig.STEALTH_ANNOUNCER_ADDRESS;
3314
3314
  const contract = new ethers.Contract(contractAddress, STEALTH_ANNOUNCER_ABI, signer);
3315
3315
  try {
3316
3316
  // Get total number of announcements