From ca827301b241d8232246e6b941a86452040bdb77 Mon Sep 17 00:00:00 2001 From: Wil Wade Date: Tue, 6 Aug 2024 16:13:51 +0000 Subject: [PATCH] Signups working --- services/account/k6-test/README.md | 6 + .../k6-test/generate/helpers/chain.mjs | 26 + services/account/k6-test/generate/signups.mjs | 69 ++ services/account/k6-test/new-sign-up.k6.js | 45 +- services/account/k6-test/package-lock.json | 841 ++++++++++++++++++ services/account/k6-test/package.json | 7 + services/account/k6-test/signups.gen.js | 165 ++++ 7 files changed, 1131 insertions(+), 28 deletions(-) create mode 100644 services/account/k6-test/generate/helpers/chain.mjs create mode 100644 services/account/k6-test/generate/signups.mjs create mode 100644 services/account/k6-test/signups.gen.js diff --git a/services/account/k6-test/README.md b/services/account/k6-test/README.md index 4f46bdb9..c3792a97 100644 --- a/services/account/k6-test/README.md +++ b/services/account/k6-test/README.md @@ -24,3 +24,9 @@ To run the script, execute the following command: ```bash k6 run health-check.k6.js ``` + +## Generating Test Data + +So that k6 doesn't have to interact with the chain, we can generate data sepatately and then use it for the tests. + +`npm run generate:signup` for example will re-generate the `signups.gen.js` file with 100 generated valid signup payloads. diff --git a/services/account/k6-test/generate/helpers/chain.mjs b/services/account/k6-test/generate/helpers/chain.mjs new file mode 100644 index 00000000..39931215 --- /dev/null +++ b/services/account/k6-test/generate/helpers/chain.mjs @@ -0,0 +1,26 @@ +// Only way to silence PolkadotJS API warnings we don't want +console.warn = () => {}; + +import { ApiPromise, WsProvider, Keyring } from '@polkadot/api'; +import { mnemonicGenerate } from '@polkadot/util-crypto'; +import { u8aToHex, u8aWrapBytes } from '@polkadot/util'; + +export async function getApi() { + const api = await ApiPromise.create({ + // Using mainnet as: 1. Nothing here would use local only metadata, 2. We aren't actually submitting. + provider: new WsProvider('wss://0.rpc.frequency.xyz'), + }); + await api.isReady; + return api; +} + +export function createKey() { + const mnemonic = mnemonicGenerate(); + const keyring = new Keyring({ type: 'sr25519' }); + const keypair = keyring.createFromUri(mnemonic); + return keypair; +} + +export function signPayloadSr25519(keys, data) { + return { Sr25519: u8aToHex(keys.sign(u8aWrapBytes(data.toU8a()))) }; +} diff --git a/services/account/k6-test/generate/signups.mjs b/services/account/k6-test/generate/signups.mjs new file mode 100644 index 00000000..d02ecdea --- /dev/null +++ b/services/account/k6-test/generate/signups.mjs @@ -0,0 +1,69 @@ +import fs from 'fs/promises'; +import { Bytes } from '@polkadot/types'; +import { getApi, createKey, signPayloadSr25519 } from './helpers/chain.mjs'; + +const GENERATE_COUNT = 10; + +const signup = (api) => { + const keypair = createKey(); + const expiration = 100; // Will this fail when running against longer chains? + + const addProviderData = api.registry.createType('PalletMsaAddProvider', { + authorizedMsaId: 1, + schemaIds: [1], + expiration, + }); + const createTx = api.tx.msa.createSponsoredAccountWithDelegation( + keypair.address, + signPayloadSr25519(keypair, addProviderData), + addProviderData, + ); + const claimHandlePayload = api.registry.createType('CommonPrimitivesHandlesClaimHandlePayload', { + baseHandle: new Bytes(api.registry, keypair.address.substring(0, 8)), + expiration, + }); + const claimTx = api.tx.handles.claimHandle( + keypair.address, + signPayloadSr25519(keypair, claimHandlePayload), + claimHandlePayload, + ); + + return { + signUp: { + extrinsics: [ + { + pallet: 'msa', + extrinsicName: 'createSponsoredAccountWithDelegation', + encodedExtrinsic: createTx.toHex(), + }, + { + pallet: 'handles', + extrinsicName: 'claimHandle', + encodedExtrinsic: claimTx.toHex(), + }, + ], + }, + }; +}; + +const main = async () => { + const api = await getApi(); + const generated = []; + for (let i = 0; i < GENERATE_COUNT; i++) { + generated.push(signup(api)); + } + // Write the generated array to './signups.gen.js' + const fileContent = ` + // GENERATED FILE! Regenerate using npm run generate:signups + export const signups = ${JSON.stringify(generated, null, 2)}; + `; + + try { + await fs.writeFile('./signups.gen.js', fileContent, 'utf8'); + console.log('Successfully wrote to ./signups.gen.js'); + } catch (err) { + console.error('Error writing to file:', err); + } +}; + +main().catch(console.error).finally(process.exit); diff --git a/services/account/k6-test/new-sign-up.k6.js b/services/account/k6-test/new-sign-up.k6.js index 3b9535a6..20c2e575 100644 --- a/services/account/k6-test/new-sign-up.k6.js +++ b/services/account/k6-test/new-sign-up.k6.js @@ -2,7 +2,8 @@ /* eslint-disable func-names */ /* * Account Service - * Account Service API + * Account Service API: New Sign Ups + * NOTE: This test MUST run on a clean chain and cannot be re-run without running: npm run generate:signups * * OpenAPI spec version: 1.0 * @@ -14,6 +15,8 @@ import http from 'k6/http'; import { group, check, sleep } from 'k6'; +import exec from 'k6/execution'; +import { signups } from './signups.gen.js'; export const options = { // scenarios: { @@ -27,7 +30,6 @@ export const options = { // }, // }, vus: 1, - iterations: 1, // TODO: Make the extrinsics dynamic to run this more than once on the same chain! duration: '20s', thresholds: { http_req_duration: ['avg<100', 'p(95)<200'], @@ -44,22 +46,22 @@ const CALLBACK_URL = 'http://localhost:3001/webhooks/account-service'; const BASE_URL = 'http://localhost:3000'; // Sleep duration between successive requests. const SLEEP_DURATION = 0.1; -const BLOCKTIME_SECONDS = 12; +const BLOCKTIME_SECONDS = 13; // Add 1 second for additional loop buffer // Global variables should be initialized. -function checkCallback() { +function checkCallback(referenceId) { const res = http.get(CALLBACK_URL); console.log('Callback response:', res.status, res.body); check(res, { 'callback received': (r) => r.status === 201, 'callback contains expected data': (r) => { const json = JSON.parse(r.body); - return json.referenceId === 'DekKx1F_WYOWCQFXE3vgwqXP4U4'; + return json.referenceId === referenceId; }, }); } -export function setup() { +export async function setup() { // Let's make sure the service is healthy before starting the test. console.log('Checking service health...'); const res = http.get(`${BASE_URL}/healthz`); @@ -68,10 +70,11 @@ export function setup() { console.error('Service is not healthy! Terminating test...'); return false; } - return true; + + return { signUpBody: signups[exec.vu.iterationInInstance] }; } -export default function () { +export default function (setupData) { group('/v1/accounts/siwf', () => { // Request No. 1: AccountsController_getSIWFConfig { @@ -86,39 +89,25 @@ export default function () { } // Request No. 2: AccountsController_postSignInWithFrequency + let referenceId; { const url = `${BASE_URL}/v1/accounts/siwf`; // Use the SIWF sample Sign Up request body for a new user. - const body = { - signUp: { - extrinsics: [ - { - pallet: 'msa', - extrinsicName: 'createSponsoredAccountWithDelegation', - encodedExtrinsic: - '0xed01043c01b01b4dcafc8a8e73bff98e7558249f53cd0e0e64fa6b8f0159f0913d4874d9360176644186458bad3b00bbd0ac21e6c9bd5a8bed9ced7a772d11a9aac025b47f6559468808e272696f596a02af230951861027c0dc30f7163ecf316838a0723483010000000000000014000000000000000000004d000000', - }, - { - pallet: 'handles', - extrinsicName: 'claimHandle', - encodedExtrinsic: - '0xb901044200b01b4dcafc8a8e73bff98e7558249f53cd0e0e64fa6b8f0159f0913d4874d93601225508ae2da9804c60660a150277eb32b2a0f6b9c8f6e07dd6cad799cb31ae1dfb43896f488e9c0b7ec8b530d930b3f9b690683f2765d5def3fee3fc6540d58714656e6464794d000000', - }, - ], - }, - }; + const body = setupData.signUpBody; const params = { headers: { 'Content-Type': 'application/json', Accept: 'application/json' } }; const request = http.post(url, JSON.stringify(body), params); check(request, { 'Signed in successfully': (r) => r.status === 201, + 'Has referenceId': (r) => !!JSON.parse(r.body).referenceId, }); + referenceId = JSON.parse(request.body).referenceId; } // The front end will poll the server for the account status. // We'll wait here for a block to be finalized. sleep(BLOCKTIME_SECONDS); - console.log('Block finalized. Checking callback...'); - checkCallback(); + console.log('Block finalized. Checking callback...', { referenceId }); + checkCallback(referenceId); }); } diff --git a/services/account/k6-test/package-lock.json b/services/account/k6-test/package-lock.json index 4d22478e..b8f75166 100644 --- a/services/account/k6-test/package-lock.json +++ b/services/account/k6-test/package-lock.json @@ -8,15 +8,856 @@ "name": "k6-scripts", "version": "1.0.0", "license": "Apache-2.0", + "dependencies": { + "@polkadot/api": "^12.3.1", + "@polkadot/types": "^12.3.1", + "@polkadot/util": "^13.0.2", + "@polkadot/util-crypto": "^13.0.2" + }, "devDependencies": { "@types/k6": "^0.51.0" } }, + "node_modules/@noble/curves": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", + "dependencies": { + "@noble/hashes": "1.4.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "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/@polkadot-api/json-rpc-provider-proxy": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/@polkadot-api/json-rpc-provider-proxy/-/json-rpc-provider-proxy-0.0.1.tgz", + "integrity": "sha512-gmVDUP8LpCH0BXewbzqXF2sdHddq1H1q+XrAW2of+KZj4woQkIGBRGTJHeBEVHe30EB+UejR1N2dT4PO/RvDdg==", + "optional": true + }, + "node_modules/@polkadot-api/metadata-builders": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/@polkadot-api/metadata-builders/-/metadata-builders-0.0.1.tgz", + "integrity": "sha512-GCI78BHDzXAF/L2pZD6Aod/yl82adqQ7ftNmKg51ixRL02JpWUA+SpUKTJE5MY1p8kiJJIo09P2um24SiJHxNA==", + "optional": true, + "dependencies": { + "@polkadot-api/substrate-bindings": "0.0.1", + "@polkadot-api/utils": "0.0.1" + } + }, + "node_modules/@polkadot-api/observable-client": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@polkadot-api/observable-client/-/observable-client-0.1.0.tgz", + "integrity": "sha512-GBCGDRztKorTLna/unjl/9SWZcRmvV58o9jwU2Y038VuPXZcr01jcw/1O3x+yeAuwyGzbucI/mLTDa1QoEml3A==", + "optional": true, + "dependencies": { + "@polkadot-api/metadata-builders": "0.0.1", + "@polkadot-api/substrate-bindings": "0.0.1", + "@polkadot-api/substrate-client": "0.0.1", + "@polkadot-api/utils": "0.0.1" + }, + "peerDependencies": { + "rxjs": ">=7.8.0" + } + }, + "node_modules/@polkadot-api/substrate-bindings": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/@polkadot-api/substrate-bindings/-/substrate-bindings-0.0.1.tgz", + "integrity": "sha512-bAe7a5bOPnuFVmpv7y4BBMRpNTnMmE0jtTqRUw/+D8ZlEHNVEJQGr4wu3QQCl7k1GnSV1wfv3mzIbYjErEBocg==", + "optional": true, + "dependencies": { + "@noble/hashes": "^1.3.1", + "@polkadot-api/utils": "0.0.1", + "@scure/base": "^1.1.1", + "scale-ts": "^1.6.0" + } + }, + "node_modules/@polkadot-api/substrate-client": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/@polkadot-api/substrate-client/-/substrate-client-0.0.1.tgz", + "integrity": "sha512-9Bg9SGc3AwE+wXONQoW8GC00N3v6lCZLW74HQzqB6ROdcm5VAHM4CB/xRzWSUF9CXL78ugiwtHx3wBcpx4H4Wg==", + "optional": true + }, + "node_modules/@polkadot-api/utils": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/@polkadot-api/utils/-/utils-0.0.1.tgz", + "integrity": "sha512-3j+pRmlF9SgiYDabSdZsBSsN5XHbpXOAce1lWj56IEEaFZVjsiCaxDOA7C9nCcgfVXuvnbxqqEGQvnY+QfBAUw==", + "optional": true + }, + "node_modules/@polkadot/api": { + "version": "12.3.1", + "resolved": "https://registry.npmjs.org/@polkadot/api/-/api-12.3.1.tgz", + "integrity": "sha512-VCrtadJRJttya5NhZ8slkD/UQyOZv4qABjagQMaG1eTZpn5k1wskmDUGdHrZZpYO5jBPewnCgaN8+LPKO2qiOw==", + "dependencies": { + "@polkadot/api-augment": "12.3.1", + "@polkadot/api-base": "12.3.1", + "@polkadot/api-derive": "12.3.1", + "@polkadot/keyring": "^13.0.2", + "@polkadot/rpc-augment": "12.3.1", + "@polkadot/rpc-core": "12.3.1", + "@polkadot/rpc-provider": "12.3.1", + "@polkadot/types": "12.3.1", + "@polkadot/types-augment": "12.3.1", + "@polkadot/types-codec": "12.3.1", + "@polkadot/types-create": "12.3.1", + "@polkadot/types-known": "12.3.1", + "@polkadot/util": "^13.0.2", + "@polkadot/util-crypto": "^13.0.2", + "eventemitter3": "^5.0.1", + "rxjs": "^7.8.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@polkadot/api-augment": { + "version": "12.3.1", + "resolved": "https://registry.npmjs.org/@polkadot/api-augment/-/api-augment-12.3.1.tgz", + "integrity": "sha512-KfofZVEUeTgLzcexdxKBT2vihazDheUoTLxbsa2ztmmw4UB/IjOL911y04pjg2obZQAI9B+oCyxJXyCfzauWEg==", + "dependencies": { + "@polkadot/api-base": "12.3.1", + "@polkadot/rpc-augment": "12.3.1", + "@polkadot/types": "12.3.1", + "@polkadot/types-augment": "12.3.1", + "@polkadot/types-codec": "12.3.1", + "@polkadot/util": "^13.0.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@polkadot/api-base": { + "version": "12.3.1", + "resolved": "https://registry.npmjs.org/@polkadot/api-base/-/api-base-12.3.1.tgz", + "integrity": "sha512-vNbxXNjn4APfXg+ui99gurX2Jzns+eezmWranxoGXT7q0mme1zAtWus5t4e+qe1qRjDNZZYPruF7YJA8dL5k8A==", + "dependencies": { + "@polkadot/rpc-core": "12.3.1", + "@polkadot/types": "12.3.1", + "@polkadot/util": "^13.0.2", + "rxjs": "^7.8.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@polkadot/api-derive": { + "version": "12.3.1", + "resolved": "https://registry.npmjs.org/@polkadot/api-derive/-/api-derive-12.3.1.tgz", + "integrity": "sha512-2MbK1h4GcKEdSgDKKYI28iZESw0VOm0kekV6YGQflZNWe84jJOn2rohP8pACseUjQjwWDgbPPBvTlRZTk7zdAw==", + "dependencies": { + "@polkadot/api": "12.3.1", + "@polkadot/api-augment": "12.3.1", + "@polkadot/api-base": "12.3.1", + "@polkadot/rpc-core": "12.3.1", + "@polkadot/types": "12.3.1", + "@polkadot/types-codec": "12.3.1", + "@polkadot/util": "^13.0.2", + "@polkadot/util-crypto": "^13.0.2", + "rxjs": "^7.8.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@polkadot/keyring": { + "version": "13.0.2", + "resolved": "https://registry.npmjs.org/@polkadot/keyring/-/keyring-13.0.2.tgz", + "integrity": "sha512-NeLbhyKDT5W8LI9seWTZGePxNTOVpDhv2018HSrEDwJq9Ie0C4TZhUf3KNERCkSveuThXjfQJMs+1CF33ZXPWw==", + "dependencies": { + "@polkadot/util": "13.0.2", + "@polkadot/util-crypto": "13.0.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@polkadot/util": "13.0.2", + "@polkadot/util-crypto": "13.0.2" + } + }, + "node_modules/@polkadot/networks": { + "version": "13.0.2", + "resolved": "https://registry.npmjs.org/@polkadot/networks/-/networks-13.0.2.tgz", + "integrity": "sha512-ABAL+vug/gIwkdFEzeh87JoJd0YKrxSYg/HjUrZ+Zis2ucxQEKpvtCpJ34ku+YrjacBfVqIAkkwd3ZdIPGq9aQ==", + "dependencies": { + "@polkadot/util": "13.0.2", + "@substrate/ss58-registry": "^1.46.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@polkadot/rpc-augment": { + "version": "12.3.1", + "resolved": "https://registry.npmjs.org/@polkadot/rpc-augment/-/rpc-augment-12.3.1.tgz", + "integrity": "sha512-/tZLl5IuQ4vdGlUAbd8x3ShZ35XDSeyknKHCC+9kIrM/+KIyoCYBob2RXP9uqX8m516AWkXUrjsSO6DFPBpRGg==", + "dependencies": { + "@polkadot/rpc-core": "12.3.1", + "@polkadot/types": "12.3.1", + "@polkadot/types-codec": "12.3.1", + "@polkadot/util": "^13.0.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@polkadot/rpc-core": { + "version": "12.3.1", + "resolved": "https://registry.npmjs.org/@polkadot/rpc-core/-/rpc-core-12.3.1.tgz", + "integrity": "sha512-bNo26P20nRpLfANTK4sWEakxvqBJpKwAp/Gt7KlxoGgoTUbWFapyGKScFxp/pblycEziEbC+ZjkLMkaWaqi69g==", + "dependencies": { + "@polkadot/rpc-augment": "12.3.1", + "@polkadot/rpc-provider": "12.3.1", + "@polkadot/types": "12.3.1", + "@polkadot/util": "^13.0.2", + "rxjs": "^7.8.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@polkadot/rpc-provider": { + "version": "12.3.1", + "resolved": "https://registry.npmjs.org/@polkadot/rpc-provider/-/rpc-provider-12.3.1.tgz", + "integrity": "sha512-Tg1Oj/1ldivqwnnOWepcNHEHYgpOBffxlrZMEXH1XX6D3AZaUhAWbatizyisydpuMbknTQ9FGYSnb9rOc2QBJw==", + "dependencies": { + "@polkadot/keyring": "^13.0.2", + "@polkadot/types": "12.3.1", + "@polkadot/types-support": "12.3.1", + "@polkadot/util": "^13.0.2", + "@polkadot/util-crypto": "^13.0.2", + "@polkadot/x-fetch": "^13.0.2", + "@polkadot/x-global": "^13.0.2", + "@polkadot/x-ws": "^13.0.2", + "eventemitter3": "^5.0.1", + "mock-socket": "^9.3.1", + "nock": "^13.5.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@substrate/connect": "0.8.10" + } + }, + "node_modules/@polkadot/types": { + "version": "12.3.1", + "resolved": "https://registry.npmjs.org/@polkadot/types/-/types-12.3.1.tgz", + "integrity": "sha512-4MkTF1znpgp9mZc/ZZPdFe7/5it9v+EJmzXc/DEOX9kVWs2BuKOWopzOFyO3reVUUB+v7dxfSOArSsxkMUcuoA==", + "dependencies": { + "@polkadot/keyring": "^13.0.2", + "@polkadot/types-augment": "12.3.1", + "@polkadot/types-codec": "12.3.1", + "@polkadot/types-create": "12.3.1", + "@polkadot/util": "^13.0.2", + "@polkadot/util-crypto": "^13.0.2", + "rxjs": "^7.8.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@polkadot/types-augment": { + "version": "12.3.1", + "resolved": "https://registry.npmjs.org/@polkadot/types-augment/-/types-augment-12.3.1.tgz", + "integrity": "sha512-I3ggJt7W3UOScP6WA6PNmNsmpCfZtXkRJvSJkX7bi2LsSm/iF0xo0KdpQK02dHu7nGRFD9O5cSoVawzZJifGLA==", + "dependencies": { + "@polkadot/types": "12.3.1", + "@polkadot/types-codec": "12.3.1", + "@polkadot/util": "^13.0.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@polkadot/types-codec": { + "version": "12.3.1", + "resolved": "https://registry.npmjs.org/@polkadot/types-codec/-/types-codec-12.3.1.tgz", + "integrity": "sha512-yZ4exsQI+eVkE/fZNuJBOajAgOH/YncKWOOf0N4lc6iq28oYp22DCAXc50Ym372l4HO+uhC9QdMPH9EiWwT2pQ==", + "dependencies": { + "@polkadot/util": "^13.0.2", + "@polkadot/x-bigint": "^13.0.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@polkadot/types-create": { + "version": "12.3.1", + "resolved": "https://registry.npmjs.org/@polkadot/types-create/-/types-create-12.3.1.tgz", + "integrity": "sha512-Jf9BByWB64FPW3lM5/Mcc/foyPJ3L9t0QwHVHaYWaonZt6l7SPX71rQmD7twJiTj9q1d1WidDKg/TtRDNbm1yA==", + "dependencies": { + "@polkadot/types-codec": "12.3.1", + "@polkadot/util": "^13.0.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@polkadot/types-known": { + "version": "12.3.1", + "resolved": "https://registry.npmjs.org/@polkadot/types-known/-/types-known-12.3.1.tgz", + "integrity": "sha512-G8t0uiIW1iu3KwylHDPnqdHxg5qwBxzPZQJvsjnGx2qBUk2VqXditKWcNFLEwCTnJPL95t2AzEO711lS99WRbg==", + "dependencies": { + "@polkadot/networks": "^13.0.2", + "@polkadot/types": "12.3.1", + "@polkadot/types-codec": "12.3.1", + "@polkadot/types-create": "12.3.1", + "@polkadot/util": "^13.0.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@polkadot/types-support": { + "version": "12.3.1", + "resolved": "https://registry.npmjs.org/@polkadot/types-support/-/types-support-12.3.1.tgz", + "integrity": "sha512-TwL5M5HkZ4jQGKekD+qJFLba7UXWASfwlPy2OpKj0LOnnmq4tudXgN13UFdQ7HoOmisPhr+vYo9vteYeBZ0jTA==", + "dependencies": { + "@polkadot/util": "^13.0.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@polkadot/util": { + "version": "13.0.2", + "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-13.0.2.tgz", + "integrity": "sha512-/6bS9sfhJLhs8QuqWaR1eRapzfDdGC5XAQZEPL9NN5sTTA7HxWos8rVleai0UERm8QUMabjZ9rK9KpzbXl7ojg==", + "dependencies": { + "@polkadot/x-bigint": "13.0.2", + "@polkadot/x-global": "13.0.2", + "@polkadot/x-textdecoder": "13.0.2", + "@polkadot/x-textencoder": "13.0.2", + "@types/bn.js": "^5.1.5", + "bn.js": "^5.2.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@polkadot/util-crypto": { + "version": "13.0.2", + "resolved": "https://registry.npmjs.org/@polkadot/util-crypto/-/util-crypto-13.0.2.tgz", + "integrity": "sha512-woUsJJ6zd/caL7U+D30a5oM/+WK9iNI00Y8aNUHSj6Zq/KPzK9uqDBaLGWwlgrejoMQkxxiU2X0f2LzP15AtQg==", + "dependencies": { + "@noble/curves": "^1.3.0", + "@noble/hashes": "^1.3.3", + "@polkadot/networks": "13.0.2", + "@polkadot/util": "13.0.2", + "@polkadot/wasm-crypto": "^7.3.2", + "@polkadot/wasm-util": "^7.3.2", + "@polkadot/x-bigint": "13.0.2", + "@polkadot/x-randomvalues": "13.0.2", + "@scure/base": "^1.1.5", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@polkadot/util": "13.0.2" + } + }, + "node_modules/@polkadot/wasm-bridge": { + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/@polkadot/wasm-bridge/-/wasm-bridge-7.3.2.tgz", + "integrity": "sha512-AJEXChcf/nKXd5Q/YLEV5dXQMle3UNT7jcXYmIffZAo/KI394a+/24PaISyQjoNC0fkzS1Q8T5pnGGHmXiVz2g==", + "dependencies": { + "@polkadot/wasm-util": "7.3.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@polkadot/util": "*", + "@polkadot/x-randomvalues": "*" + } + }, + "node_modules/@polkadot/wasm-crypto": { + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/@polkadot/wasm-crypto/-/wasm-crypto-7.3.2.tgz", + "integrity": "sha512-+neIDLSJ6jjVXsjyZ5oLSv16oIpwp+PxFqTUaZdZDoA2EyFRQB8pP7+qLsMNk+WJuhuJ4qXil/7XiOnZYZ+wxw==", + "dependencies": { + "@polkadot/wasm-bridge": "7.3.2", + "@polkadot/wasm-crypto-asmjs": "7.3.2", + "@polkadot/wasm-crypto-init": "7.3.2", + "@polkadot/wasm-crypto-wasm": "7.3.2", + "@polkadot/wasm-util": "7.3.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@polkadot/util": "*", + "@polkadot/x-randomvalues": "*" + } + }, + "node_modules/@polkadot/wasm-crypto-asmjs": { + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/@polkadot/wasm-crypto-asmjs/-/wasm-crypto-asmjs-7.3.2.tgz", + "integrity": "sha512-QP5eiUqUFur/2UoF2KKKYJcesc71fXhQFLT3D4ZjG28Mfk2ZPI0QNRUfpcxVQmIUpV5USHg4geCBNuCYsMm20Q==", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@polkadot/util": "*" + } + }, + "node_modules/@polkadot/wasm-crypto-init": { + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/@polkadot/wasm-crypto-init/-/wasm-crypto-init-7.3.2.tgz", + "integrity": "sha512-FPq73zGmvZtnuJaFV44brze3Lkrki3b4PebxCy9Fplw8nTmisKo9Xxtfew08r0njyYh+uiJRAxPCXadkC9sc8g==", + "dependencies": { + "@polkadot/wasm-bridge": "7.3.2", + "@polkadot/wasm-crypto-asmjs": "7.3.2", + "@polkadot/wasm-crypto-wasm": "7.3.2", + "@polkadot/wasm-util": "7.3.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@polkadot/util": "*", + "@polkadot/x-randomvalues": "*" + } + }, + "node_modules/@polkadot/wasm-crypto-wasm": { + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/@polkadot/wasm-crypto-wasm/-/wasm-crypto-wasm-7.3.2.tgz", + "integrity": "sha512-15wd0EMv9IXs5Abp1ZKpKKAVyZPhATIAHfKsyoWCEFDLSOA0/K0QGOxzrAlsrdUkiKZOq7uzSIgIDgW8okx2Mw==", + "dependencies": { + "@polkadot/wasm-util": "7.3.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@polkadot/util": "*" + } + }, + "node_modules/@polkadot/wasm-util": { + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/@polkadot/wasm-util/-/wasm-util-7.3.2.tgz", + "integrity": "sha512-bmD+Dxo1lTZyZNxbyPE380wd82QsX+43mgCm40boyKrRppXEyQmWT98v/Poc7chLuskYb6X8IQ6lvvK2bGR4Tg==", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@polkadot/util": "*" + } + }, + "node_modules/@polkadot/x-bigint": { + "version": "13.0.2", + "resolved": "https://registry.npmjs.org/@polkadot/x-bigint/-/x-bigint-13.0.2.tgz", + "integrity": "sha512-h2jKT/UaxiEal8LhQeH6+GCjO7GwEqVAD2SNYteCOXff6yNttqAZYJuHZsndbVjVNwqRNf8D5q/zZkD0HUd6xQ==", + "dependencies": { + "@polkadot/x-global": "13.0.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@polkadot/x-fetch": { + "version": "13.0.2", + "resolved": "https://registry.npmjs.org/@polkadot/x-fetch/-/x-fetch-13.0.2.tgz", + "integrity": "sha512-B/gf9iriUr6za/Ui7zIFBfHz7UBZ68rJEIteWHx1UHRCZPcLqv+hgpev6xIGrkfFljI0/lI7IwtN2qy6HYzFBg==", + "dependencies": { + "@polkadot/x-global": "13.0.2", + "node-fetch": "^3.3.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@polkadot/x-global": { + "version": "13.0.2", + "resolved": "https://registry.npmjs.org/@polkadot/x-global/-/x-global-13.0.2.tgz", + "integrity": "sha512-OoNIXLB5y8vIKpk4R+XmpDPhipNXWSUvEwUnpQT7NAxNLmzgMq1FhbrwBWWPRNHPrQonp7mqxV/X+v5lv1HW/g==", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@polkadot/x-randomvalues": { + "version": "13.0.2", + "resolved": "https://registry.npmjs.org/@polkadot/x-randomvalues/-/x-randomvalues-13.0.2.tgz", + "integrity": "sha512-SGj+L0H/7TWZtSmtkWlixO4DFzXDdluI0UscN2h285os2Ns8PnmBbue+iJ8PVSzpY1BOxd66gvkkpboPz+jXFQ==", + "dependencies": { + "@polkadot/x-global": "13.0.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@polkadot/util": "13.0.2", + "@polkadot/wasm-util": "*" + } + }, + "node_modules/@polkadot/x-textdecoder": { + "version": "13.0.2", + "resolved": "https://registry.npmjs.org/@polkadot/x-textdecoder/-/x-textdecoder-13.0.2.tgz", + "integrity": "sha512-mauglOkTJxLGmLwLc3J5Jlq/W+SHP53eiy3F8/8JxxfnXrZKgWoQXGpvXYPjFnMZj0MzDSy/6GjyGWnDCgdQFA==", + "dependencies": { + "@polkadot/x-global": "13.0.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@polkadot/x-textencoder": { + "version": "13.0.2", + "resolved": "https://registry.npmjs.org/@polkadot/x-textencoder/-/x-textencoder-13.0.2.tgz", + "integrity": "sha512-Lq08H2OnVXj97uaOwg7tcmRS7a4VJYkHEeWO4FyEMOk6P6lU6W8OVNjjxG0se9PCEgmyZPUDbJI//1ynzP4cXw==", + "dependencies": { + "@polkadot/x-global": "13.0.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@polkadot/x-ws": { + "version": "13.0.2", + "resolved": "https://registry.npmjs.org/@polkadot/x-ws/-/x-ws-13.0.2.tgz", + "integrity": "sha512-nC5e2eY5D5ZR5teQOB7ib+dWLbmNws86cTz3BjKCalSMBBIn6i3V9ElgABpierBmnSJe9D94EyrH1BxdVfDxUg==", + "dependencies": { + "@polkadot/x-global": "13.0.2", + "tslib": "^2.6.2", + "ws": "^8.16.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@scure/base": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.7.tgz", + "integrity": "sha512-PPNYBslrLNNUQ/Yad37MHYsNQtK67EhWb6WtSvNLLPo7SdVZgkUjD6Dg+5On7zNwmskf8OX7I7Nx5oN+MIWE0g==", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@substrate/connect": { + "version": "0.8.10", + "resolved": "https://registry.npmjs.org/@substrate/connect/-/connect-0.8.10.tgz", + "integrity": "sha512-DIyQ13DDlXqVFnLV+S6/JDgiGowVRRrh18kahieJxhgvzcWicw5eLc6jpfQ0moVVLBYkO7rctB5Wreldwpva8w==", + "deprecated": "versions below 1.x are no longer maintained", + "optional": true, + "dependencies": { + "@substrate/connect-extension-protocol": "^2.0.0", + "@substrate/connect-known-chains": "^1.1.4", + "@substrate/light-client-extension-helpers": "^0.0.6", + "smoldot": "2.0.22" + } + }, + "node_modules/@substrate/connect-extension-protocol": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@substrate/connect-extension-protocol/-/connect-extension-protocol-2.0.0.tgz", + "integrity": "sha512-nKu8pDrE3LNCEgJjZe1iGXzaD6OSIDD4Xzz/yo4KO9mQ6LBvf49BVrt4qxBFGL6++NneLiWUZGoh+VSd4PyVIg==", + "optional": true + }, + "node_modules/@substrate/connect-known-chains": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@substrate/connect-known-chains/-/connect-known-chains-1.2.2.tgz", + "integrity": "sha512-gOGrXSWA2d/3kf8Yco00VlHZl48smzAGW5Z9MDxMht98hRpT2yEEN4N5QdoEKMI4ihDW8goXGzmp79D0hFPpuA==", + "optional": true + }, + "node_modules/@substrate/light-client-extension-helpers": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/@substrate/light-client-extension-helpers/-/light-client-extension-helpers-0.0.6.tgz", + "integrity": "sha512-girltEuxQ1BvkJWmc8JJlk4ZxnlGXc/wkLcNguhY+UoDEMBK0LsdtfzQKIfrIehi4QdeSBlFEFBoI4RqPmsZzA==", + "optional": true, + "dependencies": { + "@polkadot-api/json-rpc-provider": "0.0.1", + "@polkadot-api/json-rpc-provider-proxy": "0.0.1", + "@polkadot-api/observable-client": "0.1.0", + "@polkadot-api/substrate-client": "0.0.1", + "@substrate/connect-extension-protocol": "^2.0.0", + "@substrate/connect-known-chains": "^1.1.4", + "rxjs": "^7.8.1" + }, + "peerDependencies": { + "smoldot": "2.x" + } + }, + "node_modules/@substrate/ss58-registry": { + "version": "1.49.0", + "resolved": "https://registry.npmjs.org/@substrate/ss58-registry/-/ss58-registry-1.49.0.tgz", + "integrity": "sha512-leW6Ix4LD7XgvxT7+aobPWSw+WvPcN2Rxof1rmd0mNC5t2n99k1N7UNEvz7YEFSOUeHWmKIY7F5q8KeIqYoHfA==" + }, + "node_modules/@types/bn.js": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.5.tgz", + "integrity": "sha512-V46N0zwKRF5Q00AZ6hWtN0T8gGmDUaUzLWQvHFo5yThtVwK/VCenFY3wXVbOvNfajEpsTfQM4IN9k/d6gUVX3A==", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/k6": { "version": "0.51.0", "resolved": "https://registry.npmjs.org/@types/k6/-/k6-0.51.0.tgz", "integrity": "sha512-xelcvFGPI4VYrV5ozADmRuFQBKmDqDRzxfHVuCDD1/firZiSQvTP0pntxHuYUSkRyL8I83kvABXUlnLYNT2VuA==", "dev": true + }, + "node_modules/@types/node": { + "version": "22.1.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.1.0.tgz", + "integrity": "sha512-AOmuRF0R2/5j1knA3c6G3HOk523Ga+l+ZXltX8SF1+5oqcXijjfTd8fY3XRZqSihEu9XhtQnKYLmkFaoxgsJHw==", + "dependencies": { + "undici-types": "~6.13.0" + } + }, + "node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" + }, + "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" + } + }, + "node_modules/debug": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==" + }, + "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" + }, + "engines": { + "node": "^12.20 || >= 14.13" + } + }, + "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": { + "fetch-blob": "^3.1.2" + }, + "engines": { + "node": ">=12.20.0" + } + }, + "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/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/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/nock": { + "version": "13.5.4", + "resolved": "https://registry.npmjs.org/nock/-/nock-13.5.4.tgz", + "integrity": "sha512-yAyTfdeNJGGBFxWdzSKCBYxs5FxLbCg5X5Q4ets974hcQzG1+qCxvIyOo4j2Ry6MUlhWVMX4OoYDefAIIwupjw==", + "dependencies": { + "debug": "^4.1.0", + "json-stringify-safe": "^5.0.1", + "propagate": "^2.0.0" + }, + "engines": { + "node": ">= 10.13" + } + }, + "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==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "github", + "url": "https://paypal.me/jimmywarting" + } + ], + "engines": { + "node": ">=10.5.0" + } + }, + "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": { + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/node-fetch" + } + }, + "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_modules/rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/scale-ts": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/scale-ts/-/scale-ts-1.6.0.tgz", + "integrity": "sha512-Ja5VCjNZR8TGKhUumy9clVVxcDpM+YFjAnkMuwQy68Hixio3VRRvWdE3g8T/yC+HXA0ZDQl2TGyUmtmbcVl40Q==", + "optional": true + }, + "node_modules/smoldot": { + "version": "2.0.22", + "resolved": "https://registry.npmjs.org/smoldot/-/smoldot-2.0.22.tgz", + "integrity": "sha512-B50vRgTY6v3baYH6uCgL15tfaag5tcS2o/P5q1OiXcKGv1axZDfz2dzzMuIkVpyMR2ug11F6EAtQlmYBQd292g==", + "optional": true, + "dependencies": { + "ws": "^8.8.1" + } + }, + "node_modules/tslib": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", + "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + }, + "node_modules/undici-types": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.13.0.tgz", + "integrity": "sha512-xtFJHudx8S2DSoujjMd1WeWvn7KKWFRESZTMeL1RptAYERu29D6jphMjjY+vn96jvN3kVPDNxU/E13VTaXj6jg==" + }, + "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": ">= 8" + } + }, + "node_modules/ws": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } } } } diff --git a/services/account/k6-test/package.json b/services/account/k6-test/package.json index 38527c16..aeb9ac01 100644 --- a/services/account/k6-test/package.json +++ b/services/account/k6-test/package.json @@ -4,6 +4,7 @@ "description": "The `script.js` file contains most of the Swagger/OpenAPI specification and you can customize it to your needs.", "main": "account-service-load.js", "scripts": { + "generate:signups": "node generate/signups.mjs", "test": "echo \"Error: no test specified\" && exit 1" }, "keywords": [], @@ -11,5 +12,11 @@ "license": "Apache-2.0", "devDependencies": { "@types/k6": "^0.51.0" + }, + "dependencies": { + "@polkadot/api": "^12.3.1", + "@polkadot/types": "^12.3.1", + "@polkadot/util": "^13.0.2", + "@polkadot/util-crypto": "^13.0.2" } } diff --git a/services/account/k6-test/signups.gen.js b/services/account/k6-test/signups.gen.js new file mode 100644 index 00000000..04b3511d --- /dev/null +++ b/services/account/k6-test/signups.gen.js @@ -0,0 +1,165 @@ + + // GENERATED FILE! Regenerate using npm run generate:signups + export const signups = [ + { + "signUp": { + "extrinsics": [ + { + "pallet": "msa", + "extrinsicName": "createSponsoredAccountWithDelegation", + "encodedExtrinsic": "0xcd01043c0112314c23e4db5a72860c155340c795790090388f101e67d7b9770cc8b556ec6c017adc6b9662b45039b188b880e581a9c2e8e8416622ce2933d5495497c4e4a25d5c708380563daee96c079a764a4e79578b95419fa8147890693e46d40f34768f010000000000000004010064000000" + }, + { + "pallet": "handles", + "extrinsicName": "claimHandle", + "encodedExtrinsic": "0xc50104420012314c23e4db5a72860c155340c795790090388f101e67d7b9770cc8b556ec6c0188346a1fdba5e63a91ce2de8e2e45d16c4af6476e2bed5469fc03565fbe0a973ae6257db65772322c4aeaa0494a91dcc1010d801452df284d03b3c2ad7fd168f203543555a4e327a6764000000" + } + ] + } + }, + { + "signUp": { + "extrinsics": [ + { + "pallet": "msa", + "extrinsicName": "createSponsoredAccountWithDelegation", + "encodedExtrinsic": "0xcd01043c01788dce66a1b7bbd4e223f5a1ba10d93fdaaddefc151f6b221dd5e0ea564f2a7401963bb2e86a9ced2d2bee262027e7e177aab080ca5a597caab07f052c74e79353a79cf6914462096e98135bd5b3f46143bdbccc54dcd3eb1048a497b10f7f2286010000000000000004010064000000" + }, + { + "pallet": "handles", + "extrinsicName": "claimHandle", + "encodedExtrinsic": "0xc501044200788dce66a1b7bbd4e223f5a1ba10d93fdaaddefc151f6b221dd5e0ea564f2a74013465e0e8814ecb2269a200a1e479826d6a9aba644b21d7f4c1a5eea3b80eb12214a5bccd2bf8ff92f356141eface7b9a41eac1b56afacdeb3d6cce596ecdc98d2035456e6d6a44436264000000" + } + ] + } + }, + { + "signUp": { + "extrinsics": [ + { + "pallet": "msa", + "extrinsicName": "createSponsoredAccountWithDelegation", + "encodedExtrinsic": "0xcd01043c014e84760e864f18fa4aa8089f8cfa3347ce8533ccd898c386730d9bded366026201306663ea0dd22fff1df12db8a3dd19ecf94fede4568fe497f86d0a29471d3970cc45a11c3e8f1298b76ee3901ee1be5c01005beb2d880323be79f1652a279786010000000000000004010064000000" + }, + { + "pallet": "handles", + "extrinsicName": "claimHandle", + "encodedExtrinsic": "0xc5010442004e84760e864f18fa4aa8089f8cfa3347ce8533ccd898c386730d9bded3660262012e4c32568af35395bdbfa19eade46fac0b7f26aa7ac2dabc1c589d0cc6e0b954e24c29611e17e112197e70a9b6f92ba2daf1ce1ce2056e538c7fbe84d8d5458420354471657759785664000000" + } + ] + } + }, + { + "signUp": { + "extrinsics": [ + { + "pallet": "msa", + "extrinsicName": "createSponsoredAccountWithDelegation", + "encodedExtrinsic": "0xcd01043c010e554132a77274bde2071d06fe76108a01cfe701507b03c5f838595669cb217401b82c0f221789f8e194e1a712be81dec0f1b6d960a59286620b28bb6ecc531f2fd055247d4c3bf417a61c171f35abe126bb8263f7012b3485991bc898fec1548a010000000000000004010064000000" + }, + { + "pallet": "handles", + "extrinsicName": "claimHandle", + "encodedExtrinsic": "0xc5010442000e554132a77274bde2071d06fe76108a01cfe701507b03c5f838595669cb21740156dd50096330a95b31f4c78aa698c5d85bcdb8a0df829291cfee59780e53cc5ebdf7c80d53e3abfc9ef8d949034719f657b4e508bcef5f96bad3fd3f8100e886203543505672544d3464000000" + } + ] + } + }, + { + "signUp": { + "extrinsics": [ + { + "pallet": "msa", + "extrinsicName": "createSponsoredAccountWithDelegation", + "encodedExtrinsic": "0xcd01043c01205029209aded136c5b24887ea1ad4565ee60e438db6f5dcaca404d9fcc9085b012498e3447196cb2f93a8bd9e591b2733d8e48dfe6b54c89b5c87b17a21e73712714f734316d8e1668e580892a72de8713ae2e8dcecb5611ccf8215911dc52f8d010000000000000004010064000000" + }, + { + "pallet": "handles", + "extrinsicName": "claimHandle", + "encodedExtrinsic": "0xc501044200205029209aded136c5b24887ea1ad4565ee60e438db6f5dcaca404d9fcc9085b01acc9b16de4f13cae4d0c249fb0c57f758923b26e25bba390d51585080c31506ce8b331421804bf93f051e5857b2cc459c01b898582336b68827c58f4fa4a0f802035436f3543674b4b64000000" + } + ] + } + }, + { + "signUp": { + "extrinsics": [ + { + "pallet": "msa", + "extrinsicName": "createSponsoredAccountWithDelegation", + "encodedExtrinsic": "0xcd01043c014a7e9342f32196f3c7aa36154b0db60ad9047c697504edb5dd1abc1d947a3523011cd40bd17ee79bd8052927e17dabba10f691f21fc5da864ed36bf05d15fcdb4ae6ba78e770d63e05b19acd9d5f96a98a4f6a031887b1fd4a7cc5069c2aee918b010000000000000004010064000000" + }, + { + "pallet": "handles", + "extrinsicName": "claimHandle", + "encodedExtrinsic": "0xc5010442004a7e9342f32196f3c7aa36154b0db60ad9047c697504edb5dd1abc1d947a352301b2eddcbc1e76154c75cea0799a5980ce73e2a525a71e7f23ab1b2eae31db8728b1c3c4060de5b7a02665de7bb54a719c1c63c2e35edc09ce7294659ef40e1c832035446b503132697664000000" + } + ] + } + }, + { + "signUp": { + "extrinsics": [ + { + "pallet": "msa", + "extrinsicName": "createSponsoredAccountWithDelegation", + "encodedExtrinsic": "0xcd01043c01d6c88bf28f9299ff371871695eebf3602678ff3e8060b8668cae634709bf0902014c8b7c372a92560116a3b477938ca5ccbd9667f82de9144cfbc95de0d2ae06687c1e145acb401e3e8ae151fe6e33b2d66724cca9c7db2ec6fa525f26fef89d82010000000000000004010064000000" + }, + { + "pallet": "handles", + "extrinsicName": "claimHandle", + "encodedExtrinsic": "0xc501044200d6c88bf28f9299ff371871695eebf3602678ff3e8060b8668cae634709bf09020172686f0a2ecb34fbb019c05fe4f32a69c08d584208fc8d6e695836116a9c8005f89a664f22aee2658428fe1ac4d67183142eada0bfdbd77958cb4dd58488d387203547764b674d506764000000" + } + ] + } + }, + { + "signUp": { + "extrinsics": [ + { + "pallet": "msa", + "extrinsicName": "createSponsoredAccountWithDelegation", + "encodedExtrinsic": "0xcd01043c01f8b4e06f5c5ae437e8485ae9ec19edb3036f2f94c9a88e67a4c0b747a0512f720170886a75b4032f33e95d1ef9641742f65127d6f8863a9bb5bea007a54d65572e148731654954fd764cc7fa770d0c8f5d8fc73b1393afe9f12ac7efa2b3efce87010000000000000004010064000000" + }, + { + "pallet": "handles", + "extrinsicName": "claimHandle", + "encodedExtrinsic": "0xc501044200f8b4e06f5c5ae437e8485ae9ec19edb3036f2f94c9a88e67a4c0b747a0512f7201feb5612ba688d4bb10eadd84b6b1be075376e1cdb812019715ec9c92bf4bb8339dda3899627c17149a9039e8c67cc8cbaa0c1f8a7d1f85eb4e172606a274968d203548676f5473697064000000" + } + ] + } + }, + { + "signUp": { + "extrinsics": [ + { + "pallet": "msa", + "extrinsicName": "createSponsoredAccountWithDelegation", + "encodedExtrinsic": "0xcd01043c012855dc9998ad16b1eab804424d214da7acf87c14b8b27ed33bb2f838cb06547801aa9d429155da56378e2902b40a2ad7dcb5f3002102284547ef3e614eddf5c87215ccc29c7276ba32811337bef430829f46e15d3b6fc32c18133c9cc19c69ec89010000000000000004010064000000" + }, + { + "pallet": "handles", + "extrinsicName": "claimHandle", + "encodedExtrinsic": "0xc5010442002855dc9998ad16b1eab804424d214da7acf87c14b8b27ed33bb2f838cb065478017c2675d392d7ba33813a51560811674ac42966ac21032527fa5a350cb1674b791d2cbd429664ce7cf8a18923264dab05aa42223e1398d33631cdc3a81e2d008a20354379624838414364000000" + } + ] + } + }, + { + "signUp": { + "extrinsics": [ + { + "pallet": "msa", + "extrinsicName": "createSponsoredAccountWithDelegation", + "encodedExtrinsic": "0xcd01043c016044d8001ffea105dab1583161003d65e2bd9c11d5a1cb777efa1df6877080340112c71f897faf2dd9f11b71d2f49563aba27d9f774907d02a5d1112097b110233291c0e86c454e2add1004f7c88c149ede1786154bbffc3ce4b80b2efac8cfe80010000000000000004010064000000" + }, + { + "pallet": "handles", + "extrinsicName": "claimHandle", + "encodedExtrinsic": "0xc5010442006044d8001ffea105dab1583161003d65e2bd9c11d5a1cb777efa1df687708034014ccc9ea7af7132083482f69262818e8cd7224d475932f14188b69afbad9f8e2f67649c8e4cbe9090d6ac9fda8cd934151735a5cd5dc4c460c4e58f475c00da8020354545767553587164000000" + } + ] + } + } +]; + \ No newline at end of file