admin: updated dist files
This commit is contained in:
parent
9bff2cb3d9
commit
ab628c285e
130
package-lock.json
generated
130
package-lock.json
generated
@ -28,9 +28,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"@babel/core": {
|
||||
"version": "7.17.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.7.tgz",
|
||||
"integrity": "sha512-djHlEfFHnSnTAcPb7dATbiM5HxGOP98+3JLBZtjRb5I7RXrw7kFRoG2dXM8cm3H+o11A8IFH/uprmJpwFynRNQ==",
|
||||
"version": "7.17.8",
|
||||
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.8.tgz",
|
||||
"integrity": "sha512-OdQDV/7cRBtJHLSOBqqbYNkOcydOgnX59TZx4puf41fzcVtN3e/4yqY8lMQsK+5X2lJtAdmA+6OHqsj1hBJ4IQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@ampproject/remapping": "^2.1.0",
|
||||
@ -38,8 +38,8 @@
|
||||
"@babel/generator": "^7.17.7",
|
||||
"@babel/helper-compilation-targets": "^7.17.7",
|
||||
"@babel/helper-module-transforms": "^7.17.7",
|
||||
"@babel/helpers": "^7.17.7",
|
||||
"@babel/parser": "^7.17.7",
|
||||
"@babel/helpers": "^7.17.8",
|
||||
"@babel/parser": "^7.17.8",
|
||||
"@babel/template": "^7.16.7",
|
||||
"@babel/traverse": "^7.17.3",
|
||||
"@babel/types": "^7.17.0",
|
||||
@ -51,9 +51,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/parser": {
|
||||
"version": "7.17.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.7.tgz",
|
||||
"integrity": "sha512-bm3AQf45vR4gKggRfvJdYJ0gFLoCbsPxiFLSH6hTVYABptNHY6l9NrhnucVjQ/X+SPtLANT9lc0fFhikj+VBRA==",
|
||||
"version": "7.17.8",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.8.tgz",
|
||||
"integrity": "sha512-BoHhDJrJXqcg+ZL16Xv39H9n+AqJ4pcDrQBGZN+wHxIysrLZ3/ECwCBUch/1zUNhnsXULcONU3Ei5Hmkfk6kiQ==",
|
||||
"dev": true
|
||||
},
|
||||
"@babel/types": {
|
||||
@ -67,9 +67,9 @@
|
||||
}
|
||||
},
|
||||
"debug": {
|
||||
"version": "4.3.3",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
|
||||
"integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ms": "2.1.2"
|
||||
@ -328,9 +328,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"@babel/helpers": {
|
||||
"version": "7.17.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.17.7.tgz",
|
||||
"integrity": "sha512-TKsj9NkjJfTBxM7Phfy7kv6yYc4ZcOo+AaWGqQOKTPDOmcGkIFb5xNA746eKisQkm4yavUYh4InYM9S+VnO01w==",
|
||||
"version": "7.17.8",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.17.8.tgz",
|
||||
"integrity": "sha512-QcL86FGxpfSJwGtAvv4iG93UL6bmqBdmoVY0CMCU2g+oD2ezQse3PT5Pa+jiD6LJndBQi0EDlpzOWNlLuhz5gw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/template": "^7.16.7",
|
||||
@ -436,9 +436,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/parser": {
|
||||
"version": "7.17.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.7.tgz",
|
||||
"integrity": "sha512-bm3AQf45vR4gKggRfvJdYJ0gFLoCbsPxiFLSH6hTVYABptNHY6l9NrhnucVjQ/X+SPtLANT9lc0fFhikj+VBRA==",
|
||||
"version": "7.17.8",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.8.tgz",
|
||||
"integrity": "sha512-BoHhDJrJXqcg+ZL16Xv39H9n+AqJ4pcDrQBGZN+wHxIysrLZ3/ECwCBUch/1zUNhnsXULcONU3Ei5Hmkfk6kiQ==",
|
||||
"dev": true
|
||||
},
|
||||
"@babel/types": {
|
||||
@ -472,9 +472,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/parser": {
|
||||
"version": "7.17.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.7.tgz",
|
||||
"integrity": "sha512-bm3AQf45vR4gKggRfvJdYJ0gFLoCbsPxiFLSH6hTVYABptNHY6l9NrhnucVjQ/X+SPtLANT9lc0fFhikj+VBRA==",
|
||||
"version": "7.17.8",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.8.tgz",
|
||||
"integrity": "sha512-BoHhDJrJXqcg+ZL16Xv39H9n+AqJ4pcDrQBGZN+wHxIysrLZ3/ECwCBUch/1zUNhnsXULcONU3Ei5Hmkfk6kiQ==",
|
||||
"dev": true
|
||||
},
|
||||
"@babel/types": {
|
||||
@ -488,9 +488,9 @@
|
||||
}
|
||||
},
|
||||
"debug": {
|
||||
"version": "4.3.3",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
|
||||
"integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ms": "2.1.2"
|
||||
@ -1026,9 +1026,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"debug": {
|
||||
"version": "4.3.3",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
|
||||
"integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ms": "2.1.2"
|
||||
@ -1054,9 +1054,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"debug": {
|
||||
"version": "4.3.3",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
|
||||
"integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ms": "2.1.2"
|
||||
@ -1429,9 +1429,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"caniuse-lite": {
|
||||
"version": "1.0.30001317",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001317.tgz",
|
||||
"integrity": "sha512-xIZLh8gBm4dqNX0gkzrBeyI86J2eCjWzYAs40q88smG844YIrN4tVQl/RhquHvKEKImWWFIVh1Lxe5n1G/N+GQ==",
|
||||
"version": "1.0.30001319",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001319.tgz",
|
||||
"integrity": "sha512-xjlIAFHucBRSMUo1kb5D4LYgcN1M45qdKP++lhqowDpwJwGkpIRTt5qQqnhxjj1vHcI7nrJxWhCC1ATrCEBTcw==",
|
||||
"dev": true
|
||||
},
|
||||
"caseless": {
|
||||
@ -1771,9 +1771,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"electron-to-chromium": {
|
||||
"version": "1.4.85",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.85.tgz",
|
||||
"integrity": "sha512-K9AsQ41WS2bjZUFpRWfvaS4RjEcRCamEkBJN1Z1TQILBfP1H8QnJ9ti0wiLiMv0sRjX3EHKzgs9jDnmGFx2jXg==",
|
||||
"version": "1.4.88",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.88.tgz",
|
||||
"integrity": "sha512-oA7mzccefkvTNi9u7DXmT0LqvhnOiN2BhSrKerta7HeUC1cLoIwtbf2wL+Ah2ozh5KQd3/1njrGrwDBXx6d14Q==",
|
||||
"dev": true
|
||||
},
|
||||
"elliptic": {
|
||||
@ -1843,9 +1843,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"debug": {
|
||||
"version": "4.3.3",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
|
||||
"integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ms": "2.1.2"
|
||||
@ -2382,9 +2382,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"debug": {
|
||||
"version": "4.3.3",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
|
||||
"integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ms": "2.1.2"
|
||||
@ -2420,9 +2420,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"debug": {
|
||||
"version": "4.3.3",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
|
||||
"integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ms": "2.1.2"
|
||||
@ -2745,9 +2745,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"debug": {
|
||||
"version": "4.3.3",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
|
||||
"integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ms": "2.1.2"
|
||||
@ -3086,9 +3086,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"debug": {
|
||||
"version": "4.3.3",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
|
||||
"integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ms": "2.1.2"
|
||||
@ -3631,9 +3631,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"debug": {
|
||||
"version": "4.3.3",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
|
||||
"integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ms": "2.1.2"
|
||||
@ -4506,9 +4506,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"debug": {
|
||||
"version": "4.3.3",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
|
||||
"integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ms": "2.1.2"
|
||||
@ -4540,9 +4540,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"debug": {
|
||||
"version": "4.3.3",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
|
||||
"integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ms": "2.1.2"
|
||||
@ -4578,9 +4578,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"debug": {
|
||||
"version": "4.3.3",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
|
||||
"integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ms": "2.1.2"
|
||||
@ -4752,9 +4752,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"debug": {
|
||||
"version": "4.3.3",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
|
||||
"integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ms": "2.1.2"
|
||||
|
187
packages/ethers/dist/ethers.esm.js
vendored
187
packages/ethers/dist/ethers.esm.js
vendored
@ -17331,7 +17331,7 @@ function verifyTypedData(domain, types, value, signature) {
|
||||
return recoverAddress(TypedDataEncoder.hash(domain, types, value), signature);
|
||||
}
|
||||
|
||||
const version$k = "networks/5.6.0";
|
||||
const version$k = "networks/5.6.1";
|
||||
|
||||
"use strict";
|
||||
const logger$q = new Logger(version$k);
|
||||
@ -17383,6 +17383,12 @@ function ethDefaultProvider(network) {
|
||||
}
|
||||
catch (error) { }
|
||||
}
|
||||
if (providers.AnkrProvider && options.ankr !== "-") {
|
||||
try {
|
||||
providerList.push(new providers.AnkrProvider(network, options.ankr));
|
||||
}
|
||||
catch (error) { }
|
||||
}
|
||||
if (providerList.length === 0) {
|
||||
return null;
|
||||
}
|
||||
@ -18205,7 +18211,7 @@ var bech32 = {
|
||||
fromWords: fromWords
|
||||
};
|
||||
|
||||
const version$m = "providers/5.6.1";
|
||||
const version$m = "providers/5.6.2";
|
||||
|
||||
"use strict";
|
||||
const logger$s = new Logger(version$m);
|
||||
@ -21671,6 +21677,51 @@ class AlchemyProvider extends UrlJsonRpcProvider {
|
||||
}
|
||||
}
|
||||
|
||||
const logger$y = new Logger(version$m);
|
||||
const defaultApiKey$1 = "9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";
|
||||
function getHost(name) {
|
||||
switch (name) {
|
||||
case "homestead":
|
||||
return "rpc.ankr.com/eth/";
|
||||
case "matic":
|
||||
return "rpc.ankr.com/polygon/";
|
||||
case "arbitrum":
|
||||
return "rpc.ankr.com/arbitrum/";
|
||||
}
|
||||
return logger$y.throwArgumentError("unsupported network", "name", name);
|
||||
}
|
||||
class AnkrProvider extends UrlJsonRpcProvider {
|
||||
isCommunityResource() {
|
||||
return (this.apiKey === defaultApiKey$1);
|
||||
}
|
||||
static getApiKey(apiKey) {
|
||||
if (apiKey == null) {
|
||||
return defaultApiKey$1;
|
||||
}
|
||||
return apiKey;
|
||||
}
|
||||
static getUrl(network, apiKey) {
|
||||
if (apiKey == null) {
|
||||
apiKey = defaultApiKey$1;
|
||||
}
|
||||
const connection = {
|
||||
allowGzip: true,
|
||||
url: ("https:/\/" + getHost(network.name) + apiKey),
|
||||
throttleCallback: (attempt, url) => {
|
||||
if (apiKey.apiKey === defaultApiKey$1) {
|
||||
showThrottleMessage();
|
||||
}
|
||||
return Promise.resolve(true);
|
||||
}
|
||||
};
|
||||
if (apiKey.projectSecret != null) {
|
||||
connection.user = "";
|
||||
connection.password = apiKey.projectSecret;
|
||||
}
|
||||
return connection;
|
||||
}
|
||||
}
|
||||
|
||||
"use strict";
|
||||
var __awaiter$d = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
@ -21681,11 +21732,11 @@ var __awaiter$d = (window && window.__awaiter) || function (thisArg, _arguments,
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
const logger$y = new Logger(version$m);
|
||||
const logger$z = new Logger(version$m);
|
||||
class CloudflareProvider extends UrlJsonRpcProvider {
|
||||
static getApiKey(apiKey) {
|
||||
if (apiKey != null) {
|
||||
logger$y.throwArgumentError("apiKey not supported for cloudflare", "apiKey", apiKey);
|
||||
logger$z.throwArgumentError("apiKey not supported for cloudflare", "apiKey", apiKey);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@ -21696,7 +21747,7 @@ class CloudflareProvider extends UrlJsonRpcProvider {
|
||||
host = "https://cloudflare-eth.com/";
|
||||
break;
|
||||
default:
|
||||
logger$y.throwArgumentError("unsupported network", "network", arguments[0]);
|
||||
logger$z.throwArgumentError("unsupported network", "network", arguments[0]);
|
||||
}
|
||||
return host;
|
||||
}
|
||||
@ -21726,7 +21777,7 @@ var __awaiter$e = (window && window.__awaiter) || function (thisArg, _arguments,
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
const logger$z = new Logger(version$m);
|
||||
const logger$A = new Logger(version$m);
|
||||
// The transaction has already been sanitized by the calls in Provider
|
||||
function getTransactionPostData(transaction) {
|
||||
const result = {};
|
||||
@ -21806,7 +21857,7 @@ function checkLogTag(blockTag) {
|
||||
}
|
||||
return parseInt(blockTag.substring(2), 16);
|
||||
}
|
||||
const defaultApiKey$1 = "9D13ZE7XSBTJ94N9BNJ2MA33VMAY2YPIRB";
|
||||
const defaultApiKey$2 = "9D13ZE7XSBTJ94N9BNJ2MA33VMAY2YPIRB";
|
||||
function checkError$1(method, error, transaction) {
|
||||
// Undo the "convenience" some nodes are attempting to prevent backwards
|
||||
// incompatibility; maybe for v6 consider forwarding reverts as errors
|
||||
@ -21822,7 +21873,7 @@ function checkError$1(method, error, transaction) {
|
||||
if (isHexString(data)) {
|
||||
return data;
|
||||
}
|
||||
logger$z.throwError("missing revert data in call exception", Logger.errors.CALL_EXCEPTION, {
|
||||
logger$A.throwError("missing revert data in call exception", Logger.errors.CALL_EXCEPTION, {
|
||||
error, data: "0x"
|
||||
});
|
||||
}
|
||||
@ -21843,24 +21894,24 @@ function checkError$1(method, error, transaction) {
|
||||
message = (message || "").toLowerCase();
|
||||
// "Insufficient funds. The account you tried to send transaction from does not have enough funds. Required 21464000000000 and got: 0"
|
||||
if (message.match(/insufficient funds/)) {
|
||||
logger$z.throwError("insufficient funds for intrinsic transaction cost", Logger.errors.INSUFFICIENT_FUNDS, {
|
||||
logger$A.throwError("insufficient funds for intrinsic transaction cost", Logger.errors.INSUFFICIENT_FUNDS, {
|
||||
error, method, transaction
|
||||
});
|
||||
}
|
||||
// "Transaction with the same hash was already imported."
|
||||
if (message.match(/same hash was already imported|transaction nonce is too low|nonce too low/)) {
|
||||
logger$z.throwError("nonce has already been used", Logger.errors.NONCE_EXPIRED, {
|
||||
logger$A.throwError("nonce has already been used", Logger.errors.NONCE_EXPIRED, {
|
||||
error, method, transaction
|
||||
});
|
||||
}
|
||||
// "Transaction gas price is too low. There is another transaction with same nonce in the queue. Try increasing the gas price or incrementing the nonce."
|
||||
if (message.match(/another transaction with same nonce/)) {
|
||||
logger$z.throwError("replacement fee too low", Logger.errors.REPLACEMENT_UNDERPRICED, {
|
||||
logger$A.throwError("replacement fee too low", Logger.errors.REPLACEMENT_UNDERPRICED, {
|
||||
error, method, transaction
|
||||
});
|
||||
}
|
||||
if (message.match(/execution failed due to an exception|execution reverted/)) {
|
||||
logger$z.throwError("cannot estimate gas; transaction may fail or may require manual gas limit", Logger.errors.UNPREDICTABLE_GAS_LIMIT, {
|
||||
logger$A.throwError("cannot estimate gas; transaction may fail or may require manual gas limit", Logger.errors.UNPREDICTABLE_GAS_LIMIT, {
|
||||
error, method, transaction
|
||||
});
|
||||
}
|
||||
@ -21868,10 +21919,10 @@ function checkError$1(method, error, transaction) {
|
||||
}
|
||||
class EtherscanProvider extends BaseProvider {
|
||||
constructor(network, apiKey) {
|
||||
logger$z.checkNew(new.target, EtherscanProvider);
|
||||
logger$A.checkNew(new.target, EtherscanProvider);
|
||||
super(network);
|
||||
defineReadOnly(this, "baseUrl", this.getBaseUrl());
|
||||
defineReadOnly(this, "apiKey", apiKey || defaultApiKey$1);
|
||||
defineReadOnly(this, "apiKey", apiKey || defaultApiKey$2);
|
||||
}
|
||||
getBaseUrl() {
|
||||
switch (this.network ? this.network.name : "invalid") {
|
||||
@ -21887,7 +21938,7 @@ class EtherscanProvider extends BaseProvider {
|
||||
return "https:/\/api-goerli.etherscan.io";
|
||||
default:
|
||||
}
|
||||
return logger$z.throwArgumentError("unsupported network", "network", name);
|
||||
return logger$A.throwArgumentError("unsupported network", "network", name);
|
||||
}
|
||||
getUrl(module, params) {
|
||||
const query = Object.keys(params).reduce((accum, key) => {
|
||||
@ -22051,12 +22102,12 @@ class EtherscanProvider extends BaseProvider {
|
||||
// @TODO: We can handle slightly more complicated logs using the logs API
|
||||
if (params.filter.topics && params.filter.topics.length > 0) {
|
||||
if (params.filter.topics.length > 1) {
|
||||
logger$z.throwError("unsupported topic count", Logger.errors.UNSUPPORTED_OPERATION, { topics: params.filter.topics });
|
||||
logger$A.throwError("unsupported topic count", Logger.errors.UNSUPPORTED_OPERATION, { topics: params.filter.topics });
|
||||
}
|
||||
if (params.filter.topics.length === 1) {
|
||||
const topic0 = params.filter.topics[0];
|
||||
if (typeof (topic0) !== "string" || topic0.length !== 66) {
|
||||
logger$z.throwError("unsupported topic format", Logger.errors.UNSUPPORTED_OPERATION, { topic0: topic0 });
|
||||
logger$A.throwError("unsupported topic format", Logger.errors.UNSUPPORTED_OPERATION, { topic0: topic0 });
|
||||
}
|
||||
args.topic0 = topic0;
|
||||
}
|
||||
@ -22123,7 +22174,7 @@ class EtherscanProvider extends BaseProvider {
|
||||
});
|
||||
}
|
||||
isCommunityResource() {
|
||||
return (this.apiKey === defaultApiKey$1);
|
||||
return (this.apiKey === defaultApiKey$2);
|
||||
}
|
||||
}
|
||||
|
||||
@ -22137,7 +22188,7 @@ var __awaiter$f = (window && window.__awaiter) || function (thisArg, _arguments,
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
const logger$A = new Logger(version$m);
|
||||
const logger$B = new Logger(version$m);
|
||||
function now() { return (new Date()).getTime(); }
|
||||
// Returns to network as long as all agree, or null if any is null.
|
||||
// Throws an error if any two networks do not match.
|
||||
@ -22153,7 +22204,7 @@ function checkNetworks(networks) {
|
||||
// Make sure the network matches the previous networks
|
||||
if (!(result.name === network.name && result.chainId === network.chainId &&
|
||||
((result.ensAddress === network.ensAddress) || (result.ensAddress == null && network.ensAddress == null)))) {
|
||||
logger$A.throwArgumentError("provider mismatch", "networks", networks);
|
||||
logger$B.throwArgumentError("provider mismatch", "networks", networks);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -22460,7 +22511,7 @@ function getRunner(config, currentBlockNumber, method, params) {
|
||||
return provider.getLogs(filter);
|
||||
}
|
||||
}
|
||||
return logger$A.throwError("unknown method error", Logger.errors.UNKNOWN_ERROR, {
|
||||
return logger$B.throwError("unknown method error", Logger.errors.UNKNOWN_ERROR, {
|
||||
method: method,
|
||||
params: params
|
||||
});
|
||||
@ -22468,9 +22519,9 @@ function getRunner(config, currentBlockNumber, method, params) {
|
||||
}
|
||||
class FallbackProvider extends BaseProvider {
|
||||
constructor(providers, quorum) {
|
||||
logger$A.checkNew(new.target, FallbackProvider);
|
||||
logger$B.checkNew(new.target, FallbackProvider);
|
||||
if (providers.length === 0) {
|
||||
logger$A.throwArgumentError("missing providers", "providers", providers);
|
||||
logger$B.throwArgumentError("missing providers", "providers", providers);
|
||||
}
|
||||
const providerConfigs = providers.map((configOrProvider, index) => {
|
||||
if (Provider.isProvider(configOrProvider)) {
|
||||
@ -22490,7 +22541,7 @@ class FallbackProvider extends BaseProvider {
|
||||
}
|
||||
const weight = config.weight;
|
||||
if (weight % 1 || weight > 512 || weight < 1) {
|
||||
logger$A.throwArgumentError("invalid weight; must be integer in [1, 512]", `providers[${index}].weight`, weight);
|
||||
logger$B.throwArgumentError("invalid weight; must be integer in [1, 512]", `providers[${index}].weight`, weight);
|
||||
}
|
||||
return Object.freeze(config);
|
||||
});
|
||||
@ -22499,7 +22550,7 @@ class FallbackProvider extends BaseProvider {
|
||||
quorum = total / 2;
|
||||
}
|
||||
else if (quorum > total) {
|
||||
logger$A.throwArgumentError("quorum will always fail; larger than total weight", "quorum", quorum);
|
||||
logger$B.throwArgumentError("quorum will always fail; larger than total weight", "quorum", quorum);
|
||||
}
|
||||
// Are all providers' networks are known
|
||||
let networkOrReady = checkNetworks(providerConfigs.map((c) => (c.provider).network));
|
||||
@ -22673,7 +22724,7 @@ class FallbackProvider extends BaseProvider {
|
||||
}
|
||||
props[name] = e[name];
|
||||
});
|
||||
logger$A.throwError(e.reason || e.message, errorCode, props);
|
||||
logger$B.throwError(e.reason || e.message, errorCode, props);
|
||||
});
|
||||
// All configs have run to completion; we will never get more data
|
||||
if (configs.filter((c) => !c.done).length === 0) {
|
||||
@ -22687,7 +22738,7 @@ class FallbackProvider extends BaseProvider {
|
||||
}
|
||||
c.cancelled = true;
|
||||
});
|
||||
return logger$A.throwError("failed to meet quorum", Logger.errors.SERVER_ERROR, {
|
||||
return logger$B.throwError("failed to meet quorum", Logger.errors.SERVER_ERROR, {
|
||||
method: method,
|
||||
params: params,
|
||||
//results: configs.map((c) => c.result),
|
||||
@ -22703,14 +22754,14 @@ class FallbackProvider extends BaseProvider {
|
||||
const IpcProvider = null;
|
||||
|
||||
"use strict";
|
||||
const logger$B = new Logger(version$m);
|
||||
const logger$C = new Logger(version$m);
|
||||
const defaultProjectId = "84842078b09946638c03157f83405213";
|
||||
class InfuraWebSocketProvider extends WebSocketProvider {
|
||||
constructor(network, apiKey) {
|
||||
const provider = new InfuraProvider(network, apiKey);
|
||||
const connection = provider.connection;
|
||||
if (connection.password) {
|
||||
logger$B.throwError("INFURA WebSocket project secrets unsupported", Logger.errors.UNSUPPORTED_OPERATION, {
|
||||
logger$C.throwError("INFURA WebSocket project secrets unsupported", Logger.errors.UNSUPPORTED_OPERATION, {
|
||||
operation: "InfuraProvider.getWebSocketProvider()"
|
||||
});
|
||||
}
|
||||
@ -22741,8 +22792,8 @@ class InfuraProvider extends UrlJsonRpcProvider {
|
||||
apiKeyObj.projectId = apiKey;
|
||||
}
|
||||
else if (apiKey.projectSecret != null) {
|
||||
logger$B.assertArgument((typeof (apiKey.projectId) === "string"), "projectSecret requires a projectId", "projectId", apiKey.projectId);
|
||||
logger$B.assertArgument((typeof (apiKey.projectSecret) === "string"), "invalid projectSecret", "projectSecret", "[REDACTED]");
|
||||
logger$C.assertArgument((typeof (apiKey.projectId) === "string"), "projectSecret requires a projectId", "projectId", apiKey.projectId);
|
||||
logger$C.assertArgument((typeof (apiKey.projectSecret) === "string"), "invalid projectSecret", "projectSecret", "[REDACTED]");
|
||||
apiKeyObj.projectId = apiKey.projectId;
|
||||
apiKeyObj.projectSecret = apiKey.projectSecret;
|
||||
}
|
||||
@ -22789,7 +22840,7 @@ class InfuraProvider extends UrlJsonRpcProvider {
|
||||
host = "arbitrum-rinkeby.infura.io";
|
||||
break;
|
||||
default:
|
||||
logger$B.throwError("unsupported network", Logger.errors.INVALID_ARGUMENT, {
|
||||
logger$C.throwError("unsupported network", Logger.errors.INVALID_ARGUMENT, {
|
||||
argument: "network",
|
||||
value: network
|
||||
});
|
||||
@ -22888,18 +22939,18 @@ class JsonRpcBatchProvider extends JsonRpcProvider {
|
||||
|
||||
/* istanbul ignore file */
|
||||
"use strict";
|
||||
const logger$C = new Logger(version$m);
|
||||
const logger$D = new Logger(version$m);
|
||||
// Special API key provided by Nodesmith for ethers.js
|
||||
const defaultApiKey$2 = "ETHERS_JS_SHARED";
|
||||
const defaultApiKey$3 = "ETHERS_JS_SHARED";
|
||||
class NodesmithProvider extends UrlJsonRpcProvider {
|
||||
static getApiKey(apiKey) {
|
||||
if (apiKey && typeof (apiKey) !== "string") {
|
||||
logger$C.throwArgumentError("invalid apiKey", "apiKey", apiKey);
|
||||
logger$D.throwArgumentError("invalid apiKey", "apiKey", apiKey);
|
||||
}
|
||||
return apiKey || defaultApiKey$2;
|
||||
return apiKey || defaultApiKey$3;
|
||||
}
|
||||
static getUrl(network, apiKey) {
|
||||
logger$C.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");
|
||||
logger$D.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");
|
||||
let host = null;
|
||||
switch (network.name) {
|
||||
case "homestead":
|
||||
@ -22918,14 +22969,14 @@ class NodesmithProvider extends UrlJsonRpcProvider {
|
||||
host = "https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";
|
||||
break;
|
||||
default:
|
||||
logger$C.throwArgumentError("unsupported network", "network", arguments[0]);
|
||||
logger$D.throwArgumentError("unsupported network", "network", arguments[0]);
|
||||
}
|
||||
return (host + "?apiKey=" + apiKey);
|
||||
}
|
||||
}
|
||||
|
||||
"use strict";
|
||||
const logger$D = new Logger(version$m);
|
||||
const logger$E = new Logger(version$m);
|
||||
// These are load-balancer-based application IDs
|
||||
const defaultApplicationIds = {
|
||||
homestead: "6004bcd10040261633ade990",
|
||||
@ -22950,7 +23001,7 @@ class PocketProvider extends UrlJsonRpcProvider {
|
||||
}
|
||||
// If there was any issue above, we don't know this network
|
||||
if (apiKey == null) {
|
||||
logger$D.throwError("unsupported network", Logger.errors.INVALID_ARGUMENT, {
|
||||
logger$E.throwError("unsupported network", Logger.errors.INVALID_ARGUMENT, {
|
||||
argument: "network",
|
||||
value: network
|
||||
});
|
||||
@ -22963,7 +23014,7 @@ class PocketProvider extends UrlJsonRpcProvider {
|
||||
// Pocket requires the network to decide the default provider, so we
|
||||
// rely on hijacking the constructor to add a sensible default for us
|
||||
if (apiKey == null) {
|
||||
logger$D.throwArgumentError("PocketProvider.getApiKey does not support null apiKey", "apiKey", apiKey);
|
||||
logger$E.throwArgumentError("PocketProvider.getApiKey does not support null apiKey", "apiKey", apiKey);
|
||||
}
|
||||
const apiKeyObj = {
|
||||
applicationId: null,
|
||||
@ -22975,19 +23026,19 @@ class PocketProvider extends UrlJsonRpcProvider {
|
||||
apiKeyObj.applicationId = apiKey;
|
||||
}
|
||||
else if (apiKey.applicationSecretKey != null) {
|
||||
logger$D.assertArgument((typeof (apiKey.applicationId) === "string"), "applicationSecretKey requires an applicationId", "applicationId", apiKey.applicationId);
|
||||
logger$D.assertArgument((typeof (apiKey.applicationSecretKey) === "string"), "invalid applicationSecretKey", "applicationSecretKey", "[REDACTED]");
|
||||
logger$E.assertArgument((typeof (apiKey.applicationId) === "string"), "applicationSecretKey requires an applicationId", "applicationId", apiKey.applicationId);
|
||||
logger$E.assertArgument((typeof (apiKey.applicationSecretKey) === "string"), "invalid applicationSecretKey", "applicationSecretKey", "[REDACTED]");
|
||||
apiKeyObj.applicationId = apiKey.applicationId;
|
||||
apiKeyObj.applicationSecretKey = apiKey.applicationSecretKey;
|
||||
apiKeyObj.loadBalancer = !!apiKey.loadBalancer;
|
||||
}
|
||||
else if (apiKey.applicationId) {
|
||||
logger$D.assertArgument((typeof (apiKey.applicationId) === "string"), "apiKey.applicationId must be a string", "apiKey.applicationId", apiKey.applicationId);
|
||||
logger$E.assertArgument((typeof (apiKey.applicationId) === "string"), "apiKey.applicationId must be a string", "apiKey.applicationId", apiKey.applicationId);
|
||||
apiKeyObj.applicationId = apiKey.applicationId;
|
||||
apiKeyObj.loadBalancer = !!apiKey.loadBalancer;
|
||||
}
|
||||
else {
|
||||
logger$D.throwArgumentError("unsupported PocketProvider apiKey", "apiKey", apiKey);
|
||||
logger$E.throwArgumentError("unsupported PocketProvider apiKey", "apiKey", apiKey);
|
||||
}
|
||||
return apiKeyObj;
|
||||
}
|
||||
@ -23007,7 +23058,7 @@ class PocketProvider extends UrlJsonRpcProvider {
|
||||
host = "eth-goerli.gateway.pokt.network";
|
||||
break;
|
||||
default:
|
||||
logger$D.throwError("unsupported network", Logger.errors.INVALID_ARGUMENT, {
|
||||
logger$E.throwError("unsupported network", Logger.errors.INVALID_ARGUMENT, {
|
||||
argument: "network",
|
||||
value: network
|
||||
});
|
||||
@ -23035,7 +23086,7 @@ class PocketProvider extends UrlJsonRpcProvider {
|
||||
}
|
||||
|
||||
"use strict";
|
||||
const logger$E = new Logger(version$m);
|
||||
const logger$F = new Logger(version$m);
|
||||
let _nextId = 1;
|
||||
function buildWeb3LegacyFetcher(provider, sendFunc) {
|
||||
const fetcher = "Web3LegacyFetcher";
|
||||
@ -23117,9 +23168,9 @@ function buildEip1193Fetcher(provider) {
|
||||
}
|
||||
class Web3Provider extends JsonRpcProvider {
|
||||
constructor(provider, network) {
|
||||
logger$E.checkNew(new.target, Web3Provider);
|
||||
logger$F.checkNew(new.target, Web3Provider);
|
||||
if (provider == null) {
|
||||
logger$E.throwArgumentError("missing provider", "provider", provider);
|
||||
logger$F.throwArgumentError("missing provider", "provider", provider);
|
||||
}
|
||||
let path = null;
|
||||
let jsonRpcFetchFunc = null;
|
||||
@ -23147,7 +23198,7 @@ class Web3Provider extends JsonRpcProvider {
|
||||
jsonRpcFetchFunc = buildWeb3LegacyFetcher(provider, provider.send.bind(provider));
|
||||
}
|
||||
else {
|
||||
logger$E.throwArgumentError("unsupported provider", "provider", provider);
|
||||
logger$F.throwArgumentError("unsupported provider", "provider", provider);
|
||||
}
|
||||
if (!path) {
|
||||
path = "unknown:";
|
||||
@ -23163,7 +23214,7 @@ class Web3Provider extends JsonRpcProvider {
|
||||
}
|
||||
|
||||
"use strict";
|
||||
const logger$F = new Logger(version$m);
|
||||
const logger$G = new Logger(version$m);
|
||||
////////////////////////
|
||||
// Helper Functions
|
||||
function getDefaultProvider(network, options) {
|
||||
@ -23182,13 +23233,13 @@ function getDefaultProvider(network, options) {
|
||||
case "ws":
|
||||
return new WebSocketProvider(network);
|
||||
default:
|
||||
logger$F.throwArgumentError("unsupported URL scheme", "network", network);
|
||||
logger$G.throwArgumentError("unsupported URL scheme", "network", network);
|
||||
}
|
||||
}
|
||||
}
|
||||
const n = getNetwork(network);
|
||||
if (!n || !n._defaultProvider) {
|
||||
logger$F.throwError("unsupported getDefaultProvider network", Logger.errors.NETWORK_ERROR, {
|
||||
logger$G.throwError("unsupported getDefaultProvider network", Logger.errors.NETWORK_ERROR, {
|
||||
operation: "getDefaultProvider",
|
||||
network: network
|
||||
});
|
||||
@ -23196,6 +23247,7 @@ function getDefaultProvider(network, options) {
|
||||
return n._defaultProvider({
|
||||
FallbackProvider,
|
||||
AlchemyProvider,
|
||||
AnkrProvider,
|
||||
CloudflareProvider,
|
||||
EtherscanProvider,
|
||||
InfuraProvider,
|
||||
@ -23216,6 +23268,7 @@ var index$3 = /*#__PURE__*/Object.freeze({
|
||||
FallbackProvider: FallbackProvider,
|
||||
AlchemyProvider: AlchemyProvider,
|
||||
AlchemyWebSocketProvider: AlchemyWebSocketProvider,
|
||||
AnkrProvider: AnkrProvider,
|
||||
CloudflareProvider: CloudflareProvider,
|
||||
EtherscanProvider: EtherscanProvider,
|
||||
InfuraProvider: InfuraProvider,
|
||||
@ -23244,7 +23297,7 @@ const regexBytes = new RegExp("^bytes([0-9]+)$");
|
||||
const regexNumber = new RegExp("^(u?int)([0-9]*)$");
|
||||
const regexArray = new RegExp("^(.*)\\[([0-9]*)\\]$");
|
||||
const Zeros$1 = "0000000000000000000000000000000000000000000000000000000000000000";
|
||||
const logger$G = new Logger(version$n);
|
||||
const logger$H = new Logger(version$n);
|
||||
function _pack(type, value, isArray) {
|
||||
switch (type) {
|
||||
case "address":
|
||||
@ -23268,7 +23321,7 @@ function _pack(type, value, isArray) {
|
||||
//let signed = (match[1] === "int")
|
||||
let size = parseInt(match[2] || "256");
|
||||
if ((match[2] && String(size) !== match[2]) || (size % 8 !== 0) || size === 0 || size > 256) {
|
||||
logger$G.throwArgumentError("invalid number type", "type", type);
|
||||
logger$H.throwArgumentError("invalid number type", "type", type);
|
||||
}
|
||||
if (isArray) {
|
||||
size = 256;
|
||||
@ -23280,10 +23333,10 @@ function _pack(type, value, isArray) {
|
||||
if (match) {
|
||||
const size = parseInt(match[1]);
|
||||
if (String(size) !== match[1] || size === 0 || size > 32) {
|
||||
logger$G.throwArgumentError("invalid bytes type", "type", type);
|
||||
logger$H.throwArgumentError("invalid bytes type", "type", type);
|
||||
}
|
||||
if (arrayify(value).byteLength !== size) {
|
||||
logger$G.throwArgumentError(`invalid value for ${type}`, "value", value);
|
||||
logger$H.throwArgumentError(`invalid value for ${type}`, "value", value);
|
||||
}
|
||||
if (isArray) {
|
||||
return arrayify((value + Zeros$1).substring(0, 66));
|
||||
@ -23295,7 +23348,7 @@ function _pack(type, value, isArray) {
|
||||
const baseType = match[1];
|
||||
const count = parseInt(match[2] || String(value.length));
|
||||
if (count != value.length) {
|
||||
logger$G.throwArgumentError(`invalid array length for ${type}`, "value", value);
|
||||
logger$H.throwArgumentError(`invalid array length for ${type}`, "value", value);
|
||||
}
|
||||
const result = [];
|
||||
value.forEach(function (value) {
|
||||
@ -23303,12 +23356,12 @@ function _pack(type, value, isArray) {
|
||||
});
|
||||
return concat(result);
|
||||
}
|
||||
return logger$G.throwArgumentError("invalid type", "type", type);
|
||||
return logger$H.throwArgumentError("invalid type", "type", type);
|
||||
}
|
||||
// @TODO: Array Enum
|
||||
function pack$1(types, values) {
|
||||
if (types.length != values.length) {
|
||||
logger$G.throwArgumentError("wrong number of values; expected ${ types.length }", "values", values);
|
||||
logger$H.throwArgumentError("wrong number of values; expected ${ types.length }", "values", values);
|
||||
}
|
||||
const tight = [];
|
||||
types.forEach(function (type, index) {
|
||||
@ -23326,7 +23379,7 @@ function sha256$2(types, values) {
|
||||
const version$o = "units/5.6.0";
|
||||
|
||||
"use strict";
|
||||
const logger$H = new Logger(version$o);
|
||||
const logger$I = new Logger(version$o);
|
||||
const names = [
|
||||
"wei",
|
||||
"kwei",
|
||||
@ -23341,7 +23394,7 @@ const names = [
|
||||
function commify(value) {
|
||||
const comps = String(value).split(".");
|
||||
if (comps.length > 2 || !comps[0].match(/^-?[0-9]*$/) || (comps[1] && !comps[1].match(/^[0-9]*$/)) || value === "." || value === "-.") {
|
||||
logger$H.throwArgumentError("invalid value", "value", value);
|
||||
logger$I.throwArgumentError("invalid value", "value", value);
|
||||
}
|
||||
// Make sure we have at least one whole digit (0 if none)
|
||||
let whole = comps[0];
|
||||
@ -23389,7 +23442,7 @@ function formatUnits(value, unitName) {
|
||||
}
|
||||
function parseUnits(value, unitName) {
|
||||
if (typeof (value) !== "string") {
|
||||
logger$H.throwArgumentError("value must be a string", "value", value);
|
||||
logger$I.throwArgumentError("value must be a string", "value", value);
|
||||
}
|
||||
if (typeof (unitName) === "string") {
|
||||
const index = names.indexOf(unitName);
|
||||
@ -23511,10 +23564,10 @@ var utils$1 = /*#__PURE__*/Object.freeze({
|
||||
Indexed: Indexed
|
||||
});
|
||||
|
||||
const version$p = "ethers/5.6.1";
|
||||
const version$p = "ethers/5.6.2";
|
||||
|
||||
"use strict";
|
||||
const logger$I = new Logger(version$p);
|
||||
const logger$J = new Logger(version$p);
|
||||
|
||||
var ethers = /*#__PURE__*/Object.freeze({
|
||||
__proto__: null,
|
||||
@ -23530,7 +23583,7 @@ var ethers = /*#__PURE__*/Object.freeze({
|
||||
FixedNumber: FixedNumber,
|
||||
constants: index$1,
|
||||
get errors () { return ErrorCode; },
|
||||
logger: logger$I,
|
||||
logger: logger$J,
|
||||
utils: utils$1,
|
||||
wordlists: wordlists,
|
||||
version: version$p,
|
||||
@ -23546,5 +23599,5 @@ try {
|
||||
}
|
||||
catch (error) { }
|
||||
|
||||
export { BaseContract, BigNumber, Contract, ContractFactory, FixedNumber, Signer, VoidSigner, Wallet, Wordlist, index$1 as constants, ErrorCode as errors, ethers, getDefaultProvider, logger$I as logger, index$3 as providers, utils$1 as utils, version$p as version, wordlists };
|
||||
export { BaseContract, BigNumber, Contract, ContractFactory, FixedNumber, Signer, VoidSigner, Wallet, Wordlist, index$1 as constants, ErrorCode as errors, ethers, getDefaultProvider, logger$J as logger, index$3 as providers, utils$1 as utils, version$p as version, wordlists };
|
||||
//# sourceMappingURL=ethers.esm.js.map
|
||||
|
2
packages/ethers/dist/ethers.esm.js.map
vendored
2
packages/ethers/dist/ethers.esm.js.map
vendored
File diff suppressed because one or more lines are too long
2
packages/ethers/dist/ethers.esm.min.js
vendored
2
packages/ethers/dist/ethers.esm.min.js
vendored
File diff suppressed because one or more lines are too long
2
packages/ethers/dist/ethers.esm.min.js.map
vendored
2
packages/ethers/dist/ethers.esm.min.js.map
vendored
File diff suppressed because one or more lines are too long
95
packages/ethers/dist/ethers.umd.js
vendored
95
packages/ethers/dist/ethers.umd.js
vendored
@ -19300,7 +19300,7 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = void 0;
|
||||
exports.version = "networks/5.6.0";
|
||||
exports.version = "networks/5.6.1";
|
||||
|
||||
});
|
||||
|
||||
@ -19361,6 +19361,12 @@
|
||||
}
|
||||
catch (error) { }
|
||||
}
|
||||
if (providers.AnkrProvider && options.ankr !== "-") {
|
||||
try {
|
||||
providerList.push(new providers.AnkrProvider(network, options.ankr));
|
||||
}
|
||||
catch (error) { }
|
||||
}
|
||||
if (providerList.length === 0) {
|
||||
return null;
|
||||
}
|
||||
@ -20331,7 +20337,7 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = void 0;
|
||||
exports.version = "providers/5.6.1";
|
||||
exports.version = "providers/5.6.2";
|
||||
|
||||
});
|
||||
|
||||
@ -24829,6 +24835,84 @@
|
||||
|
||||
var alchemyProvider$1 = /*@__PURE__*/getDefaultExportFromCjs(alchemyProvider);
|
||||
|
||||
var ankrProvider = createCommonjsModule(function (module, exports) {
|
||||
"use strict";
|
||||
var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.AnkrProvider = void 0;
|
||||
|
||||
|
||||
|
||||
|
||||
var logger = new lib.Logger(_version$I.version);
|
||||
var defaultApiKey = "9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";
|
||||
function getHost(name) {
|
||||
switch (name) {
|
||||
case "homestead":
|
||||
return "rpc.ankr.com/eth/";
|
||||
case "matic":
|
||||
return "rpc.ankr.com/polygon/";
|
||||
case "arbitrum":
|
||||
return "rpc.ankr.com/arbitrum/";
|
||||
}
|
||||
return logger.throwArgumentError("unsupported network", "name", name);
|
||||
}
|
||||
var AnkrProvider = /** @class */ (function (_super) {
|
||||
__extends(AnkrProvider, _super);
|
||||
function AnkrProvider() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
AnkrProvider.prototype.isCommunityResource = function () {
|
||||
return (this.apiKey === defaultApiKey);
|
||||
};
|
||||
AnkrProvider.getApiKey = function (apiKey) {
|
||||
if (apiKey == null) {
|
||||
return defaultApiKey;
|
||||
}
|
||||
return apiKey;
|
||||
};
|
||||
AnkrProvider.getUrl = function (network, apiKey) {
|
||||
if (apiKey == null) {
|
||||
apiKey = defaultApiKey;
|
||||
}
|
||||
var connection = {
|
||||
allowGzip: true,
|
||||
url: ("https:/\/" + getHost(network.name) + apiKey),
|
||||
throttleCallback: function (attempt, url) {
|
||||
if (apiKey.apiKey === defaultApiKey) {
|
||||
(0, formatter.showThrottleMessage)();
|
||||
}
|
||||
return Promise.resolve(true);
|
||||
}
|
||||
};
|
||||
if (apiKey.projectSecret != null) {
|
||||
connection.user = "";
|
||||
connection.password = apiKey.projectSecret;
|
||||
}
|
||||
return connection;
|
||||
};
|
||||
return AnkrProvider;
|
||||
}(urlJsonRpcProvider.UrlJsonRpcProvider));
|
||||
exports.AnkrProvider = AnkrProvider;
|
||||
|
||||
});
|
||||
|
||||
var ankrProvider$1 = /*@__PURE__*/getDefaultExportFromCjs(ankrProvider);
|
||||
|
||||
var cloudflareProvider = createCommonjsModule(function (module, exports) {
|
||||
"use strict";
|
||||
var __extends = (commonjsGlobal && commonjsGlobal.__extends) || (function () {
|
||||
@ -26808,7 +26892,7 @@
|
||||
var lib$r = createCommonjsModule(function (module, exports) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Formatter = exports.showThrottleMessage = exports.isCommunityResourcable = exports.isCommunityResource = exports.getNetwork = exports.getDefaultProvider = exports.JsonRpcSigner = exports.IpcProvider = exports.WebSocketProvider = exports.Web3Provider = exports.StaticJsonRpcProvider = exports.PocketProvider = exports.NodesmithProvider = exports.JsonRpcBatchProvider = exports.JsonRpcProvider = exports.InfuraWebSocketProvider = exports.InfuraProvider = exports.EtherscanProvider = exports.CloudflareProvider = exports.AlchemyWebSocketProvider = exports.AlchemyProvider = exports.FallbackProvider = exports.UrlJsonRpcProvider = exports.Resolver = exports.BaseProvider = exports.Provider = void 0;
|
||||
exports.Formatter = exports.showThrottleMessage = exports.isCommunityResourcable = exports.isCommunityResource = exports.getNetwork = exports.getDefaultProvider = exports.JsonRpcSigner = exports.IpcProvider = exports.WebSocketProvider = exports.Web3Provider = exports.StaticJsonRpcProvider = exports.PocketProvider = exports.NodesmithProvider = exports.JsonRpcBatchProvider = exports.JsonRpcProvider = exports.InfuraWebSocketProvider = exports.InfuraProvider = exports.EtherscanProvider = exports.CloudflareProvider = exports.AnkrProvider = exports.AlchemyWebSocketProvider = exports.AlchemyProvider = exports.FallbackProvider = exports.UrlJsonRpcProvider = exports.Resolver = exports.BaseProvider = exports.Provider = void 0;
|
||||
|
||||
Object.defineProperty(exports, "Provider", { enumerable: true, get: function () { return lib$b.Provider; } });
|
||||
|
||||
@ -26820,6 +26904,8 @@
|
||||
Object.defineProperty(exports, "AlchemyProvider", { enumerable: true, get: function () { return alchemyProvider.AlchemyProvider; } });
|
||||
Object.defineProperty(exports, "AlchemyWebSocketProvider", { enumerable: true, get: function () { return alchemyProvider.AlchemyWebSocketProvider; } });
|
||||
|
||||
Object.defineProperty(exports, "AnkrProvider", { enumerable: true, get: function () { return ankrProvider.AnkrProvider; } });
|
||||
|
||||
Object.defineProperty(exports, "CloudflareProvider", { enumerable: true, get: function () { return cloudflareProvider.CloudflareProvider; } });
|
||||
|
||||
Object.defineProperty(exports, "EtherscanProvider", { enumerable: true, get: function () { return etherscanProvider.EtherscanProvider; } });
|
||||
@ -26886,6 +26972,7 @@
|
||||
return n._defaultProvider({
|
||||
FallbackProvider: fallbackProvider.FallbackProvider,
|
||||
AlchemyProvider: alchemyProvider.AlchemyProvider,
|
||||
AnkrProvider: ankrProvider.AnkrProvider,
|
||||
CloudflareProvider: cloudflareProvider.CloudflareProvider,
|
||||
EtherscanProvider: etherscanProvider.EtherscanProvider,
|
||||
InfuraProvider: infuraProvider.InfuraProvider,
|
||||
@ -27276,7 +27363,7 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = void 0;
|
||||
exports.version = "ethers/5.6.1";
|
||||
exports.version = "ethers/5.6.2";
|
||||
|
||||
});
|
||||
|
||||
|
2
packages/ethers/dist/ethers.umd.js.map
vendored
2
packages/ethers/dist/ethers.umd.js.map
vendored
File diff suppressed because one or more lines are too long
2
packages/ethers/dist/ethers.umd.min.js
vendored
2
packages/ethers/dist/ethers.umd.min.js
vendored
File diff suppressed because one or more lines are too long
2
packages/ethers/dist/ethers.umd.min.js.map
vendored
2
packages/ethers/dist/ethers.umd.min.js.map
vendored
File diff suppressed because one or more lines are too long
2
packages/ethers/lib.esm/_version.d.ts
vendored
2
packages/ethers/lib.esm/_version.d.ts
vendored
@ -1,2 +1,2 @@
|
||||
export declare const version = "ethers/5.6.1";
|
||||
export declare const version = "ethers/5.6.2";
|
||||
//# sourceMappingURL=_version.d.ts.map
|
@ -1,2 +1,2 @@
|
||||
export const version = "ethers/5.6.1";
|
||||
export const version = "ethers/5.6.2";
|
||||
//# sourceMappingURL=_version.js.map
|
2
packages/ethers/lib/_version.d.ts
vendored
2
packages/ethers/lib/_version.d.ts
vendored
@ -1,2 +1,2 @@
|
||||
export declare const version = "ethers/5.6.1";
|
||||
export declare const version = "ethers/5.6.2";
|
||||
//# sourceMappingURL=_version.d.ts.map
|
@ -1,5 +1,5 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = void 0;
|
||||
exports.version = "ethers/5.6.1";
|
||||
exports.version = "ethers/5.6.2";
|
||||
//# sourceMappingURL=_version.js.map
|
@ -17,10 +17,10 @@
|
||||
"@ethersproject/json-wallets": "5.6.0",
|
||||
"@ethersproject/keccak256": "5.6.0",
|
||||
"@ethersproject/logger": "5.6.0",
|
||||
"@ethersproject/networks": "5.6.0",
|
||||
"@ethersproject/networks": "5.6.1",
|
||||
"@ethersproject/pbkdf2": "5.6.0",
|
||||
"@ethersproject/properties": "5.6.0",
|
||||
"@ethersproject/providers": "5.6.1",
|
||||
"@ethersproject/providers": "5.6.2",
|
||||
"@ethersproject/random": "5.6.0",
|
||||
"@ethersproject/rlp": "5.6.0",
|
||||
"@ethersproject/sha2": "5.6.0",
|
||||
@ -62,7 +62,7 @@
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"tarballHash": "0xaba62af0c17e7de2f56882958bf3b8e6b56e2a62bd0568e1271dc9bcd9ec63c4",
|
||||
"tarballHash": "0x27baf30af85ed1792ce1f60c319cfef5a843c3c03d455ccc8226035bd4f041fe",
|
||||
"types": "./lib/index.d.ts",
|
||||
"version": "5.6.1"
|
||||
"version": "5.6.2"
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
export const version = "ethers/5.6.1";
|
||||
export const version = "ethers/5.6.2";
|
||||
|
2
packages/networks/lib.esm/_version.d.ts
vendored
2
packages/networks/lib.esm/_version.d.ts
vendored
@ -1,2 +1,2 @@
|
||||
export declare const version = "networks/5.6.0";
|
||||
export declare const version = "networks/5.6.1";
|
||||
//# sourceMappingURL=_version.d.ts.map
|
@ -1,2 +1,2 @@
|
||||
export const version = "networks/5.6.0";
|
||||
export const version = "networks/5.6.1";
|
||||
//# sourceMappingURL=_version.js.map
|
@ -1 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE9C,OAAO,EACH,OAAO,EACP,UAAU,EACb,CAAC;AAsLF;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAmEvD"}
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE9C,OAAO,EACH,OAAO,EACP,UAAU,EACb,CAAC;AA4LF;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAmEvD"}
|
@ -50,6 +50,12 @@ function ethDefaultProvider(network) {
|
||||
}
|
||||
catch (error) { }
|
||||
}
|
||||
if (providers.AnkrProvider && options.ankr !== "-") {
|
||||
try {
|
||||
providerList.push(new providers.AnkrProvider(network, options.ankr));
|
||||
}
|
||||
catch (error) { }
|
||||
}
|
||||
if (providerList.length === 0) {
|
||||
return null;
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
2
packages/networks/lib/_version.d.ts
vendored
2
packages/networks/lib/_version.d.ts
vendored
@ -1,2 +1,2 @@
|
||||
export declare const version = "networks/5.6.0";
|
||||
export declare const version = "networks/5.6.1";
|
||||
//# sourceMappingURL=_version.d.ts.map
|
@ -1,5 +1,5 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = void 0;
|
||||
exports.version = "networks/5.6.0";
|
||||
exports.version = "networks/5.6.1";
|
||||
//# sourceMappingURL=_version.js.map
|
@ -1 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE9C,OAAO,EACH,OAAO,EACP,UAAU,EACb,CAAC;AAsLF;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAmEvD"}
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE9C,OAAO,EACH,OAAO,EACP,UAAU,EACb,CAAC;AA4LF;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAmEvD"}
|
@ -52,6 +52,12 @@ function ethDefaultProvider(network) {
|
||||
}
|
||||
catch (error) { }
|
||||
}
|
||||
if (providers.AnkrProvider && options.ankr !== "-") {
|
||||
try {
|
||||
providerList.push(new providers.AnkrProvider(network, options.ankr));
|
||||
}
|
||||
catch (error) { }
|
||||
}
|
||||
if (providerList.length === 0) {
|
||||
return null;
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
@ -35,7 +35,7 @@
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"tarballHash": "0xe243d49b67d9f944231533353a87d3ffc5e55be0d5ad6d2ed7d152a8f5a2729a",
|
||||
"tarballHash": "0xcb100166596a573c0d453f936152705d33b91eaaea17c78470fb83413afaacb9",
|
||||
"types": "./lib/index.d.ts",
|
||||
"version": "5.6.0"
|
||||
"version": "5.6.1"
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
export const version = "networks/5.6.0";
|
||||
export const version = "networks/5.6.1";
|
||||
|
2
packages/providers/lib.esm/_version.d.ts
vendored
2
packages/providers/lib.esm/_version.d.ts
vendored
@ -1,2 +1,2 @@
|
||||
export declare const version = "providers/5.6.1";
|
||||
export declare const version = "providers/5.6.2";
|
||||
//# sourceMappingURL=_version.d.ts.map
|
@ -1,2 +1,2 @@
|
||||
export const version = "providers/5.6.1";
|
||||
export const version = "providers/5.6.2";
|
||||
//# sourceMappingURL=_version.js.map
|
10
packages/providers/lib.esm/ankr-provider.d.ts
vendored
Normal file
10
packages/providers/lib.esm/ankr-provider.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
import { Network } from "@ethersproject/networks";
|
||||
import { UrlJsonRpcProvider } from "./url-json-rpc-provider";
|
||||
import type { ConnectionInfo } from "@ethersproject/web";
|
||||
export declare class AnkrProvider extends UrlJsonRpcProvider {
|
||||
readonly apiKey: string;
|
||||
isCommunityResource(): boolean;
|
||||
static getApiKey(apiKey: any): any;
|
||||
static getUrl(network: Network, apiKey: any): ConnectionInfo;
|
||||
}
|
||||
//# sourceMappingURL=ankr-provider.d.ts.map
|
1
packages/providers/lib.esm/ankr-provider.d.ts.map
Normal file
1
packages/providers/lib.esm/ankr-provider.d.ts.map
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"ankr-provider.d.ts","sourceRoot":"","sources":["../src.ts/ankr-provider.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAGlD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAqBzD,qBAAa,YAAa,SAAQ,kBAAkB;IAChD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB,mBAAmB,IAAI,OAAO;IAI9B,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,GAAG,GAAG,GAAG;IAKlC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,GAAG,cAAc;CAoB/D"}
|
49
packages/providers/lib.esm/ankr-provider.js
Normal file
49
packages/providers/lib.esm/ankr-provider.js
Normal file
@ -0,0 +1,49 @@
|
||||
import { showThrottleMessage } from "./formatter";
|
||||
import { UrlJsonRpcProvider } from "./url-json-rpc-provider";
|
||||
import { Logger } from "@ethersproject/logger";
|
||||
import { version } from "./_version";
|
||||
const logger = new Logger(version);
|
||||
const defaultApiKey = "9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";
|
||||
function getHost(name) {
|
||||
switch (name) {
|
||||
case "homestead":
|
||||
return "rpc.ankr.com/eth/";
|
||||
case "matic":
|
||||
return "rpc.ankr.com/polygon/";
|
||||
case "arbitrum":
|
||||
return "rpc.ankr.com/arbitrum/";
|
||||
}
|
||||
return logger.throwArgumentError("unsupported network", "name", name);
|
||||
}
|
||||
export class AnkrProvider extends UrlJsonRpcProvider {
|
||||
isCommunityResource() {
|
||||
return (this.apiKey === defaultApiKey);
|
||||
}
|
||||
static getApiKey(apiKey) {
|
||||
if (apiKey == null) {
|
||||
return defaultApiKey;
|
||||
}
|
||||
return apiKey;
|
||||
}
|
||||
static getUrl(network, apiKey) {
|
||||
if (apiKey == null) {
|
||||
apiKey = defaultApiKey;
|
||||
}
|
||||
const connection = {
|
||||
allowGzip: true,
|
||||
url: ("https:/\/" + getHost(network.name) + apiKey),
|
||||
throttleCallback: (attempt, url) => {
|
||||
if (apiKey.apiKey === defaultApiKey) {
|
||||
showThrottleMessage();
|
||||
}
|
||||
return Promise.resolve(true);
|
||||
}
|
||||
};
|
||||
if (apiKey.projectSecret != null) {
|
||||
connection.user = "";
|
||||
connection.password = apiKey.projectSecret;
|
||||
}
|
||||
return connection;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=ankr-provider.js.map
|
1
packages/providers/lib.esm/ankr-provider.js.map
Normal file
1
packages/providers/lib.esm/ankr-provider.js.map
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"ankr-provider.js","sourceRoot":"","sources":["../src.ts/ankr-provider.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAI7D,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;AAGnC,MAAM,aAAa,GAAG,kEAAkE,CAAC;AAEzF,SAAS,OAAO,CAAC,IAAY;IACzB,QAAQ,IAAI,EAAE;QACV,KAAK,WAAW;YACZ,OAAO,mBAAmB,CAAC;QAC/B,KAAK,OAAO;YACR,OAAO,uBAAuB,CAAC;QACnC,KAAK,UAAU;YACX,OAAO,wBAAwB,CAAC;KACvC;IACD,OAAO,MAAM,CAAC,kBAAkB,CAAC,qBAAqB,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;AAC1E,CAAC;AAED,MAAM,OAAO,YAAa,SAAQ,kBAAkB;IAGhD,mBAAmB;QACf,OAAO,CAAC,IAAI,CAAC,MAAM,KAAK,aAAa,CAAC,CAAC;IAC3C,CAAC;IAED,MAAM,CAAC,SAAS,CAAC,MAAW;QACxB,IAAI,MAAM,IAAI,IAAI,EAAE;YAAE,OAAO,aAAa,CAAC;SAAE;QAC7C,OAAO,MAAM,CAAC;IAClB,CAAC;IAED,MAAM,CAAC,MAAM,CAAC,OAAgB,EAAE,MAAW;QACvC,IAAI,MAAM,IAAI,IAAI,EAAE;YAAE,MAAM,GAAG,aAAa,CAAC;SAAE;QAC/C,MAAM,UAAU,GAAmB;YAC/B,SAAS,EAAE,IAAI;YACf,GAAG,EAAE,CAAC,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;YACnD,gBAAgB,EAAE,CAAC,OAAe,EAAE,GAAW,EAAE,EAAE;gBAC/C,IAAI,MAAM,CAAC,MAAM,KAAK,aAAa,EAAE;oBACjC,mBAAmB,EAAE,CAAC;iBACzB;gBACD,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YACjC,CAAC;SACJ,CAAC;QAEF,IAAI,MAAM,CAAC,aAAa,IAAI,IAAI,EAAE;YAC9B,UAAU,CAAC,IAAI,GAAG,EAAE,CAAC;YACrB,UAAU,CAAC,QAAQ,GAAG,MAAM,CAAC,aAAa,CAAA;SAC7C;QAED,OAAO,UAAU,CAAC;IACtB,CAAC;CACJ"}
|
3
packages/providers/lib.esm/index.d.ts
vendored
3
packages/providers/lib.esm/index.d.ts
vendored
@ -3,6 +3,7 @@ import { getNetwork } from "@ethersproject/networks";
|
||||
import { Network, Networkish } from "@ethersproject/networks";
|
||||
import { BaseProvider, EnsProvider, EnsResolver, Resolver } from "./base-provider";
|
||||
import { AlchemyProvider, AlchemyWebSocketProvider } from "./alchemy-provider";
|
||||
import { AnkrProvider } from "./ankr-provider";
|
||||
import { CloudflareProvider } from "./cloudflare-provider";
|
||||
import { EtherscanProvider } from "./etherscan-provider";
|
||||
import { FallbackProvider, FallbackProviderConfig } from "./fallback-provider";
|
||||
@ -18,5 +19,5 @@ import { WebSocketProvider } from "./websocket-provider";
|
||||
import { ExternalProvider, JsonRpcFetchFunc } from "./web3-provider";
|
||||
import { CommunityResourcable, Formatter, isCommunityResourcable, isCommunityResource, showThrottleMessage } from "./formatter";
|
||||
declare function getDefaultProvider(network?: Networkish, options?: any): BaseProvider;
|
||||
export { Provider, BaseProvider, Resolver, UrlJsonRpcProvider, FallbackProvider, AlchemyProvider, AlchemyWebSocketProvider, CloudflareProvider, EtherscanProvider, InfuraProvider, InfuraWebSocketProvider, JsonRpcProvider, JsonRpcBatchProvider, NodesmithProvider, PocketProvider, StaticJsonRpcProvider, Web3Provider, WebSocketProvider, IpcProvider, JsonRpcSigner, getDefaultProvider, getNetwork, isCommunityResource, isCommunityResourcable, showThrottleMessage, Formatter, Block, BlockTag, EventType, FeeData, Filter, Log, Listener, TransactionReceipt, TransactionRequest, TransactionResponse, ExternalProvider, JsonRpcFetchFunc, FallbackProviderConfig, Network, Networkish, EnsProvider, EnsResolver, CommunityResourcable };
|
||||
export { Provider, BaseProvider, Resolver, UrlJsonRpcProvider, FallbackProvider, AlchemyProvider, AlchemyWebSocketProvider, AnkrProvider, CloudflareProvider, EtherscanProvider, InfuraProvider, InfuraWebSocketProvider, JsonRpcProvider, JsonRpcBatchProvider, NodesmithProvider, PocketProvider, StaticJsonRpcProvider, Web3Provider, WebSocketProvider, IpcProvider, JsonRpcSigner, getDefaultProvider, getNetwork, isCommunityResource, isCommunityResourcable, showThrottleMessage, Formatter, Block, BlockTag, EventType, FeeData, Filter, Log, Listener, TransactionReceipt, TransactionRequest, TransactionResponse, ExternalProvider, JsonRpcFetchFunc, FallbackProviderConfig, Network, Networkish, EnsProvider, EnsResolver, CommunityResourcable };
|
||||
//# sourceMappingURL=index.d.ts.map
|
@ -1 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src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B,EACjB,cAAc,EACd,uBAAuB,EACvB,eAAe,EACf,oBAAoB,EACpB,iBAAiB,EACjB,cAAc,EACd,qBAAqB,EACrB,YAAY,EACZ,iBAAiB,EAEjB,WAAW,EAMX,aAAa,EAMb,kBAAkB,EAClB,UAAU,EACV,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EAMnB,SAAS,EAMT,KAAK,EACL,QAAQ,EACR,SAAS,EACT,OAAO,EACP,MAAM,EACN,GAAG,EACH,QAAQ,EACR,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EAEnB,gBAAgB,EAChB,gBAAgB,EAEhB,sBAAsB,EAEtB,OAAO,EACP,UAAU,EAEV,WAAW,EACX,WAAW,EAEX,oBAAoB,EACvB,CAAC"}
|
@ -3,6 +3,7 @@ import { Provider } from "@ethersproject/abstract-provider";
|
||||
import { getNetwork } from "@ethersproject/networks";
|
||||
import { BaseProvider, Resolver } from "./base-provider";
|
||||
import { AlchemyProvider, AlchemyWebSocketProvider } from "./alchemy-provider";
|
||||
import { AnkrProvider } from "./ankr-provider";
|
||||
import { CloudflareProvider } from "./cloudflare-provider";
|
||||
import { EtherscanProvider } from "./etherscan-provider";
|
||||
import { FallbackProvider } from "./fallback-provider";
|
||||
@ -51,6 +52,7 @@ function getDefaultProvider(network, options) {
|
||||
return n._defaultProvider({
|
||||
FallbackProvider,
|
||||
AlchemyProvider,
|
||||
AnkrProvider,
|
||||
CloudflareProvider,
|
||||
EtherscanProvider,
|
||||
InfuraProvider,
|
||||
@ -68,7 +70,7 @@ export {
|
||||
Provider, BaseProvider, Resolver, UrlJsonRpcProvider,
|
||||
///////////////////////
|
||||
// Concrete Providers
|
||||
FallbackProvider, AlchemyProvider, AlchemyWebSocketProvider, CloudflareProvider, EtherscanProvider, InfuraProvider, InfuraWebSocketProvider, JsonRpcProvider, JsonRpcBatchProvider, NodesmithProvider, PocketProvider, StaticJsonRpcProvider, Web3Provider, WebSocketProvider, IpcProvider,
|
||||
FallbackProvider, AlchemyProvider, AlchemyWebSocketProvider, AnkrProvider, CloudflareProvider, EtherscanProvider, InfuraProvider, InfuraWebSocketProvider, JsonRpcProvider, JsonRpcBatchProvider, NodesmithProvider, PocketProvider, StaticJsonRpcProvider, Web3Provider, WebSocketProvider, IpcProvider,
|
||||
///////////////////////
|
||||
// Signer
|
||||
JsonRpcSigner,
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAQH,QAAQ,EAIX,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAGrD,OAAO,EAAE,YAAY,EAA4B,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEnF,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAA0B,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AACpF,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC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O,CAAC,CAAC;gBAC1C;oBACI,MAAM,CAAC,kBAAkB,CAAC,wBAAwB,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;aAC/E;SACJ;KACJ;IAED,MAAM,CAAC,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;IAC9B,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,gBAAgB,EAAE;QAC3B,MAAM,CAAC,UAAU,CAAC,wCAAwC,EAAE,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE;YACrF,SAAS,EAAE,oBAAoB;YAC/B,OAAO,EAAE,OAAO;SACnB,CAAC,CAAC;KACN;IAED,OAAO,CAAC,CAAC,gBAAgB,CAAC;QACtB,gBAAgB;QAEhB,eAAe;QACf,YAAY;QACZ,kBAAkB;QAClB,iBAAiB;QACjB,cAAc;QACd,eAAe;QACf,iBAAiB;QACjB,cAAc;QACd,YAAY;QAEZ,WAAW;KACd,EAAE,OAAO,CAAC,CAAC;AAChB,CAAC;AAED,wBAAwB;AACxB,UAAU;AAEV,OAAO;AAEH,uCAAuC;AACvC,QAAQ,EACR,YAAY,EAEZ,QAAQ,EAER,kBAAkB;AAElB,uBAAuB;AACvB,qBAAqB;AAErB,gBAAgB,EAEhB,eAAe,EACf,wBAAwB,EACxB,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACd,uBAAuB,EACvB,eAAe,EACf,oBAAoB,EACpB,iBAAiB,EACjB,cAAc,EACd,qBAAqB,EACrB,YAAY,EACZ,iBAAiB,EAEjB,WAAW;AAGX,uBAAuB;AACvB,SAAS;AAET,aAAa;AAGb,uBAAuB;AACvB,YAAY;AAEZ,kBAAkB,EAClB,UAAU,EACV,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB;AAGnB,uBAAuB;AACvB,UAAU;AAEV,SAAS,EA6BZ,CAAC"}
|
2
packages/providers/lib/_version.d.ts
vendored
2
packages/providers/lib/_version.d.ts
vendored
@ -1,2 +1,2 @@
|
||||
export declare const version = "providers/5.6.1";
|
||||
export declare const version = "providers/5.6.2";
|
||||
//# sourceMappingURL=_version.d.ts.map
|
@ -1,5 +1,5 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = void 0;
|
||||
exports.version = "providers/5.6.1";
|
||||
exports.version = "providers/5.6.2";
|
||||
//# sourceMappingURL=_version.js.map
|
10
packages/providers/lib/ankr-provider.d.ts
vendored
Normal file
10
packages/providers/lib/ankr-provider.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
import { Network } from "@ethersproject/networks";
|
||||
import { UrlJsonRpcProvider } from "./url-json-rpc-provider";
|
||||
import type { ConnectionInfo } from "@ethersproject/web";
|
||||
export declare class AnkrProvider extends UrlJsonRpcProvider {
|
||||
readonly apiKey: string;
|
||||
isCommunityResource(): boolean;
|
||||
static getApiKey(apiKey: any): any;
|
||||
static getUrl(network: Network, apiKey: any): ConnectionInfo;
|
||||
}
|
||||
//# sourceMappingURL=ankr-provider.d.ts.map
|
1
packages/providers/lib/ankr-provider.d.ts.map
Normal file
1
packages/providers/lib/ankr-provider.d.ts.map
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"ankr-provider.d.ts","sourceRoot":"","sources":["../src.ts/ankr-provider.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAGlD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAqBzD,qBAAa,YAAa,SAAQ,kBAAkB;IAChD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB,mBAAmB,IAAI,OAAO;IAI9B,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,GAAG,GAAG,GAAG;IAKlC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,GAAG,cAAc;CAoB/D"}
|
73
packages/providers/lib/ankr-provider.js
Normal file
73
packages/providers/lib/ankr-provider.js
Normal file
@ -0,0 +1,73 @@
|
||||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.AnkrProvider = void 0;
|
||||
var formatter_1 = require("./formatter");
|
||||
var url_json_rpc_provider_1 = require("./url-json-rpc-provider");
|
||||
var logger_1 = require("@ethersproject/logger");
|
||||
var _version_1 = require("./_version");
|
||||
var logger = new logger_1.Logger(_version_1.version);
|
||||
var defaultApiKey = "9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";
|
||||
function getHost(name) {
|
||||
switch (name) {
|
||||
case "homestead":
|
||||
return "rpc.ankr.com/eth/";
|
||||
case "matic":
|
||||
return "rpc.ankr.com/polygon/";
|
||||
case "arbitrum":
|
||||
return "rpc.ankr.com/arbitrum/";
|
||||
}
|
||||
return logger.throwArgumentError("unsupported network", "name", name);
|
||||
}
|
||||
var AnkrProvider = /** @class */ (function (_super) {
|
||||
__extends(AnkrProvider, _super);
|
||||
function AnkrProvider() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
AnkrProvider.prototype.isCommunityResource = function () {
|
||||
return (this.apiKey === defaultApiKey);
|
||||
};
|
||||
AnkrProvider.getApiKey = function (apiKey) {
|
||||
if (apiKey == null) {
|
||||
return defaultApiKey;
|
||||
}
|
||||
return apiKey;
|
||||
};
|
||||
AnkrProvider.getUrl = function (network, apiKey) {
|
||||
if (apiKey == null) {
|
||||
apiKey = defaultApiKey;
|
||||
}
|
||||
var connection = {
|
||||
allowGzip: true,
|
||||
url: ("https:/\/" + getHost(network.name) + apiKey),
|
||||
throttleCallback: function (attempt, url) {
|
||||
if (apiKey.apiKey === defaultApiKey) {
|
||||
(0, formatter_1.showThrottleMessage)();
|
||||
}
|
||||
return Promise.resolve(true);
|
||||
}
|
||||
};
|
||||
if (apiKey.projectSecret != null) {
|
||||
connection.user = "";
|
||||
connection.password = apiKey.projectSecret;
|
||||
}
|
||||
return connection;
|
||||
};
|
||||
return AnkrProvider;
|
||||
}(url_json_rpc_provider_1.UrlJsonRpcProvider));
|
||||
exports.AnkrProvider = AnkrProvider;
|
||||
//# sourceMappingURL=ankr-provider.js.map
|
1
packages/providers/lib/ankr-provider.js.map
Normal file
1
packages/providers/lib/ankr-provider.js.map
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"ankr-provider.js","sourceRoot":"","sources":["../src.ts/ankr-provider.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAGA,yCAAkD;AAClD,iEAA6D;AAI7D,gDAA+C;AAC/C,uCAAqC;AACrC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,kBAAO,CAAC,CAAC;AAGnC,IAAM,aAAa,GAAG,kEAAkE,CAAC;AAEzF,SAAS,OAAO,CAAC,IAAY;IACzB,QAAQ,IAAI,EAAE;QACV,KAAK,WAAW;YACZ,OAAO,mBAAmB,CAAC;QAC/B,KAAK,OAAO;YACR,OAAO,uBAAuB,CAAC;QACnC,KAAK,UAAU;YACX,OAAO,wBAAwB,CAAC;KACvC;IACD,OAAO,MAAM,CAAC,kBAAkB,CAAC,qBAAqB,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;AAC1E,CAAC;AAED;IAAkC,gCAAkB;IAApD;;IAgCA,CAAC;IA7BG,0CAAmB,GAAnB;QACI,OAAO,CAAC,IAAI,CAAC,MAAM,KAAK,aAAa,CAAC,CAAC;IAC3C,CAAC;IAEM,sBAAS,GAAhB,UAAiB,MAAW;QACxB,IAAI,MAAM,IAAI,IAAI,EAAE;YAAE,OAAO,aAAa,CAAC;SAAE;QAC7C,OAAO,MAAM,CAAC;IAClB,CAAC;IAEM,mBAAM,GAAb,UAAc,OAAgB,EAAE,MAAW;QACvC,IAAI,MAAM,IAAI,IAAI,EAAE;YAAE,MAAM,GAAG,aAAa,CAAC;SAAE;QAC/C,IAAM,UAAU,GAAmB;YAC/B,SAAS,EAAE,IAAI;YACf,GAAG,EAAE,CAAC,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;YACnD,gBAAgB,EAAE,UAAC,OAAe,EAAE,GAAW;gBAC3C,IAAI,MAAM,CAAC,MAAM,KAAK,aAAa,EAAE;oBACjC,IAAA,+BAAmB,GAAE,CAAC;iBACzB;gBACD,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YACjC,CAAC;SACJ,CAAC;QAEF,IAAI,MAAM,CAAC,aAAa,IAAI,IAAI,EAAE;YAC9B,UAAU,CAAC,IAAI,GAAG,EAAE,CAAC;YACrB,UAAU,CAAC,QAAQ,GAAG,MAAM,CAAC,aAAa,CAAA;SAC7C;QAED,OAAO,UAAU,CAAC;IACtB,CAAC;IACL,mBAAC;AAAD,CAAC,AAhCD,CAAkC,0CAAkB,GAgCnD;AAhCY,oCAAY"}
|
3
packages/providers/lib/index.d.ts
vendored
3
packages/providers/lib/index.d.ts
vendored
@ -3,6 +3,7 @@ import { getNetwork } from "@ethersproject/networks";
|
||||
import { Network, Networkish } from "@ethersproject/networks";
|
||||
import { BaseProvider, EnsProvider, EnsResolver, Resolver } from "./base-provider";
|
||||
import { AlchemyProvider, AlchemyWebSocketProvider } from "./alchemy-provider";
|
||||
import { AnkrProvider } from "./ankr-provider";
|
||||
import { CloudflareProvider } from "./cloudflare-provider";
|
||||
import { EtherscanProvider } from "./etherscan-provider";
|
||||
import { FallbackProvider, FallbackProviderConfig } from "./fallback-provider";
|
||||
@ -18,5 +19,5 @@ import { WebSocketProvider } from "./websocket-provider";
|
||||
import { ExternalProvider, JsonRpcFetchFunc } from "./web3-provider";
|
||||
import { CommunityResourcable, Formatter, isCommunityResourcable, isCommunityResource, showThrottleMessage } from "./formatter";
|
||||
declare function getDefaultProvider(network?: Networkish, options?: any): BaseProvider;
|
||||
export { Provider, BaseProvider, Resolver, UrlJsonRpcProvider, FallbackProvider, AlchemyProvider, AlchemyWebSocketProvider, CloudflareProvider, EtherscanProvider, InfuraProvider, InfuraWebSocketProvider, JsonRpcProvider, JsonRpcBatchProvider, NodesmithProvider, PocketProvider, StaticJsonRpcProvider, Web3Provider, WebSocketProvider, IpcProvider, JsonRpcSigner, getDefaultProvider, getNetwork, isCommunityResource, isCommunityResourcable, showThrottleMessage, Formatter, Block, BlockTag, EventType, FeeData, Filter, Log, Listener, TransactionReceipt, TransactionRequest, TransactionResponse, ExternalProvider, JsonRpcFetchFunc, FallbackProviderConfig, Network, Networkish, EnsProvider, EnsResolver, CommunityResourcable };
|
||||
export { Provider, BaseProvider, Resolver, UrlJsonRpcProvider, FallbackProvider, AlchemyProvider, AlchemyWebSocketProvider, AnkrProvider, CloudflareProvider, EtherscanProvider, InfuraProvider, InfuraWebSocketProvider, JsonRpcProvider, JsonRpcBatchProvider, NodesmithProvider, PocketProvider, StaticJsonRpcProvider, Web3Provider, WebSocketProvider, IpcProvider, JsonRpcSigner, getDefaultProvider, getNetwork, isCommunityResource, isCommunityResourcable, showThrottleMessage, Formatter, Block, BlockTag, EventType, FeeData, Filter, Log, Listener, TransactionReceipt, TransactionRequest, TransactionResponse, ExternalProvider, JsonRpcFetchFunc, FallbackProviderConfig, Network, Networkish, EnsProvider, EnsResolver, CommunityResourcable };
|
||||
//# sourceMappingURL=index.d.ts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AEhB,eAAe,EACf,wBAAwB,EACxB,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACd,uBAAuB,EACvB,eAAe,EACf,oBAAoB,EACpB,iBAAiB,EACjB,cAAc,EACd,qBAAqB,EACrB,YAAY,EACZ,iBAAiB,EAEjB,WAAW,EAMX,aAAa,EAMb,kBAAkB,EAClB,UAAU,EACV,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EAMnB,SAAS,EAMT,KAAK,EACL,QAAQ,EACR,SAAS,EACT,OAAO,EACP,MAAM,EACN,GAAG,EACH,QAAQ,EACR,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EAEnB,gBAAgB,EAChB,gBAAgB,EAEhB,sBAAsB,EAEtB,OAAO,EACP,UAAU,EAEV,WAAW,EACX,WAAW,EAEX,oBAAoB,EACvB,CAAC"}
|
@ -1,6 +1,6 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Formatter = exports.showThrottleMessage = exports.isCommunityResourcable = exports.isCommunityResource = exports.getNetwork = exports.getDefaultProvider = exports.JsonRpcSigner = exports.IpcProvider = exports.WebSocketProvider = exports.Web3Provider = exports.StaticJsonRpcProvider = exports.PocketProvider = exports.NodesmithProvider = exports.JsonRpcBatchProvider = exports.JsonRpcProvider = exports.InfuraWebSocketProvider = exports.InfuraProvider = exports.EtherscanProvider = exports.CloudflareProvider = exports.AlchemyWebSocketProvider = exports.AlchemyProvider = exports.FallbackProvider = exports.UrlJsonRpcProvider = exports.Resolver = exports.BaseProvider = exports.Provider = void 0;
|
||||
exports.Formatter = exports.showThrottleMessage = exports.isCommunityResourcable = exports.isCommunityResource = exports.getNetwork = exports.getDefaultProvider = exports.JsonRpcSigner = exports.IpcProvider = exports.WebSocketProvider = exports.Web3Provider = exports.StaticJsonRpcProvider = exports.PocketProvider = exports.NodesmithProvider = exports.JsonRpcBatchProvider = exports.JsonRpcProvider = exports.InfuraWebSocketProvider = exports.InfuraProvider = exports.EtherscanProvider = exports.CloudflareProvider = exports.AnkrProvider = exports.AlchemyWebSocketProvider = exports.AlchemyProvider = exports.FallbackProvider = exports.UrlJsonRpcProvider = exports.Resolver = exports.BaseProvider = exports.Provider = void 0;
|
||||
var abstract_provider_1 = require("@ethersproject/abstract-provider");
|
||||
Object.defineProperty(exports, "Provider", { enumerable: true, get: function () { return abstract_provider_1.Provider; } });
|
||||
var networks_1 = require("@ethersproject/networks");
|
||||
@ -11,6 +11,8 @@ Object.defineProperty(exports, "Resolver", { enumerable: true, get: function ()
|
||||
var alchemy_provider_1 = require("./alchemy-provider");
|
||||
Object.defineProperty(exports, "AlchemyProvider", { enumerable: true, get: function () { return alchemy_provider_1.AlchemyProvider; } });
|
||||
Object.defineProperty(exports, "AlchemyWebSocketProvider", { enumerable: true, get: function () { return alchemy_provider_1.AlchemyWebSocketProvider; } });
|
||||
var ankr_provider_1 = require("./ankr-provider");
|
||||
Object.defineProperty(exports, "AnkrProvider", { enumerable: true, get: function () { return ankr_provider_1.AnkrProvider; } });
|
||||
var cloudflare_provider_1 = require("./cloudflare-provider");
|
||||
Object.defineProperty(exports, "CloudflareProvider", { enumerable: true, get: function () { return cloudflare_provider_1.CloudflareProvider; } });
|
||||
var etherscan_provider_1 = require("./etherscan-provider");
|
||||
@ -78,6 +80,7 @@ function getDefaultProvider(network, options) {
|
||||
return n._defaultProvider({
|
||||
FallbackProvider: fallback_provider_1.FallbackProvider,
|
||||
AlchemyProvider: alchemy_provider_1.AlchemyProvider,
|
||||
AnkrProvider: ankr_provider_1.AnkrProvider,
|
||||
CloudflareProvider: cloudflare_provider_1.CloudflareProvider,
|
||||
EtherscanProvider: etherscan_provider_1.EtherscanProvider,
|
||||
InfuraProvider: infura_provider_1.InfuraProvider,
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src.ts/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,sEAY0C;AAkFtC,yFAtF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: no test specified\" && exit 1"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"tarballHash": "0xbf42b88442c3a39c744a11e5fa21f26b88282742fe14c3019898882a6a1da541",
|
||||
"tarballHash": "0x73aa05546420691ee5484314a11eecaaa8ac26a29d0d4e9cece57e0739bdfab3",
|
||||
"types": "./lib/index.d.ts",
|
||||
"version": "5.6.1"
|
||||
"version": "5.6.2"
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
export const version = "providers/5.6.1";
|
||||
export const version = "providers/5.6.2";
|
||||
|
2
packages/tests/lib.esm/_version.d.ts
vendored
2
packages/tests/lib.esm/_version.d.ts
vendored
@ -1,2 +1,2 @@
|
||||
export declare const version = "tests/5.6.1";
|
||||
export declare const version = "tests/5.6.2";
|
||||
//# sourceMappingURL=_version.d.ts.map
|
@ -1,2 +1,2 @@
|
||||
export const version = "tests/5.6.1";
|
||||
export const version = "tests/5.6.2";
|
||||
//# sourceMappingURL=_version.js.map
|
@ -549,6 +549,16 @@ const providerFunctions = [
|
||||
return new ethers.providers.AlchemyProvider(network, getApiKeys(network).alchemy);
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "AnkrProvider",
|
||||
networks: ["default", "homestead"],
|
||||
create: (network) => {
|
||||
if (network == "default") {
|
||||
return new ethers.providers.AnkrProvider(null);
|
||||
}
|
||||
return new ethers.providers.AnkrProvider(network);
|
||||
}
|
||||
},
|
||||
/*
|
||||
{
|
||||
name: "CloudflareProvider",
|
||||
|
File diff suppressed because one or more lines are too long
2
packages/tests/lib/_version.d.ts
vendored
2
packages/tests/lib/_version.d.ts
vendored
@ -1,2 +1,2 @@
|
||||
export declare const version = "tests/5.6.1";
|
||||
export declare const version = "tests/5.6.2";
|
||||
//# sourceMappingURL=_version.d.ts.map
|
@ -1,5 +1,5 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.version = void 0;
|
||||
exports.version = "tests/5.6.1";
|
||||
exports.version = "tests/5.6.2";
|
||||
//# sourceMappingURL=_version.js.map
|
@ -580,6 +580,16 @@ var providerFunctions = [
|
||||
return new ethers_1.ethers.providers.AlchemyProvider(network, getApiKeys(network).alchemy);
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "AnkrProvider",
|
||||
networks: ["default", "homestead"],
|
||||
create: function (network) {
|
||||
if (network == "default") {
|
||||
return new ethers_1.ethers.providers.AnkrProvider(null);
|
||||
}
|
||||
return new ethers_1.ethers.providers.AnkrProvider(network);
|
||||
}
|
||||
},
|
||||
/*
|
||||
{
|
||||
name: "CloudflareProvider",
|
||||
|
File diff suppressed because one or more lines are too long
@ -37,7 +37,7 @@
|
||||
"scripts": {
|
||||
"test": "exit 1"
|
||||
},
|
||||
"tarballHash": "0x54b80192dfddc20772b05a61641bb764504ff0f9fb9572599aca4e49794dd720",
|
||||
"tarballHash": "0xe966fb933c9a417d07d2cec49483e8ac4c65e5a5b705770d0f3863694b3f4973",
|
||||
"types": "./lib/index.d.ts",
|
||||
"version": "5.6.1"
|
||||
"version": "5.6.2"
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
export const version = "tests/5.6.1";
|
||||
export const version = "tests/5.6.2";
|
||||
|
Loading…
Reference in New Issue
Block a user