diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 532170d8..11406d18 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -28,6 +28,6 @@ jobs: run: yarn run build - name: Add TSS server host mappings run: | - echo "127.0.0.1 alice-tss-server bob-tss-server" | sudo tee -a /etc/hosts + echo "127.0.0.1 alice-tss-server bob-tss-server charlie-tss-server dave-tss-server" | sudo tee -a /etc/hosts - name: Test run: yarn run test diff --git a/CHANGELOG.md b/CHANGELOG.md index 226d9f75..82169a53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ The format extends [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). Version header format: `[version] Name - year-month-day (entropy-core compatibility: version [range])` -## [UNRELEASED] +## [0.0.4] Carnage - 2024-10-23 (entropy-core compatibility: 0.3.0) ### Added - new: 'src/flows/register/register.ts' - service file for register pure function @@ -43,6 +43,7 @@ Version header format: `[version] Name - year-month-day (entropy-core compatibil - new: './src/faucet/interaction.ts' - main entrypoint for TUI flows - new: './src/faucet/command.ts' - main entrypoint for CLI flows - new: package added - yocto-spinner for adding loading spinners to the cli + - new: added new menu item for TUI to trigger a jumpstart to the network (needs to only be run once) ### Changed diff --git a/README.md b/README.md index 6ac4900e..473f8431 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ Arguments: Options: -e, --endpoint Runs entropy with the given endpoint and ignores network endpoints in config. Can also be given a stored endpoint name from config eg: `entropy - --endpoint test-net`. (default: "ws://testnet.entropy.xyz:9944/", env: + --endpoint test-net`. (default: "wss://testnet.entropy.xyz/", env: ENDPOINT) -h, --help display help for command ``` diff --git a/package.json b/package.json index efc4cf3c..ce008663 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@entropyxyz/cli", - "version": "0.0.3", + "version": "0.0.4", "description": "cli and tui for interacting with the entropy protocol", "type": "module", "scripts": { @@ -20,7 +20,7 @@ "link:sdk": "yarn link @entropyxyz/sdk", "unlink:sdk": "yarn unlink @entropyxyz/sdk", "re-link:sdk": "yarn unlink:sdk && yarn link:sdk", - "removedb": "rm -rf .entropy && docker compose --file node_modules/@entropyxyz/sdk/dev/docker-scripts/two-nodes.yaml down 2> /dev/null" + "removedb": "rm -rf .entropy && docker compose --file node_modules/@entropyxyz/sdk/dev/docker-scripts/four-nodes.yaml down 2> /dev/null" }, "files": [ "dist" @@ -44,7 +44,7 @@ }, "homepage": "https://github.com/entropyxyz/cli#readme", "dependencies": { - "@entropyxyz/sdk": "^0.2.3", + "@entropyxyz/sdk": "0.3.0", "ansi-colors": "^4.1.3", "cli-progress": "^3.12.0", "commander": "^12.1.0", diff --git a/src/account/main.ts b/src/account/main.ts index a8dc0874..702beeab 100644 --- a/src/account/main.ts +++ b/src/account/main.ts @@ -68,43 +68,6 @@ export class EntropyAccount extends EntropyBase { this.logger.debug(`registering with params: ${registerParams}`, 'REGISTER') return this.entropy.register(registerParams) - // NOTE: if "register" fails for any reason, core currently leaves the chain in a "polluted" - // state. To fix this we manually "prune" the dirty registration transaction. - .catch(async error => { - await this.pruneRegistration() - throw error - }) - } - - /* PRIVATE */ - - private async pruneRegistration () { - return new Promise((resolve, reject) => { - this.entropy.substrate.tx.registry.pruneRegistration() - .signAndSend(this.entropy.keyring.accounts.registration.pair, ({ status, dispatchError }) => { - if (dispatchError) { - let msg: string - if (dispatchError.isModule) { - // for module errors, we have the section indexed, lookup - const decoded = this.entropy.substrate.registry.findMetaError( - dispatchError.asModule - ) - const { docs, name, section } = decoded - - msg = `${section}.${name}: ${docs.join(' ')}` - } else { - // Other, CannotLookup, BadOrigin, no extra info - msg = dispatchError.toString() - } - const error = Error(msg) - this.logger.error('There was an issue pruning registration', error) - return reject(error) - } - if (status.isFinalized) { - resolve(status) - } - }) - }) } } diff --git a/src/balance/interaction.ts b/src/balance/interaction.ts index 1fcef279..334c00c7 100644 --- a/src/balance/interaction.ts +++ b/src/balance/interaction.ts @@ -1,11 +1,12 @@ -import { print } from "src/common/utils" +import { findAccountByAddressOrName, print } from "src/common/utils" import { EntropyBalance } from "./main" export async function entropyBalance (entropy, endpoint, storedConfig) { try { const balanceService = new EntropyBalance(entropy, endpoint) - const balance = await balanceService.getBalance(storedConfig.selectedAccount) - print(`Address ${storedConfig.selectedAccount} has a balance of: ${balance.toLocaleString('en-US')} BITS`) + const address = findAccountByAddressOrName(storedConfig.accounts, storedConfig.selectedAccount)?.address + const balance = await balanceService.getBalance(address) + print(`Entropy Account [${storedConfig.selectedAccount}] (${address}) has a balance of: ${balance.toLocaleString('en-US')} BITS`) } catch (error) { console.error('There was an error retrieving balance', error) } diff --git a/src/cli.ts b/src/cli.ts index 8001f304..16b2932a 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -4,7 +4,7 @@ import { Command, Option } from 'commander' import { EntropyTuiOptions } from './types' -import { loadEntropy } from './common/utils-cli' +import { loadEntropy, tuiEndpointOption } from './common/utils-cli' import * as config from './config' import launchTui from './tui' @@ -28,7 +28,7 @@ program .env('DEV_MODE') .hideHelp() ) - + .addOption(tuiEndpointOption()) .addCommand(entropyBalanceCommand()) .addCommand(entropyAccountCommand()) .addCommand(entropyTransferCommand()) @@ -36,9 +36,9 @@ program .addCommand(entropyProgramCommand()) .action(async (opts: EntropyTuiOptions) => { - const { account, endpoint } = opts + const { account, tuiEndpoint } = opts const entropy = account - ? await loadEntropy(account, endpoint) + ? await loadEntropy(account, tuiEndpoint) : undefined // NOTE: on initial startup you have no account launchTui(entropy, opts) diff --git a/src/common/initializeEntropy.ts b/src/common/initializeEntropy.ts index 48a75ab5..7d8e9c05 100644 --- a/src/common/initializeEntropy.ts +++ b/src/common/initializeEntropy.ts @@ -96,11 +96,10 @@ export const initializeEntropy = async ({ keyMaterial, endpoint, configPath }: I const entropy = new Entropy({ keyring: selectedAccount, endpoint }) await entropy.ready - + if (!entropy?.keyring?.accounts?.registration?.seed) { throw new Error("Keys are undefined") } - return entropy } catch (error) { diff --git a/src/common/utils-cli.ts b/src/common/utils-cli.ts index 7b53a4ff..99aaef38 100644 --- a/src/common/utils-cli.ts +++ b/src/common/utils-cli.ts @@ -38,7 +38,32 @@ export function endpointOption () { return endpoint }) - .default('ws://testnet.entropy.xyz:9944/') + .default('wss://testnet.entropy.xyz/') + // NOTE: default cannot be "test-net" as argParser only runs if the -e/--endpoint flag + // or ENTROPY_ENDPOINT env set +} + +export function tuiEndpointOption () { + return new Option( + '-et, --tui-endpoint ', + [ + 'Runs entropy with the given endpoint and ignores network endpoints in config.', + 'Can also be given a stored endpoint name from config eg: `entropy --endpoint test-net`.' + ].join(' ') + ) + .env('ENTROPY_TUI_ENDPOINT') + .argParser(aliasOrEndpoint => { + /* see if it's a raw endpoint */ + if (aliasOrEndpoint.match(/^wss?:\/\//)) return aliasOrEndpoint + + /* look up endpoint-alias */ + const storedConfig = getConfigOrNull() + const endpoint = storedConfig?.endpoints?.[aliasOrEndpoint] + if (!endpoint) throw Error('unknown endpoint alias: ' + aliasOrEndpoint) + + return endpoint + }) + .default('wss://testnet.entropy.xyz/') // NOTE: default cannot be "test-net" as argParser only runs if the -e/--endpoint flag // or ENTROPY_ENDPOINT env set } @@ -82,6 +107,7 @@ export async function loadEntropy (addressOrName: string, endpoint: string): Pro if (!selectedAccount) throw new Error(`No account with name or address: "${addressOrName}"`) const entropy = await initializeEntropy({ keyMaterial: selectedAccount.data, endpoint }) + if (!entropy?.keyring?.accounts?.registration?.pair) { throw new Error("Signer keypair is undefined or not properly initialized.") } diff --git a/src/common/utils.ts b/src/common/utils.ts index b4dbc7ea..9f8cab3c 100644 --- a/src/common/utils.ts +++ b/src/common/utils.ts @@ -1,5 +1,6 @@ import { Buffer } from 'buffer' import { EntropyAccountConfig } from "../config/types" +import { EntropyLogger } from './logger' export function stripHexPrefix (str: string): string { if (str.startsWith('0x')) return str.slice(2) @@ -73,3 +74,32 @@ export function findAccountByAddressOrName (accounts: EntropyAccountConfig[], al accounts.find(account => account.name === aliasOrAddress) ) } + +export async function jumpStartNetwork (entropy, endpoint): Promise { + const logger = new EntropyLogger('JUMPSTART_NETWORK', endpoint) + return new Promise((resolve, reject) => { + entropy.substrate.tx.registry.jumpStartNetwork() + .signAndSend(entropy.keyring.accounts.registration.pair, ({ status, dispatchError }) => { + if (dispatchError) { + let msg: string + if (dispatchError.isModule) { + // for module errors, we have the section indexed, lookup + const decoded = entropy.substrate.registry.findMetaError( + dispatchError.asModule + ) + const { docs, name, section } = decoded + + msg = `${section}.${name}: ${docs.join(' ')}` + } else { + // Other, CannotLookup, BadOrigin, no extra info + msg = dispatchError.toString() + } + const error = Error(msg) + logger.error('There was an issue jump starting the network', error) + return reject(error) + } + + if (status.isFinalized) resolve(status) + }) + }) +} \ No newline at end of file diff --git a/src/config/migrations/03.ts b/src/config/migrations/03.ts new file mode 100644 index 00000000..ffc5a2f7 --- /dev/null +++ b/src/config/migrations/03.ts @@ -0,0 +1,18 @@ +export const version = 3 + +export function migrate (data = {}) { + try { + const migratedData = { + ...data, + endpoints: { + // @ts-ignore + ...data.endpoints, + 'stg': 'wss://api.staging.testnet.testnet-2024.infrastructure.entropy.xyz' + } + } + return migratedData + } catch (e) { + console.error(`error in migration ${version}: e.message`) + } + return data +} diff --git a/src/config/migrations/index.ts b/src/config/migrations/index.ts index 541608cd..72a3e975 100644 --- a/src/config/migrations/index.ts +++ b/src/config/migrations/index.ts @@ -1,11 +1,13 @@ import * as migration00 from './00' import * as migration01 from './01' import * as migration02 from './02' +import * as migration03 from './03' const migrations = [ migration00, migration01, migration02, + migration03 ] export default migrations diff --git a/src/faucet/utils.ts b/src/faucet/utils.ts index f9c4f868..eca92e47 100644 --- a/src/faucet/utils.ts +++ b/src/faucet/utils.ts @@ -8,4 +8,6 @@ export const FAUCET_PROGRAM_MOD_KEY = '5GWamxgW4XWcwGsrUynqnFq2oNZPqNXQhMDfgNH9x // TO-DO: update this when faucet is deployed properly export const TESTNET_PROGRAM_HASH = '0x12af0bd1f2d91f12e34aeb07ea622c315dbc3c2bdc1e25ff98c23f1e61106c77' // Hash with max send of 1e10 -export const LOCAL_PROGRAM_HASH = '0x5fa0536818acaa380b0c349c8e887bf269d593a47e30c8e31de53a75d327f7b1' \ No newline at end of file +// export const LOCAL_PROGRAM_HASH = '0x5fa0536818acaa380b0c349c8e887bf269d593a47e30c8e31de53a75d327f7b1' +// Hash with max send of 2e10 +export const LOCAL_PROGRAM_HASH = '0x2eaf750c4fa0fe125ca8a9d4037c0c0608b57ae70d6586dc6acdfcb4e9872deb' \ No newline at end of file diff --git a/src/program/main.ts b/src/program/main.ts index 95e8a903..ac241a85 100644 --- a/src/program/main.ts +++ b/src/program/main.ts @@ -55,13 +55,13 @@ export class EntropyProgram extends EntropyBase { async get (programPointer: string): Promise { this.logger.debug(`program pointer: ${programPointer}`, `${FLOW_CONTEXT}::PROGRAM_PRESENCE_CHECK`); - return this.entropy.programs.dev.getProgramInfo(programPointer) + return this.entropy.programs.dev.get(programPointer) } async listDeployed () { const address = this.entropy.keyring.accounts.registration.address // QUESTION: will we always be wanting this address? - return this.entropy.programs.dev.get(address) + return this.entropy.programs.dev.getByDeployer(address) } } diff --git a/src/tui.ts b/src/tui.ts index 6b7c35ed..9624cd64 100644 --- a/src/tui.ts +++ b/src/tui.ts @@ -3,7 +3,7 @@ import Entropy from '@entropyxyz/sdk' import * as config from './config' import { EntropyTuiOptions } from './types' import { logo } from './common/ascii' -import { print } from './common/utils' +import { jumpStartNetwork, print } from './common/utils' import { loadEntropy } from './common/utils-cli' import { EntropyLogger } from './common/logger' @@ -13,6 +13,7 @@ import { entropyBalance } from './balance/interaction' import { entropyTransfer } from './transfer/interaction' import { entropyFaucet } from './faucet/interaction' import { entropyProgram, entropyProgramDev } from './program/interaction' +import yoctoSpinner from 'yocto-spinner' async function setupConfig () { let storedConfig = await config.get() @@ -44,25 +45,36 @@ export default function tui (entropy: Entropy, options: EntropyTuiOptions) { 'User Programs', ] + const devChoices = [ + 'Jumpstart Network', + // 'Create and Fund Faucet(s)' + ] + + if (options.dev) { + choices = [...choices, ...devChoices] + } + // assign exit so its last choices = [...choices, 'Exit'] main(entropy, choices, options, logger) } +const loader = yoctoSpinner() -async function main (entropy: Entropy, choices, options, logger: EntropyLogger) { +async function main (entropy: Entropy, choices: string[], options: EntropyTuiOptions, logger: EntropyLogger) { + if (loader.isSpinning) loader.stop() const storedConfig = await setupConfig() // Entropy is undefined on initial install, after user creates their first account, // entropy should be loaded if (storedConfig.selectedAccount && !entropy) { - entropy = await loadEntropy(storedConfig.selectedAccount, options.endpoint) + entropy = await loadEntropy(storedConfig.selectedAccount, options.tuiEndpoint) } // If the selected account changes within the TUI we need to reset the entropy instance being used const currentAccount = entropy?.keyring?.accounts?.registration?.address if (currentAccount && currentAccount !== storedConfig.selectedAccount) { await entropy.close() - entropy = await loadEntropy(storedConfig.selectedAccount, options.endpoint); + entropy = await loadEntropy(storedConfig.selectedAccount, options.tuiEndpoint); } @@ -88,26 +100,26 @@ async function main (entropy: Entropy, choices, options, logger: EntropyLogger) switch (answers.choice) { case 'Manage Accounts': { - const response = await entropyAccount(options.endpoint, storedConfig) + const response = await entropyAccount(options.tuiEndpoint, storedConfig) if (response === 'exit') { returnToMain = true } break } case 'Register': { - await entropyRegister(entropy, options.endpoint, storedConfig) + await entropyRegister(entropy, options.tuiEndpoint, storedConfig) break } case 'Balance': { - await entropyBalance(entropy, options.endpoint, storedConfig) + await entropyBalance(entropy, options.tuiEndpoint, storedConfig) .catch(err => console.error('There was an error retrieving balance', err)) break } case 'Transfer': { - await entropyTransfer(entropy, options.endpoint) + await entropyTransfer(entropy, options.tuiEndpoint) .catch(err => console.error('There was an error sending the transfer', err)) break } case 'Sign': { - await entropySign(entropy, options.endpoint) + await entropySign(entropy, options.tuiEndpoint) .catch(err => console.error('There was an issue with signing', err)) break } @@ -120,17 +132,43 @@ async function main (entropy: Entropy, choices, options, logger: EntropyLogger) break } case 'User Programs': { - await entropyProgram(entropy, options.endpoint) + await entropyProgram(entropy, options.tuiEndpoint) .catch(err => console.error('There was an error with programs', err)) break } case 'Deploy Program': { - await entropyProgramDev(entropy, options.endpoint) + await entropyProgramDev(entropy, options.tuiEndpoint) .catch(err => console.error('There was an error with program dev', err)) break } + case 'Jumpstart Network': { + // TO-DO: possibly move this to it's own directory similar to the other actions + // could create a new system directory for system/network level functionality + // i.e jumpstarting, deploy faucet, etc. + loader.text = 'Jumpstarting Network...' + try { + loader.start() + const jumpStartStatus = await jumpStartNetwork(entropy, options.tuiEndpoint) + + if (jumpStartStatus.isFinalized) { + loader.clear() + loader.success('Network jumpstarted!') + // running into an issue where the loader displays the success message but the return to main menu + // prompt does not display, so for now exiting process + process.exit(0) + } + } catch (error) { + loader.text = 'Jumpstart Failed' + loader.stop() + loader.clear() + console.error('There was an issue jumpstarting the network', error); + process.exit(1) + } + break + } default: { - throw Error(`unsupported choice: ${answers.choice}`) + console.error('Unsupported Action:' + answers.choice) + break } } } diff --git a/src/types/index.ts b/src/types/index.ts index d1411368..866cafb1 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -1,6 +1,7 @@ export interface EntropyTuiOptions { account: string endpoint: string + tuiEndpoint: string dev: boolean } diff --git a/tests/account.test.ts b/tests/account.test.ts index eb9756d6..8eec5faa 100644 --- a/tests/account.test.ts +++ b/tests/account.test.ts @@ -1,15 +1,17 @@ import test from 'tape' -import { wasmGlobalsReady } from '@entropyxyz/sdk' +import { Entropy, wasmGlobalsReady } from '@entropyxyz/sdk' // @ts-ignore import { isValidSubstrateAddress } from '@entropyxyz/sdk/utils' +import { jumpStartNetwork } from '@entropyxyz/sdk/testing' // @ts-ignore import Keyring from '@entropyxyz/sdk/keys' import { randomAsHex } from '@polkadot/util-crypto' import { EntropyAccount } from '../src/account/main' +import { EntropyTransfer } from '../src/transfer/main' import { EntropyAccountConfig, EntropyConfig } from '../src/config/types' import * as config from '../src/config' import { promiseRunner, setupTest } from './testing-utils' -import { charlieStashAddress, charlieStashSeed } from './testing-utils/constants' +import { charlieStashAddress, charlieStashSeed, eveSeed } from './testing-utils/constants' import { readFileSync } from 'fs' test('Account - list', async t => { @@ -78,44 +80,58 @@ test('Account - import', async t => { t.end() }) -const networkType = 'two-nodes' const endpoint = 'ws://127.0.0.1:9944' +async function fundAccount (t, entropy: Entropy) { + const { entropy: charlie } = await setupTest(t, { seed: charlieStashSeed }) + const transfer = new EntropyTransfer(charlie, endpoint) + + await transfer.transfer(entropy.keyring.accounts.registration.address, "1000") +} + + test('Account - Register: Default Program', async (t) => { - const { run, entropy } = await setupTest(t, { networkType, seed: charlieStashSeed }) - const accountService = new EntropyAccount(entropy, endpoint) + const { run, entropy: naynay } = await setupTest(t) + // NOTE: we fund a new account "naynay" because jumpStart has problems with charlie (T_T) + await run('fund naynay', fundAccount(t, naynay)) - const verifyingKey = await run('register account', accountService.register()) + await run('jump-start network', jumpStartNetwork(naynay)) - const fullAccount = entropy.keyring.getAccount() + const account = new EntropyAccount(naynay, endpoint) + const verifyingKey = await run('register account', account.register()) + const fullAccount = naynay.keyring.getAccount() t.equal(verifyingKey, fullAccount?.registration?.verifyingKeys?.[0], 'verifying key matches key added to registration account') t.end() }) test('Account - Register: Barebones Program', async t => { - const { run, entropy } = await setupTest(t, { networkType, seed: charlieStashSeed }) + const { run, entropy: naynay } = await setupTest(t) + await run('fund naynay', fundAccount(t, naynay)) + // NOTE: we fund a new account "naynay" because jumpStart has problems with charlie (T_T) + const dummyProgram: any = readFileSync( new URL('./programs/template_barebones.wasm', import.meta.url) ) + + await run('jump-start network', jumpStartNetwork(naynay)) + + const account = new EntropyAccount(naynay, endpoint) const pointer = await run( 'deploy program', - entropy.programs.dev.deploy(dummyProgram) + naynay.programs.dev.deploy(dummyProgram) ) - - const accountService = new EntropyAccount(entropy, endpoint) const verifyingKey = await run( - 'register - using custom params', - accountService.register({ - programModAddress: entropy.keyring.accounts.registration.address, + 'register account - with custom params', + account.register({ + programModAddress: naynay.keyring.accounts.registration.address, programData: [{ program_pointer: pointer, program_config: '0x' }], }) ) - const fullAccount = entropy.keyring.getAccount() - - t.equal(verifyingKey, fullAccount?.registration?.verifyingKeys?.[1], 'verifying key matches key added to registration account') + const fullAccount = naynay.keyring.getAccount() + t.equal(verifyingKey, fullAccount?.registration?.verifyingKeys?.[0], 'verifying key matches key added to registration account') t.end() }) diff --git a/tests/balance.test.ts b/tests/balance.test.ts index 269059e1..56b2c3c3 100644 --- a/tests/balance.test.ts +++ b/tests/balance.test.ts @@ -3,7 +3,7 @@ import test from 'tape' import { setupTest, charlieStashAddress as richAddress } from './testing-utils' import { EntropyBalance } from '../src/balance/main' -const networkType = 'two-nodes' +const networkType = 'four-nodes' test('getBalance + getBalances', async (t) => { const { run, entropy, endpoint } = await setupTest(t, { networkType }) diff --git a/tests/faucet.test.ts b/tests/faucet.test.ts index 44f895c3..e14969cd 100644 --- a/tests/faucet.test.ts +++ b/tests/faucet.test.ts @@ -1,5 +1,6 @@ import test from 'tape' -import { charlieStashSeed, setupTest } from './testing-utils' +import { eveSeed, setupTest } from './testing-utils' +import { jumpStartNetwork } from '@entropyxyz/sdk/testing' import { stripHexPrefix } from '../src/common/utils' import { readFileSync } from 'fs' import { EntropyBalance } from '../src/balance/main' @@ -8,20 +9,15 @@ import { EntropyFaucet } from '../src/faucet/main' import { LOCAL_PROGRAM_HASH } from '../src/faucet/utils' import { EntropyAccount } from '../src/account/main' -async function setupAndFundFaucet (t, naynayEntropy) { - const { run, entropy, endpoint } = await setupTest(t, { seed: charlieStashSeed }) - const accountService = new EntropyAccount(entropy, endpoint) - const transferService = new EntropyTransfer(entropy, endpoint) - const faucetService = new EntropyFaucet(naynayEntropy, endpoint) +async function setupAndFundFaucet (t) { + const { run, entropy, endpoint } = await setupTest(t, { seed: eveSeed }) + await run('jump-start network', jumpStartNetwork(entropy)) + const account = new EntropyAccount(entropy, endpoint) + const transfer = new EntropyTransfer(entropy, endpoint) + const faucet = new EntropyFaucet(entropy, endpoint) + // Deploy faucet program const faucetProgram = readFileSync('tests/programs/faucet_program.wasm') - - const genesisHash = await entropy.substrate.rpc.chain.getBlockHash(0) - - const userConfig = { - max_transfer_amount: 20_000_000_000, - genesis_hash: stripHexPrefix(genesisHash.toString()) - } const configurationSchema = { max_transfer_amount: "number", genesis_hash: "string" @@ -32,63 +28,74 @@ async function setupAndFundFaucet (t, naynayEntropy) { spec_version: "number", transaction_version: "number", } - - // Deploy faucet program - const faucetProgramPointer = await run('Deploy faucet program', entropy.programs.dev.deploy(faucetProgram, configurationSchema, auxDataSchema)) - - // Confirm faucetPointer matches deployed program pointer + const faucetProgramPointer = await run( + 'Deploy faucet program', + entropy.programs.dev.deploy(faucetProgram, configurationSchema, auxDataSchema) + ) t.equal(faucetProgramPointer, LOCAL_PROGRAM_HASH, 'Program pointer matches') - // register with faucet program - await run('Register Faucet Program for charlie stash', accountService.register( - { + // Register with faucet program + const genesisHash = await entropy.substrate.rpc.chain.getBlockHash(0) + const userConfig = { + max_transfer_amount: 20_000_000_000, + genesis_hash: stripHexPrefix(genesisHash.toString()) + } + await run( + 'Register Faucet Program for eve', + account.register({ programModAddress: entropy.keyring.accounts.registration.address, - programData: [{ program_pointer: faucetProgramPointer, program_config: userConfig }] - } - )) - const verifyingKeys = await faucetService.getAllFaucetVerifyingKeys(entropy.keyring.accounts.registration.address) + programData: [{ + program_pointer: + faucetProgramPointer, + program_config: userConfig + }] + }) + ) + + // Fund the Faucet + const verifyingKeys = await faucet.getAllFaucetVerifyingKeys(entropy.keyring.accounts.registration.address) // @ts-expect-error - const { chosenVerifyingKey, faucetAddress } = faucetService.getRandomFaucet([], verifyingKeys) - // adding funds to faucet address - await run('Transfer funds to faucet address', transferService.transfer(faucetAddress, "1000")) + const { chosenVerifyingKey, faucetAddress } = faucet.getRandomFaucet([], verifyingKeys) + await run('Transfer funds to faucet address', transfer.transfer(faucetAddress, "1000")) return { faucetProgramPointer, chosenVerifyingKey, faucetAddress } } test('Faucet Tests: Successfully send funds and register', async t => { - const { run, endpoint, entropy: naynayEntropy } = await setupTest(t) + const { run, endpoint, entropy: naynay } = await setupTest(t) + const { faucetAddress, chosenVerifyingKey, faucetProgramPointer } = await setupAndFundFaucet(t) - const faucetService = new EntropyFaucet(naynayEntropy, endpoint) - const balanceService = new EntropyBalance(naynayEntropy, endpoint) + const faucet = new EntropyFaucet(naynay, endpoint) + const balance = new EntropyBalance(naynay, endpoint) - const { faucetAddress, chosenVerifyingKey, faucetProgramPointer } = await setupAndFundFaucet(t, naynayEntropy) - - let naynayBalance = await balanceService.getBalance(naynayEntropy.keyring.accounts.registration.address) + let naynayBalance = await balance.getBalance(naynay.keyring.accounts.registration.address) t.equal(naynayBalance, 0, 'Naynay is broke af') - - const transferStatus = await run('Sending faucet funds to account', faucetService.sendMoney( - { - amount: "20000000000", - addressToSendTo: naynayEntropy.keyring.accounts.registration.address, + + const amount = 20000000000 + const transferStatus = await run( + 'Sending faucet funds to account', + faucet.sendMoney({ + amount: `${amount}`, + addressToSendTo: naynay.keyring.accounts.registration.address, faucetAddress, chosenVerifyingKey, faucetProgramPointer - } - )) + }) + ) t.ok(transferStatus.isFinalized, 'Transfer is good') - naynayBalance = await balanceService.getBalance(naynayEntropy.keyring.accounts.registration.address) + naynayBalance = await balance.getBalance(naynay.keyring.accounts.registration.address) - t.ok(naynayBalance > 0, 'Naynay is drippin in faucet tokens') + t.equal(naynayBalance, 20000000000, 'Naynay is drippin in faucet tokens') // Test if user can register after receiving funds - const naynayAccountService = new EntropyAccount(naynayEntropy, endpoint) - const verifyingKey = await run('register account', naynayAccountService.register()) + const account = new EntropyAccount(naynay, endpoint) + const verifyingKey = await run('register account', account.register()) t.ok(!!verifyingKey, 'Verifying key exists and is returned from register method') - const fullAccount = naynayEntropy.keyring.getAccount() + const fullAccount = naynay.keyring.getAccount() t.equal(verifyingKey, fullAccount?.registration?.verifyingKeys?.[0], 'verifying key matches key added to registration account') t.end() @@ -135,4 +142,4 @@ test('Faucet Tests: Successfully send funds and register', async t => { // t.pass('Regsitration failed') // t.end() // } -// }) \ No newline at end of file +// }) diff --git a/tests/programs.test.ts b/tests/programs.test.ts index 422629f9..6f89849e 100644 --- a/tests/programs.test.ts +++ b/tests/programs.test.ts @@ -1,13 +1,15 @@ import test from 'tape' +import { jumpStartNetwork } from '@entropyxyz/sdk/testing' -import { promiseRunner, charlieStashSeed, setupTest } from './testing-utils' +import { promiseRunner, eveSeed, setupTest } from './testing-utils' import { EntropyProgram } from '../src/program/main' -const networkType = 'two-nodes' +const networkType = 'four-nodes' const endpoint = 'ws://127.0.0.1:9944' test('program', async t => { - const { run, entropy } = await setupTest(t, { seed: charlieStashSeed, networkType }) + const { run, entropy } = await setupTest(t, { seed: eveSeed, networkType }) + await run('jump-start network', jumpStartNetwork(entropy)) await run('register', entropy.register()) // TODO: consider removing this in favour of just testing add const program = new EntropyProgram(entropy, endpoint) @@ -34,7 +36,7 @@ test('program', async t => { const run = promiseRunner(t) const programsBeforeAdd = await run('get programs initial', getPrograms()) - t.equal(programsBeforeAdd.length, 1, 'charlie has 1 program') + t.equal(programsBeforeAdd.length, 1, 'eve has 1 program') await run( 'adding program', @@ -44,7 +46,7 @@ test('program', async t => { }) ) const programsAfterAdd = await run('get programs after add', getPrograms()) - t.equal(programsAfterAdd.length, 2, 'charlie has 2 programs') + t.equal(programsAfterAdd.length, 2, 'eve has 2 programs') t.end() }) @@ -53,7 +55,7 @@ test('program', async t => { const run = promiseRunner(t) const programsBeforeRemove = await run('get programs initial', getPrograms()) - t.equal(programsBeforeRemove.length, 2, 'charlie has 2 programs') + t.equal(programsBeforeRemove.length, 2, 'eve has 2 programs') await run( 'removing noop program', @@ -63,7 +65,7 @@ test('program', async t => { }) ) const programsAfterRemove = await run('get programs initial', getPrograms()) - t.equal(programsAfterRemove.length, 1, 'charlie has 1 less program') + t.equal(programsAfterRemove.length, 1, 'eve has 1 less program') t.end() }) @@ -72,11 +74,11 @@ test('program', async t => { const run = promiseRunner(t) const programs = await run( - 'get charlie programs', + 'get eve programs', program.list({ verifyingKey }) ) - t.equal(programs.length, 1, 'charlie has 1 program') + t.equal(programs.length, 1, 'eve has 1 program') t.end() }) diff --git a/tests/sign.test.ts b/tests/sign.test.ts index 7e0dee5c..f9b59ef2 100644 --- a/tests/sign.test.ts +++ b/tests/sign.test.ts @@ -1,11 +1,14 @@ import test from 'tape' +import { jumpStartNetwork } from '@entropyxyz/sdk/testing' + import { EntropySign } from '../src/sign/main' +import { setupTest, eveSeed } from './testing-utils' -import { setupTest, charlieStashSeed } from './testing-utils' const endpoint = 'ws://127.0.0.1:9944' test('Sign - signMessageWithAdapters', async (t) => { - const { run, entropy } = await setupTest(t, { seed: charlieStashSeed }) + const { run, entropy } = await setupTest(t, { seed: eveSeed }) + await run('jump-start network', jumpStartNetwork(entropy)) const signService = new EntropySign(entropy, endpoint) await run('register', entropy.register()) diff --git a/tests/testing-utils/constants.ts b/tests/testing-utils/constants.ts index 14f7374d..53090266 100644 --- a/tests/testing-utils/constants.ts +++ b/tests/testing-utils/constants.ts @@ -4,4 +4,8 @@ export const charlieStashSeed = export const charlieSeed = '0xbc1ede780f784bb6991a585e4f6e61522c14e1cae6ad0895fb57b9a205a8f938' -export const charlieAddress = '5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y' \ No newline at end of file +export const charlieAddress = '5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y' + +export const eveSeed = + '0x786ad0e2df456fe43dd1f91ebca22e235bc162e0bb8d53c633e8c85b2af68b7a' +export const eveAddress = '5HGjWAeFDfFCWPsjFQdVV2Msvz2XtMktvgocEZcCj68kUMaw' \ No newline at end of file diff --git a/tests/testing-utils/setup-test.ts b/tests/testing-utils/setup-test.ts index 01c6effa..f63593c8 100644 --- a/tests/testing-utils/setup-test.ts +++ b/tests/testing-utils/setup-test.ts @@ -1,7 +1,10 @@ import { Test } from 'tape' import { Entropy, wasmGlobalsReady } from '@entropyxyz/sdk' +import { tmpdir } from 'node:os' +import { join } from 'node:path' + // @ts-ignore -import { spinNetworkUp, spinNetworkDown, } from "@entropyxyz/sdk/testing" +import { spinNetworkUp, spinNetworkDown, jumpStartNetwork } from "@entropyxyz/sdk/testing" // @ts-ignore import Keyring from '@entropyxyz/sdk/keys' @@ -16,12 +19,19 @@ interface SetupTestOpts { endpoint?: string createAccountOnly?: boolean } -const NETWORK_TYPE_DEFAULT = 'two-nodes' -let counter = 0 + +const NETWORK_TYPE_DEFAULT = 'four-nodes' +let count = 0 +function uniqueConfigPath () { + return join( + tmpdir(), + `entropy-cli-${Date.now()}_${count++}.json` + ) +} export async function setupTest (t: Test, opts?: SetupTestOpts): Promise<{ entropy: Entropy; run: any; endpoint: string }> { const { - configPath = `/tmp/entropy-cli-${Date.now()}_${counter++}.json`, + configPath = uniqueConfigPath(), networkType = NETWORK_TYPE_DEFAULT, seed = makeSeed(), endpoint = 'ws://127.0.0.1:9944', diff --git a/tests/transfer.test.ts b/tests/transfer.test.ts index 4dda0800..ca91a923 100644 --- a/tests/transfer.test.ts +++ b/tests/transfer.test.ts @@ -15,7 +15,7 @@ import { EntropyBalance } from '../src/balance/main' import { charlieStashAddress, charlieStashSeed } from './testing-utils/constants' import { EntropyAccountData } from '../src/config/types' -const networkType = 'two-nodes' +const networkType = 'four-nodes' const endpoint = 'ws://127.0.0.1:9944' test('Transfer', async (t) => { diff --git a/yarn.lock b/yarn.lock index 426ba746..7e6beba6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -26,17 +26,19 @@ resolved "https://registry.yarnpkg.com/@entropyxyz/entropy-protocol-web/-/entropy-protocol-web-0.2.0.tgz#b9478438386fefb4b821dbac95ec81d251d2dd55" integrity sha512-lLa/lLNJnwH1R8fJvLlUn1kw7d4Rbnt9LjhUC69HKxkU69J+bw/EY6fAjBnpVbgNmqCnYpf/DBLtMyOayZeNDQ== -"@entropyxyz/sdk@^0.2.3": - version "0.2.3" - resolved "https://registry.yarnpkg.com/@entropyxyz/sdk/-/sdk-0.2.3.tgz#7c4a844ae0f7d15a154ae695b8607184ae7fa55b" - integrity sha512-7FD7+RBZc3+TLwD6+mlcwxM4T1+PbGUoYoYvKguyT3viFXbWWH92nLjrdjIjTZY/4SDTkPCZAFqeQUPA+QhRVQ== +"@entropyxyz/sdk@0.3.0": + version "0.3.0" + resolved "https://registry.yarnpkg.com/@entropyxyz/sdk/-/sdk-0.3.0.tgz#845ea46f4181882cfb48e3eedcf53812e44ce436" + integrity sha512-gEpiVJOJADiqr1tBqOgMUxufKD19xp7R03TkrxoTW/zzB0tEWFtWD+yW12Sq1Zzl3xBH5QXI4v/UiyDFkqaiUQ== dependencies: "@entropyxyz/entropy-protocol-nodejs" "^0.2.0" "@entropyxyz/entropy-protocol-web" "^0.2.0" - "@polkadot/api" "^10.13.1" + "@polkadot/api" "^14.0.1" + "@types/lodash.clonedeep" "^4.5.9" "@types/node" "^20.12.12" debug "^4.3.4" hpke-js "^1.2.7" + lodash.clonedeep "^4.5.0" uuid "^9.0.1" xtend "^4.0.2" @@ -430,268 +432,270 @@ resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== -"@polkadot-api/client@0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0": - version "0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0" - resolved "https://registry.yarnpkg.com/@polkadot-api/client/-/client-0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0.tgz#5d6b863f63f5c6ecd4183fcf0c5c84dd349f7627" - integrity sha512-0fqK6pUKcGHSG2pBvY+gfSS+1mMdjd/qRygAcKI5d05tKsnZLRnmhb9laDguKmGEIB0Bz9vQqNK3gIN/cfvVwg== - dependencies: - "@polkadot-api/metadata-builders" "0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0" - "@polkadot-api/substrate-bindings" "0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0" - "@polkadot-api/substrate-client" "0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0" - "@polkadot-api/utils" "0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0" +"@polkadot-api/json-rpc-provider-proxy@^0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@polkadot-api/json-rpc-provider-proxy/-/json-rpc-provider-proxy-0.1.0.tgz#6e191f28e7d0fbbe8b540fc51d12a0adaeba297e" + integrity sha512-8GSFE5+EF73MCuLQm8tjrbCqlgclcHBSRaswvXziJ0ZW7iw3UEMsKkkKvELayWyBuOPa2T5i1nj6gFOeIsqvrg== -"@polkadot-api/json-rpc-provider-proxy@0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0": - version "0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0" - resolved "https://registry.yarnpkg.com/@polkadot-api/json-rpc-provider-proxy/-/json-rpc-provider-proxy-0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0.tgz#cc28fb801db6a47824261a709ab924ec6951eb96" - integrity sha512-0hZ8vtjcsyCX8AyqP2sqUHa1TFFfxGWmlXJkit0Nqp9b32MwZqn5eaUAiV2rNuEpoglKOdKnkGtUF8t5MoodKw== +"@polkadot-api/json-rpc-provider@0.0.1", "@polkadot-api/json-rpc-provider@^0.0.1": + version "0.0.1" + resolved "https://registry.yarnpkg.com/@polkadot-api/json-rpc-provider/-/json-rpc-provider-0.0.1.tgz#333645d40ccd9bccfd1f32503f17e4e63e76e297" + integrity sha512-/SMC/l7foRjpykLTUTacIH05H3mr9ip8b5xxfwXlVezXrNVLp3Cv0GX6uItkKd+ZjzVPf3PFrDF2B2/HLSNESA== -"@polkadot-api/json-rpc-provider@0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0": - version "0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0" - resolved "https://registry.yarnpkg.com/@polkadot-api/json-rpc-provider/-/json-rpc-provider-0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0.tgz#2f71bfb192d28dd4c400ef8b1c5f934c676950f3" - integrity sha512-EaUS9Fc3wsiUr6ZS43PQqaRScW7kM6DYbuM/ou0aYjm8N9MBqgDbGm2oL6RE1vAVmOfEuHcXZuZkhzWtyvQUtA== +"@polkadot-api/metadata-builders@0.3.2": + version "0.3.2" + resolved "https://registry.yarnpkg.com/@polkadot-api/metadata-builders/-/metadata-builders-0.3.2.tgz#007f158c9e0546cf79ba440befc0c753ab1a6629" + integrity sha512-TKpfoT6vTb+513KDzMBTfCb/ORdgRnsS3TDFpOhAhZ08ikvK+hjHMt5plPiAX/OWkm1Wc9I3+K6W0hX5Ab7MVg== + dependencies: + "@polkadot-api/substrate-bindings" "0.6.0" + "@polkadot-api/utils" "0.1.0" -"@polkadot-api/metadata-builders@0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0": - version "0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0" - resolved "https://registry.yarnpkg.com/@polkadot-api/metadata-builders/-/metadata-builders-0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0.tgz#085db2a3c7b100626b2fae3be35a32a24ea7714f" - integrity sha512-BD7rruxChL1VXt0icC2gD45OtT9ofJlql0qIllHSRYgama1CR2Owt+ApInQxB+lWqM+xNOznZRpj8CXNDvKIMg== +"@polkadot-api/observable-client@^0.3.0": + version "0.3.2" + resolved "https://registry.yarnpkg.com/@polkadot-api/observable-client/-/observable-client-0.3.2.tgz#fd91efee350595a6e0ecfd3f294cc80de86c0cf7" + integrity sha512-HGgqWgEutVyOBXoGOPp4+IAq6CNdK/3MfQJmhCJb8YaJiaK4W6aRGrdQuQSTPHfERHCARt9BrOmEvTXAT257Ug== dependencies: - "@polkadot-api/substrate-bindings" "0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0" - "@polkadot-api/utils" "0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0" + "@polkadot-api/metadata-builders" "0.3.2" + "@polkadot-api/substrate-bindings" "0.6.0" + "@polkadot-api/utils" "0.1.0" -"@polkadot-api/substrate-bindings@0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0": - version "0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0" - resolved "https://registry.yarnpkg.com/@polkadot-api/substrate-bindings/-/substrate-bindings-0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0.tgz#f836a554a9ead6fb6356079c725cd53f87238932" - integrity sha512-N4vdrZopbsw8k57uG58ofO7nLXM4Ai7835XqakN27MkjXMp5H830A1KJE0L9sGQR7ukOCDEIHHcwXVrzmJ/PBg== +"@polkadot-api/substrate-bindings@0.6.0": + version "0.6.0" + resolved "https://registry.yarnpkg.com/@polkadot-api/substrate-bindings/-/substrate-bindings-0.6.0.tgz#889b0c3ba19dc95282286506bf6e370a43ce119a" + integrity sha512-lGuhE74NA1/PqdN7fKFdE5C1gNYX357j1tWzdlPXI0kQ7h3kN0zfxNOpPUN7dIrPcOFZ6C0tRRVrBylXkI6xPw== dependencies: "@noble/hashes" "^1.3.1" - "@polkadot-api/utils" "0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0" + "@polkadot-api/utils" "0.1.0" "@scure/base" "^1.1.1" scale-ts "^1.6.0" -"@polkadot-api/substrate-client@0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0": - version "0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0" - resolved "https://registry.yarnpkg.com/@polkadot-api/substrate-client/-/substrate-client-0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0.tgz#55ae463f4143495e328465dd16b03e71663ef4c4" - integrity sha512-lcdvd2ssUmB1CPzF8s2dnNOqbrDa+nxaaGbuts+Vo8yjgSKwds2Lo7Oq+imZN4VKW7t9+uaVcKFLMF7PdH0RWw== - -"@polkadot-api/utils@0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0": - version "0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0" - resolved "https://registry.yarnpkg.com/@polkadot-api/utils/-/utils-0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0.tgz#759698dcf948745ea37cc5ab6abd49a00f1b0c31" - integrity sha512-0CYaCjfLQJTCRCiYvZ81OncHXEKPzAexCMoVloR+v2nl/O2JRya/361MtPkeNLC6XBoaEgLAG9pWQpH3WePzsw== - -"@polkadot/api-augment@10.13.1": - version "10.13.1" - resolved "https://registry.yarnpkg.com/@polkadot/api-augment/-/api-augment-10.13.1.tgz#dd3670a2f1a581c38b857ad3b0805b6581099c63" - integrity sha512-IAKaCp19QxgOG4HKk9RAgUgC/VNVqymZ2GXfMNOZWImZhxRIbrK+raH5vN2MbWwtVHpjxyXvGsd1RRhnohI33A== - dependencies: - "@polkadot/api-base" "10.13.1" - "@polkadot/rpc-augment" "10.13.1" - "@polkadot/types" "10.13.1" - "@polkadot/types-augment" "10.13.1" - "@polkadot/types-codec" "10.13.1" - "@polkadot/util" "^12.6.2" - tslib "^2.6.2" - -"@polkadot/api-base@10.13.1": - version "10.13.1" - resolved "https://registry.yarnpkg.com/@polkadot/api-base/-/api-base-10.13.1.tgz#efed5bb31e38244b6a68ce56138b97ad82101426" - integrity sha512-Okrw5hjtEjqSMOG08J6qqEwlUQujTVClvY1/eZkzKwNzPelWrtV6vqfyJklB7zVhenlxfxqhZKKcY7zWSW/q5Q== +"@polkadot-api/substrate-client@^0.1.2": + version "0.1.4" + resolved "https://registry.yarnpkg.com/@polkadot-api/substrate-client/-/substrate-client-0.1.4.tgz#7a808e5cb85ecb9fa2b3a43945090a6c807430ce" + integrity sha512-MljrPobN0ZWTpn++da9vOvt+Ex+NlqTlr/XT7zi9sqPtDJiQcYl+d29hFAgpaeTqbeQKZwz3WDE9xcEfLE8c5A== dependencies: - "@polkadot/rpc-core" "10.13.1" - "@polkadot/types" "10.13.1" - "@polkadot/util" "^12.6.2" - rxjs "^7.8.1" - tslib "^2.6.2" + "@polkadot-api/json-rpc-provider" "0.0.1" + "@polkadot-api/utils" "0.1.0" -"@polkadot/api-derive@10.13.1": - version "10.13.1" - resolved "https://registry.yarnpkg.com/@polkadot/api-derive/-/api-derive-10.13.1.tgz#d8827ee83124f3b3f664c415cdde9c6b909e5145" - integrity sha512-ef0H0GeCZ4q5Om+c61eLLLL29UxFC2/u/k8V1K2JOIU+2wD5LF7sjAoV09CBMKKHfkLenRckVk2ukm4rBqFRpg== - dependencies: - "@polkadot/api" "10.13.1" - "@polkadot/api-augment" "10.13.1" - "@polkadot/api-base" "10.13.1" - "@polkadot/rpc-core" "10.13.1" - "@polkadot/types" "10.13.1" - "@polkadot/types-codec" "10.13.1" - "@polkadot/util" "^12.6.2" - "@polkadot/util-crypto" "^12.6.2" +"@polkadot-api/utils@0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@polkadot-api/utils/-/utils-0.1.0.tgz#d36937cdc465c2ea302f3278cf53157340ab33a0" + integrity sha512-MXzWZeuGxKizPx2Xf/47wx9sr/uxKw39bVJUptTJdsaQn/TGq+z310mHzf1RCGvC1diHM8f593KrnDgc9oNbJA== + +"@polkadot/api-augment@14.0.1": + version "14.0.1" + resolved "https://registry.yarnpkg.com/@polkadot/api-augment/-/api-augment-14.0.1.tgz#77ace2ba0c8ead942243e66e3c621c9219bb0e97" + integrity sha512-+ZHq3JaQZ/3Q45r6/YQBeLfoP8S5ibgkOvLKnKA9cJeF7oP5Qgi6pAEnGW0accfnT9PyCEco9fD/ZOLR9Yka7w== + dependencies: + "@polkadot/api-base" "14.0.1" + "@polkadot/rpc-augment" "14.0.1" + "@polkadot/types" "14.0.1" + "@polkadot/types-augment" "14.0.1" + "@polkadot/types-codec" "14.0.1" + "@polkadot/util" "^13.1.1" + tslib "^2.7.0" + +"@polkadot/api-base@14.0.1": + version "14.0.1" + resolved "https://registry.yarnpkg.com/@polkadot/api-base/-/api-base-14.0.1.tgz#2adaea94ac0b021d3b13c1f2b2f1d47de93815d0" + integrity sha512-OVnDiztKx/1ktae9eCzO1q8lmKEfnQ71fipo8JkDJOMIN4vT1IqL9KQo4e/Xz8UtOfTJ0H8kZ6evaLqdA3ZYOA== + dependencies: + "@polkadot/rpc-core" "14.0.1" + "@polkadot/types" "14.0.1" + "@polkadot/util" "^13.1.1" rxjs "^7.8.1" - tslib "^2.6.2" - -"@polkadot/api@10.13.1", "@polkadot/api@^10.13.1": - version "10.13.1" - resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-10.13.1.tgz#47586c070d3fe13a0acc93a8aa9c3a53791284fb" - integrity sha512-YrKWR4TQR5CDyGkF0mloEUo7OsUA+bdtENpJGOtNavzOQUDEbxFE0PVzokzZfVfHhHX2CojPVmtzmmLxztyJkg== - dependencies: - "@polkadot/api-augment" "10.13.1" - "@polkadot/api-base" "10.13.1" - "@polkadot/api-derive" "10.13.1" - "@polkadot/keyring" "^12.6.2" - "@polkadot/rpc-augment" "10.13.1" - "@polkadot/rpc-core" "10.13.1" - "@polkadot/rpc-provider" "10.13.1" - "@polkadot/types" "10.13.1" - "@polkadot/types-augment" "10.13.1" - "@polkadot/types-codec" "10.13.1" - "@polkadot/types-create" "10.13.1" - "@polkadot/types-known" "10.13.1" - "@polkadot/util" "^12.6.2" - "@polkadot/util-crypto" "^12.6.2" + tslib "^2.7.0" + +"@polkadot/api-derive@14.0.1": + version "14.0.1" + resolved "https://registry.yarnpkg.com/@polkadot/api-derive/-/api-derive-14.0.1.tgz#3d76f8191568c174f909781c85d18b804edd3502" + integrity sha512-ADQMre3DRRW/0rhJqxOVhQ1vqtyafP2dSZJ0qEAsto12q2WMSF8CZWo7pXe4DxiniDkZx3zVq4z5lqw2aBRLfg== + dependencies: + "@polkadot/api" "14.0.1" + "@polkadot/api-augment" "14.0.1" + "@polkadot/api-base" "14.0.1" + "@polkadot/rpc-core" "14.0.1" + "@polkadot/types" "14.0.1" + "@polkadot/types-codec" "14.0.1" + "@polkadot/util" "^13.1.1" + "@polkadot/util-crypto" "^13.1.1" + rxjs "^7.8.1" + tslib "^2.7.0" + +"@polkadot/api@14.0.1", "@polkadot/api@^14.0.1": + version "14.0.1" + resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-14.0.1.tgz#2882280d69e1b2f121ece118137fbc8a70f3f465" + integrity sha512-CDSaUiJpXu9aE6MaTg14K+9Trf8K2PBHcD3Xl5m5KOvJperWgYFxoCqV3rXLIBWt69LgHhMYlq5JSPRHxejIsw== + dependencies: + "@polkadot/api-augment" "14.0.1" + "@polkadot/api-base" "14.0.1" + "@polkadot/api-derive" "14.0.1" + "@polkadot/keyring" "^13.1.1" + "@polkadot/rpc-augment" "14.0.1" + "@polkadot/rpc-core" "14.0.1" + "@polkadot/rpc-provider" "14.0.1" + "@polkadot/types" "14.0.1" + "@polkadot/types-augment" "14.0.1" + "@polkadot/types-codec" "14.0.1" + "@polkadot/types-create" "14.0.1" + "@polkadot/types-known" "14.0.1" + "@polkadot/util" "^13.1.1" + "@polkadot/util-crypto" "^13.1.1" eventemitter3 "^5.0.1" rxjs "^7.8.1" - tslib "^2.6.2" - -"@polkadot/keyring@^12.6.2": - version "12.6.2" - resolved "https://registry.yarnpkg.com/@polkadot/keyring/-/keyring-12.6.2.tgz#6067e6294fee23728b008ac116e7e9db05cecb9b" - integrity sha512-O3Q7GVmRYm8q7HuB3S0+Yf/q/EB2egKRRU3fv9b3B7V+A52tKzA+vIwEmNVaD1g5FKW9oB97rmpggs0zaKFqHw== - dependencies: - "@polkadot/util" "12.6.2" - "@polkadot/util-crypto" "12.6.2" - tslib "^2.6.2" - -"@polkadot/networks@12.6.2", "@polkadot/networks@^12.6.2": - version "12.6.2" - resolved "https://registry.yarnpkg.com/@polkadot/networks/-/networks-12.6.2.tgz#791779fee1d86cc5b6cd371858eea9b7c3f8720d" - integrity sha512-1oWtZm1IvPWqvMrldVH6NI2gBoCndl5GEwx7lAuQWGr7eNL+6Bdc5K3Z9T0MzFvDGoi2/CBqjX9dRKo39pDC/w== - dependencies: - "@polkadot/util" "12.6.2" - "@substrate/ss58-registry" "^1.44.0" - tslib "^2.6.2" - -"@polkadot/rpc-augment@10.13.1": - version "10.13.1" - resolved "https://registry.yarnpkg.com/@polkadot/rpc-augment/-/rpc-augment-10.13.1.tgz#83317b46c5ab86104cca2bdc336199db0c25b798" - integrity sha512-iLsWUW4Jcx3DOdVrSHtN0biwxlHuTs4QN2hjJV0gd0jo7W08SXhWabZIf9mDmvUJIbR7Vk+9amzvegjRyIf5+A== - dependencies: - "@polkadot/rpc-core" "10.13.1" - "@polkadot/types" "10.13.1" - "@polkadot/types-codec" "10.13.1" - "@polkadot/util" "^12.6.2" - tslib "^2.6.2" - -"@polkadot/rpc-core@10.13.1": - version "10.13.1" - resolved "https://registry.yarnpkg.com/@polkadot/rpc-core/-/rpc-core-10.13.1.tgz#a7ea9db8997b68aa6724f28ba76125a73e925575" - integrity sha512-eoejSHa+/tzHm0vwic62/aptTGbph8vaBpbvLIK7gd00+rT813ROz5ckB1CqQBFB23nHRLuzzX/toY8ID3xrKw== - dependencies: - "@polkadot/rpc-augment" "10.13.1" - "@polkadot/rpc-provider" "10.13.1" - "@polkadot/types" "10.13.1" - "@polkadot/util" "^12.6.2" + tslib "^2.7.0" + +"@polkadot/keyring@^13.1.1": + version "13.1.1" + resolved "https://registry.yarnpkg.com/@polkadot/keyring/-/keyring-13.1.1.tgz#14b85d4e73ebfa8ccb0fadcdee127e102624dc11" + integrity sha512-Wm+9gn946GIPjGzvueObLGBBS9s541HE6mvKdWGEmPFMzH93ESN931RZlOd67my5MWryiSP05h5SHTp7bSaQTA== + dependencies: + "@polkadot/util" "13.1.1" + "@polkadot/util-crypto" "13.1.1" + tslib "^2.7.0" + +"@polkadot/networks@13.1.1", "@polkadot/networks@^13.1.1": + version "13.1.1" + resolved "https://registry.yarnpkg.com/@polkadot/networks/-/networks-13.1.1.tgz#e1a05ef6f78ffc37272c6474df7b55244b311f9c" + integrity sha512-eEQ4+Mfl1xFtApeU5PdXZ2XBhxNSvUz9yW+YQVGUCkXRjWFbqNRsTOYWGd9uFbiAOXiiiXbtqfZpxSDzIm4XOg== + dependencies: + "@polkadot/util" "13.1.1" + "@substrate/ss58-registry" "^1.50.0" + tslib "^2.7.0" + +"@polkadot/rpc-augment@14.0.1": + version "14.0.1" + resolved "https://registry.yarnpkg.com/@polkadot/rpc-augment/-/rpc-augment-14.0.1.tgz#e6bc1cf0cdb2839fb709027e4fce6b113a5b06af" + integrity sha512-M0CbN/IScqiedYI2TmoQ+SoeEdJHfxGeQD1qJf9uYv9LILK+x1/5fyr5DrZ3uCGVmLuObWAJLnHTs0BzJcSHTQ== + dependencies: + "@polkadot/rpc-core" "14.0.1" + "@polkadot/types" "14.0.1" + "@polkadot/types-codec" "14.0.1" + "@polkadot/util" "^13.1.1" + tslib "^2.7.0" + +"@polkadot/rpc-core@14.0.1": + version "14.0.1" + resolved "https://registry.yarnpkg.com/@polkadot/rpc-core/-/rpc-core-14.0.1.tgz#9f4272354c65e2e34e6e542336c26c14aa5a21e8" + integrity sha512-SfgC6WU7RxaFFgm/GUpsqTywyaDeb7+r5GU3GlwC+QR148h3a7UcQ3sssOpB0MiZ2gIXngJuyIcIQm/3GfHnJw== + dependencies: + "@polkadot/rpc-augment" "14.0.1" + "@polkadot/rpc-provider" "14.0.1" + "@polkadot/types" "14.0.1" + "@polkadot/util" "^13.1.1" rxjs "^7.8.1" - tslib "^2.6.2" - -"@polkadot/rpc-provider@10.13.1": - version "10.13.1" - resolved "https://registry.yarnpkg.com/@polkadot/rpc-provider/-/rpc-provider-10.13.1.tgz#7e17f7be7d9a104b797d8f5aa8f1ed69f800f841" - integrity sha512-oJ7tatVXYJ0L7NpNiGd69D558HG5y5ZDmH2Bp9Dd4kFTQIiV8A39SlWwWUPCjSsen9lqSvvprNLnG/VHTpenbw== - dependencies: - "@polkadot/keyring" "^12.6.2" - "@polkadot/types" "10.13.1" - "@polkadot/types-support" "10.13.1" - "@polkadot/util" "^12.6.2" - "@polkadot/util-crypto" "^12.6.2" - "@polkadot/x-fetch" "^12.6.2" - "@polkadot/x-global" "^12.6.2" - "@polkadot/x-ws" "^12.6.2" + tslib "^2.7.0" + +"@polkadot/rpc-provider@14.0.1": + version "14.0.1" + resolved "https://registry.yarnpkg.com/@polkadot/rpc-provider/-/rpc-provider-14.0.1.tgz#69c98bd2ef7a243d0544494bc28b206889e46161" + integrity sha512-mNfaKZUHPXGSY7TwgOfV05RN3Men21Dw7YXrSZDFkJYsZ55yOAYdmLg9anPZGHW100YnNWrXj+3uhQOw8JgqkA== + dependencies: + "@polkadot/keyring" "^13.1.1" + "@polkadot/types" "14.0.1" + "@polkadot/types-support" "14.0.1" + "@polkadot/util" "^13.1.1" + "@polkadot/util-crypto" "^13.1.1" + "@polkadot/x-fetch" "^13.1.1" + "@polkadot/x-global" "^13.1.1" + "@polkadot/x-ws" "^13.1.1" eventemitter3 "^5.0.1" mock-socket "^9.3.1" - nock "^13.5.0" - tslib "^2.6.2" + nock "^13.5.4" + tslib "^2.7.0" optionalDependencies: - "@substrate/connect" "0.8.8" - -"@polkadot/types-augment@10.13.1": - version "10.13.1" - resolved "https://registry.yarnpkg.com/@polkadot/types-augment/-/types-augment-10.13.1.tgz#8f39a46a1a3e100be03cbae06f43a043cb25c337" - integrity sha512-TcrLhf95FNFin61qmVgOgayzQB/RqVsSg9thAso1Fh6pX4HSbvI35aGPBAn3SkA6R+9/TmtECirpSNLtIGFn0g== - dependencies: - "@polkadot/types" "10.13.1" - "@polkadot/types-codec" "10.13.1" - "@polkadot/util" "^12.6.2" - tslib "^2.6.2" - -"@polkadot/types-codec@10.13.1": - version "10.13.1" - resolved "https://registry.yarnpkg.com/@polkadot/types-codec/-/types-codec-10.13.1.tgz#f70cd617160b467685ef3ce5195a04142255ba7b" - integrity sha512-AiQ2Vv2lbZVxEdRCN8XSERiWlOWa2cTDLnpAId78EnCtx4HLKYQSd+Jk9Y4BgO35R79mchK4iG+w6gZ+ukG2bg== - dependencies: - "@polkadot/util" "^12.6.2" - "@polkadot/x-bigint" "^12.6.2" - tslib "^2.6.2" - -"@polkadot/types-create@10.13.1": - version "10.13.1" - resolved "https://registry.yarnpkg.com/@polkadot/types-create/-/types-create-10.13.1.tgz#99470816d0d2ca32a6a5ce6d701b4199e8700f66" - integrity sha512-Usn1jqrz35SXgCDAqSXy7mnD6j4RvB4wyzTAZipFA6DGmhwyxxIgOzlWQWDb+1PtPKo9vtMzen5IJ+7w5chIeA== - dependencies: - "@polkadot/types-codec" "10.13.1" - "@polkadot/util" "^12.6.2" - tslib "^2.6.2" - -"@polkadot/types-known@10.13.1": - version "10.13.1" - resolved "https://registry.yarnpkg.com/@polkadot/types-known/-/types-known-10.13.1.tgz#8cca2d3f2c4ef67849f66ba4a35856063ec61f5f" - integrity sha512-uHjDW05EavOT5JeU8RbiFWTgPilZ+odsCcuEYIJGmK+es3lk/Qsdns9Zb7U7NJl7eJ6OWmRtyrWsLs+bU+jjIQ== - dependencies: - "@polkadot/networks" "^12.6.2" - "@polkadot/types" "10.13.1" - "@polkadot/types-codec" "10.13.1" - "@polkadot/types-create" "10.13.1" - "@polkadot/util" "^12.6.2" - tslib "^2.6.2" - -"@polkadot/types-support@10.13.1": - version "10.13.1" - resolved "https://registry.yarnpkg.com/@polkadot/types-support/-/types-support-10.13.1.tgz#d4b58c8d9bcbb8e897a255d9a66c217dcaa6ead4" - integrity sha512-4gEPfz36XRQIY7inKq0HXNVVhR6HvXtm7yrEmuBuhM86LE0lQQBkISUSgR358bdn2OFSLMxMoRNoh3kcDvdGDQ== - dependencies: - "@polkadot/util" "^12.6.2" - tslib "^2.6.2" - -"@polkadot/types@10.13.1": - version "10.13.1" - resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-10.13.1.tgz#979d652dc11af9cb8b32e7a55839e9762532755d" - integrity sha512-Hfvg1ZgJlYyzGSAVrDIpp3vullgxrjOlh/CSThd/PI4TTN1qHoPSFm2hs77k3mKkOzg+LrWsLE0P/LP2XddYcw== - dependencies: - "@polkadot/keyring" "^12.6.2" - "@polkadot/types-augment" "10.13.1" - "@polkadot/types-codec" "10.13.1" - "@polkadot/types-create" "10.13.1" - "@polkadot/util" "^12.6.2" - "@polkadot/util-crypto" "^12.6.2" + "@substrate/connect" "0.8.11" + +"@polkadot/types-augment@14.0.1": + version "14.0.1" + resolved "https://registry.yarnpkg.com/@polkadot/types-augment/-/types-augment-14.0.1.tgz#06b5eed44e53cfc42cb98e624581170076c6ab2f" + integrity sha512-PGo81444J5tGJxP3tu060Jx1kkeuo8SmBIt9S/w626Se49x4RLM5a7Pa5fguYVsg4TsJa9cgVPMuu6Y0F/2aCQ== + dependencies: + "@polkadot/types" "14.0.1" + "@polkadot/types-codec" "14.0.1" + "@polkadot/util" "^13.1.1" + tslib "^2.7.0" + +"@polkadot/types-codec@14.0.1": + version "14.0.1" + resolved "https://registry.yarnpkg.com/@polkadot/types-codec/-/types-codec-14.0.1.tgz#9b354295c4b565a18034c82fa0f86928b2514a99" + integrity sha512-IyUlkrRZ6uppbHVlMJL+btKP7dfgW65K06ggQxH7Y/IyRAQVDNjXecAZrCUMB/gtjUXNPyTHEIfPGDlg8E6rig== + dependencies: + "@polkadot/util" "^13.1.1" + "@polkadot/x-bigint" "^13.1.1" + tslib "^2.7.0" + +"@polkadot/types-create@14.0.1": + version "14.0.1" + resolved "https://registry.yarnpkg.com/@polkadot/types-create/-/types-create-14.0.1.tgz#5695c80f292ab7a9d766bd7cdbc1b51ef0e84392" + integrity sha512-R9/ac3CHKrFhvPKVUdpjnCDFSaGjfrNwtuY+AzvExAMIq7pM9dxo2N8UfnLbyFaG/n1hfYPXDIS3hLHvOZsLbw== + dependencies: + "@polkadot/types-codec" "14.0.1" + "@polkadot/util" "^13.1.1" + tslib "^2.7.0" + +"@polkadot/types-known@14.0.1": + version "14.0.1" + resolved "https://registry.yarnpkg.com/@polkadot/types-known/-/types-known-14.0.1.tgz#fe3ef88819aac9cf7c3627a74f21fbabb8c73338" + integrity sha512-oGypUOQNxZ6bq10czpVadZYeDM2NBB2kX3VFHLKLEpjaRbnVYtKXL6pl8B0uHR8GK/2Z8AmPOj6kuRjaC86qXg== + dependencies: + "@polkadot/networks" "^13.1.1" + "@polkadot/types" "14.0.1" + "@polkadot/types-codec" "14.0.1" + "@polkadot/types-create" "14.0.1" + "@polkadot/util" "^13.1.1" + tslib "^2.7.0" + +"@polkadot/types-support@14.0.1": + version "14.0.1" + resolved "https://registry.yarnpkg.com/@polkadot/types-support/-/types-support-14.0.1.tgz#a726bc36e6d3fe7e2d9710d6e8b7559f9d6aee3b" + integrity sha512-lcZEyOf5e3WLLtrFlLTvFfUpO0Vx/Gh5lhLLjdx1W9Xs0KJUlOxSAKxvjVieJJj6HifL0Jh6tDYOUeEc4TOrvA== + dependencies: + "@polkadot/util" "^13.1.1" + tslib "^2.7.0" + +"@polkadot/types@14.0.1": + version "14.0.1" + resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-14.0.1.tgz#a562ef1b49203bfbe640a608e0e23c6c77a0153b" + integrity sha512-DOMzHsyVbCa12FT2Fng8iGiQJhHW2ONpv5oieU+Z2o0gFQqwNmIDXWncScG5mAUBNcDMXLuvWIKLKtUDOq8msg== + dependencies: + "@polkadot/keyring" "^13.1.1" + "@polkadot/types-augment" "14.0.1" + "@polkadot/types-codec" "14.0.1" + "@polkadot/types-create" "14.0.1" + "@polkadot/util" "^13.1.1" + "@polkadot/util-crypto" "^13.1.1" rxjs "^7.8.1" - tslib "^2.6.2" + tslib "^2.7.0" -"@polkadot/util-crypto@12.6.2", "@polkadot/util-crypto@^12.6.2": - version "12.6.2" - resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-12.6.2.tgz#d2d51010e8e8ca88951b7d864add797dad18bbfc" - integrity sha512-FEWI/dJ7wDMNN1WOzZAjQoIcCP/3vz3wvAp5QQm+lOrzOLj0iDmaIGIcBkz8HVm3ErfSe/uKP0KS4jgV/ib+Mg== +"@polkadot/util-crypto@13.1.1", "@polkadot/util-crypto@^13.1.1": + version "13.1.1" + resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-13.1.1.tgz#26960046a9bd6b3b63dc9b006c1a24dc6391b875" + integrity sha512-FG68rrLPdfLcscEyH10vnGkakM4O2lqr71S3GDhgc9WXaS8y9jisLgMPg8jbMHiQBJ3iKYkmtPKiLBowRslj2w== dependencies: "@noble/curves" "^1.3.0" "@noble/hashes" "^1.3.3" - "@polkadot/networks" "12.6.2" - "@polkadot/util" "12.6.2" + "@polkadot/networks" "13.1.1" + "@polkadot/util" "13.1.1" "@polkadot/wasm-crypto" "^7.3.2" "@polkadot/wasm-util" "^7.3.2" - "@polkadot/x-bigint" "12.6.2" - "@polkadot/x-randomvalues" "12.6.2" - "@scure/base" "^1.1.5" - tslib "^2.6.2" - -"@polkadot/util@12.6.2", "@polkadot/util@^12.6.2": - version "12.6.2" - resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-12.6.2.tgz#9396eff491221e1f0fd28feac55fc16ecd61a8dc" - integrity sha512-l8TubR7CLEY47240uki0TQzFvtnxFIO7uI/0GoWzpYD/O62EIAMRsuY01N4DuwgKq2ZWD59WhzsLYmA5K6ksdw== - dependencies: - "@polkadot/x-bigint" "12.6.2" - "@polkadot/x-global" "12.6.2" - "@polkadot/x-textdecoder" "12.6.2" - "@polkadot/x-textencoder" "12.6.2" + "@polkadot/x-bigint" "13.1.1" + "@polkadot/x-randomvalues" "13.1.1" + "@scure/base" "^1.1.7" + tslib "^2.7.0" + +"@polkadot/util@13.1.1", "@polkadot/util@^13.1.1": + version "13.1.1" + resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-13.1.1.tgz#9cbf81e8c48e2ac549dbe2a40384624870016658" + integrity sha512-M4iQ5Um8tFdDmD7a96nPzfrEt+kxyWOqQDPqXyaax4QBnq/WCbq0jo8IO61uz55mdMQnGZvq8jd8uge4V6JzzQ== + dependencies: + "@polkadot/x-bigint" "13.1.1" + "@polkadot/x-global" "13.1.1" + "@polkadot/x-textdecoder" "13.1.1" + "@polkadot/x-textencoder" "13.1.1" "@types/bn.js" "^5.1.5" bn.js "^5.2.1" - tslib "^2.6.2" + tslib "^2.7.0" "@polkadot/wasm-bridge@7.3.2": version "7.3.2" @@ -746,105 +750,110 @@ dependencies: tslib "^2.6.2" -"@polkadot/x-bigint@12.6.2", "@polkadot/x-bigint@^12.6.2": - version "12.6.2" - resolved "https://registry.yarnpkg.com/@polkadot/x-bigint/-/x-bigint-12.6.2.tgz#59b7a615f205ae65e1ac67194aefde94d3344580" - integrity sha512-HSIk60uFPX4GOFZSnIF7VYJz7WZA7tpFJsne7SzxOooRwMTWEtw3fUpFy5cYYOeLh17/kHH1Y7SVcuxzVLc74Q== +"@polkadot/x-bigint@13.1.1", "@polkadot/x-bigint@^13.1.1": + version "13.1.1" + resolved "https://registry.yarnpkg.com/@polkadot/x-bigint/-/x-bigint-13.1.1.tgz#1a9036c9529ce15deab808bee7333bcbd3ab0078" + integrity sha512-Cq4Y6fd9UWtRBZz8RX2tWEBL1IFwUtY6cL8p6HC9yhZtUR6OPjKZe6RIZQa9gSOoIuqZWd6PmtvSNGVH32yfkQ== dependencies: - "@polkadot/x-global" "12.6.2" - tslib "^2.6.2" + "@polkadot/x-global" "13.1.1" + tslib "^2.7.0" -"@polkadot/x-fetch@^12.6.2": - version "12.6.2" - resolved "https://registry.yarnpkg.com/@polkadot/x-fetch/-/x-fetch-12.6.2.tgz#b1bca028db90263bafbad2636c18d838d842d439" - integrity sha512-8wM/Z9JJPWN1pzSpU7XxTI1ldj/AfC8hKioBlUahZ8gUiJaOF7K9XEFCrCDLis/A1BoOu7Ne6WMx/vsJJIbDWw== +"@polkadot/x-fetch@^13.1.1": + version "13.1.1" + resolved "https://registry.yarnpkg.com/@polkadot/x-fetch/-/x-fetch-13.1.1.tgz#df05a3405537accab76000d99aa32cbea790aed9" + integrity sha512-qA6mIUUebJbS+oWzq/EagZflmaoa9b25WvsxSFn7mCvzKngXzr+GYCY4XiDwKY/S+/pr/kvSCKZ1ia8BDqPBYQ== dependencies: - "@polkadot/x-global" "12.6.2" + "@polkadot/x-global" "13.1.1" node-fetch "^3.3.2" - tslib "^2.6.2" + tslib "^2.7.0" -"@polkadot/x-global@12.6.2", "@polkadot/x-global@^12.6.2": - version "12.6.2" - resolved "https://registry.yarnpkg.com/@polkadot/x-global/-/x-global-12.6.2.tgz#31d4de1c3d4c44e4be3219555a6d91091decc4ec" - integrity sha512-a8d6m+PW98jmsYDtAWp88qS4dl8DyqUBsd0S+WgyfSMtpEXu6v9nXDgPZgwF5xdDvXhm+P0ZfVkVTnIGrScb5g== +"@polkadot/x-global@13.1.1", "@polkadot/x-global@^13.1.1": + version "13.1.1" + resolved "https://registry.yarnpkg.com/@polkadot/x-global/-/x-global-13.1.1.tgz#1db0c16e45a20eddf682c98b1d3487619203c8a9" + integrity sha512-DViIMmmEs29Qlsp058VTg2Mn7e3/CpGazNnKJrsBa0o1Ptxl13/4Z0fjqCpNi2GB+kaOsnREzxUORrHcU+PqcQ== dependencies: - tslib "^2.6.2" + tslib "^2.7.0" -"@polkadot/x-randomvalues@12.6.2": - version "12.6.2" - resolved "https://registry.yarnpkg.com/@polkadot/x-randomvalues/-/x-randomvalues-12.6.2.tgz#13fe3619368b8bf5cb73781554859b5ff9d900a2" - integrity sha512-Vr8uG7rH2IcNJwtyf5ebdODMcr0XjoCpUbI91Zv6AlKVYOGKZlKLYJHIwpTaKKB+7KPWyQrk4Mlym/rS7v9feg== +"@polkadot/x-randomvalues@13.1.1": + version "13.1.1" + resolved "https://registry.yarnpkg.com/@polkadot/x-randomvalues/-/x-randomvalues-13.1.1.tgz#e3fc6e77cdfe6f345fca7433dd92a914807a7e4f" + integrity sha512-cXj4omwbgzQQSiBtV1ZBw+XhJUU3iz/DS6ghUnGllSZEK+fGqiyaNgeFQzDY0tKjm6kYaDpvtOHR3mHsbzDuTg== dependencies: - "@polkadot/x-global" "12.6.2" - tslib "^2.6.2" + "@polkadot/x-global" "13.1.1" + tslib "^2.7.0" -"@polkadot/x-textdecoder@12.6.2": - version "12.6.2" - resolved "https://registry.yarnpkg.com/@polkadot/x-textdecoder/-/x-textdecoder-12.6.2.tgz#b86da0f8e8178f1ca31a7158257e92aea90b10e4" - integrity sha512-M1Bir7tYvNappfpFWXOJcnxUhBUFWkUFIdJSyH0zs5LmFtFdbKAeiDXxSp2Swp5ddOZdZgPac294/o2TnQKN1w== +"@polkadot/x-textdecoder@13.1.1": + version "13.1.1" + resolved "https://registry.yarnpkg.com/@polkadot/x-textdecoder/-/x-textdecoder-13.1.1.tgz#305e9a1be38aa435942bc2a73b088a2ca1c1c89b" + integrity sha512-LpZ9KYc6HdBH+i86bCmun4g4GWMiWN/1Pzs0hNdanlQMfqp3UGzl1Dqp0nozMvjWAlvyG7ip235VgNMd8HEbqg== dependencies: - "@polkadot/x-global" "12.6.2" - tslib "^2.6.2" + "@polkadot/x-global" "13.1.1" + tslib "^2.7.0" -"@polkadot/x-textencoder@12.6.2": - version "12.6.2" - resolved "https://registry.yarnpkg.com/@polkadot/x-textencoder/-/x-textencoder-12.6.2.tgz#81d23bd904a2c36137a395c865c5fefa21abfb44" - integrity sha512-4N+3UVCpI489tUJ6cv3uf0PjOHvgGp9Dl+SZRLgFGt9mvxnvpW/7+XBADRMtlG4xi5gaRK7bgl5bmY6OMDsNdw== +"@polkadot/x-textencoder@13.1.1": + version "13.1.1" + resolved "https://registry.yarnpkg.com/@polkadot/x-textencoder/-/x-textencoder-13.1.1.tgz#2588c57c1fae68493a5588a156313d25b91a577e" + integrity sha512-w1mT15B9ptN5CJNgN/A0CmBqD5y9OePjBdU6gmAd8KRhwXCF0MTBKcEZk1dHhXiXtX+28ULJWLrfefC5gxy69Q== dependencies: - "@polkadot/x-global" "12.6.2" - tslib "^2.6.2" + "@polkadot/x-global" "13.1.1" + tslib "^2.7.0" -"@polkadot/x-ws@^12.6.2": - version "12.6.2" - resolved "https://registry.yarnpkg.com/@polkadot/x-ws/-/x-ws-12.6.2.tgz#b99094d8e53a03be1de903d13ba59adaaabc767a" - integrity sha512-cGZWo7K5eRRQCRl2LrcyCYsrc3lRbTlixZh3AzgU8uX4wASVGRlNWi/Hf4TtHNe1ExCDmxabJzdIsABIfrr7xw== +"@polkadot/x-ws@^13.1.1": + version "13.1.1" + resolved "https://registry.yarnpkg.com/@polkadot/x-ws/-/x-ws-13.1.1.tgz#cff0356c75e64f0221706e34f831126287354ac1" + integrity sha512-E/xFmJTiFzu+IK5M3/8W/9fnvNJFelcnunPv/IgO6UST94SDaTsN/Gbeb6SqPb6CsrTHRl3WD+AZ3ErGGwQfEA== dependencies: - "@polkadot/x-global" "12.6.2" - tslib "^2.6.2" - ws "^8.15.1" + "@polkadot/x-global" "13.1.1" + tslib "^2.7.0" + ws "^8.16.0" -"@scure/base@^1.1.1", "@scure/base@^1.1.5": +"@scure/base@^1.1.1": version "1.1.7" resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.7.tgz#fe973311a5c6267846aa131bc72e96c5d40d2b30" integrity sha512-PPNYBslrLNNUQ/Yad37MHYsNQtK67EhWb6WtSvNLLPo7SdVZgkUjD6Dg+5On7zNwmskf8OX7I7Nx5oN+MIWE0g== +"@scure/base@^1.1.7": + version "1.1.9" + resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.9.tgz#e5e142fbbfe251091f9c5f1dd4c834ac04c3dbd1" + integrity sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg== + "@substrate/connect-extension-protocol@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@substrate/connect-extension-protocol/-/connect-extension-protocol-2.0.0.tgz#badaa6e6b5f7c7d56987d778f4944ddb83cd9ea7" integrity sha512-nKu8pDrE3LNCEgJjZe1iGXzaD6OSIDD4Xzz/yo4KO9mQ6LBvf49BVrt4qxBFGL6++NneLiWUZGoh+VSd4PyVIg== -"@substrate/connect-known-chains@^1.1.1": - version "1.1.6" - resolved "https://registry.yarnpkg.com/@substrate/connect-known-chains/-/connect-known-chains-1.1.6.tgz#2627d329b82b46c7d745752c48c73e1b8ce6ac81" - integrity sha512-JwtdGbnK3ZqrY1qp3Ifr/p648sp9hG0Q715h4nRghnqZJnMQIiLKaFkcLnvrAiYQD3zNTYDztHidy5Q/u0TcbQ== +"@substrate/connect-known-chains@^1.1.5": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@substrate/connect-known-chains/-/connect-known-chains-1.6.0.tgz#e5a6daa0b8796a436c7f1b5676736b3b3dad3d4b" + integrity sha512-ImPIaaQjSs07qI+gfP6sV/HnupexqgPnyicsPax3Pc6mqDp2HUNMDVdaoWjR84yPbgN8+un/P4KOEb5g4wqHSg== -"@substrate/connect@0.8.8": - version "0.8.8" - resolved "https://registry.yarnpkg.com/@substrate/connect/-/connect-0.8.8.tgz#80879f2241e2bd4f24a9aa25d7997fd91a5e68e3" - integrity sha512-zwaxuNEVI9bGt0rT8PEJiXOyebLIo6QN1SyiAHRPBOl6g3Sy0KKdSN8Jmyn++oXhVRD8aIe75/V8ZkS81T+BPQ== +"@substrate/connect@0.8.11": + version "0.8.11" + resolved "https://registry.yarnpkg.com/@substrate/connect/-/connect-0.8.11.tgz#983ec69a05231636e217b573b8130a6b942af69f" + integrity sha512-ofLs1PAO9AtDdPbdyTYj217Pe+lBfTLltdHDs3ds8no0BseoLeAGxpz1mHfi7zB4IxI3YyAiLjH6U8cw4pj4Nw== dependencies: "@substrate/connect-extension-protocol" "^2.0.0" - "@substrate/connect-known-chains" "^1.1.1" - "@substrate/light-client-extension-helpers" "^0.0.4" - smoldot "2.0.22" - -"@substrate/light-client-extension-helpers@^0.0.4": - version "0.0.4" - resolved "https://registry.yarnpkg.com/@substrate/light-client-extension-helpers/-/light-client-extension-helpers-0.0.4.tgz#a5958d5c1aac7df69f55bd90991aa935500f8124" - integrity sha512-vfKcigzL0SpiK+u9sX6dq2lQSDtuFLOxIJx2CKPouPEHIs8C+fpsufn52r19GQn+qDhU8POMPHOVoqLktj8UEA== - dependencies: - "@polkadot-api/client" "0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0" - "@polkadot-api/json-rpc-provider" "0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0" - "@polkadot-api/json-rpc-provider-proxy" "0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0" - "@polkadot-api/substrate-client" "0.0.1-492c132563ea6b40ae1fc5470dec4cd18768d182.1.0" + "@substrate/connect-known-chains" "^1.1.5" + "@substrate/light-client-extension-helpers" "^1.0.0" + smoldot "2.0.26" + +"@substrate/light-client-extension-helpers@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@substrate/light-client-extension-helpers/-/light-client-extension-helpers-1.0.0.tgz#7b60368c57e06e5cf798c6557422d12e6d81f1ff" + integrity sha512-TdKlni1mBBZptOaeVrKnusMg/UBpWUORNDv5fdCaJklP4RJiFOzBCrzC+CyVI5kQzsXBisZ+2pXm+rIjS38kHg== + dependencies: + "@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.1" + "@substrate/connect-known-chains" "^1.1.5" rxjs "^7.8.1" -"@substrate/ss58-registry@^1.44.0": - version "1.48.0" - resolved "https://registry.yarnpkg.com/@substrate/ss58-registry/-/ss58-registry-1.48.0.tgz#b50b577b491274dbab55711d2e933456637e73d0" - integrity sha512-lE9TGgtd93fTEIoHhSdtvSFBoCsvTbqiCvQIMvX4m6BO/hESywzzTzTFMVP1doBwDDMAN4lsMfIM3X3pdmt7kQ== +"@substrate/ss58-registry@^1.50.0": + version "1.51.0" + resolved "https://registry.yarnpkg.com/@substrate/ss58-registry/-/ss58-registry-1.51.0.tgz#39e0341eb4069c2d3e684b93f0d8cb0bec572383" + integrity sha512-TWDurLiPxndFgKjVavCniytBIw+t4ViOi7TYp9h/D0NMmkEc9klFTo+827eyEJ0lELpqO207Ey7uGxUa+BS1jQ== "@swc/core-darwin-arm64@1.6.1": version "1.6.1" @@ -961,6 +970,18 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== +"@types/lodash.clonedeep@^4.5.9": + version "4.5.9" + resolved "https://registry.yarnpkg.com/@types/lodash.clonedeep/-/lodash.clonedeep-4.5.9.tgz#ea48276c7cc18d080e00bb56cf965bcceb3f0fc1" + integrity sha512-19429mWC+FyaAhOLzsS8kZUsI+/GmBAQ0HFiCPsKGU+7pBXOQWhyrY6xNNDwUSX8SMZMJvuFVMF9O5dQOlQK9Q== + dependencies: + "@types/lodash" "*" + +"@types/lodash@*": + version "4.17.11" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.11.tgz#8d01705ee14865015a0520e80b7ce95f3c2f7060" + integrity sha512-jzqWo/uQP/iqeGGTjhgFp2yaCrCYTauASQcpdzESNCkHjSprBJVcZP9KG9aQ0q+xcsXiKd/iuw/4dLjS3Odc7Q== + "@types/node@*", "@types/node@^20.12.12": version "20.14.5" resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.5.tgz#fe35e3022ebe58b8f201580eb24e1fcfc0f2487d" @@ -2658,6 +2679,11 @@ locate-path@^6.0.0: dependencies: p-locate "^5.0.0" +lodash.clonedeep@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" + integrity sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ== + lodash.merge@^4.6.2: version "4.6.2" resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" @@ -2811,10 +2837,10 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== -nock@^13.5.0: - version "13.5.4" - resolved "https://registry.yarnpkg.com/nock/-/nock-13.5.4.tgz#8918f0addc70a63736170fef7106a9721e0dc479" - integrity sha512-yAyTfdeNJGGBFxWdzSKCBYxs5FxLbCg5X5Q4ets974hcQzG1+qCxvIyOo4j2Ry6MUlhWVMX4OoYDefAIIwupjw== +nock@^13.5.4: + version "13.5.5" + resolved "https://registry.yarnpkg.com/nock/-/nock-13.5.5.tgz#cd1caaca281d42be17d51946367a3d53a6af3e78" + integrity sha512-XKYnqUrCwXC8DGG1xX4YH5yNIrlh9c065uaMZZHUoeUUINTOyt+x/G+ezYk0Ft6ExSREVIs+qBJDK503viTfFA== dependencies: debug "^4.1.0" json-stringify-safe "^5.0.1" @@ -3365,10 +3391,10 @@ slice-ansi@^7.0.0: ansi-styles "^6.2.1" is-fullwidth-code-point "^5.0.0" -smoldot@2.0.22: - version "2.0.22" - resolved "https://registry.yarnpkg.com/smoldot/-/smoldot-2.0.22.tgz#1e924d2011a31c57416e79a2b97a460f462a31c7" - integrity sha512-B50vRgTY6v3baYH6uCgL15tfaag5tcS2o/P5q1OiXcKGv1axZDfz2dzzMuIkVpyMR2ug11F6EAtQlmYBQd292g== +smoldot@2.0.26: + version "2.0.26" + resolved "https://registry.yarnpkg.com/smoldot/-/smoldot-2.0.26.tgz#0e64c7fcd26240fbe4c8d6b6e4b9a9aca77e00f6" + integrity sha512-F+qYmH4z2s2FK+CxGj8moYcd1ekSIKH8ywkdqlOz88Dat35iB1DIYL11aILN46YSGMzQW/lbJNS307zBSDN5Ig== dependencies: ws "^8.8.1" @@ -3690,6 +3716,11 @@ tslib@^2.1.0, tslib@^2.4.0, tslib@^2.6.2: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.3.tgz#0438f810ad7a9edcde7a241c3d80db693c8cbfe0" integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ== +tslib@^2.7.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.0.tgz#d124c86c3c05a40a91e6fdea4021bd31d377971b" + integrity sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA== + tsup@^6.7.0: version "6.7.0" resolved "https://registry.yarnpkg.com/tsup/-/tsup-6.7.0.tgz#416f350f32a07b6ae86792ad7e52b0cafc566d64" @@ -3939,7 +3970,12 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== -ws@^8.15.1, ws@^8.8.1: +ws@^8.16.0: + version "8.18.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc" + integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== + +ws@^8.8.1: version "8.17.1" resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.1.tgz#9293da530bb548febc95371d90f9c878727d919b" integrity sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==