diff --git a/.github/workflows/provision-darwin.sh b/.github/workflows/provision-darwin.sh index dc6f9448e..0a54f4312 100755 --- a/.github/workflows/provision-darwin.sh +++ b/.github/workflows/provision-darwin.sh @@ -24,7 +24,7 @@ npm install -g ic-mops # Install DFINITY SDK. curl --location --output install-dfx.sh "https://raw.githubusercontent.com/dfinity/sdk/master/public/install-dfxvm.sh" -DFX_VERSION=${DFX_VERSION:=0.30.2} DFXVM_INIT_YES=true bash install-dfx.sh +DFX_VERSION=${DFX_VERSION:=0.31.0} DFXVM_INIT_YES=true bash install-dfx.sh rm install-dfx.sh echo "$HOME/Library/Application Support/org.dfinity.dfx/bin" >> $GITHUB_PATH source "$HOME/Library/Application Support/org.dfinity.dfx/env" diff --git a/.github/workflows/provision-linux.sh b/.github/workflows/provision-linux.sh index ab1331263..867f6ee0a 100755 --- a/.github/workflows/provision-linux.sh +++ b/.github/workflows/provision-linux.sh @@ -19,7 +19,7 @@ npm install -g ic-mops # Install DFINITY SDK. wget --output-document install-dfx.sh "https://raw.githubusercontent.com/dfinity/sdk/master/public/install-dfxvm.sh" -DFX_VERSION=${DFX_VERSION:=0.30.2} DFXVM_INIT_YES=true bash install-dfx.sh +DFX_VERSION=${DFX_VERSION:=0.31.0} DFXVM_INIT_YES=true bash install-dfx.sh rm install-dfx.sh echo "$HOME/.local/share/dfx/bin" >>$GITHUB_PATH source "$HOME/.local/share/dfx/env" diff --git a/motoko/internet_identity_integration/package-lock.json b/motoko/internet_identity_integration/package-lock.json index 0398f493c..f94b24dfb 100644 --- a/motoko/internet_identity_integration/package-lock.json +++ b/motoko/internet_identity_integration/package-lock.json @@ -8,11 +8,9 @@ "name": "internet_identity_integration", "version": "0.1.0", "devDependencies": { - "@dfinity/agent": "^2.2.0", "@dfinity/auth-client": "^2.2.0", - "@dfinity/candid": "^2.2.0", "@dfinity/identity": "^2.2.0", - "@dfinity/principal": "^2.2.0", + "@icp-sdk/core": "~5.0.0", "assert": "2.0.0", "buffer": "6.0.3", "copy-webpack-plugin": "^11.0.0", @@ -35,6 +33,7 @@ "resolved": "https://registry.npmjs.org/@dfinity/agent/-/agent-2.2.0.tgz", "integrity": "sha512-B0qpHf5vfnVNG3JZARC3Q9Cs2zG51/3LuTpCF4uVZ+4AgeRYHl4Erk/jmczdHNbSLIz1pe+F9seAYICovAnRIQ==", "dev": true, + "peer": true, "dependencies": { "@noble/curves": "^1.4.0", "@noble/hashes": "^1.3.1", @@ -67,15 +66,24 @@ "resolved": "https://registry.npmjs.org/@dfinity/candid/-/candid-2.2.0.tgz", "integrity": "sha512-6r21ow4kI/JaS6PocMVSHP49UDRG32EHrmFK9Uvg11yXulyTiR+PLGjabajvJjwmPQhjXiF8VzBIFY7aHOHiqQ==", "dev": true, + "peer": true, "peerDependencies": { "@dfinity/principal": "^2.2.0" } }, + "node_modules/@dfinity/cbor": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@dfinity/cbor/-/cbor-0.2.2.tgz", + "integrity": "sha512-GPJpH73kDEKbUBdUjY80lz7cq9l0vm1h/7ppejPV6O0ZTqCLrYspssYvqjRmK4aNnJ/SKXsP0rg9LYX7zpegaA==", + "dev": true, + "license": "Apache-2.0" + }, "node_modules/@dfinity/identity": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@dfinity/identity/-/identity-2.2.0.tgz", "integrity": "sha512-4L/i6pDYrGnpgnITHJR1Tb5umawqytZ8BhCE7G1MzG2ftWJ0SO1QJxRDwp5Nuj/fNZumq+ILSc3o3ItzaUs1iQ==", "dev": true, + "peer": true, "dependencies": { "@noble/curves": "^1.2.0", "@noble/hashes": "^1.3.1", @@ -91,6 +99,7 @@ "resolved": "https://registry.npmjs.org/@dfinity/principal/-/principal-2.2.0.tgz", "integrity": "sha512-8Yxb/6B4BWvV64HJ7X8sbDjoBaEamAQgOZ0MK0I44lZiRHomAYeUJMrw3yBg9jI1T62lijLcl401FAXBOzciiQ==", "dev": true, + "peer": true, "dependencies": { "@noble/hashes": "^1.3.1" } @@ -104,6 +113,21 @@ "node": ">=10.0.0" } }, + "node_modules/@icp-sdk/core": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@icp-sdk/core/-/core-5.0.0.tgz", + "integrity": "sha512-t6iRbdylHG57MicWRpR1uMTFXRW7GCzec6KAg55CBwDHbHLQDKikQ252lmlcEa80DrKa3LPvMKYZEUYjEq5XUQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@dfinity/cbor": "^0.2.2", + "@noble/curves": "^1.9.2", + "@noble/hashes": "^1.8.0", + "@scure/bip32": "^1.7.0", + "@scure/bip39": "^1.6.0", + "asn1js": "^3.0.5" + } + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", @@ -169,12 +193,13 @@ "dev": true }, "node_modules/@noble/curves": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.8.0.tgz", - "integrity": "sha512-j84kjAbzEnQHaSIhRPUmB3/eVXu2k3dKPl2LOrR8fSOIL+89U+7lV117EWHtq/GHM3ReGHM46iRBdZfpc4HRUQ==", + "version": "1.9.7", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.9.7.tgz", + "integrity": "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw==", "dev": true, + "license": "MIT", "dependencies": { - "@noble/hashes": "1.7.0" + "@noble/hashes": "1.8.0" }, "engines": { "node": "^14.21.3 || >=16" @@ -184,10 +209,11 @@ } }, "node_modules/@noble/hashes": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.7.0.tgz", - "integrity": "sha512-HXydb0DgzTpDPwbVeDGCG1gIu7X6+AuU6Zl6av/E/KG8LMsvPntvq+w17CHRpKBmN6Ybdrt1eP3k4cj8DJa78w==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", + "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==", "dev": true, + "license": "MIT", "engines": { "node": "^14.21.3 || >=16" }, @@ -230,6 +256,45 @@ "node": ">= 8" } }, + "node_modules/@scure/base": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.2.6.tgz", + "integrity": "sha512-g/nm5FgUa//MCj1gV09zTJTaM6KBAHqLN907YVQqf7zC49+DcO4B1so4ZX07Ef10Twr6nuqYEH9GEggFXA4Fmg==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip32": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.7.0.tgz", + "integrity": "sha512-E4FFX/N3f4B80AKWp5dP6ow+flD1LQZo/w8UnLGYZO674jS6YnYeepycOOksv+vLPSpgN35wgKgy+ybfTb2SMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@noble/curves": "~1.9.0", + "@noble/hashes": "~1.8.0", + "@scure/base": "~1.2.5" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip39": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.6.0.tgz", + "integrity": "sha512-+lF0BbLiJNwVlev4eKelw1WWLaiKXw7sSl8T6FvBlWkdX+94aGJ4o8XjUdlyhTCjd8c+B3KT3JfS8P0bLRNU6A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@noble/hashes": "~1.8.0", + "@scure/base": "~1.2.5" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@types/body-parser": { "version": "1.19.2", "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", @@ -617,6 +682,7 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", "dev": true, + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -638,6 +704,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", "dev": true, + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", @@ -718,6 +785,21 @@ "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==", "dev": true }, + "node_modules/asn1js": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-3.0.7.tgz", + "integrity": "sha512-uLvq6KJu04qoQM6gvBfKFjlh6Gl0vOKQuR5cJMDHQkmwfMOQeN3F3SHCv9SNYSL+CRoHvOGFfllDlVz03GQjvQ==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "pvtsutils": "^1.3.6", + "pvutils": "^1.1.3", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/assert": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/assert/-/assert-2.0.0.tgz", @@ -931,6 +1013,7 @@ "url": "https://tidelift.com/funding/github/npm/browserslist" } ], + "peer": true, "dependencies": { "caniuse-lite": "^1.0.30001449", "electron-to-chromium": "^1.4.284", @@ -3242,6 +3325,26 @@ "node": ">=6" } }, + "node_modules/pvtsutils": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.6.tgz", + "integrity": "sha512-PLgQXQ6H2FWCaeRak8vvk1GW462lMxB5s3Jm673N82zI4vqtVUPuZdffdZbPDFRoU8kAhItWFtPCWiPpp4/EDg==", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^2.8.1" + } + }, + "node_modules/pvutils": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/pvutils/-/pvutils-1.1.5.tgz", + "integrity": "sha512-KTqnxsgGiQ6ZAzZCVlJH5eOjSnvlyEgx1m8bkRJfOhmGRqfo5KLvmAlACQkrjEtOQ4B7wF9TdSLIs9O90MX9xA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16.0.0" + } + }, "node_modules/qs": { "version": "6.11.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", @@ -4015,6 +4118,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -4087,10 +4191,11 @@ } }, "node_modules/tslib": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", - "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==", - "dev": true + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, + "license": "0BSD" }, "node_modules/type-is": { "version": "1.6.18", @@ -4229,6 +4334,7 @@ "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.76.0.tgz", "integrity": "sha512-l5sOdYBDunyf72HW8dF23rFtWq/7Zgvt/9ftMof71E/yUb1YLOBmTgA2K4vQthB3kotMrSj609txVE0dnr2fjA==", "dev": true, + "peer": true, "dependencies": { "@types/eslint-scope": "^3.7.3", "@types/estree": "^0.0.51", @@ -4276,6 +4382,7 @@ "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.10.0.tgz", "integrity": "sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==", "dev": true, + "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -4432,6 +4539,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", diff --git a/motoko/internet_identity_integration/package.json b/motoko/internet_identity_integration/package.json index fa9a1af4d..d3c84e8a2 100644 --- a/motoko/internet_identity_integration/package.json +++ b/motoko/internet_identity_integration/package.json @@ -16,11 +16,8 @@ "generate": "dfx generate greet_backend" }, "devDependencies": { - "@dfinity/agent": "^2.2.0", "@dfinity/auth-client": "^2.2.0", - "@dfinity/candid": "^2.2.0", "@dfinity/identity": "^2.2.0", - "@dfinity/principal": "^2.2.0", "assert": "2.0.0", "buffer": "6.0.3", "copy-webpack-plugin": "^11.0.0", @@ -32,7 +29,8 @@ "util": "0.12.4", "webpack": "^5.76.0", "webpack-cli": "^4.10.0", - "webpack-dev-server": "^4.8.1" + "webpack-dev-server": "^4.8.1", + "@icp-sdk/core": "~5.0.0" }, "engines": { "node": "^12 || ^14 || ^16 || ^18" diff --git a/motoko/internet_identity_integration/src/greet_frontend/src/index.js b/motoko/internet_identity_integration/src/greet_frontend/src/index.js index 86cdaae87..3b6848ab9 100644 --- a/motoko/internet_identity_integration/src/greet_frontend/src/index.js +++ b/motoko/internet_identity_integration/src/greet_frontend/src/index.js @@ -1,6 +1,6 @@ import {createActor, greet_backend} from "../../declarations/greet_backend"; import {AuthClient} from "@dfinity/auth-client" -import {HttpAgent} from "@dfinity/agent"; +import {HttpAgent} from "@icp-sdk/core/agent"; let actor = greet_backend; @@ -49,7 +49,7 @@ loginButton.onclick = async (e) => { // Using the identity obtained from the auth client, we can create an agent to interact with the IC. const agent = new HttpAgent({identity}); // Using the interface description of our webapp, we create an actor that we use to call the service methods. - actor = createActor(process.env.GREET_BACKEND_CANISTER_ID, { + actor = createActor(process.env.CANISTER_ID_GREET_BACKEND, { agent, }); diff --git a/motoko/internet_identity_integration/webpack.config.js b/motoko/internet_identity_integration/webpack.config.js index 56c062ec4..a4e1738a6 100644 --- a/motoko/internet_identity_integration/webpack.config.js +++ b/motoko/internet_identity_integration/webpack.config.js @@ -28,7 +28,7 @@ function initCanisterEnv() { return Object.entries(canisterConfig).reduce((prev, current) => { const [canisterName, canisterDetails] = current; - prev[canisterName.toUpperCase() + "_CANISTER_ID"] = + prev["CANISTER_ID_" + canisterName.toUpperCase()] = canisterDetails[network]; return prev; }, {}); @@ -37,7 +37,7 @@ const canisterEnvVariables = initCanisterEnv(); const isDevelopment = process.env.NODE_ENV !== "production"; -const internetIdentityUrl = network === "local" ? `http://${canisterEnvVariables["INTERNET_IDENTITY_CANISTER_ID"]}.localhost:4943/` : `https://identity.ic0.app` +const internetIdentityUrl = network === "local" ? `http://${canisterEnvVariables["CANISTER_ID_INTERNET_IDENTITY"]}.localhost:4943/` : `https://identity.ic0.app` const frontendDirectory = "greet_frontend"; diff --git a/motoko/random_maze/package-lock.json b/motoko/random_maze/package-lock.json index 4ca03e56b..3e12055a7 100644 --- a/motoko/random_maze/package-lock.json +++ b/motoko/random_maze/package-lock.json @@ -12,9 +12,7 @@ "react-dom": "^17.0.2" }, "devDependencies": { - "@dfinity/agent": "^0.15.1", - "@dfinity/candid": "^0.15.1", - "@dfinity/principal": "^0.15.1", + "@icp-sdk/core": "~5.0.0", "assert": "2.0.0", "buffer": "6.0.3", "css-loader": "^6.0.0", @@ -31,64 +29,12 @@ "webpack-dev-server": "^4.6.0" } }, - "node_modules/@cspotcode/source-map-support": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", - "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "node_modules/@dfinity/cbor": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@dfinity/cbor/-/cbor-0.2.2.tgz", + "integrity": "sha512-GPJpH73kDEKbUBdUjY80lz7cq9l0vm1h/7ppejPV6O0ZTqCLrYspssYvqjRmK4aNnJ/SKXsP0rg9LYX7zpegaA==", "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "0.3.9" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "dev": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - }, - "node_modules/@dfinity/agent": { - "version": "0.15.1", - "resolved": "https://registry.npmjs.org/@dfinity/agent/-/agent-0.15.1.tgz", - "integrity": "sha512-Lu/TXdDj3XJgMNZYVdrECyo+zqlOxDR1I1mA7OuO6lsIciildJNbqDnsMQAit7605S4B8QLnvbnK/Okd8c2K1g==", - "dev": true, - "dependencies": { - "base64-arraybuffer": "^0.2.0", - "bignumber.js": "^9.0.0", - "borc": "^2.1.1", - "js-sha256": "0.9.0", - "simple-cbor": "^0.4.1", - "ts-node": "^10.8.2" - }, - "peerDependencies": { - "@dfinity/candid": "^0.15.1", - "@dfinity/principal": "^0.15.1" - } - }, - "node_modules/@dfinity/candid": { - "version": "0.15.1", - "resolved": "https://registry.npmjs.org/@dfinity/candid/-/candid-0.15.1.tgz", - "integrity": "sha512-vmMjyfXfMO16X9c4ivKoGS/fNYue2+t55LTmCL0Tv5Nn81LC9Bn2IuPdXcguoRQSXISJzTS59epL3E20ELL+dA==", - "dev": true, - "dependencies": { - "ts-node": "^10.8.2" - } - }, - "node_modules/@dfinity/principal": { - "version": "0.15.1", - "resolved": "https://registry.npmjs.org/@dfinity/principal/-/principal-0.15.1.tgz", - "integrity": "sha512-IYODveUhLx6CikhpT+KPuzwNi/czypOlgFj+Jtp+yHb6odUxfg0V/qVwZ4UbQPictNJ1gl7WwGjJeF5ybf+e6w==", - "dev": true, - "dependencies": { - "js-sha256": "^0.9.0", - "ts-node": "^10.8.2" - } + "license": "Apache-2.0" }, "node_modules/@discoveryjs/json-ext": { "version": "0.5.2", @@ -99,6 +45,21 @@ "node": ">=10.0.0" } }, + "node_modules/@icp-sdk/core": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@icp-sdk/core/-/core-5.0.0.tgz", + "integrity": "sha512-t6iRbdylHG57MicWRpR1uMTFXRW7GCzec6KAg55CBwDHbHLQDKikQ252lmlcEa80DrKa3LPvMKYZEUYjEq5XUQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@dfinity/cbor": "^0.2.2", + "@noble/curves": "^1.9.2", + "@noble/hashes": "^1.8.0", + "@scure/bip32": "^1.7.0", + "@scure/bip39": "^1.6.0", + "asn1js": "^3.0.5" + } + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", @@ -157,6 +118,35 @@ "@jridgewell/sourcemap-codec": "1.4.14" } }, + "node_modules/@noble/curves": { + "version": "1.9.7", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.9.7.tgz", + "integrity": "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@noble/hashes": "1.8.0" + }, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/hashes": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", + "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -192,29 +182,44 @@ "node": ">= 8" } }, - "node_modules/@tsconfig/node10": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", - "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", - "dev": true - }, - "node_modules/@tsconfig/node12": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", - "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", - "dev": true + "node_modules/@scure/base": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.2.6.tgz", + "integrity": "sha512-g/nm5FgUa//MCj1gV09zTJTaM6KBAHqLN907YVQqf7zC49+DcO4B1so4ZX07Ef10Twr6nuqYEH9GEggFXA4Fmg==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://paulmillr.com/funding/" + } }, - "node_modules/@tsconfig/node14": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", - "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", - "dev": true + "node_modules/@scure/bip32": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.7.0.tgz", + "integrity": "sha512-E4FFX/N3f4B80AKWp5dP6ow+flD1LQZo/w8UnLGYZO674jS6YnYeepycOOksv+vLPSpgN35wgKgy+ybfTb2SMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@noble/curves": "~1.9.0", + "@noble/hashes": "~1.8.0", + "@scure/base": "~1.2.5" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } }, - "node_modules/@tsconfig/node16": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", - "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==", - "dev": true + "node_modules/@scure/bip39": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.6.0.tgz", + "integrity": "sha512-+lF0BbLiJNwVlev4eKelw1WWLaiKXw7sSl8T6FvBlWkdX+94aGJ4o8XjUdlyhTCjd8c+B3KT3JfS8P0bLRNU6A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@noble/hashes": "~1.8.0", + "@scure/base": "~1.2.5" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } }, "node_modules/@types/body-parser": { "version": "1.19.2", @@ -603,6 +608,7 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", "dev": true, + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -619,15 +625,6 @@ "acorn": "^8" } }, - "node_modules/acorn-walk": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", - "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/aggregate-error": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", @@ -646,6 +643,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -763,12 +761,6 @@ "node": ">= 8" } }, - "node_modules/arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true - }, "node_modules/array-filter": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-1.0.0.tgz", @@ -790,6 +782,21 @@ "node": ">=8" } }, + "node_modules/asn1js": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-3.0.7.tgz", + "integrity": "sha512-uLvq6KJu04qoQM6gvBfKFjlh6Gl0vOKQuR5cJMDHQkmwfMOQeN3F3SHCv9SNYSL+CRoHvOGFfllDlVz03GQjvQ==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "pvtsutils": "^1.3.6", + "pvutils": "^1.1.3", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/assert": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/assert/-/assert-2.0.0.tgz", @@ -832,15 +839,6 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, - "node_modules/base64-arraybuffer": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.2.0.tgz", - "integrity": "sha512-7emyCsu1/xiBXgQZrscw/8KPRT44I4Yq9Pe6EGs3aPRTsWuggML1/1DTuZUuIaJPIm1FTDUVXl4x/yW8s0kQDQ==", - "dev": true, - "engines": { - "node": ">= 0.6.0" - } - }, "node_modules/base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", @@ -867,15 +865,6 @@ "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=", "dev": true }, - "node_modules/bignumber.js": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.1.tgz", - "integrity": "sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA==", - "dev": true, - "engines": { - "node": "*" - } - }, "node_modules/binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -962,48 +951,6 @@ "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", "dev": true }, - "node_modules/borc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/borc/-/borc-2.1.2.tgz", - "integrity": "sha512-Sy9eoUi4OiKzq7VovMn246iTo17kzuyHJKomCfpWMlI6RpfN1gk95w7d7gH264nApVLg0HZfcpz62/g4VH1Y4w==", - "dev": true, - "dependencies": { - "bignumber.js": "^9.0.0", - "buffer": "^5.5.0", - "commander": "^2.15.0", - "ieee754": "^1.1.13", - "iso-url": "~0.4.7", - "json-text-sequence": "~0.1.0", - "readable-stream": "^3.6.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/borc/node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -1364,12 +1311,6 @@ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "dev": true }, - "node_modules/create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", - "dev": true - }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -1556,12 +1497,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/delimit-stream": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/delimit-stream/-/delimit-stream-0.1.0.tgz", - "integrity": "sha1-m4MZR3wOX4rrPONXrjBfwl6hzSs=", - "dev": true - }, "node_modules/depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", @@ -1587,15 +1522,6 @@ "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==", "dev": true }, - "node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, "node_modules/dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", @@ -3085,15 +3011,6 @@ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, - "node_modules/iso-url": { - "version": "0.4.7", - "resolved": "https://registry.npmjs.org/iso-url/-/iso-url-0.4.7.tgz", - "integrity": "sha512-27fFRDnPAMnHGLq36bWTpKET+eiXct3ENlCcdcMdk+mjXrb2kw3mhBUg1B7ewAC0kVzlOPhADzQgz1SE6Tglog==", - "dev": true, - "engines": { - "node": ">=10" - } - }, "node_modules/isobject": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", @@ -3117,12 +3034,6 @@ "node": ">= 10.13.0" } }, - "node_modules/js-sha256": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/js-sha256/-/js-sha256-0.9.0.tgz", - "integrity": "sha512-sga3MHh9sgQN2+pJ9VYZ+1LPwXOxuBJBA5nrR5/ofPfuiJBE2hnjsaN8se8JznOmGLN2p49Pe5U/ttafcs/apA==", - "dev": true - }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -3140,15 +3051,6 @@ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, - "node_modules/json-text-sequence": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/json-text-sequence/-/json-text-sequence-0.1.1.tgz", - "integrity": "sha1-py8hfcSvxGKf/1/rME3BvVGi89I=", - "dev": true, - "dependencies": { - "delimit-stream": "0.1.0" - } - }, "node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -3217,12 +3119,6 @@ "node": ">=10" } }, - "node_modules/make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true - }, "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -3840,6 +3736,7 @@ "url": "https://github.com/sponsors/ai" } ], + "peer": true, "dependencies": { "nanoid": "^3.3.7", "picocolors": "^1.0.0", @@ -3974,6 +3871,26 @@ "node": ">=6" } }, + "node_modules/pvtsutils": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.6.tgz", + "integrity": "sha512-PLgQXQ6H2FWCaeRak8vvk1GW462lMxB5s3Jm673N82zI4vqtVUPuZdffdZbPDFRoU8kAhItWFtPCWiPpp4/EDg==", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^2.8.1" + } + }, + "node_modules/pvutils": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/pvutils/-/pvutils-1.1.5.tgz", + "integrity": "sha512-KTqnxsgGiQ6ZAzZCVlJH5eOjSnvlyEgx1m8bkRJfOhmGRqfo5KLvmAlACQkrjEtOQ4B7wF9TdSLIs9O90MX9xA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16.0.0" + } + }, "node_modules/qs": { "version": "6.13.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", @@ -4055,6 +3972,7 @@ "version": "17.0.2", "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz", "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==", + "peer": true, "dependencies": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1" @@ -4580,12 +4498,6 @@ "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", "dev": true }, - "node_modules/simple-cbor": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/simple-cbor/-/simple-cbor-0.4.1.tgz", - "integrity": "sha512-rijcxtwx2b4Bje3sqeIqw5EeW7UlOIC4YfOdwqIKacpvRQ/D78bWg/4/0m5e0U91oKvlGh7LlJuZCu07ISCC7w==", - "dev": true - }, "node_modules/slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -4881,54 +4793,12 @@ "webpack": "^5.0.0" } }, - "node_modules/ts-node": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", - "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", - "dev": true, - "dependencies": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - }, - "bin": { - "ts-node": "dist/bin.js", - "ts-node-cwd": "dist/bin-cwd.js", - "ts-node-esm": "dist/bin-esm.js", - "ts-node-script": "dist/bin-script.js", - "ts-node-transpile-only": "dist/bin-transpile.js", - "ts-script": "dist/bin-script-deprecated.js" - }, - "peerDependencies": { - "@swc/core": ">=1.2.50", - "@swc/wasm": ">=1.2.50", - "@types/node": "*", - "typescript": ">=2.7" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "@swc/wasm": { - "optional": true - } - } - }, "node_modules/tslib": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", - "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==", - "dev": true + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, + "license": "0BSD" }, "node_modules/type-is": { "version": "1.6.18", @@ -5041,12 +4911,6 @@ "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", "dev": true }, - "node_modules/v8-compile-cache-lib": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", - "dev": true - }, "node_modules/vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", @@ -5083,6 +4947,7 @@ "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.76.0.tgz", "integrity": "sha512-l5sOdYBDunyf72HW8dF23rFtWq/7Zgvt/9ftMof71E/yUb1YLOBmTgA2K4vQthB3kotMrSj609txVE0dnr2fjA==", "dev": true, + "peer": true, "dependencies": { "@types/eslint-scope": "^3.7.3", "@types/estree": "^0.0.51", @@ -5130,6 +4995,7 @@ "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.5.0.tgz", "integrity": "sha512-wXg/ef6Ibstl2f50mnkcHblRPN/P9J4Nlod5Hg9HGFgSeF8rsqDGHJeVe4aR26q9l62TUJi6vmvC2Qz96YJw1Q==", "dev": true, + "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.0.1", @@ -5210,6 +5076,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.8.2.tgz", "integrity": "sha512-x9VuX+R/jcFj1DHo/fCp99esgGDWiHENrKxaCENuCxpoMCmAt/COCGVDwA7kleEpEzJjDnvh3yGoOuLu0Dtllw==", "dev": true, + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", @@ -5320,6 +5187,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.8.2.tgz", "integrity": "sha512-x9VuX+R/jcFj1DHo/fCp99esgGDWiHENrKxaCENuCxpoMCmAt/COCGVDwA7kleEpEzJjDnvh3yGoOuLu0Dtllw==", "dev": true, + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", @@ -5636,15 +5504,6 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, - "node_modules/yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", @@ -5659,59 +5518,11 @@ } }, "dependencies": { - "@cspotcode/source-map-support": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", - "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", - "dev": true, - "requires": { - "@jridgewell/trace-mapping": "0.3.9" - }, - "dependencies": { - "@jridgewell/trace-mapping": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "dev": true, - "requires": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - } - } - }, - "@dfinity/agent": { - "version": "0.15.1", - "resolved": "https://registry.npmjs.org/@dfinity/agent/-/agent-0.15.1.tgz", - "integrity": "sha512-Lu/TXdDj3XJgMNZYVdrECyo+zqlOxDR1I1mA7OuO6lsIciildJNbqDnsMQAit7605S4B8QLnvbnK/Okd8c2K1g==", - "dev": true, - "requires": { - "base64-arraybuffer": "^0.2.0", - "bignumber.js": "^9.0.0", - "borc": "^2.1.1", - "js-sha256": "0.9.0", - "simple-cbor": "^0.4.1", - "ts-node": "^10.8.2" - } - }, - "@dfinity/candid": { - "version": "0.15.1", - "resolved": "https://registry.npmjs.org/@dfinity/candid/-/candid-0.15.1.tgz", - "integrity": "sha512-vmMjyfXfMO16X9c4ivKoGS/fNYue2+t55LTmCL0Tv5Nn81LC9Bn2IuPdXcguoRQSXISJzTS59epL3E20ELL+dA==", - "dev": true, - "requires": { - "ts-node": "^10.8.2" - } - }, - "@dfinity/principal": { - "version": "0.15.1", - "resolved": "https://registry.npmjs.org/@dfinity/principal/-/principal-0.15.1.tgz", - "integrity": "sha512-IYODveUhLx6CikhpT+KPuzwNi/czypOlgFj+Jtp+yHb6odUxfg0V/qVwZ4UbQPictNJ1gl7WwGjJeF5ybf+e6w==", - "dev": true, - "requires": { - "js-sha256": "^0.9.0", - "ts-node": "^10.8.2" - } + "@dfinity/cbor": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@dfinity/cbor/-/cbor-0.2.2.tgz", + "integrity": "sha512-GPJpH73kDEKbUBdUjY80lz7cq9l0vm1h/7ppejPV6O0ZTqCLrYspssYvqjRmK4aNnJ/SKXsP0rg9LYX7zpegaA==", + "dev": true }, "@discoveryjs/json-ext": { "version": "0.5.2", @@ -5719,6 +5530,20 @@ "integrity": "sha512-HyYEUDeIj5rRQU2Hk5HTB2uHsbRQpF70nvMhVzi+VJR0X+xNEhjPui4/kBf3VeH/wqD28PT4sVOm8qqLjBrSZg==", "dev": true }, + "@icp-sdk/core": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@icp-sdk/core/-/core-5.0.0.tgz", + "integrity": "sha512-t6iRbdylHG57MicWRpR1uMTFXRW7GCzec6KAg55CBwDHbHLQDKikQ252lmlcEa80DrKa3LPvMKYZEUYjEq5XUQ==", + "dev": true, + "requires": { + "@dfinity/cbor": "^0.2.2", + "@noble/curves": "^1.9.2", + "@noble/hashes": "^1.8.0", + "@scure/bip32": "^1.7.0", + "@scure/bip39": "^1.6.0", + "asn1js": "^3.0.5" + } + }, "@jridgewell/gen-mapping": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", @@ -5768,6 +5593,21 @@ "@jridgewell/sourcemap-codec": "1.4.14" } }, + "@noble/curves": { + "version": "1.9.7", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.9.7.tgz", + "integrity": "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw==", + "dev": true, + "requires": { + "@noble/hashes": "1.8.0" + } + }, + "@noble/hashes": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", + "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==", + "dev": true + }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -5794,29 +5634,32 @@ "fastq": "^1.6.0" } }, - "@tsconfig/node10": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", - "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", - "dev": true - }, - "@tsconfig/node12": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", - "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "@scure/base": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.2.6.tgz", + "integrity": "sha512-g/nm5FgUa//MCj1gV09zTJTaM6KBAHqLN907YVQqf7zC49+DcO4B1so4ZX07Ef10Twr6nuqYEH9GEggFXA4Fmg==", "dev": true }, - "@tsconfig/node14": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", - "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", - "dev": true + "@scure/bip32": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.7.0.tgz", + "integrity": "sha512-E4FFX/N3f4B80AKWp5dP6ow+flD1LQZo/w8UnLGYZO674jS6YnYeepycOOksv+vLPSpgN35wgKgy+ybfTb2SMw==", + "dev": true, + "requires": { + "@noble/curves": "~1.9.0", + "@noble/hashes": "~1.8.0", + "@scure/base": "~1.2.5" + } }, - "@tsconfig/node16": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", - "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==", - "dev": true + "@scure/bip39": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.6.0.tgz", + "integrity": "sha512-+lF0BbLiJNwVlev4eKelw1WWLaiKXw7sSl8T6FvBlWkdX+94aGJ4o8XjUdlyhTCjd8c+B3KT3JfS8P0bLRNU6A==", + "dev": true, + "requires": { + "@noble/hashes": "~1.8.0", + "@scure/base": "~1.2.5" + } }, "@types/body-parser": { "version": "1.19.2", @@ -6188,7 +6031,8 @@ "version": "8.7.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", - "dev": true + "dev": true, + "peer": true }, "acorn-import-assertions": { "version": "1.8.0", @@ -6197,12 +6041,6 @@ "dev": true, "requires": {} }, - "acorn-walk": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", - "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", - "dev": true - }, "aggregate-error": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", @@ -6218,6 +6056,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, + "peer": true, "requires": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -6298,12 +6137,6 @@ "picomatch": "^2.0.4" } }, - "arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true - }, "array-filter": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-1.0.0.tgz", @@ -6322,6 +6155,17 @@ "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true }, + "asn1js": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-3.0.7.tgz", + "integrity": "sha512-uLvq6KJu04qoQM6gvBfKFjlh6Gl0vOKQuR5cJMDHQkmwfMOQeN3F3SHCv9SNYSL+CRoHvOGFfllDlVz03GQjvQ==", + "dev": true, + "requires": { + "pvtsutils": "^1.3.6", + "pvutils": "^1.1.3", + "tslib": "^2.8.1" + } + }, "assert": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/assert/-/assert-2.0.0.tgz", @@ -6358,12 +6202,6 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, - "base64-arraybuffer": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.2.0.tgz", - "integrity": "sha512-7emyCsu1/xiBXgQZrscw/8KPRT44I4Yq9Pe6EGs3aPRTsWuggML1/1DTuZUuIaJPIm1FTDUVXl4x/yW8s0kQDQ==", - "dev": true - }, "base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", @@ -6376,12 +6214,6 @@ "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=", "dev": true }, - "bignumber.js": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.1.tgz", - "integrity": "sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA==", - "dev": true - }, "binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -6457,33 +6289,6 @@ "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", "dev": true }, - "borc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/borc/-/borc-2.1.2.tgz", - "integrity": "sha512-Sy9eoUi4OiKzq7VovMn246iTo17kzuyHJKomCfpWMlI6RpfN1gk95w7d7gH264nApVLg0HZfcpz62/g4VH1Y4w==", - "dev": true, - "requires": { - "bignumber.js": "^9.0.0", - "buffer": "^5.5.0", - "commander": "^2.15.0", - "ieee754": "^1.1.13", - "iso-url": "~0.4.7", - "json-text-sequence": "~0.1.0", - "readable-stream": "^3.6.0" - }, - "dependencies": { - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - } - } - }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -6761,12 +6566,6 @@ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "dev": true }, - "create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", - "dev": true - }, "cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -6893,12 +6692,6 @@ "slash": "^3.0.0" } }, - "delimit-stream": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/delimit-stream/-/delimit-stream-0.1.0.tgz", - "integrity": "sha1-m4MZR3wOX4rrPONXrjBfwl6hzSs=", - "dev": true - }, "depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", @@ -6917,12 +6710,6 @@ "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==", "dev": true }, - "diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true - }, "dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", @@ -8021,12 +7808,6 @@ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, - "iso-url": { - "version": "0.4.7", - "resolved": "https://registry.npmjs.org/iso-url/-/iso-url-0.4.7.tgz", - "integrity": "sha512-27fFRDnPAMnHGLq36bWTpKET+eiXct3ENlCcdcMdk+mjXrb2kw3mhBUg1B7ewAC0kVzlOPhADzQgz1SE6Tglog==", - "dev": true - }, "isobject": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", @@ -8044,12 +7825,6 @@ "supports-color": "^7.0.0" } }, - "js-sha256": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/js-sha256/-/js-sha256-0.9.0.tgz", - "integrity": "sha512-sga3MHh9sgQN2+pJ9VYZ+1LPwXOxuBJBA5nrR5/ofPfuiJBE2hnjsaN8se8JznOmGLN2p49Pe5U/ttafcs/apA==", - "dev": true - }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -8067,15 +7842,6 @@ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, - "json-text-sequence": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/json-text-sequence/-/json-text-sequence-0.1.1.tgz", - "integrity": "sha1-py8hfcSvxGKf/1/rME3BvVGi89I=", - "dev": true, - "requires": { - "delimit-stream": "0.1.0" - } - }, "kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -8129,12 +7895,6 @@ "yallist": "^4.0.0" } }, - "make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true - }, "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -8580,6 +8340,7 @@ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.33.tgz", "integrity": "sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==", "dev": true, + "peer": true, "requires": { "nanoid": "^3.3.7", "picocolors": "^1.0.0", @@ -8676,6 +8437,21 @@ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true }, + "pvtsutils": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.6.tgz", + "integrity": "sha512-PLgQXQ6H2FWCaeRak8vvk1GW462lMxB5s3Jm673N82zI4vqtVUPuZdffdZbPDFRoU8kAhItWFtPCWiPpp4/EDg==", + "dev": true, + "requires": { + "tslib": "^2.8.1" + } + }, + "pvutils": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/pvutils/-/pvutils-1.1.5.tgz", + "integrity": "sha512-KTqnxsgGiQ6ZAzZCVlJH5eOjSnvlyEgx1m8bkRJfOhmGRqfo5KLvmAlACQkrjEtOQ4B7wF9TdSLIs9O90MX9xA==", + "dev": true + }, "qs": { "version": "6.13.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", @@ -8730,6 +8506,7 @@ "version": "17.0.2", "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz", "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==", + "peer": true, "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1" @@ -9129,12 +8906,6 @@ "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", "dev": true }, - "simple-cbor": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/simple-cbor/-/simple-cbor-0.4.1.tgz", - "integrity": "sha512-rijcxtwx2b4Bje3sqeIqw5EeW7UlOIC4YfOdwqIKacpvRQ/D78bWg/4/0m5e0U91oKvlGh7LlJuZCu07ISCC7w==", - "dev": true - }, "slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -9355,31 +9126,10 @@ "semver": "^7.3.4" } }, - "ts-node": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", - "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", - "dev": true, - "requires": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - } - }, "tslib": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", - "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "dev": true }, "type-is": { @@ -9470,12 +9220,6 @@ "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", "dev": true }, - "v8-compile-cache-lib": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", - "dev": true - }, "vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", @@ -9506,6 +9250,7 @@ "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.76.0.tgz", "integrity": "sha512-l5sOdYBDunyf72HW8dF23rFtWq/7Zgvt/9ftMof71E/yUb1YLOBmTgA2K4vQthB3kotMrSj609txVE0dnr2fjA==", "dev": true, + "peer": true, "requires": { "@types/eslint-scope": "^3.7.3", "@types/estree": "^0.0.51", @@ -9594,6 +9339,7 @@ "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.5.0.tgz", "integrity": "sha512-wXg/ef6Ibstl2f50mnkcHblRPN/P9J4Nlod5Hg9HGFgSeF8rsqDGHJeVe4aR26q9l62TUJi6vmvC2Qz96YJw1Q==", "dev": true, + "peer": true, "requires": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.0.1", @@ -9637,6 +9383,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.8.2.tgz", "integrity": "sha512-x9VuX+R/jcFj1DHo/fCp99esgGDWiHENrKxaCENuCxpoMCmAt/COCGVDwA7kleEpEzJjDnvh3yGoOuLu0Dtllw==", "dev": true, + "peer": true, "requires": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", @@ -9721,6 +9468,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.8.2.tgz", "integrity": "sha512-x9VuX+R/jcFj1DHo/fCp99esgGDWiHENrKxaCENuCxpoMCmAt/COCGVDwA7kleEpEzJjDnvh3yGoOuLu0Dtllw==", "dev": true, + "peer": true, "requires": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", @@ -9879,12 +9627,6 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, - "yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "dev": true - }, "yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/motoko/random_maze/package.json b/motoko/random_maze/package.json index 5088bbf09..f9d197b48 100644 --- a/motoko/random_maze/package.json +++ b/motoko/random_maze/package.json @@ -16,9 +16,7 @@ "generate": "dfx generate random_maze" }, "devDependencies": { - "@dfinity/agent": "^2.1.3", - "@dfinity/candid": "^2.1.3", - "@dfinity/principal": "^2.1.3", + "@icp-sdk/core": "~5.0.0", "assert": "2.0.0", "buffer": "6.0.3", "css-loader": "^6.0.0", diff --git a/motoko/random_maze/src/declarations/random_maze/index.d.ts b/motoko/random_maze/src/declarations/random_maze/index.d.ts index 94ac1e30c..30122d7d7 100644 --- a/motoko/random_maze/src/declarations/random_maze/index.d.ts +++ b/motoko/random_maze/src/declarations/random_maze/index.d.ts @@ -3,9 +3,9 @@ import type { HttpAgentOptions, ActorConfig, Agent, -} from "@dfinity/agent"; -import type { Principal } from "@dfinity/principal"; -import type { IDL } from "@dfinity/candid"; +} from "@icp-sdk/core/agent"; +import type { Principal } from "@icp-sdk/core/principal"; +import type { IDL } from "@icp-sdk/core/candid"; import { _SERVICE } from './random_maze.did'; diff --git a/motoko/random_maze/src/declarations/random_maze/index.js b/motoko/random_maze/src/declarations/random_maze/index.js index c323d4599..5517fcec2 100644 --- a/motoko/random_maze/src/declarations/random_maze/index.js +++ b/motoko/random_maze/src/declarations/random_maze/index.js @@ -1,4 +1,4 @@ -import { Actor, HttpAgent } from "@dfinity/agent"; +import { Actor, HttpAgent } from "@icp-sdk/core/agent"; // Imports and re-exports candid interface import { idlFactory } from "./random_maze.did.js"; @@ -10,8 +10,7 @@ export { idlFactory } from "./random_maze.did.js"; * beginning in dfx 0.15.0 */ export const canisterId = - process.env.CANISTER_ID_RANDOM_MAZE || - process.env.RANDOM_MAZE_CANISTER_ID; + process.env.CANISTER_ID_RANDOM_MAZE; export const createActor = (canisterId, options = {}) => { const agent = options.agent || new HttpAgent({ ...options.agentOptions }); @@ -40,4 +39,4 @@ export const createActor = (canisterId, options = {}) => { }); }; -export const random_maze = createActor(canisterId); +export const random_maze = canisterId ? createActor(canisterId) : undefined; diff --git a/motoko/random_maze/src/declarations/random_maze/random_maze.did b/motoko/random_maze/src/declarations/random_maze/random_maze.did index e1eb224cf..c00839020 100644 --- a/motoko/random_maze/src/declarations/random_maze/random_maze.did +++ b/motoko/random_maze/src/declarations/random_maze/random_maze.did @@ -1,3 +1,8 @@ service : { - generate: (nat) -> (text); + /// Given n, returns a maze of n * n cells, + /// separated by n + 1 partial walls. + /// + /// https://en.wikipedia.org/wiki/Maze_generation_algorithm + /// https://en.wikipedia.org/wiki/Maze_generation_algorithm#Iterative_implementation + generate: (size: nat) -> (text); } diff --git a/motoko/random_maze/src/declarations/random_maze/random_maze.did.d.ts b/motoko/random_maze/src/declarations/random_maze/random_maze.did.d.ts index 71a4bb6b5..e805b7930 100644 --- a/motoko/random_maze/src/declarations/random_maze/random_maze.did.d.ts +++ b/motoko/random_maze/src/declarations/random_maze/random_maze.did.d.ts @@ -1,4 +1,16 @@ -import type { Principal } from '@dfinity/principal'; -import type { ActorMethod } from '@dfinity/agent'; +import type { Principal } from '@icp-sdk/core/principal'; +import type { ActorMethod } from '@icp-sdk/core/agent'; +import type { IDL } from '@icp-sdk/core/candid'; -export interface _SERVICE { 'generate' : ActorMethod<[bigint], string> } +export interface _SERVICE { + /** + * / Given n, returns a maze of n * n cells, + * / separated by n + 1 partial walls. + * / + * / https://en.wikipedia.org/wiki/Maze_generation_algorithm + * / https://en.wikipedia.org/wiki/Maze_generation_algorithm#Iterative_implementation + */ + 'generate' : ActorMethod<[bigint], string>, +} +export declare const idlFactory: IDL.InterfaceFactory; +export declare const init: (args: { IDL: typeof IDL }) => IDL.Type[]; diff --git a/motoko/random_maze/webpack.config.js b/motoko/random_maze/webpack.config.js index 74e7e79c7..d93aed393 100644 --- a/motoko/random_maze/webpack.config.js +++ b/motoko/random_maze/webpack.config.js @@ -25,7 +25,7 @@ function initCanisterIds() { canisters = network === "local" ? localCanisters : prodCanisters; for (const canister in canisters) { - process.env[canister.toUpperCase() + "_CANISTER_ID"] = + process.env["CANISTER_ID_" + canister.toUpperCase()] = canisters[canister][network]; } } @@ -85,7 +85,7 @@ module.exports = { }), new webpack.EnvironmentPlugin({ NODE_ENV: 'development', - RANDOM_MAZE_CANISTER_ID: canisters["random_maze"] + CANISTER_ID_RANDOM_MAZE: process.env.CANISTER_ID_RANDOM_MAZE || '', }), new webpack.ProvidePlugin({ Buffer: [require.resolve("buffer/"), "Buffer"], diff --git a/motoko/vetkd/package-lock.json b/motoko/vetkd/package-lock.json index d5b613093..4a33b42e7 100644 --- a/motoko/vetkd/package-lock.json +++ b/motoko/vetkd/package-lock.json @@ -8,11 +8,9 @@ "name": "app_frontend_js", "version": "0.2.0", "dependencies": { - "@dfinity/agent": "^2.1.3", "@dfinity/auth-client": "^2.1.3", - "@dfinity/candid": "^2.1.3", - "@dfinity/principal": "^2.1.3", - "@dfinity/vetkeys": "^0.1.0" + "@dfinity/vetkeys": "^0.1.0", + "@icp-sdk/core": "~5.0.0" }, "devDependencies": { "assert": "2.0.0", @@ -35,6 +33,7 @@ "resolved": "https://registry.npmjs.org/@dfinity/agent/-/agent-2.4.1.tgz", "integrity": "sha512-IczFFOUDGfMTdQ83yiCvGtvHr1IIB80lWBP0ZYRLogs6NVt8t6HYcMlu1sgT+9VivhT7iwX4pktPFxxOkO3COw==", "license": "Apache-2.0", + "peer": true, "dependencies": { "@noble/curves": "^1.4.0", "@noble/hashes": "^1.3.1", @@ -67,10 +66,17 @@ "resolved": "https://registry.npmjs.org/@dfinity/candid/-/candid-2.4.1.tgz", "integrity": "sha512-kOaIKfhR2PYN8vD4M0Pc4s/7wb1nKjlTJUw+5E9jh26T03fITIZmaafIuwlX+wmdxwIT9Xoy7PlsxOEpzv203A==", "license": "Apache-2.0", + "peer": true, "peerDependencies": { "@dfinity/principal": "^2.4.1" } }, + "node_modules/@dfinity/cbor": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@dfinity/cbor/-/cbor-0.2.2.tgz", + "integrity": "sha512-GPJpH73kDEKbUBdUjY80lz7cq9l0vm1h/7ppejPV6O0ZTqCLrYspssYvqjRmK4aNnJ/SKXsP0rg9LYX7zpegaA==", + "license": "Apache-2.0" + }, "node_modules/@dfinity/identity": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/@dfinity/identity/-/identity-2.4.1.tgz", @@ -92,6 +98,7 @@ "resolved": "https://registry.npmjs.org/@dfinity/principal/-/principal-2.4.1.tgz", "integrity": "sha512-Cz6XQVOwq0TXDBClPbcidDd4SqK1lfr1/Kn34ruDD13xVQ4iaP1iCntzS9O97+vGpY/6jwDtKd32Gn5YJ9BQNw==", "license": "Apache-2.0", + "peer": true, "dependencies": { "@noble/hashes": "^1.3.1" } @@ -108,6 +115,20 @@ "idb-keyval": "^6.2.1" } }, + "node_modules/@icp-sdk/core": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@icp-sdk/core/-/core-5.0.0.tgz", + "integrity": "sha512-t6iRbdylHG57MicWRpR1uMTFXRW7GCzec6KAg55CBwDHbHLQDKikQ252lmlcEa80DrKa3LPvMKYZEUYjEq5XUQ==", + "license": "Apache-2.0", + "dependencies": { + "@dfinity/cbor": "^0.2.2", + "@noble/curves": "^1.9.2", + "@noble/hashes": "^1.8.0", + "@scure/bip32": "^1.7.0", + "@scure/bip39": "^1.6.0", + "asn1js": "^3.0.5" + } + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", @@ -173,9 +194,9 @@ "dev": true }, "node_modules/@noble/curves": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.9.0.tgz", - "integrity": "sha512-7YDlXiNMdO1YZeH6t/kvopHHbIZzlxrCV9WLqCY6QhcXOoXiNCMDqJIglZ9Yjx5+w7Dz30TITFrlTjnRg7sKEg==", + "version": "1.9.7", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.9.7.tgz", + "integrity": "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw==", "license": "MIT", "dependencies": { "@noble/hashes": "1.8.0" @@ -234,6 +255,42 @@ "node": ">= 8" } }, + "node_modules/@scure/base": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.2.6.tgz", + "integrity": "sha512-g/nm5FgUa//MCj1gV09zTJTaM6KBAHqLN907YVQqf7zC49+DcO4B1so4ZX07Ef10Twr6nuqYEH9GEggFXA4Fmg==", + "license": "MIT", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip32": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.7.0.tgz", + "integrity": "sha512-E4FFX/N3f4B80AKWp5dP6ow+flD1LQZo/w8UnLGYZO674jS6YnYeepycOOksv+vLPSpgN35wgKgy+ybfTb2SMw==", + "license": "MIT", + "dependencies": { + "@noble/curves": "~1.9.0", + "@noble/hashes": "~1.8.0", + "@scure/base": "~1.2.5" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip39": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.6.0.tgz", + "integrity": "sha512-+lF0BbLiJNwVlev4eKelw1WWLaiKXw7sSl8T6FvBlWkdX+94aGJ4o8XjUdlyhTCjd8c+B3KT3JfS8P0bLRNU6A==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "~1.8.0", + "@scure/base": "~1.2.5" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@types/body-parser": { "version": "1.19.2", "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", @@ -612,6 +669,7 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", "dev": true, + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -695,6 +753,20 @@ "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==", "dev": true }, + "node_modules/asn1js": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-3.0.7.tgz", + "integrity": "sha512-uLvq6KJu04qoQM6gvBfKFjlh6Gl0vOKQuR5cJMDHQkmwfMOQeN3F3SHCv9SNYSL+CRoHvOGFfllDlVz03GQjvQ==", + "license": "BSD-3-Clause", + "dependencies": { + "pvtsutils": "^1.3.6", + "pvutils": "^1.1.3", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/assert": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/assert/-/assert-2.0.0.tgz", @@ -926,6 +998,7 @@ "url": "https://github.com/sponsors/ai" } ], + "peer": true, "dependencies": { "caniuse-lite": "^1.0.30001646", "electron-to-chromium": "^1.5.4", @@ -3315,6 +3388,24 @@ "node": ">=6" } }, + "node_modules/pvtsutils": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.6.tgz", + "integrity": "sha512-PLgQXQ6H2FWCaeRak8vvk1GW462lMxB5s3Jm673N82zI4vqtVUPuZdffdZbPDFRoU8kAhItWFtPCWiPpp4/EDg==", + "license": "MIT", + "dependencies": { + "tslib": "^2.8.1" + } + }, + "node_modules/pvutils": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/pvutils/-/pvutils-1.1.5.tgz", + "integrity": "sha512-KTqnxsgGiQ6ZAzZCVlJH5eOjSnvlyEgx1m8bkRJfOhmGRqfo5KLvmAlACQkrjEtOQ4B7wF9TdSLIs9O90MX9xA==", + "license": "MIT", + "engines": { + "node": ">=16.0.0" + } + }, "node_modules/qs": { "version": "6.13.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", @@ -3597,6 +3688,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", "dev": true, + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", @@ -4119,6 +4211,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -4197,10 +4290,10 @@ } }, "node_modules/tslib": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.1.tgz", - "integrity": "sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==", - "dev": true + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" }, "node_modules/type-is": { "version": "1.6.18", @@ -4358,6 +4451,7 @@ "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.94.0.tgz", "integrity": "sha512-KcsGn50VT+06JH/iunZJedYGUJS5FGjow8wb9c0v5n1Om8O1g4L6LjtfxwlXIATopoQu+vOXXa7gYisWxCoPyg==", "dev": true, + "peer": true, "dependencies": { "@types/estree": "^1.0.5", "@webassemblyjs/ast": "^1.12.1", @@ -4597,6 +4691,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", diff --git a/motoko/vetkd/package.json b/motoko/vetkd/package.json index 22ce48e8a..0a3fbd5d6 100644 --- a/motoko/vetkd/package.json +++ b/motoko/vetkd/package.json @@ -17,11 +17,9 @@ "generate": "dfx generate app_backend" }, "dependencies": { - "@dfinity/agent": "^2.1.3", "@dfinity/auth-client": "^2.1.3", - "@dfinity/candid": "^2.1.3", - "@dfinity/principal": "^2.1.3", - "@dfinity/vetkeys": "^0.1.0" + "@dfinity/vetkeys": "^0.1.0", + "@icp-sdk/core": "~5.0.0" }, "devDependencies": { "assert": "2.0.0", @@ -38,4 +36,4 @@ "webpack-cli": "^4.10.0", "webpack-dev-server": "^4.8.1" } -} \ No newline at end of file +} diff --git a/motoko/vetkd/src/app_frontend_js/src/index.js b/motoko/vetkd/src/app_frontend_js/src/index.js index 07d04f7c9..fc15e973e 100644 --- a/motoko/vetkd/src/app_frontend_js/src/index.js +++ b/motoko/vetkd/src/app_frontend_js/src/index.js @@ -1,8 +1,8 @@ import { createActor, app_backend } from "../../declarations/app_backend"; import { TransportSecretKey, EncryptedVetKey, DerivedPublicKey, IbeCiphertext, IbeIdentity, IbeSeed } from "@dfinity/vetkeys"; import { AuthClient } from "@dfinity/auth-client" -import { HttpAgent, Actor } from "@dfinity/agent"; -import { Principal } from "@dfinity/principal"; +import { HttpAgent, Actor } from "@icp-sdk/core/agent"; +import { Principal } from "@icp-sdk/core/principal"; let fetched_derived_key_material = null; let app_backend_actor = app_backend; diff --git a/rust/face-recognition/package-lock.json b/rust/face-recognition/package-lock.json index c90b8ff04..74bf7143f 100644 --- a/rust/face-recognition/package-lock.json +++ b/rust/face-recognition/package-lock.json @@ -8,9 +8,7 @@ "name": "icp_detect", "version": "0.2.0", "dependencies": { - "@dfinity/agent": "^0.18.1", - "@dfinity/candid": "^0.18.1", - "@dfinity/principal": "^0.18.1" + "@icp-sdk/core": "~5.0.0" }, "devDependencies": { "assert": "2.0.0", @@ -31,33 +29,11 @@ "node": "^12 || ^14 || ^16 || ^18 || ^21" } }, - "node_modules/@dfinity/agent": { - "version": "0.18.1", - "resolved": "https://registry.npmjs.org/@dfinity/agent/-/agent-0.18.1.tgz", - "integrity": "sha512-nMFK/y0ZkPfQYECdojmltXsBIdGvXa1Sxa4rDV2cibEq9lsjWMEIUqPsiBaNHuwuz+gzsGVq4N2b9umKQIQaRQ==", - "dependencies": { - "base64-arraybuffer": "^0.2.0", - "borc": "^2.1.1", - "js-sha256": "0.9.0", - "simple-cbor": "^0.4.1" - }, - "peerDependencies": { - "@dfinity/candid": "^0.18.1", - "@dfinity/principal": "^0.18.1" - } - }, - "node_modules/@dfinity/candid": { - "version": "0.18.1", - "resolved": "https://registry.npmjs.org/@dfinity/candid/-/candid-0.18.1.tgz", - "integrity": "sha512-/PC3wDnrGcWhaF/veYKevcAAn5A5jK0mRkVKcz0YxK/a78Ai9wMJg0fUk7aoyZryCOz8JPVgR4nK1/zTmvEBHg==" - }, - "node_modules/@dfinity/principal": { - "version": "0.18.1", - "resolved": "https://registry.npmjs.org/@dfinity/principal/-/principal-0.18.1.tgz", - "integrity": "sha512-xeV+5zV7VQRT2xJTbXW4IDra1urEcchuwuKFTU/ERcJWBWEk8chsZcd6DBc8SPq83xRgXW2ZTVVSOZR8NKaVoQ==", - "dependencies": { - "js-sha256": "^0.9.0" - } + "node_modules/@dfinity/cbor": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@dfinity/cbor/-/cbor-0.2.2.tgz", + "integrity": "sha512-GPJpH73kDEKbUBdUjY80lz7cq9l0vm1h/7ppejPV6O0ZTqCLrYspssYvqjRmK4aNnJ/SKXsP0rg9LYX7zpegaA==", + "license": "Apache-2.0" }, "node_modules/@discoveryjs/json-ext": { "version": "0.5.7", @@ -68,6 +44,20 @@ "node": ">=10.0.0" } }, + "node_modules/@icp-sdk/core": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@icp-sdk/core/-/core-5.0.0.tgz", + "integrity": "sha512-t6iRbdylHG57MicWRpR1uMTFXRW7GCzec6KAg55CBwDHbHLQDKikQ252lmlcEa80DrKa3LPvMKYZEUYjEq5XUQ==", + "license": "Apache-2.0", + "dependencies": { + "@dfinity/cbor": "^0.2.2", + "@noble/curves": "^1.9.2", + "@noble/hashes": "^1.8.0", + "@scure/bip32": "^1.7.0", + "@scure/bip39": "^1.6.0", + "asn1js": "^3.0.5" + } + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", @@ -132,6 +122,33 @@ "integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==", "dev": true }, + "node_modules/@noble/curves": { + "version": "1.9.7", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.9.7.tgz", + "integrity": "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "1.8.0" + }, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/hashes": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", + "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==", + "license": "MIT", + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -167,6 +184,42 @@ "node": ">= 8" } }, + "node_modules/@scure/base": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.2.6.tgz", + "integrity": "sha512-g/nm5FgUa//MCj1gV09zTJTaM6KBAHqLN907YVQqf7zC49+DcO4B1so4ZX07Ef10Twr6nuqYEH9GEggFXA4Fmg==", + "license": "MIT", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip32": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.7.0.tgz", + "integrity": "sha512-E4FFX/N3f4B80AKWp5dP6ow+flD1LQZo/w8UnLGYZO674jS6YnYeepycOOksv+vLPSpgN35wgKgy+ybfTb2SMw==", + "license": "MIT", + "dependencies": { + "@noble/curves": "~1.9.0", + "@noble/hashes": "~1.8.0", + "@scure/base": "~1.2.5" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip39": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.6.0.tgz", + "integrity": "sha512-+lF0BbLiJNwVlev4eKelw1WWLaiKXw7sSl8T6FvBlWkdX+94aGJ4o8XjUdlyhTCjd8c+B3KT3JfS8P0bLRNU6A==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "~1.8.0", + "@scure/base": "~1.2.5" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@types/body-parser": { "version": "1.19.5", "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz", @@ -584,6 +637,7 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", "dev": true, + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -605,6 +659,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", "dev": true, + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", @@ -685,6 +740,20 @@ "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==", "dev": true }, + "node_modules/asn1js": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-3.0.7.tgz", + "integrity": "sha512-uLvq6KJu04qoQM6gvBfKFjlh6Gl0vOKQuR5cJMDHQkmwfMOQeN3F3SHCv9SNYSL+CRoHvOGFfllDlVz03GQjvQ==", + "license": "BSD-3-Clause", + "dependencies": { + "pvtsutils": "^1.3.6", + "pvutils": "^1.1.3", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/assert": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/assert/-/assert-2.0.0.tgz", @@ -715,18 +784,11 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, - "node_modules/base64-arraybuffer": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.2.0.tgz", - "integrity": "sha512-7emyCsu1/xiBXgQZrscw/8KPRT44I4Yq9Pe6EGs3aPRTsWuggML1/1DTuZUuIaJPIm1FTDUVXl4x/yW8s0kQDQ==", - "engines": { - "node": ">= 0.6.0" - } - }, "node_modules/base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, "funding": [ { "type": "github", @@ -748,14 +810,6 @@ "integrity": "sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==", "dev": true }, - "node_modules/bignumber.js": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", - "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==", - "engines": { - "node": "*" - } - }, "node_modules/binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -816,46 +870,6 @@ "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", "dev": true }, - "node_modules/borc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/borc/-/borc-2.1.2.tgz", - "integrity": "sha512-Sy9eoUi4OiKzq7VovMn246iTo17kzuyHJKomCfpWMlI6RpfN1gk95w7d7gH264nApVLg0HZfcpz62/g4VH1Y4w==", - "dependencies": { - "bignumber.js": "^9.0.0", - "buffer": "^5.5.0", - "commander": "^2.15.0", - "ieee754": "^1.1.13", - "iso-url": "~0.4.7", - "json-text-sequence": "~0.1.0", - "readable-stream": "^3.6.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/borc/node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -897,6 +911,7 @@ "url": "https://github.com/sponsors/ai" } ], + "peer": true, "dependencies": { "caniuse-lite": "^1.0.30001565", "electron-to-chromium": "^1.4.601", @@ -1081,7 +1096,8 @@ "node_modules/commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true }, "node_modules/compressible": { "version": "2.0.18", @@ -1306,11 +1322,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/delimit-stream": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/delimit-stream/-/delimit-stream-0.1.0.tgz", - "integrity": "sha512-a02fiQ7poS5CnjiJBAsjGLPp5EwVoGHNeu9sziBd9huppRfsAFIpv5zNLv0V1gbop53ilngAf5Kf331AwcoRBQ==" - }, "node_modules/depd": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", @@ -2311,6 +2322,7 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, "funding": [ { "type": "github", @@ -2367,7 +2379,8 @@ "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true }, "node_modules/interpret": { "version": "2.2.0", @@ -2590,14 +2603,6 @@ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true }, - "node_modules/iso-url": { - "version": "0.4.7", - "resolved": "https://registry.npmjs.org/iso-url/-/iso-url-0.4.7.tgz", - "integrity": "sha512-27fFRDnPAMnHGLq36bWTpKET+eiXct3ENlCcdcMdk+mjXrb2kw3mhBUg1B7ewAC0kVzlOPhADzQgz1SE6Tglog==", - "engines": { - "node": ">=10" - } - }, "node_modules/isobject": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", @@ -2621,11 +2626,6 @@ "node": ">= 10.13.0" } }, - "node_modules/js-sha256": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/js-sha256/-/js-sha256-0.9.0.tgz", - "integrity": "sha512-sga3MHh9sgQN2+pJ9VYZ+1LPwXOxuBJBA5nrR5/ofPfuiJBE2hnjsaN8se8JznOmGLN2p49Pe5U/ttafcs/apA==" - }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", @@ -2638,14 +2638,6 @@ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "dev": true }, - "node_modules/json-text-sequence": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/json-text-sequence/-/json-text-sequence-0.1.1.tgz", - "integrity": "sha512-L3mEegEWHRekSHjc7+sc8eJhba9Clq1PZ8kMkzf8OxElhXc8O4TS5MwcVlj9aEbm5dr81N90WHC5nAz3UO971w==", - "dependencies": { - "delimit-stream": "0.1.0" - } - }, "node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -3237,6 +3229,24 @@ "node": ">=6" } }, + "node_modules/pvtsutils": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.6.tgz", + "integrity": "sha512-PLgQXQ6H2FWCaeRak8vvk1GW462lMxB5s3Jm673N82zI4vqtVUPuZdffdZbPDFRoU8kAhItWFtPCWiPpp4/EDg==", + "license": "MIT", + "dependencies": { + "tslib": "^2.8.1" + } + }, + "node_modules/pvutils": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/pvutils/-/pvutils-1.1.5.tgz", + "integrity": "sha512-KTqnxsgGiQ6ZAzZCVlJH5eOjSnvlyEgx1m8bkRJfOhmGRqfo5KLvmAlACQkrjEtOQ4B7wF9TdSLIs9O90MX9xA==", + "license": "MIT", + "engines": { + "node": ">=16.0.0" + } + }, "node_modules/qs": { "version": "6.13.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", @@ -3318,6 +3328,7 @@ "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -3487,6 +3498,7 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, "funding": [ { "type": "github", @@ -3761,11 +3773,6 @@ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, - "node_modules/simple-cbor": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/simple-cbor/-/simple-cbor-0.4.1.tgz", - "integrity": "sha512-rijcxtwx2b4Bje3sqeIqw5EeW7UlOIC4YfOdwqIKacpvRQ/D78bWg/4/0m5e0U91oKvlGh7LlJuZCu07ISCC7w==" - }, "node_modules/slash": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", @@ -3907,6 +3914,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, "dependencies": { "safe-buffer": "~5.2.0" } @@ -4025,6 +4033,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -4097,10 +4106,10 @@ } }, "node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", - "dev": true + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" }, "node_modules/type-is": { "version": "1.6.18", @@ -4186,7 +4195,8 @@ "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true }, "node_modules/utila": { "version": "0.4.0", @@ -4248,6 +4258,7 @@ "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.89.0.tgz", "integrity": "sha512-qyfIC10pOr70V+jkmud8tMfajraGCZMBWJtrmuBymQKCrLTRejBI8STDp1MCyZu/QTdZSeacCQYpYNQVOzX5kw==", "dev": true, + "peer": true, "dependencies": { "@types/eslint-scope": "^3.7.3", "@types/estree": "^1.0.0", @@ -4295,6 +4306,7 @@ "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.10.0.tgz", "integrity": "sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==", "dev": true, + "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -4456,6 +4468,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", diff --git a/rust/face-recognition/package.json b/rust/face-recognition/package.json index dba7e5e46..50fb98e51 100644 --- a/rust/face-recognition/package.json +++ b/rust/face-recognition/package.json @@ -17,9 +17,7 @@ "generate": "dfx generate backend" }, "dependencies": { - "@dfinity/agent": "^2.1.3", - "@dfinity/candid": "^2.1.3", - "@dfinity/principal": "^2.1.3" + "@icp-sdk/core": "~5.0.0" }, "devDependencies": { "assert": "2.0.0", @@ -45,4 +43,4 @@ "last 2 safari version", "last 2 edge version" ] -} \ No newline at end of file +} diff --git a/rust/face-recognition/src/declarations/backend/backend.did.d.ts b/rust/face-recognition/src/declarations/backend/backend.did.d.ts index 17b40664b..f0f60b9e7 100644 --- a/rust/face-recognition/src/declarations/backend/backend.did.d.ts +++ b/rust/face-recognition/src/declarations/backend/backend.did.d.ts @@ -1,6 +1,6 @@ -import type { Principal } from '@dfinity/principal'; -import type { ActorMethod } from '@dfinity/agent'; -import type { IDL } from '@dfinity/candid'; +import type { Principal } from '@icp-sdk/core/principal'; +import type { ActorMethod } from '@icp-sdk/core/agent'; +import type { IDL } from '@icp-sdk/core/candid'; export type Addition = { 'Ok' : Embedding } | { 'Err' : Error }; diff --git a/rust/face-recognition/src/declarations/backend/index.d.ts b/rust/face-recognition/src/declarations/backend/index.d.ts index 55daa14e7..27c1ab6cb 100644 --- a/rust/face-recognition/src/declarations/backend/index.d.ts +++ b/rust/face-recognition/src/declarations/backend/index.d.ts @@ -3,9 +3,9 @@ import type { HttpAgentOptions, ActorConfig, Agent, -} from "@dfinity/agent"; -import type { Principal } from "@dfinity/principal"; -import type { IDL } from "@dfinity/candid"; +} from "@icp-sdk/core/agent"; +import type { Principal } from "@icp-sdk/core/principal"; +import type { IDL } from "@icp-sdk/core/candid"; import { _SERVICE } from './backend.did'; diff --git a/rust/face-recognition/src/declarations/backend/index.js b/rust/face-recognition/src/declarations/backend/index.js index 8def37967..4e6d33069 100644 --- a/rust/face-recognition/src/declarations/backend/index.js +++ b/rust/face-recognition/src/declarations/backend/index.js @@ -1,4 +1,4 @@ -import { Actor, HttpAgent } from "@dfinity/agent"; +import { Actor, HttpAgent } from "@icp-sdk/core/agent"; // Imports and re-exports candid interface import { idlFactory } from "./backend.did.js"; diff --git a/rust/face-recognition/src/declarations/frontend/frontend.did b/rust/face-recognition/src/declarations/frontend/frontend.did deleted file mode 100644 index 51bb1a235..000000000 --- a/rust/face-recognition/src/declarations/frontend/frontend.did +++ /dev/null @@ -1,262 +0,0 @@ -type BatchId = nat; -type ChunkId = nat; -type Key = text; -type Time = int; - -type CreateAssetArguments = record { - key: Key; - content_type: text; - max_age: opt nat64; - headers: opt vec HeaderField; - enable_aliasing: opt bool; - allow_raw_access: opt bool; -}; - -// Add or change content for an asset, by content encoding -type SetAssetContentArguments = record { - key: Key; - content_encoding: text; - chunk_ids: vec ChunkId; - sha256: opt blob; -}; - -// Remove content for an asset, by content encoding -type UnsetAssetContentArguments = record { - key: Key; - content_encoding: text; -}; - -// Delete an asset -type DeleteAssetArguments = record { - key: Key; -}; - -// Reset everything -type ClearArguments = record {}; - -type BatchOperationKind = variant { - CreateAsset: CreateAssetArguments; - SetAssetContent: SetAssetContentArguments; - - SetAssetProperties: SetAssetPropertiesArguments; - - UnsetAssetContent: UnsetAssetContentArguments; - DeleteAsset: DeleteAssetArguments; - - Clear: ClearArguments; -}; - -type CommitBatchArguments = record { - batch_id: BatchId; - operations: vec BatchOperationKind -}; - -type CommitProposedBatchArguments = record { - batch_id: BatchId; - evidence: blob; -}; - -type ComputeEvidenceArguments = record { - batch_id: BatchId; - max_iterations: opt nat16 -}; - -type DeleteBatchArguments = record { - batch_id: BatchId; -}; - -type HeaderField = record { text; text; }; - -type HttpRequest = record { - method: text; - url: text; - headers: vec HeaderField; - body: blob; - certificate_version: opt nat16; -}; - -type HttpResponse = record { - status_code: nat16; - headers: vec HeaderField; - body: blob; - streaming_strategy: opt StreamingStrategy; -}; - -type StreamingCallbackHttpResponse = record { - body: blob; - token: opt StreamingCallbackToken; -}; - -type StreamingCallbackToken = record { - key: Key; - content_encoding: text; - index: nat; - sha256: opt blob; -}; - -type StreamingStrategy = variant { - Callback: record { - callback: func (StreamingCallbackToken) -> (opt StreamingCallbackHttpResponse) query; - token: StreamingCallbackToken; - }; -}; - -type SetAssetPropertiesArguments = record { - key: Key; - max_age: opt opt nat64; - headers: opt opt vec HeaderField; - allow_raw_access: opt opt bool; - is_aliased: opt opt bool; -}; - -type ConfigurationResponse = record { - max_batches: opt nat64; - max_chunks: opt nat64; - max_bytes: opt nat64; -}; - -type ConfigureArguments = record { - max_batches: opt opt nat64; - max_chunks: opt opt nat64; - max_bytes: opt opt nat64; -}; - -type Permission = variant { - Commit; - ManagePermissions; - Prepare; -}; - -type GrantPermission = record { - to_principal: principal; - permission: Permission; -}; -type RevokePermission = record { - of_principal: principal; - permission: Permission; -}; -type ListPermitted = record { permission: Permission }; - -type ValidationResult = variant { Ok : text; Err : text }; - -type AssetCanisterArgs = variant { - Init: InitArgs; - Upgrade: UpgradeArgs; -}; - -type InitArgs = record {}; - -type UpgradeArgs = record { - set_permissions: opt SetPermissions; -}; - -/// Sets the list of principals granted each permission. -type SetPermissions = record { - prepare: vec principal; - commit: vec principal; - manage_permissions: vec principal; -}; - -service: (asset_canister_args: opt AssetCanisterArgs) -> { - api_version: () -> (nat16) query; - - get: (record { - key: Key; - accept_encodings: vec text; - }) -> (record { - content: blob; // may be the entirety of the content, or just chunk index 0 - content_type: text; - content_encoding: text; - sha256: opt blob; // sha256 of entire asset encoding, calculated by dfx and passed in SetAssetContentArguments - total_length: nat; // all chunks except last have size == content.size() - }) query; - - // if get() returned chunks > 1, call this to retrieve them. - // chunks may or may not be split up at the same boundaries as presented to create_chunk(). - get_chunk: (record { - key: Key; - content_encoding: text; - index: nat; - sha256: opt blob; // sha256 of entire asset encoding, calculated by dfx and passed in SetAssetContentArguments - }) -> (record { content: blob }) query; - - list : (record {}) -> (vec record { - key: Key; - content_type: text; - encodings: vec record { - content_encoding: text; - sha256: opt blob; // sha256 of entire asset encoding, calculated by dfx and passed in SetAssetContentArguments - length: nat; // Size of this encoding's blob. Calculated when uploading assets. - modified: Time; - }; - }) query; - - certified_tree : (record {}) -> (record { - certificate: blob; - tree: blob; - }) query; - - create_batch : (record {}) -> (record { batch_id: BatchId }); - - create_chunk: (record { batch_id: BatchId; content: blob }) -> (record { chunk_id: ChunkId }); - - // Perform all operations successfully, or reject - commit_batch: (CommitBatchArguments) -> (); - - // Save the batch operations for later commit - propose_commit_batch: (CommitBatchArguments) -> (); - - // Given a batch already proposed, perform all operations successfully, or reject - commit_proposed_batch: (CommitProposedBatchArguments) -> (); - - // Compute a hash over the CommitBatchArguments. Call until it returns Some(evidence). - compute_evidence: (ComputeEvidenceArguments) -> (opt blob); - - // Delete a batch that has been created, or proposed for commit, but not yet committed - delete_batch: (DeleteBatchArguments) -> (); - - create_asset: (CreateAssetArguments) -> (); - set_asset_content: (SetAssetContentArguments) -> (); - unset_asset_content: (UnsetAssetContentArguments) -> (); - - delete_asset: (DeleteAssetArguments) -> (); - - clear: (ClearArguments) -> (); - - // Single call to create an asset with content for a single content encoding that - // fits within the message ingress limit. - store: (record { - key: Key; - content_type: text; - content_encoding: text; - content: blob; - sha256: opt blob - }) -> (); - - http_request: (request: HttpRequest) -> (HttpResponse) query; - http_request_streaming_callback: (token: StreamingCallbackToken) -> (opt StreamingCallbackHttpResponse) query; - - authorize: (principal) -> (); - deauthorize: (principal) -> (); - list_authorized: () -> (vec principal); - grant_permission: (GrantPermission) -> (); - revoke_permission: (RevokePermission) -> (); - list_permitted: (ListPermitted) -> (vec principal); - take_ownership: () -> (); - - get_asset_properties : (key: Key) -> (record { - max_age: opt nat64; - headers: opt vec HeaderField; - allow_raw_access: opt bool; - is_aliased: opt bool; } ) query; - set_asset_properties: (SetAssetPropertiesArguments) -> (); - - get_configuration: () -> (ConfigurationResponse); - configure: (ConfigureArguments) -> (); - - validate_grant_permission: (GrantPermission) -> (ValidationResult); - validate_revoke_permission: (RevokePermission) -> (ValidationResult); - validate_take_ownership: () -> (ValidationResult); - validate_commit_proposed_batch: (CommitProposedBatchArguments) -> (ValidationResult); - validate_configure: (ConfigureArguments) -> (ValidationResult); -} diff --git a/rust/face-recognition/src/declarations/frontend/frontend.did.d.ts b/rust/face-recognition/src/declarations/frontend/frontend.did.d.ts deleted file mode 100644 index ce964689f..000000000 --- a/rust/face-recognition/src/declarations/frontend/frontend.did.d.ts +++ /dev/null @@ -1,240 +0,0 @@ -import type { Principal } from '@dfinity/principal'; -import type { ActorMethod } from '@dfinity/agent'; -import type { IDL } from '@dfinity/candid'; - -export type AssetCanisterArgs = { 'Upgrade' : UpgradeArgs } | - { 'Init' : InitArgs }; -export type BatchId = bigint; -export type BatchOperationKind = { - 'SetAssetProperties' : SetAssetPropertiesArguments - } | - { 'CreateAsset' : CreateAssetArguments } | - { 'UnsetAssetContent' : UnsetAssetContentArguments } | - { 'DeleteAsset' : DeleteAssetArguments } | - { 'SetAssetContent' : SetAssetContentArguments } | - { 'Clear' : ClearArguments }; -export type ChunkId = bigint; -export type ClearArguments = {}; -export interface CommitBatchArguments { - 'batch_id' : BatchId, - 'operations' : Array, -} -export interface CommitProposedBatchArguments { - 'batch_id' : BatchId, - 'evidence' : Uint8Array | number[], -} -export interface ComputeEvidenceArguments { - 'batch_id' : BatchId, - 'max_iterations' : [] | [number], -} -export interface ConfigurationResponse { - 'max_batches' : [] | [bigint], - 'max_bytes' : [] | [bigint], - 'max_chunks' : [] | [bigint], -} -export interface ConfigureArguments { - 'max_batches' : [] | [[] | [bigint]], - 'max_bytes' : [] | [[] | [bigint]], - 'max_chunks' : [] | [[] | [bigint]], -} -export interface CreateAssetArguments { - 'key' : Key, - 'content_type' : string, - 'headers' : [] | [Array], - 'allow_raw_access' : [] | [boolean], - 'max_age' : [] | [bigint], - 'enable_aliasing' : [] | [boolean], -} -export interface DeleteAssetArguments { 'key' : Key } -export interface DeleteBatchArguments { 'batch_id' : BatchId } -export interface GrantPermission { - 'permission' : Permission, - 'to_principal' : Principal, -} -export type HeaderField = [string, string]; -export interface HttpRequest { - 'url' : string, - 'method' : string, - 'body' : Uint8Array | number[], - 'headers' : Array, - 'certificate_version' : [] | [number], -} -export interface HttpResponse { - 'body' : Uint8Array | number[], - 'headers' : Array, - 'streaming_strategy' : [] | [StreamingStrategy], - 'status_code' : number, -} -export type InitArgs = {}; -export type Key = string; -export interface ListPermitted { 'permission' : Permission } -export type Permission = { 'Prepare' : null } | - { 'ManagePermissions' : null } | - { 'Commit' : null }; -export interface RevokePermission { - 'permission' : Permission, - 'of_principal' : Principal, -} -export interface SetAssetContentArguments { - 'key' : Key, - 'sha256' : [] | [Uint8Array | number[]], - 'chunk_ids' : Array, - 'content_encoding' : string, -} -export interface SetAssetPropertiesArguments { - 'key' : Key, - 'headers' : [] | [[] | [Array]], - 'is_aliased' : [] | [[] | [boolean]], - 'allow_raw_access' : [] | [[] | [boolean]], - 'max_age' : [] | [[] | [bigint]], -} -export interface SetPermissions { - 'prepare' : Array, - 'commit' : Array, - 'manage_permissions' : Array, -} -export interface StreamingCallbackHttpResponse { - 'token' : [] | [StreamingCallbackToken], - 'body' : Uint8Array | number[], -} -export interface StreamingCallbackToken { - 'key' : Key, - 'sha256' : [] | [Uint8Array | number[]], - 'index' : bigint, - 'content_encoding' : string, -} -export type StreamingStrategy = { - 'Callback' : { - 'token' : StreamingCallbackToken, - 'callback' : [Principal, string], - } - }; -export type Time = bigint; -export interface UnsetAssetContentArguments { - 'key' : Key, - 'content_encoding' : string, -} -export interface UpgradeArgs { 'set_permissions' : [] | [SetPermissions] } -export type ValidationResult = { 'Ok' : string } | - { 'Err' : string }; -export interface _SERVICE { - 'api_version' : ActorMethod<[], number>, - 'authorize' : ActorMethod<[Principal], undefined>, - 'certified_tree' : ActorMethod< - [{}], - { 'certificate' : Uint8Array | number[], 'tree' : Uint8Array | number[] } - >, - 'clear' : ActorMethod<[ClearArguments], undefined>, - 'commit_batch' : ActorMethod<[CommitBatchArguments], undefined>, - 'commit_proposed_batch' : ActorMethod< - [CommitProposedBatchArguments], - undefined - >, - 'compute_evidence' : ActorMethod< - [ComputeEvidenceArguments], - [] | [Uint8Array | number[]] - >, - 'configure' : ActorMethod<[ConfigureArguments], undefined>, - 'create_asset' : ActorMethod<[CreateAssetArguments], undefined>, - 'create_batch' : ActorMethod<[{}], { 'batch_id' : BatchId }>, - 'create_chunk' : ActorMethod< - [{ 'content' : Uint8Array | number[], 'batch_id' : BatchId }], - { 'chunk_id' : ChunkId } - >, - 'deauthorize' : ActorMethod<[Principal], undefined>, - 'delete_asset' : ActorMethod<[DeleteAssetArguments], undefined>, - 'delete_batch' : ActorMethod<[DeleteBatchArguments], undefined>, - 'get' : ActorMethod< - [{ 'key' : Key, 'accept_encodings' : Array }], - { - 'content' : Uint8Array | number[], - 'sha256' : [] | [Uint8Array | number[]], - 'content_type' : string, - 'content_encoding' : string, - 'total_length' : bigint, - } - >, - 'get_asset_properties' : ActorMethod< - [Key], - { - 'headers' : [] | [Array], - 'is_aliased' : [] | [boolean], - 'allow_raw_access' : [] | [boolean], - 'max_age' : [] | [bigint], - } - >, - 'get_chunk' : ActorMethod< - [ - { - 'key' : Key, - 'sha256' : [] | [Uint8Array | number[]], - 'index' : bigint, - 'content_encoding' : string, - }, - ], - { 'content' : Uint8Array | number[] } - >, - 'get_configuration' : ActorMethod<[], ConfigurationResponse>, - 'grant_permission' : ActorMethod<[GrantPermission], undefined>, - 'http_request' : ActorMethod<[HttpRequest], HttpResponse>, - 'http_request_streaming_callback' : ActorMethod< - [StreamingCallbackToken], - [] | [StreamingCallbackHttpResponse] - >, - 'list' : ActorMethod< - [{}], - Array< - { - 'key' : Key, - 'encodings' : Array< - { - 'modified' : Time, - 'sha256' : [] | [Uint8Array | number[]], - 'length' : bigint, - 'content_encoding' : string, - } - >, - 'content_type' : string, - } - > - >, - 'list_authorized' : ActorMethod<[], Array>, - 'list_permitted' : ActorMethod<[ListPermitted], Array>, - 'propose_commit_batch' : ActorMethod<[CommitBatchArguments], undefined>, - 'revoke_permission' : ActorMethod<[RevokePermission], undefined>, - 'set_asset_content' : ActorMethod<[SetAssetContentArguments], undefined>, - 'set_asset_properties' : ActorMethod< - [SetAssetPropertiesArguments], - undefined - >, - 'store' : ActorMethod< - [ - { - 'key' : Key, - 'content' : Uint8Array | number[], - 'sha256' : [] | [Uint8Array | number[]], - 'content_type' : string, - 'content_encoding' : string, - }, - ], - undefined - >, - 'take_ownership' : ActorMethod<[], undefined>, - 'unset_asset_content' : ActorMethod<[UnsetAssetContentArguments], undefined>, - 'validate_commit_proposed_batch' : ActorMethod< - [CommitProposedBatchArguments], - ValidationResult - >, - 'validate_configure' : ActorMethod<[ConfigureArguments], ValidationResult>, - 'validate_grant_permission' : ActorMethod< - [GrantPermission], - ValidationResult - >, - 'validate_revoke_permission' : ActorMethod< - [RevokePermission], - ValidationResult - >, - 'validate_take_ownership' : ActorMethod<[], ValidationResult>, -} -export declare const idlFactory: IDL.InterfaceFactory; -export declare const init: (args: { IDL: typeof IDL }) => IDL.Type[]; diff --git a/rust/face-recognition/src/declarations/frontend/frontend.did.js b/rust/face-recognition/src/declarations/frontend/frontend.did.js deleted file mode 100644 index b68ea4a42..000000000 --- a/rust/face-recognition/src/declarations/frontend/frontend.did.js +++ /dev/null @@ -1,286 +0,0 @@ -export const idlFactory = ({ IDL }) => { - const SetPermissions = IDL.Record({ - 'prepare' : IDL.Vec(IDL.Principal), - 'commit' : IDL.Vec(IDL.Principal), - 'manage_permissions' : IDL.Vec(IDL.Principal), - }); - const UpgradeArgs = IDL.Record({ - 'set_permissions' : IDL.Opt(SetPermissions), - }); - const InitArgs = IDL.Record({}); - const AssetCanisterArgs = IDL.Variant({ - 'Upgrade' : UpgradeArgs, - 'Init' : InitArgs, - }); - const ClearArguments = IDL.Record({}); - const BatchId = IDL.Nat; - const Key = IDL.Text; - const HeaderField = IDL.Tuple(IDL.Text, IDL.Text); - const SetAssetPropertiesArguments = IDL.Record({ - 'key' : Key, - 'headers' : IDL.Opt(IDL.Opt(IDL.Vec(HeaderField))), - 'is_aliased' : IDL.Opt(IDL.Opt(IDL.Bool)), - 'allow_raw_access' : IDL.Opt(IDL.Opt(IDL.Bool)), - 'max_age' : IDL.Opt(IDL.Opt(IDL.Nat64)), - }); - const CreateAssetArguments = IDL.Record({ - 'key' : Key, - 'content_type' : IDL.Text, - 'headers' : IDL.Opt(IDL.Vec(HeaderField)), - 'allow_raw_access' : IDL.Opt(IDL.Bool), - 'max_age' : IDL.Opt(IDL.Nat64), - 'enable_aliasing' : IDL.Opt(IDL.Bool), - }); - const UnsetAssetContentArguments = IDL.Record({ - 'key' : Key, - 'content_encoding' : IDL.Text, - }); - const DeleteAssetArguments = IDL.Record({ 'key' : Key }); - const ChunkId = IDL.Nat; - const SetAssetContentArguments = IDL.Record({ - 'key' : Key, - 'sha256' : IDL.Opt(IDL.Vec(IDL.Nat8)), - 'chunk_ids' : IDL.Vec(ChunkId), - 'content_encoding' : IDL.Text, - }); - const BatchOperationKind = IDL.Variant({ - 'SetAssetProperties' : SetAssetPropertiesArguments, - 'CreateAsset' : CreateAssetArguments, - 'UnsetAssetContent' : UnsetAssetContentArguments, - 'DeleteAsset' : DeleteAssetArguments, - 'SetAssetContent' : SetAssetContentArguments, - 'Clear' : ClearArguments, - }); - const CommitBatchArguments = IDL.Record({ - 'batch_id' : BatchId, - 'operations' : IDL.Vec(BatchOperationKind), - }); - const CommitProposedBatchArguments = IDL.Record({ - 'batch_id' : BatchId, - 'evidence' : IDL.Vec(IDL.Nat8), - }); - const ComputeEvidenceArguments = IDL.Record({ - 'batch_id' : BatchId, - 'max_iterations' : IDL.Opt(IDL.Nat16), - }); - const ConfigureArguments = IDL.Record({ - 'max_batches' : IDL.Opt(IDL.Opt(IDL.Nat64)), - 'max_bytes' : IDL.Opt(IDL.Opt(IDL.Nat64)), - 'max_chunks' : IDL.Opt(IDL.Opt(IDL.Nat64)), - }); - const DeleteBatchArguments = IDL.Record({ 'batch_id' : BatchId }); - const ConfigurationResponse = IDL.Record({ - 'max_batches' : IDL.Opt(IDL.Nat64), - 'max_bytes' : IDL.Opt(IDL.Nat64), - 'max_chunks' : IDL.Opt(IDL.Nat64), - }); - const Permission = IDL.Variant({ - 'Prepare' : IDL.Null, - 'ManagePermissions' : IDL.Null, - 'Commit' : IDL.Null, - }); - const GrantPermission = IDL.Record({ - 'permission' : Permission, - 'to_principal' : IDL.Principal, - }); - const HttpRequest = IDL.Record({ - 'url' : IDL.Text, - 'method' : IDL.Text, - 'body' : IDL.Vec(IDL.Nat8), - 'headers' : IDL.Vec(HeaderField), - 'certificate_version' : IDL.Opt(IDL.Nat16), - }); - const StreamingCallbackToken = IDL.Record({ - 'key' : Key, - 'sha256' : IDL.Opt(IDL.Vec(IDL.Nat8)), - 'index' : IDL.Nat, - 'content_encoding' : IDL.Text, - }); - const StreamingCallbackHttpResponse = IDL.Record({ - 'token' : IDL.Opt(StreamingCallbackToken), - 'body' : IDL.Vec(IDL.Nat8), - }); - const StreamingStrategy = IDL.Variant({ - 'Callback' : IDL.Record({ - 'token' : StreamingCallbackToken, - 'callback' : IDL.Func( - [StreamingCallbackToken], - [IDL.Opt(StreamingCallbackHttpResponse)], - ['query'], - ), - }), - }); - const HttpResponse = IDL.Record({ - 'body' : IDL.Vec(IDL.Nat8), - 'headers' : IDL.Vec(HeaderField), - 'streaming_strategy' : IDL.Opt(StreamingStrategy), - 'status_code' : IDL.Nat16, - }); - const Time = IDL.Int; - const ListPermitted = IDL.Record({ 'permission' : Permission }); - const RevokePermission = IDL.Record({ - 'permission' : Permission, - 'of_principal' : IDL.Principal, - }); - const ValidationResult = IDL.Variant({ 'Ok' : IDL.Text, 'Err' : IDL.Text }); - return IDL.Service({ - 'api_version' : IDL.Func([], [IDL.Nat16], ['query']), - 'authorize' : IDL.Func([IDL.Principal], [], []), - 'certified_tree' : IDL.Func( - [IDL.Record({})], - [ - IDL.Record({ - 'certificate' : IDL.Vec(IDL.Nat8), - 'tree' : IDL.Vec(IDL.Nat8), - }), - ], - ['query'], - ), - 'clear' : IDL.Func([ClearArguments], [], []), - 'commit_batch' : IDL.Func([CommitBatchArguments], [], []), - 'commit_proposed_batch' : IDL.Func([CommitProposedBatchArguments], [], []), - 'compute_evidence' : IDL.Func( - [ComputeEvidenceArguments], - [IDL.Opt(IDL.Vec(IDL.Nat8))], - [], - ), - 'configure' : IDL.Func([ConfigureArguments], [], []), - 'create_asset' : IDL.Func([CreateAssetArguments], [], []), - 'create_batch' : IDL.Func( - [IDL.Record({})], - [IDL.Record({ 'batch_id' : BatchId })], - [], - ), - 'create_chunk' : IDL.Func( - [IDL.Record({ 'content' : IDL.Vec(IDL.Nat8), 'batch_id' : BatchId })], - [IDL.Record({ 'chunk_id' : ChunkId })], - [], - ), - 'deauthorize' : IDL.Func([IDL.Principal], [], []), - 'delete_asset' : IDL.Func([DeleteAssetArguments], [], []), - 'delete_batch' : IDL.Func([DeleteBatchArguments], [], []), - 'get' : IDL.Func( - [IDL.Record({ 'key' : Key, 'accept_encodings' : IDL.Vec(IDL.Text) })], - [ - IDL.Record({ - 'content' : IDL.Vec(IDL.Nat8), - 'sha256' : IDL.Opt(IDL.Vec(IDL.Nat8)), - 'content_type' : IDL.Text, - 'content_encoding' : IDL.Text, - 'total_length' : IDL.Nat, - }), - ], - ['query'], - ), - 'get_asset_properties' : IDL.Func( - [Key], - [ - IDL.Record({ - 'headers' : IDL.Opt(IDL.Vec(HeaderField)), - 'is_aliased' : IDL.Opt(IDL.Bool), - 'allow_raw_access' : IDL.Opt(IDL.Bool), - 'max_age' : IDL.Opt(IDL.Nat64), - }), - ], - ['query'], - ), - 'get_chunk' : IDL.Func( - [ - IDL.Record({ - 'key' : Key, - 'sha256' : IDL.Opt(IDL.Vec(IDL.Nat8)), - 'index' : IDL.Nat, - 'content_encoding' : IDL.Text, - }), - ], - [IDL.Record({ 'content' : IDL.Vec(IDL.Nat8) })], - ['query'], - ), - 'get_configuration' : IDL.Func([], [ConfigurationResponse], []), - 'grant_permission' : IDL.Func([GrantPermission], [], []), - 'http_request' : IDL.Func([HttpRequest], [HttpResponse], ['query']), - 'http_request_streaming_callback' : IDL.Func( - [StreamingCallbackToken], - [IDL.Opt(StreamingCallbackHttpResponse)], - ['query'], - ), - 'list' : IDL.Func( - [IDL.Record({})], - [ - IDL.Vec( - IDL.Record({ - 'key' : Key, - 'encodings' : IDL.Vec( - IDL.Record({ - 'modified' : Time, - 'sha256' : IDL.Opt(IDL.Vec(IDL.Nat8)), - 'length' : IDL.Nat, - 'content_encoding' : IDL.Text, - }) - ), - 'content_type' : IDL.Text, - }) - ), - ], - ['query'], - ), - 'list_authorized' : IDL.Func([], [IDL.Vec(IDL.Principal)], []), - 'list_permitted' : IDL.Func([ListPermitted], [IDL.Vec(IDL.Principal)], []), - 'propose_commit_batch' : IDL.Func([CommitBatchArguments], [], []), - 'revoke_permission' : IDL.Func([RevokePermission], [], []), - 'set_asset_content' : IDL.Func([SetAssetContentArguments], [], []), - 'set_asset_properties' : IDL.Func([SetAssetPropertiesArguments], [], []), - 'store' : IDL.Func( - [ - IDL.Record({ - 'key' : Key, - 'content' : IDL.Vec(IDL.Nat8), - 'sha256' : IDL.Opt(IDL.Vec(IDL.Nat8)), - 'content_type' : IDL.Text, - 'content_encoding' : IDL.Text, - }), - ], - [], - [], - ), - 'take_ownership' : IDL.Func([], [], []), - 'unset_asset_content' : IDL.Func([UnsetAssetContentArguments], [], []), - 'validate_commit_proposed_batch' : IDL.Func( - [CommitProposedBatchArguments], - [ValidationResult], - [], - ), - 'validate_configure' : IDL.Func( - [ConfigureArguments], - [ValidationResult], - [], - ), - 'validate_grant_permission' : IDL.Func( - [GrantPermission], - [ValidationResult], - [], - ), - 'validate_revoke_permission' : IDL.Func( - [RevokePermission], - [ValidationResult], - [], - ), - 'validate_take_ownership' : IDL.Func([], [ValidationResult], []), - }); -}; -export const init = ({ IDL }) => { - const SetPermissions = IDL.Record({ - 'prepare' : IDL.Vec(IDL.Principal), - 'commit' : IDL.Vec(IDL.Principal), - 'manage_permissions' : IDL.Vec(IDL.Principal), - }); - const UpgradeArgs = IDL.Record({ - 'set_permissions' : IDL.Opt(SetPermissions), - }); - const InitArgs = IDL.Record({}); - const AssetCanisterArgs = IDL.Variant({ - 'Upgrade' : UpgradeArgs, - 'Init' : InitArgs, - }); - return [IDL.Opt(AssetCanisterArgs)]; -}; diff --git a/rust/face-recognition/src/declarations/frontend/index.d.ts b/rust/face-recognition/src/declarations/frontend/index.d.ts deleted file mode 100644 index b55074358..000000000 --- a/rust/face-recognition/src/declarations/frontend/index.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -import type { - ActorSubclass, - HttpAgentOptions, - ActorConfig, - Agent, -} from "@dfinity/agent"; -import type { Principal } from "@dfinity/principal"; -import type { IDL } from "@dfinity/candid"; - -import { _SERVICE } from './frontend.did'; - -export declare const idlFactory: IDL.InterfaceFactory; -export declare const canisterId: string; - -export declare interface CreateActorOptions { - /** - * @see {@link Agent} - */ - agent?: Agent; - /** - * @see {@link HttpAgentOptions} - */ - agentOptions?: HttpAgentOptions; - /** - * @see {@link ActorConfig} - */ - actorOptions?: ActorConfig; -} - -/** - * Intializes an {@link ActorSubclass}, configured with the provided SERVICE interface of a canister. - * @constructs {@link ActorSubClass} - * @param {string | Principal} canisterId - ID of the canister the {@link Actor} will talk to - * @param {CreateActorOptions} options - see {@link CreateActorOptions} - * @param {CreateActorOptions["agent"]} options.agent - a pre-configured agent you'd like to use. Supercedes agentOptions - * @param {CreateActorOptions["agentOptions"]} options.agentOptions - options to set up a new agent - * @see {@link HttpAgentOptions} - * @param {CreateActorOptions["actorOptions"]} options.actorOptions - options for the Actor - * @see {@link ActorConfig} - */ -export declare const createActor: ( - canisterId: string | Principal, - options?: CreateActorOptions -) => ActorSubclass<_SERVICE>; - -/** - * Intialized Actor using default settings, ready to talk to a canister using its candid interface - * @constructs {@link ActorSubClass} - */ -export declare const frontend: ActorSubclass<_SERVICE>; diff --git a/rust/face-recognition/src/declarations/frontend/index.js b/rust/face-recognition/src/declarations/frontend/index.js deleted file mode 100644 index c5e4ab186..000000000 --- a/rust/face-recognition/src/declarations/frontend/index.js +++ /dev/null @@ -1,42 +0,0 @@ -import { Actor, HttpAgent } from "@dfinity/agent"; - -// Imports and re-exports candid interface -import { idlFactory } from "./frontend.did.js"; -export { idlFactory } from "./frontend.did.js"; - -/* CANISTER_ID is replaced by webpack based on node environment - * Note: canister environment variable will be standardized as - * process.env.CANISTER_ID_ - * beginning in dfx 0.15.0 - */ -export const canisterId = - process.env.CANISTER_ID_FRONTEND; - -export const createActor = (canisterId, options = {}) => { - const agent = options.agent || new HttpAgent({ ...options.agentOptions }); - - if (options.agent && options.agentOptions) { - console.warn( - "Detected both agent and agentOptions passed to createActor. Ignoring agentOptions and proceeding with the provided agent." - ); - } - - // Fetch root key for certificate validation during development - if (process.env.DFX_NETWORK !== "ic") { - agent.fetchRootKey().catch((err) => { - console.warn( - "Unable to fetch root key. Check to ensure that your local replica is running" - ); - console.error(err); - }); - } - - // Creates an actor with using the candid interface and the HttpAgent - return Actor.createActor(idlFactory, { - agent, - canisterId, - ...options.actorOptions, - }); -}; - -export const frontend = canisterId ? createActor(canisterId) : undefined; diff --git a/rust/image-classification/package-lock.json b/rust/image-classification/package-lock.json index 2f510456c..efe4c07c0 100644 --- a/rust/image-classification/package-lock.json +++ b/rust/image-classification/package-lock.json @@ -8,9 +8,7 @@ "name": "icp_detect", "version": "0.2.0", "dependencies": { - "@dfinity/agent": "^0.18.1", - "@dfinity/candid": "^0.18.1", - "@dfinity/principal": "^0.18.1" + "@icp-sdk/core": "~5.0.0" }, "devDependencies": { "assert": "2.0.0", @@ -31,33 +29,11 @@ "node": "^12 || ^14 || ^16 || ^18 || ^21" } }, - "node_modules/@dfinity/agent": { - "version": "0.18.1", - "resolved": "https://registry.npmjs.org/@dfinity/agent/-/agent-0.18.1.tgz", - "integrity": "sha512-nMFK/y0ZkPfQYECdojmltXsBIdGvXa1Sxa4rDV2cibEq9lsjWMEIUqPsiBaNHuwuz+gzsGVq4N2b9umKQIQaRQ==", - "dependencies": { - "base64-arraybuffer": "^0.2.0", - "borc": "^2.1.1", - "js-sha256": "0.9.0", - "simple-cbor": "^0.4.1" - }, - "peerDependencies": { - "@dfinity/candid": "^0.18.1", - "@dfinity/principal": "^0.18.1" - } - }, - "node_modules/@dfinity/candid": { - "version": "0.18.1", - "resolved": "https://registry.npmjs.org/@dfinity/candid/-/candid-0.18.1.tgz", - "integrity": "sha512-/PC3wDnrGcWhaF/veYKevcAAn5A5jK0mRkVKcz0YxK/a78Ai9wMJg0fUk7aoyZryCOz8JPVgR4nK1/zTmvEBHg==" - }, - "node_modules/@dfinity/principal": { - "version": "0.18.1", - "resolved": "https://registry.npmjs.org/@dfinity/principal/-/principal-0.18.1.tgz", - "integrity": "sha512-xeV+5zV7VQRT2xJTbXW4IDra1urEcchuwuKFTU/ERcJWBWEk8chsZcd6DBc8SPq83xRgXW2ZTVVSOZR8NKaVoQ==", - "dependencies": { - "js-sha256": "^0.9.0" - } + "node_modules/@dfinity/cbor": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@dfinity/cbor/-/cbor-0.2.2.tgz", + "integrity": "sha512-GPJpH73kDEKbUBdUjY80lz7cq9l0vm1h/7ppejPV6O0ZTqCLrYspssYvqjRmK4aNnJ/SKXsP0rg9LYX7zpegaA==", + "license": "Apache-2.0" }, "node_modules/@discoveryjs/json-ext": { "version": "0.5.7", @@ -68,6 +44,20 @@ "node": ">=10.0.0" } }, + "node_modules/@icp-sdk/core": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@icp-sdk/core/-/core-5.0.0.tgz", + "integrity": "sha512-t6iRbdylHG57MicWRpR1uMTFXRW7GCzec6KAg55CBwDHbHLQDKikQ252lmlcEa80DrKa3LPvMKYZEUYjEq5XUQ==", + "license": "Apache-2.0", + "dependencies": { + "@dfinity/cbor": "^0.2.2", + "@noble/curves": "^1.9.2", + "@noble/hashes": "^1.8.0", + "@scure/bip32": "^1.7.0", + "@scure/bip39": "^1.6.0", + "asn1js": "^3.0.5" + } + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", @@ -132,6 +122,33 @@ "integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==", "dev": true }, + "node_modules/@noble/curves": { + "version": "1.9.7", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.9.7.tgz", + "integrity": "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "1.8.0" + }, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/hashes": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", + "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==", + "license": "MIT", + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -167,6 +184,42 @@ "node": ">= 8" } }, + "node_modules/@scure/base": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.2.6.tgz", + "integrity": "sha512-g/nm5FgUa//MCj1gV09zTJTaM6KBAHqLN907YVQqf7zC49+DcO4B1so4ZX07Ef10Twr6nuqYEH9GEggFXA4Fmg==", + "license": "MIT", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip32": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.7.0.tgz", + "integrity": "sha512-E4FFX/N3f4B80AKWp5dP6ow+flD1LQZo/w8UnLGYZO674jS6YnYeepycOOksv+vLPSpgN35wgKgy+ybfTb2SMw==", + "license": "MIT", + "dependencies": { + "@noble/curves": "~1.9.0", + "@noble/hashes": "~1.8.0", + "@scure/base": "~1.2.5" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip39": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.6.0.tgz", + "integrity": "sha512-+lF0BbLiJNwVlev4eKelw1WWLaiKXw7sSl8T6FvBlWkdX+94aGJ4o8XjUdlyhTCjd8c+B3KT3JfS8P0bLRNU6A==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "~1.8.0", + "@scure/base": "~1.2.5" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@types/body-parser": { "version": "1.19.5", "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz", @@ -584,6 +637,7 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", "dev": true, + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -605,6 +659,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", "dev": true, + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", @@ -685,6 +740,20 @@ "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==", "dev": true }, + "node_modules/asn1js": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-3.0.7.tgz", + "integrity": "sha512-uLvq6KJu04qoQM6gvBfKFjlh6Gl0vOKQuR5cJMDHQkmwfMOQeN3F3SHCv9SNYSL+CRoHvOGFfllDlVz03GQjvQ==", + "license": "BSD-3-Clause", + "dependencies": { + "pvtsutils": "^1.3.6", + "pvutils": "^1.1.3", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/assert": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/assert/-/assert-2.0.0.tgz", @@ -715,18 +784,11 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, - "node_modules/base64-arraybuffer": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.2.0.tgz", - "integrity": "sha512-7emyCsu1/xiBXgQZrscw/8KPRT44I4Yq9Pe6EGs3aPRTsWuggML1/1DTuZUuIaJPIm1FTDUVXl4x/yW8s0kQDQ==", - "engines": { - "node": ">= 0.6.0" - } - }, "node_modules/base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, "funding": [ { "type": "github", @@ -748,14 +810,6 @@ "integrity": "sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==", "dev": true }, - "node_modules/bignumber.js": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", - "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==", - "engines": { - "node": "*" - } - }, "node_modules/binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -816,46 +870,6 @@ "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", "dev": true }, - "node_modules/borc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/borc/-/borc-2.1.2.tgz", - "integrity": "sha512-Sy9eoUi4OiKzq7VovMn246iTo17kzuyHJKomCfpWMlI6RpfN1gk95w7d7gH264nApVLg0HZfcpz62/g4VH1Y4w==", - "dependencies": { - "bignumber.js": "^9.0.0", - "buffer": "^5.5.0", - "commander": "^2.15.0", - "ieee754": "^1.1.13", - "iso-url": "~0.4.7", - "json-text-sequence": "~0.1.0", - "readable-stream": "^3.6.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/borc/node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -897,6 +911,7 @@ "url": "https://github.com/sponsors/ai" } ], + "peer": true, "dependencies": { "caniuse-lite": "^1.0.30001565", "electron-to-chromium": "^1.4.601", @@ -1081,7 +1096,8 @@ "node_modules/commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true }, "node_modules/compressible": { "version": "2.0.18", @@ -1306,11 +1322,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/delimit-stream": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/delimit-stream/-/delimit-stream-0.1.0.tgz", - "integrity": "sha512-a02fiQ7poS5CnjiJBAsjGLPp5EwVoGHNeu9sziBd9huppRfsAFIpv5zNLv0V1gbop53ilngAf5Kf331AwcoRBQ==" - }, "node_modules/depd": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", @@ -2311,6 +2322,7 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, "funding": [ { "type": "github", @@ -2367,7 +2379,8 @@ "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true }, "node_modules/interpret": { "version": "2.2.0", @@ -2590,14 +2603,6 @@ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true }, - "node_modules/iso-url": { - "version": "0.4.7", - "resolved": "https://registry.npmjs.org/iso-url/-/iso-url-0.4.7.tgz", - "integrity": "sha512-27fFRDnPAMnHGLq36bWTpKET+eiXct3ENlCcdcMdk+mjXrb2kw3mhBUg1B7ewAC0kVzlOPhADzQgz1SE6Tglog==", - "engines": { - "node": ">=10" - } - }, "node_modules/isobject": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", @@ -2621,11 +2626,6 @@ "node": ">= 10.13.0" } }, - "node_modules/js-sha256": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/js-sha256/-/js-sha256-0.9.0.tgz", - "integrity": "sha512-sga3MHh9sgQN2+pJ9VYZ+1LPwXOxuBJBA5nrR5/ofPfuiJBE2hnjsaN8se8JznOmGLN2p49Pe5U/ttafcs/apA==" - }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", @@ -2638,14 +2638,6 @@ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "dev": true }, - "node_modules/json-text-sequence": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/json-text-sequence/-/json-text-sequence-0.1.1.tgz", - "integrity": "sha512-L3mEegEWHRekSHjc7+sc8eJhba9Clq1PZ8kMkzf8OxElhXc8O4TS5MwcVlj9aEbm5dr81N90WHC5nAz3UO971w==", - "dependencies": { - "delimit-stream": "0.1.0" - } - }, "node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -3231,6 +3223,24 @@ "node": ">=6" } }, + "node_modules/pvtsutils": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.6.tgz", + "integrity": "sha512-PLgQXQ6H2FWCaeRak8vvk1GW462lMxB5s3Jm673N82zI4vqtVUPuZdffdZbPDFRoU8kAhItWFtPCWiPpp4/EDg==", + "license": "MIT", + "dependencies": { + "tslib": "^2.8.1" + } + }, + "node_modules/pvutils": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/pvutils/-/pvutils-1.1.5.tgz", + "integrity": "sha512-KTqnxsgGiQ6ZAzZCVlJH5eOjSnvlyEgx1m8bkRJfOhmGRqfo5KLvmAlACQkrjEtOQ4B7wF9TdSLIs9O90MX9xA==", + "license": "MIT", + "engines": { + "node": ">=16.0.0" + } + }, "node_modules/qs": { "version": "6.11.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", @@ -3312,6 +3322,7 @@ "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -3481,6 +3492,7 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, "funding": [ { "type": "github", @@ -3746,11 +3758,6 @@ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, - "node_modules/simple-cbor": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/simple-cbor/-/simple-cbor-0.4.1.tgz", - "integrity": "sha512-rijcxtwx2b4Bje3sqeIqw5EeW7UlOIC4YfOdwqIKacpvRQ/D78bWg/4/0m5e0U91oKvlGh7LlJuZCu07ISCC7w==" - }, "node_modules/slash": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", @@ -3892,6 +3899,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, "dependencies": { "safe-buffer": "~5.2.0" } @@ -4010,6 +4018,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -4082,10 +4091,10 @@ } }, "node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", - "dev": true + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" }, "node_modules/type-is": { "version": "1.6.18", @@ -4171,7 +4180,8 @@ "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true }, "node_modules/utila": { "version": "0.4.0", @@ -4233,6 +4243,7 @@ "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.89.0.tgz", "integrity": "sha512-qyfIC10pOr70V+jkmud8tMfajraGCZMBWJtrmuBymQKCrLTRejBI8STDp1MCyZu/QTdZSeacCQYpYNQVOzX5kw==", "dev": true, + "peer": true, "dependencies": { "@types/eslint-scope": "^3.7.3", "@types/estree": "^1.0.0", @@ -4280,6 +4291,7 @@ "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.10.0.tgz", "integrity": "sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==", "dev": true, + "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", @@ -4441,6 +4453,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", diff --git a/rust/image-classification/package.json b/rust/image-classification/package.json index dba7e5e46..50fb98e51 100644 --- a/rust/image-classification/package.json +++ b/rust/image-classification/package.json @@ -17,9 +17,7 @@ "generate": "dfx generate backend" }, "dependencies": { - "@dfinity/agent": "^2.1.3", - "@dfinity/candid": "^2.1.3", - "@dfinity/principal": "^2.1.3" + "@icp-sdk/core": "~5.0.0" }, "devDependencies": { "assert": "2.0.0", @@ -45,4 +43,4 @@ "last 2 safari version", "last 2 edge version" ] -} \ No newline at end of file +} diff --git a/rust/image-classification/src/declarations/backend/backend.did.d.ts b/rust/image-classification/src/declarations/backend/backend.did.d.ts index 586f72b78..22ef015c9 100644 --- a/rust/image-classification/src/declarations/backend/backend.did.d.ts +++ b/rust/image-classification/src/declarations/backend/backend.did.d.ts @@ -1,6 +1,6 @@ -import type { Principal } from '@dfinity/principal'; -import type { ActorMethod } from '@dfinity/agent'; -import type { IDL } from '@dfinity/candid'; +import type { Principal } from '@icp-sdk/core/principal'; +import type { ActorMethod } from '@icp-sdk/core/agent'; +import type { IDL } from '@icp-sdk/core/candid'; export interface Classification { 'label' : string, 'score' : number } export interface ClassificationError { 'message' : string } diff --git a/rust/image-classification/src/declarations/backend/index.d.ts b/rust/image-classification/src/declarations/backend/index.d.ts index 55daa14e7..27c1ab6cb 100644 --- a/rust/image-classification/src/declarations/backend/index.d.ts +++ b/rust/image-classification/src/declarations/backend/index.d.ts @@ -3,9 +3,9 @@ import type { HttpAgentOptions, ActorConfig, Agent, -} from "@dfinity/agent"; -import type { Principal } from "@dfinity/principal"; -import type { IDL } from "@dfinity/candid"; +} from "@icp-sdk/core/agent"; +import type { Principal } from "@icp-sdk/core/principal"; +import type { IDL } from "@icp-sdk/core/candid"; import { _SERVICE } from './backend.did'; diff --git a/rust/image-classification/src/declarations/backend/index.js b/rust/image-classification/src/declarations/backend/index.js index 8def37967..4e6d33069 100644 --- a/rust/image-classification/src/declarations/backend/index.js +++ b/rust/image-classification/src/declarations/backend/index.js @@ -1,4 +1,4 @@ -import { Actor, HttpAgent } from "@dfinity/agent"; +import { Actor, HttpAgent } from "@icp-sdk/core/agent"; // Imports and re-exports candid interface import { idlFactory } from "./backend.did.js"; diff --git a/rust/image-classification/src/declarations/frontend/frontend.did b/rust/image-classification/src/declarations/frontend/frontend.did deleted file mode 100644 index 51bb1a235..000000000 --- a/rust/image-classification/src/declarations/frontend/frontend.did +++ /dev/null @@ -1,262 +0,0 @@ -type BatchId = nat; -type ChunkId = nat; -type Key = text; -type Time = int; - -type CreateAssetArguments = record { - key: Key; - content_type: text; - max_age: opt nat64; - headers: opt vec HeaderField; - enable_aliasing: opt bool; - allow_raw_access: opt bool; -}; - -// Add or change content for an asset, by content encoding -type SetAssetContentArguments = record { - key: Key; - content_encoding: text; - chunk_ids: vec ChunkId; - sha256: opt blob; -}; - -// Remove content for an asset, by content encoding -type UnsetAssetContentArguments = record { - key: Key; - content_encoding: text; -}; - -// Delete an asset -type DeleteAssetArguments = record { - key: Key; -}; - -// Reset everything -type ClearArguments = record {}; - -type BatchOperationKind = variant { - CreateAsset: CreateAssetArguments; - SetAssetContent: SetAssetContentArguments; - - SetAssetProperties: SetAssetPropertiesArguments; - - UnsetAssetContent: UnsetAssetContentArguments; - DeleteAsset: DeleteAssetArguments; - - Clear: ClearArguments; -}; - -type CommitBatchArguments = record { - batch_id: BatchId; - operations: vec BatchOperationKind -}; - -type CommitProposedBatchArguments = record { - batch_id: BatchId; - evidence: blob; -}; - -type ComputeEvidenceArguments = record { - batch_id: BatchId; - max_iterations: opt nat16 -}; - -type DeleteBatchArguments = record { - batch_id: BatchId; -}; - -type HeaderField = record { text; text; }; - -type HttpRequest = record { - method: text; - url: text; - headers: vec HeaderField; - body: blob; - certificate_version: opt nat16; -}; - -type HttpResponse = record { - status_code: nat16; - headers: vec HeaderField; - body: blob; - streaming_strategy: opt StreamingStrategy; -}; - -type StreamingCallbackHttpResponse = record { - body: blob; - token: opt StreamingCallbackToken; -}; - -type StreamingCallbackToken = record { - key: Key; - content_encoding: text; - index: nat; - sha256: opt blob; -}; - -type StreamingStrategy = variant { - Callback: record { - callback: func (StreamingCallbackToken) -> (opt StreamingCallbackHttpResponse) query; - token: StreamingCallbackToken; - }; -}; - -type SetAssetPropertiesArguments = record { - key: Key; - max_age: opt opt nat64; - headers: opt opt vec HeaderField; - allow_raw_access: opt opt bool; - is_aliased: opt opt bool; -}; - -type ConfigurationResponse = record { - max_batches: opt nat64; - max_chunks: opt nat64; - max_bytes: opt nat64; -}; - -type ConfigureArguments = record { - max_batches: opt opt nat64; - max_chunks: opt opt nat64; - max_bytes: opt opt nat64; -}; - -type Permission = variant { - Commit; - ManagePermissions; - Prepare; -}; - -type GrantPermission = record { - to_principal: principal; - permission: Permission; -}; -type RevokePermission = record { - of_principal: principal; - permission: Permission; -}; -type ListPermitted = record { permission: Permission }; - -type ValidationResult = variant { Ok : text; Err : text }; - -type AssetCanisterArgs = variant { - Init: InitArgs; - Upgrade: UpgradeArgs; -}; - -type InitArgs = record {}; - -type UpgradeArgs = record { - set_permissions: opt SetPermissions; -}; - -/// Sets the list of principals granted each permission. -type SetPermissions = record { - prepare: vec principal; - commit: vec principal; - manage_permissions: vec principal; -}; - -service: (asset_canister_args: opt AssetCanisterArgs) -> { - api_version: () -> (nat16) query; - - get: (record { - key: Key; - accept_encodings: vec text; - }) -> (record { - content: blob; // may be the entirety of the content, or just chunk index 0 - content_type: text; - content_encoding: text; - sha256: opt blob; // sha256 of entire asset encoding, calculated by dfx and passed in SetAssetContentArguments - total_length: nat; // all chunks except last have size == content.size() - }) query; - - // if get() returned chunks > 1, call this to retrieve them. - // chunks may or may not be split up at the same boundaries as presented to create_chunk(). - get_chunk: (record { - key: Key; - content_encoding: text; - index: nat; - sha256: opt blob; // sha256 of entire asset encoding, calculated by dfx and passed in SetAssetContentArguments - }) -> (record { content: blob }) query; - - list : (record {}) -> (vec record { - key: Key; - content_type: text; - encodings: vec record { - content_encoding: text; - sha256: opt blob; // sha256 of entire asset encoding, calculated by dfx and passed in SetAssetContentArguments - length: nat; // Size of this encoding's blob. Calculated when uploading assets. - modified: Time; - }; - }) query; - - certified_tree : (record {}) -> (record { - certificate: blob; - tree: blob; - }) query; - - create_batch : (record {}) -> (record { batch_id: BatchId }); - - create_chunk: (record { batch_id: BatchId; content: blob }) -> (record { chunk_id: ChunkId }); - - // Perform all operations successfully, or reject - commit_batch: (CommitBatchArguments) -> (); - - // Save the batch operations for later commit - propose_commit_batch: (CommitBatchArguments) -> (); - - // Given a batch already proposed, perform all operations successfully, or reject - commit_proposed_batch: (CommitProposedBatchArguments) -> (); - - // Compute a hash over the CommitBatchArguments. Call until it returns Some(evidence). - compute_evidence: (ComputeEvidenceArguments) -> (opt blob); - - // Delete a batch that has been created, or proposed for commit, but not yet committed - delete_batch: (DeleteBatchArguments) -> (); - - create_asset: (CreateAssetArguments) -> (); - set_asset_content: (SetAssetContentArguments) -> (); - unset_asset_content: (UnsetAssetContentArguments) -> (); - - delete_asset: (DeleteAssetArguments) -> (); - - clear: (ClearArguments) -> (); - - // Single call to create an asset with content for a single content encoding that - // fits within the message ingress limit. - store: (record { - key: Key; - content_type: text; - content_encoding: text; - content: blob; - sha256: opt blob - }) -> (); - - http_request: (request: HttpRequest) -> (HttpResponse) query; - http_request_streaming_callback: (token: StreamingCallbackToken) -> (opt StreamingCallbackHttpResponse) query; - - authorize: (principal) -> (); - deauthorize: (principal) -> (); - list_authorized: () -> (vec principal); - grant_permission: (GrantPermission) -> (); - revoke_permission: (RevokePermission) -> (); - list_permitted: (ListPermitted) -> (vec principal); - take_ownership: () -> (); - - get_asset_properties : (key: Key) -> (record { - max_age: opt nat64; - headers: opt vec HeaderField; - allow_raw_access: opt bool; - is_aliased: opt bool; } ) query; - set_asset_properties: (SetAssetPropertiesArguments) -> (); - - get_configuration: () -> (ConfigurationResponse); - configure: (ConfigureArguments) -> (); - - validate_grant_permission: (GrantPermission) -> (ValidationResult); - validate_revoke_permission: (RevokePermission) -> (ValidationResult); - validate_take_ownership: () -> (ValidationResult); - validate_commit_proposed_batch: (CommitProposedBatchArguments) -> (ValidationResult); - validate_configure: (ConfigureArguments) -> (ValidationResult); -} diff --git a/rust/image-classification/src/declarations/frontend/frontend.did.d.ts b/rust/image-classification/src/declarations/frontend/frontend.did.d.ts deleted file mode 100644 index ce964689f..000000000 --- a/rust/image-classification/src/declarations/frontend/frontend.did.d.ts +++ /dev/null @@ -1,240 +0,0 @@ -import type { Principal } from '@dfinity/principal'; -import type { ActorMethod } from '@dfinity/agent'; -import type { IDL } from '@dfinity/candid'; - -export type AssetCanisterArgs = { 'Upgrade' : UpgradeArgs } | - { 'Init' : InitArgs }; -export type BatchId = bigint; -export type BatchOperationKind = { - 'SetAssetProperties' : SetAssetPropertiesArguments - } | - { 'CreateAsset' : CreateAssetArguments } | - { 'UnsetAssetContent' : UnsetAssetContentArguments } | - { 'DeleteAsset' : DeleteAssetArguments } | - { 'SetAssetContent' : SetAssetContentArguments } | - { 'Clear' : ClearArguments }; -export type ChunkId = bigint; -export type ClearArguments = {}; -export interface CommitBatchArguments { - 'batch_id' : BatchId, - 'operations' : Array, -} -export interface CommitProposedBatchArguments { - 'batch_id' : BatchId, - 'evidence' : Uint8Array | number[], -} -export interface ComputeEvidenceArguments { - 'batch_id' : BatchId, - 'max_iterations' : [] | [number], -} -export interface ConfigurationResponse { - 'max_batches' : [] | [bigint], - 'max_bytes' : [] | [bigint], - 'max_chunks' : [] | [bigint], -} -export interface ConfigureArguments { - 'max_batches' : [] | [[] | [bigint]], - 'max_bytes' : [] | [[] | [bigint]], - 'max_chunks' : [] | [[] | [bigint]], -} -export interface CreateAssetArguments { - 'key' : Key, - 'content_type' : string, - 'headers' : [] | [Array], - 'allow_raw_access' : [] | [boolean], - 'max_age' : [] | [bigint], - 'enable_aliasing' : [] | [boolean], -} -export interface DeleteAssetArguments { 'key' : Key } -export interface DeleteBatchArguments { 'batch_id' : BatchId } -export interface GrantPermission { - 'permission' : Permission, - 'to_principal' : Principal, -} -export type HeaderField = [string, string]; -export interface HttpRequest { - 'url' : string, - 'method' : string, - 'body' : Uint8Array | number[], - 'headers' : Array, - 'certificate_version' : [] | [number], -} -export interface HttpResponse { - 'body' : Uint8Array | number[], - 'headers' : Array, - 'streaming_strategy' : [] | [StreamingStrategy], - 'status_code' : number, -} -export type InitArgs = {}; -export type Key = string; -export interface ListPermitted { 'permission' : Permission } -export type Permission = { 'Prepare' : null } | - { 'ManagePermissions' : null } | - { 'Commit' : null }; -export interface RevokePermission { - 'permission' : Permission, - 'of_principal' : Principal, -} -export interface SetAssetContentArguments { - 'key' : Key, - 'sha256' : [] | [Uint8Array | number[]], - 'chunk_ids' : Array, - 'content_encoding' : string, -} -export interface SetAssetPropertiesArguments { - 'key' : Key, - 'headers' : [] | [[] | [Array]], - 'is_aliased' : [] | [[] | [boolean]], - 'allow_raw_access' : [] | [[] | [boolean]], - 'max_age' : [] | [[] | [bigint]], -} -export interface SetPermissions { - 'prepare' : Array, - 'commit' : Array, - 'manage_permissions' : Array, -} -export interface StreamingCallbackHttpResponse { - 'token' : [] | [StreamingCallbackToken], - 'body' : Uint8Array | number[], -} -export interface StreamingCallbackToken { - 'key' : Key, - 'sha256' : [] | [Uint8Array | number[]], - 'index' : bigint, - 'content_encoding' : string, -} -export type StreamingStrategy = { - 'Callback' : { - 'token' : StreamingCallbackToken, - 'callback' : [Principal, string], - } - }; -export type Time = bigint; -export interface UnsetAssetContentArguments { - 'key' : Key, - 'content_encoding' : string, -} -export interface UpgradeArgs { 'set_permissions' : [] | [SetPermissions] } -export type ValidationResult = { 'Ok' : string } | - { 'Err' : string }; -export interface _SERVICE { - 'api_version' : ActorMethod<[], number>, - 'authorize' : ActorMethod<[Principal], undefined>, - 'certified_tree' : ActorMethod< - [{}], - { 'certificate' : Uint8Array | number[], 'tree' : Uint8Array | number[] } - >, - 'clear' : ActorMethod<[ClearArguments], undefined>, - 'commit_batch' : ActorMethod<[CommitBatchArguments], undefined>, - 'commit_proposed_batch' : ActorMethod< - [CommitProposedBatchArguments], - undefined - >, - 'compute_evidence' : ActorMethod< - [ComputeEvidenceArguments], - [] | [Uint8Array | number[]] - >, - 'configure' : ActorMethod<[ConfigureArguments], undefined>, - 'create_asset' : ActorMethod<[CreateAssetArguments], undefined>, - 'create_batch' : ActorMethod<[{}], { 'batch_id' : BatchId }>, - 'create_chunk' : ActorMethod< - [{ 'content' : Uint8Array | number[], 'batch_id' : BatchId }], - { 'chunk_id' : ChunkId } - >, - 'deauthorize' : ActorMethod<[Principal], undefined>, - 'delete_asset' : ActorMethod<[DeleteAssetArguments], undefined>, - 'delete_batch' : ActorMethod<[DeleteBatchArguments], undefined>, - 'get' : ActorMethod< - [{ 'key' : Key, 'accept_encodings' : Array }], - { - 'content' : Uint8Array | number[], - 'sha256' : [] | [Uint8Array | number[]], - 'content_type' : string, - 'content_encoding' : string, - 'total_length' : bigint, - } - >, - 'get_asset_properties' : ActorMethod< - [Key], - { - 'headers' : [] | [Array], - 'is_aliased' : [] | [boolean], - 'allow_raw_access' : [] | [boolean], - 'max_age' : [] | [bigint], - } - >, - 'get_chunk' : ActorMethod< - [ - { - 'key' : Key, - 'sha256' : [] | [Uint8Array | number[]], - 'index' : bigint, - 'content_encoding' : string, - }, - ], - { 'content' : Uint8Array | number[] } - >, - 'get_configuration' : ActorMethod<[], ConfigurationResponse>, - 'grant_permission' : ActorMethod<[GrantPermission], undefined>, - 'http_request' : ActorMethod<[HttpRequest], HttpResponse>, - 'http_request_streaming_callback' : ActorMethod< - [StreamingCallbackToken], - [] | [StreamingCallbackHttpResponse] - >, - 'list' : ActorMethod< - [{}], - Array< - { - 'key' : Key, - 'encodings' : Array< - { - 'modified' : Time, - 'sha256' : [] | [Uint8Array | number[]], - 'length' : bigint, - 'content_encoding' : string, - } - >, - 'content_type' : string, - } - > - >, - 'list_authorized' : ActorMethod<[], Array>, - 'list_permitted' : ActorMethod<[ListPermitted], Array>, - 'propose_commit_batch' : ActorMethod<[CommitBatchArguments], undefined>, - 'revoke_permission' : ActorMethod<[RevokePermission], undefined>, - 'set_asset_content' : ActorMethod<[SetAssetContentArguments], undefined>, - 'set_asset_properties' : ActorMethod< - [SetAssetPropertiesArguments], - undefined - >, - 'store' : ActorMethod< - [ - { - 'key' : Key, - 'content' : Uint8Array | number[], - 'sha256' : [] | [Uint8Array | number[]], - 'content_type' : string, - 'content_encoding' : string, - }, - ], - undefined - >, - 'take_ownership' : ActorMethod<[], undefined>, - 'unset_asset_content' : ActorMethod<[UnsetAssetContentArguments], undefined>, - 'validate_commit_proposed_batch' : ActorMethod< - [CommitProposedBatchArguments], - ValidationResult - >, - 'validate_configure' : ActorMethod<[ConfigureArguments], ValidationResult>, - 'validate_grant_permission' : ActorMethod< - [GrantPermission], - ValidationResult - >, - 'validate_revoke_permission' : ActorMethod< - [RevokePermission], - ValidationResult - >, - 'validate_take_ownership' : ActorMethod<[], ValidationResult>, -} -export declare const idlFactory: IDL.InterfaceFactory; -export declare const init: (args: { IDL: typeof IDL }) => IDL.Type[]; diff --git a/rust/image-classification/src/declarations/frontend/frontend.did.js b/rust/image-classification/src/declarations/frontend/frontend.did.js deleted file mode 100644 index b68ea4a42..000000000 --- a/rust/image-classification/src/declarations/frontend/frontend.did.js +++ /dev/null @@ -1,286 +0,0 @@ -export const idlFactory = ({ IDL }) => { - const SetPermissions = IDL.Record({ - 'prepare' : IDL.Vec(IDL.Principal), - 'commit' : IDL.Vec(IDL.Principal), - 'manage_permissions' : IDL.Vec(IDL.Principal), - }); - const UpgradeArgs = IDL.Record({ - 'set_permissions' : IDL.Opt(SetPermissions), - }); - const InitArgs = IDL.Record({}); - const AssetCanisterArgs = IDL.Variant({ - 'Upgrade' : UpgradeArgs, - 'Init' : InitArgs, - }); - const ClearArguments = IDL.Record({}); - const BatchId = IDL.Nat; - const Key = IDL.Text; - const HeaderField = IDL.Tuple(IDL.Text, IDL.Text); - const SetAssetPropertiesArguments = IDL.Record({ - 'key' : Key, - 'headers' : IDL.Opt(IDL.Opt(IDL.Vec(HeaderField))), - 'is_aliased' : IDL.Opt(IDL.Opt(IDL.Bool)), - 'allow_raw_access' : IDL.Opt(IDL.Opt(IDL.Bool)), - 'max_age' : IDL.Opt(IDL.Opt(IDL.Nat64)), - }); - const CreateAssetArguments = IDL.Record({ - 'key' : Key, - 'content_type' : IDL.Text, - 'headers' : IDL.Opt(IDL.Vec(HeaderField)), - 'allow_raw_access' : IDL.Opt(IDL.Bool), - 'max_age' : IDL.Opt(IDL.Nat64), - 'enable_aliasing' : IDL.Opt(IDL.Bool), - }); - const UnsetAssetContentArguments = IDL.Record({ - 'key' : Key, - 'content_encoding' : IDL.Text, - }); - const DeleteAssetArguments = IDL.Record({ 'key' : Key }); - const ChunkId = IDL.Nat; - const SetAssetContentArguments = IDL.Record({ - 'key' : Key, - 'sha256' : IDL.Opt(IDL.Vec(IDL.Nat8)), - 'chunk_ids' : IDL.Vec(ChunkId), - 'content_encoding' : IDL.Text, - }); - const BatchOperationKind = IDL.Variant({ - 'SetAssetProperties' : SetAssetPropertiesArguments, - 'CreateAsset' : CreateAssetArguments, - 'UnsetAssetContent' : UnsetAssetContentArguments, - 'DeleteAsset' : DeleteAssetArguments, - 'SetAssetContent' : SetAssetContentArguments, - 'Clear' : ClearArguments, - }); - const CommitBatchArguments = IDL.Record({ - 'batch_id' : BatchId, - 'operations' : IDL.Vec(BatchOperationKind), - }); - const CommitProposedBatchArguments = IDL.Record({ - 'batch_id' : BatchId, - 'evidence' : IDL.Vec(IDL.Nat8), - }); - const ComputeEvidenceArguments = IDL.Record({ - 'batch_id' : BatchId, - 'max_iterations' : IDL.Opt(IDL.Nat16), - }); - const ConfigureArguments = IDL.Record({ - 'max_batches' : IDL.Opt(IDL.Opt(IDL.Nat64)), - 'max_bytes' : IDL.Opt(IDL.Opt(IDL.Nat64)), - 'max_chunks' : IDL.Opt(IDL.Opt(IDL.Nat64)), - }); - const DeleteBatchArguments = IDL.Record({ 'batch_id' : BatchId }); - const ConfigurationResponse = IDL.Record({ - 'max_batches' : IDL.Opt(IDL.Nat64), - 'max_bytes' : IDL.Opt(IDL.Nat64), - 'max_chunks' : IDL.Opt(IDL.Nat64), - }); - const Permission = IDL.Variant({ - 'Prepare' : IDL.Null, - 'ManagePermissions' : IDL.Null, - 'Commit' : IDL.Null, - }); - const GrantPermission = IDL.Record({ - 'permission' : Permission, - 'to_principal' : IDL.Principal, - }); - const HttpRequest = IDL.Record({ - 'url' : IDL.Text, - 'method' : IDL.Text, - 'body' : IDL.Vec(IDL.Nat8), - 'headers' : IDL.Vec(HeaderField), - 'certificate_version' : IDL.Opt(IDL.Nat16), - }); - const StreamingCallbackToken = IDL.Record({ - 'key' : Key, - 'sha256' : IDL.Opt(IDL.Vec(IDL.Nat8)), - 'index' : IDL.Nat, - 'content_encoding' : IDL.Text, - }); - const StreamingCallbackHttpResponse = IDL.Record({ - 'token' : IDL.Opt(StreamingCallbackToken), - 'body' : IDL.Vec(IDL.Nat8), - }); - const StreamingStrategy = IDL.Variant({ - 'Callback' : IDL.Record({ - 'token' : StreamingCallbackToken, - 'callback' : IDL.Func( - [StreamingCallbackToken], - [IDL.Opt(StreamingCallbackHttpResponse)], - ['query'], - ), - }), - }); - const HttpResponse = IDL.Record({ - 'body' : IDL.Vec(IDL.Nat8), - 'headers' : IDL.Vec(HeaderField), - 'streaming_strategy' : IDL.Opt(StreamingStrategy), - 'status_code' : IDL.Nat16, - }); - const Time = IDL.Int; - const ListPermitted = IDL.Record({ 'permission' : Permission }); - const RevokePermission = IDL.Record({ - 'permission' : Permission, - 'of_principal' : IDL.Principal, - }); - const ValidationResult = IDL.Variant({ 'Ok' : IDL.Text, 'Err' : IDL.Text }); - return IDL.Service({ - 'api_version' : IDL.Func([], [IDL.Nat16], ['query']), - 'authorize' : IDL.Func([IDL.Principal], [], []), - 'certified_tree' : IDL.Func( - [IDL.Record({})], - [ - IDL.Record({ - 'certificate' : IDL.Vec(IDL.Nat8), - 'tree' : IDL.Vec(IDL.Nat8), - }), - ], - ['query'], - ), - 'clear' : IDL.Func([ClearArguments], [], []), - 'commit_batch' : IDL.Func([CommitBatchArguments], [], []), - 'commit_proposed_batch' : IDL.Func([CommitProposedBatchArguments], [], []), - 'compute_evidence' : IDL.Func( - [ComputeEvidenceArguments], - [IDL.Opt(IDL.Vec(IDL.Nat8))], - [], - ), - 'configure' : IDL.Func([ConfigureArguments], [], []), - 'create_asset' : IDL.Func([CreateAssetArguments], [], []), - 'create_batch' : IDL.Func( - [IDL.Record({})], - [IDL.Record({ 'batch_id' : BatchId })], - [], - ), - 'create_chunk' : IDL.Func( - [IDL.Record({ 'content' : IDL.Vec(IDL.Nat8), 'batch_id' : BatchId })], - [IDL.Record({ 'chunk_id' : ChunkId })], - [], - ), - 'deauthorize' : IDL.Func([IDL.Principal], [], []), - 'delete_asset' : IDL.Func([DeleteAssetArguments], [], []), - 'delete_batch' : IDL.Func([DeleteBatchArguments], [], []), - 'get' : IDL.Func( - [IDL.Record({ 'key' : Key, 'accept_encodings' : IDL.Vec(IDL.Text) })], - [ - IDL.Record({ - 'content' : IDL.Vec(IDL.Nat8), - 'sha256' : IDL.Opt(IDL.Vec(IDL.Nat8)), - 'content_type' : IDL.Text, - 'content_encoding' : IDL.Text, - 'total_length' : IDL.Nat, - }), - ], - ['query'], - ), - 'get_asset_properties' : IDL.Func( - [Key], - [ - IDL.Record({ - 'headers' : IDL.Opt(IDL.Vec(HeaderField)), - 'is_aliased' : IDL.Opt(IDL.Bool), - 'allow_raw_access' : IDL.Opt(IDL.Bool), - 'max_age' : IDL.Opt(IDL.Nat64), - }), - ], - ['query'], - ), - 'get_chunk' : IDL.Func( - [ - IDL.Record({ - 'key' : Key, - 'sha256' : IDL.Opt(IDL.Vec(IDL.Nat8)), - 'index' : IDL.Nat, - 'content_encoding' : IDL.Text, - }), - ], - [IDL.Record({ 'content' : IDL.Vec(IDL.Nat8) })], - ['query'], - ), - 'get_configuration' : IDL.Func([], [ConfigurationResponse], []), - 'grant_permission' : IDL.Func([GrantPermission], [], []), - 'http_request' : IDL.Func([HttpRequest], [HttpResponse], ['query']), - 'http_request_streaming_callback' : IDL.Func( - [StreamingCallbackToken], - [IDL.Opt(StreamingCallbackHttpResponse)], - ['query'], - ), - 'list' : IDL.Func( - [IDL.Record({})], - [ - IDL.Vec( - IDL.Record({ - 'key' : Key, - 'encodings' : IDL.Vec( - IDL.Record({ - 'modified' : Time, - 'sha256' : IDL.Opt(IDL.Vec(IDL.Nat8)), - 'length' : IDL.Nat, - 'content_encoding' : IDL.Text, - }) - ), - 'content_type' : IDL.Text, - }) - ), - ], - ['query'], - ), - 'list_authorized' : IDL.Func([], [IDL.Vec(IDL.Principal)], []), - 'list_permitted' : IDL.Func([ListPermitted], [IDL.Vec(IDL.Principal)], []), - 'propose_commit_batch' : IDL.Func([CommitBatchArguments], [], []), - 'revoke_permission' : IDL.Func([RevokePermission], [], []), - 'set_asset_content' : IDL.Func([SetAssetContentArguments], [], []), - 'set_asset_properties' : IDL.Func([SetAssetPropertiesArguments], [], []), - 'store' : IDL.Func( - [ - IDL.Record({ - 'key' : Key, - 'content' : IDL.Vec(IDL.Nat8), - 'sha256' : IDL.Opt(IDL.Vec(IDL.Nat8)), - 'content_type' : IDL.Text, - 'content_encoding' : IDL.Text, - }), - ], - [], - [], - ), - 'take_ownership' : IDL.Func([], [], []), - 'unset_asset_content' : IDL.Func([UnsetAssetContentArguments], [], []), - 'validate_commit_proposed_batch' : IDL.Func( - [CommitProposedBatchArguments], - [ValidationResult], - [], - ), - 'validate_configure' : IDL.Func( - [ConfigureArguments], - [ValidationResult], - [], - ), - 'validate_grant_permission' : IDL.Func( - [GrantPermission], - [ValidationResult], - [], - ), - 'validate_revoke_permission' : IDL.Func( - [RevokePermission], - [ValidationResult], - [], - ), - 'validate_take_ownership' : IDL.Func([], [ValidationResult], []), - }); -}; -export const init = ({ IDL }) => { - const SetPermissions = IDL.Record({ - 'prepare' : IDL.Vec(IDL.Principal), - 'commit' : IDL.Vec(IDL.Principal), - 'manage_permissions' : IDL.Vec(IDL.Principal), - }); - const UpgradeArgs = IDL.Record({ - 'set_permissions' : IDL.Opt(SetPermissions), - }); - const InitArgs = IDL.Record({}); - const AssetCanisterArgs = IDL.Variant({ - 'Upgrade' : UpgradeArgs, - 'Init' : InitArgs, - }); - return [IDL.Opt(AssetCanisterArgs)]; -}; diff --git a/rust/image-classification/src/declarations/frontend/index.d.ts b/rust/image-classification/src/declarations/frontend/index.d.ts deleted file mode 100644 index b55074358..000000000 --- a/rust/image-classification/src/declarations/frontend/index.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -import type { - ActorSubclass, - HttpAgentOptions, - ActorConfig, - Agent, -} from "@dfinity/agent"; -import type { Principal } from "@dfinity/principal"; -import type { IDL } from "@dfinity/candid"; - -import { _SERVICE } from './frontend.did'; - -export declare const idlFactory: IDL.InterfaceFactory; -export declare const canisterId: string; - -export declare interface CreateActorOptions { - /** - * @see {@link Agent} - */ - agent?: Agent; - /** - * @see {@link HttpAgentOptions} - */ - agentOptions?: HttpAgentOptions; - /** - * @see {@link ActorConfig} - */ - actorOptions?: ActorConfig; -} - -/** - * Intializes an {@link ActorSubclass}, configured with the provided SERVICE interface of a canister. - * @constructs {@link ActorSubClass} - * @param {string | Principal} canisterId - ID of the canister the {@link Actor} will talk to - * @param {CreateActorOptions} options - see {@link CreateActorOptions} - * @param {CreateActorOptions["agent"]} options.agent - a pre-configured agent you'd like to use. Supercedes agentOptions - * @param {CreateActorOptions["agentOptions"]} options.agentOptions - options to set up a new agent - * @see {@link HttpAgentOptions} - * @param {CreateActorOptions["actorOptions"]} options.actorOptions - options for the Actor - * @see {@link ActorConfig} - */ -export declare const createActor: ( - canisterId: string | Principal, - options?: CreateActorOptions -) => ActorSubclass<_SERVICE>; - -/** - * Intialized Actor using default settings, ready to talk to a canister using its candid interface - * @constructs {@link ActorSubClass} - */ -export declare const frontend: ActorSubclass<_SERVICE>; diff --git a/rust/image-classification/src/declarations/frontend/index.js b/rust/image-classification/src/declarations/frontend/index.js deleted file mode 100644 index c5e4ab186..000000000 --- a/rust/image-classification/src/declarations/frontend/index.js +++ /dev/null @@ -1,42 +0,0 @@ -import { Actor, HttpAgent } from "@dfinity/agent"; - -// Imports and re-exports candid interface -import { idlFactory } from "./frontend.did.js"; -export { idlFactory } from "./frontend.did.js"; - -/* CANISTER_ID is replaced by webpack based on node environment - * Note: canister environment variable will be standardized as - * process.env.CANISTER_ID_ - * beginning in dfx 0.15.0 - */ -export const canisterId = - process.env.CANISTER_ID_FRONTEND; - -export const createActor = (canisterId, options = {}) => { - const agent = options.agent || new HttpAgent({ ...options.agentOptions }); - - if (options.agent && options.agentOptions) { - console.warn( - "Detected both agent and agentOptions passed to createActor. Ignoring agentOptions and proceeding with the provided agent." - ); - } - - // Fetch root key for certificate validation during development - if (process.env.DFX_NETWORK !== "ic") { - agent.fetchRootKey().catch((err) => { - console.warn( - "Unable to fetch root key. Check to ensure that your local replica is running" - ); - console.error(err); - }); - } - - // Creates an actor with using the candid interface and the HttpAgent - return Actor.createActor(idlFactory, { - agent, - canisterId, - ...options.actorOptions, - }); -}; - -export const frontend = canisterId ? createActor(canisterId) : undefined; diff --git a/rust/vetkd/package-lock.json b/rust/vetkd/package-lock.json index b294d1f84..706942ceb 100644 --- a/rust/vetkd/package-lock.json +++ b/rust/vetkd/package-lock.json @@ -8,11 +8,9 @@ "name": "app_frontend_js", "version": "0.2.0", "dependencies": { - "@dfinity/agent": "^2.1.3", "@dfinity/auth-client": "^2.1.3", - "@dfinity/candid": "^2.1.3", - "@dfinity/principal": "^2.1.3", - "@dfinity/vetkeys": "^0.1.0" + "@dfinity/vetkeys": "^0.1.0", + "@icp-sdk/core": "~5.0.0" }, "devDependencies": { "assert": "2.0.0", @@ -35,6 +33,7 @@ "resolved": "https://registry.npmjs.org/@dfinity/agent/-/agent-2.4.1.tgz", "integrity": "sha512-IczFFOUDGfMTdQ83yiCvGtvHr1IIB80lWBP0ZYRLogs6NVt8t6HYcMlu1sgT+9VivhT7iwX4pktPFxxOkO3COw==", "license": "Apache-2.0", + "peer": true, "dependencies": { "@noble/curves": "^1.4.0", "@noble/hashes": "^1.3.1", @@ -67,10 +66,17 @@ "resolved": "https://registry.npmjs.org/@dfinity/candid/-/candid-2.4.1.tgz", "integrity": "sha512-kOaIKfhR2PYN8vD4M0Pc4s/7wb1nKjlTJUw+5E9jh26T03fITIZmaafIuwlX+wmdxwIT9Xoy7PlsxOEpzv203A==", "license": "Apache-2.0", + "peer": true, "peerDependencies": { "@dfinity/principal": "^2.4.1" } }, + "node_modules/@dfinity/cbor": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@dfinity/cbor/-/cbor-0.2.2.tgz", + "integrity": "sha512-GPJpH73kDEKbUBdUjY80lz7cq9l0vm1h/7ppejPV6O0ZTqCLrYspssYvqjRmK4aNnJ/SKXsP0rg9LYX7zpegaA==", + "license": "Apache-2.0" + }, "node_modules/@dfinity/identity": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/@dfinity/identity/-/identity-2.4.1.tgz", @@ -92,6 +98,7 @@ "resolved": "https://registry.npmjs.org/@dfinity/principal/-/principal-2.4.1.tgz", "integrity": "sha512-Cz6XQVOwq0TXDBClPbcidDd4SqK1lfr1/Kn34ruDD13xVQ4iaP1iCntzS9O97+vGpY/6jwDtKd32Gn5YJ9BQNw==", "license": "Apache-2.0", + "peer": true, "dependencies": { "@noble/hashes": "^1.3.1" } @@ -108,6 +115,20 @@ "idb-keyval": "^6.2.1" } }, + "node_modules/@icp-sdk/core": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@icp-sdk/core/-/core-5.0.0.tgz", + "integrity": "sha512-t6iRbdylHG57MicWRpR1uMTFXRW7GCzec6KAg55CBwDHbHLQDKikQ252lmlcEa80DrKa3LPvMKYZEUYjEq5XUQ==", + "license": "Apache-2.0", + "dependencies": { + "@dfinity/cbor": "^0.2.2", + "@noble/curves": "^1.9.2", + "@noble/hashes": "^1.8.0", + "@scure/bip32": "^1.7.0", + "@scure/bip39": "^1.6.0", + "asn1js": "^3.0.5" + } + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", @@ -174,9 +195,9 @@ "dev": true }, "node_modules/@noble/curves": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.9.0.tgz", - "integrity": "sha512-7YDlXiNMdO1YZeH6t/kvopHHbIZzlxrCV9WLqCY6QhcXOoXiNCMDqJIglZ9Yjx5+w7Dz30TITFrlTjnRg7sKEg==", + "version": "1.9.7", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.9.7.tgz", + "integrity": "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw==", "license": "MIT", "dependencies": { "@noble/hashes": "1.8.0" @@ -235,6 +256,42 @@ "node": ">= 8" } }, + "node_modules/@scure/base": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.2.6.tgz", + "integrity": "sha512-g/nm5FgUa//MCj1gV09zTJTaM6KBAHqLN907YVQqf7zC49+DcO4B1so4ZX07Ef10Twr6nuqYEH9GEggFXA4Fmg==", + "license": "MIT", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip32": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.7.0.tgz", + "integrity": "sha512-E4FFX/N3f4B80AKWp5dP6ow+flD1LQZo/w8UnLGYZO674jS6YnYeepycOOksv+vLPSpgN35wgKgy+ybfTb2SMw==", + "license": "MIT", + "dependencies": { + "@noble/curves": "~1.9.0", + "@noble/hashes": "~1.8.0", + "@scure/base": "~1.2.5" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip39": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.6.0.tgz", + "integrity": "sha512-+lF0BbLiJNwVlev4eKelw1WWLaiKXw7sSl8T6FvBlWkdX+94aGJ4o8XjUdlyhTCjd8c+B3KT3JfS8P0bLRNU6A==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "~1.8.0", + "@scure/base": "~1.2.5" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@types/body-parser": { "version": "1.19.2", "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", @@ -729,6 +786,20 @@ "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==", "dev": true }, + "node_modules/asn1js": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-3.0.7.tgz", + "integrity": "sha512-uLvq6KJu04qoQM6gvBfKFjlh6Gl0vOKQuR5cJMDHQkmwfMOQeN3F3SHCv9SNYSL+CRoHvOGFfllDlVz03GQjvQ==", + "license": "BSD-3-Clause", + "dependencies": { + "pvtsutils": "^1.3.6", + "pvutils": "^1.1.3", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/assert": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/assert/-/assert-2.0.0.tgz", @@ -963,6 +1034,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "caniuse-lite": "^1.0.30001716", "electron-to-chromium": "^1.5.149", @@ -3446,6 +3518,24 @@ "node": ">=6" } }, + "node_modules/pvtsutils": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.6.tgz", + "integrity": "sha512-PLgQXQ6H2FWCaeRak8vvk1GW462lMxB5s3Jm673N82zI4vqtVUPuZdffdZbPDFRoU8kAhItWFtPCWiPpp4/EDg==", + "license": "MIT", + "dependencies": { + "tslib": "^2.8.1" + } + }, + "node_modules/pvutils": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/pvutils/-/pvutils-1.1.5.tgz", + "integrity": "sha512-KTqnxsgGiQ6ZAzZCVlJH5eOjSnvlyEgx1m8bkRJfOhmGRqfo5KLvmAlACQkrjEtOQ4B7wF9TdSLIs9O90MX9xA==", + "license": "MIT", + "engines": { + "node": ">=16.0.0" + } + }, "node_modules/qs": { "version": "6.13.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", @@ -3733,6 +3823,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", "dev": true, + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", @@ -4344,10 +4435,10 @@ } }, "node_modules/tslib": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.1.tgz", - "integrity": "sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==", - "dev": true + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" }, "node_modules/type-is": { "version": "1.6.18", @@ -4510,6 +4601,7 @@ "integrity": "sha512-lQ3CPiSTpfOnrEGeXDwoq5hIGzSjmwD72GdfVzF7CQAI7t47rJG9eDWvcEkEn3CUQymAElVvDg3YNTlCYj+qUQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@types/eslint-scope": "^3.7.7", "@types/estree": "^1.0.6", diff --git a/rust/vetkd/package.json b/rust/vetkd/package.json index 9aa8d17d0..26155c783 100644 --- a/rust/vetkd/package.json +++ b/rust/vetkd/package.json @@ -17,11 +17,9 @@ "generate": "dfx generate app_backend" }, "dependencies": { - "@dfinity/agent": "^2.1.3", "@dfinity/auth-client": "^2.1.3", - "@dfinity/candid": "^2.1.3", - "@dfinity/principal": "^2.1.3", - "@dfinity/vetkeys": "^0.1.0" + "@dfinity/vetkeys": "^0.1.0", + "@icp-sdk/core": "~5.0.0" }, "devDependencies": { "assert": "2.0.0", @@ -38,4 +36,4 @@ "webpack-cli": "^4.10.0", "webpack-dev-server": "^4.8.1" } -} \ No newline at end of file +} diff --git a/rust/vetkd/src/app_frontend_js/src/index.js b/rust/vetkd/src/app_frontend_js/src/index.js index 07d04f7c9..fc15e973e 100644 --- a/rust/vetkd/src/app_frontend_js/src/index.js +++ b/rust/vetkd/src/app_frontend_js/src/index.js @@ -1,8 +1,8 @@ import { createActor, app_backend } from "../../declarations/app_backend"; import { TransportSecretKey, EncryptedVetKey, DerivedPublicKey, IbeCiphertext, IbeIdentity, IbeSeed } from "@dfinity/vetkeys"; import { AuthClient } from "@dfinity/auth-client" -import { HttpAgent, Actor } from "@dfinity/agent"; -import { Principal } from "@dfinity/principal"; +import { HttpAgent, Actor } from "@icp-sdk/core/agent"; +import { Principal } from "@icp-sdk/core/principal"; let fetched_derived_key_material = null; let app_backend_actor = app_backend;