@unstoppabledomains/resolution
Advanced tools
Comparing version 9.2.1 to 9.2.2
@@ -80,2 +80,6 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var contentHash = __importStar(require("content-hash")); | ||
var bip44_constants_1 = __importDefault(require("bip44-constants")); | ||
var address_encoder_1 = require("@ensdomains/address-encoder"); | ||
var ethereum_ens_network_map_1 = __importDefault(require("ethereum-ens-network-map")); | ||
var ens_1 = __importDefault(require("./contracts/ens/ens")); | ||
@@ -89,3 +93,2 @@ var resolver_1 = __importDefault(require("./contracts/ens/resolver")); | ||
var EthereumContract_1 = __importDefault(require("./contracts/EthereumContract")); | ||
var ethereum_ens_network_map_1 = __importDefault(require("ethereum-ens-network-map")); | ||
var publicTypes_1 = require("./types/publicTypes"); | ||
@@ -98,3 +101,2 @@ var utils_1 = require("./utils"); | ||
var utils_2 = require("./utils"); | ||
var requireOrFail_1 = require("./utils/requireOrFail"); | ||
var ens_config_json_1 = __importDefault(require("./config/ens-config.json")); | ||
@@ -510,9 +512,7 @@ var Networking_1 = __importDefault(require("./utils/Networking")); | ||
Ens.prototype.getCoinType = function (currencyTicker) { | ||
var bip44constants = (0, requireOrFail_1.requireOrFail)('bip44-constants', 'bip44-constants', '^8.0.5'); | ||
var formatsByCoinType = (0, requireOrFail_1.requireOrFail)('@ensdomains/address-encoder', '@ensdomains/address-encoder', '>= 0.1.x <= 0.2.x').formatsByCoinType; | ||
var coin = bip44constants.findIndex(function (item) { | ||
var coin = bip44_constants_1.default.findIndex(function (item) { | ||
return item[1] === currencyTicker.toUpperCase() || | ||
item[2] === currencyTicker.toUpperCase(); | ||
}); | ||
if (coin < 0 || !formatsByCoinType[coin]) { | ||
if (coin < 0 || !address_encoder_1.formatsByCoinType[coin]) { | ||
throw new resolutionError_1.ResolutionError(resolutionError_1.ResolutionErrorCode.UnsupportedCurrency, { | ||
@@ -558,7 +558,6 @@ currencyTicker: currencyTicker, | ||
return __awaiter(this, void 0, void 0, function () { | ||
var formatsByCoinType, resolverContract, nodeHash, addr, _a, data; | ||
var resolverContract, nodeHash, addr, _a, data; | ||
return __generator(this, function (_b) { | ||
switch (_b.label) { | ||
case 0: | ||
formatsByCoinType = (0, requireOrFail_1.requireOrFail)('@ensdomains/address-encoder', '@ensdomains/address-encoder', '>= 0.1.x <= 0.2.x').formatsByCoinType; | ||
resolverContract = new EthereumContract_1.default((0, resolver_1.default)(resolver, coinType), resolver, this.provider, this.proxyServiceApiKey); | ||
@@ -581,3 +580,3 @@ nodeHash = this.namehash(domain); | ||
data = Buffer.from(addr.replace('0x', ''), 'hex'); | ||
return [2 /*return*/, formatsByCoinType[coinType].encoder(data)]; | ||
return [2 /*return*/, address_encoder_1.formatsByCoinType[coinType].encoder(data)]; | ||
} | ||
@@ -613,7 +612,6 @@ }); | ||
return __awaiter(this, void 0, void 0, function () { | ||
var contentHash, nodeHash, resolverContract, contentHashEncoded, codec; | ||
var nodeHash, resolverContract, contentHashEncoded, codec; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: | ||
contentHash = (0, requireOrFail_1.requireOrFail)('content-hash', 'content-hash', '^2.5.2'); | ||
nodeHash = this.namehash(domain); | ||
@@ -620,0 +618,0 @@ return [4 /*yield*/, this.getResolverContract(domain)]; |
@@ -1,3 +0,11 @@ | ||
## 9.2.0 | ||
## 9.2.2 | ||
- Changed devDependencies to dependencies | ||
## 9.2.1 | ||
- Fix ens-config.json path error | ||
## 9.2.0 | ||
- Add ENS support | ||
@@ -4,0 +12,0 @@ |
{ | ||
"name": "@unstoppabledomains/resolution", | ||
"version": "9.2.1", | ||
"version": "9.2.2", | ||
"description": "Domain Resolution for blockchain domains", | ||
@@ -63,3 +63,2 @@ "main": "./build/index.js", | ||
"devDependencies": { | ||
"@ensdomains/address-encoder": "0.2.18", | ||
"@ethersproject/providers": "^5.4.5", | ||
@@ -77,4 +76,2 @@ "@types/bn.js": "^4.11.6", | ||
"audit-ci": "^3.1.1", | ||
"bip44-constants": "^8.0.103", | ||
"content-hash": "^2.5.2", | ||
"dotenv": "^8.2.0", | ||
@@ -104,4 +101,7 @@ "eslint": "^7.7.0", | ||
"dependencies": { | ||
"@ensdomains/address-encoder": "^0.2.22", | ||
"@ethersproject/abi": "^5.0.1", | ||
"bip44-constants": "^8.0.103", | ||
"bn.js": "^4.4.0", | ||
"content-hash": "^2.5.2", | ||
"cross-fetch": "4.0.0", | ||
@@ -108,0 +108,0 @@ "crypto-js": "^4.1.1", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
31
0
622898
11
15700
+ Addedbip44-constants@^8.0.103
+ Addedcontent-hash@^2.5.2
+ Added@ensdomains/address-encoder@0.2.22(transitive)
+ Addedbase-x@3.0.10(transitive)
+ Addedbase64-js@1.5.1(transitive)
+ Addedbech32@2.0.0(transitive)
+ Addedbig-integer@1.6.36(transitive)
+ Addedbip44-constants@8.0.103(transitive)
+ Addedblakejs@1.2.1(transitive)
+ Addedbs58@4.0.1(transitive)
+ Addedbuffer@5.7.16.0.3(transitive)
+ Addedcids@0.7.5(transitive)
+ Addedclass-is@1.1.0(transitive)
+ Addedcontent-hash@2.5.2(transitive)
+ Addedcrypto-addr-codec@0.1.8(transitive)
+ Addedhash-base@3.1.0(transitive)
+ Addedieee754@1.2.1(transitive)
+ Addedjs-crc@0.2.0(transitive)
+ Addedjs-sha512@0.8.0(transitive)
+ Addedmultibase@0.6.10.7.0(transitive)
+ Addedmulticodec@0.5.71.0.4(transitive)
+ Addedmultihashes@0.4.21(transitive)
+ Addednano-base32@1.0.1(transitive)
+ Addedreadable-stream@3.6.2(transitive)
+ Addedripemd160@2.0.2(transitive)
+ Addedripemd160-min@0.0.6(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedsha3@2.1.4(transitive)
+ Addedstring_decoder@1.3.0(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
+ Addedvarint@5.0.2(transitive)