gun-eth 1.4.34 → 1.4.36

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,19 +4,29 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var Gun = require('gun');
6
6
  var ethers = require('ethers');
7
+ var require$$0$1 = require('url');
8
+ var require$$1 = require('path');
9
+ var require$$2 = require('fs');
7
10
  require('gun/sea.js');
8
11
 
9
12
  var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
13
+ var STEALTH_ANNOUNCER_ADDRESS = "";
14
+ var PROOF_OF_INTEGRITY_ADDRESS = "";
15
+ var require$$0 = {
16
+ STEALTH_ANNOUNCER_ADDRESS: STEALTH_ANNOUNCER_ADDRESS,
17
+ PROOF_OF_INTEGRITY_ADDRESS: PROOF_OF_INTEGRITY_ADDRESS
18
+ };
19
+
10
20
  let contractAddresses$1 = {
11
21
  PROOF_OF_INTEGRITY_ADDRESS: "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512",
12
22
  STEALTH_ANNOUNCER_ADDRESS: "0x5FbDB2315678afecb367f032d93F642f64180aa3"
13
23
  };
14
24
 
15
25
  if (typeof window === 'undefined') {
16
- const { fileURLToPath } = require('url');
17
- const { dirname } = require('path');
18
- const { readFileSync } = require('fs');
19
- const { join } = require('path');
26
+ const { fileURLToPath } = require$$0$1;
27
+ const { dirname } = require$$1;
28
+ const { readFileSync } = require$$2;
29
+ const { join } = require$$1;
20
30
 
21
31
  try {
22
32
  const __filename = fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('gun-eth.cjs.js', document.baseURI).href)));
@@ -69,7 +79,7 @@ function getAddressesForChain(chainName) {
69
79
  if (chainName === 'localhost') {
70
80
  try {
71
81
  // Carica gli indirizzi dal file generato dal deploy locale
72
- const localAddresses = require('../config/contract-address.json');
82
+ const localAddresses = require$$0;
73
83
  config = {
74
84
  ...CHAIN_CONFIG.localhost,
75
85
  ...localAddresses
package/dist/gun-eth.mjs CHANGED
@@ -1,18 +1,28 @@
1
1
  import Gun from 'gun';
2
2
  export { default as Gun, default } from 'gun';
3
3
  import { ethers } from 'ethers';
4
+ import require$$0$1 from 'url';
5
+ import require$$1 from 'path';
6
+ import require$$2 from 'fs';
4
7
  import 'gun/sea.js';
5
8
 
9
+ var STEALTH_ANNOUNCER_ADDRESS = "";
10
+ var PROOF_OF_INTEGRITY_ADDRESS = "";
11
+ var require$$0 = {
12
+ STEALTH_ANNOUNCER_ADDRESS: STEALTH_ANNOUNCER_ADDRESS,
13
+ PROOF_OF_INTEGRITY_ADDRESS: PROOF_OF_INTEGRITY_ADDRESS
14
+ };
15
+
6
16
  let contractAddresses$1 = {
7
17
  PROOF_OF_INTEGRITY_ADDRESS: "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512",
8
18
  STEALTH_ANNOUNCER_ADDRESS: "0x5FbDB2315678afecb367f032d93F642f64180aa3"
9
19
  };
10
20
 
11
21
  if (typeof window === 'undefined') {
12
- const { fileURLToPath } = require('url');
13
- const { dirname } = require('path');
14
- const { readFileSync } = require('fs');
15
- const { join } = require('path');
22
+ const { fileURLToPath } = require$$0$1;
23
+ const { dirname } = require$$1;
24
+ const { readFileSync } = require$$2;
25
+ const { join } = require$$1;
16
26
 
17
27
  try {
18
28
  const __filename = fileURLToPath(import.meta.url);
@@ -65,7 +75,7 @@ function getAddressesForChain(chainName) {
65
75
  if (chainName === 'localhost') {
66
76
  try {
67
77
  // Carica gli indirizzi dal file generato dal deploy locale
68
- const localAddresses = require('../config/contract-address.json');
78
+ const localAddresses = require$$0;
69
79
  config = {
70
80
  ...CHAIN_CONFIG.localhost,
71
81
  ...localAddresses
package/package.json CHANGED
@@ -1,9 +1,16 @@
1
1
  {
2
2
  "name": "gun-eth",
3
- "version": "1.4.34",
3
+ "version": "1.4.36",
4
4
  "description": "A GunDB plugin for Ethereum, and Web3",
5
- "main": "dist/gun-eth.min.js",
5
+ "main": "dist/browser/gun-eth.min.js",
6
6
  "type": "module",
7
+ "exports": {
8
+ ".": "./dist/browser/gun-eth.min.js",
9
+ "./dist/browser/gun-eth.min.js": "./dist/browser/gun-eth.min.js",
10
+ "./dist/types/index.d.ts": "./dist/types/index.d.ts",
11
+ "./dist/gun-eth.mjs": "./dist/gun-eth.mjs",
12
+ "./dist/gun-eth.cjs.js": "./dist/gun-eth.cjs.js"
13
+ },
7
14
  "typesVersions": {
8
15
  "*": {
9
16
  "*": [
@@ -25,7 +32,8 @@
25
32
  },
26
33
  "dependencies": {
27
34
  "express": "^4.21.1",
28
- "rollup-plugin-polyfill-node": "^0.13.0"
35
+ "rollup-plugin-polyfill-node": "^0.13.0",
36
+ "text-encoding": "^0.7.0"
29
37
  },
30
38
  "devDependencies": {
31
39
  "@nomicfoundation/hardhat-chai-matchers": "^2.0.0",