diff --git a/Cargo.lock b/Cargo.lock index f39a2558..2aac4c11 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7646,7 +7646,7 @@ dependencies = [ [[package]] name = "pallet-xode-staking" -version = "0.1.0" +version = "0.1.1" dependencies = [ "cumulus-primitives-core", "frame-benchmarking", diff --git a/client/README.md b/client/README.md deleted file mode 100644 index 761f4ba9..00000000 --- a/client/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Xode Blockchain Client - -``` -npm init -y -npm i -D typescript ts-node @types/node -npx tsc --init -npm i polkadot-api -npm run dev -``` - -### Node.JS/Typscript -https://www.learnwithjason.dev/blog/modern-node-server-typescript-2024/ - -### Polkadot API (papi) -https://papi.how/getting-started - diff --git a/client/getLatestFinalizedBlockNumber.js b/client/getLatestFinalizedBlockNumber.js new file mode 100644 index 00000000..a7bcc0c0 --- /dev/null +++ b/client/getLatestFinalizedBlockNumber.js @@ -0,0 +1,32 @@ +import { ApiPromise, WsProvider } from "@polkadot/api"; +import 'dotenv/config'; + +const WS_ENDPOINT = process.env.WS_ENDPOINT; + +console.log("Connecting to blockchain..."); +const wsProvider = new WsProvider(WS_ENDPOINT); +const api = await ApiPromise.create({ provider: wsProvider }); + +/// The header has no block number because Xode chain is using +/// a custom header type that does not include a block number field. + +let headerBlockHash = await api.rpc.chain.getFinalizedHead(); +let block = await api.rpc.chain.getBlock(headerBlockHash); + +const parentHash = block.block.header.parentHash; +const parentHeader = await api.rpc.chain.getHeader(parentHash); +const blockNumber = parentHeader.number.toNumber() + 1; + +/// console.log("Latest Block Hash:", headerBlockHash.toHex()); +console.log("Finalized Block Number:", blockNumber); + +/// Other option in getting the latest finalized block number. +/// Because system.number is a runtime storage item, not dependent +/// on header structure. + +const finalizedHash = await api.rpc.chain.getFinalizedHead(); +const bn = await api.query.system.number.at(finalizedHash); + +console.log("Finalized Block number:", bn.toNumber()); + +process.exit(0); \ No newline at end of file diff --git a/client/package-lock.json b/client/package-lock.json index 518e6f9c..e467c418 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -9,2934 +9,870 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "polkadot-api": "^1.7.7" - }, - "devDependencies": { - "@types/node": "^22.9.3", - "ts-node": "^10.9.2", - "typescript": "^5.7.2" - }, - "engines": { - "node": ">=20.6.0" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.26.2", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", - "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.25.9", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", - "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@commander-js/extra-typings": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/@commander-js/extra-typings/-/extra-typings-12.1.0.tgz", - "integrity": "sha512-wf/lwQvWAA0goIghcb91dQYpkLBcyhOhQNqG/VgWhnKzgt+UOMvra7EX/2fv70arm5RW+PUHoQHHDa6/p77Eqg==", - "license": "MIT", - "peerDependencies": { - "commander": "~12.1.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==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/trace-mapping": "0.3.9" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/aix-ppc64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.24.0.tgz", - "integrity": "sha512-WtKdFM7ls47zkKHFVzMz8opM7LkcsIp9amDUBIAWirg70RM71WRSjdILPsY5Uv1D42ZpUfaPILDlfactHgsRkw==", - "cpu": [ - "ppc64" - ], - "license": "MIT", - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-arm": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.24.0.tgz", - "integrity": "sha512-arAtTPo76fJ/ICkXWetLCc9EwEHKaeya4vMrReVlEIUCAUncH7M4bhMQ+M9Vf+FFOZJdTNMXNBrWwW+OXWpSew==", - "cpu": [ - "arm" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.24.0.tgz", - "integrity": "sha512-Vsm497xFM7tTIPYK9bNTYJyF/lsP590Qc1WxJdlB6ljCbdZKU9SY8i7+Iin4kyhV/KV5J2rOKsBQbB77Ab7L/w==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.24.0.tgz", - "integrity": "sha512-t8GrvnFkiIY7pa7mMgJd7p8p8qqYIz1NYiAoKc75Zyv73L3DZW++oYMSHPRarcotTKuSs6m3hTOa5CKHaS02TQ==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.0.tgz", - "integrity": "sha512-CKyDpRbK1hXwv79soeTJNHb5EiG6ct3efd/FTPdzOWdbZZfGhpbcqIpiD0+vwmpu0wTIL97ZRPZu8vUt46nBSw==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.24.0.tgz", - "integrity": "sha512-rgtz6flkVkh58od4PwTRqxbKH9cOjaXCMZgWD905JOzjFKW+7EiUObfd/Kav+A6Gyud6WZk9w+xu6QLytdi2OA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.0.tgz", - "integrity": "sha512-6Mtdq5nHggwfDNLAHkPlyLBpE5L6hwsuXZX8XNmHno9JuL2+bg2BX5tRkwjyfn6sKbxZTq68suOjgWqCicvPXA==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.24.0.tgz", - "integrity": "sha512-D3H+xh3/zphoX8ck4S2RxKR6gHlHDXXzOf6f/9dbFt/NRBDIE33+cVa49Kil4WUjxMGW0ZIYBYtaGCa2+OsQwQ==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.24.0.tgz", - "integrity": "sha512-gJKIi2IjRo5G6Glxb8d3DzYXlxdEj2NlkixPsqePSZMhLudqPhtZ4BUrpIuTjJYXxvF9njql+vRjB2oaC9XpBw==", - "cpu": [ - "arm" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.24.0.tgz", - "integrity": "sha512-TDijPXTOeE3eaMkRYpcy3LarIg13dS9wWHRdwYRnzlwlA370rNdZqbcp0WTyyV/k2zSxfko52+C7jU5F9Tfj1g==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.24.0.tgz", - "integrity": "sha512-K40ip1LAcA0byL05TbCQ4yJ4swvnbzHscRmUilrmP9Am7//0UjPreh4lpYzvThT2Quw66MhjG//20mrufm40mA==", - "cpu": [ - "ia32" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.24.0.tgz", - "integrity": "sha512-0mswrYP/9ai+CU0BzBfPMZ8RVm3RGAN/lmOMgW4aFUSOQBjA31UP8Mr6DDhWSuMwj7jaWOT0p0WoZ6jeHhrD7g==", - "cpu": [ - "loong64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.24.0.tgz", - "integrity": "sha512-hIKvXm0/3w/5+RDtCJeXqMZGkI2s4oMUGj3/jM0QzhgIASWrGO5/RlzAzm5nNh/awHE0A19h/CvHQe6FaBNrRA==", - "cpu": [ - "mips64el" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.24.0.tgz", - "integrity": "sha512-HcZh5BNq0aC52UoocJxaKORfFODWXZxtBaaZNuN3PUX3MoDsChsZqopzi5UupRhPHSEHotoiptqikjN/B77mYQ==", - "cpu": [ - "ppc64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.24.0.tgz", - "integrity": "sha512-bEh7dMn/h3QxeR2KTy1DUszQjUrIHPZKyO6aN1X4BCnhfYhuQqedHaa5MxSQA/06j3GpiIlFGSsy1c7Gf9padw==", - "cpu": [ - "riscv64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.24.0.tgz", - "integrity": "sha512-ZcQ6+qRkw1UcZGPyrCiHHkmBaj9SiCD8Oqd556HldP+QlpUIe2Wgn3ehQGVoPOvZvtHm8HPx+bH20c9pvbkX3g==", - "cpu": [ - "s390x" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.24.0.tgz", - "integrity": "sha512-vbutsFqQ+foy3wSSbmjBXXIJ6PL3scghJoM8zCL142cGaZKAdCZHyf+Bpu/MmX9zT9Q0zFBVKb36Ma5Fzfa8xA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.24.0.tgz", - "integrity": "sha512-hjQ0R/ulkO8fCYFsG0FZoH+pWgTTDreqpqY7UnQntnaKv95uP5iW3+dChxnx7C3trQQU40S+OgWhUVwCjVFLvg==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openbsd-arm64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.0.tgz", - "integrity": "sha512-MD9uzzkPQbYehwcN583yx3Tu5M8EIoTD+tUgKF982WYL9Pf5rKy9ltgD0eUgs8pvKnmizxjXZyLt0z6DC3rRXg==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.24.0.tgz", - "integrity": "sha512-4ir0aY1NGUhIC1hdoCzr1+5b43mw99uNwVzhIq1OY3QcEwPDO3B7WNXBzaKY5Nsf1+N11i1eOfFcq+D/gOS15Q==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.24.0.tgz", - "integrity": "sha512-jVzdzsbM5xrotH+W5f1s+JtUy1UWgjU0Cf4wMvffTB8m6wP5/kx0KiaLHlbJO+dMgtxKV8RQ/JvtlFcdZ1zCPA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.24.0.tgz", - "integrity": "sha512-iKc8GAslzRpBytO2/aN3d2yb2z8XTVfNV0PjGlCxKo5SgWmNXx82I/Q3aG1tFfS+A2igVCY97TJ8tnYwpUWLCA==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.24.0.tgz", - "integrity": "sha512-vQW36KZolfIudCcTnaTpmLQ24Ha1RjygBo39/aLkM2kmjkWmZGEJ5Gn9l5/7tzXA42QGIoWbICfg6KLLkIw6yw==", - "cpu": [ - "ia32" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.24.0.tgz", - "integrity": "sha512-7IAFPrjSQIJrGsK6flwg7NFmwBoSTyF3rl7If0hNUFQU4ilTsEPL6GuMuU9BfIWVVGuRnuIidkSMC+c0Otu8IA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@isaacs/cliui": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", - "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", - "license": "ISC", - "dependencies": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@isaacs/cliui/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "license": "MIT" - }, - "node_modules/@isaacs/cliui/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "license": "MIT", - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", - "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", - "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/gen-mapping/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", - "license": "MIT" - }, - "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, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - }, - "node_modules/@noble/hashes": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.6.0.tgz", - "integrity": "sha512-YUULf0Uk4/mAA89w+k3+yUYh6NrEvxZa5T6SY3wlMvE2chHkxFUUIDI8/XW1QSC357iA5pSnqt7XEhvFOqmDyQ==", - "license": "MIT", - "engines": { - "node": "^14.21.3 || >=16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@pkgjs/parseargs": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", - "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=14" - } - }, - "node_modules/@polkadot-api/cli": { - "version": "0.9.21", - "resolved": "https://registry.npmjs.org/@polkadot-api/cli/-/cli-0.9.21.tgz", - "integrity": "sha512-ZvuYRn9f2F8vrm0lPJP8NjbrVLkGpsiWbq0MFlUXhwfTUvkKWPu48rSPiN2SAYAD0p1rOevLus1FdGZL0J/fRw==", - "license": "MIT", - "dependencies": { - "@commander-js/extra-typings": "^12.1.0", - "@polkadot-api/codegen": "0.12.9", - "@polkadot-api/ink-contracts": "0.2.2", - "@polkadot-api/json-rpc-provider": "0.0.4", - "@polkadot-api/known-chains": "0.5.8", - "@polkadot-api/metadata-compatibility": "0.1.12", - "@polkadot-api/observable-client": "0.6.3", - "@polkadot-api/polkadot-sdk-compat": "2.3.1", - "@polkadot-api/sm-provider": "0.1.7", - "@polkadot-api/smoldot": "0.3.7", - "@polkadot-api/substrate-bindings": "0.9.4", - "@polkadot-api/substrate-client": "0.3.0", - "@polkadot-api/utils": "0.1.2", - "@polkadot-api/wasm-executor": "^0.1.2", - "@polkadot-api/ws-provider": "0.3.6", - "@types/node": "^22.9.1", - "commander": "^12.1.0", - "execa": "^9.5.1", - "fs.promises.exists": "^1.1.4", - "ora": "^8.1.1", - "read-pkg": "^9.0.1", - "rxjs": "^7.8.1", - "tsc-prog": "^2.3.0", - "tsup": "^8.3.5", - "typescript": "^5.6.3", - "write-package": "^7.1.0" - }, - "bin": { - "papi": "dist/main.js", - "polkadot-api": "dist/main.js" - } - }, - "node_modules/@polkadot-api/codegen": { - "version": "0.12.9", - "resolved": "https://registry.npmjs.org/@polkadot-api/codegen/-/codegen-0.12.9.tgz", - "integrity": "sha512-lxwKRJqKKmR0Fm9g2KU4KgMB5NeKvc1505iGY0nd/PistTzVIk4zsX3Ja9dPFSB4wMMZ9ykMbbamc3+t6jbkaw==", - "license": "MIT", - "dependencies": { - "@polkadot-api/ink-contracts": "0.2.2", - "@polkadot-api/metadata-builders": "0.9.2", - "@polkadot-api/metadata-compatibility": "0.1.12", - "@polkadot-api/substrate-bindings": "0.9.4", - "@polkadot-api/utils": "0.1.2" - } - }, - "node_modules/@polkadot-api/ink-contracts": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@polkadot-api/ink-contracts/-/ink-contracts-0.2.2.tgz", - "integrity": "sha512-jbkrbZo8Yfe9UupmPuWIUdQz0a/Oxi6m1qPGEfXSmwML27FgWEmb+8IG9chLzJ59/z1oMWxgKHkK8BLLWnSLGg==", - "license": "MIT", - "dependencies": { - "@polkadot-api/metadata-builders": "0.9.2", - "@polkadot-api/substrate-bindings": "0.9.4", - "@polkadot-api/utils": "0.1.2", - "scale-ts": "^1.6.1" - } - }, - "node_modules/@polkadot-api/json-rpc-provider": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/@polkadot-api/json-rpc-provider/-/json-rpc-provider-0.0.4.tgz", - "integrity": "sha512-9cDijLIxzHOBuq6yHqpqjJ9jBmXrctjc1OFqU+tQrS96adQze3mTIH6DTgfb/0LMrqxzxffz1HQGrIlEH00WrA==", - "license": "MIT" - }, - "node_modules/@polkadot-api/json-rpc-provider-proxy": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/@polkadot-api/json-rpc-provider-proxy/-/json-rpc-provider-proxy-0.2.4.tgz", - "integrity": "sha512-nuGoY9QpBAiRU7xmXN3nugFvPcnSu3IxTLm1OWcNTGlZ1LW5bvdQHz3JLk56+Jlyb3GJ971hqdg2DJsMXkKCOg==", - "license": "MIT" - }, - "node_modules/@polkadot-api/known-chains": { - "version": "0.5.8", - "resolved": "https://registry.npmjs.org/@polkadot-api/known-chains/-/known-chains-0.5.8.tgz", - "integrity": "sha512-4UoxnqPeJ2viRykArIhUmYsgo2fc84mqC8o/qvmJ0w3r7qwO2/7NS2zpwMuricGtNvdNKyJRMGHAeJdrIfCB3A==", - "license": "MIT" - }, - "node_modules/@polkadot-api/logs-provider": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/@polkadot-api/logs-provider/-/logs-provider-0.0.6.tgz", - "integrity": "sha512-4WgHlvy+xee1ADaaVf6+MlK/+jGMtsMgAzvbQOJZnP4PfQuagoTqaeayk8HYKxXGphogLlPbD06tANxcb+nvAg==", - "license": "MIT", - "dependencies": { - "@polkadot-api/json-rpc-provider": "0.0.4" - } - }, - "node_modules/@polkadot-api/metadata-builders": { - "version": "0.9.2", - "resolved": "https://registry.npmjs.org/@polkadot-api/metadata-builders/-/metadata-builders-0.9.2.tgz", - "integrity": "sha512-2vxtjMC5PvN+sTM6DPMopznNfTUJEe6G6CzMhtK19CASb2OeN9NoRpnxmpEagjndO98YPkyQtDv25sKGUVhgAA==", - "license": "MIT", - "dependencies": { - "@polkadot-api/substrate-bindings": "0.9.4", - "@polkadot-api/utils": "0.1.2" - } - }, - "node_modules/@polkadot-api/metadata-compatibility": { - "version": "0.1.12", - "resolved": "https://registry.npmjs.org/@polkadot-api/metadata-compatibility/-/metadata-compatibility-0.1.12.tgz", - "integrity": "sha512-zhRhsuzHb6klnRW/pMXb5YLKRtvmGw4sicV6jxKDIclpuOZ+QxMWFmqTGM1Vsea5qNX/Z9HrWvXOYxMlkcW7Pg==", - "license": "MIT", - "dependencies": { - "@polkadot-api/metadata-builders": "0.9.2", - "@polkadot-api/substrate-bindings": "0.9.4" - } - }, - "node_modules/@polkadot-api/observable-client": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/@polkadot-api/observable-client/-/observable-client-0.6.3.tgz", - "integrity": "sha512-DNau9rUmEMEnfDKxfoZrtL2oPCXdXuV6c0AvG8kNGviuknk5y7HzlU21rI3O486zqmLQE2ntPxQmT+yeYxW8DA==", - "license": "MIT", - "dependencies": { - "@polkadot-api/metadata-builders": "0.9.2", - "@polkadot-api/substrate-bindings": "0.9.4", - "@polkadot-api/utils": "0.1.2" - }, - "peerDependencies": { - "@polkadot-api/substrate-client": "0.3.0", - "rxjs": ">=7.8.0" - } - }, - "node_modules/@polkadot-api/pjs-signer": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/@polkadot-api/pjs-signer/-/pjs-signer-0.6.1.tgz", - "integrity": "sha512-0GYUS0rVxB/Vju4YqX1/9CM1bVmscCSTgI2le5eeYFmz+MHMMPuLTXQyRSCa6nNH/0/L03xL9gmSzwwAVGDpKw==", - "license": "MIT", - "dependencies": { - "@polkadot-api/metadata-builders": "0.9.2", - "@polkadot-api/polkadot-signer": "0.1.6", - "@polkadot-api/signers-common": "0.1.2", - "@polkadot-api/substrate-bindings": "0.9.4", - "@polkadot-api/utils": "0.1.2" - } - }, - "node_modules/@polkadot-api/polkadot-sdk-compat": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@polkadot-api/polkadot-sdk-compat/-/polkadot-sdk-compat-2.3.1.tgz", - "integrity": "sha512-rb8IWmPRhKWD9NG4zh2n4q0HlEAvq+Cv1CbD+8YxH0XAqIIiFA+ch5JeDCIxQYngkn/43B0Gs7Gtzh18yv2yoA==", - "license": "MIT", - "dependencies": { - "@polkadot-api/json-rpc-provider": "0.0.4" - } - }, - "node_modules/@polkadot-api/polkadot-signer": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/@polkadot-api/polkadot-signer/-/polkadot-signer-0.1.6.tgz", - "integrity": "sha512-X7ghAa4r7doETtjAPTb50IpfGtrBmy3BJM5WCfNKa1saK04VFY9w+vDn+hwEcM4p0PcDHt66Ts74hzvHq54d9A==", - "license": "MIT" - }, - "node_modules/@polkadot-api/signer": { - "version": "0.1.11", - "resolved": "https://registry.npmjs.org/@polkadot-api/signer/-/signer-0.1.11.tgz", - "integrity": "sha512-DVNB5fdB5vGjSgBbSqzZtaZ15pW/KJG5FARI9h1KgyDWdXhJo5pkGID/LuY5dQbdlnPbTkLhtDhZ2+4G2NWrzg==", - "license": "MIT", - "dependencies": { - "@noble/hashes": "^1.5.0", - "@polkadot-api/polkadot-signer": "0.1.6", - "@polkadot-api/signers-common": "0.1.2", - "@polkadot-api/substrate-bindings": "0.9.4", - "@polkadot-api/utils": "0.1.2" - } - }, - "node_modules/@polkadot-api/signers-common": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@polkadot-api/signers-common/-/signers-common-0.1.2.tgz", - "integrity": "sha512-JtJmU7v4/80mu05qI3F/BP44nT43VfmyLsr7NO4n5+txZ9sFMDXQQELtis/fQnZgzkps8wPOwagjkSdutTow5A==", - "license": "MIT", - "dependencies": { - "@polkadot-api/metadata-builders": "0.9.2", - "@polkadot-api/polkadot-signer": "0.1.6", - "@polkadot-api/substrate-bindings": "0.9.4", - "@polkadot-api/utils": "0.1.2" - } - }, - "node_modules/@polkadot-api/sm-provider": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/@polkadot-api/sm-provider/-/sm-provider-0.1.7.tgz", - "integrity": "sha512-BhNKVeIFZdawpPVadXszLl8IP4EDjcLHe/GchfRRFkvoNFuwS2nNv/npYIqCviXV+dd2R8VnEELxwScsf380Og==", - "license": "MIT", - "dependencies": { - "@polkadot-api/json-rpc-provider": "0.0.4", - "@polkadot-api/json-rpc-provider-proxy": "0.2.4" - }, - "peerDependencies": { - "@polkadot-api/smoldot": ">=0.3" - } - }, - "node_modules/@polkadot-api/smoldot": { - "version": "0.3.7", - "resolved": "https://registry.npmjs.org/@polkadot-api/smoldot/-/smoldot-0.3.7.tgz", - "integrity": "sha512-Fnrz0Xt8fli7LhHSOWbNraiXpLJWCwOglI+BgBWnYpsdHXSMU5TsYEw5oo9rkfI9zDeZsbtXvMTW3MqTeCLtQg==", - "license": "MIT", - "dependencies": { - "@types/node": "^22.9.0", - "smoldot": "2.0.33" - } - }, - "node_modules/@polkadot-api/substrate-bindings": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/@polkadot-api/substrate-bindings/-/substrate-bindings-0.9.4.tgz", - "integrity": "sha512-SUyetILwgUsodSk1qhNu0HflRBdq2VBCbqAqCBNaoCauE3/Q/G6k7xS+1nE6MTcpjZQex+TriJdDz/trLSvwsA==", - "license": "MIT", - "dependencies": { - "@noble/hashes": "^1.5.0", - "@polkadot-api/utils": "0.1.2", - "@scure/base": "^1.1.9", - "scale-ts": "^1.6.1" - } - }, - "node_modules/@polkadot-api/substrate-client": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@polkadot-api/substrate-client/-/substrate-client-0.3.0.tgz", - "integrity": "sha512-0hEvQLKH2zhaFzE8DPkWehvJilec8u2O2wbIEUStm0OJ8jIFtJ40MFjXQfB01dXBWUz1KaVBqS6xd3sZA90Dpw==", - "license": "MIT", - "dependencies": { - "@polkadot-api/json-rpc-provider": "0.0.4", - "@polkadot-api/utils": "0.1.2" - } - }, - "node_modules/@polkadot-api/utils": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@polkadot-api/utils/-/utils-0.1.2.tgz", - "integrity": "sha512-yhs5k2a8N1SBJcz7EthZoazzLQUkZxbf+0271Xzu42C5AEM9K9uFLbsB+ojzHEM72O5X8lPtSwGKNmS7WQyDyg==", - "license": "MIT" - }, - "node_modules/@polkadot-api/wasm-executor": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@polkadot-api/wasm-executor/-/wasm-executor-0.1.2.tgz", - "integrity": "sha512-a5wGenltB3EFPdf72u8ewi6HsUg2qubUAf3ekJprZf24lTK3+w8a/GUF/y6r08LJF35MALZ32SAtLqtVTIOGnQ==", - "license": "MIT" - }, - "node_modules/@polkadot-api/ws-provider": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/@polkadot-api/ws-provider/-/ws-provider-0.3.6.tgz", - "integrity": "sha512-D2+rvcDc9smt24qUKqFoCuKKNhyBVDQEtnsqHiUN/Ym8UGP+Acegac3b9VOig70EpCcRBoYeXY2gEog2ybx1Kg==", - "license": "MIT", - "dependencies": { - "@polkadot-api/json-rpc-provider": "0.0.4", - "@polkadot-api/json-rpc-provider-proxy": "0.2.4", - "ws": "^8.18.0" - } - }, - "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.27.4.tgz", - "integrity": "sha512-2Y3JT6f5MrQkICUyRVCw4oa0sutfAsgaSsb0Lmmy1Wi2y7X5vT9Euqw4gOsCyy0YfKURBg35nhUKZS4mDcfULw==", - "cpu": [ - "arm" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-android-arm64": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.27.4.tgz", - "integrity": "sha512-wzKRQXISyi9UdCVRqEd0H4cMpzvHYt1f/C3CoIjES6cG++RHKhrBj2+29nPF0IB5kpy9MS71vs07fvrNGAl/iA==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.27.4.tgz", - "integrity": "sha512-PlNiRQapift4LNS8DPUHuDX/IdXiLjf8mc5vdEmUR0fF/pyy2qWwzdLjB+iZquGr8LuN4LnUoSEvKRwjSVYz3Q==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.27.4.tgz", - "integrity": "sha512-o9bH2dbdgBDJaXWJCDTNDYa171ACUdzpxSZt+u/AAeQ20Nk5x+IhA+zsGmrQtpkLiumRJEYef68gcpn2ooXhSQ==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.27.4.tgz", - "integrity": "sha512-NBI2/i2hT9Q+HySSHTBh52da7isru4aAAo6qC3I7QFVsuhxi2gM8t/EI9EVcILiHLj1vfi+VGGPaLOUENn7pmw==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.27.4.tgz", - "integrity": "sha512-wYcC5ycW2zvqtDYrE7deary2P2UFmSh85PUpAx+dwTCO9uw3sgzD6Gv9n5X4vLaQKsrfTSZZ7Z7uynQozPVvWA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.27.4.tgz", - "integrity": "sha512-9OwUnK/xKw6DyRlgx8UizeqRFOfi9mf5TYCw1uolDaJSbUmBxP85DE6T4ouCMoN6pXw8ZoTeZCSEfSaYo+/s1w==", - "cpu": [ - "arm" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.27.4.tgz", - "integrity": "sha512-Vgdo4fpuphS9V24WOV+KwkCVJ72u7idTgQaBoLRD0UxBAWTF9GWurJO9YD9yh00BzbkhpeXtm6na+MvJU7Z73A==", - "cpu": [ - "arm" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.27.4.tgz", - "integrity": "sha512-pleyNgyd1kkBkw2kOqlBx+0atfIIkkExOTiifoODo6qKDSpnc6WzUY5RhHdmTdIJXBdSnh6JknnYTtmQyobrVg==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.27.4.tgz", - "integrity": "sha512-caluiUXvUuVyCHr5DxL8ohaaFFzPGmgmMvwmqAITMpV/Q+tPoaHZ/PWa3t8B2WyoRcIIuu1hkaW5KkeTDNSnMA==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.27.4.tgz", - "integrity": "sha512-FScrpHrO60hARyHh7s1zHE97u0KlT/RECzCKAdmI+LEoC1eDh/RDji9JgFqyO+wPDb86Oa/sXkily1+oi4FzJQ==", - "cpu": [ - "ppc64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.27.4.tgz", - "integrity": "sha512-qyyprhyGb7+RBfMPeww9FlHwKkCXdKHeGgSqmIXw9VSUtvyFZ6WZRtnxgbuz76FK7LyoN8t/eINRbPUcvXB5fw==", - "cpu": [ - "riscv64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.27.4.tgz", - "integrity": "sha512-PFz+y2kb6tbh7m3A7nA9++eInGcDVZUACulf/KzDtovvdTizHpZaJty7Gp0lFwSQcrnebHOqxF1MaKZd7psVRg==", - "cpu": [ - "s390x" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.27.4.tgz", - "integrity": "sha512-Ni8mMtfo+o/G7DVtweXXV/Ol2TFf63KYjTtoZ5f078AUgJTmaIJnj4JFU7TK/9SVWTaSJGxPi5zMDgK4w+Ez7Q==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.27.4.tgz", - "integrity": "sha512-5AeeAF1PB9TUzD+3cROzFTnAJAcVUGLuR8ng0E0WXGkYhp6RD6L+6szYVX+64Rs0r72019KHZS1ka1q+zU/wUw==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.27.4.tgz", - "integrity": "sha512-yOpVsA4K5qVwu2CaS3hHxluWIK5HQTjNV4tWjQXluMiiiu4pJj4BN98CvxohNCpcjMeTXk/ZMJBRbgRg8HBB6A==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.27.4.tgz", - "integrity": "sha512-KtwEJOaHAVJlxV92rNYiG9JQwQAdhBlrjNRp7P9L8Cb4Rer3in+0A+IPhJC9y68WAi9H0sX4AiG2NTsVlmqJeQ==", - "cpu": [ - "ia32" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.27.4.tgz", - "integrity": "sha512-3j4jx1TppORdTAoBJRd+/wJRGCPC0ETWkXOecJ6PPZLj6SptXkrXcNqdj0oclbKML6FkQltdz7bBA3rUSirZug==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@scure/base": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.2.1.tgz", - "integrity": "sha512-DGmGtC8Tt63J5GfHgfl5CuAXh96VF/LD8K9Hr/Gv0J2lAoRGlPOMpqMpMbCTOoOJMZCk2Xt+DskdDyn6dEFdzQ==", - "license": "MIT", - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@sec-ant/readable-stream": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@sec-ant/readable-stream/-/readable-stream-0.4.1.tgz", - "integrity": "sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==", - "license": "MIT" - }, - "node_modules/@sindresorhus/merge-streams": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-4.0.0.tgz", - "integrity": "sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@tsconfig/node10": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", - "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", - "dev": true, - "license": "MIT" - }, - "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, - "license": "MIT" - }, - "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, - "license": "MIT" - }, - "node_modules/@tsconfig/node16": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", - "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/estree": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", - "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", - "license": "MIT" - }, - "node_modules/@types/node": { - "version": "22.9.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.9.3.tgz", - "integrity": "sha512-F3u1fs/fce3FFk+DAxbxc78DF8x0cY09RRL8GnXLmkJ1jvx3TtPdWoTT5/NiYfI5ASqXBmfqJi9dZ3gxMx4lzw==", - "license": "MIT", - "dependencies": { - "undici-types": "~6.19.8" - } - }, - "node_modules/@types/normalize-package-data": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", - "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==", - "license": "MIT" - }, - "node_modules/acorn": { - "version": "8.14.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", - "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-walk": { - "version": "8.3.4", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", - "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", - "dev": true, - "license": "MIT", - "dependencies": { - "acorn": "^8.11.0" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/any-promise": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", - "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", - "license": "MIT" - }, - "node_modules/arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true, - "license": "MIT" - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "license": "MIT" - }, - "node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/bundle-require": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/bundle-require/-/bundle-require-5.0.0.tgz", - "integrity": "sha512-GuziW3fSSmopcx4KRymQEJVbZUfqlCqcq7dvs6TYwKRZiegK/2buMxQTPs6MGlNv50wms1699qYO54R8XfRX4w==", - "license": "MIT", - "dependencies": { - "load-tsconfig": "^0.2.3" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "peerDependencies": { - "esbuild": ">=0.18" - } - }, - "node_modules/cac": { - "version": "6.7.14", - "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", - "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/chalk": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", - "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", - "license": "MIT", - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/chokidar": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.1.tgz", - "integrity": "sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA==", - "license": "MIT", - "dependencies": { - "readdirp": "^4.0.1" - }, - "engines": { - "node": ">= 14.16.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/cli-cursor": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz", - "integrity": "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==", - "license": "MIT", - "dependencies": { - "restore-cursor": "^5.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cli-spinners": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", - "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", - "license": "MIT", - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "license": "MIT" - }, - "node_modules/commander": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", - "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", - "license": "MIT", - "engines": { - "node": ">=18" - } - }, - "node_modules/consola": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/consola/-/consola-3.2.3.tgz", - "integrity": "sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==", - "license": "MIT", - "engines": { - "node": "^14.18.0 || >=16.10.0" - } - }, - "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, - "license": "MIT" - }, - "node_modules/cross-spawn": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/deepmerge-ts": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/deepmerge-ts/-/deepmerge-ts-7.1.3.tgz", - "integrity": "sha512-qCSH6I0INPxd9Y1VtAiLpnYvz5O//6rCfJXKk0z66Up9/VOSr+1yS8XSKA5IWRxjocFGlzPyaZYe+jxq7OOLtQ==", - "license": "BSD-3-Clause", - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/detect-indent": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-7.0.1.tgz", - "integrity": "sha512-Mc7QhQ8s+cLrnUfU/Ji94vG/r8M26m8f++vyres4ZoojaRDpZ1eSIh/EpzLNwlWuvzSZ3UbDFspjFvTDXe6e/g==", - "license": "MIT", - "engines": { - "node": ">=12.20" - } - }, - "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, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "license": "MIT" - }, - "node_modules/emoji-regex": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", - "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==", - "license": "MIT" - }, - "node_modules/esbuild": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.0.tgz", - "integrity": "sha512-FuLPevChGDshgSicjisSooU0cemp/sGXR841D5LHMB7mTVOmsEHcAxaH3irL53+8YDIeVNQEySh4DaYU/iuPqQ==", - "hasInstallScript": true, - "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.24.0", - "@esbuild/android-arm": "0.24.0", - "@esbuild/android-arm64": "0.24.0", - "@esbuild/android-x64": "0.24.0", - "@esbuild/darwin-arm64": "0.24.0", - "@esbuild/darwin-x64": "0.24.0", - "@esbuild/freebsd-arm64": "0.24.0", - "@esbuild/freebsd-x64": "0.24.0", - "@esbuild/linux-arm": "0.24.0", - "@esbuild/linux-arm64": "0.24.0", - "@esbuild/linux-ia32": "0.24.0", - "@esbuild/linux-loong64": "0.24.0", - "@esbuild/linux-mips64el": "0.24.0", - "@esbuild/linux-ppc64": "0.24.0", - "@esbuild/linux-riscv64": "0.24.0", - "@esbuild/linux-s390x": "0.24.0", - "@esbuild/linux-x64": "0.24.0", - "@esbuild/netbsd-x64": "0.24.0", - "@esbuild/openbsd-arm64": "0.24.0", - "@esbuild/openbsd-x64": "0.24.0", - "@esbuild/sunos-x64": "0.24.0", - "@esbuild/win32-arm64": "0.24.0", - "@esbuild/win32-ia32": "0.24.0", - "@esbuild/win32-x64": "0.24.0" + "@polkadot/api": "^16.5.1", + "@polkadot/api-contract": "^16.5.1", + "@polkadot/keyring": "^13.5.7", + "@polkadot/util-crypto": "^13.5.7", + "dotenv": "^17.2.3" } }, - "node_modules/execa": { - "version": "9.5.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-9.5.1.tgz", - "integrity": "sha512-QY5PPtSonnGwhhHDNI7+3RvY285c7iuJFFB+lU+oEzMY/gEGJ808owqJsrr8Otd1E/x07po1LkUBmdAc5duPAg==", - "license": "MIT", + "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==", "dependencies": { - "@sindresorhus/merge-streams": "^4.0.0", - "cross-spawn": "^7.0.3", - "figures": "^6.1.0", - "get-stream": "^9.0.0", - "human-signals": "^8.0.0", - "is-plain-obj": "^4.1.0", - "is-stream": "^4.0.1", - "npm-run-path": "^6.0.0", - "pretty-ms": "^9.0.0", - "signal-exit": "^4.1.0", - "strip-final-newline": "^4.0.0", - "yoctocolors": "^2.0.0" + "@noble/hashes": "1.8.0" }, "engines": { - "node": "^18.19.0 || >=20.5.0" + "node": "^14.21.3 || >=16" }, "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/fdir": { - "version": "6.4.2", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.2.tgz", - "integrity": "sha512-KnhMXsKSPZlAhp7+IjUkRZKPb4fUyccpDrdFXbi4QL1qkmFh9kVY09Yox+n4MaOb3lHZ1Tv829C3oaaXoMYPDQ==", - "license": "MIT", - "peerDependencies": { - "picomatch": "^3 || ^4" - }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } + "url": "https://paulmillr.com/funding/" } }, - "node_modules/figures": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-6.1.0.tgz", - "integrity": "sha512-d+l3qxjSesT4V7v2fh+QnmFnUWv9lSpjarhShNTgBOfA0ttejbQUAlHLitbjkoRiDulW0OPoQPYIGhIC8ohejg==", - "license": "MIT", - "dependencies": { - "is-unicode-supported": "^2.0.0" - }, + "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==", "engines": { - "node": ">=18" + "node": "^14.21.3 || >=16" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://paulmillr.com/funding/" } }, - "node_modules/foreground-child": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", - "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", - "license": "ISC", - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } + "node_modules/@polkadot-api/json-rpc-provider": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/@polkadot-api/json-rpc-provider/-/json-rpc-provider-0.0.1.tgz", + "integrity": "sha512-/SMC/l7foRjpykLTUTacIH05H3mr9ip8b5xxfwXlVezXrNVLp3Cv0GX6uItkKd+ZjzVPf3PFrDF2B2/HLSNESA==", + "optional": true }, - "node_modules/fs.promises.exists": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/fs.promises.exists/-/fs.promises.exists-1.1.4.tgz", - "integrity": "sha512-lJzUGWbZn8vhGWBedA+RYjB/BeJ+3458ljUfmplqhIeb6ewzTFWNPCR1HCiYCkXV9zxcHz9zXkJzMsEgDLzh3Q==", - "license": "MIT", - "funding": { - "url": "https://github.com/privatenumber/fs.promises.exists?sponsor=1" - } + "node_modules/@polkadot-api/json-rpc-provider-proxy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@polkadot-api/json-rpc-provider-proxy/-/json-rpc-provider-proxy-0.1.0.tgz", + "integrity": "sha512-8GSFE5+EF73MCuLQm8tjrbCqlgclcHBSRaswvXziJ0ZW7iw3UEMsKkkKvELayWyBuOPa2T5i1nj6gFOeIsqvrg==", + "optional": true }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "hasInstallScript": true, - "license": "MIT", + "node_modules/@polkadot-api/metadata-builders": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@polkadot-api/metadata-builders/-/metadata-builders-0.3.2.tgz", + "integrity": "sha512-TKpfoT6vTb+513KDzMBTfCb/ORdgRnsS3TDFpOhAhZ08ikvK+hjHMt5plPiAX/OWkm1Wc9I3+K6W0hX5Ab7MVg==", "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/get-east-asian-width": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.3.0.tgz", - "integrity": "sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/get-stream": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-9.0.1.tgz", - "integrity": "sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA==", - "license": "MIT", "dependencies": { - "@sec-ant/readable-stream": "^0.4.1", - "is-stream": "^4.0.1" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "@polkadot-api/substrate-bindings": "0.6.0", + "@polkadot-api/utils": "0.1.0" } }, - "node_modules/glob": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", - "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", - "license": "ISC", + "node_modules/@polkadot-api/observable-client": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@polkadot-api/observable-client/-/observable-client-0.3.2.tgz", + "integrity": "sha512-HGgqWgEutVyOBXoGOPp4+IAq6CNdK/3MfQJmhCJb8YaJiaK4W6aRGrdQuQSTPHfERHCARt9BrOmEvTXAT257Ug==", + "optional": true, "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" + "@polkadot-api/metadata-builders": "0.3.2", + "@polkadot-api/substrate-bindings": "0.6.0", + "@polkadot-api/utils": "0.1.0" }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "peerDependencies": { + "@polkadot-api/substrate-client": "0.1.4", + "rxjs": ">=7.8.0" } }, - "node_modules/hosted-git-info": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-7.0.2.tgz", - "integrity": "sha512-puUZAUKT5m8Zzvs72XWy3HtvVbTWljRE66cP60bxJzAqf2DgICo7lYTY2IHUmLnNpjYvw5bvmoHvPc0QO2a62w==", - "license": "ISC", + "node_modules/@polkadot-api/substrate-bindings": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@polkadot-api/substrate-bindings/-/substrate-bindings-0.6.0.tgz", + "integrity": "sha512-lGuhE74NA1/PqdN7fKFdE5C1gNYX357j1tWzdlPXI0kQ7h3kN0zfxNOpPUN7dIrPcOFZ6C0tRRVrBylXkI6xPw==", + "optional": true, "dependencies": { - "lru-cache": "^10.0.1" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/human-signals": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-8.0.0.tgz", - "integrity": "sha512-/1/GPCpDUCCYwlERiYjxoczfP0zfvZMU/OWgQPMya9AbAE24vseigFdhAMObpc8Q4lc/kjutPfUddDYyAmejnA==", - "license": "Apache-2.0", - "engines": { - "node": ">=18.18.0" + "@noble/hashes": "^1.3.1", + "@polkadot-api/utils": "0.1.0", + "@scure/base": "^1.1.1", + "scale-ts": "^1.6.0" } }, - "node_modules/imurmurhash": { + "node_modules/@polkadot-api/substrate-client": { "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/index-to-position": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/index-to-position/-/index-to-position-0.1.2.tgz", - "integrity": "sha512-MWDKS3AS1bGCHLBA2VLImJz42f7bJh8wQsTGCzI3j519/CASStoDONUBVz2I/VID0MpiX3SGSnbOD2xUalbE5g==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-interactive": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-2.0.0.tgz", - "integrity": "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-plain-obj": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", - "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-stream": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-4.0.1.tgz", - "integrity": "sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-unicode-supported": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-2.1.0.tgz", - "integrity": "sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "license": "ISC" - }, - "node_modules/jackspeak": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", - "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", - "license": "BlueOak-1.0.0", - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" - } - }, - "node_modules/joycon": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz", - "integrity": "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==", - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "license": "MIT" - }, - "node_modules/lilconfig": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.2.tgz", - "integrity": "sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==", - "license": "MIT", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/antonk52" - } - }, - "node_modules/lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "license": "MIT" - }, - "node_modules/load-tsconfig": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/load-tsconfig/-/load-tsconfig-0.2.5.tgz", - "integrity": "sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==", - "license": "MIT", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - } - }, - "node_modules/lodash.sortby": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", - "integrity": "sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==", - "license": "MIT" - }, - "node_modules/log-symbols": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-6.0.0.tgz", - "integrity": "sha512-i24m8rpwhmPIS4zscNzK6MSEhk0DUWa/8iYQWxhffV8jkI4Phvs3F+quL5xvS0gdQR0FyTCMMH33Y78dDTzzIw==", - "license": "MIT", - "dependencies": { - "chalk": "^5.3.0", - "is-unicode-supported": "^1.3.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/log-symbols/node_modules/is-unicode-supported": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz", - "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", - "license": "ISC" - }, - "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, - "license": "ISC" - }, - "node_modules/mimic-function": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz", - "integrity": "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/minipass": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", - "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", - "license": "ISC", - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "license": "MIT" - }, - "node_modules/mz": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", - "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", - "license": "MIT", - "dependencies": { - "any-promise": "^1.0.0", - "object-assign": "^4.0.1", - "thenify-all": "^1.0.0" - } - }, - "node_modules/normalize-package-data": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-6.0.2.tgz", - "integrity": "sha512-V6gygoYb/5EmNI+MEGrWkC+e6+Rr7mTmfHrxDbLzxQogBkgzo76rkok0Am6thgSF7Mv2nLOajAJj5vDJZEFn7g==", - "license": "BSD-2-Clause", + "resolved": "https://registry.npmjs.org/@polkadot-api/substrate-client/-/substrate-client-0.1.4.tgz", + "integrity": "sha512-MljrPobN0ZWTpn++da9vOvt+Ex+NlqTlr/XT7zi9sqPtDJiQcYl+d29hFAgpaeTqbeQKZwz3WDE9xcEfLE8c5A==", + "optional": true, "dependencies": { - "hosted-git-info": "^7.0.0", - "semver": "^7.3.5", - "validate-npm-package-license": "^3.0.4" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" + "@polkadot-api/json-rpc-provider": "0.0.1", + "@polkadot-api/utils": "0.1.0" } }, - "node_modules/npm-run-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-6.0.0.tgz", - "integrity": "sha512-9qny7Z9DsQU8Ou39ERsPU4OZQlSTP47ShQzuKZ6PRXpYLtIFgl/DEBYEXKlvcEa+9tHVcK8CF81Y2V72qaZhWA==", - "license": "MIT", - "dependencies": { - "path-key": "^4.0.0", - "unicorn-magic": "^0.3.0" + "node_modules/@polkadot-api/utils": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@polkadot-api/utils/-/utils-0.1.0.tgz", + "integrity": "sha512-MXzWZeuGxKizPx2Xf/47wx9sr/uxKw39bVJUptTJdsaQn/TGq+z310mHzf1RCGvC1diHM8f593KrnDgc9oNbJA==", + "optional": true + }, + "node_modules/@polkadot/api": { + "version": "16.5.1", + "resolved": "https://registry.npmjs.org/@polkadot/api/-/api-16.5.1.tgz", + "integrity": "sha512-/wv8V01n1pmwg8+Zt9ADyoYjfoxXJ+fmJijKqiGDPor9Ln4vCOSYRIZxv9vliB5MfA1G/qnOS3tk3d+4kVmBqQ==", + "dependencies": { + "@polkadot/api-augment": "16.5.1", + "@polkadot/api-base": "16.5.1", + "@polkadot/api-derive": "16.5.1", + "@polkadot/keyring": "^13.5.7", + "@polkadot/rpc-augment": "16.5.1", + "@polkadot/rpc-core": "16.5.1", + "@polkadot/rpc-provider": "16.5.1", + "@polkadot/types": "16.5.1", + "@polkadot/types-augment": "16.5.1", + "@polkadot/types-codec": "16.5.1", + "@polkadot/types-create": "16.5.1", + "@polkadot/types-known": "16.5.1", + "@polkadot/util": "^13.5.7", + "@polkadot/util-crypto": "^13.5.7", + "eventemitter3": "^5.0.1", + "rxjs": "^7.8.1", + "tslib": "^2.8.1" }, "engines": { "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/npm-run-path/node_modules/path-key": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", - "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" } }, - "node_modules/onetime": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz", - "integrity": "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==", - "license": "MIT", + "node_modules/@polkadot/api-augment": { + "version": "16.5.1", + "resolved": "https://registry.npmjs.org/@polkadot/api-augment/-/api-augment-16.5.1.tgz", + "integrity": "sha512-Ht5POi1KLdNeyPNtfHIf1m0Bt7NLv8VGmZneltLzZ/lF3LA6io5eEttRzobKw52qzFUtkD6gfTLInrzpfJHthg==", "dependencies": { - "mimic-function": "^5.0.0" + "@polkadot/api-base": "16.5.1", + "@polkadot/rpc-augment": "16.5.1", + "@polkadot/types": "16.5.1", + "@polkadot/types-augment": "16.5.1", + "@polkadot/types-codec": "16.5.1", + "@polkadot/util": "^13.5.7", + "tslib": "^2.8.1" }, "engines": { "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/ora": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/ora/-/ora-8.1.1.tgz", - "integrity": "sha512-YWielGi1XzG1UTvOaCFaNgEnuhZVMSHYkW/FQ7UX8O26PtlpdM84c0f7wLPlkvx2RfiQmnzd61d/MGxmpQeJPw==", - "license": "MIT", + "node_modules/@polkadot/api-base": { + "version": "16.5.1", + "resolved": "https://registry.npmjs.org/@polkadot/api-base/-/api-base-16.5.1.tgz", + "integrity": "sha512-oUMxiW2BgaQHmS5N4JlVbTo3cGCGPWbLd44mOjiYYAs+dBpm6QoQ3WsI1anfwRt5GXH7IvLLByJR7MhcmGS9lQ==", "dependencies": { - "chalk": "^5.3.0", - "cli-cursor": "^5.0.0", - "cli-spinners": "^2.9.2", - "is-interactive": "^2.0.0", - "is-unicode-supported": "^2.0.0", - "log-symbols": "^6.0.0", - "stdin-discarder": "^0.2.2", - "string-width": "^7.2.0", - "strip-ansi": "^7.1.0" + "@polkadot/rpc-core": "16.5.1", + "@polkadot/types": "16.5.1", + "@polkadot/util": "^13.5.7", + "rxjs": "^7.8.1", + "tslib": "^2.8.1" }, "engines": { "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/package-json-from-dist": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", - "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", - "license": "BlueOak-1.0.0" - }, - "node_modules/parse-json": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-8.1.0.tgz", - "integrity": "sha512-rum1bPifK5SSar35Z6EKZuYPJx85pkNaFrxBK3mwdfSJ1/WKbYrjoW/zTPSjRRamfmVX1ACBIdFAO0VRErW/EA==", - "license": "MIT", + "node_modules/@polkadot/api-contract": { + "version": "16.5.1", + "resolved": "https://registry.npmjs.org/@polkadot/api-contract/-/api-contract-16.5.1.tgz", + "integrity": "sha512-PzexnQEX44jKvqOosBOWOLhsrlKkINHsXEJzdznx23Ba4xswh2Gz+USKmII7fETkAL9hm2A5qhu+lMcUNRoIZg==", "dependencies": { - "@babel/code-frame": "^7.22.13", - "index-to-position": "^0.1.2", - "type-fest": "^4.7.1" - }, - "engines": { - "node": ">=18" + "@polkadot/api": "16.5.1", + "@polkadot/api-augment": "16.5.1", + "@polkadot/types": "16.5.1", + "@polkadot/types-codec": "16.5.1", + "@polkadot/types-create": "16.5.1", + "@polkadot/util": "^13.5.7", + "@polkadot/util-crypto": "^13.5.7", + "rxjs": "^7.8.1", + "tslib": "^2.8.1" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/parse-ms": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-4.0.0.tgz", - "integrity": "sha512-TXfryirbmq34y8QBwgqCVLi+8oA3oWx2eAnSn62ITyEhEYaWRlVZ2DvMM9eZbMs/RfxPu/PK/aBLyGj4IrqMHw==", - "license": "MIT", "engines": { "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-scurry": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", - "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", - "license": "BlueOak-1.0.0", - "dependencies": { - "lru-cache": "^10.2.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, - "engines": { - "node": ">=16 || 14 >=14.18" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/picocolors": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "license": "ISC" - }, - "node_modules/picomatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", - "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pirates": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", - "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "node_modules/polkadot-api": { - "version": "1.7.7", - "resolved": "https://registry.npmjs.org/polkadot-api/-/polkadot-api-1.7.7.tgz", - "integrity": "sha512-W6YmA4LhPVv2xhp5dKHM/lZp0fclpaKvspR0h+TBANNdUpBp5aAxq6qdkPAZ4sWTC6Rfi+j5PZZP88oQweOHWg==", - "license": "MIT", - "dependencies": { - "@polkadot-api/cli": "0.9.21", - "@polkadot-api/ink-contracts": "0.2.2", - "@polkadot-api/json-rpc-provider": "0.0.4", - "@polkadot-api/known-chains": "0.5.8", - "@polkadot-api/logs-provider": "0.0.6", - "@polkadot-api/metadata-builders": "0.9.2", - "@polkadot-api/metadata-compatibility": "0.1.12", - "@polkadot-api/observable-client": "0.6.3", - "@polkadot-api/pjs-signer": "0.6.1", - "@polkadot-api/polkadot-sdk-compat": "2.3.1", - "@polkadot-api/polkadot-signer": "0.1.6", - "@polkadot-api/signer": "0.1.11", - "@polkadot-api/sm-provider": "0.1.7", - "@polkadot-api/smoldot": "0.3.7", - "@polkadot-api/substrate-bindings": "0.9.4", - "@polkadot-api/substrate-client": "0.3.0", - "@polkadot-api/utils": "0.1.2", - "@polkadot-api/ws-provider": "0.3.6" - }, - "bin": { - "papi": "bin/cli.mjs", - "polkadot-api": "bin/cli.mjs" - }, - "peerDependencies": { - "rxjs": ">=7.8.0" } }, - "node_modules/postcss-load-config": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-6.0.1.tgz", - "integrity": "sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", + "node_modules/@polkadot/api-derive": { + "version": "16.5.1", + "resolved": "https://registry.npmjs.org/@polkadot/api-derive/-/api-derive-16.5.1.tgz", + "integrity": "sha512-OUyCkadl08qLevVnhkfhna/qlwElJV3auIXp4JvmagU8SDk/8b4yyyrhm3qidp5qLMu+2za332sFj4vKE0O4/Q==", "dependencies": { - "lilconfig": "^3.1.1" + "@polkadot/api": "16.5.1", + "@polkadot/api-augment": "16.5.1", + "@polkadot/api-base": "16.5.1", + "@polkadot/rpc-core": "16.5.1", + "@polkadot/types": "16.5.1", + "@polkadot/types-codec": "16.5.1", + "@polkadot/util": "^13.5.7", + "@polkadot/util-crypto": "^13.5.7", + "rxjs": "^7.8.1", + "tslib": "^2.8.1" }, "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "jiti": ">=1.21.0", - "postcss": ">=8.0.9", - "tsx": "^4.8.1", - "yaml": "^2.4.2" - }, - "peerDependenciesMeta": { - "jiti": { - "optional": true - }, - "postcss": { - "optional": true - }, - "tsx": { - "optional": true - }, - "yaml": { - "optional": true - } + "node": ">=18" } }, - "node_modules/pretty-ms": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-9.2.0.tgz", - "integrity": "sha512-4yf0QO/sllf/1zbZWYnvWw3NxCQwLXKzIj0G849LSufP15BXKM0rbD2Z3wVnkMfjdn/CB0Dpp444gYAACdsplg==", - "license": "MIT", + "node_modules/@polkadot/keyring": { + "version": "13.5.7", + "resolved": "https://registry.npmjs.org/@polkadot/keyring/-/keyring-13.5.7.tgz", + "integrity": "sha512-S75K2m2AoiTMnns7ko3t72jvyJRmrqdFFPldLdPdjRuds+E8OFewcwms/aXHGn9IwViWHFX6PSx0QAzWN/qWzQ==", "dependencies": { - "parse-ms": "^4.0.0" + "@polkadot/util": "13.5.7", + "@polkadot/util-crypto": "13.5.7", + "tslib": "^2.8.0" }, "engines": { "node": ">=18" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "peerDependencies": { + "@polkadot/util": "13.5.7", + "@polkadot/util-crypto": "13.5.7" } }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "license": "MIT", + "node_modules/@polkadot/networks": { + "version": "13.5.7", + "resolved": "https://registry.npmjs.org/@polkadot/networks/-/networks-13.5.7.tgz", + "integrity": "sha512-RdQcgaPy68NRSI7UTBdxr1aw66MXVdbpGhpWQpLf3/7puUdwkem6KxqFNnC9/kJSXRlyYGeYHN9Hsf4+CTWBSQ==", + "dependencies": { + "@polkadot/util": "13.5.7", + "@substrate/ss58-registry": "^1.51.0", + "tslib": "^2.8.0" + }, "engines": { - "node": ">=6" + "node": ">=18" } }, - "node_modules/read-pkg": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-9.0.1.tgz", - "integrity": "sha512-9viLL4/n1BJUCT1NXVTdS1jtm80yDEgR5T4yCelII49Mbj0v1rZdKqj7zCiYdbB0CuCgdrvHcNogAKTFPBocFA==", - "license": "MIT", + "node_modules/@polkadot/rpc-augment": { + "version": "16.5.1", + "resolved": "https://registry.npmjs.org/@polkadot/rpc-augment/-/rpc-augment-16.5.1.tgz", + "integrity": "sha512-dvmewrNB2YcXkYyeXYX/GgaJV6tIT6/LJfhvDDLAOnjXpvZbbOvlWQRK0eiUdK5D1pRS5UbQLNegPCIWmMBpNg==", "dependencies": { - "@types/normalize-package-data": "^2.4.3", - "normalize-package-data": "^6.0.0", - "parse-json": "^8.0.0", - "type-fest": "^4.6.0", - "unicorn-magic": "^0.1.0" + "@polkadot/rpc-core": "16.5.1", + "@polkadot/types": "16.5.1", + "@polkadot/types-codec": "16.5.1", + "@polkadot/util": "^13.5.7", + "tslib": "^2.8.1" }, "engines": { "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/read-pkg/node_modules/unicorn-magic": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.1.0.tgz", - "integrity": "sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==", - "license": "MIT", + "node_modules/@polkadot/rpc-core": { + "version": "16.5.1", + "resolved": "https://registry.npmjs.org/@polkadot/rpc-core/-/rpc-core-16.5.1.tgz", + "integrity": "sha512-cjW6YaEbmz0LZL9Ljoxn1CKxdizkARuNvgYWXdjwzXvLhngS6ROIpphN6diK0/l/YRPzFCMwjI1GdmfPF0wa5A==", + "dependencies": { + "@polkadot/rpc-augment": "16.5.1", + "@polkadot/rpc-provider": "16.5.1", + "@polkadot/types": "16.5.1", + "@polkadot/util": "^13.5.7", + "rxjs": "^7.8.1", + "tslib": "^2.8.1" + }, "engines": { "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/readdirp": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.0.2.tgz", - "integrity": "sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA==", - "license": "MIT", + "node_modules/@polkadot/rpc-provider": { + "version": "16.5.1", + "resolved": "https://registry.npmjs.org/@polkadot/rpc-provider/-/rpc-provider-16.5.1.tgz", + "integrity": "sha512-eSX8fu1yAtJn5oO6r+66vQ/hdJu/bLPFPlJHa+XXICY1Xk8G+Rff9Rbi7GCYuDbW6jjC5CR2Kct7dSWs26y2Ng==", + "dependencies": { + "@polkadot/keyring": "^13.5.7", + "@polkadot/types": "16.5.1", + "@polkadot/types-support": "16.5.1", + "@polkadot/util": "^13.5.7", + "@polkadot/util-crypto": "^13.5.7", + "@polkadot/x-fetch": "^13.5.7", + "@polkadot/x-global": "^13.5.7", + "@polkadot/x-ws": "^13.5.7", + "eventemitter3": "^5.0.1", + "mock-socket": "^9.3.1", + "nock": "^13.5.5", + "tslib": "^2.8.1" + }, "engines": { - "node": ">= 14.16.0" + "node": ">=18" }, - "funding": { - "type": "individual", - "url": "https://paulmillr.com/funding/" + "optionalDependencies": { + "@substrate/connect": "0.8.11" } }, - "node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "license": "MIT", + "node_modules/@polkadot/types": { + "version": "16.5.1", + "resolved": "https://registry.npmjs.org/@polkadot/types/-/types-16.5.1.tgz", + "integrity": "sha512-/m+5DL9/xzGGBweJ80+i6Suz7ISBV5hOGh7i68YY6CPD+StWvUCY7Et0a0Tli5vq9yTZldBQ7DAOmJ99Pigvgg==", + "dependencies": { + "@polkadot/keyring": "^13.5.7", + "@polkadot/types-augment": "16.5.1", + "@polkadot/types-codec": "16.5.1", + "@polkadot/types-create": "16.5.1", + "@polkadot/util": "^13.5.7", + "@polkadot/util-crypto": "^13.5.7", + "rxjs": "^7.8.1", + "tslib": "^2.8.1" + }, "engines": { - "node": ">=8" + "node": ">=18" } }, - "node_modules/restore-cursor": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz", - "integrity": "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==", - "license": "MIT", + "node_modules/@polkadot/types-augment": { + "version": "16.5.1", + "resolved": "https://registry.npmjs.org/@polkadot/types-augment/-/types-augment-16.5.1.tgz", + "integrity": "sha512-kEXNVG584rRYFrYJewVaVcB5Lhgf9F0Lcpek9dghLESlkCA92+UASB09wBDb2HT2hS7pBzEwQD3iKj9N2UpQcg==", "dependencies": { - "onetime": "^7.0.0", - "signal-exit": "^4.1.0" + "@polkadot/types": "16.5.1", + "@polkadot/types-codec": "16.5.1", + "@polkadot/util": "^13.5.7", + "tslib": "^2.8.1" }, "engines": { "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/rollup": { - "version": "4.27.4", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.27.4.tgz", - "integrity": "sha512-RLKxqHEMjh/RGLsDxAEsaLO3mWgyoU6x9w6n1ikAzet4B3gI2/3yP6PWY2p9QzRTh6MfEIXB3MwsOY0Iv3vNrw==", - "license": "MIT", + "node_modules/@polkadot/types-codec": { + "version": "16.5.1", + "resolved": "https://registry.npmjs.org/@polkadot/types-codec/-/types-codec-16.5.1.tgz", + "integrity": "sha512-TGdxa3S5DhqT+PtxEVqBD4gKXdxyGjouyBOUq7vFheew316oE3gN+3FJH0XcxQe8EqQgl+CWcn+Z+nz1rIIvoQ==", "dependencies": { - "@types/estree": "1.0.6" - }, - "bin": { - "rollup": "dist/bin/rollup" + "@polkadot/util": "^13.5.7", + "@polkadot/x-bigint": "^13.5.7", + "tslib": "^2.8.1" }, "engines": { - "node": ">=18.0.0", - "npm": ">=8.0.0" - }, - "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.27.4", - "@rollup/rollup-android-arm64": "4.27.4", - "@rollup/rollup-darwin-arm64": "4.27.4", - "@rollup/rollup-darwin-x64": "4.27.4", - "@rollup/rollup-freebsd-arm64": "4.27.4", - "@rollup/rollup-freebsd-x64": "4.27.4", - "@rollup/rollup-linux-arm-gnueabihf": "4.27.4", - "@rollup/rollup-linux-arm-musleabihf": "4.27.4", - "@rollup/rollup-linux-arm64-gnu": "4.27.4", - "@rollup/rollup-linux-arm64-musl": "4.27.4", - "@rollup/rollup-linux-powerpc64le-gnu": "4.27.4", - "@rollup/rollup-linux-riscv64-gnu": "4.27.4", - "@rollup/rollup-linux-s390x-gnu": "4.27.4", - "@rollup/rollup-linux-x64-gnu": "4.27.4", - "@rollup/rollup-linux-x64-musl": "4.27.4", - "@rollup/rollup-win32-arm64-msvc": "4.27.4", - "@rollup/rollup-win32-ia32-msvc": "4.27.4", - "@rollup/rollup-win32-x64-msvc": "4.27.4", - "fsevents": "~2.3.2" + "node": ">=18" } }, - "node_modules/rxjs": { - "version": "7.8.1", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", - "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", - "license": "Apache-2.0", + "node_modules/@polkadot/types-create": { + "version": "16.5.1", + "resolved": "https://registry.npmjs.org/@polkadot/types-create/-/types-create-16.5.1.tgz", + "integrity": "sha512-HEnPwsItU5Jk18AB9JEn9YRZ5athf4Xpc1DVCem6TPVwH9By8bWxiAwNtGql3QDjxSL3i9zpaukI8JLX1zcqOg==", "dependencies": { - "tslib": "^2.1.0" + "@polkadot/types-codec": "16.5.1", + "@polkadot/util": "^13.5.7", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=18" } }, - "node_modules/scale-ts": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/scale-ts/-/scale-ts-1.6.1.tgz", - "integrity": "sha512-PBMc2AWc6wSEqJYBDPcyCLUj9/tMKnLX70jLOSndMtcUoLQucP/DM0vnQo1wJAYjTrQiq8iG9rD0q6wFzgjH7g==", - "license": "MIT" - }, - "node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" + "node_modules/@polkadot/types-known": { + "version": "16.5.1", + "resolved": "https://registry.npmjs.org/@polkadot/types-known/-/types-known-16.5.1.tgz", + "integrity": "sha512-/kYFXUQcThqLMDHGmOgnJ8097wjYYPapWf9pprakRl085bBZpwuoVOmu1sQduI1Fl5XkMNmNxZKUoLrFECTyNQ==", + "dependencies": { + "@polkadot/networks": "^13.5.7", + "@polkadot/types": "16.5.1", + "@polkadot/types-codec": "16.5.1", + "@polkadot/types-create": "16.5.1", + "@polkadot/util": "^13.5.7", + "tslib": "^2.8.1" }, "engines": { - "node": ">=10" + "node": ">=18" } }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "license": "MIT", + "node_modules/@polkadot/types-support": { + "version": "16.5.1", + "resolved": "https://registry.npmjs.org/@polkadot/types-support/-/types-support-16.5.1.tgz", + "integrity": "sha512-Q1z0e1hT8e7cY5tmBkvMxTMfmR1OU5T+6UeM10SeHko6UAe/eDCQObZ/OOT2XOgzPnQGJ2sHTihXdDBYr8dTNA==", "dependencies": { - "shebang-regex": "^3.0.0" + "@polkadot/util": "^13.5.7", + "tslib": "^2.8.1" }, "engines": { - "node": ">=8" + "node": ">=18" } }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "license": "MIT", + "node_modules/@polkadot/util": { + "version": "13.5.7", + "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-13.5.7.tgz", + "integrity": "sha512-5Rhp6/FDI55iCJcGd/9bMQaF0E26OE+uZwz68JuRW75DW8v7zsN3bnjnVqk3KO/c4u5EgLSqbhXPuyW24BP1+Q==", + "dependencies": { + "@polkadot/x-bigint": "13.5.7", + "@polkadot/x-global": "13.5.7", + "@polkadot/x-textdecoder": "13.5.7", + "@polkadot/x-textencoder": "13.5.7", + "@types/bn.js": "^5.1.6", + "bn.js": "^5.2.1", + "tslib": "^2.8.0" + }, "engines": { - "node": ">=8" + "node": ">=18" } }, - "node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "license": "ISC", + "node_modules/@polkadot/util-crypto": { + "version": "13.5.7", + "resolved": "https://registry.npmjs.org/@polkadot/util-crypto/-/util-crypto-13.5.7.tgz", + "integrity": "sha512-SNzfAmtSSfUnQesrGLxc1RDg1arsvFSsAkH0xulffByqJfLugB3rZWJXIKqKNfcRZtomsMMURPeW7lfpAomSug==", + "dependencies": { + "@noble/curves": "^1.3.0", + "@noble/hashes": "^1.3.3", + "@polkadot/networks": "13.5.7", + "@polkadot/util": "13.5.7", + "@polkadot/wasm-crypto": "^7.5.1", + "@polkadot/wasm-util": "^7.5.1", + "@polkadot/x-bigint": "13.5.7", + "@polkadot/x-randomvalues": "13.5.7", + "@scure/base": "^1.1.7", + "tslib": "^2.8.0" + }, "engines": { - "node": ">=14" + "node": ">=18" }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "peerDependencies": { + "@polkadot/util": "13.5.7" } }, - "node_modules/smoldot": { - "version": "2.0.33", - "resolved": "https://registry.npmjs.org/smoldot/-/smoldot-2.0.33.tgz", - "integrity": "sha512-EnGqFb2oJSYjR04WsvL4tZNPrkdSiScBk3yQUhvWwJqpJ2bBu8Sq/hQgyVB20J1NxJ6FL0cgldjnGJmH1iQCTg==", - "license": "GPL-3.0-or-later WITH Classpath-exception-2.0", + "node_modules/@polkadot/wasm-bridge": { + "version": "7.5.1", + "resolved": "https://registry.npmjs.org/@polkadot/wasm-bridge/-/wasm-bridge-7.5.1.tgz", + "integrity": "sha512-E+N3CSnX3YaXpAmfIQ+4bTyiAqJQKvVcMaXjkuL8Tp2zYffClWLG5e+RY15Uh+EWfUl9If4y6cLZi3D5NcpAGQ==", "dependencies": { - "ws": "^8.8.1" + "@polkadot/wasm-util": "7.5.1", + "tslib": "^2.7.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@polkadot/util": "*", + "@polkadot/x-randomvalues": "*" } }, - "node_modules/sort-keys": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-5.1.0.tgz", - "integrity": "sha512-aSbHV0DaBcr7u0PVHXzM6NbZNAtrr9sF6+Qfs9UUVG7Ll3jQ6hHi8F/xqIIcn2rvIVbr0v/2zyjSdwSV47AgLQ==", - "license": "MIT", + "node_modules/@polkadot/wasm-crypto": { + "version": "7.5.1", + "resolved": "https://registry.npmjs.org/@polkadot/wasm-crypto/-/wasm-crypto-7.5.1.tgz", + "integrity": "sha512-acjt4VJ3w19v7b/SIPsV/5k9s6JsragHKPnwoZ0KTfBvAFXwzz80jUzVGxA06SKHacfCUe7vBRlz7M5oRby1Pw==", "dependencies": { - "is-plain-obj": "^4.0.0" + "@polkadot/wasm-bridge": "7.5.1", + "@polkadot/wasm-crypto-asmjs": "7.5.1", + "@polkadot/wasm-crypto-init": "7.5.1", + "@polkadot/wasm-crypto-wasm": "7.5.1", + "@polkadot/wasm-util": "7.5.1", + "tslib": "^2.7.0" }, "engines": { - "node": ">=12" + "node": ">=18" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "peerDependencies": { + "@polkadot/util": "*", + "@polkadot/x-randomvalues": "*" } }, - "node_modules/source-map": { - "version": "0.8.0-beta.0", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.8.0-beta.0.tgz", - "integrity": "sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==", - "license": "BSD-3-Clause", + "node_modules/@polkadot/wasm-crypto-asmjs": { + "version": "7.5.1", + "resolved": "https://registry.npmjs.org/@polkadot/wasm-crypto-asmjs/-/wasm-crypto-asmjs-7.5.1.tgz", + "integrity": "sha512-jAg7Uusk+xeHQ+QHEH4c/N3b1kEGBqZb51cWe+yM61kKpQwVGZhNdlWetW6U23t/BMyZArIWMsZqmK/Ij0PHog==", "dependencies": { - "whatwg-url": "^7.0.0" + "tslib": "^2.7.0" }, "engines": { - "node": ">= 8" + "node": ">=18" + }, + "peerDependencies": { + "@polkadot/util": "*" } }, - "node_modules/spdx-correct": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", - "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", - "license": "Apache-2.0", + "node_modules/@polkadot/wasm-crypto-init": { + "version": "7.5.1", + "resolved": "https://registry.npmjs.org/@polkadot/wasm-crypto-init/-/wasm-crypto-init-7.5.1.tgz", + "integrity": "sha512-Obu4ZEo5jYO6sN31eqCNOXo88rPVkP9TrUOyynuFCnXnXr8V/HlmY/YkAd9F87chZnkTJRlzak17kIWr+i7w3A==", "dependencies": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" + "@polkadot/wasm-bridge": "7.5.1", + "@polkadot/wasm-crypto-asmjs": "7.5.1", + "@polkadot/wasm-crypto-wasm": "7.5.1", + "@polkadot/wasm-util": "7.5.1", + "tslib": "^2.7.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@polkadot/util": "*", + "@polkadot/x-randomvalues": "*" } }, - "node_modules/spdx-exceptions": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", - "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", - "license": "CC-BY-3.0" - }, - "node_modules/spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "license": "MIT", + "node_modules/@polkadot/wasm-crypto-wasm": { + "version": "7.5.1", + "resolved": "https://registry.npmjs.org/@polkadot/wasm-crypto-wasm/-/wasm-crypto-wasm-7.5.1.tgz", + "integrity": "sha512-S2yQSGbOGTcaV6UdipFVyEGanJvG6uD6Tg7XubxpiGbNAblsyYKeFcxyH1qCosk/4qf+GIUwlOL4ydhosZflqg==", "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-license-ids": { - "version": "3.0.20", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.20.tgz", - "integrity": "sha512-jg25NiDV/1fLtSgEgyvVyDunvaNHbuwF9lfNV17gSmPFAlYzdfNBlLtLzXTevwkPj7DhGbmN9VnmJIgLnhvaBw==", - "license": "CC0-1.0" - }, - "node_modules/stdin-discarder": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/stdin-discarder/-/stdin-discarder-0.2.2.tgz", - "integrity": "sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ==", - "license": "MIT", + "@polkadot/wasm-util": "7.5.1", + "tslib": "^2.7.0" + }, "engines": { "node": ">=18" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "peerDependencies": { + "@polkadot/util": "*" } }, - "node_modules/string-width": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", - "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", - "license": "MIT", + "node_modules/@polkadot/wasm-util": { + "version": "7.5.1", + "resolved": "https://registry.npmjs.org/@polkadot/wasm-util/-/wasm-util-7.5.1.tgz", + "integrity": "sha512-sbvu71isFhPXpvMVX+EkRnUg/+54Tx7Sf9BEMqxxoPj7cG1I/MKeDEwbQz6MaU4gm7xJqvEWCAemLFcXfHQ/2A==", "dependencies": { - "emoji-regex": "^10.3.0", - "get-east-asian-width": "^1.0.0", - "strip-ansi": "^7.1.0" + "tslib": "^2.7.0" }, "engines": { "node": ">=18" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "peerDependencies": { + "@polkadot/util": "*" } }, - "node_modules/string-width-cjs": { - "name": "string-width", - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "license": "MIT", + "node_modules/@polkadot/x-bigint": { + "version": "13.5.7", + "resolved": "https://registry.npmjs.org/@polkadot/x-bigint/-/x-bigint-13.5.7.tgz", + "integrity": "sha512-NbN4EPbMBhjOXoWj0BVcT49/obzusFWPKbSyBxbZi8ITBaIIgpncgcCfXY4rII6Fqh74khx9jdevWge/6ycepQ==", "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "@polkadot/x-global": "13.5.7", + "tslib": "^2.8.0" }, "engines": { - "node": ">=8" + "node": ">=18" } }, - "node_modules/string-width-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "license": "MIT", + "node_modules/@polkadot/x-fetch": { + "version": "13.5.7", + "resolved": "https://registry.npmjs.org/@polkadot/x-fetch/-/x-fetch-13.5.7.tgz", + "integrity": "sha512-ZlPtWJAq7xMMr8wo9API8l6mKRr/6kClF0Hm1CVhQgZruFTZd7A2XZfETMg49yaRouy16SRI85WhIw+pXfQd3g==", + "dependencies": { + "@polkadot/x-global": "13.5.7", + "node-fetch": "^3.3.2", + "tslib": "^2.8.0" + }, "engines": { - "node": ">=8" + "node": ">=18" } }, - "node_modules/string-width-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "license": "MIT" - }, - "node_modules/string-width-cjs/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "license": "MIT", + "node_modules/@polkadot/x-global": { + "version": "13.5.7", + "resolved": "https://registry.npmjs.org/@polkadot/x-global/-/x-global-13.5.7.tgz", + "integrity": "sha512-TkBxLfeKtj0laCzXp2lvRhwSIeXSxIu7LAWpfAUW4SYNFQvtgIS0x0Bq70CUW3lcy0wqTrSG2cqzfnbomB0Djw==", "dependencies": { - "ansi-regex": "^5.0.1" + "tslib": "^2.8.0" }, "engines": { - "node": ">=8" + "node": ">=18" } }, - "node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "license": "MIT", + "node_modules/@polkadot/x-randomvalues": { + "version": "13.5.7", + "resolved": "https://registry.npmjs.org/@polkadot/x-randomvalues/-/x-randomvalues-13.5.7.tgz", + "integrity": "sha512-NEElpdu+Wqlr6USoh3abQfe0MaWlFlynPiqkA0/SJjK+0V0UOw0CyPwPgGrGa71/ju+1bsnu/ySshXqCR8HXTw==", "dependencies": { - "ansi-regex": "^6.0.1" + "@polkadot/x-global": "13.5.7", + "tslib": "^2.8.0" }, "engines": { - "node": ">=12" + "node": ">=18" }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" + "peerDependencies": { + "@polkadot/util": "13.5.7", + "@polkadot/wasm-util": "*" } }, - "node_modules/strip-ansi-cjs": { - "name": "strip-ansi", - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "license": "MIT", + "node_modules/@polkadot/x-textdecoder": { + "version": "13.5.7", + "resolved": "https://registry.npmjs.org/@polkadot/x-textdecoder/-/x-textdecoder-13.5.7.tgz", + "integrity": "sha512-wjSj+T2pBA1uW9dDYriZMAv4WgXl5zcWblxwOsZd3V/qxifMSlSLAy0WeC+08DD6TXGQYCOU0uOALsDivkUDZA==", "dependencies": { - "ansi-regex": "^5.0.1" + "@polkadot/x-global": "13.5.7", + "tslib": "^2.8.0" }, "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "license": "MIT", - "engines": { - "node": ">=8" + "node": ">=18" } }, - "node_modules/strip-final-newline": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-4.0.0.tgz", - "integrity": "sha512-aulFJcD6YK8V1G7iRB5tigAP4TsHBZZrOV8pjV++zdUwmeV8uzbY7yn6h9MswN62adStNZFuCIx4haBnRuMDaw==", - "license": "MIT", + "node_modules/@polkadot/x-textencoder": { + "version": "13.5.7", + "resolved": "https://registry.npmjs.org/@polkadot/x-textencoder/-/x-textencoder-13.5.7.tgz", + "integrity": "sha512-h6RsGUY8ZZrfqsbojD1VqTqmXcojDSfbXQHhVcAWqgceeh9JOOw8Q6yzhv+KpPelqKq/map3bobJaebQ8QNTMw==", + "dependencies": { + "@polkadot/x-global": "13.5.7", + "tslib": "^2.8.0" + }, "engines": { "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/sucrase": { - "version": "3.35.0", - "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.0.tgz", - "integrity": "sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==", - "license": "MIT", + "node_modules/@polkadot/x-ws": { + "version": "13.5.7", + "resolved": "https://registry.npmjs.org/@polkadot/x-ws/-/x-ws-13.5.7.tgz", + "integrity": "sha512-ZdmFhL3gDMRxJXqN7a88BIU1sm2IgAFnn+jMcjjJXwP5qEuP9ejwPHQL0EFOw6sqtylfQUFuWvahvIZT7MbQ5g==", "dependencies": { - "@jridgewell/gen-mapping": "^0.3.2", - "commander": "^4.0.0", - "glob": "^10.3.10", - "lines-and-columns": "^1.1.6", - "mz": "^2.7.0", - "pirates": "^4.0.1", - "ts-interface-checker": "^0.1.9" - }, - "bin": { - "sucrase": "bin/sucrase", - "sucrase-node": "bin/sucrase-node" + "@polkadot/x-global": "13.5.7", + "tslib": "^2.8.0", + "ws": "^8.18.0" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">=18" } }, - "node_modules/sucrase/node_modules/commander": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", - "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", - "license": "MIT", - "engines": { - "node": ">= 6" + "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==", + "funding": { + "url": "https://paulmillr.com/funding/" } }, - "node_modules/thenify": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", - "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", - "license": "MIT", + "node_modules/@substrate/connect": { + "version": "0.8.11", + "resolved": "https://registry.npmjs.org/@substrate/connect/-/connect-0.8.11.tgz", + "integrity": "sha512-ofLs1PAO9AtDdPbdyTYj217Pe+lBfTLltdHDs3ds8no0BseoLeAGxpz1mHfi7zB4IxI3YyAiLjH6U8cw4pj4Nw==", + "deprecated": "versions below 1.x are no longer maintained", + "optional": true, "dependencies": { - "any-promise": "^1.0.0" + "@substrate/connect-extension-protocol": "^2.0.0", + "@substrate/connect-known-chains": "^1.1.5", + "@substrate/light-client-extension-helpers": "^1.0.0", + "smoldot": "2.0.26" } }, - "node_modules/thenify-all": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", - "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", - "license": "MIT", - "dependencies": { - "thenify": ">= 3.1.0 < 4" - }, - "engines": { - "node": ">=0.8" - } + "node_modules/@substrate/connect-extension-protocol": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@substrate/connect-extension-protocol/-/connect-extension-protocol-2.2.2.tgz", + "integrity": "sha512-t66jwrXA0s5Goq82ZtjagLNd7DPGCNjHeehRlE/gcJmJ+G56C0W+2plqOMRicJ8XGR1/YFnUSEqUFiSNbjGrAA==", + "optional": true }, - "node_modules/tinyexec": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.1.tgz", - "integrity": "sha512-WiCJLEECkO18gwqIp6+hJg0//p23HXp4S+gGtAKu3mI2F2/sXC4FvHvXvB0zJVVaTPhx1/tOwdbRsa1sOBIKqQ==", - "license": "MIT" - }, - "node_modules/tinyglobby": { - "version": "0.2.10", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.10.tgz", - "integrity": "sha512-Zc+8eJlFMvgatPZTl6A9L/yht8QqdmUNtURHaKZLmKBE12hNPSrqNkUp2cs3M/UKmNVVAMFQYSjYIVHDjW5zew==", - "license": "MIT", + "node_modules/@substrate/connect-known-chains": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/@substrate/connect-known-chains/-/connect-known-chains-1.10.3.tgz", + "integrity": "sha512-OJEZO1Pagtb6bNE3wCikc2wrmvEU5x7GxFFLqqbz1AJYYxSlrPCGu4N2og5YTExo4IcloNMQYFRkBGue0BKZ4w==", + "optional": true + }, + "node_modules/@substrate/light-client-extension-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@substrate/light-client-extension-helpers/-/light-client-extension-helpers-1.0.0.tgz", + "integrity": "sha512-TdKlni1mBBZptOaeVrKnusMg/UBpWUORNDv5fdCaJklP4RJiFOzBCrzC+CyVI5kQzsXBisZ+2pXm+rIjS38kHg==", + "optional": true, "dependencies": { - "fdir": "^6.4.2", - "picomatch": "^4.0.2" + "@polkadot-api/json-rpc-provider": "^0.0.1", + "@polkadot-api/json-rpc-provider-proxy": "^0.1.0", + "@polkadot-api/observable-client": "^0.3.0", + "@polkadot-api/substrate-client": "^0.1.2", + "@substrate/connect-extension-protocol": "^2.0.0", + "@substrate/connect-known-chains": "^1.1.5", + "rxjs": "^7.8.1" }, - "engines": { - "node": ">=12.0.0" + "peerDependencies": { + "smoldot": "2.x" } }, - "node_modules/tr46": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", - "integrity": "sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==", - "license": "MIT", - "dependencies": { - "punycode": "^2.1.0" - } + "node_modules/@substrate/ss58-registry": { + "version": "1.51.0", + "resolved": "https://registry.npmjs.org/@substrate/ss58-registry/-/ss58-registry-1.51.0.tgz", + "integrity": "sha512-TWDurLiPxndFgKjVavCniytBIw+t4ViOi7TYp9h/D0NMmkEc9klFTo+827eyEJ0lELpqO207Ey7uGxUa+BS1jQ==" }, - "node_modules/tree-kill": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", - "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", - "license": "MIT", - "bin": { - "tree-kill": "cli.js" + "node_modules/@types/bn.js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.2.0.tgz", + "integrity": "sha512-DLbJ1BPqxvQhIGbeu8VbUC1DiAiahHtAYvA0ZEAa4P31F7IaArc8z3C3BRQdWX4mtLQuABG4yzp76ZrS02Ui1Q==", + "dependencies": { + "@types/node": "*" } }, - "node_modules/ts-interface-checker": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", - "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", - "license": "Apache-2.0" - }, - "node_modules/ts-node": { - "version": "10.9.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", - "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", - "dev": true, - "license": "MIT", + "node_modules/@types/node": { + "version": "24.10.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.0.tgz", + "integrity": "sha512-qzQZRBqkFsYyaSWXuEHc2WR9c0a0CXwiE5FWUvn7ZM+vdy1uZLfCunD38UzhuB7YN/J11ndbDBcTmOdxJo9Q7A==", "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 - } + "undici-types": "~7.16.0" } }, - "node_modules/tsc-prog": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/tsc-prog/-/tsc-prog-2.3.0.tgz", - "integrity": "sha512-ycET2d75EgcX7y8EmG4KiZkLAwUzbY4xRhA6NU0uVbHkY4ZjrAAuzTMxXI85kOwATqPnBI5C/7y7rlpY0xdqHA==", - "license": "MIT", + "node_modules/bn.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.2.tgz", + "integrity": "sha512-v2YAxEmKaBLahNwE1mjp4WON6huMNeuDvagFZW+ASCuA/ku0bXR9hSMw0XpiqMoA3+rmnyck/tPRSFQkoC9Cuw==" + }, + "node_modules/data-uri-to-buffer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", + "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", "engines": { - "node": ">=12" - }, - "peerDependencies": { - "typescript": ">=4" + "node": ">= 12" } }, - "node_modules/tslib": { - "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/tsup": { - "version": "8.3.5", - "resolved": "https://registry.npmjs.org/tsup/-/tsup-8.3.5.tgz", - "integrity": "sha512-Tunf6r6m6tnZsG9GYWndg0z8dEV7fD733VBFzFJ5Vcm1FtlXB8xBD/rtrBi2a3YKEV7hHtxiZtW5EAVADoe1pA==", - "license": "MIT", + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", "dependencies": { - "bundle-require": "^5.0.0", - "cac": "^6.7.14", - "chokidar": "^4.0.1", - "consola": "^3.2.3", - "debug": "^4.3.7", - "esbuild": "^0.24.0", - "joycon": "^3.1.1", - "picocolors": "^1.1.1", - "postcss-load-config": "^6.0.1", - "resolve-from": "^5.0.0", - "rollup": "^4.24.0", - "source-map": "0.8.0-beta.0", - "sucrase": "^3.35.0", - "tinyexec": "^0.3.1", - "tinyglobby": "^0.2.9", - "tree-kill": "^1.2.2" - }, - "bin": { - "tsup": "dist/cli-default.js", - "tsup-node": "dist/cli-node.js" + "ms": "^2.1.3" }, "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@microsoft/api-extractor": "^7.36.0", - "@swc/core": "^1", - "postcss": "^8.4.12", - "typescript": ">=4.5.0" + "node": ">=6.0" }, "peerDependenciesMeta": { - "@microsoft/api-extractor": { - "optional": true - }, - "@swc/core": { - "optional": true - }, - "postcss": { - "optional": true - }, - "typescript": { + "supports-color": { "optional": true } } }, - "node_modules/type-fest": { - "version": "4.27.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.27.1.tgz", - "integrity": "sha512-3Ta7CyV6daqpwuGJMJKABaUChZZejpzysZkQg1//bLRg2wKQ4duwsg3MMIsHuElq58iDqizg4DBUmK8H8wExJg==", - "license": "(MIT OR CC0-1.0)", + "node_modules/dotenv": { + "version": "17.2.3", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.2.3.tgz", + "integrity": "sha512-JVUnt+DUIzu87TABbhPmNfVdBDt18BLOWjMUFJMSi/Qqg7NTYtabbvSNJGOJ7afbRuv9D/lngizHtP7QyLQ+9w==", "engines": { - "node": ">=16" + "node": ">=12" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://dotenvx.com" } }, - "node_modules/typescript": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", - "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } + "node_modules/eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==" }, - "node_modules/undici-types": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", - "license": "MIT" - }, - "node_modules/unicorn-magic": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.3.0.tgz", - "integrity": "sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA==", - "license": "MIT", - "engines": { - "node": ">=18" + "node_modules/fetch-blob": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", + "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "paypal", + "url": "https://paypal.me/jimmywarting" + } + ], + "dependencies": { + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": "^12.20 || >= 14.13" } }, - "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, - "license": "MIT" - }, - "node_modules/validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "license": "Apache-2.0", + "node_modules/formdata-polyfill": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", + "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", "dependencies": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" + "fetch-blob": "^3.1.2" + }, + "engines": { + "node": ">=12.20.0" } }, - "node_modules/webidl-conversions": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", - "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", - "license": "BSD-2-Clause" - }, - "node_modules/whatwg-url": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz", - "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==", - "license": "MIT", - "dependencies": { - "lodash.sortby": "^4.7.0", - "tr46": "^1.0.1", - "webidl-conversions": "^4.0.2" - } + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, + "node_modules/mock-socket": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/mock-socket/-/mock-socket-9.3.1.tgz", + "integrity": "sha512-qxBgB7Qa2sEQgHFjj0dSigq7fX4k6Saisd5Nelwp2q8mlbAFh5dHV9JTTlF8viYJLSSWgMCZFUom8PJcMNBoJw==", "engines": { "node": ">= 8" } }, - "node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, - "node_modules/wrap-ansi-cjs": { - "name": "wrap-ansi", - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "license": "MIT", + "node_modules/nock": { + "version": "13.5.6", + "resolved": "https://registry.npmjs.org/nock/-/nock-13.5.6.tgz", + "integrity": "sha512-o2zOYiCpzRqSzPj0Zt/dQ/DqZeYoaQ7TUonc/xUPjCGl9WeHpNbxgVvOquXYAaJzI0M9BXV3HTzG0p8IUAbBTQ==", "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "debug": "^4.1.0", + "json-stringify-safe": "^5.0.1", + "propagate": "^2.0.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + "node": ">= 10.13" } }, - "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "license": "MIT", + "node_modules/node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", + "deprecated": "Use your platform's native DOMException instead", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "github", + "url": "https://paypal.me/jimmywarting" + } + ], "engines": { - "node": ">=8" + "node": ">=10.5.0" } }, - "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "license": "MIT", + "node_modules/node-fetch": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", + "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", "dependencies": { - "color-convert": "^2.0.1" + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" }, "engines": { - "node": ">=8" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "type": "opencollective", + "url": "https://opencollective.com/node-fetch" } }, - "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "license": "MIT" - }, - "node_modules/wrap-ansi-cjs/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, + "node_modules/propagate": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/propagate/-/propagate-2.0.1.tgz", + "integrity": "sha512-vGrhOavPSTz4QVNuBNdcNXePNdNMaO1xj9yBeH1ScQPjk/rhg9sSlCXPhMkFuaNNW/syTvYqsnbIJxMBfRbbag==", "engines": { - "node": ">=8" + "node": ">= 8" } }, - "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "license": "MIT", + "node_modules/rxjs": { + "version": "7.8.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", + "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" + "tslib": "^2.1.0" } }, - "node_modules/wrap-ansi/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "license": "MIT" - }, - "node_modules/wrap-ansi/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "license": "MIT", - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } + "node_modules/scale-ts": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/scale-ts/-/scale-ts-1.6.1.tgz", + "integrity": "sha512-PBMc2AWc6wSEqJYBDPcyCLUj9/tMKnLX70jLOSndMtcUoLQucP/DM0vnQo1wJAYjTrQiq8iG9rD0q6wFzgjH7g==", + "optional": true }, - "node_modules/write-file-atomic": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz", - "integrity": "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==", - "license": "ISC", + "node_modules/smoldot": { + "version": "2.0.26", + "resolved": "https://registry.npmjs.org/smoldot/-/smoldot-2.0.26.tgz", + "integrity": "sha512-F+qYmH4z2s2FK+CxGj8moYcd1ekSIKH8ywkdqlOz88Dat35iB1DIYL11aILN46YSGMzQW/lbJNS307zBSDN5Ig==", + "optional": true, "dependencies": { - "imurmurhash": "^0.1.4", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "ws": "^8.8.1" } }, - "node_modules/write-json-file": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/write-json-file/-/write-json-file-6.0.0.tgz", - "integrity": "sha512-MNHcU3f9WxnNyR6MxsYSj64Jz0+dwIpisWKWq9gqLj/GwmA9INg3BZ3vt70/HB3GEwrnDQWr4RPrywnhNzmUFA==", - "license": "MIT", - "dependencies": { - "detect-indent": "^7.0.1", - "is-plain-obj": "^4.1.0", - "sort-keys": "^5.0.0", - "write-file-atomic": "^5.0.1" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" }, - "node_modules/write-package": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/write-package/-/write-package-7.1.0.tgz", - "integrity": "sha512-DqUx8GI3r9BFWwU2DPKddL1E7xWfbFED82mLVhGXKlFEPe8IkBftzO7WfNwHtk7oGDHDeuH/o8VMpzzfMwmLUA==", - "license": "MIT", - "dependencies": { - "deepmerge-ts": "^7.1.0", - "read-pkg": "^9.0.1", - "sort-keys": "^5.0.0", - "type-fest": "^4.23.0", - "write-json-file": "^6.0.0" - }, + "node_modules/undici-types": { + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", + "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==" + }, + "node_modules/web-streams-polyfill": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", + "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==", "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">= 8" } }, "node_modules/ws": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", - "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", - "license": "MIT", + "version": "8.18.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", + "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", "engines": { "node": ">=10.0.0" }, @@ -2952,28 +888,6 @@ "optional": 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, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/yoctocolors": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/yoctocolors/-/yoctocolors-2.1.1.tgz", - "integrity": "sha512-GQHQqAopRhwU8Kt1DDM8NjibDXHC8eoh1erhGAJPEyveY9qqVeXvVikNKrDz69sHowPMorbPUrH/mx8c50eiBQ==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } } } } diff --git a/client/package.json b/client/package.json index 17ec1f0e..1ef4b3ae 100644 --- a/client/package.json +++ b/client/package.json @@ -1,25 +1,20 @@ { - "engines": { - "node": ">=20.6.0" - }, "name": "client", "version": "1.0.0", + "description": "", "main": "index.js", + "type": "module", "scripts": { - "build": "tsc", - "dev": "node --env-file=.env --watch -r ts-node/register src/index.ts", "test": "echo \"Error: no test specified\" && exit 1" }, "keywords": [], "author": "", "license": "ISC", - "description": "", - "devDependencies": { - "@types/node": "^22.9.3", - "ts-node": "^10.9.2", - "typescript": "^5.7.2" - }, "dependencies": { - "polkadot-api": "^1.7.7" + "@polkadot/api": "^16.5.1", + "@polkadot/api-contract": "^16.5.1", + "@polkadot/keyring": "^13.5.7", + "@polkadot/util-crypto": "^13.5.7", + "dotenv": "^17.2.3" } } diff --git a/client/src/index.ts b/client/src/index.ts deleted file mode 100644 index 28b2bd24..00000000 --- a/client/src/index.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { createClient } from "polkadot-api" -import { withLogsRecorder } from "polkadot-api/logs-provider" -import { getWsProvider } from "polkadot-api/ws-provider/node" - -const rpc = process.env.RPC; -const wsProvider = getWsProvider(rpc as string) - -function test(): void { - const provider = withLogsRecorder((line) => console.log(line), wsProvider) - const client = createClient(provider) - } - - test(); \ No newline at end of file diff --git a/client/tsconfig.json b/client/tsconfig.json deleted file mode 100644 index c9c555d9..00000000 --- a/client/tsconfig.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "compilerOptions": { - /* Visit https://aka.ms/tsconfig to read more about this file */ - - /* Projects */ - // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ - // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ - // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ - // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ - // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ - // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ - - /* Language and Environment */ - "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ - // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ - // "jsx": "preserve", /* Specify what JSX code is generated. */ - // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ - // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ - // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ - // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ - // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ - // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ - // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ - // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ - // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ - - /* Modules */ - "module": "commonjs", /* Specify what module code is generated. */ - // "rootDir": "./", /* Specify the root folder within your source files. */ - // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ - // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ - // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ - // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ - // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ - // "types": [], /* Specify type package names to be included without being referenced in a source file. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ - // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ - // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ - // "rewriteRelativeImportExtensions": true, /* Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files. */ - // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ - // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ - // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ - // "noUncheckedSideEffectImports": true, /* Check side effect imports. */ - // "resolveJsonModule": true, /* Enable importing .json files. */ - // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ - // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ - - /* JavaScript Support */ - // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ - // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ - // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ - - /* Emit */ - // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ - // "declarationMap": true, /* Create sourcemaps for d.ts files. */ - // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ - // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ - // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ - // "noEmit": true, /* Disable emitting files from a compilation. */ - // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ - // "outDir": "./", /* Specify an output folder for all emitted files. */ - // "removeComments": true, /* Disable emitting comments. */ - // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ - // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ - // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ - // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ - // "newLine": "crlf", /* Set the newline character for emitting files. */ - // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ - // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ - // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ - // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ - // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ - - /* Interop Constraints */ - // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ - // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ - // "isolatedDeclarations": true, /* Require sufficient annotation on exports so other tools can trivially generate declaration files. */ - // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ - "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ - // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ - "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ - - /* Type Checking */ - "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ - // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ - // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ - // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ - // "strictBuiltinIteratorReturn": true, /* Built-in iterators are instantiated with a 'TReturn' type of 'undefined' instead of 'any'. */ - // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ - // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ - // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ - // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ - // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ - // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ - // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ - // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ - // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ - // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ - // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ - // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ - // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ - - /* Completeness */ - // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ - "skipLibCheck": true /* Skip type checking all .d.ts files. */ - } -} diff --git a/pallets/README.md b/pallets/README.md index 055e0fe2..ebb171b9 100644 --- a/pallets/README.md +++ b/pallets/README.md @@ -14,4 +14,4 @@ https://github.com/paritytech/polkadot-sdk/blob/stable2409/cumulus/pallets/colla https://github.com/paritytech/substrate/blob/master/bin/node/runtime/src/lib.rs ### Generate Weights -`cargo run --release --features runtime-benchmarks --benchmark pallet --execution=wasm --wasm-execution=compiled --heap-pages=4096 --pallet pallet-xode-staking --extrinsic "*" --steps 50 --repeat 20 --output ./pallets/staking/src/weights.rs --template ./pallets/staking/src/weight-template.hbs` \ No newline at end of file +`cargo run --release --features runtime-benchmarks -- --benchmark pallet --execution=wasm --wasm-execution=compiled --heap-pages=4096 --pallet pallet-xode-staking --extrinsic "*" --steps 50 --repeat 20 --output ./pallets/staking/src/weights.rs --template ./pallets/staking/src/weight-template.hbs` diff --git a/pallets/staking/Cargo.toml b/pallets/staking/Cargo.toml index d24e4192..0ce022b0 100644 --- a/pallets/staking/Cargo.toml +++ b/pallets/staking/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pallet-xode-staking" description = "FRAME pallet for defining custom runtime xode staking logic." -version = "0.1.0" +version = "0.1.1" license = "Unlicense" authors.workspace = true homepage.workspace = true diff --git a/pallets/staking/src/benchmarking.rs b/pallets/staking/src/benchmarking.rs index 3f13e4f6..5ff1fe00 100644 --- a/pallets/staking/src/benchmarking.rs +++ b/pallets/staking/src/benchmarking.rs @@ -29,9 +29,12 @@ mod benchmarks { bond: Zero::zero(), total_stake: Zero::zero(), last_updated: frame_system::Pallet::::block_number(), + last_authored: frame_system::Pallet::::block_number(), leaving: false, offline: false, commission: 0, + status: Status::Online, + status_level: 0, }) }).expect("Failed to add initial candidate"); } @@ -43,7 +46,7 @@ mod benchmarks { } pub(super) fn create_balance() -> BalanceOf { - return T::StakingCurrency::minimum_balance() * 10u32.into(); + return T::StakingCurrency::minimum_balance() * 20_000_000u32.into(); } #[benchmark] @@ -250,5 +253,29 @@ mod benchmarks { ); } + #[benchmark] + fn bond_correction() { + initial_config::(); + + let caller: T::AccountId = whitelisted_caller(); + set_free_balance::(caller.clone()); + + assert_ok!(XodeStaking::::register_candidate( + RawOrigin::Signed(caller.clone()).into() + )); + + let new_bond: BalanceOf = create_balance::(); + + #[extrinsic_call] + _(RawOrigin::Signed(caller.clone()), new_bond); + + assert_last_event::( + Event::::ProposedCandidateBondCorrected { + _proposed_candidate: caller.clone(), + } + .into(), + ); + } + impl_benchmark_test_suite!(XodeStaking, crate::mock::new_test_ext(), crate::mock::Test); } diff --git a/pallets/staking/src/lib.rs b/pallets/staking/src/lib.rs index fd6b24e3..8ed7f8e0 100644 --- a/pallets/staking/src/lib.rs +++ b/pallets/staking/src/lib.rs @@ -220,6 +220,7 @@ pub mod pallet { ProposedCandidateCommissionSet { _proposed_candidate: T::AccountId, }, ProposedCandidateOffline { _proposed_candidate: T::AccountId, }, ProposedCandidateOnline { _proposed_candidate: T::AccountId, }, + ProposedCandidateBondCorrected { _proposed_candidate: T::AccountId, }, WaitingCandidateAdded { _waiting_candidate: T::AccountId, }, WaitingCandidateRemoved { _waiting_candidate: T::AccountId, }, @@ -565,6 +566,46 @@ pub mod pallet { Ok(().into()) } + /// Bond Correction + /// Note: + /// Bond correction can be called when the candidate is still proposing + /// and it has a pending unreserved balance due to automated removal for + /// not authoring. + /// + /// Make sure that the proposed candidate is offline. If the candidate + /// has just registered call first the offline_candidate extrinsic before + /// calling bond_correction. + /// + /// It is very important to note that this extrinsic will zero out the bond + /// value of the proposed candidate. + /// Todo: + /// Percentage for the treasury as a slashed fee because to authoring failure + #[pallet::call_index(8)] + #[pallet::weight( as WeightInfo>::bond_correction())] + pub fn bond_correction(origin: OriginFor, frozen_balance: BalanceOf,) -> DispatchResultWithPostInfo { + let who = ensure_signed(origin)?; + + let _ = ProposedCandidates::::mutate(|candidates| { + if let Some(candidate) = candidates.iter_mut().find(|c| c.who == who) { + ensure!(candidate.offline, Error::::ProposedCandidateStillOnline); + ensure!(!WaitingCandidates::::get().contains(&candidate.who), Error::::ProposedCandidateStillWaiting); + ensure!(!pallet_collator_selection::Invulnerables::::get().contains(&candidate.who), Error::::ProposedCandidateStillQueuing); + ensure!(!Self::still_authoring(candidate.who.clone()), Error::::ProposedCandidateStillAuthoring); + + // Unreserved the entire frozen bond + let _ = T::StakingCurrency::unreserve(&who, frozen_balance); + + // Set the bond to zero + candidate.bond = Zero::zero(); + candidate.last_updated = frame_system::Pallet::::block_number(); + } + Ok::<(), Error>(()) + }); + + Self::deposit_event(Event::ProposedCandidateBondCorrected { _proposed_candidate: who }); + Ok(().into()) + } + } /// ======= diff --git a/pallets/staking/src/weights.rs b/pallets/staking/src/weights.rs index cd0edf9f..0ecb69ec 100644 --- a/pallets/staking/src/weights.rs +++ b/pallets/staking/src/weights.rs @@ -1,9 +1,9 @@ //! Autogenerated weights for pallet_xode_staking //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 43.0.0 -//! DATE: 2024-12-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 43.1.0 +//! DATE: 2025-11-25, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `DESKTOP-UKLAK32`, CPU: `Intel(R) Core(TM) i5-10400 CPU @ 2.90GHz` +//! HOSTNAME: `hgminerva-vivobook`, CPU: `13th Gen Intel(R) Core(TM) i9-13900H` //! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 // Executed Command: @@ -43,104 +43,112 @@ pub trait WeightInfo { fn unstake_candidate() -> Weight; fn offline_candidate() -> Weight; fn online_candidate() -> Weight; + fn bond_correction() -> Weight; } /// Weights for pallet_xode_staking using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { /// Storage: `XodeStaking::ProposedCandidates` (r:1 w:1) - /// Proof: `XodeStaking::ProposedCandidates` (`max_values`: Some(1), `max_size`: Some(7102), added: 7597, mode: `MaxEncodedLen`) + /// Proof: `XodeStaking::ProposedCandidates` (`max_values`: Some(1), `max_size`: Some(7702), added: 8197, mode: `MaxEncodedLen`) fn register_candidate() -> Weight { // Proof Size summary in bytes: - // Measured: `3` - // Estimated: `8587` - // Minimum execution time: 13_700_000 picoseconds. - Weight::from_parts(14_300_000, 8587) + // Measured: `27` + // Estimated: `9187` + // Minimum execution time: 9_422_000 picoseconds. + Weight::from_parts(9_795_000, 9187) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `XodeStaking::ProposedCandidates` (r:1 w:1) - /// Proof: `XodeStaking::ProposedCandidates` (`max_values`: Some(1), `max_size`: Some(7102), added: 7597, mode: `MaxEncodedLen`) + /// Proof: `XodeStaking::ProposedCandidates` (`max_values`: Some(1), `max_size`: Some(7702), added: 8197, mode: `MaxEncodedLen`) fn bond_candidate() -> Weight { // Proof Size summary in bytes: - // Measured: `173` - // Estimated: `8587` - // Minimum execution time: 36_600_000 picoseconds. - Weight::from_parts(37_300_000, 8587) + // Measured: `185` + // Estimated: `9187` + // Minimum execution time: 25_590_000 picoseconds. + Weight::from_parts(26_115_000, 9187) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `XodeStaking::ProposedCandidates` (r:1 w:1) - /// Proof: `XodeStaking::ProposedCandidates` (`max_values`: Some(1), `max_size`: Some(7102), added: 7597, mode: `MaxEncodedLen`) - /// Storage: `XodeStaking::WaitingCandidates` (r:1 w:0) - /// Proof: `XodeStaking::WaitingCandidates` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// Proof: `XodeStaking::ProposedCandidates` (`max_values`: Some(1), `max_size`: Some(7702), added: 8197, mode: `MaxEncodedLen`) fn set_commission_of_candidate() -> Weight { // Proof Size summary in bytes: - // Measured: `173` - // Estimated: `8587` - // Minimum execution time: 18_900_000 picoseconds. - Weight::from_parts(19_500_000, 8587) - .saturating_add(T::DbWeight::get().reads(2_u64)) + // Measured: `185` + // Estimated: `9187` + // Minimum execution time: 11_391_000 picoseconds. + Weight::from_parts(12_123_000, 9187) + .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `XodeStaking::ProposedCandidates` (r:1 w:1) - /// Proof: `XodeStaking::ProposedCandidates` (`max_values`: Some(1), `max_size`: Some(7102), added: 7597, mode: `MaxEncodedLen`) - /// Storage: `XodeStaking::WaitingCandidates` (r:1 w:1) - /// Proof: `XodeStaking::WaitingCandidates` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// Proof: `XodeStaking::ProposedCandidates` (`max_values`: Some(1), `max_size`: Some(7702), added: 8197, mode: `MaxEncodedLen`) fn leave_candidate() -> Weight { // Proof Size summary in bytes: - // Measured: `228` - // Estimated: `8587` - // Minimum execution time: 24_200_000 picoseconds. - Weight::from_parts(24_600_000, 8587) - .saturating_add(T::DbWeight::get().reads(2_u64)) - .saturating_add(T::DbWeight::get().writes(2_u64)) + // Measured: `219` + // Estimated: `9187` + // Minimum execution time: 10_783_000 picoseconds. + Weight::from_parts(11_633_000, 9187) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `XodeStaking::ProposedCandidates` (r:1 w:1) - /// Proof: `XodeStaking::ProposedCandidates` (`max_values`: Some(1), `max_size`: Some(7102), added: 7597, mode: `MaxEncodedLen`) + /// Proof: `XodeStaking::ProposedCandidates` (`max_values`: Some(1), `max_size`: Some(7702), added: 8197, mode: `MaxEncodedLen`) /// Storage: `XodeStaking::Delegations` (r:1 w:1) - /// Proof: `XodeStaking::Delegations` (`max_values`: None, `max_size`: Some(9642), added: 12117, mode: `MaxEncodedLen`) + /// Proof: `XodeStaking::Delegations` (`max_values`: None, `max_size`: Some(4842), added: 7317, mode: `MaxEncodedLen`) fn stake_candidate() -> Weight { // Proof Size summary in bytes: - // Measured: `102` - // Estimated: `13107` - // Minimum execution time: 49_700_000 picoseconds. - Weight::from_parts(50_500_000, 13107) + // Measured: `108` + // Estimated: `9187` + // Minimum execution time: 62_467_000 picoseconds. + Weight::from_parts(65_009_000, 9187) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } /// Storage: `XodeStaking::Delegations` (r:1 w:1) - /// Proof: `XodeStaking::Delegations` (`max_values`: None, `max_size`: Some(9642), added: 12117, mode: `MaxEncodedLen`) + /// Proof: `XodeStaking::Delegations` (`max_values`: None, `max_size`: Some(4842), added: 7317, mode: `MaxEncodedLen`) /// Storage: `XodeStaking::ProposedCandidates` (r:1 w:1) - /// Proof: `XodeStaking::ProposedCandidates` (`max_values`: Some(1), `max_size`: Some(7102), added: 7597, mode: `MaxEncodedLen`) + /// Proof: `XodeStaking::ProposedCandidates` (`max_values`: Some(1), `max_size`: Some(7702), added: 8197, mode: `MaxEncodedLen`) fn unstake_candidate() -> Weight { // Proof Size summary in bytes: - // Measured: `288` - // Estimated: `13107` - // Minimum execution time: 49_200_000 picoseconds. - Weight::from_parts(49_800_000, 13107) + // Measured: `300` + // Estimated: `9187` + // Minimum execution time: 40_944_000 picoseconds. + Weight::from_parts(42_495_000, 9187) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } /// Storage: `XodeStaking::ProposedCandidates` (r:1 w:1) - /// Proof: `XodeStaking::ProposedCandidates` (`max_values`: Some(1), `max_size`: Some(7102), added: 7597, mode: `MaxEncodedLen`) + /// Proof: `XodeStaking::ProposedCandidates` (`max_values`: Some(1), `max_size`: Some(7702), added: 8197, mode: `MaxEncodedLen`) fn offline_candidate() -> Weight { // Proof Size summary in bytes: - // Measured: `102` - // Estimated: `8587` - // Minimum execution time: 17_800_000 picoseconds. - Weight::from_parts(18_000_000, 8587) + // Measured: `108` + // Estimated: `9187` + // Minimum execution time: 13_451_000 picoseconds. + Weight::from_parts(13_986_000, 9187) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `XodeStaking::ProposedCandidates` (r:1 w:1) - /// Proof: `XodeStaking::ProposedCandidates` (`max_values`: Some(1), `max_size`: Some(7102), added: 7597, mode: `MaxEncodedLen`) + /// Proof: `XodeStaking::ProposedCandidates` (`max_values`: Some(1), `max_size`: Some(7702), added: 8197, mode: `MaxEncodedLen`) fn online_candidate() -> Weight { // Proof Size summary in bytes: - // Measured: `102` - // Estimated: `8587` - // Minimum execution time: 17_400_000 picoseconds. - Weight::from_parts(17_900_000, 8587) + // Measured: `108` + // Estimated: `9187` + // Minimum execution time: 13_771_000 picoseconds. + Weight::from_parts(14_293_000, 9187) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `XodeStaking::ProposedCandidates` (r:1 w:1) + /// Proof: `XodeStaking::ProposedCandidates` (`max_values`: Some(1), `max_size`: Some(7702), added: 8197, mode: `MaxEncodedLen`) + fn bond_correction() -> Weight { + // Proof Size summary in bytes: + // Measured: `185` + // Estimated: `9187` + // Minimum execution time: 13_931_000 picoseconds. + Weight::from_parts(15_167_000, 9187) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -150,98 +158,105 @@ impl WeightInfo for SubstrateWeight { // For backwards compatibility and tests impl WeightInfo for () { /// Storage: `XodeStaking::ProposedCandidates` (r:1 w:1) - /// Proof: `XodeStaking::ProposedCandidates` (`max_values`: Some(1), `max_size`: Some(7102), added: 7597, mode: `MaxEncodedLen`) + /// Proof: `XodeStaking::ProposedCandidates` (`max_values`: Some(1), `max_size`: Some(7702), added: 8197, mode: `MaxEncodedLen`) fn register_candidate() -> Weight { // Proof Size summary in bytes: - // Measured: `3` - // Estimated: `8587` - // Minimum execution time: 13_700_000 picoseconds. - Weight::from_parts(14_300_000, 8587) + // Measured: `27` + // Estimated: `9187` + // Minimum execution time: 9_422_000 picoseconds. + Weight::from_parts(9_795_000, 9187) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `XodeStaking::ProposedCandidates` (r:1 w:1) - /// Proof: `XodeStaking::ProposedCandidates` (`max_values`: Some(1), `max_size`: Some(7102), added: 7597, mode: `MaxEncodedLen`) + /// Proof: `XodeStaking::ProposedCandidates` (`max_values`: Some(1), `max_size`: Some(7702), added: 8197, mode: `MaxEncodedLen`) fn bond_candidate() -> Weight { // Proof Size summary in bytes: - // Measured: `173` - // Estimated: `8587` - // Minimum execution time: 36_600_000 picoseconds. - Weight::from_parts(37_300_000, 8587) + // Measured: `185` + // Estimated: `9187` + // Minimum execution time: 25_590_000 picoseconds. + Weight::from_parts(26_115_000, 9187) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `XodeStaking::ProposedCandidates` (r:1 w:1) - /// Proof: `XodeStaking::ProposedCandidates` (`max_values`: Some(1), `max_size`: Some(7102), added: 7597, mode: `MaxEncodedLen`) - /// Storage: `XodeStaking::WaitingCandidates` (r:1 w:0) - /// Proof: `XodeStaking::WaitingCandidates` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// Proof: `XodeStaking::ProposedCandidates` (`max_values`: Some(1), `max_size`: Some(7702), added: 8197, mode: `MaxEncodedLen`) fn set_commission_of_candidate() -> Weight { // Proof Size summary in bytes: - // Measured: `173` - // Estimated: `8587` - // Minimum execution time: 18_900_000 picoseconds. - Weight::from_parts(19_500_000, 8587) - .saturating_add(RocksDbWeight::get().reads(2_u64)) + // Measured: `185` + // Estimated: `9187` + // Minimum execution time: 11_391_000 picoseconds. + Weight::from_parts(12_123_000, 9187) + .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `XodeStaking::ProposedCandidates` (r:1 w:1) - /// Proof: `XodeStaking::ProposedCandidates` (`max_values`: Some(1), `max_size`: Some(7102), added: 7597, mode: `MaxEncodedLen`) - /// Storage: `XodeStaking::WaitingCandidates` (r:1 w:1) - /// Proof: `XodeStaking::WaitingCandidates` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// Proof: `XodeStaking::ProposedCandidates` (`max_values`: Some(1), `max_size`: Some(7702), added: 8197, mode: `MaxEncodedLen`) fn leave_candidate() -> Weight { // Proof Size summary in bytes: - // Measured: `228` - // Estimated: `8587` - // Minimum execution time: 24_200_000 picoseconds. - Weight::from_parts(24_600_000, 8587) - .saturating_add(RocksDbWeight::get().reads(2_u64)) - .saturating_add(RocksDbWeight::get().writes(2_u64)) + // Measured: `219` + // Estimated: `9187` + // Minimum execution time: 10_783_000 picoseconds. + Weight::from_parts(11_633_000, 9187) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `XodeStaking::ProposedCandidates` (r:1 w:1) - /// Proof: `XodeStaking::ProposedCandidates` (`max_values`: Some(1), `max_size`: Some(7102), added: 7597, mode: `MaxEncodedLen`) + /// Proof: `XodeStaking::ProposedCandidates` (`max_values`: Some(1), `max_size`: Some(7702), added: 8197, mode: `MaxEncodedLen`) /// Storage: `XodeStaking::Delegations` (r:1 w:1) - /// Proof: `XodeStaking::Delegations` (`max_values`: None, `max_size`: Some(9642), added: 12117, mode: `MaxEncodedLen`) + /// Proof: `XodeStaking::Delegations` (`max_values`: None, `max_size`: Some(4842), added: 7317, mode: `MaxEncodedLen`) fn stake_candidate() -> Weight { // Proof Size summary in bytes: - // Measured: `102` - // Estimated: `13107` - // Minimum execution time: 49_700_000 picoseconds. - Weight::from_parts(50_500_000, 13107) + // Measured: `108` + // Estimated: `9187` + // Minimum execution time: 62_467_000 picoseconds. + Weight::from_parts(65_009_000, 9187) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } /// Storage: `XodeStaking::Delegations` (r:1 w:1) - /// Proof: `XodeStaking::Delegations` (`max_values`: None, `max_size`: Some(9642), added: 12117, mode: `MaxEncodedLen`) + /// Proof: `XodeStaking::Delegations` (`max_values`: None, `max_size`: Some(4842), added: 7317, mode: `MaxEncodedLen`) /// Storage: `XodeStaking::ProposedCandidates` (r:1 w:1) - /// Proof: `XodeStaking::ProposedCandidates` (`max_values`: Some(1), `max_size`: Some(7102), added: 7597, mode: `MaxEncodedLen`) + /// Proof: `XodeStaking::ProposedCandidates` (`max_values`: Some(1), `max_size`: Some(7702), added: 8197, mode: `MaxEncodedLen`) fn unstake_candidate() -> Weight { // Proof Size summary in bytes: - // Measured: `288` - // Estimated: `13107` - // Minimum execution time: 49_200_000 picoseconds. - Weight::from_parts(49_800_000, 13107) + // Measured: `300` + // Estimated: `9187` + // Minimum execution time: 40_944_000 picoseconds. + Weight::from_parts(42_495_000, 9187) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) } /// Storage: `XodeStaking::ProposedCandidates` (r:1 w:1) - /// Proof: `XodeStaking::ProposedCandidates` (`max_values`: Some(1), `max_size`: Some(7102), added: 7597, mode: `MaxEncodedLen`) + /// Proof: `XodeStaking::ProposedCandidates` (`max_values`: Some(1), `max_size`: Some(7702), added: 8197, mode: `MaxEncodedLen`) fn offline_candidate() -> Weight { // Proof Size summary in bytes: - // Measured: `102` - // Estimated: `8587` - // Minimum execution time: 17_800_000 picoseconds. - Weight::from_parts(18_000_000, 8587) + // Measured: `108` + // Estimated: `9187` + // Minimum execution time: 13_451_000 picoseconds. + Weight::from_parts(13_986_000, 9187) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `XodeStaking::ProposedCandidates` (r:1 w:1) - /// Proof: `XodeStaking::ProposedCandidates` (`max_values`: Some(1), `max_size`: Some(7102), added: 7597, mode: `MaxEncodedLen`) + /// Proof: `XodeStaking::ProposedCandidates` (`max_values`: Some(1), `max_size`: Some(7702), added: 8197, mode: `MaxEncodedLen`) fn online_candidate() -> Weight { // Proof Size summary in bytes: - // Measured: `102` - // Estimated: `8587` - // Minimum execution time: 17_400_000 picoseconds. - Weight::from_parts(17_900_000, 8587) + // Measured: `108` + // Estimated: `9187` + // Minimum execution time: 13_771_000 picoseconds. + Weight::from_parts(14_293_000, 9187) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } + /// Storage: `XodeStaking::ProposedCandidates` (r:1 w:1) + /// Proof: `XodeStaking::ProposedCandidates` (`max_values`: Some(1), `max_size`: Some(7702), added: 8197, mode: `MaxEncodedLen`) + fn bond_correction() -> Weight { + // Proof Size summary in bytes: + // Measured: `185` + // Estimated: `9187` + // Minimum execution time: 13_931_000 picoseconds. + Weight::from_parts(15_167_000, 9187) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } diff --git a/runtime/src/configs/mod.rs b/runtime/src/configs/mod.rs index a5bd6f4f..a5e3073e 100644 --- a/runtime/src/configs/mod.rs +++ b/runtime/src/configs/mod.rs @@ -88,6 +88,7 @@ impl frame_support::traits::Contains for FilterRuntimeCall { | RuntimeCall::Assets(AssetsCall::transfer_approved { .. }) | RuntimeCall::Assets(AssetsCall::freeze { .. }) | RuntimeCall::Assets(AssetsCall::thaw { .. }) + | RuntimeCall::Assets(AssetsCall::transfer { .. }) ) } } diff --git a/runtime/src/configs/xcm_config/asset_matcher.rs b/runtime/src/configs/xcm_config/asset_matcher.rs index 74671894..84bce3e5 100644 --- a/runtime/src/configs/xcm_config/asset_matcher.rs +++ b/runtime/src/configs/xcm_config/asset_matcher.rs @@ -1,37 +1,80 @@ use crate::Balance; -use frame_support::traits::ContainsPair; use xcm::latest::prelude::*; -use xcm_executor::traits::{Error as MatchError, MatchesFungibles}; +use xcm_executor::traits::{Error as MatchError, MatchesFungible, MatchesFungibles}; -/// A custom matcher that converts an incoming `Asset` from an XCM message into a local asset ID (`u32`) and amount (`Balance`). -/// -/// This matcher is used by the XCM asset transactor to interpret location `Asset` objects -/// and translate them to known local assets that can be used within the chain’s runtime. -pub struct AssetMatcher; +/// This struct defines a native asset matcher for XCM transactions. +/// +/// It identifies the native token based on its XCM location and fungibility, +/// determining if it matches the native asset. +pub struct NativeAssetMatcher; -impl MatchesFungibles for AssetMatcher { +impl MatchesFungible for NativeAssetMatcher { + fn matches_fungible(asset: &Asset) -> Option { + match asset { + // Match the native token + Asset { + id: AssetId(Location { + parents: 0, + interior: Junctions::Here, + }), + fun: Fungibility::Fungible(amount), + } => { + log::trace!(target: "xcm::matches_fungible", "AssetMatcher: Matched native token, amount: {:?}", amount); + Some(*amount) + }, + + // Otherwise, mismatched asset type + _ => { + log::trace!(target: "xcm::matches_fungible", "AssetMatcher: Asset not handled → asset: {:?}", asset); + None + } + } + } +} + +/// This struct defines a multi-asset matcher for XCM transactions. +/// +/// It identifies various fungible assets based on their XCM location and fungibility, +/// determining if they match known assets and extracting their identifiers and amounts. +pub struct MultiAssetMatcher; + +impl MatchesFungibles for MultiAssetMatcher { fn matches_fungibles(asset: &Asset) -> Result<(u32, Balance), MatchError> { let match_result = match asset { - // XCM Inbound - Match the relay chain (parent) + + // Match a local parachain (Xode) Asset { - id: - AssetId(Location { - parents: 1, - interior: Junctions::Here, - }), + id: AssetId(Location { + parents: 0, + interior: Junctions::X2(junctions), + }), + fun: Fungibility::Fungible(amount), + } => match junctions.as_ref() { + [Junction::PalletInstance(50), Junction::GeneralIndex(asset_id)] => { + log::trace!(target: "xcm::matches_fungibles", "AssetMatcher: Matched Xode asset → asset_id: {:?}, amount: {:?}", asset_id, amount); + Ok((*asset_id as u32, *amount)) + } + _ => Err(MatchError::AssetNotHandled), + }, + + // Match the relay chain (parent) + Asset { + id: AssetId(Location { + parents: 1, + interior: Junctions::Here, + }), fun: Fungibility::Fungible(amount), } => { log::trace!(target: "xcm::matches_fungibles", "AssetMatcher: Matched Relay Chain native asset: amount = {:?}", amount); Ok((100_000_000, *amount)) } - // XCM Inbound - Match a sibling parachain (e.g., AssetHub with ParaId 1000) + // Match a sibling parachain (e.g., AssetHub with ParaId 1000) Asset { - id: - AssetId(Location { - parents: 1, - interior: Junctions::X3(junctions), - }), + id: AssetId(Location { + parents: 1, + interior: Junctions::X3(junctions), + }), fun: Fungibility::Fungible(amount), } => match junctions.as_ref() { [Junction::Parachain(1000), Junction::PalletInstance(50), Junction::GeneralIndex(asset_id)] => @@ -47,22 +90,6 @@ impl MatchesFungibles for AssetMatcher { _ => Err(MatchError::AssetNotHandled), }, - // XCM Outbound - Match a local parachain (e.g., Xode) - Asset { - id: - AssetId(Location { - parents: 0, - interior: Junctions::X2(junctions), - }), - fun: Fungibility::Fungible(amount), - } => match junctions.as_ref() { - [Junction::PalletInstance(50), Junction::GeneralIndex(asset_id)] => { - log::trace!(target: "xcm::matches_fungibles", "AssetMatcher: Matched Xode asset → asset_id: {:?}, amount: {:?}", asset_id, amount); - Ok((*asset_id as u32, *amount)) - } - _ => Err(MatchError::AssetNotHandled), - }, - // Otherwise, mismatched asset type _ => { log::trace!(target: "xcm::matches_fungibles", "AssetMatcher: Asset not handled → asset: {:?}", asset); @@ -74,69 +101,3 @@ impl MatchesFungibles for AssetMatcher { match_result } } - -/// This filter determines whether a given asset and its origin location are considered "trusted reserve assets" -/// for XCM reserve operations. Only assets and origins that match the trusted patterns will be treated as reserves. -pub struct TrustedReserveAssets; - -impl ContainsPair for TrustedReserveAssets { - fn contains(asset: &Asset, origin: &Location) -> bool { - match &origin { - // Match the relay chain (parent) as a trusted reserve asset. - Location { - parents: 1, - interior: Junctions::Here, - } => { - let result = matches!( - &asset.id, - AssetId(Location { - parents: 1, - interior: Junctions::Here - }) - ); - log::trace!(target: "xcm::contains_pair", "TrustedReserveAssets::contains - RelayChain → asset: {:?}, origin: {:?}, result: {:?}", asset, origin, result); - - result - } - - // Match a sibling parachain (e.g., AssetHub with ParaId 1000) as a trusted reserve asset. - Location { - parents: 1, - interior: Junctions::X1(parachain_junction), - } => match parachain_junction.as_ref() { - [Junction::Parachain(1000)] => { - if let AssetId(Location { - parents: 1, - interior: Junctions::X3(asset_junctions), - }) = &asset.id - { - let result = matches!( - asset_junctions.as_ref(), - [ - Junction::Parachain(1000), - Junction::PalletInstance(50), - Junction::GeneralIndex(_) - ] - ); - log::trace!(target: "xcm::contains_pair", "TrustedReserveAssets::contains - AssetHub → asset: {:?}, origin: {:?}, result: {:?}", asset, origin, result); - - result - } else { - log::trace!(target: "xcm::contains_pair", "TrustedReserveAssets::contains - AssetHub mismatch → asset: {:?}, origin: {:?}", asset, origin); - false - } - } - _ => { - log::trace!(target: "xcm::contains_pair", "TrustedReserveAssets::contains - Non-AssetHub sibling parachain → asset: {:?}, origin: {:?}", asset, origin); - false - } - }, - - // Any other origin or asset combination is not considered a trusted reserve asset and will return `false`. - _ => { - log::trace!(target: "xcm::contains_pair", "TrustedReserveAssets::contains - Other → asset: {:?}, origin: {:?}", asset, origin); - false - } - } - } -} diff --git a/runtime/src/configs/xcm_config/config.rs b/runtime/src/configs/xcm_config/config.rs index 172e74df..737c4ec9 100644 --- a/runtime/src/configs/xcm_config/config.rs +++ b/runtime/src/configs/xcm_config/config.rs @@ -13,7 +13,8 @@ use crate::{ XcmpQueue, // XCM config modules - configs::xcm_config::asset_matcher::{AssetMatcher, TrustedReserveAssets}, + configs::xcm_config::asset_matcher::{NativeAssetMatcher, MultiAssetMatcher}, + configs::xcm_config::trusted_reserve_assets::TrustedReserveAssets, configs::xcm_config::origin_filters::ParentOrTrustedSiblings, configs::xcm_config::weight_trader::DynamicWeightTrader, }; @@ -29,7 +30,7 @@ use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain, DenyThenTry, EnsureXcmOrigin, - FixedWeightBounds, FrameTransactionalProcessor, FungiblesAdapter, LocalMint, ParentIsPreset, + FixedWeightBounds, FrameTransactionalProcessor, FungibleAdapter, FungiblesAdapter, LocalMint, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, WithComputedOrigin, WithUniqueTopic, @@ -60,15 +61,32 @@ pub type LocationToAccountId = ( AccountId32Aliases, ); -/// The `AssetTransactor` defines how the runtime handles fungible assets received or sent via XCM. -/// It interprets incoming `Asset` locations, resolves them to local asset IDs and balances, -/// and executes operations such as minting, burning, or transferring tokens. -pub type AssetTransactor = FungiblesAdapter< - // The asset handler used to inspect, mint, and burn tokens (e.g., orml-tokens or pallet-assets). +/// The asset transactor for handling the local native asset. +/// +/// This supports only the native token of this parachain. +/// It uses the `Balances` pallet to manage the native currency. +pub type LocalAssetTransactor = FungibleAdapter< + // The asset handler for the native currency (Balances pallet). + Balances, + // Our custom asset matcher for the native token. + NativeAssetMatcher, + // Resolves `Location` origin accounts into native `AccountId`s. + LocationToAccountId, + // Our chain's account ID type (we can't get away without mentioning it explicitly): + AccountId, + // We don't track any teleports. + (), +>; + +/// The asset transactor for handling assets via pallet-assets. +/// +/// This supports assets from the Relay Chain, sibling parachains (e.g., AssetHub), +/// and local pallet-assets defined on this parachain. +pub type PalletAssetsTransactor = FungiblesAdapter< + // The asset handler used to inspect, mint, and burn tokens (pallet-assets). Assets, - // Custom matcher for converting incoming `Asset` to local (asset ID, balance) pairs. - // This supports Relay Chain, sibling parachains, or AssetHub assets. - AssetMatcher, + // Our custom asset matcher for various fungible assets. + MultiAssetMatcher, // Resolves `Location` origin accounts into native `AccountId`s. LocationToAccountId, // Native account identifier type used by the runtime. @@ -81,6 +99,13 @@ pub type AssetTransactor = FungiblesAdapter< CheckingAccount, >; +/// The overall asset transactor for XCM, combining local native asset handling +/// and pallet-assets handling for other fungible assets. +pub type AssetTransactor = ( + LocalAssetTransactor, + PalletAssetsTransactor +); + /// This is the type we use to convert an (incoming) XCM origin into a local Origin instance, /// ready for dispatching a transaction with Xcm's Transact. There is an OriginKind which can /// biases the kind of local Origin it will become. diff --git a/runtime/src/configs/xcm_config/mod.rs b/runtime/src/configs/xcm_config/mod.rs index 9b0e306a..40b05b11 100644 --- a/runtime/src/configs/xcm_config/mod.rs +++ b/runtime/src/configs/xcm_config/mod.rs @@ -1,4 +1,5 @@ mod asset_matcher; +mod trusted_reserve_assets; mod origin_filters; pub mod weight_trader; mod config; diff --git a/runtime/src/configs/xcm_config/trusted_reserve_assets.rs b/runtime/src/configs/xcm_config/trusted_reserve_assets.rs new file mode 100644 index 00000000..b93a3671 --- /dev/null +++ b/runtime/src/configs/xcm_config/trusted_reserve_assets.rs @@ -0,0 +1,105 @@ +use frame_support::traits::ContainsPair; +use xcm::latest::prelude::*; + +/// This struct defines trusted reserve assets for XCM transactions. +/// +/// It identifies assets based on their XCM location and the origin of the XCM message, +/// determining if they are considered trusted reserve assets. +pub struct TrustedReserveAssets; + +impl ContainsPair for TrustedReserveAssets { + fn contains(asset: &Asset, origin: &Location) -> bool { + log::trace!(target: "xcm::contains_pair", "TrustedReserveAssets::contains - asset: {:?}, origin: {:?}", asset, origin); + + let result = match &origin { + + // Match the relay chain (parent) origin. + Location { + parents: 1, + interior: Junctions::Here, + } if matches!( + &asset.id, + AssetId(Location { + parents: 1, + interior: Junctions::Here + }) + ) => true, + + // Match a sibling parachain origin (e.g., AssetHub with ParaId 1000). + Location { + parents: 1, + interior: Junctions::X1(parachain_junction), + } => match parachain_junction.as_ref() { + + // Match AssetHub (parachain 1000) origin. + [Junction::Parachain(1000)] => match &asset.id { + + // Outbound: XCM assets (pallet-assets) from Xode to AssetHub. + AssetId(Location { + parents: 0, + interior: Junctions::X2(asset_junctions), + }) if matches!( + asset_junctions.as_ref(), + [Junction::PalletInstance(50), Junction::GeneralIndex(_)] + ) => true, + + // Inbound: XCM assets (pallet-assets) from AssetHub to Xode. + AssetId(Location { + parents: 1, + interior: Junctions::X3(asset_junctions), + }) if matches!( + asset_junctions.as_ref(), + [ + Junction::Parachain(1000), + Junction::PalletInstance(50), + Junction::GeneralIndex(_) + ] + ) => true, + + _ => false + }, + + // Match Hydration (parachain 2034) origin. + [Junction::Parachain(2034)] => match &asset.id { + + // Outbound: XCM assets (native XON) from Xode to Hydration. + AssetId(Location { + parents: 0, + interior: Junctions::Here, + }) => true, + + // Outbound: XCM assets (pallet-assets) from Xode to Hydration. + AssetId(Location { + parents: 0, + interior: Junctions::X2(asset_junctions), + }) if matches!( + asset_junctions.as_ref(), + [Junction::PalletInstance(50), Junction::GeneralIndex(_)] + ) => true, + + // Inbound: XCM assets (pallet-assets) from Hydration to Xode. + AssetId(Location { + parents: 1, + interior: Junctions::X3(asset_junctions), + }) if matches!( + asset_junctions.as_ref(), + [ + Junction::Parachain(2034), + Junction::PalletInstance(51), + Junction::GeneralIndex(_) + ] + ) => true, + + _ => false + }, + + _ => false + }, + + _ => false + }; + + log::trace!(target: "xcm::contains_pair", "TrustedReserveAssets::contains - asset: {:?}, origin: {:?} → result: {:?}", asset, origin, result); + result + } +} diff --git a/runtime/src/configs/xcm_config/weight_trader.rs b/runtime/src/configs/xcm_config/weight_trader.rs index 65fe14ba..113a0a60 100644 --- a/runtime/src/configs/xcm_config/weight_trader.rs +++ b/runtime/src/configs/xcm_config/weight_trader.rs @@ -1,4 +1,4 @@ -use crate::{WeightToFee, configs::xcm_config::AssetTransactor}; +use crate::{configs::xcm_config::AssetTransactor}; use frame_support::{ parameter_types, weights::{Weight, WeightToFee as WeightToFeeT}, @@ -10,47 +10,68 @@ use xcm_executor::{ }; use alloc::sync::Arc; use sp_core::crypto::{Ss58Codec, AccountId32}; +use core::marker::PhantomData; parameter_types! { pub const RelayLocation: Location = Location::parent(); } -/// A weight to fee implementation for USDT, which is used to convert weight into a fee -/// that can be paid in USDT. This implementation is specifically designed to handle -/// the conversion of weight into a fee amount that can be used for weight purchasing -/// in the context of XCM transactions. +/// Trait defining parameters for weight-to-fee conversion for different assets. /// -/// The fee is calculated based on the weight's reference time, divided by a scaling factor -/// to convert it into a fee amount in USDT. -/// -/// The scaling factor is set to 1,000,000 to ensure that the fee is reasonable and -/// can be handled by the USDT asset. -/// -/// This implementation is useful for scenarios where USDT is used as the asset for weight purchasing, -/// allowing for dynamic handling of weight purchasing based on the available assets in the `AssetsInHolding`. -pub struct UsdtWeightToFee; +/// Implementers of this trait specify the fee rate per second for a given asset, +/// allowing the `WeightToFeeConverter` to calculate the appropriate fee based on +/// the weight of the XCM execution. +pub trait WeightToFeeAssetParams { + const FEE_PER_SECOND: u128; +} + +/// Weight-to-fee parameters for XON (native token) with a rate of 0.01 XON per second. +pub struct XonWeightToFeeRate; +impl WeightToFeeAssetParams for XonWeightToFeeRate { + const FEE_PER_SECOND: u128 = 10_000_000_000; +} + +/// Weight-to-fee parameters for DOT (relay chain token) with a rate of 0.01 DOT per second. +pub struct DotWeightToFeeRate; +impl WeightToFeeAssetParams for DotWeightToFeeRate { + const FEE_PER_SECOND: u128 = 100_000_000; // 0.01 DOT +} -impl WeightToFeeT for UsdtWeightToFee { +/// Weight-to-fee parameters for USDT (AssetHub token) with a rate of 0.01 USDT per second. +pub struct UsdtWeightToFeeRate; +impl WeightToFeeAssetParams for UsdtWeightToFeeRate { + const FEE_PER_SECOND: u128 = 10_000; // 0.01 USDT +} + +/// A generic weight-to-fee converter that calculates the fee based on the weight +/// of the XCM execution and the fee rate defined by the implementer of +/// `WeightToFeeAssetParams`. +/// +/// This struct uses the `WeightToFeeAssetParams` trait to determine the fee rate +/// for the specific asset, allowing for flexible fee calculations based on the +/// asset being used for payment. +pub struct WeightToFeeConverter(PhantomData); + +impl WeightToFeeT for WeightToFeeConverter { type Balance = u128; fn weight_to_fee(weight: &Weight) -> Self::Balance { - weight.ref_time().saturating_div(1_000_000).max(1).into() + let picos_per_second: u64 = 1_000_000_000_000u64; + let ref_time_picoseconds = weight.ref_time(); + let fee = ref_time_picoseconds.saturating_mul(T::FEE_PER_SECOND as u64); + + (fee.saturating_div(picos_per_second)) as u128 } } -/// A dynamic weight trader that determines how to buy weight for XCM execution -/// based on the assets provided in the `AssetsInHolding`. This trader supports -/// both DOT from the Relay Chain and USDT from AssetHub (parachain 1000). -/// -/// It matches assets by their XCM location and uses the corresponding weight-to-fee -/// conversion logic to calculate the cost for the requested weight. -/// -/// If the asset originates from the Relay Chain, the trader uses DOT for payment. -/// If it originates from AssetHub, it uses USDT. The function processes the payment, -/// deducts the total fee, and returns any remaining balance to the caller. -/// -/// If no supported asset is detected, the trader returns an error indicating that -/// the weight purchase cannot be completed. +/// Dynamic weight trader that calculates fees based on the asset used for payment. +/// +/// It supports XON (native token), DOT (relay chain token), and USDT (AssetHub token). +/// The fee is calculated based on the weight of the XCM execution and a fixed fee +/// of 0.01 units of the respective asset. +/// +/// This implementation deducts the required fee from the provided assets and deposits +/// it to a predefined fee collector account. pub struct DynamicWeightTrader; impl WeightTrader for DynamicWeightTrader { @@ -71,10 +92,15 @@ impl WeightTrader for DynamicWeightTrader { // Check if asset matches USDT on AssetHub (parachain 1000) match asset_id { + AssetId(xon_location @ Location { + parents: 0, + interior: Junctions::Here, + }) => handle_payment(xon_location.clone(), payment, WeightToFeeConverter::::weight_to_fee(&weight)), + AssetId(dot_location @ Location { parents: 1, interior: Junctions::Here, - }) => handle_payment(dot_location.clone(), payment, WeightToFee::weight_to_fee(&weight)), + }) => handle_payment(dot_location.clone(), payment, WeightToFeeConverter::::weight_to_fee(&weight)), AssetId(usdt_location @ Location { parents: 1, @@ -86,7 +112,7 @@ impl WeightTrader for DynamicWeightTrader { Junction::PalletInstance(50), Junction::GeneralIndex(1984) ] - ) => handle_payment(usdt_location.clone(), payment, UsdtWeightToFee::weight_to_fee(&weight)), + ) => handle_payment(usdt_location.clone(), payment, WeightToFeeConverter::::weight_to_fee(&weight)), _ => { log::trace!(target: "xcm::weight_trader", "DynamicWeightTrader::buy_weight - Unsupported asset: {:?}", asset_id); @@ -100,24 +126,25 @@ impl WeightTrader for DynamicWeightTrader { } } -/// Handles a payment for purchasing XCM execution weight, supporting both DOT and USDT. -/// The function validates the provided asset balance and ensures it can fully cover the total cost. -/// The total fee consists of the required XCM execution fee plus a fixed surcharge of 0.01 (DOT or USDT). -/// -/// If the asset originates from the Relay Chain, the payment is processed using DOT. -/// If the asset comes from AssetHub (parachain 1000), it is processed using USDT. -/// The combined fee amount is then transferred to a predefined receiver account, -/// which is converted into an XCM-compatible location for proper asset deposit handling. -/// -/// After deducting the total fee (execution fee + 0.01), the function returns any remaining -/// balance to the caller. Detailed logging throughout the process ensures transparency -/// and simplifies debugging and auditing. +/// Handles the payment for weight purchase by deducting the required fee +/// from the provided assets and depositing it to the fee collector. +/// +/// The function calculates the total fee based on the provided `fee_amount` +/// and a fixed fee of 0.01 units of the asset. It then deducts this total fee +/// from the `payment` assets. If successful, it deposits the fee to a predefined +/// fee collector account and returns any remaining assets. fn handle_payment( asset_location: Location, payment: AssetsInHolding, fee_amount: u128, ) -> Result { let fixed_fee: u128 = match asset_location.clone() { + // XON: local chain (12 decimals -> 0.01 XON = 10_000_000_000) + Location { + parents: 0, + interior: Junctions::Here, + } => 10_000_000_000, + // DOT: relay chain (10 decimals -> 0.01 DOT = 100_000_000) Location { parents: 1, diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 14c9f9e8..737e279b 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -62,7 +62,7 @@ use frame_support::{ genesis_builder_helper::{build_state, get_preset}, weights::{ constants::WEIGHT_REF_TIME_PER_SECOND, Weight, WeightToFeeCoefficient, WeightToFeeCoefficients, - WeightToFeePolynomial, + WeightToFeePolynomial, WeightToFee as WeightToFeeConversion, }, }; @@ -77,20 +77,18 @@ use sp_core::{crypto::KeyTypeId, OpaqueMetadata}; use configs::{ RuntimeBlockWeights, xcm_config::{ - RelayLocation, XcmConfig, XcmRouter, LocationToAccountId, - weight_trader::DynamicWeightTrader + XcmConfig, XcmRouter, LocationToAccountId, + weight_trader::{WeightToFeeConverter, XonWeightToFeeRate, DotWeightToFeeRate, UsdtWeightToFeeRate} } }; use xcm::{ latest::prelude::{ - Asset, AssetId, Junctions, Junction, Location, - XcmContext, XcmHash, + AssetId, Junctions, Junction, Location, }, Version as XcmVersion, VersionedAssetId, VersionedAssets, VersionedLocation, VersionedXcm, }; -use xcm_executor::{traits::WeightTrader, AssetsInHolding}; use xcm_runtime_apis::{ dry_run::{ CallDryRunEffects as ApiCallDryRunEffects, @@ -695,7 +693,7 @@ impl_runtime_apis! { use frame_support::traits::StorageInfoTrait; use frame_system_benchmarking::Pallet as SystemBench; use cumulus_pallet_session_benchmarking::Pallet as SessionBench; - use super::*; + //use super::*; let mut list = Vec::::new(); list_benchmarks!(list, extra); @@ -708,7 +706,7 @@ impl_runtime_apis! { config: frame_benchmarking::BenchmarkConfig ) -> Result, sp_runtime::RuntimeString> { use frame_benchmarking::{BenchmarkError, Benchmarking, BenchmarkBatch}; - use super::*; + //use super::*; use frame_system_benchmarking::Pallet as SystemBench; impl frame_system_benchmarking::Config for Runtime { @@ -754,7 +752,20 @@ impl_runtime_apis! { impl xcm_runtime_apis::fees::XcmPaymentApi for Runtime { fn query_acceptable_payment_assets(xcm_version: xcm::Version) -> Result, XcmPaymentApiError> { let mut acceptable_assets: Vec = Vec::new(); - acceptable_assets.push(AssetId(RelayLocation::get())); + + // XON: Xode native token + acceptable_assets.push(AssetId(Location { + parents: 0, + interior: Junctions::Here, + })); + + // DOT: Relay chain native token + acceptable_assets.push(AssetId(Location { + parents: 1, + interior: Junctions::Here, + })); + + // USDT: AssetHub parachain asset (1984) acceptable_assets.push(AssetId(Location { parents: 1, interior: Junctions::X3(Arc::from([ @@ -773,37 +784,44 @@ impl_runtime_apis! { .map_err(|_| XcmPaymentApiError::WeightNotComputable) } - // This implementation is based on the approach taken in the latest version of pallet-xcm. - // Reference: https://docs.rs/pallet-xcm/22.0.1/src/pallet_xcm/lib.rs.html#3223 - // - // The version of pallet-xcm currently used in this chain is outdated and does not yet - // provide this functionality. To bridge the gap, we implemented `query_weight_to_asset_fee` - // in our runtime by following the design from `xcm-runtime-apis` and aligning it with the - // approach used upstream. - // - // Once the chain upgrades to a newer release of pallet-xcm, this implementation can be - // revisited to determine whether it should be replaced with the upstream version. fn query_weight_to_asset_fee(weight: Weight, asset: VersionedAssetId) -> Result { - let asset: AssetId = asset.clone().try_into() - .map_err(|_| XcmPaymentApiError::VersionedConversionFailed)?; - - let max_amount = u128::MAX / 2; - let max_payment: Asset = (asset.clone(), max_amount).into(); - let payment = AssetsInHolding::from(max_payment); - let context = XcmContext::with_message_id(XcmHash::default()); - - let mut trader = DynamicWeightTrader::new(); - let unspent_assets = trader - .buy_weight(weight, payment, &context) - .map_err(|_| XcmPaymentApiError::WeightNotComputable)?; - - let Some(unspent) = unspent_assets.fungible.get(&asset) else { - return Err(XcmPaymentApiError::AssetNotFound); - }; - - let paid = max_amount - unspent; - - Ok(paid) + // Convert VersionedAssetId to AssetId + let asset: AssetId = asset.clone() + .try_into() + .map_err(|_| XcmPaymentApiError::VersionedConversionFailed)?; + + // Add the fixed fee (0.01 DOT or USDT, depending on asset) + let total_fee: u128 = match asset { + // XON: local chain (12 decimals -> 0.01 XON = 10_000_000_000) + AssetId(Location { + parents: 0, + interior: Junctions::Here, + }) => WeightToFeeConverter::::weight_to_fee(&weight).saturating_add(10_000_000_000u128), + + // DOT: Relay chain (10 decimals -> 0.01 DOT = 100_000_000) + AssetId(Location { + parents: 1, + interior: Junctions::Here, + }) => WeightToFeeConverter::::weight_to_fee(&weight).saturating_add(100_000_000u128), + + // USDT: AssetHub parachain asset (1984) (6 decimals -> 0.01 USDT = 10_000) + AssetId(Location { + parents: 1, + interior: Junctions::X3(ref junctions), + }) if matches!( + junctions.as_ref(), + [ + Junction::Parachain(1000), + Junction::PalletInstance(50), + Junction::GeneralIndex(1984) + ] + ) => WeightToFeeConverter::::weight_to_fee(&weight).saturating_add(10_000u128), + + _ => return Err(XcmPaymentApiError::AssetNotFound), + }; + + // Ensure the fee does not exceed the maximum payment + Ok(total_fee) } fn query_delivery_fees(destination: VersionedLocation, message: VersionedXcm<()>) -> Result { diff --git a/zombienet/zombienet-local.toml b/zombienet/zombienet-local.toml index 416f79a2..133c3b25 100644 --- a/zombienet/zombienet-local.toml +++ b/zombienet/zombienet-local.toml @@ -1,44 +1,32 @@ [settings] -timeout = 2000 +timeout = 1000 node_verifier = "None" [relaychain] default_command = "./bin/polkadot" -default_args = ["-lparachain=debug", "-lxcm=trace", "-lruntime=debug"] +default_args = [ "-l=parachain=debug,xcm=trace" ] chain = "rococo-local" [[relaychain.nodes]] name = "alice" validator = true + ws_port = 9944 [[relaychain.nodes]] name = "bob" validator = true - - [[relaychain.nodes]] - name = "charlie" - validator = true - - [[relaychain.nodes]] - name = "dave" - validator = true - -# [[parachains]] -# id = 1000 -# cumulus_based = true - -# [[parachains.collators]] -# name = "assethub-collator" -# command = "./bin/polkadot-parachain" -# args = ["-lxcmp=trace", "-lxcm=trace", "-lruntime=debug"] -# ws_port = 9988 + ws_port = 9955 [[parachains]] -id = 4607 +id = 1000 cumulus_based = true [[parachains.collators]] - name = "xode-collator" + name = "charlie" + command = "../target/release/xode-node" + ws_port = 9988 + + [[parachains.collators]] + name = "dave" command = "../target/release/xode-node" - args = ["-lxcmp=trace", "-lxcm=trace", "-lruntime=debug"] - ws_port = 9999 \ No newline at end of file + ws_port = 9999