diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml deleted file mode 100644 index b83402347..000000000 --- a/.github/workflows/deploy-docs.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: deploy - -on: - workflow_run: - workflows: ['test-code-examples'] - branches: [master] - types: - - completed - -jobs: - gh-release: - if: (github.event_name != 'pull_request' && github.event.workflow_run.conclusion == 'success') - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version-file: '.nvmrc' - cache: 'yarn' - - uses: webfactory/ssh-agent@v0.7.0 - with: - ssh-private-key: ${{ secrets.GH_PAGES_DEPLOY }} - - name: Release to GitHub Pages - env: - USE_SSH: true - GIT_USER: git - run: | - git config --global user.email "actions@github.com" - git config --global user.name "gh-actions" - yarn install --frozen-lockfile - yarn run deploy diff --git a/code_examples/sdk_examples/package.json b/code_examples/sdk_examples/package.json index 6edd12b47..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/dapp/index.ts b/code_examples/sdk_examples/src/dapp/index.ts index f5afed159..61916aa95 100644 --- a/code_examples/sdk_examples/src/dapp/index.ts +++ b/code_examples/sdk_examples/src/dapp/index.ts @@ -1,9 +1,9 @@ import * as Kilt from '@kiltprotocol/sdk-js' import { main as attestCredential } from './dapp/04_attest_credential' -import { createFullDid } from '../workshop/attester/generateDid' +import { createFullDid } from '../workshop/issuer/generateDid' import { main as formatCredential } from './dapp/05_format_credential' -import { generateAccount } from '../workshop/attester/generateAccount' -import { generateKeypairs as generateAttesterKeypairs } from '../workshop/attester/generateKeypairs' +import { generateAccount } from '../workshop/issuer/generateAccount' +import { generateKeypairs as generateAttesterKeypairs } from '../workshop/issuer/generateKeypairs' import { main as getDomainLinkageCType } from './dapp/01_domain_linkage_ctype' import { main as getDomainLinkageCredential } from './dapp/02_domain_linkage_claim' import { getFunds } from '../getFunds' 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/index.ts b/code_examples/sdk_examples/src/workshop/index.ts index 1dc8ff550..7607a08ce 100644 --- a/code_examples/sdk_examples/src/workshop/index.ts +++ b/code_examples/sdk_examples/src/workshop/index.ts @@ -1,70 +1,393 @@ -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 './attester/attestCredential' -import { createFullDid } from './attester/generateDid' -import { ensureStoredCtype } from './attester/generateCtype' -import { generateAccount } from './attester/generateAccount' -import { generateKeypairs as generateAttesterKeypairs } from './attester/generateKeypairs' -import { generateKeypairs as generateClaimerKeypairs } from './claimer/generateKeypairs' -import { generateCredential } from './claimer/generateCredential' -import { generateLightDid } from './claimer/generateLightDid' +import * as Kilt from '@kiltprotocol/sdk-js' +import { CType } from '@kiltprotocol/credentials' +// TODO: Look into tidier way with PD Keyring… import { getFunds } from '../getFunds' -import { verificationFlow } from './verify' -export async function testWorkshop( - account: Kilt.KeyringPair, - wssAddress: string +export function generateAccounts() { + const issuerAccount = Kilt.generateKeypair({ type: 'ed25519' }) + const submitterAccount = Kilt.generateKeypair({ type: 'ed25519' }) + const holderAccount = Kilt.generateKeypair({ type: 'ed25519' }) + const verifierAccount = Kilt.generateKeypair({ type: 'ed25519' }) + + console.log('keypair generation complete') + console.log(`ISSUER_ACCOUNT_ADDRESS=${issuerAccount.publicKeyMultibase}`) + console.log( + `SUBMITTER_ACCOUNT_ADDRESS=${submitterAccount.publicKeyMultibase}` + ) + console.log(`HOLDER_ACCOUNT_ADDRESS=${holderAccount.publicKeyMultibase}`) + + return { issuerAccount, submitterAccount, holderAccount, verifierAccount } +} + +export async function generateIssuerDid( + 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(`ISSUER_DID_URI=${didDocument.id}`) + // 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.id}`) + // 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 ) { - console.log('Running the workshop!') + const api = Kilt.ConfigService.get('api') - Kilt.ConfigService.set({ submitTxResolveOn: Kilt.Blockchain.IS_IN_BLOCK }) - await Kilt.connect(wssAddress) + 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') + } - // Setup attester account. - const { account: attesterAccount } = await generateAccount() + 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 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) - await getFunds(account, attesterAccount.address, 5) + console.log('assertion method added') + return { didDocument, signers } +} +// TODO: Add into tutorial. Actually does it make sense? +export async function claimWeb3Name(submitterAccount, didDocument, signers) { + const api = Kilt.ConfigService.get('api') - // Create attester DID & ensure CType. - const { fullDid: attesterDid } = await createFullDid(attesterAccount) - const { assertionMethod } = generateAttesterKeypairs() + const claimW3nTransactionResult = await Kilt.DidHelpers.claimWeb3Name({ + api, + didDocument, + submitter: submitterAccount, + signers, + name: 'testtest7865348999' + }).submit() - await ensureStoredCtype( - attesterAccount, - attesterDid.uri, - async ({ data }) => ({ - signature: assertionMethod.sign(data), - keyType: assertionMethod.type - }) + if (claimW3nTransactionResult.status !== 'confirmed') { + throw new Error('claim web3name failed') + } + + // The didDocument now contains an `alsoKnownAs` entry. + ;({ didDocument } = claimW3nTransactionResult.asConfirmed) + console.log('w3n claimed') + return { didDocument, signers } +} + +// Issuer +export async function issueCredential(issuerDid, holderDid, 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: issuerDid.id, + credentialSubject: { + id: holderDid.id, + age: 22 + }, + cType: passportCType.cType + }) + + const credential = await Kilt.Issuer.issue({ + credential: passportCredential, + issuer: { + didDocument: issuerDid, + signers: [...signers, submitterAccount], + submitter: submitterAccount + } + }) + + console.log('credential issued') + return credential +} + +export async function createPresentation(credential, didDocument, signers) { + const derived = await Kilt.Holder.deriveProof({ + credential, + 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 +) { + // TODO: Need more now to tear down all created assets + 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) { + 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) { + 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) { + 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() { + 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, verifierAccount } = generateAccounts() + + await getFunds(faucetAccount, submitterAccount, 10) + 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 + ) + issuerDid = await claimWeb3Name( + submitterAccount, + issuerDid.didDocument, + issuerDid.signers ) - await verificationFlow( + const credential = await issueCredential( + issuerDid.didDocument, + holderDid.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 + ) + + await api.disconnect() + + console.log('disconnected') } + +runAll() 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/tsconfig.json b/code_examples/sdk_examples/tsconfig.json index 02f3c8178..749f4a913 100644 --- a/code_examples/sdk_examples/tsconfig.json +++ b/code_examples/sdk_examples/tsconfig.json @@ -6,6 +6,9 @@ "target": "ES2020" }, "exclude": [ - "src/test.ts" + "src/test.ts", + "src/core_features", + "src/dapp", + "src/staking" ] } diff --git a/code_examples/sdk_examples/yarn.lock b/code_examples/sdk_examples/yarn.lock index f55ce2843..a7d4a5794 100644 --- a/code_examples/sdk_examples/yarn.lock +++ b/code_examples/sdk_examples/yarn.lock @@ -2,15 +2,10 @@ # yarn lockfile v1 -"@aashutoshrathi/word-wrap@^1.2.3": - version "1.2.6" - resolved "https://registry.yarnpkg.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz#bd9154aec9983f77b3a034ecaa015c2e4201f6cf" - integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA== - "@adraffy/ens-normalize@^1.8.8": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@adraffy/ens-normalize/-/ens-normalize-1.9.0.tgz#223572538f6bea336750039bb43a4016dcc8182d" - integrity sha512-iowxq3U30sghZotgl4s/oJRci6WPBfNO5YYgk2cIOMCHr3LeGPcsZjCEr+33Q4N+oV3OABDAtA+pyvWjbvBifQ== + 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" @@ -19,19 +14,20 @@ dependencies: "@babel/highlight" "^7.10.4" -"@babel/helper-validator-identifier@^7.18.6": - version "7.19.1" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2" - integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w== +"@babel/helper-validator-identifier@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz#75b889cfaf9e35c2aaf42cf0d72c8e91719251db" + integrity sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w== "@babel/highlight@^7.10.4": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" - integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g== + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.7.tgz#a05ab1df134b286558aae0ed41e6c5f731bf409d" + integrity sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw== dependencies: - "@babel/helper-validator-identifier" "^7.18.6" - chalk "^2.0.0" + "@babel/helper-validator-identifier" "^7.24.7" + chalk "^2.4.2" js-tokens "^4.0.0" + picocolors "^1.0.0" "@cspotcode/source-map-support@^0.8.0": version "0.8.1" @@ -40,248 +36,103 @@ 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.9.1" - resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.9.1.tgz#449dfa81a57a1d755b09aa58d826c1262e4283b4" - integrity sha512-Y27x+MBLjXa+0JWDhykM3+JE+il3kHKAEqabfEWq3SDhZjLYb6/BHL/JKFnH3fe207JaXkyDo685Oc2Glt6ifA== +"@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/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@^2.1.2": - version "2.1.2" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.2.tgz#c6936b4b328c64496692f76944e755738be62396" - integrity sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g== +"@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.51.0": - version "8.51.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.51.0.tgz#6d419c240cfb2b66da37df230f7e7eef801c32fa" - integrity sha512-HxjQ8Qn+4SI3/AFv6sOrDB+g6PpUTDwSJiQqOrnneEk8L71161srI9gjzzZvYVbzHiVg/BvcH95+cK/zfIt4pg== +"@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" resolved "https://registry.yarnpkg.com/@ethereumjs/rlp/-/rlp-4.0.1.tgz#626fabfd9081baab3d0a3074b0c7ecaf674aaa41" integrity sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw== -"@ethersproject/abi@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.7.0.tgz#b3f3e045bbbeed1af3947335c247ad625a44e449" - integrity sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA== - dependencies: - "@ethersproject/address" "^5.7.0" - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/constants" "^5.7.0" - "@ethersproject/hash" "^5.7.0" - "@ethersproject/keccak256" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/strings" "^5.7.0" - -"@ethersproject/abstract-provider@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.7.0.tgz#b0a8550f88b6bf9d51f90e4795d48294630cb9ef" - integrity sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw== - dependencies: - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/networks" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/transactions" "^5.7.0" - "@ethersproject/web" "^5.7.0" - -"@ethersproject/abstract-signer@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.7.0.tgz#13f4f32117868452191a4649723cb086d2b596b2" - integrity sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ== - dependencies: - "@ethersproject/abstract-provider" "^5.7.0" - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - -"@ethersproject/address@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.7.0.tgz#19b56c4d74a3b0a46bfdbb6cfcc0a153fc697f37" - integrity sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA== - dependencies: - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/keccak256" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/rlp" "^5.7.0" - -"@ethersproject/base64@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.7.0.tgz#ac4ee92aa36c1628173e221d0d01f53692059e1c" - integrity sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ== - dependencies: - "@ethersproject/bytes" "^5.7.0" - -"@ethersproject/bignumber@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.7.0.tgz#e2f03837f268ba655ffba03a57853e18a18dc9c2" - integrity sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw== - dependencies: - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - bn.js "^5.2.1" - -"@ethersproject/bytes@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.7.0.tgz#a00f6ea8d7e7534d6d87f47188af1148d71f155d" - integrity sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A== - dependencies: - "@ethersproject/logger" "^5.7.0" - -"@ethersproject/constants@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.7.0.tgz#df80a9705a7e08984161f09014ea012d1c75295e" - integrity sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA== - dependencies: - "@ethersproject/bignumber" "^5.7.0" - -"@ethersproject/hash@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.7.0.tgz#eb7aca84a588508369562e16e514b539ba5240a7" - integrity sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g== - dependencies: - "@ethersproject/abstract-signer" "^5.7.0" - "@ethersproject/address" "^5.7.0" - "@ethersproject/base64" "^5.7.0" - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/keccak256" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/strings" "^5.7.0" - -"@ethersproject/keccak256@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.7.0.tgz#3186350c6e1cd6aba7940384ec7d6d9db01f335a" - integrity sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg== - dependencies: - "@ethersproject/bytes" "^5.7.0" - js-sha3 "0.8.0" - -"@ethersproject/logger@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.7.0.tgz#6ce9ae168e74fecf287be17062b590852c311892" - integrity sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig== - -"@ethersproject/networks@^5.7.0": - version "5.7.1" - resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.7.1.tgz#118e1a981d757d45ccea6bb58d9fd3d9db14ead6" - integrity sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ== - dependencies: - "@ethersproject/logger" "^5.7.0" - -"@ethersproject/properties@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.7.0.tgz#a6e12cb0439b878aaf470f1902a176033067ed30" - integrity sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw== - dependencies: - "@ethersproject/logger" "^5.7.0" - -"@ethersproject/rlp@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.7.0.tgz#de39e4d5918b9d74d46de93af80b7685a9c21304" - integrity sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w== - dependencies: - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - -"@ethersproject/signing-key@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.7.0.tgz#06b2df39411b00bc57c7c09b01d1e41cf1b16ab3" - integrity sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q== - dependencies: - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - bn.js "^5.2.1" - elliptic "6.5.4" - hash.js "1.1.7" - -"@ethersproject/strings@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.7.0.tgz#54c9d2a7c57ae8f1205c88a9d3a56471e14d5ed2" - integrity sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg== - dependencies: - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/constants" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - -"@ethersproject/transactions@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.7.0.tgz#91318fc24063e057885a6af13fdb703e1f993d3b" - integrity sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ== - dependencies: - "@ethersproject/address" "^5.7.0" - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/constants" "^5.7.0" - "@ethersproject/keccak256" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/rlp" "^5.7.0" - "@ethersproject/signing-key" "^5.7.0" - -"@ethersproject/web@^5.7.0": - version "5.7.1" - resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.7.1.tgz#de1f285b373149bee5928f4eb7bcb87ee5fbb4ae" - integrity sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w== - dependencies: - "@ethersproject/base64" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/strings" "^5.7.0" - -"@humanwhocodes/config-array@^0.11.11": - version "0.11.11" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.11.tgz#88a04c570dbbc7dd943e4712429c3df09bc32844" - integrity sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA== - dependencies: - "@humanwhocodes/object-schema" "^1.2.1" - debug "^4.1.1" - minimatch "^3.0.5" +"@ethereumjs/rlp@^5.0.2": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@ethereumjs/rlp/-/rlp-5.0.2.tgz#c89bd82f2f3bec248ab2d517ae25f5bbc4aac842" + integrity sha512-DziebCdg4JpGlEqEdGgXmjqcFoJi+JGulUXwEjsZGAscAQ7MyD/7LE/GVCP29vEQxKc7AAwjT3A2ywHp2xfoCA== "@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@^1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" - integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== +"@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.1" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721" - integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA== + version "3.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" + integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== "@jridgewell/sourcemap-codec@^1.4.10": - version "1.4.15" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" - integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== + version "1.5.0" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz#3188bcb273a414b0d215fd22a58540b989b9409a" + integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ== "@jridgewell/trace-mapping@0.3.9": version "0.3.9" @@ -291,153 +142,159 @@ "@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/config" "0.100.0" + "@kiltprotocol/types" "0.100.0" + "@kiltprotocol/utils" "0.100.0" + +"@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/types" "0.35.0" - "@kiltprotocol/utils" "0.35.0" + "@kiltprotocol/types" "0.100.0" + typescript-logging "^1.0.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/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/type-definitions" "0.35.0" + "@kiltprotocol/jcs-data-integrity-proofs-common" "^0.1.0" + "@noble/curves" "^1.0.0" + "@scure/base" "^1.1.1" -"@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/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/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/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: - "@kiltprotocol/types" "0.35.0" - "@polkadot/api" "^10.7.3" - typescript-logging "^1.0.0" + "@noble/hashes" "^1.3.0" + canonicalize "^2.0.0" + varint "^6.0.0" -"@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/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.1.0", "@noble/curves@~1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.1.0.tgz#f13fc667c89184bc04cccb9b11e8e7bae27d8c3d" - integrity sha512-091oBExgENk/kGj3AZmtBDMpxQPDtxQABR2B9lb1JbVTs6ytdzZNwvhxQ4MWasRNEzlbEH8jCWFCwhF/Obj5AA== +"@noble/curves@1.4.2", "@noble/curves@~1.4.0": + version "1.4.2" + resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.4.2.tgz#40309198c76ed71bc6dbf7ba24e81ceb4d0d1fe9" + integrity sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw== dependencies: - "@noble/hashes" "1.3.1" + "@noble/hashes" "1.4.0" -"@noble/curves@^1.3.0": - version "1.3.0" - resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.3.0.tgz#01be46da4fd195822dab821e72f71bf4aeec635e" - integrity sha512-t01iSXPuN+Eqzb4eBX0S5oubSqXbK/xXa1Ne18Hj8f9pStxztHCE2gfboSp/dZRLSqfuLpRK2nDXDK+W9puocA== +"@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== dependencies: - "@noble/hashes" "1.3.3" + "@noble/hashes" "1.5.0" -"@noble/hashes@1.3.1": - version "1.3.1" - resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.1.tgz#8831ef002114670c603c458ab8b11328406953a9" - integrity sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA== +"@noble/hashes@1.4.0", "@noble/hashes@~1.4.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.4.0.tgz#45814aa329f30e4fe0ba49426f49dfccdd066426" + integrity sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg== -"@noble/hashes@1.3.3", "@noble/hashes@^1.3.3", "@noble/hashes@~1.3.0", "@noble/hashes@~1.3.1": - version "1.3.3" - resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.3.tgz#39908da56a4adc270147bb07968bf3b16cfe1699" - integrity sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA== +"@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== "@nodelib/fs.scandir@2.1.5": version "2.1.5" @@ -460,232 +317,275 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@pkgr/utils@^2.3.1": - version "2.4.2" - resolved "https://registry.yarnpkg.com/@pkgr/utils/-/utils-2.4.2.tgz#9e638bbe9a6a6f165580dc943f138fd3309a2cbc" - integrity sha512-POgTXhjrTfbTV63DiFXav4lBHiICLKKwDeaKn9Nphwj7WH6m0hMMCaJkMyRWjgtPFyRKRVoMXXjczsTQRDEhYw== - dependencies: - cross-spawn "^7.0.3" - fast-glob "^3.3.0" - is-glob "^4.0.3" - open "^9.1.0" - picocolors "^1.0.0" - tslib "^2.6.0" - -"@polkadot/api-augment@10.11.2": - version "10.11.2" - resolved "https://registry.yarnpkg.com/@polkadot/api-augment/-/api-augment-10.11.2.tgz#9ea6f3a25edb61a03d571f06f6ec87ced6d29a2a" - integrity sha512-PTpnqpezc75qBqUtgrc0GYB8h9UHjfbHSRZamAbecIVAJ2/zc6CqtnldeaBlIu1IKTgBzi3FFtTyYu+ZGbNT2Q== - dependencies: - "@polkadot/api-base" "10.11.2" - "@polkadot/rpc-augment" "10.11.2" - "@polkadot/types" "10.11.2" - "@polkadot/types-augment" "10.11.2" - "@polkadot/types-codec" "10.11.2" - "@polkadot/util" "^12.6.2" - tslib "^2.6.2" - -"@polkadot/api-base@10.11.2": - version "10.11.2" - resolved "https://registry.yarnpkg.com/@polkadot/api-base/-/api-base-10.11.2.tgz#135de5ab83769a1fd3ad9f845f27338a65b0ffe3" - integrity sha512-4LIjaUfO9nOzilxo7XqzYKCNMtmUypdk8oHPdrRnSjKEsnK7vDsNi+979z2KXNXd2KFSCFHENmI523fYnMnReg== - dependencies: - "@polkadot/rpc-core" "10.11.2" - "@polkadot/types" "10.11.2" - "@polkadot/util" "^12.6.2" - rxjs "^7.8.1" - tslib "^2.6.2" +"@pkgr/core@^0.1.0": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.1.1.tgz#1ec17e2edbec25c8306d424ecfbf13c7de1aaa31" + integrity sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA== -"@polkadot/api-derive@10.11.2": - version "10.11.2" - resolved "https://registry.yarnpkg.com/@polkadot/api-derive/-/api-derive-10.11.2.tgz#eb9e3f681ef3dda88ee2dfa538a6bded937de77e" - integrity sha512-m3BQbPionkd1iSlknddxnL2hDtolPIsT+aRyrtn4zgMRPoLjHFmTmovvg8RaUyYofJtZeYrnjMw0mdxiSXx7eA== - dependencies: - "@polkadot/api" "10.11.2" - "@polkadot/api-augment" "10.11.2" - "@polkadot/api-base" "10.11.2" - "@polkadot/rpc-core" "10.11.2" - "@polkadot/types" "10.11.2" - "@polkadot/types-codec" "10.11.2" - "@polkadot/util" "^12.6.2" - "@polkadot/util-crypto" "^12.6.2" - rxjs "^7.8.1" - tslib "^2.6.2" +"@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@10.11.2", "@polkadot/api@^10.7.3": - version "10.11.2" - resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-10.11.2.tgz#16cd07062d51cc9cf77a3a6afa3cb4e526e44a82" - integrity sha512-AorCZxCWCoTtdbl4DPUZh+ACe/pbLIS1BkdQY0AFJuZllm0x/yWzjgampcPd5jQAA/O3iKShRBkZqj6Mk9yG/A== - dependencies: - "@polkadot/api-augment" "10.11.2" - "@polkadot/api-base" "10.11.2" - "@polkadot/api-derive" "10.11.2" - "@polkadot/keyring" "^12.6.2" - "@polkadot/rpc-augment" "10.11.2" - "@polkadot/rpc-core" "10.11.2" - "@polkadot/rpc-provider" "10.11.2" - "@polkadot/types" "10.11.2" - "@polkadot/types-augment" "10.11.2" - "@polkadot/types-codec" "10.11.2" - "@polkadot/types-create" "10.11.2" - "@polkadot/types-known" "10.11.2" - "@polkadot/util" "^12.6.2" - "@polkadot/util-crypto" "^12.6.2" - eventemitter3 "^5.0.1" - rxjs "^7.8.1" - tslib "^2.6.2" +"@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/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== +"@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/util" "12.6.2" - "@polkadot/util-crypto" "12.6.2" - tslib "^2.6.2" + "@polkadot-api/substrate-bindings" "0.6.0" + "@polkadot-api/utils" "0.1.0" -"@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== +"@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/util" "12.6.2" - "@substrate/ss58-registry" "^1.44.0" - tslib "^2.6.2" + "@polkadot-api/metadata-builders" "0.3.2" + "@polkadot-api/substrate-bindings" "0.6.0" + "@polkadot-api/utils" "0.1.0" -"@polkadot/rpc-augment@10.11.2": - version "10.11.2" - resolved "https://registry.yarnpkg.com/@polkadot/rpc-augment/-/rpc-augment-10.11.2.tgz#4458ee62bd95cd1f016f097f607767d1e6dfc709" - integrity sha512-9AhT0WW81/8jYbRcAC6PRmuxXqNhJje8OYiulBQHbG1DTCcjAfz+6VQBke9BwTStzPq7d526+yyBKD17O3zlAA== +"@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: - "@polkadot/rpc-core" "10.11.2" - "@polkadot/types" "10.11.2" - "@polkadot/types-codec" "10.11.2" - "@polkadot/util" "^12.6.2" - tslib "^2.6.2" + "@noble/hashes" "^1.3.1" + "@polkadot-api/utils" "0.1.0" + "@scure/base" "^1.1.1" + scale-ts "^1.6.0" -"@polkadot/rpc-core@10.11.2": - version "10.11.2" - resolved "https://registry.yarnpkg.com/@polkadot/rpc-core/-/rpc-core-10.11.2.tgz#a63ef288133d32abfeff8e80a94d3787e91e87be" - integrity sha512-Ot0CFLWx8sZhLZog20WDuniPA01Bk2StNDsdAQgcFKPwZw6ShPaZQCHuKLQK6I6DodOrem9FXX7c1hvoKJP5Ww== +"@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-augment" "10.11.2" - "@polkadot/rpc-provider" "10.11.2" - "@polkadot/types" "10.11.2" - "@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/rpc-provider@10.11.2": - version "10.11.2" - resolved "https://registry.yarnpkg.com/@polkadot/rpc-provider/-/rpc-provider-10.11.2.tgz#b50a11d4baffa39519f786951e68d8c4953672a8" - integrity sha512-he5jWMpDJp7e+vUzTZDzpkB7ps3H8psRally+/ZvZZScPvFEjfczT7I1WWY9h58s8+ImeVP/lkXjL9h/gUOt3Q== - dependencies: - "@polkadot/keyring" "^12.6.2" - "@polkadot/types" "10.11.2" - "@polkadot/types-support" "10.11.2" - "@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" +"@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.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.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.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.4.0" - tslib "^2.6.2" + nock "^13.5.4" + tslib "^2.6.3" optionalDependencies: - "@substrate/connect" "0.7.35" - -"@polkadot/types-augment@10.11.2": - version "10.11.2" - resolved "https://registry.yarnpkg.com/@polkadot/types-augment/-/types-augment-10.11.2.tgz#197b24f2c85c9ca483d5cb6d2acc06f42c707abd" - integrity sha512-8eB8ew04wZiE5GnmFvEFW1euJWmF62SGxb1O+8wL3zoUtB9Xgo1vB6w6xbTrd+HLV6jNSeXXnbbF1BEUvi9cNg== - dependencies: - "@polkadot/types" "10.11.2" - "@polkadot/types-codec" "10.11.2" - "@polkadot/util" "^12.6.2" - tslib "^2.6.2" - -"@polkadot/types-codec@10.11.2", "@polkadot/types-codec@^10.7.3": - version "10.11.2" - resolved "https://registry.yarnpkg.com/@polkadot/types-codec/-/types-codec-10.11.2.tgz#e4570f8c92ffad090fb1d04a94731979537ced33" - integrity sha512-3xjOQL+LOOMzYqlgP9ROL0FQnzU8lGflgYewzau7AsDlFziSEtb49a9BpYo6zil4koC+QB8zQ9OHGFumG08T8w== - dependencies: - "@polkadot/util" "^12.6.2" - "@polkadot/x-bigint" "^12.6.2" - tslib "^2.6.2" - -"@polkadot/types-create@10.11.2": - version "10.11.2" - resolved "https://registry.yarnpkg.com/@polkadot/types-create/-/types-create-10.11.2.tgz#dfd52cdde45619c90f42ec4c681bc5ec8d9e6f43" - integrity sha512-SJt23NxYvefRxVZZm6mT9ed1pR6FDoIGQ3xUpbjhTLfU2wuhpKjekMVorYQ6z/gK2JLMu2kV92Ardsz+6GX5XQ== - dependencies: - "@polkadot/types-codec" "10.11.2" - "@polkadot/util" "^12.6.2" - tslib "^2.6.2" - -"@polkadot/types-known@10.11.2": - version "10.11.2" - resolved "https://registry.yarnpkg.com/@polkadot/types-known/-/types-known-10.11.2.tgz#2ce647b0dd49dec07032547a53d7aa30208a825f" - integrity sha512-kbEIX7NUQFxpDB0FFGNyXX/odY7jbp56RGD+Z4A731fW2xh/DgAQrI994xTzuh0c0EqPE26oQm3kATSpseqo9w== - dependencies: - "@polkadot/networks" "^12.6.2" - "@polkadot/types" "10.11.2" - "@polkadot/types-codec" "10.11.2" - "@polkadot/types-create" "10.11.2" - "@polkadot/util" "^12.6.2" - tslib "^2.6.2" - -"@polkadot/types-support@10.11.2": - version "10.11.2" - resolved "https://registry.yarnpkg.com/@polkadot/types-support/-/types-support-10.11.2.tgz#3ab2252688ea50dbb35055789d0b775b0f5a7b2f" - integrity sha512-X11hoykFYv/3efg4coZy2hUOUc97JhjQMJLzDhHniFwGLlYU8MeLnPdCVGkXx0xDDjTo4/ptS1XpZ5HYcg+gRw== - dependencies: - "@polkadot/util" "^12.6.2" - tslib "^2.6.2" - -"@polkadot/types@10.11.2", "@polkadot/types@^10.4.0", "@polkadot/types@^10.7.3": - version "10.11.2" - resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-10.11.2.tgz#3317b6fcee53bbfba7bf654413f93ccd742c478e" - integrity sha512-d52j3xXni+C8GdYZVTSfu8ROAnzXFMlyRvXtor0PudUc8UQHOaC4+mYAkTBGA2gKdmL8MHSfRSbhcxHhsikY6Q== - dependencies: - "@polkadot/keyring" "^12.6.2" - "@polkadot/types-augment" "10.11.2" - "@polkadot/types-codec" "10.11.2" - "@polkadot/types-create" "10.11.2" - "@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" @@ -740,107 +640,132 @@ 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" -"@scure/base@^1.1.5", "@scure/base@~1.1.0": - version "1.1.5" - resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.5.tgz#1d85d17269fe97694b9c592552dd9e5e33552157" - integrity sha512-Brj9FiG2W1MRQSTB212YVPRrcbjkv48FoZi/u4l/zds/ieRrqsh7aUf6CLwkAq61oKXr/ZlTzlY66gLIj3TFTQ== +"@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/bip32@1.3.1": - version "1.3.1" - resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.3.1.tgz#7248aea723667f98160f593d621c47e208ccbb10" - integrity sha512-osvveYtyzdEVbt3OfwwXFr4P2iVBL5u1Q3q4ONBfDY/UpOuXmOlbgwc1xECEboY8wIays8Yt6onaWMUdUbfl0A== +"@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" + resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.4.0.tgz#4e1f1e196abedcef395b33b9674a042524e20d67" + integrity sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg== dependencies: - "@noble/curves" "~1.1.0" - "@noble/hashes" "~1.3.1" - "@scure/base" "~1.1.0" + "@noble/curves" "~1.4.0" + "@noble/hashes" "~1.4.0" + "@scure/base" "~1.1.6" -"@scure/bip39@1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.2.1.tgz#5cee8978656b272a917b7871c981e0541ad6ac2a" - integrity sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg== +"@scure/bip39@1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.3.0.tgz#0f258c16823ddd00739461ac31398b4e7d6a18c3" + integrity sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ== dependencies: - "@noble/hashes" "~1.3.0" - "@scure/base" "~1.1.0" + "@noble/hashes" "~1.4.0" + "@scure/base" "~1.1.6" -"@substrate/connect-extension-protocol@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@substrate/connect-extension-protocol/-/connect-extension-protocol-1.0.1.tgz#fa5738039586c648013caa6a0c95c43265dbe77d" - integrity sha512-161JhCC1csjH3GE5mPLEd7HbWtwNSPJBg3p1Ksz9SFlTzj/bgEwudiRN2y5i0MoLGCIJRYKyKGMxVnd29PzNjg== +"@substrate/connect-extension-protocol@^2.0.0": + version "2.1.0" + 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.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.7.35": - version "0.7.35" - resolved "https://registry.yarnpkg.com/@substrate/connect/-/connect-0.7.35.tgz#853d8ff50717a8c9ee8f219d11a86e61a54b88b8" - integrity sha512-Io8vkalbwaye+7yXfG1Nj52tOOoJln2bMlc7Q9Yy3vEWqZEVkgKmcPVzbwV0CWL3QD+KMPDA2Dnw/X7EdwgoLw== +"@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" "^1.0.1" - smoldot "2.0.7" + "@substrate/connect-extension-protocol" "^2.0.0" + "@substrate/connect-known-chains" "^1.1.5" + "@substrate/light-client-extension-helpers" "^1.0.0" + smoldot "2.0.26" -"@substrate/ss58-registry@^1.44.0": - version "1.46.0" - resolved "https://registry.yarnpkg.com/@substrate/ss58-registry/-/ss58-registry-1.46.0.tgz#bfe3e6a30d39929f57ecc178acde4e74a773e2b6" - integrity sha512-rBvWnlrBeFTd5LVG7oX3rOHzR16yqyffOFHKmUiVcblpXI3D89CXOvAljW9tWlA1H/2/FegaZnHPhdObPsvi+w== +"@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.5" + rxjs "^7.8.1" + +"@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== "@tsconfig/node10@^1.0.7": - version "1.0.9" - resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2" - integrity sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA== + version "1.0.11" + resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.11.tgz#6ee46400685f130e278128c7b38b7e031ff5b2f2" + integrity sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw== "@tsconfig/node12@^1.0.7": version "1.0.11" @@ -853,46 +778,46 @@ integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== "@tsconfig/node16@^1.0.2": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.3.tgz#472eaab5f15c1ffdd7f8628bd4c4f753995ec79e" - integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ== + version "1.0.4" + resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9" + 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": - version "7.0.11" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" - integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== +"@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== "@types/json5@^0.0.29": version "0.0.29" resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== -"@types/node-fetch@^2.6.6": - version "2.6.6" - resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.6.tgz#b72f3f4bc0c0afee1c0bc9cff68e041d01e3e779" - integrity sha512-95X8guJYhfqiuVVhRFxVQcf4hW/2bCuoPwDasMf/531STFoNoWTT7YDnWdXHEZKqAGUigmpG31r2FE70LwnzJw== +"@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== dependencies: "@types/node" "*" form-data "^4.0.0" -"@types/node@*", "@types/node@^20.8.6": - version "20.8.6" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.6.tgz#0dbd4ebcc82ad0128df05d0e6f57e05359ee47fa" - integrity sha512-eWO4K2Ji70QzKUqRy6oyJWUeB7+g2cRagT3T/nxYibYcT4y2BDL8lqolRXjTHmkZCdJfIPaY73KbJAZmcryxTQ== +"@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 "~5.25.1" - -"@types/semver@^7.3.12": - version "7.3.13" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.13.tgz#da4bfd73f49bd541d28920ab0e2bf0ee80f71c91" - integrity sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw== + undici-types "~6.19.2" "@types/ws@8.5.3": version "8.5.3" @@ -901,124 +826,91 @@ dependencies: "@types/node" "*" -"@typescript-eslint/eslint-plugin@^5.36.0": - version "5.58.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.58.0.tgz#b1d4b0ad20243269d020ef9bbb036a40b0849829" - integrity sha512-vxHvLhH0qgBd3/tW6/VccptSfc8FxPQIkmNTVLWcCOVqSBvqpnKkBTYrhcGlXfSnd78azwe+PsjYFj0X34/njA== +"@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.58.0" - "@typescript-eslint/type-utils" "5.58.0" - "@typescript-eslint/utils" "5.58.0" - debug "^4.3.4" - grapheme-splitter "^1.0.4" - 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.8.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.8.0.tgz#bb2a969d583db242f1ee64467542f8b05c2e28cb" - integrity sha512-5tNs6Bw0j6BdWuP8Fx+VH4G9fEPDxnVI7yH1IAPkQH5RUtvKwRoqdecAPdQXv4rSOADAaz1LFBZvZG7VbXivSg== - dependencies: - "@typescript-eslint/scope-manager" "6.8.0" - "@typescript-eslint/types" "6.8.0" - "@typescript-eslint/typescript-estree" "6.8.0" - "@typescript-eslint/visitor-keys" "6.8.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.3.1" + natural-compare "^1.4.0" + ts-api-utils "^1.3.0" -"@typescript-eslint/scope-manager@5.58.0": - version "5.58.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.58.0.tgz#5e023a48352afc6a87be6ce3c8e763bc9e2f0bc8" - integrity sha512-b+w8ypN5CFvrXWQb9Ow9T4/6LC2MikNf1viLkYTiTbkQl46CnR69w7lajz1icW0TBsYmlpg+mRzFJ4LEJ8X9NA== +"@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.58.0" - "@typescript-eslint/visitor-keys" "5.58.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.8.0": - version "6.8.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.8.0.tgz#5cac7977385cde068ab30686889dd59879811efd" - integrity sha512-xe0HNBVwCph7rak+ZHcFD6A+q50SMsFwcmfdjs9Kz4qDh5hWhaPhFjRs/SODEhroBI5Ruyvyz9LfwUJ624O40g== +"@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.8.0" - "@typescript-eslint/visitor-keys" "6.8.0" + "@typescript-eslint/types" "8.7.0" + "@typescript-eslint/visitor-keys" "8.7.0" -"@typescript-eslint/type-utils@5.58.0": - version "5.58.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.58.0.tgz#f7d5b3971483d4015a470d8a9e5b8a7d10066e52" - integrity sha512-FF5vP/SKAFJ+LmR9PENql7fQVVgGDOS+dq3j+cKl9iW/9VuZC/8CFmzIP0DLKXfWKpRHawJiG70rVH+xZZbp8w== +"@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.58.0" - "@typescript-eslint/utils" "5.58.0" + "@typescript-eslint/typescript-estree" "8.7.0" + "@typescript-eslint/utils" "8.7.0" debug "^4.3.4" - tsutils "^3.21.0" - -"@typescript-eslint/types@5.58.0": - version "5.58.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.58.0.tgz#54c490b8522c18986004df7674c644ffe2ed77d8" - integrity sha512-JYV4eITHPzVQMnHZcYJXl2ZloC7thuUHrcUmxtzvItyKPvQ50kb9QXBkgNAt90OYMqwaodQh2kHutWZl1fc+1g== + ts-api-utils "^1.3.0" -"@typescript-eslint/types@6.8.0": - version "6.8.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.8.0.tgz#1ab5d4fe1d613e3f65f6684026ade6b94f7e3ded" - integrity sha512-p5qOxSum7W3k+llc7owEStXlGmSl8FcGvhYt8Vjy7FqEnmkCVlM3P57XQEGj58oqaBWDQXbJDZxwUWMS/EAPNQ== +"@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/typescript-estree@5.58.0": - version "5.58.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.58.0.tgz#4966e6ff57eaf6e0fce2586497edc097e2ab3e61" - integrity sha512-cRACvGTodA+UxnYM2uwA2KCwRL7VAzo45syNysqlMyNyjw0Z35Icc9ihPJZjIYuA5bXJYiJ2YGUB59BqlOZT1Q== +"@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.58.0" - "@typescript-eslint/visitor-keys" "5.58.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.8.0": - version "6.8.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.8.0.tgz#9565f15e0cd12f55cf5aa0dfb130a6cb0d436ba1" - integrity sha512-ISgV0lQ8XgW+mvv5My/+iTUdRmGspducmQcDw5JxznasXNnZn3SKNrTRuMsEXv+V/O+Lw9AGcQCfVaOPCAk/Zg== - dependencies: - "@typescript-eslint/types" "6.8.0" - "@typescript-eslint/visitor-keys" "6.8.0" - debug "^4.3.4" - globby "^11.1.0" - is-glob "^4.0.3" - semver "^7.5.4" - ts-api-utils "^1.0.1" - -"@typescript-eslint/utils@5.58.0": - version "5.58.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.58.0.tgz#430d7c95f23ec457b05be5520c1700a0dfd559d5" - integrity sha512-gAmLOTFXMXOC+zP1fsqm3VceKSBQJNzV385Ok3+yzlavNHZoedajjS4UyS21gabJYcobuigQPs/z71A9MdJFqQ== - dependencies: - "@eslint-community/eslint-utils" "^4.2.0" - "@types/json-schema" "^7.0.9" - "@types/semver" "^7.3.12" - "@typescript-eslint/scope-manager" "5.58.0" - "@typescript-eslint/types" "5.58.0" - "@typescript-eslint/typescript-estree" "5.58.0" - eslint-scope "^5.1.1" - semver "^7.3.7" - -"@typescript-eslint/visitor-keys@5.58.0": - version "5.58.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.58.0.tgz#eb9de3a61d2331829e6761ce7fd13061781168b4" - integrity sha512-/fBraTlPj0jwdyTwLyrRTxv/3lnU2H96pNTVM6z3esTWLtA5MZ9ghSMJ7Rb+TtUAdtEw9EyJzJ0EydIMKxQ9gA== - dependencies: - "@typescript-eslint/types" "5.58.0" - eslint-visitor-keys "^3.3.0" + 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" -"@typescript-eslint/visitor-keys@6.8.0": - version "6.8.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.8.0.tgz#cffebed56ae99c45eba901c378a6447b06be58b8" - integrity sha512-oqAnbA7c+pgOhW2OhGvxm0t1BULX5peQI/rLsNDpGM78EebV3C9IGbX5HNZabuZ6UQrYveCLjKo8Iy/lLlBkkg== - dependencies: - "@typescript-eslint/types" "6.8.0" - eslint-visitor-keys "^3.4.1" +abitype@0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/abitype/-/abitype-0.7.1.tgz#16db20abe67de80f6183cf75f3de1ff86453b745" + integrity sha512-VBkRHTDZf9Myaek/dO3yMmOzB/y2s3Zo6nVU7yaw1G+TvCHAjwaJzNGN9yo4K5D8bU/VZXKP1EJpRhFr862PlQ== acorn-jsx@^5.3.2: version "5.3.2" @@ -1026,14 +918,16 @@ acorn-jsx@^5.3.2: integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== acorn-walk@^8.1.1: - version "8.2.0" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" - integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== + 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.4.1, acorn@^8.9.0: - version "8.10.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" - integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== +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== ajv@^6.12.4: version "6.12.6" @@ -1074,72 +968,70 @@ argparse@^2.0.1: resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== -array-buffer-byte-length@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz#fabe8bc193fea865f317fe7807085ee0dee5aead" - integrity sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A== - dependencies: - call-bind "^1.0.2" - is-array-buffer "^3.0.1" - -array-includes@^3.1.6: - version "3.1.6" - resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.6.tgz#9e9e720e194f198266ba9e18c29e6a9b0e4b225f" - integrity sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - get-intrinsic "^1.1.3" +array-buffer-byte-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz#1e5583ec16763540a27ae52eed99ff899223568f" + integrity sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg== + dependencies: + call-bind "^1.0.5" + is-array-buffer "^3.0.4" + +array-includes@^3.1.8: + version "3.1.8" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.8.tgz#5e370cbe172fdd5dd6530c1d4aadda25281ba97d" + integrity sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + es-object-atoms "^1.0.0" + 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" + integrity sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + es-shim-unscopables "^1.0.2" -array.prototype.findlastindex@^1.2.2: - version "1.2.3" - resolved "https://registry.yarnpkg.com/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.3.tgz#b37598438f97b579166940814e2c0493a4f50207" - integrity sha512-LzLoiOMAxvy+Gd3BAq3B7VeIgPdo+Q8hthvKtXybMvRV0jrXfJM/t8mw7nNlpEcVlVUnCnM2KSX4XU5HmpodOA== +array.prototype.flat@^1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz#1476217df8cff17d72ee8f3ba06738db5b387d18" + integrity sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA== dependencies: call-bind "^1.0.2" define-properties "^1.2.0" es-abstract "^1.22.1" es-shim-unscopables "^1.0.0" - get-intrinsic "^1.2.1" - -array.prototype.flat@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz#ffc6576a7ca3efc2f46a143b9d1dda9b4b3cf5e2" - integrity sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - es-shim-unscopables "^1.0.0" - -array.prototype.flatmap@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz#1aae7903c2100433cb8261cd4ed310aab5c4a183" - integrity sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - es-shim-unscopables "^1.0.0" -arraybuffer.prototype.slice@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz#98bd561953e3e74bb34938e77647179dfe6e9f12" - integrity sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw== +array.prototype.flatmap@^1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz#c9a7c6831db8e719d6ce639190146c24bbd3e527" + integrity sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ== dependencies: - array-buffer-byte-length "^1.0.0" call-bind "^1.0.2" define-properties "^1.2.0" es-abstract "^1.22.1" - get-intrinsic "^1.2.1" - is-array-buffer "^3.0.2" + es-shim-unscopables "^1.0.0" + +arraybuffer.prototype.slice@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz#097972f4255e41bc3425e37dc3f6421cf9aefde6" + integrity sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A== + dependencies: + array-buffer-byte-length "^1.0.1" + call-bind "^1.0.5" + define-properties "^1.2.1" + es-abstract "^1.22.3" + es-errors "^1.2.1" + get-intrinsic "^1.2.3" + is-array-buffer "^3.0.4" is-shared-array-buffer "^1.0.2" asynckit@^0.4.0: @@ -1147,17 +1039,19 @@ asynckit@^0.4.0: resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== -available-typed-arrays@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" - integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== +available-typed-arrays@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz#a5cc375d6a03c2efc87a553f3e0b1522def14846" + integrity sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ== + dependencies: + possible-typed-array-names "^1.0.0" -axios@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.5.1.tgz#11fbaa11fc35f431193a9564109c88c1f27b585f" - integrity sha512-Q28iYCWzNHjAm+yEAot5QaAMxhMghWLFVf7rRdwhUI+c2jix2DUXjAHXVi+s1ibs3mjPO/cCgbA++3BjD0vP/A== +axios@^1.7.5: + version "1.7.7" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.7.tgz#2f554296f9892a72ac8d8e4c5b79c14a91d0a47f" + integrity sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q== dependencies: - follow-redirects "^1.15.0" + follow-redirects "^1.15.6" form-data "^4.0.0" proxy-from-env "^1.1.0" @@ -1166,28 +1060,11 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -big-integer@^1.6.44: - version "1.6.51" - resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.51.tgz#0df92a5d9880560d3ff2d5fd20245c889d130686" - integrity sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg== - -bn.js@^4.11.9: - version "4.12.0" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" - integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== - bn.js@^5.2.1: version "5.2.1" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== -bplist-parser@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/bplist-parser/-/bplist-parser-0.2.0.tgz#43a9d183e5bf9d545200ceac3e712f79ebbe8d0e" - integrity sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw== - dependencies: - big-integer "^1.6.44" - brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -1196,44 +1073,47 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" -braces@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== dependencies: - fill-range "^7.0.1" - -brorand@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" - integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== + balanced-match "^1.0.0" -bundle-name@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/bundle-name/-/bundle-name-3.0.0.tgz#ba59bcc9ac785fb67ccdbf104a2bf60c099f0e1a" - integrity sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw== +braces@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" + integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== dependencies: - run-applescript "^5.0.0" + fill-range "^7.1.1" -call-bind@^1.0.0, call-bind@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" - integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== +call-bind@^1.0.2, call-bind@^1.0.5, call-bind@^1.0.6, call-bind@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" + integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w== dependencies: - function-bind "^1.1.1" - get-intrinsic "^1.0.2" + es-define-property "^1.0.0" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + set-function-length "^1.2.1" callsites@^3.0.0: version "3.1.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.1" - resolved "https://registry.yarnpkg.com/cbor-web/-/cbor-web-9.0.1.tgz#844fc2b816939bada26854de60503efd02b15e65" - integrity sha512-9lW24Q2fOvCei/qMSeH48VWOcndR6u/gsi1zqXzXqeTj67XVGR253S+rOaJY+zE9TDahorcpXKeIBFRv4U2MYA== + version "9.0.2" + resolved "https://registry.yarnpkg.com/cbor-web/-/cbor-web-9.0.2.tgz#1915f1ef1a72ea905db07480f71cf12ff601c661" + integrity sha512-N6gU2GsJS8RR5gy1d9wQcSPgn9FGJFY7KNvdDRlwHfz6kCxrQr2TDnrjXHmr6TFSl6Fd0FC4zRnityEldjRGvQ== -chalk@^2.0.0: +chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -1281,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" @@ -1301,14 +1181,14 @@ create-require@^1.1.0: resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== -cross-fetch@^3.1.5: - version "3.1.5" - resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f" - integrity sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw== +cross-fetch@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-4.0.0.tgz#f037aef1580bb3a1a35164ea2a848ba81b445983" + integrity sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g== dependencies: - node-fetch "2.6.7" + node-fetch "^2.6.12" -cross-spawn@^7.0.2, cross-spawn@^7.0.3: +cross-spawn@^7.0.2: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== @@ -1322,6 +1202,33 @@ data-uri-to-buffer@^4.0.0: resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz#d8feb2b2881e6a4f58c2e08acfd0e2834e26222e" integrity sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A== +data-view-buffer@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/data-view-buffer/-/data-view-buffer-1.0.1.tgz#8ea6326efec17a2e42620696e671d7d5a8bc66b2" + integrity sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA== + dependencies: + call-bind "^1.0.6" + es-errors "^1.3.0" + is-data-view "^1.0.1" + +data-view-byte-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz#90721ca95ff280677eb793749fce1011347669e2" + integrity sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ== + dependencies: + call-bind "^1.0.7" + es-errors "^1.3.0" + is-data-view "^1.0.1" + +data-view-byte-offset@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz#5e0bbfb4828ed2d1b9b400cd8a7d119bca0ff18a" + integrity sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA== + dependencies: + call-bind "^1.0.6" + es-errors "^1.3.0" + is-data-view "^1.0.1" + debug@^3.2.7: version "3.2.7" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" @@ -1329,51 +1236,28 @@ debug@^3.2.7: dependencies: ms "^2.1.1" -debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.4: - version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== +debug@^4.1.0, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: + 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" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== -default-browser-id@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/default-browser-id/-/default-browser-id-3.0.0.tgz#bee7bbbef1f4e75d31f98f4d3f1556a14cea790c" - integrity sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA== - dependencies: - bplist-parser "^0.2.0" - untildify "^4.0.0" - -default-browser@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/default-browser/-/default-browser-4.0.0.tgz#53c9894f8810bf86696de117a6ce9085a3cbc7da" - integrity sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA== - dependencies: - bundle-name "^3.0.0" - default-browser-id "^3.0.0" - execa "^7.1.1" - titleize "^3.0.0" - -define-data-property@^1.0.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.1.tgz#c35f7cd0ab09883480d12ac5cb213715587800b3" - integrity sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ== +define-data-property@^1.0.1, define-data-property@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" + integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== dependencies: - get-intrinsic "^1.2.1" + es-define-property "^1.0.0" + es-errors "^1.3.0" gopd "^1.0.1" - has-property-descriptors "^1.0.0" - -define-lazy-prop@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz#dbb19adfb746d7fc6d734a06b72f4a00d021255f" - integrity sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg== -define-properties@^1.1.3, define-properties@^1.1.4, define-properties@^1.2.0: +define-properties@^1.2.0, define-properties@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.1.tgz#10781cc616eb951a80a034bafcaa7377f6af2b6c" integrity sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg== @@ -1392,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" @@ -1406,30 +1283,10 @@ 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: - version "16.3.1" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.3.1.tgz#369034de7d7e5b120972693352a3bf112172cc3e" - integrity sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ== - -elliptic@6.5.4: - version "6.5.4" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" - integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== - dependencies: - bn.js "^4.11.9" - brorand "^1.1.0" - hash.js "^1.0.0" - hmac-drbg "^1.0.1" - inherits "^2.0.4" - minimalistic-assert "^1.0.1" - minimalistic-crypto-utils "^1.0.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== error-stack-parser@^1.3.6: version "1.3.6" @@ -1438,66 +1295,92 @@ error-stack-parser@^1.3.6: dependencies: stackframe "^0.3.1" -es-abstract@^1.20.4, es-abstract@^1.22.1: - version "1.22.2" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.22.2.tgz#90f7282d91d0ad577f505e423e52d4c1d93c1b8a" - integrity sha512-YoxfFcDmhjOgWPWsV13+2RNjq1F6UQnfs+8TftwNqtzlmFzEXvlUwdrNrYeaizfjQzRMxkZ6ElWMOJIFKdVqwA== - dependencies: - array-buffer-byte-length "^1.0.0" - arraybuffer.prototype.slice "^1.0.2" - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - es-set-tostringtag "^2.0.1" +es-abstract@^1.22.1, es-abstract@^1.22.3, es-abstract@^1.23.0, es-abstract@^1.23.2: + version "1.23.3" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.23.3.tgz#8f0c5a35cd215312573c5a27c87dfd6c881a0aa0" + integrity sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A== + dependencies: + array-buffer-byte-length "^1.0.1" + arraybuffer.prototype.slice "^1.0.3" + available-typed-arrays "^1.0.7" + call-bind "^1.0.7" + data-view-buffer "^1.0.1" + data-view-byte-length "^1.0.1" + data-view-byte-offset "^1.0.0" + es-define-property "^1.0.0" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + es-set-tostringtag "^2.0.3" es-to-primitive "^1.2.1" function.prototype.name "^1.1.6" - get-intrinsic "^1.2.1" - get-symbol-description "^1.0.0" + get-intrinsic "^1.2.4" + get-symbol-description "^1.0.2" globalthis "^1.0.3" gopd "^1.0.1" - has "^1.0.3" - has-property-descriptors "^1.0.0" - has-proto "^1.0.1" + has-property-descriptors "^1.0.2" + has-proto "^1.0.3" has-symbols "^1.0.3" - internal-slot "^1.0.5" - is-array-buffer "^3.0.2" + hasown "^2.0.2" + internal-slot "^1.0.7" + is-array-buffer "^3.0.4" is-callable "^1.2.7" - is-negative-zero "^2.0.2" + is-data-view "^1.0.1" + is-negative-zero "^2.0.3" is-regex "^1.1.4" - is-shared-array-buffer "^1.0.2" + is-shared-array-buffer "^1.0.3" is-string "^1.0.7" - is-typed-array "^1.1.12" + is-typed-array "^1.1.13" is-weakref "^1.0.2" - object-inspect "^1.12.3" + object-inspect "^1.13.1" object-keys "^1.1.1" - object.assign "^4.1.4" - regexp.prototype.flags "^1.5.1" - safe-array-concat "^1.0.1" - safe-regex-test "^1.0.0" - string.prototype.trim "^1.2.8" - string.prototype.trimend "^1.0.7" - string.prototype.trimstart "^1.0.7" - typed-array-buffer "^1.0.0" - typed-array-byte-length "^1.0.0" - typed-array-byte-offset "^1.0.0" - typed-array-length "^1.0.4" + object.assign "^4.1.5" + regexp.prototype.flags "^1.5.2" + safe-array-concat "^1.1.2" + safe-regex-test "^1.0.3" + string.prototype.trim "^1.2.9" + string.prototype.trimend "^1.0.8" + string.prototype.trimstart "^1.0.8" + typed-array-buffer "^1.0.2" + typed-array-byte-length "^1.0.1" + typed-array-byte-offset "^1.0.2" + typed-array-length "^1.0.6" unbox-primitive "^1.0.2" - which-typed-array "^1.1.11" + which-typed-array "^1.1.15" -es-set-tostringtag@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz#338d502f6f674301d710b80c8592de8a15f09cd8" - integrity sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg== +es-define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" + integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ== dependencies: - get-intrinsic "^1.1.3" - has "^1.0.3" - has-tostringtag "^1.0.0" + get-intrinsic "^1.2.4" + +es-errors@^1.2.1, es-errors@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" + integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== -es-shim-unscopables@^1.0.0: +es-object-atoms@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz#702e632193201e3edf8713635d083d378e510241" - integrity sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w== + resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.0.0.tgz#ddb55cd47ac2e240701260bc2a8e31ecb643d941" + integrity sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw== dependencies: - has "^1.0.3" + es-errors "^1.3.0" + +es-set-tostringtag@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz#8bb60f0a440c2e4281962428438d58545af39777" + integrity sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ== + dependencies: + get-intrinsic "^1.2.4" + has-tostringtag "^1.0.2" + hasown "^2.0.1" + +es-shim-unscopables@^1.0.0, es-shim-unscopables@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz#1f6942e71ecc7835ed1c8a83006d8771a63a3763" + integrity sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw== + dependencies: + hasown "^2.0.0" es-to-primitive@^1.2.1: version "1.2.1" @@ -1518,10 +1401,10 @@ 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: - version "9.0.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz#eb25485946dd0c66cd216a46232dc05451518d1f" - integrity sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw== +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== eslint-formatter-codeframe@^7.32.1: version "7.32.1" @@ -1531,19 +1414,19 @@ eslint-formatter-codeframe@^7.32.1: "@babel/code-frame" "7.12.11" chalk "^4.0.0" -eslint-import-resolver-node@^0.3.7: - version "0.3.7" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz#83b375187d412324a1963d84fa664377a23eb4d7" - integrity sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA== +eslint-import-resolver-node@^0.3.9: + version "0.3.9" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz#d4eaac52b8a2e7c3cd1903eb00f7e053356118ac" + integrity sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g== dependencies: debug "^3.2.7" - is-core-module "^2.11.0" - resolve "^1.22.1" + is-core-module "^2.13.0" + resolve "^1.22.4" -eslint-module-utils@^2.8.0: - version "2.8.0" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz#e439fee65fc33f6bba630ff621efc38ec0375c49" - integrity sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw== +eslint-module-utils@^2.9.0: + 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" @@ -1555,28 +1438,29 @@ eslint-plugin-es@^3.0.0: eslint-utils "^2.0.0" regexpp "^3.0.0" -eslint-plugin-import@^2.28.1: - version "2.28.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.28.1.tgz#63b8b5b3c409bfc75ebaf8fb206b07ab435482c4" - integrity sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A== +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== dependencies: - array-includes "^3.1.6" - array.prototype.findlastindex "^1.2.2" - array.prototype.flat "^1.3.1" - array.prototype.flatmap "^1.3.1" + "@rtsao/scc" "^1.1.0" + array-includes "^3.1.8" + array.prototype.findlastindex "^1.2.5" + array.prototype.flat "^1.3.2" + array.prototype.flatmap "^1.3.2" debug "^3.2.7" doctrine "^2.1.0" - eslint-import-resolver-node "^0.3.7" - eslint-module-utils "^2.8.0" - has "^1.0.3" - is-core-module "^2.13.0" + eslint-import-resolver-node "^0.3.9" + eslint-module-utils "^2.9.0" + hasown "^2.0.2" + is-core-module "^2.15.1" is-glob "^4.0.3" minimatch "^3.1.2" - object.fromentries "^2.0.6" - object.groupby "^1.0.0" - object.values "^1.1.6" + object.fromentries "^2.0.8" + object.groupby "^1.0.3" + object.values "^1.2.0" semver "^6.3.1" - tsconfig-paths "^3.14.2" + tsconfig-paths "^3.15.0" eslint-plugin-node@^11.1.0: version "11.1.0" @@ -1590,26 +1474,18 @@ eslint-plugin-node@^11.1.0: resolve "^1.10.1" semver "^6.1.0" -eslint-plugin-prettier@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.0.1.tgz#a3b399f04378f79f066379f544e42d6b73f11515" - integrity sha512-m3u5RnR56asrwV/lDC4GHorlW75DsFfmUcjfCYylTUs85dBRnB7VM6xG8eCMJdeDRnppzmxZVf1GEPJvl1JmNg== +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== dependencies: prettier-linter-helpers "^1.0.0" - synckit "^0.8.5" + 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" @@ -1626,47 +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.51.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.51.0.tgz#4a82dae60d209ac89a5cff1604fea978ba4950f3" - integrity sha512-2WuxRZBrlwnXi+/vFSJyjMqrNjtJqiasMzehF0shoLaW7DzS3/9Yvrmq5JiT66+pNjiX4UBnLDiKHcWAr/OInA== +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.2" - "@eslint/js" "8.51.0" - "@humanwhocodes/config-array" "^0.11.11" + "@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" + "@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" @@ -1674,19 +1555,19 @@ 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: - version "1.5.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" - integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== +esquery@^1.5.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.6.0.tgz#91419234f804d852a82dceec3e16cdc22cf9dae7" + integrity sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg== dependencies: estraverse "^5.1.0" @@ -1697,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" @@ -1713,64 +1589,34 @@ esutils@^2.0.2: integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== ethereum-cryptography@^2.0.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-2.1.2.tgz#18fa7108622e56481157a5cb7c01c0c6a672eb67" - integrity sha512-Z5Ba0T0ImZ8fqXrJbpHcbpAvIswRte2wGNR/KePnu8GbbvgJ47lMxT/ZZPG6i9Jaht4azPDop4HaM00J0J59ug== + version "2.2.1" + resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz#58f2810f8e020aecb97de8c8c76147600b0b8ccf" + integrity sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg== dependencies: - "@noble/curves" "1.1.0" - "@noble/hashes" "1.3.1" - "@scure/bip32" "1.3.1" - "@scure/bip39" "1.2.1" + "@noble/curves" "1.4.2" + "@noble/hashes" "1.4.0" + "@scure/bip32" "1.4.0" + "@scure/bip39" "1.3.0" eventemitter3@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-5.0.1.tgz#53f5ffd0a492ac800721bb42c66b841de96423c4" integrity sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA== -execa@^5.0.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" - integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== - dependencies: - cross-spawn "^7.0.3" - get-stream "^6.0.0" - human-signals "^2.1.0" - is-stream "^2.0.0" - merge-stream "^2.0.0" - npm-run-path "^4.0.1" - onetime "^5.1.2" - signal-exit "^3.0.3" - strip-final-newline "^2.0.0" - -execa@^7.1.1: - version "7.2.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-7.2.0.tgz#657e75ba984f42a70f38928cedc87d6f2d4fe4e9" - integrity sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA== - dependencies: - cross-spawn "^7.0.3" - get-stream "^6.0.1" - human-signals "^4.3.0" - is-stream "^3.0.0" - merge-stream "^2.0.0" - npm-run-path "^5.1.0" - onetime "^6.0.0" - signal-exit "^3.0.7" - strip-final-newline "^3.0.0" - fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== fast-diff@^1.1.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" - integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== + version "1.3.0" + 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.0: - version "3.3.1" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.1.tgz#784b4e897340f3dbbef17413b3f11acf03c874c4" - integrity sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg== +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== dependencies: "@nodelib/fs.stat" "^2.0.2" "@nodelib/fs.walk" "^1.2.3" @@ -1789,9 +1635,9 @@ fast-levenshtein@^2.0.6: integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== fastq@^1.6.0: - version "1.15.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a" - integrity sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw== + version "1.17.1" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.17.1.tgz#2a523f07a4e7b1e81a42b91b8bf2254107753b47" + integrity sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w== dependencies: reusify "^1.0.4" @@ -1803,17 +1649,17 @@ 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.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== +fill-range@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" + integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== dependencies: to-regex-range "^5.0.1" @@ -1825,23 +1671,23 @@ find-up@^5.0.0: locate-path "^6.0.0" path-exists "^4.0.0" -flat-cache@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" - integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== +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.1.0" - rimraf "^3.0.2" + flatted "^3.2.9" + keyv "^4.5.4" -flatted@^3.1.0: - version "3.2.7" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" - integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== +flatted@^3.2.9: + version "3.3.1" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.1.tgz#21db470729a6734d4997002f439cb308987f567a" + integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw== -follow-redirects@^1.15.0: - version "1.15.3" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.3.tgz#fe2f3ef2690afce7e82ed0b44db08165b207123a" - integrity sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q== +follow-redirects@^1.15.6: + 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" @@ -1850,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" @@ -1866,15 +1717,10 @@ 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.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== +function-bind@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" + integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== function.prototype.name@^1.1.6: version "1.1.6" @@ -1891,28 +1737,25 @@ functions-have-names@^1.2.3: resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== -get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.0, get-intrinsic@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.1.tgz#d295644fed4505fc9cde952c37ee12b477a83d82" - integrity sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw== +get-intrinsic@^1.1.3, get-intrinsic@^1.2.1, get-intrinsic@^1.2.3, get-intrinsic@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" + integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== dependencies: - function-bind "^1.1.1" - has "^1.0.3" + es-errors "^1.3.0" + function-bind "^1.1.2" has-proto "^1.0.1" has-symbols "^1.0.3" + hasown "^2.0.0" -get-stream@^6.0.0, get-stream@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" - integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== - -get-symbol-description@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" - integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== +get-symbol-description@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.2.tgz#533744d5aa20aca4e079c8e5daf7fd44202821f5" + integrity sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg== dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.1" + call-bind "^1.0.5" + es-errors "^1.3.0" + get-intrinsic "^1.2.4" glob-parent@^5.1.2: version "5.1.2" @@ -1928,43 +1771,18 @@ 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.20.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.20.0.tgz#ea276a1e508ffd4f1612888f9d1bad1e2717bf82" - integrity sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ== - 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.3" - resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.3.tgz#5852882a52b80dc301b0660273e1ed082f0b6ccf" - integrity sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA== - dependencies: - define-properties "^1.1.3" - -globby@^11.1.0: - version "11.1.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" - integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== + version "1.0.4" + resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.4.tgz#7430ed3a975d97bfb59bcce41f5cabbafa651236" + integrity sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ== 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" + define-properties "^1.2.1" + gopd "^1.0.1" gopd@^1.0.1: version "1.0.1" @@ -1973,11 +1791,6 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" -grapheme-splitter@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" - integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== - graphemer@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" @@ -1998,68 +1811,41 @@ has-flag@^4.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== -has-property-descriptors@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz#610708600606d36961ed04c196193b6a607fa861" - integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ== +has-property-descriptors@^1.0.0, has-property-descriptors@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" + integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== dependencies: - get-intrinsic "^1.1.1" + es-define-property "^1.0.0" -has-proto@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" - integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== +has-proto@^1.0.1, has-proto@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.3.tgz#b31ddfe9b0e6e9914536a6ab286426d0214f77fd" + integrity sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q== has-symbols@^1.0.2, has-symbols@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== -has-tostringtag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" - integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== - dependencies: - has-symbols "^1.0.2" - -has@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - -hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3: - version "1.1.7" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" - integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== +has-tostringtag@^1.0.0, has-tostringtag@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz#2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc" + integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw== dependencies: - inherits "^2.0.3" - minimalistic-assert "^1.0.1" + has-symbols "^1.0.3" -hmac-drbg@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" - integrity sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg== +hasown@^2.0.0, hasown@^2.0.1, hasown@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" + integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== dependencies: - hash.js "^1.0.3" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.1" - -human-signals@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" - integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== - -human-signals@^4.3.0: - version "4.3.1" - resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-4.3.1.tgz#ab7f811e851fca97ffbd2c1fe9a958964de321b2" - integrity sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ== + function-bind "^1.1.2" -ignore@^5.1.1, ignore@^5.2.0: - version "5.2.4" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" - integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== +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== import-fresh@^3.2.1: version "3.3.0" @@ -2074,26 +1860,18 @@ 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.4: +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== -internal-slot@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.5.tgz#f2a2ee21f668f8627a4667f309dc0f4fb6674986" - integrity sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ== +internal-slot@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.7.tgz#c06dcca3ed874249881007b0a5523b172a190802" + integrity sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g== dependencies: - get-intrinsic "^1.2.0" - has "^1.0.3" + es-errors "^1.3.0" + hasown "^2.0.0" side-channel "^1.0.4" is-arguments@^1.0.4: @@ -2104,14 +1882,13 @@ is-arguments@^1.0.4: call-bind "^1.0.2" has-tostringtag "^1.0.0" -is-array-buffer@^3.0.1, is-array-buffer@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.2.tgz#f2653ced8412081638ecb0ebbd0c41c6e0aecbbe" - integrity sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w== +is-array-buffer@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.4.tgz#7a1f92b3d61edd2bc65d24f130530ea93d7fae98" + integrity sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw== dependencies: call-bind "^1.0.2" - get-intrinsic "^1.2.0" - is-typed-array "^1.1.10" + get-intrinsic "^1.2.1" is-bigint@^1.0.1: version "1.0.4" @@ -2133,12 +1910,19 @@ is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== -is-core-module@^2.11.0, is-core-module@^2.13.0: - version "2.13.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.0.tgz#bb52aa6e2cbd49a30c2ba68c42bf3435ba6072db" - integrity sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ== +is-core-module@^2.13.0, is-core-module@^2.15.1: + version "2.15.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.15.1.tgz#a7363a25bee942fefab0de13bf6aa372c82dcc37" + integrity sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ== + dependencies: + hasown "^2.0.2" + +is-data-view@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-data-view/-/is-data-view-1.0.1.tgz#4b4d3a511b70f3dc26d42c03ca9ca515d847759f" + integrity sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w== dependencies: - has "^1.0.3" + is-typed-array "^1.1.13" is-date-object@^1.0.1: version "1.0.5" @@ -2147,16 +1931,6 @@ is-date-object@^1.0.1: dependencies: has-tostringtag "^1.0.0" -is-docker@^2.0.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" - integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== - -is-docker@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-3.0.0.tgz#90093aa3106277d8a77a5910dbae71747e15a200" - integrity sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ== - is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" @@ -2176,17 +1950,10 @@ is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: dependencies: is-extglob "^2.1.1" -is-inside-container@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-inside-container/-/is-inside-container-1.0.0.tgz#e81fba699662eb31dbdaf26766a61d4814717ea4" - integrity sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA== - dependencies: - is-docker "^3.0.0" - -is-negative-zero@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" - integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== +is-negative-zero@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.3.tgz#ced903a027aca6381b777a5743069d7376a49747" + integrity sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw== is-number-object@^1.0.4: version "1.0.7" @@ -2213,22 +1980,12 @@ is-regex@^1.1.4: call-bind "^1.0.2" has-tostringtag "^1.0.0" -is-shared-array-buffer@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" - integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA== +is-shared-array-buffer@^1.0.2, is-shared-array-buffer@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz#1237f1cba059cdb62431d378dcc37d9680181688" + integrity sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg== dependencies: - call-bind "^1.0.2" - -is-stream@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" - integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== - -is-stream@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-3.0.0.tgz#e6bfd7aa6bef69f4f472ce9bb681e3e57b4319ac" - integrity sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA== + call-bind "^1.0.7" is-string@^1.0.5, is-string@^1.0.7: version "1.0.7" @@ -2244,12 +2001,12 @@ is-symbol@^1.0.2, is-symbol@^1.0.3: dependencies: has-symbols "^1.0.2" -is-typed-array@^1.1.10, is-typed-array@^1.1.12, is-typed-array@^1.1.3, is-typed-array@^1.1.9: - version "1.1.12" - resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.12.tgz#d0bab5686ef4a76f7a73097b95470ab199c57d4a" - integrity sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg== +is-typed-array@^1.1.13, is-typed-array@^1.1.3: + version "1.1.13" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.13.tgz#d6c5ca56df62334959322d7d7dd1cca50debe229" + integrity sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw== dependencies: - which-typed-array "^1.1.11" + which-typed-array "^1.1.14" is-weakref@^1.0.2: version "1.0.2" @@ -2258,13 +2015,6 @@ is-weakref@^1.0.2: dependencies: call-bind "^1.0.2" -is-wsl@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" - integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== - dependencies: - is-docker "^2.0.0" - isarray@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" @@ -2280,11 +2030,6 @@ isomorphic-ws@^5.0.0: resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-5.0.0.tgz#e5529148912ecb9b451b46ed44d53dae1ce04bbf" integrity sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw== -js-sha3@0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" - integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== - js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -2297,6 +2042,18 @@ js-yaml@^4.1.0: dependencies: argparse "^2.0.1" +json-buffer@3.0.1: + version "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" @@ -2319,6 +2076,13 @@ json5@^1.0.2: dependencies: minimist "^1.2.0" +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== + dependencies: + json-buffer "3.0.1" + levn@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" @@ -2339,34 +2103,22 @@ lodash.merge@^4.6.2: resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== -lru-cache@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" - integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== - dependencies: - yallist "^4.0.0" - make-error@^1.1.1: version "1.3.6" resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== -merge-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" - integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== - -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== micromatch@^4.0.4: - version "4.0.5" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" - integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== + version "4.0.8" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" + integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== dependencies: - braces "^3.0.2" + braces "^3.0.3" picomatch "^2.3.1" mime-db@1.52.0: @@ -2381,33 +2133,20 @@ mime-types@^2.1.12: dependencies: mime-db "1.52.0" -mimic-fn@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" - integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== - -mimic-fn@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-4.0.0.tgz#60a90550d5cb0b239cca65d893b1a53b29871ecc" - integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw== - -minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" - integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== - -minimalistic-crypto-utils@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" - integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== - -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" @@ -2418,25 +2157,20 @@ 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, ms@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -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== +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@^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.4.0: - version "13.5.1" - resolved "https://registry.yarnpkg.com/nock/-/nock-13.5.1.tgz#4e40f9877ad0d43b7cdb474261c190f3715dd806" - integrity sha512-+s7b73fzj5KnxbKH4Oaqz07tQ8degcMilU4rrmnKvI//b0JMBU4wEXFQ8zqr+3+L4eWSfU3H/UoIVGUV0tue1Q== +nock@^13.5.4: + version "13.5.5" + resolved "https://registry.yarnpkg.com/nock/-/nock-13.5.5.tgz#cd1caaca281d42be17d51946367a3d53a6af3e78" + integrity sha512-XKYnqUrCwXC8DGG1xX4YH5yNIrlh9c065uaMZZHUoeUUINTOyt+x/G+ezYk0Ft6ExSREVIs+qBJDK503viTfFA== dependencies: debug "^4.1.0" json-stringify-safe "^5.0.1" @@ -2447,10 +2181,10 @@ 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.7, node-fetch@^2.6.7: - version "2.6.7" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" - integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== +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== dependencies: whatwg-url "^5.0.0" @@ -2463,110 +2197,65 @@ node-fetch@^3.3.2: fetch-blob "^3.1.4" formdata-polyfill "^4.0.10" -npm-run-path@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" - integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== - dependencies: - path-key "^3.0.0" - -npm-run-path@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-5.1.0.tgz#bc62f7f3f6952d9894bd08944ba011a6ee7b7e00" - integrity sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q== - dependencies: - path-key "^4.0.0" - -object-inspect@^1.12.3, object-inspect@^1.9.0: - version "1.12.3" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" - integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== +object-inspect@^1.13.1: + version "1.13.2" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.2.tgz#dea0088467fb991e67af4058147a24824a3043ff" + integrity sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g== object-keys@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== -object.assign@^4.1.4: - version "4.1.4" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f" - integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ== +object.assign@^4.1.5: + version "4.1.5" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.5.tgz#3a833f9ab7fdb80fc9e8d2300c803d216d8fdbb0" + integrity sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ== dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" + call-bind "^1.0.5" + define-properties "^1.2.1" has-symbols "^1.0.3" object-keys "^1.1.1" -object.fromentries@^2.0.6: - version "2.0.7" - resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.7.tgz#71e95f441e9a0ea6baf682ecaaf37fa2a8d7e616" - integrity sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" - -object.groupby@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/object.groupby/-/object.groupby-1.0.1.tgz#d41d9f3c8d6c778d9cbac86b4ee9f5af103152ee" - integrity sha512-HqaQtqLnp/8Bn4GL16cj+CUYbnpe1bh0TtEaWvybszDG4tgxCJuRpV8VGuvNaI1fAnI4lUJzDG55MXcOH4JZcQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" - get-intrinsic "^1.2.1" - -object.values@^1.1.6: - version "1.1.6" - resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.6.tgz#4abbaa71eba47d63589d402856f908243eea9b1d" - integrity sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - -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" - -onetime@^5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" - integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== +object.fromentries@^2.0.8: + version "2.0.8" + resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.8.tgz#f7195d8a9b97bd95cbc1999ea939ecd1a2b00c65" + integrity sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ== dependencies: - mimic-fn "^2.1.0" + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + es-object-atoms "^1.0.0" -onetime@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-6.0.0.tgz#7c24c18ed1fd2e9bca4bd26806a33613c77d34b4" - integrity sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ== +object.groupby@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/object.groupby/-/object.groupby-1.0.3.tgz#9b125c36238129f6f7b61954a1e7176148d5002e" + integrity sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ== dependencies: - mimic-fn "^4.0.0" + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" -open@^9.1.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/open/-/open-9.1.0.tgz#684934359c90ad25742f5a26151970ff8c6c80b6" - integrity sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg== +object.values@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.2.0.tgz#65405a9d92cee68ac2d303002e0b8470a4d9ab1b" + integrity sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ== dependencies: - default-browser "^4.0.0" - define-lazy-prop "^3.0.0" - is-inside-container "^1.0.0" - is-wsl "^2.2.0" + call-bind "^1.0.7" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" optionator@^0.9.3: - version "0.9.3" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64" - integrity sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg== + version "0.9.4" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.4.tgz#7ea1c1a5d91d764fb282139c88fe11e182a3a734" + integrity sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g== dependencies: - "@aashutoshrathi/word-wrap" "^1.2.3" deep-is "^0.1.3" fast-levenshtein "^2.0.6" levn "^0.4.1" prelude-ls "^1.2.1" type-check "^0.4.0" + word-wrap "^1.2.5" p-limit@^3.0.2: version "3.1.0" @@ -2594,41 +2283,31 @@ 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.0.0, path-key@^3.1.0: +path-key@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== -path-key@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-4.0.0.tgz#295588dc3aee64154f877adb9d780b81c554bf18" - integrity sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ== - path-parse@^1.0.7: version "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.0.0" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" - integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== + version "1.1.0" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.0.tgz#5358b76a78cde483ba5cef6a9dc9671440b27d59" + integrity sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw== picomatch@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== +possible-typed-array-names@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz#89bb63c6fada2c3e90adc4a647beeeb39cc7bf8f" + integrity sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q== + prelude-ls@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" @@ -2641,10 +2320,10 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.0.3.tgz#432a51f7ba422d1469096c0fdc28e235db8f9643" - integrity sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg== +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== propagate@^2.0.0: version "2.0.1" @@ -2657,23 +2336,24 @@ proxy-from-env@^1.1.0: integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== punycode@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" - integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== + version "2.3.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" + integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== queue-microtask@^1.2.2: version "1.2.3" resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== -regexp.prototype.flags@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz#90ce989138db209f81492edd734183ce99f9677e" - integrity sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg== +regexp.prototype.flags@^1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz#138f644a3350f981a858c44f6bb1a61ff59be334" + integrity sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw== dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - set-function-name "^2.0.0" + call-bind "^1.0.6" + define-properties "^1.2.1" + es-errors "^1.3.0" + set-function-name "^2.0.1" regexpp@^3.0.0: version "3.2.0" @@ -2685,12 +2365,12 @@ resolve-from@^4.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== -resolve@^1.10.1, resolve@^1.22.1: - version "1.22.2" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.2.tgz#0ed0943d4e301867955766c9f3e1ae6d01c6845f" - integrity sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g== +resolve@^1.10.1, resolve@^1.22.4: + version "1.22.8" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" + integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== dependencies: - is-core-module "^2.11.0" + is-core-module "^2.13.0" path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" @@ -2699,20 +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-applescript@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/run-applescript/-/run-applescript-5.0.0.tgz#e11e1c932e055d5c6b40d98374e0268d9b11899c" - integrity sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg== - dependencies: - execa "^5.0.0" - run-parallel@^1.1.9: version "1.2.0" resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" @@ -2727,45 +2393,61 @@ rxjs@^7.8.1: dependencies: tslib "^2.1.0" -safe-array-concat@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.0.1.tgz#91686a63ce3adbea14d61b14c99572a8ff84754c" - integrity sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q== +safe-array-concat@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.1.2.tgz#81d77ee0c4e8b863635227c721278dd524c20edb" + integrity sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q== dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.2.1" + call-bind "^1.0.7" + get-intrinsic "^1.2.4" has-symbols "^1.0.3" isarray "^2.0.5" -safe-regex-test@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.0.tgz#793b874d524eb3640d1873aad03596db2d4f2295" - integrity sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA== +safe-regex-test@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.3.tgz#a5b4c0f06e0ab50ea2c395c14d8371232924c377" + integrity sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw== dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.3" + call-bind "^1.0.6" + es-errors "^1.3.0" is-regex "^1.1.4" +scale-ts@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/scale-ts/-/scale-ts-1.6.0.tgz#e9641093c5a9e50f964ddb1607139034e3e932e9" + integrity sha512-Ja5VCjNZR8TGKhUumy9clVVxcDpM+YFjAnkMuwQy68Hixio3VRRvWdE3g8T/yC+HXA0ZDQl2TGyUmtmbcVl40Q== + semver@^6.1.0, semver@^6.3.1: version "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: - version "7.5.4" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" - integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== +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== + +set-function-length@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" + integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== dependencies: - lru-cache "^6.0.0" + define-data-property "^1.1.4" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + gopd "^1.0.1" + has-property-descriptors "^1.0.2" -set-function-name@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/set-function-name/-/set-function-name-2.0.1.tgz#12ce38b7954310b9f61faa12701620a0c882793a" - integrity sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA== +set-function-name@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/set-function-name/-/set-function-name-2.0.2.tgz#16a705c5a0dc2f5e638ca96d8a8cd4e1c2b90985" + integrity sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ== dependencies: - define-data-property "^1.0.1" + define-data-property "^1.1.4" + es-errors "^1.3.0" functions-have-names "^1.2.3" - has-property-descriptors "^1.0.0" + has-property-descriptors "^1.0.2" setimmediate@^1.0.5: version "1.0.5" @@ -2785,28 +2467,19 @@ shebang-regex@^3.0.0: integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== side-channel@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" - integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== + version "1.0.6" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" + integrity sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA== dependencies: - call-bind "^1.0.0" - get-intrinsic "^1.0.2" - object-inspect "^1.9.0" - -signal-exit@^3.0.3, signal-exit@^3.0.7: - version "3.0.7" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" - integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== - -slash@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" - integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + call-bind "^1.0.7" + es-errors "^1.3.0" + get-intrinsic "^1.2.4" + object-inspect "^1.13.1" -smoldot@2.0.7: - version "2.0.7" - resolved "https://registry.yarnpkg.com/smoldot/-/smoldot-2.0.7.tgz#407efd6bbb82a074612db4d056d631d8d615f442" - integrity sha512-VAOBqEen6vises36/zgrmAT1GWk2qE3X8AGnO7lmQFdskbKx8EovnwS22rtPAG+Y1Rk23/S22kDJUdPANyPkBA== +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" @@ -2849,32 +2522,33 @@ stacktrace-js@1.3.1: stack-generator "^1.0.7" stacktrace-gps "^2.4.3" -string.prototype.trim@^1.2.8: - version "1.2.8" - resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz#f9ac6f8af4bd55ddfa8895e6aea92a96395393bd" - integrity sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ== +string.prototype.trim@^1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz#b6fa326d72d2c78b6df02f7759c73f8f6274faa4" + integrity sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw== dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.0" + es-object-atoms "^1.0.0" -string.prototype.trimend@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz#1bb3afc5008661d73e2dc015cd4853732d6c471e" - integrity sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA== +string.prototype.trimend@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz#3651b8513719e8a9f48de7f2f77640b26652b229" + integrity sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ== dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" + call-bind "^1.0.7" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" -string.prototype.trimstart@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz#d4cdb44b83a4737ffbac2d406e405d43d0184298" - integrity sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg== +string.prototype.trimstart@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz#7ee834dda8c7c17eff3118472bb35bfedaa34dde" + integrity sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg== dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" + call-bind "^1.0.7" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" strip-ansi@^6.0.1: version "6.0.1" @@ -2888,16 +2562,6 @@ strip-bom@^3.0.0: resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== -strip-final-newline@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" - integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== - -strip-final-newline@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-3.0.0.tgz#52894c313fbff318835280aed60ff71ebf12b8fd" - integrity sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw== - strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" @@ -2922,24 +2586,19 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== -synckit@^0.8.5: - version "0.8.5" - resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.8.5.tgz#b7f4358f9bb559437f9f167eb6bc46b3c9818fa3" - integrity sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q== +synckit@^0.9.1: + version "0.9.1" + resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.9.1.tgz#febbfbb6649979450131f64735aa3f6c14575c88" + integrity sha512-7gr8p9TQP6RAHusBOSLs46F4564ZrjV8xFmw5zCmgmhGUcw2hxsShhJ6CEiHQMgPDwAQ1fWHPM0ypc4RMAig4A== dependencies: - "@pkgr/utils" "^2.3.1" - tslib "^2.5.0" + "@pkgr/core" "^0.1.0" + tslib "^2.6.2" text-table@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== -titleize@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/titleize/-/titleize-3.0.0.tgz#71c12eb7fdd2558aa8a44b0be83b8a76694acd53" - integrity sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ== - to-regex-range@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" @@ -2952,15 +2611,15 @@ 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: - version "1.0.3" - resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.0.3.tgz#f12c1c781d04427313dbac808f453f050e54a331" - integrity sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg== +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: - version "10.9.1" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b" - integrity sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw== +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== dependencies: "@cspotcode/source-map-support" "^0.8.0" "@tsconfig/node10" "^1.0.7" @@ -2976,32 +2635,20 @@ ts-node@^10.9.1: v8-compile-cache-lib "^3.0.1" yn "3.1.1" -tsconfig-paths@^3.14.2: - version "3.14.2" - resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz#6e32f1f79412decd261f92d633a9dc1cfa99f088" - integrity sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g== +tsconfig-paths@^3.15.0: + version "3.15.0" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz#5299ec605e55b1abb23ec939ef15edaf483070d4" + integrity sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg== dependencies: "@types/json5" "^0.0.29" json5 "^1.0.2" 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.5.0, tslib@^2.6.0, tslib@^2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" - integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== - -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" +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== tweetnacl@^1.0.3: version "1.0.3" @@ -3015,49 +2662,49 @@ 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.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz#18de3e7ed7974b0a729d3feecb94338d1472cd60" - integrity sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw== +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" + integrity sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ== dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.2.1" - is-typed-array "^1.1.10" + call-bind "^1.0.7" + es-errors "^1.3.0" + is-typed-array "^1.1.13" -typed-array-byte-length@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz#d787a24a995711611fb2b87a4052799517b230d0" - integrity sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA== +typed-array-byte-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz#d92972d3cff99a3fa2e765a28fcdc0f1d89dec67" + integrity sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw== dependencies: - call-bind "^1.0.2" + call-bind "^1.0.7" for-each "^0.3.3" - has-proto "^1.0.1" - is-typed-array "^1.1.10" + gopd "^1.0.1" + has-proto "^1.0.3" + is-typed-array "^1.1.13" -typed-array-byte-offset@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz#cbbe89b51fdef9cd6aaf07ad4707340abbc4ea0b" - integrity sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg== +typed-array-byte-offset@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz#f9ec1acb9259f395093e4567eb3c28a580d02063" + integrity sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA== dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" + available-typed-arrays "^1.0.7" + call-bind "^1.0.7" for-each "^0.3.3" - has-proto "^1.0.1" - is-typed-array "^1.1.10" + gopd "^1.0.1" + has-proto "^1.0.3" + is-typed-array "^1.1.13" -typed-array-length@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.4.tgz#89d83785e5c4098bec72e08b319651f0eac9c1bb" - integrity sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng== +typed-array-length@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.6.tgz#57155207c76e64a3457482dfdc1c9d1d3c4c73a3" + integrity sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g== dependencies: - call-bind "^1.0.2" + call-bind "^1.0.7" for-each "^0.3.3" - is-typed-array "^1.1.9" + gopd "^1.0.1" + has-proto "^1.0.3" + is-typed-array "^1.1.13" + possible-typed-array-names "^1.0.0" typescript-logging@^1.0.0: version "1.0.1" @@ -3066,10 +2713,10 @@ typescript-logging@^1.0.0: dependencies: stacktrace-js "1.3.1" -typescript@^5.2.2: - version "5.2.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78" - integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w== +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" @@ -3081,15 +2728,10 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" -undici-types@~5.25.1: - version "5.25.3" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.25.3.tgz#e044115914c85f0bcbb229f346ab739f064998c3" - integrity sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA== - -untildify@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/untildify/-/untildify-4.0.0.tgz#2bc947b953652487e4600949fb091e3ae8cd919b" - integrity sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw== +undici-types@~6.19.2: + version "6.19.8" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02" + integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw== uri-js@^4.2.2: version "4.4.1" @@ -3109,231 +2751,252 @@ util@^0.12.5: is-typed-array "^1.1.3" which-typed-array "^1.1.2" -uuid@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.0.tgz#592f550650024a38ceb0c562f2f6aa435761efb5" - integrity sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg== +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== -web-streams-polyfill@^3.0.3: - version "3.2.1" - resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz#71c2718c52b45fd49dbeee88634b3a60ceab42a6" - integrity sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q== +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== -web3-core@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-4.2.0.tgz#b4527ddb51e69724cf04af265746444f3a7c97bc" - integrity sha512-pkZJx3HAY3b3CutaFarODFgK3TDvcXC4T0n8cpvwiZjDzakUUFAssVUDwrmFyCFKAo5kmfs6qWFW7BAZLJeBFA== - dependencies: - web3-errors "^1.1.2" - web3-eth-iban "^4.0.6" - web3-providers-http "^4.0.6" - web3-providers-ws "^4.0.6" - web3-types "^1.2.0" - web3-utils "^4.0.6" - web3-validator "^2.0.2" +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.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.1" + web3-eth-iban "^4.0.7" + web3-providers-http "^4.2.0" + web3-providers-ws "^4.0.8" + web3-types "^1.8.0" + web3-utils "^4.3.1" + web3-validator "^2.0.6" optionalDependencies: - web3-providers-ipc "^4.0.6" + web3-providers-ipc "^4.0.7" -web3-errors@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/web3-errors/-/web3-errors-1.1.2.tgz#aa60ed7ca3e0e00039f0e2556c8c5b840a0f1399" - integrity sha512-qlyuV5r6MzjLasIalVWBIIfW4Y7hBX2bZv8TRnXvI1EjiZ36zIFKgE9RF+/iRBjXmOsvIUQQ2Z9gMvYGfOwUwQ== +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.2.0" + web3-types "^1.7.0" -web3-eth-abi@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-4.1.2.tgz#a7b262ce0ad12aa4af1edc6f89053fb1d39010d4" - integrity sha512-s8gvjUwzb2ZnAef0Jy68pjmeshYIKBoYlVj/1yuuFP9t3io3oQQIEyGlaCx7P4ifsZ186gMa4QjCCeIt7HYm7Q== +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: - "@ethersproject/abi" "^5.7.0" - "@ethersproject/bignumber" "^5.7.0" - web3-errors "^1.1.2" - web3-types "^1.2.0" - web3-utils "^4.0.6" + abitype "0.7.1" + web3-errors "^1.3.0" + web3-types "^1.8.0" + web3-utils "^4.3.1" + web3-validator "^2.0.6" -web3-eth-accounts@^4.0.6: - version "4.0.6" - resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-4.0.6.tgz#f907a9becefd693aeb2857cb98bbdb5f5871b221" - integrity sha512-xkOXXAEZs2CcR2v33CvFwtGJQS05ye7c3dlXcqwre91fhah9e6u4CPztpyR7HIKegWfIG1DRUwrcEqM2EMo4/w== +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== dependencies: "@ethereumjs/rlp" "^4.0.1" crc-32 "^1.2.2" ethereum-cryptography "^2.0.0" - web3-errors "^1.1.2" - web3-types "^1.2.0" - web3-utils "^4.0.6" - web3-validator "^2.0.2" - -web3-eth-contract@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-4.1.0.tgz#13ebd3a2fabd8872d9bf8bbd0bd53333a82f7815" - integrity sha512-e1eEXSwzNUaC5j0WWDqQ527fPFtIswoJZ/cov8mWvTQi3+dqyI590/6s7IF6A5CGew1RrewAqPMrR9m7WQt7hw== - dependencies: - web3-core "^4.2.0" - web3-errors "^1.1.2" - web3-eth "^4.2.0" - web3-eth-abi "^4.1.2" - web3-types "^1.2.0" - web3-utils "^4.0.6" - web3-validator "^2.0.2" - -web3-eth-ens@^4.0.6: - version "4.0.6" - resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-4.0.6.tgz#6aa65fb67d40b815714495745af543c53032db15" - integrity sha512-ulEX1XRuTojcpWuSd5pk7+CWkE7Yrgi18TcgiQkz+ltQWOVlSHBjcQ/guA9MJoFPa2d3ADSdCbRQEZDZ8Lu3gw== + web3-errors "^1.3.0" + web3-types "^1.7.0" + web3-utils "^4.3.1" + web3-validator "^2.0.6" + +web3-eth-contract@^4.5.0, web3-eth-contract@^4.7.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-4.7.0.tgz#119a744e8a35f60fd7bc3e4f8637f0380a3d0e85" + integrity sha512-fdStoBOjFyMHwlyJmSUt/BTDL1ATwKGmG3zDXQ/zTKlkkW/F/074ut0Vry4GuwSBg9acMHc0ycOiZx9ZKjNHsw== + dependencies: + "@ethereumjs/rlp" "^5.0.2" + web3-core "^4.5.1" + web3-errors "^1.3.0" + web3-eth "^4.8.2" + web3-eth-abi "^4.2.3" + web3-types "^1.7.0" + web3-utils "^4.3.1" + web3-validator "^2.0.6" + +web3-eth-ens@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-4.4.0.tgz#bc0d11d755cb15ed4b82e38747c5104622d9a4b9" + integrity sha512-DeyVIS060hNV9g8dnTx92syqvgbvPricE3MerCxe/DquNZT3tD8aVgFfq65GATtpCgDDJffO2bVeHp3XBemnSQ== dependencies: "@adraffy/ens-normalize" "^1.8.8" - web3-core "^4.2.0" - web3-errors "^1.1.2" - web3-eth "^4.2.0" - web3-eth-contract "^4.1.0" - web3-net "^4.0.6" - web3-types "^1.2.0" - web3-utils "^4.0.6" - web3-validator "^2.0.2" - -web3-eth-iban@^4.0.6: - version "4.0.6" - resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-4.0.6.tgz#606c59c28bf9c9763e996d0ede0ab0bad23ace3e" - integrity sha512-q47MbmoYWdfoylHlKZkZRHiPYeiFWqRiHou/wTYJEeZa2D3NG0wuPWz3jeQdZ5NzmS85yh+p2hxa54azVT8qmw== - dependencies: - web3-errors "^1.1.2" - web3-types "^1.2.0" - web3-utils "^4.0.6" - web3-validator "^2.0.2" - -web3-eth-personal@^4.0.6: - version "4.0.6" - resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-4.0.6.tgz#6ac9120ea79a4bdd429aa6b9704592bc30383a07" - integrity sha512-QBIl5fH5GPzDfYWxOvOLghnPruopVFfgnYsRmxEu85WAFidBb+XCqIOLmKe4qfF5czPG7gA/7PCPdsPqGNlf7Q== - dependencies: - web3-core "^4.2.0" - web3-eth "^4.2.0" - web3-rpc-methods "^1.1.2" - web3-types "^1.2.0" - web3-utils "^4.0.6" - web3-validator "^2.0.2" - -web3-eth@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-4.2.0.tgz#e4e8f4beae17957d9f20ea53b35f68b735bfc111" - integrity sha512-8YUEp5bq8j6KzlWpf856e0ZTXSNgJEYPg1gzzrmFC2+l0cjbul7vHnLA7DAsQGrIvXvvHvRp8da/8Ogm+G6FYQ== + web3-core "^4.5.0" + web3-errors "^1.2.0" + web3-eth "^4.8.0" + web3-eth-contract "^4.5.0" + web3-net "^4.1.0" + web3-types "^1.7.0" + web3-utils "^4.3.0" + web3-validator "^2.0.6" + +web3-eth-iban@^4.0.7: + version "4.0.7" + resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-4.0.7.tgz#ee504f845d7b6315f0be78fcf070ccd5d38e4aaf" + integrity sha512-8weKLa9KuKRzibC87vNLdkinpUE30gn0IGY027F8doeJdcPUfsa4IlBgNC4k4HLBembBB2CTU0Kr/HAOqMeYVQ== + dependencies: + web3-errors "^1.1.3" + web3-types "^1.3.0" + web3-utils "^4.0.7" + web3-validator "^2.0.3" + +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.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.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.2.0" - web3-errors "^1.1.2" - web3-eth-abi "^4.1.2" - web3-eth-accounts "^4.0.6" - web3-net "^4.0.6" - web3-providers-ws "^4.0.6" - web3-rpc-methods "^1.1.2" - web3-types "^1.2.0" - web3-utils "^4.0.6" - web3-validator "^2.0.2" - -web3-net@^4.0.6: - version "4.0.6" - resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-4.0.6.tgz#3b3d619db18e977d19238c0d641fb45ea704544c" - integrity sha512-Th4AtgpBgMdt76PmYyNBQxwAd2hAR8hIjhU4xjhqk1JATlXpcfgzyhegeAsvnSht4tcLnVQt6SN4ZVccllpd4A== - dependencies: - web3-core "^4.2.0" - web3-rpc-methods "^1.1.2" - web3-types "^1.2.0" - web3-utils "^4.0.6" - -web3-providers-http@^4.0.6: - version "4.0.6" - resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-4.0.6.tgz#2150de187dac843e59d9d1022bd548d9a2db60b4" - integrity sha512-FnBw0X25Xu0FejOgY2Ra7WY4p3fSrHxZuQ5a4j0ytDCE+0wxKQN0BaLRC7+uigbVvwEziQwzrhe+tn8bYAQKXQ== - dependencies: - cross-fetch "^3.1.5" - web3-errors "^1.1.2" - web3-types "^1.2.0" - web3-utils "^4.0.6" - -web3-providers-ipc@^4.0.6: - version "4.0.6" - resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-4.0.6.tgz#69010fab6995befb22dbddb032bb4e81aef771cb" - integrity sha512-17Ky978qGgdSWtctc/WKj9kX+QUypk6arZLI/Rfmq4zQpoR5ngH38CGozRkXUonr9hITYNaLW82NB1SPi1pRPQ== - dependencies: - web3-errors "^1.1.2" - web3-types "^1.2.0" - web3-utils "^4.0.6" - -web3-providers-ws@^4.0.6: - version "4.0.6" - resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-4.0.6.tgz#ec989f962f62e1801aef88584c3e72ee1a073373" - integrity sha512-0Q0SuKpr05gK+tUXdzPNmYlDV3exdqxnHx3f8p3cqz+v66J04EOT31bbETS0VcpDiQ9YaVS8FVSjT4PaseuNag== + 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.8.0" + web3-utils "^4.3.1" + web3-validator "^2.0.6" + +web3-net@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-4.1.0.tgz#db7bde675e58b153339e4f149f29ec0410d6bab2" + integrity sha512-WWmfvHVIXWEoBDWdgKNYKN8rAy6SgluZ0abyRyXOL3ESr7ym7pKWbfP4fjApIHlYTh8tNqkrdPfM4Dyi6CA0SA== dependencies: - "@types/ws" "8.5.3" - isomorphic-ws "^5.0.0" - web3-errors "^1.1.2" - web3-types "^1.2.0" - web3-utils "^4.0.6" - ws "^8.8.1" + web3-core "^4.4.0" + web3-rpc-methods "^1.3.0" + web3-types "^1.6.0" + web3-utils "^4.3.0" -web3-rpc-methods@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/web3-rpc-methods/-/web3-rpc-methods-1.1.2.tgz#999bdd206bdd6e1e9c55dd2317f3c678e0177bae" - integrity sha512-fzYp9eJyzq/UBzpP9kOQormelLfvl1kJnX5ucHv4T6kZaQfDuBt5XoYDtCDXSXVaz2MgTowsXwKEVAzN6h7+Ag== +web3-providers-http@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-4.2.0.tgz#0f4bf424681a068d49994aa7fabc69bed45ac50b" + integrity sha512-IPMnDtHB7dVwaB7/mMxAZzyq7d5ezfO1+Vw0bNfAeIi7gaDlJiggp85SdyAfOgov8AMUA/dyiY72kQ0KmjXKvQ== dependencies: - web3-core "^4.2.0" - web3-types "^1.2.0" - web3-validator "^2.0.2" + cross-fetch "^4.0.0" + web3-errors "^1.3.0" + web3-types "^1.7.0" + web3-utils "^4.3.1" -web3-types@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/web3-types/-/web3-types-1.2.0.tgz#176bfe53d7e46c2488d6b95c98df8f6cb1fe1375" - integrity sha512-ljx8mrkrOI8fRqvgOdxfpKYoso6n7I8T9LsqXl+Mz2Db0L+2H15an0xgdoWYpKndTPiU2NKRWFiopYifBQzcxQ== +web3-providers-ipc@^4.0.7: + version "4.0.7" + resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-4.0.7.tgz#9ec4c8565053af005a5170ba80cddeb40ff3e3d3" + integrity sha512-YbNqY4zUvIaK2MHr1lQFE53/8t/ejHtJchrWn9zVbFMGXlTsOAbNoIoZWROrg1v+hCBvT2c9z8xt7e/+uz5p1g== + dependencies: + web3-errors "^1.1.3" + web3-types "^1.3.0" + web3-utils "^4.0.7" -web3-utils@^4.0.6: - version "4.0.6" - resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-4.0.6.tgz#37c30cb884e1ccfecb752269bc7ff285105f4c0a" - integrity sha512-nLVtMf9mWTX604XiQQkWZlHLCag9GdHfQtnGJDNaDssTLUx5SpOm1CjhKCHcVcAH/QazEsWcLqUAuyqwKST1kA== +web3-providers-ws@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-4.0.8.tgz#6de7b262f7ec6df1a2dff466ba91d7ebdac2c45e" + integrity sha512-goJdgata7v4pyzHRsg9fSegUG4gVnHZSHODhNnn6J93ykHkBI1nz4fjlGpcQLUMi4jAMz6SHl9Ibzs2jj9xqPw== + dependencies: + "@types/ws" "8.5.3" + isomorphic-ws "^5.0.0" + web3-errors "^1.2.0" + web3-types "^1.7.0" + web3-utils "^4.3.1" + ws "^8.17.1" + +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== + dependencies: + web3-core "^4.4.0" + web3-types "^1.6.0" + web3-validator "^2.0.6" + +web3-rpc-providers@^1.0.0-rc.2: + version "1.0.0-rc.2" + resolved "https://registry.yarnpkg.com/web3-rpc-providers/-/web3-rpc-providers-1.0.0-rc.2.tgz#2f3bf62415708ce09ffd5c77d197046e7d5fefb1" + integrity sha512-ocFIEXcBx/DYQ90HhVepTBUVnL9pGsZw8wyPb1ZINSenwYus9SvcFkjU1Hfvd/fXjuhAv2bUVch9vxvMx1mXAQ== + dependencies: + web3-errors "^1.3.0" + web3-providers-http "^4.2.0" + web3-providers-ws "^4.0.8" + web3-types "^1.7.0" + 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, 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" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-4.3.1.tgz#3dcd75e3c683c26f0ba824bf27d7bc0a68b111de" + integrity sha512-kGwOk8FxOLJ9DQC68yqNQc7AzN+k9YDLaW+ZjlAXs3qORhf8zXk5SxWAAGLbLykMs3vTeB0FTb1Exut4JEYfFA== dependencies: ethereum-cryptography "^2.0.0" - web3-errors "^1.1.2" - web3-types "^1.2.0" - web3-validator "^2.0.2" + eventemitter3 "^5.0.1" + web3-errors "^1.2.0" + web3-types "^1.7.0" + web3-validator "^2.0.6" -web3-validator@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/web3-validator/-/web3-validator-2.0.2.tgz#c0d411371c5ab75806c8ad958276171678b8ddb9" - integrity sha512-9sQ5owd2UldTsva3o3htj2fTPpbmUwb4TfBXhjIkew8FyT0ss3DPI+j3p6XrfdxIVBEQ5r17YUakElDV99aW+A== +web3-validator@^2.0.3, web3-validator@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/web3-validator/-/web3-validator-2.0.6.tgz#a0cdaa39e1d1708ece5fae155b034e29d6a19248" + integrity sha512-qn9id0/l1bWmvH4XfnG/JtGKKwut2Vokl6YXP5Kfg424npysmtRLe9DgiNBM9Op7QL/aSiaA0TVXibuIuWcizg== dependencies: ethereum-cryptography "^2.0.0" util "^0.12.5" - web3-errors "^1.1.2" - web3-types "^1.2.0" + web3-errors "^1.2.0" + web3-types "^1.6.0" zod "^3.21.4" -web3@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/web3/-/web3-4.1.2.tgz#87f23090dcd16cb9eb7f8b61552b923865b309f4" - integrity sha512-BTUCJU7LvL0JDvB1RCRtHe5jFZ0sVYVqHvlNbG4uzebZ6ebtX/CnwiyiJ08UOuvKWzHrZQ+7jPuYuF65BMAXnQ== - dependencies: - web3-core "^4.2.0" - web3-errors "^1.1.2" - web3-eth "^4.2.0" - web3-eth-abi "^4.1.2" - web3-eth-accounts "^4.0.6" - web3-eth-contract "^4.1.0" - web3-eth-ens "^4.0.6" - web3-eth-iban "^4.0.6" - web3-eth-personal "^4.0.6" - web3-net "^4.0.6" - web3-providers-http "^4.0.6" - web3-providers-ws "^4.0.6" - web3-rpc-methods "^1.1.2" - web3-types "^1.2.0" - web3-utils "^4.0.6" - web3-validator "^2.0.2" +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.6.0" + web3-errors "^1.3.0" + 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.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.8.0" + web3-utils "^4.3.1" + web3-validator "^2.0.6" webidl-conversions@^3.0.0: version "3.0.1" @@ -3359,16 +3022,16 @@ which-boxed-primitive@^1.0.2: is-string "^1.0.5" is-symbol "^1.0.3" -which-typed-array@^1.1.11, which-typed-array@^1.1.2: - version "1.1.11" - resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.11.tgz#99d691f23c72aab6768680805a271b69761ed61a" - integrity sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew== +which-typed-array@^1.1.14, which-typed-array@^1.1.15, which-typed-array@^1.1.2: + version "1.1.15" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.15.tgz#264859e9b11a649b388bfaaf4f767df1f779b38d" + integrity sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA== dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" + available-typed-arrays "^1.0.7" + call-bind "^1.0.7" for-each "^0.3.3" gopd "^1.0.1" - has-tostringtag "^1.0.0" + has-tostringtag "^1.0.2" which@^2.0.1: version "2.0.2" @@ -3377,20 +3040,15 @@ which@^2.0.1: dependencies: isexe "^2.0.0" -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.8.1: - version "8.16.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.16.0.tgz#d1cd774f36fbc07165066a60e40323eab6446fd4" - integrity sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ== +word-wrap@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" + integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== -yallist@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" - integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== +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== yn@3.1.1: version "3.1.1" @@ -3403,6 +3061,6 @@ yocto-queue@^0.1.0: integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== zod@^3.21.4: - version "3.22.4" - resolved "https://registry.yarnpkg.com/zod/-/zod-3.22.4.tgz#f31c3a9386f61b1f228af56faa9255e845cf3fff" - integrity sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg== + version "3.23.8" + resolved "https://registry.yarnpkg.com/zod/-/zod-3.23.8.tgz#e37b957b5d52079769fb8097099b592f0ef4067d" + integrity sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g== diff --git a/docs/concepts/01_what_is_kilt.md b/concepts/01_what_is_kilt.md similarity index 89% rename from docs/concepts/01_what_is_kilt.md rename to concepts/01_what_is_kilt.md index 401a4c289..7f7b38933 100644 --- a/docs/concepts/01_what_is_kilt.md +++ b/concepts/01_what_is_kilt.md @@ -19,9 +19,9 @@ Such entities can establish a business model based on the trust infrastructure K In particular, KILT provides: -* A **universal identity protocol** for individuals, organizations, objects, and intelligent agents to obtain credentials for arbitrary attributes about themselves issued by trusted [Attesters](./10_glossary.md#attester). +* A **universal identity protocol** for individuals, organizations, objects, and intelligent agents to obtain credentials for arbitrary attributes about themselves issued by trusted [Issuers](./10_glossary.md#issuer). * A **self-sovereign mechanism** for putting credential holders in control of their own data, allowing them to choose if and where they make their credentials public and how much information from those credentials they wish to share. -* A **[Trust Market](./10_glossary.md#trust-market) for [Attesters](./10_glossary.md#attester)** of such credentials, allowing widely trusted entities to be compensated for their valuable attestation work. +* A **[Trust Market](./10_glossary.md#trust-market) for [Issuers](./10_glossary.md#issuer)** of such credentials, allowing widely trusted entities to be compensated for their valuable attestation work. KILT's main goal is to generate a level playing field for companies to explore new business models related to trust relationships and data sovereignty. KILT enables businesses and governments to rely on a common standard owned by everyone participating and not by a single company or set thereof. @@ -47,7 +47,7 @@ Trusted entities issue them and hand them out to the holder. That holder then has full control of their credential (their passport) and can use it wherever needed. With the invention of the internet, and later of Web 2.0, services evolved and merged into totally centralized solutions including Google, Meta, and X among others. -They no longer attest to someone's email account, but due to their business model, those same service providers store and control our personal data (i.e., our identity). +They no longer attest someone's email account, but due to their business model, those same service providers store and control our personal data (i.e., our identity). For instance, they could stop allowing us to log into a certain website if they decide to. More often than not, companies store the data out of necessity and for their own business purpose. Every time users log into any service, they generate new data points which are then aggregated and sold for advertising purposes. @@ -64,5 +64,5 @@ The core ideas are: * Managing user identities in the form of [decentralized identifiers (DIDs)](https://w3c-ccg.github.io/did-spec/), with the support of the KILT blockchain * Obtaining digital [verifiable credentials](./10_glossary.md#verifiable-credentials) for user-specified claims -* Supporting revocation of verifiable credentials by their Attesters +* Supporting revocation of verifiable credentials by their Issuers * Presenting and verifying verifiable credentials in a privacy-preserving and user-controlled way diff --git a/docs/concepts/02_did.md b/concepts/02_did.md similarity index 98% rename from docs/concepts/02_did.md rename to concepts/02_did.md index 7c1164c6c..b132ef34c 100644 --- a/docs/concepts/02_did.md +++ b/concepts/02_did.md @@ -69,7 +69,7 @@ KILT thus rejects light DID signatures even if the original claim in the credent :::tip -For a detailed developer-oriented guide to KILT DIDs, read the [DID Cookbook section](../develop/01_sdk/02_cookbook/01_dids/01_light_did_creation.md). +For a detailed developer-oriented guide to KILT DIDs, read the [DID Cookbook section](/develop/sdk/cookbook/dids/light-did-creation). ::: diff --git a/docs/concepts/03_web3names.md b/concepts/03_web3names.md similarity index 94% rename from docs/concepts/03_web3names.md rename to concepts/03_web3names.md index b2f54a1cc..b4230b511 100644 --- a/docs/concepts/03_web3names.md +++ b/concepts/03_web3names.md @@ -46,7 +46,7 @@ For example, showing the web3name of a collator's account on the [KILT Stakeboar }} /> -For a detailed developer-oriented guide to web3names and account linking, read the [web3name Cookbook section](../develop/01_sdk/02_cookbook/02_web3names/01_claim.md) and the [account linking Cookbook section](../develop/01_sdk/02_cookbook/03_account_linking/01_link.md). +For a detailed developer-oriented guide to web3names and account linking, read the [web3name Cookbook section](/develop/sdk/cookbook/web3names/claim) and the [account linking Cookbook section](/develop/sdk/cookbook/account_linking/link). ## KILT DIDs vs. KILT accounts diff --git a/docs/concepts/04_asset_dids.md b/concepts/04_asset_dids.md similarity index 100% rename from docs/concepts/04_asset_dids.md rename to concepts/04_asset_dids.md diff --git a/concepts/05_credentials/01_overview.md b/concepts/05_credentials/01_overview.md new file mode 100644 index 000000000..1764eb1db --- /dev/null +++ b/concepts/05_credentials/01_overview.md @@ -0,0 +1,44 @@ +--- +id: overview +title: Overview +--- + +import ThemedImage from '@theme/ThemedImage'; + +**Credentials** consist of a set of claims which belong to a **Holder**, are issued/attested by an **Issuer**, and that a **Verifier** can verify. + +
+ +
+ +To get a credential, a Holder needs to take the following steps: + +1. Find a **CType** to base a claim on. Potential Issuers and Verifiers might advertise this information themselves. +2. Make a **claim** containing a set of properties about themselves. +2. Fulfil any requirement from your Issuer. This may include providing them with **claims** about yourself that you want to see included in a credential, accepting their **Terms**, and paying a **Quote**. +4. Request that the Issuer attest to claims about you by issuing a credential. +5. Wait for the Issuer to **issue** a credential. + +Once attested, the wrapped claims are considered to be a valid credential. + +To use a Credential, the Holder can generate a Verifiable Presentation for a Verifier. +The verification would follow this process: + +1. The Verifier may request a **Credential** of a CType, along with with properties to reveal. +They also provide a **challenge** to ensure the presentations aren't recycled. +2. The Holder selectively **discloses** the requested properties and signs them along with the challenge to generate a presentation. +3. The Verifier **verifies** the presentation structure, content and signature, and decides whether they trust the Issuer of the presented credential. + +The next sections describe each step in more detail. + +:::info + +To learn about how to implement the flow above in a dapp that interacts with a browser extension, read the [Credential API specification](https://github.com/KILTprotocol/spec-ext-credential-api). + +::: diff --git a/docs/concepts/05_credentials/02_ctypes.md b/concepts/05_credentials/02_ctypes.md similarity index 90% rename from docs/concepts/05_credentials/02_ctypes.md rename to concepts/05_credentials/02_ctypes.md index f902ba161..17eaa7b17 100644 --- a/docs/concepts/05_credentials/02_ctypes.md +++ b/concepts/05_credentials/02_ctypes.md @@ -16,12 +16,12 @@ The schema defines which properties exist and what their type should be, e.g., a ## CType model JSON schema -The following are all required properties of the JSON schema for [CType models](https://github.com/KILTprotocol/sdk-js/blob/master/packages/core/src/ctype/CType.schemas.ts): +The following are all required properties of the JSON schema for [CType models](https://github.com/KILTprotocol/sdk-js/blob/develop/packages/credentials/src/ctype/CType.schemas.ts): - `$id`: An **identifier**: in the format `kilt:ctype:0x{cTypeHash}`. - `$schema`: A **reference to CType metaschema**: Describes what a valid CType must looks like. You can find the latest metaschema on IPFS at the following address [ipfs://bafybeiah66wbkhqbqn7idkostj2iqyan2tstc4tpqt65udlhimd7hcxjyq/](ipfs://bafybeiah66wbkhqbqn7idkostj2iqyan2tstc4tpqt65udlhimd7hcxjyq/). - `title`: A user-friendly name for the CType that makes it easier for users to contextualize. -- `properties`: A set of fields (e.g., name, birth date) that the CType can contain, and that the Claimer can have attested. [Read more details about properties below](#properties). +- `properties`: A set of fields (e.g., name, birth date) that the CType can contain, and that the Holder can have attested. [Read more details about properties below](#properties). - `type`: An object containing properties for a claim about the Claimer in the credential. - `additionalProperties`: A boolean added since version 1 of CTypes, that must be set and allows or disallows any properties in addition to those in `properties`. If set to `false`, the CType validation will fail if there are any additional properties. @@ -93,13 +93,13 @@ Currently, it costs 0.001 KILT to create a CType on the KILT blockchain. ::: -For a detailed developer-oriented guide to KILT CTypes, read the [CType Cookbook section](../../develop/01_sdk/02_cookbook/04_claiming/01_ctype_creation.md). +For a detailed developer-oriented guide to KILT CTypes, read the [CType Cookbook section](/develop/sdk/cookbook/claiming/ctype-creation). [kilt-runtime-1.9.0]: https://github.com/KILTprotocol/kilt-node/releases/tag/1.9.0 :::danger Deprecation Warning: CType metaschema draft-01 -CTypes based on the [Draft 01](http://kilt-protocol.org/draft-01/ctype) metaschema are subject to a vulnerability that could fool an **Attester** by introducing data they never checked. +CTypes based on the [Draft 01](http://kilt-protocol.org/draft-01/ctype) metaschema are subject to a vulnerability that could fool an **Issuer** by introducing data they never checked. Due to this vulnerability, this version of the metaschema is deprecated and its use is discouraged when creating new CTypes. @@ -115,7 +115,7 @@ New Property Value: `"$schema": "ipfs://bafybeiah66wbkhqbqn7idkostj2iqyan2tstc4t ## Migration instructions -Attesters should transition to issuing credentials using upgraded versions of CTypes currently in use. +Issuers should transition to issuing credentials using upgraded versions of CTypes currently in use. Using sdk version `0.33.0` or later, you can produce a copy of an existing CType `oldCType` as follows: @@ -124,7 +124,7 @@ const newCType = CType.fromProperties(oldCType.title, oldCType.properties, 'V1') ``` The new CType has the same title and properties as the existing one, but be based on the new metaschema, resulting in a different hash and id. -After [registering the new CType on the KILT blockchain](../../develop/01_sdk/02_cookbook/04_claiming/01_ctype_creation.md), you can use the new CType as a drop-in replacement in issuing credentials. +After [registering the new CType on the KILT blockchain](/develop/sdk/claiming/ctype-creation), you can use the new CType as a drop-in replacement in issuing credentials. Verifiers depending on these CTypes should accept both the old and new CType during a transition period. Test thoroughly to ensure the correct behavior and functionality of the new CTypes in your application. diff --git a/docs/concepts/05_credentials/03_claiming.md b/concepts/05_credentials/03_claiming.md similarity index 59% rename from docs/concepts/05_credentials/03_claiming.md rename to concepts/05_credentials/03_claiming.md index 1779099f6..fc6c37d34 100644 --- a/docs/concepts/05_credentials/03_claiming.md +++ b/concepts/05_credentials/03_claiming.md @@ -7,20 +7,20 @@ import CodeBlock from '@theme/CodeBlock'; import Claim from '@site/scripts/out/claim.json.raw!=!raw-loader!@site/scripts/out/claim.json'; As KILT is an open system, entities can make claims about any other entities, including themselves. -An entity can only trust a claim (as in the real world) if another trusted entity (called **Attesters**) *certifies* this claim. -Therefore, **Verifiers** might trust different **Attesters** for distinct scenarios. +An entity can only trust a claim (as in the real world) if another trusted entity (called **Issuers**) *certifies* this claim. +Therefore, **Verifiers** might trust different **Issuers** for distinct scenarios. :::info Role recap -- **Claimers** want information about themselves certified. +- **Holders** want information about themselves certified. They also issue credentials, but these remain invalid without an attestation. -- **Attester** check the truthfulness of a claim and certify them. +- **Issuer** check the truthfulness of a claim and certify them. - **Verifiers** accept the credentials, only verifying that your certification are legitimate. ::: ## Creating a claim In KILT, claims are based on claim types (CTypes). -Given a CType, a Claimer only needs to create a claim with the properties specified in the CType schema. +Given a CType, a Holder only needs to create a claim with the properties specified in the CType schema. The resulting claim contains a reference to the CType by its hash and includes the identity of the claim subject (identified by the `owner` property, which has the value of a KILT DID). @@ -29,12 +29,12 @@ The resulting claim contains a reference to the CType by its hash and includes t ## Requesting a credential -Once the Claimer has wrapped their claims into a `Credential`, they send it to the chosen Attester using any messaging system for **certification**, i.e. attested. +Once the Holder has wrapped their claims into a `Credential`, they send it to the chosen Issuer using any messaging system for **certification**, i.e. attested. -The to-be-attested `Credential` contains the original claim, data needed for future selective disclosure of the claim contents (read more in the [Verification documentation](./05_verification.md)), and the legitimation and / or delegation ID of the Attester and the credential root hash, used to identify both the credential and its on-chain attestation. +The to-be-attested `Credential` contains the original claim, data needed for future selective disclosure of the claim contents (read more in the [Verification documentation](./05_verification.md)), and the legitimation and / or delegation ID of the Issuer and the credential root hash, used to identify both the credential and its on-chain attestation. :::info -For a detailed developer-oriented guide to KILT claims, read the [Claim Cookbook section](../../develop/01_sdk/02_cookbook/04_claiming/02_attestation_request.md). +For a detailed developer-oriented guide to KILT claims, read the [Claim Cookbook section](/develop/sdk/cookbook/claiming/attestation-request). ::: diff --git a/concepts/05_credentials/04_attestation.md b/concepts/05_credentials/04_attestation.md new file mode 100644 index 000000000..e9e398f21 --- /dev/null +++ b/concepts/05_credentials/04_attestation.md @@ -0,0 +1,28 @@ +--- +id: attestation +title: Attestations +--- + +KILT uses the terms Attestation and Credential interchangeably, but their meaning is different. +A _Credential_ includes the original holder's data and all the information linked to it, while an _Attestation_ only refers to the on-chain proof that a given credential has been attested. + +To write an attestation on the KILT blockchain, the Issuer checks the validity of the received to-be-attested `Credential` data, ensuring that the data inside it matches the requirements of the attestation. For example, that the user's name is indeed Alice. + +After that, the Issuer writes the `Credential`'s root hash on the KILT blockchain, certifying that a credential with that root hash is valid. +The Holder can monitor the blockchain to listen for the event resulting from the attestation process, marking when the credential is attested and usable. + +After the credential has been attested, the Holder can store it in their wallet and can now use it with Verifiers that trust credentials issued by that Issuer. + +:::info + +For a detailed developer-oriented guide to KILT attestations, read the [Attestation cookbook section](/develop/sdk/cookbook/claiming/attestation-creation). + +::: + +### Storing attestations + +Storing a attestation in the blockchain requires providing a constant deposit, which is currently around 0.12 KILT. The deposit amount is calculated based on the worst-case scenario for a attestation, where the maximum storage for one attestation reaches 179 bytes. +The deposit serves as a security measure to ensure the integrity of the blockchain and incentivize users to manage their attestation responsibly. +By requiring a deposit, it discourages spamming or unnecessary creation of attestation. +The issuer can reclaim the deposit by deleting their attestation. +Revoking them isn't sufficient as the deposit still shows in chain storage, but marked as invalid. \ No newline at end of file diff --git a/docs/concepts/05_credentials/05_verification.md b/concepts/05_credentials/05_verification.md similarity index 51% rename from docs/concepts/05_credentials/05_verification.md rename to concepts/05_credentials/05_verification.md index 0c50f9dcb..5a8bac074 100644 --- a/docs/concepts/05_credentials/05_verification.md +++ b/concepts/05_credentials/05_verification.md @@ -3,30 +3,30 @@ id: verification title: Verification --- -KILT lets a Verifier check if the information in a credential presented by a Claimer is correct and valid. -With the presentation of the credential, the Claimer also presents evidence that a third party (i.e., an Attester) ensured the correctness of the Claimer’s attributes. +KILT lets a Verifier check if the information in a credential presented by a Holder is correct and valid. +With the presentation of the credential, the Holder also presents evidence that a third party (i.e., an Issuer) ensured the correctness of the Holder’s attributes. -The Verifier trusts this third party either because they trust their reputation directly or they trust a delegation structure that this Attester is part of. +The Verifier trusts this third party either because they trust their reputation directly or they trust a delegation structure that this Issuer is part of. For example, a State department issuing driving licenses. For the verification process: -- The Claimer needs their credential and the private key associated with their identifier -- The Verifier needs the identifier of the trusted Attester +- The Holder needs their credential and the private key associated with their identifier +- The Verifier needs the identifier of the trusted Issuer -During the verification process the Claimer wants to prove the following things to the Verifier: +During the verification process the Holder wants to prove the following things to the Verifier: -- The credential is valid (i.e., not revoked by its Attester) +- The credential is valid (i.e., not revoked by its Issuer) - The attributes in the credential actually refer to it's Presenter - The credential contains information relevant for the Verifier for this use case -- That an Attester ensured the correct and trustworthy-ness of the Claimer's attributes +- That an Issuer ensured the correct and trustworthy-ness of the Holder's attributes -## Requesting a credential from a Claimer +## Requesting a credential from a Holder -The Verifier may request a credential from a Claimer, providing the following data: +The Verifier may request a credential from a Holder, providing the following data: - `cTypeHash`: Which CType hashes the Verifier can work with for the use case. They can provide multiple options, to regard as alternatives. -- `trustedAttesters`: Which Attesters to consider trusted for each specified CType. +- `trustedIssuers`: Which Issuers to consider trusted for each specified CType. - `requiredProperties`: Which properties for each specified CType must at least be revealed for the Verifier to consider the presentation sufficient. :::info @@ -34,7 +34,7 @@ The Verifier may request a credential from a Claimer, providing the following da [Read more on selective disclosure](#presenting-a-credential-with-selective-disclosure). ::: -- `challenge`: A nonce, which the Verifier can use to ensure that the presentation generated by the Claimer is fresh and not replayed by some other older interactions. +- `challenge`: A nonce, which the Verifier can use to ensure that the presentation generated by the Holder is fresh and not replayed by some other older interactions. ### Example @@ -45,7 +45,7 @@ The Verifier may request a credential from a Claimer, providing the following da "cTypes": [ { "cTypeHash": "0x3291bb126e33b4862d421bfaa1d2f272e6cdfc4f96658988fbcffea8914bd9ac", - "trustedAttesters": [ + "trustedIssuers": [ "did:kilt:4pehddkhEanexVTTzWAtrrfo2R7xPnePpuiJLC7shQU894aY" ], "requiredProperties": [ @@ -62,44 +62,44 @@ The Verifier may request a credential from a Claimer, providing the following da ## Presenting a credential with selective disclosure -Given the `requiredProperties` specified by the Verifier, the Claimer can decide how much of the information they wish to reveal before they generate the presentation and send it to the Verifier. +Given the `requiredProperties` specified by the Verifier, the Holder can decide how much of the information they wish to reveal before they generate the presentation and send it to the Verifier. If supported by the Verifier, they can choose to hide attributes and thus only disclose a subset of the original claim data. :::caution The presentations can still be correlated, since the hash of the credential always stays the same, even when creating new presentations and selecting different attributes to show. ::: -For example, verifying a driving license only requires the verification of the driver's name and picture. A Claimer can decide to hide additional information such as age and place of residence. -This increases the privacy of the Claimer since they only need to show attributes required in the specific context. +For example, verifying a driving license only requires the verification of the driver's name and picture. A Holder can decide to hide additional information such as age and place of residence. +This increases the privacy of the Holder since they only need to show attributes required in the specific context. :::info -For a detailed developer-oriented guide to KILT presentation creation, read the [presentation creation cookbook section](../../develop/01_sdk/02_cookbook/04_claiming/04_presentation_creation.md). +For a detailed developer-oriented guide to KILT presentation creation, read the [presentation creation cookbook section](/develop/sdk/cookbook/claiming/presentation-creation). ::: ## Verifying a presentation -The Verifier receives the presentation from the Claimer, re-calculates the root hash of the credential from which the presentation was generated, and queries the KILT blockchain to obtain the associated attestation information, including the revocation status of the credential. +The Verifier receives the presentation from the Holder, re-calculates the root hash of the credential from which the presentation was generated, and queries the KILT blockchain to obtain the associated attestation information, including the revocation status of the credential. -If the Claimer tampered with the credential, the re-calculated root hash won't match any attestation on the chain. +If the Holder tampered with the credential, the re-calculated root hash won't match any attestation on the chain. On the other hand, if the Verifier can find an attestation with the calculated hash on the chain and hasn't been revoked, the credential is valid. -However, this doesn't give the Verifier the guarantee that the Claimer is the rightful/legitimate owner of the credential presented. +However, this doesn't give the Verifier the guarantee that the Holder is the rightful/legitimate owner of the credential presented. ### Verifying the owner of the presented credential -When issued, a credential is linked to the KILT decentralized identifier (DID) of the original Claimer. -The Verifier can resolve the DID to the public key of the Claimer according to the [KILT DID specification](https://github.com/KILTprotocol/spec-kilt-did). +When issued, a credential is linked to the KILT decentralized identifier (DID) of the original Holder. +The Verifier can resolve the DID to the public key of the Holder according to the [KILT DID specification](https://github.com/KILTprotocol/spec-kilt-did). The Verifier assumes that the private key for the DID public key is only known to the owner of the credential, and isn't shared across users. -Therefore, when requesting the Claimer to generate a presentation, the Verifier challenges the Claimer to sign a nonce (a random number used once) that the Verifier sends together with their request. +Therefore, when requesting the Holder to generate a presentation, the Verifier challenges the Holder to sign a nonce (a random number used once) that the Verifier sends together with their request. -If the Claimer can sign both the nonce and the presentation with the private key that only the credential's owner should have knowledge of, the Verifier can be sure that the Claimer is the legitimate owner of the credential. +If the Holder can sign both the nonce and the presentation with the private key that only the credential's owner should have knowledge of, the Verifier can be sure that the Holder is the legitimate owner of the credential. ### Verifying the content of the presented credential -After the Verifier has checked that the credential is valid and belongs to the presenting Claimer, they need to verify that they have received all the required information. +After the Verifier has checked that the credential is valid and belongs to the presenting Holder, they need to verify that they have received all the required information. This is to verify that the presentation received contains the right values **and** the right semantics. For example, the `age` property could have different meanings depending on whether it's defined for a passport CType or a Whisky certificate CType. @@ -107,7 +107,7 @@ Therefore, the Verifier has to check if the CType matches one of the requested C :::info -For a detailed developer-oriented guide to KILT credential verification, read the [verification cookbook section](../../develop/01_sdk/02_cookbook/04_claiming/05_presentation_verification.md). +For a detailed developer-oriented guide to KILT credential verification, read the [verification cookbook section](/develop/sdk/cookbook/claiming/presentation-verification). ::: diff --git a/docs/concepts/05_credentials/06_public_credentials.md b/concepts/05_credentials/06_public_credentials.md similarity index 93% rename from docs/concepts/05_credentials/06_public_credentials.md rename to concepts/05_credentials/06_public_credentials.md index e220b1962..39d99bcb4 100644 --- a/docs/concepts/05_credentials/06_public_credentials.md +++ b/concepts/05_credentials/06_public_credentials.md @@ -8,7 +8,7 @@ import CodeBlock from '@theme/CodeBlock'; import PublicCredential from '@site/scripts/out/public-credential.json.raw!=!raw-loader!@site/scripts/out/public-credential.json'; [AssetDIDs][asset-did-concepts] give a way to uniquely identify assets regardless of the blockchain they live on or their current owner. -KILT allows owners of an on-chain DID with an assertion key (a.k.a. attesters) to issue credentials to those assets. +KILT allows owners of an on-chain DID with an assertion key (a.k.a. issuers) to issue credentials to those assets. Public credentials aren't that different in their structure from traditional KILT credentials. The main difference is that, since they're public, they don't have selective disclosure capabilities. @@ -18,7 +18,7 @@ This is because the cryptographic information required to enable this is strippe {PublicCredential} -:::warning Anyone can be an attester! +:::warning Anyone can be an issuer! While the owner of normal KILT credentials holds them in their wallet and decides what credential to share with who, public credentials are, as the name suggests, public by design. This means that when reading the credentials issued for a given asset, consumers should be aware of the level of trust they have towards the issuer of each credential. diff --git a/docs/concepts/05_credentials/_category_.json b/concepts/05_credentials/_category_.json similarity index 100% rename from docs/concepts/05_credentials/_category_.json rename to concepts/05_credentials/_category_.json diff --git a/docs/concepts/06_distributed_trust.md b/concepts/06_distributed_trust.md similarity index 61% rename from docs/concepts/06_distributed_trust.md rename to concepts/06_distributed_trust.md index 261a38b77..ea781eca4 100644 --- a/docs/concepts/06_distributed_trust.md +++ b/concepts/06_distributed_trust.md @@ -5,14 +5,14 @@ title: Distributed Trust import ThemedImage from '@theme/ThemedImage'; -Sometimes, Attesters are individuals that attest to the validity of claims made by Claimers. -However, usually multiple Attesters group together to build up trust in a brand. -In this way, Verifiers no longer need to trust each and every Attester individually. -They can put trust in the brand as a whole, which in return ensures that all Attesters working for this brand are credible. +Sometimes, Issuers are individuals that attest to the validity of claims made by Holder. +However, usually multiple Issuers group together to build up trust in a brand. +In this way, Verifiers no longer need to trust each and every Issuer individually. +They can put trust in the brand as a whole, which in return ensures that all Issuers working for this brand are credible. Such a brand can be organized in many different ways. The KILT protocol provides mechanisms to form such brands on the blockchain. -There are two ways for Attesters to create groups and build an organization. +There are two ways for Issuers to create groups and build an organization. The first is by creating a Delegation Hierarchy, which provides a basic and traditional hierarchical structure. The second option is a Virtual Credential Organization (VCO), which isn't yet implemented in KILT. VCOs will be more flexible and able to support more decentralized use cases than Delegation Hierarchies. @@ -39,25 +39,25 @@ This means that the creator has full control over the whole hierarchy. Following the laws of Tree data structures, when the hierarchy root adds new members to the hierarchy, the new members become direct "children" of the root. Similarly, when someone other than root adds new members, it becomes the parent of the new children. -The graph above provides an example Delegation Hierarchy containing five Attesters. -**Attester 1** is the root (i.e., the creator) of the Delegation Hierarchy. -At some point, Attester 1 has added two more Attesters, Attester 2 and Attester 3. -**Attester 2** was given the right to both further delegate to other entities and to issue credentials on behalf of the organization. -**Attester 3**, on the other hand, was only given the right to add more Attesters to the Delegation Hierarchy, so they can't issue any credentials. +The graph above provides an example Delegation Hierarchy containing five Issuers. +**Issuer 1** is the root (i.e., the creator) of the Delegation Hierarchy. +At some point, Issuer 1 has added two more Issuers, Issuer 2 and Issuer 3. +**Issuer 2** was given the right to both further delegate to other entities and to issue credentials on behalf of the organization. +**Issuer 3**, on the other hand, was only given the right to add more Issuers to the Delegation Hierarchy, so they can't issue any credentials. This is useful in cases where someone should only have powers over the members, but isn't authorized to do any work themselves. -For example, in companies this could be someone who manages a team of Attesters. -**Attesters 4** and **Attester 5** were added by Attester 3 and were only given attestation permissions, meaning that they can issue new credentials, but can't delegate any work to other Attesters. +For example, in companies this could be someone who manages a team of Issuers. +**Issuers 4** and **Issuer 5** were added by Issuer 3 and were only given attestation permissions, meaning that they can issue new credentials, but can't delegate any work to other Issuers. In the company example, these would be employees that attest the work but have no authority to hire new staff. ### Revocation Delegation hierarchies limit who can change or remove permissions. -For delegations, only the parents of a given Attester can change or remove the Attester's delegation itself or any of its children. -E.g., Attester 2 can't change the delegation information for Attester 4, but Attester 1 and Attester 3 can both remove Attester 4 from the organization, or give them permission to also hire new people, which it can't do right now. +For delegations, only the parents of a given Issuer can change or remove the Issuer's delegation itself or any of its children. +E.g., Issuer 2 can't change the delegation information for Issuer 4, but Issuer 1 and Issuer 3 can both remove Issuer 4 from the organization, or give them permission to also hire new people, which it can't do right now. -Credential revocation works similarly, with the difference that any parent can revoke a credential (as with delegations), or by the original Attester. -E.g., Attester 2 can't revoke credentials issued by Attester 1, 3, 4 and 5, while Attester 1 can revoke credentials issued by any Attester since Attester 1 is, directly or indirectly, the parent of every other node. +Credential revocation works similarly, with the difference that any parent can revoke a credential (as with delegations), or by the original Issuer. +E.g., Issuer 2 can't revoke credentials issued by Issuer 1, 3, 4 and 5, while Issuer 1 can revoke credentials issued by any Issuer since Issuer 1 is, directly or indirectly, the parent of every other node. ## Storing delegation node diff --git a/docs/concepts/07_dip/01_overview.md b/concepts/07_dip/01_overview.md similarity index 100% rename from docs/concepts/07_dip/01_overview.md rename to concepts/07_dip/01_overview.md diff --git a/docs/concepts/07_dip/02_provider.md b/concepts/07_dip/02_provider.md similarity index 100% rename from docs/concepts/07_dip/02_provider.md rename to concepts/07_dip/02_provider.md diff --git a/docs/concepts/07_dip/03_consumer.md b/concepts/07_dip/03_consumer.md similarity index 100% rename from docs/concepts/07_dip/03_consumer.md rename to concepts/07_dip/03_consumer.md diff --git a/docs/concepts/07_dip/04_user_account_kilt.md b/concepts/07_dip/04_user_account_kilt.md similarity index 94% rename from docs/concepts/07_dip/04_user_account_kilt.md rename to concepts/07_dip/04_user_account_kilt.md index 834c3d736..97c5fb035 100644 --- a/docs/concepts/07_dip/04_user_account_kilt.md +++ b/concepts/07_dip/04_user_account_kilt.md @@ -50,7 +50,7 @@ The command requires the following variables: - `relayApi` The [`ApiPromise`](https://polkadot.js.org/docs/api/examples/promise/) instance for the parent relay chain. - `signer` The signing callback to sign the cross-chain transaction. - `submitterAddress` The address of the transaction submitter on the consumer chain. -- `keyRelationship` The [`VerificationKeyRelationship`](https://kiltprotocol.github.io/sdk-js/types/types_src.VerificationKeyRelationship.html) required for the DIP operation authorized on the relay chain. +- `keyRelationship` The `VerificationKeyRelationship` required for the DIP operation authorized on the relay chain. And the following optional environment variables: diff --git a/docs/concepts/07_dip/05_dapp_developer.md b/concepts/07_dip/05_dapp_developer.md similarity index 94% rename from docs/concepts/07_dip/05_dapp_developer.md rename to concepts/07_dip/05_dapp_developer.md index 7409dc288..09857fb2f 100644 --- a/docs/concepts/07_dip/05_dapp_developer.md +++ b/concepts/07_dip/05_dapp_developer.md @@ -51,8 +51,8 @@ For example, `did:kilt:4q4QzFTs9hKh4QizLB3B7zuGYCG3QPamiBFEgwM6gTM7gK3g` Currently only supports version 1. - `blockNumber`: The block number of the relay chain to use for the generation of the DIP proof. If not provided, uses the last finalized block. -- `linkedAccounts`: An array of [account addresses linked to the DID](../../develop/01_sdk/02_cookbook/03_account_linking/01_link.md##linking-an-account-to-a-did) to reveal in the generated proof. -- `web3Name`: Whether to reveal [the web3name of the DID subject](../../develop/01_sdk/02_cookbook/02_web3names/01_claim.md) in the generated proof. +- `linkedAccounts`: An array of [account addresses linked to the DID](/develop/sdk/cookbook/account_linking/account-link#linking-an-account-to-a-did) to reveal in the generated proof. +- `web3Name`: Whether to reveal [the web3name of the DID subject](/develop/sdk/cookbook/web3names/claim) in the generated proof. In the example code, the configuration also has extra parameters for the time-bound DID signature extension [mentioned below](#creating-extensions-for-specific-proofs). @@ -108,7 +108,7 @@ await signAndSubmitTx(consumerApi, dipSubmittable, submitterKeypair) Linked accounts let you specify which accounts you want to prove that you control when you make the cross-chain proof. As part of the proof provided, you can also include other values, such as the web3name. -For all the accounts you want to link, use the `associateAccountToChainArgs` method, [as detailed in this guide](../../develop/01_sdk/02_cookbook/03_account_linking/01_link.md##linking-an-account-to-a-did). +For all the accounts you want to link, use the `associateAccountToChainArgs` method, [as detailed in this guide](/develop/sdk/cookbook/account_linking/account-link#linking-an-account-to-a-did). You can then batch all the linked account transactions and authorize them using the `authorizeTx` method. diff --git a/docs/concepts/07_dip/_category_.json b/concepts/07_dip/_category_.json similarity index 100% rename from docs/concepts/07_dip/_category_.json rename to concepts/07_dip/_category_.json diff --git a/docs/concepts/08_messaging.md b/concepts/08_messaging.md similarity index 98% rename from docs/concepts/08_messaging.md rename to concepts/08_messaging.md index 1070ed633..7d4597544 100644 --- a/docs/concepts/08_messaging.md +++ b/concepts/08_messaging.md @@ -40,5 +40,5 @@ Therefore, this scheme still works if a DID should expose multiple encryption ke :::caution While no one can read or change what's inside an encrypted message even if they intercept it while traveling on the network, a sophisticated attacker may try to guess what's inside and trick either side of the channel by resubmitting a copy of that message later. -For a detailed developer-oriented guide about how to protect against *replay attacks*, read the [Replay Protection Cookbook section](../develop/01_sdk/02_cookbook/06_messaging/02_replay_protection.md). +For a detailed developer-oriented guide about how to protect against *replay attacks*, read the [Replay Protection Cookbook section](/develop/sdk/cookbook/messaging/replay-protection). ::: diff --git a/concepts/09_advanced_concepts/01_terms_and_quote.md b/concepts/09_advanced_concepts/01_terms_and_quote.md new file mode 100644 index 000000000..8c02c9a1b --- /dev/null +++ b/concepts/09_advanced_concepts/01_terms_and_quote.md @@ -0,0 +1,87 @@ +--- +id: terms-and-quotes +title: Terms and Quotes +--- + +During the attestation flow, it can happen that either the Holder requests or the Issuer sends the terms of the attestation, i.e., the requirements set by the both parties (the Holder and the Issuer) for the conditions of the attestation. + +These terms are defined and agreed upon before the credential is issued. +This part of the process requires interaction and communication between both parties. +This communication can be done independently, e.g., in person, via messaging, on social media etc., or via the KILT Software Development Kit (SDK). + +## Defining Terms + +The `Terms` object consists of following items: + +- **Claim**: A partial claim with information the Issuer already has about the Holder. + - This helps the Holder to pre-fill their claims with information only known to the Issuer. + - The partial claim has to at least contain the CType hash the attestation will be based on. +- **CTypes**: An optional list of full CTypes, in case the Holder does not know the correct CType for the credential, yet. +- **Legitimations**: A legitimation is a credential, issued to the Issuer, showing that the Issuer has the authority or legitimacy to attest the claim requested. + - This is a way of establishing trust between the participants. +- **Delegation Id**: An Issuer may be part of a top-down trust authority that has given them the right to attest in the name of an institution, or similar, as explained in the [Distributed Trust section](../06_distributed_trust.md). If the Issuer has attestation rights, delegated from another entity, this should be stated clearly at this point. +- **Quote**: As shown in the [section below](#defining-a-quote). + +Only the CType hash in the partial claim is required, everything else is optional. + +## Sending Terms + +Both "request terms" and "submit terms" are part of the messaging system: the message is sent as "request terms" and received as "submit terms". + +The interaction is as follows: + +- The Holder creates a partial `Claim` (optionally) and sends a message to the Issuer, requesting the `Terms`. +- An Issuer creates a `Terms` object and sends it, as part of a "submit terms" message, back to the Holder. +- The Holder receives the message, checks the `Terms` and, if all is in order, agrees to them. + + +## Defining a Quote + +A `Quote` object consists of costs, a time frame for delivering the attestation, and the terms and conditions of the work to be performed. +It may be sent to the Holder by the Issuer as part of the terms. +In cases where multiple Issuers provide the same attestation (for example, a car inspection) the Holder may request a Quote from several Issuers to choose the Issuer with the best conditions. + +To come to an agreement on the Quote, the participants may message back and forth, signing the object. +If the Issuer wishes to add a Quote to their Terms, the Issuer signs the `Quote` object before sending it as part of the "submit terms" message to the Holder. +After the Holder has received the signed Quote and accepts it, the Holder counter-signs it and attaches the credential hash for linking the Quote to the credential that it refers to. +After the final exchange, the Issuer checks all the information and issues the credential. + +```mermaid +classDiagram + class Quote { + String issuerDid + String cTypeHash + Cost cost + String currency + String timeframe + String termsAndConditions + } + + class Cost { + Number gross + Number net + Object tax + } + + Quote *-- Cost + + class Signature { + String keyId + String signature + } + + class QuoteIssuerSigned { + Signature issuerSignature + } + + QuoteIssuerSigned *-- Signature + QuoteIssuerSigned --|> Quote + + class QuoteAgreement { + String rootHash + Signature claimerSignature + } + + QuoteAgreement *-- Signature + QuoteAgreement --|> QuoteIssuerSigned +``` diff --git a/docs/concepts/09_advanced_concepts/02_nested_ctypes.md b/concepts/09_advanced_concepts/02_nested_ctypes.md similarity index 100% rename from docs/concepts/09_advanced_concepts/02_nested_ctypes.md rename to concepts/09_advanced_concepts/02_nested_ctypes.md diff --git a/docs/concepts/09_advanced_concepts/_category_.json b/concepts/09_advanced_concepts/_category_.json similarity index 100% rename from docs/concepts/09_advanced_concepts/_category_.json rename to concepts/09_advanced_concepts/_category_.json diff --git a/docs/concepts/10_glossary.md b/concepts/10_glossary.md similarity index 91% rename from docs/concepts/10_glossary.md rename to concepts/10_glossary.md index b607253bc..34c841107 100644 --- a/docs/concepts/10_glossary.md +++ b/concepts/10_glossary.md @@ -33,23 +33,22 @@ Verifiable credentials are often associated with DIDs and can be stored and mana ## KILT Protocol Specific Terms -**Attestation** -the act of formally confirming and certifying the validity of the data within a claim, typically performed by a trusted Attester. +**Attestation** -the act of formally confirming and certifying the validity of the data within a claim, typically performed by a trusted Issuer. -**Attester** - a trusted entity or organization that attests claims and issues credentials on the KILT Protocol. -The Attester confirms the truth of the claim requested based on the information presented by the Claimer. +**Issuer** - a trusted entity or organization that attests claims and issues credentials on the KILT Protocol. +The Issuer confirms the truth of the claim requested based on the information presented by the Holder. -**Claimer** - an individual or entity that asserts a claim or statement about their identity or qualifications. -The Claimer can use credentials to provide evidence of their claims, which can be verified by third-party entities or systems. +**Holder** - an individual or entity that asserts a claim or statement about their identity or qualifications. +The Holder can use credentials to provide evidence of their claims, which can be verified by third-party entities or systems. **Claim Type (CType)** - a specific type of claim that can be made about an individual, such as their education, work experience, or identity information. Each claim type has a defined set of attributes that must be provided to support the claims data type and structure. It can be used to generate verifiable credentials that can be shared with others. [See the CTypes concept page for more details](https://docs.kilt.io/docs/concepts/credentials/ctypes) - -**Credential** - a verifiable digital representation of a claim made by a Claimer, which has been attested to by a trusted entity, such as an Attester or Issuer. +**Credential** - a verifiable digital representation of a claim made by a Holder, which has been attested to by a trusted entity, such as an Issuer or Verifier. It consists of a set of attributes that describe the claim and the proof of its validity, and can be shared with third parties to provide verifiable proof of the claim. **KILT Digital Identity** - a self-sovereign identity that is owned and controlled by the individual or entity it represents. -It consists of verifiable credentials that are issued by trusted entities, such as Attesters, and can be used to prove claims about the individual or entity's identity, qualifications, or other attributes. +It consists of verifiable credentials that are issued by trusted entities, such as Issuers, and can be used to prove claims about the individual or entity's identity, qualifications, or other attributes. **KILT Coin** - the native token of the KILT blockchain used for paying for attestations and DIDs. It can also be used for governance, staking, transaction fees and as a means of exchange on the network. @@ -57,8 +56,6 @@ It consists of verifiable credentials that are issued by trusted entities, such KILT’s mission is to return control over personal data to its owner, restoring privacy to the individual. ### Request for Attestation - - **Trust Anchors** - entities that are trusted to issue or verify claims on the KILT network, such as governments, educational institutions, or professional organizations. **Trust Market** - a market that operates on trust and reputation in addition to financial incentives, where buyers and sellers exchange goods or services based on established reputation through digital platforms. diff --git a/docs/develop/01_sdk/04_integrate/02_browser.md b/develop/02_browser.md similarity index 100% rename from docs/develop/01_sdk/04_integrate/02_browser.md rename to develop/02_browser.md diff --git a/docs/develop/02_chain/01_introduction.md b/develop/02_chain/01_introduction.md similarity index 100% rename from docs/develop/02_chain/01_introduction.md rename to develop/02_chain/01_introduction.md diff --git a/develop/02_chain/02_pallets/01_did.md b/develop/02_chain/02_pallets/01_did.md new file mode 100644 index 000000000..79feeffd0 --- /dev/null +++ b/develop/02_chain/02_pallets/01_did.md @@ -0,0 +1,115 @@ +--- +id: pallet-did +title: DID pallet +--- + +In KILT a DID is a decentralized identifier that the user owns and controls. +It consists of a unique set of keys that can be used for different operations on the blockchain. +For an in-depth explanation see the [KILT DID spec](https://github.com/KILTprotocol/kilt-did-driver/blob/master/docs/did-spec/spec.md). + +A DID may be a "light" DID, which is not stored on-chain, or a "full" on-chain DID. +A light DID is issued by default, with the keys stored locally on your device. +By upgrading this to a full DID registered on the blockchain, all the keys associated with it can be retrieved from the KILT blockchain storage. + +A full DID can then be used to perform certain on-chain actions which include: + +* Writing CTypes to the chain +* Writing attestations to the chain +* Setting delegations +* Doing key rotations on the DID keys + +## Register a Full DID + +A full DID is needed if the user wants to become an Issuer or wants to setup delegations. +A full DID also allows the user to embed a list of URLs, known as services, into the DID document so that they can be retrieved from the chain as part of the DID document. +To create a full DID the user first has to create some keys, and optionally some services: + +* one authentication key for signing extrinsics from your DID +* zero or more key agreement keys for encrypting messages that are sent to you +* (optional) one attestation key for signing attestations +* (optional) one delegation key for authorizing delegations +* (optional) service that point to external hostings for others to find + +After the relevant components have been created, they are ready to write the DID to the KILT blockchain. +The user then has to create the `did::create` extrinsic and sign it with any KILT account that has enough funding to pay both the transaction fees and the DID deposit. +The extrinsic consists of + +* The `DidCreationDetails` object containing keys, services and the account id of the submitter for the creation +* The `DidSignature` which is a signature using your authentication key over the scale encoded `DidCreationDetails` from above +* A regular signature authenticating the sender of the extrinsic + +The DID owner and the submitter can be two different parties. +This allows the creation of a DID without having to pay any fees or deposits. +Beware that this also means that the DID creator gives up some power over the DID: The submitter who pays the deposit will be able to delete the DID from the blockchain and claim back its deposit. +Once the `did::create` extrinsic is submitted and executed, the DID is written to the chain. + +## Use a Full DID + +Once the DID is successfully registered on chain, it can be used to perform certain on-chain actions that are not possible to do with a regular account. +This includes the handling of attestations and CTypes, setting up trust hierarchies through delegations, managing web3names and much more. + +Those actions need to be signed by the DID before they can be submitted to chain by any account that the DID owner specifies when signing. +We are naming those actions "DID-Calls". +To submit those there is a special extrinsic called `submit_did_call`. + +The process of doing any DID-Call is always the same: + +* Construct the actual call you want to execute including all arguments of that extrinsic. +* Wrap the call in a `DidAuthorizedCallOperation` together with the + * Senders DID to indicate who wants this operation to happen + * Senders DID tx_counter + 1 to prevent replay attacks + * Current block number to prevent the operation being submitted too far in the future + * Account of the submitter to allow the DID owner to specify who is allowed to submit +* Create a signature over the `DidAuthorizedCallOperation` by scale-encoding it and signing it using the appropriate key + * Most operations require the authentication key of the DID to be used + * Managing Attestations requires the attestation key + * Managing Delegations requires the delegation key +* Construct the `submit_did_call` extrinsic consisting of + * The `DidAuthorizedCallOperation` + * The DID signature +* Pass the call over to the submitter who can now sign and submit it to the chain + * The submitter will have to pay for all fees and deposits that result from the operation + * In general the submitter will have the power to delete all on-chain objects to reclaim their deposit +* The chain now checks that + * The submitter's signature is correct + * The submitter is the one specified in the `DidAuthorizedCallOperation` + * The DID signature is correct + * The tx_counter is valid (current tx_counter + 1) + * The blocknumber is not older than an hour (given 12s block time) +* After that the actual call gets dispatched with a special `DidOrigin` + * This allows the executer of the actual call to get the DID and the account of the submitter + +## Update a Full DID + +There is a set of extrinsics available to update a full DID. +These are: + +* `set_authentication_key` +* `set_delegation_key` +* `remove_delegation_key` +* `set_attestation_key` +* `remove_attestation_key` +* `add_key_agreement_key` +* `remove_key_agreement_key` +* `add_service_endpoint` +* `remove_service_endpoint` +* `delete` + +All of them have to be authenticated using the DID that is updated following the process described above. + +## What About the Deposit? + +When writing a DID to the chain the submitter of the extrinsic has to pay a deposit. +The base deposit is currently 2 KILT. +For additional used storage, for example by adding more services, more tokens are taken as deposit, depending on the amount of additional storage taken. +Freeing up storage reduces the deposit. +This is to incentivize deleting unused DIDs or keys to reduce the total storage of the chain. +The deposit is always bound to the account that submitted the extrinsic to create the DID, and not to the DID itself. +Consequently there are also two ways of reclaiming the deposit: + +1) The DID owner decides to delete the DID using the `did::delete` extrinsic. + This call needs to be authorized by the DID and can therefore be submitted by any account. + Despite the fact that this account can differ from the deposit owner, the deposit will always be reimbursed to the account that paid for it. +2) The deposit owner can decide to claim their deposit back using the `did::reclaim_deposit` extrinsic. + This will also cause the DID to be fully deleted but it doesn't require a signature from the DID. + Only the signature of the account that created the DID is needed for this. diff --git a/docs/develop/02_chain/02_pallets/_category_.json b/develop/02_chain/02_pallets/_category_.json similarity index 100% rename from docs/develop/02_chain/02_pallets/_category_.json rename to develop/02_chain/02_pallets/_category_.json diff --git a/docs/develop/02_chain/03_deployments.md b/develop/02_chain/03_deployments.md similarity index 100% rename from docs/develop/02_chain/03_deployments.md rename to develop/02_chain/03_deployments.md diff --git a/develop/02_chain/04_fullnode.md b/develop/02_chain/04_fullnode.md new file mode 100644 index 000000000..fe5844972 --- /dev/null +++ b/develop/02_chain/04_fullnode.md @@ -0,0 +1,227 @@ +--- +id: fullnode-setup +title: Set Up a KILT Full Node +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +We will guide you through the process of setting up and connecting to a KILT full node. +In contrast [to a collator](/participate/staking/become_a_collator/setup-node), full nodes do not author blocks. +They act as a backend for websites and help to verify new blocks or validate extrinsics (e.g., coin transfers and other transactions) directly on the network without relying on a centralized infrastructure provider. + +## Setup + +There are currently two different runtimes (i.e., two different parachain environments) that a KILT full node can be part of: + +- **Spiritnet**: the official public network, which contains only stable and thoroughly-tested features +- **Peregrine**: the public test network whose runtime is as close to that of Spiritnet as possible. It can be used to test applications that use KILT before connecting them to the production Spiritnet chain, which requires tokens that have real monetary value + +Each runtime has its own benchmark measurements. + +:::info +The remainder of this guide will focus on the official **Spiritnet**. +Nevertheless, we recommend trying out the setup on our Peregrine testnet first. +Hence, at each step where it is applicable, we indicate what differs between the Peregrine and Spiritnet configuration for the full node to join either network. +::: + +### WASM Runtime Execution + +A KILT full node should use the `--execution=wasm` parameter for both the Relay Chain and parachain collation. +The alternative to WASM runtime execution is native runtime execution, which might be faster but can, in some cases, deviate from the WASM execution logic and result in a different state. +When this happens, the full node will crash and will stop synchronizing with the network. +Since the WASM runtime logic is part of the blockchain state itself and hence represents the single source of truth, all nodes should execute the WASM version of the runtime logic. + +### Specify the Right Chainspec + +The `--chain` parameter indicates which blockchain the KILT full node will join. +This parameter must be specified for both the parachain **and** the Relay Chain, since both chains are, as a matter of fact, separate blockchains. +The KILT parachain accepts an additional parameter to select the environment to use for the WASM runtime execution. +This can either be `peregrine` or `spiritnet`. + +Hence, to start a full node for the Spiritnet network, the parameter would be `--chain=spiritnet`. +Unfortunately, there is no hardcoded chain spec for the Peregrine network, so the full path of the chainspec file must be provided `--chain=/node/dev-specs/kilt-parachain/peregrine-kilt.json`. +Please refer to the [KILT node repository](https://github.com/KILTprotocol/kilt-node/blob/master/chainspecs/peregrine/peregrine-paseo.json) or the [Docker image](https://hub.docker.com/r/kiltprotocol/kilt-node/tags) for more information. + +### Specify the Blockchain Storage Path + +The `--base-path` parameter specifies where all the persistent files must be stored. +By default, the session keys will also be stored in the *base path*, but we recommend separating them from the other files. +This makes sure that the keyfiles are not accidentally lost or published when the blockchain database is either backed up or restored. +You can configure where to store the session keys using the `--keystore-path` option. +Since the collator will collate only for the parachain, there is no need to add this to the Relay Chain part of the command. + +## Join the Network + + + + + +### Build the Full Node + +In order to build the KILT full node executable, you need to have [rustup and Rust installed](https://www.rust-lang.org/tools/install). +After cloning the repository, you can build the executable by running the `cargo build` command below from the root directory. + +```bash +# Clone the repository +git clone https://github.com/KILTprotocol/kilt-node.git +# Check out master branch +git checkout master +# Build the executable from source enabling all the optimizations with --release. +cargo build --release -p kilt-parachain +``` + +:::info +You must not use the default `develop` branch to build the executable. +Instead, the [latest release](https://github.com/KILTprotocol/kilt-node/releases) from `master` should be used. +::: + +The compiled executable can be found in `./target/release/kilt-parachain` after the build process completes successfully. + +### Run an Archive Node + +To run an Archive full node, add the option `--pruning archive` to the command. + + + + + +```bash +./target/release/kilt-parachain \ + --chain=spiritnet \ + --runtime=spiritnet \ + --rpc-port=9944 \ + --rpc-cors=all \ + --rpc-external \ + --name="name of full node" \ + --execution=wasm \ + --pruning archive \ + -- \ + --chain=polkadot \ + --execution=wasm +``` + + + + +```bash +./target/release/kilt-parachain \ + --chain=/node/dev-specs/kilt-parachain/peregrine-kilt.json \ + --runtime=peregrine \ + --rpc-port=9944 \ + --rpc-cors=all \ + --rpc-external \ + --name="name of full node" \ + --execution=wasm \ + --pruning archive \ + -- \ + --chain=/node/dev-specs/kilt-parachain/peregrine-relay.json \ + --execution=wasm +``` + + + + + + + +### Run an Archive Node + +The full node can also be started as a Docker container. +To expose the WebSockets ensure that the `--rpc-external` flags is set. + +To run an Archive full node add the option `--pruning archive` to the command. + +First, you can fetch the latest pre-built image: + +```bash +docker pull kiltprotocol/kilt-node:latest +``` + +Once you have the image, you can spin up the container. +Make sure to choose whether you want to start a full node for Peregrine or Spiritnet by selecting the correct runtime and chain. + + + + + +```bash +docker run -v kilt-node-data:/data kiltprotocol/kilt-node:latest \ + --base-path=/data/para \ + --chain=spiritnet \ + --runtime=spiritnet \ + --rpc-port=9944 \ + --rpc-cors=all \ + --rpc-external \ + --name="name of full node" \ + --execution=wasm \ + --pruning archive \ + -- \ + --base-path=/data/relay \ + --chain=polkadot \ + --execution=wasm +``` + + + + +```bash +docker run -v kilt-node-data:/data kiltprotocol/kilt-node:latest \ + --base-path=/data/para \ + --chain=/node/dev-specs/kilt-parachain/peregrine-kilt.json \ + --runtime=peregrine \ + --rpc-port=9944 \ + --rpc-cors=all \ + --rpc-external \ + --name="name of full node" \ + --execution=wasm \ + --pruning archive \ + -- \ + --base-path=/data/relay \ + --chain=/node/dev-specs/kilt-parachain/peregrine-relay.json \ + --execution=wasm +``` + + + + + + + +## Sync the Blockchain State + +Once started, the full node needs to fully sync up with both the parachain and the Relay Chain states. +Depending on the size of both blockchain states and the node hardware specs, it may take from a number of hours to a few days for the node to fully synchronize. +More details can be found in the [Polkadot network documentation](https://wiki.polkadot.network/docs/maintain-guides-how-to-validate-polkadot#synchronize-chain-data). + +:::note Example of node sync + +```Example of node sync +2021-06-17 02:34:34 🔍 Discovered new external address for our node: /ip4/100.102.231.64/tcp/30333/ws/p2p/12D3KooWLE7ivpuXJQpFVP4fuuutAqEsk8nrNEpuR3tddqnXgLPB +2021-06-17 02:34:36 ⚙️ Syncing 409.2 bps, target=#8062689 (5 peers), best: #3477 (0x63ad…e046), finalized #3072 (0x0e4c…f587), ⬇ 153.2kiB/s ⬆ 12.9kiB/s +2021-06-17 02:34:37 🔍 Discovered new external address for our node: /ip4/100.111.175.0/tcp/30333/ws/p2p/12D3KooWLE7ivpuXJQpFVP4fuuutAqEsk8nrNEpuR3tddqnXgLPB +2021-06-17 02:34:38 🔍 Discovered new external address for our node: /ip4/100.100.176.0/tcp/30333/ws/p2p/12D3KooWLE7ivpuXJQpFVP4fuuutAqEsk8nrNEpuR3tddqnXgLPB +2021-06-17 02:34:41 ⚙️ Syncing 386.2 bps, target=#8062690 (7 peers), best: #5409 (0x1d76…8c3d), finalized #5121 (0x8ad1…b6dc), ⬇ 96.1kiB/s ⬆ 10.9kiB/s +2021-06-17 02:34:46 ⚙️ Syncing 394.8 bps, target=#8062691 (11 peers), best: #7383 (0x0689…6f1e), finalized #7168 (0x72a9…8d8c), ⬇ 352.9kiB/s ⬆ 5.1kiB/s +2021-06-17 02:34:51 ⚙️ Syncing 347.0 bps, target=#8062692 (12 peers), best: #9118 (0x66fc…cce3), finalized #8704 (0x14c9…705e), ⬇ 62.7kiB/s ⬆ 1.7kiB/s +``` + +::: diff --git a/docs/develop/02_chain/_category_.json b/develop/02_chain/_category_.json similarity index 100% rename from docs/develop/02_chain/_category_.json rename to develop/02_chain/_category_.json diff --git a/docs/develop/01_sdk/03_chain_setup/01_standalone_setup.md b/develop/03_chain_setup/01_standalone_setup.md similarity index 100% rename from docs/develop/01_sdk/03_chain_setup/01_standalone_setup.md rename to develop/03_chain_setup/01_standalone_setup.md diff --git a/develop/03_chain_setup/02_peregrine_setup.md b/develop/03_chain_setup/02_peregrine_setup.md new file mode 100644 index 000000000..66328664e --- /dev/null +++ b/develop/03_chain_setup/02_peregrine_setup.md @@ -0,0 +1,22 @@ +--- +id: peregrine-chain-setup +title: Connect to Peregrine +--- + +Before connecting to the production Spiritnet, it is recommended to test applications using its canary network _Peregrine_. +In contrast to [running your own blockchain](./01_standalone_setup.md), you will neither have control over the blockchain, nor have any initial funds. + +In this section we will guide you through the process of receiving funds on Peregrine and connecting to one of the network nodes. +Additionally, we explain the difference between the Standalone and Parachain runtimes. + +## Receive Funds + +Since the native token of Peregrine, the _PILT_, does not have any economic value, you can request 100 PILT from the [Peregrine faucet](https://faucet.peregrine.kilt.io). + +## Connect to the Network + +Replace the WebSocket address of [your script](./index.md#set-up-your-project) or application with `wss://peregrine.kilt.io`. + +You can either use your own frontend or the [Polkadot JS Apps](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fperegrine.kilt.io%2Fparachain-public-ws#/explorer) to interact with the chain. +Moreover, you can use [Subscan](https://kilt-testnet.subscan.io/) as a chain explorer. +For a full list of deployments and services, take a look [here](../02_chain/03_deployments.md). \ No newline at end of file diff --git a/develop/03_chain_setup/03_prod_chain_setup.md b/develop/03_chain_setup/03_prod_chain_setup.md new file mode 100644 index 000000000..bd1732643 --- /dev/null +++ b/develop/03_chain_setup/03_prod_chain_setup.md @@ -0,0 +1,25 @@ +--- +id: prod-chain-setup +title: Connect to Spiritnet +--- + +For production setups it is important to run your own full node. +Running your own full node has several advantages over relying on a public full node. + +The most important advantage is security. +You rely on the full node to provide you with correct data. +When using a public full node, you rely on a third party: there is no 100% guarantee that the information returned is correct. + +Another important aspect when hosting a full node is availability. +Public full nodes typically do not come with a Service Level Agreement (SLA) and might go down for maintenance or are simply too slow. +With your own full node infrastructure, you can ensure that there is always enough capacity to serve your needs and your customers. + +In our [blockchain section](../02_chain/01_introduction.md), you can find a [tutorial on how to run your own full node](../02_chain/04_fullnode.md). + +## Connect to the Network + +Replace the WebSocket address of [your script](./index.md#set-up-your-project) or application with `wss://kilt-rpc.dwellir.com`. + +You can either use your own frontend or the [Polkadot JS Apps](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkilt-rpc.dwellir.com/explorer) to interact with the chain. +Moreover, you can use [Subscan](https://spiritnet.subscan.io/) as a chain explorer. +For a full list of deployments and services, see [here](../02_chain/03_deployments.md). diff --git a/docs/develop/01_sdk/03_chain_setup/_category_.json b/develop/03_chain_setup/_category_.json similarity index 100% rename from docs/develop/01_sdk/03_chain_setup/_category_.json rename to develop/03_chain_setup/_category_.json diff --git a/develop/03_chain_setup/index.md b/develop/03_chain_setup/index.md new file mode 100644 index 000000000..65c198988 --- /dev/null +++ b/develop/03_chain_setup/index.md @@ -0,0 +1,24 @@ +--- +id: dev-chain-setup +title: Chain Setup for Development +--- + +If you want to develop solutions that integrate KILT, such as a dapp, a wallet, or a Web3 login, you will need a blockchain environment that can be used for development and testing without requiring you to buy actual KILT tokens. +For that purpose, you can either use the public KILT Peregrine testnet or run your own development blockchain. + +The **Peregrine** network is a parachain that is similar to Spiritnet (our mainnet) in functionality, but its coin, the PILT, doesn't hold any monetary value. +Any new features that we plan to add to our Spiritnet runtime will first undergo a testing period on Peregrine. +This gives developers like you the chance to test your software with any new features before they are available on Spiritnet. + +Nevertheless, there are a scenarios where a public network (that everyone else is also using) is not ideal. +For instance, if you need more funds than the faucet can provide, or if you need to reset the state of the blockchain at any time, you will need to setup your own little KILT blockchain. + +In this section, we will guide you through the process of +1. [Running your own KILT blockchain](./01_standalone_setup.md) +2. [Connecting to the Peregrine test network](./02_peregrine_setup.md) +3. [Connecting to the Spiritnet production network](./03_prod_chain_setup.md) + +## Set up your Project + +We expect you to already have a small project which can connect and potentially interact with a KILT blockchain given the WebSocket address of a KILT node. +If that is not the case, please take a look at our [Quickstart section](/develop/sdk/quickstart#connecting-to-kilt-blockchain) which will provide you with all necessary means to create and run a basic script. diff --git a/develop/03_credentials.md b/develop/03_credentials.md new file mode 100644 index 000000000..0aa36218d --- /dev/null +++ b/develop/03_credentials.md @@ -0,0 +1 @@ + diff --git a/docs/develop/01_sdk/04_integrate/03_distillery.md b/develop/03_distillery.md similarity index 100% rename from docs/develop/01_sdk/04_integrate/03_distillery.md rename to develop/03_distillery.md diff --git a/docs/develop/04_specifications.md b/develop/04_specifications.md similarity index 100% rename from docs/develop/04_specifications.md rename to develop/04_specifications.md diff --git a/develop/05_builtonkilt.md b/develop/05_builtonkilt.md new file mode 100644 index 000000000..278dda115 --- /dev/null +++ b/develop/05_builtonkilt.md @@ -0,0 +1,78 @@ +--- +id: builtonkilt +title: Built on KILT +--- + +import ThemedImage from '@theme/ThemedImage'; +import LogoText from '@site/src/components/LogoText'; + +This section contains a non-exhaustive list of apps, wallets and websites that are built on KILT. +If you are not on the list and want to be added, you are welcome to [open a PR](https://github.com/KILTprotocol/docs/edit/master/docs/develop/05_builtonkilt.md). + +## Wallets + +Wallets are the gateway to Web3. +They store private information like secret keys for KILT DIDs and credentials. +Each time a website needs to access some information about the visitor, the wallet first asks its owner’s permission to share the requested information. + + + + Sporran is the first wallet to support the KILT protocol. + It is maintained by _BOTLabs Trusted Entity B.T.E GmbH_ and it is [open source](https://github.com/BTE-Trusted-Entity/sporran-extension). + + +## Web Apps + +Decentralized applications have already been built that use the functions of the wallet. + + + Help secure the KILT Spiritnet! + On Stakeboard you can influence who is allowed to build blocks on Spiritnet by delegating KILT tokens to a collator you trust. + + +--- + + + w3n.id is a website that helps you claim and search web3names. + Learn more about KILT web3names in our [concepts section](/concepts/web3names). + + +--- + + + DIDsign provides a decentralized way to sign any file directly in your browser using your KILT DID. + Your data stays locally on your device and is never transferred or held in a centralized place. + + +--- + + + Get your first KILT credential today! + SocialKYC issues credentials that prove ownership of several social profiles, including email addresses, and Telegram, Twitter and GitHub accounts, with more being continuously added. + It's free to use, and credentials expire after one year. + diff --git a/docs/develop/06_contribute.md b/develop/06_contribute.md similarity index 98% rename from docs/develop/06_contribute.md rename to develop/06_contribute.md index 63430b580..e5f45a340 100644 --- a/docs/develop/06_contribute.md +++ b/develop/06_contribute.md @@ -49,7 +49,7 @@ In addition you should: The proposal should then be discussed with the community (including, for example, the KILT Technical Committee, governance, or relevant project team) using community channels such as [Discord](https://discord.gg/7uyfMXh6AT) or [Polkassembly](https://kilt.polkassembly.network/discussions). If the community is not in agreement with the proposal, it is unlikely that it would be approved by governance. -See the [guide to creating a proposal](../participate/03_treasury_proposal.md) for additional details. +See the [guide to creating a proposal](/participate/treasury-proposal) for additional details. ## Tips diff --git a/docs/develop/07_dApp/01_welcome.md b/develop/07_dApp/01_welcome.md similarity index 100% rename from docs/develop/07_dApp/01_welcome.md rename to develop/07_dApp/01_welcome.md diff --git a/docs/develop/07_dApp/02_well-known-did-config.md b/develop/07_dApp/02_well-known-did-config.md similarity index 95% rename from docs/develop/07_dApp/02_well-known-did-config.md rename to develop/07_dApp/02_well-known-did-config.md index 825387701..2689e87b6 100644 --- a/docs/develop/07_dApp/02_well-known-did-config.md +++ b/develop/07_dApp/02_well-known-did-config.md @@ -103,8 +103,8 @@ The extension will make an HTTP GET request to the following URI, and your dapp How the file is hosted depends on your project setup and is out of scope for this guide. -[concept-attestations]: ../../concepts/05_credentials/04_attestation.md -[cookbook-attestations]: ../01_sdk/02_cookbook/04_claiming/03_attestation_creation.md -[create-full-did]: ../01_sdk/02_cookbook/01_dids/02_full_did_creation.md +[concept-attestations]: /concepts/credentials/attestation +[cookbook-attestations]: /develop/claiming/attestation-creation +[create-full-did]: /develop/sdk/dids/full-did-creation [well-known-spec]: https://identity.foundation/specs/did-configuration/ [CType-Domain-Linkage]: https://github.com/KILTprotocol/ctype-index/tree/main/ctypes/0x9d271c790775ee831352291f01c5d04c7979713a5896dcf5e81708184cc5c643 diff --git a/docs/develop/07_dApp/03_session.md b/develop/07_dApp/03_session.md similarity index 100% rename from docs/develop/07_dApp/03_session.md rename to develop/07_dApp/03_session.md diff --git a/docs/develop/07_dApp/04_verifier.md b/develop/07_dApp/04_verifier.md similarity index 88% rename from docs/develop/07_dApp/04_verifier.md rename to develop/07_dApp/04_verifier.md index 1f44af1c6..3b3668f69 100644 --- a/docs/develop/07_dApp/04_verifier.md +++ b/develop/07_dApp/04_verifier.md @@ -15,12 +15,12 @@ import DecryptCredentialMessage from '!!raw-loader!@site/code_examples/sdk_examp This section demonstrates how to build a basic verifier according to the [Credential API Specification](https://github.com/KILTprotocol/spec-ext-credential-api). Before continuing, please make sure you have already set up the [communication session](03_session.md) and [Well-Known DID Configuration](02_well-known-did-config.md). -This guide explains specifically how a web server can request a credential presentation from one of its visitors (the claimer). +This guide explains specifically how a web server can request a credential presentation from one of its visitors (the holder). After the browser extension verified the Well-Known DID Configuration and the encrypted communication channel between the extension and the server was established, the web server can request the credential presentation. This is a two step process. First the server sends a message to the extension that request the presentation of a credential. -Since we don't want to see just any credential, but expect specific content, we also require that the credential conforms to a specific [CType](../../concepts/05_credentials/02_ctypes.md). +Since we don't want to see just any credential, but expect specific content, we also require that the credential conforms to a specific [CType](/concepts/credentials/ctypes). When the extension receives the request, it will prompt the user to select a credential that should be presented to the server. The user can also choose to reject this request and not to show any presentation. @@ -50,7 +50,7 @@ The challenge can be generated using the polkadot crypto utilities: With the challenge the server can construct the `request-credential` message. -The request is sent to the light DID (`claimerSessionDid`) that is used to encrypt the messages (see [Session](03_session.md) for more information). +The request is sent to the light DID (`holderSessionDid`) that is used to encrypt the messages (see [Session](03_session.md) for more information). {CreateRequestCredentialMessage} @@ -59,11 +59,11 @@ The request is sent to the light DID (`claimerSessionDid`) that is used to encry :::note Privacy The credential itself doesn't need to be issued to this DID since the light DID is only used to encrypt the messages. -We don't use the full DID of the claimer to establish the encrypted communication, so that the claimer first can ensure the origin of the `request-credential` message. +We don't use the full DID of the holder to establish the encrypted communication, so that the holder first can ensure the origin of the `request-credential` message. ::: -After the server has built the message object, it must encrypt the message for the claimer. +After the server has built the message object, it must encrypt the message for the holder. Once the message is encrypted the server can pass on the message to the extension. @@ -75,7 +75,7 @@ Once the message is encrypted the server can pass on the message to the extensio After sending the `request-credential` message to the extension, the verifier listens for a message of type `submit-credential` in response. After the response from the extension is received, forwarded to the server and decrypted, the verifier must check that it has the expected CType and that it contains a valid credential. -Since everyone can run an attestation service, you need to make sure that you also verify that the attester is trusted. +Since everyone can run an attestation service, you need to make sure that you also verify that the issuer is trusted. {DecryptCredentialMessage} diff --git a/docs/develop/07_dApp/_category_.json b/develop/07_dApp/_category_.json similarity index 100% rename from docs/develop/07_dApp/_category_.json rename to develop/07_dApp/_category_.json diff --git a/docs/develop/08_opendid/01_overview.md b/develop/08_opendid/01_overview.md similarity index 95% rename from docs/develop/08_opendid/01_overview.md rename to develop/08_opendid/01_overview.md index 235e4223d..e42a82d1b 100644 --- a/docs/develop/08_opendid/01_overview.md +++ b/develop/08_opendid/01_overview.md @@ -3,7 +3,7 @@ id: what-is-opendid title: Overview --- -[OpenDID](https://github.com/KILTprotocol/opendid) is an OpenID Provider implementation capable of authenticating users through their [Decentralized Identifier (DID)](../../concepts/02_did.md) and Verifiable Credentials. +[OpenDID](https://github.com/KILTprotocol/opendid) is an OpenID Provider implementation capable of authenticating users through their [Decentralized Identifier (DID)](/concepts/did) and Verifiable Credentials. It follows the [OpenID Connect 1.0 Specification](https://openid.net/specs/openid-connect-core-1_0.html#Introduction) and acts as a bridge between the decentralized identity world and the centralized authentication world supporting both the implicit and Authorization Code Flow. diff --git a/docs/develop/08_opendid/02_opendid_flow.md b/develop/08_opendid/02_opendid_flow.md similarity index 100% rename from docs/develop/08_opendid/02_opendid_flow.md rename to develop/08_opendid/02_opendid_flow.md diff --git a/develop/08_opendid/03_opendid_service.md b/develop/08_opendid/03_opendid_service.md new file mode 100644 index 000000000..bb29f5643 --- /dev/null +++ b/develop/08_opendid/03_opendid_service.md @@ -0,0 +1,115 @@ +--- +id: opendid_service +title: Run OpenDID Service +--- + +## Configuration + +Running the OpenDID service requires some configuration and a KILT DID. +The DID establishes a secure session with an identity wallet using a key agreement key of type `X25519KeyAgreementKey2019` included in the DID Document generated by the setup container. + +OpenDID serves a [well-known DID configuration](https://identity.foundation/.well-known/resources/did-configuration/), which the identity wallet uses to ensure that the domain is linked to the specified DID. + +### Run setup container + +Before running the `opendid-setup` container, set two environment variables: + +1. `SEED` to provide an account with funds (minimum of 3 KILT) for the DID generation. + + ```bash + export SEED="dont try this seed its completely made up for this nice example" + ``` + +2. `ENDPOINT` + + Set to "spiritnet" if the account is on the spiritnet production network. + + ```bash + export ENDPOINT="spiritnet" + ``` + + Set to "peregrine" if the account is on the peregrine test network. + + ```bash + export ENDPOINT="peregrine" + ``` + + Then run the setup with the following command: + + ```bash + docker run --rm -it -e "ENDPOINT=${ENDPOINT}" -v $(pwd):/data docker.io/kiltprotocol/opendid-setup:latest "${SEED}" + ``` + +The command generates a set of new mnemonics and then derives a DID from them and generates multiple files into the current directory: + +1. `config.yaml` The configuration file used by the OpenDID service. + + :::warning + You only need the `config.yaml` to run the OpenDID service. + This file includes the generated mnemonic and secret keys and you should protect it from unauthorized access. + ::: + +2. `did-secrets.json` This file contains the public and secret keys in the DID Document. + + :::warning + Keep a secure backup of this file as it contains all the secret keys. + ::: + +3. `did-document.json` contains the DID Document generated by this setup. + +The container generates sensible defaults in the `config.yaml` file, but here are some values you might want to change: + +- Set `production` to true, this only allows secure connections. +- Set the `WellKnownDid` > `origin`, which should match the host running the OpenDID service. +- Set the keys used for JWT issuance in the `jwt` section. +- The `client` section, including: + + - The client ID as a key (The default is: `example-client`). + - The `requirements` section, including: + + - What CTypes are required for authentication. + - The trusted issuers as an address (The default is for the [SocialKYC issuer](https://socialkyc.io/)). + + :::note info + + The generated default `config.yaml` requires an [email credential](https://test.ctypehub.galaniprojects.de/ctype/kilt:ctype:0x3291bb126e33b4862d421bfaa1d2f272e6cdfc4f96658988fbcffea8914bd9ac) issued by an issuer. + + ::: + + - What `redirect_url`s the service accepts (The default is `http://localhost:1606/callback.html` for the demo project). + - The `clientSecret` is optional but recommended. If you use the authorization code flow, the `token` endpoint requires it. + +## Run the service + +When you've made changes to the `config.yaml` file, you can run the OpenDID service. + +1. Specify the runtime through the `RUNTIME` environment variable: + + Set to `"spiritnet"` for production KILT + + ```bash + export RUNTIME="spiritnet" + ``` + + Set to `"peregrine"` for the KILT test net. + + ```bash + export RUNTIME="peregrine" + ``` + +2. Run the `docker.io/kiltprotocol/opendid` docker image. + + ```bash + docker run -d --rm \ + -v $(pwd)/config.yaml:/app/config.yaml \ + -v $(pwd)/checks:/app/checks \ + -e "RUNTIME=${RUNTIME}" \ + -p 3001:3001 \ + docker.io/kiltprotocol/opendid:latest + ``` + +3. Open the login page at _http://localhost:3001_. + +## Next steps + +With configuration in place and a service running, next you need to [integrate OpenDID into an application](./04_integrate_opendid.md) so that a user can use the login page. diff --git a/docs/develop/08_opendid/04_integrate_opendid.md b/develop/08_opendid/04_integrate_opendid.md similarity index 100% rename from docs/develop/08_opendid/04_integrate_opendid.md rename to develop/08_opendid/04_integrate_opendid.md diff --git a/develop/08_opendid/05_demo_project.md b/develop/08_opendid/05_demo_project.md new file mode 100644 index 000000000..855a0fbf7 --- /dev/null +++ b/develop/08_opendid/05_demo_project.md @@ -0,0 +1,30 @@ +--- +id: demo_project +title: Demo Project +--- + +The example code at [demo-project](https://github.com/KILTprotocol/opendid/tree/main/demo-project) contains a minimal application that uses OpenDID. +It's an [express](https://expressjs.com) application that exposes three things: + +- A login page that handles the dispatching of the user to the OpenDID service. +- A callback page for one of the OpenID Connect flows supported to accept the token. +- A protected resource that only authenticated users can access. + +For the demo application to work you need a running OpenDID Service and an identity wallet that follows [the Credential API spec](https://github.com/KILTprotocol/spec-ext-credential-api) (e.g. [Sporran](https://www.sporran.org/)) with a DID and Credential issued by the required issuer specified in the `config.yaml` file (Default is SocialKYC). +If you follow the steps in this section in order, you have all the necessary components for the demo application to run. + +Run the pre-configured demo application with the following command: + +```bash +docker run -d -it --rm \ + --name demo-frontend \ + -p 1606:1606 \ + docker.io/kiltprotocol/opendid-demo +``` + +The demo page runs on _http://localhost:1606_. It pre-fills the Client ID value and offers login buttons to follow the implicit or authorization code flow. + +:::note +You can set the JSON web token (JWT) secret can with the `TOKEN_SECRET` environment variable inside the docker container. It must match +the one specified in the `config.yaml` file to correctly verify the `id_token`. The default is `super-secret-jwt-secret`. +::: diff --git a/develop/08_opendid/06_advanced.md b/develop/08_opendid/06_advanced.md new file mode 100644 index 000000000..e245be605 --- /dev/null +++ b/develop/08_opendid/06_advanced.md @@ -0,0 +1,111 @@ +--- +id: advanced +title: Advanced Usage +--- + +## Use dynamic client management with etcd + +To dynamically create or remove OpenID Connect clients, configure the service to get its configuration from an [etcd cluster](https://etcd.io) by adding the connection parameters for the cluster in the `config.yaml` file. + +```yaml +etcd: + endpoints: ['localhost:2379'] + user: etcd-user + password: my-password + tlsDomainName: my.etcd.cluster.example.com + tlsCaCert: | + -----BEGIN CERTIFICATE----- + + -----END CERTIFICATE----- + tlsClientCert: | + -----BEGIN CERTIFICATE----- + + -----END CERTIFICATE----- + tlsClientKey: | + -----BEGIN RSA PRIVATE KEY----- + + -----END RSA PRIVATE KEY----- +``` + +All fields except `endpoints` are optional. +When everything is set up you can start adding client configurations into the etcd cluster. + +```bash +CLIENT_SPEC=$(cat < - - - -To get a credential, a Claimer needs to take the following steps: - -1. Find a **CType** to base a claim on. Potential Attesters and Verifiers might advertise this information themselves. -2. Make a **claim** containing a set of properties about themselves. -3. Fulfil any requirement from your Attester. For example, accepting their **Terms** and paying a **Quote**. -4. **Request an attestation** from the Attester. -5. Wait for the Attester to **attest** claims. - -Once attested, the wrapped claims are considered to be a valid credential. - -To use a Credential, the Claimer can generate a Credential-Presentation for a Verifier. -The verification would follow this process: - -1. The Verifier may request a **Credential** of a CType, along with with properties to reveal. -He would also provide a **challenge** to ensure the presentations are not recycled. -2. The Claimer selectively **discloses** the requested properties and signs them along with the challenge to generate a presentation. -3. The Verifier **verify** the presentation structure, content and signature, and decides whether they trust the Attester of the presented credential. - -The next sections describe each step in more detail. - -:::info - -To learn about how to implement the flow above in a dapp that interacts with a browser extension, read the [Credential API specification](https://github.com/KILTprotocol/spec-ext-credential-api). - -::: diff --git a/docs/concepts/05_credentials/04_attestation.md b/docs/concepts/05_credentials/04_attestation.md deleted file mode 100644 index 33c9c2aae..000000000 --- a/docs/concepts/05_credentials/04_attestation.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -id: attestation -title: Attestations ---- - -KILT uses the terms Attestation and Credential interchangeably, but their meaning is different. -A _Credential_ includes the original claimer's data and all the information linked to it, while an _Attestation_ only refers to the on-chain proof that a given credential has been attested. - -To write an attestation on the KILT blockchain, the Attester checks the validity of the received to-be-attested `Credential` data, ensuring that the data inside it matches the requirements of the attestation. For example, that the user's name is indeed Alice. - -After that, the Attester writes the `Credential`'s root hash on the KILT blockchain, certifying that a credential with that root hash is valid. -The Claimer can monitor the blockchain to listen for the event resulting from the attestation process, marking when the credential is attested and usable. - -After the credential has been attested, the Claimer can store it in their wallet and can now use it with Verifiers that trust credentials issued by that Attester. - -:::info - -For a detailed developer-oriented guide to KILT attestations, read the [Attestation cookbook section](../../develop/01_sdk/02_cookbook/04_claiming/03_attestation_creation.md). - -::: - -### Storing attestations - -Storing a attestation in the blockchain requires providing a constant deposit, which is currently around 0.12 KILT. The deposit amount is calculated based on the worst-case scenario for a attestation, where the maximum storage for one attestation reaches 179 bytes. -The deposit serves as a security measure to ensure the integrity of the blockchain and incentivize users to manage their attestation responsibly. -By requiring a deposit, it discourages spamming or unnecessary creation of attestation. -The attester can reclaim the deposit by deleting their attestation. -Revoking them isn't sufficient as the deposit still shows in chain storage, but marked as invalid. \ No newline at end of file diff --git a/docs/concepts/09_advanced_concepts/01_terms_and_quote.md b/docs/concepts/09_advanced_concepts/01_terms_and_quote.md deleted file mode 100644 index c79fcbb63..000000000 --- a/docs/concepts/09_advanced_concepts/01_terms_and_quote.md +++ /dev/null @@ -1,87 +0,0 @@ ---- -id: terms-and-quotes -title: Terms and Quotes ---- - -During the attestation flow, it can happen that either the Claimer requests or the Attester sends the terms of the attestation, i.e., the requirements set by the both parties (the Claimer and the Attester) for the conditions of the attestation. - -These terms are defined and agreed upon before the credential is issued. -This part of the process requires interaction and communication between both parties. -This communication can be done independently, e.g., in person, via messaging, on social media etc., or via the KILT Software Development Kit (SDK). - -## Defining Terms - -The `Terms` object consists of following items: - -- **Claim**: A partial claim with information the Attester already has about the Claimer. - - This helps the Claimer to pre-fill their claims with information only known to the Attester. - - The partial claim has to at least contain the CType hash the attestation will be based on. -- **CTypes**: An optional list of full CTypes, in case the Claimer does not know the correct CType for the credential, yet. -- **Legitimations**: A legitimation is a credential, issued to the Attester, showing that the Attester has the authority or legitimacy to attest the claim requested. - - This is a way of establishing trust between the participants. -- **Delegation Id**: An Attester may be part of a top-down trust authority that has given them the right to attest in the name of an institution, or similar, as explained in the [Distributed Trust section](../06_distributed_trust.md). If the Attester has attestation rights, delegated from another entity, this should be stated clearly at this point. -- **Quote**: As shown in the [section below](#defining-a-quote). - -Only the CType hash in the partial claim is required, everything else is optional. - -## Sending Terms - -Both "request terms" and "submit terms" are part of the messaging system: the message is sent as "request terms" and received as "submit terms". - -The interaction is as follows: - -- The Claimer creates a partial `Claim` (optionally) and sends a message to the Attester, requesting the `Terms`. -- An Attester creates a `Terms` object and sends it, as part of a "submit terms" message, back to the Claimer. -- The Claimer receives the message, checks the `Terms` and, if all is in order, agrees to them. - - -## Defining a Quote - -A `Quote` object consists of costs, a time frame for delivering the attestation, and the terms and conditions of the work to be performed. -It may be sent to the Claimer by the Attester as part of the terms. -In cases where multiple Attesters provide the same attestation (for example, a car inspection) the Claimer may request a Quote from several Attesters to choose the Attester with the best conditions. - -To come to an agreement on the Quote, the participants may message back and forth, signing the object. -If the Attester wishes to add a Quote to their Terms, the Attester signs the `Quote` object before sending it as part of the "submit terms" message to the Claimer. -After the Claimer has received the signed Quote and accepts it, the Claimer counter-signs it and attaches the credential hash for linking the Quote to the credential that it refers to. -After the final exchange, the Attester checks all the information and issues the credential. - -```mermaid -classDiagram - class Quote { - String attesterDid - String cTypeHash - Cost cost - String currency - String timeframe - String termsAndConditions - } - - class Cost { - Number gross - Number net - Object tax - } - - Quote *-- Cost - - class Signature { - String keyId - String signature - } - - class QuoteAttesterSigned { - Signature attesterSignature - } - - QuoteAttesterSigned *-- Signature - QuoteAttesterSigned --|> Quote - - class QuoteAgreement { - String rootHash - Signature claimerSignature - } - - QuoteAgreement *-- Signature - QuoteAgreement --|> QuoteAttesterSigned -``` diff --git a/docusaurus.config.js b/docusaurus.config.js index 26bab7d0b..f790417bd 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -40,9 +40,8 @@ module.exports = { image: 'img/expert_dark_preview.png', announcementBar: { id: 'dip-announcement', - // Use absolute links proceeded by '/docs' content: - 'DIP enables OpenID inspired cross-chain identity, help us test this new feature!', + 'DIP enables OpenID inspired cross-chain identity, help us test this new feature!', backgroundColor: '#2db528', textColor: '#fff', isCloseable: true, @@ -55,9 +54,14 @@ module.exports = { srcDark: 'img/logo_dark.svg', }, items: [ + // TODO: Not working right now… + // { + // type: 'docsVersionDropdown', + // position: 'right', + // dropdownActiveClassDisabled: true, + // }, { - type: 'doc', - docId: 'concepts/what-is-kilt', + to: '/concepts/what-is-kilt', label: 'What is KILT?', }, { @@ -66,42 +70,36 @@ module.exports = { items: [ { type: 'doc', - docId: 'develop/sdk/quickstart', + docId: 'quickstart', label: 'SDK Documentation', }, { - type: 'doc', - docId: 'develop/chain/introduction', + to: 'develop/chain/introduction', label: 'Blockchain Documentation', }, { type: 'doc', - docId: 'develop/workshop/welcome', - label: 'Workshop', + docId: 'tutorial/welcome', + label: 'Tutorial', }, { - type: 'doc', - docId: 'develop/contribute', + to: 'develop/contribute', label: 'Contribute', }, { - type: 'doc', - docId: 'develop/specifications', + to: 'develop/specifications', label: 'Technical Specifications', }, { - type: 'doc', - docId: 'develop/builtonkilt', + to: 'develop/builtonkilt', label: 'Built on KILT', }, { - type: 'doc', - docId: 'develop/dApp/welcome', + to: 'develop/dApp/welcome', label: 'DApp Documentation', }, { - type: 'doc', - docId: 'develop/opendid/what-is-opendid', + to: 'develop/opendid/what-is-opendid', label: 'OpenDID Documentation', }, ], @@ -111,28 +109,23 @@ module.exports = { label: 'Participate', items: [ { - type: 'doc', - docId: 'participate/staking/become_a_collator/overview', + to: 'participate/staking/become_a_collator/overview', label: 'Staking', }, { - type: 'doc', - docId: 'participate/governance/vote', + to: 'participate/governance/vote', label: 'Voting', }, { - type: 'doc', - docId: 'participate/treasury-proposal', + to: 'participate/treasury-proposal', label: 'Treasury Proposals', }, { - type: 'doc', - docId: 'participate/content-creation-guidelines', + to: 'participate/content-creation-guidelines', label: 'Content Creation Guidelines', }, { - type: 'doc', - docId: 'participate/treasury-tip', + to: 'participate/treasury-tip', label: 'Treasury Tips', }, ], @@ -204,16 +197,24 @@ module.exports = { '@docusaurus/preset-classic', { docs: { + path: 'sdk', + lastVersion: 'current', + versions: { + current: { + label: '1.0.x', + }, + 0.3: { + label: '0.3.x', + path: '0.3', + }, + }, + routeBasePath: 'develop/sdk', + sidebarPath: './sidebarsSDK.js', remarkPlugins: [ [require('@docusaurus/remark-plugin-npm2yarn'), { sync: true }], ], - sidebarPath: require.resolve('./sidebars.js'), editUrl: 'https://github.com/KILTprotocol/docs/edit/master/', showLastUpdateTime: true, - admonitions: { - keywords: ['version-label'], - extendDefaults: true, - }, }, theme: { customCss: require.resolve('./src/css/custom.css'), @@ -234,6 +235,59 @@ module.exports = { }, }, plugins: [ + [ + '@docusaurus/plugin-content-docs', + { + id: 'develop', + path: 'develop', + routeBasePath: 'develop', + sidebarPath: './sidebarsDevelop.js', + admonitions: { + keywords: ['version-label'], + extendDefaults: true, + }, + remarkPlugins: [ + [require('@docusaurus/remark-plugin-npm2yarn'), { sync: true }], + ], + editUrl: 'https://github.com/KILTprotocol/docs/edit/master/', + showLastUpdateTime: true, + // ... other options + }, + ], + [ + '@docusaurus/plugin-content-docs', + { + id: 'concepts', + path: 'concepts', + routeBasePath: 'concepts', + sidebarPath: './sidebarsConcepts.js', + admonitions: { + keywords: ['version-label'], + extendDefaults: true, + }, + remarkPlugins: [ + [require('@docusaurus/remark-plugin-npm2yarn'), { sync: true }], + ], + editUrl: 'https://github.com/KILTprotocol/docs/edit/master/', + showLastUpdateTime: true, + // ... other options + }, + ], + [ + '@docusaurus/plugin-content-docs', + { + id: 'participate', + path: 'participate', + routeBasePath: 'participate', + sidebarPath: './sidebarsParticipate.js', + remarkPlugins: [ + [require('@docusaurus/remark-plugin-npm2yarn'), { sync: true }], + ], + editUrl: 'https://github.com/KILTprotocol/docs/edit/master/', + showLastUpdateTime: true, + // ... other options + }, + ], // Pulls external files and adds them as files in the Docusaurus folder, rewriting the title and the file name [ 'docusaurus-plugin-remote-content', @@ -241,7 +295,7 @@ module.exports = { name: 'dip-provider-docs', sourceBaseUrl: 'https://raw.githubusercontent.com/KILTprotocol/kilt-node/1.13.0/pallets/pallet-dip-provider/', - outDir: 'docs/concepts/07_dip', + outDir: 'concepts/07_dip', documents: ['README.md'], modifyContent(filename, content) { if (filename.includes('README')) { @@ -265,7 +319,7 @@ module.exports = { name: 'dip-consumer-docs', sourceBaseUrl: 'https://raw.githubusercontent.com/KILTprotocol/kilt-node/1.13.0/pallets/pallet-dip-consumer/', - outDir: 'docs/concepts/07_dip', + outDir: 'concepts/07_dip', documents: ['README.md'], modifyContent(filename, content) { if (filename.includes('README')) { diff --git a/markdown-link-check.config.json b/markdown-link-check.config.json index a00c94747..6480ea436 100644 --- a/markdown-link-check.config.json +++ b/markdown-link-check.config.json @@ -19,6 +19,15 @@ }, { "pattern": "/(localhost)." + }, + { + "pattern": "^/develop/" + }, + { + "pattern": "^/participate/" + }, + { + "pattern": "^/concepts/" } ] } \ No newline at end of file diff --git a/package.json b/package.json index 9a7c5918b..c9f3b54c9 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ }, "scripts": { "build": "yarn check-ts && yarn check-links && yarn generate-examples && docusaurus build", - "check-links": "yarn markdown-link-check -c markdown-link-check.config.json -q $(find docs -name '*.md')", + "check-links": "yarn markdown-link-check -c markdown-link-check.config.json -q $(find participate concepts develop -name '*.md')", "check-ts": "concurrently -m 1 yarn:check-ts:*", "check-ts:scripts": "cd scripts && yarn install && yarn check-ts", "check-ts:examples": "cd code_examples/sdk_examples && yarn install && yarn check-ts", @@ -33,22 +33,22 @@ "concurrently": "^8.2.2" }, "dependencies": { - "@babel/parser": "^7.23.6", - "@babel/standalone": "^7.23.8", - "@docusaurus/core": "^3.1.0", - "@docusaurus/preset-classic": "^3.1.0", - "@docusaurus/remark-plugin-npm2yarn": "^3.1.0", - "@docusaurus/theme-mermaid": "^3.1.0", - "@mdx-js/react": "^3.0.0", - "archiver": "^6.0.1", - "clsx": "^2.1.0", + "@babel/parser": "^7.25.4", + "@babel/standalone": "^7.25.5", + "@docusaurus/core": "^3.5.2", + "@docusaurus/preset-classic": "^3.5.2", + "@docusaurus/remark-plugin-npm2yarn": "^3.5.2", + "@docusaurus/theme-mermaid": "^3.5.2", + "@mdx-js/react": "^3.0.1", + "archiver": "^7.0.1", + "clsx": "^2.1.1", "docusaurus-plugin-remote-content": "^4.0.0", - "markdown-link-check": "^3.11.2", + "markdown-link-check": "^3.12.2", "node-args": "^2.1.8", - "prettier": "^3.2.4", + "prettier": "^3.3.3", "raw-loader": "^4.0.2", - "react": "^18.2.0", - "react-dom": "^18.2.0", + "react": "^18.3.1", + "react-dom": "^18.3.1", "react-markdown": "^9.0.1" }, "browserslist": { diff --git a/docs/participate/01_staking/01_become_a_collator/01_overview.md b/participate/01_staking/01_become_a_collator/01_overview.md similarity index 100% rename from docs/participate/01_staking/01_become_a_collator/01_overview.md rename to participate/01_staking/01_become_a_collator/01_overview.md diff --git a/docs/participate/01_staking/01_become_a_collator/02_hardware_requirements.md b/participate/01_staking/01_become_a_collator/02_hardware_requirements.md similarity index 100% rename from docs/participate/01_staking/01_become_a_collator/02_hardware_requirements.md rename to participate/01_staking/01_become_a_collator/02_hardware_requirements.md diff --git a/docs/participate/01_staking/01_become_a_collator/03_setup_node.md b/participate/01_staking/01_become_a_collator/03_setup_node.md similarity index 98% rename from docs/participate/01_staking/01_become_a_collator/03_setup_node.md rename to participate/01_staking/01_become_a_collator/03_setup_node.md index d7d47eff5..f029d5870 100644 --- a/docs/participate/01_staking/01_become_a_collator/03_setup_node.md +++ b/participate/01_staking/01_become_a_collator/03_setup_node.md @@ -74,7 +74,7 @@ This can either be `peregrine` or `spiritnet`. Hence, to start a collator node for the Spiritnet network, the parameter would be `--chain=spiritnet`. Unfortunately, there is no hardcoded chain spec for the Peregrine network, so the full path of the chainspec file must be provided `--chain=/node/dev-specs/kilt-parachain/peregrine-kilt.json`. -Please refer to the [KILT node repository](https://github.com/KILTprotocol/kilt-node/blob/master/dev-specs/kilt-parachain/peregrine-kilt.json) or the [Docker image](https://hub.docker.com/r/kiltprotocol/kilt-node/tags) for more information. +Please refer to the [KILT node repository](https://github.com/KILTprotocol/kilt-node/blob/master/chainspecs/peregrine/peregrine-paseo.json) or the [Docker image](https://hub.docker.com/r/kiltprotocol/kilt-node/tags) for more information. ### Specify the Blockchain Storage Path diff --git a/docs/participate/01_staking/01_become_a_collator/04_session_keys.md b/participate/01_staking/01_become_a_collator/04_session_keys.md similarity index 100% rename from docs/participate/01_staking/01_become_a_collator/04_session_keys.md rename to participate/01_staking/01_become_a_collator/04_session_keys.md diff --git a/docs/participate/01_staking/01_become_a_collator/05_join_collators.md b/participate/01_staking/01_become_a_collator/05_join_collators.md similarity index 100% rename from docs/participate/01_staking/01_become_a_collator/05_join_collators.md rename to participate/01_staking/01_become_a_collator/05_join_collators.md diff --git a/docs/participate/01_staking/01_become_a_collator/_03_start_node_binary.mdx b/participate/01_staking/01_become_a_collator/_03_start_node_binary.mdx similarity index 100% rename from docs/participate/01_staking/01_become_a_collator/_03_start_node_binary.mdx rename to participate/01_staking/01_become_a_collator/_03_start_node_binary.mdx diff --git a/docs/participate/01_staking/01_become_a_collator/_03_start_node_docker.mdx b/participate/01_staking/01_become_a_collator/_03_start_node_docker.mdx similarity index 100% rename from docs/participate/01_staking/01_become_a_collator/_03_start_node_docker.mdx rename to participate/01_staking/01_become_a_collator/_03_start_node_docker.mdx diff --git a/docs/participate/01_staking/01_become_a_collator/_category_.json b/participate/01_staking/01_become_a_collator/_category_.json similarity index 100% rename from docs/participate/01_staking/01_become_a_collator/_category_.json rename to participate/01_staking/01_become_a_collator/_category_.json diff --git a/docs/participate/01_staking/02_advanced_collator_section/01_adjust_stake.md b/participate/01_staking/02_advanced_collator_section/01_adjust_stake.md similarity index 100% rename from docs/participate/01_staking/02_advanced_collator_section/01_adjust_stake.md rename to participate/01_staking/02_advanced_collator_section/01_adjust_stake.md diff --git a/docs/participate/01_staking/02_advanced_collator_section/02_exit.md b/participate/01_staking/02_advanced_collator_section/02_exit.md similarity index 100% rename from docs/participate/01_staking/02_advanced_collator_section/02_exit.md rename to participate/01_staking/02_advanced_collator_section/02_exit.md diff --git a/docs/participate/01_staking/02_advanced_collator_section/03_collator_lifecycle.md b/participate/01_staking/02_advanced_collator_section/03_collator_lifecycle.md similarity index 100% rename from docs/participate/01_staking/02_advanced_collator_section/03_collator_lifecycle.md rename to participate/01_staking/02_advanced_collator_section/03_collator_lifecycle.md diff --git a/docs/participate/01_staking/02_advanced_collator_section/04_monitoring.md b/participate/01_staking/02_advanced_collator_section/04_monitoring.md similarity index 100% rename from docs/participate/01_staking/02_advanced_collator_section/04_monitoring.md rename to participate/01_staking/02_advanced_collator_section/04_monitoring.md diff --git a/docs/participate/01_staking/02_advanced_collator_section/05_bootnodes.md b/participate/01_staking/02_advanced_collator_section/05_bootnodes.md similarity index 100% rename from docs/participate/01_staking/02_advanced_collator_section/05_bootnodes.md rename to participate/01_staking/02_advanced_collator_section/05_bootnodes.md diff --git a/docs/participate/01_staking/02_advanced_collator_section/06_benchmarking.md b/participate/01_staking/02_advanced_collator_section/06_benchmarking.md similarity index 100% rename from docs/participate/01_staking/02_advanced_collator_section/06_benchmarking.md rename to participate/01_staking/02_advanced_collator_section/06_benchmarking.md diff --git a/docs/participate/01_staking/02_advanced_collator_section/_category_.json b/participate/01_staking/02_advanced_collator_section/_category_.json similarity index 100% rename from docs/participate/01_staking/02_advanced_collator_section/_category_.json rename to participate/01_staking/02_advanced_collator_section/_category_.json diff --git a/docs/participate/01_staking/03_delegate/01_overview.md b/participate/01_staking/03_delegate/01_overview.md similarity index 100% rename from docs/participate/01_staking/03_delegate/01_overview.md rename to participate/01_staking/03_delegate/01_overview.md diff --git a/docs/participate/01_staking/03_delegate/02_become.md b/participate/01_staking/03_delegate/02_become.md similarity index 100% rename from docs/participate/01_staking/03_delegate/02_become.md rename to participate/01_staking/03_delegate/02_become.md diff --git a/docs/participate/01_staking/03_delegate/03_adjust_stake.md b/participate/01_staking/03_delegate/03_adjust_stake.md similarity index 100% rename from docs/participate/01_staking/03_delegate/03_adjust_stake.md rename to participate/01_staking/03_delegate/03_adjust_stake.md diff --git a/docs/participate/01_staking/03_delegate/04_exit.md b/participate/01_staking/03_delegate/04_exit.md similarity index 100% rename from docs/participate/01_staking/03_delegate/04_exit.md rename to participate/01_staking/03_delegate/04_exit.md diff --git a/docs/participate/01_staking/03_delegate/05_delegator_lifecycle.md b/participate/01_staking/03_delegate/05_delegator_lifecycle.md similarity index 100% rename from docs/participate/01_staking/03_delegate/05_delegator_lifecycle.md rename to participate/01_staking/03_delegate/05_delegator_lifecycle.md diff --git a/docs/participate/01_staking/03_delegate/_category_.json b/participate/01_staking/03_delegate/_category_.json similarity index 100% rename from docs/participate/01_staking/03_delegate/_category_.json rename to participate/01_staking/03_delegate/_category_.json diff --git a/docs/participate/01_staking/04_claim_rewards.md b/participate/01_staking/04_claim_rewards.md similarity index 100% rename from docs/participate/01_staking/04_claim_rewards.md rename to participate/01_staking/04_claim_rewards.md diff --git a/docs/participate/01_staking/05_unlock_unstaked.md b/participate/01_staking/05_unlock_unstaked.md similarity index 100% rename from docs/participate/01_staking/05_unlock_unstaked.md rename to participate/01_staking/05_unlock_unstaked.md diff --git a/docs/participate/01_staking/06_troubleshooting.md b/participate/01_staking/06_troubleshooting.md similarity index 100% rename from docs/participate/01_staking/06_troubleshooting.md rename to participate/01_staking/06_troubleshooting.md diff --git a/docs/participate/01_staking/_04_claim_rewards_collator.mdx b/participate/01_staking/_04_claim_rewards_collator.mdx similarity index 100% rename from docs/participate/01_staking/_04_claim_rewards_collator.mdx rename to participate/01_staking/_04_claim_rewards_collator.mdx diff --git a/docs/participate/01_staking/_04_claim_rewards_delegator.mdx b/participate/01_staking/_04_claim_rewards_delegator.mdx similarity index 100% rename from docs/participate/01_staking/_04_claim_rewards_delegator.mdx rename to participate/01_staking/_04_claim_rewards_delegator.mdx diff --git a/docs/participate/01_staking/_category_.json b/participate/01_staking/_category_.json similarity index 100% rename from docs/participate/01_staking/_category_.json rename to participate/01_staking/_category_.json diff --git a/docs/participate/01_staking/_disclaimer_staking_tx.md b/participate/01_staking/_disclaimer_staking_tx.md similarity index 79% rename from docs/participate/01_staking/_disclaimer_staking_tx.md rename to participate/01_staking/_disclaimer_staking_tx.md index 524d9fef3..299d39747 100644 --- a/docs/participate/01_staking/_disclaimer_staking_tx.md +++ b/participate/01_staking/_disclaimer_staking_tx.md @@ -1,5 +1,5 @@ :::info -You can either execute this transaction in Polkadot JS Apps or the [**KILT Stakeboard**](../../develop/05_builtonkilt.md#web-apps), which serves as an in-house developed Frontend for all KILT staking activity. +You can either execute this transaction in Polkadot JS Apps or the [**KILT Stakeboard**](/develop/builtonkilt#web-apps), which serves as an in-house developed Frontend for all KILT staking activity. Below, we outline the steps for Polkadot JS Apps. The process for KILT Stakeboard is described in detail in the [**BOTLabs Trusted Entity support hub**](https://support.kilt.io/support/solutions/80000442174). ::: diff --git a/docs/participate/02_governance/01_vote.md b/participate/02_governance/01_vote.md similarity index 100% rename from docs/participate/02_governance/01_vote.md rename to participate/02_governance/01_vote.md diff --git a/docs/participate/02_governance/02_remove_vote.md b/participate/02_governance/02_remove_vote.md similarity index 100% rename from docs/participate/02_governance/02_remove_vote.md rename to participate/02_governance/02_remove_vote.md diff --git a/docs/participate/02_governance/03_unlock_coins.md b/participate/02_governance/03_unlock_coins.md similarity index 100% rename from docs/participate/02_governance/03_unlock_coins.md rename to participate/02_governance/03_unlock_coins.md diff --git a/docs/participate/02_governance/_category_.json b/participate/02_governance/_category_.json similarity index 100% rename from docs/participate/02_governance/_category_.json rename to participate/02_governance/_category_.json diff --git a/docs/participate/03_treasury_proposal.md b/participate/03_treasury_proposal.md similarity index 100% rename from docs/participate/03_treasury_proposal.md rename to participate/03_treasury_proposal.md diff --git a/docs/participate/04_content_creation_guidelines.md b/participate/04_content_creation_guidelines.md similarity index 100% rename from docs/participate/04_content_creation_guidelines.md rename to participate/04_content_creation_guidelines.md diff --git a/docs/participate/05_propose_tip.md b/participate/05_propose_tip.md similarity index 97% rename from docs/participate/05_propose_tip.md rename to participate/05_propose_tip.md index 84196c2c7..8d5ec07c8 100644 --- a/docs/participate/05_propose_tip.md +++ b/participate/05_propose_tip.md @@ -6,7 +6,7 @@ title: Treasury Tips Similar to [opening a Treasury proposal](./03_treasury_proposal.md), anyone can start a tipping process. You can expect success if the tip is based on a meaningful contribution. -The variety of potential contributions is vast, read the [KILT Contribution guide](../develop/06_contribute.md) for a high level description of tips and the differences to Treasury proposals. +The variety of potential contributions is vast, read the [KILT Contribution guide](/develop/contribute) for a high level description of tips and the differences to Treasury proposals. This document covers the necessary steps from requesting a tip to receiving it. diff --git a/docs/participate/_category_.json b/participate/_category_.json similarity index 100% rename from docs/participate/_category_.json rename to participate/_category_.json diff --git a/docs/develop/01_sdk/01_quickstart.md b/sdk/01_quickstart.md similarity index 95% rename from docs/develop/01_sdk/01_quickstart.md rename to sdk/01_quickstart.md index 02bd1c8f5..8bea770c4 100644 --- a/docs/develop/01_sdk/01_quickstart.md +++ b/sdk/01_quickstart.md @@ -221,7 +221,17 @@ Run the code and wait to see if you can retrieve **and** verify one of kiltnerd1 :::info Next steps -- If you want to explore more of KILT's features, read our [Concepts section](../../concepts/01_what_is_kilt.md). -- If you want to dive deeper into the SDK, read the next section, [the KILT Cookbook](./02_cookbook/01_dids/01_light_did_creation.md). +- If you want to explore more of KILT's features, read our [Concepts section](/concepts/what-is-kilt). + ::: + + +## NodeJS + diff --git a/sdk/02_tutorial/01_welcome.md b/sdk/02_tutorial/01_welcome.md new file mode 100644 index 000000000..556c30b7e --- /dev/null +++ b/sdk/02_tutorial/01_welcome.md @@ -0,0 +1,38 @@ +--- +id: welcome +title: 👋🏻 Welcome +--- + + + + +SDK version **1.x**. + +:::info What you can expect to learn + +📦 **Topics**: [KILT SDK](https://github.com/KILTprotocol/sdk-js) essentials, basic credential workflow. +This includes creating a CType and a claim, attesting a claim, and finally verifying the credential. + +⏳ **Duration**: 15-45 minutes. + +🤓 **Prerequisites**: + +- Basic JavaScript or TypeScript knowledge. +- [Node.js](https://nodejs.org/) installed. Any stable LTS version >= 16.0. + +❓ **Questions?** Join the [developer community channel](https://discord.gg/hX4pc8rdHS)! + +::: + +## Welcome, curious mind! + +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 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. + +Ready? Let's go! \ No newline at end of file diff --git a/sdk/02_tutorial/02_setup.md b/sdk/02_tutorial/02_setup.md new file mode 100644 index 000000000..f9cbbd257 --- /dev/null +++ b/sdk/02_tutorial/02_setup.md @@ -0,0 +1,116 @@ +--- +id: setup +title: 🎒 Setup +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +## Project setup + +Create a new project and navigate into it by running `mkdir kilt-rocks && cd kilt-rocks`. + +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 + + + + +Initialize the project and install dependencies. + +```bash npm2yarn +npm init -y +npm install @kiltprotocol/sdk-js dotenv ts-node typescript +``` + + + + +Initialize the project and install dependencies. + +```bash npm2yarn +npm init -y +npm install @kiltprotocol/sdk-js dotenv +``` + + + + +## Project folder + + + + +Create the following remaining files to end up with the folder structure below: + +``` +└─ kilt-rocks/ # project + ├─ index.ts # all code + └─ .env # environment variables +``` + +``` +touch index.ts .env +``` + + + + +Create the following remaining files to end up with the folder structure below: + +``` +└─ kilt-rocks/ # project + ├─ index.js # all code + └─ .env # environment variables +``` + +``` +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. + +PILT tokens have no value, and you can request them from the [faucet](https://faucet.peregrine.kilt.io). + +## Blockchain connection + +Before using any SDK functionality, initialize and configure the KILT SDK. + +As this workshop uses the [Peregrine Testnet](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fperegrine.kilt.io%2Fparachain-public-ws%2F#/explorer) you use its address whenever using the SDK to interact with the KILT blockchain using following function: + +```JavaScript +await Kilt.connect({address}) +``` + +Where `address` is the address of the full node you want to connect to, which for this workshop, is `wss://peregrine.kilt.io`. + +For convenience, add the address to the `.env` file. + +```env title=".env" +WSS_ADDRESS=wss://peregrine.kilt.io +``` + +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 new file mode 100644 index 000000000..c96ca3bb7 --- /dev/null +++ b/sdk/02_tutorial/03_overview.md @@ -0,0 +1,90 @@ +--- +id: overview +title: 👓 Overview +--- + +This tutorial runs through the full story of a claim. + +It involves four roles which work together to create **distributed trust**: + +- 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. + +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. + +Each actor typically performs different roles: + +- Both the Holder and the Issuer have to interact with the KILT blockchain. +- 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. + +## 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 verification + A->>A: Validate received attributes + A->>+B: Store attestation of verification + B-->>-A: Attestation hash + A-->>-C: Attestation Hash +``` + +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. + +## 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. +For example, hide their address from their ID if the Issuer is only interested in their age. + +```mermaid +sequenceDiagram +actor C as Holder +actor V as Issues +participant B as KILT Blockchain + V->>+C: Request presentation for CType + C->>C: Derive a presentation from a credential + C-->>-V: submit presentation + V->>B: check validity of presentation +``` + + + +### Example: Requesting a travel visa + +To take an example of applying for a travel visa: + +1. The Embassy (analogous to the Issuer) asks a traveler (analogous to the Holder) for a specific document or CType. For example, it could be a bank statement. The Embassy asks, "Provide proof of financial stability, and we'll grant you a visa." The traveler gets the bank statement from their bank, gets it attested by the bank (The Issuer), and prepares the document. +2. The document is ready, but the Embassy doesn't need all the information in the document. The embassy wants to know if a traveler has sufficient funds, but they don't need to know any transaction details. The traveler redacts or hides these details while presenting. +3. The traveler presents the document to the embassy. +4. The embassy verified the document's authenticity by comparing its hash value with the one on their internal system or a decentralized ledger. +5. Since they trust the Issuer (in this case, the bank that attested the bank statement), they approved the visa application. + +:::tip Summary + +As you can see, the Embassy didn't need to trust the Holder directly in this system. +They trust the Holder, whom they had previously worked with, or respect due to their position. +And with that trust, they grant the visa with no knowledge of what the Holder has used the credential for. +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. + +::: diff --git a/sdk/02_tutorial/04_accounts.md b/sdk/02_tutorial/04_accounts.md new file mode 100644 index 000000000..9d2481295 --- /dev/null +++ b/sdk/02_tutorial/04_accounts.md @@ -0,0 +1,99 @@ +--- +id: account +title: Account +--- + +import TsJsBlock from '@site/src/components/TsJsBlock'; +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +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/05_issuer/02_did.md b/sdk/02_tutorial/05_issuer/02_did.md new file mode 100644 index 000000000..9673fc63e --- /dev/null +++ b/sdk/02_tutorial/05_issuer/02_did.md @@ -0,0 +1,133 @@ +--- +id: did +title: DID +--- + +import TsJsBlock from '@site/src/components/TsJsBlock'; +import TsJsSnippet from '@site/src/components/TsJsSnippet'; + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +import TutorialCode from '!!raw-loader!@site/code_examples/sdk_examples/src/workshop/index.ts'; + +The next step is to generate a KILT decentralized identifier (DID) using the account you created for the Issuer in [the previous step](../04_accounts.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. + +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. + +:::info KILT DID + +A DID supports four different key types: + +- An _authentication key pair_, used to sign claims and present authenticated credentials +- A _key-agreement key pair_, used to encrypt/decrypt messages +- 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, for example if a key becomes compromised. + +::: + +## The difference between a DID and an account + +A DID and an account sound similar, but there are differences: + +- You record both to chain +- You can have a DID without an account +- You can have an account without a DID +- Only an account can pay deposits and fees and attest claims +- DIDs don't hold any coins + +In summary, you register a DID on the blockchain by an account submitting the DID creation transaction and paying the fees. + +## Create a DID + +As an Issuer needs to interact with the chain, you must create a DID. + +### Write DID to chain + + + {TutorialCode} + + +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 + +This workshop assumes you followed the [create account step](../04_accounts.md), but if you have a pre-existing account, you can use that instead. + +::: + +```ts +export async function runAll() { + … + let issuerDid = await generateIssuerDid(submitterAccount, issuerAccount) +} +``` + +## 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 `ISSUER_DID_URI`. + +The output should look like the following, but not identical since the code creates the DIDs from your account: + +``` +ISSUER_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..." +``` + +Well done - You've generated a full DID! The next step is to issue a credential. diff --git a/sdk/02_tutorial/05_issuer/03_issue_credential.md b/sdk/02_tutorial/05_issuer/03_issue_credential.md new file mode 100644 index 000000000..1e1626cb0 --- /dev/null +++ b/sdk/02_tutorial/05_issuer/03_issue_credential.md @@ -0,0 +1,93 @@ +--- +id: issue_credential +title: Issue a Credential +--- + +import CodeBlock from '@theme/CodeBlock'; +import TsJsBlock from '@site/src/components/TsJsBlock'; +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +import Ctype from '@site/scripts/out/ctype.json.raw!=!raw-loader!@site/scripts/out/ctype.json'; + +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 visas the holder has. +The CType is important since a Verifier requests credentials for a specific CType. +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. + +A CType has the following attributes: + +| Key | Value | +| -------------| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `$id` | The KILT id of this CType. It's the most important property as it represents the **digital footprint** of the CType. | +| `$schema` | A reference to the meta-schema describing what a CType may look like. There are two versions. | +| `title` | The title of the CType. | +| `properties` | The properties that a claim conforming to this CType may have. | +| `type` | Type is an object for all CTypes. | +| `additionalProperties` | The default is false. This restricts unwanted properties in a claim. | + +## Fetch CType + +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. + +Fetch a CType using the `fetchFromChain` method, passing the `$id` of the CType you want to fetch. + +## Create and issue credential + +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. + +Finally, issue the credential using the `issue` method passing the newly created credential. + + + {issueCredential} + + + + +```typescript +export async function runAll() { + … + const credential = await issueCredential( + issuerDid.didDocument, + issuerDid.signers, + submitterAccount + ) +} +``` + + + +## Run code + + + + + ```bash + yarn ts-node ./index.ts + ``` + + + + + ```bash + node ./index.js + ``` + + + + +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/docs/develop/03_workshop/04_attester/_category_.json b/sdk/02_tutorial/05_issuer/_category_.json similarity index 100% rename from docs/develop/03_workshop/04_attester/_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..f3af04edf --- /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](../04_accounts.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 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](./03_issue_credential.md). 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..f247bfabd --- /dev/null +++ b/sdk/02_tutorial/06_holder/01_did.md @@ -0,0 +1,108 @@ +--- +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'; + +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](../04_accounts.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..83ddebd78 --- /dev/null +++ b/sdk/02_tutorial/06_holder/02_create_presentation.md @@ -0,0 +1,79 @@ +--- +id: presentation +title: Create a presentation +--- + +import TsJsBlock from '@site/src/components/TsJsBlock'; +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + + + +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/docs/develop/03_workshop/05_claimer/_category_.json b/sdk/02_tutorial/06_holder/_category_.json similarity index 100% rename from docs/develop/03_workshop/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 new file mode 100644 index 000000000..de3d321f1 --- /dev/null +++ b/sdk/02_tutorial/07_verification.md @@ -0,0 +1,81 @@ +--- +id: verification +title: 🤝 Verification +--- + +import CodeBlock from '@theme/CodeBlock'; +import TsJsBlock from '@site/src/components/TsJsBlock'; +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + + + +In this section, you play the role of a Verifier that does the following: + +:::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 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 A VerifiablePresentation object + +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. + +Each `VerifiableCredential` can hide or show properties, allowing for selective disclosure. + +::: + +## Verify presentation + +The KILT SDK provides the `verifyPresentation` method from the `Verifier` class to verify a credential presentation. It takes the following parameters: + +- `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. + + +The method returns an object with a `verified` boolean that indicates whether the presentation is valid. + + + + {VerifyPresentation} + + + + +```typescript +export async function runAll() { + … + await verifyPresentation(presentation, verifierDid.didDocument) +} +``` + + + +## Run code + + + + + ```bash + yarn ts-node ./index.ts + ``` + + + + + ```bash + node ./index.js + ``` + + + + +That's it! All done :-) \ No newline at end of file diff --git a/sdk/02_tutorial/08_done.md b/sdk/02_tutorial/08_done.md new file mode 100644 index 000000000..51da81567 --- /dev/null +++ b/sdk/02_tutorial/08_done.md @@ -0,0 +1,25 @@ +--- +id: done +title: 🚀 Done +--- + +## Congrats! + +Well done! +You now understand the main actors in KILT, the `Claimers`, `Issuers` and `Verifiers`. + +You have also learned how to: + +- create accounts +- create DIDs +- create claims and attestation requests +- process requests and attest credentials +- generate and sign credential presentations +- receive and verify presentations + +## Resources + +Here are some resources to help you continue your journey in the KILT ecosystem: + +- [Discord](https://discord.gg/5VZnPdTZMy) - DAO-inspired, outcome-focused community +- [Element](https://matrix.to/#/%23kilt-general:matrix.org) - Technical, Governance, Treasury discussion diff --git a/docs/develop/03_workshop/_category_.json b/sdk/02_tutorial/_category_.json similarity index 100% rename from docs/develop/03_workshop/_category_.json rename to sdk/02_tutorial/_category_.json diff --git a/sdk/03_accounts.md b/sdk/03_accounts.md new file mode 100644 index 000000000..28e2e84db --- /dev/null +++ b/sdk/03_accounts.md @@ -0,0 +1,144 @@ +--- +id: accounts +title: Accounts +--- + +import TsJsBlock from '@site/src/components/TsJsBlock'; +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +import SubAccLink from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/linking/01_sub_link.ts'; +import EthAccLink from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/linking/01_eth_link.ts'; +import EthWeb3AccLink from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/linking/01_eth_link_web3js.ts'; +import EthMetamaskAccLink from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/linking/01_eth_link_metamask.ts'; +import SenderLink from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/linking/02_sender_link.ts'; + +import AccountWeb3NameQuery from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/linking/03_account_web3name_query.ts'; +import AccountWeb3NameQueryNoSDK from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/linking/04_account_web3name_query_no_sdk.ts'; + +import DidUnlink from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/linking/05_did_unlink.ts'; +import AccountUnlink from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/linking/06_account_unlink.ts'; +import ReclaimDeposit from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/linking/07_reclaim_deposit.ts'; + +## Create +## Update +## Delete +## Query + +Sometimes there is the need to link a DID to an account publicly. +The link makes it possible to lookup a DID for an account. +The other directions is also possible. +With a DID you can lookup a list of linked account. + +Linking accounts can be useful when your account should have an identity. +E.g. as a collator, you might want to provide some public information so that delegator can better decide who earned their stake. + +An account can be linked to a DID in one of two ways. +Either the account that sends the transaction links itself to the DID, or the sender is unrelated to the DID and a third account is linked. +In the latter case, a challenge needs to be signed using the third account, to prove ownership. + +The second option is useful in cases where the account that should be linked doesn't own KILT tokens and the transaction is paid for by a third party. +This option also allows to link account schemes that are not native to the Spiritnet Blockchain. +Right now the only other address scheme supported are ethereum accounts. + +:::warning Don't use linked accounts for asset transfers + +Don't use these linked accounts for asset transfers. +Since these accounts are not limited to KILT accounts, but can be used on any chain, the recipient might not be able to access the transferred asset on other chains. +When a link to an account on a different Polkadot chain is created, this account might only be usable on this specific chain. + +If you want transfer assets to a DID have a look at [the asset transfer service](https://github.com/KILTprotocol/spec-KiltTransferAssetRecipientV1). + +::: + +## Linking the sender to a DID + +Link the sender of the transaction to the DID. +The sender will provide the deposit and pay the fees. +They will also be linked to the DID. + + + {SenderLink} + + +## Linking an account to a DID + +Link another account to the DID. +The sender will provide the deposit and pay the fees, but will not be linked to the DID in any way. +The account that should be linked must sign a challenge to prove that the account agrees to be linked. + +The proof contains the DID that the account will be linked to and an expiration date (in terms of blocks), to prevent replay attacks. +The proof will only be valid up until the blocknumber is reached. + +With this option you can link addresses that are supported by the Spiritnet blockchain (Sr25519, Ed25519, Ecdsa), but also ethereum addresses. + + + + + + {SubAccLink} + + + + + {EthAccLink} + + + + + {EthWeb3AccLink} + + + + Refer to the Metamask documentation for further information. + + {EthMetamaskAccLink} + + + + + +## Query the web3name of an Account + +For accounts that have been linked to DIDs that have claimed a web3name, the linking feature opens the way to a host of possibilities, e.g., showing the web3name of a collator's account on the [KILT Stakeboard][kilt-stakeboard]. + +This section shows how to perform the `account -> web3name` querying both with and without the support of the KILT SDK. + +## Query an Account's web3name with the KILT SDK + + + {AccountWeb3NameQuery} + + +## Query an Account's web3name without the KILT SDK + + + {AccountWeb3NameQueryNoSDK} + + +[kilt-stakeboard]: https://stakeboard.kilt.io/ + +## Unlink an Account From a KILT DID + +Similar to the way a new account to DID link is created, removing a link can happen in one of three ways: + +1. The DID owner submits a transaction indicating which account to unlink: + + + {DidUnlink} + + +2. The linked account submits a transaction indicating that the link with the DID should be removed: + + + {AccountUnlink} + + +3. The deposit payer submits a transaction indicating that they want to reclaim their deposit, which in turn removes the existing link between the specified account and DID: + + + {ReclaimDeposit} + diff --git a/docs/develop/01_sdk/02_cookbook/04_claiming/01_ctype_creation.md b/sdk/04_claiming/01_ctype_creation.md similarity index 79% rename from docs/develop/01_sdk/02_cookbook/04_claiming/01_ctype_creation.md rename to sdk/04_claiming/01_ctype_creation.md index 12d3aba54..804868c23 100644 --- a/docs/develop/01_sdk/02_cookbook/04_claiming/01_ctype_creation.md +++ b/sdk/04_claiming/01_ctype_creation.md @@ -11,18 +11,18 @@ import FetchCType from '!!raw-loader!@site/code_examples/sdk_examples/src/core_f Every KILT credential has to conform to a CType. A CType describes which properties a credential has and what type these properties have. CTypes must be registered on the Spiritnet blockchain. -To learn more about CTypes, see the [CType concept section](../../../../concepts/05_credentials/02_ctypes.md). +To learn more about CTypes, see the [CType concept section](/concepts/credentials/ctypes). The creation of a CType in KILT involves two steps: the definition of a CType and the anchoring of its hash on the KILT blockchain. :::info DID required The creator of a CType is required to have a full DID with an attestation key. -To see how to manage DIDs, please refer to the [DID section](../01_dids/03_full_did_update.md). + ::: :::info CTypes are unique The creation of a new CType requires the CType hash to be unique. -Before writing a new CType, Attesters should check whether there is already an existing CType which matches their requirements. +Before writing a new CType, Issuers should check whether there is already an existing CType which matches their requirements. Visit our [CType index repository](https://github.com/KILTprotocol/ctype-index) for a non-exhaustive list of existing CTypes. ::: diff --git a/sdk/04_claiming/02_attestation_request.md b/sdk/04_claiming/02_attestation_request.md new file mode 100644 index 000000000..a7ec9c01c --- /dev/null +++ b/sdk/04_claiming/02_attestation_request.md @@ -0,0 +1,21 @@ +--- +id: attestation-request +title: Request an Attestation +--- +import TsJsBlock from '@site/src/components/TsJsBlock'; + +import RequestAttestation from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/claiming/03_request_attestation.ts'; + +To obtain credentials, Claimers have to request an attestation for a set of claims from an Issuer. +The resulting object is a `Credential`, which can be created following the snippet below. + +This process does not involve any interaction with the KILT blockchain, but is simply a communication channel where the Claimer and the Issuer can communicate. + + + {RequestAttestation} + + +:::note +The structure of the claims must respect the schema defined in the specified CType. +Issuers (and Verifiers) will reject claims that fail to verify correctly. +::: \ No newline at end of file diff --git a/sdk/04_claiming/03_attestation_creation.md b/sdk/04_claiming/03_attestation_creation.md new file mode 100644 index 000000000..321294730 --- /dev/null +++ b/sdk/04_claiming/03_attestation_creation.md @@ -0,0 +1,21 @@ +--- +id: attestation-creation +title: Attest a Claim (Issue a Credential) +--- + +import TsJsBlock from '@site/src/components/TsJsBlock'; + +import CreateAttestation from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/claiming/04_create_attestation.ts'; + +Once an Issuer has received a to-be-attested `Credential` from a Claimer, they will typically verify the information in the claim. +If the claims correspond to truth, the Issuer will proceed by attesting the root hash of the credential on the KILT blockchain, timestamping the attestation operation. +A deposit is reserved from the balance of the KILT account submitting the creation transaction, which is returned if and when the attestation is removed from the chain. + +:::info + +::: + + + {CreateAttestation} + \ No newline at end of file diff --git a/docs/develop/01_sdk/02_cookbook/04_claiming/04_presentation_creation.md b/sdk/04_claiming/04_presentation_creation.md similarity index 100% rename from docs/develop/01_sdk/02_cookbook/04_claiming/04_presentation_creation.md rename to sdk/04_claiming/04_presentation_creation.md diff --git a/sdk/04_claiming/05_presentation_verification.md b/sdk/04_claiming/05_presentation_verification.md new file mode 100644 index 000000000..33c2906aa --- /dev/null +++ b/sdk/04_claiming/05_presentation_verification.md @@ -0,0 +1,27 @@ +--- +id: presentation-verification +title: Verify a Credential or a Presentation +--- + +import TsJsBlock from '@site/src/components/TsJsBlock'; + +import VerifyPresentation from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/claiming/06_verify_presentation.ts'; + +Whether a presentation involves selective disclosure or a whole credential is not technically relevant to Verifiers. +This is because in KILT a presentation **is** a credential. +This means that the logic for Verifiers does not change depending on the case, thus verifying a presentation is as easy as calling one SDK function, like the following code snippet: + + + {VerifyPresentation} + + +:::warning Check if the presenter is the credential subject +Verifying a presentation provides proof that all the information is correct and authentic, and that the credential has not been revoked. +Verifiers still need to match the subject of the credential to the entity that is presenting it. +One way of achieving this is by asking the Claimer to include a challenge in the presentation signature, as shown in the snippet above. +Without a challenge, Verifiers must implement other measures to be certain about the identity of the presenter. +::: + +:::warning Evaluation of the issuer's trust is up to the Verifiers +Verifiers must also have a registry of issuers they trust, and verify that the issuer of the credential they are verifying belongs to such list and, where necessary, whether it is still in operation or not, i.e., whether its DID still exists or has been deleted. +::: \ No newline at end of file diff --git a/docs/develop/01_sdk/02_cookbook/04_claiming/06_credential_revocation.md b/sdk/04_claiming/06_credential_revocation.md similarity index 87% rename from docs/develop/01_sdk/02_cookbook/04_claiming/06_credential_revocation.md rename to sdk/04_claiming/06_credential_revocation.md index da6ff398b..b72b21c4f 100644 --- a/docs/develop/01_sdk/02_cookbook/04_claiming/06_credential_revocation.md +++ b/sdk/04_claiming/06_credential_revocation.md @@ -8,7 +8,7 @@ import TsJsBlock from '@site/src/components/TsJsBlock'; import RevokeCredential from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/claiming/07_revoke_credential.ts'; import ReclaimDeposit from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/claiming/08_reclaim_attestation_deposit.ts'; -If the conditions that make a credential valid cease to exist, an Attester can revoke and optionally remove their attestation from the KILT blockchain. +If the conditions that make a credential valid cease to exist, an Issuer can revoke and optionally remove their attestation from the KILT blockchain. This does not automatically delete the credential from the Claimer's wallet, of course, but it makes it impossible for the Claimer to use the credential in the future. Since the attestation creation reserved some KILT tokens from the submitter's balance, removing an attestation would return those funds into the payer's pockets. @@ -19,7 +19,7 @@ Since the attestation creation reserved some KILT tokens from the submitter's ba ## Claim Back an Attestation Deposit -Claiming back the deposit of an attestation is semantically equivalent to revoking and removing the attestation, with the difference that the extrinsic to claim the deposit can only be called by the deposit owner and does not require the Attester's signature: +Claiming back the deposit of an attestation is semantically equivalent to revoking and removing the attestation, with the difference that the extrinsic to claim the deposit can only be called by the deposit owner and does not require the Issuer's signature: {ReclaimDeposit} diff --git a/docs/develop/01_sdk/02_cookbook/04_claiming/_category_.json b/sdk/04_claiming/_category_.json similarity index 100% rename from docs/develop/01_sdk/02_cookbook/04_claiming/_category_.json rename to sdk/04_claiming/_category_.json diff --git a/sdk/04_dids.md b/sdk/04_dids.md new file mode 100644 index 000000000..fa992eac3 --- /dev/null +++ b/sdk/04_dids.md @@ -0,0 +1,324 @@ +--- +id: dids +title: DIDIDIDID +--- + +import TsJsBlock from '@site/src/components/TsJsBlock'; + +import GenerateKeys from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/did/00_generate_did_keys.ts'; + +import FullDidSimple from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/did/04_full_did_simple.ts'; +import FullDidComplete from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/did/05_full_did_complete.ts'; + +import FullDidUpdate from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/did/07_full_did_update.ts'; + +import DidQuery from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/did/06_did_query.ts'; + +import FullDidDelete from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/did/11_full_did_delete.ts'; +import FullDidDepositReclaim from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/did/13_full_did_deposit_reclaim.ts'; + +import FullDidSignTx from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/did/09_full_did_tx.ts'; +import FullDidBatch from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/did/08_full_did_batch.ts'; + +import DidSignature from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/did/10_did_signature.ts'; + +import Claim from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/web3names/01_claim.ts'; + +import QueryNameCredentials from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/web3names/03_query_name_credentials.ts'; + +import Release from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/web3names/04_release.ts'; +import ReclaimDeposit from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/web3names/05_reclaim_deposit.ts'; + +import QueryDid from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/web3names/02_query_did_name.ts'; + + + +## Create + + +### Creating new accounts from a seed + +This approach allows you to generate various key pairs for authentication, key agreement, assertion methods, and capability delegation from one mnemonic seed phrase. + +### Derivation paths + +The code example below derives different types of keys from a single account using derivation paths. + +A derivation path is a way to derive a new key from a parent key and is a sequence of indices separated by a delimiter. +The most common delimiter is `/` (forward slash). + +KILT uses the same derivation paths as the underlying Polkadot libraries, using hard key derivation. + +#### Hard derivation + +A hard derivation path does not allow someone to do either of these. +Even if you know a derived private key, it's not possible to figure out the private key of the root address, and it's impossible to prove that the first account is linked with the second. + +A `//` (double slash) indicates a hard derivation path. +For example, `deal rice sunny now boss cluster team use wreck electric wing deliver//0` is a hard derivation path. + + + +To create another account using the same seed, change the number at the end of the string. For example, `/1`, `/2`, and `/3` create different derived accounts. + +Using derivation paths simplifies key management, ensuring that a single mnemonic seed serves as the basis for multiple keys associated with a DID. +This method improves efficiency while maintaining security. +However, it's essential to handle and store private keys securely to prevent unauthorized access and ensure the overall integrity and privacy of the decentralized identity system. + +Below is an example code snippet illustrating the key pair generation for a KILT DID: + + + {GenerateKeys} + + +:::info +This example doesn't show how to store the keys. +It is recommended to store the keys in a secure manner, e.g. only storing the private keys encrypted on disk. +The mnemonic seed phrase can be used to regenerate the keys, so it is recommended to also store the mnemonic in a secure manner and create a backup of it. +::: + +## Create a Full DID + +:::info Creating a light DID +Older versions of the KILT SDK allowed you to also create "light DIDs", which are usable offline with no connection with the KILT blockchain. This new SDK documentation focuses on creating and working with full DIDs, which are more flexible and secure. If you need to create a light DID, refer to the [old SDK documentation](#) +::: + +The following is an example of how to create and write on the blockchain a full DID that specifies only an authentication key. + + + {FullDidSimple} + + +If additional keys or services are to be specified, they can be passed as parameters to the creation transaction. + + + {FullDidComplete} + + +## Update + +### Update a Full DID keys and service endpoints + +Once anchored to the KILT blockchain, a full DID can be updated. +For instance, the following snippet shows how to use the `authorizeBatch` function to update the authentication key, remove an old service _and_ add a new one for a full DID in the same transaction. + + + {FullDidUpdate} + + +## Delete + + +Once a DID is no longer needed, it is recommended to deactivate it by removing it from the KILT blockchain. +The following snippet shows how to do it: + + + {FullDidDelete} + + +:::warning +Please note that once deleted, a full DID becomes unusable and cannot be re-created anymore. +This means that all credentials obtained with that DID are no longer valid and must be obtained with a different DID if needed. +::: + +### Claim back a DID deposit + +Claiming back the deposit of a DID is semantically equivalent to deactivating and deleting the DID, with the difference that the extrinsic to claim the deposit can only be called by the deposit owner and does not require a signature by the DID subject: + + + {FullDidDepositReclaim} + + + +## Query + +Querying the state of a DID is called **resolution**. +The entity that queries the DID Document for a given DID, i.e., resolves it, is called a **resolver**. + +The KILT SDK provides such a resolver to use with KILT DIDs, as the snippet below shows: + + + {DidQuery} + + +:::note +The DID resolver can resolve both light and full DIDs. +For a more in-depth explanation about the KILT DID method and resolution, refer to our [specification](https://github.com/KILTprotocol/spec-kilt-did). +::: + + + +## Generate DID keys + + + +Creating a Decentralized Identifier (DID) on the KILT network involves generating keying material for authentication and encryption. +This guide shows how to create a set of key pairs suitable for generating a KILT DID. + +Before proceeding, it's important to note that this example assumes the usage of the `@kiltprotocol/sdk-js` library along with the `@polkadot/util-crypto` library for cryptographic operations. + +Additionally, it's important to securely store keys and the mnemonic seed phrase. +For production use, ensure that private keys are encrypted and stored safely, while also creating a backup of the mnemonic seed phrase. + + + + + + + + + +## Build DID Extrinsics + +DID keys can be used to sign extrinsic. +But not every extrinsic can be signed using a DID. +The Spiritnet blockchain offers two types of extrinsics. + +The first type can only be called using an account. +We call them account extrinsic. +The second callable type are DID extrinsics. +They must be used for all KILT features like creating CTypes, issue attestations, etc. +Since every extrinsic requires fees to be paid, this type needs to be wrapped inside an account extrinsic. +Accounts hold balances and can therefore pay fees and provide deposits. + +This document describes how to sign the DID extrinsics. +The KILT SDK provides two functions for signing DID extrinsics. +The first function signs a single extrinsic while the second one batches multiple extrinsics together. + +## Single extrinsics + +To sign a single extrinsic, you need to provide: + +- the DID that wants to sign the extrinsic (also called _origin_ of the extrinsic) + + +- the extrinsic that should be signed and submitted +- and the address of the account that pays for the fees. + + + {FullDidSignTx} + + +## Batch multiple extrinsics + +Full DIDs can also be used to batch multiple extrinsics that require the signature of the DID. +For instance, a batch could create multiple services with a single submission to the blockchain. +This would save the user the time of generating one additional signature, as multiple extrinsics are batched and signed at once. +The extrinsics are also submitted and executed in the same block. +For more information, see the [official Substrate documentation](https://paritytech.github.io/substrate/master/pallet_utility/pallet/struct.Pallet.html). + +An example of a batch using the `authorizeBatch` is provided below. + + + {FullDidBatch} + + +DIDs have different keys that posses different capabilities. +Each key can only be used to authorize a specific subset of extrinsics. +If extrinsics are batched together that require different DID keys, the `authorizeBatch` function will call the sign callback multiple times. + +## Generate and Verify a DID Signature + +In addition to being used to authorize chain operations, both light and full DIDs have off-chain applications. + +One such applications is generating digital signatures. +As a DID can have multiple keys, in addition to the signature data itself, a DID signature contains information about the signer's DID and key used, so that Verifiers have all the information needed to resolve the DID from the KILT blockchain and use the right key to verify the generated signature. + +The snippet below shows how to generate and verify a DID signature using the KILT SDK. + + + {DidSignature} + + +:::note +Notice that the snippet above takes a `DidDocument` instance to generate the signature. +A `DidDocument` can represent either a light or a full DID. +This means that both light and full DIDs can generate signatures, and the KILT SDK implements the right verification logic depending on whether the signer is a light or a full DID. +::: + +## web3names + +### Claim a web3name + +A web3name can be claimed if it currently has no owner, using the following snippet as reference. + + + {Claim} + + +The claiming process requires the reservation of a deposit that is freed upon web3name release. + +Once claimed, the web3name will start appearing whenever the DID of its owner is resolved, for instance via the [Universal Resolver](https://dev.uniresolver.io/#did:kilt:4pZGzLSybfMsxB1DcpFNYmnqFv5QihbFb1zuSuuATqjRQv2g). +For more information about web3names and DIDs, see the official [KILT DID Specification](https://github.com/KILTprotocol/spec-kilt-did/blob/main/README.md). + +### Query public credentials for a web3name + +web3names are linked to KILT DIDs, and KILT DIDs can define services to expose additional service/information. +One of the possible endpoint types is the [`KiltPublishedCredentialCollectionV1`][kilt-published-credential-collection-v1-type] type. +The type defines the structure to make KILT credentials public and accessible to anyone. + +Because of the relationship between web3names and DIDs, it is possible, given a certain web3name, to retrieve all public credentials that the DID subject identified by that web3name has made available. +Below is a code snippet showing how to do that using the KILT SDK, and how to perform the needed security checks/validation as recommended by the [specification][kilt-published-credential-collection-v1-type]. + + + {QueryNameCredentials} + + +[kilt-published-credential-collection-v1-type]: https://github.com/KILTprotocol/spec-KiltPublishedCredentialCollectionV1/blob/main/README.md + +### Release a web3name + +If a web3name is no longer needed, either the DID owner or the deposit payer can release it, with deposit being released and returned to the original payer. + +### Releasing a Web3name by the DID Owner + +In the case of the DID owner willing to release the web3name, the following snippet provides a reference implementation on how to achieve that. + + + {Release} + + +In the code above, the `releaseWeb3Name` function takes the following parameters: + +- **did**: The DID URI of the owner. +- **submitterAccount**: The keyring pair of the submitter. + + +The function `releaseWeb3Name` uses the KILT SDK to create a _web3name release transaction_ using `api.tx.web3Names.releaseByOwner`. +It then authorizes the transaction using the `Kilt.Did.authorizeTx` method and submits the authorized transaction to the blockchain using `Kilt.Blockchain.signAndSubmitTx`. +This process ensures that the release transaction is signed by the DID owner. + +### Reclaiming a Web3name Deposit by the Deposit Payer + +If the web3name is being released by the deposit payer, the signature of the DID owner is not required; a regular signed extrinsic can be submitted to the KILT blockchain, as shown below. + + + {ReclaimDeposit} + + +In the code above, the `reclaimWeb3NameDeposit` function takes the following parameters: + +- **submitterAddress**: The keyring pair of the submitter. +- **web3Name**: The web3name for which the deposit is to be reclaimed. + +The function creates a web3name deposit reclaim transaction using `api.tx.web3Names.reclaimDeposit` and submits the signed transaction to the blockchain using `Kilt.Blockchain.signAndSubmitTx`. +Since the web3name is being released by the deposit payer, the signature of the DID owner is not required. + +By using these code examples, you can easily release or reclaim the deposit of a web3name, depending on the scenario and the role of the entity initiating the release. + +### Resolve a web3name + + + +Resolving the web3name will provide the same information as resolving a DID does. + +To query and retrieve the DID document associated with a web3name, you can use the following code example: + + + {QueryDid} + + +In the code example above, the `queryDidDocument` function takes a web3Name parameter, which represents the web3name to be resolved. +It internally uses the `api.call.did.queryByWeb3Name` method to query the information of the provided web3name from the blockchain. + +The function then decodes the result using `Kilt.Did.linkedInfoFromChain` to extract the associated DID document and any other linked blockchain accounts. Finally, it returns the resolved DID document. diff --git a/sdk/05_credentials.md b/sdk/05_credentials.md new file mode 100644 index 000000000..e01000beb --- /dev/null +++ b/sdk/05_credentials.md @@ -0,0 +1,169 @@ +--- +id: credentials +title: Credentials +--- + +## Credential Issuance + +import TsJsBlock from '@site/src/components/TsJsBlock'; + +import CreateCredential from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/public_credentials/01_create_credential.ts'; +import IssueCredential from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/public_credentials/02_issue_credential.ts'; + +As for traditional KILT credentials, public credentials also have their structure defined by a [CType][ctypes-link], although CTypes that can be used to represent information about assets would probably differ from the ones used to represent information about people. + +As mentioned in the section about credentials, the creation of a CType in KILT involves two steps: the definition of a CType and the anchoring of its hash on the KILT blockchain. + +We will not cover the creation of a CType, please refer to the [CType creation](./04_claiming/01_ctype_creation.md) + +## Create and Issue the Credential + +Using the existing CType, the new public credential object can be created with the actual content, and then written to the chain for the rest of the KILT users (and beyond) to consume. + +Creating a public credential is as simple as creating an object that conforms to the required structure of the CType: + + + {CreateCredential} + + +:::note +The creation of the credential object does not require any interaction with the blockchain per se. +This also means that, until the object is written to the blockchain (see below), it cannot be used/retrieved/verified by anyone else, so it is, by all means, not existing. +::: + +Once the credential object is created, it must be written to the blockchain for other people to be able to use it. + + + {IssueCredential} + + +:::info Credential has to be CBOR-encoded! +Given a public credential object, the SDK internally CBOR-encodes it before firing the extrinsic to the blockchain! +This is to save space on credentials that actually benefit from CBOR compression (e.g., if they contain a lot of binary information). +Hence, creating public credentials without the SDK requires the credential to be CBOR-encoded! +::: + +[ctypes-link]: /concepts/credentials/ctypes + +## Retrieve Public Credentials + +import RetrieveCredentialbyId from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/public_credentials/03_retrieve_credential_by_id.ts'; +import RetrieveCredentialsbySubject from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/public_credentials/04_retrieve_credentials_by_subject.ts'; +import VerifyCredential from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/public_credentials/05_verify_credential.ts'; + +Public credentials have their best capability in the fact that they are, indeed, public by design. +This means that once issued, anyone who has access to an archive or full node for the KILT blockchain can retrieve them, making them very decentralized in nature. + +The KILT SDK exposes different ways to fetch public credentials. + +## Retrieve a Credential by its Identifier + +Some use cases might involve the communication of just the ID of one or more public credentials, e.g., to offload the retrieval of the full credential to the receiver, and save some communication bandwidth. + +The KILT SDK accounts for this use case, and makes it very easy to query a public credential given its ID: + + + {RetrieveCredentialbyId} + + +If a credential with the provided ID cannot be found, then the ID is invalid and should be treated as such by the received. + +## Retrieve All Credentials for an Asset + +Other use cases might work differently: given an asset identified by an [AssetDID][asset-did-concept], a user might want to retrieve all the credentials that have been issued to that asset. + +The KILT SDK makes also this use case very easy: + + + {RetrieveCredentialsbySubject} + + +## Verify a Public Credential + +A third class of use cases might involve users exchanging whole public credentials, for instance when showing some sort of proof. + +This case is also supported by the KILT SDK, and relies on an important feature of public credentials: **the identifier (ID) of a public credential is generated from its content and from the KILT DID of its issuer**. +This means that even a minimal change in the content of a public credential object before being shared with other parties, will result in those parties deriving a different identifier from the credential, which will then lead to an error during the verification process. + +Verifying a public credential is shown in the following snippet: + + + {VerifyCredential} + + +What the `verifyCredential` function does internally is the following: + +1. Derive the credential identifier from the provided content and issuer information. +2. Fetch the actual credential from the blockchain, as shown in the [section above](#retrieve-a-credential-by-id), failing if the credential does not exist. +3. [OPTIONAL] Verify that the credential structure matches what the optionally-provided CType defines. +4. Verify that the rest of the fields in the provided credential (i.e., revocation status, identifier, creation block number) match the retrieved credential. + +If all the tests above pass, the credential is considered valid! ✅ + +:::info How are public credentials stored on the blockchain? +Because public credentials need to be public and accessible by everyone, their full content needs to be somehow stored on the blockchain. +Nevertheless, the credential itself is not stored as part of the blockchain database. +Rather, the block number in which the extrinsic is submitted is stored inside the blockchain database, and serves as a "pointer" to the block containing the whole information, that clients (including the SDK) can use. +This represents a very good tradeoff between **security** - because the blockchain itself dictates what the creation block number is for any given public credential - and **storage efficiency** - since the full credential is stored off-chain, accessible via any KILT archive node or indexing service. +::: + +[asset-did-concept]: /concepts/asset-dids + +## Revoke (and remove) Public Credentials + +import RevokeRemoveCredentialById from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/public_credentials/06_revoke_remove_credential_by_id.ts'; +import RevokeCredential from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/public_credentials/07_revoke_remove_credential_by_content.ts'; +import UnrevokeCredential from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/public_credentials/08_unrevoke_credential.ts'; +import ReclaimDeposit from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/public_credentials/09_reclaim_deposit.ts'; + +Depending on the use cases, some credentials, as with any other type of credential, might need to be temporarily or permanently revoked. + +The KILT SDK provides different features depending on the needs of the use case. + +## Revoke and Remove a Credential + + + +As we have seen for public credential retrievalcredential-retrieval, a credential identifier is sufficient to perform most operations on public credentials. +This is true also for revocation and removal. + +Some use cases might need a revoked credential to remain on chain and marked as revoked, while other use cases might combine together revocation and removal, removing a credential whenever it is to be marked as revoked, fulfilling the same goal of marking the credential as invalid. + +In the former case, the deposit taken at the time when the credential is created is not returned, since the credential is still on chain. +In the latter case, all information about the information is cleared, hence the deposit is returned to its original payer. + + + {RevokeRemoveCredentialById} + + +Because a credential identifier can also be calculated starting from the credential itself and the information about its issuer, it is also possible to revoke (and optionally remove) a credential given the credential itself. + + + {RevokeCredential} + + +## Unrevoke a Credential + +For public credentials that have been revoked but not removed from chain, it is possible to un-revoke them, making them valid again. + +For instance, a driving license can be marked as "suspended" for three years, without being completely invalidated. +At the end of the suspension period, it is enabled again by being unrevoked. + +As for revocation, both the credential ID and the whole credential can be used, since the SDK provides the primitives to always obtain the former from the latter, but here we show how the whole credential can be used to generate and submit an un-revocation transaction. + + + {UnrevokeCredential} + + +## Reclaim the Deposit for a Credential + +All the operations mentioned so far, always require the participation of the public credential issuer, who must use their assertion key to sign all operations before they are submitted to the KILT blockchain. + +The only operation that can be submitted directly by someone else, as with other places in the SDK, is the transaction to remove a credential and obtain the initial deposit. + +This is, technically speaking, a different operation compared to the one to remove a credential, albeit the two yield the same result: all traces of the credential are removed from the chain and the deposit is returned to its payer. +The difference between the two is about who is authorized to perform the operation: while credential removal requires a DID signature by the original credential creator (a.k.a. issuer), the deposit claiming operation requires a regular transaction signature by the KILT account that paid the original deposit, with no involvement of the original issuer. + + + {ReclaimDeposit} + \ No newline at end of file diff --git a/sdk/06_upgrading.md b/sdk/06_upgrading.md new file mode 100644 index 000000000..a40199e2e --- /dev/null +++ b/sdk/06_upgrading.md @@ -0,0 +1,4 @@ +--- +id: upgrading-1 +title: Upgrading to 1.0 +--- diff --git a/docs/develop/01_sdk/_category_.json b/sdk/_category_.json similarity index 100% rename from docs/develop/01_sdk/_category_.json rename to sdk/_category_.json diff --git a/sidebars.js b/sidebars.js index 96e4b1ee0..54b33851a 100644 --- a/sidebars.js +++ b/sidebars.js @@ -1,29 +1,11 @@ module.exports = { - concepts: [ - { - type: 'autogenerated', - dirName: 'concepts', - }, - ], - staking: [ - { - type: 'autogenerated', - dirName: 'participate/01_staking', - }, - ], - governance: [ - { - type: 'autogenerated', - dirName: 'participate/02_governance', - }, - ], chain: [ { type: 'autogenerated', dirName: 'develop/02_chain', }, ], - workshop: [{ type: 'autogenerated', dirName: 'develop/03_workshop' }], + workshop: [{ type: 'autogenerated', dirName: 'develop/01_sdk/02_tutorial' }], dApp: [{ type: 'autogenerated', dirName: 'develop/07_dApp' }], opendid: [{ type: 'autogenerated', dirName: 'develop/08_opendid'}], diff --git a/sidebarsConcepts.js b/sidebarsConcepts.js new file mode 100644 index 000000000..eed7746e2 --- /dev/null +++ b/sidebarsConcepts.js @@ -0,0 +1,7 @@ +module.exports = { + concepts: [ + { + type: 'autogenerated', + dirName: '.', + }] +} diff --git a/sidebarsDevelop.js b/sidebarsDevelop.js new file mode 100644 index 000000000..1ddb257ca --- /dev/null +++ b/sidebarsDevelop.js @@ -0,0 +1,7 @@ +module.exports = { + develop: [ + { + type: 'autogenerated', + dirName: '.', + }] +} diff --git a/sidebarsParticipate.js b/sidebarsParticipate.js new file mode 100644 index 000000000..bcca441e3 --- /dev/null +++ b/sidebarsParticipate.js @@ -0,0 +1,7 @@ +module.exports = { + participate: [ + { + type: 'autogenerated', + dirName: '.', + }] +} diff --git a/sidebarsSDK.js b/sidebarsSDK.js new file mode 100644 index 000000000..1ddb257ca --- /dev/null +++ b/sidebarsSDK.js @@ -0,0 +1,7 @@ +module.exports = { + develop: [ + { + type: 'autogenerated', + dirName: '.', + }] +} diff --git a/src/components/SnippetBlock/index.js b/src/components/SnippetBlock/index.js index 66aefae9e..50e7b014a 100644 --- a/src/components/SnippetBlock/index.js +++ b/src/components/SnippetBlock/index.js @@ -9,6 +9,8 @@ const SnippetBlock = ({ dropTail = 0, ...props }) => { + // TODO: Sanity check for a value + funcName = props.func const regex = new RegExp( `${funcName}\\((?:.|\\n|\\r)*?\\)(?::(?:.|\\n|\\r)*?)?\\s*{(?:\\n|\\r)*(?(?:.|\\n|\\r)+)\\}` ) diff --git a/src/components/TsJsSnippet/index.js b/src/components/TsJsSnippet/index.js index 421148457..aa9387057 100644 --- a/src/components/TsJsSnippet/index.js +++ b/src/components/TsJsSnippet/index.js @@ -12,7 +12,7 @@ import SnippetBlock from '../SnippetBlock' const TsJsSnippet = ({ children, fileName, ...props }) => { const tsSnippet = children - +console.log(props) const [prettyJsSnippet, setJsSnippet] = useState('# loading code...') const { siteConfig: { diff --git a/src/theme/NavbarItem/DocsVersionDropdownNavbarItem.js b/src/theme/NavbarItem/DocsVersionDropdownNavbarItem.js new file mode 100644 index 000000000..9b7fcfa82 --- /dev/null +++ b/src/theme/NavbarItem/DocsVersionDropdownNavbarItem.js @@ -0,0 +1,89 @@ +import React from 'react'; +import { + useVersions, + useActiveDocContext, +} from '@docusaurus/plugin-content-docs/client'; +import useRouteContext from '@docusaurus/useRouteContext'; +import {useDocsPreferredVersion} from '@docusaurus/theme-common'; +// TODO: Also failing here +// import {useDocsVersionCandidates} from '@docusaurus/theme-common/internal'; +import {translate} from '@docusaurus/Translate'; +import {useLocation} from '@docusaurus/router'; +import DefaultNavbarItem from '@theme/NavbarItem/DefaultNavbarItem'; +import DropdownNavbarItem from '@theme/NavbarItem/DropdownNavbarItem'; +const getVersionMainDoc = (version) => + version.docs.find((doc) => doc.id === version.mainDocId); +export default function DocsVersionDropdownNavbarItem({ + mobile, + docsPluginId, + dropdownActiveClassDisabled, + dropdownItemsBefore, + dropdownItemsAfter, + ...props +}) { + const {search, hash} = useLocation(); + const activeDocContext = useActiveDocContext(docsPluginId); + const versions = useVersions(docsPluginId); + const {savePreferredVersionName} = useDocsPreferredVersion(docsPluginId); + const versionLinks = versions.map((version) => { + // We try to link to the same doc, in another version + // When not possible, fallback to the "main doc" of the version + const versionDoc = + activeDocContext.alternateDocVersions[version.name] ?? + getVersionMainDoc(version); + return { + label: version.label, + // preserve ?search#hash suffix on version switches + to: `${versionDoc.path}${search}${hash}`, + isActive: () => version === activeDocContext.activeVersion, + onClick: () => savePreferredVersionName(version.name), + }; + }); + const items = [ + ...dropdownItemsBefore, + ...versionLinks, + ...dropdownItemsAfter, + ]; + const {plugin} = useRouteContext(); + // const dropdownVersion = useDocsVersionCandidates(docsPluginId)[0]; + // Mobile dropdown is handled a bit differently + const dropdownLabel = + mobile && items.length > 1 + ? translate({ + id: 'theme.navbar.mobileVersionsDropdown.label', + message: 'Versions', + description: + 'The label for the navbar versions dropdown on mobile view', + }) + : dropdownVersion.label; + const dropdownTo = + mobile && items.length > 1 + ? undefined + : getVersionMainDoc(dropdownVersion).path; + // We don't want to render a version dropdown with 0 or 1 item. If we build + // the site with a single docs version (onlyIncludeVersions: ['1.0.0']), + // We'd rather render a button instead of a dropdown + if (items.length <= 1) { + return ( + false : undefined} + /> + ); + } + if ((plugin.id === "default") && (plugin.name != "docusaurus-plugin-content-pages")) { + return ( + false : undefined} + /> + ); +} +} diff --git a/static/img/concepts/distributed_trust/delegation-hierarchies-dark.svg b/static/img/concepts/distributed_trust/delegation-hierarchies-dark.svg index 1a32d471c..19c317259 100644 --- a/static/img/concepts/distributed_trust/delegation-hierarchies-dark.svg +++ b/static/img/concepts/distributed_trust/delegation-hierarchies-dark.svg @@ -1,4 +1,102 @@ - - -
Attester 3
Attester 3
<root>
Attester 1
<root>...
Attest
Attest
Delegate
Delegate
Attester 5
Attester 5
Attest
Attest
Attester 4
Attester 4
Attest
Attest
Attester 2
Attester 2
Attest
Attest
Delegate
Delegate
Delegate
Delegate
Text is not SVG - cannot display
\ No newline at end of file + + + + + + + + + + + + + + + Issuer 3 + + + + <root>... + + + + Attest + + + + Delegate + + + + Issuer 5 + + + + Attest + + + + Issuer 4 + + + + Attest + + + + + + + + Issuer 2 + + + + Attest + + + + Delegate + + + + Delegate + + + + + \ No newline at end of file diff --git a/static/img/concepts/distributed_trust/delegation-hierarchies.svg b/static/img/concepts/distributed_trust/delegation-hierarchies.svg index dae1dfd34..40a7c1629 100644 --- a/static/img/concepts/distributed_trust/delegation-hierarchies.svg +++ b/static/img/concepts/distributed_trust/delegation-hierarchies.svg @@ -1,4 +1,82 @@ - - -
Attester 3
Attester 3
<root>
Attester 1
<root>...
Attest
Attest
Delegate
Delegate
Attester 5
Attester 5
Attest
Attest
Attester 4
Attester 4
Attest
Attest
Attester 2
Attester 2
Attest
Attest
Delegate
Delegate
Delegate
Delegate
Text is not SVG - cannot display
+ + + + + + + + + + + + + + Issuer 3 + + <root>... + + Attest + + Delegate + + Issuer 5 + + Attest + + Issuer 4 + + Attest + + + + + + Issuer 2 + + Attest + + Delegate + + Delegate + + + + \ No newline at end of file diff --git a/versioned_docs/0.3-sdk_examples/.eslintrc b/versioned_docs/0.3-sdk_examples/.eslintrc new file mode 100644 index 000000000..1862958cd --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/.eslintrc @@ -0,0 +1,30 @@ +{ + "root": true, + "parser": "@typescript-eslint/parser", + "plugins": [ + "@typescript-eslint" + ], + "rules": { + "eol-last": "error", + "max-len": [ + "error", + 140 + ], + "sort-imports": [ + "error", + { + "ignoreCase": false, + "ignoreDeclarationSort": false, + "ignoreMemberSort": false, + "memberSyntaxSortOrder": ["none", "all", "multiple", "single"], + "allowSeparatedGroups": true + } + ] + }, + "extends": [ + "eslint:recommended", + "plugin:@typescript-eslint/eslint-recommended", + "plugin:@typescript-eslint/recommended", + "prettier" + ] +} diff --git a/versioned_docs/0.3-sdk_examples/.prettierrc b/versioned_docs/0.3-sdk_examples/.prettierrc new file mode 100644 index 000000000..3ea21b96b --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/.prettierrc @@ -0,0 +1,6 @@ +{ + "semi": false, + "trailingComma": "none", + "singleQuote": true, + "printWidth": 80 +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/claiming/01_create_ctype.ts b/versioned_docs/0.3-sdk_examples/src/core_features/claiming/01_create_ctype.ts new file mode 100644 index 000000000..f1cad7b53 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/claiming/01_create_ctype.ts @@ -0,0 +1,41 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function createDriversLicenseCType( + creator: Kilt.DidUri, + submitterAccount: Kilt.KiltKeyringPair, + signCallback: Kilt.SignExtrinsicCallback +): Promise { + const api = Kilt.ConfigService.get('api') + + // Create a new CType definition. + const ctype = Kilt.CType.fromProperties(`Drivers License by ${creator}`, { + name: { + type: 'string' + }, + age: { + type: 'integer' + }, + id: { + type: 'string' + } + }) + + // Generate a creation tx. + const encodedCtype = Kilt.CType.toChain(ctype) + const ctypeCreationTx = api.tx.ctype.add(encodedCtype) + // Sign it with the right DID key. + const authorizedCtypeCreationTx = await Kilt.Did.authorizeTx( + creator, + ctypeCreationTx, + signCallback, + submitterAccount.address + ) + // Submit the creation tx to the KILT blockchain + // using the KILT account specified in the creation operation. + await Kilt.Blockchain.signAndSubmitTx( + authorizedCtypeCreationTx, + submitterAccount + ) + + return ctype +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/claiming/02_fetch_ctype.ts b/versioned_docs/0.3-sdk_examples/src/core_features/claiming/02_fetch_ctype.ts new file mode 100644 index 000000000..4839c3103 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/claiming/02_fetch_ctype.ts @@ -0,0 +1,8 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function fetchCType( + ctypeId: Kilt.ICType['$id'] +): Promise { + // Example CType ID: kilt:ctype:0x329a2a5861ea63c250763e5e4c4d4a18fe4470a31e541365c7fb831e5432b940 + return Kilt.CType.fetchFromChain(ctypeId) +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/claiming/03_request_attestation.ts b/versioned_docs/0.3-sdk_examples/src/core_features/claiming/03_request_attestation.ts new file mode 100644 index 000000000..50924a851 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/claiming/03_request_attestation.ts @@ -0,0 +1,20 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export function requestAttestation( + claimer: Kilt.DidDocument, + ctype: Kilt.ICType +): Kilt.ICredential { + // The claimer generates the claim they would like to get attested. + const claim = Kilt.Claim.fromCTypeAndClaimContents( + ctype, + { + name: 'Alice', + age: 29, + id: '123456789987654321' + }, + claimer.uri + ) + + const credential = Kilt.Credential.fromClaim(claim) + return credential +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/claiming/04_create_attestation.ts b/versioned_docs/0.3-sdk_examples/src/core_features/claiming/04_create_attestation.ts new file mode 100644 index 000000000..a44b4d605 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/claiming/04_create_attestation.ts @@ -0,0 +1,32 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function createAttestation( + attester: Kilt.DidUri, + submitterAccount: Kilt.KiltKeyringPair, + signCallback: Kilt.SignExtrinsicCallback, + credential: Kilt.ICredential +): Promise { + const api = Kilt.ConfigService.get('api') + + // Create an attestation object and write its root hash on the chain + // using the provided attester's full DID. + const { cTypeHash, claimHash, delegationId } = + Kilt.Attestation.fromCredentialAndDid(credential, attester) + + // Write the attestation info on the chain. + const attestationTx = api.tx.attestation.add( + claimHash, + cTypeHash, + delegationId + ) + const authorizedAttestationTx = await Kilt.Did.authorizeTx( + attester, + attestationTx, + signCallback, + submitterAccount.address + ) + await Kilt.Blockchain.signAndSubmitTx( + authorizedAttestationTx, + submitterAccount + ) +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/claiming/05_create_presentation.ts b/versioned_docs/0.3-sdk_examples/src/core_features/claiming/05_create_presentation.ts new file mode 100644 index 000000000..2621d37d6 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/claiming/05_create_presentation.ts @@ -0,0 +1,16 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function createPresentation( + credential: Kilt.ICredential, + signCallback: Kilt.SignCallback, + selectedAttributes?: string[], + challenge?: string +): Promise { + // Create a presentation with only the specified fields revealed, if specified. + return Kilt.Credential.createPresentation({ + credential, + signCallback, + selectedAttributes, + challenge + }) +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/claiming/06_verify_presentation.ts b/versioned_docs/0.3-sdk_examples/src/core_features/claiming/06_verify_presentation.ts new file mode 100644 index 000000000..2c2662bbf --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/claiming/06_verify_presentation.ts @@ -0,0 +1,25 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function verifyPresentation( + presentation: Kilt.ICredentialPresentation, + { + challenge, + trustedAttesterUris = [] + }: { + challenge?: string + trustedAttesterUris?: Kilt.DidUri[] + } = {} +): Promise { + // Verify the presentation with the provided challenge. + const { revoked, attester } = await Kilt.Credential.verifyPresentation( + presentation, + { challenge } + ) + + if (revoked) { + throw new Error("Credential has been revoked and hence it's not valid.") + } + if (!trustedAttesterUris.includes(attester)) { + throw `Credential was issued by ${attester} which is not in the provided list of trusted attesters: ${trustedAttesterUris}.` + } +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/claiming/07_revoke_credential.ts b/versioned_docs/0.3-sdk_examples/src/core_features/claiming/07_revoke_credential.ts new file mode 100644 index 000000000..ee66732eb --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/claiming/07_revoke_credential.ts @@ -0,0 +1,29 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function revokeCredential( + attester: Kilt.DidUri, + submitterAccount: Kilt.KiltKeyringPair, + signCallback: Kilt.SignExtrinsicCallback, + credential: Kilt.ICredential, + shouldRemove = false +): Promise { + const api = Kilt.ConfigService.get('api') + + const tx = shouldRemove + ? // If the attestation is to be removed, create a `remove` tx, + // which revokes and removes the attestation in one go. + api.tx.attestation.remove(credential.rootHash, null) + : // Otherwise, simply revoke the attestation but leave it on chain. + // Hence, the storage is not cleared and the deposit not returned. + api.tx.attestation.revoke(credential.rootHash, null) + + const authorizedTx = await Kilt.Did.authorizeTx( + attester, + tx, + signCallback, + submitterAccount.address + ) + + // Submit the right tx to the KILT blockchain. + await Kilt.Blockchain.signAndSubmitTx(authorizedTx, submitterAccount) +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/claiming/08_reclaim_attestation_deposit.ts b/versioned_docs/0.3-sdk_examples/src/core_features/claiming/08_reclaim_attestation_deposit.ts new file mode 100644 index 000000000..7c808c9a8 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/claiming/08_reclaim_attestation_deposit.ts @@ -0,0 +1,16 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function reclaimAttestationDeposit( + submitterAddress: Kilt.KiltKeyringPair, + credential: Kilt.ICredential +): Promise { + const api = Kilt.ConfigService.get('api') + + // Generate the tx to claim the deposit back. + const depositReclaimTx = api.tx.attestation.reclaimDeposit( + credential.rootHash + ) + + // Submit the revocation tx to the KILT blockchain. + await Kilt.Blockchain.signAndSubmitTx(depositReclaimTx, submitterAddress) +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/claiming/index.ts b/versioned_docs/0.3-sdk_examples/src/core_features/claiming/index.ts new file mode 100644 index 000000000..344ba51ec --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/claiming/index.ts @@ -0,0 +1,104 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +import { createCompleteFullDid } from '../did/05_full_did_complete' +import { createSimpleLightDid } from '../did/01_light_did_simple' + +import { createAttestation } from './04_create_attestation' +import { createDriversLicenseCType } from './01_create_ctype' +import { createPresentation } from './05_create_presentation' +import { fetchCType } from './02_fetch_ctype' +import { reclaimAttestationDeposit } from './08_reclaim_attestation_deposit' +import { requestAttestation } from './03_request_attestation' +import { revokeCredential } from './07_revoke_credential' +import { verifyPresentation } from './06_verify_presentation' + +import { generateKeypairs } from '../utils/generateKeypairs' + +export async function runAll( + submitterAccount: Kilt.KiltKeyringPair +): Promise { + console.log('Running claiming flow...') + const claimerAuthKey = generateKeypairs().authentication + const claimerLightDid = createSimpleLightDid({ + authentication: claimerAuthKey as Kilt.NewLightDidVerificationKey + }) + + const attersterKeys = generateKeypairs() + const attesterFullDid = await createCompleteFullDid( + submitterAccount, + attersterKeys, + async ({ data }) => ({ + signature: attersterKeys.authentication.sign(data), + keyType: attersterKeys.authentication.type + }) + ) + + console.log('1 claming) Create CType') + const ctype = await createDriversLicenseCType( + attesterFullDid.uri, + submitterAccount, + async ({ data }) => ({ + signature: attersterKeys.assertionMethod.sign(data), + keyType: attersterKeys.assertionMethod.type + }) + ) + console.log('2 claiming) Fetch CType') + const ctypeDetails = await fetchCType(ctype.$id) + if (!ctypeDetails) { + throw new Error( + 'Could not retrieve CType details of a CType that was just created.' + ) + } + console.log('Retrieved CType details: ', ctypeDetails) + console.log('3 claiming) Create credential') + const credential = requestAttestation(claimerLightDid, ctype) + console.log('4 claiming) Create attestation and credential') + await createAttestation( + attesterFullDid.uri, + submitterAccount, + async ({ data }) => ({ + signature: attersterKeys.assertionMethod.sign(data), + keyType: attersterKeys.assertionMethod.type + }), + credential + ) + console.log('5 claiming) Create selective disclosure presentation') + const presentation = await createPresentation( + credential, + async ({ data }) => ({ + signature: claimerAuthKey.sign(data), + keyType: claimerAuthKey.type, + keyUri: `${claimerLightDid.uri}${claimerLightDid.authentication[0].id}` + }), + ['name', 'id'] + ) + console.log('6 claiming) Verify selective disclosure presentation') + await verifyPresentation(presentation, { + trustedAttesterUris: [attesterFullDid.uri] + }) + console.log('7.1 claiming) Revoke credential') + await revokeCredential( + attesterFullDid.uri, + submitterAccount, + async ({ data }) => ({ + signature: attersterKeys.assertionMethod.sign(data), + keyType: attersterKeys.assertionMethod.type + }), + credential, + false + ) + console.log( + '7.2 claiming) Presentation should fail to verify after revocation' + ) + try { + await verifyPresentation(presentation, { + trustedAttesterUris: [attesterFullDid.uri] + }) + throw new Error('Error: verification should fail after revocation') + // eslint-disable-next-line no-empty + } catch {} + console.log('8 claiming) Reclaim attestation deposit') + await reclaimAttestationDeposit(submitterAccount, credential) + + console.log('Claiming flow completed!') +} diff --git a/code_examples/sdk_examples/src/workshop/attester/generateKeypairs.ts b/versioned_docs/0.3-sdk_examples/src/core_features/did/00_generate_did_keys.ts similarity index 100% rename from code_examples/sdk_examples/src/workshop/attester/generateKeypairs.ts rename to versioned_docs/0.3-sdk_examples/src/core_features/did/00_generate_did_keys.ts diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/did/01_light_did_simple.ts b/versioned_docs/0.3-sdk_examples/src/core_features/did/01_light_did_simple.ts new file mode 100644 index 000000000..280c08439 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/did/01_light_did_simple.ts @@ -0,0 +1,15 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export function createSimpleLightDid({ + authentication +}: { + authentication: Kilt.NewLightDidVerificationKey +}): Kilt.DidDocument { + // Create a light DID from the generated authentication key. + const lightDID = Kilt.Did.createLightDidDocument({ + authentication: [authentication] + }) + console.log(lightDID.uri) + + return lightDID +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/did/02_light_did_complete.ts b/versioned_docs/0.3-sdk_examples/src/core_features/did/02_light_did_complete.ts new file mode 100644 index 000000000..978cfe079 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/did/02_light_did_complete.ts @@ -0,0 +1,28 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export function createCompleteLightDid({ + authentication, + keyAgreement +}: { + authentication: Kilt.NewLightDidVerificationKey + keyAgreement: Kilt.NewDidEncryptionKey +}): Kilt.DidDocument { + // Example service for the DID. + const service: Kilt.DidServiceEndpoint[] = [ + { + id: '#my-service', + type: ['KiltPublishedCredentialCollectionV1'], + serviceEndpoint: ['http://example.domain.org'] + } + ] + + // Create the KILT light DID with the information generated. + const lightDID = Kilt.Did.createLightDidDocument({ + authentication: [authentication], + keyAgreement: [keyAgreement], + service + }) + console.log(lightDID.uri) + + return lightDID +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/did/03_light_did_migrate.ts b/versioned_docs/0.3-sdk_examples/src/core_features/did/03_light_did_migrate.ts new file mode 100644 index 000000000..4700128bc --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/did/03_light_did_migrate.ts @@ -0,0 +1,26 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function migrateLightDid( + lightDid: Kilt.DidDocument, + submitterAccount: Kilt.KiltKeyringPair, + signCallback: Kilt.SignExtrinsicCallback +): Promise { + const api = Kilt.ConfigService.get('api') + + // Generate the DID migration tx. + const migrationTx = await Kilt.Did.getStoreTx( + lightDid, + submitterAccount.address, + signCallback + ) + + // The tx can then be submitted by the authorized account as usual. + await Kilt.Blockchain.signAndSubmitTx(migrationTx, submitterAccount) + + // The new information is fetched from the blockchain and returned. + const migratedFullDidUri = Kilt.Did.getFullDidUri(lightDid.uri) + const encodedUpdatedDidDetails = await api.call.did.query( + Kilt.Did.toChain(migratedFullDidUri) + ) + return Kilt.Did.linkedInfoFromChain(encodedUpdatedDidDetails).document +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/did/04_full_did_simple.ts b/versioned_docs/0.3-sdk_examples/src/core_features/did/04_full_did_simple.ts new file mode 100644 index 000000000..ebff33220 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/did/04_full_did_simple.ts @@ -0,0 +1,33 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function createSimpleFullDid( + submitterAccount: Kilt.KiltKeyringPair, + { + authentication + }: { + authentication: Kilt.NewDidVerificationKey + }, + signCallback: Kilt.Did.GetStoreTxSignCallback +): Promise { + const api = Kilt.ConfigService.get('api') + + // Generate the DID-signed creation tx and submit it to the blockchain with the specified account. + // The submitter account parameter, ensures that only an entity authorized by the DID subject + // can submit the tx to the KILT blockchain. + const fullDidCreationTx = await Kilt.Did.getStoreTx( + { + authentication: [authentication] + }, + submitterAccount.address, + signCallback + ) + + await Kilt.Blockchain.signAndSubmitTx(fullDidCreationTx, submitterAccount) + + // The new information is fetched from the blockchain and returned. + const fullDid = Kilt.Did.getFullDidUriFromKey(authentication) + const encodedUpdatedDidDetails = await api.call.did.query( + Kilt.Did.toChain(fullDid) + ) + return Kilt.Did.linkedInfoFromChain(encodedUpdatedDidDetails).document +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/did/05_full_did_complete.ts b/versioned_docs/0.3-sdk_examples/src/core_features/did/05_full_did_complete.ts new file mode 100644 index 000000000..fb2edebce --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/did/05_full_did_complete.ts @@ -0,0 +1,47 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function createCompleteFullDid( + submitterAccount: Kilt.KiltKeyringPair, + { + authentication, + keyAgreement, + assertionMethod, + capabilityDelegation + }: { + authentication: Kilt.NewDidVerificationKey + keyAgreement: Kilt.NewDidEncryptionKey + assertionMethod: Kilt.NewDidVerificationKey + capabilityDelegation: Kilt.NewDidVerificationKey + }, + signCallback: Kilt.SignExtrinsicCallback +): Promise { + const api = Kilt.ConfigService.get('api') + + const fullDidCreationTx = await Kilt.Did.getStoreTx( + { + authentication: [authentication], + keyAgreement: [keyAgreement], + assertionMethod: [assertionMethod], + capabilityDelegation: [capabilityDelegation], + // Example service. + service: [ + { + id: '#my-service', + type: ['service-type'], + serviceEndpoint: ['https://www.example.com'] + } + ] + }, + submitterAccount.address, + signCallback + ) + + await Kilt.Blockchain.signAndSubmitTx(fullDidCreationTx, submitterAccount) + + // The new information is fetched from the blockchain and returned. + const fullDid = Kilt.Did.getFullDidUriFromKey(authentication) + const encodedUpdatedDidDetails = await api.call.did.query( + Kilt.Did.toChain(fullDid) + ) + return Kilt.Did.linkedInfoFromChain(encodedUpdatedDidDetails).document +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/did/06_did_query.ts b/versioned_docs/0.3-sdk_examples/src/core_features/did/06_did_query.ts new file mode 100644 index 000000000..0393afa3f --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/did/06_did_query.ts @@ -0,0 +1,16 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function queryFullDid( + didUri: Kilt.DidUri +): Promise { + const { metadata, document } = await Kilt.Did.resolve(didUri) + if (metadata.deactivated) { + console.log(`DID ${didUri} has been deleted.`) + return null + } else if (document === undefined) { + console.log(`DID ${didUri} does not exist.`) + return null + } else { + return document + } +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/did/07_full_did_update.ts b/versioned_docs/0.3-sdk_examples/src/core_features/did/07_full_did_update.ts new file mode 100644 index 000000000..41ef49399 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/did/07_full_did_update.ts @@ -0,0 +1,46 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function updateFullDid( + newAuthKeypair: Kilt.KiltKeyringPair, + fullDid: Kilt.DidUri, + submitterAccount: Kilt.KiltKeyringPair, + signCallback: Kilt.SignExtrinsicCallback +): Promise { + const api = Kilt.ConfigService.get('api') + + // Create the tx to update the authentication key. + const didKeyUpdateTx = api.tx.did.setAuthenticationKey( + Kilt.Did.publicKeyToChain(newAuthKeypair) + ) + // Create the tx to remove the service with ID `#my-service`. + const didServiceRemoveTx = api.tx.did.removeServiceEndpoint( + Kilt.Did.resourceIdToChain('#my-service') + ) + + // Create the tx to add a new service with ID `#my-new-service`. + const newServiceEndpointTx = api.tx.did.addServiceEndpoint({ + id: Kilt.Did.resourceIdToChain('#my-new-service'), + serviceTypes: [Kilt.KiltPublishedCredentialCollectionV1Type], + urls: ['https://www.new-example.com'] + }) + + // Create and sign the DID operation that contains the two (unsigned) txs. + // This results in a DID-signed tx that can be then signed and submitted to the KILT blockchain by the account + // authorized in this operation, Alice in this case. + const authorizedBatchedTxs = await Kilt.Did.authorizeBatch({ + batchFunction: api.tx.utility.batchAll, + did: fullDid, + extrinsics: [didKeyUpdateTx, didServiceRemoveTx, newServiceEndpointTx], + sign: signCallback, + submitter: submitterAccount.address + }) + + // Submit the DID update tx to the KILT blockchain after signing it with the authorized KILT account. + await Kilt.Blockchain.signAndSubmitTx(authorizedBatchedTxs, submitterAccount) + + // Get the updated DID Document. + const encodedUpdatedDidDetails = await api.call.did.query( + Kilt.Did.toChain(fullDid) + ) + return Kilt.Did.linkedInfoFromChain(encodedUpdatedDidDetails).document +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/did/08_full_did_batch.ts b/versioned_docs/0.3-sdk_examples/src/core_features/did/08_full_did_batch.ts new file mode 100644 index 000000000..291bb1ed4 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/did/08_full_did_batch.ts @@ -0,0 +1,27 @@ +import * as Kilt from '@kiltprotocol/sdk-js' +// Just a helper to get an extrinsic +import getExtrinsic from '../utils/getExtrinsic' + +export async function signAndSubmitDidExtrinsicBatch( + submitterAccount: Kilt.KiltKeyringPair, + fullDid: Kilt.DidUri, + signCallback: Kilt.SignExtrinsicCallback +): Promise { + const api = Kilt.ConfigService.get('api') + + // Build two extrinsics + const extrinsic1 = getExtrinsic() + const extrinsic2 = getExtrinsic() + + // Create the DID-signed batch. + const authorizedBatch = await Kilt.Did.authorizeBatch({ + batchFunction: api.tx.utility.batchAll, + did: fullDid, + extrinsics: [extrinsic1, extrinsic2], + sign: signCallback, + submitter: submitterAccount.address + }) + + // Wrap the DID extrinsic in an account extrinsic. + await Kilt.Blockchain.signAndSubmitTx(authorizedBatch, submitterAccount) +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/did/09_full_did_tx.ts b/versioned_docs/0.3-sdk_examples/src/core_features/did/09_full_did_tx.ts new file mode 100644 index 000000000..f88f032e3 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/did/09_full_did_tx.ts @@ -0,0 +1,23 @@ +import * as Kilt from '@kiltprotocol/sdk-js' +// Just a helper to get an extrinsic +import getExtrinsic from '../utils/getExtrinsic' + +export async function signAndSubmitDidExtrinsic( + submitterAccount: Kilt.KiltKeyringPair, + fullDid: Kilt.DidUri, + signCallback: Kilt.SignExtrinsicCallback +): Promise { + const extrinsic = getExtrinsic() + + // This results in a DID-signed tx that can be signed and submitted to + // the KILT blockchain by the account authorized in this operation (the `submitterAccount`). + const didSignedExtrinsic = await Kilt.Did.authorizeTx( + fullDid, + extrinsic, + signCallback, + submitterAccount.address + ) + + // Wrap the DID extrinsic in an account extrinsic. + await Kilt.Blockchain.signAndSubmitTx(didSignedExtrinsic, submitterAccount) +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/did/10_did_signature.ts b/versioned_docs/0.3-sdk_examples/src/core_features/did/10_did_signature.ts new file mode 100644 index 000000000..480687f5f --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/did/10_did_signature.ts @@ -0,0 +1,38 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +type KeyLookup = (parameter: { + didUri: Kilt.DidUri + keyRelationship: Kilt.VerificationKeyRelationship +}) => Promise<{ + key: Kilt.KiltKeyringPair + keyType: Kilt.VerificationKeyType + keyUri: Kilt.DidResourceUri +}> + +export async function generateAndVerifyDidAuthenticationSignature( + did: Kilt.DidDocument, + payload: Uint8Array, + keyLookup: KeyLookup +): Promise { + // How the key is looked up depends on where the key is stored (e.g. memory, hardware wallet, browser extension) + const { key, keyUri } = await keyLookup({ + didUri: did.uri, + keyRelationship: 'authentication' + }) + + // Generate a signature using the key that we just looked up. + const signature = key.sign(payload) + + // Print the generated signature object. + console.log('Generated signature:') + console.log(Kilt.Utils.Crypto.u8aToHex(signature)) + + // Verify the validity of the signature using the DID's authentication public key. + // It throws if the signature cannot be verified. + await Kilt.Did.verifyDidSignature({ + message: payload, + signature, + keyUri, + expectedVerificationMethod: 'authentication' + }) +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/did/11_full_did_delete.ts b/versioned_docs/0.3-sdk_examples/src/core_features/did/11_full_did_delete.ts new file mode 100644 index 000000000..30adef4ed --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/did/11_full_did_delete.ts @@ -0,0 +1,31 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function deleteFullDid( + submitterAccount: Kilt.KiltKeyringPair, + fullDid: Kilt.DidUri, + signCallback: Kilt.SignExtrinsicCallback +): Promise { + const api = Kilt.ConfigService.get('api') + + // Create a DID deletion tx. We specify the number of endpoints currently stored under the DID because + // of the upper computation limit required by the blockchain runtime. + const didIdentifier = Kilt.Did.toChain(fullDid) + const endpointsCountForDid = + await api.query.did.didEndpointsCount(didIdentifier) + const didDeletionExtrinsic = api.tx.did.delete(endpointsCountForDid) + + // Sign the DID deletion tx using the DID authentication key. + // This results in a DID-signed tx that can be then signed and submitted to the KILT blockchain by the account + // authorized in this operation, Alice in this case. + const didSignedDeletionExtrinsic = await Kilt.Did.authorizeTx( + fullDid, + didDeletionExtrinsic, + signCallback, + submitterAccount.address + ) + + await Kilt.Blockchain.signAndSubmitTx( + didSignedDeletionExtrinsic, + submitterAccount + ) +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/did/12_did_export.ts b/versioned_docs/0.3-sdk_examples/src/core_features/did/12_did_export.ts new file mode 100644 index 000000000..6ed26c5e5 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/did/12_did_export.ts @@ -0,0 +1,28 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function exportDid( + did: Kilt.DidDocument, + exportType: 'application/json' | 'application/ld+json' +) { + const conformingDidDocument = Kilt.Did.exportToDidDocument(did, exportType) + + // Will print the DID URI. + console.log(conformingDidDocument.id) + + // Will print all the public keys associated with the DID. + console.log(conformingDidDocument.verificationMethod) + + // Will print all the assertion keys IDs. + console.log(conformingDidDocument.assertionMethod) + + // Will print all the encryption keys IDs. + console.log(conformingDidDocument.keyAgreement) + + // Will print all the delegation keys IDs. + console.log(conformingDidDocument.capabilityDelegation) + + // Will print all the external services referenced inside the `DidDocument` instance. + console.log(conformingDidDocument.service) + + return conformingDidDocument +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/did/13_full_did_deposit_reclaim.ts b/versioned_docs/0.3-sdk_examples/src/core_features/did/13_full_did_deposit_reclaim.ts new file mode 100644 index 000000000..b9b481b35 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/did/13_full_did_deposit_reclaim.ts @@ -0,0 +1,21 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function reclaimFullDidDeposit( + submitterAddress: Kilt.KiltKeyringPair, + fullDid: Kilt.DidUri +): Promise { + const api = Kilt.ConfigService.get('api') + + // Generate the tx to claim the deposit back. + // It includes the DID identifier for which the deposit needs to be returned + // and the count of services to provide an upper bound to the computation of the tx execution. + const identifier = Kilt.Did.toChain(fullDid) + const endpointsCountForDid = await api.query.did.didEndpointsCount(identifier) + const depositClaimExtrinsic = api.tx.did.reclaimDeposit( + identifier, + endpointsCountForDid + ) + + // The submission will fail if `submitterAddress` is not the owner of the deposit associated with the given DID identifier. + await Kilt.Blockchain.signAndSubmitTx(depositClaimExtrinsic, submitterAddress) +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/did/index.ts b/versioned_docs/0.3-sdk_examples/src/core_features/did/index.ts new file mode 100644 index 000000000..3ab486625 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/did/index.ts @@ -0,0 +1,141 @@ +import { stringToU8a } from '@polkadot/util' + +import * as Kilt from '@kiltprotocol/sdk-js' + +import { createCompleteFullDid } from './05_full_did_complete' +import { createCompleteLightDid } from './02_light_did_complete' +import { createSimpleFullDid } from './04_full_did_simple' +import { createSimpleLightDid } from './01_light_did_simple' +import { deleteFullDid } from './11_full_did_delete' +import { exportDid } from './12_did_export' +import { generateAndVerifyDidAuthenticationSignature } from './10_did_signature' +import { migrateLightDid } from './03_light_did_migrate' +import { queryFullDid } from './06_did_query' +import { reclaimFullDidDeposit } from './13_full_did_deposit_reclaim' +import { signAndSubmitDidExtrinsic } from './09_full_did_tx' +import { signAndSubmitDidExtrinsicBatch } from './08_full_did_batch' +import { updateFullDid } from './07_full_did_update' + +import { generateKeypairs } from '../utils/generateKeypairs' + +export async function runAll( + submitterAccount: Kilt.KiltKeyringPair +): Promise { + console.log('Running DID flow...') + + console.log('1 did) Create simple light DID') + const { authentication: simpleLightDidAuth } = generateKeypairs() + const simpleLightDid = createSimpleLightDid({ + authentication: simpleLightDidAuth as Kilt.NewLightDidVerificationKey + }) + console.log('2 did) Create complete light DID') + const { + authentication: completeLightDidAuth, + keyAgreement: completeLightDidEnc + } = generateKeypairs() + createCompleteLightDid({ + authentication: completeLightDidAuth as Kilt.NewLightDidVerificationKey, + keyAgreement: completeLightDidEnc + }) + console.log('3 did) Migrate first light DID to full DID') + await migrateLightDid(simpleLightDid, submitterAccount, async ({ data }) => ({ + signature: simpleLightDidAuth.sign(data), + keyType: simpleLightDidAuth.type + })) + console.log('4 did) Create simple full DID') + const { authentication: simpleFullDidAuth } = generateKeypairs() + const createdSimpleFullDid = await createSimpleFullDid( + submitterAccount, + { + authentication: simpleFullDidAuth + }, + async ({ data }) => ({ + signature: simpleFullDidAuth.sign(data), + keyType: simpleFullDidAuth.type + }) + ) + console.log('5 did) Create complete full DID') + const { + authentication: completeFullDidAuth, + keyAgreement: completeFullDidEnc, + assertionMethod: completeFullDidAtt, + capabilityDelegation: completeFullDidDel + } = generateKeypairs() + const createdCompleteFullDid = await createCompleteFullDid( + submitterAccount, + { + authentication: completeFullDidAuth, + keyAgreement: completeFullDidEnc, + assertionMethod: completeFullDidAtt, + capabilityDelegation: completeFullDidDel + }, + async ({ data }) => ({ + signature: completeFullDidAuth.sign(data), + keyType: completeFullDidAuth.type + }) + ) + console.log('6 did) Query full DID') + queryFullDid(createdCompleteFullDid.uri) + + console.log('7 did) Update full DID created at step 5') + const { authentication: newCompleteFullDidAuth } = generateKeypairs() + const updatedFullDid = await updateFullDid( + newCompleteFullDidAuth, + createdCompleteFullDid.uri, + submitterAccount, + async ({ data }) => ({ + signature: completeFullDidAuth.sign(data), + keyType: completeFullDidAuth.type + }) + ) + console.log( + '8.1 did) Use the same full DID created at step 5 to sign the batch' + ) + await signAndSubmitDidExtrinsicBatch( + submitterAccount, + updatedFullDid.uri, + async ({ data }) => ({ + signature: completeFullDidAtt.sign(data), + keyType: completeFullDidAtt.type + }) + ) + + console.log( + '8.2 did) Use the same full DID created at step 5 to sign the single tx' + ) + await signAndSubmitDidExtrinsic( + submitterAccount, + updatedFullDid.uri, + async ({ data }) => ({ + signature: completeFullDidAtt.sign(data), + keyType: completeFullDidAtt.type + }) + ) + + console.log( + '9 did) Use the same full DID created at step 5 to generate the signature' + ) + await generateAndVerifyDidAuthenticationSignature( + updatedFullDid, + stringToU8a('test-payload'), + async () => ({ + key: newCompleteFullDidAuth, + keyType: newCompleteFullDidAuth.type, + keyUri: `${updatedFullDid.uri}${updatedFullDid.authentication[0].id}` + }) + ) + console.log('10 did) Delete full DID created at step 4') + await deleteFullDid( + submitterAccount, + createdSimpleFullDid.uri, + async ({ data }) => ({ + signature: simpleFullDidAuth.sign(data), + keyType: simpleFullDidAuth.type + }) + ) + console.log('11 did) Export DID created at step 5') + await exportDid(createdCompleteFullDid, 'application/ld+json') + console.log('12 did) Delete full DID created at step 5') + await reclaimFullDidDeposit(submitterAccount, createdCompleteFullDid.uri) + console.log('DID flow completed!') +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/getting_started/01_print_hello_world.ts b/versioned_docs/0.3-sdk_examples/src/core_features/getting_started/01_print_hello_world.ts new file mode 100644 index 000000000..2108c6153 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/getting_started/01_print_hello_world.ts @@ -0,0 +1,3 @@ +export async function main() { + console.log('Hello, world!') +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/getting_started/02_connect_pere.ts b/versioned_docs/0.3-sdk_examples/src/core_features/getting_started/02_connect_pere.ts new file mode 100644 index 000000000..ad266b54f --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/getting_started/02_connect_pere.ts @@ -0,0 +1,10 @@ +/* eslint-disable prefer-const */ +import type { ApiPromise } from '@polkadot/api' + +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function main(): Promise { + let api = await Kilt.connect('wss://peregrine.kilt.io/') + + return api +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/getting_started/02_connect_spirit.ts b/versioned_docs/0.3-sdk_examples/src/core_features/getting_started/02_connect_spirit.ts new file mode 100644 index 000000000..b78c70a2e --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/getting_started/02_connect_spirit.ts @@ -0,0 +1,10 @@ +/* eslint-disable prefer-const */ +import type { ApiPromise } from '@polkadot/api' + +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function main(): Promise { + let api = await Kilt.connect('wss://spiritnet.kilt.io/') + + return api +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/getting_started/03_fetch_did.ts b/versioned_docs/0.3-sdk_examples/src/core_features/getting_started/03_fetch_did.ts new file mode 100644 index 000000000..5741b09fd --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/getting_started/03_fetch_did.ts @@ -0,0 +1,16 @@ +/* eslint-disable prefer-const */ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function main(): Promise { + let apiConfig = Kilt.ConfigService.get('api') + const encodedKiltnerd123Details = + await apiConfig.call.did.queryByWeb3Name('kiltnerd123') + + // This function will throw if kiltnerd123 does not exist + const { + document: { uri } + } = Kilt.Did.linkedInfoFromChain(encodedKiltnerd123Details) + console.log(`My name is kiltnerd123 and this is my DID: "${uri}"`) + + return uri +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/getting_started/04_fetch_endpoints.ts b/versioned_docs/0.3-sdk_examples/src/core_features/getting_started/04_fetch_endpoints.ts new file mode 100644 index 000000000..2d655defa --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/getting_started/04_fetch_endpoints.ts @@ -0,0 +1,20 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function main( + uri: Kilt.DidUri +): Promise { + const kiltnerd123DidDocument = await Kilt.Did.resolve(uri) + console.log(`kiltnerd123's DID Document:`) + console.log(JSON.stringify(kiltnerd123DidDocument, null, 2)) + + const endpoints = kiltnerd123DidDocument?.document?.service + if (!endpoints) { + console.log('No endpoints for the DID.') + return [] + } + + console.log('Endpoints:') + console.log(JSON.stringify(endpoints, null, 2)) + + return endpoints +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/getting_started/05_fetch_endpoint_data.ts b/versioned_docs/0.3-sdk_examples/src/core_features/getting_started/05_fetch_endpoint_data.ts new file mode 100644 index 000000000..9a23cbe37 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/getting_started/05_fetch_endpoint_data.ts @@ -0,0 +1,15 @@ +import axios from 'axios' + +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function main( + endpoints: Kilt.DidServiceEndpoint[] +): Promise { + const { + data: [{ credential }] + } = await axios.get( + endpoints[0].serviceEndpoint[0] + ) + console.log(`Credentials: ${JSON.stringify(credential, null, 2)}`) + return credential +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/getting_started/06_verify_credential.ts b/versioned_docs/0.3-sdk_examples/src/core_features/getting_started/06_verify_credential.ts new file mode 100644 index 000000000..096625c33 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/getting_started/06_verify_credential.ts @@ -0,0 +1,18 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function main(credential: Kilt.ICredential): Promise { + try { + const { attester, revoked } = + await Kilt.Credential.verifyCredential(credential) + + // Verify that the credential is not revoked. Exception caught by the catch {} block below. + if (revoked) { + throw new Error('The credential has been revoked, hence it is not valid.') + } + console.log( + `kiltnerd123's credential is valid and has been attested by ${attester}!` + ) + } catch { + console.log("kiltnerd123's credential is not valid.") + } +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/getting_started/07_disconnect.ts b/versioned_docs/0.3-sdk_examples/src/core_features/getting_started/07_disconnect.ts new file mode 100644 index 000000000..1fdebc2be --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/getting_started/07_disconnect.ts @@ -0,0 +1,5 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function main(): Promise { + await Kilt.disconnect() +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/getting_started/index.ts b/versioned_docs/0.3-sdk_examples/src/core_features/getting_started/index.ts new file mode 100644 index 000000000..f306b6d59 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/getting_started/index.ts @@ -0,0 +1,41 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +import { main as connectToPeregrine } from './02_connect_pere' +import { main as disconnect } from './07_disconnect' +import { main as fetchEndpointData } from './05_fetch_endpoint_data' +import { main as fetchkiltnerd123Did } from './03_fetch_did' +import { main as fetchkiltnerd123Endpoints } from './04_fetch_endpoints' +import { main as printHelloWorld } from './01_print_hello_world' +import { main as verifyCredential } from './06_verify_credential' + +async function fetchDidAndCredential() { + const kiltnerd123Did = await fetchkiltnerd123Did() + if (!kiltnerd123Did) + throw new Error('"kiltnerd123" is not associated to any DID on Spiritnet') + const endpoints = await fetchkiltnerd123Endpoints(kiltnerd123Did) + if (!endpoints || !endpoints.length) + throw new Error(`DID doesn't include services`) + + let credential: Kilt.ICredential + try { + // FIXME: Occasionally there is a timeout error, because the endpoint uses the official ipfs gateway. + // Fix it by using a reliable endpoint. + // For now simply disconnect and return (i.e., ignore this error). + credential = await fetchEndpointData(endpoints) + } catch (error) { + console.error('Error while fetching IPFS', error) + return + } + await verifyCredential(credential) +} + +export async function runAll(): Promise { + await printHelloWorld() + + await connectToPeregrine() + try { + await fetchDidAndCredential() + } finally { + await disconnect() + } +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/index.ts b/versioned_docs/0.3-sdk_examples/src/core_features/index.ts new file mode 100644 index 000000000..81f1ed958 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/index.ts @@ -0,0 +1,134 @@ +import { BN } from '@polkadot/util' +import { randomAsU8a } from '@polkadot/util-crypto' + +import * as Kilt from '@kiltprotocol/sdk-js' + +import { endowAccounts } from '../getFunds' +import { runAll as runAllClaiming } from './claiming' +import { runAll as runAllDid } from './did' +import { runAll as runAllGettingStarted } from './getting_started' +import { runAll as runAllLinking } from './linking' +import { runAll as runAllMessaging } from './messaging' +import { runAll as runAllPublicCredentials } from './public_credentials' +import { runAll as runAllSignCallback } from './signCallback' +import { runAll as runAllWeb3 } from './web3names' + +const resolveOn: Kilt.SubscriptionPromise.ResultEvaluator = + Kilt.Blockchain.IS_IN_BLOCK + +export async function testCoreFeatures( + account: Kilt.KeyringPair, + wssAddress: string +): Promise { + // Connects to (and at the end disconnects from) Spiritnet, so it must be called before we connect to Peregrine for the rest of the tests. + const gettingStartedFlow = async () => { + console.log('Running getting started flow...') + await runAllGettingStarted() + console.log('Getting started flow completed!') + } + await gettingStartedFlow() + + Kilt.ConfigService.set({ submitTxResolveOn: resolveOn }) + await Kilt.connect(wssAddress) + + const keyring = new Kilt.Utils.Keyring({ + ss58Format: Kilt.Utils.ss58Format + }) + + const [ + claimingTestAccount, + didTestAccount, + web3TestAccount, + accountLinkingTestAccount, + publicCredentialsTestAccount, + messagingAccount + ] = Array(6) + .fill(0) + .map( + () => + keyring.addFromSeed( + randomAsU8a(32), + undefined, + 'ed25519' + ) as Kilt.KiltKeyringPair & { type: 'ed25519' } + ) + + // Endow all the needed accounts in one batch transfer, to avoid tx collisions. + await endowAccounts( + account, + [ + claimingTestAccount.address, + didTestAccount.address, + web3TestAccount.address, + accountLinkingTestAccount.address, + publicCredentialsTestAccount.address, + messagingAccount.address + ], + new BN(10) + ) + + // These should not conflict anymore since all accounts are different. + await Promise.all([ + (async () => { + try { + await runAllClaiming(claimingTestAccount) + } catch (e) { + console.error('Claiming flow failed') + throw e + } + })(), + (async () => { + try { + await runAllDid(didTestAccount) + } catch (e) { + console.error('DID flow failed') + throw e + } + })(), + (async () => { + try { + await runAllWeb3(web3TestAccount) + } catch (e) { + console.error('Web3name flow failed') + throw e + } + })(), + (async () => { + try { + await runAllLinking( + keyring, + wssAddress, + account as Kilt.KiltKeyringPair, + accountLinkingTestAccount + ) + } catch (e) { + console.error('Linking flow failed') + throw e + } + })(), + (async () => { + try { + await runAllSignCallback() + } catch (e) { + console.error('SignCallback flow failed') + throw e + } + })(), + (async () => { + try { + await runAllPublicCredentials(publicCredentialsTestAccount) + } catch (e) { + console.error('Public credentials flow failed') + throw e + } + })(), + (async () => { + try { + await runAllMessaging(messagingAccount) + } catch (e) { + console.error('Messaging flow failed') + throw e + } + })() + ]) +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/linking/01_eth_link.ts b/versioned_docs/0.3-sdk_examples/src/core_features/linking/01_eth_link.ts new file mode 100644 index 000000000..663e9c292 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/linking/01_eth_link.ts @@ -0,0 +1,41 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function linkAccountToDid( + did: Kilt.DidUri, + submitterAccount: Kilt.KiltKeyringPair, + linkedAccount: Kilt.KeyringPair & { type: 'ethereum' }, + signCallback: Kilt.SignExtrinsicCallback +): Promise { + const api = Kilt.ConfigService.get('api') + + // Generate the parameters for the extrinsic that links account and DID. + // This will contain the signature of the account that will be linked to the DID + // and therefore signals the agreement of the account to be linked. + const accountLinkingParameters = await Kilt.Did.associateAccountToChainArgs( + linkedAccount.address, + did, + async (payload) => linkedAccount.sign(payload) + ) + + // Afterwards we build the extrinsic using the parameters from above. + const accountLinkingTx = await api.tx.didLookup.associateAccount( + ...accountLinkingParameters + ) + + // Next the DID signs the extrinsic. + // This signals the agreement of the DID owner to be linked to the account. + const authorizedAccountLinkingTx = await Kilt.Did.authorizeTx( + did, + accountLinkingTx, + signCallback, + submitterAccount.address + ) + + // finally we need to submit everything to the blockchain, so that the link gets + // registered. + // This account will provide the required deposit and pay the fees. + await Kilt.Blockchain.signAndSubmitTx( + authorizedAccountLinkingTx, + submitterAccount + ) +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/linking/01_eth_link_metamask.ts b/versioned_docs/0.3-sdk_examples/src/core_features/linking/01_eth_link_metamask.ts new file mode 100644 index 000000000..ee20d2493 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/linking/01_eth_link_metamask.ts @@ -0,0 +1,65 @@ +import { hexToU8a, u8aToString } from '@polkadot/util' + +import * as Kilt from '@kiltprotocol/sdk-js' + +type MetamaskApi = { + request: (_: { + method: string + params: [string, string, string] + }) => Promise +} + +declare global { + interface Window { + ethereum: MetamaskApi + } +} + +export async function linkAccountToDid( + did: Kilt.DidUri, + submitterAccount: Kilt.KiltKeyringPair, + linkedAccountAddress: string, + signCallback: Kilt.SignExtrinsicCallback +): Promise { + const api = Kilt.ConfigService.get('api') + + const blockNo = await api.query.system.number() + // the challenge will be valid for 300 blocks (~1h) + const validTill = blockNo.addn(300) + + // We build the challenge that needs to be signed by the ethereum account + const challenge = u8aToString( + await Kilt.Did.getLinkingChallenge(did, validTill) + ) + + // sign the challenge + const signature = await window.ethereum.request({ + method: 'personal_sign', + params: [challenge, linkedAccountAddress, ''] + }) + + // build the arguments for the extrinsic that links ethereum account and DID + const accountLinkingParameters = await Kilt.Did.getLinkingArguments( + linkedAccountAddress, + validTill, + hexToU8a(signature), + 'ethereum' + ) + + // Build the actual extrinsic + const accountLinkingTx = await api.tx.didLookup.associateAccount( + ...accountLinkingParameters + ) + const authorizedAccountLinkingTx = await Kilt.Did.authorizeTx( + did, + accountLinkingTx, + signCallback, + submitterAccount.address + ) + + // sign and submit the extrinsic to the blockchain + await Kilt.Blockchain.signAndSubmitTx( + authorizedAccountLinkingTx, + submitterAccount + ) +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/linking/01_eth_link_web3js.ts b/versioned_docs/0.3-sdk_examples/src/core_features/linking/01_eth_link_web3js.ts new file mode 100644 index 000000000..ffa5d0bb9 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/linking/01_eth_link_web3js.ts @@ -0,0 +1,55 @@ +import { hexToU8a, u8aToString } from '@polkadot/util' +import Web3 from 'web3' + +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function linkAccountToDid( + did: Kilt.DidUri, + submitterAccount: Kilt.KiltKeyringPair, + linkedAccountPrivateKey: string, + linkedAccountAddress: string, + signCallback: Kilt.SignExtrinsicCallback +): Promise { + const api = Kilt.ConfigService.get('api') + const web3 = new Web3() + + const blockNo = await api.query.system.number() + // the challenge will be valid for 300 blocks (~1h) + const validTill = blockNo.addn(300) + + // We build the challenge that needs to be signed by the ethereum account + const challenge = u8aToString( + await Kilt.Did.getLinkingChallenge(did, validTill) + ) + + // sign the challenge + const signResult = await web3.eth.accounts.sign( + challenge, + linkedAccountPrivateKey + ) + + // build the arguments for the extrinsic that links ethereum account and DID + const accountLinkingParameters = await Kilt.Did.getLinkingArguments( + linkedAccountAddress, + validTill, + hexToU8a(signResult.signature), + 'ethereum' + ) + + // Build the actual extrinsic + const accountLinkingTx = await api.tx.didLookup.associateAccount( + ...accountLinkingParameters + ) + const authorizedAccountLinkingTx = await Kilt.Did.authorizeTx( + did, + accountLinkingTx, + signCallback, + submitterAccount.address + ) + + // sign and submit the extrinsic to the blockchain + await Kilt.Blockchain.signAndSubmitTx( + authorizedAccountLinkingTx, + submitterAccount + ) +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/linking/01_sub_link.ts b/versioned_docs/0.3-sdk_examples/src/core_features/linking/01_sub_link.ts new file mode 100644 index 000000000..4b5340962 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/linking/01_sub_link.ts @@ -0,0 +1,41 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function linkAccountToDid( + did: Kilt.DidUri, + submitterAccount: Kilt.KiltKeyringPair, + linkedAccount: Kilt.KeyringPair & { type: 'ed25519' | 'sr25519' | 'ecdsa' }, + signCallback: Kilt.SignExtrinsicCallback +): Promise { + const api = Kilt.ConfigService.get('api') + + // Generate the parameters for the extrinsic that links account and DID. + // This will contain the signature of the account that will be linked to the DID + // and therefore signals the agreement of the account to be linked. + const accountLinkingParameters = await Kilt.Did.associateAccountToChainArgs( + linkedAccount.address, + did, + async (payload) => linkedAccount.sign(payload) + ) + + // Afterwards we build the extrinsic using the parameters from above. + const accountLinkingTx = await api.tx.didLookup.associateAccount( + ...accountLinkingParameters + ) + + // Next the DID signs the extrinsic. + // This signals the agreement of the DID owner to be linked to the account. + const authorizedAccountLinkingTx = await Kilt.Did.authorizeTx( + did, + accountLinkingTx, + signCallback, + submitterAccount.address + ) + + // finally we need to submit everything to the blockchain, so that the link gets + // registered. + // This account will provide the required deposit and pay the fees. + await Kilt.Blockchain.signAndSubmitTx( + authorizedAccountLinkingTx, + submitterAccount + ) +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/linking/02_sender_link.ts b/versioned_docs/0.3-sdk_examples/src/core_features/linking/02_sender_link.ts new file mode 100644 index 000000000..0bb5a12be --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/linking/02_sender_link.ts @@ -0,0 +1,24 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function linkDidToAccount( + did: Kilt.DidUri, + submitterAccount: Kilt.KiltKeyringPair, + signCallback: Kilt.SignExtrinsicCallback +): Promise { + const api = Kilt.ConfigService.get('api') + + // Authorizing the tx with the full DID and submitting it with the provided account + // results in the submitter's account being linked to the DID authorizing the operation. + const accountLinkingTx = api.tx.didLookup.associateSender() + const authorizedAccountLinkingTx = await Kilt.Did.authorizeTx( + did, + accountLinkingTx, + signCallback, + submitterAccount.address + ) + + await Kilt.Blockchain.signAndSubmitTx( + authorizedAccountLinkingTx, + submitterAccount + ) +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/linking/03_account_web3name_query.ts b/versioned_docs/0.3-sdk_examples/src/core_features/linking/03_account_web3name_query.ts new file mode 100644 index 000000000..5b200cbac --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/linking/03_account_web3name_query.ts @@ -0,0 +1,23 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function queryAccountWeb3Name( + lookupAccountAddress: Kilt.KiltAddress +): Promise { + const api = Kilt.ConfigService.get('api') + + const encodedLinkedDetails = await api.call.did.queryByAccount( + Kilt.Did.accountToChain(lookupAccountAddress) + ) + const { web3Name } = Kilt.Did.linkedInfoFromChain(encodedLinkedDetails) + if (web3Name) { + console.log( + `web3name for account "${lookupAccountAddress}" -> "${web3Name}"` + ) + } else { + console.log( + `Account "${lookupAccountAddress}" does not have a linked web3name.` + ) + } + + return web3Name +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/linking/04_account_web3name_query_no_sdk.ts b/versioned_docs/0.3-sdk_examples/src/core_features/linking/04_account_web3name_query_no_sdk.ts new file mode 100644 index 000000000..f0c17dd7d --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/linking/04_account_web3name_query_no_sdk.ts @@ -0,0 +1,38 @@ +import type { KeyringPair } from '@polkadot/keyring/types' + +import { ApiPromise, WsProvider } from '@polkadot/api' + +// Import needed to provide KILT Typescript support to the api object. +import '@kiltprotocol/augment-api' +import { typesBundle } from '@kiltprotocol/type-definitions' + +export async function queryAccountWeb3Name( + endpoint: string, + lookupAccountAddress: KeyringPair['address'] +): Promise { + const api = await ApiPromise.create({ + provider: new WsProvider(endpoint), + typesBundle + }) + // Call to the KILT runtime API `did.queryByAccount` + const didDetails = await api.call.did.queryByAccount({ + AccountId32: lookupAccountAddress + }) + if (didDetails.isNone) { + throw new Error(`No DID for the KILT account "${lookupAccountAddress}".`) + } + + const { w3n } = didDetails.unwrap() + if (w3n.isNone) { + throw new Error( + `No web3name for the KILT account "${lookupAccountAddress}".` + ) + } + + const web3Name = w3n.unwrap().toHuman() + console.log( + `The provided account is identifiable by the following web3name: "w3n:${web3Name}"` + ) + + return web3Name +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/linking/05_did_unlink.ts b/versioned_docs/0.3-sdk_examples/src/core_features/linking/05_did_unlink.ts new file mode 100644 index 000000000..652acb6a8 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/linking/05_did_unlink.ts @@ -0,0 +1,26 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function unlinkAccountFromDid( + did: Kilt.DidUri, + submitterAccount: Kilt.KiltKeyringPair, + linkedAccountAddress: Kilt.KiltAddress, + signCallback: Kilt.SignExtrinsicCallback +): Promise { + const api = Kilt.ConfigService.get('api') + + // The DID owner removes the link between itself and the specified account. + const accountUnlinkTx = api.tx.didLookup.removeAccountAssociation({ + AccountId32: linkedAccountAddress + }) + const authorizedAccountUnlinkTx = await Kilt.Did.authorizeTx( + did, + accountUnlinkTx, + signCallback, + submitterAccount.address + ) + + await Kilt.Blockchain.signAndSubmitTx( + authorizedAccountUnlinkTx, + submitterAccount + ) +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/linking/06_account_unlink.ts b/versioned_docs/0.3-sdk_examples/src/core_features/linking/06_account_unlink.ts new file mode 100644 index 000000000..ddfa79636 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/linking/06_account_unlink.ts @@ -0,0 +1,12 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function unlinkDidFromAccount( + linkOwnerAccount: Kilt.KeyringPair +): Promise { + const api = Kilt.ConfigService.get('api') + + // The tx does not need to be authorized by a DID, but the submitter account removes its own link. + const accountUnlinkTx = api.tx.didLookup.removeSenderAssociation() + + await Kilt.Blockchain.signAndSubmitTx(accountUnlinkTx, linkOwnerAccount) +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/linking/07_reclaim_deposit.ts b/versioned_docs/0.3-sdk_examples/src/core_features/linking/07_reclaim_deposit.ts new file mode 100644 index 000000000..5dfd5f661 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/linking/07_reclaim_deposit.ts @@ -0,0 +1,15 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function reclaimLinkDeposit( + submitterAddress: Kilt.KeyringPair, + linkedAccountAddress: Kilt.KiltAddress +): Promise { + const api = Kilt.ConfigService.get('api') + + // The tx does not need to be authorized by a DID, but the deposit payer's account claims the deposit and removes the link. + const accountUnlinkTx = api.tx.didLookup.reclaimDeposit({ + AccountId32: linkedAccountAddress + }) + + await Kilt.Blockchain.signAndSubmitTx(accountUnlinkTx, submitterAddress) +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/linking/index.ts b/versioned_docs/0.3-sdk_examples/src/core_features/linking/index.ts new file mode 100644 index 000000000..b611b1182 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/linking/index.ts @@ -0,0 +1,143 @@ +import { randomAsU8a } from '@polkadot/util-crypto' + +import Web3 from 'web3' +const web3 = new Web3() + +import { randomUUID } from 'crypto' + +import * as Kilt from '@kiltprotocol/sdk-js' + +import { claimWeb3Name } from '../web3names/01_claim' +import { createSimpleFullDid } from '../did/04_full_did_simple' + +import { linkAccountToDid as linkEthAccountToDid } from './01_eth_link' +import { linkAccountToDid as linkEthAccountToDidWeb3js } from './01_eth_link_web3js' +import { linkDidToAccount as linkSenderToDid } from './02_sender_link' +import { linkAccountToDid as linkSubAccountToDid } from './01_sub_link' +import { queryAccountWeb3Name as queryAccountWithSdk } from './03_account_web3name_query' +import { queryAccountWeb3Name as queryAccountWithoutSdk } from './04_account_web3name_query_no_sdk' +import { reclaimLinkDeposit } from './07_reclaim_deposit' +import { unlinkAccountFromDid } from './05_did_unlink' +import { unlinkDidFromAccount } from './06_account_unlink' + +import { generateKeypairs } from '../utils/generateKeypairs' + +// The provided DID is assumed to have an associated web3name. +export async function runAll( + keyring: Kilt.Utils.Keyring, + endpoint: string, + submitterAccount: Kilt.KiltKeyringPair, + linkAccount: Kilt.KiltKeyringPair & { type: 'ed25519' | 'sr25519' | 'ecdsa' } +): Promise { + console.log('Running linking flow...') + const { authentication } = generateKeypairs() + const fullDid = await createSimpleFullDid( + submitterAccount, + { + authentication + }, + async ({ data }) => ({ + signature: authentication.sign(data), + keyType: authentication.type + }) + ) + const randomWeb3Name = randomUUID().substring(0, 32) + await claimWeb3Name( + fullDid.uri, + submitterAccount, + randomWeb3Name, + async ({ data }) => ({ + signature: authentication.sign(data), + keyType: authentication.type + }) + ) + + console.log('1.1 linking) Link link account to DID') + await linkSubAccountToDid( + fullDid.uri, + submitterAccount, + linkAccount, + async ({ data }) => ({ + signature: authentication.sign(data), + keyType: authentication.type + }) + ) + + // Link eth address using polkadot-js + { + console.log('1.2.1 linking) Link eth account to DID (polkadot-js)') + const linkEthAccount = keyring.addFromSeed( + randomAsU8a(32), + undefined, + 'ethereum' + ) as Kilt.KeyringPair & { type: 'ethereum' } + await linkEthAccountToDid( + fullDid.uri, + submitterAccount, + linkEthAccount, + async ({ data }) => ({ + signature: authentication.sign(data), + keyType: authentication.type + }) + ) + } + + // link eth address using web3js + { + console.log('1.2.2 linking) Link eth account to DID (web3js)') + const ethSecretKey = randomAsU8a(32) + const linkEthAddress = web3.eth.accounts.privateKeyToAccount( + Kilt.Utils.Crypto.u8aToHex(ethSecretKey) + ).address + + await linkEthAccountToDidWeb3js( + fullDid.uri, + submitterAccount, + Kilt.Utils.Crypto.u8aToHex(ethSecretKey), + linkEthAddress, + async ({ data }) => ({ + signature: authentication.sign(data), + keyType: authentication.type + }) + ) + } + + console.log('2 linking) Link DID to submitter account') + await linkSenderToDid(fullDid.uri, submitterAccount, async ({ data }) => ({ + signature: authentication.sign(data), + keyType: authentication.type + })) + console.log('3 linking) Query web3name for link account with SDK') + let web3Name = await queryAccountWithSdk(linkAccount.address) + if (!web3Name) { + throw new Error( + `The DID "${fullDid.uri}" is assumed to have a linked web3name, which it does not.` + ) + } + console.log('4 linking) Query web3name for submitter account without SDK') + web3Name = await queryAccountWithoutSdk(endpoint, submitterAccount.address) + if (!web3Name) { + throw new Error( + 'The retrieved web3name should have been the same as the one of the link account, which is not.' + ) + } + console.log('5 linking) Unlink link account from DID') + await unlinkAccountFromDid( + fullDid.uri, + submitterAccount, + linkAccount.address, + async ({ data }) => ({ + signature: authentication.sign(data), + keyType: authentication.type + }) + ) + console.log('6 linking) Unlink submitter account from DID') + await unlinkDidFromAccount(submitterAccount) + console.log('7 linking) Re-add submitter account and claim deposit back') + await linkSenderToDid(fullDid.uri, submitterAccount, async ({ data }) => ({ + signature: authentication.sign(data), + keyType: authentication.type + })) + await reclaimLinkDeposit(submitterAccount, submitterAccount.address) + console.log('Linking flow completed!') +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/messaging/01_generate_request_credential_message.ts b/versioned_docs/0.3-sdk_examples/src/core_features/messaging/01_generate_request_credential_message.ts new file mode 100644 index 000000000..9aeb57738 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/messaging/01_generate_request_credential_message.ts @@ -0,0 +1,35 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function generateRequestCredentialMessage( + senderUri: Kilt.DidUri, + receiverUri: Kilt.DidUri, + cTypeHash: Kilt.CTypeHash +) { + // Creating a challenge to submit to the receiver + const challenge = Kilt.Utils.UUID.generate() + + // Sender uri is checked if it is a valid URI + Kilt.Did.validateUri(senderUri) + // Receiver uri is checked if it is a valid URI + Kilt.Did.validateUri(receiverUri) + + // The content of the 'request-credential' message + // It includes a CType that is being requested, this can be for attestation or verification + // The sender is the trusted attester in the scenario + const requestCredentialContent = { + cTypeHash: cTypeHash, + trustedAttesters: [senderUri] + } + + const messageBody: Kilt.IRequestCredential = { + type: 'request-credential', + content: { cTypes: [requestCredentialContent], challenge: challenge } + } + + // The message will throw an Error if invalid + const message = Kilt.Message.fromBody(messageBody, senderUri, receiverUri) + + console.log(`Generated message: ${JSON.stringify(message, null, 4)}`) + + return message +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/messaging/02_encrypt_message.ts b/versioned_docs/0.3-sdk_examples/src/core_features/messaging/02_encrypt_message.ts new file mode 100644 index 000000000..f25639435 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/messaging/02_encrypt_message.ts @@ -0,0 +1,31 @@ +import * as Kilt from '@kiltprotocol/sdk-js' +import { useEncryptionCallback } from '../signCallback/useEncryptionCallback' + +export async function encryptMessage( + message: Kilt.IMessage, + senderUri: Kilt.DidUri, + receiverUri: Kilt.DidUri, + keyAgreement: Kilt.KiltEncryptionKeypair +): Promise { + const { document: senderDocument } = await Kilt.Did.resolve(senderUri) + + const { document: receiverDocument } = await Kilt.Did.resolve(receiverUri) + + const receiverKeyAgreementUri = + `${receiverUri}${receiverDocument.keyAgreement?.[0].id}` as Kilt.DidResourceUri + const senderKeyAgreeementUri = + `${senderUri}${senderDocument.keyAgreement?.[0].id}` as Kilt.DidResourceUri + // encrypt the message + const encryptedMessage = await Kilt.Message.encrypt( + message, + useEncryptionCallback({ + keyAgreement, + keyAgreementUri: senderKeyAgreeementUri + }), + receiverKeyAgreementUri + ) + + console.log(`Encrypted Message: ${JSON.stringify(encryptedMessage, null, 4)}`) + + return encryptedMessage +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/messaging/03_decrypt_message.ts b/versioned_docs/0.3-sdk_examples/src/core_features/messaging/03_decrypt_message.ts new file mode 100644 index 000000000..47e0f907c --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/messaging/03_decrypt_message.ts @@ -0,0 +1,38 @@ +import * as Kilt from '@kiltprotocol/sdk-js' +import { useDecryptionCallback } from '../signCallback/useDecryptionCallback' + +export async function decryptMessage( + encryptedMessage: Kilt.IEncryptedMessage, + keyAgreement: Kilt.KiltEncryptionKeypair +): Promise { + // Decrypting the message to retrieve the content + const decryptedMessage = await Kilt.Message.decrypt( + encryptedMessage, + useDecryptionCallback(keyAgreement) + ) + + // Verifying this is a properly-formatted message + Kilt.Message.verify(decryptedMessage) + + console.log(`Decrypted Message: ${JSON.stringify(decryptedMessage, null, 4)}`) + + // Checking if the message type matches the expected checks + if (decryptedMessage.body.type !== 'request-credential') { + throw new Error('Not the correct body type') + } + + // Destructing the message to receive the cTypes array to see what credentials + // Are valid for the given request + const { cTypes } = decryptedMessage.body.content + + const { cTypeHash, trustedAttesters } = cTypes[0] + + // The receiver can check if they have a valid credential that matches the cTypeHash + console.log('The sent cType hash :', cTypeHash) + + // The trusted attesters is an array that includes the list of trusted entities + // The receiver can check if they have a given credential from the trusted list + console.log(`A list of trusted attesters DID :${trustedAttesters}`) + + return decryptedMessage +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/messaging/_replay_protection_01.ts b/versioned_docs/0.3-sdk_examples/src/core_features/messaging/_replay_protection_01.ts new file mode 100644 index 000000000..a87e21a4f --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/messaging/_replay_protection_01.ts @@ -0,0 +1,6 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ +export function main() { + const MAX_ACCEPTED_AGE = 60_000 // ms -> 1 minute + const MIN_ACCEPTED_AGE = -1_000 // allow for some imprecision in system time + const submissions = new Map() +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/messaging/_replay_protection_02.ts b/versioned_docs/0.3-sdk_examples/src/core_features/messaging/_replay_protection_02.ts new file mode 100644 index 000000000..e305c48ab --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/messaging/_replay_protection_02.ts @@ -0,0 +1,24 @@ +import { blake2AsHex } from '@polkadot/util-crypto' + +import * as Kilt from '@kiltprotocol/sdk-js' + +export function main( + submissions: Map, + decrypted: Kilt.IMessage, + MIN_ACCEPTED_AGE: number, + MAX_ACCEPTED_AGE: number +) { + // Is messageId fresh and createdAt recent? + const messageId = + decrypted.messageId || blake2AsHex(JSON.stringify(decrypted)) + if ( + submissions.has(messageId) || + decrypted.createdAt < Date.now() - MAX_ACCEPTED_AGE || + decrypted.createdAt > Date.now() - MIN_ACCEPTED_AGE + ) { + // no -> reject message + } else { + submissions.set(messageId, decrypted.createdAt) + // yes -> accept & process message + } +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/messaging/_replay_protection_03.ts b/versioned_docs/0.3-sdk_examples/src/core_features/messaging/_replay_protection_03.ts new file mode 100644 index 000000000..237a98de1 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/messaging/_replay_protection_03.ts @@ -0,0 +1,11 @@ +export function main( + submissions: Map, + MAX_ACCEPTED_AGE: number +) { + setInterval(() => { + const outdatedTimestamp = Date.now() - MAX_ACCEPTED_AGE + submissions.forEach((timestamp, hash) => { + if (timestamp < outdatedTimestamp) submissions.delete(hash) + }) + }, 1000) +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/messaging/index.ts b/versioned_docs/0.3-sdk_examples/src/core_features/messaging/index.ts new file mode 100644 index 000000000..f59b83d49 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/messaging/index.ts @@ -0,0 +1,71 @@ +import * as Kilt from '@kiltprotocol/sdk-js' +import { createCompleteFullDid } from '../did/05_full_did_complete' +import { createDriversLicenseCType } from '../claiming/01_create_ctype' +import { decryptMessage } from './03_decrypt_message' +import { encryptMessage } from './02_encrypt_message' +import { generateKeypairs } from '../utils/generateKeypairs' +import { generateRequestCredentialMessage } from './01_generate_request_credential_message' + +// Runs through the messaging encryption and decryption of messages +export async function runAll(submitterAccount: Kilt.KiltKeyringPair) { + console.log('Running messaging flow...') + console.log(`1 Messaging) Generating a sender's DID`) + const senderKeypairs = generateKeypairs() + const senderFullDid = await createCompleteFullDid( + submitterAccount, + { + ...senderKeypairs + }, + async ({ data }) => ({ + signature: senderKeypairs.authentication.sign(data), + keyType: senderKeypairs.authentication.type + }) + ) + + console.log(`2 Messaging) Generating a receiver's DID`) + const receiverKeypairs = generateKeypairs() + const receiverFullDid = await createCompleteFullDid( + submitterAccount, + { + ...receiverKeypairs + }, + async ({ data }) => ({ + signature: receiverKeypairs.authentication.sign(data), + keyType: receiverKeypairs.authentication.type + }) + ) + + console.log('3 Messaging) Generating a ctype for the message passing') + const { $id } = await createDriversLicenseCType( + senderFullDid.uri, + submitterAccount, + async ({ data }) => ({ + signature: senderKeypairs.assertionMethod.sign(data), + keyType: senderKeypairs.assertionMethod.type + }) + ) + + const cTypeHash = Kilt.CType.idToHash($id) + + console.log('4 Messaging) Generating the message to encrypt and decrypt') + const message = await generateRequestCredentialMessage( + senderFullDid.uri, + receiverFullDid.uri, + cTypeHash + ) + + console.log('5 Messaging) Encrypting the message for sender to receiver') + const encryptedMessage = await encryptMessage( + message, + senderFullDid.uri, + receiverFullDid.uri, + senderKeypairs.keyAgreement + ) + + console.log( + '6 Messaging) Decrypting the message from sender for the receiver' + ) + await decryptMessage(encryptedMessage, receiverKeypairs.keyAgreement) + + console.log('Messaging flow completed!') +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/public_credentials/01_create_credential.ts b/versioned_docs/0.3-sdk_examples/src/core_features/public_credentials/01_create_credential.ts new file mode 100644 index 000000000..1120d23ca --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/public_credentials/01_create_credential.ts @@ -0,0 +1,38 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +// CType definition. +const ctype = Kilt.CType.fromProperties(`NFT Collection Certification CType`, { + name: { + type: 'string' + }, + pieces: { + type: 'integer' + }, + creationDate: { + type: 'string' + }, + artistIdentity: { + type: 'string' + } +}) + +export function createNftCollectionCredential( + assetDid: Kilt.AssetDidUri, + artistDid: Kilt.DidUri +): Kilt.IPublicCredentialInput { + const claimProperties: Kilt.IClaimContents = { + name: 'Awesome NFT drop', + // NFT collection only has 100 pieces in total + pieces: 100, + // NFT collection was released on Jan 1st, 2023 + creationDate: new Date(2023, 0, 1).toISOString(), + artistIdentity: artistDid + } + const fullClaim: Kilt.IAssetClaim = { + contents: claimProperties, + cTypeHash: Kilt.CType.idToHash(ctype.$id), + subject: assetDid + } + + return Kilt.PublicCredential.fromClaim(fullClaim) +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/public_credentials/02_issue_credential.ts b/versioned_docs/0.3-sdk_examples/src/core_features/public_credentials/02_issue_credential.ts new file mode 100644 index 000000000..1aff3faff --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/public_credentials/02_issue_credential.ts @@ -0,0 +1,26 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function issueCredential( + attester: Kilt.DidUri, + submitterAccount: Kilt.KiltKeyringPair, + signCallback: Kilt.SignExtrinsicCallback, + credential: Kilt.IPublicCredentialInput +): Promise { + const api = Kilt.ConfigService.get('api') + + const credentialCreationTx = api.tx.publicCredentials.add( + Kilt.PublicCredential.toChain(credential) + ) + + // Same as for traditional KILT credentials + const authorizedAttestationTx = await Kilt.Did.authorizeTx( + attester, + credentialCreationTx, + signCallback, + submitterAccount.address + ) + await Kilt.Blockchain.signAndSubmitTx( + authorizedAttestationTx, + submitterAccount + ) +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/public_credentials/03_retrieve_credential_by_id.ts b/versioned_docs/0.3-sdk_examples/src/core_features/public_credentials/03_retrieve_credential_by_id.ts new file mode 100644 index 000000000..fe3ceea40 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/public_credentials/03_retrieve_credential_by_id.ts @@ -0,0 +1,7 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function fetchCredentialById( + credentialId: Kilt.IPublicCredential['id'] +): Promise { + return Kilt.PublicCredential.fetchCredentialFromChain(credentialId) +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/public_credentials/04_retrieve_credentials_by_subject.ts b/versioned_docs/0.3-sdk_examples/src/core_features/public_credentials/04_retrieve_credentials_by_subject.ts new file mode 100644 index 000000000..13d729a37 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/public_credentials/04_retrieve_credentials_by_subject.ts @@ -0,0 +1,7 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function retrieveAllAssetCredentials( + assetDid: Kilt.AssetDidUri +): Promise { + return Kilt.PublicCredential.fetchCredentialsFromChain(assetDid) +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/public_credentials/05_verify_credential.ts b/versioned_docs/0.3-sdk_examples/src/core_features/public_credentials/05_verify_credential.ts new file mode 100644 index 000000000..4831f1ee9 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/public_credentials/05_verify_credential.ts @@ -0,0 +1,8 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function verifyCredential( + credential: Kilt.IPublicCredential, + cType?: Kilt.ICType +): Promise { + await Kilt.PublicCredential.verifyCredential(credential, { cType }) +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/public_credentials/06_revoke_remove_credential_by_id.ts b/versioned_docs/0.3-sdk_examples/src/core_features/public_credentials/06_revoke_remove_credential_by_id.ts new file mode 100644 index 000000000..ad6ad135c --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/public_credentials/06_revoke_remove_credential_by_id.ts @@ -0,0 +1,27 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function revokeCredentialById( + attester: Kilt.DidUri, + submitterAccount: Kilt.KiltKeyringPair, + signCallback: Kilt.SignExtrinsicCallback, + credentialId: Kilt.IPublicCredential['id'], + shouldRemove = false +): Promise { + const api = Kilt.ConfigService.get('api') + + const tx = shouldRemove + ? api.tx.publicCredentials.remove(credentialId, null) + : api.tx.publicCredentials.revoke(credentialId, null) + + // Same as for traditional KILT credentials + const authorizedAttestationTx = await Kilt.Did.authorizeTx( + attester, + tx, + signCallback, + submitterAccount.address + ) + await Kilt.Blockchain.signAndSubmitTx( + authorizedAttestationTx, + submitterAccount + ) +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/public_credentials/07_revoke_remove_credential_by_content.ts b/versioned_docs/0.3-sdk_examples/src/core_features/public_credentials/07_revoke_remove_credential_by_content.ts new file mode 100644 index 000000000..8c3c83ee1 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/public_credentials/07_revoke_remove_credential_by_content.ts @@ -0,0 +1,31 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function revokeCredential( + attester: Kilt.DidUri, + submitterAccount: Kilt.KiltKeyringPair, + signCallback: Kilt.SignExtrinsicCallback, + credential: Kilt.IPublicCredentialInput, + shouldRemove = false +): Promise { + const api = Kilt.ConfigService.get('api') + + const credentialId = Kilt.PublicCredential.getIdForCredential( + credential, + attester + ) + const tx = shouldRemove + ? api.tx.publicCredentials.remove(credentialId, null) + : api.tx.publicCredentials.revoke(credentialId, null) + + // Same as for traditional KILT credentials + const authorizedAttestationTx = await Kilt.Did.authorizeTx( + attester, + tx, + signCallback, + submitterAccount.address + ) + await Kilt.Blockchain.signAndSubmitTx( + authorizedAttestationTx, + submitterAccount + ) +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/public_credentials/08_unrevoke_credential.ts b/versioned_docs/0.3-sdk_examples/src/core_features/public_credentials/08_unrevoke_credential.ts new file mode 100644 index 000000000..807efffbd --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/public_credentials/08_unrevoke_credential.ts @@ -0,0 +1,27 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function unrevokeCredential( + attester: Kilt.DidUri, + submitterAccount: Kilt.KiltKeyringPair, + signCallback: Kilt.SignExtrinsicCallback, + credential: Kilt.IPublicCredentialInput +): Promise { + const api = Kilt.ConfigService.get('api') + + const credentialId = Kilt.PublicCredential.getIdForCredential( + credential, + attester + ) + const tx = api.tx.publicCredentials.unrevoke(credentialId, null) + + const authorizedAttestationTx = await Kilt.Did.authorizeTx( + attester, + tx, + signCallback, + submitterAccount.address + ) + await Kilt.Blockchain.signAndSubmitTx( + authorizedAttestationTx, + submitterAccount + ) +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/public_credentials/09_reclaim_deposit.ts b/versioned_docs/0.3-sdk_examples/src/core_features/public_credentials/09_reclaim_deposit.ts new file mode 100644 index 000000000..284b9afb1 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/public_credentials/09_reclaim_deposit.ts @@ -0,0 +1,18 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function reclaimDeposit( + submitterAddress: Kilt.KiltKeyringPair, + credential: Kilt.IPublicCredential +): Promise { + const api = Kilt.ConfigService.get('api') + + // Generate the tx to claim the deposit back. + const credentialId = Kilt.PublicCredential.getIdForCredential( + credential, + credential.attester + ) + const depositReclaimTx = api.tx.publicCredentials.reclaimDeposit(credentialId) + + // Submit the revocation tx to the KILT blockchain. + await Kilt.Blockchain.signAndSubmitTx(depositReclaimTx, submitterAddress) +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/public_credentials/index.ts b/versioned_docs/0.3-sdk_examples/src/core_features/public_credentials/index.ts new file mode 100644 index 000000000..e8fff72a9 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/public_credentials/index.ts @@ -0,0 +1,113 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +import { createCompleteFullDid } from '../did/05_full_did_complete' + +import { createNftCollectionCredential } from './01_create_credential' +import { fetchCredentialById } from './03_retrieve_credential_by_id' +import { issueCredential } from './02_issue_credential' +import { reclaimDeposit } from './09_reclaim_deposit' +import { retrieveAllAssetCredentials } from './04_retrieve_credentials_by_subject' +import { revokeCredential } from './07_revoke_remove_credential_by_content' +import { revokeCredentialById } from './06_revoke_remove_credential_by_id' +import { unrevokeCredential } from './08_unrevoke_credential' +import { verifyCredential } from './05_verify_credential' + +import { generateKeypairs } from '../utils/generateKeypairs' + +export async function runAll( + submitterAccount: Kilt.KiltKeyringPair +): Promise { + console.log('Running public credentials flow...') + const keypairs = generateKeypairs() + const attesterDid = await createCompleteFullDid( + submitterAccount, + keypairs, + async ({ data }) => ({ + signature: keypairs.authentication.sign(data), + keyType: keypairs.authentication.type + }) + ) + + console.log('1 public credentials) Create credential object') + const { authentication } = generateKeypairs() + const artistDid = Kilt.Did.getFullDidUriFromKey(authentication) + const collectionDid: Kilt.AssetDidUri = + 'did:asset:eip155:1.erc721:0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb' + const credential = createNftCollectionCredential(collectionDid, artistDid) + console.log('2 public credentials) Issue credential') + await issueCredential( + attesterDid.uri, + submitterAccount, + async ({ data }) => ({ + signature: keypairs.assertionMethod.sign(data), + keyType: keypairs.assertionMethod.type + }), + credential + ) + console.log('3 public credentials) Fetch credential by ID') + const credentialId = Kilt.PublicCredential.getIdForCredential( + credential, + attesterDid.uri + ) + const fetchedCredential = await fetchCredentialById(credentialId) + if (!fetchedCredential) { + throw new Error( + `Was not possible to retrieve just-issued credential with ID ${credentialId}` + ) + } + console.log('4 public credentials) Retrieve credentials by subject') + const retrievedCredentials = await retrieveAllAssetCredentials(collectionDid) + if (!retrievedCredentials) { + throw new Error( + `Was not possible to retrieve just-issued credentials for asset ${collectionDid}` + ) + } + console.log('5 public credentials) Verify credential') + await verifyCredential(fetchedCredential) + await verifyCredential(retrievedCredentials[0]) + console.log('6 public credentials) Revoke and remove credential by ID') + await revokeCredentialById( + attesterDid.uri, + submitterAccount, + async ({ data }) => ({ + signature: keypairs.assertionMethod.sign(data), + keyType: keypairs.assertionMethod.type + }), + credentialId, + true + ) + console.log('7.1 public credentials) Re-issue credential') + await issueCredential( + attesterDid.uri, + submitterAccount, + async ({ data }) => ({ + signature: keypairs.assertionMethod.sign(data), + keyType: keypairs.assertionMethod.type + }), + credential + ) + console.log('7.2 public credentials) Revoke credential') + await revokeCredential( + attesterDid.uri, + submitterAccount, + async ({ data }) => ({ + signature: keypairs.assertionMethod.sign(data), + keyType: keypairs.assertionMethod.type + }), + credential + ) + console.log('8 public credentials) Unrevoke credential') + await unrevokeCredential( + attesterDid.uri, + submitterAccount, + async ({ data }) => ({ + signature: keypairs.assertionMethod.sign(data), + keyType: keypairs.assertionMethod.type + }), + credential + ) + console.log('9 public credentials) Reclaim deposit') + await reclaimDeposit(submitterAccount, fetchedCredential) + + console.log('Public credentials flow completed!') +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/signCallback/index.ts b/versioned_docs/0.3-sdk_examples/src/core_features/signCallback/index.ts new file mode 100644 index 000000000..9d68391a8 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/signCallback/index.ts @@ -0,0 +1,59 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +import { useSignCallback } from './useSignCallback' +import { useSignExtrinsicCallback } from './useExtrinsicCallback' +import { useStoreTxSignCallback } from './useStoreTxSignCallback' + +// The _keyUri parameter is there to show that the DID key pair is looked up using the URI +export function lookupDidKeyPair( + // eslint-disable-next-line @typescript-eslint/no-unused-vars + _keyUri: Kilt.DidResourceUri +): Kilt.KiltKeyringPair { + return Kilt.Utils.Crypto.makeKeypairFromSeed() +} + +export function generateDidKeyPair(): Kilt.KiltKeyringPair { + return Kilt.Utils.Crypto.makeKeypairFromSeed() +} + +// The _did parameter is there to show that the DID document is looked up using the DID +// eslint-disable-next-line @typescript-eslint/no-unused-vars +export function lookupDidDocument(_did: Kilt.DidUri): Kilt.DidDocument { + const authentication = Kilt.Utils.Crypto.makeKeypairFromSeed() + const lightDID = Kilt.Did.createLightDidDocument({ + authentication: [authentication] + }) + + return lightDID +} + +export async function runAll(): Promise { + const api = Kilt.ConfigService.get('api') + + console.log('Test signCallback') + const didKey = Kilt.Utils.Crypto.makeKeypairFromSeed() + + ;( + await useSignCallback( + 'did:kilt:4pZGzLSybfMsxB1DcpFNYmnqFv5QihbFb1zuSuuATqjRQv2g#key-one', + didKey + ) + )({ + data: new Uint8Array([0, 1, 2, 3, 4]), + keyRelationship: 'authentication', + did: 'did:kilt:4pZGzLSybfMsxB1DcpFNYmnqFv5QihbFb1zuSuuATqjRQv2g' + }) + + console.log('Test signExtrinsicCallback') + await useSignExtrinsicCallback( + 'did:kilt:4pZGzLSybfMsxB1DcpFNYmnqFv5QihbFb1zuSuuATqjRQv2g', + didKey, + api.tx.didLookup.associateSender(), + '4pZGzLSybfMsxB1DcpFNYmnqFv5QihbFb1zuSuuATqjRQv2g' + ) + + console.log('Test getStoreTxSignCallback') + await useStoreTxSignCallback( + '4pZGzLSybfMsxB1DcpFNYmnqFv5QihbFb1zuSuuATqjRQv2g' + ) +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/signCallback/useDecryptionCallback.ts b/versioned_docs/0.3-sdk_examples/src/core_features/signCallback/useDecryptionCallback.ts new file mode 100644 index 000000000..eb5f7f70b --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/signCallback/useDecryptionCallback.ts @@ -0,0 +1,25 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export function useDecryptionCallback( + keyAgreement: Kilt.KiltEncryptionKeypair +): Kilt.DecryptCallback { + return async function decryptCallback({ + data, + nonce, + peerPublicKey + }): Promise { + const decrypted = Kilt.Utils.Crypto.decryptAsymmetric( + { box: data, nonce }, + peerPublicKey, + keyAgreement.secretKey + ) + + if (!decrypted) { + throw new Error('Failed to decrypt with given key') + } + + return { + data: decrypted + } + } +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/signCallback/useEncryptionCallback.ts b/versioned_docs/0.3-sdk_examples/src/core_features/signCallback/useEncryptionCallback.ts new file mode 100644 index 000000000..1bf261844 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/signCallback/useEncryptionCallback.ts @@ -0,0 +1,25 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export function useEncryptionCallback({ + keyAgreement, + keyAgreementUri +}: { + keyAgreement: Kilt.KiltEncryptionKeypair + keyAgreementUri: Kilt.DidResourceUri +}): Kilt.EncryptCallback { + return async function encryptCallback({ + data, + peerPublicKey + }): Promise { + const { box, nonce } = Kilt.Utils.Crypto.encryptAsymmetric( + data, + peerPublicKey, + keyAgreement.secretKey + ) + return { + nonce, + data: box, + keyUri: keyAgreementUri + } + } +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/signCallback/useExtrinsicCallback.ts b/versioned_docs/0.3-sdk_examples/src/core_features/signCallback/useExtrinsicCallback.ts new file mode 100644 index 000000000..09c9ae177 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/signCallback/useExtrinsicCallback.ts @@ -0,0 +1,31 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ +import * as Kilt from '@kiltprotocol/sdk-js' +import { Extrinsic } from '@polkadot/types/interfaces' + +export async function useSignExtrinsicCallback( + didUri: Kilt.DidUri, + didSigningKey: Kilt.KeyringPair & { type: 'sr25519' | 'ed25519' }, + extrinsic: Extrinsic, + submitterAddress: Kilt.KiltAddress +) { + // The SignExtrinsicCallback is a more specialized SignCallback since it doesn't + // need to return the keyUri. + const signCallback: Kilt.SignExtrinsicCallback = async ({ + data, + // The key relationship specifies which DID key must be used. + keyRelationship, + // The DID URI specifies which DID must be used. We already know which DID + // this will be since we will use this callback just a few lines later (did === didUri). + did + }) => ({ + signature: didSigningKey.sign(data), + keyType: didSigningKey.type + }) + + return await Kilt.Did.authorizeTx( + didUri, + extrinsic, + signCallback, + submitterAddress + ) +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/signCallback/useSignCallback.ts b/versioned_docs/0.3-sdk_examples/src/core_features/signCallback/useSignCallback.ts new file mode 100644 index 000000000..8c7373b5a --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/signCallback/useSignCallback.ts @@ -0,0 +1,22 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ +import * as Kilt from '@kiltprotocol/sdk-js' + +export function useSignCallback( + keyUri: Kilt.DidResourceUri, + didSigningKey: Kilt.KeyringPair & { type: 'sr25519' | 'ed25519' } +): Kilt.SignCallback { + const signCallback: Kilt.SignCallback = async ({ + data, + // The key relationship specifies which DID key must be used. + keyRelationship, + // The DID URI specifies which DID must be used. We already know which DID + // this will be since we will use this callback just a few lines later (did === didUri). + did + }) => ({ + signature: didSigningKey.sign(data), + keyType: didSigningKey.type, + keyUri + }) + + return signCallback +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/signCallback/useStoreTxSignCallback.ts b/versioned_docs/0.3-sdk_examples/src/core_features/signCallback/useStoreTxSignCallback.ts new file mode 100644 index 000000000..2f0cb2237 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/signCallback/useStoreTxSignCallback.ts @@ -0,0 +1,28 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function useStoreTxSignCallback( + submitterAddress: Kilt.KiltAddress +): Promise { + // Here we create a new key pair for the DID that will be created later. + // This step might happen in an extension or else where, depending on your application. + const authenticationKey: Kilt.KiltKeyringPair = + Kilt.Utils.Crypto.makeKeypairFromSeed() + + // This is the sign callback. We use the just created key to sign arbitrary data + // and return the signature together with the key type. + const getStoreTxSignCallback: Kilt.Did.GetStoreTxSignCallback = async ({ + data + }) => ({ + signature: authenticationKey.sign(data), + keyType: authenticationKey.type + }) + + // Here we use the call back + return await Kilt.Did.getStoreTx( + { + authentication: [authenticationKey] + }, + submitterAddress, + getStoreTxSignCallback + ) +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/utils/generateKeypairs.ts b/versioned_docs/0.3-sdk_examples/src/core_features/utils/generateKeypairs.ts new file mode 100644 index 000000000..d2ace38cf --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/utils/generateKeypairs.ts @@ -0,0 +1,27 @@ +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/versioned_docs/0.3-sdk_examples/src/core_features/utils/getExtrinsic.ts b/versioned_docs/0.3-sdk_examples/src/core_features/utils/getExtrinsic.ts new file mode 100644 index 000000000..5588ffa00 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/utils/getExtrinsic.ts @@ -0,0 +1,20 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export default function getExtrinsic(): Kilt.SubmittableExtrinsic { + const api = Kilt.ConfigService.get('api') + + // Random factor ensures that each created CType is unique and does not already exist on chain. + const randomFactor = Kilt.Utils.UUID.generate() + return api.tx.ctype.add( + Kilt.CType.toChain( + Kilt.CType.fromProperties(`CType ${randomFactor}`, { + name: { + type: 'string' + }, + age: { + type: 'integer' + } + }) + ) + ) +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/web3names/01_claim.ts b/versioned_docs/0.3-sdk_examples/src/core_features/web3names/01_claim.ts new file mode 100644 index 000000000..b51921295 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/web3names/01_claim.ts @@ -0,0 +1,22 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function claimWeb3Name( + did: Kilt.DidUri, + submitterAccount: Kilt.KiltKeyringPair, + name: Kilt.Did.Web3Name, + signCallback: Kilt.SignExtrinsicCallback +): Promise { + const api = Kilt.ConfigService.get('api') + + const web3NameClaimTx = api.tx.web3Names.claim(name) + const authorizedWeb3NameClaimTx = await Kilt.Did.authorizeTx( + did, + web3NameClaimTx, + signCallback, + submitterAccount.address + ) + await Kilt.Blockchain.signAndSubmitTx( + authorizedWeb3NameClaimTx, + submitterAccount + ) +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/web3names/02_query_did_name.ts b/versioned_docs/0.3-sdk_examples/src/core_features/web3names/02_query_did_name.ts new file mode 100644 index 000000000..4430a0b35 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/web3names/02_query_did_name.ts @@ -0,0 +1,16 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function queryDidDocument( + web3Name: Kilt.Did.Web3Name +): Promise { + const api = Kilt.ConfigService.get('api') + + console.log(`Querying the blockchain for the web3name "${web3Name}"`) + // Query the owner of the provided web3name. + const encodedWeb3NameOwner = await api.call.did.queryByWeb3Name(web3Name) + + // Extract the DidDocument and other linked information from the encodedWeb3NameOwner. + const { document } = Kilt.Did.linkedInfoFromChain(encodedWeb3NameOwner) + + return document +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/web3names/03_query_name_credentials.ts b/versioned_docs/0.3-sdk_examples/src/core_features/web3names/03_query_name_credentials.ts new file mode 100644 index 000000000..a136fdc67 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/web3names/03_query_name_credentials.ts @@ -0,0 +1,82 @@ +import fetch from 'node-fetch' + +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function queryPublishedCredentials( + web3Name: Kilt.Did.Web3Name +): Promise { + const api = Kilt.ConfigService.get('api') + + const encodedDidForWeb3Name = await api.call.did.queryByWeb3Name(web3Name) + const { + document: { uri } + } = Kilt.Did.linkedInfoFromChain(encodedDidForWeb3Name) + + console.log(`DID for "${web3Name}": ${uri}`) + + const resolutionResult = await Kilt.Did.resolve(uri) + if (!resolutionResult) { + throw new Error('The DID does not exist on the KILT blockchain.') + } + + const { document } = resolutionResult + // If no details are returned but resolutionResult is not null, the DID has been deleted. + // This information is present in `resolutionResult.metadata.deactivated`. + if (!document) { + throw new Error('The DID has already been deleted.') + } + + // Filter the endpoints by their type. + const credentialEndpoints = document.service?.filter((service) => + service.type.includes(Kilt.KiltPublishedCredentialCollectionV1Type) + ) + + console.log( + `Endpoints of type "${Kilt.KiltPublishedCredentialCollectionV1Type}" for the retrieved DID:` + ) + console.log(JSON.stringify(credentialEndpoints, null, 2)) + + // For demonstration, only the first endpoint and its first URL are considered. + const firstCredentialCollectionEndpointUrl = + credentialEndpoints?.[0]?.serviceEndpoint[0] + if (!firstCredentialCollectionEndpointUrl) { + console.log( + `The DID has no services of type "${Kilt.KiltPublishedCredentialCollectionV1Type}".` + ) + } + + // Retrieve the credentials pointed at by the endpoint. + // Being an IPFS endpoint, the fetching can take an arbitrarily long time or even fail if the timeout is reached. + // In production settings, error cases including those where the result is not a correct JSON should be handled accordingly. + const response = await fetch(firstCredentialCollectionEndpointUrl as string) + const credentialCollection: Kilt.KiltPublishedCredentialCollectionV1 = + await response.json() + console.log(`Credential collection behind the endpoint:`) + console.log(JSON.stringify(credentialCollection, null, 2)) + + // Verify that all credentials are valid and that they all refer to the same subject DID. + await Promise.all( + credentialCollection.map(async ({ credential }) => { + const { revoked } = await Kilt.Credential.verifyCredential(credential) + + // Verify that the credential is not revoked. + if (revoked) { + throw new Error( + 'One of the credentials has been revoked, hence it is not valid.' + ) + } + + // Verify that the credential refers to the intended subject. + if (!Kilt.Did.isSameSubject(credential.claim.owner, uri)) { + throw new Error( + 'One of the credentials refers to a different subject than expected.' + ) + } + }) + ) + + // If none of the above operations throw, the credentials are valid. + console.log('All retrieved credentials are valid! ✅!') + + return credentialCollection +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/web3names/04_release.ts b/versioned_docs/0.3-sdk_examples/src/core_features/web3names/04_release.ts new file mode 100644 index 000000000..4a4bac84a --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/web3names/04_release.ts @@ -0,0 +1,21 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function releaseWeb3Name( + did: Kilt.DidUri, + submitterAccount: Kilt.KiltKeyringPair, + signCallback: Kilt.SignExtrinsicCallback +): Promise { + const api = Kilt.ConfigService.get('api') + + const web3NameReleaseTx = api.tx.web3Names.releaseByOwner() + const authorizedWeb3NameReleaseTx = await Kilt.Did.authorizeTx( + did, + web3NameReleaseTx, + signCallback, + submitterAccount.address + ) + await Kilt.Blockchain.signAndSubmitTx( + authorizedWeb3NameReleaseTx, + submitterAccount + ) +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/web3names/05_reclaim_deposit.ts b/versioned_docs/0.3-sdk_examples/src/core_features/web3names/05_reclaim_deposit.ts new file mode 100644 index 000000000..1283b4118 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/web3names/05_reclaim_deposit.ts @@ -0,0 +1,12 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function reclaimWeb3NameDeposit( + submitterAccount: Kilt.KiltKeyringPair, + web3Name: Kilt.Did.Web3Name +): Promise { + const api = Kilt.ConfigService.get('api') + + // Release the web3name by the deposit payer. + const web3NameReleaseTx = api.tx.web3Names.reclaimDeposit(web3Name) + await Kilt.Blockchain.signAndSubmitTx(web3NameReleaseTx, submitterAccount) +} diff --git a/versioned_docs/0.3-sdk_examples/src/core_features/web3names/index.ts b/versioned_docs/0.3-sdk_examples/src/core_features/web3names/index.ts new file mode 100644 index 000000000..1a49ae271 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/core_features/web3names/index.ts @@ -0,0 +1,78 @@ +import { FetchError } from 'node-fetch' +import { randomUUID } from 'crypto' + +import * as Kilt from '@kiltprotocol/sdk-js' + +import { claimWeb3Name } from './01_claim' +import { createSimpleFullDid } from '../did/04_full_did_simple' +import { queryDidDocument } from './02_query_did_name' +import { queryPublishedCredentials } from './03_query_name_credentials' +import { reclaimWeb3NameDeposit } from './05_reclaim_deposit' +import { releaseWeb3Name } from './04_release' + +import { generateKeypairs } from '../utils/generateKeypairs' + +export async function runAll( + submitterAccount: Kilt.KiltKeyringPair +): Promise { + console.log('Running web3name flow...') + const { authentication } = generateKeypairs() + const fullDid = await createSimpleFullDid( + submitterAccount, + { + authentication + }, + async ({ data }) => ({ + signature: authentication.sign(data), + keyType: authentication.type + }) + ) + const randomWeb3Name = randomUUID().substring(0, 32) + + console.log('1 w3n) Claim web3name') + await claimWeb3Name( + fullDid.uri, + submitterAccount, + randomWeb3Name, + async ({ data }) => ({ + signature: authentication.sign(data), + keyType: authentication.type + }) + ) + console.log('2 w3n) Verify web3name owner and DID web3name') + const doc = await queryDidDocument(randomWeb3Name) + if (doc.uri !== fullDid.uri) { + throw new Error('web3name is registered for a wrong DID') + } + + console.log('3 w3n) Query credentials for "kiltnerd123" web3name') + try { + await queryPublishedCredentials('kiltnerd123') + } catch (e) { + if (e instanceof FetchError) { + console.log( + 'Query credentials for "kiltnerd123" web3name failed because of bad IPFS gateway. Ignoring this.' + ) + } else { + // This one should not have happened. + throw e + } + } + console.log('4 w3n) Release web3name') + await releaseWeb3Name(fullDid.uri, submitterAccount, async ({ data }) => ({ + signature: authentication.sign(data), + keyType: authentication.type + })) + console.log('5 w3n) Re-claim web3name and reclaim deposit') + await claimWeb3Name( + fullDid.uri, + submitterAccount, + randomWeb3Name, + async ({ data }) => ({ + signature: authentication.sign(data), + keyType: authentication.type + }) + ) + await reclaimWeb3NameDeposit(submitterAccount, randomWeb3Name) + console.log('web3name flow completed!') +} diff --git a/versioned_docs/0.3-sdk_examples/src/dapp/dapp/01_domain_linkage_ctype.ts b/versioned_docs/0.3-sdk_examples/src/dapp/dapp/01_domain_linkage_ctype.ts new file mode 100644 index 000000000..818f2b429 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/dapp/dapp/01_domain_linkage_ctype.ts @@ -0,0 +1,33 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function main(): Promise { + const { + creator, + createdAt, + cType: domainLinkageCType + } = await Kilt.CType.fetchFromChain( + 'kilt:ctype:0xb08800a574c436831a2b9fce00fd16e9df489b2b3695e88a0895d148eca0311e' + ) + + console.log(JSON.stringify(domainLinkageCType, null, 2)) + + /** Prints the following definition: + { + "$schema": "ipfs://bafybeiah66wbkhqbqn7idkostj2iqyan2tstc4tpqt65udlhimd7hcxjyq/", + "additionalProperties": false, + "properties": { + "id": { + "type": "string" + }, + "origin": { + "type": "string" + } + }, + "title": "Domain Linkage Credential", + "type": "object", + "$id": "kilt:ctype:0xb08800a574c436831a2b9fce00fd16e9df489b2b3695e88a0895d148eca0311e" + } + */ + return domainLinkageCType +} diff --git a/versioned_docs/0.3-sdk_examples/src/dapp/dapp/02_domain_linkage_claim.ts b/versioned_docs/0.3-sdk_examples/src/dapp/dapp/02_domain_linkage_claim.ts new file mode 100644 index 000000000..578af1f24 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/dapp/dapp/02_domain_linkage_claim.ts @@ -0,0 +1,23 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export function main({ + domainLinkageCType, + didUri +}: { + domainLinkageCType: Kilt.ICType + didUri: Kilt.DidUri +}) { + const claimContents: Kilt.IClaimContents = { + id: didUri, + origin: 'https://example.com' + } + + const claim = Kilt.Claim.fromCTypeAndClaimContents( + domainLinkageCType, + claimContents, + didUri + ) + const domainLinkageCredential = Kilt.Credential.fromClaim(claim) + + return { domainLinkageCredential } +} diff --git a/versioned_docs/0.3-sdk_examples/src/dapp/dapp/03_sign_presentation.ts b/versioned_docs/0.3-sdk_examples/src/dapp/dapp/03_sign_presentation.ts new file mode 100644 index 000000000..dddefe88a --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/dapp/dapp/03_sign_presentation.ts @@ -0,0 +1,30 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function main({ + didUri, + assertionMethodKey, + domainLinkageCredential +}: { + didUri: Kilt.DidUri + assertionMethodKey: Kilt.KiltKeyringPair + domainLinkageCredential: Kilt.ICredential +}) { + // We need the KeyId of the AssertionMethod Key. There is only + // one AssertionMethodKey and its id is stored on the blockchain. + const didResolveResult = await Kilt.Did.resolve(didUri) + if (typeof didResolveResult.document === 'undefined') { + throw new Error('DID must be resolvable (i.e. not deleted)') + } + const assertionMethodKeyId = didResolveResult.document.assertionMethod[0].id + + const domainLinkagePresentation = await Kilt.Credential.createPresentation({ + credential: domainLinkageCredential, + signCallback: async ({ data }) => ({ + signature: assertionMethodKey.sign(data), + keyType: assertionMethodKey.type, + keyUri: `${didUri}${assertionMethodKeyId}` + }) + }) + + return { domainLinkagePresentation } +} diff --git a/versioned_docs/0.3-sdk_examples/src/dapp/dapp/04_attest_credential.ts b/versioned_docs/0.3-sdk_examples/src/dapp/dapp/04_attest_credential.ts new file mode 100644 index 000000000..6d76666cb --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/dapp/dapp/04_attest_credential.ts @@ -0,0 +1,34 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function main({ + didUri, + dappAccount, + assertionMethodKey, + domainLinkageCredential +}: { + didUri: Kilt.DidUri + dappAccount: Kilt.KiltKeyringPair + assertionMethodKey: Kilt.KiltKeyringPair + domainLinkageCredential: Kilt.ICredential +}) { + const api = Kilt.ConfigService.get('api') + const { cTypeHash, claimHash } = Kilt.Attestation.fromCredentialAndDid( + domainLinkageCredential, + didUri + ) + const attestationTx = api.tx.attestation.add(claimHash, cTypeHash, null) + + // We authorize the call using the attestation key of the Dapps DID. + const extrinsic = api.tx.did.dispatchAs(dappAccount.address, attestationTx) + + // Since DIDs can not hold any balance, we pay for the transaction using our blockchain account + const result = await Kilt.Blockchain.signAndSubmitTx(extrinsic, dappAccount) + + if (result.isError) { + console.log('Attestation failed') + } else { + console.log('Attestation successful') + } + return result +} diff --git a/versioned_docs/0.3-sdk_examples/src/dapp/dapp/05_format_credential.ts b/versioned_docs/0.3-sdk_examples/src/dapp/dapp/05_format_credential.ts new file mode 100644 index 000000000..b9a6b3312 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/dapp/dapp/05_format_credential.ts @@ -0,0 +1,58 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function main( + domainLinkagePresentation: Kilt.ICredentialPresentation +) { + const api = Kilt.ConfigService.get('api') + + const credentialSubject = { + ...domainLinkagePresentation.claim.contents, + rootHash: domainLinkagePresentation.rootHash + } + + const encodedAttestationDetails = await api.query.attestation.attestations( + domainLinkagePresentation.rootHash + ) + const issuer = Kilt.Attestation.fromChain( + encodedAttestationDetails, + domainLinkagePresentation.claim.cTypeHash + ).owner + + const issuanceDate = new Date().toISOString() + + const claimerSignature = domainLinkagePresentation.claimerSignature + if (!claimerSignature) { + throw new Error('Claimer signature is required.') + } + + const proof = { + type: 'KILTSelfSigned2020', + proofPurpose: 'assertionMethod', + verificationMethod: claimerSignature.keyUri, + signature: claimerSignature.signature, + challenge: claimerSignature.challenge + } + + const wellKnownDidconfig = { + '@context': 'https://identity.foundation/.well-known/did-configuration/v1', + linked_dids: [ + { + '@context': [ + 'https://www.w3.org/2018/credentials/v1', + 'https://identity.foundation/.well-known/did-configuration/v1' + ], + issuer, + issuanceDate, + type: [ + 'VerifiableCredential', + 'DomainLinkageCredential', + 'KiltCredential2020' + ], + credentialSubject, + proof + } + ] + } + + return wellKnownDidconfig +} diff --git a/versioned_docs/0.3-sdk_examples/src/dapp/dapp/06_dapp_introduction.ts b/versioned_docs/0.3-sdk_examples/src/dapp/dapp/06_dapp_introduction.ts new file mode 100644 index 000000000..b2a20dcef --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/dapp/dapp/06_dapp_introduction.ts @@ -0,0 +1,44 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +// `window` object: Should be used only in the following example. +// Otherwise import directly from the KILT extension library. +// eslint-disable-next-line @typescript-eslint/no-explicit-any +let window: { + kilt: { + sporran: { + startSession: ( + dAppName: string, + dAppEncryptionKeyUri: Kilt.DidResourceUri, + challenge: string + ) => Promise + } + } +} + +export async function main() { + const api = Kilt.ConfigService.get('api') + + const did = 'did:kilt:4smcAoiTiCLaNrGhrAM4wZvt5cMKEGm8f3Cu9aFrpsh5EiNV' + const dAppName = 'Your dApp Name' + + const encodedFullDid = await api.call.did.query(Kilt.Did.toChain(did)) + const { document } = Kilt.Did.linkedInfoFromChain(encodedFullDid) + // If there is no DID, or the DID does not have any key agreement key, return + if (!document.keyAgreement || !document.keyAgreement[0]) { + return + } + const dAppEncryptionKeyUri = + `${document.uri}${document.keyAgreement[0].id}` as Kilt.DidResourceUri + + // Generate and store challenge on the server side for the next step. + const response = await fetch('/challenge') + const challenge = await response.text() + + const session = await window.kilt.sporran.startSession( + dAppName, + dAppEncryptionKeyUri, + challenge + ) + + return session +} diff --git a/versioned_docs/0.3-sdk_examples/src/dapp/dapp/07_session_check.ts b/versioned_docs/0.3-sdk_examples/src/dapp/dapp/07_session_check.ts new file mode 100644 index 000000000..47e0935e4 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/dapp/dapp/07_session_check.ts @@ -0,0 +1,39 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function main({ + session, + keyAgreementKeyPair, + originalChallenge +}: { + session: { + encryptionKeyUri: Kilt.DidResourceUri + encryptedChallenge: string + nonce: string + } + keyAgreementKeyPair: Kilt.KiltEncryptionKeypair + originalChallenge: `0x{string}` +}) { + const { encryptionKeyUri, encryptedChallenge, nonce } = session + const encryptionKey = await Kilt.Did.resolveKey(encryptionKeyUri) + if (!encryptionKey) { + throw new Error('an encryption key is required') + } + + const decryptedBytes = Kilt.Utils.Crypto.decryptAsymmetric( + { box: encryptedChallenge, nonce }, + encryptionKey.publicKey, + keyAgreementKeyPair.secretKey // derived from your seed phrase + ) + // If it fails to decrypt, return. + if (!decryptedBytes) { + throw new Error('Could not decode') + } + + const decryptedChallenge = Kilt.Utils.Crypto.u8aToHex(decryptedBytes) + + // Compare the decrypted challenge to the challenge you stored earlier. + if (decryptedChallenge !== originalChallenge) { + throw new Error('Invalid challenge') + } + return session +} diff --git a/versioned_docs/0.3-sdk_examples/src/dapp/index.ts b/versioned_docs/0.3-sdk_examples/src/dapp/index.ts new file mode 100644 index 000000000..f5afed159 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/dapp/index.ts @@ -0,0 +1,45 @@ +import * as Kilt from '@kiltprotocol/sdk-js' +import { main as attestCredential } from './dapp/04_attest_credential' +import { createFullDid } from '../workshop/attester/generateDid' +import { main as formatCredential } from './dapp/05_format_credential' +import { generateAccount } from '../workshop/attester/generateAccount' +import { generateKeypairs as generateAttesterKeypairs } from '../workshop/attester/generateKeypairs' +import { main as getDomainLinkageCType } from './dapp/01_domain_linkage_ctype' +import { main as getDomainLinkageCredential } from './dapp/02_domain_linkage_claim' +import { getFunds } from '../getFunds' +import { main as signPresentation } from './dapp/03_sign_presentation' + +export async function testDapp(account: Kilt.KeyringPair, wssAddress: string) { + console.log('Running the dapp examples!') + + Kilt.ConfigService.set({ submitTxResolveOn: Kilt.Blockchain.IS_IN_BLOCK }) + await Kilt.connect(wssAddress) + + // Setup attester account. + const { account: dappAccount } = generateAccount() + + await getFunds(account, dappAccount.address, 4) + + // Create attester DID & ensure CType. + const { fullDid: attesterDid } = await createFullDid(dappAccount) + const { assertionMethod: assertionMethodKey } = generateAttesterKeypairs() + + const domainLinkageCType = await getDomainLinkageCType() + const { domainLinkageCredential } = getDomainLinkageCredential({ + domainLinkageCType, + didUri: attesterDid.uri + }) + await attestCredential({ + didUri: attesterDid.uri, + dappAccount, + assertionMethodKey, + domainLinkageCredential + }) + const { domainLinkagePresentation } = await signPresentation({ + didUri: attesterDid.uri, + assertionMethodKey, + domainLinkageCredential + }) + const pseudoVc = await formatCredential(domainLinkagePresentation) + console.log(JSON.stringify(pseudoVc)) +} diff --git a/versioned_docs/0.3-sdk_examples/src/dapp/verifier/01_email_ctype.ts b/versioned_docs/0.3-sdk_examples/src/dapp/verifier/01_email_ctype.ts new file mode 100644 index 000000000..240bc6406 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/dapp/verifier/01_email_ctype.ts @@ -0,0 +1,19 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export function main() { + const emailCType: Kilt.ICType = { + $id: 'kilt:ctype:0xae5bc64e500eb576b7b137288cec5d532094e103be46872f1ad54641e477d9fe', + $schema: + 'ipfs://bafybeiah66wbkhqbqn7idkostj2iqyan2tstc4tpqt65udlhimd7hcxjyq/', + title: 'Email', + properties: { + Email: { + type: 'string' + } + }, + type: 'object', + additionalProperties: false + } + + console.log(emailCType) +} diff --git a/versioned_docs/0.3-sdk_examples/src/dapp/verifier/02_generate_challenge.ts b/versioned_docs/0.3-sdk_examples/src/dapp/verifier/02_generate_challenge.ts new file mode 100644 index 000000000..d2b9f7a5e --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/dapp/verifier/02_generate_challenge.ts @@ -0,0 +1,6 @@ +import { randomAsHex } from '@polkadot/util-crypto' + +// Store somewhere in the backend. +export function generateRequestChallenge() { + return randomAsHex(24) +} diff --git a/versioned_docs/0.3-sdk_examples/src/dapp/verifier/03_create_request_credential_message.ts b/versioned_docs/0.3-sdk_examples/src/dapp/verifier/03_create_request_credential_message.ts new file mode 100644 index 000000000..0bb04cfcb --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/dapp/verifier/03_create_request_credential_message.ts @@ -0,0 +1,40 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export function main({ + verifierDidUri, + session, + requestChallenge +}: { + verifierDidUri: Kilt.DidUri + session: { + encryptionKeyUri: Kilt.DidResourceUri + } + requestChallenge: string +}): { + message: Kilt.IMessage +} { + // The `session` was created earlier in your frontend. Only the session DID URI is sent to your backend. + const { did: claimerSessionDidUri } = Kilt.Did.parse(session.encryptionKeyUri) + + // The message is constructed in your backend + const message = Kilt.Message.fromBody( + { + content: { + cTypes: [ + { + // the hash of the email CType + cTypeHash: + '0x3291bb126e33b4862d421bfaa1d2f272e6cdfc4f96658988fbcffea8914bd9ac', + requiredProperties: ['Email'] + } + ], + challenge: requestChallenge + }, + type: 'request-credential' + }, + verifierDidUri, + claimerSessionDidUri + ) + + return { message } +} diff --git a/versioned_docs/0.3-sdk_examples/src/dapp/verifier/04_encrypt_request_credential_message.ts b/versioned_docs/0.3-sdk_examples/src/dapp/verifier/04_encrypt_request_credential_message.ts new file mode 100644 index 000000000..c0e51dc73 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/dapp/verifier/04_encrypt_request_credential_message.ts @@ -0,0 +1,58 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function main({ + message, + verifierDidUri, + verifierKeys, + session +}: { + message: Kilt.IMessage + verifierDidUri: Kilt.DidUri + verifierKeys: { + authentication: Kilt.KiltKeyringPair + encryption: Kilt.KiltEncryptionKeypair + attestation: Kilt.KiltKeyringPair + delegation: Kilt.KiltKeyringPair + } + session: { + encryptionKeyUri: Kilt.DidResourceUri + send: (message: Kilt.IEncryptedMessage) => Promise + } +}) { + const { document: verifierDidDoc } = await Kilt.Did.resolve(verifierDidUri) + if (!verifierDidDoc) { + throw new Error('The verifier DID must exist') + } + const verifierEncryptionKey = verifierDidDoc.keyAgreement?.[0] + if (!verifierEncryptionKey) { + throw new Error('The verifier DID must have a key agreement key') + } + + // Create a callback that uses the DID encryption key to encrypt the message. + const encryptCallback: Kilt.EncryptCallback = async ({ + data, + peerPublicKey + }) => { + const { box, nonce } = Kilt.Utils.Crypto.encryptAsymmetric( + data, + peerPublicKey, + verifierKeys.encryption.secretKey + ) + return { + data: box, + nonce, + keyUri: `${verifierDidDoc.uri}${verifierEncryptionKey.id}` + } + } + + const encryptedMessage = await Kilt.Message.encrypt( + message, + encryptCallback, + session.encryptionKeyUri + ) + + // Finally, send the encrypted message to the extension. + // While the above code will be executed on the server, this must happen in + // the frontend since it's dispatching the message to the browser extension. + await session.send(encryptedMessage) +} diff --git a/versioned_docs/0.3-sdk_examples/src/dapp/verifier/05_verify_credential_message.ts b/versioned_docs/0.3-sdk_examples/src/dapp/verifier/05_verify_credential_message.ts new file mode 100644 index 000000000..bfacc1782 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/dapp/verifier/05_verify_credential_message.ts @@ -0,0 +1,71 @@ +import '@kiltprotocol/augment-api' +import * as Kilt from '@kiltprotocol/sdk-js' + +type ListenCallback = (message: Kilt.IEncryptedMessage) => Promise + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function isTrustedAttester(_attester: Kilt.DidUri): boolean { + return true +} + +export async function main({ + session, + verifierKeys +}: { + session: { listen: (call: ListenCallback) => ReturnType } + verifierKeys: { + authentication: Kilt.KiltKeyringPair + encryption: Kilt.KiltEncryptionKeypair + attestation: Kilt.KiltKeyringPair + delegation: Kilt.KiltKeyringPair + } +}) { + async function processInBackend(message: Kilt.IEncryptedMessage) { + // Create a callback that uses the DID encryption key to decrypt the message. + const decryptCallback: Kilt.DecryptCallback = async ({ + data, + nonce, + peerPublicKey + }) => { + const result = Kilt.Utils.Crypto.decryptAsymmetric( + { box: data, nonce }, + peerPublicKey, + verifierKeys.encryption.secretKey + ) + if (!result) { + throw new Error('Cannot decrypt') + } + return { + data: result + } + } + + const decryptedMessage = await Kilt.Message.decrypt( + message, + decryptCallback + ) + + if (decryptedMessage.body.type !== 'submit-credential') { + throw new Error('Unexpected message type') + } + const credential = decryptedMessage.body.content[0] + + const { revoked, attester } = + await Kilt.Credential.verifyPresentation(credential) + + if (revoked) { + throw new Error("Credential has been revoked and hence it's not valid.") + } + if (isTrustedAttester(attester)) { + console.log( + "The claim is valid. Claimer's email:", + credential.claim.contents.Email + ) + } + } + + // In the frontend we wait for messages from the browser extension and forward them to the server. + await session.listen(async (message: Kilt.IEncryptedMessage) => { + processInBackend(message) + }) +} diff --git a/versioned_docs/0.3-sdk_examples/src/getFunds.ts b/versioned_docs/0.3-sdk_examples/src/getFunds.ts new file mode 100644 index 000000000..ef3e49cc9 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/getFunds.ts @@ -0,0 +1,68 @@ +import * as Kilt from '@kiltprotocol/sdk-js' +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) + } +} + +export async function getFunds( + faucetAccount: Kilt.KeyringPair, + recipient: Kilt.KiltAddress, + 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') +} + +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 batchTx = api.tx.utility.batchAll(transferBatch) + + await failproofSubmit(batchTx, faucetAccount) + + console.log('Successfully transferred tokens') +} diff --git a/versioned_docs/0.3-sdk_examples/src/staking/index.ts b/versioned_docs/0.3-sdk_examples/src/staking/index.ts new file mode 100644 index 000000000..0674777f7 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/staking/index.ts @@ -0,0 +1,25 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +import { claimCollatorStakingRewards } from './rewards/02_claim_collator_staking_rewards' +import { claimDelegatorStakingRewards } from './rewards/03_claim_delegator_staking_rewards' + +import { getUnclaimedStakingRewards } from './rewards/01_query_staking_rewards' + +// We don't expect these tests to pass yet. +// We would need a collator seed and a delegator seed to test if we can claim rewards. +export async function testStaking(wssAddress: string) { + await Kilt.connect(wssAddress) + + const collator = Kilt.Utils.Crypto.makeKeypairFromUri('//Alice', 'sr25519') + const delegator = Kilt.Utils.Crypto.makeKeypairFromUri('//Charlie', 'sr25519') + + console.log('1) Checking staking rewards') + const rewards = await getUnclaimedStakingRewards(collator.address) + console.log(`Done checking rewards: ${rewards}`) + + console.log('2) Claiming staking rewards') + console.log(`2a) Claiming collator rewards for ${collator.address}`) + await claimCollatorStakingRewards(collator) + console.log(`2b) Claiming delegator rewards for ${delegator.address}`) + await claimDelegatorStakingRewards(delegator) +} diff --git a/versioned_docs/0.3-sdk_examples/src/staking/rewards/01_query_staking_rewards.ts b/versioned_docs/0.3-sdk_examples/src/staking/rewards/01_query_staking_rewards.ts new file mode 100644 index 000000000..37dfab228 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/staking/rewards/01_query_staking_rewards.ts @@ -0,0 +1,10 @@ +import * as Kilt from '@kiltprotocol/sdk-js' +import { Balance } from '@polkadot/types/interfaces' + +export async function getUnclaimedStakingRewards(account: Kilt.KiltAddress) { + const api = Kilt.ConfigService.get('api') + + const rewards = + await api.call.staking.getUnclaimedStakingRewards(account) + return rewards.toBigInt() +} diff --git a/versioned_docs/0.3-sdk_examples/src/staking/rewards/02_claim_collator_staking_rewards.ts b/versioned_docs/0.3-sdk_examples/src/staking/rewards/02_claim_collator_staking_rewards.ts new file mode 100644 index 000000000..af7e1c3ff --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/staking/rewards/02_claim_collator_staking_rewards.ts @@ -0,0 +1,57 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function claimCollatorStakingRewards( + submitterAccount: Kilt.KeyringPair +) { + const api = Kilt.ConfigService.get('api') + + const tx = api.tx.utility.batch([ + // convert collator participation points into rewards + api.tx.parachainStaking.incrementCollatorRewards(), + // mint rewards for collator address + api.tx.parachainStaking.claimRewards() + ]) + + // boilerplate to sign and send tx to websocket + return new Promise((resolve, reject) => + tx.signAndSend(submitterAccount, ({ status, dispatchError }) => { + if (status.isFinalized && !dispatchError) { + onSuccess( + submitterAccount.address, + status.asFinalized.toString(), + resolve + ) + } + if (dispatchError) { + if (dispatchError.isModule) { + // for module errors, we have the section indexed, lookup + const decoded = api.registry.findMetaError(dispatchError.asModule) + const { docs, name, section } = decoded + + const error = new Error(`${section}.${name}: ${docs.join(' ')}`) + onError(error, reject) + } else { + // Other, CannotLookup, BadOrigin, no extra info + const error = new Error(dispatchError.toString()) + onError(error, reject) + } + } + }) + ) +} + +// boilerplate handlers +const onSuccess = ( + address: string, + txHash: string, + resolve: (res: string) => void +) => { + console.log( + `Claimed collator staking rewards for ${address} with tx hash ${txHash}` + ) + resolve(txHash) +} +const onError = (error: Error, reject: (err: Error) => void) => { + console.error(`Failed to claim collator staking rewards due to ${error}`) + reject(error) +} diff --git a/versioned_docs/0.3-sdk_examples/src/staking/rewards/03_claim_delegator_staking_rewards.ts b/versioned_docs/0.3-sdk_examples/src/staking/rewards/03_claim_delegator_staking_rewards.ts new file mode 100644 index 000000000..f7ae26a73 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/staking/rewards/03_claim_delegator_staking_rewards.ts @@ -0,0 +1,57 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function claimDelegatorStakingRewards( + submitterAccount: Kilt.KeyringPair +) { + const api = Kilt.ConfigService.get('api') + + const tx = api.tx.utility.batch([ + // convert delegator participation points into rewards + api.tx.parachainStaking.incrementDelegatorRewards(), + // mint rewards for delegator address + api.tx.parachainStaking.claimRewards() + ]) + + // boilerplate to sign and send tx to websocket + return new Promise((resolve, reject) => + tx.signAndSend(submitterAccount, ({ status, dispatchError }) => { + if (status.isFinalized && !dispatchError) { + onSuccess( + submitterAccount.address, + status.asFinalized.toString(), + resolve + ) + } + if (dispatchError) { + if (dispatchError.isModule) { + // for module errors, we have the section indexed, lookup + const decoded = api.registry.findMetaError(dispatchError.asModule) + const { docs, name, section } = decoded + + const error = new Error(`${section}.${name}: ${docs.join(' ')}`) + onError(error, reject) + } else { + // Other, CannotLookup, BadOrigin, no extra info + const error = new Error(dispatchError.toString()) + onError(error, reject) + } + } + }) + ) +} + +// boilerplate handlers +const onSuccess = ( + address: string, + txHash: string, + resolve: (res: string) => void +) => { + console.log( + `Claimed delegator staking rewards for ${address} with tx hash ${txHash}` + ) + resolve(txHash) +} +const onError = (error: Error, reject: (err: Error) => void) => { + console.error(`Failed to claim delegator staking rewards due to ${error}`) + reject(error) +} diff --git a/versioned_docs/0.3-sdk_examples/src/staking/utility.ts b/versioned_docs/0.3-sdk_examples/src/staking/utility.ts new file mode 100644 index 000000000..02724d798 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/staking/utility.ts @@ -0,0 +1,30 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +export async function signAndSend( + tx: Kilt.SubmittableExtrinsic, + signer: Kilt.KeyringPair, + onSuccess: (txHash: string) => void, + onError: (error: Error) => void +) { + const api = Kilt.ConfigService.get('api') + + return tx.signAndSend(signer, ({ status, dispatchError }) => { + if (status.isFinalized && !dispatchError) { + onSuccess(status.asFinalized.toString()) + } + if (dispatchError) { + if (dispatchError.isModule) { + // for module errors, we have the section indexed, lookup + const decoded = api.registry.findMetaError(dispatchError.asModule) + const { docs, name, section } = decoded + + const error = new Error(`${section}.${name}: ${docs.join(' ')}`) + onError(error) + } else { + // Other, CannotLookup, BadOrigin, no extra info + const error = new Error(dispatchError.toString()) + onError(error) + } + } + }) +} diff --git a/versioned_docs/0.3-sdk_examples/src/test.ts b/versioned_docs/0.3-sdk_examples/src/test.ts new file mode 100644 index 000000000..10c71b2b5 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/test.ts @@ -0,0 +1,88 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +import { config as envConfig } from 'dotenv' +import { hexToU8a } from '@polkadot/util' +import { program } from 'commander' + +import { testCoreFeatures } from './core_features' +import { testDapp } from './dapp' +import { testStaking } from './staking' +import { testWorkshop } from './workshop' +;(async () => { + const whichToRun = { + workshop: false, + dapp: false, + core: false, + staking: false + } + // Can pass specific tests via command line arguments, or run all tests by default. + program.description('Test the code examples used in the KILT documentation.') + program + .command('all', { isDefault: true }) + .description('Run all tests') + .action(() => { + for (const key in whichToRun) { + whichToRun[key] = true + } + }) + program + .command('workshop') + .description('Test code examples inside the workshop') + .action(() => { + whichToRun.workshop = true + }) + program + .command('dapp') + .description('Test code examples inside the DApp section') + .action(() => { + whichToRun.dapp = true + }) + program + .command('core') + .description('Test code examples inside the Core Feature section') + .action(() => { + whichToRun.core = true + }) + program + .command('staking') + .description('Test code examples inside the Staking section') + .action(() => { + whichToRun.staking = true + }) + program.parse() + + envConfig() + await Kilt.init() + const wssAddress = process.env.WSS_ADDRESS || 'wss://peregrine.kilt.io' + const faucetSeed = process.env.FAUCET_SEED + + let [workshopAccount, dappAccount, coreAccount] = new Array(3) + + const faucetAccount = Kilt.Utils.Crypto.makeKeypairFromSeed( + hexToU8a(faucetSeed), + 'sr25519' + ) as Kilt.KeyringPair + workshopAccount = faucetAccount + dappAccount = faucetAccount + coreAccount = faucetAccount + + // If any of these flows fail, just send some more tokens to the account that is failing. + try { + if (whichToRun.workshop) { + await testWorkshop(workshopAccount, wssAddress) + } + if (whichToRun.dapp) { + await testDapp(dappAccount, wssAddress) + } + if (whichToRun.core) { + await testCoreFeatures(coreAccount, wssAddress) + } + if (whichToRun.staking) { + await testStaking(wssAddress) + } + process.exit(0) + } catch (e) { + console.error(e) + process.exit(1) + } +})() diff --git a/code_examples/sdk_examples/src/workshop/attester/attestCredential.ts b/versioned_docs/0.3-sdk_examples/src/workshop/attester/attestCredential.ts similarity index 100% rename from code_examples/sdk_examples/src/workshop/attester/attestCredential.ts rename to versioned_docs/0.3-sdk_examples/src/workshop/attester/attestCredential.ts diff --git a/code_examples/sdk_examples/src/workshop/attester/ctypeSchema.ts b/versioned_docs/0.3-sdk_examples/src/workshop/attester/ctypeSchema.ts similarity index 100% rename from code_examples/sdk_examples/src/workshop/attester/ctypeSchema.ts rename to versioned_docs/0.3-sdk_examples/src/workshop/attester/ctypeSchema.ts diff --git a/code_examples/sdk_examples/src/workshop/attester/generateAccount.ts b/versioned_docs/0.3-sdk_examples/src/workshop/attester/generateAccount.ts similarity index 100% rename from code_examples/sdk_examples/src/workshop/attester/generateAccount.ts rename to versioned_docs/0.3-sdk_examples/src/workshop/attester/generateAccount.ts diff --git a/code_examples/sdk_examples/src/workshop/attester/generateCtype.ts b/versioned_docs/0.3-sdk_examples/src/workshop/attester/generateCtype.ts similarity index 100% rename from code_examples/sdk_examples/src/workshop/attester/generateCtype.ts rename to versioned_docs/0.3-sdk_examples/src/workshop/attester/generateCtype.ts diff --git a/code_examples/sdk_examples/src/workshop/attester/generateDid.ts b/versioned_docs/0.3-sdk_examples/src/workshop/attester/generateDid.ts similarity index 100% rename from code_examples/sdk_examples/src/workshop/attester/generateDid.ts rename to versioned_docs/0.3-sdk_examples/src/workshop/attester/generateDid.ts diff --git a/versioned_docs/0.3-sdk_examples/src/workshop/attester/generateKeypairs.ts b/versioned_docs/0.3-sdk_examples/src/workshop/attester/generateKeypairs.ts new file mode 100644 index 000000000..d2ace38cf --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/workshop/attester/generateKeypairs.ts @@ -0,0 +1,27 @@ +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/claimer/createClaim.ts b/versioned_docs/0.3-sdk_examples/src/workshop/claimer/createClaim.ts similarity index 100% rename from code_examples/sdk_examples/src/workshop/claimer/createClaim.ts rename to versioned_docs/0.3-sdk_examples/src/workshop/claimer/createClaim.ts diff --git a/code_examples/sdk_examples/src/workshop/claimer/createPresentation.ts b/versioned_docs/0.3-sdk_examples/src/workshop/claimer/createPresentation.ts similarity index 100% rename from code_examples/sdk_examples/src/workshop/claimer/createPresentation.ts rename to versioned_docs/0.3-sdk_examples/src/workshop/claimer/createPresentation.ts diff --git a/code_examples/sdk_examples/src/workshop/claimer/generateAccount.ts b/versioned_docs/0.3-sdk_examples/src/workshop/claimer/generateAccount.ts similarity index 100% rename from code_examples/sdk_examples/src/workshop/claimer/generateAccount.ts rename to versioned_docs/0.3-sdk_examples/src/workshop/claimer/generateAccount.ts diff --git a/code_examples/sdk_examples/src/workshop/claimer/generateCredential.ts b/versioned_docs/0.3-sdk_examples/src/workshop/claimer/generateCredential.ts similarity index 100% rename from code_examples/sdk_examples/src/workshop/claimer/generateCredential.ts rename to versioned_docs/0.3-sdk_examples/src/workshop/claimer/generateCredential.ts diff --git a/code_examples/sdk_examples/src/workshop/claimer/generateKeypairs.ts b/versioned_docs/0.3-sdk_examples/src/workshop/claimer/generateKeypairs.ts similarity index 100% rename from code_examples/sdk_examples/src/workshop/claimer/generateKeypairs.ts rename to versioned_docs/0.3-sdk_examples/src/workshop/claimer/generateKeypairs.ts diff --git a/code_examples/sdk_examples/src/workshop/claimer/generateLightDid.ts b/versioned_docs/0.3-sdk_examples/src/workshop/claimer/generateLightDid.ts similarity index 100% rename from code_examples/sdk_examples/src/workshop/claimer/generateLightDid.ts rename to versioned_docs/0.3-sdk_examples/src/workshop/claimer/generateLightDid.ts diff --git a/versioned_docs/0.3-sdk_examples/src/workshop/index.ts b/versioned_docs/0.3-sdk_examples/src/workshop/index.ts new file mode 100644 index 000000000..1dc8ff550 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/src/workshop/index.ts @@ -0,0 +1,70 @@ +import * as Kilt from '@kiltprotocol/sdk-js' + +import { attestingFlow } from './attester/attestCredential' +import { createFullDid } from './attester/generateDid' +import { ensureStoredCtype } from './attester/generateCtype' +import { generateAccount } from './attester/generateAccount' +import { generateKeypairs as generateAttesterKeypairs } from './attester/generateKeypairs' +import { generateKeypairs as generateClaimerKeypairs } from './claimer/generateKeypairs' +import { generateCredential } from './claimer/generateCredential' +import { generateLightDid } from './claimer/generateLightDid' +import { getFunds } from '../getFunds' +import { verificationFlow } from './verify' + +export async function testWorkshop( + account: Kilt.KeyringPair, + wssAddress: string +) { + console.log('Running the workshop!') + + Kilt.ConfigService.set({ submitTxResolveOn: Kilt.Blockchain.IS_IN_BLOCK }) + await Kilt.connect(wssAddress) + + // 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) + + generateCredential(lightDid.uri, { + age: 27, + name: 'Karl' + }) + + await getFunds(account, attesterAccount.address, 5) + + // Create attester DID & ensure CType. + const { fullDid: attesterDid } = await createFullDid(attesterAccount) + const { assertionMethod } = generateAttesterKeypairs() + + await ensureStoredCtype( + attesterAccount, + attesterDid.uri, + async ({ data }) => ({ + signature: assertionMethod.sign(data), + keyType: assertionMethod.type + }) + ) + + // Do attestation & verification. + const credential = await attestingFlow( + lightDid.uri, + attesterAccount, + attesterDid.uri, + async ({ data }) => ({ + signature: assertionMethod.sign(data), + keyType: assertionMethod.type + }) + ) + await verificationFlow( + credential, + async ({ data }) => ({ + signature: authentication.sign(data), + keyType: authentication.type, + keyUri: `${lightDid.uri}${lightDid.authentication[0].id}` + }), + [attesterDid.uri] + ) +} diff --git a/code_examples/sdk_examples/src/workshop/verify.ts b/versioned_docs/0.3-sdk_examples/src/workshop/verify.ts similarity index 100% rename from code_examples/sdk_examples/src/workshop/verify.ts rename to versioned_docs/0.3-sdk_examples/src/workshop/verify.ts diff --git a/versioned_docs/0.3-sdk_examples/tsconfig.json b/versioned_docs/0.3-sdk_examples/tsconfig.json new file mode 100644 index 000000000..02f3c8178 --- /dev/null +++ b/versioned_docs/0.3-sdk_examples/tsconfig.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "esModuleInterop": true, + "moduleResolution": "node", + "skipLibCheck": true, + "target": "ES2020" + }, + "exclude": [ + "src/test.ts" + ] +} diff --git a/versioned_docs/version-0.3/01_sdk/01_quickstart.md b/versioned_docs/version-0.3/01_sdk/01_quickstart.md new file mode 100644 index 000000000..fbac5cec0 --- /dev/null +++ b/versioned_docs/version-0.3/01_sdk/01_quickstart.md @@ -0,0 +1,227 @@ +--- +id: quickstart +title: Quickstart +--- + +import CodeBlock from '@theme/CodeBlock'; +import SnippetBlock from '@site/src/components/SnippetBlock'; +import TsJsSnippet from '@site/src/components/TsJsSnippet'; +import TsJsBlock from '@site/src/components/TsJsBlock'; +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +import PrintHelloWorld from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/getting_started/01_print_hello_world.ts'; +import ConnectSpirit from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/getting_started/02_connect_spirit.ts'; +import ConnectPere from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/getting_started/02_connect_pere.ts'; +import FetchDid from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/getting_started/03_fetch_did.ts'; +import FetchEndpoints from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/getting_started/04_fetch_endpoints.ts'; +import FetchEndpointData from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/getting_started/05_fetch_endpoint_data.ts'; +import VerifyCredential from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/getting_started/06_verify_credential.ts'; +import Disconnect from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/getting_started/07_disconnect.ts'; + +Get started with KILT by following this guide, which teaches you to: + +1. Import the **KILT SDK** into your project +2. Connect to the **KILT blockchain** +3. Query a **web3name** to retrieve its **DID** +4. Verify a **credential** using a **DID service** + +:::info Prerequisites + +This quickstart guide provides hands-on experience to enhance your understanding of KILT. +Basic knowledge of JavaScript and command-line tools is recommended. + +::: + +## Setup + +Create a new project and directory and move into the directory by running `mkdir kilt-rocks && cd kilt-rocks`. + + + + +Inside the `kilt-rocks` project directory, install the **KILT SDK**, **Typescript**, **ts-node**, and **Axios** dependencies: + +```bash npm2yarn +npm init -y +npm install @kiltprotocol/sdk-js ts-node typescript axios +``` + +With the required dependencies installed, create a TypeScript file with `touch quickstart.ts`. + + + + +From inside the `kilt-rocks` project directory, install the **KILT SDK**, **Node**, and **Axios** dependencies: + +```bash npm2yarn +npm init -y +npm install @kiltprotocol/sdk-js node axios +``` + +With the required dependencies installed, create a JavaScript file with `touch quickstart.js`. + +To enable ES modules in your project, add `"type": "module"` to the `package.json` file. + + + + +Declare an `async main` function in the `quickstart.ts` file that executes the rest of the code in this quickstart and call the `main()` function by default: + +{/* TODO: Do we need to test this or provide JS/TS equivalent? */} + +```js +async function main() { +} + +main() +``` + +**With the setup completed, let's get started! 🔥** + +### Import the KILT SDK + +Begin by importing the **KILT SDK** and **Axios** at the top of the file: + +```js +import * as Kilt from '@kiltprotocol/sdk-js' +import axios from 'axios' +``` + +Now, you can access the SDK and all its functionality. +The next step is connecting to the **KILT blockchain**. + +### Connect to the KILT Blockchain + +To perform operations that rely on the **KILT blockchain**, such as querying and verifying a credential, you must first connect to the **KILT blockchain**. + +Within the `main` function, configure the SDK to connect to a KILT node using the `Kilt.connect()` method: + + + +

Peregrine is the development blockchain. + Connect to this network for testing and development purposes.

+ + {ConnectPere} + +
+ +

Spiritnet is the production blockchain. + When you are ready to publish your DApp, connect to the Spiritnet network for production purposes.

+ + {ConnectSpirit} + +
+
+ +To ensure proper cleanup, call the `Kilt.disconnect()` function at the bottom of the `main()` function. +You should add all other code before this function call: + + +{Disconnect} + + +By adding `await Kilt.disconnect()`, you ensure that the connection to the blockchain node is properly closed when the script finishes executing, which helps maintain the integrity of your application and is a good practice to follow. + +Run the code by calling the name of the file. +If you set up everything correctly, you should see no output showing that your code connected to the **KILT blockchain**. + + + + +```bash +yarn ts-node quickstart.ts +``` + + + + +```bash +node quickstart.js +``` + + + + +As you add to the code in this file, you can always run it with the same command. + +**Congratulations! 🔥** + +You have connected to a KILT blockchain node. +The next step is to start querying data from the blockchain. + +## Query a KILT Identity + +The following code queries information related to a **web3name** (`kiltnerd123`) and uses it to retrieve the **KILT DID** linked to it. + +Between the `Kilt.connect()` and `Kilt.disconnect()` lines, add the following code: + + +{FetchDid} + + +Try running the code and check the result. + +Did you get the DID? You now have `kiltnerd123`'s DID. +The next step is to see if `kiltnerd123` has any publicly linked KILT credentials to retrieve and verify. + +## Retrieve and Verify a Credential + +A **KILT DID** can expose services that allow external resources to be linked to the DID. +**KILT credentials** represent one type of external resource. + +You can retrieve the **services** attached to kiltnerd123's DID and see if they link to any public credentials to **query** and **verify**. + +Add the following code after the code you added in the previous step but before the `await Kilt.disconnect()`. +It retrieves the services exposed by the DID found for `kiltnerd123`: + + +{FetchEndpoints} + + +The code should print endpoints as JSON. + +The next step is to see if you can find a credential among them. +You do this by selecting one of the endpoints and querying the URL to see if it returns a KILT credential collection as described in the [KiltPublishedCredentialCollectionV1 specification](https://github.com/KILTprotocol/spec-KiltPublishedCredentialCollectionV1). + +Add the following code after the code you added in the previous step but before `await Kilt.disconnect()`: + + + {FetchEndpointData} + + +If the script completes without errors, you retrieved the published credential using the URL specified in the service. + +The next step is to make sure the credential is **valid** and has a valid **structure**. + +The following code outputs a string depending on whether the credential is valid, revoked, or not valid. +Add it before `await Kilt.disconnect()`: + + +{VerifyCredential} + + +Run the code and wait to see if you can retrieve **and** verify one of kiltnerd123's credentials! + +:::info Next steps + +- If you want to explore more of KILT's features, read our [Concepts section](/concepts/what-is-kilt). +- If you want to dive deeper into the SDK, read the next section, [the KILT Cookbook](./02_cookbook/01_dids/01_light_did_creation.md). + +::: diff --git a/docs/develop/01_sdk/02_cookbook/01_dids/00_generate_keys.md b/versioned_docs/version-0.3/01_sdk/02_cookbook/01_dids/00_generate_keys.md similarity index 96% rename from docs/develop/01_sdk/02_cookbook/01_dids/00_generate_keys.md rename to versioned_docs/version-0.3/01_sdk/02_cookbook/01_dids/00_generate_keys.md index 1553de1f2..bae437d8b 100644 --- a/docs/develop/01_sdk/02_cookbook/01_dids/00_generate_keys.md +++ b/versioned_docs/version-0.3/01_sdk/02_cookbook/01_dids/00_generate_keys.md @@ -5,7 +5,7 @@ title: Generate DID keys import TsJsBlock from '@site/src/components/TsJsBlock'; -import GenerateKeys from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/did/00_generate_did_keys.ts'; +import GenerateKeys from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/did/00_generate_did_keys.ts'; Creating a Decentralized Identifier (DID) on the KILT network involves generating keying material for authentication and encryption. This guide shows how to create a set of key pairs suitable for generating a KILT DID. diff --git a/docs/develop/01_sdk/02_cookbook/01_dids/01_light_did_creation.md b/versioned_docs/version-0.3/01_sdk/02_cookbook/01_dids/01_light_did_creation.md similarity index 85% rename from docs/develop/01_sdk/02_cookbook/01_dids/01_light_did_creation.md rename to versioned_docs/version-0.3/01_sdk/02_cookbook/01_dids/01_light_did_creation.md index 01c59ac8b..04a200a4c 100644 --- a/docs/develop/01_sdk/02_cookbook/01_dids/01_light_did_creation.md +++ b/versioned_docs/version-0.3/01_sdk/02_cookbook/01_dids/01_light_did_creation.md @@ -5,8 +5,8 @@ title: Create a Light DID import TsJsBlock from '@site/src/components/TsJsBlock'; -import LightDidSimple from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/did/01_light_did_simple.ts'; -import LightDidComplete from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/did/02_light_did_complete.ts'; +import LightDidSimple from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/did/01_light_did_simple.ts'; +import LightDidComplete from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/did/02_light_did_complete.ts'; The creation of a light DID requires the generation of some keying material for keys that are to be used for authentication and encryption. For the sake of ease of use, the example snippets below show how to use keys generated with a `Keyring`, provided also by the `@polkadot/api` library, to generate key pairs that are kept in memory and disappear at the end of the program execution, unless saved to some persistent storage. diff --git a/docs/develop/01_sdk/02_cookbook/01_dids/02_full_did_creation.md b/versioned_docs/version-0.3/01_sdk/02_cookbook/01_dids/02_full_did_creation.md similarity index 70% rename from docs/develop/01_sdk/02_cookbook/01_dids/02_full_did_creation.md rename to versioned_docs/version-0.3/01_sdk/02_cookbook/01_dids/02_full_did_creation.md index 389e8e940..0fbdc6e90 100644 --- a/docs/develop/01_sdk/02_cookbook/01_dids/02_full_did_creation.md +++ b/versioned_docs/version-0.3/01_sdk/02_cookbook/01_dids/02_full_did_creation.md @@ -5,9 +5,9 @@ title: Create a Full DID import TsJsBlock from '@site/src/components/TsJsBlock'; -import FullDidSimple from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/did/04_full_did_simple.ts'; -import FullDidComplete from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/did/05_full_did_complete.ts'; -import LightDidMigrate from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/did/03_light_did_migrate.ts'; +import FullDidSimple from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/did/04_full_did_simple.ts'; +import FullDidComplete from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/did/05_full_did_complete.ts'; +import LightDidMigrate from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/did/03_light_did_migrate.ts'; The following is an example of how to create and write on the blockchain a full DID that specifies only an authentication key. diff --git a/docs/develop/01_sdk/02_cookbook/01_dids/03_full_did_update.md b/versioned_docs/version-0.3/01_sdk/02_cookbook/01_dids/03_full_did_update.md similarity index 78% rename from docs/develop/01_sdk/02_cookbook/01_dids/03_full_did_update.md rename to versioned_docs/version-0.3/01_sdk/02_cookbook/01_dids/03_full_did_update.md index 688385841..990ebe56a 100644 --- a/docs/develop/01_sdk/02_cookbook/01_dids/03_full_did_update.md +++ b/versioned_docs/version-0.3/01_sdk/02_cookbook/01_dids/03_full_did_update.md @@ -5,7 +5,7 @@ title: Update a Full DID keys and service endpoints import TsJsBlock from '@site/src/components/TsJsBlock'; -import FullDidUpdate from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/did/07_full_did_update.ts'; +import FullDidUpdate from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/did/07_full_did_update.ts'; Once anchored to the KILT blockchain, a full DID can be updated. For instance, the following snippet shows how to use the `authorizeBatch` function to update the authentication key, remove an old service *and* add a new one for a full DID in the same transaction. diff --git a/docs/develop/01_sdk/02_cookbook/01_dids/04_did_query.md b/versioned_docs/version-0.3/01_sdk/02_cookbook/01_dids/04_did_query.md similarity index 84% rename from docs/develop/01_sdk/02_cookbook/01_dids/04_did_query.md rename to versioned_docs/version-0.3/01_sdk/02_cookbook/01_dids/04_did_query.md index 99f68590b..9034f80f1 100644 --- a/docs/develop/01_sdk/02_cookbook/01_dids/04_did_query.md +++ b/versioned_docs/version-0.3/01_sdk/02_cookbook/01_dids/04_did_query.md @@ -5,7 +5,7 @@ title: Resolve a DID import TsJsBlock from '@site/src/components/TsJsBlock'; -import DidQuery from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/did/06_did_query.ts'; +import DidQuery from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/did/06_did_query.ts'; Querying the state of a DID is called **resolution**. The entity that queries the DID Document for a given DID, i.e., resolves it, is called a **resolver**. diff --git a/docs/develop/01_sdk/02_cookbook/01_dids/05_full_did_delete.md b/versioned_docs/version-0.3/01_sdk/02_cookbook/01_dids/05_full_did_delete.md similarity index 76% rename from docs/develop/01_sdk/02_cookbook/01_dids/05_full_did_delete.md rename to versioned_docs/version-0.3/01_sdk/02_cookbook/01_dids/05_full_did_delete.md index 4e4232956..7b22695d2 100644 --- a/docs/develop/01_sdk/02_cookbook/01_dids/05_full_did_delete.md +++ b/versioned_docs/version-0.3/01_sdk/02_cookbook/01_dids/05_full_did_delete.md @@ -5,8 +5,8 @@ title: Delete a Full DID import TsJsBlock from '@site/src/components/TsJsBlock'; -import FullDidDelete from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/did/11_full_did_delete.ts'; -import FullDidDepositReclaim from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/did/13_full_did_deposit_reclaim.ts'; +import FullDidDelete from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/did/11_full_did_delete.ts'; +import FullDidDepositReclaim from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/did/13_full_did_deposit_reclaim.ts'; Once a DID is no longer needed, it is recommended to deactivate it by removing it from the KILT blockchain. The following snippet shows how to do it: diff --git a/docs/develop/01_sdk/02_cookbook/01_dids/06_full_did_tx.md b/versioned_docs/version-0.3/01_sdk/02_cookbook/01_dids/06_full_did_tx.md similarity index 90% rename from docs/develop/01_sdk/02_cookbook/01_dids/06_full_did_tx.md rename to versioned_docs/version-0.3/01_sdk/02_cookbook/01_dids/06_full_did_tx.md index ace83349e..151fb2e6e 100644 --- a/docs/develop/01_sdk/02_cookbook/01_dids/06_full_did_tx.md +++ b/versioned_docs/version-0.3/01_sdk/02_cookbook/01_dids/06_full_did_tx.md @@ -5,8 +5,8 @@ title: Build DID Extrinsics import TsJsBlock from '@site/src/components/TsJsBlock'; -import FullDidSignTx from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/did/09_full_did_tx.ts'; -import FullDidBatch from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/did/08_full_did_batch.ts'; +import FullDidSignTx from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/did/09_full_did_tx.ts'; +import FullDidBatch from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/did/08_full_did_batch.ts'; DID keys can be used to sign extrinsic. But not every extrinsic can be signed using a DID. diff --git a/docs/develop/01_sdk/02_cookbook/01_dids/07_did_signature.md b/versioned_docs/version-0.3/01_sdk/02_cookbook/01_dids/07_did_signature.md similarity index 89% rename from docs/develop/01_sdk/02_cookbook/01_dids/07_did_signature.md rename to versioned_docs/version-0.3/01_sdk/02_cookbook/01_dids/07_did_signature.md index 7c6659fb4..7eb5a8ea8 100644 --- a/docs/develop/01_sdk/02_cookbook/01_dids/07_did_signature.md +++ b/versioned_docs/version-0.3/01_sdk/02_cookbook/01_dids/07_did_signature.md @@ -5,7 +5,7 @@ title: Generate and Verify a DID Signature import TsJsBlock from '@site/src/components/TsJsBlock'; -import DidSignature from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/did/10_did_signature.ts'; +import DidSignature from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/did/10_did_signature.ts'; In addition to being used to authorize chain operations, both light and full DIDs have off-chain applications. diff --git a/docs/develop/01_sdk/02_cookbook/01_dids/08_did_export.md b/versioned_docs/version-0.3/01_sdk/02_cookbook/01_dids/08_did_export.md similarity index 88% rename from docs/develop/01_sdk/02_cookbook/01_dids/08_did_export.md rename to versioned_docs/version-0.3/01_sdk/02_cookbook/01_dids/08_did_export.md index 8b53f209d..8655b620a 100644 --- a/docs/develop/01_sdk/02_cookbook/01_dids/08_did_export.md +++ b/versioned_docs/version-0.3/01_sdk/02_cookbook/01_dids/08_did_export.md @@ -5,7 +5,7 @@ title: Exporting a KILT DID import TsJsBlock from '@site/src/components/TsJsBlock'; -import DidExport from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/did/12_did_export.ts'; +import DidExport from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/did/12_did_export.ts'; The DID Document exporter provides the functionality needed to convert an instance of an SDK `DidDocument` object into a document that is compliant with the [W3C specification](https://www.w3.org/TR/did-core/). This component is required for the KILT plugin for the [DIF Universal Resolver](https://dev.uniresolver.io/). diff --git a/docs/develop/01_sdk/02_cookbook/01_dids/_category_.json b/versioned_docs/version-0.3/01_sdk/02_cookbook/01_dids/_category_.json similarity index 100% rename from docs/develop/01_sdk/02_cookbook/01_dids/_category_.json rename to versioned_docs/version-0.3/01_sdk/02_cookbook/01_dids/_category_.json diff --git a/docs/develop/01_sdk/02_cookbook/02_web3names/01_claim.md b/versioned_docs/version-0.3/01_sdk/02_cookbook/02_web3names/01_claim.md similarity index 86% rename from docs/develop/01_sdk/02_cookbook/02_web3names/01_claim.md rename to versioned_docs/version-0.3/01_sdk/02_cookbook/02_web3names/01_claim.md index 88f687ba8..5fabe6439 100644 --- a/docs/develop/01_sdk/02_cookbook/02_web3names/01_claim.md +++ b/versioned_docs/version-0.3/01_sdk/02_cookbook/02_web3names/01_claim.md @@ -5,7 +5,7 @@ title: Claim a web3name import TsJsBlock from '@site/src/components/TsJsBlock'; -import Claim from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/web3names/01_claim.ts'; +import Claim from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/web3names/01_claim.ts'; A web3name can be claimed if it currently has no owner, using the following snippet as reference. diff --git a/docs/develop/01_sdk/02_cookbook/02_web3names/02_credential_query.md b/versioned_docs/version-0.3/01_sdk/02_cookbook/02_web3names/02_credential_query.md similarity index 88% rename from docs/develop/01_sdk/02_cookbook/02_web3names/02_credential_query.md rename to versioned_docs/version-0.3/01_sdk/02_cookbook/02_web3names/02_credential_query.md index 9213f6810..2bd0adf5f 100644 --- a/docs/develop/01_sdk/02_cookbook/02_web3names/02_credential_query.md +++ b/versioned_docs/version-0.3/01_sdk/02_cookbook/02_web3names/02_credential_query.md @@ -5,7 +5,7 @@ title: Query Public Credentials for a web3name import TsJsBlock from '@site/src/components/TsJsBlock'; -import QueryNameCredentials from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/web3names/03_query_name_credentials.ts'; +import QueryNameCredentials from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/web3names/03_query_name_credentials.ts'; web3names are linked to KILT DIDs, and KILT DIDs can define services to expose additional service/information. One of the possible endpoint types is the [`KiltPublishedCredentialCollectionV1`][kilt-published-credential-collection-v1-type] type. diff --git a/docs/develop/01_sdk/02_cookbook/02_web3names/03_release.md b/versioned_docs/version-0.3/01_sdk/02_cookbook/02_web3names/03_release.md similarity index 89% rename from docs/develop/01_sdk/02_cookbook/02_web3names/03_release.md rename to versioned_docs/version-0.3/01_sdk/02_cookbook/02_web3names/03_release.md index a22050964..034396a22 100644 --- a/docs/develop/01_sdk/02_cookbook/02_web3names/03_release.md +++ b/versioned_docs/version-0.3/01_sdk/02_cookbook/02_web3names/03_release.md @@ -5,8 +5,8 @@ title: Release a web3name import TsJsBlock from '@site/src/components/TsJsBlock'; -import Release from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/web3names/04_release.ts'; -import ReclaimDeposit from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/web3names/05_reclaim_deposit.ts'; +import Release from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/web3names/04_release.ts'; +import ReclaimDeposit from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/web3names/05_reclaim_deposit.ts'; If a web3name is no longer needed, either the DID owner or the deposit payer can release it, with deposit being released and returned to the original payer. diff --git a/docs/develop/01_sdk/02_cookbook/02_web3names/04_query.md b/versioned_docs/version-0.3/01_sdk/02_cookbook/02_web3names/04_query.md similarity index 88% rename from docs/develop/01_sdk/02_cookbook/02_web3names/04_query.md rename to versioned_docs/version-0.3/01_sdk/02_cookbook/02_web3names/04_query.md index 8112e5886..0baadaddd 100644 --- a/docs/develop/01_sdk/02_cookbook/02_web3names/04_query.md +++ b/versioned_docs/version-0.3/01_sdk/02_cookbook/02_web3names/04_query.md @@ -5,7 +5,7 @@ title: Resolve a web3name import TsJsBlock from '@site/src/components/TsJsBlock'; -import QueryDid from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/web3names/02_query_did_name.ts'; +import QueryDid from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/web3names/02_query_did_name.ts'; A web3name can be resolved in a similar manner to [how a DID is resolved](../01_dids/04_did_query.md). diff --git a/docs/develop/01_sdk/02_cookbook/02_web3names/_category_.json b/versioned_docs/version-0.3/01_sdk/02_cookbook/02_web3names/_category_.json similarity index 100% rename from docs/develop/01_sdk/02_cookbook/02_web3names/_category_.json rename to versioned_docs/version-0.3/01_sdk/02_cookbook/02_web3names/_category_.json diff --git a/docs/develop/01_sdk/02_cookbook/03_account_linking/01_link.md b/versioned_docs/version-0.3/01_sdk/02_cookbook/03_account_linking/01_link.md similarity index 84% rename from docs/develop/01_sdk/02_cookbook/03_account_linking/01_link.md rename to versioned_docs/version-0.3/01_sdk/02_cookbook/03_account_linking/01_link.md index db6735186..f6c0a303f 100644 --- a/docs/develop/01_sdk/02_cookbook/03_account_linking/01_link.md +++ b/versioned_docs/version-0.3/01_sdk/02_cookbook/03_account_linking/01_link.md @@ -7,11 +7,11 @@ import TsJsBlock from '@site/src/components/TsJsBlock'; import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -import SubAccLink from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/linking/01_sub_link.ts'; -import EthAccLink from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/linking/01_eth_link.ts'; -import EthWeb3AccLink from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/linking/01_eth_link_web3js.ts'; -import EthMetamaskAccLink from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/linking/01_eth_link_metamask.ts'; -import SenderLink from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/linking/02_sender_link.ts'; +import SubAccLink from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/linking/01_sub_link.ts'; +import EthAccLink from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/linking/01_eth_link.ts'; +import EthWeb3AccLink from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/linking/01_eth_link_web3js.ts'; +import EthMetamaskAccLink from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/linking/01_eth_link_metamask.ts'; +import SenderLink from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/linking/02_sender_link.ts'; Sometimes there is the need to link a DID to an account publicly. The link makes it possible to lookup a DID for an account. diff --git a/docs/develop/01_sdk/02_cookbook/03_account_linking/02_account_name.md b/versioned_docs/version-0.3/01_sdk/02_cookbook/03_account_linking/02_account_name.md similarity index 71% rename from docs/develop/01_sdk/02_cookbook/03_account_linking/02_account_name.md rename to versioned_docs/version-0.3/01_sdk/02_cookbook/03_account_linking/02_account_name.md index ed7357fb6..c54177c56 100644 --- a/docs/develop/01_sdk/02_cookbook/03_account_linking/02_account_name.md +++ b/versioned_docs/version-0.3/01_sdk/02_cookbook/03_account_linking/02_account_name.md @@ -5,8 +5,8 @@ title: Query the web3name of an Account import TsJsBlock from '@site/src/components/TsJsBlock'; -import AccountWeb3NameQuery from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/linking/03_account_web3name_query.ts'; -import AccountWeb3NameQueryNoSDK from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/linking/04_account_web3name_query_no_sdk.ts'; +import AccountWeb3NameQuery from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/linking/03_account_web3name_query.ts'; +import AccountWeb3NameQueryNoSDK from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/linking/04_account_web3name_query_no_sdk.ts'; For accounts that have been linked to DIDs that have claimed a web3name, the linking feature opens the way to a host of possibilities, e.g., showing the web3name of a collator's account on the [KILT Stakeboard][kilt-stakeboard]. diff --git a/docs/develop/01_sdk/02_cookbook/03_account_linking/03_unlink.md b/versioned_docs/version-0.3/01_sdk/02_cookbook/03_account_linking/03_unlink.md similarity index 65% rename from docs/develop/01_sdk/02_cookbook/03_account_linking/03_unlink.md rename to versioned_docs/version-0.3/01_sdk/02_cookbook/03_account_linking/03_unlink.md index 08711f178..3c10ed453 100644 --- a/docs/develop/01_sdk/02_cookbook/03_account_linking/03_unlink.md +++ b/versioned_docs/version-0.3/01_sdk/02_cookbook/03_account_linking/03_unlink.md @@ -5,9 +5,9 @@ title: Unlink an Account From a KILT DID import TsJsBlock from '@site/src/components/TsJsBlock'; -import DidUnlink from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/linking/05_did_unlink.ts'; -import AccountUnlink from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/linking/06_account_unlink.ts'; -import ReclaimDeposit from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/linking/07_reclaim_deposit.ts'; +import DidUnlink from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/linking/05_did_unlink.ts'; +import AccountUnlink from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/linking/06_account_unlink.ts'; +import ReclaimDeposit from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/linking/07_reclaim_deposit.ts'; Similar to the way a new account to DID link is created, removing a link can happen in one of three ways: diff --git a/docs/develop/01_sdk/02_cookbook/03_account_linking/_category_.json b/versioned_docs/version-0.3/01_sdk/02_cookbook/03_account_linking/_category_.json similarity index 100% rename from docs/develop/01_sdk/02_cookbook/03_account_linking/_category_.json rename to versioned_docs/version-0.3/01_sdk/02_cookbook/03_account_linking/_category_.json diff --git a/versioned_docs/version-0.3/01_sdk/02_cookbook/04_claiming/01_ctype_creation.md b/versioned_docs/version-0.3/01_sdk/02_cookbook/04_claiming/01_ctype_creation.md new file mode 100644 index 000000000..85c01eb68 --- /dev/null +++ b/versioned_docs/version-0.3/01_sdk/02_cookbook/04_claiming/01_ctype_creation.md @@ -0,0 +1,44 @@ +--- +id: ctype-creation +title: Create a CType +--- + +import TsJsBlock from '@site/src/components/TsJsBlock'; + +import CreateCType from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/claiming/01_create_ctype.ts'; +import FetchCType from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/claiming/02_fetch_ctype.ts'; + +Every KILT credential has to conform to a CType. +A CType describes which properties a credential has and what type these properties have. +CTypes must be registered on the Spiritnet blockchain. +To learn more about CTypes, see the [CType concept section](/concepts/credentials/ctypes). + +The creation of a CType in KILT involves two steps: the definition of a CType and the anchoring of its hash on the KILT blockchain. + +:::info DID required +The creator of a CType is required to have a full DID with an attestation key. +To see how to manage DIDs, please refer to the [DID section](../01_dids/03_full_did_update.md). +::: + +:::info CTypes are unique +The creation of a new CType requires the CType hash to be unique. +Before writing a new CType, Attesters should check whether there is already an existing CType which matches their requirements. + +Visit our [CType index repository](https://github.com/KILTprotocol/ctype-index) for a non-exhaustive list of existing CTypes. +::: + +The following snippets show how to create a CType: + + + {CreateCType} + + + +## Retrieve a CType from its ID + +CTypes can be queried directly from any KILT archive nodes. +The following example shows how to query a CType using the SDK: + + + {FetchCType} + diff --git a/docs/develop/01_sdk/02_cookbook/04_claiming/02_attestation_request.md b/versioned_docs/version-0.3/01_sdk/02_cookbook/04_claiming/02_attestation_request.md similarity index 83% rename from docs/develop/01_sdk/02_cookbook/04_claiming/02_attestation_request.md rename to versioned_docs/version-0.3/01_sdk/02_cookbook/04_claiming/02_attestation_request.md index bd602126f..c1cd3c5ed 100644 --- a/docs/develop/01_sdk/02_cookbook/04_claiming/02_attestation_request.md +++ b/versioned_docs/version-0.3/01_sdk/02_cookbook/04_claiming/02_attestation_request.md @@ -4,7 +4,7 @@ title: Request an Attestation --- import TsJsBlock from '@site/src/components/TsJsBlock'; -import RequestAttestation from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/claiming/03_request_attestation.ts'; +import RequestAttestation from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/claiming/03_request_attestation.ts'; To obtain credentials, Claimers have to request an attestation for a set of claims from an Attester. The resulting object is a `Credential`, which can be created following the snippet below. diff --git a/docs/develop/01_sdk/02_cookbook/04_claiming/03_attestation_creation.md b/versioned_docs/version-0.3/01_sdk/02_cookbook/04_claiming/03_attestation_creation.md similarity index 85% rename from docs/develop/01_sdk/02_cookbook/04_claiming/03_attestation_creation.md rename to versioned_docs/version-0.3/01_sdk/02_cookbook/04_claiming/03_attestation_creation.md index 1a53d3755..da88cc39c 100644 --- a/docs/develop/01_sdk/02_cookbook/04_claiming/03_attestation_creation.md +++ b/versioned_docs/version-0.3/01_sdk/02_cookbook/04_claiming/03_attestation_creation.md @@ -5,7 +5,7 @@ title: Attest a Claim (Issue a Credential) import TsJsBlock from '@site/src/components/TsJsBlock'; -import CreateAttestation from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/claiming/04_create_attestation.ts'; +import CreateAttestation from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/claiming/04_create_attestation.ts'; Once an Attester has received a to-be-attested `Credential` from a Claimer, they will typically verify the information in the claim. If the claims correspond to truth, the Attester will proceed by attesting the root hash of the credential on the KILT blockchain, timestamping the attestation operation. diff --git a/versioned_docs/version-0.3/01_sdk/02_cookbook/04_claiming/04_presentation_creation.md b/versioned_docs/version-0.3/01_sdk/02_cookbook/04_claiming/04_presentation_creation.md new file mode 100644 index 000000000..ca0048fc4 --- /dev/null +++ b/versioned_docs/version-0.3/01_sdk/02_cookbook/04_claiming/04_presentation_creation.md @@ -0,0 +1,26 @@ +--- +id: presentation-creation +title: Present a Credential +--- + +import TsJsBlock from '@site/src/components/TsJsBlock'; + +import CreatePresentation from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/claiming/05_create_presentation.ts'; + +With a valid credential, Claimers can now go to Verifiers to request some service upon providing proof of validity of a certain credential. +The process of presenting one or more credentials to a Verifier is called `Presentation`. + +This step, similar to the [attestation request](./02_attestation_request.md), requires that a communication channel exist between the Claimer and the Verifier so that information about the presentation can be shared. +To verify the revocation status of the presented credential(s), a Verifier must be able to interact with a KILT full node. + +:::info +KILT supports selective disclosure of claims when creating presentations. +This means that given a credential, it is possible for the Claimer to reveal only a subset of its claims, depending on the requirements set by the Verifier. +Check the snippet below to see how that is done using the KILT SDK. +::: + +The Claimer can generate a presentation starting from a credential, optionally specifying the fields to reveal and a presentation challenge, which is useful to prove freshness of the generated presentation. + + + {CreatePresentation} + \ No newline at end of file diff --git a/docs/develop/01_sdk/02_cookbook/04_claiming/05_presentation_verification.md b/versioned_docs/version-0.3/01_sdk/02_cookbook/04_claiming/05_presentation_verification.md similarity index 91% rename from docs/develop/01_sdk/02_cookbook/04_claiming/05_presentation_verification.md rename to versioned_docs/version-0.3/01_sdk/02_cookbook/04_claiming/05_presentation_verification.md index 480cc236d..e4b7eafb0 100644 --- a/docs/develop/01_sdk/02_cookbook/04_claiming/05_presentation_verification.md +++ b/versioned_docs/version-0.3/01_sdk/02_cookbook/04_claiming/05_presentation_verification.md @@ -5,7 +5,7 @@ title: Verify a Credential or a Presentation import TsJsBlock from '@site/src/components/TsJsBlock'; -import VerifyPresentation from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/claiming/06_verify_presentation.ts'; +import VerifyPresentation from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/claiming/06_verify_presentation.ts'; Whether a presentation involves selective disclosure or a whole credential is not technically relevant to Verifiers. This is because in KILT a presentation **is** a credential. diff --git a/versioned_docs/version-0.3/01_sdk/02_cookbook/04_claiming/06_credential_revocation.md b/versioned_docs/version-0.3/01_sdk/02_cookbook/04_claiming/06_credential_revocation.md new file mode 100644 index 000000000..537a2fefc --- /dev/null +++ b/versioned_docs/version-0.3/01_sdk/02_cookbook/04_claiming/06_credential_revocation.md @@ -0,0 +1,26 @@ +--- +id: attestation-removal +title: Revoke a Credential +--- + +import TsJsBlock from '@site/src/components/TsJsBlock'; + +import RevokeCredential from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/claiming/07_revoke_credential.ts'; +import ReclaimDeposit from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/claiming/08_reclaim_attestation_deposit.ts'; + +If the conditions that make a credential valid cease to exist, an Attester can revoke and optionally remove their attestation from the KILT blockchain. +This does not automatically delete the credential from the Claimer's wallet, of course, but it makes it impossible for the Claimer to use the credential in the future. + +Since the attestation creation reserved some KILT tokens from the submitter's balance, removing an attestation would return those funds into the payer's pockets. + + + {RevokeCredential} + + +## Claim Back an Attestation Deposit + +Claiming back the deposit of an attestation is semantically equivalent to revoking and removing the attestation, with the difference that the extrinsic to claim the deposit can only be called by the deposit owner and does not require the Attester's signature: + + + {ReclaimDeposit} + \ No newline at end of file diff --git a/versioned_docs/version-0.3/01_sdk/02_cookbook/04_claiming/_category_.json b/versioned_docs/version-0.3/01_sdk/02_cookbook/04_claiming/_category_.json new file mode 100644 index 000000000..21073c229 --- /dev/null +++ b/versioned_docs/version-0.3/01_sdk/02_cookbook/04_claiming/_category_.json @@ -0,0 +1,5 @@ +{ + "label": "KILT Credentials", + "collapsible": true, + "collapsed": true +} diff --git a/docs/develop/01_sdk/02_cookbook/05_public_credentials/01_credential_issuance.md b/versioned_docs/version-0.3/01_sdk/02_cookbook/05_public_credentials/01_credential_issuance.md similarity index 84% rename from docs/develop/01_sdk/02_cookbook/05_public_credentials/01_credential_issuance.md rename to versioned_docs/version-0.3/01_sdk/02_cookbook/05_public_credentials/01_credential_issuance.md index 2bd743f12..0cb14511a 100644 --- a/docs/develop/01_sdk/02_cookbook/05_public_credentials/01_credential_issuance.md +++ b/versioned_docs/version-0.3/01_sdk/02_cookbook/05_public_credentials/01_credential_issuance.md @@ -5,8 +5,8 @@ title: Credential Issuance import TsJsBlock from '@site/src/components/TsJsBlock'; -import CreateCredential from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/public_credentials/01_create_credential.ts'; -import IssueCredential from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/public_credentials/02_issue_credential.ts'; +import CreateCredential from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/public_credentials/01_create_credential.ts'; +import IssueCredential from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/public_credentials/02_issue_credential.ts'; As for traditional KILT credentials, public credentials also have their structure defined by a [CType][ctypes-link], although CTypes that can be used to represent information about assets would probably differ from the ones used to represent information about people. @@ -41,4 +41,4 @@ This is to save space on credentials that actually benefit from CBOR compression Hence, creating public credentials without the SDK requires the credential to be CBOR-encoded! ::: -[ctypes-link]: ../../../../concepts/05_credentials/02_ctypes.md +[ctypes-link]: /concepts/credentials/ctypes diff --git a/docs/develop/01_sdk/02_cookbook/05_public_credentials/02_credential_retrieval.md b/versioned_docs/version-0.3/01_sdk/02_cookbook/05_public_credentials/02_credential_retrieval.md similarity index 87% rename from docs/develop/01_sdk/02_cookbook/05_public_credentials/02_credential_retrieval.md rename to versioned_docs/version-0.3/01_sdk/02_cookbook/05_public_credentials/02_credential_retrieval.md index b2514585a..25eaa3e0d 100644 --- a/docs/develop/01_sdk/02_cookbook/05_public_credentials/02_credential_retrieval.md +++ b/versioned_docs/version-0.3/01_sdk/02_cookbook/05_public_credentials/02_credential_retrieval.md @@ -5,9 +5,9 @@ title: Retrieve Public Credentials import TsJsBlock from '@site/src/components/TsJsBlock'; -import RetrieveCredentialbyId from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/public_credentials/03_retrieve_credential_by_id.ts'; -import RetrieveCredentialsbySubject from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/public_credentials/04_retrieve_credentials_by_subject.ts'; -import VerifyCredential from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/public_credentials/05_verify_credential.ts'; +import RetrieveCredentialbyId from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/public_credentials/03_retrieve_credential_by_id.ts'; +import RetrieveCredentialsbySubject from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/public_credentials/04_retrieve_credentials_by_subject.ts'; +import VerifyCredential from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/public_credentials/05_verify_credential.ts'; Public credentials have their best capability in the fact that they are, indeed, public by design. This means that once issued, anyone who has access to an archive or full node for the KILT blockchain can retrieve them, making them very decentralized in nature. @@ -65,4 +65,4 @@ Rather, the block number in which the extrinsic is submitted is stored inside th This represents a very good tradeoff between **security** - because the blockchain itself dictates what the creation block number is for any given public credential - and **storage efficiency** - since the full credential is stored off-chain, accessible via any KILT archive node or indexing service. ::: -[asset-did-concept]: ../../../../concepts/04_asset_dids.md \ No newline at end of file +[asset-did-concept]: /concepts/asset-dids \ No newline at end of file diff --git a/docs/develop/01_sdk/02_cookbook/05_public_credentials/03_credential_revocation.md b/versioned_docs/version-0.3/01_sdk/02_cookbook/05_public_credentials/03_credential_revocation.md similarity index 84% rename from docs/develop/01_sdk/02_cookbook/05_public_credentials/03_credential_revocation.md rename to versioned_docs/version-0.3/01_sdk/02_cookbook/05_public_credentials/03_credential_revocation.md index 23f9a79f9..6e21a209f 100644 --- a/docs/develop/01_sdk/02_cookbook/05_public_credentials/03_credential_revocation.md +++ b/versioned_docs/version-0.3/01_sdk/02_cookbook/05_public_credentials/03_credential_revocation.md @@ -5,10 +5,10 @@ title: Revoke (and remove) Public Credentials import TsJsBlock from '@site/src/components/TsJsBlock'; -import RevokeRemoveCredentialById from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/public_credentials/06_revoke_remove_credential_by_id.ts'; -import RevokeCredential from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/public_credentials/07_revoke_remove_credential_by_content.ts'; -import UnrevokeCredential from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/public_credentials/08_unrevoke_credential.ts'; -import ReclaimDeposit from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/public_credentials/09_reclaim_deposit.ts'; +import RevokeRemoveCredentialById from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/public_credentials/06_revoke_remove_credential_by_id.ts'; +import RevokeCredential from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/public_credentials/07_revoke_remove_credential_by_content.ts'; +import UnrevokeCredential from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/public_credentials/08_unrevoke_credential.ts'; +import ReclaimDeposit from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/public_credentials/09_reclaim_deposit.ts'; Depending on the use cases, some credentials, as with any other type of credential, might need to be temporarily or permanently revoked. diff --git a/docs/develop/01_sdk/02_cookbook/05_public_credentials/_category_.json b/versioned_docs/version-0.3/01_sdk/02_cookbook/05_public_credentials/_category_.json similarity index 100% rename from docs/develop/01_sdk/02_cookbook/05_public_credentials/_category_.json rename to versioned_docs/version-0.3/01_sdk/02_cookbook/05_public_credentials/_category_.json diff --git a/docs/develop/01_sdk/02_cookbook/06_messaging/01_messaging.md b/versioned_docs/version-0.3/01_sdk/02_cookbook/06_messaging/01_messaging.md similarity index 86% rename from docs/develop/01_sdk/02_cookbook/06_messaging/01_messaging.md rename to versioned_docs/version-0.3/01_sdk/02_cookbook/06_messaging/01_messaging.md index 406b53343..46ed37ac1 100644 --- a/docs/develop/01_sdk/02_cookbook/06_messaging/01_messaging.md +++ b/versioned_docs/version-0.3/01_sdk/02_cookbook/06_messaging/01_messaging.md @@ -5,9 +5,9 @@ title: Generate a Message import TsJsBlock from '@site/src/components/TsJsBlock'; -import GenerateRequestCredentialMessage from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/messaging/01_generate_request_credential_message.ts'; -import EncryptMessage from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/messaging/02_encrypt_message.ts'; -import DecryptMessage from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/messaging/03_decrypt_message.ts'; +import GenerateRequestCredentialMessage from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/messaging/01_generate_request_credential_message.ts'; +import EncryptMessage from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/messaging/02_encrypt_message.ts'; +import DecryptMessage from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/messaging/03_decrypt_message.ts'; KILT defines a [unicast](https://en.wikipedia.org/wiki/Unicast) messaging protocol diff --git a/docs/develop/01_sdk/02_cookbook/06_messaging/02_replay_protection.md b/versioned_docs/version-0.3/01_sdk/02_cookbook/06_messaging/02_replay_protection.md similarity index 81% rename from docs/develop/01_sdk/02_cookbook/06_messaging/02_replay_protection.md rename to versioned_docs/version-0.3/01_sdk/02_cookbook/06_messaging/02_replay_protection.md index 4c5d93b87..51a8203d7 100644 --- a/docs/develop/01_sdk/02_cookbook/06_messaging/02_replay_protection.md +++ b/versioned_docs/version-0.3/01_sdk/02_cookbook/06_messaging/02_replay_protection.md @@ -5,9 +5,9 @@ title: Protect Against Replay Attacks import TsJsBlock from '@site/src/components/TsJsBlock'; -import DefineRange from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/messaging/_replay_protection_01.ts'; -import EvaluateMessageTime from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/messaging/_replay_protection_02.ts'; -import PurgeTimeout from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/messaging/_replay_protection_03.ts'; +import DefineRange from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/messaging/_replay_protection_01.ts'; +import EvaluateMessageTime from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/messaging/_replay_protection_02.ts'; +import PurgeTimeout from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/messaging/_replay_protection_03.ts'; Whenever data travels on a public network, even when encrypted or signed, the communicating parties need to make sure they never accept and process a message more than once to protect against exploits by malicious third parties (so-called replay attacks). When requesting and submitting credential presentations, vulnerabilities for replay attacks can be prevented by requesting that the Claimer sign a unique piece of data as part of the presentation, as shown in the [Verification Cookbook section](../04_claiming/04_presentation_creation.md). diff --git a/docs/develop/01_sdk/02_cookbook/06_messaging/_category_.json b/versioned_docs/version-0.3/01_sdk/02_cookbook/06_messaging/_category_.json similarity index 100% rename from docs/develop/01_sdk/02_cookbook/06_messaging/_category_.json rename to versioned_docs/version-0.3/01_sdk/02_cookbook/06_messaging/_category_.json diff --git a/docs/develop/01_sdk/02_cookbook/07_signCallback.md b/versioned_docs/version-0.3/01_sdk/02_cookbook/07_signCallback.md similarity index 89% rename from docs/develop/01_sdk/02_cookbook/07_signCallback.md rename to versioned_docs/version-0.3/01_sdk/02_cookbook/07_signCallback.md index e704093ab..eb76867a9 100644 --- a/docs/develop/01_sdk/02_cookbook/07_signCallback.md +++ b/versioned_docs/version-0.3/01_sdk/02_cookbook/07_signCallback.md @@ -5,9 +5,9 @@ title: SignCallback import TsJsBlock from '@site/src/components/TsJsBlock'; -import SignCallback from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/signCallback/useSignCallback.ts'; -import SignExtrinsicCallback from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/signCallback/useExtrinsicCallback.ts'; -import GetStoreTxSignCallback from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/signCallback/useStoreTxSignCallback.ts'; +import SignCallback from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/signCallback/useSignCallback.ts'; +import SignExtrinsicCallback from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/signCallback/useExtrinsicCallback.ts'; +import GetStoreTxSignCallback from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/signCallback/useStoreTxSignCallback.ts'; Signing data involves using the private key and therefore needs to be secure. There are many different options how data could be signed. diff --git a/docs/develop/01_sdk/02_cookbook/08_upgrading_to_v0_29/01_backward_compatibility.md b/versioned_docs/version-0.3/01_sdk/02_cookbook/08_upgrading_to_v0_29/01_backward_compatibility.md similarity index 100% rename from docs/develop/01_sdk/02_cookbook/08_upgrading_to_v0_29/01_backward_compatibility.md rename to versioned_docs/version-0.3/01_sdk/02_cookbook/08_upgrading_to_v0_29/01_backward_compatibility.md diff --git a/docs/develop/01_sdk/02_cookbook/08_upgrading_to_v0_29/_category_.json b/versioned_docs/version-0.3/01_sdk/02_cookbook/08_upgrading_to_v0_29/_category_.json similarity index 100% rename from docs/develop/01_sdk/02_cookbook/08_upgrading_to_v0_29/_category_.json rename to versioned_docs/version-0.3/01_sdk/02_cookbook/08_upgrading_to_v0_29/_category_.json diff --git a/docs/develop/01_sdk/02_cookbook/08_upgrading_to_v0_29/index.md b/versioned_docs/version-0.3/01_sdk/02_cookbook/08_upgrading_to_v0_29/index.md similarity index 100% rename from docs/develop/01_sdk/02_cookbook/08_upgrading_to_v0_29/index.md rename to versioned_docs/version-0.3/01_sdk/02_cookbook/08_upgrading_to_v0_29/index.md diff --git a/docs/develop/01_sdk/02_cookbook/_category_.json b/versioned_docs/version-0.3/01_sdk/02_cookbook/_category_.json similarity index 100% rename from docs/develop/01_sdk/02_cookbook/_category_.json rename to versioned_docs/version-0.3/01_sdk/02_cookbook/_category_.json diff --git a/versioned_docs/version-0.3/01_sdk/03_chain_setup/01_standalone_setup.md b/versioned_docs/version-0.3/01_sdk/03_chain_setup/01_standalone_setup.md new file mode 100644 index 000000000..5ba705d44 --- /dev/null +++ b/versioned_docs/version-0.3/01_sdk/03_chain_setup/01_standalone_setup.md @@ -0,0 +1,113 @@ +--- +id: standalone-chain-setup +title: BYOB - Bring Your Own Blockchain +--- + +If you want to have full control over your blockchain deployment, e.g., if you want to reset the state repeatedly or need more funds than a faucet can provide for a single account, you will need to run your own blockchain. +For this purpose, we provide a Docker image which runs in standalone mode. +This means that the blockchain doesn't act as a parachain but as an independent chain. +There is no need to run a Relay Chain and register the KILT chain as a parachain. +This greatly simplifies the setup. + +You only need to start the Docker image: + +```bash +docker run --rm -it -p 9944:9944 -p 9933:9933 kiltprotocol/standalone-node:latest --dev --ws-external --rpc-external +``` + +You should see output similar to the following: + +``` +2022-05-05 13:25:12 KILT Node +2022-05-05 13:25:12 ✌️ version 1.6.2 +2022-05-05 13:25:12 ❤️ by KILT , 2019-2022 +2022-05-05 13:25:12 📋 Chain specification: Development +2022-05-05 13:25:12 🏷 Node name: subdued-chair-0035 +2022-05-05 13:25:12 👤 Role: AUTHORITY +2022-05-05 13:25:12 💾 Database: RocksDb at /tmp/substrateufCNUV/chains/development/db/full +2022-05-05 13:25:12 ⛓ Native runtime: kilt-kestrel (kilt-kestrel-0.tx3.au4) +2022-05-05 13:25:13 🔨 Initializing Genesis block/state (state: 0xb4a2…94b3, header-hash: 0x09fc…3a2b) +2022-05-05 13:25:13 👴 Loading GRANDPA authority set from genesis on what appears to be first startup. +2022-05-05 13:25:14 Using default protocol ID "sup" because none is configured in the chain specs +2022-05-05 13:25:14 🏷 Local node identity is: 12D3KooWMCqWaxXTQbmG9feCe4cMzjCzUKfm5T6VvGDmh8X5QHe9 +2022-05-05 13:25:14 📦 Highest known block at #0 +2022-05-05 13:25:14 〽️ Prometheus exporter started at 127.0.0.1:9615 +2022-05-05 13:25:14 Listening for new connections on 0.0.0.0:9944. +2022-05-05 13:25:19 💤 Idle (0 peers), best: #0 (0x09fc…3a2b), finalized #0 (0x09fc…3a2b), ⬇ 0 ⬆ 0 +2022-05-05 13:25:20 Accepted a new tcp connection from 172.17.0.1:56636. +2022-05-05 13:25:23 🙌 Starting consensus session on top of parent 0x... +2022-05-05 13:25:23 🎁 Prepared block for proposing at 1 (3 ms) [hash: 0x...; parent_hash: 0x09fc…3a2b; extrinsics (1): [0xae1a…0701]] +2022-05-05 13:25:23 🔖 Pre-sealed block for proposal at 1. Hash now 0x..., previously 0x.... +``` + +Congratulations! +You are running your own KILT blockchain. 🎉 + +The blockchain exposes a RPC endpoint on port `9944`. +You can test that by calling an RPC endpoint using curl. + +```bash +curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "system_name", "params":[]}' http://127.0.0.1:9944/ +``` + +This should give you `{"jsonrpc":"2.0","result":"KILT Node","id":1}` as a response. + +The `--dev` parameter provides a pre-funded account which you can use as a faucet, and that has the following mnemonic: `receive clutch item involve chaos clutch furnace arrest claw isolate okay together`. + +You can create the account with the following SDK function: + +```ts +// Creates an ed25519 key by default which is required to access the funds. +const devFaucet = Crypto.makeKeypairFromUri(faucetSeed) +``` + +With the new `devFaucet`, you can transfer funds to other accounts and test all the KILT features that require tx fee payment. + +## Standalone vs. Parachain (Peregrine/Spiritnet) + +The standalone chain is close in functionality to Kilt parachains but there are a few fundamental differences between them. + + + +### Governance + +While governance is an important part of Kilt parachains, it's not used in the standalone version and the **Sudo** pallet replaces it. +None of the following pallets are part of the standalone chain, but they are all part of the parachain runtime: + +* Democracy +* Council +* TechnicalCommittee +* TechnicalMembership +* Treasury +* Scheduler + +### Staking + +Staking is part of the consensus protocol and is used to elect who is allowed to produce blocks. +Parachains need to have this election process as decentralized as possible. +On the other hand, for a standalone development chain, it's not necessary since all nodes are probably controlled by you or your organization. + +### Deployment Complexity + +Deploying a parachain is more complex than deploying a standalone chain. +For the standalone node, a single Docker command is enough. +In contrast, the task of spinning up a parachain is split into three steps. + +1. Setup a Relay Chain with 4 validators. +2. Start and connect your parachain node to the Relay Chain. +3. Register your parachain using the runtime WASM and the genesis state. + +Since these steps are not trivial to execute and take some time to do manually, you can use this [Docker-based setup script](https://github.com/KILTprotocol/local-parachain-setup) to automate the steps. + +### Transaction Encoding + +Before transactions are sent to the chain, they are encoded and signed. +The encoding depends on the runtime and can differ from chain to chain. +Even the same call in the same pallet can have a different encoding for different chains, for instance, the `vest`()` call of the `vesting` pallet: + +| Chain | Encoding of Vesting.vest() | +| ---------- | -------------------------- | +| Spiritnet | `0x2900` | +| Standalone | `0x2100` | diff --git a/docs/develop/01_sdk/03_chain_setup/02_peregrine_setup.md b/versioned_docs/version-0.3/01_sdk/03_chain_setup/02_peregrine_setup.md similarity index 100% rename from docs/develop/01_sdk/03_chain_setup/02_peregrine_setup.md rename to versioned_docs/version-0.3/01_sdk/03_chain_setup/02_peregrine_setup.md diff --git a/docs/develop/01_sdk/03_chain_setup/03_prod_chain_setup.md b/versioned_docs/version-0.3/01_sdk/03_chain_setup/03_prod_chain_setup.md similarity index 100% rename from docs/develop/01_sdk/03_chain_setup/03_prod_chain_setup.md rename to versioned_docs/version-0.3/01_sdk/03_chain_setup/03_prod_chain_setup.md diff --git a/versioned_docs/version-0.3/01_sdk/03_chain_setup/_category_.json b/versioned_docs/version-0.3/01_sdk/03_chain_setup/_category_.json new file mode 100644 index 000000000..88da89b23 --- /dev/null +++ b/versioned_docs/version-0.3/01_sdk/03_chain_setup/_category_.json @@ -0,0 +1,5 @@ +{ + "label": "Chain Setup for Development", + "collapsible": true, + "collapsed": true +} diff --git a/docs/develop/01_sdk/03_chain_setup/index.md b/versioned_docs/version-0.3/01_sdk/03_chain_setup/index.md similarity index 100% rename from docs/develop/01_sdk/03_chain_setup/index.md rename to versioned_docs/version-0.3/01_sdk/03_chain_setup/index.md diff --git a/docs/develop/01_sdk/04_integrate/01_nodejs.md b/versioned_docs/version-0.3/01_sdk/04_integrate/01_nodejs.md similarity index 78% rename from docs/develop/01_sdk/04_integrate/01_nodejs.md rename to versioned_docs/version-0.3/01_sdk/04_integrate/01_nodejs.md index 57a4acf2e..01e803f85 100644 --- a/docs/develop/01_sdk/04_integrate/01_nodejs.md +++ b/versioned_docs/version-0.3/01_sdk/04_integrate/01_nodejs.md @@ -5,7 +5,7 @@ title: NodeJS import TsJsBlock from '@site/src/components/TsJsBlock'; -import QueryAccountName from '!!raw-loader!@site/code_examples/sdk_examples/src/core_features/linking/03_account_web3name_query.ts'; +import QueryAccountName from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/core_features/linking/03_account_web3name_query.ts'; NodeJS is natively supported and doesn't require any additional setup. diff --git a/versioned_docs/version-0.3/01_sdk/04_integrate/02_browser.md b/versioned_docs/version-0.3/01_sdk/04_integrate/02_browser.md new file mode 100644 index 000000000..b0a291ec4 --- /dev/null +++ b/versioned_docs/version-0.3/01_sdk/04_integrate/02_browser.md @@ -0,0 +1,45 @@ +--- +id: howto-integrate-browser +title: Browser +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +Our JavaScript SDK (`@kiltprotocol/sdk-js`) is ready to be used in a browser context. For rapid prototyping of simple web apps, we provide a code bundle of the entire SDK which you can embed in a site by adding the following script tag: + +```html + +``` + +The SDK's functions then become available via a new `kilt` property on the global `window` object. + +To get started with your first **React application** using KILT, we recommend using either the [KILT Distillery](./03_distillery.md) CLI tool for bootstrapping or a framework like [Vite](https://vitejs.dev) or [Next.js](https://nextjs.org) that takes away some of the complexity in building and testing a React application. You can find a broader selection of popular React-powered frameworks on the [React project's homepage](https://react.dev/learn/start-a-new-react-project). + +After completing the respective tool's recommended steps to initialize your project, simply add the SDK to your dependencies and you are ready to hack away! + +:::info + +You should of course familiarize yourself with the tool of your choice, but these commands have served us well in the past: + + + +```bash +yarn create vite my-kilt-app --template react-ts +cd my-kilt-app +yarn add @kiltprotocol/sdk-js +``` + + + + +```bash +yarn create next-app my-kilt-app +cd my-kilt-app +yarn add @kiltprotocol/sdk-js +``` + + + + +::: diff --git a/versioned_docs/version-0.3/01_sdk/04_integrate/03_distillery.md b/versioned_docs/version-0.3/01_sdk/04_integrate/03_distillery.md new file mode 100644 index 000000000..f61dd9fb2 --- /dev/null +++ b/versioned_docs/version-0.3/01_sdk/04_integrate/03_distillery.md @@ -0,0 +1,12 @@ +--- +id: howto-integrate-distillery +title: KILT Distillery +--- + +Different types of projects can be bootstrapped using our [KILT distillery CLI](https://github.com/KILTprotocol/kilt-distillery-cli). + +Please read the README.md file for more information, but if you are impatient you can execute this command and follow the instructions: + +```bash +npx git+https://github.com/KILTprotocol/kilt-distillery-cli +``` diff --git a/docs/develop/01_sdk/04_integrate/_category_.json b/versioned_docs/version-0.3/01_sdk/04_integrate/_category_.json similarity index 100% rename from docs/develop/01_sdk/04_integrate/_category_.json rename to versioned_docs/version-0.3/01_sdk/04_integrate/_category_.json diff --git a/docs/develop/01_sdk/04_integrate/index.md b/versioned_docs/version-0.3/01_sdk/04_integrate/index.md similarity index 100% rename from docs/develop/01_sdk/04_integrate/index.md rename to versioned_docs/version-0.3/01_sdk/04_integrate/index.md diff --git a/docs/develop/01_sdk/05_troubleshoot.md b/versioned_docs/version-0.3/01_sdk/05_troubleshoot.md similarity index 100% rename from docs/develop/01_sdk/05_troubleshoot.md rename to versioned_docs/version-0.3/01_sdk/05_troubleshoot.md diff --git a/versioned_docs/version-0.3/01_sdk/_category_.json b/versioned_docs/version-0.3/01_sdk/_category_.json new file mode 100644 index 000000000..13d35e4e8 --- /dev/null +++ b/versioned_docs/version-0.3/01_sdk/_category_.json @@ -0,0 +1,5 @@ +{ + "label": "SDK", + "collapsible": true, + "collapsed": true +} diff --git a/versioned_docs/version-0.3/02_chain/01_introduction.md b/versioned_docs/version-0.3/02_chain/01_introduction.md new file mode 100644 index 000000000..20b625490 --- /dev/null +++ b/versioned_docs/version-0.3/02_chain/01_introduction.md @@ -0,0 +1,10 @@ +--- +id: introduction +title: Introduction +--- + +The section covers KILT chain specific topics. + +* Learn about the different [KILT pallets](./02_pallets/01_did.md) (still a WIP) +* Learn about the different [KILT deployments](./03_deployments.md) +* Learn how to run a [KILT full node](./04_fullnode.md) diff --git a/docs/develop/02_chain/02_pallets/01_did.md b/versioned_docs/version-0.3/02_chain/02_pallets/01_did.md similarity index 100% rename from docs/develop/02_chain/02_pallets/01_did.md rename to versioned_docs/version-0.3/02_chain/02_pallets/01_did.md diff --git a/versioned_docs/version-0.3/02_chain/02_pallets/_category_.json b/versioned_docs/version-0.3/02_chain/02_pallets/_category_.json new file mode 100644 index 000000000..fd547d13d --- /dev/null +++ b/versioned_docs/version-0.3/02_chain/02_pallets/_category_.json @@ -0,0 +1,5 @@ +{ + "label": "KILT Pallets", + "collapsible": true, + "collapsed": true +} diff --git a/versioned_docs/version-0.3/02_chain/03_deployments.md b/versioned_docs/version-0.3/02_chain/03_deployments.md new file mode 100644 index 000000000..37d93ea14 --- /dev/null +++ b/versioned_docs/version-0.3/02_chain/03_deployments.md @@ -0,0 +1,32 @@ +--- +id: deployments +title: Deployments and Services +--- + +KILT has two public deployments: a production one, called **Spiritnet**, and a test/dev one, called **Peregrine**. +To learn more about how to set up a node for either environment, please check our [fullnode set up guide](./04_fullnode.md). + +**Spiritnet** is the production blockchain, and has been live since September 2021. + +**Peregrine** is the public testnet, which can be used to build and test products that use the KILT blockchain, before switching to Spiritnet. + +| Service | Spiritnet | Peregrine | +|:----------------:|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:------------------------------------------------------------------------------------------------------------:| +| Faucet | - | [Peregrine Faucet][pere-faucet] | +| Public Endpoints | [BOTLabs: wss://spiritnet.kilt.io][spirit-wss-kilt]
[OnFinality: wss://spiritnet.api.onfinality.io/public-ws][spirit-wss-onfinality]
[Dwellir: wss://kilt-rpc.dwellir.com][spirit-wss-dwellir] | [BOTLabs: wss://peregrine.kilt.io][pere-wss-kilt] | +| Wallet | [Sporran](https://www.sporran.org/) | [GitHub](https://github.com/BTE-Trusted-Entity/sporran-extension/releases) (manual loading into the browser) | +| Staking UI | Collators' performance (view only): [Stakekilt](https://stakekilt.com/)
Delegation staking platform: [Stakeboard](https://stakeboard.kilt.io) | - | +| Governance UI | [Polkassembly][spirit-polkassembly] | - | +| Chain Explorer | [Subscan](https://spiritnet.subscan.io) | [Subscan](https://kilt-testnet.subscan.io) | +| w3n Service | [w3n.id](https://w3n.id) | [test.w3n.id](https://test.w3n.id/) | +| Link Accounts | [linking.trusted-entity.io](https://linking.trusted-entity.io/) | [test.linking.trusted-entity.io](https://test.linking.trusted-entity.io/) | +| DIDsign | [didsign.io](https://didsign.io/) | [test.didsign.io](https://test.didsign.io/) | +| SocialKYC | [socialkyc.io](https://socialkyc.io/) | [test.socialkyc.io](https://test.socialkyc.io/) | + + +[spirit-polkassembly]: https://kilt.polkassembly.network +[spirit-wss-kilt]: https://polkadot.js.org/apps/?rpc=wss://spiritnet.kilt.io +[spirit-wss-onfinality]: https://polkadot.js.org/apps/?rpc=wss://spiritnet.api.onfinality.io/public-ws +[spirit-wss-dwellir]: https://polkadot.js.org/apps/?rpc=wss://kilt-rpc.dwellir.com +[pere-faucet]: https://faucet.peregrine.kilt.io +[pere-wss-kilt]: https://polkadot.js.org/apps/?rpc=wss://peregrine.kilt.io diff --git a/docs/develop/02_chain/04_fullnode.md b/versioned_docs/version-0.3/02_chain/04_fullnode.md similarity index 98% rename from docs/develop/02_chain/04_fullnode.md rename to versioned_docs/version-0.3/02_chain/04_fullnode.md index d056efcc4..10a2237f7 100644 --- a/docs/develop/02_chain/04_fullnode.md +++ b/versioned_docs/version-0.3/02_chain/04_fullnode.md @@ -7,7 +7,7 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; We will guide you through the process of setting up and connecting to a KILT full node. -In contrast [to a collator](../../participate/01_staking/01_become_a_collator/03_setup_node.md), full nodes do not author blocks. +In contrast [to a collator](/participate/staking/become_a_collator/setup-node), full nodes do not author blocks. They act as a backend for websites and help to verify new blocks or validate extrinsics (e.g., coin transfers and other transactions) directly on the network without relying on a centralized infrastructure provider. ## Setup diff --git a/versioned_docs/version-0.3/02_chain/_category_.json b/versioned_docs/version-0.3/02_chain/_category_.json new file mode 100644 index 000000000..1b41abda0 --- /dev/null +++ b/versioned_docs/version-0.3/02_chain/_category_.json @@ -0,0 +1,5 @@ +{ + "label": "Chain", + "collapsible": true, + "collapsed": true +} diff --git a/docs/develop/03_workshop/01_welcome.md b/versioned_docs/version-0.3/03_workshop/01_welcome.md similarity index 87% rename from docs/develop/03_workshop/01_welcome.md rename to versioned_docs/version-0.3/03_workshop/01_welcome.md index 6ed35f2f3..2746a11a3 100644 --- a/docs/develop/03_workshop/01_welcome.md +++ b/versioned_docs/version-0.3/03_workshop/01_welcome.md @@ -31,7 +31,7 @@ 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 Attester and verify it as a Verifier. +You'll create a claim as a Claimer, attest it as an Issuer and verify it as a Verifier. ✔ Use the KILT SDK to write onto and read from the KILT blockchain. diff --git a/docs/develop/03_workshop/02_setup.md b/versioned_docs/version-0.3/03_workshop/02_setup.md similarity index 100% rename from docs/develop/03_workshop/02_setup.md rename to versioned_docs/version-0.3/03_workshop/02_setup.md diff --git a/docs/develop/03_workshop/03_overview.md b/versioned_docs/version-0.3/03_workshop/03_overview.md similarity index 100% rename from docs/develop/03_workshop/03_overview.md rename to versioned_docs/version-0.3/03_workshop/03_overview.md diff --git a/docs/develop/03_workshop/04_attester/01_account.md b/versioned_docs/version-0.3/03_workshop/04_attester/01_account.md similarity index 96% rename from docs/develop/03_workshop/04_attester/01_account.md rename to versioned_docs/version-0.3/03_workshop/04_attester/01_account.md index e2710f623..cad342a40 100644 --- a/docs/develop/03_workshop/04_attester/01_account.md +++ b/versioned_docs/version-0.3/03_workshop/04_attester/01_account.md @@ -7,7 +7,7 @@ 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/attester/generateAccount.ts'; +import GenerateAccount from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/workshop/attester/generateAccount.ts'; With the [project structure setup](./) in the last step, you can create your Attester account. diff --git a/docs/develop/03_workshop/04_attester/02_did.md b/versioned_docs/version-0.3/03_workshop/04_attester/02_did.md similarity index 92% rename from docs/develop/03_workshop/04_attester/02_did.md rename to versioned_docs/version-0.3/03_workshop/04_attester/02_did.md index fa4bc03cd..7f14a1e7b 100644 --- a/docs/develop/03_workshop/04_attester/02_did.md +++ b/versioned_docs/version-0.3/03_workshop/04_attester/02_did.md @@ -9,8 +9,8 @@ import SnippetBlock from '@site/src/components/SnippetBlock'; import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -import GenerateKeypairs from '!!raw-loader!@site/code_examples/sdk_examples/src/workshop/attester/generateKeypairs.ts'; -import GenerateDid from '!!raw-loader!@site/code_examples/sdk_examples/src/workshop/attester/generateDid.ts'; +import GenerateKeypairs from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/workshop/attester/generateKeypairs.ts'; +import GenerateDid from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/workshop/attester/generateDid.ts'; The next step is to generate a KILT decentralized identifier (DID) using the account you created for the Attester in [the previous step](./01_account.md). @@ -28,7 +28,7 @@ Other users can now encrypt messages using your public encryption key and send a 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/01_sdk/02_cookbook/01_dids/01_light_did_creation.md) to learn more about the difference between the light and full types. +Read the [DID documentation](../../01_sdk/02_cookbook/01_dids/01_light_did_creation.md) to learn more about the difference between the light and full types. :::info KILT DID diff --git a/docs/develop/03_workshop/04_attester/03_ctype.md b/versioned_docs/version-0.3/03_workshop/04_attester/03_ctype.md similarity index 95% rename from docs/develop/03_workshop/04_attester/03_ctype.md rename to versioned_docs/version-0.3/03_workshop/04_attester/03_ctype.md index 417885275..e897269b6 100644 --- a/docs/develop/03_workshop/04_attester/03_ctype.md +++ b/versioned_docs/version-0.3/03_workshop/04_attester/03_ctype.md @@ -8,8 +8,8 @@ import TsJsBlock from '@site/src/components/TsJsBlock'; import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -import CtypeSchema from '!!raw-loader!@site/code_examples/sdk_examples/src/workshop/attester/ctypeSchema.ts'; -import GenerateCtype from '!!raw-loader!@site/code_examples/sdk_examples/src/workshop/attester/generateCtype.ts'; +import CtypeSchema from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/workshop/attester/ctypeSchema.ts'; +import GenerateCtype from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/workshop/attester/generateCtype.ts'; import Ctype from '@site/scripts/out/ctype.json.raw!=!raw-loader!@site/scripts/out/ctype.json'; @@ -23,7 +23,7 @@ A CType ensures that a credential contains all required attributes, e.g., a driv 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. -To learn more about CTypes, read the [in-depth CType documentation](../../../concepts/05_credentials/02_ctypes.md). +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). ::: diff --git a/versioned_docs/version-0.3/03_workshop/04_attester/_category_.json b/versioned_docs/version-0.3/03_workshop/04_attester/_category_.json new file mode 100644 index 000000000..6c31a6f8e --- /dev/null +++ b/versioned_docs/version-0.3/03_workshop/04_attester/_category_.json @@ -0,0 +1,5 @@ +{ + "label": "🏢 Attester", + "collapsible": true, + "collapsed": true +} diff --git a/docs/develop/03_workshop/04_attester/index.md b/versioned_docs/version-0.3/03_workshop/04_attester/index.md similarity index 100% rename from docs/develop/03_workshop/04_attester/index.md rename to versioned_docs/version-0.3/03_workshop/04_attester/index.md diff --git a/docs/develop/03_workshop/05_claimer/01_did.md b/versioned_docs/version-0.3/03_workshop/05_claimer/01_did.md similarity index 82% rename from docs/develop/03_workshop/05_claimer/01_did.md rename to versioned_docs/version-0.3/03_workshop/05_claimer/01_did.md index e6abbde43..ffa649731 100644 --- a/docs/develop/03_workshop/05_claimer/01_did.md +++ b/versioned_docs/version-0.3/03_workshop/05_claimer/01_did.md @@ -8,8 +8,8 @@ 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/claimer/generateKeypairs.ts'; -import GenerateLightDid from '!!raw-loader!@site/code_examples/sdk_examples/src/workshop/claimer/generateLightDid.ts'; +import GenerateKeypairs from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/workshop/claimer/generateKeypairs.ts'; +import GenerateLightDid from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/workshop/claimer/generateLightDid.ts'; This section covers creating a light DID using the account you created for the Claimer. @@ -22,7 +22,7 @@ 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/01_sdk/02_cookbook/01_dids/01_light_did_creation.md) to learn more about DIDs and the difference between their light and full versions. +Read the [DID documentation](../../01_sdk/02_cookbook/01_dids/01_light_did_creation.md) to learn more about DIDs and the difference between their light and full versions. ::: diff --git a/docs/develop/03_workshop/05_claimer/02_request.md b/versioned_docs/version-0.3/03_workshop/05_claimer/02_request.md similarity index 91% rename from docs/develop/03_workshop/05_claimer/02_request.md rename to versioned_docs/version-0.3/03_workshop/05_claimer/02_request.md index 8dbc992ff..beb0b05f9 100644 --- a/docs/develop/03_workshop/05_claimer/02_request.md +++ b/versioned_docs/version-0.3/03_workshop/05_claimer/02_request.md @@ -7,8 +7,8 @@ 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/claimer/createClaim.ts'; -import GenerateCredential from '!!raw-loader!@site/code_examples/sdk_examples/src/workshop/claimer/generateCredential.ts'; +import CreateClaim from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/workshop/claimer/createClaim.ts'; +import GenerateCredential from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/workshop/claimer/generateCredential.ts'; This section covers creating a `Claim` and a `Credential`. diff --git a/versioned_docs/version-0.3/03_workshop/05_claimer/_category_.json b/versioned_docs/version-0.3/03_workshop/05_claimer/_category_.json new file mode 100644 index 000000000..5656d275e --- /dev/null +++ b/versioned_docs/version-0.3/03_workshop/05_claimer/_category_.json @@ -0,0 +1,5 @@ +{ + "label": "👤 Claimer", + "collapsible": true, + "collapsed": true +} diff --git a/docs/develop/03_workshop/05_claimer/index.md b/versioned_docs/version-0.3/03_workshop/05_claimer/index.md similarity index 100% rename from docs/develop/03_workshop/05_claimer/index.md rename to versioned_docs/version-0.3/03_workshop/05_claimer/index.md diff --git a/docs/develop/03_workshop/06_attestation.md b/versioned_docs/version-0.3/03_workshop/06_attestation.md similarity index 93% rename from docs/develop/03_workshop/06_attestation.md rename to versioned_docs/version-0.3/03_workshop/06_attestation.md index a433f6110..a95cf7c02 100644 --- a/docs/develop/03_workshop/06_attestation.md +++ b/versioned_docs/version-0.3/03_workshop/06_attestation.md @@ -7,7 +7,7 @@ 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/attester/attestCredential.ts'; +import AttestCredential from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/workshop/attester/attestCredential.ts'; This section covers how the Attester receives and processes a `Credential` and how you can: diff --git a/docs/develop/03_workshop/07_verification.md b/versioned_docs/version-0.3/03_workshop/07_verification.md similarity index 91% rename from docs/develop/03_workshop/07_verification.md rename to versioned_docs/version-0.3/03_workshop/07_verification.md index e0a154733..b6a9f0b8b 100644 --- a/docs/develop/03_workshop/07_verification.md +++ b/versioned_docs/version-0.3/03_workshop/07_verification.md @@ -8,8 +8,8 @@ import TsJsBlock from '@site/src/components/TsJsBlock'; import Tabs from '@theme/Tabs'; 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/claimer/createPresentation.ts'; +import Verify from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/workshop/verify.ts'; +import CreatePresentation from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/workshop/claimer/createPresentation.ts'; In this section, you play the role of a Verifier that does the following: diff --git a/docs/develop/03_workshop/08_done.md b/versioned_docs/version-0.3/03_workshop/08_done.md similarity index 100% rename from docs/develop/03_workshop/08_done.md rename to versioned_docs/version-0.3/03_workshop/08_done.md diff --git a/versioned_docs/version-0.3/03_workshop/_category_.json b/versioned_docs/version-0.3/03_workshop/_category_.json new file mode 100644 index 000000000..65d6b088b --- /dev/null +++ b/versioned_docs/version-0.3/03_workshop/_category_.json @@ -0,0 +1,5 @@ +{ + "label": "Workshop", + "collapsible": true, + "collapsed": true +} diff --git a/versioned_docs/version-0.3/04_specifications.md b/versioned_docs/version-0.3/04_specifications.md new file mode 100644 index 000000000..b36bed2b5 --- /dev/null +++ b/versioned_docs/version-0.3/04_specifications.md @@ -0,0 +1,28 @@ +--- +id: specifications +title: Technical Specifications +--- + +:::note +This section is a WIP. +The end goal is for it to host all KILT specifications. +::: + +List of core specifications KILT has defined in an effort to standardize APIs and data structures across applications: + +- [KILT DID Method (GitHub repo)][kilt-did-method] +- [KiltPublishedCredentialCollectionV1 Service Type (GitHub repo)][kilt-published-credential-collection-v1] +- [Asset DID Method (GitHub repo)][asset-did-method] +- [KiltTransferAssetRecipientV1 Service Type (GitHub repo)][kilt-transfer-asset-receipient-v1] + +List of extensions to the core KILT protocol that standardize communication with the core KILT components (e.g., API for wallets to present credentials): + +- [Wallet Credential API (GitHub repo)][kilt-wallet-credential-api] +- [Wallet DIDSign API (GitHub repo)][kilt-wallet-didsign-api] + +[kilt-did-method]: https://github.com/KILTprotocol/spec-kilt-did +[kilt-published-credential-collection-v1]: https://github.com/KILTprotocol/spec-KiltPublishedCredentialCollectionV1 +[asset-did-method]: https://github.com/KILTprotocol/spec-asset-did +[kilt-transfer-asset-receipient-v1]: https://github.com/KILTprotocol/spec-KiltTransferAssetRecipientV1 +[kilt-wallet-credential-api]: https://github.com/KILTprotocol/spec-ext-credential-api +[kilt-wallet-didsign-api]: https://github.com/KILTprotocol/spec-ext-didsign-api diff --git a/docs/develop/05_builtonkilt.md b/versioned_docs/version-0.3/05_builtonkilt.md similarity index 96% rename from docs/develop/05_builtonkilt.md rename to versioned_docs/version-0.3/05_builtonkilt.md index e03487106..5a3f814f9 100644 --- a/docs/develop/05_builtonkilt.md +++ b/versioned_docs/version-0.3/05_builtonkilt.md @@ -49,7 +49,7 @@ Decentralized applications have already been built that use the functions of the width='80' alt='bte-w3n-id-logo'> w3n.id is a website that helps you claim and search web3names. - Learn more about KILT web3names in our [concepts section](../concepts/03_web3names.md). + Learn more about KILT web3names in our [concepts section](/concepts/web3names). --- diff --git a/versioned_docs/version-0.3/06_contribute.md b/versioned_docs/version-0.3/06_contribute.md new file mode 100644 index 000000000..e5f45a340 --- /dev/null +++ b/versioned_docs/version-0.3/06_contribute.md @@ -0,0 +1,101 @@ +--- +id: contribute +title: Contribution Guidelines +--- + +As a decentralized network, KILT depends on the support of its community. +There are many ways to contribute to KILT Protocol and the products and services built on it. +The following guide is to **help builders and contributors** find the resources needed to take action and work under the guidance of the core developers. + +If you are interested in contributing but unsure how to begin, start in our [Clan KILT Discord](https://discord.gg/7uyfMXh6AT) channel. +The developers active there, which include the team that originally developed KILT and the wider KILT community, can: + +- Provide feedback on proposals or ideas +- Discuss possible use cases and feature requests +- Make suggestions for non-technical contributions, including events, writing, or business models +- Answer questions about the protocol, services and products + + +## Feature Requests + +A feature request may be used to change the KILT Protocol and its services by adding new features or changing/removing existing ones. + + +A feature request is a meaningful way for anyone to contribute following the guidelines below: + + - Begin a discussion with the community to ensure most see that the proposed feature adds real and meaningful value to KILT Protocol, supporting its goals + - Open an Issue on the corresponding repository + - Give your Pull Request a clear title + - Provide a written outline of the feature request for discussion + +After discussion, if the community agrees that the change should be implemented, the proposer may also submit a Treasury proposal to support the work. +The guidelines of how to do that are presented in the next section. + +## Treasury Proposals + +A Treasury proposal is a request to receive funds from the Treasury pool. +The proposal should begin with a clear title, a written outline of the idea, and a discussion about implementation or deliverables as outlined above for feature requests. +The proposal should be for something that changes or adds value to KILT in a meaningful way. + +:::info +In general, a Treasury proposal spend occurs after completing all outlined deliverables and not before. +Thus, it is recommended to open multiple consecutive milestone-based proposals rather than one large proposal to fund contributions. +::: + +In addition you should: + +- Explain any milestones that have already been achieved +- Outline what needs to be done for the proposal to be completed + +The proposal should then be discussed with the community (including, for example, the KILT Technical Committee, governance, or relevant project team) using community channels such as [Discord](https://discord.gg/7uyfMXh6AT) or [Polkassembly](https://kilt.polkassembly.network/discussions). +If the community is not in agreement with the proposal, it is unlikely that it would be approved by governance. +See the [guide to creating a proposal](/participate/treasury-proposal) for additional details. + +## Tips + +Tips are a more agile and lightweight process to receive rewards for contributing to the KILT Protocol. +Even though the funds also come from the Treasury, the procedure is more straightforward. +The major difference compared to Treasury proposals is that for tips, determining the bounty amount is part of the course of tipping. +In other words, the final tip amount is not clear beforehand and the group of pre-determined stakeholders comes to consensus on how much should be paid. +Eventually, the median of proposed tips will be awarded from the Treasury. +Currently, the tippers include all Council members and other core code contributors. + +Both proposals and tips are similar in the sense that there must be someone (called the _Finder_) to open the tipping process by providing a reason in the form of a URL or an explanation on [Polkassembly](https://kilt.polkassembly.network/). +In contrast to proposals, tips do not require an extensive document; a URL to the pull request or the blog post suffices. +If the Finder is part of the group that decides about the bounty award, no deposit needs to be made. +Moreover, the beneficiary will receive the entire tip without any deductions. +Otherwise, a small deposit, which depends on the length of the message explaining the reason for the tip, needs to be reserved. +The deposit will be released after the tipping process has finished. +Additionally, the Finder also receives a minor Finder's fee of 20% which is subtracted from the final tip amount. + +Therefore, **even if you are not a contributor, you can open a tipping process for someone else and receive a smaller portion of their potential reward**. +Of course, you can also suggest potential tip candidates to the Council, which would then tip if they are deemed worthy. + +## Bug Reports + +We try our best, but bugs are an everyday reality with all software and are bound to happen. +We can't fix bugs we don't notice, so your potential findings give us the best possibility of keeping the project running smoothly and securely. + +If you are unsure if a bug is a bug, it is best to open an issue and report it anyway. +The active developers will evaluate it and help to figure out the issue. + +It is helpful to check if a report has already been filed in the related project. +Search the issues board for possible phrases that match the description of the bug. +It's possible you may not find an issue, but it's better to file a duplicated bug than not report one. + +Once you begin reporting the bug, write a descriptive title so that if others find the same issue they can either add to your findings or know that the bug has already been reported. +A bug report should be as detailed as possible, including steps to reproduce, screenshots, error reports, or code snippets. +The more details you provide, the easier it is to fix the issue. + +## Pull Requests + +Pull Requests (PR) are an integral part of contributions to evolve KILT. +GitHub itself has some [excellent documentation](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests) on using the Pull Request feature. +KILT uses the "[fork and pull](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/getting-started/about-collaborative-development-models)" model, where contributors push changes to their personal fork and create Pull Requests to bring those changes into the original source repository. + +Before starting a PR, it’s best to contact other active developers and discuss the proposed changes. +Open an issue or directly contact some of the developers on [Discord](https://discord.gg/7uyfMXh6AT) to kick off the discussion and present the proposal. +Once approved, contributors can open a PR for review. +The PR will be reviewed and, if accepted, merged into the corresponding repository. + +The following section is inspired by the Rust Programming Language [Bug Report](https://rustc-dev-guide.rust-lang.org/contributing.html) contribution guide. diff --git a/versioned_docs/version-0.3/07_dApp/01_welcome.md b/versioned_docs/version-0.3/07_dApp/01_welcome.md new file mode 100644 index 000000000..8f04305cc --- /dev/null +++ b/versioned_docs/version-0.3/07_dApp/01_welcome.md @@ -0,0 +1,13 @@ +--- +id: welcome +title: Overview +--- + +This section expands on the [Credential API Specification](https://github.com/KILTprotocol/spec-ext-credential-api) and includes code examples to help you build a decentralized application (dapp). + +This documentation assumes that you already have a browser extension capable of exposing the credential API to your dapp. +We suggest using Sporran: + +- [Sporran Full Version](https://github.com/BTE-Trusted-Entity/sporran-extension) +- [Sporran Test Version for Peregrine](https://github.com/BTE-Trusted-Entity/sporran-extension/releases) +- [Sporran Lite (Credentials only)](https://github.com/BTE-Trusted-Entity/sporran-extension/tree/sporran-lite) diff --git a/versioned_docs/version-0.3/07_dApp/02_well-known-did-config.md b/versioned_docs/version-0.3/07_dApp/02_well-known-did-config.md new file mode 100644 index 000000000..0334b92f9 --- /dev/null +++ b/versioned_docs/version-0.3/07_dApp/02_well-known-did-config.md @@ -0,0 +1,110 @@ +--- +id: well-known-did-config +title: Well-Known DID Configuration +--- + + +import TsJsBlock from '@site/src/components/TsJsBlock'; + +import DomainLinkageCtype from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/dapp/dapp/01_domain_linkage_ctype.ts'; +import DomainLinkageClaim from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/dapp/dapp/02_domain_linkage_claim.ts'; +import SignPresentation from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/dapp/dapp/03_sign_presentation.ts'; +import AttestCredential from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/dapp/dapp/04_attest_credential.ts'; +import FormatCredential from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/dapp/dapp/05_format_credential.ts'; + +:::danger This is a working draft + +The KILT support of the *Well-Known DID Configuration* uses unpublished specifications and will change in the future. + +::: + +The *Well-Known DID Configuration* is implemented as a security measure when setting up the communication session between the dapp and extension. +It ensures that the DID the browser extension is communicating to is linked to the domain that is visited by the browser. +This rule is currently enforced by the KILT Wallet reference implementation (Sporran Extension), but might be relaxed in the future. +The implementation is based on the [*Well-Known DID Configuration*][well-known-spec] specified by the Decentralized Identity Foundation. + +Once a communication session between a dapp and an extension is opened, the extension will query `/.well-known/did-configuration.json`. +This JSON-file must contain a credential presentation that conforms to the [Domain Linkage CType][CType-Domain-Linkage]. + +## Set up the Well-Known DID Configuration + +For the *Well-Known DID Configuration* you need to go through the following steps: + +0. Create a full DID + * You will need the `assertionMethodKey` a.k.a. `attestationKey` for signing the credential + * The `authenticationKey` is required for signing the transaction +1. Create a claim +2. Attest the claim +3. Create a presentation +4. Host the presentation on your website at `https:///.well-known/did-configuration.json` + +### Create a DID + +Your dapp needs a DID to identify itself to the extension. +If your dapp does not have a DID yet, follow the [*create a full DID* guide][create-full-did]. +Make sure to create the DID with an `assertionMethodKey` so that you are able to issue attestations. + +### Making the claim + +After you get a DID, you can make a claim about that DID. +The claim has to be based on the [Domain Linkage CType][CType-Domain-Linkage], whose definition you can get from the linked GitHub repository, or fetch from the blockchain using the CType's id: + + + {DomainLinkageCtype} + + +The credential is built from the CType, claim contents, and your dapp's unique DID: + + + {DomainLinkageClaim} + + +The credential isn't attested yet and is therefore not valid yet. + +### Self-attesting the credential + +A valid credential requires an attestation. +Since the website wants to link itself to the DID just created, it has to self-attest the domain linkage credential, i.e., write the credential attestation on chain using the same DID it is trying to link to. + +In order to attest the credential we go through the following steps: + +1. calculating the claim hash +2. creating the attest transaction +3. authorizing the transaction with your DID +4. paying for the transaction with a KILT account and submitting it to the chain + + + {AttestCredential} + + +If you want to learn more about attestations you can refer to our [concept guide][concept-attestations] or the [cookbook][cookbook-attestations]. + +### Presenting the credential + +To use the newly attested credential, we need to derive a presentation from it to host on the dapp website. + + + {SignPresentation} + + +The Well-Known DID Configuration specification requires a verifiable credential. +For now we have to manually convert our KILT credential into the required format. + + + {FormatCredential} + + +### Host the Presentation + +Now that you generated a presentation, you need to host it in your web app, so that the extension can query the presentation. +The extension will make an HTTP GET request to the following URI, and your dapp must respond with the presentation. + +`/.well-known/did-configuration.json` + +How the file is hosted depends on your project setup and is out of scope for this guide. + +[concept-attestations]: /concepts/credentials/attestation +[cookbook-attestations]: ../01_sdk/02_cookbook/04_claiming/03_attestation_creation.md +[create-full-did]: ../01_sdk/02_cookbook/01_dids/02_full_did_creation.md +[well-known-spec]: https://identity.foundation/specs/did-configuration/ +[CType-Domain-Linkage]: https://github.com/KILTprotocol/ctype-index/tree/main/ctypes/0x9d271c790775ee831352291f01c5d04c7979713a5896dcf5e81708184cc5c643 diff --git a/versioned_docs/version-0.3/07_dApp/03_session.md b/versioned_docs/version-0.3/07_dApp/03_session.md new file mode 100644 index 000000000..89d3a7851 --- /dev/null +++ b/versioned_docs/version-0.3/07_dApp/03_session.md @@ -0,0 +1,59 @@ +--- +id: session +title: Setting Up the Communication Session +--- + +import TsJsBlock from '@site/src/components/TsJsBlock'; + +import DappIntroduction from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/dapp/dapp/06_dapp_introduction.ts'; +import SessionCheck from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/dapp/dapp/07_session_check.ts'; + +The first step in creating your dapp is to set up the communication session. +The purpose of the session is to pass encrypted messages back and forth between your dapp and the extension. + +## Dapp Indicates Credential API Support + +In order to indicate its support of the extension's API, the dapp creates the `window.kilt` object as soon as possible. +To indicate the API version that the dapp supports, we also create the properties `window.kilt.meta.versions.credentials`. +Since `meta` is not an extension, this property is not enumerable. +For example: + +```html + + + +``` + +## Dapp Introduces Itself + +The dapp introduces itself to the extension with its name, encryption key URI, and a challenge. +A copy of the challenge should be stored on the server side. +For example: + + + {DappIntroduction} + + +At this point the extension has received the introduction of the dapp and returned a new session along with the encrypted challenge. + +## Dapp checks the session values + +The extension has provided the session along with an encrypted challenge. +The dapp decrypts the challenge and verifies that it matches the original challenge. +This should happen on the server side: + + + {SessionCheck} + + +That's it! The communication session has been securely established and you're ready to start sending and receiving messages. diff --git a/versioned_docs/version-0.3/07_dApp/04_verifier.md b/versioned_docs/version-0.3/07_dApp/04_verifier.md new file mode 100644 index 000000000..0de7119a1 --- /dev/null +++ b/versioned_docs/version-0.3/07_dApp/04_verifier.md @@ -0,0 +1,84 @@ +--- +id: dapp-verifier +title: Verifying a Credential +--- + +import TsJsSnippet from '@site/src/components/TsJsSnippet'; +import TsJsBlock from '@site/src/components/TsJsBlock'; + +import EmailCtype from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/dapp/verifier/01_email_ctype.ts'; +import GenerateChallenge from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/dapp/verifier/02_generate_challenge.ts'; +import CreateRequestCredentialMessage from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/dapp/verifier/03_create_request_credential_message.ts'; +import EncryptRequestCredentialMessage from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/dapp/verifier/04_encrypt_request_credential_message.ts'; +import DecryptCredentialMessage from '!!raw-loader!@site/versioned_docs/0.3-sdk_examples/src/dapp/verifier/05_verify_credential_message.ts'; + +This section demonstrates how to build a basic verifier according to the [Credential API Specification](https://github.com/KILTprotocol/spec-ext-credential-api). +Before continuing, please make sure you have already set up the [communication session](03_session.md) and [Well-Known DID Configuration](02_well-known-did-config.md). + +This guide explains specifically how a web server can request a credential presentation from one of its visitors (the claimer). +After the browser extension verified the Well-Known DID Configuration and the encrypted communication channel between the extension and the server was established, the web server can request the credential presentation. +This is a two step process. + +First the server sends a message to the extension that request the presentation of a credential. +Since we don't want to see just any credential, but expect specific content, we also require that the credential conforms to a specific [CType](/concepts/credentials/ctypes). +When the extension receives the request, it will prompt the user to select a credential that should be presented to the server. +The user can also choose to reject this request and not to show any presentation. + +The second step is to verify the received credential. +After the user chooses the credential, the extension will pass a response to the website which contains the credential presentation. +The server of that website needs to ensure that this presentation is actually valid. + +## Request a Credential Presentation + +Before the website can request a credential, it needs the type of credential (CType) that it wants to request. +In this guide the website requests an email address that is owned by the DID. +For that it uses the Email CType. +You can search through existing CTypes in the [CType Index](https://github.com/KILTprotocol/ctype-index). + + + {EmailCtype} + + +After settled on a CType, the server can build the request for the visitor. +Since we want to ensure that the presentation of the credential is fresh, the server first has to create a random challenge. +The presentation must include this challenge and since it's random, the presentation must be created and signed from scratch. +This ensures that it's not possible to record a presentation and just send this, pretending to be the owner of the DID. +The challenge can be generated using the polkadot crypto utilities: + + + {GenerateChallenge} + + +With the challenge the server can construct the `request-credential` message. +The request is sent to the light DID (`claimerSessionDid`) that is used to encrypt the messages (see [Session](03_session.md) for more information). + + + {CreateRequestCredentialMessage} + + +:::note Privacy + +The credential itself doesn't need to be issued to this DID since the light DID is only used to encrypt the messages. +We don't use the full DID of the claimer to establish the encrypted communication, so that the claimer first can ensure the origin of the `request-credential` message. + +::: + +After the server has built the message object, it must encrypt the message for the claimer. +Once the message is encrypted the server can pass on the message to the extension. + + + {EncryptRequestCredentialMessage} + + +## Verify the Presentation + +After sending the `request-credential` message to the extension, the verifier listens for a message of type `submit-credential` in response. + +After the response from the extension is received, forwarded to the server and decrypted, the verifier must check that it has the expected CType and that it contains a valid credential. +Since everyone can run an attestation service, you need to make sure that you also verify that the attester is trusted. + + + {DecryptCredentialMessage} + + +That's it! Your verifier has successfully requested and verified a credential. diff --git a/versioned_docs/version-0.3/07_dApp/_category_.json b/versioned_docs/version-0.3/07_dApp/_category_.json new file mode 100644 index 000000000..235e97018 --- /dev/null +++ b/versioned_docs/version-0.3/07_dApp/_category_.json @@ -0,0 +1,5 @@ +{ + "label": "DApp", + "collapsible": true, + "collapsed": true +} diff --git a/versioned_docs/version-0.3/08_opendid/01_overview.md b/versioned_docs/version-0.3/08_opendid/01_overview.md new file mode 100644 index 000000000..e42a82d1b --- /dev/null +++ b/versioned_docs/version-0.3/08_opendid/01_overview.md @@ -0,0 +1,40 @@ +--- +id: what-is-opendid +title: Overview +--- + +[OpenDID](https://github.com/KILTprotocol/opendid) is an OpenID Provider implementation capable of authenticating users through their [Decentralized Identifier (DID)](/concepts/did) and Verifiable Credentials. + +It follows the [OpenID Connect 1.0 Specification](https://openid.net/specs/openid-connect-core-1_0.html#Introduction) and acts as a bridge between the decentralized identity world and the centralized authentication world supporting both the implicit and Authorization Code Flow. + +A major use of OpenDID is Single Sign-On (SSO), which allows users to use the same DID and credentials to sign into multiple platforms and web services. For instance, by adding a "Sign in with KILT" button to a webpage. + +Although integrating that functionality into a webpage is relatively simple, configuring and running OpenDID is more involved. + +:::info + +To learn more about the flow of OpenDID, see the [OpenDID Flow](./02_opendid_flow.md) documentation. + +::: + +## Project container structure + +The project consist of multiple parts that supplement and interact with each other all shipped as Docker containers and released to Docker Hub. + +### opendid-setup container + +The OpenDID Service needs configuration to run, which you can apply using this +container. +For example, it requires a DID to establish a session with an identity wallet. +This container creates a DID and the necessary configuration by providing an account with enough funds. + +Learn more in the [run setup container documentation](./03_opendid_service.md#run-setup-container). + +### kiltprotocol/opendid container + +This container [runs the OpenDID Service](./03_opendid_service.md#run-the-service), both the OpenDID front and back end. +This container requires the configuration file created from the `opendid-setup` container. + +### kiltprotocol/opendid-demo + +This container is a [web app demo](./05_demo_project.md), including front and back end services to demonstrate the use of OpenDID. \ No newline at end of file diff --git a/versioned_docs/version-0.3/08_opendid/02_opendid_flow.md b/versioned_docs/version-0.3/08_opendid/02_opendid_flow.md new file mode 100644 index 000000000..5a1046ce7 --- /dev/null +++ b/versioned_docs/version-0.3/08_opendid/02_opendid_flow.md @@ -0,0 +1,74 @@ +--- +id: flow +title: OpenDID Flow +--- + +This guide explains the internal workings of OpenDID. +Understanding this flow is helpful for setting up and configuring an OpenDID Service but less important if you only need to integrate it in an application. + +OpenDID includes interactions between multiple apps to authenticate and authorize users. +Common use cases include the following: + +- Web app front end (app that includes the login button, for example, the demo app) +- Web app back end +- OpenDID front end +- OpenDID back end +- Identity wallet that follows [the Credential API spec](https://github.com/KILTprotocol/spec-ext-credential-api) (typically a browser extension, for example, [Sporran](https://www.sporran.org/)) + +The following steps outline the interactions necessary to implement [the implicit flow](https://openid.net/specs/openid-connect-core-1_0.html#ImplicitFlowAuth): + +1. The user clicks the login button on the _web app front end_. +2. The _web app front end_ redirects the user to the _OpenDID front end_. +3. The user chooses what wallet to authenticate with. +4. The _OpenDID back end_ establishes a secure session with the _identity wallet_. +5. The _OpenDID back end_ optionally requests a credential that implements a specific CType. +6. The _identity wallet_ provides the _OpenDID back end_ with the requested credential, after authenticating the DID holder. +7. The _OpenDID back end_ returns a `id_token` as a JSON web token (JWT) to the _OpenDID front end_. +8. _OpenDID front end_ redirects the user back to a specific `redirect_url` on the _web app front end_ including the `id_token`. +9. The _web app front end_ detects the `id_token` and sends it to the _web app back end_. +10. The _web app back end_ verifies the `id_token` and ensures the validity of the credential. + +The following sequence diagram summarizes the flow: + +```mermaid +sequenceDiagram + +participant AB as WebApp Backend +participant AF as WebApp Frontend +participant OF as OpenDID Frontend +participant OB as OpenDID Backend +participant IW as Identity Wallet + +AF->>OF: (1, 2) Authorize (redirect_uri: /callback) +OF->>OF: (3) Pick Identity Wallet +critical (4) Key Exchange +OF->>OB: GET Challenge +OB-->>OF: Challenge +OF->>IW: Start Session +IW-->>OF: Encrypted Challenge +OF->>OB: POST Challenge +OB-->>OF: OK +end + +critical Authenticate +OF->>OB: (5) GET Credential Requirements +OB-->>OF: Credential Requirements +OF->>IW: (6) Request Credential +IW->>IW: Authenticate User +IW->>OF: Credential +OF->>OB: POST Credential +OB->>OB: Verify Credential +OB->>OF: (7) `id_token`) +end + +OF->>AF: redirect to /callback with `id_token` +AF->>AB: (8) `id_token` +AB->>AB: (9) verify `id_token` +AB->>AF: (10) Access granted. + +``` + +:::info +Although this example describes the implicit flow, [the authorization code flow](https://openid.net/specs/openid-connect-core-1_0.html#CodeFlowAuth) is similar. +Instead of returning an `id_token` directly, the OpenDID service instead returns a `code` to exchange for an `id_token` using the `token` endpoint. +::: diff --git a/docs/develop/08_opendid/03_opendid_service.md b/versioned_docs/version-0.3/08_opendid/03_opendid_service.md similarity index 100% rename from docs/develop/08_opendid/03_opendid_service.md rename to versioned_docs/version-0.3/08_opendid/03_opendid_service.md diff --git a/versioned_docs/version-0.3/08_opendid/04_integrate_opendid.md b/versioned_docs/version-0.3/08_opendid/04_integrate_opendid.md new file mode 100644 index 000000000..a0518be0b --- /dev/null +++ b/versioned_docs/version-0.3/08_opendid/04_integrate_opendid.md @@ -0,0 +1,126 @@ +--- +id: integrate_opendid +title: Integrate OpenDID +--- + +OpenDID follows the [OpenID Connect 1.0 Specification](https://openid.net/specs/openid-connect-core-1_0.html#Introduction) and implements both the [implicit flow](https://openid.net/specs/openid-connect-core-1_0.html#ImplicitFlowSteps) +and the [authorization code flow](https://openid.net/specs/openid-connect-core-1_0.html#CodeFlowAuth). +Read the [demo project guide](05_demo_project.md) for an example of integrating OpenDID. + +## Authorization code flow + +Initiate the flow by redirecting to the **GET** `/api/v1/authorize` endpoint on the OpenDID service and setting the following query URL-encoded parameters: + +- `response_type`: set value to `code` to indicate Authorization Code Flow. +- `client_id`: The client ID set in the `config.yaml` file. +- `redirect_uri`: OpenDID redirects to this URL after authentication. +- `scope`: set value to `openid`. +- `state`: set to a secure random number. +- `nonce`: optional value, set to a secure random number. + +**Example**: + +``` +GET /api/v1/authorize? + response_type=code& + client_id=example-client& + redirect_uri=http://localhost:1606/callback.html& + scope=openid& + state=rkw49cbvd4azu5dsln1xbl& + nonce=vedur4om49ei8w91jt7wt HTTP/1.1 +``` + +After successful authentication, the OpenDID service redirects back to the provided `redirect_uri` with `code` and `state` query parameters. + +**Example**: + +``` +/callback.html? + code=lwDS1ZpQBwR4Vdm53_L8bWpUJ1mx9A0mA_-86dubTqzqzwGazx1RyLX4Z_qf& + state=rkw49cbvd4azu5dsln1xbl +``` + +You can retrieve the `id_token` by calling the **POST** `/api/v1/token` and providing the following values in the form serialization: + +- `code`: code value returned from `authorize`. +- `grant_type`: set value to `authorization_code`. +- `redirect_uri`: the same `redirect_uri` used in `authorize`. +- `client_id`: the client ID set in the `config.yaml` file. +- `client_secret`: the client secret value set in the `config.yaml` file. + +**Example**: + +``` +POST /api/v1/token HTTP/1.1 +Content-Type: application/x-www-form-urlencoded + +code=lwDS1ZpQBwR4Vdm53_L8bWpUJ1mx9A0mA_-86dubTqzqzwGazx1RyLX4Z_qf& +grant_type=authorization_code& +redirect_uri=http%3A%2F%2Flocalhost%3A1606%2Fcallback.html& +client_id=example-client& +client_secret=insecure_client_secret +``` + +The OpenDID service returns the `id_token` in the response body serialized as a JSON object. + +```json +{ + "access_token": "SsFhhSBMWsLeDMxVUVGreKARNwYxMZtGFfBr0-ZiH6iondSmwPRvQDqkG6Fh", + "token_type": "bearer", + "refresh_token": "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJkaWQ6a2lsdDo0b0VkNENVV3RwbkxUVnZENVBFd2lMUmlqMWdzQmprS1JMbVpES2lCOEdqN2I2V0wiLCJ3M24iOiJjdXN0b20iLCJleHAiOjE3MTY4MTYwNjQsImlhdCI6MTcxNjgxNTQ2NCwiaXNzIjoiZGlkOmtpbHQ6NHJzQkE3dEQ1S1E4TDlXSGpGallRdUhrTWtha2NmSGRDNUNhUVVjVXh5VWpEVkhBIiwiYXVkIjoiYXV0aGVudGljYXRpb24iLCJwcm8iOnsiRW1haWwiOiJhYmR1bEBraWx0LmlvIn0sIm5vbmNlIjoidmVkdXI0b200OWVpOHc5MWp0N3d0In0.yOmE_9jWKcAu8LpjVx7IsFyOOvlKbgo2oC4Imf-qrLY", + "id_token": "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJkaWQ6a2lsdDo0b0VkNENVV3RwbkxUVnZENVBFd2lMUmlqMWdzQmprS1JMbVpES2lCOEdqN2I2V0wiLCJ3M24iOiJjdXN0b20iLCJleHAiOjE3MTY4MTU1MjQsImlhdCI6MTcxNjgxNTQ2NCwiaXNzIjoiZGlkOmtpbHQ6NHJzQkE3dEQ1S1E4TDlXSGpGallRdUhrTWtha2NmSGRDNUNhUVVjVXh5VWpEVkhBIiwiYXVkIjoiYXBwbGljYXRpb24iLCJwcm8iOnsiRW1haWwiOiJhYmR1bEBraWx0LmlvIn0sIm5vbmNlIjoidmVkdXI0b200OWVpOHc5MWp0N3d0In0.YlRE9EGnSExQCb5m2iy4__58PZJlZdCZMsSvsuW4oj8" +} +``` + +:::note +In full-stack applications, calling the `token` endpoint is usually done through the back end to improve security. +::: + +The `id_token` is a bearer JSON web token (JWT) signed by the JWT key-pair specified in the `config.yaml` file of the OpenDID service. +You must verify this using the JWT public key, for example, by the back end of the Web app. + +## Implicit flow + +Initiate the flow by redirecting to the **GET** `/api/v1/authorize` endpoint on the OpenDID Service and setting the following query parameters: + +- `response_type`: set value to `id_token` to indicate Implicit Flow. +- `client_id`: The client ID set in the config.yaml file. +- `redirect_uri`: OpenDID redirects to this URL after authentication. +- `scope`: set value to `openid`. +- `state`: set to a secure random number. +- `nonce`: optional value, set to a secure random number. + +**Example**: + +``` +GET /api/v1/authorize? + response_type=id_token& + client_id=example-client& + redirect_uri=http://localhost:1606/callback.html& + scope=openid& + state=o0fl4c9gwylymzw5f4ik& + nonce=ia7sa06ungxdfzaqphk2 HTTP/1.1 +``` + +After successful authentication, OpenDID redirects back to the provided `redirect_uri` with `id_token` and `state` +**fragment components**. + +**Example**: + +``` +/callback.html# + id_token=eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJkaWQ6a2lsdDo0b0VkNENVV3RwbkxUVnZENVBFd2lMUmlqMWdzQmprS1JMbVpES2lCOEdqN2I2V0wiLCJ3M24iOiJjdXN0b20iLCJleHAiOjE3MTY4ODQ5MDYsImlhdCI6MTcxNjg4NDg0NiwiaXNzIjoiZGlkOmtpbHQ6NHJzQkE3dEQ1S1E4TDlXSGpGallRdUhrTWtha2NmSGRDNUNhUVVjVXh5VWpEVkhBIiwiYXVkIjoiYXBwbGljYXRpb24iLCJwcm8iOnsiRW1haWwiOiJhYmR1bEBraWx0LmlvIn0sIm5vbmNlIjoiOTFzN2ZnZDZvcjR3c2NkdGVtcXQifQ.xTy3Oyc5e-vlP10mGy0f9GqNU4LV97s77s-l7w5EwF0& + refresh_token=eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJkaWQ6a2lsdDo0b0VkNENVV3RwbkxUVnZENVBFd2lMUmlqMWdzQmprS1JMbVpES2lCOEdqN2I2V0wiLCJ3M24iOiJjdXN0b20iLCJleHAiOjE3MTY4ODU0NDYsImlhdCI6MTcxNjg4NDg0NiwiaXNzIjoiZGlkOmtpbHQ6NHJzQkE3dEQ1S1E4TDlXSGpGallRdUhrTWtha2NmSGRDNUNhUVVjVXh5VWpEVkhBIiwiYXVkIjoiYXV0aGVudGljYXRpb24iLCJwcm8iOnsiRW1haWwiOiJhYmR1bEBraWx0LmlvIn0sIm5vbmNlIjoiOTFzN2ZnZDZvcjR3c2NkdGVtcXQifQ.87UHGid3OotxO8Wpfuw-1sc5fsQJVt5gc2cqp9dVHiw& + state=nitctpl7nmqcpvob7xthrw& + token_type=bearer +``` + +## Self-Issued OpenID Provider v2 (SIOPv2) + +You can configure OpenDID to be compatible with [SIOPv2](https://openid.net/specs/openid-connect-self-issued-v2-1_0.html). +In this case, you only need a DID for the authorization, and no credentials. +To configure the OpenDID service to allow SIOPv2, it must have a `client` key with an empty requirements +value in the `config.yaml` file. + +Initiate the SIOPv2 flow the same way as the [Implicit Flow](#implicit-flow) with the exception that the `nonce` +value is required. diff --git a/docs/develop/08_opendid/05_demo_project.md b/versioned_docs/version-0.3/08_opendid/05_demo_project.md similarity index 100% rename from docs/develop/08_opendid/05_demo_project.md rename to versioned_docs/version-0.3/08_opendid/05_demo_project.md diff --git a/docs/develop/08_opendid/06_advanced.md b/versioned_docs/version-0.3/08_opendid/06_advanced.md similarity index 100% rename from docs/develop/08_opendid/06_advanced.md rename to versioned_docs/version-0.3/08_opendid/06_advanced.md diff --git a/versioned_docs/version-0.3/08_opendid/_category_.json b/versioned_docs/version-0.3/08_opendid/_category_.json new file mode 100644 index 000000000..85b9ce580 --- /dev/null +++ b/versioned_docs/version-0.3/08_opendid/_category_.json @@ -0,0 +1,5 @@ +{ + "label": "OpenDID", + "collapsible": true, + "collapsed": true +} diff --git a/versioned_docs/version-0.3/_category_.json b/versioned_docs/version-0.3/_category_.json new file mode 100644 index 000000000..84922e6c0 --- /dev/null +++ b/versioned_docs/version-0.3/_category_.json @@ -0,0 +1,5 @@ +{ + "label": "Develop", + "collapsible": true, + "collapsed": true +} diff --git a/versioned_sidebars/version-0.3-sidebars.json b/versioned_sidebars/version-0.3-sidebars.json new file mode 100644 index 000000000..659f19305 --- /dev/null +++ b/versioned_sidebars/version-0.3-sidebars.json @@ -0,0 +1,8 @@ +{ + "develop/01_sdk": [ + { + "type": "autogenerated", + "dirName": "." + } + ] +} diff --git a/versions.json b/versions.json new file mode 100644 index 000000000..9fe10fd70 --- /dev/null +++ b/versions.json @@ -0,0 +1,3 @@ +[ + "0.3" +] diff --git a/yarn.lock b/yarn.lock index c7c054576..05045ff78 100644 --- a/yarn.lock +++ b/yarn.lock @@ -375,6 +375,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz#4d2d0f14820ede3b9807ea5fc36dfc8cd7da07f2" integrity sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg== +"@babel/helper-string-parser@^7.24.8": + version "7.24.8" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz#5b3329c9a58803d5df425e5785865881a81ca48d" + integrity sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ== + "@babel/helper-validator-identifier@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz#75b889cfaf9e35c2aaf42cf0d72c8e91719251db" @@ -413,11 +418,18 @@ js-tokens "^4.0.0" picocolors "^1.0.0" -"@babel/parser@^7.23.6", "@babel/parser@^7.24.7": +"@babel/parser@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.7.tgz#9a5226f92f0c5c8ead550b750f5608e766c8ce85" integrity sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw== +"@babel/parser@^7.25.4": + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.25.6.tgz#85660c5ef388cbbf6e3d2a694ee97a38f18afe2f" + integrity sha512-trGdfBdbD0l1ZPmcJ83eNxB9rbEax4ALFTF7fN386TMYbeCQbyme5cOEXQhbGXKebwGaB/J52w1mrklMcbgy6Q== + dependencies: + "@babel/types" "^7.25.6" + "@babel/plugin-bugfix-firefox-class-in-computed-class-key@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.24.7.tgz#fd059fd27b184ea2b4c7e646868a9a381bbc3055" @@ -1184,10 +1196,10 @@ dependencies: regenerator-runtime "^0.14.0" -"@babel/standalone@^7.23.8": - version "7.24.7" - resolved "https://registry.yarnpkg.com/@babel/standalone/-/standalone-7.24.7.tgz#54349b6c6dc9bfe3521b36d1c18035c20334a15a" - integrity sha512-QRIRMJ2KTeN+vt4l9OjYlxDVXEpcor1Z6V7OeYzeBOw6Q8ew9oMTHjzTx8s6ClsZO7wVf6JgTRutihatN6K0yA== +"@babel/standalone@^7.25.5": + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/standalone/-/standalone-7.25.6.tgz#b81f6cefd3b667ae5334979d01b3633c70bb231f" + integrity sha512-Kf2ZcZVqsKbtYhlA7sP0z5A3q5hmCVYMKMWRWNK/5OVwHIve3JY1djVRmIVAx8FMueLIfZGKQDIILK2w8zO4mg== "@babel/template@^7.24.7": version "7.24.7" @@ -1223,6 +1235,15 @@ "@babel/helper-validator-identifier" "^7.24.7" to-fast-properties "^2.0.0" +"@babel/types@^7.25.6": + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.25.6.tgz#893942ddb858f32ae7a004ec9d3a76b3463ef8e6" + integrity sha512-/l42B1qxpG6RdfYf343Uw1vmDjeNhneUXtzhojE7pDgfpEypmRhI6j1kr17XCVv4Cgl9HdAiQY2x0GwKm7rWCw== + dependencies: + "@babel/helper-string-parser" "^7.24.8" + "@babel/helper-validator-identifier" "^7.24.7" + to-fast-properties "^2.0.0" + "@braintree/sanitize-url@^6.0.1": version "6.0.4" resolved "https://registry.yarnpkg.com/@braintree/sanitize-url/-/sanitize-url-6.0.4.tgz#923ca57e173c6b232bbbb07347b1be982f03e783" @@ -1253,10 +1274,10 @@ "@docsearch/css" "3.6.0" algoliasearch "^4.19.1" -"@docusaurus/core@3.4.0", "@docusaurus/core@^3.1.0": - version "3.4.0" - resolved "https://registry.yarnpkg.com/@docusaurus/core/-/core-3.4.0.tgz#bdbf1af4b2f25d1bf4a5b62ec6137d84c821cb3c" - integrity sha512-g+0wwmN2UJsBqy2fQRQ6fhXruoEa62JDeEa5d8IdTJlMoaDaEDfHh7WjwGRn4opuTQWpjAwP/fbcgyHKlE+64w== +"@docusaurus/core@3.5.2", "@docusaurus/core@^3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/core/-/core-3.5.2.tgz#3adedb90e7b6104592f1231043bd6bf91680c39c" + integrity sha512-4Z1WkhCSkX4KO0Fw5m/Vuc7Q3NxBG53NE5u59Rs96fWkMPZVSrzEPP16/Nk6cWb/shK7xXPndTmalJtw7twL/w== dependencies: "@babel/core" "^7.23.3" "@babel/generator" "^7.23.3" @@ -1268,12 +1289,12 @@ "@babel/runtime" "^7.22.6" "@babel/runtime-corejs3" "^7.22.6" "@babel/traverse" "^7.22.8" - "@docusaurus/cssnano-preset" "3.4.0" - "@docusaurus/logger" "3.4.0" - "@docusaurus/mdx-loader" "3.4.0" - "@docusaurus/utils" "3.4.0" - "@docusaurus/utils-common" "3.4.0" - "@docusaurus/utils-validation" "3.4.0" + "@docusaurus/cssnano-preset" "3.5.2" + "@docusaurus/logger" "3.5.2" + "@docusaurus/mdx-loader" "3.5.2" + "@docusaurus/utils" "3.5.2" + "@docusaurus/utils-common" "3.5.2" + "@docusaurus/utils-validation" "3.5.2" autoprefixer "^10.4.14" babel-loader "^9.1.3" babel-plugin-dynamic-import-node "^2.3.3" @@ -1327,32 +1348,32 @@ webpack-merge "^5.9.0" webpackbar "^5.0.2" -"@docusaurus/cssnano-preset@3.4.0": - version "3.4.0" - resolved "https://registry.yarnpkg.com/@docusaurus/cssnano-preset/-/cssnano-preset-3.4.0.tgz#dc7922b3bbeabcefc9b60d0161680d81cf72c368" - integrity sha512-qwLFSz6v/pZHy/UP32IrprmH5ORce86BGtN0eBtG75PpzQJAzp9gefspox+s8IEOr0oZKuQ/nhzZ3xwyc3jYJQ== +"@docusaurus/cssnano-preset@3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/cssnano-preset/-/cssnano-preset-3.5.2.tgz#6c1f2b2f9656f978c4694c84ab24592b04dcfab3" + integrity sha512-D3KiQXOMA8+O0tqORBrTOEQyQxNIfPm9jEaJoALjjSjc2M/ZAWcUfPQEnwr2JB2TadHw2gqWgpZckQmrVWkytA== dependencies: cssnano-preset-advanced "^6.1.2" postcss "^8.4.38" postcss-sort-media-queries "^5.2.0" tslib "^2.6.0" -"@docusaurus/logger@3.4.0": - version "3.4.0" - resolved "https://registry.yarnpkg.com/@docusaurus/logger/-/logger-3.4.0.tgz#8b0ac05c7f3dac2009066e2f964dee8209a77403" - integrity sha512-bZwkX+9SJ8lB9kVRkXw+xvHYSMGG4bpYHKGXeXFvyVc79NMeeBSGgzd4TQLHH+DYeOJoCdl8flrFJVxlZ0wo/Q== +"@docusaurus/logger@3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/logger/-/logger-3.5.2.tgz#1150339ad56844b30734115c19c580f3b25cf5ed" + integrity sha512-LHC540SGkeLfyT3RHK3gAMK6aS5TRqOD4R72BEU/DE2M/TY8WwEUAMY576UUc/oNJXv8pGhBmQB6N9p3pt8LQw== dependencies: chalk "^4.1.2" tslib "^2.6.0" -"@docusaurus/mdx-loader@3.4.0": - version "3.4.0" - resolved "https://registry.yarnpkg.com/@docusaurus/mdx-loader/-/mdx-loader-3.4.0.tgz#483d7ab57928fdbb5c8bd1678098721a930fc5f6" - integrity sha512-kSSbrrk4nTjf4d+wtBA9H+FGauf2gCax89kV8SUSJu3qaTdSIKdWERlngsiHaCFgZ7laTJ8a67UFf+xlFPtuTw== +"@docusaurus/mdx-loader@3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/mdx-loader/-/mdx-loader-3.5.2.tgz#99781641372c5037bcbe09bb8ade93a0e0ada57d" + integrity sha512-ku3xO9vZdwpiMIVd8BzWV0DCqGEbCP5zs1iHfKX50vw6jX8vQo0ylYo1YJMZyz6e+JFJ17HYHT5FzVidz2IflA== dependencies: - "@docusaurus/logger" "3.4.0" - "@docusaurus/utils" "3.4.0" - "@docusaurus/utils-validation" "3.4.0" + "@docusaurus/logger" "3.5.2" + "@docusaurus/utils" "3.5.2" + "@docusaurus/utils-validation" "3.5.2" "@mdx-js/mdx" "^3.0.0" "@slorber/remark-comment" "^1.0.0" escape-html "^1.0.3" @@ -1375,12 +1396,12 @@ vfile "^6.0.1" webpack "^5.88.1" -"@docusaurus/module-type-aliases@3.4.0": - version "3.4.0" - resolved "https://registry.yarnpkg.com/@docusaurus/module-type-aliases/-/module-type-aliases-3.4.0.tgz#2653bde58fc1aa3dbc626a6c08cfb63a37ae1bb8" - integrity sha512-A1AyS8WF5Bkjnb8s+guTDuYmUiwJzNrtchebBHpc0gz0PyHJNMaybUlSrmJjHVcGrya0LKI4YcR3lBDQfXRYLw== +"@docusaurus/module-type-aliases@3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/module-type-aliases/-/module-type-aliases-3.5.2.tgz#4e8f9c0703e23b2e07ebfce96598ec83e4dd2a9e" + integrity sha512-Z+Xu3+2rvKef/YKTMxZHsEXp1y92ac0ngjDiExRdqGTmEKtCUpkbNYH8v5eXo5Ls+dnW88n6WTa+Q54kLOkwPg== dependencies: - "@docusaurus/types" "3.4.0" + "@docusaurus/types" "3.5.2" "@types/history" "^4.7.11" "@types/react" "*" "@types/react-router-config" "*" @@ -1388,19 +1409,20 @@ react-helmet-async "*" react-loadable "npm:@docusaurus/react-loadable@6.0.0" -"@docusaurus/plugin-content-blog@3.4.0": - version "3.4.0" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-blog/-/plugin-content-blog-3.4.0.tgz#6373632fdbababbda73a13c4a08f907d7de8f007" - integrity sha512-vv6ZAj78ibR5Jh7XBUT4ndIjmlAxkijM3Sx5MAAzC1gyv0vupDQNhzuFg1USQmQVj3P5I6bquk12etPV3LJ+Xw== - dependencies: - "@docusaurus/core" "3.4.0" - "@docusaurus/logger" "3.4.0" - "@docusaurus/mdx-loader" "3.4.0" - "@docusaurus/types" "3.4.0" - "@docusaurus/utils" "3.4.0" - "@docusaurus/utils-common" "3.4.0" - "@docusaurus/utils-validation" "3.4.0" - cheerio "^1.0.0-rc.12" +"@docusaurus/plugin-content-blog@3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-blog/-/plugin-content-blog-3.5.2.tgz#649c07c34da7603645f152bcebdf75285baed16b" + integrity sha512-R7ghWnMvjSf+aeNDH0K4fjyQnt5L0KzUEnUhmf1e3jZrv3wogeytZNN6n7X8yHcMsuZHPOrctQhXWnmxu+IRRg== + dependencies: + "@docusaurus/core" "3.5.2" + "@docusaurus/logger" "3.5.2" + "@docusaurus/mdx-loader" "3.5.2" + "@docusaurus/theme-common" "3.5.2" + "@docusaurus/types" "3.5.2" + "@docusaurus/utils" "3.5.2" + "@docusaurus/utils-common" "3.5.2" + "@docusaurus/utils-validation" "3.5.2" + cheerio "1.0.0-rc.12" feed "^4.2.2" fs-extra "^11.1.1" lodash "^4.17.21" @@ -1411,19 +1433,20 @@ utility-types "^3.10.0" webpack "^5.88.1" -"@docusaurus/plugin-content-docs@3.4.0": - version "3.4.0" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-docs/-/plugin-content-docs-3.4.0.tgz#3088973f72169a2a6d533afccec7153c8720d332" - integrity sha512-HkUCZffhBo7ocYheD9oZvMcDloRnGhBMOZRyVcAQRFmZPmNqSyISlXA1tQCIxW+r478fty97XXAGjNYzBjpCsg== - dependencies: - "@docusaurus/core" "3.4.0" - "@docusaurus/logger" "3.4.0" - "@docusaurus/mdx-loader" "3.4.0" - "@docusaurus/module-type-aliases" "3.4.0" - "@docusaurus/types" "3.4.0" - "@docusaurus/utils" "3.4.0" - "@docusaurus/utils-common" "3.4.0" - "@docusaurus/utils-validation" "3.4.0" +"@docusaurus/plugin-content-docs@3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-docs/-/plugin-content-docs-3.5.2.tgz#adcf6c0bd9a9818eb192ab831e0069ee62d31505" + integrity sha512-Bt+OXn/CPtVqM3Di44vHjE7rPCEsRCB/DMo2qoOuozB9f7+lsdrHvD0QCHdBs0uhz6deYJDppAr2VgqybKPlVQ== + dependencies: + "@docusaurus/core" "3.5.2" + "@docusaurus/logger" "3.5.2" + "@docusaurus/mdx-loader" "3.5.2" + "@docusaurus/module-type-aliases" "3.5.2" + "@docusaurus/theme-common" "3.5.2" + "@docusaurus/types" "3.5.2" + "@docusaurus/utils" "3.5.2" + "@docusaurus/utils-common" "3.5.2" + "@docusaurus/utils-validation" "3.5.2" "@types/react-router-config" "^5.0.7" combine-promises "^1.1.0" fs-extra "^11.1.1" @@ -1433,101 +1456,101 @@ utility-types "^3.10.0" webpack "^5.88.1" -"@docusaurus/plugin-content-pages@3.4.0": - version "3.4.0" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-pages/-/plugin-content-pages-3.4.0.tgz#1846172ca0355c7d32a67ef8377750ce02bbb8ad" - integrity sha512-h2+VN/0JjpR8fIkDEAoadNjfR3oLzB+v1qSXbIAKjQ46JAHx3X22n9nqS+BWSQnTnp1AjkjSvZyJMekmcwxzxg== - dependencies: - "@docusaurus/core" "3.4.0" - "@docusaurus/mdx-loader" "3.4.0" - "@docusaurus/types" "3.4.0" - "@docusaurus/utils" "3.4.0" - "@docusaurus/utils-validation" "3.4.0" +"@docusaurus/plugin-content-pages@3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-pages/-/plugin-content-pages-3.5.2.tgz#2b59e43f5bc5b5176ff01835de706f1c65c2e68b" + integrity sha512-WzhHjNpoQAUz/ueO10cnundRz+VUtkjFhhaQ9jApyv1a46FPURO4cef89pyNIOMny1fjDz/NUN2z6Yi+5WUrCw== + dependencies: + "@docusaurus/core" "3.5.2" + "@docusaurus/mdx-loader" "3.5.2" + "@docusaurus/types" "3.5.2" + "@docusaurus/utils" "3.5.2" + "@docusaurus/utils-validation" "3.5.2" fs-extra "^11.1.1" tslib "^2.6.0" webpack "^5.88.1" -"@docusaurus/plugin-debug@3.4.0": - version "3.4.0" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-debug/-/plugin-debug-3.4.0.tgz#74e4ec5686fa314c26f3ac150bacadbba7f06948" - integrity sha512-uV7FDUNXGyDSD3PwUaf5YijX91T5/H9SX4ErEcshzwgzWwBtK37nUWPU3ZLJfeTavX3fycTOqk9TglpOLaWkCg== +"@docusaurus/plugin-debug@3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-debug/-/plugin-debug-3.5.2.tgz#c25ca6a59e62a17c797b367173fe80c06fdf2f65" + integrity sha512-kBK6GlN0itCkrmHuCS6aX1wmoWc5wpd5KJlqQ1FyrF0cLDnvsYSnh7+ftdwzt7G6lGBho8lrVwkkL9/iQvaSOA== dependencies: - "@docusaurus/core" "3.4.0" - "@docusaurus/types" "3.4.0" - "@docusaurus/utils" "3.4.0" + "@docusaurus/core" "3.5.2" + "@docusaurus/types" "3.5.2" + "@docusaurus/utils" "3.5.2" fs-extra "^11.1.1" react-json-view-lite "^1.2.0" tslib "^2.6.0" -"@docusaurus/plugin-google-analytics@3.4.0": - version "3.4.0" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-google-analytics/-/plugin-google-analytics-3.4.0.tgz#5f59fc25329a59decc231936f6f9fb5663da3c55" - integrity sha512-mCArluxEGi3cmYHqsgpGGt3IyLCrFBxPsxNZ56Mpur0xSlInnIHoeLDH7FvVVcPJRPSQ9/MfRqLsainRw+BojA== +"@docusaurus/plugin-google-analytics@3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-google-analytics/-/plugin-google-analytics-3.5.2.tgz#1143e78d1461d3c74a2746f036d25b18d4a2608d" + integrity sha512-rjEkJH/tJ8OXRE9bwhV2mb/WP93V441rD6XnM6MIluu7rk8qg38iSxS43ga2V2Q/2ib53PcqbDEJDG/yWQRJhQ== dependencies: - "@docusaurus/core" "3.4.0" - "@docusaurus/types" "3.4.0" - "@docusaurus/utils-validation" "3.4.0" + "@docusaurus/core" "3.5.2" + "@docusaurus/types" "3.5.2" + "@docusaurus/utils-validation" "3.5.2" tslib "^2.6.0" -"@docusaurus/plugin-google-gtag@3.4.0": - version "3.4.0" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-google-gtag/-/plugin-google-gtag-3.4.0.tgz#42489ac5fe1c83b5523ceedd5ef74f9aa8bc251b" - integrity sha512-Dsgg6PLAqzZw5wZ4QjUYc8Z2KqJqXxHxq3vIoyoBWiLEEfigIs7wHR+oiWUQy3Zk9MIk6JTYj7tMoQU0Jm3nqA== +"@docusaurus/plugin-google-gtag@3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-google-gtag/-/plugin-google-gtag-3.5.2.tgz#60b5a9e1888c4fa16933f7c5cb5f2f2c31caad3a" + integrity sha512-lm8XL3xLkTPHFKKjLjEEAHUrW0SZBSHBE1I+i/tmYMBsjCcUB5UJ52geS5PSiOCFVR74tbPGcPHEV/gaaxFeSA== dependencies: - "@docusaurus/core" "3.4.0" - "@docusaurus/types" "3.4.0" - "@docusaurus/utils-validation" "3.4.0" + "@docusaurus/core" "3.5.2" + "@docusaurus/types" "3.5.2" + "@docusaurus/utils-validation" "3.5.2" "@types/gtag.js" "^0.0.12" tslib "^2.6.0" -"@docusaurus/plugin-google-tag-manager@3.4.0": - version "3.4.0" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-google-tag-manager/-/plugin-google-tag-manager-3.4.0.tgz#cebb03a5ffa1e70b37d95601442babea251329ff" - integrity sha512-O9tX1BTwxIhgXpOLpFDueYA9DWk69WCbDRrjYoMQtFHSkTyE7RhNgyjSPREUWJb9i+YUg3OrsvrBYRl64FCPCQ== +"@docusaurus/plugin-google-tag-manager@3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-google-tag-manager/-/plugin-google-tag-manager-3.5.2.tgz#7a37334d2e7f00914d61ad05bc09391c4db3bfda" + integrity sha512-QkpX68PMOMu10Mvgvr5CfZAzZQFx8WLlOiUQ/Qmmcl6mjGK6H21WLT5x7xDmcpCoKA/3CegsqIqBR+nA137lQg== dependencies: - "@docusaurus/core" "3.4.0" - "@docusaurus/types" "3.4.0" - "@docusaurus/utils-validation" "3.4.0" + "@docusaurus/core" "3.5.2" + "@docusaurus/types" "3.5.2" + "@docusaurus/utils-validation" "3.5.2" tslib "^2.6.0" -"@docusaurus/plugin-sitemap@3.4.0": - version "3.4.0" - resolved "https://registry.yarnpkg.com/@docusaurus/plugin-sitemap/-/plugin-sitemap-3.4.0.tgz#b091d64d1e3c6c872050189999580187537bcbc6" - integrity sha512-+0VDvx9SmNrFNgwPoeoCha+tRoAjopwT0+pYO1xAbyLcewXSemq+eLxEa46Q1/aoOaJQ0qqHELuQM7iS2gp33Q== - dependencies: - "@docusaurus/core" "3.4.0" - "@docusaurus/logger" "3.4.0" - "@docusaurus/types" "3.4.0" - "@docusaurus/utils" "3.4.0" - "@docusaurus/utils-common" "3.4.0" - "@docusaurus/utils-validation" "3.4.0" +"@docusaurus/plugin-sitemap@3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/plugin-sitemap/-/plugin-sitemap-3.5.2.tgz#9c940b27f3461c54d65295cf4c52cb20538bd360" + integrity sha512-DnlqYyRAdQ4NHY28TfHuVk414ft2uruP4QWCH//jzpHjqvKyXjj2fmDtI8RPUBh9K8iZKFMHRnLtzJKySPWvFA== + dependencies: + "@docusaurus/core" "3.5.2" + "@docusaurus/logger" "3.5.2" + "@docusaurus/types" "3.5.2" + "@docusaurus/utils" "3.5.2" + "@docusaurus/utils-common" "3.5.2" + "@docusaurus/utils-validation" "3.5.2" fs-extra "^11.1.1" sitemap "^7.1.1" tslib "^2.6.0" -"@docusaurus/preset-classic@^3.1.0": - version "3.4.0" - resolved "https://registry.yarnpkg.com/@docusaurus/preset-classic/-/preset-classic-3.4.0.tgz#6082a32fbb465b0cb2c2a50ebfc277cff2c0f139" - integrity sha512-Ohj6KB7siKqZaQhNJVMBBUzT3Nnp6eTKqO+FXO3qu/n1hJl3YLwVKTWBg28LF7MWrKu46UuYavwMRxud0VyqHg== - dependencies: - "@docusaurus/core" "3.4.0" - "@docusaurus/plugin-content-blog" "3.4.0" - "@docusaurus/plugin-content-docs" "3.4.0" - "@docusaurus/plugin-content-pages" "3.4.0" - "@docusaurus/plugin-debug" "3.4.0" - "@docusaurus/plugin-google-analytics" "3.4.0" - "@docusaurus/plugin-google-gtag" "3.4.0" - "@docusaurus/plugin-google-tag-manager" "3.4.0" - "@docusaurus/plugin-sitemap" "3.4.0" - "@docusaurus/theme-classic" "3.4.0" - "@docusaurus/theme-common" "3.4.0" - "@docusaurus/theme-search-algolia" "3.4.0" - "@docusaurus/types" "3.4.0" - -"@docusaurus/remark-plugin-npm2yarn@^3.1.0": - version "3.4.0" - resolved "https://registry.yarnpkg.com/@docusaurus/remark-plugin-npm2yarn/-/remark-plugin-npm2yarn-3.4.0.tgz#1a3c43e70c9195ede0ade28d59f858b76eb7dafe" - integrity sha512-MXcYAkKu6544h7J4vbKdeH+G5HZf6LF3qZORQqWzxOi2p82PTLRu0YM6ZgzfPjH5nZClgLBHypPbyO9qhkxPKw== +"@docusaurus/preset-classic@^3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/preset-classic/-/preset-classic-3.5.2.tgz#977f78510bbc556aa0539149eef960bb7ab52bd9" + integrity sha512-3ihfXQ95aOHiLB5uCu+9PRy2gZCeSZoDcqpnDvf3B+sTrMvMTr8qRUzBvWkoIqc82yG5prCboRjk1SVILKx6sg== + dependencies: + "@docusaurus/core" "3.5.2" + "@docusaurus/plugin-content-blog" "3.5.2" + "@docusaurus/plugin-content-docs" "3.5.2" + "@docusaurus/plugin-content-pages" "3.5.2" + "@docusaurus/plugin-debug" "3.5.2" + "@docusaurus/plugin-google-analytics" "3.5.2" + "@docusaurus/plugin-google-gtag" "3.5.2" + "@docusaurus/plugin-google-tag-manager" "3.5.2" + "@docusaurus/plugin-sitemap" "3.5.2" + "@docusaurus/theme-classic" "3.5.2" + "@docusaurus/theme-common" "3.5.2" + "@docusaurus/theme-search-algolia" "3.5.2" + "@docusaurus/types" "3.5.2" + +"@docusaurus/remark-plugin-npm2yarn@^3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/remark-plugin-npm2yarn/-/remark-plugin-npm2yarn-3.5.2.tgz#892a63a9b53475d7c59957bd67277656dcd91079" + integrity sha512-EAD7R/skPuhW3lWZyDhRuFs3m2EGaR008tuoe6SrFre7PifoxmSCwXk8Nb4VtVRKnnbn4IgHyqq+ma47gGmKwg== dependencies: mdast-util-mdx "^3.0.0" npm-to-yarn "^2.2.1" @@ -1535,27 +1558,27 @@ unified "^11.0.3" unist-util-visit "^5.0.0" -"@docusaurus/theme-classic@3.4.0": - version "3.4.0" - resolved "https://registry.yarnpkg.com/@docusaurus/theme-classic/-/theme-classic-3.4.0.tgz#1b0f48edec3e3ec8927843554b9f11e5927b0e52" - integrity sha512-0IPtmxsBYv2adr1GnZRdMkEQt1YW6tpzrUPj02YxNpvJ5+ju4E13J5tB4nfdaen/tfR1hmpSPlTFPvTf4kwy8Q== - dependencies: - "@docusaurus/core" "3.4.0" - "@docusaurus/mdx-loader" "3.4.0" - "@docusaurus/module-type-aliases" "3.4.0" - "@docusaurus/plugin-content-blog" "3.4.0" - "@docusaurus/plugin-content-docs" "3.4.0" - "@docusaurus/plugin-content-pages" "3.4.0" - "@docusaurus/theme-common" "3.4.0" - "@docusaurus/theme-translations" "3.4.0" - "@docusaurus/types" "3.4.0" - "@docusaurus/utils" "3.4.0" - "@docusaurus/utils-common" "3.4.0" - "@docusaurus/utils-validation" "3.4.0" +"@docusaurus/theme-classic@3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/theme-classic/-/theme-classic-3.5.2.tgz#602ddb63d987ab1f939e3760c67bc1880f01c000" + integrity sha512-XRpinSix3NBv95Rk7xeMF9k4safMkwnpSgThn0UNQNumKvmcIYjfkwfh2BhwYh/BxMXQHJ/PdmNh22TQFpIaYg== + dependencies: + "@docusaurus/core" "3.5.2" + "@docusaurus/mdx-loader" "3.5.2" + "@docusaurus/module-type-aliases" "3.5.2" + "@docusaurus/plugin-content-blog" "3.5.2" + "@docusaurus/plugin-content-docs" "3.5.2" + "@docusaurus/plugin-content-pages" "3.5.2" + "@docusaurus/theme-common" "3.5.2" + "@docusaurus/theme-translations" "3.5.2" + "@docusaurus/types" "3.5.2" + "@docusaurus/utils" "3.5.2" + "@docusaurus/utils-common" "3.5.2" + "@docusaurus/utils-validation" "3.5.2" "@mdx-js/react" "^3.0.0" clsx "^2.0.0" copy-text-to-clipboard "^3.2.0" - infima "0.2.0-alpha.43" + infima "0.2.0-alpha.44" lodash "^4.17.21" nprogress "^0.2.0" postcss "^8.4.26" @@ -1566,18 +1589,15 @@ tslib "^2.6.0" utility-types "^3.10.0" -"@docusaurus/theme-common@3.4.0": - version "3.4.0" - resolved "https://registry.yarnpkg.com/@docusaurus/theme-common/-/theme-common-3.4.0.tgz#01f2b728de6cb57f6443f52fc30675cf12a5d49f" - integrity sha512-0A27alXuv7ZdCg28oPE8nH/Iz73/IUejVaCazqu9elS4ypjiLhK3KfzdSQBnL/g7YfHSlymZKdiOHEo8fJ0qMA== - dependencies: - "@docusaurus/mdx-loader" "3.4.0" - "@docusaurus/module-type-aliases" "3.4.0" - "@docusaurus/plugin-content-blog" "3.4.0" - "@docusaurus/plugin-content-docs" "3.4.0" - "@docusaurus/plugin-content-pages" "3.4.0" - "@docusaurus/utils" "3.4.0" - "@docusaurus/utils-common" "3.4.0" +"@docusaurus/theme-common@3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/theme-common/-/theme-common-3.5.2.tgz#b507ab869a1fba0be9c3c9d74f2f3d74c3ac78b2" + integrity sha512-QXqlm9S6x9Ibwjs7I2yEDgsCocp708DrCrgHgKwg2n2AY0YQ6IjU0gAK35lHRLOvAoJUfCKpQAwUykB0R7+Eew== + dependencies: + "@docusaurus/mdx-loader" "3.5.2" + "@docusaurus/module-type-aliases" "3.5.2" + "@docusaurus/utils" "3.5.2" + "@docusaurus/utils-common" "3.5.2" "@types/history" "^4.7.11" "@types/react" "*" "@types/react-router-config" "*" @@ -1587,32 +1607,32 @@ tslib "^2.6.0" utility-types "^3.10.0" -"@docusaurus/theme-mermaid@^3.1.0": - version "3.4.0" - resolved "https://registry.yarnpkg.com/@docusaurus/theme-mermaid/-/theme-mermaid-3.4.0.tgz#ef1d2231d0858767f67538b4fafd7d0ce2a3e845" - integrity sha512-3w5QW0HEZ2O6x2w6lU3ZvOe1gNXP2HIoKDMJBil1VmLBc9PmpAG17VmfhI/p3L2etNmOiVs5GgniUqvn8AFEGQ== - dependencies: - "@docusaurus/core" "3.4.0" - "@docusaurus/module-type-aliases" "3.4.0" - "@docusaurus/theme-common" "3.4.0" - "@docusaurus/types" "3.4.0" - "@docusaurus/utils-validation" "3.4.0" +"@docusaurus/theme-mermaid@^3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/theme-mermaid/-/theme-mermaid-3.5.2.tgz#7d64289e6f2493b9fc0d5f2e8f66da4c9d884db8" + integrity sha512-7vWCnIe/KoyTN1Dc55FIyqO5hJ3YaV08Mr63Zej0L0mX1iGzt+qKSmeVUAJ9/aOalUhF0typV0RmNUSy5FAmCg== + dependencies: + "@docusaurus/core" "3.5.2" + "@docusaurus/module-type-aliases" "3.5.2" + "@docusaurus/theme-common" "3.5.2" + "@docusaurus/types" "3.5.2" + "@docusaurus/utils-validation" "3.5.2" mermaid "^10.4.0" tslib "^2.6.0" -"@docusaurus/theme-search-algolia@3.4.0": - version "3.4.0" - resolved "https://registry.yarnpkg.com/@docusaurus/theme-search-algolia/-/theme-search-algolia-3.4.0.tgz#c499bad71d668df0d0f15b0e5e33e2fc4e330fcc" - integrity sha512-aiHFx7OCw4Wck1z6IoShVdUWIjntC8FHCw9c5dR8r3q4Ynh+zkS8y2eFFunN/DL6RXPzpnvKCg3vhLQYJDmT9Q== +"@docusaurus/theme-search-algolia@3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/theme-search-algolia/-/theme-search-algolia-3.5.2.tgz#466c83ca7e8017d95ae6889ccddc5ef8bf6b61c6" + integrity sha512-qW53kp3VzMnEqZGjakaV90sst3iN1o32PH+nawv1uepROO8aEGxptcq2R5rsv7aBShSRbZwIobdvSYKsZ5pqvA== dependencies: "@docsearch/react" "^3.5.2" - "@docusaurus/core" "3.4.0" - "@docusaurus/logger" "3.4.0" - "@docusaurus/plugin-content-docs" "3.4.0" - "@docusaurus/theme-common" "3.4.0" - "@docusaurus/theme-translations" "3.4.0" - "@docusaurus/utils" "3.4.0" - "@docusaurus/utils-validation" "3.4.0" + "@docusaurus/core" "3.5.2" + "@docusaurus/logger" "3.5.2" + "@docusaurus/plugin-content-docs" "3.5.2" + "@docusaurus/theme-common" "3.5.2" + "@docusaurus/theme-translations" "3.5.2" + "@docusaurus/utils" "3.5.2" + "@docusaurus/utils-validation" "3.5.2" algoliasearch "^4.18.0" algoliasearch-helper "^3.13.3" clsx "^2.0.0" @@ -1622,18 +1642,18 @@ tslib "^2.6.0" utility-types "^3.10.0" -"@docusaurus/theme-translations@3.4.0": - version "3.4.0" - resolved "https://registry.yarnpkg.com/@docusaurus/theme-translations/-/theme-translations-3.4.0.tgz#e6355d01352886c67e38e848b2542582ea3070af" - integrity sha512-zSxCSpmQCCdQU5Q4CnX/ID8CSUUI3fvmq4hU/GNP/XoAWtXo9SAVnM3TzpU8Gb//H3WCsT8mJcTfyOk3d9ftNg== +"@docusaurus/theme-translations@3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/theme-translations/-/theme-translations-3.5.2.tgz#38f9ebf2a5d860397022206a05fef66c08863c89" + integrity sha512-GPZLcu4aT1EmqSTmbdpVrDENGR2yObFEX8ssEFYTCiAIVc0EihNSdOIBTazUvgNqwvnoU1A8vIs1xyzc3LITTw== dependencies: fs-extra "^11.1.1" tslib "^2.6.0" -"@docusaurus/types@3.4.0": - version "3.4.0" - resolved "https://registry.yarnpkg.com/@docusaurus/types/-/types-3.4.0.tgz#237c3f737e9db3f7c1a5935a3ef48d6eadde8292" - integrity sha512-4jcDO8kXi5Cf9TcyikB/yKmz14f2RZ2qTRerbHAsS+5InE9ZgSLBNLsewtFTcTOXSVcbU3FoGOzcNWAmU1TR0A== +"@docusaurus/types@3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/types/-/types-3.5.2.tgz#058019dbeffbee2d412c3f72569e412a727f9608" + integrity sha512-N6GntLXoLVUwkZw7zCxwy9QiuEXIcTVzA9AkmNw16oc0AP3SXLrMmDMMBIfgqwuKWa6Ox6epHol9kMtJqekACw== dependencies: "@mdx-js/mdx" "^3.0.0" "@types/history" "^4.7.11" @@ -1645,34 +1665,34 @@ webpack "^5.88.1" webpack-merge "^5.9.0" -"@docusaurus/utils-common@3.4.0": - version "3.4.0" - resolved "https://registry.yarnpkg.com/@docusaurus/utils-common/-/utils-common-3.4.0.tgz#2a43fefd35b85ab9fcc6833187e66c15f8bfbbc6" - integrity sha512-NVx54Wr4rCEKsjOH5QEVvxIqVvm+9kh7q8aYTU5WzUU9/Hctd6aTrcZ3G0Id4zYJ+AeaG5K5qHA4CY5Kcm2iyQ== +"@docusaurus/utils-common@3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/utils-common/-/utils-common-3.5.2.tgz#4d7f5e962fbca3e2239d80457aa0e4bd3d8f7e0a" + integrity sha512-i0AZjHiRgJU6d7faQngIhuHKNrszpL/SHQPgF1zH4H+Ij6E9NBYGy6pkcGWToIv7IVPbs+pQLh1P3whn0gWXVg== dependencies: tslib "^2.6.0" -"@docusaurus/utils-validation@3.4.0": - version "3.4.0" - resolved "https://registry.yarnpkg.com/@docusaurus/utils-validation/-/utils-validation-3.4.0.tgz#0176f6e503ff45f4390ec2ecb69550f55e0b5eb7" - integrity sha512-hYQ9fM+AXYVTWxJOT1EuNaRnrR2WGpRdLDQG07O8UOpsvCPWUVOeo26Rbm0JWY2sGLfzAb+tvJ62yF+8F+TV0g== +"@docusaurus/utils-validation@3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/utils-validation/-/utils-validation-3.5.2.tgz#1b2b2f02082781cc8ce713d4c85e88d6d2fc4eb3" + integrity sha512-m+Foq7augzXqB6HufdS139PFxDC5d5q2QKZy8q0qYYvGdI6nnlNsGH4cIGsgBnV7smz+mopl3g4asbSDvMV0jA== dependencies: - "@docusaurus/logger" "3.4.0" - "@docusaurus/utils" "3.4.0" - "@docusaurus/utils-common" "3.4.0" + "@docusaurus/logger" "3.5.2" + "@docusaurus/utils" "3.5.2" + "@docusaurus/utils-common" "3.5.2" fs-extra "^11.2.0" joi "^17.9.2" js-yaml "^4.1.0" lodash "^4.17.21" tslib "^2.6.0" -"@docusaurus/utils@3.4.0": - version "3.4.0" - resolved "https://registry.yarnpkg.com/@docusaurus/utils/-/utils-3.4.0.tgz#c508e20627b7a55e2b541e4a28c95e0637d6a204" - integrity sha512-fRwnu3L3nnWaXOgs88BVBmG1yGjcQqZNHG+vInhEa2Sz2oQB+ZjbEMO5Rh9ePFpZ0YDiDUhpaVjwmS+AU2F14g== +"@docusaurus/utils@3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@docusaurus/utils/-/utils-3.5.2.tgz#17763130215f18d7269025903588ef7fb373e2cb" + integrity sha512-33QvcNFh+Gv+C2dP9Y9xWEzMgf3JzrpL2nW9PopidiohS1nDcyknKRx2DWaFvyVTTYIkkABVSr073VTj/NITNA== dependencies: - "@docusaurus/logger" "3.4.0" - "@docusaurus/utils-common" "3.4.0" + "@docusaurus/logger" "3.5.2" + "@docusaurus/utils-common" "3.5.2" "@svgr/webpack" "^8.1.0" escape-string-regexp "^4.0.0" file-loader "^6.2.0" @@ -1809,7 +1829,7 @@ unist-util-visit "^5.0.0" vfile "^6.0.0" -"@mdx-js/react@^3.0.0": +"@mdx-js/react@^3.0.0", "@mdx-js/react@^3.0.1": version "3.0.1" resolved "https://registry.yarnpkg.com/@mdx-js/react/-/react-3.0.1.tgz#997a19b3a5b783d936c75ae7c47cfe62f967f746" integrity sha512-9ZrPIU4MGf6et1m1ov3zKf+q9+deetI51zprKB1D/z3NOb+rUxxtEl3mCjW5wTGh6VhRdwPueh1oRzi6ezkA8A== @@ -2519,6 +2539,13 @@ resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== +abort-controller@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" + integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== + dependencies: + event-target-shim "^5.0.0" + accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.8: version "1.3.8" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" @@ -2680,30 +2707,31 @@ anymatch@~3.1.2: normalize-path "^3.0.0" picomatch "^2.0.4" -archiver-utils@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/archiver-utils/-/archiver-utils-4.0.1.tgz#66ad15256e69589a77f706c90c6dbcc1b2775d2a" - integrity sha512-Q4Q99idbvzmgCTEAAhi32BkOyq8iVI5EwdO0PmBDSGIzzjYNdcFn7Q7k3OzbLy4kLUPXfJtG6fO2RjftXbobBg== +archiver-utils@^5.0.0, archiver-utils@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/archiver-utils/-/archiver-utils-5.0.2.tgz#63bc719d951803efc72cf961a56ef810760dd14d" + integrity sha512-wuLJMmIBQYCsGZgYLTy5FIB2pF6Lfb6cXMSF8Qywwk3t20zWnAi7zLcQFdKQmIB8wyZpY5ER38x08GbwtR2cLA== dependencies: - glob "^8.0.0" + glob "^10.0.0" graceful-fs "^4.2.0" + is-stream "^2.0.1" lazystream "^1.0.0" lodash "^4.17.15" normalize-path "^3.0.0" - readable-stream "^3.6.0" + readable-stream "^4.0.0" -archiver@^6.0.1: - version "6.0.2" - resolved "https://registry.yarnpkg.com/archiver/-/archiver-6.0.2.tgz#f45e7598dfe48e834ac8c7a0c37033f826f5a639" - integrity sha512-UQ/2nW7NMl1G+1UnrLypQw1VdT9XZg/ECcKPq7l+STzStrSivFIXIp34D8M5zeNGW5NoOupdYCHv6VySCPNNlw== +archiver@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/archiver/-/archiver-7.0.1.tgz#c9d91c350362040b8927379c7aa69c0655122f61" + integrity sha512-ZcbTaIqJOfCc03QwD468Unz/5Ir8ATtvAHsK+FdXbDIbGfihqh9mrvdcYunQzqn4HrvWWaFyaxJhGZagaJJpPQ== dependencies: - archiver-utils "^4.0.1" + archiver-utils "^5.0.2" async "^3.2.4" - buffer-crc32 "^0.2.1" - readable-stream "^3.6.0" + buffer-crc32 "^1.0.0" + readable-stream "^4.0.0" readdir-glob "^1.1.2" tar-stream "^3.0.0" - zip-stream "^5.0.1" + zip-stream "^6.0.1" arg@^5.0.0: version "5.0.2" @@ -2839,6 +2867,11 @@ bare-events@^2.2.0: resolved "https://registry.yarnpkg.com/bare-events/-/bare-events-2.4.2.tgz#3140cca7a0e11d49b3edc5041ab560659fd8e1f8" integrity sha512-qMKFd2qG/36aA4GwvKq8MxnPgCQAmBWmSyLWsJcbn8v03wvIPQ/hG1Ms8bPzndZxMDoHpxez5VOS+gC9Yi24/Q== +base64-js@^1.3.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== + basic-ftp@^5.0.2: version "5.0.5" resolved "https://registry.yarnpkg.com/basic-ftp/-/basic-ftp-5.0.5.tgz#14a474f5fffecca1f4f406f1c26b18f800225ac0" @@ -2950,16 +2983,24 @@ browserslist@^4.0.0, browserslist@^4.18.1, browserslist@^4.21.10, browserslist@^ node-releases "^2.0.14" update-browserslist-db "^1.0.16" -buffer-crc32@^0.2.1: - version "0.2.13" - resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" - integrity sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ== +buffer-crc32@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-1.0.0.tgz#a10993b9055081d55304bd9feb4a072de179f405" + integrity sha512-Db1SbgBS/fg/392AblrMJk97KggmvYhr4pB5ZIMTWtaivCPMWLkmb7m21cJvpvgK+J3nsU2CmmixNBZx4vFj/w== buffer-from@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== +buffer@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" + integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.2.1" + bytes@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" @@ -3101,7 +3142,7 @@ cheerio-select@^2.1.0: domhandler "^5.0.3" domutils "^3.0.1" -cheerio@^1.0.0-rc.10, cheerio@^1.0.0-rc.12: +cheerio@1.0.0-rc.12, cheerio@^1.0.0-rc.10: version "1.0.0-rc.12" resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.12.tgz#788bf7466506b1c6bf5fae51d24a2c4d62e47683" integrity sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q== @@ -3183,7 +3224,7 @@ clone-deep@^4.0.1: kind-of "^6.0.2" shallow-clone "^3.0.0" -clsx@^2.0.0, clsx@^2.1.0: +clsx@^2.0.0, clsx@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/clsx/-/clsx-2.1.1.tgz#eed397c9fd8bd882bfb18deab7102049a2f32999" integrity sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA== @@ -3279,15 +3320,16 @@ common-path-prefix@^3.0.0: resolved "https://registry.yarnpkg.com/common-path-prefix/-/common-path-prefix-3.0.0.tgz#7d007a7e07c58c4b4d5f433131a19141b29f11e0" integrity sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w== -compress-commons@^5.0.1: - version "5.0.3" - resolved "https://registry.yarnpkg.com/compress-commons/-/compress-commons-5.0.3.tgz#36b6572fdfc220c88c9c939b48667818806667e9" - integrity sha512-/UIcLWvwAQyVibgpQDPtfNM3SvqN7G9elAPAV7GM0L53EbNWwWiCsWtK8Fwed/APEbptPHXs5PuW+y8Bq8lFTA== +compress-commons@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/compress-commons/-/compress-commons-6.0.2.tgz#26d31251a66b9d6ba23a84064ecd3a6a71d2609e" + integrity sha512-6FqVXeETqWPoGcfzrXb37E50NP0LXT8kAMu5ooZayhWWdgEY4lBEEcbQNXtkuKQsGduxiIcI4gOTsxTmuq/bSg== dependencies: crc-32 "^1.2.0" - crc32-stream "^5.0.0" + crc32-stream "^6.0.0" + is-stream "^2.0.1" normalize-path "^3.0.0" - readable-stream "^3.6.0" + readable-stream "^4.0.0" compressible@~2.0.16: version "2.0.18" @@ -3462,13 +3504,13 @@ crc-32@^1.2.0: resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.2.tgz#3cad35a934b8bf71f25ca524b6da51fb7eace2ff" integrity sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ== -crc32-stream@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/crc32-stream/-/crc32-stream-5.0.1.tgz#bc1581c9a9022a9242605dc91b14e069e3aa87a5" - integrity sha512-lO1dFui+CEUh/ztYIpgpKItKW9Bb4NWakCRJrnqAbFIYD+OZAwb2VfD5T5eXMw2FNcsDHkQcNl/Wh3iVXYwU6g== +crc32-stream@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/crc32-stream/-/crc32-stream-6.0.0.tgz#8529a3868f8b27abb915f6c3617c0fadedbf9430" + integrity sha512-piICUB6ei4IlTv1+653yq5+KoqfBYmj9bw6LqXoOneTMDXk5nM1qt12mFW1caG3LlJXEKW1Bp0WggEmIfQB34g== dependencies: crc-32 "^1.2.0" - readable-stream "^3.4.0" + readable-stream "^4.0.0" cross-spawn@^7.0.0, cross-spawn@^7.0.3: version "7.0.3" @@ -4463,12 +4505,17 @@ eval@^0.1.8: "@types/node" "*" require-like ">= 0.1.1" +event-target-shim@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" + integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== + eventemitter3@^4.0.0: version "4.0.7" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== -events@^3.2.0: +events@^3.2.0, events@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== @@ -4837,6 +4884,18 @@ glob-to-regexp@^0.4.1: resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== +glob@^10.0.0: + version "10.4.5" + resolved "https://registry.yarnpkg.com/glob/-/glob-10.4.5.tgz#f4d9f0b90ffdbab09c9d77f5f29b4262517b0956" + integrity sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg== + dependencies: + foreground-child "^3.1.0" + jackspeak "^3.1.2" + minimatch "^9.0.4" + minipass "^7.1.2" + package-json-from-dist "^1.0.0" + path-scurry "^1.11.1" + glob@^10.3.7: version "10.4.2" resolved "https://registry.yarnpkg.com/glob/-/glob-10.4.2.tgz#bed6b95dade5c1f80b4434daced233aee76160e5" @@ -4861,17 +4920,6 @@ glob@^7.0.0, glob@^7.1.3, glob@^7.1.6: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^8.0.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" - integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^5.0.1" - once "^1.3.0" - global-dirs@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-3.0.1.tgz#0c488971f066baceda21447aecb1a8b911d22485" @@ -5359,6 +5407,11 @@ icss-utils@^5.0.0, icss-utils@^5.1.0: resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-5.1.0.tgz#c6be6858abd013d768e98366ae47e25d5887b1ae" integrity sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA== +ieee754@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" + integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== + ignore@^5.2.0, ignore@^5.2.4: version "5.3.1" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" @@ -5399,10 +5452,10 @@ indent-string@^4.0.0: resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== -infima@0.2.0-alpha.43: - version "0.2.0-alpha.43" - resolved "https://registry.yarnpkg.com/infima/-/infima-0.2.0-alpha.43.tgz#f7aa1d7b30b6c08afef441c726bac6150228cbe0" - integrity sha512-2uw57LvUqW0rK/SWYnd/2rRfxNA5DDNOh33jxF7fy46VWoNhGxiUQyVZHbBMjQ33mQem0cjdDVwgWVAmlRfgyQ== +infima@0.2.0-alpha.44: + version "0.2.0-alpha.44" + resolved "https://registry.yarnpkg.com/infima/-/infima-0.2.0-alpha.44.tgz#9cd9446e473b44d49763f48efabe31f32440861d" + integrity sha512-tuRkUSO/lB3rEhLJk25atwAjgLuzq070+pOW8XcvpHky/YbENnRRdPd85IBkyeTgttmOy5ah+yHYsK1HhUd4lQ== inflight@^1.0.4: version "1.0.6" @@ -5642,7 +5695,7 @@ is-root@^2.1.0: resolved "https://registry.yarnpkg.com/is-root/-/is-root-2.1.0.tgz#809e18129cf1129644302a4f8544035d51984a9c" integrity sha512-AGOriNp96vNBd3HtU+RzFEc75FfR5ymiYv8E553I71SCeXBiMsVDUtdio1OEFvrPyLIQ9tVR5RxXIFe5PUFjMg== -is-stream@^2.0.0: +is-stream@^2.0.0, is-stream@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== @@ -6015,7 +6068,7 @@ markdown-extensions@^2.0.0: resolved "https://registry.yarnpkg.com/markdown-extensions/-/markdown-extensions-2.0.0.tgz#34bebc83e9938cae16e0e017e4a9814a8330d3c4" integrity sha512-o5vL7aDWatOTX8LzaS1WMoaoxIiLRQJuIKKe2wAw6IeULDHaqbiqiggmx+pKvZDb1Sj+pE46Sn1T7lCqfFtg1Q== -markdown-link-check@^3.11.2: +markdown-link-check@^3.12.2: version "3.12.2" resolved "https://registry.yarnpkg.com/markdown-link-check/-/markdown-link-check-3.12.2.tgz#05606ccfdfc14e75d28a15cf31297aa273f1f754" integrity sha512-GWMwSvxuZn+uGGydi5yywnnDZy08SGps4I/63xqvWT7lxtH4cVLnhgZZYtEcPz/QvgPg9vbH2rvWpa29owMtHA== @@ -7014,7 +7067,7 @@ minimatch@3.1.2, minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1: dependencies: brace-expansion "^1.1.7" -minimatch@^5.0.1, minimatch@^5.1.0: +minimatch@^5.1.0: version "5.1.6" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== @@ -7814,10 +7867,10 @@ postcss@^8.4.21, postcss@^8.4.24, postcss@^8.4.26, postcss@^8.4.33, postcss@^8.4 picocolors "^1.0.1" source-map-js "^1.2.0" -prettier@^3.2.4: - version "3.3.2" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.2.tgz#03ff86dc7c835f2d2559ee76876a3914cec4a90a" - integrity sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA== +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== pretty-error@^4.0.0: version "4.0.0" @@ -7857,6 +7910,11 @@ process-nextick-args@~2.0.0: resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== +process@^0.11.10: + version "0.11.10" + resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" + integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== + progress@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" @@ -8037,7 +8095,7 @@ react-dev-utils@^12.0.1: strip-ansi "^6.0.1" text-table "^0.2.0" -react-dom@^18.2.0: +react-dom@^18.3.1: version "18.3.1" resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.3.1.tgz#c2265d79511b57d479b3dd3fdfa51536494c5cb4" integrity sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw== @@ -8150,7 +8208,7 @@ react-router@5.3.4, react-router@^5.3.4: tiny-invariant "^1.0.2" tiny-warning "^1.0.0" -react@^18.2.0: +react@^18.3.1: version "18.3.1" resolved "https://registry.yarnpkg.com/react/-/react-18.3.1.tgz#49ab892009c53933625bd16b2533fc754cab2891" integrity sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ== @@ -8170,7 +8228,7 @@ readable-stream@^2.0.1, readable-stream@^2.0.5: string_decoder "~1.1.1" util-deprecate "~1.0.1" -readable-stream@^3.0.6, readable-stream@^3.4.0, readable-stream@^3.6.0: +readable-stream@^3.0.6: version "3.6.2" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== @@ -8179,6 +8237,17 @@ readable-stream@^3.0.6, readable-stream@^3.4.0, readable-stream@^3.6.0: string_decoder "^1.1.1" util-deprecate "^1.0.1" +readable-stream@^4.0.0: + version "4.5.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-4.5.2.tgz#9e7fc4c45099baeed934bff6eb97ba6cf2729e09" + integrity sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g== + dependencies: + abort-controller "^3.0.0" + buffer "^6.0.3" + events "^3.3.0" + process "^0.11.10" + string_decoder "^1.3.0" + readdir-glob@^1.1.2: version "1.1.3" resolved "https://registry.yarnpkg.com/readdir-glob/-/readdir-glob-1.1.3.tgz#c3d831f51f5e7bfa62fa2ffbe4b508c640f09584" @@ -8941,7 +9010,7 @@ string-width@^5.0.1, string-width@^5.1.2: emoji-regex "^9.2.2" strip-ansi "^7.0.1" -string_decoder@^1.1.1: +string_decoder@^1.1.1, string_decoder@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== @@ -9747,14 +9816,14 @@ yocto-queue@^1.0.0: resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-1.1.1.tgz#fef65ce3ac9f8a32ceac5a634f74e17e5b232110" integrity sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g== -zip-stream@^5.0.1: - version "5.0.2" - resolved "https://registry.yarnpkg.com/zip-stream/-/zip-stream-5.0.2.tgz#77b1dce7af291482d368a9203c9029f4eb52e12e" - integrity sha512-LfOdrUvPB8ZoXtvOBz6DlNClfvi//b5d56mSWyJi7XbH/HfhOHfUhOqxhT/rUiR7yiktlunqRo+jY6y/cWC/5g== +zip-stream@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/zip-stream/-/zip-stream-6.0.1.tgz#e141b930ed60ccaf5d7fa9c8260e0d1748a2bbfb" + integrity sha512-zK7YHHz4ZXpW89AHXUPbQVGKI7uvkd3hzusTdotCg1UxyaVtg0zFJSTfW/Dq5f7OBBVnq6cZIaC8Ti4hb6dtCA== dependencies: - archiver-utils "^4.0.1" - compress-commons "^5.0.1" - readable-stream "^3.6.0" + archiver-utils "^5.0.0" + compress-commons "^6.0.2" + readable-stream "^4.0.0" zwitch@^2.0.0: version "2.0.4"