diff --git a/code_examples/sdk_examples/package.json b/code_examples/sdk_examples/package.json index 8c33796fc..8daf17ba5 100644 --- a/code_examples/sdk_examples/package.json +++ b/code_examples/sdk_examples/package.json @@ -13,27 +13,36 @@ "test": "ts-node src/test.ts" }, "dependencies": { - "@kiltprotocol/sdk-js": "0.35.0", - "axios": "^1.5.1", - "commander": "^11.1.0", - "dotenv": "^16.3.1", - "web3": "^4.1.2" + "@kiltprotocol/sdk-js": "1.0.0", + "@kiltprotocol/chain-helpers": "^0.100.0", + "@kiltprotocol/credentials": "^0.100.0", + "@kiltprotocol/utils":"^0.100.0", + "@kiltprotocol/types":"^0.100.0", + "axios": "^1.7.5", + "commander": "^12.1.0", + "dotenv": "^16.4.5", + "web3": "^4.12.1", + "ts-node": "^10.9.2", + "typescript": "^5.5.4" }, "devDependencies": { - "@polkadot/types": "^10.4.0", - "@types/node": "^20.8.6", - "@types/node-fetch": "^2.6.6", - "@typescript-eslint/eslint-plugin": "^5.36.0", - "@typescript-eslint/parser": "^6.8.0", - "eslint": "^8.51.0", - "eslint-config-prettier": "^9.0.0", + "@polkadot/types": "^12.4.2", + "@polkadot/util": "^13.0.2", + "@polkadot/util-crypto": "^13.1.1", + "@polkadot/keyring": "^13.0.2", + "@types/node": "^22.5.1", + "@types/node-fetch": "^2.6.11", + "@typescript-eslint/eslint-plugin": "^8.3.0", + "@typescript-eslint/parser": "^8.3.0", + "eslint": "^9.9.1", + "eslint-config-prettier": "^9.1.0", "eslint-formatter-codeframe": "^7.32.1", - "eslint-plugin-import": "^2.28.1", + "eslint-plugin-import": "^2.29.1", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^5.0.1", - "node-fetch": "^2.6.7", - "prettier": "^3.0.3", - "ts-node": "^10.9.1", - "typescript": "^5.2.2" + "eslint-plugin-prettier": "^5.2.1", + "node-fetch": "^3.3.2", + "prettier": "^3.3.3", + "ts-node": "^10.9.2", + "typescript": "^5.5.4" } } \ No newline at end of file diff --git a/code_examples/sdk_examples/src/getFunds.ts b/code_examples/sdk_examples/src/getFunds.ts index ef3e49cc9..b15c07e7d 100644 --- a/code_examples/sdk_examples/src/getFunds.ts +++ b/code_examples/sdk_examples/src/getFunds.ts @@ -1,68 +1,27 @@ import * as Kilt from '@kiltprotocol/sdk-js' +import { BalanceUtils, Blockchain } from '@kiltprotocol/chain-helpers' +import type { + KiltAddress, + MultibaseKeyPair, + TransactionSigner +} from '@kiltprotocol/types' +import { Multikey } from '@kiltprotocol/utils' import { BN } from '@polkadot/util' -import { setTimeout } from 'timers/promises' - -async function failproofSubmit( - tx: Kilt.SubmittableExtrinsic, - submitter: Kilt.KeyringPair -) { - try { - await Kilt.Blockchain.signAndSubmitTx(tx, submitter) - } catch { - // Try a second time after a small delay and fetching the right nonce. - const waitingTime = 12_000 // 12 seconds - console.log( - `First submission failed for workshop. Waiting ${waitingTime} ms before retrying.` - ) - await setTimeout(waitingTime) - console.log('Retrying...') - // nonce: -1 tells the client to fetch the latest nonce by also checking the tx pool. - const resignedBatchTx = await tx.signAsync(submitter, { nonce: -1 }) - await Kilt.Blockchain.submitSignedTx(resignedBatchTx) - } -} +// TODO: Look into tidier way with PD Keyring… export async function getFunds( - faucetAccount: Kilt.KeyringPair, - recipient: Kilt.KiltAddress, + faucetAccount: MultibaseKeyPair, + recipient: MultibaseKeyPair, kiltAmount: number ) { - const api = Kilt.ConfigService.get('api') - const tx = api.tx.balances.transfer( - recipient, - Kilt.BalanceUtils.convertToTxUnit(new BN(kiltAmount), 0) - ) - await failproofSubmit(tx, faucetAccount) - console.log('Successfully transferred tokens') -} + const api = Kilt.ConfigService.get("api") -export async function endowAccounts( - faucetAccount: Kilt.KeyringPair, - destinationAccounts: Kilt.KiltAddress[], - amount: BN -): Promise { - const api = Kilt.ConfigService.get('api') - - const transferBatch = destinationAccounts.map((acc) => - api.tx.balances.transfer( - acc, - Kilt.BalanceUtils.convertToTxUnit( - Kilt.BalanceUtils.KILT_COIN.mul(amount), - 0 - ) - ) - ) - - console.log( - `Endowing test accounts "${destinationAccounts}" - from faucet "${faucetAccount.address}" - with ${Kilt.BalanceUtils.formatKiltBalance(amount, { - decimals: 0 - })} each...` + const tx = api.tx.balances.transferAllowDeath( + Multikey.decodeMultibaseKeypair(recipient).publicKey, + BalanceUtils.convertToTxUnit(new BN(kiltAmount), 0) ) - const batchTx = api.tx.utility.batchAll(transferBatch) - - await failproofSubmit(batchTx, faucetAccount) - - console.log('Successfully transferred tokens') + const [faucetSigner] = await Kilt.getSignersForKeypair({ + keypair: faucetAccount + }) + await Blockchain.signAndSubmitTx(tx, faucetSigner) } diff --git a/code_examples/sdk_examples/src/workshop/holder/createClaim.ts b/code_examples/sdk_examples/src/workshop/holder/createClaim.ts deleted file mode 100644 index fce9b1243..000000000 --- a/code_examples/sdk_examples/src/workshop/holder/createClaim.ts +++ /dev/null @@ -1,12 +0,0 @@ -import * as Kilt from '@kiltprotocol/sdk-js' - -// Create a Claim object from light DID, CType and given content. -export function createClaim( - lightDid: Kilt.DidUri, - ctype: Kilt.ICType, - content: Kilt.IClaim['contents'] -): Kilt.IClaim { - const claim = Kilt.Claim.fromCTypeAndClaimContents(ctype, content, lightDid) - - return claim -} diff --git a/code_examples/sdk_examples/src/workshop/holder/createPresentation.ts b/code_examples/sdk_examples/src/workshop/holder/createPresentation.ts deleted file mode 100644 index 3c7001321..000000000 --- a/code_examples/sdk_examples/src/workshop/holder/createPresentation.ts +++ /dev/null @@ -1,14 +0,0 @@ -import * as Kilt from '@kiltprotocol/sdk-js' - -export async function createPresentation( - credential: Kilt.ICredential, - signCallback: Kilt.SignCallback, - challenge?: string -): Promise { - // Create the presentation from credential, DID and challenge. - return Kilt.Credential.createPresentation({ - credential, - signCallback, - challenge - }) -} diff --git a/code_examples/sdk_examples/src/workshop/holder/generateAccount.ts b/code_examples/sdk_examples/src/workshop/holder/generateAccount.ts deleted file mode 100644 index c1f48261b..000000000 --- a/code_examples/sdk_examples/src/workshop/holder/generateAccount.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { mnemonicGenerate } from '@polkadot/util-crypto' - -import * as Kilt from '@kiltprotocol/sdk-js' - -export function generateAccount(mnemonic = mnemonicGenerate()): { - account: Kilt.KiltKeyringPair - mnemonic: string -} { - const keyring = new Kilt.Utils.Keyring({ - ss58Format: 38, - type: 'sr25519' - }) - return { - account: keyring.addFromMnemonic(mnemonic) as Kilt.KiltKeyringPair, - mnemonic - } -} diff --git a/code_examples/sdk_examples/src/workshop/holder/generateCredential.ts b/code_examples/sdk_examples/src/workshop/holder/generateCredential.ts deleted file mode 100644 index 7ca17d86d..000000000 --- a/code_examples/sdk_examples/src/workshop/holder/generateCredential.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { config as envConfig } from 'dotenv' - -import * as Kilt from '@kiltprotocol/sdk-js' - -import { createClaim } from './createClaim' -import { generateLightDid } from './generateLightDid' -import { getCtypeSchema } from '../issuer/ctypeSchema' - -export function generateCredential( - claimerDid: Kilt.DidUri, - claimAttributes: Kilt.IClaim['contents'] -): Kilt.ICredential { - // Create claim. - const ctype = getCtypeSchema() - const claim = createClaim(claimerDid, ctype, claimAttributes) - - // Create credential and request attestation. - console.log('Claimer -> create request') - return Kilt.Credential.fromClaim(claim) -} - -// Don't execute if this is imported by another file. -if (require.main === module) { - ;(async () => { - envConfig() - - try { - await Kilt.init() - - const claimerDidMnemonic = process.env.CLAIMER_DID_MNEMONIC as string - const claimerDid = generateLightDid(claimerDidMnemonic) - - const request = generateCredential(claimerDid.uri, { - age: 28, - name: 'Max Mustermann' - }) - console.log( - '⚠️ save this to ./claimer/_credential.json for testing ⚠️\n\n' - ) - console.log(JSON.stringify(request, null, 2)) - } catch (e) { - console.log('Error while building credential') - throw e - } - })() -} diff --git a/code_examples/sdk_examples/src/workshop/holder/generateKeypairs.ts b/code_examples/sdk_examples/src/workshop/holder/generateKeypairs.ts deleted file mode 100644 index 7f3068459..000000000 --- a/code_examples/sdk_examples/src/workshop/holder/generateKeypairs.ts +++ /dev/null @@ -1,15 +0,0 @@ -import * as Kilt from '@kiltprotocol/sdk-js' -import { mnemonicGenerate } from '@polkadot/util-crypto' - -export function generateKeypairs(mnemonic = mnemonicGenerate()) { - const authentication = Kilt.Utils.Crypto.makeKeypairFromUri(mnemonic) - - const keyAgreement = Kilt.Utils.Crypto.makeEncryptionKeypairFromSeed( - Kilt.Utils.Crypto.mnemonicToMiniSecret(mnemonic) - ) - - return { - authentication: authentication, - keyAgreement: keyAgreement - } -} diff --git a/code_examples/sdk_examples/src/workshop/holder/generateLightDid.ts b/code_examples/sdk_examples/src/workshop/holder/generateLightDid.ts deleted file mode 100644 index f0dff4dda..000000000 --- a/code_examples/sdk_examples/src/workshop/holder/generateLightDid.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { config as envConfig } from 'dotenv' - -import { mnemonicGenerate } from '@polkadot/util-crypto' - -import * as Kilt from '@kiltprotocol/sdk-js' - -import { generateKeypairs } from './generateKeypairs' - -export function generateLightDid(mnemonic: string): Kilt.DidDocument { - const { authentication, keyAgreement } = generateKeypairs(mnemonic) - return Kilt.Did.createLightDidDocument({ - authentication: [authentication as Kilt.NewLightDidVerificationKey], - keyAgreement: [keyAgreement] - }) -} - -// Don't execute if this is imported by another file. -if (require.main === module) { - ;(async () => { - envConfig() - - try { - await Kilt.init() - - const mnemonic = mnemonicGenerate() - console.log('\nsave following to .env to continue\n') - console.log(`CLAIMER_DID_MNEMONIC="${mnemonic}"`) - } catch (e) { - console.log('Error while setting up claimer DID') - throw e - } - })() -} diff --git a/code_examples/sdk_examples/src/workshop/index.ts b/code_examples/sdk_examples/src/workshop/index.ts index abed0da4a..8ac1f21d9 100644 --- a/code_examples/sdk_examples/src/workshop/index.ts +++ b/code_examples/sdk_examples/src/workshop/index.ts @@ -1,70 +1,453 @@ -import * as Kilt from '@kiltprotocol/sdk-js' +/** + * Copyright (c) 2018-2024, BOTLabs GmbH. + * + * This source code is licensed under the BSD 4-Clause "Original" license + * found in the LICENSE file in the root directory of this source tree. + */ -import { attestingFlow } from './issuer/issueCredential' -import { createFullDid } from './issuer/generateDid' -import { ensureStoredCtype } from './issuer/generateCtype' -import { generateAccount } from './issuer/generateAccount' -import { generateKeypairs as generateAttesterKeypairs } from './issuer/generateKeypairs' -import { generateKeypairs as generateClaimerKeypairs } from './holder/generateKeypairs' -import { generateCredential } from './holder/generateCredential' -import { generateLightDid } from './holder/generateLightDid' +import type { + KiltAddress, + SignerInterface, + KeyringPair, + MultibaseKeyPair, + TransactionSigner, + ICType +} from '@kiltprotocol/types' +import { Keyring } from '@polkadot/keyring' +import { BN } from '@polkadot/util' +import * as Kilt from '@kiltprotocol/sdk-js' +import { Multikey } from '@kiltprotocol/utils' +import { Blockchain, BalanceUtils } from '@kiltprotocol/chain-helpers' +import { CType } from '@kiltprotocol/credentials' +// TODO: Look into tidier way with PD Keyring… import { getFunds } from '../getFunds' -import { verificationFlow } from './verify' +// import { releaseWeb3Name } from '../core_features/web3names/04_release' + +export function generateAccounts() { + const issuerAccount = Kilt.generateKeypair({ type: 'ed25519' }) + const submitterAccount = Kilt.generateKeypair({ type: 'ed25519' }) + const holderAccount = Kilt.generateKeypair({ type: 'ed25519' }) + + console.log('keypair generation complete') + console.log(`ISSUER_ACCOUNT_ADDRESS=${issuerAccount}`) + console.log(`SUBMITTER_ACCOUNT_ADDRESS=${submitterAccount}`) + console.log(`HOLDER_ACCOUNT_ADDRESS=${holderAccount}`) + + return { issuerAccount, submitterAccount, holderAccount } +} -export async function testWorkshop( - account: Kilt.KeyringPair, - wssAddress: string +export async function generateIssuerDid( + submitterAccount, + authenticationKeyPair ) { - console.log('Running the workshop!') + const api = Kilt.ConfigService.get('api') + const transactionHandler = Kilt.DidHelpers.createDid({ + api, + signers: [authenticationKeyPair], + submitter: submitterAccount, + fromPublicKey: authenticationKeyPair.publicKeyMultibase + }) + + const didDocumentTransactionResult = await transactionHandler.submit() + + if (didDocumentTransactionResult.status !== 'confirmed') { + console.log(didDocumentTransactionResult.status) + throw new Error('create DID failed') + } + + let { didDocument, signers } = didDocumentTransactionResult.asConfirmed + console.log(`ISSUER_DID_URI=${didDocument}`) + // TODO: Don't need to pass signers? but explain that it's more flexible in real use + return { didDocument, signers } +} + +export async function generateHolderDid( + submitterAccount, + authenticationKeyPair +) { + const api = Kilt.ConfigService.get('api') + + const transactionHandler = Kilt.DidHelpers.createDid({ + api, + signers: [authenticationKeyPair], + submitter: submitterAccount, + fromPublicKey: authenticationKeyPair.publicKeyMultibase + }) + + const didDocumentTransactionResult = await transactionHandler.submit() + + if (didDocumentTransactionResult.status !== 'confirmed') { + console.log(didDocumentTransactionResult.status) + throw new Error('create DID failed') + } + + let { didDocument, signers } = didDocumentTransactionResult.asConfirmed + console.log(`HOLDER_DID_URI=${didDocument}`) + // TODO: Don't need to pass signers? but explain that it's more flexible in real use + return { didDocument, signers } +} + + +export async function generateVerifierDid( + submitterAccount, + authenticationKeyPair +) { + const api = Kilt.ConfigService.get('api') + + const transactionHandler = Kilt.DidHelpers.createDid({ + api, + signers: [authenticationKeyPair], + submitter: submitterAccount, + fromPublicKey: authenticationKeyPair.publicKeyMultibase + }) + + const didDocumentTransactionResult = await transactionHandler.submit() + + if (didDocumentTransactionResult.status !== 'confirmed') { + console.log(didDocumentTransactionResult.status) + throw new Error('create DID failed') + } - Kilt.ConfigService.set({ submitTxResolveOn: Kilt.Blockchain.IS_IN_BLOCK }) - await Kilt.connect(wssAddress) + let { didDocument, signers } = didDocumentTransactionResult.asConfirmed + // TODO: Don't need to pass signers? but explain that it's more flexible in real use + return { didDocument, signers } +} - // Setup attester account. - const { account: attesterAccount } = await generateAccount() - // Setup claimer & create a credential. - const claimerMnemonic = Kilt.Utils.Crypto.mnemonicGenerate() - const { authentication } = generateClaimerKeypairs(claimerMnemonic) - const lightDid = generateLightDid(claimerMnemonic) +export async function verifyDid(submitterAccount, didDocument, signers) { + // TODO: DID verify step currently. What step? + // ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ + // ┃ Create Verification Method ┃ + // ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ + // + // - `DidHelpers` include a function to add a verification methods. + // Similar to `createDid`, setting a verification method requires some parameters. + // + // - `didDocument` is the latest state of the DID Document that shall be updated. + // - `signers` includes all the keypairs included in the DID documents and necessary for the + // specified operation, in this case, the keypair of the authentication key, which is necessary to + // allow updates to the DID Document. + // - `publicKey` is the key used for the verification method. + // + // Note: setting a verification method will remove any existing method for the specified relationship. + const api = Kilt.ConfigService.get('api') - generateCredential(lightDid.uri, { - age: 27, - name: 'Karl' + // TODO: use mnemonic here. + const assertionKeyPair = Kilt.generateKeypair({ + type: 'sr25519' }) + // Add another key, public in this case + const vmTransactionResult = await Kilt.DidHelpers.setVerificationMethod({ + api, + didDocument, + signers: [...signers, assertionKeyPair], + submitter: submitterAccount, + publicKey: assertionKeyPair.publicKeyMultibase, + relationship: 'assertionMethod' + }).submit() + + if (vmTransactionResult.status !== 'confirmed') { + throw new Error('add verification method failed') + } + ;({ didDocument, signers } = vmTransactionResult.asConfirmed) + + console.log('assertion method added') + return { didDocument, signers } +} +//Issuer +// add into tutorial. Actually does it make sense? +export async function claimWeb3Name(submitterAccount, didDocument, signers) { + // ┏━━━━━━━━━━━━━━━━━┓ + // ┃ Claim web3name ┃ + // ┗━━━━━━━━━━━━━━━━━┛ + const api = Kilt.ConfigService.get('api') + + const claimW3nTransactionResult = await Kilt.DidHelpers.claimWeb3Name({ + api, + didDocument, + submitter: submitterAccount, + signers, + name: 'testtest7865348' + }).submit() - await getFunds(account, attesterAccount.address, 5) + if (claimW3nTransactionResult.status !== 'confirmed') { + throw new Error('claim web3name failed') + } - // Create attester DID & ensure CType. - const { fullDid: attesterDid } = await createFullDid(attesterAccount) - const { assertionMethod } = generateAttesterKeypairs() + // The didDocument now contains an `alsoKnownAs` entry. + ;({ didDocument } = claimW3nTransactionResult.asConfirmed) + console.log('w3n claimed') + return { didDocument, signers } +} - await ensureStoredCtype( - attesterAccount, - attesterDid.uri, - async ({ data }) => ({ - signature: assertionMethod.sign(data), - keyType: assertionMethod.type - }) +// Issuer +export async function issueCredential(didDocument, signers, submitterAccount) { + const passportCType = await CType.fetchFromChain( + 'kilt:ctype:0x5f6634bc0edf08ced5fc7a7bec24a2019228570b912703c834955e0d00f69bf4' ) - // Do attestation & verification. - const credential = await attestingFlow( - lightDid.uri, - attesterAccount, - attesterDid.uri, - async ({ data }) => ({ - signature: assertionMethod.sign(data), - keyType: assertionMethod.type - }) + const passportCredential = await Kilt.Issuer.createCredential({ + issuer: didDocument.id, + credentialSubject: { + id: didDocument.id, + age: 22, + }, + cType: passportCType.cType + }) + + const credential = await Kilt.Issuer.issue({ + credential: passportCredential, + issuer: { + didDocument, + signers: [...signers, submitterAccount], + submitter: submitterAccount + } + }) + + console.log('credential issued') + return credential +} + +export async function createPresentation(credential, didDocument, signers) { + // ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ + // ┃ Create a Presentation ┃ + // ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ + // + // Create a derived credential (a copy) that only contains selected properties (selective disclosure), then create a credential presentation for it. + // The presentation includes a proof of ownership and is scoped to a verified and time frame to prevent unauthorized re-use. + // Not on chain + // TODO: Why DID then? Because credential is attactached to a DID + const derived = await Kilt.Holder.deriveProof({ + credential, + // Change + proofOptions: { includeClaims: ['/credentialSubject/age'] } + }) + + const presentation = await Kilt.Holder.createPresentation({ + credentials: [derived], + holder: { + didDocument, + signers + }, + presentationOptions: { + verifier: didDocument.id, + validUntil: new Date(Date.now() + 100_000) + } + }) + + console.log('presentation created') + return presentation +} + +export async function verifyPresentation(presentation, didDocument) { + const { verified, error } = await Kilt.Verifier.verifyPresentation({ + presentation, + verificationCriteria: { + verifier: didDocument.id, + proofPurpose: 'authentication', + domain: 'example.com' + } + }) + + if (verified !== true) { + throw new Error(`failed to verify credential: ${JSON.stringify(error)}`) + } + + console.log('presentation verified') +} + +export async function removeVerificationMethod( + didDocument, + submitterAccount, + signers +) { + // More for internal tests, not part of workshop, links + // TODO: Need more now to tear down all created assets + // ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ + // ┃ Remove a Verification Method ┃ + // ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ + // + // Removing a verification method can be done by specifying its id. + // + // Note: + // - The provided `didDocument` must include the specified verification method. + // - The authentication verification method can not be removed. + const api = Kilt.ConfigService.get('api') + + const removeVmTransactionResult = + await Kilt.DidHelpers.removeVerificationMethod({ + api, + didDocument, + signers, + submitter: submitterAccount, + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + verificationMethodId: didDocument.assertionMethod![0], + relationship: 'assertionMethod' + }).submit() + + if (removeVmTransactionResult.status !== 'confirmed') { + throw new Error('remove verification method failed') + } + ;({ didDocument } = removeVmTransactionResult.asConfirmed) + + console.log('assertion method removed') +} + +export async function releaseWeb3Name(didDocument, submitterAccount, signers) { + // ┏━━━━━━━━━━━━━━━━━━┓ + // ┃ Release web3name ┃ + // ┗━━━━━━━━━━━━━━━━━━┛ + // + // A web3name can be released from a DID and potentially claimed by another DID. + const api = Kilt.ConfigService.get('api') + + const releaseW3nTransactionResult = await Kilt.DidHelpers.releaseWeb3Name({ + api, + didDocument, + submitter: submitterAccount, + signers + }).submit() + + if (releaseW3nTransactionResult.status !== 'confirmed') { + throw new Error('release web3name failed') + } + ;({ didDocument } = releaseW3nTransactionResult.asConfirmed) + + console.log('w3n released') +} + +export async function removeService(didDocument, submitterAccount, signers) { + // ┏━━━━━━━━━━━━━━━━━━┓ + // ┃ Remove a service ┃ + // ┗━━━━━━━━━━━━━━━━━━┛ + // + // Services can be removed by specifying the service `id` + const api = Kilt.ConfigService.get('api') + + const removeServiceTransactionResult = await Kilt.DidHelpers.removeService({ + api, + submitter: submitterAccount, + signers, + didDocument, + id: '#my_service' + }).submit() + + if (removeServiceTransactionResult.status !== 'confirmed') { + throw new Error('remove service failed') + } + ;({ didDocument } = removeServiceTransactionResult.asConfirmed) + + console.log('service removed') +} + +export async function deactivateDid(didDocument, submitterAccount, signers) { + // ┏━━━━━━━━━━━━━━━━━━┓ + // ┃ Deactivate a DID ┃ + // ┗━━━━━━━━━━━━━━━━━━┛ + // + // _Permanently_ deactivate the DID, removing all verification methods and services from its document. + // Deactivating a DID cannot be undone, once a DID has been deactivated, all operations on it (including attempts at re-creation) are permanently disabled. + const api = Kilt.ConfigService.get('api') + + const deactivateDidTransactionResult = await Kilt.DidHelpers.deactivateDid({ + api, + submitter: submitterAccount, + signers, + didDocument + }).submit() + + if (deactivateDidTransactionResult.status !== 'confirmed') { + throw new Error('deactivate DID failed') + } + ;({ didDocument } = deactivateDidTransactionResult.asConfirmed) + + if (Array.isArray(didDocument.verificationMethod)) { + throw new Error('Did not deactivated') + } + + console.log('Did deactivated') +} + +export async function runAll() { + // Setup code + const api = await Kilt.connect( + process.env.WSS_ADDRESS || 'wss://peregrine.kilt.io' + ) + console.log('connected') + + const faucetAccount = Kilt.generateKeypair({ + type: 'sr25519', + seed: '0xe566550fec3ca23d80dfe9e9529ada463b93fc33f17219c1089de906f7253f1c' + }) + + const { issuerAccount, submitterAccount, holderAccount } = generateAccounts() +const verifierAccount = generateAccounts() + + // ┏━━━━━━━━━━━━┓ + // ┃ Get funds ┃ + // ┗━━━━━━━━━━━━┛ + // + + await getFunds(faucetAccount, submitterAccount, 5) + console.log('Successfully transferred tokens') + let issuerDid = await generateIssuerDid(submitterAccount, issuerAccount) + + let holderDid = await generateHolderDid(submitterAccount, holderAccount) + + let verifierDid = await generateVerifierDid(submitterAccount, verifierAccount) + + issuerDid = await verifyDid( + submitterAccount, + issuerDid.didDocument, + issuerDid.signers ) - await verificationFlow( + issuerDid = await claimWeb3Name( + submitterAccount, + issuerDid, + issuerDid.signers + ) + const credential = await issueCredential( + issuerDid.didDocument, + issuerDid.signers, + submitterAccount + ) + const presentation = await createPresentation( credential, - async ({ data }) => ({ - signature: authentication.sign(data), - keyType: authentication.type, - keyUri: `${lightDid.uri}${lightDid.authentication[0].id}` - }), - [attesterDid.uri] + holderDid.didDocument, + holderDid.signers + ) + await verifyPresentation(presentation, verifierDid.didDocument) + + await removeVerificationMethod( + issuerDid.didDocument, + submitterAccount, + issuerDid.signers + ) + await releaseWeb3Name( + issuerDid.didDocument, + submitterAccount, + issuerDid.signers + ) + await removeService( + issuerDid.didDocument, + submitterAccount, + issuerDid.signers ) + await deactivateDid( + issuerDid.didDocument, + submitterAccount, + holderDid.signers + ) + await deactivateDid( + holderDid.didDocument, + submitterAccount, + holderDid.signers + ) + + // Release the connection to the blockchain. + await api.disconnect() + + console.log('disconnected') } + +runAll() diff --git a/code_examples/sdk_examples/src/workshop/issuer/ctypeSchema.ts b/code_examples/sdk_examples/src/workshop/issuer/ctypeSchema.ts deleted file mode 100644 index 71fdc236b..000000000 --- a/code_examples/sdk_examples/src/workshop/issuer/ctypeSchema.ts +++ /dev/null @@ -1,13 +0,0 @@ -import * as Kilt from '@kiltprotocol/sdk-js' - -// Return CType with the properties matching a given schema. -export function getCtypeSchema(): Kilt.ICType { - return Kilt.CType.fromProperties('Drivers License', { - name: { - type: 'string' - }, - age: { - type: 'integer' - } - }) -} diff --git a/code_examples/sdk_examples/src/workshop/issuer/generateAccount.ts b/code_examples/sdk_examples/src/workshop/issuer/generateAccount.ts deleted file mode 100644 index 74e647445..000000000 --- a/code_examples/sdk_examples/src/workshop/issuer/generateAccount.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { config as envConfig } from 'dotenv' - -import * as Kilt from '@kiltprotocol/sdk-js' - -export function generateAccount( - mnemonic = Kilt.Utils.Crypto.mnemonicGenerate() -): { - account: Kilt.KiltKeyringPair & { type: 'ed25519' } - mnemonic: string -} { - return { - account: Kilt.Utils.Crypto.makeKeypairFromUri(mnemonic), - mnemonic - } -} - -// Don't execute if this is imported by another file. -if (require.main === module) { - ;(async () => { - envConfig() - - try { - await Kilt.init() - - const { mnemonic, account } = generateAccount() - console.log('save to mnemonic and address to .env to continue!\n\n') - console.log(`ATTESTER_ACCOUNT_MNEMONIC="${mnemonic}"`) - console.log(`ATTESTER_ACCOUNT_ADDRESS="${account.address}"\n\n`) - } catch (e) { - console.log('Error while setting up attester account') - throw e - } - })() -} diff --git a/code_examples/sdk_examples/src/workshop/issuer/generateCtype.ts b/code_examples/sdk_examples/src/workshop/issuer/generateCtype.ts deleted file mode 100644 index b72850944..000000000 --- a/code_examples/sdk_examples/src/workshop/issuer/generateCtype.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { config as envConfig } from 'dotenv' - -import * as Kilt from '@kiltprotocol/sdk-js' - -import { generateAccount } from './generateAccount' -import { generateKeypairs } from './generateKeypairs' -import { getCtypeSchema } from './ctypeSchema' - -export async function ensureStoredCtype( - attesterAccount: Kilt.KiltKeyringPair, - attesterDid: Kilt.DidUri, - signCallback: Kilt.SignExtrinsicCallback -): Promise { - const api = Kilt.ConfigService.get('api') - - // Get the CTYPE and see if it's stored, if yes return it. - const ctype = getCtypeSchema() - try { - await Kilt.CType.verifyStored(ctype) - console.log('Ctype already stored. Skipping creation') - return ctype - } catch { - console.log('Ctype not present. Creating it now...') - // Authorize the tx. - const encodedCtype = Kilt.CType.toChain(ctype) - const tx = api.tx.ctype.add(encodedCtype) - const extrinsic = await Kilt.Did.authorizeTx( - attesterDid, - tx, - signCallback, - attesterAccount.address - ) - - // Write to chain then return the CType. - await Kilt.Blockchain.signAndSubmitTx(extrinsic, attesterAccount) - - return ctype - } -} - -// Don't execute if this is imported by another file. -if (require.main === module) { - ;(async () => { - envConfig() - - try { - await Kilt.connect(process.env.WSS_ADDRESS as string) - - const accountMnemonic = process.env.ATTESTER_ACCOUNT_MNEMONIC as string - const { account } = generateAccount(accountMnemonic) - - const didMnemonic = process.env.ATTESTER_DID_MNEMONIC as string - const { authentication, assertionMethod } = generateKeypairs(didMnemonic) - const attesterDidUri = Kilt.Did.getFullDidUriFromKey(authentication) - - const newCType = await ensureStoredCtype( - account, - attesterDidUri, - async ({ data }) => ({ - signature: assertionMethod.sign(data), - keyType: assertionMethod.type - }) - ) - - console.log( - `your ctype was succsesfully created\n\n${JSON.stringify( - newCType, - null, - 2 - )}` - ) - } catch (e) { - console.log('Error while checking on chain ctype') - throw e - } - })() -} diff --git a/code_examples/sdk_examples/src/workshop/issuer/generateDid.ts b/code_examples/sdk_examples/src/workshop/issuer/generateDid.ts deleted file mode 100644 index 54557bcef..000000000 --- a/code_examples/sdk_examples/src/workshop/issuer/generateDid.ts +++ /dev/null @@ -1,60 +0,0 @@ -import * as Kilt from '@kiltprotocol/sdk-js' -import { config as envConfig } from 'dotenv' -import { generateAccount } from './generateAccount' - -export async function createFullDid( - creatorAccount: Kilt.KiltKeyringPair & { - type: 'ed25519' | 'sr25519' | 'ecdsa' - } -): Promise<{ - fullDid: Kilt.DidDocument -}> { - const api = Kilt.ConfigService.get('api') - - const verificationMethod = Kilt.Did.publicKeyToChain(creatorAccount) - - const txs = [ - api.tx.did.createFromAccount(verificationMethod), - api.tx.did.dispatchAs( - creatorAccount.address, - api.tx.did.setAttestationKey(verificationMethod) - ) - ] - - console.log('Creating DID from account…') - await Kilt.Blockchain.signAndSubmitTx( - api.tx.utility.batch(txs), - creatorAccount - ) - const didUri = Kilt.Did.getFullDidUriFromKey(creatorAccount) - const encodedFullDid = await api.call.did.query(Kilt.Did.toChain(didUri)) - const { document: didDocument } = Kilt.Did.linkedInfoFromChain(encodedFullDid) - - if (!didDocument) { - throw new Error('Full DID was not successfully created.') - } - - return { fullDid: didDocument } -} - -// Don't execute if this is imported by another file. -if (require.main === module) { - ;(async () => { - envConfig() - - try { - await Kilt.connect(process.env.WSS_ADDRESS as string) - - // Load attester account - const accountMnemonic = process.env.ATTESTER_ACCOUNT_MNEMONIC as string - const { account } = generateAccount(accountMnemonic) - const { fullDid } = await createFullDid(account) - - console.log('\nsave following to .env to continue\n') - console.error(`ATTESTER_DID_URI="${fullDid.uri}"\n`) - } catch (e) { - console.log('Error while creating attester DID') - throw e - } - })() -} diff --git a/code_examples/sdk_examples/src/workshop/issuer/generateKeypairs.ts b/code_examples/sdk_examples/src/workshop/issuer/generateKeypairs.ts deleted file mode 100644 index d2ace38cf..000000000 --- a/code_examples/sdk_examples/src/workshop/issuer/generateKeypairs.ts +++ /dev/null @@ -1,27 +0,0 @@ -import * as Kilt from '@kiltprotocol/sdk-js' - -import { mnemonicGenerate } from '@polkadot/util-crypto' - -export function generateKeypairs(mnemonic = mnemonicGenerate()): { - authentication: Kilt.KiltKeyringPair - keyAgreement: Kilt.KiltEncryptionKeypair - assertionMethod: Kilt.KiltKeyringPair - capabilityDelegation: Kilt.KiltKeyringPair -} { - const authentication = Kilt.Utils.Crypto.makeKeypairFromUri(mnemonic) - - const assertionMethod = Kilt.Utils.Crypto.makeKeypairFromUri(mnemonic) - - const capabilityDelegation = Kilt.Utils.Crypto.makeKeypairFromUri(mnemonic) - - const keyAgreement = Kilt.Utils.Crypto.makeEncryptionKeypairFromSeed( - Kilt.Utils.Crypto.mnemonicToMiniSecret(mnemonic) - ) - - return { - authentication: authentication, - keyAgreement: keyAgreement, - assertionMethod: assertionMethod, - capabilityDelegation: capabilityDelegation - } -} diff --git a/code_examples/sdk_examples/src/workshop/issuer/issueCredential.ts b/code_examples/sdk_examples/src/workshop/issuer/issueCredential.ts deleted file mode 100644 index 96ca1e72b..000000000 --- a/code_examples/sdk_examples/src/workshop/issuer/issueCredential.ts +++ /dev/null @@ -1,93 +0,0 @@ -import { config as envConfig } from 'dotenv' - -import * as Kilt from '@kiltprotocol/sdk-js' - -import { generateAccount } from './generateAccount' -import { generateCredential } from '../holder/generateCredential' -import { generateKeypairs } from './generateKeypairs' -import { generateLightDid } from '../holder/generateLightDid' - -export async function attestCredential( - attesterAccount: Kilt.KiltKeyringPair, - attesterDid: Kilt.DidUri, - credential: Kilt.ICredential -): Promise { - const api = Kilt.ConfigService.get('api') - - // Get CType and root hash from the provided credential. - const { cTypeHash, claimHash } = Kilt.Attestation.fromCredentialAndDid( - credential, - attesterDid - ) - - // Create the tx and authorize it. - const tx = api.tx.attestation.add(claimHash, cTypeHash, null) - const extrinsic = api.tx.did.dispatchAs(attesterAccount.address, tx) - - // Submit the tx to write the attestation to the chain. - console.log('Attester -> create attestation...') - await Kilt.Blockchain.signAndSubmitTx(extrinsic, attesterAccount) -} - -export async function attestingFlow( - claimerDid: Kilt.DidUri, - attesterAccount: Kilt.KiltKeyringPair, - attesterDid: Kilt.DidUri, - // eslint-disable-next-line @typescript-eslint/no-unused-vars - signCallback: Kilt.SignExtrinsicCallback -): Promise { - // First the claimer. - const credential = generateCredential(claimerDid, { - age: 27, - name: 'Mia Musterfrau' - }) - - // ... send the request to the attester - - // The attester checks the attributes and attests the provided credential. - await attestCredential(attesterAccount, attesterDid, credential) - - // Return the generated credential. - return credential -} - -// Don't execute if this is imported by another file. -if (require.main === module) { - ;(async () => { - envConfig() - - try { - await Kilt.connect(process.env.WSS_ADDRESS as string) - - const attesterAccountMnemonic = process.env - .ATTESTER_ACCOUNT_MNEMONIC as string - const { account: attesterAccount } = generateAccount( - attesterAccountMnemonic - ) - - const attesterDidMnemonic = process.env.ATTESTER_DID_MNEMONIC as string - const { authentication, assertionMethod } = - generateKeypairs(attesterDidMnemonic) - const attesterDidUri = Kilt.Did.getFullDidUriFromKey(authentication) - - const claimerDidMnemonic = process.env.CLAIMER_DID_MNEMONIC as string - const claimerDid = await generateLightDid(claimerDidMnemonic) - - const credential = await attestingFlow( - claimerDid.uri, - attesterAccount, - attesterDidUri, - async ({ data }) => ({ - signature: assertionMethod.sign(data), - keyType: assertionMethod.type - }) - ) - console.log('The claimer build their credential and now has to store it.') - console.log('Add the following to your .env file. ') - console.log(`CLAIMER_CREDENTIAL='${JSON.stringify(credential)}'`) - } catch (e) { - console.log('Error while going throw attesting workflow') - throw e - } - })() -} diff --git a/code_examples/sdk_examples/src/workshop/verifier.ts b/code_examples/sdk_examples/src/workshop/verifier.ts new file mode 100644 index 000000000..e69de29bb diff --git a/code_examples/sdk_examples/src/workshop/verify.ts b/code_examples/sdk_examples/src/workshop/verify.ts deleted file mode 100644 index b3c2db90c..000000000 --- a/code_examples/sdk_examples/src/workshop/verify.ts +++ /dev/null @@ -1,93 +0,0 @@ -import { config as envConfig } from 'dotenv' - -import * as Kilt from '@kiltprotocol/sdk-js' - -import { createPresentation } from './holder/createPresentation' -import { generateKeypairs } from './holder/generateKeypairs' -import { generateLightDid } from './holder/generateLightDid' - -function getChallenge(): string { - return Kilt.Utils.UUID.generate() -} - -// Verifies validity, ownership & attestation. -async function verifyPresentation( - presentation: Kilt.ICredentialPresentation, - challenge: string, - trustedAttesterUris: Kilt.DidUri[] -): Promise { - Kilt.ConfigService.get('api') - - try { - const { revoked, attester } = await Kilt.Credential.verifyPresentation( - presentation, - { challenge } - ) - - if (revoked) { - return false - } - // Returns true if no trusted attester URI is provided or, if it is, if it matches the one that issued the presented credential. - return trustedAttesterUris.includes(attester) - } catch { - return false - } -} - -export async function verificationFlow( - credential: Kilt.ICredential, - signCallback: Kilt.SignCallback, - trustedAttesterUris: Kilt.DidUri[] = [] -) { - // Verifier sends a unique challenge to the claimer 🕊 - const challenge = getChallenge() - - // Create a presentation and send it to the verifier 🕊 - const presentation = await createPresentation( - credential, - signCallback, - challenge - ) - - // The verifier checks the presentation. - const isValid = await verifyPresentation( - presentation, - challenge, - trustedAttesterUris - ) - - if (isValid) { - console.log('Verification successful! You are allowed to enter the club 🎉') - } else { - console.log('Verification failed! 🚫') - } -} - -// Don't execute if this is imported by another file. -if (require.main === module) { - ;(async () => { - envConfig() - - try { - await Kilt.connect(process.env.WSS_ADDRESS as string) - const claimerDidMnemonic = process.env.CLAIMER_DID_MNEMONIC as string - const { authentication } = generateKeypairs(claimerDidMnemonic) - const claimerDid = generateLightDid(claimerDidMnemonic) - const attesterDid = process.env.ATTESTER_DID_URI as Kilt.DidUri - // Load credential and claimer DID - const credential = JSON.parse(process.env.CLAIMER_CREDENTIAL as string) - await verificationFlow( - credential, - async ({ data }) => ({ - signature: authentication.sign(data), - keyType: authentication.type, - keyUri: `${claimerDid.uri}${claimerDid.authentication[0].id}` - }), - [attesterDid] - ) - } catch (e) { - console.log('Error in the verification flow') - throw e - } - })() -} diff --git a/code_examples/sdk_examples/yarn.lock b/code_examples/sdk_examples/yarn.lock index b3cfbb277..a7d4a5794 100644 --- a/code_examples/sdk_examples/yarn.lock +++ b/code_examples/sdk_examples/yarn.lock @@ -3,9 +3,9 @@ "@adraffy/ens-normalize@^1.8.8": - version "1.10.1" - resolved "https://registry.yarnpkg.com/@adraffy/ens-normalize/-/ens-normalize-1.10.1.tgz#63430d04bd8c5e74f8d7d049338f1cd9d4f02069" - integrity sha512-96Z2IP3mYmF1Xg2cDm8f1gWGf/HUVedQ3FMifV4kG/PQ4yEP51xDtRAEfhVNt5f/uzpNkZHwWQuUcu6D6K+Ekw== + version "1.11.0" + resolved "https://registry.yarnpkg.com/@adraffy/ens-normalize/-/ens-normalize-1.11.0.tgz#42cc67c5baa407ac25059fcd7d405cc5ecdb0c33" + integrity sha512-/3DDPKHqqIqxUULp8yP4zODUY1i+2xvVWsv8A79xGWdCAG+8sb0hRh0Rk2QyOJUnnbyPUAZYcpBuRe3nS2OIUg== "@babel/code-frame@7.12.11": version "7.12.11" @@ -36,37 +36,73 @@ dependencies: "@jridgewell/trace-mapping" "0.3.9" -"@eslint-community/eslint-utils@^4.2.0": +"@digitalbazaar/multikey-context@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@digitalbazaar/multikey-context/-/multikey-context-2.0.1.tgz#80714c799f1ce6d64f35b38bae10897c66534202" + integrity sha512-fHuaJNWpHLZH20GQemS+iPUn7/GuZ62UGhpmD9aZuKvN62lrPTeBK1V6C1BvfdIIWRsCqa1CUda+PDZa6d6X1A== + +"@digitalbazaar/security-context@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@digitalbazaar/security-context/-/security-context-1.0.1.tgz#badc4b8da03411a32d4e7321ce7c4b355776b410" + integrity sha512-0WZa6tPiTZZF8leBtQgYAfXQePFQp2z5ivpCEN/iZguYYZ0TB9qRmWtan5XH6mNFuusHtMcyIzAcReyE6rZPhA== + +"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": version "4.4.0" resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== dependencies: eslint-visitor-keys "^3.3.0" -"@eslint-community/regexpp@^4.4.0", "@eslint-community/regexpp@^4.6.1": - version "4.11.0" - resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.11.0.tgz#b0ffd0312b4a3fd2d6f77237e7248a5ad3a680ae" - integrity sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A== +"@eslint-community/regexpp@^4.10.0", "@eslint-community/regexpp@^4.11.0": + version "4.11.1" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.11.1.tgz#a547badfc719eb3e5f4b556325e542fbe9d7a18f" + integrity sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q== -"@eslint/eslintrc@^2.1.4": - version "2.1.4" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.4.tgz#388a269f0f25c1b6adc317b5a2c55714894c70ad" - integrity sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ== +"@eslint/config-array@^0.18.0": + version "0.18.0" + resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.18.0.tgz#37d8fe656e0d5e3dbaea7758ea56540867fd074d" + integrity sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw== + dependencies: + "@eslint/object-schema" "^2.1.4" + debug "^4.3.1" + minimatch "^3.1.2" + +"@eslint/core@^0.6.0": + version "0.6.0" + resolved "https://registry.yarnpkg.com/@eslint/core/-/core-0.6.0.tgz#9930b5ba24c406d67a1760e94cdbac616a6eb674" + integrity sha512-8I2Q8ykA4J0x0o7cg67FPVnehcqWTBehu/lmY+bolPFHGjh49YzGBMXTvpqVgEbBdvNCSxj6iFgiIyHzf03lzg== + +"@eslint/eslintrc@^3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-3.1.0.tgz#dbd3482bfd91efa663cbe7aa1f506839868207b6" + integrity sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ== dependencies: ajv "^6.12.4" debug "^4.3.2" - espree "^9.6.0" - globals "^13.19.0" + espree "^10.0.1" + globals "^14.0.0" ignore "^5.2.0" import-fresh "^3.2.1" js-yaml "^4.1.0" minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@8.57.0": - version "8.57.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.0.tgz#a5417ae8427873f1dd08b70b3574b453e67b5f7f" - integrity sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g== +"@eslint/js@9.11.1": + version "9.11.1" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.11.1.tgz#8bcb37436f9854b3d9a561440daf916acd940986" + integrity sha512-/qu+TWz8WwPWc7/HcIJKi+c+MOm46GdVaSlTTQcaqaL53+GsoA6MxWp5PtTx48qbSP7ylM1Kn7nhvkugfJvRSA== + +"@eslint/object-schema@^2.1.4": + version "2.1.4" + resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.4.tgz#9e69f8bb4031e11df79e03db09f9dbbae1740843" + integrity sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ== + +"@eslint/plugin-kit@^0.2.0": + version "0.2.0" + resolved "https://registry.yarnpkg.com/@eslint/plugin-kit/-/plugin-kit-0.2.0.tgz#8712dccae365d24e9eeecb7b346f85e750ba343d" + integrity sha512-vH9PiIMMwvhCx31Af3HiGzsVNULDbyVkHXwlemn/B0TFj/00ho3y55efXrUZTfQipxoHC5u4xq6zblww1zm1Ig== + dependencies: + levn "^0.4.1" "@ethereumjs/rlp@^4.0.1": version "4.0.1" @@ -78,24 +114,15 @@ resolved "https://registry.yarnpkg.com/@ethereumjs/rlp/-/rlp-5.0.2.tgz#c89bd82f2f3bec248ab2d517ae25f5bbc4aac842" integrity sha512-DziebCdg4JpGlEqEdGgXmjqcFoJi+JGulUXwEjsZGAscAQ7MyD/7LE/GVCP29vEQxKc7AAwjT3A2ywHp2xfoCA== -"@humanwhocodes/config-array@^0.11.14": - version "0.11.14" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.14.tgz#d78e481a039f7566ecc9660b4ea7fe6b1fec442b" - integrity sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg== - dependencies: - "@humanwhocodes/object-schema" "^2.0.2" - debug "^4.3.1" - minimatch "^3.0.5" - "@humanwhocodes/module-importer@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== -"@humanwhocodes/object-schema@^2.0.2": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz#4a2868d75d6d6963e423bcf90b7fd1be343409d3" - integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA== +"@humanwhocodes/retry@^0.3.0": + version "0.3.0" + resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.3.0.tgz#6d86b8cb322660f03d3f0aa94b99bdd8e172d570" + integrity sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew== "@jridgewell/resolve-uri@^3.0.3": version "3.1.2" @@ -115,129 +142,135 @@ "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" -"@kiltprotocol/asset-did@0.35.0": - version "0.35.0" - resolved "https://registry.yarnpkg.com/@kiltprotocol/asset-did/-/asset-did-0.35.0.tgz#ca01e327993ac58ea968439c4b511c887b113f77" - integrity sha512-72JA/RX+snTzEH4IequM4xK3bOqmFees90d2d6FqMzgtK2TMsTew4U4CwpffzQwBlhGMV6awN6KNyQJTMOjsXA== +"@kiltprotocol/chain-helpers@0.100.0", "@kiltprotocol/chain-helpers@^0.100.0": + version "0.100.0" + resolved "https://registry.yarnpkg.com/@kiltprotocol/chain-helpers/-/chain-helpers-0.100.0.tgz#80384d19dbed765896606e99314c3299583b93b5" + integrity sha512-94s7IoEsM24K8kWUzaWdziPso0l28vTrAQZeZnLaM2jlA/FTbKCBJ9A6lW4o4LAiaRs0uPfPVMdZN0qlFH2oZQ== dependencies: - "@kiltprotocol/types" "0.35.0" - "@kiltprotocol/utils" "0.35.0" + "@kiltprotocol/config" "0.100.0" + "@kiltprotocol/types" "0.100.0" + "@kiltprotocol/utils" "0.100.0" -"@kiltprotocol/augment-api@0.35.0": - version "0.35.0" - resolved "https://registry.yarnpkg.com/@kiltprotocol/augment-api/-/augment-api-0.35.0.tgz#9a51f55a83853490a0a5164037e432ede632e8d4" - integrity sha512-yjpUkuBzTfrLQyjDF1cxQP1+kH++Yxkv5Tq143RuPDYDclsdBDZ87vp7Dc0x9odbFDiZ9FaHq4rE/1391AHtSw== +"@kiltprotocol/config@0.100.0": + version "0.100.0" + resolved "https://registry.yarnpkg.com/@kiltprotocol/config/-/config-0.100.0.tgz#4dcb7290de0b79f7c3346cf8a6f1026aadf7743a" + integrity sha512-ukF0GJ5IfwCsb4+Uocy0sChhNGpq2m6T8D2l9VWzIs2DvrzLeOfl6Cfb7r/FiBCXpO1KvBirKO/BJEjCUDyx7Q== dependencies: - "@kiltprotocol/type-definitions" "0.35.0" + "@kiltprotocol/types" "0.100.0" + typescript-logging "^1.0.0" -"@kiltprotocol/chain-helpers@0.35.0": - version "0.35.0" - resolved "https://registry.yarnpkg.com/@kiltprotocol/chain-helpers/-/chain-helpers-0.35.0.tgz#db7863b0356a98adb143273ee65f21f8d903b88f" - integrity sha512-iAIFWO+0wAySz9Ew0dKvwnSMPYgDaMzwJCvUxcQmpsadWiBD74m/yxJn7ef5hwVpIaIIVwGy4w4oYYCd8+avcg== +"@kiltprotocol/credentials@0.100.0", "@kiltprotocol/credentials@^0.100.0": + version "0.100.0" + resolved "https://registry.yarnpkg.com/@kiltprotocol/credentials/-/credentials-0.100.0.tgz#444dcab99b4ef00085d3e2db76a5756ab9f0a315" + integrity sha512-6hvglfMhnejaYU8FKHqejgtVTYHCHUYqK5SQ3uf7+SPpGkDrkbCtGuxsuOypcFNy0T7sLPY9HTeNRbKerd1M2A== + dependencies: + "@kiltprotocol/chain-helpers" "0.100.0" + "@kiltprotocol/config" "0.100.0" + "@kiltprotocol/did" "0.100.0" + "@kiltprotocol/eddsa-jcs-2022" "^0.1.0" + "@kiltprotocol/es256k-jcs-2023" "^0.1.0" + "@kiltprotocol/jcs-data-integrity-proofs-common" "^0.1.0" + "@kiltprotocol/sr25519-jcs-2023" "^0.1.0" + "@kiltprotocol/types" "0.100.0" + "@kiltprotocol/utils" "0.100.0" + "@scure/base" "^1.1.0" + json-pointer "^0.6.2" + +"@kiltprotocol/did@0.100.0": + version "0.100.0" + resolved "https://registry.yarnpkg.com/@kiltprotocol/did/-/did-0.100.0.tgz#186c7f39fa45e6a7087e8df828ad434f65320ab7" + integrity sha512-jtFIqs+2LV1CUiIDlS6LqFQWXJz2FBTu2GE9YcIil9eZBUOLfGeagUgOp9ASZEmGXDEFI0Bf9nCu8wQtEfMpNg== + dependencies: + "@digitalbazaar/multikey-context" "^2.0.1" + "@digitalbazaar/security-context" "^1.0.1" + "@kiltprotocol/config" "0.100.0" + "@kiltprotocol/types" "0.100.0" + "@kiltprotocol/utils" "0.100.0" + +"@kiltprotocol/eddsa-jcs-2022@^0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@kiltprotocol/eddsa-jcs-2022/-/eddsa-jcs-2022-0.1.0.tgz#603b1e88bf3c303e1e33395a8893c816bf4d79ba" + integrity sha512-bZbpg+UWkifflmagFEz2dYRIKKHepBvTbIfSSkx2kaTuJZcKC8LYxmNn5kwXMk1nNh04FbuPBakVMoFsALRQlw== dependencies: - "@kiltprotocol/config" "0.35.0" - "@kiltprotocol/types" "0.35.0" - "@kiltprotocol/utils" "0.35.0" - "@polkadot/api" "^10.7.3" - "@polkadot/types" "^10.7.3" + "@kiltprotocol/jcs-data-integrity-proofs-common" "^0.1.0" + "@noble/curves" "^1.0.0" + "@scure/base" "^1.1.1" -"@kiltprotocol/config@0.35.0": - version "0.35.0" - resolved "https://registry.yarnpkg.com/@kiltprotocol/config/-/config-0.35.0.tgz#ca78f435be629d62f7b103336464bbaa6cfbe2b2" - integrity sha512-LSM9a42NzJQTuaIllD9H6JVkveSpgGdxcL3NFvTipynQLVX4rNhwVyHGMgh8f1CTNqAGaJwd/3e+9vosmu0LQg== +"@kiltprotocol/es256k-jcs-2023@^0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@kiltprotocol/es256k-jcs-2023/-/es256k-jcs-2023-0.1.0.tgz#88c977d3ee9cd0c45187b11c4eda967f11597de7" + integrity sha512-Af76NmbhG8WWEdn2XjOFrCrvp6AILczf35QFb2818ewjoSRkVSN8Drm1ofG2CabtpjGENR6Kf6LN43S9GNkoow== dependencies: - "@kiltprotocol/types" "0.35.0" - "@polkadot/api" "^10.7.3" - typescript-logging "^1.0.0" + "@kiltprotocol/jcs-data-integrity-proofs-common" "^0.1.0" + "@noble/curves" "^1.0.0" + "@scure/base" "^1.1.1" -"@kiltprotocol/core@0.35.0": - version "0.35.0" - resolved "https://registry.yarnpkg.com/@kiltprotocol/core/-/core-0.35.0.tgz#fe523a329d3d1d3edf93977c893af7b5f78dd652" - integrity sha512-ifsLQzYROFtuoUDGl8ma2vsR6DuiQrSZZE25YZxxxGuMuNFzJh4xpFTUhF92H6SUzHF4+FVgtuBNLFNP65JfvQ== - dependencies: - "@kiltprotocol/asset-did" "0.35.0" - "@kiltprotocol/augment-api" "0.35.0" - "@kiltprotocol/chain-helpers" "0.35.0" - "@kiltprotocol/config" "0.35.0" - "@kiltprotocol/did" "0.35.0" - "@kiltprotocol/type-definitions" "0.35.0" - "@kiltprotocol/types" "0.35.0" - "@kiltprotocol/utils" "0.35.0" - "@polkadot/api" "^10.7.3" - "@polkadot/keyring" "^12.0.0" - "@polkadot/types" "^10.7.3" - "@polkadot/util" "^12.0.0" - "@polkadot/util-crypto" "^12.0.0" - -"@kiltprotocol/did@0.35.0": - version "0.35.0" - resolved "https://registry.yarnpkg.com/@kiltprotocol/did/-/did-0.35.0.tgz#e3f1aeddedae12799169f09e4cd8bf51e216f0d9" - integrity sha512-kBlBJLffnyvZPcm7j9ZDUyDWV7EiocifCgWp8Pq/8UNjrgTlKbroP0jd/AvEL8o8/Q1N1g91qooms/qFjk2r2A== - dependencies: - "@kiltprotocol/augment-api" "0.35.0" - "@kiltprotocol/config" "0.35.0" - "@kiltprotocol/types" "0.35.0" - "@kiltprotocol/utils" "0.35.0" - "@polkadot/api" "^10.7.3" - "@polkadot/keyring" "^12.0.0" - "@polkadot/types" "^10.7.3" - "@polkadot/types-codec" "^10.7.3" - "@polkadot/util" "^12.0.0" - "@polkadot/util-crypto" "^12.0.0" - -"@kiltprotocol/messaging@0.35.0": - version "0.35.0" - resolved "https://registry.yarnpkg.com/@kiltprotocol/messaging/-/messaging-0.35.0.tgz#9789e4b213df2938c3f2af8fd4d5a38d6a6a44c8" - integrity sha512-Pa910KWNEFgll7IYZaDhNr5mUccxPyGKLgjLLMiR2XJg+j//cOlkVMFQD/qlnW9NrnHwzuaW6juX9RloyGl/LQ== - dependencies: - "@kiltprotocol/core" "0.35.0" - "@kiltprotocol/did" "0.35.0" - "@kiltprotocol/types" "0.35.0" - "@kiltprotocol/utils" "0.35.0" - "@polkadot/util" "^12.0.0" - -"@kiltprotocol/sdk-js@0.35.0": - version "0.35.0" - resolved "https://registry.yarnpkg.com/@kiltprotocol/sdk-js/-/sdk-js-0.35.0.tgz#1bc3236893fee5600ab9e077cd10ea9d22c3188c" - integrity sha512-ENySAfZ9aB/AyqJovtyMFpADXIBYYX1ki4y6VS4fnjCh63+wcVSFlCOljw8YF8SOniUVCF/UHt2+TwZJYY22CQ== - dependencies: - "@kiltprotocol/chain-helpers" "0.35.0" - "@kiltprotocol/config" "0.35.0" - "@kiltprotocol/core" "0.35.0" - "@kiltprotocol/did" "0.35.0" - "@kiltprotocol/messaging" "0.35.0" - "@kiltprotocol/types" "0.35.0" - "@kiltprotocol/utils" "0.35.0" - -"@kiltprotocol/type-definitions@0.35.0": - version "0.35.0" - resolved "https://registry.yarnpkg.com/@kiltprotocol/type-definitions/-/type-definitions-0.35.0.tgz#365aa633ba0d08983068ad2f01bb2d65455d8b8c" - integrity sha512-Dm6qL3qp8Tb05mIQi7Ez/niQe31Yn3RQxNIbUdHWDTVaeNe664ftJtfwWgOekh1MTVmSjim93UE0djxWSIqXPQ== - -"@kiltprotocol/types@0.35.0": - version "0.35.0" - resolved "https://registry.yarnpkg.com/@kiltprotocol/types/-/types-0.35.0.tgz#c38ce3719a13086489e8fa1ddff44279f1ed06d5" - integrity sha512-uqIQifoCUtlFxnl39vL1MVIj0XuJf23hfKxhiNBvSpEA3tMvXdIm8QjPuMAaadKJhtcEv2aRwNJv1+Au64eNjQ== - dependencies: - "@polkadot/api" "^10.7.3" - "@polkadot/keyring" "^12.0.0" - "@polkadot/types" "^10.7.3" - "@polkadot/util" "^12.0.0" - "@polkadot/util-crypto" "^12.0.0" - -"@kiltprotocol/utils@0.35.0": - version "0.35.0" - resolved "https://registry.yarnpkg.com/@kiltprotocol/utils/-/utils-0.35.0.tgz#d855cc684f5fefaba0a0e39d63186470991396d8" - integrity sha512-G8a0bdKssPHXLlNyY75rKn1EivxvCRNatfYcoF5hR3lCaHpw25fAUN9NN58w77P7OM8gcWLziui1x8UPfSBx5A== - dependencies: - "@kiltprotocol/types" "0.35.0" - "@polkadot/api" "^10.7.3" - "@polkadot/keyring" "^12.0.0" - "@polkadot/util" "^12.0.0" - "@polkadot/util-crypto" "^12.0.0" +"@kiltprotocol/jcs-data-integrity-proofs-common@^0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@kiltprotocol/jcs-data-integrity-proofs-common/-/jcs-data-integrity-proofs-common-0.1.0.tgz#6793e488c54218ac6d21c8bb550d7bef92655f8d" + integrity sha512-9/OKYCwb1dJevExNwkVjEiICz2c8a2JwrVQ3tI8tlylOhcS9c267Z4+k+aSMEr0S7KcnEsBS3SscndBwIsNDRg== + dependencies: + "@noble/hashes" "^1.3.0" + canonicalize "^2.0.0" + varint "^6.0.0" + +"@kiltprotocol/sdk-js@1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@kiltprotocol/sdk-js/-/sdk-js-1.0.0.tgz#5e50a6729f94c286b22e75a0c3bd73e8a3d794f3" + integrity sha512-vheWLv9I+7gW4UvJwr06Ks0ZtllLYvvmHNpZ/LQS//pZp+dRRkEQEZZ9z2L9JYWL4/E5IcUhl5FSeujlrPFqcg== + dependencies: + "@kiltprotocol/chain-helpers" "0.100.0" + "@kiltprotocol/config" "0.100.0" + "@kiltprotocol/credentials" "0.100.0" + "@kiltprotocol/did" "0.100.0" + "@kiltprotocol/type-definitions" "^1.11200.0" + "@kiltprotocol/utils" "0.100.0" + "@polkadot/api" "^12.0.0" + "@polkadot/keyring" "^13.0.0" + "@polkadot/types" "^12.0.0" + "@polkadot/util" "^13.0.0" + "@polkadot/util-crypto" "^13.0.0" + +"@kiltprotocol/sr25519-jcs-2023@^0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@kiltprotocol/sr25519-jcs-2023/-/sr25519-jcs-2023-0.1.0.tgz#276e13679afd7040199a652d4766940c4c560e36" + integrity sha512-NRM5EXm3jY6PZbsTZT97hPp3Zv1svDMesXaaue81g65AoThbvn58dQT4IqbCrNsSRtRri8pkeBExirSMp5IxIA== + dependencies: + "@kiltprotocol/jcs-data-integrity-proofs-common" "^0.1.0" + "@polkadot/util-crypto" "^13.0.2" + "@scure/base" "^1.1.1" + +"@kiltprotocol/type-definitions@^1.11200.0": + version "1.11401.0" + resolved "https://registry.yarnpkg.com/@kiltprotocol/type-definitions/-/type-definitions-1.11401.0.tgz#c4dcfa01d0d3e3cc225c3f270155da84211f9234" + integrity sha512-ZwlxpLa/U88Wq2m4K5R3uHAnwCwtw6SiMM793Z0wkLLWyHMkL6SxoXkjOezRcESoCwwp27onCHdqE55nZf2oOQ== + +"@kiltprotocol/types@0.100.0", "@kiltprotocol/types@^0.100.0": + version "0.100.0" + resolved "https://registry.yarnpkg.com/@kiltprotocol/types/-/types-0.100.0.tgz#b1f276423821a68a612d01b27e39b376b51c5fcf" + integrity sha512-H8UttvTfL+Lt7a+sJTcOBiE7nV2lu66pmUmHE8LyWsqaUVJGrkRxDTP415EzPl+W4TUKy2YIV9hh/WXKAqzFfQ== + dependencies: + "@polkadot/api" "^12.0.0" + "@polkadot/keyring" "^13.0.0" + "@polkadot/types" "^12.0.0" + "@polkadot/util" "^13.0.0" + "@polkadot/util-crypto" "^13.0.0" + +"@kiltprotocol/utils@0.100.0", "@kiltprotocol/utils@^0.100.0": + version "0.100.0" + resolved "https://registry.yarnpkg.com/@kiltprotocol/utils/-/utils-0.100.0.tgz#ddb105afe937aa618817aa331d310abdf2234fb1" + integrity sha512-NCvZZIYYsWRyiN3swSzzMzicBIYld6IuPFzio8nVW31t1bgPtRGPJ7QnQOHkN37wSCIjZP+eIFBUiEZdLrTUpg== + dependencies: + "@kiltprotocol/eddsa-jcs-2022" "^0.1.0" + "@kiltprotocol/es256k-jcs-2023" "^0.1.0" + "@kiltprotocol/jcs-data-integrity-proofs-common" "^0.1.0" + "@kiltprotocol/sr25519-jcs-2023" "^0.1.0" + "@kiltprotocol/types" "0.100.0" + "@scure/base" "^1.1.0" cbor-web "^9.0.0" tweetnacl "^1.0.3" - uuid "^9.0.0" + uuid "^10.0.0" + varint "^6.0.0" "@noble/curves@1.4.2", "@noble/curves@~1.4.0": version "1.4.2" @@ -246,7 +279,7 @@ dependencies: "@noble/hashes" "1.4.0" -"@noble/curves@^1.3.0": +"@noble/curves@^1.0.0", "@noble/curves@^1.3.0": version "1.6.0" resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.6.0.tgz#be5296ebcd5a1730fccea4786d420f87abfeb40b" integrity sha512-TlaHRXDehJuRNR9TfZDNQ45mMEd5dwUwmicsafcIX4SsNiqnCHKjE/1alYPd/lDRVhxdhUAlv8uEhMCI5zjIJQ== @@ -258,7 +291,7 @@ resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.4.0.tgz#45814aa329f30e4fe0ba49426f49dfccdd066426" integrity sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg== -"@noble/hashes@1.5.0", "@noble/hashes@^1.3.1", "@noble/hashes@^1.3.3": +"@noble/hashes@1.5.0", "@noble/hashes@^1.3.0", "@noble/hashes@^1.3.1", "@noble/hashes@^1.3.3": version "1.5.0" resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.5.0.tgz#abadc5ca20332db2b1b2aa3e496e9af1213570b0" integrity sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA== @@ -289,268 +322,270 @@ resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.1.1.tgz#1ec17e2edbec25c8306d424ecfbf13c7de1aaa31" integrity sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA== -"@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@12.4.2": + version "12.4.2" + resolved "https://registry.yarnpkg.com/@polkadot/api-augment/-/api-augment-12.4.2.tgz#6c52a6d04f398e786a834839948b0bc0069b391c" + integrity sha512-BkG2tQpUUO0iUm65nSqP8hwHkNfN8jQw8apqflJNt9H8EkEL6v7sqwbLvGqtlxM9wzdxbg7lrWp3oHg4rOP31g== + dependencies: + "@polkadot/api-base" "12.4.2" + "@polkadot/rpc-augment" "12.4.2" + "@polkadot/types" "12.4.2" + "@polkadot/types-augment" "12.4.2" + "@polkadot/types-codec" "12.4.2" + "@polkadot/util" "^13.0.2" + tslib "^2.6.3" + +"@polkadot/api-base@12.4.2": + version "12.4.2" + resolved "https://registry.yarnpkg.com/@polkadot/api-base/-/api-base-12.4.2.tgz#c8312bae8dfc70c0fdec0c1366e405906e66575f" + integrity sha512-XYI7Po8i6C4lYZah7Xo0v7zOAawBUfkmtx0YxsLY/665Sup8oqzEj666xtV9qjBzR9coNhQonIFOn+9fh27Ncw== + dependencies: + "@polkadot/rpc-core" "12.4.2" + "@polkadot/types" "12.4.2" + "@polkadot/util" "^13.0.2" rxjs "^7.8.1" - tslib "^2.6.2" - -"@polkadot/api@10.13.1", "@polkadot/api@^10.7.3": - 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.6.3" + +"@polkadot/api-derive@12.4.2": + version "12.4.2" + resolved "https://registry.yarnpkg.com/@polkadot/api-derive/-/api-derive-12.4.2.tgz#2a1fbd79ff4842edc20378957374000ca6f7bd70" + integrity sha512-R0AMANEnqs5AiTaiQX2FXCxUlOibeDSgqlkyG1/0KDsdr6PO/l3dJOgEO+grgAwh4hdqzk4I9uQpdKxG83f2Gw== + dependencies: + "@polkadot/api" "12.4.2" + "@polkadot/api-augment" "12.4.2" + "@polkadot/api-base" "12.4.2" + "@polkadot/rpc-core" "12.4.2" + "@polkadot/types" "12.4.2" + "@polkadot/types-codec" "12.4.2" + "@polkadot/util" "^13.0.2" + "@polkadot/util-crypto" "^13.0.2" + rxjs "^7.8.1" + tslib "^2.6.3" + +"@polkadot/api@12.4.2", "@polkadot/api@^12.0.0": + version "12.4.2" + resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-12.4.2.tgz#c13dc1ad7fab670c5fd6d8d970a8462b999d7c1d" + integrity sha512-e1KS048471iBWZU10TJNEYOZqLO+8h8ajmVqpaIBOVkamN7tmacBxmHgq0+IA8VrGxjxtYNa1xF5Sqrg76uBEg== + dependencies: + "@polkadot/api-augment" "12.4.2" + "@polkadot/api-base" "12.4.2" + "@polkadot/api-derive" "12.4.2" + "@polkadot/keyring" "^13.0.2" + "@polkadot/rpc-augment" "12.4.2" + "@polkadot/rpc-core" "12.4.2" + "@polkadot/rpc-provider" "12.4.2" + "@polkadot/types" "12.4.2" + "@polkadot/types-augment" "12.4.2" + "@polkadot/types-codec" "12.4.2" + "@polkadot/types-create" "12.4.2" + "@polkadot/types-known" "12.4.2" + "@polkadot/util" "^13.0.2" + "@polkadot/util-crypto" "^13.0.2" eventemitter3 "^5.0.1" rxjs "^7.8.1" - tslib "^2.6.2" - -"@polkadot/keyring@^12.0.0", "@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.6.3" + +"@polkadot/keyring@^13.0.0", "@polkadot/keyring@^13.0.2": + 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.0.2": + 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@12.4.2": + version "12.4.2" + resolved "https://registry.yarnpkg.com/@polkadot/rpc-augment/-/rpc-augment-12.4.2.tgz#fbe310260f3e5159fc2fa924c1a7c52f69162f9c" + integrity sha512-IEco5pnso+fYkZNMlMAN5i4XAxdXPv0PZ0HNuWlCwF/MmRvWl8pq5JFtY1FiByHEbeuHwMIUhHM5SDKQ85q9Hg== + dependencies: + "@polkadot/rpc-core" "12.4.2" + "@polkadot/types" "12.4.2" + "@polkadot/types-codec" "12.4.2" + "@polkadot/util" "^13.0.2" + tslib "^2.6.3" + +"@polkadot/rpc-core@12.4.2": + version "12.4.2" + resolved "https://registry.yarnpkg.com/@polkadot/rpc-core/-/rpc-core-12.4.2.tgz#d20cfdadd932978d58037a213115844a0c49464b" + integrity sha512-yaveqxNcmyluyNgsBT5tpnCa/md0CGbOtRK7K82LWsz7gsbh0x80GBbJrQGxsUybg1gPeZbO1q9IigwA6fY8ag== + dependencies: + "@polkadot/rpc-augment" "12.4.2" + "@polkadot/rpc-provider" "12.4.2" + "@polkadot/types" "12.4.2" + "@polkadot/util" "^13.0.2" 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.6.3" + +"@polkadot/rpc-provider@12.4.2": + version "12.4.2" + resolved "https://registry.yarnpkg.com/@polkadot/rpc-provider/-/rpc-provider-12.4.2.tgz#c6a4f9b9194a5227e4355cef026aac2b07430162" + integrity sha512-cAhfN937INyxwW1AdjABySdCKhC7QCIONRDHDea1aLpiuxq/w+QwjxauR9fCNGh3lTaAwwnmZ5WfFU2PtkDMGQ== + dependencies: + "@polkadot/keyring" "^13.0.2" + "@polkadot/types" "12.4.2" + "@polkadot/types-support" "12.4.2" + "@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" + nock "^13.5.4" + tslib "^2.6.3" 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", "@polkadot/types-codec@^10.7.3": - 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", "@polkadot/types@^10.4.0", "@polkadot/types@^10.7.3": - 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@12.4.2": + version "12.4.2" + resolved "https://registry.yarnpkg.com/@polkadot/types-augment/-/types-augment-12.4.2.tgz#8b8e278f4cbecbdd586470d31c27576e06e87074" + integrity sha512-3fDCOy2BEMuAtMYl4crKg76bv/0pDNEuzpAzV4EBUMIlJwypmjy5sg3gUPCMcA+ckX3xb8DhkWU4ceUdS7T2KQ== + dependencies: + "@polkadot/types" "12.4.2" + "@polkadot/types-codec" "12.4.2" + "@polkadot/util" "^13.0.2" + tslib "^2.6.3" + +"@polkadot/types-codec@12.4.2": + version "12.4.2" + resolved "https://registry.yarnpkg.com/@polkadot/types-codec/-/types-codec-12.4.2.tgz#aa601ddbbe4bb28ef751e4565bd87037dee9a49b" + integrity sha512-DiPGRFWtVMepD9i05eC3orSbGtpN7un/pXOrXu0oriU+oxLkpvZH68ZsPNtJhKdQy03cAYtvB8elJOFJZYqoqQ== + dependencies: + "@polkadot/util" "^13.0.2" + "@polkadot/x-bigint" "^13.0.2" + tslib "^2.6.3" + +"@polkadot/types-create@12.4.2": + version "12.4.2" + resolved "https://registry.yarnpkg.com/@polkadot/types-create/-/types-create-12.4.2.tgz#1113746ab92694c3402abc59feb3e3fcaf980997" + integrity sha512-nOpeAKZLdSqNMfzS3waQXgyPPaNt8rUHEmR5+WNv6c/Ke/vyf710wjxiTewfp0wpBgtdrimlgG4DLX1J9Ms1LA== + dependencies: + "@polkadot/types-codec" "12.4.2" + "@polkadot/util" "^13.0.2" + tslib "^2.6.3" + +"@polkadot/types-known@12.4.2": + version "12.4.2" + resolved "https://registry.yarnpkg.com/@polkadot/types-known/-/types-known-12.4.2.tgz#c47ffac0a0bcc544e120f09e92f39e6f61ed94c8" + integrity sha512-bvhO4KQu/dgPmdwQXsweSMRiRisJ7Bp38lZVEIFykfd2qYyRW3OQEbIPKYpx9raD+fDATU0bTiKQnELrSGhYXw== + dependencies: + "@polkadot/networks" "^13.0.2" + "@polkadot/types" "12.4.2" + "@polkadot/types-codec" "12.4.2" + "@polkadot/types-create" "12.4.2" + "@polkadot/util" "^13.0.2" + tslib "^2.6.3" + +"@polkadot/types-support@12.4.2": + version "12.4.2" + resolved "https://registry.yarnpkg.com/@polkadot/types-support/-/types-support-12.4.2.tgz#22df5c22a002aca271507355123aeb68e1399c03" + integrity sha512-bz6JSt23UEZ2eXgN4ust6z5QF9pO5uNH7UzCP+8I/Nm85ZipeBYj2Wu6pLlE3Hw30hWZpuPxMDOKoEhN5bhLgw== + dependencies: + "@polkadot/util" "^13.0.2" + tslib "^2.6.3" + +"@polkadot/types@12.4.2", "@polkadot/types@^12.0.0", "@polkadot/types@^12.4.2": + version "12.4.2" + resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-12.4.2.tgz#948e0191b30c37f0d89b8e120174d6be31ed9f9d" + integrity sha512-ivYtt7hYcRvo69ULb1BJA9BE1uefijXcaR089Dzosr9+sMzvsB1yslNQReOq+Wzq6h6AQj4qex6qVqjWZE6Z4A== + dependencies: + "@polkadot/keyring" "^13.0.2" + "@polkadot/types-augment" "12.4.2" + "@polkadot/types-codec" "12.4.2" + "@polkadot/types-create" "12.4.2" + "@polkadot/util" "^13.0.2" + "@polkadot/util-crypto" "^13.0.2" rxjs "^7.8.1" - tslib "^2.6.2" + tslib "^2.6.3" -"@polkadot/util-crypto@12.6.2", "@polkadot/util-crypto@^12.0.0", "@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.0.0", "@polkadot/util-crypto@^13.0.2", "@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.0.0", "@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.0.0", "@polkadot/util@^13.0.2": + 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" @@ -605,72 +640,72 @@ 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.0.2": + 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.0.2": + 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.0.2": + 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.0.2": + 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" "@rtsao/scc@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@rtsao/scc/-/scc-1.1.0.tgz#927dd2fae9bc3361403ac2c7a00c32ddce9ad7e8" integrity sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g== -"@scure/base@^1.1.1", "@scure/base@^1.1.5", "@scure/base@~1.1.6": - version "1.1.8" - resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.8.tgz#8f23646c352f020c83bca750a82789e246d42b50" - integrity sha512-6CyAclxj3Nb0XT7GHK6K4zK6k2xJm6E4Ft0Ohjt4WgegiFUHEtFb2CGzmPmGBwoIhrLsqNLYfLr04Y1GePrzZg== +"@scure/base@^1.1.0", "@scure/base@^1.1.1", "@scure/base@^1.1.7", "@scure/base@~1.1.6": + version "1.1.9" + resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.9.tgz#e5e142fbbfe251091f9c5f1dd4c834ac04c3dbd1" + integrity sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg== "@scure/bip32@1.4.0": version "1.4.0" @@ -694,35 +729,35 @@ resolved "https://registry.yarnpkg.com/@substrate/connect-extension-protocol/-/connect-extension-protocol-2.1.0.tgz#7df153f704702b98559e7e5e8a2ce17881fe1d1d" integrity sha512-Wz5Cbn6S6P4vWfHyrsnPW7g15IAViMaXCk+jYkq4nNEMmzPtTKIEbtxrdDMBKrouOFtYKKp0znx5mh9KTCNqlA== -"@substrate/connect-known-chains@^1.1.1": - version "1.4.0" - resolved "https://registry.yarnpkg.com/@substrate/connect-known-chains/-/connect-known-chains-1.4.0.tgz#ee0562056cf98a3ee1103a64fa33ff21d86c69fd" - integrity sha512-p/mxn1GobtxJ+7xbIkUH4+/njH1neRHHKTcSGHNOC78Cf6Ch1Xzp082+nMjOBDLQLmraK5PF74AKV3WXHGuALw== +"@substrate/connect-known-chains@^1.1.5": + version "1.4.1" + resolved "https://registry.yarnpkg.com/@substrate/connect-known-chains/-/connect-known-chains-1.4.1.tgz#a8bb561c651cd2a44f1d3ad34facb0cc71249ca0" + integrity sha512-WlFKGEE3naIa7iTyy7hJ0RV0dyGpP7Zic1Z8sXr4bJmSEzZoHcfLRbM1D3T+zFAaitffVCu6k55Vj+CFzMPw1Q== -"@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": +"@substrate/ss58-registry@^1.50.0": version "1.50.0" resolved "https://registry.yarnpkg.com/@substrate/ss58-registry/-/ss58-registry-1.50.0.tgz#2d2a3d060cd4eadd200e4538078461ba73e13d6d" integrity sha512-mkmlMlcC+MSd9rA+PN8ljGAm5fVZskvVwkXIsbx4NFwaT8kt38r7e9cyDWscG3z2Zn40POviZvEMrJSk+r2SgQ== @@ -748,13 +783,18 @@ integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA== "@types/bn.js@^5.1.5": - version "5.1.5" - resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.5.tgz#2e0dacdcce2c0f16b905d20ff87aedbc6f7b4bf0" - integrity sha512-V46N0zwKRF5Q00AZ6hWtN0T8gGmDUaUzLWQvHFo5yThtVwK/VCenFY3wXVbOvNfajEpsTfQM4IN9k/d6gUVX3A== + version "5.1.6" + resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.6.tgz#9ba818eec0c85e4d3c679518428afdf611d03203" + integrity sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w== dependencies: "@types/node" "*" -"@types/json-schema@^7.0.9": +"@types/estree@^1.0.6": + version "1.0.6" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.6.tgz#628effeeae2064a1b4e79f78e81d87b7e5fc7b50" + integrity sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw== + +"@types/json-schema@^7.0.15": version "7.0.15" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== @@ -764,7 +804,7 @@ resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== -"@types/node-fetch@^2.6.6": +"@types/node-fetch@^2.6.11": version "2.6.11" resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.11.tgz#9b39b78665dae0e82a08f02f4967d62c66f95d24" integrity sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g== @@ -772,25 +812,13 @@ "@types/node" "*" form-data "^4.0.0" -"@types/node@*": - version "22.5.4" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.5.4.tgz#83f7d1f65bc2ed223bdbf57c7884f1d5a4fa84e8" - integrity sha512-FDuKUJQm/ju9fT/SeX/6+gBzoPzlVCzfzmGkwKvRHQVxi4BntVbyIwf6a4Xn62mrvndLiml6z/UBXIdEVjQLXg== - dependencies: - undici-types "~6.19.2" - -"@types/node@^20.8.6": - version "20.16.5" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.16.5.tgz#d43c7f973b32ffdf9aa7bd4f80e1072310fd7a53" - integrity sha512-VwYCweNo3ERajwy0IUlqqcyZ8/A7Zwa9ZP3MnENWcB11AejO+tLy3pu850goUW2FC/IJMdZUfKpX/yxL1gymCA== +"@types/node@*", "@types/node@^22.5.1": + version "22.6.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.6.1.tgz#e531a45f4d78f14a8468cb9cdc29dc9602afc7ac" + integrity sha512-V48tCfcKb/e6cVUigLAaJDAILdMP0fUW6BidkPK4GpGjXcfbnoHasCZDwz3N3yVt5we2RHm4XTQCpv0KJz9zqw== dependencies: undici-types "~6.19.2" -"@types/semver@^7.3.12": - version "7.5.8" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.8.tgz#8268a8c57a3e4abd25c165ecd36237db7948a55e" - integrity sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ== - "@types/ws@8.5.3": version "8.5.3" resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.3.tgz#7d25a1ffbecd3c4f2d35068d0b283c037003274d" @@ -798,130 +826,86 @@ dependencies: "@types/node" "*" -"@typescript-eslint/eslint-plugin@^5.36.0": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz#aeef0328d172b9e37d9bab6dbc13b87ed88977db" - integrity sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag== +"@typescript-eslint/eslint-plugin@^8.3.0": + version "8.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.7.0.tgz#d0070f206daad26253bf00ca5b80f9b54f9e2dd0" + integrity sha512-RIHOoznhA3CCfSTFiB6kBGLQtB/sox+pJ6jeFu6FxJvqL8qRxq/FfGO/UhsGgQM9oGdXkV4xUgli+dt26biB6A== dependencies: - "@eslint-community/regexpp" "^4.4.0" - "@typescript-eslint/scope-manager" "5.62.0" - "@typescript-eslint/type-utils" "5.62.0" - "@typescript-eslint/utils" "5.62.0" - debug "^4.3.4" + "@eslint-community/regexpp" "^4.10.0" + "@typescript-eslint/scope-manager" "8.7.0" + "@typescript-eslint/type-utils" "8.7.0" + "@typescript-eslint/utils" "8.7.0" + "@typescript-eslint/visitor-keys" "8.7.0" graphemer "^1.4.0" - ignore "^5.2.0" - natural-compare-lite "^1.4.0" - semver "^7.3.7" - tsutils "^3.21.0" - -"@typescript-eslint/parser@^6.8.0": - version "6.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.21.0.tgz#af8fcf66feee2edc86bc5d1cf45e33b0630bf35b" - integrity sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ== - dependencies: - "@typescript-eslint/scope-manager" "6.21.0" - "@typescript-eslint/types" "6.21.0" - "@typescript-eslint/typescript-estree" "6.21.0" - "@typescript-eslint/visitor-keys" "6.21.0" - debug "^4.3.4" + ignore "^5.3.1" + natural-compare "^1.4.0" + ts-api-utils "^1.3.0" -"@typescript-eslint/scope-manager@5.62.0": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz#d9457ccc6a0b8d6b37d0eb252a23022478c5460c" - integrity sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w== +"@typescript-eslint/parser@^8.3.0": + version "8.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.7.0.tgz#a567b0890d13db72c7348e1d88442ea8ab4e9173" + integrity sha512-lN0btVpj2unxHlNYLI//BQ7nzbMJYBVQX5+pbNXvGYazdlgYonMn4AhhHifQ+J4fGRYA/m1DjaQjx+fDetqBOQ== dependencies: - "@typescript-eslint/types" "5.62.0" - "@typescript-eslint/visitor-keys" "5.62.0" + "@typescript-eslint/scope-manager" "8.7.0" + "@typescript-eslint/types" "8.7.0" + "@typescript-eslint/typescript-estree" "8.7.0" + "@typescript-eslint/visitor-keys" "8.7.0" + debug "^4.3.4" -"@typescript-eslint/scope-manager@6.21.0": - version "6.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz#ea8a9bfc8f1504a6ac5d59a6df308d3a0630a2b1" - integrity sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg== +"@typescript-eslint/scope-manager@8.7.0": + version "8.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.7.0.tgz#90ee7bf9bc982b9260b93347c01a8bc2b595e0b8" + integrity sha512-87rC0k3ZlDOuz82zzXRtQ7Akv3GKhHs0ti4YcbAJtaomllXoSO8hi7Ix3ccEvCd824dy9aIX+j3d2UMAfCtVpg== dependencies: - "@typescript-eslint/types" "6.21.0" - "@typescript-eslint/visitor-keys" "6.21.0" + "@typescript-eslint/types" "8.7.0" + "@typescript-eslint/visitor-keys" "8.7.0" -"@typescript-eslint/type-utils@5.62.0": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz#286f0389c41681376cdad96b309cedd17d70346a" - integrity sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew== +"@typescript-eslint/type-utils@8.7.0": + version "8.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.7.0.tgz#d56b104183bdcffcc434a23d1ce26cde5e42df93" + integrity sha512-tl0N0Mj3hMSkEYhLkjREp54OSb/FI6qyCzfiiclvJvOqre6hsZTGSnHtmFLDU8TIM62G7ygEa1bI08lcuRwEnQ== dependencies: - "@typescript-eslint/typescript-estree" "5.62.0" - "@typescript-eslint/utils" "5.62.0" + "@typescript-eslint/typescript-estree" "8.7.0" + "@typescript-eslint/utils" "8.7.0" debug "^4.3.4" - tsutils "^3.21.0" + ts-api-utils "^1.3.0" -"@typescript-eslint/types@5.62.0": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f" - integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ== +"@typescript-eslint/types@8.7.0": + version "8.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.7.0.tgz#21d987201c07b69ce7ddc03451d7196e5445ad19" + integrity sha512-LLt4BLHFwSfASHSF2K29SZ+ZCsbQOM+LuarPjRUuHm+Qd09hSe3GCeaQbcCr+Mik+0QFRmep/FyZBO6fJ64U3w== -"@typescript-eslint/types@6.21.0": - version "6.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.21.0.tgz#205724c5123a8fef7ecd195075fa6e85bac3436d" - integrity sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg== - -"@typescript-eslint/typescript-estree@5.62.0": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz#7d17794b77fabcac615d6a48fb143330d962eb9b" - integrity sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA== +"@typescript-eslint/typescript-estree@8.7.0": + version "8.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.7.0.tgz#6c7db6baa4380b937fa81466c546d052f362d0e8" + integrity sha512-MC8nmcGHsmfAKxwnluTQpNqceniT8SteVwd2voYlmiSWGOtjvGXdPl17dYu2797GVscK30Z04WRM28CrKS9WOg== dependencies: - "@typescript-eslint/types" "5.62.0" - "@typescript-eslint/visitor-keys" "5.62.0" + "@typescript-eslint/types" "8.7.0" + "@typescript-eslint/visitor-keys" "8.7.0" debug "^4.3.4" - globby "^11.1.0" + fast-glob "^3.3.2" is-glob "^4.0.3" - semver "^7.3.7" - tsutils "^3.21.0" - -"@typescript-eslint/typescript-estree@6.21.0": - version "6.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz#c47ae7901db3b8bddc3ecd73daff2d0895688c46" - integrity sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ== - dependencies: - "@typescript-eslint/types" "6.21.0" - "@typescript-eslint/visitor-keys" "6.21.0" - debug "^4.3.4" - globby "^11.1.0" - is-glob "^4.0.3" - minimatch "9.0.3" - semver "^7.5.4" - ts-api-utils "^1.0.1" - -"@typescript-eslint/utils@5.62.0": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.62.0.tgz#141e809c71636e4a75daa39faed2fb5f4b10df86" - integrity sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ== - dependencies: - "@eslint-community/eslint-utils" "^4.2.0" - "@types/json-schema" "^7.0.9" - "@types/semver" "^7.3.12" - "@typescript-eslint/scope-manager" "5.62.0" - "@typescript-eslint/types" "5.62.0" - "@typescript-eslint/typescript-estree" "5.62.0" - eslint-scope "^5.1.1" - semver "^7.3.7" - -"@typescript-eslint/visitor-keys@5.62.0": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz#2174011917ce582875954ffe2f6912d5931e353e" - integrity sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw== - dependencies: - "@typescript-eslint/types" "5.62.0" - eslint-visitor-keys "^3.3.0" - -"@typescript-eslint/visitor-keys@6.21.0": - version "6.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz#87a99d077aa507e20e238b11d56cc26ade45fe47" - integrity sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A== - dependencies: - "@typescript-eslint/types" "6.21.0" - eslint-visitor-keys "^3.4.1" - -"@ungap/structured-clone@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" - integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== + minimatch "^9.0.4" + semver "^7.6.0" + ts-api-utils "^1.3.0" + +"@typescript-eslint/utils@8.7.0": + version "8.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.7.0.tgz#cef3f70708b5b5fd7ed8672fc14714472bd8a011" + integrity sha512-ZbdUdwsl2X/s3CiyAu3gOlfQzpbuG3nTWKPoIvAu1pu5r8viiJvv2NPN2AqArL35NCYtw/lrPPfM4gxrMLNLPw== + dependencies: + "@eslint-community/eslint-utils" "^4.4.0" + "@typescript-eslint/scope-manager" "8.7.0" + "@typescript-eslint/types" "8.7.0" + "@typescript-eslint/typescript-estree" "8.7.0" + +"@typescript-eslint/visitor-keys@8.7.0": + version "8.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.7.0.tgz#5e46f1777f9d69360a883c1a56ac3c511c9659a8" + integrity sha512-b1tx0orFCCh/THWPQa2ZwWzvOeyzzp36vkJYOpVg0u8UVOIsfVrnuC9FqAw9gRKn+rG2VmWQ/zDJZzkxUnj/XQ== + dependencies: + "@typescript-eslint/types" "8.7.0" + eslint-visitor-keys "^3.4.3" abitype@0.7.1: version "0.7.1" @@ -934,13 +918,13 @@ acorn-jsx@^5.3.2: integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== acorn-walk@^8.1.1: - version "8.3.3" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.3.tgz#9caeac29eefaa0c41e3d4c65137de4d6f34df43e" - integrity sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw== + version "8.3.4" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.4.tgz#794dd169c3977edf4ba4ea47583587c5866236b7" + integrity sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g== dependencies: acorn "^8.11.0" -acorn@^8.11.0, acorn@^8.4.1, acorn@^8.9.0: +acorn@^8.11.0, acorn@^8.12.0, acorn@^8.4.1: version "8.12.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248" integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg== @@ -1004,11 +988,6 @@ array-includes@^3.1.8: get-intrinsic "^1.2.4" is-string "^1.0.7" -array-union@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" - integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== - array.prototype.findlastindex@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz#8c35a755c72908719453f87145ca011e39334d0d" @@ -1067,7 +1046,7 @@ available-typed-arrays@^1.0.7: dependencies: possible-typed-array-names "^1.0.0" -axios@^1.5.1: +axios@^1.7.5: version "1.7.7" resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.7.tgz#2f554296f9892a72ac8d8e4c5b79c14a91d0a47f" integrity sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q== @@ -1124,6 +1103,11 @@ callsites@^3.0.0: resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== +canonicalize@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/canonicalize/-/canonicalize-2.0.0.tgz#32be2cef4446d67fd5348027a384cae28f17226a" + integrity sha512-ulDEYPv7asdKvqahuAY35c1selLdzDwHqugK92hfkzvlDCwXRRelDkR+Er33md/PtnpqHemgkuDPanZ4fiYZ8w== + cbor-web@^9.0.0: version "9.0.2" resolved "https://registry.yarnpkg.com/cbor-web/-/cbor-web-9.0.2.tgz#1915f1ef1a72ea905db07480f71cf12ff601c661" @@ -1177,10 +1161,10 @@ combined-stream@^1.0.8: dependencies: delayed-stream "~1.0.0" -commander@^11.1.0: - version "11.1.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-11.1.0.tgz#62fdce76006a68e5c1ab3314dc92e800eb83d906" - integrity sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ== +commander@^12.1.0: + version "12.1.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-12.1.0.tgz#01423b36f501259fdaac4d0e4d60c96c991585d3" + integrity sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA== concat-map@0.0.1: version "0.0.1" @@ -1253,11 +1237,11 @@ debug@^3.2.7: ms "^2.1.1" debug@^4.1.0, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: - version "4.3.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.6.tgz#2ab2c38fbaffebf8aa95fdfe6d88438c7a13c52b" - integrity sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg== + version "4.3.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.7.tgz#87945b4151a011d76d95a198d7111c865c360a52" + integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ== dependencies: - ms "2.1.2" + ms "^2.1.3" deep-is@^0.1.3: version "0.1.4" @@ -1292,13 +1276,6 @@ diff@^4.0.1: resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== -dir-glob@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" - integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== - dependencies: - path-type "^4.0.0" - doctrine@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" @@ -1306,14 +1283,7 @@ doctrine@^2.1.0: dependencies: esutils "^2.0.2" -doctrine@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" - integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== - dependencies: - esutils "^2.0.2" - -dotenv@^16.3.1: +dotenv@^16.4.5: version "16.4.5" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.5.tgz#cdd3b3b604cb327e286b4762e13502f717cb099f" integrity sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg== @@ -1431,7 +1401,7 @@ escape-string-regexp@^4.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -eslint-config-prettier@^9.0.0: +eslint-config-prettier@^9.1.0: version "9.1.0" resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz#31af3d94578645966c082fcb71a5846d3c94867f" integrity sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw== @@ -1454,9 +1424,9 @@ eslint-import-resolver-node@^0.3.9: resolve "^1.22.4" eslint-module-utils@^2.9.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.9.0.tgz#95d4ac038a68cd3f63482659dffe0883900eb342" - integrity sha512-McVbYmwA3NEKwRQY5g4aWMdcZE5xZxV8i8l7CqJSrameuGSQJtSWaL/LxTEzSKKaCcOhlpDR8XEfYXWPrdo/ZQ== + version "2.11.1" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.11.1.tgz#6d5a05f09af98f4d238a819ae4c23626a75fa65b" + integrity sha512-EwcbfLOhwVMAfatfqLecR2yv3dE5+kQ8kx+Rrt0DvDXEVwW86KQ/xbMDQhtp5l42VXukD5SOF8mQQHbaNtO0CQ== dependencies: debug "^3.2.7" @@ -1468,7 +1438,7 @@ eslint-plugin-es@^3.0.0: eslint-utils "^2.0.0" regexpp "^3.0.0" -eslint-plugin-import@^2.28.1: +eslint-plugin-import@^2.29.1: version "2.30.0" resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.30.0.tgz#21ceea0fc462657195989dd780e50c92fe95f449" integrity sha512-/mHNE9jINJfiD2EKkg1BKyPyUk4zdnT54YgbOgfjSakWT5oyX/qQLVNTkehyfpcMxZXMy1zyonZ2v7hZTX43Yw== @@ -1504,7 +1474,7 @@ eslint-plugin-node@^11.1.0: resolve "^1.10.1" semver "^6.1.0" -eslint-plugin-prettier@^5.0.1: +eslint-plugin-prettier@^5.2.1: version "5.2.1" resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.1.tgz#d1c8f972d8f60e414c25465c163d16f209411f95" integrity sha512-gH3iR3g4JfF+yYPaJYkN7jEl9QbweL/YfkoRlNnuIEHEz1vHVlCmWOS+eGGiRuzHQXdJFCOTxRgvju9b8VUmrw== @@ -1512,18 +1482,10 @@ eslint-plugin-prettier@^5.0.1: prettier-linter-helpers "^1.0.0" synckit "^0.9.1" -eslint-scope@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" - integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== - dependencies: - esrecurse "^4.3.0" - estraverse "^4.1.1" - -eslint-scope@^7.2.2: - version "7.2.2" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f" - integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg== +eslint-scope@^8.0.2: + version "8.0.2" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-8.0.2.tgz#5cbb33d4384c9136083a71190d548158fe128f94" + integrity sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA== dependencies: esrecurse "^4.3.0" estraverse "^5.2.0" @@ -1540,48 +1502,52 @@ eslint-visitor-keys@^1.1.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== -eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: +eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.3: version "3.4.3" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== -eslint@^8.51.0: - version "8.57.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.57.0.tgz#c786a6fd0e0b68941aaf624596fb987089195668" - integrity sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ== +eslint-visitor-keys@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz#e3adc021aa038a2a8e0b2f8b0ce8f66b9483b1fb" + integrity sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw== + +eslint@^9.9.1: + version "9.11.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.11.1.tgz#701e5fc528990153f9cef696d8427003b5206567" + integrity sha512-MobhYKIoAO1s1e4VUrgx1l1Sk2JBR/Gqjjgw8+mfgoLE2xwsHur4gdfTxyTgShrhvdVFTaJSgMiQBl1jv/AWxg== dependencies: "@eslint-community/eslint-utils" "^4.2.0" - "@eslint-community/regexpp" "^4.6.1" - "@eslint/eslintrc" "^2.1.4" - "@eslint/js" "8.57.0" - "@humanwhocodes/config-array" "^0.11.14" + "@eslint-community/regexpp" "^4.11.0" + "@eslint/config-array" "^0.18.0" + "@eslint/core" "^0.6.0" + "@eslint/eslintrc" "^3.1.0" + "@eslint/js" "9.11.1" + "@eslint/plugin-kit" "^0.2.0" "@humanwhocodes/module-importer" "^1.0.1" + "@humanwhocodes/retry" "^0.3.0" "@nodelib/fs.walk" "^1.2.8" - "@ungap/structured-clone" "^1.2.0" + "@types/estree" "^1.0.6" + "@types/json-schema" "^7.0.15" ajv "^6.12.4" chalk "^4.0.0" cross-spawn "^7.0.2" debug "^4.3.2" - doctrine "^3.0.0" escape-string-regexp "^4.0.0" - eslint-scope "^7.2.2" - eslint-visitor-keys "^3.4.3" - espree "^9.6.1" - esquery "^1.4.2" + eslint-scope "^8.0.2" + eslint-visitor-keys "^4.0.0" + espree "^10.1.0" + esquery "^1.5.0" esutils "^2.0.2" fast-deep-equal "^3.1.3" - file-entry-cache "^6.0.1" + file-entry-cache "^8.0.0" find-up "^5.0.0" glob-parent "^6.0.2" - globals "^13.19.0" - graphemer "^1.4.0" ignore "^5.2.0" imurmurhash "^0.1.4" is-glob "^4.0.0" is-path-inside "^3.0.3" - js-yaml "^4.1.0" json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.4.1" lodash.merge "^4.6.2" minimatch "^3.1.2" natural-compare "^1.4.0" @@ -1589,16 +1555,16 @@ eslint@^8.51.0: strip-ansi "^6.0.1" text-table "^0.2.0" -espree@^9.6.0, espree@^9.6.1: - version "9.6.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" - integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== +espree@^10.0.1, espree@^10.1.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-10.1.0.tgz#8788dae611574c0f070691f522e4116c5a11fc56" + integrity sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA== dependencies: - acorn "^8.9.0" + acorn "^8.12.0" acorn-jsx "^5.3.2" - eslint-visitor-keys "^3.4.1" + eslint-visitor-keys "^4.0.0" -esquery@^1.4.2: +esquery@^1.5.0: version "1.6.0" resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.6.0.tgz#91419234f804d852a82dceec3e16cdc22cf9dae7" integrity sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg== @@ -1612,11 +1578,6 @@ esrecurse@^4.3.0: dependencies: estraverse "^5.2.0" -estraverse@^4.1.1: - version "4.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" - integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== - estraverse@^5.1.0, estraverse@^5.2.0: version "5.3.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" @@ -1652,7 +1613,7 @@ fast-diff@^1.1.2: resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.3.0.tgz#ece407fa550a64d638536cd727e129c61616e0f0" integrity sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw== -fast-glob@^3.2.9: +fast-glob@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow== @@ -1688,12 +1649,12 @@ fetch-blob@^3.1.2, fetch-blob@^3.1.4: node-domexception "^1.0.0" web-streams-polyfill "^3.0.3" -file-entry-cache@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" - integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== +file-entry-cache@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-8.0.0.tgz#7787bddcf1131bffb92636c69457bbc0edd6d81f" + integrity sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ== dependencies: - flat-cache "^3.0.4" + flat-cache "^4.0.0" fill-range@^7.1.1: version "7.1.1" @@ -1710,14 +1671,13 @@ find-up@^5.0.0: locate-path "^6.0.0" path-exists "^4.0.0" -flat-cache@^3.0.4: - version "3.2.0" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.2.0.tgz#2c0c2d5040c99b1632771a9d105725c0115363ee" - integrity sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw== +flat-cache@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-4.0.1.tgz#0ece39fcb14ee012f4b0410bd33dd9c1f011127c" + integrity sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw== dependencies: flatted "^3.2.9" - keyv "^4.5.3" - rimraf "^3.0.2" + keyv "^4.5.4" flatted@^3.2.9: version "3.3.1" @@ -1725,9 +1685,9 @@ flatted@^3.2.9: integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw== follow-redirects@^1.15.6: - version "1.15.8" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.8.tgz#ae67b97ae32e0a7b36066a5448938374ec18d13d" - integrity sha512-xgrmBhBToVKay1q2Tao5LI26B83UhrB/vM1avwVSDzt8rx3rO6AizBAaF46EgksTVr+rFTQaqZZ9MVBfUe4nig== + version "1.15.9" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.9.tgz#a604fa10e443bf98ca94228d9eebcc2e8a2c8ee1" + integrity sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ== for-each@^0.3.3: version "0.3.3" @@ -1736,6 +1696,11 @@ for-each@^0.3.3: dependencies: is-callable "^1.1.3" +foreach@^2.0.4: + version "2.0.6" + resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.6.tgz#87bcc8a1a0e74000ff2bf9802110708cfb02eb6e" + integrity sha512-k6GAGDyqLe9JaebCsFCoudPPWfihKu8pylYXRlqP1J7ms39iPoTtk2fviNglIeQEwdh0bQeKJ01ZPyuyQvKzwg== + form-data@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" @@ -1752,11 +1717,6 @@ formdata-polyfill@^4.0.10: dependencies: fetch-blob "^3.1.2" -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== - function-bind@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" @@ -1811,24 +1771,10 @@ glob-parent@^6.0.2: dependencies: is-glob "^4.0.3" -glob@^7.1.3: - version "7.2.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" - integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.1.1" - once "^1.3.0" - path-is-absolute "^1.0.0" - -globals@^13.19.0: - version "13.24.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.24.0.tgz#8432a19d78ce0c1e833949c36adb345400bb1171" - integrity sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ== - dependencies: - type-fest "^0.20.2" +globals@^14.0.0: + version "14.0.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-14.0.0.tgz#898d7413c29babcf6bafe56fcadded858ada724e" + integrity sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ== globalthis@^1.0.3: version "1.0.4" @@ -1838,18 +1784,6 @@ globalthis@^1.0.3: define-properties "^1.2.1" gopd "^1.0.1" -globby@^11.1.0: - version "11.1.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" - integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== - dependencies: - array-union "^2.1.0" - dir-glob "^3.0.1" - fast-glob "^3.2.9" - ignore "^5.2.0" - merge2 "^1.4.1" - slash "^3.0.0" - gopd@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" @@ -1908,7 +1842,7 @@ hasown@^2.0.0, hasown@^2.0.1, hasown@^2.0.2: dependencies: function-bind "^1.1.2" -ignore@^5.1.1, ignore@^5.2.0: +ignore@^5.1.1, ignore@^5.2.0, ignore@^5.3.1: version "5.3.2" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== @@ -1926,15 +1860,7 @@ imurmurhash@^0.1.4: resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@^2.0.3: +inherits@^2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -2121,6 +2047,13 @@ json-buffer@3.0.1: resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== +json-pointer@^0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/json-pointer/-/json-pointer-0.6.2.tgz#f97bd7550be5e9ea901f8c9264c9d436a22a93cd" + integrity sha512-vLWcKbOaXlO+jvRy4qNd+TI1QUPZzfJj1tpJ3vAXDych5XJf93ftpUKe5pKCrzyIIwgBJcOcCVRUfqQP25afBw== + dependencies: + foreach "^2.0.4" + json-schema-traverse@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" @@ -2143,7 +2076,7 @@ json5@^1.0.2: dependencies: minimist "^1.2.0" -keyv@^4.5.3: +keyv@^4.5.4: version "4.5.4" resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== @@ -2175,7 +2108,7 @@ make-error@^1.1.1: resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== -merge2@^1.3.0, merge2@^1.4.1: +merge2@^1.3.0: version "1.4.1" resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== @@ -2200,20 +2133,20 @@ mime-types@^2.1.12: dependencies: mime-db "1.52.0" -minimatch@9.0.3: - version "9.0.3" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825" - integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg== - dependencies: - brace-expansion "^2.0.1" - -minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: +minimatch@^3.0.4, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== dependencies: brace-expansion "^1.1.7" +minimatch@^9.0.4: + version "9.0.5" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5" + integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== + dependencies: + brace-expansion "^2.0.1" + minimist@^1.2.0, minimist@^1.2.6: version "1.2.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" @@ -2224,27 +2157,17 @@ mock-socket@^9.3.1: resolved "https://registry.yarnpkg.com/mock-socket/-/mock-socket-9.3.1.tgz#24fb00c2f573c84812aa4a24181bb025de80cc8e" integrity sha512-qxBgB7Qa2sEQgHFjj0dSigq7fX4k6Saisd5Nelwp2q8mlbAFh5dHV9JTTlF8viYJLSSWgMCZFUom8PJcMNBoJw== -ms@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -ms@^2.1.1: +ms@^2.1.1, ms@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== -natural-compare-lite@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4" - integrity sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g== - natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== -nock@^13.5.0: +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== @@ -2258,7 +2181,7 @@ node-domexception@^1.0.0: resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5" integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ== -node-fetch@^2.6.12, node-fetch@^2.6.7: +node-fetch@^2.6.12: version "2.7.0" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== @@ -2322,13 +2245,6 @@ object.values@^1.2.0: define-properties "^1.2.1" es-object-atoms "^1.0.0" -once@^1.3.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== - dependencies: - wrappy "1" - optionator@^0.9.3: version "0.9.4" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.4.tgz#7ea1c1a5d91d764fb282139c88fe11e182a3a734" @@ -2367,11 +2283,6 @@ path-exists@^4.0.0: resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== - path-key@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" @@ -2382,11 +2293,6 @@ path-parse@^1.0.7: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== -path-type@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" - integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== - picocolors@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.0.tgz#5358b76a78cde483ba5cef6a9dc9671440b27d59" @@ -2414,7 +2320,7 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@^3.0.3: +prettier@^3.3.3: version "3.3.3" resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.3.tgz#30c54fe0be0d8d12e6ae61dbb10109ea00d53105" integrity sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew== @@ -2473,13 +2379,6 @@ reusify@^1.0.4: resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== -rimraf@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - dependencies: - glob "^7.1.3" - run-parallel@^1.1.9: version "1.2.0" resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" @@ -2523,7 +2422,7 @@ semver@^6.1.0, semver@^6.3.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.3.7, semver@^7.5.4: +semver@^7.6.0: version "7.6.3" resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== @@ -2577,15 +2476,10 @@ side-channel@^1.0.4: get-intrinsic "^1.2.4" object-inspect "^1.13.1" -slash@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" - integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== - -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" @@ -2717,12 +2611,12 @@ tr46@~0.0.3: resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== -ts-api-utils@^1.0.1: +ts-api-utils@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.3.0.tgz#4b490e27129f1e8e686b45cc4ab63714dc60eea1" integrity sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ== -ts-node@^10.9.1: +ts-node@^10.9.2: version "10.9.2" resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.2.tgz#70f021c9e185bccdca820e26dc413805c101c71f" integrity sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ== @@ -2751,23 +2645,11 @@ tsconfig-paths@^3.15.0: minimist "^1.2.6" strip-bom "^3.0.0" -tslib@^1.8.1: - version "1.14.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" - integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== - -tslib@^2.1.0, tslib@^2.6.2: +tslib@^2.1.0, tslib@^2.6.2, tslib@^2.6.3, tslib@^2.7.0: version "2.7.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.7.0.tgz#d9b40c5c40ab59e8738f297df3087bf1a2690c01" integrity sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA== -tsutils@^3.21.0: - version "3.21.0" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" - integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== - dependencies: - tslib "^1.8.1" - tweetnacl@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" @@ -2780,11 +2662,6 @@ type-check@^0.4.0, type-check@~0.4.0: dependencies: prelude-ls "^1.2.1" -type-fest@^0.20.2: - version "0.20.2" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" - integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== - typed-array-buffer@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz#1867c5d83b20fcb5ccf32649e5e2fc7424474ff3" @@ -2836,10 +2713,10 @@ typescript-logging@^1.0.0: dependencies: stacktrace-js "1.3.1" -typescript@^5.2.2: - version "5.5.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.4.tgz#d9852d6c82bad2d2eda4fd74a5762a8f5909e9ba" - integrity sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q== +typescript@^5.5.4: + version "5.6.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.2.tgz#d1de67b6bef77c41823f822df8f0b3bcff60a5a0" + integrity sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw== unbox-primitive@^1.0.2: version "1.0.2" @@ -2874,56 +2751,61 @@ util@^0.12.5: is-typed-array "^1.1.3" which-typed-array "^1.1.2" -uuid@^9.0.0: - version "9.0.1" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30" - integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== +uuid@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-10.0.0.tgz#5a95aa454e6e002725c79055fd42aaba30ca6294" + integrity sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ== v8-compile-cache-lib@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== +varint@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/varint/-/varint-6.0.0.tgz#9881eb0ce8feaea6512439d19ddf84bf551661d0" + integrity sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg== + web-streams-polyfill@^3.0.3: version "3.3.3" resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz#2073b91a2fdb1fbfbd401e7de0ac9f8214cecb4b" integrity sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw== -web3-core@^4.3.0, web3-core@^4.4.0, web3-core@^4.5.0, web3-core@^4.5.1: - version "4.5.1" - resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-4.5.1.tgz#aba57c7f925fc2d72e2109eef5ff0ecaa4482b86" - integrity sha512-mFMOO/IWdKsLL1o2whh3oJ0LCG9P3l5c4lpiMoVsVln3QXh/B0Gf8gW3aY8S+Ixm0OHyzFDXJVc2CodxqmI4Gw== +web3-core@^4.4.0, web3-core@^4.5.0, web3-core@^4.5.1, web3-core@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-4.6.0.tgz#1b3e88ed35142b4d6fcbc7737e1d71943f99cf45" + integrity sha512-j8uQ/7zSwpmLClMMeZb736Ok3V4cWSd0dnd29jkd10d1pedi32r+hSAgycxSJLLWtPHOzMBIXUjj3TF/IAClVQ== dependencies: web3-errors "^1.3.0" - web3-eth-accounts "^4.2.0" + web3-eth-accounts "^4.2.1" web3-eth-iban "^4.0.7" web3-providers-http "^4.2.0" web3-providers-ws "^4.0.8" - web3-types "^1.7.0" + web3-types "^1.8.0" web3-utils "^4.3.1" web3-validator "^2.0.6" optionalDependencies: web3-providers-ipc "^4.0.7" -web3-errors@^1.1.3, web3-errors@^1.2.0, web3-errors@^1.2.1, web3-errors@^1.3.0: +web3-errors@^1.1.3, web3-errors@^1.2.0, web3-errors@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/web3-errors/-/web3-errors-1.3.0.tgz#504e4d3218899df108856940087a8022d6688d74" integrity sha512-j5JkAKCtuVMbY3F5PYXBqg1vWrtF4jcyyMY1rlw8a4PV67AkqlepjGgpzWJZd56Mt+TvHy6DA1F/3Id8LatDSQ== dependencies: web3-types "^1.7.0" -web3-eth-abi@^4.2.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-4.2.3.tgz#9efad6a45d7d6e52bb1eba56cbe45a3a321443e3" - integrity sha512-rPVwTn0O1CzbtfXwEfIjUP0W5Y7u1OFjugwKpSqJzPQE6+REBg6OELjomTGZBu+GThxHnv0rp15SOxvqp+tyXA== +web3-eth-abi@^4.2.3, web3-eth-abi@^4.2.4: + version "4.2.4" + resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-4.2.4.tgz#b66f4b067ba06c0aecc013e98a4d717547ab8174" + integrity sha512-FGoj/ENm/Iq3+6myJyiDCwbFkha9ZCx2fRdiIdw3mp7S4lgu+ay3EVzQPRxJjNBm09UEfxB9yoSAPKj9Z3Mbxg== dependencies: abitype "0.7.1" - web3-errors "^1.2.0" - web3-types "^1.7.0" + web3-errors "^1.3.0" + web3-types "^1.8.0" web3-utils "^4.3.1" web3-validator "^2.0.6" -web3-eth-accounts@^4.1.3, web3-eth-accounts@^4.2.0, web3-eth-accounts@^4.2.1: +web3-eth-accounts@^4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-4.2.1.tgz#db27399137e1a26f9d467b9500019a70771f5724" integrity sha512-aOlEZFzqAgKprKs7+DGArU4r9b+ILBjThpeq42aY7LAQcP+mSpsWcQgbIRK3r/n3OwTYZ3aLPk0Ih70O/LwnYA== @@ -2975,32 +2857,32 @@ web3-eth-iban@^4.0.7: web3-utils "^4.0.7" web3-validator "^2.0.3" -web3-eth-personal@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-4.0.8.tgz#b51628c560de550ca8b354fa784f9556aae6065c" - integrity sha512-sXeyLKJ7ddQdMxz1BZkAwImjqh7OmKxhXoBNF3isDmD4QDpMIwv/t237S3q4Z0sZQamPa/pHebJRWVuvP8jZdw== +web3-eth-personal@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-4.1.0.tgz#f5b506a4570bf1241d1db2de12cb413ea0bb4486" + integrity sha512-RFN83uMuvA5cu1zIwwJh9A/bAj0OBxmGN3tgx19OD/9ygeUZbifOL06jgFzN0t+1ekHqm3DXYQM8UfHpXi7yDQ== dependencies: - web3-core "^4.3.0" - web3-eth "^4.3.1" - web3-rpc-methods "^1.1.3" - web3-types "^1.3.0" - web3-utils "^4.0.7" - web3-validator "^2.0.3" + web3-core "^4.6.0" + web3-eth "^4.9.0" + web3-rpc-methods "^1.3.0" + web3-types "^1.8.0" + web3-utils "^4.3.1" + web3-validator "^2.0.6" -web3-eth@^4.3.1, web3-eth@^4.8.0, web3-eth@^4.8.2: - version "4.8.2" - resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-4.8.2.tgz#5459aff239a6f27816a522570bdd86732856ef0f" - integrity sha512-DLV/fIMG6gBp/B0gv0+G4FzxZ4YCDQsY3lzqqv7avwh3uU7/O27aifCUcFd7Ye+3ixTqCjAvLEl9wYSeyG3zQw== +web3-eth@^4.8.0, web3-eth@^4.8.2, web3-eth@^4.9.0: + version "4.9.0" + resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-4.9.0.tgz#324403d913cc29bcae6cc1ad50a6defeb762828a" + integrity sha512-lE+5rQUkQq1Mzf3uZ/tlay8nvMyC/CmaRFRFQ015OZuvSrRr/byZhhkzY5ZWkIetESTMqfWapu67yeHebcHxwA== dependencies: setimmediate "^1.0.5" - web3-core "^4.5.0" - web3-errors "^1.2.1" - web3-eth-abi "^4.2.3" - web3-eth-accounts "^4.1.3" + web3-core "^4.6.0" + web3-errors "^1.3.0" + web3-eth-abi "^4.2.4" + web3-eth-accounts "^4.2.1" web3-net "^4.1.0" web3-providers-ws "^4.0.8" web3-rpc-methods "^1.3.0" - web3-types "^1.7.0" + web3-types "^1.8.0" web3-utils "^4.3.1" web3-validator "^2.0.6" @@ -3045,7 +2927,7 @@ web3-providers-ws@^4.0.8: web3-utils "^4.3.1" ws "^8.17.1" -web3-rpc-methods@^1.1.3, web3-rpc-methods@^1.3.0: +web3-rpc-methods@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/web3-rpc-methods/-/web3-rpc-methods-1.3.0.tgz#d5ee299a69389d63822d354ddee2c6a121a6f670" integrity sha512-/CHmzGN+IYgdBOme7PdqzF+FNeMleefzqs0LVOduncSaqsppeOEoskLXb2anSpzmQAP3xZJPaTrkQPWSJMORig== @@ -3066,10 +2948,10 @@ web3-rpc-providers@^1.0.0-rc.2: web3-utils "^4.3.1" web3-validator "^2.0.6" -web3-types@^1.3.0, web3-types@^1.6.0, web3-types@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/web3-types/-/web3-types-1.7.0.tgz#9945fa644af96b20b1db18564aff9ab8db00df59" - integrity sha512-nhXxDJ7a5FesRw9UG5SZdP/C/3Q2EzHGnB39hkAV+YGXDMgwxBXFWebQLfEzZzuArfHnvC0sQqkIHNwSKcVjdA== +web3-types@^1.3.0, web3-types@^1.6.0, web3-types@^1.7.0, web3-types@^1.8.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/web3-types/-/web3-types-1.8.0.tgz#d2151fd9e87d711ef5a13079885665b458243e46" + integrity sha512-Z51wFLPGhZM/1uDxrxE8gzju3t2aEdRGn+YmLX463id5UjTuMEmP/9in1GFjqrsPB3m86czs8RnGBUt3ovueMw== web3-utils@^4.0.7, web3-utils@^4.3.0, web3-utils@^4.3.1: version "4.3.1" @@ -3093,26 +2975,26 @@ web3-validator@^2.0.3, web3-validator@^2.0.6: web3-types "^1.6.0" zod "^3.21.4" -web3@^4.1.2: - version "4.12.1" - resolved "https://registry.yarnpkg.com/web3/-/web3-4.12.1.tgz#391215c7c82627c1a8cc329ded3366c8b55f5c3d" - integrity sha512-zIFUPdgo2uG5Vbl7C4KrTv8dmWKN3sGnY/GundbiJzcaJZDxaCyu3a5HXAcgUM1VvvsVb1zaUQAFPceq05/q/Q== +web3@^4.12.1: + version "4.13.0" + resolved "https://registry.yarnpkg.com/web3/-/web3-4.13.0.tgz#b1740006d61fec9388517d7b63e15f53363f3956" + integrity sha512-wRXTu/YjelvBJ7PSLzp/rW8/6pqj4RlXzdKSkjk01RaHDvnpLogLU/VL8OF5ygqhY7IzhY5MSrl9SnC8C9Z4uA== dependencies: - web3-core "^4.5.1" + web3-core "^4.6.0" web3-errors "^1.3.0" - web3-eth "^4.8.2" - web3-eth-abi "^4.2.3" + web3-eth "^4.9.0" + web3-eth-abi "^4.2.4" web3-eth-accounts "^4.2.1" web3-eth-contract "^4.7.0" web3-eth-ens "^4.4.0" web3-eth-iban "^4.0.7" - web3-eth-personal "^4.0.8" + web3-eth-personal "^4.1.0" web3-net "^4.1.0" web3-providers-http "^4.2.0" web3-providers-ws "^4.0.8" web3-rpc-methods "^1.3.0" web3-rpc-providers "^1.0.0-rc.2" - web3-types "^1.7.0" + web3-types "^1.8.0" web3-utils "^4.3.1" web3-validator "^2.0.6" @@ -3163,12 +3045,7 @@ word-wrap@^1.2.5: resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== -wrappy@1: - version "1.0.2" - 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.17.1, ws@^8.8.1: +ws@^8.16.0, ws@^8.17.1, ws@^8.8.1: version "8.18.0" resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc" integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== diff --git a/sdk/02_tutorial/01_welcome.md b/sdk/02_tutorial/01_welcome.md index 2746a11a3..556c30b7e 100644 --- a/sdk/02_tutorial/01_welcome.md +++ b/sdk/02_tutorial/01_welcome.md @@ -6,7 +6,7 @@ title: 👋🏻 Welcome -SDK version **0.35.0**. +SDK version **1.x**. :::info What you can expect to learn @@ -20,7 +20,7 @@ This includes creating a CType and a claim, attesting a claim, and finally verif - Basic JavaScript or TypeScript knowledge. - [Node.js](https://nodejs.org/) installed. Any stable LTS version >= 16.0. -❓ **Questions?** Join our [developer community channel](https://discord.gg/hX4pc8rdHS)! +❓ **Questions?** Join the [developer community channel](https://discord.gg/hX4pc8rdHS)! ::: @@ -29,9 +29,9 @@ This includes creating a CType and a claim, attesting a claim, and finally verif In this tutorial, you will: ✔ Get familiar with the essential concepts in KILT: accounts, DIDs, CTypes, claims, credentials, and more. - ✔ Use the KILT SDK to implement the basic flow of a KILT claim, from creation until verification. -You'll create a claim as a Claimer, attest it as an Issuer and verify it as a Verifier. + + You'll create a Credential as an Issuer, produce a Credential Presentation as a Holder, and verify it as a Verifier. ✔ Use the KILT SDK to write onto and read from the KILT blockchain. diff --git a/sdk/02_tutorial/02_setup.md b/sdk/02_tutorial/02_setup.md index 9fc684270..f9cbbd257 100644 --- a/sdk/02_tutorial/02_setup.md +++ b/sdk/02_tutorial/02_setup.md @@ -8,33 +8,33 @@ import TabItem from '@theme/TabItem'; ## Project setup -Create a new project in a fresh directory and navigate into it by running `mkdir kilt-rocks && cd kilt-rocks`. +Create a new project and navigate into it by running `mkdir kilt-rocks && cd kilt-rocks`. -The dependencies needed are the following: +You need the following dependencies: -- [KILT SDK-JS](https://github.com/KILTprotocol/sdk-js#readme) - for KILT functionality -- [dotenv](https://github.com/motdotla/dotenv#readme) - to load environment variables -- If you use Typescript and not JavaScript [ts-node](https://www.npmjs.com/package/ts-node) and [Typescript](https://www.typescriptlang.org/) - to execute TS code +- [KILT SDK-JS](https://github.com/KILTprotocol/sdk-js#readme) - for KILT functionality +- [dotenv](https://github.com/motdotla/dotenv#readme) - to load environment variables +- If you use Typescript and not JavaScript [ts-node](https://www.npmjs.com/package/ts-node) and [Typescript](https://www.typescriptlang.org/) - to execute TS code - Initialize the project and install dependencies. +Initialize the project and install dependencies. - ```bash npm2yarn - npm init -y - npm install @kiltprotocol/sdk-js dotenv ts-node typescript - ``` +```bash npm2yarn +npm init -y +npm install @kiltprotocol/sdk-js dotenv ts-node typescript +``` - Initialize the project and install dependencies. +Initialize the project and install dependencies. - ```bash npm2yarn - npm init -y - npm install @kiltprotocol/sdk-js dotenv - ``` +```bash npm2yarn +npm init -y +npm install @kiltprotocol/sdk-js dotenv +``` @@ -44,38 +44,51 @@ The dependencies needed are the following: - Create the following remaining files and folders to end up with the folder structure below: +Create the following remaining files to end up with the folder structure below: - ``` - └─ kilt-rocks/ # project - ├─ issuer/ # all issuer code - ├─ claimer/ # all claimer code - ├─ verify.ts # all verifier code - └─ .env # environment variables - ``` - ``` - mkdir issuer claimer && touch verify.ts .env - ``` +``` +└─ kilt-rocks/ # project + ├─ index.ts # all code + └─ .env # environment variables +``` + +``` +touch index.ts .env +``` - Create the following remaining files and folders to end up with the folder structure below: +Create the following remaining files to end up with the folder structure below: + +``` +└─ kilt-rocks/ # project + ├─ index.js # all code + └─ .env # environment variables +``` - ``` - └─ kilt-rocks/ # project - ├─ issuer/ # all issuer code - ├─ claimer/ # all claimer code - ├─ verify.js # all verifier code - └─ .env # environment variables - ``` - ``` - mkdir issuer claimer && touch verify.js .env - ``` +``` +touch index.js .env +``` +## Boilerplate code + +In the `index.ts` or `index.js` file, add the following code: + + + +```typescript +export async function runAll() { + // Code to run all methods will go here +} +runAll() +``` + + + ## PILT tokens This workshop interacts with the Peregrine test blockchain, which requires you to pay for each transaction with Peregrine KILT (PILT) tokens. @@ -100,4 +113,4 @@ For convenience, add the address to the `.env` file. WSS_ADDRESS=wss://peregrine.kilt.io ``` -That's it for the basic setup - You're good to go! \ No newline at end of file +That's it for the basic setup - You're good to go! diff --git a/sdk/02_tutorial/03_overview.md b/sdk/02_tutorial/03_overview.md index 563dd3508..13f80ef56 100644 --- a/sdk/02_tutorial/03_overview.md +++ b/sdk/02_tutorial/03_overview.md @@ -5,52 +5,52 @@ title: 👓 Overview This tutorial runs through the full story of a claim. -It involves three actors which work together to create **distributed trust**: +It involves four roles which work together to create **distributed trust**: -- A Holder is an actor who claims to possess certain credentials, abilities, or other attributes. -- An Issuer is an actor that verifies the claims of a Claimer. -- A Verifier is an actor that asks for proof of a claim. +- A Holder claims to possess certain credentials, abilities, or other attributes. +- An Issuer verifies the claims of a Holder. +- A Verifier asks for proof of a claim. +- Submitter accounts handles and pays for submitting transactions. -For the workshop, you play all three roles. +In a real-world use case, these roles could be different people and services, which this workshop simulates using different folders and functions for each service or actor. -In a real-world use case, these actors would be different people and services, which this workshop simulates using different folders for each service. Each actor typically performs different roles: - Both the Holder and the Issuer have to interact with the KILT blockchain. -- But only the Issuer is required to own KILTs since they have to pay for storing the attestation on chain. -- The Verifier only needs to query the KILT blockchain to ensure that the attestation is still valid and wasn't revoked. +- Only the Issuer has to own KILTs since they have to pay for storing the attestation on chain. +- The Verifier only needs to query the KILT blockchain to check that the attestation is still valid and wasn't revoked. - The Holder isn't required to query the blockchain, but they might do so to check whether their credential is still valid or if the Issuer has revoked it in the meantime. -## Request an attestation +## Issue a credential The Holder has to register their DID on chain and needs KILT coins. After both the Holder and the Issuer have set up their identities, the Holder can start the attestation process by requesting an attestation from the Issuer. + + ```mermaid sequenceDiagram actor C as Holder actor A as Issuer participant B as KILT Blockchain C->>+C: Create credential from provided claims - C->>+A: Transmit credential to request attestation + C->>+A: Transmit credential to request verification A->>A: Validate received attributes - A->>+B: Store attestation + A->>+B: Store attestation of verification B-->>-A: Attestation hash A-->>-C: Attestation Hash ``` -1. The Holder prepares the Credential to attest, along with some proof, for example, a bank statement and ID. -2. They send the document to the Issuer for attestation. +1. The Holder prepares the Credential to verify, along with some proof, for example, a bank statement and ID. +2. They send the document to the Issuer for verification. 3. Upon receiving the credential, the Issuer decides whether the claim is valid by examining the proofs. If the Issuer trusts the claim, they store the attestation document's hash value on the chain, which is a non-functional copy of the document. 4. The Issuer sends this hash value to the Holder, which represents verification of a document. -## Verify an Attestation +## Create a presentation The Verifier requests a presentation from the Holder for a specific required CType. Without a specific CType, the presentation is meaningless. - - A presentation is derived from a credential and doesn't need to contain all attributes. After the request, the Holder can choose to hide elements of their credentials that aren't relevant to the claim. @@ -73,6 +73,8 @@ participant B as KILT Blockchain V->>B: check validity of presentation ``` + + ### Example: Requesting a travel visa To take an example of applying for a travel visa: @@ -91,4 +93,4 @@ And with that trust, they grant the visa with no knowledge of what the Holder ha Even though this process emerged due to the trust in the Issuer, the Issuer wasn't involved in the second stage, so they were unaware of it. Privacy was achieved with distributed trust. -::: \ No newline at end of file +::: diff --git a/sdk/02_tutorial/04_accounts.md b/sdk/02_tutorial/04_accounts.md new file mode 100644 index 000000000..89d794e9c --- /dev/null +++ b/sdk/02_tutorial/04_accounts.md @@ -0,0 +1,101 @@ +--- +id: account +title: Account +--- + +import TsJsBlock from '@site/src/components/TsJsBlock'; +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +import GenerateAccount from '!!raw-loader!@site/code_examples/sdk_examples/src/workshop/index.ts'; + +With the [project structure setup](./) in the last step, you can create your Issuer account. + +With KILT, an account is an object that interacts with the blockchain. + +:::info KILT Account + +A KILT account is a set of cryptographic elements: + +- The address, generated from the public key, is the entity's unique and public on-chain identifier, used to pay fees and deposits. +- A signing key pair to write transactions on-chain + +::: + +## Create the account + +You can create an account with the `generateKeypair()` method. It takes the following parameters: + +- An optional `type`, which is a data structure for defining the key pair type. This example uses `ed25519`, but `sr25519` or `ecdsa` are also valid. +- A `seed` string, such as a mnemonic or hex value, useful if you want an account you can recreate. + +The method returns a `MultibaseKeyPair`, which is a public and private key pair encoded in a multikey format, a text-based encoding that indicates the key type defined by a W3C standard. + +:::info Mnemonic + +In cryptography, a mnemonic consists of a series of 12 or 24 random words. + +For example, `waste frown beach save hidden bar inmate oil mind member junk famous` is a mnemonic. + +You use a mnemonic to generate signing key pairs. +A mnemonic is **human-readable**, and a someone can memorize it to later re-generate their key pairs and address. +A mnemonic is critical for security, so it's crucial to keep it safe! + +::: + +Add the following code to the `generateAccount` file. + + + {GenerateAccount} + + +And add the code to call the method to the `runAll` method: + + + +```typescript +export async function runAll() { + const { issuerAccount, submitterAccount, holderAccount } = generateAccount() +} +``` + + + +The example code creates three accounts. One for the Issuer, one for the Submitter, and one for the Holder. + +## Run code + + + + + ```bash + yarn ts-node ./index.ts + ``` + + + + + ```bash + node ./index.js + ``` + + + + +Run the code and the output provides you with an `ISSUER_ACCOUNT_ADDRESS`, `SUBMITTER_ACCOUNT_ADDRESS`, and `HOLDER_ACCOUNT_ADDRESS`. +Save all values in your `.env` file, which should now look similar to the below. + +```env title=".env" +WSS_ADDRESS=wss://peregrine.kilt.io + +ISSUER_ACCOUNT_ADDRESS="4ohMvUHsyeDhMVZF..." +SUBMITTER_ACCOUNT_ADDRESS="4ohMvUHsyeDhMVZF..." +HOLDER_ACCOUNT_ADDRESS="4ohMvUHsyeDhMVZF..." +``` + +:::warning Get PILT coins! + +You now have a blockchain account to use to pay fees and deposits. +If you haven't already requested PILT, go to the [faucet](https://faucet.peregrine.kilt.io) and request tokens for your `
`. + +::: diff --git a/sdk/02_tutorial/04_issuer/01_account.md b/sdk/02_tutorial/04_issuer/01_account.md deleted file mode 100644 index 91df1e9ef..000000000 --- a/sdk/02_tutorial/04_issuer/01_account.md +++ /dev/null @@ -1,111 +0,0 @@ ---- -id: account -title: Account ---- - -import TsJsBlock from '@site/src/components/TsJsBlock'; -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -import GenerateAccount from '!!raw-loader!@site/code_examples/sdk_examples/src/workshop/issuer/generateAccount.ts'; - -With the [project structure setup](./) in the last step, you can create your Issuer account. - -With KILT, an account is an object that interacts with the blockchain. - -:::info KILT Account - -A KILT account is a set of cryptographic elements: - -- The address, generated from the public key, is the entity's unique and public on-chain identifier, used to pay fees and deposits. -- A signing key pair to write transactions on-chain - -::: - -To create an account, you need a mnemonic. - -:::info Mnemonic - -In cryptography, a mnemonic consists of a series of 12 or 24 random words. - -For example, `waste frown beach save hidden bar inmate oil mind member junk famous` is a mnemonic. - -You use a mnemonic to generate signing key pairs. -What's great about a mnemonic is that it's **human-readable**, and a person could memorize it to later re-generate their key pairs and address. -A mnemonic is critical for security, so it's crucial to keep it safe! - -::: - -## Create the Account - -To generate an account, use the `addFromMnemonic()` function on the [`KiltKeyringPair`](https://kiltprotocol.github.io/sdk-js/interfaces/types_src.KiltKeyringPair.html) interface of the SDK. -The function uses the underlying polkadot `mnemonicGenerate()` function to generate a 12-word mnemonic. - -:::info polkadot.js - -The KILT SDK is built on top of the [polkadot.js](https://polkadot.js.org/) library, so this workshop uses several functions from the library. - -The library provides tools to interact with the KILT blockchain and other Substrate-based blockchains. - -In addition, the polkadot.js library offers cryptographic primitives and a serialization framework to encode/decode data sent to and received from the blockchain. -Read the [API documentation](https://polkadot.js.org/docs/) to learn more about the functions available. - -::: - -Add the following code to the `generateAccount` file. - - - {GenerateAccount} - - -The `generateAccount` method returns an object with the following two properties: - -- A key `account` with the type `Kilt.KiltKeyringPair`. -- A key `mnemonic` with the type `string`. - -Generating these values takes two steps: - -1. Create the `mnemonic` value using the `mnemonicGenerate()` method from the `Utils.Crypto` package. -2. The `account` value first needs a `keyring` value defined, which is a data structure for defining the key pair type. This example uses `ed25519`, but `sr25519` or `ecdsa` are also valid. - -The function then returns the value using the `makeKeypairFromUri()` method to create a key pair for the address using the given mnemonic. - -The rest of the code runs the `generateAccount` function and logs the results to the console. - -## Run code - -Run the code above to receive your Issuer `
` and ``. - - - - -```bash -yarn ts-node ./issuer/generateAccount.ts -``` - - - - -```bash -node ./issuer/generateAccount.js -``` - - - - -The output provides you with an `ATTESTER_ACCOUNT_MNEMONIC` and `ATTESTER_ACCOUNT_ADDRESS`. -Save both values in your `.env` file, which should look similar to the below. - -```env title=".env" -WSS_ADDRESS=wss://peregrine.kilt.io - -ATTESTER_ACCOUNT_MNEMONIC="warrior icon use cry..." -ATTESTER_ACCOUNT_ADDRESS="4ohMvUHsyeDhMVZF..." -``` - -:::warning Get PILT coins! - -You now have a blockchain account to use to pay fees and deposits. -If you haven't already requested PILT, go to the [faucet](https://faucet.peregrine.kilt.io) and request tokens for your `
`. - -::: diff --git a/sdk/02_tutorial/04_issuer/index.md b/sdk/02_tutorial/04_issuer/index.md deleted file mode 100644 index 20c110305..000000000 --- a/sdk/02_tutorial/04_issuer/index.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -id: issuer -title: 🏢 Issuer ---- - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -This section of the workshop covers creating the Issuer code. The steps are the following: - -1. [Create an account](./01_account.md) to pay for all transactions and storage deposits. -2. [Create a DID](./02_did.md), which is the identity used to create attestations. - - While you can always switch the KILT account and pay deposits and fees with any account you like, your DID stays the same and is the way Claimers identify and trust you. - -1. Before you can attest claims, [you need a CType](./03_ctype.md) that describes and gives context to what you attest. -2. Once you have a way to pay fees and deposits, have an identity, and a CType, [you can create attestations](../06_attestation.md). - -## Folder Structure - -Create the following files in the `issuer` folder. -These folders mimic an Issuer service. - - - - - ```bash - └─ kilt-rocks/ # project - └─ issuer/ # all issuer code - ├─ attestCredential.ts # issues attestations - ├─ ctypeSchema.ts # create a local CType definition - ├─ generateAccount.ts # functions for setting up and loading the issuer's account - ├─ generateCtype.ts # register the CType on chain - ├─ generateDid.ts # registers the issuer's on-chain DID - └─ generateKeypairs.ts # setup the keys for the issuer's DID - ``` - ```bash - cd issuer && touch attestCredential.ts ctypeSchema.ts generateAccount.ts generateCtype.ts generateDid.ts generateKeypairs.ts && cd .. - ``` - - - - ```bash - └─ kilt-rocks/ # project - └─ issuer/ # all issuer code - ├─ attestCredential.js # issues attestations - ├─ ctypeSchema.js # create a local CType definition - ├─ generateAccount.js # functions for setting up and loading the issuer's account - ├─ generateCtype.js # register the CType on chain - ├─ generateDid.js # registers the issuer's on-chain DID - └─ generateKeypairs.js # setup the keys for the issuer's DID - ``` - - ```bash - cd issuer && touch attestCredential.js ctypeSchema.js generateAccount.js generateCtype.js generateDid.js generateKeypairs.js && cd .. - ``` - - - diff --git a/sdk/02_tutorial/05_claimer/01_did.md b/sdk/02_tutorial/05_claimer/01_did.md deleted file mode 100644 index 46b53360a..000000000 --- a/sdk/02_tutorial/05_claimer/01_did.md +++ /dev/null @@ -1,75 +0,0 @@ ---- -id: did -title: DID ---- - -import CodeBlock from '@theme/CodeBlock'; -import TsJsBlock from '@site/src/components/TsJsBlock'; -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -import GenerateKeypairs from '!!raw-loader!@site/code_examples/sdk_examples/src/workshop/holder/generateKeypairs.ts'; -import GenerateLightDid from '!!raw-loader!@site/code_examples/sdk_examples/src/workshop/holder/generateLightDid.ts'; - -This section covers creating a light DID using the account you created for the Claimer. - -Since a light DID isn't registered on the blockchain, you don't need funds to create one. - -:::info - -Remember, light DIDs can do the following: - -- Sign attestation requests and presentation with the authentication keys -- Encrypt messages with the encryption keys - -Read the [DID documentation](/develop/sdk/cookbook/dids/light-did-creation) to learn more about DIDs and the difference between their light and full versions. - -::: - -## Generate Keys - -Like the Issuer, the Claimer must also set up the DID keys. - - - {GenerateKeypairs} - - -The code above is similar to the `generateKeyAgreement` function used in the Issuer section but simpler, as the Claimer only needs an authentication key and an encryption key. - -Both the keys are derived from the same seed, but they could also have two different seeds. - -## Generate Light DID - -With the `keypairs` generated, you can create the light DID. -Because it's off-chain you can create the DID object every time, but you still need to save the mnemonic to the `.env` file with a different variable name. - - - {GenerateLightDid} - - -The Claimer doesn't have an `account`, as the Claimer doesn't need to hold funds. - -The `generateKeypairs` function takes the `mnemonic` value and generates the `authentication` and `keyAgreement` keys. - -The `createLightDidDocument` method takes these two values and generates the light DID. - -## Run - - - - - ```bash - yarn ts-node ./claimer/generateLightDid.ts - ``` - - - - - ```bash - node ./claimer/generateLightDid.js - ``` - - - - -Well done - You successfully generated a light DID! diff --git a/sdk/02_tutorial/05_claimer/02_request.md b/sdk/02_tutorial/05_claimer/02_request.md deleted file mode 100644 index 2e146794f..000000000 --- a/sdk/02_tutorial/05_claimer/02_request.md +++ /dev/null @@ -1,73 +0,0 @@ ---- -id: request -title: Request an Attestation ---- - -import TsJsBlock from '@site/src/components/TsJsBlock'; -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -import CreateClaim from '!!raw-loader!@site/code_examples/sdk_examples/src/workshop/holder/createClaim.ts'; -import GenerateCredential from '!!raw-loader!@site/code_examples/sdk_examples/src/workshop/holder/generateCredential.ts'; - -This section covers creating a `Claim` and a `Credential`. - -KILT is a premissionless system. -Anyone or anything can claim something and attest to it. -But an attested credential only has value if the Verifier of the credential _trusts_ the Issuer of the credential. - - -## Create Credential - -Use the previously created `light DID`, `ctype`, and Claimer provided `content` to generate the `Claim` object. - -A claim consists of attributes that we claim to be true about us. - - - {CreateClaim} - - -The `fromCTypeAndClaimContents` function takes the `lightDid`, `ctype`, and `content` values and generates a `Claim` object. - -## Receive attestation for claim - -Since you want to receive an attestation for those claims, build a `Credential` in the `generateCredential` function below. - -The credential contains all necessary information so the Issuer can attest it. - - - {GenerateCredential} - - - -The `main` function takes the Claimer mnemonic and generates the light DID following the steps outlined in the [DID section](./01_did.md). -It then calls the `generateCredential` function using the supplied claim attributes. -It then uses the `createClaim` method from the previous step to create the `Claim` object and the `Kilt.Credential.fromClaim` method takes the claim and returns the `Credential` object. - -When Issuers issue `Attestations`, they are written to the chain, which requires a deposit. -Each new `Credential` is unique. -During testing, you can store and reuse credentials into `./claimer/_credential.json` to avoid multiple attestations. - -You can share this credential with others following the workshop to see how they get denied from fraudulent senders. - -## Run - - - - - ```bash - yarn ts-node claimer/generateCredential.ts - ``` - - - - - ```bash - node claimer/generateCredential.js - ``` - - - - -OK, you've made a claim as a Claimer and created a credential from it. -The next step is to finish the Issuer and get the credential attested! diff --git a/sdk/02_tutorial/05_claimer/index.md b/sdk/02_tutorial/05_claimer/index.md deleted file mode 100644 index b38c6ffb0..000000000 --- a/sdk/02_tutorial/05_claimer/index.md +++ /dev/null @@ -1,76 +0,0 @@ ---- -id: claimer -title: 👤 Claimer ---- - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -This section covers the steps undertaken by the Claimer. - -Here's an overview: - -1. [Create a DID](./01_did.md), which is the identity used to interact with Issuers and Verifiers. -2. Create a claim, request an attestation, and generate a credential using the attestation for our claim. -3. Present the claim to a Verifier. - -## What is a Claimer? - -Claimers are a crucial part of the Self-Sovereign Identity system. - -A Claimer is an individual or institution that makes a claim or statement about their identity or abilities. -They can use their identity credentials to prove these claims, and third-party institutions verify them. - -Anyone can be a Claimer. -All you need to do is complete a CType and create a claim. -Then, you can send these claims to Issuers for verification. - -They store their identity credentials in their digital wallets, so they decide which information to provide to which service. -They have full control over their data and decide which data to share, where, and how. - -You don't need to create a DID on the chain, meaning you are entirely independent! - -Claimers can use their accounts without needing a chain connection. - - -## Folder Structure - -Create the following files in the Claimer folder. -This folders serves to mimic a Claimer's perspective. - - - - - ```bash - └─ kilt-rocks/ # project - └─ claimer/ # all claimer code - ├─ createClaim.ts # creates a claim - ├─ createPresentation.ts # creates a presentation for verifiers - ├─ generateCredential.ts # create the credential object that is sent to the issuer for attestation - ├─ generateKeypairs.ts # create keypairs for the light DID - └─ generateLightDid.ts # create the light DID for the claimer - ``` - - ```bash - cd claimer && touch createClaim.ts createPresentation.ts generateCredential.ts generateKeypairs.ts generateLightDid.ts && cd .. - ``` - - - - - ```bash - └─ kilt-rocks/ # project - └─ claimer/ # all claimer code - ├─ createClaim.js # creates a claim - ├─ createPresentation.js # creates a presentation for verifiers - ├─ generateCredential.js # create the credential object that is sent to the issuer for attestation - ├─ generateKeypairs.js # create keypairs for the light DID - └─ generateLightDid.js # create the light DID for the claimer - ``` - - ```bash - cd claimer && touch createClaim.js createPresentation.js generateCredential.js generateKeypairs.js generateLightDid.js && cd .. - ``` - - - diff --git a/sdk/02_tutorial/04_issuer/02_did.md b/sdk/02_tutorial/05_issuer/02_did.md similarity index 52% rename from sdk/02_tutorial/04_issuer/02_did.md rename to sdk/02_tutorial/05_issuer/02_did.md index 72d69cf9c..dc9363f55 100644 --- a/sdk/02_tutorial/04_issuer/02_did.md +++ b/sdk/02_tutorial/05_issuer/02_did.md @@ -14,22 +14,15 @@ import GenerateDid from '!!raw-loader!@site/code_examples/sdk_examples/src/works The next step is to generate a KILT decentralized identifier (DID) using the account you created for the Issuer in [the previous step](./01_account.md). +A DID is a string uniquely identifying each KILT user. A DID may represent any entity, such as a person, an organization, or a machine. -A DID is a string uniquely identifying each KILT user. You can store information about a DID on the KILT chain, which is useful for different use cases. One use case is messaging. You could store a public encryption key and a service on chain, and a user can query both using a DID. Other users can now encrypt messages using your public encryption key and send a message to your service. -## Light and full DIDs - -Kilt supports two DID types: **light** and **full**. - -There are differences between the two types, but the most crucial is that you can use a light DID offline, but a full DID needs access to the blockchain to work. -Read the [DID documentation](/develop/sdk/cookbook/dids/light-did-creation) to learn more about the difference between the light and full types. - :::info KILT DID A DID supports four different key types: @@ -39,13 +32,13 @@ A DID supports four different key types: - An _assertion-method key pair_, used to write CTypes and attestations on chain - A _capability-delegation key pair_, used to write delegations on chain -You can replace keys over time, e.g., if a key becomes compromised. +You can replace keys over time, for example if a key becomes compromised. ::: -## What's the difference between a DID and an account? +## The difference between a DID and an account -A DID and an account sound quite similar, but there are some differences: +A DID and an account sound similar, but there are differences: - You record both to chain - You can have a DID without an account @@ -57,14 +50,35 @@ In summary, you register a DID on the blockchain by an account submitting the DI ## Create a DID -As an Issuer needs to interact with the chain, you must create a full DID. +As an Issuer needs to interact with the chain, you must create a DID. ### Write DID to chain -The KILT SDK provides multiple methods to create DIDs, this workshop highlights the `createFromAccount` method, that creates a DID from any pre-existing substrate-compatible account. +The KILT SDK provides the `createDid` method from the `DidHelpers` class to create a DID on the chain. It takes the following parameters: + +- `api`: The connection to the KILT blockchain. +- `signers`: An array of keys used for verification methods in the DID Document. For creating a DID, you only need the key for the authentication verification method. +- `submitter`: The account used to submit the transaction to the blockchain. + + :::caution + + The submitter account must have enough funds to cover the required storage deposit. + + ::: + +- `fromPublicKey`: The public key that features as the DID's initial authentication method and determines the DID identifier. + +The method returns a `TransactionHandler` type, which includes two methods: + +- `submit`: Submits a transaction for inclusion in a block on the blockchain. + + :::info + + The `submit()` method by default, waits for the block to be finalized. [You can override this behavior](https://kiltprotocol.github.io/sdk-js/interfaces/types_src.TransactionHandlers.html) by passing `false` to the `awaitFinalized` named parameter of the `submit` object. + + ::: + - - :::info Bring your own account @@ -72,49 +86,46 @@ This workshop assumes you followed the [create account step](./01_account.md), b ::: -Create and submit the extrinsic (aka transaction) that registers the DID. - - + {GenerateDid} -The `publicKeyToChain` helper method returns a public key of the correct type. - -The `txs` array holds the two transactions containing the extrinsics needed to submit to the chain for the Issuer's DID creation. - -The `createFromAccount` method takes the authenticated key of the account to attach the DID to, and the `setAttestationKey` method takes the same parameter to set the attestation key the DID needs and uses. + -An Issuer account needs to have an attestation key to write CTypes and attestations on chain. Use the `setAttestationKey` method to set this. For this example transaction, the Issuer account uses the `dispatchAs` proxy method to assign the attestation key to the same account. However, you can also use this method to assign the attestation key to another account. - -The `signAndSubmitTx` method then takes those transactions and submits them as a batch to the chain. +```typescript +export async function runAll() { + … + let issuerDid = await generateIssuerDid(submitterAccount, issuerAccount) +} +``` -## Run the code + -Now run the code with: +## Run code - ```bash - yarn ts-node ./issuer/generateDid.ts - ``` +```bash +yarn ts-node ./index.ts +``` - ```bash - node ./issuer/generateDid.js - ``` +```bash +node ./index.js +``` -Once you have run the script, the output should provide you with the `ATTESTER_DID_URI`. +Once you have run the script, the output should provide you with the `ISSUER_DID_URI`. The output should look like the following, but not identical since the code creates the DIDs from your account: ``` -ATTESTER_DID_URI="did:kilt:4ohMvUHsyeD…" +ISSUER_DID_URI="did:kilt:4ohMvUHsyeD…" ``` Save the values in the `.env` file, which should now look like the following: @@ -122,18 +133,8 @@ Save the values in the `.env` file, which should now look like the following: ```env title=".env" WSS_ADDRESS=wss://peregrine.kilt.io -ATTESTER_ACCOUNT_MNEMONIC="warrior icon use cry... -ATTESTER_ACCOUNT_ADDRESS=4ohMvUHsyeDhMVZF... -ATTESTER_DID_URI="did:kilt:4ohMvUHsyeD..." +ISSUER_ACCOUNT_ADDRESS=4ohMvUHsyeDhMVZF... +ISSUER_DID_URI="did:kilt:4ohMvUHsyeD..." ``` -Well done - You've generated a full DID! The next step is to create a CType! - -## Generate Keys - -Add the following code to the `generateKeypairs` file. - - - {GenerateKeypairs} - - +Well done - You've generated a full DID! The next step is to issue a credential. diff --git a/sdk/02_tutorial/04_issuer/03_ctype.md b/sdk/02_tutorial/05_issuer/03_issue_credential.md similarity index 53% rename from sdk/02_tutorial/04_issuer/03_ctype.md rename to sdk/02_tutorial/05_issuer/03_issue_credential.md index 15e3ea025..1d4935ae6 100644 --- a/sdk/02_tutorial/04_issuer/03_ctype.md +++ b/sdk/02_tutorial/05_issuer/03_issue_credential.md @@ -1,6 +1,6 @@ --- -id: ctype -title: CType +id: issue_credential +title: Issue a Credential --- import CodeBlock from '@theme/CodeBlock'; @@ -10,39 +10,28 @@ import TabItem from '@theme/TabItem'; import CtypeSchema from '!!raw-loader!@site/code_examples/sdk_examples/src/workshop/issuer/ctypeSchema.ts'; import GenerateCtype from '!!raw-loader!@site/code_examples/sdk_examples/src/workshop/issuer/generateCtype.ts'; - - import Ctype from '@site/scripts/out/ctype.json.raw!=!raw-loader!@site/scripts/out/ctype.json'; -A claim type (CType) is a KILT-specific term, but the concept is simple: +Before a holder can issue a presentation, the issuer needs to a issue a credential. To do this, you need a CType. + +A claim type (CType) is a KILT-specific term, but the concept is simple. A CType is a JSON schema that defines the structure of a claim, and you can think of it as the data model for your claim. :::info CType -A CType ensures that a credential contains all required attributes, e.g., a driver's license has to contain a name, date of birth, and the vehicle types that the claimer can drive. +A CType ensures that a credential contains all required attributes, e.g., a driver's license has to contain a name, date of birth, and the visas the holder has. The CType is important since a Verifier requests credentials for a specific CType. -For example, the traffic police want to see your driver's license, not your gym membership. +For example, the border police want to see your passport, not your gym membership. To learn more about CTypes, read the [in-depth CType documentation](/concepts/credentials/ctypes). You can also [read through existing CTypes in the CType-index](https://github.com/KILTprotocol/ctype-index). ::: Before the Issuer can attest credentials, they must decide which CType they support. -For example, a traffic authority only issues driver's licenses (A CType for driver's license), not a university diploma. - -Since CTypes enable interoperability between Issuers, using existing CTypes rather than creating new ones is highly recommended. -However, this workshop creates a new CType to show the process. - -Creating CTypes requires an account and a full DID. -Make sure your account holds KILT tokens so that you can pay the fees for creating a CType. -For example, a basic CType for a driver's license could look like this: - - - {Ctype} - +For example, a traffic authority only issues driver's licenses (A CType for driver's license), not a university diploma. -The CType has the following attributes: +A CType has the following attributes: | Key | Value | | -------------| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -53,68 +42,54 @@ The CType has the following attributes: | `type` | Type is an object for all CTypes. | | `additionalProperties` | The default is false. This restricts unwanted properties in a claim. | -A CType is stored on the KILT blockchain. - -In a real-world situation, a user would retrieve an existing CType from the chain or a CType registry. -For example, via a Credential Registry's REST API. +## Fetch CType -In this tutorial, the Issuer creates and attempts to store a CType on the KILT test blockchain. +The [CTypeHUB](https://ctypehub.galaniprojects.de) is a repository of useful CTypes, but there are others. This tutorial uses a CType from [the test CTypeHUB](https://test.ctypehub.galaniprojects.de). You can also create your own CTypes. -## Create CType +Fetch a CType using the `fetchFromChain` method, passing the `$id` of the CType you want to fetch. -Copy the following to define a `CType` with a given schema: - - - {CtypeSchema} - +## Create and issue credential -:::warning +Next the Issuer creates and issues a credential based on the CType using the `createCredential` method, setting their DID as the issuer and the fields and values to add into the credential. -As many people follow this workshop, using the CType schema defined above will result in a duplicate error when you run the code later. -To avoid this, change the value of `fromProperties` to something unique, such as adding your name to the "Drivers License" string. +Finally, issue the credential using the `issue` method passing the newly created credential. -::: - -## Get CType - -Copy the following to create a `CType` on the chain: - - - {GenerateCtype} + + {issueCredential} -The `ensureStoredCType` function takes the Issuer's account, DID, and a callback to sign the function and checks if the CType is already on chain. -It uses the `verifyStored` method to pass the CType to the KILT blockchain and make the check. -If it does not exist, it stores it on chain, using the `toChain` method to encode the CType into a unique hash and the `add` method to create a new CType from the given unique hash and associate it with the Issuer. -The function then uses the `authorizeTx` to authorize the transaction and `signAndSubmitTx` to sign and submit the transaction containing the new CType. - -:::warning + -Remember, an account must have the required amount of tokens to pay the transaction fee and deposit. +```typescript +export async function runAll() { + … + const credential = await issueCredential( + issuerDid.didDocument, + issuerDid.signers, + submitterAccount + ) +} +``` -::: + -## Run +## Run code - Run the `issuer/generateCtype.ts` file. - ```bash - yarn ts-node issuer/generateCtype.ts + yarn ts-node ./index.ts ``` - Run the `issuer/generateCtype.js` file. - ```bash - node issuer/generateCtype.js + node ./index.js ``` -Before you can attest Credentials, you need a Claimer to request it +Before you learn how to verify Credentials, you'll see how the Credential Holder retains control over their data by deciding what attributes they reveal in a Credential Presentation. \ No newline at end of file diff --git a/sdk/02_tutorial/04_issuer/_category_.json b/sdk/02_tutorial/05_issuer/_category_.json similarity index 100% rename from sdk/02_tutorial/04_issuer/_category_.json rename to sdk/02_tutorial/05_issuer/_category_.json diff --git a/sdk/02_tutorial/05_issuer/index.md b/sdk/02_tutorial/05_issuer/index.md new file mode 100644 index 000000000..022280fee --- /dev/null +++ b/sdk/02_tutorial/05_issuer/index.md @@ -0,0 +1,21 @@ +--- +id: issuer +title: 🏢 Issuer +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +This section of the workshop covers creating the Issuer code. The steps are the following: + +1. [Create an account](./01_account.md) to pay for all transactions and storage deposits. +2. [Create a DID](./02_did.md), which is the identity used to create Credentials. + + :::tip + + While you can pay deposits and fees with any KILT account you like, your DID stays the same and is the way Holders and Verifiers identify and trust you. + + ::: + +3. Before you can issue a Credential, [you need a CType](./03_ctype.md) that describes and gives context to what you attest. +4. Once you have a way to pay fees and deposits, have an identity, and a CType, [you can create issue a Credential](../06_issue_credential.md). diff --git a/sdk/02_tutorial/06_attestation.md b/sdk/02_tutorial/06_attestation.md deleted file mode 100644 index c55e6e25c..000000000 --- a/sdk/02_tutorial/06_attestation.md +++ /dev/null @@ -1,55 +0,0 @@ ---- -id: attestation -title: 🧾 Attestation ---- - -import TsJsBlock from '@site/src/components/TsJsBlock'; -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -import AttestCredential from '!!raw-loader!@site/code_examples/sdk_examples/src/workshop/issuer/issueCredential.ts'; - -This section covers how the Issuer receives and processes a `Credential` and how you can: - -- Attest or deny it -- Store the attestation information on the chain - -## Attest a Credential - - - {AttestCredential} - - -The `attestCredential` function loads the account and DID of the Issuer and issues an attestation for the credential received from the Claimer. -The credential is valid from the time an Issuer attests it on chain until the time it is revoked. - -In the `attestingFlow` function, the Claimer generates the demo credential and sends it to the Issuer. -The Issuer checks the attributes and either attests or denies the attestation if the attributes are invalid. -Once the attestation is written on the chain, the Issuer can share all or part of the attested credentials with verifiers. - -## Run - -Run the code from the command line: - - - - - ```bash - yarn ts-node issuer/attestCredential.ts - ``` - - - - - ```bash - node issuer/attestCredential.js - ``` - - - - -## Summary - -Your job as an Issuer is complete. You've attested a credential and written the attestation hash onto the chain. - -Let's move on to set up the Verifier! diff --git a/sdk/02_tutorial/06_holder/01_did.md b/sdk/02_tutorial/06_holder/01_did.md new file mode 100644 index 000000000..2afee2726 --- /dev/null +++ b/sdk/02_tutorial/06_holder/01_did.md @@ -0,0 +1,111 @@ +--- +id: did +title: DID +--- + +import CodeBlock from '@theme/CodeBlock'; +import TsJsBlock from '@site/src/components/TsJsBlock'; +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +import GenerateKeypairs from '!!raw-loader!@site/code_examples/sdk_examples/src/workshop/holder/generateKeypairs.ts'; +import GenerateLightDid from '!!raw-loader!@site/code_examples/sdk_examples/src/workshop/holder/generateLightDid.ts'; + +This section covers creating a DID using the account you created for the Holder. + +## Create a DID + +A Holder needs a DID to attach their credentials to and identify the subject of any claims. + +### Write DID to chain + +The KILT SDK provides the `createDid` method from the `DidHelpers` class to create a DID on the chain. It takes the following parameters: + +- `api`: The connection to the KILT blockchain. +- `signers`: An array of keys used for verification methods in the DID Document. For creating a DID, you only need the key for the authentication verification method. +- `submitter`: The account used to submit the transaction to the blockchain. + + :::caution + + The submitter account must have enough funds to cover the required storage deposit. + + ::: + +- `fromPublicKey`: The public key that features as the DID's initial authentication method and determines the DID identifier. + +The method returns a `TransactionHandler` type, which includes two methods: + +- `submit`: Submits a transaction for inclusion in a block on the blockchain. + + :::info + + The `submit()` method by default, waits for the block to be finalized. [You can override this behavior](https://kiltprotocol.github.io/sdk-js/interfaces/types_src.TransactionHandlers.html) by passing `false` as the second parameter. + + ::: + +- `getSubmittable`: Produces a transaction that you can submit to a blockchain node for inclusion, or to be signed and submitted by an external service. + +In this case, the example uses the `submit` method to submit the transaction to the chain. + + + +:::info Bring your own account + +This workshop assumes you followed the [create account step](./01_account.md), but if you have a pre-existing account, you can use that instead. + +::: + + + {GenerateHolderDid} + + + + +```typescript +export async function runAll() { + … + let holderDid = await generateHolderDid(submitterAccount, holderAccount) +} +``` + + + +## Run code + + + + + ```bash + yarn ts-node ./index.ts + ``` + + + + + ```bash + node ./index.js + ``` + + + + +Once you have run the script, the output should provide you with the `HOLDER_DID_URI`. + +The output should look like the following, but not identical since the code creates the DIDs from your account: + +``` +HOLDER_DID_URI="did:kilt:4ohMvUHsyeD…" +``` + +Save the values in the `.env` file, which should now look like the following: + +```env title=".env" +WSS_ADDRESS=wss://peregrine.kilt.io + +ISSUER_ACCOUNT_ADDRESS=4ohMvUHsyeDhMVZF... +ISSUER_DID_URI="did:kilt:4ohMvUHsyeD..." +HOLDER_ACCOUNT_ADDRESS=4ohMvUHsyeDhMVZF... +HOLDER_DID_URI="did:kilt:4ohMvUHsyeD..." +``` + +Now the Holder has a DID! The next step is to create a claim and a credential. diff --git a/sdk/02_tutorial/06_holder/02_create_presentation.md b/sdk/02_tutorial/06_holder/02_create_presentation.md new file mode 100644 index 000000000..54a10af67 --- /dev/null +++ b/sdk/02_tutorial/06_holder/02_create_presentation.md @@ -0,0 +1,81 @@ +--- +id: presentation +title: Create a presentation +--- + +import TsJsBlock from '@site/src/components/TsJsBlock'; +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +import CreateClaim from '!!raw-loader!@site/code_examples/sdk_examples/src/workshop/holder/createClaim.ts'; +import GenerateCredential from '!!raw-loader!@site/code_examples/sdk_examples/src/workshop/holder/generateCredential.ts'; + + +This section covers creating a presentation of a credential. + +KILT is a premissionless system. +Anyone or anything can claim something and attest to it. +But a verified credential only has value if the Verifier of the credential _trusts_ the Issuer of the credential. + +## Derive proof + +A verifier doesn't need to see all the data in a credential to verify only the parts relevant to a claim. + +The KILT SDK provides the `deriveProof` method from the `Holder` class to create a derived credential for presentation. It takes the following parameters: + +- The `credential` to derive the proof from. +- The `includeClaims` parameter of the `proofOptions` object where you add the credential paths to include in the proof. + +The method returns the derived credential as a `VerifiableCredential` object. + +## Create presentation + + +The KILT SDK provides the `createPresentation` method from the `Holder` class to create a credential presentation. It takes the following parameters: + +- `credential`: The derived credential. +- `holder`: The details object of the Holder. +- `presentationOptions`: An optional object holding parameters that allow defining when (e.g., how long) and under which circumstances the Credential Presentation is to be considered valid. These are important to ensure that a presentation is not taken out of context or (re-)used without your permission. + +The method returns a `VerifiablePresentation` that a Verifier can now verify. + + + {createPresentation} + + + + +```typescript +export async function runAll() { + … + const presentation = await createPresentation( + credential, + holderDid.didDocument, + holderDid.signers + ) +} +``` + + + +## Run code + + + + + ```bash + yarn ts-node ./index.ts + ``` + + + + + ```bash + node ./index.js + ``` + + + + +OK, you've issued a credential as an Issuer and created a presentation from it as a Holder. +The next step is to finish the Verifier and get the credential verified! diff --git a/sdk/02_tutorial/05_claimer/_category_.json b/sdk/02_tutorial/06_holder/_category_.json similarity index 100% rename from sdk/02_tutorial/05_claimer/_category_.json rename to sdk/02_tutorial/06_holder/_category_.json diff --git a/sdk/02_tutorial/06_holder/index.md b/sdk/02_tutorial/06_holder/index.md new file mode 100644 index 000000000..5aba117fb --- /dev/null +++ b/sdk/02_tutorial/06_holder/index.md @@ -0,0 +1,28 @@ +--- +id: holder +title: 👤 Holder +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +This section covers the steps undertaken by the Holder. + +Here's an overview: + +1. [Create a DID](./01_did.md), which is the identity used to interact with Issuers and Verifiers and receive a verifiable credential from an Issuer. +2. Create a copy of received credential with relevant data for presenter. +3. Present the claim to a Verifier. + +## What is a Holder? + +Holders are a crucial part of the Self-Sovereign Identity system. + +A Holder is an individual or institution that makes a claim or statement about their identity or abilities. +They can use their identity credentials to prove these claims, and third-party institutions verify them. + +Anyone with an account can be a Holder. +You need a DID, to complete a CType, and create a claim. + +They store their identity credentials in their digital wallets, so they decide which information to provide to which service. +They have full control over their data and decide which data to share, where, and how. \ No newline at end of file diff --git a/sdk/02_tutorial/07_verification.md b/sdk/02_tutorial/07_verification.md index 9fd62a61c..437af21b0 100644 --- a/sdk/02_tutorial/07_verification.md +++ b/sdk/02_tutorial/07_verification.md @@ -11,59 +11,71 @@ import TabItem from '@theme/TabItem'; import Verify from '!!raw-loader!@site/code_examples/sdk_examples/src/workshop/verify.ts'; import CreatePresentation from '!!raw-loader!@site/code_examples/sdk_examples/src/workshop/holder/createPresentation.ts'; + + In this section, you play the role of a Verifier that does the following: -1. Take a `Presentation` object supplied by a Claimer +:::info + +The Verifier also needs an account and DID, but the tutorial omits these steps. + +::: + +1. Take a `VerifiablePresentation` object supplied by a Holder 2. Verify that its data is correct -3. Verify that the attestation is valid, i.e., its hash exists on-chain and the attestation has not been revoked -4. Verify that the Claimer sending the `Credential` owns it +3. Verify that the Holder of the `Credential` has authorised and consented to its use in the current context by checking the presentation's signature and attributes. +4. Verify the authenticity and validity of the credential by checking its on-chain proof created by the Issuer and ensuring it hasn't been revoked since. -:::info Presentation object +:::info A VerifiablePresentation object -The Claimer uses a Credential to create the `Presentation` object. -Unlike the credential, a `Presentation` can hide some attributes that are not required by the Verifier and can contain a claimer-signed challenge. -A `Presentation` also contains a proof that the Claimer owns the credential. +The Holder uses a Credential to create an array of `VerifiablePresentation` objects. -::: +A `VerifiablePresentation` object contains an array of `VerifiableCredential` objects, a `holder` value, and a `proof` that the Holder owns the credential. -## Create Presentation +Each `VerifiableCredential` can hide or show properties, allowing for selective disclosure. -A Claimer needs to send more than a credential, as they also need to prove ownership of the credential. -A Claimer does this by creating a presentation and signing the Verifier's challenge. +::: - - {CreatePresentation} - +## Verify presentation + +The KILT SDK provides the `verifyPresentation` method from the `Verifier` class to verify a credential presentation. It takes the following parameters: -The `createPresentation` method returns a presentation, taking the credential, a callback to sign data, and the Verifier's challenge as input. +- `presentation`: The `VerifiableCredential` to verify. +- `verficationCriteria`: An object of criteria that need to pass to verify the presentation. These can be any combination of criteria. + -## Verify +The method returns an object with a `verified` boolean that indicates whether the presentation is valid. -The verification code exposes the `getChallenge` method which returns a random and unique challenge for the Claimer to sign. -This unique challenge is used to prove ownership. - - {Verify} + + {VerifyPresentation} -The `verifyPresentation` method performs the actual verification, taking a presentation and the Claimer's challenge as input. + -## Run +```typescript +export async function runAll() { + … + await verifyPresentation(presentation, verifierDid.didDocument) +} +``` + + -Run the code from the command line: +## Run code ```bash - yarn ts-node verify.ts + yarn ts-node ./index.ts ``` ```bash - node verify.js + node ./index.js ``` diff --git a/sdk/02_tutorial/08_done.md b/sdk/02_tutorial/08_done.md index 286d3022f..51da81567 100644 --- a/sdk/02_tutorial/08_done.md +++ b/sdk/02_tutorial/08_done.md @@ -11,7 +11,7 @@ You now understand the main actors in KILT, the `Claimers`, `Issuers` and `Verif You have also learned how to: - create accounts -- create light and full DIDs +- create DIDs - create claims and attestation requests - process requests and attest credentials - generate and sign credential presentations