diff --git a/tools/ui/package-lock.json b/tools/ui/package-lock.json index d2aabb24..fd65f66e 100644 --- a/tools/ui/package-lock.json +++ b/tools/ui/package-lock.json @@ -8,11 +8,11 @@ "name": "ui", "version": "0.1.0", "devDependencies": { - "@dfinity/agent": "1.0.1", - "@dfinity/auth-client": "1.0.1", - "@dfinity/candid": "1.0.1", - "@dfinity/identity": "1.0.1", - "@dfinity/principal": "1.0.1", + "@dfinity/agent": "2.1.0", + "@dfinity/auth-client": "2.1.0", + "@dfinity/candid": "2.1.0", + "@dfinity/identity": "2.1.0", + "@dfinity/principal": "2.1.0", "buffer": "6.0.3", "copy-webpack-plugin": "^9.0.1", "css-loader": "^6.8.1", @@ -30,12 +30,12 @@ "extraneous": true }, "node_modules/@dfinity/agent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@dfinity/agent/-/agent-1.0.1.tgz", - "integrity": "sha512-QoCiKIWEgsXoaiHpb76M2qLXYDS9IdfvC81dLJYvX9KVXRq8Ojo4S82tBqBFGtM0j0EKEC6mIAJV/bqhOJTtjQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@dfinity/agent/-/agent-2.1.0.tgz", + "integrity": "sha512-DXIg9Yx/80xERtEXzd37jGA/5kyR4gC57A3+JElOvBt/lWlfq+cEemaAEArI+cYmeE0xkB9DROCM7r5yEbRg7Q==", "dev": true, "dependencies": { - "@noble/curves": "^1.2.0", + "@noble/curves": "^1.4.0", "@noble/hashes": "^1.3.1", "base64-arraybuffer": "^0.2.0", "borc": "^2.1.1", @@ -43,37 +43,37 @@ "simple-cbor": "^0.4.1" }, "peerDependencies": { - "@dfinity/candid": "^1.0.1", - "@dfinity/principal": "^1.0.1" + "@dfinity/candid": "^2.1.0", + "@dfinity/principal": "^2.1.0" } }, "node_modules/@dfinity/auth-client": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@dfinity/auth-client/-/auth-client-1.0.1.tgz", - "integrity": "sha512-QooHufXCDHTXySC1Tb1xf9+KRJISbw1sLYLIgY7PTxrA4Nc1ZgA7o4exwgRyIuJgoWMKrjgHPUZcu4N5ak69OQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@dfinity/auth-client/-/auth-client-2.1.0.tgz", + "integrity": "sha512-Xnps491cxt22w4+Cz0EODzmVk5DRUYB1mpSKENJEeLNVJpH+9z6gbwaHyYYzxq0cKvd7V4iM1NmuT3kXUtAJeQ==", "dev": true, "dependencies": { "idb": "^7.0.2" }, "peerDependencies": { - "@dfinity/agent": "^1.0.1", - "@dfinity/identity": "^1.0.1", - "@dfinity/principal": "^1.0.1" + "@dfinity/agent": "^2.1.0", + "@dfinity/identity": "^2.1.0", + "@dfinity/principal": "^2.1.0" } }, "node_modules/@dfinity/candid": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@dfinity/candid/-/candid-1.0.1.tgz", - "integrity": "sha512-PfZNV1fTOWtl+NhLOw71ACLYGugKF9HdEJKtkyBJqbj+6pqshvK6rllCUkGwMsmXfP8YopLzmoNVdy1rp/eOgg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@dfinity/candid/-/candid-2.1.0.tgz", + "integrity": "sha512-MMD+bcIVrIJTLjyGx8xpj8A0Dwb8OPrFXWp/QHGXTSOezXxSMp2yG2QjxYkbV4EN5eCkwjeOY5mH2gHSa18pNA==", "dev": true, "peerDependencies": { - "@dfinity/principal": "^1.0.1" + "@dfinity/principal": "^2.1.0" } }, "node_modules/@dfinity/identity": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@dfinity/identity/-/identity-1.0.1.tgz", - "integrity": "sha512-ArajyKSkiA4LjOq/ocGLMd66svgMVntF9j9P7irZScrzTCPcEXk5c7VteAqRGMwHCpI4LRipjmuZA1agwmUzRw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@dfinity/identity/-/identity-2.1.0.tgz", + "integrity": "sha512-cB16Af65RpJwc3JR4r0jV+TckDiflPFHSRUh/JZ3920CUEDB1wYbzCcUtUb/IWiU101oKZNi5QdQrHp1haZq6w==", "dev": true, "dependencies": { "@noble/curves": "^1.2.0", @@ -81,15 +81,15 @@ "borc": "^2.1.1" }, "peerDependencies": { - "@dfinity/agent": "^1.0.1", - "@dfinity/principal": "^1.0.1", + "@dfinity/agent": "^2.1.0", + "@dfinity/principal": "^2.1.0", "@peculiar/webcrypto": "^1.4.0" } }, "node_modules/@dfinity/principal": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@dfinity/principal/-/principal-1.0.1.tgz", - "integrity": "sha512-pCAuTLcvZEZ8fYgVzTVhfUfFGadxeWN4v2z8Q0rizeiqcHKhbJVfWUiXXjzPGG5lNz2DxKyUHQ/WS4UTbTaxvg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@dfinity/principal/-/principal-2.1.0.tgz", + "integrity": "sha512-nC3tI2Kxe9153mI3QdWzAsCnsyNygqnb9O/qhJOks97RCE1vfn3nkhq4dN6yBVpvlCv3hOMSleAcZm3DzH3NsQ==", "dev": true, "dependencies": { "@noble/hashes": "^1.3.1" @@ -136,24 +136,27 @@ } }, "node_modules/@noble/curves": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz", - "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.6.0.tgz", + "integrity": "sha512-TlaHRXDehJuRNR9TfZDNQ45mMEd5dwUwmicsafcIX4SsNiqnCHKjE/1alYPd/lDRVhxdhUAlv8uEhMCI5zjIJQ==", "dev": true, "dependencies": { - "@noble/hashes": "1.3.2" + "@noble/hashes": "1.5.0" + }, + "engines": { + "node": "^14.21.3 || >=16" }, "funding": { "url": "https://paulmillr.com/funding/" } }, "node_modules/@noble/hashes": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", - "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.5.0.tgz", + "integrity": "sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA==", "dev": true, "engines": { - "node": ">= 16" + "node": "^14.21.3 || >=16" }, "funding": { "url": "https://paulmillr.com/funding/" @@ -195,9 +198,9 @@ } }, "node_modules/@peculiar/asn1-schema": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.3.8.tgz", - "integrity": "sha512-ULB1XqHKx1WBU/tTFIA+uARuRoBVZ4pNdOA878RDrRbBfBGcSzi5HBkdScC6ZbHn8z7L8gmKCgPC1LHRrP46tA==", + "version": "2.3.13", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.3.13.tgz", + "integrity": "sha512-3Xq3a01WkHRZL8X04Zsfg//mGaA21xlL4tlVn4v2xGT0JStiztATRkMwa5b+f/HXmY2smsiLXYK46Gwgzvfg3g==", "dev": true, "peer": true, "dependencies": { @@ -220,9 +223,9 @@ } }, "node_modules/@peculiar/webcrypto": { - "version": "1.4.5", - "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.4.5.tgz", - "integrity": "sha512-oDk93QCDGdxFRM8382Zdminzs44dg3M2+E5Np+JWkpqLDyJC9DviMh8F8mEJkYuUcUOGA5jHO5AJJ10MFWdbZw==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.5.0.tgz", + "integrity": "sha512-BRs5XUAwiyCDQMsVA9IDvDa7UBR9gAvPHgugOeGng3YN6vJ9JYonyDc0lNczErgtCWtucjR5N7VtaonboD/ezg==", "dev": true, "peer": true, "dependencies": { @@ -230,7 +233,7 @@ "@peculiar/json-schema": "^1.1.12", "pvtsutils": "^1.3.5", "tslib": "^2.6.2", - "webcrypto-core": "^1.7.8" + "webcrypto-core": "^1.8.0" }, "engines": { "node": ">=10.12.0" @@ -2715,9 +2718,9 @@ } }, "node_modules/webcrypto-core": { - "version": "1.7.8", - "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.7.8.tgz", - "integrity": "sha512-eBR98r9nQXTqXt/yDRtInszPMjTaSAMJAFDg2AHsgrnczawT1asx9YNBX6k5p+MekbPF4+s/UJJrr88zsTqkSg==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.8.0.tgz", + "integrity": "sha512-kR1UQNH8MD42CYuLzvibfakG5Ew5seG85dMMoAM/1LqvckxaF6pUiidLuraIu4V+YCIFabYecUZAW0TuxAoaqw==", "dev": true, "peer": true, "dependencies": { @@ -2932,12 +2935,12 @@ }, "dependencies": { "@dfinity/agent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@dfinity/agent/-/agent-1.0.1.tgz", - "integrity": "sha512-QoCiKIWEgsXoaiHpb76M2qLXYDS9IdfvC81dLJYvX9KVXRq8Ojo4S82tBqBFGtM0j0EKEC6mIAJV/bqhOJTtjQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@dfinity/agent/-/agent-2.1.0.tgz", + "integrity": "sha512-DXIg9Yx/80xERtEXzd37jGA/5kyR4gC57A3+JElOvBt/lWlfq+cEemaAEArI+cYmeE0xkB9DROCM7r5yEbRg7Q==", "dev": true, "requires": { - "@noble/curves": "^1.2.0", + "@noble/curves": "^1.4.0", "@noble/hashes": "^1.3.1", "base64-arraybuffer": "^0.2.0", "borc": "^2.1.1", @@ -2946,25 +2949,25 @@ } }, "@dfinity/auth-client": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@dfinity/auth-client/-/auth-client-1.0.1.tgz", - "integrity": "sha512-QooHufXCDHTXySC1Tb1xf9+KRJISbw1sLYLIgY7PTxrA4Nc1ZgA7o4exwgRyIuJgoWMKrjgHPUZcu4N5ak69OQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@dfinity/auth-client/-/auth-client-2.1.0.tgz", + "integrity": "sha512-Xnps491cxt22w4+Cz0EODzmVk5DRUYB1mpSKENJEeLNVJpH+9z6gbwaHyYYzxq0cKvd7V4iM1NmuT3kXUtAJeQ==", "dev": true, "requires": { "idb": "^7.0.2" } }, "@dfinity/candid": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@dfinity/candid/-/candid-1.0.1.tgz", - "integrity": "sha512-PfZNV1fTOWtl+NhLOw71ACLYGugKF9HdEJKtkyBJqbj+6pqshvK6rllCUkGwMsmXfP8YopLzmoNVdy1rp/eOgg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@dfinity/candid/-/candid-2.1.0.tgz", + "integrity": "sha512-MMD+bcIVrIJTLjyGx8xpj8A0Dwb8OPrFXWp/QHGXTSOezXxSMp2yG2QjxYkbV4EN5eCkwjeOY5mH2gHSa18pNA==", "dev": true, "requires": {} }, "@dfinity/identity": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@dfinity/identity/-/identity-1.0.1.tgz", - "integrity": "sha512-ArajyKSkiA4LjOq/ocGLMd66svgMVntF9j9P7irZScrzTCPcEXk5c7VteAqRGMwHCpI4LRipjmuZA1agwmUzRw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@dfinity/identity/-/identity-2.1.0.tgz", + "integrity": "sha512-cB16Af65RpJwc3JR4r0jV+TckDiflPFHSRUh/JZ3920CUEDB1wYbzCcUtUb/IWiU101oKZNi5QdQrHp1haZq6w==", "dev": true, "requires": { "@noble/curves": "^1.2.0", @@ -2973,9 +2976,9 @@ } }, "@dfinity/principal": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@dfinity/principal/-/principal-1.0.1.tgz", - "integrity": "sha512-pCAuTLcvZEZ8fYgVzTVhfUfFGadxeWN4v2z8Q0rizeiqcHKhbJVfWUiXXjzPGG5lNz2DxKyUHQ/WS4UTbTaxvg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@dfinity/principal/-/principal-2.1.0.tgz", + "integrity": "sha512-nC3tI2Kxe9153mI3QdWzAsCnsyNygqnb9O/qhJOks97RCE1vfn3nkhq4dN6yBVpvlCv3hOMSleAcZm3DzH3NsQ==", "dev": true, "requires": { "@noble/hashes": "^1.3.1" @@ -3016,18 +3019,18 @@ } }, "@noble/curves": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz", - "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.6.0.tgz", + "integrity": "sha512-TlaHRXDehJuRNR9TfZDNQ45mMEd5dwUwmicsafcIX4SsNiqnCHKjE/1alYPd/lDRVhxdhUAlv8uEhMCI5zjIJQ==", "dev": true, "requires": { - "@noble/hashes": "1.3.2" + "@noble/hashes": "1.5.0" } }, "@noble/hashes": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", - "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.5.0.tgz", + "integrity": "sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA==", "dev": true }, "@nodelib/fs.scandir": { @@ -3057,9 +3060,9 @@ } }, "@peculiar/asn1-schema": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.3.8.tgz", - "integrity": "sha512-ULB1XqHKx1WBU/tTFIA+uARuRoBVZ4pNdOA878RDrRbBfBGcSzi5HBkdScC6ZbHn8z7L8gmKCgPC1LHRrP46tA==", + "version": "2.3.13", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.3.13.tgz", + "integrity": "sha512-3Xq3a01WkHRZL8X04Zsfg//mGaA21xlL4tlVn4v2xGT0JStiztATRkMwa5b+f/HXmY2smsiLXYK46Gwgzvfg3g==", "dev": true, "peer": true, "requires": { @@ -3079,9 +3082,9 @@ } }, "@peculiar/webcrypto": { - "version": "1.4.5", - "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.4.5.tgz", - "integrity": "sha512-oDk93QCDGdxFRM8382Zdminzs44dg3M2+E5Np+JWkpqLDyJC9DviMh8F8mEJkYuUcUOGA5jHO5AJJ10MFWdbZw==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.5.0.tgz", + "integrity": "sha512-BRs5XUAwiyCDQMsVA9IDvDa7UBR9gAvPHgugOeGng3YN6vJ9JYonyDc0lNczErgtCWtucjR5N7VtaonboD/ezg==", "dev": true, "peer": true, "requires": { @@ -3089,7 +3092,7 @@ "@peculiar/json-schema": "^1.1.12", "pvtsutils": "^1.3.5", "tslib": "^2.6.2", - "webcrypto-core": "^1.7.8" + "webcrypto-core": "^1.8.0" } }, "@types/eslint": { @@ -4901,9 +4904,9 @@ } }, "webcrypto-core": { - "version": "1.7.8", - "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.7.8.tgz", - "integrity": "sha512-eBR98r9nQXTqXt/yDRtInszPMjTaSAMJAFDg2AHsgrnczawT1asx9YNBX6k5p+MekbPF4+s/UJJrr88zsTqkSg==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.8.0.tgz", + "integrity": "sha512-kR1UQNH8MD42CYuLzvibfakG5Ew5seG85dMMoAM/1LqvckxaF6pUiidLuraIu4V+YCIFabYecUZAW0TuxAoaqw==", "dev": true, "peer": true, "requires": { diff --git a/tools/ui/package.json b/tools/ui/package.json index 23d2ddcb..c048ccac 100644 --- a/tools/ui/package.json +++ b/tools/ui/package.json @@ -7,11 +7,11 @@ "build": "webpack" }, "devDependencies": { - "@dfinity/agent": "1.0.1", - "@dfinity/candid": "1.0.1", - "@dfinity/auth-client": "1.0.1", - "@dfinity/identity": "1.0.1", - "@dfinity/principal": "1.0.1", + "@dfinity/agent": "2.1.0", + "@dfinity/candid": "2.1.0", + "@dfinity/auth-client": "2.1.0", + "@dfinity/identity": "2.1.0", + "@dfinity/principal": "2.1.0", "buffer": "6.0.3", "copy-webpack-plugin": "^9.0.1", "css-loader": "^6.8.1", diff --git a/tools/ui/src/candid.ts b/tools/ui/src/candid.ts index 654fd4fd..40bd20eb 100644 --- a/tools/ui/src/candid.ts +++ b/tools/ui/src/candid.ts @@ -14,13 +14,13 @@ const names: Record = {}; function isKnownMainnet(agent: HttpAgent) { // @ts-ignore - const hostname = agent._host.hostname; + const hostname = agent.host.hostname; return hostname.endsWith('.icp0.io') || hostname.endsWith('.ic0.app'); } export let authClient: AuthClient | undefined; -const agent = new HttpAgent(); +const agent = HttpAgent.createSync(); if (!isKnownMainnet(agent)) { agent.fetchRootKey(); }