gun-eth 1.4.36 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/gun-eth.min.js +12 -0
- package/dist/index.js +12 -0
- package/package.json +19 -32
- package/dist/browser/_polyfill-node.path-9a915936.js +0 -2
- package/dist/browser/_polyfill-node.path-9a915936.js.map +0 -1
- package/dist/browser/_polyfill-node.url-0266579c.js +0 -3
- package/dist/browser/_polyfill-node.url-0266579c.js.map +0 -1
- package/dist/browser/gun-eth.min.js +0 -13
- package/dist/browser/gun-eth.min.js.map +0 -1
- package/dist/gun-eth.cjs.js +0 -1428
- package/dist/gun-eth.mjs +0 -1416
- package/src/abis/abis.js +0 -398
- package/src/config/contract-address.json +0 -4
- package/src/config/local.js +0 -29
- package/src/index.js +0 -999
package/package.json
CHANGED
@@ -1,39 +1,24 @@
|
|
1
1
|
{
|
2
2
|
"name": "gun-eth",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.5.1",
|
4
4
|
"description": "A GunDB plugin for Ethereum, and Web3",
|
5
|
-
"main": "dist/
|
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
|
-
},
|
14
|
-
"typesVersions": {
|
15
|
-
"*": {
|
16
|
-
"*": [
|
17
|
-
"dist/types/*"
|
18
|
-
]
|
19
|
-
}
|
20
|
-
},
|
5
|
+
"main": "dist/index.js",
|
21
6
|
"scripts": {
|
22
7
|
"test": "echo \"Error: no test specified\" && exit 1",
|
23
8
|
"start-gun": "node startGun.js",
|
24
9
|
"compile": "hardhat compile",
|
25
10
|
"start-node": "hardhat node",
|
26
11
|
"deploy-local": "hardhat run scripts/start-local-node.cjs --network localhost",
|
27
|
-
"test-stealth": "cross-env NODE_ENV=development node --experimental-json-modules
|
28
|
-
"test-proof": "cross-env NODE_ENV=development node --experimental-json-modules
|
12
|
+
"test-stealth": "cross-env NODE_ENV=development node --experimental-json-modules examples/stealth-example.js",
|
13
|
+
"test-proof": "cross-env NODE_ENV=development node --experimental-json-modules examples/proof-example.js",
|
29
14
|
"build": "rollup -c",
|
30
15
|
"build:watch": "rollup -c -w",
|
31
|
-
"
|
16
|
+
"clean": "rimraf dist"
|
32
17
|
},
|
33
18
|
"dependencies": {
|
19
|
+
"ethers": "^6.0.0",
|
34
20
|
"express": "^4.21.1",
|
35
|
-
"
|
36
|
-
"text-encoding": "^0.7.0"
|
21
|
+
"gun": "^0.2020.1239"
|
37
22
|
},
|
38
23
|
"devDependencies": {
|
39
24
|
"@nomicfoundation/hardhat-chai-matchers": "^2.0.0",
|
@@ -41,25 +26,24 @@
|
|
41
26
|
"@nomicfoundation/hardhat-network-helpers": "^1.0.0",
|
42
27
|
"@nomicfoundation/hardhat-toolbox": "^3.0.0",
|
43
28
|
"@nomicfoundation/hardhat-verify": "^1.0.0",
|
44
|
-
"@rollup/plugin-commonjs": "^25.0.0",
|
45
|
-
"@rollup/plugin-json": "^6.0.0",
|
46
|
-
"@rollup/plugin-node-resolve": "^15.0.0",
|
47
|
-
"@rollup/plugin-terser": "^0.4.0",
|
48
29
|
"@typechain/ethers-v6": "^0.4.0",
|
49
30
|
"@typechain/hardhat": "^8.0.0",
|
50
31
|
"@types/chai": "^4.2.0",
|
51
32
|
"@types/mocha": "^10.0.1",
|
52
33
|
"chai": "^4.2.0",
|
53
34
|
"cross-env": "^7.0.3",
|
54
|
-
"ethers": "^6.13.4",
|
55
|
-
"gun": "^0.2020.1240",
|
56
35
|
"hardhat": "^2.17.0",
|
57
36
|
"hardhat-gas-reporter": "^1.0.8",
|
58
|
-
"rollup": "^3.0.0",
|
59
37
|
"solidity-coverage": "^0.8.1",
|
60
38
|
"ts-node": "^10.9.1",
|
61
39
|
"typechain": "^8.2.0",
|
62
|
-
"typescript": "^5.0.0"
|
40
|
+
"typescript": "^5.0.0",
|
41
|
+
"@rollup/plugin-commonjs": "^25.0.0",
|
42
|
+
"@rollup/plugin-node-resolve": "^15.0.0",
|
43
|
+
"@rollup/plugin-json": "^6.0.0",
|
44
|
+
"@rollup/plugin-terser": "^0.4.0",
|
45
|
+
"rollup": "^3.0.0",
|
46
|
+
"rimraf": "^5.0.0"
|
63
47
|
},
|
64
48
|
"author": "scobru",
|
65
49
|
"repository": {
|
@@ -77,8 +61,11 @@
|
|
77
61
|
"gun",
|
78
62
|
"db"
|
79
63
|
],
|
64
|
+
"bugs": {
|
65
|
+
"url": "https://github.com/scobru/gun-eth/issues"
|
66
|
+
},
|
67
|
+
"homepage": "https://github.com/scobru/gun-eth#readme",
|
80
68
|
"files": [
|
81
|
-
"dist"
|
82
|
-
"src"
|
69
|
+
"dist"
|
83
70
|
]
|
84
71
|
}
|
@@ -1,2 +0,0 @@
|
|
1
|
-
var r=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;function t(r){var t=n(r),e="/"===o(r,-1);return(r=function(r,t){for(var n=0,e=r.length-1;e>=0;e--){var u=r[e];"."===u?r.splice(e,1):".."===u?(r.splice(e,1),n++):n&&(r.splice(e,1),n--)}if(t)for(;n--;n)r.unshift("..");return r}(i(r.split("/"),(function(r){return!!r})),!t).join("/"))||t||(r="."),r&&e&&(r+="/"),(t?"/":"")+r}function n(r){return"/"===r.charAt(0)}function e(){return t(i(Array.prototype.slice.call(arguments,0),(function(r,t){if("string"!=typeof r)throw new TypeError("Arguments to path.join must be strings");return r})).join("/"))}function u(t){var n,e=(n=t,r.exec(n).slice(1)),u=e[0],i=e[1];return u||i?(i&&(i=i.substr(0,i.length-1)),u+i):"."}function i(r,t){if(r.filter)return r.filter(t);for(var n=[],e=0;e<r.length;e++)t(r[e],e,r)&&n.push(r[e]);return n}var o="b"==="ab".substr(-1)?function(r,t,n){return r.substr(t,n)}:function(r,t,n){return t<0&&(t=r.length+t),r.substr(t,n)};export{u as dirname,n as isAbsolute,e as join,t as normalize};
|
2
|
-
//# sourceMappingURL=_polyfill-node.path-9a915936.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"_polyfill-node.path-9a915936.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
@@ -1,3 +0,0 @@
|
|
1
|
-
/*! https://mths.be/punycode v1.4.1 by @mathias */
|
2
|
-
var t=2147483647,e=/[^\x20-\x7E]/,r=/[\x2E\u3002\uFF0E\uFF61]/g,n={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},o=Math.floor,a=String.fromCharCode;function h(t){throw new RangeError(n[t])}function s(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function i(t,e,r){var n=0;for(t=r?o(t/700):t>>1,t+=o(t/e);t>455;n+=36)t=o(t/35);return o(n+36*t/(t+38))}function u(n){return function(t,e){var n=t.split("@"),o="";n.length>1&&(o=n[0]+"@",t=n[1]);var a=function(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}((t=t.replace(r,".")).split("."),e).join(".");return o+a}(n,(function(r){return e.test(r)?"xn--"+function(e){var r,n,u,p,l,c,f,m,v,g,y,d,b,j,O,x=[];for(e=function(t){for(var e,r,n=[],o=0,a=t.length;o<a;)(e=t.charCodeAt(o++))>=55296&&e<=56319&&o<a?56320==(64512&(r=t.charCodeAt(o++)))?n.push(((1023&e)<<10)+(1023&r)+65536):(n.push(e),o--):n.push(e);return n}(e),d=e.length,r=128,n=0,l=72,c=0;c<d;++c)(y=e[c])<128&&x.push(a(y));for(u=p=x.length,p&&x.push("-");u<d;){for(f=t,c=0;c<d;++c)(y=e[c])>=r&&y<f&&(f=y);for(f-r>o((t-n)/(b=u+1))&&h("overflow"),n+=(f-r)*b,r=f,c=0;c<d;++c)if((y=e[c])<r&&++n>t&&h("overflow"),y==r){for(m=n,v=36;!(m<(g=v<=l?1:v>=l+26?26:v-l));v+=36)O=m-g,j=36-g,x.push(a(s(g+O%j,0))),m=o(O/j);x.push(a(s(m,0))),l=i(n,b,u==p),n=0,++u}++n,++r}return x.join("")}(r):r}))}function p(t){return null===t}function l(t){return"string"==typeof t}function c(t){return"object"==typeof t&&null!==t}function f(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var m=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function v(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}}function g(t,e){if(t.map)return t.map(e);for(var r=[],n=0;n<t.length;n++)r.push(e(t[n],n));return r}var y=Object.keys||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.push(r);return e};function d(t,e,r,n){e=e||"&",r=r||"=";var o={};if("string"!=typeof t||0===t.length)return o;var a=/\+/g;t=t.split(e);var h=1e3;n&&"number"==typeof n.maxKeys&&(h=n.maxKeys);var s=t.length;h>0&&s>h&&(s=h);for(var i=0;i<s;++i){var u,p,l,c,v=t[i].replace(a,"%20"),g=v.indexOf(r);g>=0?(u=v.substr(0,g),p=v.substr(g+1)):(u=v,p=""),l=decodeURIComponent(u),c=decodeURIComponent(p),f(o,l)?m(o[l])?o[l].push(c):o[l]=[o[l],c]:o[l]=c}return o}function b(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var j=/^([a-z0-9.+-]+:)/i,O=/:[0-9]*$/,x=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,w=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),q=["'"].concat(w),C=["%","/","?",";","#"].concat(q),A=["/","?","#"],R=/^[+a-z0-9A-Z_-]{0,63}$/,I=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,U={javascript:!0,"javascript:":!0},E={javascript:!0,"javascript:":!0},T={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function k(t,e,r){if(t&&c(t)&&t instanceof b)return t;var n=new b;return n.parse(t,e,r),n}function F(t){if("string"==typeof t)t=(new b).parse(t);else if(!(t instanceof b))throw new TypeError('The "path" argument must be of type string or an instance of URL. Received type '+typeof t+String(t));if("file:"!==t.protocol)throw new TypeError("The URL must be of scheme file");return function(t){const e=t.pathname;for(let t=0;t<e.length;t++)if("%"===e[t]){const r=32|e.codePointAt(t+2);if("2"===e[t+1]&&102===r)throw new TypeError("must not include encoded / characters")}return decodeURIComponent(e)}(t)}function L(t){var e=t.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var r,n,o,a,h=t.protocol||"",s=t.pathname||"",i=t.hash||"",u=!1,p="";t.host?u=e+t.host:t.hostname&&(u=e+(-1===t.hostname.indexOf(":")?t.hostname:"["+this.hostname+"]"),t.port&&(u+=":"+t.port)),t.query&&c(t.query)&&Object.keys(t.query).length&&(r=t.query,n=n||"&",o=o||"=",null===r&&(r=void 0),p="object"==typeof r?g(y(r),(function(t){var e=encodeURIComponent(v(t))+o;return m(r[t])?g(r[t],(function(t){return e+encodeURIComponent(v(t))})).join(n):e+encodeURIComponent(v(r[t]))})).join(n):a?encodeURIComponent(v(a))+o+encodeURIComponent(v(r)):"");var l=t.search||p&&"?"+p||"";return h&&":"!==h.substr(-1)&&(h+=":"),t.slashes||(!h||T[h])&&!1!==u?(u="//"+(u||""),s&&"/"!==s.charAt(0)&&(s="/"+s)):u||(u=""),i&&"#"!==i.charAt(0)&&(i="#"+i),l&&"?"!==l.charAt(0)&&(l="?"+l),h+u+(s=s.replace(/[?#]/g,(function(t){return encodeURIComponent(t)})))+(l=l.replace("#","%23"))+i}function P(t){var e=t.host,r=O.exec(e);r&&(":"!==(r=r[0])&&(t.port=r.substr(1)),e=e.substr(0,e.length-r.length)),e&&(t.hostname=e)}b.prototype.parse=function(t,e,r){return function(t,e,r,n){if(!l(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),a=-1!==o&&o<e.indexOf("#")?"?":"#",h=e.split(a),s=/\\/g;h[0]=h[0].replace(s,"/"),e=h.join(a);var i=e;if(i=i.trim(),!n&&1===e.split("#").length){var p=x.exec(i);if(p)return t.path=i,t.href=i,t.pathname=p[1],p[2]?(t.search=p[2],t.query=r?d(t.search.substr(1)):t.search.substr(1)):r&&(t.search="",t.query={}),t}var c,f,m,v,g=j.exec(i);if(g){var y=(g=g[0]).toLowerCase();t.protocol=y,i=i.substr(g.length)}if(n||g||i.match(/^\/\/[^@\/]+@[^@\/]+/)){var b="//"===i.substr(0,2);!b||g&&E[g]||(i=i.substr(2),t.slashes=!0)}if(!E[g]&&(b||g&&!T[g])){var O,w,k=-1;for(c=0;c<A.length;c++)-1!==(f=i.indexOf(A[c]))&&(-1===k||f<k)&&(k=f);for(-1!==(w=-1===k?i.lastIndexOf("@"):i.lastIndexOf("@",k))&&(O=i.slice(0,w),i=i.slice(w+1),t.auth=decodeURIComponent(O)),k=-1,c=0;c<C.length;c++)-1!==(f=i.indexOf(C[c]))&&(-1===k||f<k)&&(k=f);-1===k&&(k=i.length),t.host=i.slice(0,k),i=i.slice(k),P(t),t.hostname=t.hostname||"";var F="["===t.hostname[0]&&"]"===t.hostname[t.hostname.length-1];if(!F){var $=t.hostname.split(/\./);for(c=0,m=$.length;c<m;c++){var z=$[c];if(z&&!z.match(R)){for(var S="",K=0,Z=z.length;K<Z;K++)z.charCodeAt(K)>127?S+="x":S+=z[K];if(!S.match(R)){var _=$.slice(0,c),H=$.slice(c+1),M=z.match(I);M&&(_.push(M[1]),H.unshift(M[2])),H.length&&(i="/"+H.join(".")+i),t.hostname=_.join(".");break}}}}t.hostname.length>255?t.hostname="":t.hostname=t.hostname.toLowerCase(),F||(t.hostname=u(t.hostname)),v=t.port?":"+t.port:"";var B=t.hostname||"";t.host=B+v,t.href+=t.host,F&&(t.hostname=t.hostname.substr(1,t.hostname.length-2),"/"!==i[0]&&(i="/"+i))}if(!U[y])for(c=0,m=q.length;c<m;c++){var D=q[c];if(-1!==i.indexOf(D)){var G=encodeURIComponent(D);G===D&&(G=escape(D)),i=i.split(D).join(G)}}var J=i.indexOf("#");-1!==J&&(t.hash=i.substr(J),i=i.slice(0,J));var N=i.indexOf("?");-1!==N?(t.search=i.substr(N),t.query=i.substr(N+1),r&&(t.query=d(t.query)),i=i.slice(0,N)):r&&(t.search="",t.query={});i&&(t.pathname=i);T[y]&&t.hostname&&!t.pathname&&(t.pathname="/");if(t.pathname||t.search){v=t.pathname||"";var Q=t.search||"";t.path=v+Q}return t.href=L(t),t}(this,t,e,r)},b.prototype.format=function(){return L(this)},b.prototype.resolve=function(t){return this.resolveObject(k(t,!1,!0)).format()},b.prototype.resolveObject=function(t){if(l(t)){var e=new b;e.parse(t,!1,!0),t=e}for(var r,n=new b,o=Object.keys(this),a=0;a<o.length;a++){var h=o[a];n[h]=this[h]}if(n.hash=t.hash,""===t.href)return n.href=n.format(),n;if(t.slashes&&!t.protocol){for(var s=Object.keys(t),i=0;i<s.length;i++){var u=s[i];"protocol"!==u&&(n[u]=t[u])}return T[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(t.protocol&&t.protocol!==n.protocol){if(!T[t.protocol]){for(var c=Object.keys(t),f=0;f<c.length;f++){var m=c[f];n[m]=t[m]}return n.href=n.format(),n}if(n.protocol=t.protocol,t.host||E[t.protocol])n.pathname=t.pathname;else{for(r=(t.pathname||"").split("/");r.length&&!(t.host=r.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==r[0]&&r.unshift(""),r.length<2&&r.unshift(""),n.pathname=r.join("/")}if(n.search=t.search,n.query=t.query,n.host=t.host||"",n.auth=t.auth,n.hostname=t.hostname||t.host,n.port=t.port,n.pathname||n.search){var v=n.pathname||"",g=n.search||"";n.path=v+g}return n.slashes=n.slashes||t.slashes,n.href=n.format(),n}var y,d=n.pathname&&"/"===n.pathname.charAt(0),j=t.host||t.pathname&&"/"===t.pathname.charAt(0),O=j||d||n.host&&t.pathname,x=O,w=n.pathname&&n.pathname.split("/")||[],q=n.protocol&&!T[n.protocol];if(r=t.pathname&&t.pathname.split("/")||[],q&&(n.hostname="",n.port=null,n.host&&(""===w[0]?w[0]=n.host:w.unshift(n.host)),n.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===r[0]?r[0]=t.host:r.unshift(t.host)),t.host=null),O=O&&(""===r[0]||""===w[0])),j)n.host=t.host||""===t.host?t.host:n.host,n.hostname=t.hostname||""===t.hostname?t.hostname:n.hostname,n.search=t.search,n.query=t.query,w=r;else if(r.length)w||(w=[]),w.pop(),w=w.concat(r),n.search=t.search,n.query=t.query;else if(null!=t.search)return q&&(n.hostname=n.host=w.shift(),(y=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=y.shift(),n.host=n.hostname=y.shift())),n.search=t.search,n.query=t.query,p(n.pathname)&&p(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n;if(!w.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var C=w.slice(-1)[0],A=(n.host||t.host||w.length>1)&&("."===C||".."===C)||""===C,R=0,I=w.length;I>=0;I--)"."===(C=w[I])?w.splice(I,1):".."===C?(w.splice(I,1),R++):R&&(w.splice(I,1),R--);if(!O&&!x)for(;R--;R)w.unshift("..");!O||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),A&&"/"!==w.join("/").substr(-1)&&w.push("");var U=""===w[0]||w[0]&&"/"===w[0].charAt(0);return q&&(n.hostname=n.host=U?"":w.length?w.shift():"",(y=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=y.shift(),n.host=n.hostname=y.shift())),(O=O||n.host&&w.length)&&!U&&w.unshift(""),w.length?n.pathname=w.join("/"):(n.pathname=null,n.path=null),p(n.pathname)&&p(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},b.prototype.parseHost=function(){return P(this)};export{b as Url,F as fileURLToPath,k as parse};
|
3
|
-
//# sourceMappingURL=_polyfill-node.url-0266579c.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"_polyfill-node.url-0266579c.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|