├── .changeset ├── README.md └── config.json ├── .cm └── gitstream.cm ├── .dockerignore ├── .eslintrc.js ├── .github ├── pull_request_template.md └── workflows │ ├── chromatic.yml.disabled │ ├── claude.yml │ ├── codeql.yml │ ├── dependency-review.yml │ ├── deploy.yml │ ├── docker-release.yml │ ├── failure-notification.yml │ ├── gitstream.yml │ ├── maids.yml │ ├── open-api-generator.yml │ ├── release.yml │ └── test.yml ├── .gitignore ├── .gitmodules ├── .npmrc ├── .nvmrc ├── .nxignore ├── .prettierrc.json ├── CLAUDE.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── Dockerfile ├── LICENSE ├── Procfile ├── README.md ├── docs ├── .gitignore ├── CHANGELOG.md ├── README.md ├── babel.config.js ├── docs │ ├── core │ │ ├── _category_.yml │ │ ├── index.md │ │ └── modules.md │ ├── helpers │ │ ├── _category_.yml │ │ ├── index.md │ │ └── modules.md │ ├── react │ │ ├── _category_.yml │ │ ├── enums │ │ │ ├── CircleLoadingState.md │ │ │ └── _category_.yml │ │ ├── index.md │ │ └── modules.md │ └── types │ │ ├── _category_.yml │ │ ├── index.md │ │ └── modules.md ├── docusaurus.config.js ├── netlify.toml ├── package.json ├── sidebars.js ├── src │ ├── css │ │ └── custom.css │ └── pages │ │ └── index.tsx ├── static │ ├── .nojekyll │ └── img │ │ ├── LearnCard.png │ │ ├── docusaurus.png │ │ ├── favicon.ico │ │ ├── lc.png │ │ ├── logo.svg │ │ ├── undraw_docusaurus_mountain.svg │ │ ├── undraw_docusaurus_react.svg │ │ └── undraw_docusaurus_tree.svg └── tsconfig.json ├── examples ├── chapi-example │ ├── .astro │ │ ├── settings.json │ │ └── types.d.ts │ ├── .gitignore │ ├── .vscode │ │ ├── extensions.json │ │ └── launch.json │ ├── CHANGELOG.md │ ├── README.md │ ├── astro.config.mjs │ ├── netlify.toml │ ├── package.json │ ├── project.json │ ├── public │ │ ├── favicon.ico │ │ ├── icon.png │ │ └── manifest.json │ ├── src │ │ ├── components │ │ │ ├── CredentialListItem.tsx │ │ │ ├── CredentialModal.tsx │ │ │ ├── CredentialRetrieval.tsx │ │ │ ├── CredentialStorage.tsx │ │ │ └── Credentials.tsx │ │ ├── env.d.ts │ │ ├── helpers │ │ │ ├── credential.helpers.ts │ │ │ └── random.helpers.ts │ │ ├── layouts │ │ │ └── Layout.astro │ │ ├── pages │ │ │ ├── get.astro │ │ │ ├── index.astro │ │ │ ├── login.astro │ │ │ ├── store.astro │ │ │ └── wallet-worker.astro │ │ └── stores │ │ │ └── walletStore.ts │ ├── tailwind.config.cjs │ └── tsconfig.json ├── learn-card-network-docker-compose │ └── compose.yaml ├── snap-chapi-example │ ├── .gitignore │ ├── .vscode │ │ ├── extensions.json │ │ └── launch.json │ ├── CHANGELOG.md │ ├── README.md │ ├── astro.config.mjs │ ├── package.json │ ├── project.json │ ├── public │ │ ├── favicon.ico │ │ ├── icon.png │ │ └── manifest.json │ ├── src │ │ ├── components │ │ │ ├── CredentialListItem.tsx │ │ │ ├── CredentialModal.tsx │ │ │ ├── CredentialStorage.tsx │ │ │ ├── Credentials.tsx │ │ │ └── LoadingIndicator.tsx │ │ ├── constants │ │ │ └── snapConstants.ts │ │ ├── env.d.ts │ │ ├── helpers │ │ │ ├── credential.helpers.ts │ │ │ ├── random.helpers.ts │ │ │ └── rpc.helpers.ts │ │ ├── layouts │ │ │ └── Layout.astro │ │ ├── pages │ │ │ ├── get.astro │ │ │ ├── index.astro │ │ │ ├── login.astro │ │ │ ├── store.astro │ │ │ └── wallet-worker.astro │ │ ├── stores │ │ │ ├── snapStore.ts │ │ │ └── walletStore.ts │ │ └── types │ │ │ └── global.d.ts │ ├── tailwind.config.cjs │ └── tsconfig.json └── snap-example-dapp │ ├── .gitignore │ ├── .nvmrc │ ├── CHANGELOG.md │ ├── README.md │ ├── astro.config.mjs │ ├── package.json │ ├── project.json │ ├── src │ ├── assets │ │ └── images │ │ │ └── LearnCardBanner.png │ ├── components │ │ ├── AddCredential.tsx │ │ ├── Did.tsx │ │ ├── DidSelector.tsx │ │ ├── GetCredential.tsx │ │ ├── GetCredentials.tsx │ │ ├── GetCredentialsList.tsx │ │ ├── IssueCredential.tsx │ │ ├── IssuePresentation.tsx │ │ ├── LoadingIndicator.tsx │ │ ├── PublishCredential.tsx │ │ ├── ReadFromCeramic.tsx │ │ ├── RemoveCredential.tsx │ │ ├── SnapInfo.tsx │ │ ├── VerifyCredential.tsx │ │ ├── VerifyPresentation.tsx │ │ └── input │ │ │ └── TextBox.tsx │ ├── constants │ │ └── snapConstants.ts │ ├── helpers │ │ └── rpc.helpers.ts │ ├── layouts │ │ └── Layout.astro │ ├── pages │ │ └── index.astro │ ├── state │ │ ├── modal.tsx │ │ └── snapState.ts │ └── types │ │ └── global.d.ts │ ├── tailwind.config.cjs │ └── tsconfig.json ├── heroku.yml ├── lib └── README.md ├── models └── contexts │ └── boost-credential │ └── v01 │ └── context.json ├── nx.json ├── package.json ├── packages ├── learn-card-bridge-http │ ├── .gitignore │ ├── CHANGELOG.md │ ├── README.md │ ├── cli │ │ ├── App.tsx │ │ ├── Banner.tsx │ │ ├── Button.tsx │ │ ├── Cloning.tsx │ │ ├── Form.tsx │ │ ├── FullScreenBox.tsx │ │ ├── Info.tsx │ │ ├── Input.tsx │ │ ├── curriedStateSlice.ts │ │ ├── index.tsx │ │ ├── random.ts │ │ └── types.ts │ ├── esbuildWasmPlugin.cjs │ ├── lambda.ts │ ├── package.json │ ├── project.json │ ├── rollup.config.js │ ├── serverless.yml │ ├── src │ │ ├── app.ts │ │ ├── didkit_wasm_bg.wasm │ │ ├── learn-card.ts │ │ ├── types.helpers.ts │ │ └── validators.ts │ └── tsconfig.json ├── learn-card-cli │ ├── .gitignore │ ├── CHANGELOG.md │ ├── README.md │ ├── package.json │ ├── project.json │ ├── rollup.config.js │ ├── src │ │ ├── index.tsx │ │ └── random.ts │ └── tsconfig.json ├── learn-card-contexts │ ├── _headers │ └── boosts │ │ └── 1.0.0.json ├── learn-card-core │ ├── .eslintignore │ ├── .github │ │ ├── ISSUE_TEMPLATE │ │ │ ├── bug_report.md │ │ │ └── feature_request.md │ │ └── workflows │ │ │ ├── ci.yml │ │ │ ├── coverage.yml │ │ │ └── size.yml │ ├── .gitignore │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── aqu.config.ts │ ├── jest.config.cjs │ ├── package.json │ ├── project.json │ ├── scripts │ │ ├── .eslintrc │ │ ├── build.mjs │ │ └── mixedEntypoint.js │ ├── src │ │ ├── index.ts │ │ ├── polyfills.ts │ │ ├── types │ │ │ ├── LearnCard.ts │ │ │ ├── global.d.ts │ │ │ ├── helpers.ts │ │ │ ├── planes.ts │ │ │ ├── utilities.ts │ │ │ └── wallet.ts │ │ └── wallet │ │ │ ├── base │ │ │ ├── crypto.ts │ │ │ ├── helpers.ts │ │ │ ├── index.ts │ │ │ └── wallet.ts │ │ │ └── plugins │ │ │ ├── index.ts │ │ │ ├── test-cache │ │ │ ├── index.ts │ │ │ └── types.ts │ │ │ ├── test-index │ │ │ ├── index.ts │ │ │ └── types.ts │ │ │ └── test-storage │ │ │ ├── index.ts │ │ │ └── types.ts │ ├── test │ │ ├── build-step │ │ │ └── test-cjs.cjs │ │ ├── fixtures │ │ │ └── vc.ts │ │ └── index.test.ts │ ├── tsconfig.build.json │ └── tsconfig.json ├── learn-card-helpers │ ├── .eslintignore │ ├── .github │ │ ├── ISSUE_TEMPLATE │ │ │ ├── bug_report.md │ │ │ └── feature_request.md │ │ └── workflows │ │ │ ├── ci.yml │ │ │ ├── coverage.yml │ │ │ └── size.yml │ ├── .gitignore │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── jest.config.js │ ├── package.json │ ├── project.json │ ├── scripts │ │ ├── .eslintrc │ │ ├── build.mjs │ │ └── mixedEntypoint.js │ ├── src │ │ └── index.ts │ ├── test │ │ └── index.test.ts │ └── tsconfig.json ├── learn-card-init │ ├── .eslintignore │ ├── .github │ │ ├── ISSUE_TEMPLATE │ │ │ ├── bug_report.md │ │ │ └── feature_request.md │ │ └── workflows │ │ │ ├── ci.yml │ │ │ ├── coverage.yml │ │ │ └── size.yml │ ├── .gitignore │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── aqu.config.ts │ ├── jest.config.cjs │ ├── package.json │ ├── project.json │ ├── scripts │ │ ├── .eslintrc │ │ ├── build.mjs │ │ └── mixedEntypoint.js │ ├── src │ │ ├── defaults.ts │ │ ├── index.ts │ │ ├── init.ts │ │ ├── initializers │ │ │ ├── apiLearnCard.ts │ │ │ ├── customLearnCard.ts │ │ │ ├── didWebLearnCardFromSeed.ts │ │ │ ├── didWebNetworkLearnCardFromSeed.ts │ │ │ ├── emptyLearnCard.ts │ │ │ ├── learnCardFromSeed.ts │ │ │ └── networkLearnCardFromSeed.ts │ │ └── types │ │ │ ├── LearnCard.ts │ │ │ └── helpers.ts │ ├── test │ │ ├── build-step │ │ │ ├── README.md │ │ │ ├── test-cjs.cjs │ │ │ ├── test-esm.mjs │ │ │ └── test-types.ts │ │ ├── index.test.ts │ │ └── mocks │ │ │ └── persistence.ts │ ├── tsconfig.build.json │ ├── tsconfig.json │ └── vite.config.ts ├── learn-card-network │ ├── brain-client │ │ ├── .env │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── esbuild.mjs │ │ ├── package.json │ │ ├── project.json │ │ ├── scripts │ │ │ ├── .eslintrc │ │ │ ├── build.mjs │ │ │ └── mixedEntypoint.js │ │ ├── src │ │ │ ├── callbackLink.ts │ │ │ └── index.ts │ │ └── tsconfig.json │ ├── cloud-client │ │ ├── .env │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── esbuild.mjs │ │ ├── package.json │ │ ├── project.json │ │ ├── scripts │ │ │ ├── .eslintrc │ │ │ ├── build.mjs │ │ │ └── mixedEntypoint.js │ │ ├── src │ │ │ ├── callbackLink.ts │ │ │ └── index.ts │ │ └── tsconfig.json │ └── simple-signing-client │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── esbuild.mjs │ │ ├── package.json │ │ ├── project.json │ │ ├── scripts │ │ ├── .eslintrc │ │ ├── build.mjs │ │ └── mixedEntypoint.js │ │ ├── src │ │ ├── callbackLink.ts │ │ └── index.ts │ │ └── tsconfig.json ├── learn-card-registries │ ├── _headers │ ├── known-did-registries.json │ ├── trusted │ │ └── registry.json │ ├── untrusted-did-registries.json │ └── untrusted │ │ └── registry.json ├── learn-card-types │ ├── .eslintignore │ ├── .gitignore │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── aqu.config.ts │ ├── package.json │ ├── project.json │ ├── scripts │ │ ├── .eslintrc │ │ ├── build.mjs │ │ └── mixedEntypoint.js │ ├── src │ │ ├── crypto.ts │ │ ├── did.ts │ │ ├── helpers.ts │ │ ├── index.ts │ │ ├── lcn.ts │ │ ├── learncard.ts │ │ ├── learncloud.ts │ │ ├── mongo.ts │ │ ├── obv3.ts │ │ ├── queries.ts │ │ ├── vc.ts │ │ └── wasm.ts │ └── tsconfig.json ├── open-api-lcn-clients │ └── README.md ├── plugins │ ├── ceramic │ │ ├── .eslintignore │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── project.json │ │ ├── scripts │ │ │ ├── .eslintrc │ │ │ ├── build.mjs │ │ │ └── mixedEntypoint.js │ │ ├── src │ │ │ ├── ceramic.ts │ │ │ ├── defaults.ts │ │ │ ├── global.d.ts │ │ │ ├── helpers.ts │ │ │ ├── index.ts │ │ │ └── types.ts │ │ └── tsconfig.json │ ├── chapi │ │ ├── .eslintignore │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── project.json │ │ ├── scripts │ │ │ ├── .eslintrc │ │ │ ├── build.mjs │ │ │ └── mixedEntypoint.js │ │ ├── src │ │ │ ├── chapi.ts │ │ │ ├── global.d.ts │ │ │ ├── index.ts │ │ │ └── types.ts │ │ └── tsconfig.json │ ├── claimable-boosts │ │ ├── .eslintignore │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── jest.config.cjs │ │ ├── package.json │ │ ├── project.json │ │ ├── scripts │ │ │ ├── .eslintrc │ │ │ ├── build.mjs │ │ │ └── mixedEntypoint.js │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── test │ │ │ │ └── index.test.ts │ │ │ └── types.ts │ │ └── tsconfig.json │ ├── crypto │ │ ├── .eslintignore │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── project.json │ │ ├── scripts │ │ │ ├── .eslintrc │ │ │ ├── build.mjs │ │ │ └── mixedEntypoint.js │ │ ├── src │ │ │ ├── crypto.ts │ │ │ ├── index.ts │ │ │ └── types.ts │ │ └── tsconfig.json │ ├── did-web-plugin │ │ ├── .eslintignore │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── project.json │ │ ├── scripts │ │ │ ├── .eslintrc │ │ │ ├── build.mjs │ │ │ └── mixedEntypoint.js │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── plugin.ts │ │ │ └── types.ts │ │ └── tsconfig.json │ ├── didkey │ │ ├── .eslintignore │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── project.json │ │ ├── scripts │ │ │ ├── .eslintrc │ │ │ ├── build.mjs │ │ │ └── mixedEntypoint.js │ │ ├── src │ │ │ ├── global.d.ts │ │ │ ├── helpers.ts │ │ │ ├── index.ts │ │ │ └── types.ts │ │ └── tsconfig.json │ ├── didkit │ │ ├── .eslintignore │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── project.json │ │ ├── scripts │ │ │ ├── .eslintrc │ │ │ ├── build.mjs │ │ │ └── mixedEntypoint.js │ │ ├── src │ │ │ ├── didkit │ │ │ │ ├── index.ts │ │ │ │ └── pkg │ │ │ │ │ ├── didkit_wasm.d.ts │ │ │ │ │ ├── didkit_wasm.js │ │ │ │ │ ├── didkit_wasm_bg.wasm │ │ │ │ │ └── didkit_wasm_bg.wasm.d.ts │ │ │ ├── helpers.ts │ │ │ ├── index.ts │ │ │ ├── plugin.ts │ │ │ └── types.ts │ │ └── tsconfig.json │ ├── dynamic-loader │ │ ├── .eslintignore │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── project.json │ │ ├── scripts │ │ │ ├── .eslintrc │ │ │ ├── build.mjs │ │ │ └── mixedEntypoint.js │ │ ├── src │ │ │ ├── index.ts │ │ │ └── types.ts │ │ └── tsconfig.json │ ├── encryption │ │ ├── .eslintignore │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── project.json │ │ ├── scripts │ │ │ ├── .eslintrc │ │ │ ├── build.mjs │ │ │ └── mixedEntypoint.js │ │ ├── src │ │ │ ├── index.ts │ │ │ └── types.ts │ │ └── tsconfig.json │ ├── ethereum │ │ ├── .eslintignore │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── project.json │ │ ├── scripts │ │ │ ├── .eslintrc │ │ │ ├── build.mjs │ │ │ └── mixedEntypoint.js │ │ ├── src │ │ │ ├── erc20.abi.json │ │ │ ├── hardcodedTokens.ts │ │ │ ├── helpers.ts │ │ │ ├── index.ts │ │ │ └── types.ts │ │ └── tsconfig.json │ ├── expiration │ │ ├── .eslintignore │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── project.json │ │ ├── scripts │ │ │ ├── .eslintrc │ │ │ ├── build.mjs │ │ │ └── mixedEntypoint.js │ │ ├── src │ │ │ ├── index.ts │ │ │ └── types.ts │ │ └── tsconfig.json │ ├── idx │ │ ├── .eslintignore │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── project.json │ │ ├── scripts │ │ │ ├── .eslintrc │ │ │ ├── build.mjs │ │ │ └── mixedEntypoint.js │ │ ├── src │ │ │ ├── defaults.ts │ │ │ ├── idx.ts │ │ │ ├── index.ts │ │ │ └── types.ts │ │ └── tsconfig.json │ ├── learn-card-network │ │ ├── .eslintignore │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── project.json │ │ ├── scripts │ │ │ ├── .eslintrc │ │ │ ├── build.mjs │ │ │ └── mixedEntypoint.js │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── plugin.ts │ │ │ ├── test │ │ │ │ ├── index.test.ts │ │ │ │ └── mocks │ │ │ │ │ └── sample-vcs.ts │ │ │ └── types.ts │ │ └── tsconfig.json │ ├── learn-card │ │ ├── .eslintignore │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── project.json │ │ ├── scripts │ │ │ ├── .eslintrc │ │ │ ├── build.mjs │ │ │ └── mixedEntypoint.js │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── types.ts │ │ │ └── verify.ts │ │ └── tsconfig.json │ ├── learn-cloud │ │ ├── .eslintignore │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── project.json │ │ ├── scripts │ │ │ ├── .eslintrc │ │ │ ├── build.mjs │ │ │ └── mixedEntypoint.js │ │ ├── src │ │ │ ├── helpers.ts │ │ │ ├── index.ts │ │ │ ├── plugin.ts │ │ │ ├── test │ │ │ │ ├── index.test.ts │ │ │ │ └── mocks │ │ │ │ │ └── sample-vcs.ts │ │ │ └── types.ts │ │ └── tsconfig.json │ ├── simple-signing-plugin │ │ ├── .eslintignore │ │ ├── .github │ │ │ ├── ISSUE_TEMPLATE │ │ │ │ ├── bug_report.md │ │ │ │ └── feature_request.md │ │ │ └── workflows │ │ │ │ ├── ci.yml │ │ │ │ ├── coverage.yml │ │ │ │ └── size.yml │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── jest.config.cjs │ │ ├── package.json │ │ ├── project.json │ │ ├── scripts │ │ │ ├── .eslintrc │ │ │ ├── build.mjs │ │ │ └── mixedEntypoint.js │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── plugin.ts │ │ │ └── types.ts │ │ └── tsconfig.json │ ├── vc-api │ │ ├── .eslintignore │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── project.json │ │ ├── scripts │ │ │ ├── .eslintrc │ │ │ ├── build.mjs │ │ │ └── mixedEntypoint.js │ │ ├── src │ │ │ ├── helpers.ts │ │ │ ├── index.ts │ │ │ └── types.ts │ │ └── tsconfig.json │ ├── vc-templates │ │ ├── .eslintignore │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── project.json │ │ ├── scripts │ │ │ ├── .eslintrc │ │ │ ├── build.mjs │ │ │ └── mixedEntypoint.js │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── templates.ts │ │ │ ├── type.helpers.ts │ │ │ ├── types.ts │ │ │ └── vc-templates.ts │ │ └── tsconfig.json │ ├── vc │ │ ├── .eslintignore │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── project.json │ │ ├── scripts │ │ │ ├── .eslintrc │ │ │ ├── build.mjs │ │ │ └── mixedEntypoint.js │ │ ├── src │ │ │ ├── helpers.ts │ │ │ ├── index.ts │ │ │ ├── issueCredential.ts │ │ │ ├── issuePresentation.ts │ │ │ ├── types.ts │ │ │ ├── vc.ts │ │ │ ├── verifyCredential.ts │ │ │ └── verifyPresentation.ts │ │ └── tsconfig.json │ └── vpqr │ │ ├── .eslintignore │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── project.json │ │ ├── scripts │ │ ├── .eslintrc │ │ ├── build.mjs │ │ └── mixedEntypoint.js │ │ ├── src │ │ ├── global.d.ts │ │ ├── index.ts │ │ └── types.ts │ │ └── tsconfig.json └── react-learn-card │ ├── .gitignore │ ├── .nvmrc │ ├── .nxignore │ ├── .storybook │ ├── main.ts │ └── preview.js │ ├── CHANGELOG.md │ ├── README.md │ ├── __mocks__ │ ├── fileMock.js │ └── styleMock.js │ ├── jest.config.js │ ├── package.json │ ├── postcss.config.js │ ├── project.json │ ├── rollup.config.js │ ├── src │ ├── assets │ │ ├── icons │ │ │ ├── accommodationsIcon.svg │ │ │ ├── accomplishmentsIcon.svg │ │ │ ├── achievementsIcon.svg │ │ │ ├── coursesIcon.svg │ │ │ ├── eventsIcon.svg │ │ │ ├── experiencesIcon.svg │ │ │ ├── goalsIcon.svg │ │ │ ├── idIcon.svg │ │ │ ├── membershipsIcon.svg │ │ │ ├── relationshipsIcon.svg │ │ │ ├── skillsIcon.svg │ │ │ └── socialBadgesIcon.svg │ │ ├── images │ │ │ ├── Accommodation-Hands.png │ │ │ ├── ArrowArcLeft.svg │ │ │ ├── ArrowArcRight.svg │ │ │ ├── CaretRight.svg │ │ │ ├── CaretRightFilled.svg │ │ │ ├── DotsThreeOutline.svg │ │ │ ├── GreenCheckCircle.svg │ │ │ ├── RedXCircle.svg │ │ │ ├── X.svg │ │ │ ├── YellowWarningCircle.svg │ │ │ ├── addawardlight.svg │ │ │ ├── agriculture.png │ │ │ ├── apple.png │ │ │ ├── athletics.png │ │ │ ├── award.svg │ │ │ ├── backpack.png │ │ │ ├── badge.png │ │ │ ├── briefcase.svg │ │ │ ├── business.png │ │ │ ├── card-chip.svg │ │ │ ├── check.svg │ │ │ ├── coins.svg │ │ │ ├── contactless-symbol.svg │ │ │ ├── creative.png │ │ │ ├── default-face.jpeg │ │ │ ├── digital.png │ │ │ ├── durable.png │ │ │ ├── emptystate-death.png │ │ │ ├── emptystate-dinocandle.png │ │ │ ├── emptystate-ghost1.png │ │ │ ├── eventsGraphic.png │ │ │ ├── experience-mountain.png │ │ │ ├── goals-target.png │ │ │ ├── gradcaplight.svg │ │ │ ├── graduation.svg │ │ │ ├── icon.green.fat-arrow.png │ │ │ ├── id-purple.png │ │ │ ├── id-sleeve.png │ │ │ ├── key-icon.svg │ │ │ ├── lhplaceholder.png │ │ │ ├── lightbulb.svg │ │ │ ├── loveyou-icon.svg │ │ │ ├── master-card-logo.svg │ │ │ ├── medical.png │ │ │ ├── membership-graphic.png │ │ │ ├── membership-key.svg │ │ │ ├── minigradcapcolored.svg │ │ │ ├── minijob.svg │ │ │ ├── minipuzzle.svg │ │ │ ├── minipuzzlecolored.svg │ │ │ ├── minitrophy.svg │ │ │ ├── minitrophycolored.svg │ │ │ ├── motlow-buckcard-bg.svg │ │ │ ├── mountains-icon.svg │ │ │ ├── photoplaceholder.png │ │ │ ├── puzzle-icon.svg │ │ │ ├── relationships-cats.png │ │ │ ├── sample-badge.png │ │ │ ├── skillgraph.svg │ │ │ ├── skillplaceholder.png │ │ │ ├── social-badge-2.png │ │ │ ├── social-badge.png │ │ │ ├── social-icon.svg │ │ │ ├── social.png │ │ │ ├── stem.png │ │ │ ├── target-icon.svg │ │ │ ├── trade.png │ │ │ ├── trophy.svg │ │ │ ├── user.svg │ │ │ ├── users-icon.svg │ │ │ ├── vc.check.svg │ │ │ ├── verified-check.png │ │ │ ├── walletTrophy.png │ │ │ ├── walletcurrency.webp │ │ │ ├── walletids.webp │ │ │ ├── walletjobhistory.webp │ │ │ └── walletskills.webp │ │ └── styles │ │ │ ├── base.css │ │ │ └── main.css │ ├── components │ │ ├── AchievementCard │ │ │ ├── AchievementCard.stories.tsx │ │ │ ├── AchievementCard.tsx │ │ │ └── index.ts │ │ ├── BoostGenericCard │ │ │ ├── BoostGenericCard.stories.tsx │ │ │ ├── BoostGenericCard.tsx │ │ │ └── index.ts │ │ ├── BoostSmallCard │ │ │ ├── BoostSmallCard.stories.tsx │ │ │ ├── BoostSmallCard.tsx │ │ │ └── index.ts │ │ ├── Button │ │ │ ├── Button.stories.tsx │ │ │ ├── Button.test.tsx │ │ │ ├── Button.tsx │ │ │ └── index.ts │ │ ├── CertificateDisplayCard │ │ │ ├── AlignmentRow.tsx │ │ │ ├── AlignmentsBox.tsx │ │ │ ├── CertDisplayCardSkillsCount.tsx │ │ │ ├── CertificateBackFace.tsx │ │ │ ├── CertificateCornerIcon.tsx │ │ │ ├── CertificateDisplayCard.stories.tsx │ │ │ ├── CertificateDisplayCard.tsx │ │ │ ├── CertificateFrontFace.tsx │ │ │ ├── CertificateImageDisplay.tsx │ │ │ ├── CertificateProfileImageDisplay.tsx │ │ │ ├── CertificateRibbon.tsx │ │ │ ├── InfoBox.tsx │ │ │ ├── MediaAttachmentsBox.tsx │ │ │ ├── TruncateTextBox.tsx │ │ │ ├── VerificationRow.tsx │ │ │ ├── VerificationsBox.tsx │ │ │ ├── VerifierStateBadgeAndText.tsx │ │ │ └── index.ts │ │ ├── CircleCheckButton │ │ │ ├── CircleCheckButton.stories.tsx │ │ │ ├── CircleCheckButton.tsx │ │ │ └── index.ts │ │ ├── CircleIcon │ │ │ ├── CircleIcon.tsx │ │ │ ├── __tests__ │ │ │ │ └── CircleIcon.test.tsx │ │ │ ├── ci new │ │ │ └── index.ts │ │ ├── CourseCard │ │ │ ├── CourseCard.stories.tsx │ │ │ ├── CourseCard.tsx │ │ │ └── index.ts │ │ ├── CourseVerticalCard │ │ │ ├── CourseVerticalCard.stories.tsx │ │ │ ├── CourseVerticalCard.tsx │ │ │ └── index.ts │ │ ├── FlippyCard │ │ │ ├── FlippyCard.tsx │ │ │ ├── __tests__ │ │ │ │ └── FlippyCard.test.tsx │ │ │ └── index.ts │ │ ├── GenericCard │ │ │ ├── GenericCard.stories.tsx │ │ │ ├── GenericCard.tsx │ │ │ └── index.ts │ │ ├── JobHistoryCard │ │ │ ├── JobHistoryCard.stories.tsx │ │ │ ├── JobHistoryCard.tsx │ │ │ └── index.ts │ │ ├── JobListCard │ │ │ ├── JobListCard.stories.tsx │ │ │ ├── JobListCard.tsx │ │ │ └── index.ts │ │ ├── LearnCardCreditCardBackFace │ │ │ ├── LearnCardCreditCardBackFace.stories.tsx │ │ │ ├── LearnCardCreditCardBackFace.tsx │ │ │ ├── __tests__ │ │ │ │ └── LearnCardCreditCardBackFace.test.tsx │ │ │ ├── index.ts │ │ │ └── types.ts │ │ ├── LearnCardCreditCardFrontFace │ │ │ ├── LearnCardCreditCardFrontFace.stories.tsx │ │ │ ├── LearnCardCreditCardFrontFace.tsx │ │ │ ├── __tests__ │ │ │ │ └── LearnCardCreditCardFrontFace.test.tsx │ │ │ ├── index.ts │ │ │ └── types.ts │ │ ├── LearnPill │ │ │ ├── LearnPill.stories.tsx │ │ │ ├── LearnPill.tsx │ │ │ └── index.ts │ │ ├── Lightbox │ │ │ ├── Lightbox.tsx │ │ │ └── index.ts │ │ ├── Loading │ │ │ ├── CircleSpinner.tsx │ │ │ └── index.ts │ │ ├── MeritBadgeDisplayCard │ │ │ ├── AlignmentRow.tsx │ │ │ ├── AlignmentsBox.tsx │ │ │ ├── InfoBox.tsx │ │ │ ├── MediaAttachmentsBox.tsx │ │ │ ├── MeritBadgeBackFace.tsx │ │ │ ├── MeritBadgeCornerIcon.tsx │ │ │ ├── MeritBadgeDisplayCard.tsx │ │ │ ├── MeritBadgeFrontFace.tsx │ │ │ ├── MeritBadgeImageDisplay.tsx │ │ │ ├── MeritBadgeProfileImageDisplay.tsx │ │ │ ├── MeritBadgeRibbon.tsx │ │ │ ├── MeritBadgeSkillsCount.tsx │ │ │ ├── TruncateTextBox.tsx │ │ │ ├── VerificationRow.tsx │ │ │ ├── VerificationsBox.tsx │ │ │ ├── VerifierStateBadgeAndText.tsx │ │ │ └── index.ts │ │ ├── MiniVCThumbnail │ │ │ ├── MiniVCThumbnail.css │ │ │ ├── MiniVCThumbnail.stories.tsx │ │ │ ├── MiniVCThumbnail.tsx │ │ │ ├── __tests__ │ │ │ │ └── MiniVCThumbnail.test.tsx │ │ │ ├── index.ts │ │ │ └── types.ts │ │ ├── Notification │ │ │ ├── Notification.stories.tsx │ │ │ ├── Notification.tsx │ │ │ ├── __tests__ │ │ │ │ └── Notification.test.tsx │ │ │ ├── index.ts │ │ │ └── types.ts │ │ ├── NotificationBoostCard │ │ │ ├── NotificationBoostCard.stories.tsx │ │ │ ├── NotificationBoostCard.tsx │ │ │ ├── index.ts │ │ │ └── types.ts │ │ ├── NotificationUserAcceptedBoostCard │ │ │ ├── NotificationUserAcceptedBoostCard.stories.tsx │ │ │ ├── NotificationUserAcceptedBoostCard.tsx │ │ │ ├── index.ts │ │ │ └── types.ts │ │ ├── NotificationUserCard │ │ │ ├── NotificationUserCard.stories.tsx │ │ │ ├── NotificationUserCard.tsx │ │ │ ├── index.ts │ │ │ └── types.ts │ │ ├── QRCodeCard │ │ │ ├── QRCodeCard.stories.tsx │ │ │ ├── QRCodeCard.tsx │ │ │ ├── __tests__ │ │ │ │ └── QRCodeCard.test.tsx │ │ │ ├── index.ts │ │ │ └── types.ts │ │ ├── RoundedPill │ │ │ ├── RoundedPill.stories.tsx │ │ │ ├── RoundedPill.tsx │ │ │ └── index.ts │ │ ├── RoundedSquare │ │ │ ├── RoundedSquare.stories.tsx │ │ │ ├── RoundedSquare.tsx │ │ │ ├── __tests__ │ │ │ │ └── RoundedSquare.test.tsx │ │ │ ├── constants.ts │ │ │ ├── index.ts │ │ │ └── roudnedquarenew │ │ ├── SchoolIdCard │ │ │ ├── SchoolIDCard.stories.tsx │ │ │ ├── SchoolIDCard.tsx │ │ │ ├── index.ts │ │ │ └── types.ts │ │ ├── SkillTabCard │ │ │ ├── SkillTabCard.stories.tsx │ │ │ ├── SkillTabCard.tsx │ │ │ └── index.ts │ │ ├── SkillVerticalCard │ │ │ ├── SkillVerticalCard.stories.tsx │ │ │ ├── SkillVerticalCard.tsx │ │ │ └── index.ts │ │ ├── SkillsCard │ │ │ ├── SkillsCard.stories.tsx │ │ │ ├── SkillsCard.tsx │ │ │ └── index.ts │ │ ├── SkillsStatsCard │ │ │ ├── SkillsStatsCard.stories.tsx │ │ │ ├── SkillsStatsCard.tsx │ │ │ └── index.ts │ │ ├── SmallAchievementCard │ │ │ ├── SmallAchievementCard.stories.tsx │ │ │ ├── SmallAchievementCard.tsx │ │ │ └── index.ts │ │ ├── VCCard │ │ │ ├── VCCard.stories.tsx │ │ │ ├── VCCard.tsx │ │ │ └── index.ts │ │ ├── VCDisplayBackFace │ │ │ ├── VCDisplayBackFace.tsx │ │ │ └── index.ts │ │ ├── VCDisplayCard │ │ │ ├── VCDisplayCard.stories.tsx │ │ │ ├── VCDisplayCard.tsx │ │ │ └── index.ts │ │ ├── VCDisplayCard2 │ │ │ ├── FitText.tsx │ │ │ ├── InfoBox.tsx │ │ │ ├── IssueHistoryBox.tsx │ │ │ ├── MediaAttachmentsBox.tsx │ │ │ ├── RibbonEnd.tsx │ │ │ ├── SelectedSkills.tsx │ │ │ ├── SkillsBox.tsx │ │ │ ├── Subskill.tsx │ │ │ ├── TopLevelSkill.tsx │ │ │ ├── TruncateTextBox.tsx │ │ │ ├── VC2BackFace.tsx │ │ │ ├── VC2FrontFaceInfo.tsx │ │ │ ├── VCDisplayCard2.stories.tsx │ │ │ ├── VCDisplayCard2.tsx │ │ │ ├── VCDisplayCardCategoryType.tsx │ │ │ ├── VCDisplayCardSkillsCount.tsx │ │ │ ├── VCIDDIsplayCard.tsx │ │ │ ├── VCIDDisplayFrontFace.tsx │ │ │ ├── VerificationRow.tsx │ │ │ ├── VerificationsBox.tsx │ │ │ └── index.ts │ │ ├── VCDisplayFrontFace │ │ │ ├── VCDisplayFrontFace.tsx │ │ │ └── index.ts │ │ ├── VCThumbnail │ │ │ ├── VCThumbnail.stories.tsx │ │ │ ├── VCThumbnail.tsx │ │ │ ├── __tests__ │ │ │ │ └── VCThumbnail.test.tsx │ │ │ ├── index.ts │ │ │ └── types.ts │ │ ├── VCVerificationCheck │ │ │ ├── VCVerificationCheck.tsx │ │ │ └── index.ts │ │ ├── VCVerificationPill │ │ │ ├── VCVerificationPill.tsx │ │ │ └── index.ts │ │ ├── index.ts │ │ └── svgs │ │ │ ├── AccommodationsIcon.tsx │ │ │ ├── AccomplishmentsIcon.tsx │ │ │ ├── AchievementWithTitle.tsx │ │ │ ├── AcuteCheckmark.tsx │ │ │ ├── AwardRibbon.tsx │ │ │ ├── Briefcase.tsx │ │ │ ├── Camera.tsx │ │ │ ├── Checkmark.tsx │ │ │ ├── CircleWithText.tsx │ │ │ ├── Coins.tsx │ │ │ ├── DownRightArrow.tsx │ │ │ ├── ExclamationPoint.tsx │ │ │ ├── ExperienceIcon.tsx │ │ │ ├── FatArrow.tsx │ │ │ ├── GenericArrow.tsx │ │ │ ├── GenericDocumentIcon.tsx │ │ │ ├── Graduation.tsx │ │ │ ├── IDIcon.tsx │ │ │ ├── IDSleeve.tsx │ │ │ ├── InfoIcon.tsx │ │ │ ├── IssuerSeal.tsx │ │ │ ├── KeyIcon.tsx │ │ │ ├── LeftArrow.tsx │ │ │ ├── Lightbulb.tsx │ │ │ ├── Line.tsx │ │ │ ├── LinkIcon.tsx │ │ │ ├── PdfIcon.tsx │ │ │ ├── PersonBadge.tsx │ │ │ ├── PuzzlePiece.tsx │ │ │ ├── QRCodeIcon.tsx │ │ │ ├── RedFlag.tsx │ │ │ ├── RoundedCorner.tsx │ │ │ ├── RoundedX.tsx │ │ │ ├── ScoutsLogo.tsx │ │ │ ├── ScoutsPledge.tsx │ │ │ ├── ShieldChevron.tsx │ │ │ ├── Smiley.tsx │ │ │ ├── SocialBadgesIcon.tsx │ │ │ ├── Trophy.tsx │ │ │ ├── UnknownVerifierBadge.tsx │ │ │ ├── User.tsx │ │ │ ├── VerifiedBadge.tsx │ │ │ ├── VideoIcon.tsx │ │ │ ├── X.tsx │ │ │ └── index.ts │ ├── constants │ │ ├── icons.ts │ │ ├── index.ts │ │ ├── notifications.ts │ │ └── skills.ts │ ├── declaration.d.ts │ ├── helpers │ │ ├── color.helpers.ts │ │ ├── credential.helpers.test.ts │ │ ├── credential.helpers.tsx │ │ ├── string.helpers.ts │ │ ├── test.helpers.ts │ │ └── url.helpers.ts │ ├── index.ts │ └── types │ │ └── index.ts │ ├── tailwind.config.js │ ├── tsconfig.json │ └── vite.config.ts ├── pnpm-lock.yaml ├── pnpm-workspace.yaml ├── services ├── learn-card-discord-bot │ ├── .dockerignore │ ├── .gitignore │ ├── CHANGELOG.md │ ├── Dockerfile │ ├── README.md │ ├── ecosystem.config.js │ ├── package.json │ ├── project.json │ ├── rollup.config.js │ ├── src │ │ ├── Bot.ts │ │ ├── Command.ts │ │ ├── Commands.ts │ │ ├── accesslayer │ │ │ ├── credentialtemplates │ │ │ │ ├── create │ │ │ │ │ └── index.ts │ │ │ │ ├── read │ │ │ │ │ └── index.ts │ │ │ │ └── update │ │ │ │ │ └── index.ts │ │ │ ├── didregistry │ │ │ │ ├── create │ │ │ │ │ └── index.ts │ │ │ │ └── read │ │ │ │ │ └── index.ts │ │ │ ├── issuers │ │ │ │ ├── create │ │ │ │ │ └── index.ts │ │ │ │ └── read │ │ │ │ │ └── index.ts │ │ │ └── pendingvcs │ │ │ │ ├── create │ │ │ │ └── index.ts │ │ │ │ ├── delete │ │ │ │ └── index.ts │ │ │ │ └── read │ │ │ │ └── index.ts │ │ ├── cache │ │ │ ├── helpers │ │ │ │ └── scan.helpers.ts │ │ │ └── index.ts │ │ ├── commands │ │ │ ├── AddCredential.ts │ │ │ ├── ConfigureIssuer.ts │ │ │ ├── FinishConnectID.ts │ │ │ ├── IssueCredential.ts │ │ │ ├── ListCredentials.ts │ │ │ ├── RegisterDID.ts │ │ │ ├── SendCredential.ts │ │ │ ├── StartConnectID.ts │ │ │ └── helpers │ │ │ │ └── index.ts │ │ ├── listeners │ │ │ ├── interactionCreate.ts │ │ │ ├── messageCreate.ts │ │ │ └── ready.ts │ │ ├── types │ │ │ └── index.ts │ │ └── wallet │ │ │ └── learncard.ts │ └── tsconfig.json ├── learn-card-network │ ├── brain-service │ │ ├── .env.example │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── CLAUDE.md │ │ ├── Dockerfile │ │ ├── Dockerfile.local │ │ ├── didWebLambda.ts │ │ ├── esbuild-docker.mjs │ │ ├── esbuild.mjs │ │ ├── esbuildPlugins.cjs │ │ ├── jest-setup.ts │ │ ├── jest-testcontainers-config.js │ │ ├── jest.config.ts │ │ ├── lambda.ts │ │ ├── package.json │ │ ├── project.json │ │ ├── serverless-local.yml │ │ ├── serverless.local.yml │ │ ├── serverless.yml │ │ ├── src │ │ │ ├── accesslayer │ │ │ │ ├── auth-grant │ │ │ │ │ ├── create.ts │ │ │ │ │ ├── delete.ts │ │ │ │ │ ├── read.ts │ │ │ │ │ ├── relationships │ │ │ │ │ │ └── create.ts │ │ │ │ │ └── update.ts │ │ │ │ ├── boost │ │ │ │ │ ├── create.ts │ │ │ │ │ ├── delete.ts │ │ │ │ │ ├── read.ts │ │ │ │ │ ├── relationships │ │ │ │ │ │ ├── create.ts │ │ │ │ │ │ ├── delete.ts │ │ │ │ │ │ ├── read.ts │ │ │ │ │ │ └── update.ts │ │ │ │ │ └── update.ts │ │ │ │ ├── claim-hook │ │ │ │ │ ├── create.ts │ │ │ │ │ ├── delete.ts │ │ │ │ │ ├── read.ts │ │ │ │ │ └── relationships │ │ │ │ │ │ ├── create.ts │ │ │ │ │ │ └── read.ts │ │ │ │ ├── consentflowcontract │ │ │ │ │ ├── create.ts │ │ │ │ │ ├── delete.ts │ │ │ │ │ ├── read.ts │ │ │ │ │ └── relationships │ │ │ │ │ │ ├── create.ts │ │ │ │ │ │ ├── delete.ts │ │ │ │ │ │ ├── manageAutoboosts.ts │ │ │ │ │ │ ├── read.ts │ │ │ │ │ │ └── update.ts │ │ │ │ ├── credential │ │ │ │ │ ├── create.ts │ │ │ │ │ ├── delete.ts │ │ │ │ │ ├── read.ts │ │ │ │ │ └── relationships │ │ │ │ │ │ ├── create.ts │ │ │ │ │ │ └── read.ts │ │ │ │ ├── did-metadata │ │ │ │ │ ├── create.ts │ │ │ │ │ ├── delete.ts │ │ │ │ │ ├── read.ts │ │ │ │ │ ├── relationships │ │ │ │ │ │ ├── create.ts │ │ │ │ │ │ └── read.ts │ │ │ │ │ └── update.ts │ │ │ │ ├── presentation │ │ │ │ │ ├── create.ts │ │ │ │ │ ├── delete.ts │ │ │ │ │ ├── read.ts │ │ │ │ │ └── relationships │ │ │ │ │ │ ├── create.ts │ │ │ │ │ │ └── read.ts │ │ │ │ ├── profile-manager │ │ │ │ │ ├── create.ts │ │ │ │ │ ├── read.ts │ │ │ │ │ ├── relationships │ │ │ │ │ │ ├── create.ts │ │ │ │ │ │ └── read.ts │ │ │ │ │ └── update.ts │ │ │ │ ├── profile │ │ │ │ │ ├── create.ts │ │ │ │ │ ├── delete.ts │ │ │ │ │ ├── read.ts │ │ │ │ │ ├── relationships │ │ │ │ │ │ ├── create.ts │ │ │ │ │ │ └── read.ts │ │ │ │ │ └── update.ts │ │ │ │ ├── role │ │ │ │ │ ├── create.ts │ │ │ │ │ ├── read.ts │ │ │ │ │ └── relationships │ │ │ │ │ │ └── create.ts │ │ │ │ └── signing-authority │ │ │ │ │ ├── create.ts │ │ │ │ │ ├── delete.ts │ │ │ │ │ ├── read.ts │ │ │ │ │ └── relationships │ │ │ │ │ ├── create.ts │ │ │ │ │ └── read.ts │ │ │ ├── app.ts │ │ │ ├── cache │ │ │ │ ├── challenges.ts │ │ │ │ ├── claim-links.ts │ │ │ │ ├── did-docs.ts │ │ │ │ ├── index.ts │ │ │ │ ├── invites.ts │ │ │ │ └── storage.ts │ │ │ ├── constants │ │ │ │ ├── auth-grant.ts │ │ │ │ ├── permissions.ts │ │ │ │ └── roles.ts │ │ │ ├── dids.ts │ │ │ ├── docker-entry.ts │ │ │ ├── global.d.ts │ │ │ ├── helpers │ │ │ │ ├── auth-grant.helpers.ts │ │ │ │ ├── boost.helpers.ts │ │ │ │ ├── challenges.helpers.ts │ │ │ │ ├── claim-hooks.helpers.ts │ │ │ │ ├── connection.helpers.ts │ │ │ │ ├── consentflow.helpers.ts │ │ │ │ ├── contract.helpers.ts │ │ │ │ ├── credential.helpers.ts │ │ │ │ ├── did.helpers.ts │ │ │ │ ├── learnCard.helpers.ts │ │ │ │ ├── neo4j.helpers.ts │ │ │ │ ├── notifications.helpers.ts │ │ │ │ ├── objects.helpers.ts │ │ │ │ ├── presentation.helpers.ts │ │ │ │ ├── profile.helpers.ts │ │ │ │ ├── signingAuthority.helpers.ts │ │ │ │ ├── types.helpers.ts │ │ │ │ └── uri.helpers.ts │ │ │ ├── index.ts │ │ │ ├── instance.ts │ │ │ ├── models │ │ │ │ ├── AuthGrant.ts │ │ │ │ ├── Boost.ts │ │ │ │ ├── ClaimHook.ts │ │ │ │ ├── ConsentFlowContract.ts │ │ │ │ ├── ConsentFlowTerms.ts │ │ │ │ ├── ConsentFlowTransaction.ts │ │ │ │ ├── Credential.ts │ │ │ │ ├── DidMetadata.ts │ │ │ │ ├── Presentation.ts │ │ │ │ ├── Profile.ts │ │ │ │ ├── ProfileManager.ts │ │ │ │ ├── Role.ts │ │ │ │ ├── SigningAuthority.ts │ │ │ │ └── index.ts │ │ │ ├── openapi.ts │ │ │ ├── routes │ │ │ │ ├── auth-grants.ts │ │ │ │ ├── boosts.ts │ │ │ │ ├── claim-hooks.ts │ │ │ │ ├── contracts.ts │ │ │ │ ├── credentials.ts │ │ │ │ ├── did-metadata.ts │ │ │ │ ├── index.ts │ │ │ │ ├── presentations.ts │ │ │ │ ├── profile-manager.ts │ │ │ │ ├── profiles.ts │ │ │ │ ├── storage.ts │ │ │ │ └── utilities.ts │ │ │ ├── swagger-ui │ │ │ │ ├── favicon-16x16.png │ │ │ │ ├── favicon-32x32.png │ │ │ │ ├── index.css │ │ │ │ ├── index.html │ │ │ │ ├── oauth2-redirect.html │ │ │ │ ├── swagger-initializer.js │ │ │ │ ├── swagger-ui-bundle.js │ │ │ │ ├── swagger-ui-bundle.js.map │ │ │ │ ├── swagger-ui-es-bundle-core.js │ │ │ │ ├── swagger-ui-es-bundle-core.js.map │ │ │ │ ├── swagger-ui-es-bundle.js │ │ │ │ ├── swagger-ui-es-bundle.js.map │ │ │ │ ├── swagger-ui-standalone-preset.js │ │ │ │ ├── swagger-ui-standalone-preset.js.map │ │ │ │ ├── swagger-ui.css │ │ │ │ ├── swagger-ui.css.map │ │ │ │ ├── swagger-ui.js │ │ │ │ └── swagger-ui.js.map │ │ │ └── types │ │ │ │ ├── boost.ts │ │ │ │ ├── claim-hook.ts │ │ │ │ ├── consentflowcontract.ts │ │ │ │ ├── credential.ts │ │ │ │ ├── did-metadata.ts │ │ │ │ ├── helpers.ts │ │ │ │ ├── presentation.ts │ │ │ │ ├── profile-manager.ts │ │ │ │ ├── profile.ts │ │ │ │ └── role.ts │ │ ├── test-setup.ts │ │ ├── test │ │ │ ├── auth-grant.spec.ts │ │ │ ├── boosts.spec.ts │ │ │ ├── claim-hooks.spec.ts │ │ │ ├── consentflow.spec.ts │ │ │ ├── credentials.spec.ts │ │ │ ├── helpers.spec.ts │ │ │ ├── helpers │ │ │ │ ├── contract.ts │ │ │ │ ├── getClient.ts │ │ │ │ ├── mock-instance.ts │ │ │ │ ├── permissions.ts │ │ │ │ └── send.ts │ │ │ ├── internal.spec.ts │ │ │ ├── permissions.spec.ts │ │ │ ├── presentations.spec.ts │ │ │ ├── profiles.spec.ts │ │ │ ├── storage.spec.ts │ │ │ └── utilities.spec.ts │ │ ├── tsc-alias-replacer.cjs │ │ ├── tsconfig.build.json │ │ ├── tsconfig.json │ │ └── vite.config.ts │ ├── compose.yaml │ ├── learn-cloud-service │ │ ├── .env.example │ │ ├── .gitignore │ │ ├── .nvmrc │ │ ├── CHANGELOG.md │ │ ├── Dockerfile │ │ ├── Dockerfile.local │ │ ├── didWebLambda.ts │ │ ├── esbuild-docker.mjs │ │ ├── esbuild.mjs │ │ ├── esbuildPlugins.cjs │ │ ├── jest-async-setup.ts │ │ ├── jest-mongodb-config.js │ │ ├── jest-teardown.ts │ │ ├── jest.config.ts │ │ ├── lambda.ts │ │ ├── oidcLambda.ts │ │ ├── package.json │ │ ├── project.json │ │ ├── serverless-local.yml │ │ ├── serverless.yml │ │ ├── src │ │ │ ├── accesslayer │ │ │ │ ├── credential-record │ │ │ │ │ ├── create.ts │ │ │ │ │ ├── delete.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── read.ts │ │ │ │ │ └── update.ts │ │ │ │ ├── credential │ │ │ │ │ ├── create.ts │ │ │ │ │ ├── delete.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ └── read.ts │ │ │ │ ├── custom-document │ │ │ │ │ ├── create.ts │ │ │ │ │ ├── delete.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── read.ts │ │ │ │ │ └── update.ts │ │ │ │ └── user │ │ │ │ │ ├── create.ts │ │ │ │ │ ├── delete.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── read.ts │ │ │ │ │ └── update.ts │ │ │ ├── app.ts │ │ │ ├── cache │ │ │ │ ├── challenges.ts │ │ │ │ ├── credentials.ts │ │ │ │ ├── did-docs.ts │ │ │ │ ├── index.ts │ │ │ │ ├── indexPlane.ts │ │ │ │ ├── mutex.ts │ │ │ │ ├── rsa.ts │ │ │ │ └── user.ts │ │ │ ├── constants │ │ │ │ ├── limits.ts │ │ │ │ └── xapi.ts │ │ │ ├── dids.ts │ │ │ ├── docker-entry.ts │ │ │ ├── global.d.ts │ │ │ ├── helpers │ │ │ │ ├── auth.helpers.ts │ │ │ │ ├── challenges.helpers.ts │ │ │ │ ├── credential.helpers.ts │ │ │ │ ├── crypto.helpers.ts │ │ │ │ ├── did.helpers.ts │ │ │ │ ├── encryption.helpers.ts │ │ │ │ ├── learnCard.helpers.ts │ │ │ │ ├── performance.helpers.ts │ │ │ │ ├── request.helpers.ts │ │ │ │ ├── test.helpers.ts │ │ │ │ ├── types.helpers.ts │ │ │ │ ├── uri.helpers.ts │ │ │ │ └── xapi.helpers.ts │ │ │ ├── index.ts │ │ │ ├── models │ │ │ │ ├── Credential.ts │ │ │ │ ├── CredentialRecord.ts │ │ │ │ ├── CustomDocument.ts │ │ │ │ ├── User.ts │ │ │ │ └── index.ts │ │ │ ├── mongo.ts │ │ │ ├── oidc.ts │ │ │ ├── openapi.ts │ │ │ ├── routes │ │ │ │ ├── customStorage.ts │ │ │ │ ├── index.ts │ │ │ │ ├── indexPlane.ts │ │ │ │ ├── storage.ts │ │ │ │ ├── user.ts │ │ │ │ └── utilities.ts │ │ │ ├── swagger-ui │ │ │ │ ├── favicon-16x16.png │ │ │ │ ├── favicon-32x32.png │ │ │ │ ├── index.css │ │ │ │ ├── index.html │ │ │ │ ├── oauth2-redirect.html │ │ │ │ ├── swagger-initializer.js │ │ │ │ ├── swagger-ui-bundle.js │ │ │ │ ├── swagger-ui-bundle.js.map │ │ │ │ ├── swagger-ui-es-bundle-core.js │ │ │ │ ├── swagger-ui-es-bundle-core.js.map │ │ │ │ ├── swagger-ui-es-bundle.js │ │ │ │ ├── swagger-ui-es-bundle.js.map │ │ │ │ ├── swagger-ui-standalone-preset.js │ │ │ │ ├── swagger-ui-standalone-preset.js.map │ │ │ │ ├── swagger-ui.css │ │ │ │ ├── swagger-ui.css.map │ │ │ │ ├── swagger-ui.js │ │ │ │ └── swagger-ui.js.map │ │ │ ├── types │ │ │ │ ├── mongo.ts │ │ │ │ ├── vp.ts │ │ │ │ └── xapi.ts │ │ │ └── xapi.ts │ │ ├── test │ │ │ ├── custom-storage.spec.ts │ │ │ ├── helpers │ │ │ │ ├── documents.ts │ │ │ │ ├── getClient.ts │ │ │ │ ├── mock-mongo.ts │ │ │ │ ├── records.ts │ │ │ │ └── send.ts │ │ │ ├── indexPlane.spec.ts │ │ │ ├── setupFile.ts │ │ │ ├── storage.spec.ts │ │ │ ├── users.spec.ts │ │ │ └── utilities.spec.ts │ │ ├── tsc-alias-replacer.cjs │ │ ├── tsconfig.build.json │ │ ├── tsconfig.json │ │ ├── vite.config.ts │ │ ├── vitest-setup.ts │ │ └── xApiLambda.ts │ └── simple-signing-service │ │ ├── .env.example │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── Dockerfile │ │ ├── Dockerfile.local │ │ ├── README.md │ │ ├── esbuild-docker.mjs │ │ ├── esbuild.mjs │ │ ├── esbuildPlugins.cjs │ │ ├── jest-mongodb-config.js │ │ ├── jest-setup.ts │ │ ├── jest.config.ts │ │ ├── lambda.ts │ │ ├── package.json │ │ ├── project.json │ │ ├── serverless-local.yml │ │ ├── serverless.yml │ │ ├── src │ │ ├── accesslayer │ │ │ └── signing-authority │ │ │ │ ├── create.ts │ │ │ │ ├── delete.ts │ │ │ │ ├── index.ts │ │ │ │ └── read.ts │ │ ├── app.ts │ │ ├── cache │ │ │ ├── challenges.ts │ │ │ ├── did-docs.ts │ │ │ ├── in-memory-lru.ts │ │ │ ├── index.ts │ │ │ └── signing-authority.ts │ │ ├── dids.ts │ │ ├── docker-entry.ts │ │ ├── global.d.ts │ │ ├── helpers │ │ │ ├── challenges.helpers.ts │ │ │ ├── learnCard.helpers.ts │ │ │ ├── profile.helpers.ts │ │ │ ├── signingAuthority.helpers.ts │ │ │ └── types.helpers.ts │ │ ├── index.ts │ │ ├── models │ │ │ ├── SigningAuthority.ts │ │ │ └── index.ts │ │ ├── mongo.ts │ │ ├── openapi.ts │ │ ├── routes │ │ │ ├── credentials.ts │ │ │ ├── index.ts │ │ │ ├── signing-authority.ts │ │ │ └── utilities.ts │ │ ├── swagger-ui │ │ │ ├── favicon-16x16.png │ │ │ ├── favicon-32x32.png │ │ │ ├── index.css │ │ │ ├── index.html │ │ │ ├── oauth2-redirect.html │ │ │ ├── swagger-initializer.js │ │ │ ├── swagger-ui-bundle.js │ │ │ ├── swagger-ui-bundle.js.map │ │ │ ├── swagger-ui-es-bundle-core.js │ │ │ ├── swagger-ui-es-bundle-core.js.map │ │ │ ├── swagger-ui-es-bundle.js │ │ │ ├── swagger-ui-es-bundle.js.map │ │ │ ├── swagger-ui-standalone-preset.js │ │ │ ├── swagger-ui-standalone-preset.js.map │ │ │ ├── swagger-ui.css │ │ │ ├── swagger-ui.css.map │ │ │ ├── swagger-ui.js │ │ │ └── swagger-ui.js.map │ │ └── types │ │ │ ├── credentials.ts │ │ │ ├── mongo.ts │ │ │ └── signing-authority.ts │ │ ├── test │ │ ├── credentials.spec.ts │ │ ├── helpers │ │ │ ├── getClient.ts │ │ │ ├── mock-mongo.ts │ │ │ └── notifications.ts │ │ ├── signing-authority.spec.ts │ │ └── utilities.spec.ts │ │ ├── tsconfig.build.json │ │ ├── tsconfig.json │ │ ├── vite.config.ts │ │ └── vitest-setup.ts └── meta-mask-snap │ ├── .github │ ├── dependabot.yml │ └── workflows │ │ ├── build-test.yml │ │ ├── create-release-pr.yml │ │ └── publish-release.yml │ ├── .gitignore │ ├── CHANGELOG.md │ ├── README.md │ ├── fixBundle.sh │ ├── images │ └── icon.svg │ ├── package.json │ ├── project.json │ ├── rollup.config.js │ ├── snap.config.js │ ├── snap.manifest.json │ ├── src │ ├── didkit_wasm_bg.wasm │ ├── global.d.ts │ ├── index.ts │ ├── snap.ts │ └── types │ │ ├── helpers.ts │ │ └── rpc.ts │ └── tsconfig.json ├── tests └── e2e │ ├── compose.yaml │ ├── package.json │ ├── project.json │ ├── setup │ ├── db-utils.ts │ ├── global-setup.ts │ └── test-setup.ts │ ├── tests │ ├── boosts.spec.ts │ ├── claim-hooks.spec.ts │ ├── consentflow.spec.ts │ ├── credentials.spec.ts │ ├── dids.spec.ts │ ├── encryption.spec.ts │ ├── global.d.ts │ ├── health.spec.ts │ ├── helpers │ │ ├── contract.helpers.ts │ │ ├── credential.helpers.ts │ │ └── learncard.helpers.ts │ ├── identity.spec.ts │ ├── init.spec.ts │ ├── presentations.spec.ts │ └── xapi.spec.ts │ ├── tsconfig.json │ └── vitest.config.ts ├── tools └── executors │ └── workspace │ ├── executor.json │ ├── package.json │ └── run-command │ ├── .gitignore │ ├── CHANGELOG.md │ ├── esbuild.mjs │ ├── package.json │ ├── project.json │ ├── schema.json │ └── src │ └── index.ts └── tsconfig.json /.changeset/README.md: -------------------------------------------------------------------------------- 1 | # Changesets 2 | 3 | Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works 4 | with multi-package repos, or single-package repos to help you version and publish your code. You can 5 | find the full documentation for it [in our repository](https://github.com/changesets/changesets) 6 | 7 | We have a quick list of common questions to get you started engaging with this project in 8 | [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) 9 | -------------------------------------------------------------------------------- /.changeset/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://unpkg.com/@changesets/config@2.0.0/schema.json", 3 | "changelog": ["@changesets/changelog-github", { "repo": "WeLibraryOS/LearnCard" }], 4 | "commit": false, 5 | "fixed": [], 6 | "linked": [], 7 | "access": "public", 8 | "baseBranch": "main", 9 | "updateInternalDependencies": "patch", 10 | "ignore": [] 11 | } 12 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | **/*/dist 2 | **/*/node_modules 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | .pnpm-store 10 | 11 | node_modules 12 | *.local 13 | !**/*/Dockerfile.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | 26 | .nx-cache/ 27 | .aider* 28 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "lib/didkit"] 2 | path = lib/didkit 3 | url = https://github.com/TaylorBeeston/didkit.git 4 | [submodule "lib/ssi"] 5 | path = lib/ssi 6 | url = https://github.com/TaylorBeeston/ssi.git 7 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | # Expose Astro dependencies 2 | shamefully-hoist=true 3 | auto-install-peers=true 4 | strict-peer-dependencies=false 5 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | v20.10.0 2 | -------------------------------------------------------------------------------- /.nxignore: -------------------------------------------------------------------------------- 1 | lib/ 2 | -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 100, 3 | "trailingComma": "es5", 4 | "tabWidth": 4, 5 | "semi": true, 6 | "singleQuote": true, 7 | "arrowParens": "avoid", 8 | "quoteProps": "preserve", 9 | "overrides": [ 10 | { 11 | "files": ".prettierrc", 12 | "options": { "parser": "json" } 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM --platform=linux/amd64 node:16 2 | 3 | RUN npm --global install pnpm 4 | RUN npm install pm2 -g 5 | RUN pnpm install --save esbuild 6 | RUN pnpm install --save rollup-plugin-esbuild 7 | 8 | WORKDIR /root/monorepo 9 | COPY . . 10 | 11 | RUN cd services/learn-card-discord-bot 12 | 13 | # ↑ Copy the whole repository and let pnpm filter what to run 14 | RUN pnpm install --filter "learn-card-discord-bot..." 15 | 16 | RUN ls -al -R 17 | 18 | EXPOSE 8080 19 | CMD [ "pnpm", "start" ] -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | worker: cd services/learn-card-discord-bot && pnpm start -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | # Dependencies 2 | /node_modules 3 | 4 | # Production 5 | /build 6 | 7 | # Generated files 8 | .docusaurus 9 | .cache-loader 10 | 11 | # Misc 12 | .DS_Store 13 | .env.local 14 | .env.development.local 15 | .env.test.local 16 | .env.production.local 17 | 18 | npm-debug.log* 19 | yarn-debug.log* 20 | yarn-error.log* 21 | -------------------------------------------------------------------------------- /docs/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [require.resolve('@docusaurus/core/lib/babel/preset')], 3 | }; 4 | -------------------------------------------------------------------------------- /docs/docs/core/_category_.yml: -------------------------------------------------------------------------------- 1 | label: "@learncard/core" -------------------------------------------------------------------------------- /docs/docs/helpers/_category_.yml: -------------------------------------------------------------------------------- 1 | label: "@learncard/helpers" -------------------------------------------------------------------------------- /docs/docs/react/_category_.yml: -------------------------------------------------------------------------------- 1 | label: "@learncard/react" -------------------------------------------------------------------------------- /docs/docs/react/enums/_category_.yml: -------------------------------------------------------------------------------- 1 | label: "Enumerations" 2 | position: 2 -------------------------------------------------------------------------------- /docs/docs/types/_category_.yml: -------------------------------------------------------------------------------- 1 | label: "@learncard/types" -------------------------------------------------------------------------------- /docs/netlify.toml: -------------------------------------------------------------------------------- 1 | ############################################# 2 | ## Configuration for Netlify deployments ## 3 | ############################################# 4 | 5 | # Global Context Default 6 | [build] 7 | command = "npm run build" 8 | publish = "build/" 9 | 10 | [build.environment] 11 | NPM_FLAGS="--version" 12 | -------------------------------------------------------------------------------- /docs/src/css/custom.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/docs/src/css/custom.css -------------------------------------------------------------------------------- /docs/src/pages/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Redirect } from '@docusaurus/router'; 3 | 4 | const Home = () => ; 5 | 6 | export default Home; 7 | -------------------------------------------------------------------------------- /docs/static/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/docs/static/.nojekyll -------------------------------------------------------------------------------- /docs/static/img/LearnCard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/docs/static/img/LearnCard.png -------------------------------------------------------------------------------- /docs/static/img/docusaurus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/docs/static/img/docusaurus.png -------------------------------------------------------------------------------- /docs/static/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/docs/static/img/favicon.ico -------------------------------------------------------------------------------- /docs/static/img/lc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/docs/static/img/lc.png -------------------------------------------------------------------------------- /docs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | // This file is not used in compilation. It is here just for a nice editor experience. 3 | "extends": "@tsconfig/docusaurus/tsconfig.json", 4 | "compilerOptions": { 5 | "baseUrl": "." 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /examples/chapi-example/.astro/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "_variables": { 3 | "lastUpdateCheck": 1716321424323 4 | } 5 | } -------------------------------------------------------------------------------- /examples/chapi-example/.astro/types.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /examples/chapi-example/.gitignore: -------------------------------------------------------------------------------- 1 | # build output 2 | dist/ 3 | .output/ 4 | 5 | # dependencies 6 | node_modules/ 7 | 8 | # logs 9 | npm-debug.log* 10 | yarn-debug.log* 11 | yarn-error.log* 12 | pnpm-debug.log* 13 | 14 | 15 | # environment variables 16 | .env 17 | .env.production 18 | 19 | # macOS-specific files 20 | .DS_Store 21 | -------------------------------------------------------------------------------- /examples/chapi-example/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["astro-build.astro-vscode"], 3 | "unwantedRecommendations": [] 4 | } 5 | -------------------------------------------------------------------------------- /examples/chapi-example/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "command": "./node_modules/.bin/astro dev", 6 | "name": "Development server", 7 | "request": "launch", 8 | "type": "node-terminal" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /examples/chapi-example/netlify.toml: -------------------------------------------------------------------------------- 1 | ############################################# 2 | ## Configuration for Netlify deployments ## 3 | ############################################# 4 | 5 | [build.environment] 6 | # Global Context Default 7 | [build] 8 | command = "pnpm exec nx build chapi-example" 9 | publish = "dist/" 10 | 11 | [[headers]] 12 | for = "/*" 13 | [headers.values] 14 | Access-Control-Allow-Origin = "*" 15 | -------------------------------------------------------------------------------- /examples/chapi-example/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/examples/chapi-example/public/favicon.ico -------------------------------------------------------------------------------- /examples/chapi-example/public/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/examples/chapi-example/public/icon.png -------------------------------------------------------------------------------- /examples/chapi-example/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "LearnCard Demo CHAPI Wallet", 3 | "short_name": "LearnCard Demo CHAPI Wallet", 4 | "icons": [ 5 | { 6 | "sizes": "64x64", 7 | "src": "icon.png", 8 | "type": "image/png" 9 | } 10 | 11 | ], 12 | "credential_handler": { 13 | "url": "/wallet-worker", 14 | "enabledTypes": ["VerifiablePresentation"] 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /examples/chapi-example/src/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | -------------------------------------------------------------------------------- /examples/chapi-example/src/helpers/credential.helpers.ts: -------------------------------------------------------------------------------- 1 | import type { VP, VC } from '@learncard/types'; 2 | 3 | export const getCredentialFromVp = (vp: VP): VC => { 4 | const vcField = vp.verifiableCredential; 5 | 6 | return Array.isArray(vcField) ? vcField[0] : vcField; 7 | }; 8 | -------------------------------------------------------------------------------- /examples/chapi-example/src/helpers/random.helpers.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Generates a random, 32 byte hex string 3 | */ 4 | export const randomKey = () => 5 | Array.from(crypto.getRandomValues(new Uint8Array(32)), dec => 6 | dec.toString(16).padStart(2, '0') 7 | ).join(''); 8 | -------------------------------------------------------------------------------- /examples/chapi-example/src/pages/get.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import Layout from '@layouts/Layout.astro'; 3 | import CredentialRetrieval from '@components/CredentialRetrieval'; 4 | --- 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /examples/chapi-example/src/pages/store.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import Layout from '@layouts/Layout.astro'; 3 | import CredentialStorage from '@components/CredentialStorage'; 4 | --- 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /examples/chapi-example/src/stores/walletStore.ts: -------------------------------------------------------------------------------- 1 | import { atom } from 'nanostores'; 2 | import { persistentAtom } from '@nanostores/persistent'; 3 | 4 | import type { LearnCardFromSeed } from '@learncard/init'; 5 | 6 | export const _wallet = atom(null); 7 | 8 | /** 9 | * Storing seed in localStorage for demo. 10 | * 11 | * DO NOT DO THIS ON A REAL SITE. THIS IS INSECURE!! 12 | */ 13 | export const _seed = persistentAtom('seed', ''); 14 | -------------------------------------------------------------------------------- /examples/chapi-example/tailwind.config.cjs: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: ['./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}'], 4 | theme: { 5 | extend: {}, 6 | }, 7 | plugins: [], 8 | } 9 | -------------------------------------------------------------------------------- /examples/chapi-example/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "astro/tsconfigs/strictest", 3 | "compilerOptions": { 4 | "jsx": "react", 5 | "baseUrl": ".", 6 | "paths": { 7 | "@components/*": ["./src/components/*"], 8 | "@helpers/*": ["./src/helpers/*"], 9 | "@layouts/*": ["./src/layouts/*"], 10 | "@stores/*": ["./src/stores/*"] 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /examples/snap-chapi-example/.gitignore: -------------------------------------------------------------------------------- 1 | # build output 2 | dist/ 3 | .output/ 4 | 5 | # dependencies 6 | node_modules/ 7 | 8 | # logs 9 | npm-debug.log* 10 | yarn-debug.log* 11 | yarn-error.log* 12 | pnpm-debug.log* 13 | 14 | 15 | # environment variables 16 | .env 17 | .env.production 18 | 19 | # macOS-specific files 20 | .DS_Store 21 | -------------------------------------------------------------------------------- /examples/snap-chapi-example/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["astro-build.astro-vscode"], 3 | "unwantedRecommendations": [] 4 | } 5 | -------------------------------------------------------------------------------- /examples/snap-chapi-example/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "command": "./node_modules/.bin/astro dev", 6 | "name": "Development server", 7 | "request": "launch", 8 | "type": "node-terminal" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /examples/snap-chapi-example/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/examples/snap-chapi-example/public/favicon.ico -------------------------------------------------------------------------------- /examples/snap-chapi-example/public/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/examples/snap-chapi-example/public/icon.png -------------------------------------------------------------------------------- /examples/snap-chapi-example/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "LearnCard Demo CHAPI Wallet", 3 | "short_name": "LearnCard Demo CHAPI Wallet", 4 | "icons": [ 5 | { 6 | "sizes": "64x64", 7 | "src": "icon.png", 8 | "type": "image/png" 9 | } 10 | 11 | ], 12 | "credential_handler": { 13 | "url": "/wallet-worker", 14 | "enabledTypes": ["VerifiablePresentation"] 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /examples/snap-chapi-example/src/constants/snapConstants.ts: -------------------------------------------------------------------------------- 1 | export const snapId = 'local:http://localhost:3002'; 2 | -------------------------------------------------------------------------------- /examples/snap-chapi-example/src/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /examples/snap-chapi-example/src/helpers/credential.helpers.ts: -------------------------------------------------------------------------------- 1 | import type { VP, VC } from '@learncard/core'; 2 | 3 | export const getCredentialFromVp = (vp: VP): VC => { 4 | const vcField = vp.verifiableCredential; 5 | 6 | return Array.isArray(vcField) ? vcField[0] : vcField; 7 | }; 8 | -------------------------------------------------------------------------------- /examples/snap-chapi-example/src/helpers/random.helpers.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Generates a random, 32 byte hex string 3 | */ 4 | export const randomKey = () => 5 | Array.from(crypto.getRandomValues(new Uint8Array(32)), dec => 6 | dec.toString(16).padStart(2, '0') 7 | ).join(''); 8 | -------------------------------------------------------------------------------- /examples/snap-chapi-example/src/helpers/rpc.helpers.ts: -------------------------------------------------------------------------------- 1 | import { sendRequest as _sendRequest } from '@learncard/meta-mask-snap'; 2 | import { snapId } from '@constants/snapConstants'; 3 | 4 | export const sendRequest: typeof _sendRequest = params => _sendRequest(params, snapId); 5 | -------------------------------------------------------------------------------- /examples/snap-chapi-example/src/pages/get.astro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/examples/snap-chapi-example/src/pages/get.astro -------------------------------------------------------------------------------- /examples/snap-chapi-example/src/pages/store.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import Layout from '../layouts/Layout.astro'; 3 | import CredentialStorage from '../components/CredentialStorage'; 4 | --- 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /examples/snap-chapi-example/src/stores/snapStore.ts: -------------------------------------------------------------------------------- 1 | import { atom } from 'nanostores'; 2 | import { useStore } from '@nanostores/react'; 3 | 4 | export const isSnapLoading = atom(false); 5 | export const useIsSnapLoading = () => useStore(isSnapLoading); 6 | 7 | export const isSnapReady = atom(false); 8 | export const useIsSnapReady = () => useStore(isSnapReady); 9 | -------------------------------------------------------------------------------- /examples/snap-chapi-example/src/stores/walletStore.ts: -------------------------------------------------------------------------------- 1 | import { LearnCard } from '@learncard/core'; 2 | import { atom } from 'nanostores'; 3 | import { persistentAtom } from '@nanostores/persistent'; 4 | 5 | export const _wallet = atom(null); 6 | 7 | /** 8 | * Storing seed in localStorage for demo. 9 | * 10 | * DO NOT DO THIS ON A REAL SITE. THIS IS INSECURE!! 11 | */ 12 | export const _seed = persistentAtom('seed', ''); 13 | -------------------------------------------------------------------------------- /examples/snap-chapi-example/src/types/global.d.ts: -------------------------------------------------------------------------------- 1 | import type { MetaMaskInpageProvider } from '@metamask/providers'; 2 | 3 | declare global { 4 | const ethereum: MetaMaskInpageProvider; 5 | } 6 | -------------------------------------------------------------------------------- /examples/snap-chapi-example/tailwind.config.cjs: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: ['./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}'], 4 | theme: { 5 | extend: {}, 6 | }, 7 | plugins: [], 8 | } 9 | -------------------------------------------------------------------------------- /examples/snap-chapi-example/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "astro/tsconfigs/strictest", 3 | "compilerOptions": { 4 | "jsx": "react", 5 | "baseUrl": ".", 6 | "paths": { 7 | "@components/*": ["./src/components/*"], 8 | "@constants/*": ["./src/constants/*"], 9 | "@helpers/*": ["./src/helpers/*"], 10 | "@hooks/*": ["./src/hooks/*"], 11 | "@layouts/*": ["./src/layouts/*"], 12 | "@stores/*": ["./src/stores/*"] 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /examples/snap-example-dapp/.nvmrc: -------------------------------------------------------------------------------- 1 | v16 2 | -------------------------------------------------------------------------------- /examples/snap-example-dapp/astro.config.mjs: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'astro/config'; 2 | import tailwind from "@astrojs/tailwind"; 3 | import react from "@astrojs/react"; 4 | 5 | // https://astro.build/config 6 | export default defineConfig({ 7 | integrations: [tailwind(), react()], 8 | }); 9 | -------------------------------------------------------------------------------- /examples/snap-example-dapp/src/assets/images/LearnCardBanner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/examples/snap-example-dapp/src/assets/images/LearnCardBanner.png -------------------------------------------------------------------------------- /examples/snap-example-dapp/src/constants/snapConstants.ts: -------------------------------------------------------------------------------- 1 | export const snapId = 'local:http://localhost:3002'; 2 | -------------------------------------------------------------------------------- /examples/snap-example-dapp/src/helpers/rpc.helpers.ts: -------------------------------------------------------------------------------- 1 | import { sendRequest as _sendRequest } from '@learncard/meta-mask-snap'; 2 | import { snapId } from '@constants/snapConstants'; 3 | 4 | export const sendRequest: typeof _sendRequest = params => _sendRequest(params, snapId); 5 | -------------------------------------------------------------------------------- /examples/snap-example-dapp/src/state/modal.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { atom } from 'nanostores'; 3 | import { useStore } from '@nanostores/react'; 4 | 5 | export const modalComponent = atom(<>); 6 | export const useModalStore = () => useStore(modalComponent); 7 | -------------------------------------------------------------------------------- /examples/snap-example-dapp/src/state/snapState.ts: -------------------------------------------------------------------------------- 1 | import { atom } from 'nanostores'; 2 | import { useStore } from '@nanostores/react'; 3 | 4 | export const isSnapLoading = atom(false); 5 | export const useIsSnapLoading = () => useStore(isSnapLoading); 6 | 7 | export const isSnapReady = atom(false); 8 | export const useIsSnapReady = () => useStore(isSnapReady); 9 | -------------------------------------------------------------------------------- /examples/snap-example-dapp/src/types/global.d.ts: -------------------------------------------------------------------------------- 1 | import type { MetaMaskInpageProvider } from '@metamask/providers'; 2 | 3 | declare global { 4 | const ethereum: MetaMaskInpageProvider; 5 | } 6 | -------------------------------------------------------------------------------- /examples/snap-example-dapp/tailwind.config.cjs: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: ['./src/**/*.{astro,html,js,jsx,md,svelte,ts,tsx,vue}'], 4 | theme: { 5 | extend: {}, 6 | }, 7 | plugins: [], 8 | } 9 | -------------------------------------------------------------------------------- /heroku.yml: -------------------------------------------------------------------------------- 1 | build: 2 | docker: 3 | worker: Dockerfile 4 | run: 5 | worker: PORT=$PORT pm2-runtime services/learn-card-discord-bot/dist/index.js -------------------------------------------------------------------------------- /lib/README.md: -------------------------------------------------------------------------------- 1 | # External Libraries 2 | 3 | This directory is for any external libraries used by `LearnCard`. It is very likely that each of these 4 | are a [git submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules), so if you they appear as 5 | empty directories, you will need to run the following command: 6 | 7 | ```bash 8 | git submodule update --init --recursive 9 | ``` 10 | -------------------------------------------------------------------------------- /models/contexts/boost-credential/v01/context.json: -------------------------------------------------------------------------------- 1 | { 2 | "@context": { 3 | "id": "@id", 4 | "type": "@type", 5 | 6 | "xsd": "https://www.w3.org/2001/XMLSchema#", 7 | 8 | "BoostCredential": { 9 | "@id": "https://github.com/learningeconomy/LearnCard/tree/main/models/#BoostCredential" 10 | }, 11 | "display": { 12 | "@id": "https://models.learncard.com/boost-display", 13 | "@context": { 14 | "backgroundImage": { 15 | "@id": "https://schema.org/image", 16 | "@type": "xsd:string" 17 | }, 18 | "backgroundColor": { 19 | "@id": "https://schema.org/color", 20 | "@type": "xsd:string" 21 | } 22 | } 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /packages/learn-card-bridge-http/.gitignore: -------------------------------------------------------------------------------- 1 | # package directories 2 | node_modules 3 | jspm_packages 4 | 5 | # Serverless directories 6 | .serverless 7 | 8 | dist 9 | .env 10 | .esbuild 11 | -------------------------------------------------------------------------------- /packages/learn-card-bridge-http/cli/Banner.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Text, Box } from 'ink'; 3 | import Gradient from 'ink-gradient'; 4 | import figlet from 'figlet'; 5 | 6 | const banner = figlet.textSync('Learn Card', 'Big Money-ne'); 7 | 8 | const Banner: React.FC = () => { 9 | return ( 10 | 11 | 12 | {banner} 13 | 14 | 15 | ); 16 | }; 17 | 18 | export default Banner; 19 | -------------------------------------------------------------------------------- /packages/learn-card-bridge-http/cli/FullScreenBox.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Box } from 'ink'; 3 | import useStdOutDimensions from 'ink-use-stdout-dimensions'; 4 | 5 | const FullScreenBox: typeof Box = React.forwardRef(function FullScreenBox( 6 | { children, ...props }, 7 | ref 8 | ) { 9 | const [width, height] = useStdOutDimensions(); 10 | 11 | return ( 12 | // eslint-disable-next-line react/jsx-props-no-spreading 13 | 14 | {children} 15 | 16 | ); 17 | }); 18 | 19 | export default FullScreenBox; 20 | -------------------------------------------------------------------------------- /packages/learn-card-bridge-http/cli/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { render } from 'ink'; 3 | import { program } from 'commander'; 4 | 5 | import App from './App'; 6 | 7 | import packageJson from '../package.json'; 8 | 9 | program 10 | .version(packageJson.version) 11 | .argument('[name]') 12 | .action(async name => { 13 | console.clear(); 14 | 15 | render(); 16 | }) 17 | .parse(process.argv); 18 | -------------------------------------------------------------------------------- /packages/learn-card-bridge-http/cli/random.ts: -------------------------------------------------------------------------------- 1 | import crypto from 'crypto'; 2 | 3 | export const generateRandomSeed = () => crypto.randomBytes(32).toString('hex'); 4 | -------------------------------------------------------------------------------- /packages/learn-card-bridge-http/cli/types.ts: -------------------------------------------------------------------------------- 1 | import { Dispatch, SetStateAction } from 'react'; 2 | 3 | export type FormState = { 4 | name: string; 5 | seed: string; 6 | }; 7 | 8 | export type SetState = Dispatch>; 9 | -------------------------------------------------------------------------------- /packages/learn-card-bridge-http/rollup.config.js: -------------------------------------------------------------------------------- 1 | import json from '@rollup/plugin-json'; 2 | import esbuild from 'rollup-plugin-esbuild'; 3 | 4 | const packageJson = require('./package.json'); 5 | 6 | export default [ 7 | { 8 | input: ['cli/index.tsx'], 9 | output: [{ file: packageJson.bin, format: 'cjs', banner: '#!/usr/bin/env node' }], 10 | plugins: [json(), esbuild()], 11 | }, 12 | ]; 13 | -------------------------------------------------------------------------------- /packages/learn-card-bridge-http/src/didkit_wasm_bg.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/packages/learn-card-bridge-http/src/didkit_wasm_bg.wasm -------------------------------------------------------------------------------- /packages/learn-card-bridge-http/src/learn-card.ts: -------------------------------------------------------------------------------- 1 | import fs from 'fs/promises'; 2 | import { initLearnCard, LearnCardFromSeed } from '@learncard/init'; 3 | import didkit from './didkit_wasm_bg.wasm'; 4 | 5 | export const getLearnCard = async (): Promise => { 6 | const seed = process.env.WALLET_SEED; 7 | 8 | if (!seed) { 9 | throw new Error('No seed set! Please make a .env file and set WALLET_SEED to your seed!'); 10 | } 11 | 12 | return initLearnCard({ seed, didkit }); 13 | }; 14 | -------------------------------------------------------------------------------- /packages/learn-card-bridge-http/src/types.helpers.ts: -------------------------------------------------------------------------------- 1 | import Express from 'express'; 2 | import { Query } from 'express-serve-static-core'; 3 | 4 | export interface TypedRequest extends Express.Request { 5 | body: T; 6 | query: U; 7 | } 8 | -------------------------------------------------------------------------------- /packages/learn-card-cli/.gitignore: -------------------------------------------------------------------------------- 1 | # package directories 2 | node_modules 3 | jspm_packages 4 | 5 | dist 6 | -------------------------------------------------------------------------------- /packages/learn-card-cli/rollup.config.js: -------------------------------------------------------------------------------- 1 | import json from '@rollup/plugin-json'; 2 | import esbuild from 'rollup-plugin-esbuild'; 3 | 4 | const packageJson = require('./package.json'); 5 | 6 | export default [ 7 | { 8 | input: ['src/index.tsx'], 9 | output: [{ file: packageJson.bin, format: 'cjs', banner: '#!/usr/bin/env node' }], 10 | plugins: [json(), esbuild()], 11 | }, 12 | ]; 13 | -------------------------------------------------------------------------------- /packages/learn-card-cli/src/random.ts: -------------------------------------------------------------------------------- 1 | import crypto from 'crypto'; 2 | 3 | export const generateRandomSeed = () => crypto.randomBytes(32).toString('hex'); 4 | -------------------------------------------------------------------------------- /packages/learn-card-contexts/_headers: -------------------------------------------------------------------------------- 1 | # Netlify _headers file 2 | 3 | # Target JSON-LD files within the /contexts/ path 4 | /**/**.jsonld 5 | # Set the correct Content-Type for JSON-LD 6 | Content-Type: application/ld+json 7 | # Allow requests from any origin (most common for public contexts) 8 | # Replace * with specific domains if needed: https://your-main-site.com 9 | Access-Control-Allow-Origin: * 10 | 11 | # Target plain .json files for contexts: 12 | /**/**.json 13 | Content-Type: application/json 14 | Access-Control-Allow-Origin: * -------------------------------------------------------------------------------- /packages/learn-card-core/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | *.config.js 4 | *.test.js 5 | *.test.ts -------------------------------------------------------------------------------- /packages/learn-card-core/.github/workflows/coverage.yml: -------------------------------------------------------------------------------- 1 | name: coverage 2 | on: 3 | pull_request: 4 | paths-ignore: 5 | - 'docs/**' 6 | - 'example/**' 7 | branches: 8 | - master 9 | jobs: 10 | coverage: 11 | name: Collecting coverage 12 | runs-on: ubuntu-latest 13 | env: 14 | CI_JOB_NUMBER: 1 15 | steps: 16 | - uses: actions/checkout@v1 17 | - uses: artiomtr/jest-coverage-report-action@v1.0 18 | with: 19 | github_token: ${{ secrets.GITHUB_TOKEN }} 20 | test_script: npm run test:coverage 21 | -------------------------------------------------------------------------------- /packages/learn-card-core/.github/workflows/size.yml: -------------------------------------------------------------------------------- 1 | name: size 2 | on: 3 | pull_request: 4 | paths-ignore: 5 | - 'docs/**' 6 | - 'example/**' 7 | branches: [master] 8 | jobs: 9 | size: 10 | runs-on: ubuntu-latest 11 | env: 12 | CI_JOB_NUMBER: 1 13 | steps: 14 | - uses: actions/checkout@v1 15 | - uses: andresz1/size-limit-action@v1 16 | with: 17 | github_token: ${{ secrets.GITHUB_TOKEN }} 18 | -------------------------------------------------------------------------------- /packages/learn-card-core/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | tsconfig.tsbuildinfo 4 | -------------------------------------------------------------------------------- /packages/learn-card-core/scripts/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": false, 3 | "env": { 4 | "node": true 5 | }, 6 | "rules": { 7 | "no-console": "off", 8 | "@typescript-eslint/no-var-requires": "off" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/learn-card-core/scripts/mixedEntypoint.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./core.cjs.production.min.cjs'); 5 | } else { 6 | module.exports = require('./core.cjs.development.cjs'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/learn-card-core/src/index.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | import './polyfills'; 4 | 5 | export { LearnCard, Plugin } from 'types/wallet'; 6 | export * from 'types/LearnCard'; 7 | export * from '@wallet/base'; 8 | export * from '@wallet/plugins'; 9 | -------------------------------------------------------------------------------- /packages/learn-card-core/src/types/LearnCard.ts: -------------------------------------------------------------------------------- 1 | import { LearnCard, Plugin } from 'types/wallet'; 2 | 3 | export type GetPlugins> = LC['plugins']; 4 | 5 | export type AddPlugin, P extends Plugin> = LearnCard< 6 | [...GetPlugins, P] 7 | >; 8 | -------------------------------------------------------------------------------- /packages/learn-card-core/src/types/global.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'abort-controller/dist/abort-controller.mjs' { 2 | declare const AbortController: typeof window.AbortController; 3 | declare const AbortSignal: typeof window.AbortSignal; 4 | } 5 | -------------------------------------------------------------------------------- /packages/learn-card-core/src/types/helpers.ts: -------------------------------------------------------------------------------- 1 | export type OmitNevers> = Omit< 2 | T, 3 | { [Index in keyof T]: [T[Index]] extends [never] ? Index : never }[keyof T] 4 | >; 5 | -------------------------------------------------------------------------------- /packages/learn-card-core/src/wallet/base/crypto.ts: -------------------------------------------------------------------------------- 1 | import crypto from 'isomorphic-webcrypto'; 2 | 3 | if (typeof window === 'undefined' && !globalThis.crypto) globalThis.crypto = crypto; 4 | 5 | export default crypto; 6 | -------------------------------------------------------------------------------- /packages/learn-card-core/src/wallet/base/index.ts: -------------------------------------------------------------------------------- 1 | export * from './wallet'; 2 | export * from './crypto'; 3 | -------------------------------------------------------------------------------- /packages/learn-card-core/src/wallet/plugins/index.ts: -------------------------------------------------------------------------------- 1 | export * from './test-cache'; 2 | export * from './test-index'; 3 | export * from './test-storage'; 4 | -------------------------------------------------------------------------------- /packages/learn-card-core/src/wallet/plugins/test-cache/types.ts: -------------------------------------------------------------------------------- 1 | import { Plugin } from 'types/wallet'; 2 | 3 | export type TestCachePlugin = Plugin<'Test Cache', 'cache'>; 4 | -------------------------------------------------------------------------------- /packages/learn-card-core/src/wallet/plugins/test-index/types.ts: -------------------------------------------------------------------------------- 1 | import { Plugin } from 'types/wallet'; 2 | 3 | export type TestIndexPlugin = Plugin<'Test Index', 'index'>; 4 | -------------------------------------------------------------------------------- /packages/learn-card-core/src/wallet/plugins/test-storage/types.ts: -------------------------------------------------------------------------------- 1 | import { Plugin } from 'types/wallet'; 2 | 3 | export type TestStoragePlugin = Plugin<'Test Storage', 'read' | 'store' | 'index'>; 4 | -------------------------------------------------------------------------------- /packages/learn-card-core/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["test"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/learn-card-helpers/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | *.config.js 4 | *.test.js 5 | *.test.ts -------------------------------------------------------------------------------- /packages/learn-card-helpers/.github/workflows/coverage.yml: -------------------------------------------------------------------------------- 1 | name: coverage 2 | on: 3 | pull_request: 4 | paths-ignore: 5 | - 'docs/**' 6 | - 'example/**' 7 | branches: 8 | - master 9 | jobs: 10 | coverage: 11 | name: Collecting coverage 12 | runs-on: ubuntu-latest 13 | env: 14 | CI_JOB_NUMBER: 1 15 | steps: 16 | - uses: actions/checkout@v1 17 | - uses: artiomtr/jest-coverage-report-action@v1.0 18 | with: 19 | github_token: ${{ secrets.GITHUB_TOKEN }} 20 | test_script: npm run test:coverage 21 | -------------------------------------------------------------------------------- /packages/learn-card-helpers/.github/workflows/size.yml: -------------------------------------------------------------------------------- 1 | name: size 2 | on: 3 | pull_request: 4 | paths-ignore: 5 | - 'docs/**' 6 | - 'example/**' 7 | branches: [master] 8 | jobs: 9 | size: 10 | runs-on: ubuntu-latest 11 | env: 12 | CI_JOB_NUMBER: 1 13 | steps: 14 | - uses: actions/checkout@v1 15 | - uses: andresz1/size-limit-action@v1 16 | with: 17 | github_token: ${{ secrets.GITHUB_TOKEN }} 18 | -------------------------------------------------------------------------------- /packages/learn-card-helpers/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | tsconfig.tsbuildinfo 4 | -------------------------------------------------------------------------------- /packages/learn-card-helpers/scripts/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": false, 3 | "env": { 4 | "node": true 5 | }, 6 | "rules": { 7 | "no-console": "off", 8 | "@typescript-eslint/no-var-requires": "off" 9 | } 10 | } -------------------------------------------------------------------------------- /packages/learn-card-helpers/scripts/mixedEntypoint.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./helpers.cjs.production.min.js'); 5 | } else { 6 | module.exports = require('./helpers.cjs.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/learn-card-helpers/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es6", 4 | "module": "ES2015", 5 | "declaration": true, 6 | "declarationMap": true, 7 | "emitDeclarationOnly": true, 8 | "outDir": "dist", 9 | "strict": true, 10 | "esModuleInterop": true, 11 | "lib": ["es5"], 12 | "noLib": false, 13 | "rootDir": "src", 14 | "skipLibCheck": true, 15 | "allowSyntheticDefaultImports": true, 16 | "moduleResolution": "node", 17 | "baseUrl": ".", 18 | "paths": {} 19 | }, 20 | "include": ["src"], 21 | "exclude": ["node_modules", "test", "example"] 22 | } 23 | -------------------------------------------------------------------------------- /packages/learn-card-init/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | *.config.js 4 | *.test.js 5 | *.test.ts -------------------------------------------------------------------------------- /packages/learn-card-init/.github/workflows/coverage.yml: -------------------------------------------------------------------------------- 1 | name: coverage 2 | on: 3 | pull_request: 4 | paths-ignore: 5 | - 'docs/**' 6 | - 'example/**' 7 | branches: 8 | - master 9 | jobs: 10 | coverage: 11 | name: Collecting coverage 12 | runs-on: ubuntu-latest 13 | env: 14 | CI_JOB_NUMBER: 1 15 | steps: 16 | - uses: actions/checkout@v1 17 | - uses: artiomtr/jest-coverage-report-action@v1.0 18 | with: 19 | github_token: ${{ secrets.GITHUB_TOKEN }} 20 | test_script: npm run test:coverage 21 | -------------------------------------------------------------------------------- /packages/learn-card-init/.github/workflows/size.yml: -------------------------------------------------------------------------------- 1 | name: size 2 | on: 3 | pull_request: 4 | paths-ignore: 5 | - 'docs/**' 6 | - 'example/**' 7 | branches: [master] 8 | jobs: 9 | size: 10 | runs-on: ubuntu-latest 11 | env: 12 | CI_JOB_NUMBER: 1 13 | steps: 14 | - uses: actions/checkout@v1 15 | - uses: andresz1/size-limit-action@v1 16 | with: 17 | github_token: ${{ secrets.GITHUB_TOKEN }} 18 | -------------------------------------------------------------------------------- /packages/learn-card-init/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | tsconfig.tsbuildinfo 4 | -------------------------------------------------------------------------------- /packages/learn-card-init/scripts/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": false, 3 | "env": { 4 | "node": true 5 | }, 6 | "rules": { 7 | "no-console": "off", 8 | "@typescript-eslint/no-var-requires": "off" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/learn-card-init/scripts/mixedEntypoint.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./init.cjs.production.min.cjs'); 5 | } else { 6 | module.exports = require('./init.cjs.development.cjs'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/learn-card-init/src/defaults.ts: -------------------------------------------------------------------------------- 1 | import { EthereumConfig } from '@learncard/ethereum-plugin'; 2 | 3 | export const defaultEthereumArgs: EthereumConfig = { 4 | infuraProjectId: '', 5 | network: 'mainnet', 6 | }; 7 | -------------------------------------------------------------------------------- /packages/learn-card-init/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './init'; 2 | export * from './types/LearnCard'; 3 | -------------------------------------------------------------------------------- /packages/learn-card-init/src/initializers/customLearnCard.ts: -------------------------------------------------------------------------------- 1 | import { generateLearnCard } from '@learncard/core'; 2 | import { CustomLearnCard } from '../types/LearnCard'; 3 | 4 | /** 5 | * Generates a custom LearnCard with no plugins added 6 | * 7 | * @group Init Functions 8 | */ 9 | export const customLearnCard = async ({ debug }: Partial = {}): Promise< 10 | CustomLearnCard['returnValue'] 11 | > => generateLearnCard({ debug }); 12 | -------------------------------------------------------------------------------- /packages/learn-card-init/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["test"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/learn-card-init/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vitest/config'; 2 | 3 | export default defineConfig({ 4 | test: { 5 | environment: 'node', 6 | globals: true, 7 | fileParallelism: false, 8 | exclude: [ 9 | '**/node_modules/**', 10 | '**/dist/**', 11 | '**/cypress/**', 12 | '**/.{idea,git,cache,output,temp}/**', 13 | '**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*', 14 | ], 15 | }, 16 | }); 17 | -------------------------------------------------------------------------------- /packages/learn-card-network/brain-client/.env: -------------------------------------------------------------------------------- 1 | # Wait 60 seconds before connecting using these details, or login to https://console.neo4j.io to validate the Aura Instance is available 2 | NEO4J_URI=neo4j+s://ab9edde2.databases.neo4j.io 3 | NEO4J_USERNAME=neo4j 4 | NEO4J_PASSWORD=V58sFdxds9E42A62bD1oA39AONg8fl8tNSMXCCQomow 5 | AURA_INSTANCENAME=Instance01 6 | 7 | SEED=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 8 | -------------------------------------------------------------------------------- /packages/learn-card-network/brain-client/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /dist 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | .vscode 21 | .idea 22 | 23 | npm-debug.log* 24 | .pnpm-debug.log 25 | yarn-debug.log* 26 | yarn-error.log* 27 | 28 | # Optional eslint cache 29 | .eslintcache 30 | -------------------------------------------------------------------------------- /packages/learn-card-network/brain-client/scripts/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": false, 3 | "env": { 4 | "node": true 5 | }, 6 | "rules": { 7 | "no-console": "off", 8 | "@typescript-eslint/no-var-requires": "off" 9 | } 10 | } -------------------------------------------------------------------------------- /packages/learn-card-network/brain-client/scripts/mixedEntypoint.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./brain-client.cjs.production.min.js'); 5 | } else { 6 | module.exports = require('./brain-client.cjs.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/learn-card-network/cloud-client/.env: -------------------------------------------------------------------------------- 1 | # Wait 60 seconds before connecting using these details, or login to https://console.neo4j.io to validate the Aura Instance is available 2 | NEO4J_URI=neo4j+s://ab9edde2.databases.neo4j.io 3 | NEO4J_USERNAME=neo4j 4 | NEO4J_PASSWORD=V58sFdxds9E42A62bD1oA39AONg8fl8tNSMXCCQomow 5 | AURA_INSTANCENAME=Instance01 6 | 7 | SEED=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 8 | -------------------------------------------------------------------------------- /packages/learn-card-network/cloud-client/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /dist 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | .vscode 21 | .idea 22 | 23 | npm-debug.log* 24 | .pnpm-debug.log 25 | yarn-debug.log* 26 | yarn-error.log* 27 | 28 | # Optional eslint cache 29 | .eslintcache 30 | -------------------------------------------------------------------------------- /packages/learn-card-network/cloud-client/scripts/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": false, 3 | "env": { 4 | "node": true 5 | }, 6 | "rules": { 7 | "no-console": "off", 8 | "@typescript-eslint/no-var-requires": "off" 9 | } 10 | } -------------------------------------------------------------------------------- /packages/learn-card-network/cloud-client/scripts/mixedEntypoint.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./learn-cloud-client.cjs.production.min.js'); 5 | } else { 6 | module.exports = require('./learn-cloud-client.cjs.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/learn-card-network/simple-signing-client/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /dist 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | .vscode 21 | .idea 22 | 23 | npm-debug.log* 24 | .pnpm-debug.log 25 | yarn-debug.log* 26 | yarn-error.log* 27 | 28 | # Optional eslint cache 29 | .eslintcache 30 | -------------------------------------------------------------------------------- /packages/learn-card-network/simple-signing-client/scripts/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": false, 3 | "env": { 4 | "node": true 5 | }, 6 | "rules": { 7 | "no-console": "off", 8 | "@typescript-eslint/no-var-requires": "off" 9 | } 10 | } -------------------------------------------------------------------------------- /packages/learn-card-network/simple-signing-client/scripts/mixedEntypoint.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./simple-signing-client.cjs.production.min.js'); 5 | } else { 6 | module.exports = require('./simple-signing-client.cjs.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/learn-card-registries/_headers: -------------------------------------------------------------------------------- 1 | # Netlify _headers file 2 | 3 | # Target JSON-LD files within the /trusted/ path 4 | /**/**.json 5 | Content-Type: application/json 6 | Access-Control-Allow-Origin: * 7 | 8 | # Target plain .json files for registries: 9 | /**.json 10 | Content-Type: application/json 11 | Access-Control-Allow-Origin: * -------------------------------------------------------------------------------- /packages/learn-card-registries/untrusted-did-registries.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "LEF Untrusted Registry", 4 | "type": "dcc-legacy", 5 | "governanceUrl": "https://learningeconomy.io", 6 | "url": "https://registries.learncard.com/untrusted/registry.json" 7 | } 8 | ] 9 | -------------------------------------------------------------------------------- /packages/learn-card-registries/untrusted/registry.json: -------------------------------------------------------------------------------- 1 | { 2 | "meta": { 3 | "created": "2022-10-27T17:57:31+00:00", 4 | "updated": "2025-05-28T18:26:43+00:00" 5 | }, 6 | "registry": { 7 | "did:key:z6MkmYGgibfx6dbjXHTzqwvyC4vhM3oEPK9GdH7xkqBFxWAH": { 8 | "name": "Kyle Untrusted Account", 9 | "location": "Little Rock, AR 72201", 10 | "url": "https://www.smartresume.com/" 11 | }, 12 | "did:web:network.learncard.com:users:sophpotato1": { 13 | "name": "Soph Potato", 14 | "location": "Unknown, USA", 15 | "url": "https://www.example.com" 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /packages/learn-card-types/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | *.config.js 4 | *.test.js 5 | *.test.ts -------------------------------------------------------------------------------- /packages/learn-card-types/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | tsconfig.tsbuildinfo 4 | -------------------------------------------------------------------------------- /packages/learn-card-types/aqu.config.ts: -------------------------------------------------------------------------------- 1 | const options = { declaration: 'none' }; 2 | 3 | export default options; 4 | -------------------------------------------------------------------------------- /packages/learn-card-types/scripts/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": false, 3 | "env": { 4 | "node": true 5 | }, 6 | "rules": { 7 | "no-console": "off", 8 | "@typescript-eslint/no-var-requires": "off" 9 | } 10 | } -------------------------------------------------------------------------------- /packages/learn-card-types/scripts/mixedEntypoint.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./types.cjs.production.min.js'); 5 | } else { 6 | module.exports = require('./types.cjs.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/learn-card-types/src/helpers.ts: -------------------------------------------------------------------------------- 1 | export type DeepPartial = T extends object 2 | ? { 3 | [P in keyof T]?: DeepPartial; 4 | } 5 | : T; 6 | -------------------------------------------------------------------------------- /packages/learn-card-types/src/index.ts: -------------------------------------------------------------------------------- 1 | import 'zod-openapi/extend'; 2 | 3 | export * from './vc'; 4 | export * from './did'; 5 | export * from './obv3'; 6 | export * from './learncard'; 7 | export * from './learncloud'; 8 | export * from './lcn'; 9 | export * from './crypto'; 10 | export * from './mongo'; 11 | export * from './wasm'; 12 | export * from './helpers'; 13 | export * from './queries'; 14 | -------------------------------------------------------------------------------- /packages/learn-card-types/src/mongo.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | export const PaginationOptionsValidator = z.object({ 4 | limit: z.number(), 5 | cursor: z.string().optional(), 6 | sort: z.string().optional(), 7 | }); 8 | export type PaginationOptionsType = z.infer; 9 | 10 | export const PaginationResponseValidator = z.object({ 11 | cursor: z.string().optional(), 12 | hasMore: z.boolean(), 13 | }); 14 | export type PaginationResponseType = z.infer; 15 | -------------------------------------------------------------------------------- /packages/learn-card-types/src/wasm.ts: -------------------------------------------------------------------------------- 1 | export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module; 2 | -------------------------------------------------------------------------------- /packages/learn-card-types/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es6", 4 | "module": "ES2015", 5 | "declaration": true, 6 | "declarationMap": true, 7 | "emitDeclarationOnly": true, 8 | "outDir": "dist", 9 | "strict": true, 10 | "esModuleInterop": true, 11 | "lib": ["es5"], 12 | "noLib": false, 13 | "rootDir": "src", 14 | "skipLibCheck": true, 15 | "allowSyntheticDefaultImports": true, 16 | "moduleResolution": "node" 17 | }, 18 | "include": ["src"], 19 | "exclude": ["node_modules", "test", "example"] 20 | } 21 | -------------------------------------------------------------------------------- /packages/open-api-lcn-clients/README.md: -------------------------------------------------------------------------------- 1 | # LearnCard Network API Client SDKs 2 | -------------------------------------------------------------------------------- /packages/plugins/ceramic/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | *.config.js 4 | *.test.js 5 | *.test.ts -------------------------------------------------------------------------------- /packages/plugins/ceramic/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | tsconfig.tsbuildinfo 4 | -------------------------------------------------------------------------------- /packages/plugins/ceramic/scripts/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": false, 3 | "env": { 4 | "node": true 5 | }, 6 | "rules": { 7 | "no-console": "off", 8 | "@typescript-eslint/no-var-requires": "off" 9 | } 10 | } -------------------------------------------------------------------------------- /packages/plugins/ceramic/scripts/mixedEntypoint.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./ceramic-plugin.cjs.production.min.js'); 5 | } else { 6 | module.exports = require('./ceramic-plugin.cjs.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/plugins/ceramic/src/defaults.ts: -------------------------------------------------------------------------------- 1 | import { CeramicArgs } from './types'; 2 | 3 | export const DEFAULT_CERAMIC_ARGS: CeramicArgs = { 4 | ceramicEndpoint: 'https://ceramic-node.welibrary.io:7007', 5 | defaultContentFamily: 'SuperSkills', 6 | }; 7 | -------------------------------------------------------------------------------- /packages/plugins/ceramic/src/global.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'hex-lite' { 2 | function toUint8Array(hex: string): Uint8Array; 3 | function fromUint8Array(array: Uint8Array): string; 4 | function toBuffer(hex: string): ArrayBuffer; 5 | function fromBuffer(buffer: ArrayBuffer): string; 6 | } 7 | -------------------------------------------------------------------------------- /packages/plugins/ceramic/src/helpers.ts: -------------------------------------------------------------------------------- 1 | import { StreamID } from '@ceramicnetwork/streamid'; 2 | 3 | import { CeramicURI } from './types'; 4 | 5 | export const streamIdToCeramicURI = (id: string | StreamID): CeramicURI => `lc:ceramic:${id}`; 6 | -------------------------------------------------------------------------------- /packages/plugins/ceramic/src/index.ts: -------------------------------------------------------------------------------- 1 | import { getCeramicPlugin } from './ceramic'; 2 | export { getCeramicPlugin } from './ceramic'; 3 | export * from './types'; 4 | export * from './helpers'; 5 | 6 | export default getCeramicPlugin; 7 | -------------------------------------------------------------------------------- /packages/plugins/ceramic/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "module": "ESNext", 5 | "declaration": true, 6 | "declarationMap": true, 7 | "emitDeclarationOnly": true, 8 | "outDir": "dist", 9 | "strict": true, 10 | "esModuleInterop": true, 11 | "lib": ["dom", "es2021"], 12 | "noLib": false, 13 | "rootDir": "src", 14 | "skipLibCheck": true, 15 | "paths": {}, 16 | "allowSyntheticDefaultImports": true, 17 | "moduleResolution": "node" 18 | }, 19 | "include": ["src", "src/test"], 20 | "exclude": ["node_modules", "example"] 21 | } 22 | -------------------------------------------------------------------------------- /packages/plugins/chapi/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | *.config.js 4 | *.test.js 5 | *.test.ts -------------------------------------------------------------------------------- /packages/plugins/chapi/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | tsconfig.tsbuildinfo 4 | -------------------------------------------------------------------------------- /packages/plugins/chapi/scripts/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": false, 3 | "env": { 4 | "node": true 5 | }, 6 | "rules": { 7 | "no-console": "off", 8 | "@typescript-eslint/no-var-requires": "off" 9 | } 10 | } -------------------------------------------------------------------------------- /packages/plugins/chapi/scripts/mixedEntypoint.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./chapi-plugin.cjs.production.min.js'); 5 | } else { 6 | module.exports = require('./chapi-plugin.cjs.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/plugins/chapi/src/index.ts: -------------------------------------------------------------------------------- 1 | export { getCHAPIPlugin } from './chapi'; 2 | export * from './types'; 3 | -------------------------------------------------------------------------------- /packages/plugins/chapi/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "module": "ESNext", 5 | "declaration": true, 6 | "declarationMap": true, 7 | "emitDeclarationOnly": true, 8 | "outDir": "dist", 9 | "strict": true, 10 | "esModuleInterop": true, 11 | "lib": ["dom", "es2021"], 12 | "noLib": false, 13 | "rootDir": "src", 14 | "skipLibCheck": true, 15 | "paths": {}, 16 | "allowSyntheticDefaultImports": true, 17 | "moduleResolution": "node" 18 | }, 19 | "include": ["src", "src/test"], 20 | "exclude": ["node_modules", "example"] 21 | } 22 | -------------------------------------------------------------------------------- /packages/plugins/claimable-boosts/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | *.config.js 4 | *.test.js 5 | *.test.ts -------------------------------------------------------------------------------- /packages/plugins/claimable-boosts/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | tsconfig.tsbuildinfo 4 | -------------------------------------------------------------------------------- /packages/plugins/claimable-boosts/scripts/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": false, 3 | "env": { 4 | "node": true 5 | }, 6 | "rules": { 7 | "no-console": "off", 8 | "@typescript-eslint/no-var-requires": "off" 9 | } 10 | } -------------------------------------------------------------------------------- /packages/plugins/claimable-boosts/scripts/mixedEntypoint.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./claimable-boosts-plugin.cjs.production.min.cjs'); 5 | } else { 6 | module.exports = require('./claimable-boosts-plugin.cjs.development.cjs'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/plugins/crypto/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | *.config.js 4 | *.test.js 5 | *.test.ts -------------------------------------------------------------------------------- /packages/plugins/crypto/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | tsconfig.tsbuildinfo 4 | -------------------------------------------------------------------------------- /packages/plugins/crypto/scripts/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": false, 3 | "env": { 4 | "node": true 5 | }, 6 | "rules": { 7 | "no-console": "off", 8 | "@typescript-eslint/no-var-requires": "off" 9 | } 10 | } -------------------------------------------------------------------------------- /packages/plugins/crypto/scripts/mixedEntypoint.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./crypto-plugin.cjs.production.min.js'); 5 | } else { 6 | module.exports = require('./crypto-plugin.cjs.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/plugins/crypto/src/crypto.ts: -------------------------------------------------------------------------------- 1 | import crypto from 'isomorphic-webcrypto'; 2 | 3 | if (typeof window === 'undefined' && !globalThis.crypto) globalThis.crypto = crypto; 4 | 5 | export default crypto; 6 | -------------------------------------------------------------------------------- /packages/plugins/crypto/src/index.ts: -------------------------------------------------------------------------------- 1 | import { CryptoPluginType } from './types'; 2 | 3 | import crypto from './crypto'; 4 | 5 | export * from './types'; 6 | 7 | /** 8 | * @group Plugins 9 | */ 10 | export const CryptoPlugin: CryptoPluginType = { 11 | name: 'Crypto', 12 | displayName: 'Crypto Plugin', 13 | description: 'Exposes a standardized, isomorphic Crypto object', 14 | methods: { 15 | crypto: () => crypto, 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /packages/plugins/crypto/src/types.ts: -------------------------------------------------------------------------------- 1 | import { Plugin } from '@learncard/core'; 2 | 3 | export type CryptoPluginMethods = { 4 | crypto: () => Crypto; 5 | }; 6 | 7 | export type CryptoPluginType = Plugin<'Crypto', any, CryptoPluginMethods>; 8 | -------------------------------------------------------------------------------- /packages/plugins/crypto/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "module": "ESNext", 5 | "declaration": true, 6 | "declarationMap": true, 7 | "emitDeclarationOnly": true, 8 | "outDir": "dist", 9 | "strict": true, 10 | "esModuleInterop": true, 11 | "lib": ["dom", "es2021"], 12 | "noLib": false, 13 | "rootDir": "src", 14 | "skipLibCheck": true, 15 | "paths": {}, 16 | "allowSyntheticDefaultImports": true, 17 | "moduleResolution": "node" 18 | }, 19 | "include": ["src", "src/test"], 20 | "exclude": ["node_modules", "example"] 21 | } 22 | -------------------------------------------------------------------------------- /packages/plugins/did-web-plugin/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | *.config.js 4 | *.test.js 5 | *.test.ts -------------------------------------------------------------------------------- /packages/plugins/did-web-plugin/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | tsconfig.tsbuildinfo 4 | -------------------------------------------------------------------------------- /packages/plugins/did-web-plugin/scripts/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": false, 3 | "env": { 4 | "node": true 5 | }, 6 | "rules": { 7 | "no-console": "off", 8 | "@typescript-eslint/no-var-requires": "off" 9 | } 10 | } -------------------------------------------------------------------------------- /packages/plugins/did-web-plugin/scripts/mixedEntypoint.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./did-web-plugin.cjs.production.min.js'); 5 | } else { 6 | module.exports = require('./did-web-plugin.cjs.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/plugins/did-web-plugin/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './types'; 2 | export * from './plugin'; 3 | -------------------------------------------------------------------------------- /packages/plugins/did-web-plugin/src/types.ts: -------------------------------------------------------------------------------- 1 | import { Plugin } from '@learncard/core'; 2 | 3 | /** @group DID Web Plugin */ 4 | export type DidWebPluginDependentMethods = {}; 5 | 6 | /** @group DID Web Plugin */ 7 | export type DidWebPluginMethods = {}; 8 | 9 | /** @group DID Web Plugin */ 10 | export type DidWebPlugin = Plugin<'DID Web', 'id'>; 11 | -------------------------------------------------------------------------------- /packages/plugins/didkey/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | *.config.js 4 | *.test.js 5 | *.test.ts -------------------------------------------------------------------------------- /packages/plugins/didkey/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | tsconfig.tsbuildinfo 4 | -------------------------------------------------------------------------------- /packages/plugins/didkey/scripts/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": false, 3 | "env": { 4 | "node": true 5 | }, 6 | "rules": { 7 | "no-console": "off", 8 | "@typescript-eslint/no-var-requires": "off" 9 | } 10 | } -------------------------------------------------------------------------------- /packages/plugins/didkey/scripts/mixedEntypoint.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./didkey-plugin.cjs.production.min.js'); 5 | } else { 6 | module.exports = require('./didkey-plugin.cjs.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/plugins/didkey/src/global.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'hex-lite' { 2 | function toUint8Array(hex: string): Uint8Array; 3 | function fromUint8Array(array: Uint8Array): string; 4 | function toBuffer(hex: string): ArrayBuffer; 5 | function fromBuffer(buffer: ArrayBuffer): string; 6 | } 7 | -------------------------------------------------------------------------------- /packages/plugins/didkey/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "module": "ESNext", 5 | "declaration": true, 6 | "declarationMap": true, 7 | "emitDeclarationOnly": true, 8 | "outDir": "dist", 9 | "strict": true, 10 | "esModuleInterop": true, 11 | "lib": ["dom", "es2021"], 12 | "noLib": false, 13 | "rootDir": "src", 14 | "skipLibCheck": true, 15 | "paths": {}, 16 | "allowSyntheticDefaultImports": true, 17 | "moduleResolution": "node" 18 | }, 19 | "include": ["src", "src/test"], 20 | "exclude": ["node_modules", "example"] 21 | } 22 | -------------------------------------------------------------------------------- /packages/plugins/didkit/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | *.config.js 4 | *.test.js 5 | *.test.ts -------------------------------------------------------------------------------- /packages/plugins/didkit/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | tsconfig.tsbuildinfo 4 | -------------------------------------------------------------------------------- /packages/plugins/didkit/scripts/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": false, 3 | "env": { 4 | "node": true 5 | }, 6 | "rules": { 7 | "no-console": "off", 8 | "@typescript-eslint/no-var-requires": "off" 9 | } 10 | } -------------------------------------------------------------------------------- /packages/plugins/didkit/scripts/mixedEntypoint.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./didkit-plugin.cjs.production.min.js'); 5 | } else { 6 | module.exports = require('./didkit-plugin.cjs.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/plugins/didkit/src/didkit/pkg/didkit_wasm_bg.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/packages/plugins/didkit/src/didkit/pkg/didkit_wasm_bg.wasm -------------------------------------------------------------------------------- /packages/plugins/didkit/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './types'; 2 | export * from './plugin'; 3 | -------------------------------------------------------------------------------- /packages/plugins/didkit/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "module": "ESNext", 5 | "declaration": true, 6 | "declarationMap": true, 7 | "emitDeclarationOnly": true, 8 | "outDir": "dist", 9 | "strict": true, 10 | "esModuleInterop": true, 11 | "lib": ["dom", "es2021"], 12 | "noLib": false, 13 | "rootDir": "src", 14 | "skipLibCheck": true, 15 | "paths": {}, 16 | "allowSyntheticDefaultImports": true, 17 | "moduleResolution": "node" 18 | }, 19 | "include": ["src", "src/test"], 20 | "exclude": ["node_modules", "example"] 21 | } 22 | -------------------------------------------------------------------------------- /packages/plugins/dynamic-loader/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | *.config.js 4 | *.test.js 5 | *.test.ts -------------------------------------------------------------------------------- /packages/plugins/dynamic-loader/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | tsconfig.tsbuildinfo 4 | -------------------------------------------------------------------------------- /packages/plugins/dynamic-loader/scripts/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": false, 3 | "env": { 4 | "node": true 5 | }, 6 | "rules": { 7 | "no-console": "off", 8 | "@typescript-eslint/no-var-requires": "off" 9 | } 10 | } -------------------------------------------------------------------------------- /packages/plugins/dynamic-loader/scripts/mixedEntypoint.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./dynamic-loader-plugin.cjs.production.min.js'); 5 | } else { 6 | module.exports = require('./dynamic-loader-plugin.cjs.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/plugins/dynamic-loader/src/types.ts: -------------------------------------------------------------------------------- 1 | import { Plugin } from '@learncard/core'; 2 | 3 | export type DynamicLoaderPluginType = Plugin<'Dynamic Loader', 'context'>; 4 | -------------------------------------------------------------------------------- /packages/plugins/encryption/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | *.config.js 4 | *.test.js 5 | *.test.ts -------------------------------------------------------------------------------- /packages/plugins/encryption/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | tsconfig.tsbuildinfo 4 | -------------------------------------------------------------------------------- /packages/plugins/encryption/scripts/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": false, 3 | "env": { 4 | "node": true 5 | }, 6 | "rules": { 7 | "no-console": "off", 8 | "@typescript-eslint/no-var-requires": "off" 9 | } 10 | } -------------------------------------------------------------------------------- /packages/plugins/encryption/scripts/mixedEntypoint.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./encryption-plugin.cjs.production.min.js'); 5 | } else { 6 | module.exports = require('./encryption-plugin.cjs.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/plugins/encryption/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "module": "ESNext", 5 | "declaration": true, 6 | "declarationMap": true, 7 | "emitDeclarationOnly": true, 8 | "outDir": "dist", 9 | "strict": true, 10 | "esModuleInterop": true, 11 | "lib": ["dom", "es2021"], 12 | "noLib": false, 13 | "rootDir": "src", 14 | "skipLibCheck": true, 15 | "paths": {}, 16 | "allowSyntheticDefaultImports": true, 17 | "moduleResolution": "node" 18 | }, 19 | "include": ["src", "src/test"], 20 | "exclude": ["node_modules", "example"] 21 | } 22 | -------------------------------------------------------------------------------- /packages/plugins/ethereum/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | *.config.js 4 | *.test.js 5 | *.test.ts -------------------------------------------------------------------------------- /packages/plugins/ethereum/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | tsconfig.tsbuildinfo 4 | -------------------------------------------------------------------------------- /packages/plugins/ethereum/scripts/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": false, 3 | "env": { 4 | "node": true 5 | }, 6 | "rules": { 7 | "no-console": "off", 8 | "@typescript-eslint/no-var-requires": "off" 9 | } 10 | } -------------------------------------------------------------------------------- /packages/plugins/ethereum/scripts/mixedEntypoint.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./ethereum-plugin.cjs.production.min.js'); 5 | } else { 6 | module.exports = require('./ethereum-plugin.cjs.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/plugins/ethereum/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "module": "ESNext", 5 | "declaration": true, 6 | "declarationMap": true, 7 | "emitDeclarationOnly": true, 8 | "outDir": "dist", 9 | "strict": true, 10 | "esModuleInterop": true, 11 | "lib": ["dom", "es2021"], 12 | "noLib": false, 13 | "rootDir": "src", 14 | "skipLibCheck": true, 15 | "paths": {}, 16 | "allowSyntheticDefaultImports": true, 17 | "moduleResolution": "node" 18 | }, 19 | "include": ["src", "src/test"], 20 | "exclude": ["node_modules", "example"] 21 | } 22 | -------------------------------------------------------------------------------- /packages/plugins/expiration/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | *.config.js 4 | *.test.js 5 | *.test.ts -------------------------------------------------------------------------------- /packages/plugins/expiration/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | tsconfig.tsbuildinfo 4 | -------------------------------------------------------------------------------- /packages/plugins/expiration/scripts/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": false, 3 | "env": { 4 | "node": true 5 | }, 6 | "rules": { 7 | "no-console": "off", 8 | "@typescript-eslint/no-var-requires": "off" 9 | } 10 | } -------------------------------------------------------------------------------- /packages/plugins/expiration/scripts/mixedEntypoint.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./expiration-plugin.cjs.production.min.js'); 5 | } else { 6 | module.exports = require('./expiration-plugin.cjs.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/plugins/expiration/src/types.ts: -------------------------------------------------------------------------------- 1 | import { Plugin } from '@learncard/core'; 2 | import { VerifyExtension } from '@learncard/vc-plugin'; 3 | 4 | export type ExpirationPlugin = Plugin<'Expiration', any, VerifyExtension>; 5 | -------------------------------------------------------------------------------- /packages/plugins/expiration/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "module": "ESNext", 5 | "declaration": true, 6 | "declarationMap": true, 7 | "emitDeclarationOnly": true, 8 | "outDir": "dist", 9 | "strict": true, 10 | "esModuleInterop": true, 11 | "lib": ["dom", "es2021"], 12 | "noLib": false, 13 | "rootDir": "src", 14 | "skipLibCheck": true, 15 | "paths": {}, 16 | "allowSyntheticDefaultImports": true, 17 | "moduleResolution": "node" 18 | }, 19 | "include": ["src", "src/test"], 20 | "exclude": ["node_modules", "example"] 21 | } 22 | -------------------------------------------------------------------------------- /packages/plugins/idx/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | *.config.js 4 | *.test.js 5 | *.test.ts -------------------------------------------------------------------------------- /packages/plugins/idx/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | tsconfig.tsbuildinfo 4 | -------------------------------------------------------------------------------- /packages/plugins/idx/scripts/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": false, 3 | "env": { 4 | "node": true 5 | }, 6 | "rules": { 7 | "no-console": "off", 8 | "@typescript-eslint/no-var-requires": "off" 9 | } 10 | } -------------------------------------------------------------------------------- /packages/plugins/idx/scripts/mixedEntypoint.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./idx-plugin.cjs.production.min.js'); 5 | } else { 6 | module.exports = require('./idx-plugin.cjs.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/plugins/idx/src/index.ts: -------------------------------------------------------------------------------- 1 | import { getIDXPlugin } from './idx'; 2 | export { getIDXPlugin } from './idx'; 3 | export * from './types'; 4 | 5 | export default getIDXPlugin; 6 | -------------------------------------------------------------------------------- /packages/plugins/idx/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "module": "ESNext", 5 | "declaration": true, 6 | "declarationMap": true, 7 | "emitDeclarationOnly": true, 8 | "outDir": "dist", 9 | "strict": true, 10 | "esModuleInterop": true, 11 | "lib": ["dom", "es2021"], 12 | "noLib": false, 13 | "rootDir": "src", 14 | "skipLibCheck": true, 15 | "paths": {}, 16 | "allowSyntheticDefaultImports": true, 17 | "moduleResolution": "node" 18 | }, 19 | "include": ["src", "src/test"], 20 | "exclude": ["node_modules", "example"] 21 | } 22 | -------------------------------------------------------------------------------- /packages/plugins/learn-card-network/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | *.config.js 4 | *.test.js 5 | *.test.ts -------------------------------------------------------------------------------- /packages/plugins/learn-card-network/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | tsconfig.tsbuildinfo 4 | -------------------------------------------------------------------------------- /packages/plugins/learn-card-network/scripts/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": false, 3 | "env": { 4 | "node": true 5 | }, 6 | "rules": { 7 | "no-console": "off", 8 | "@typescript-eslint/no-var-requires": "off" 9 | } 10 | } -------------------------------------------------------------------------------- /packages/plugins/learn-card-network/scripts/mixedEntypoint.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./lcn-plugin.cjs.production.min.js'); 5 | } else { 6 | module.exports = require('./lcn-plugin.cjs.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/plugins/learn-card-network/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './types'; 2 | export * from './plugin'; 3 | -------------------------------------------------------------------------------- /packages/plugins/learn-card/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | *.config.js 4 | *.test.js 5 | *.test.ts -------------------------------------------------------------------------------- /packages/plugins/learn-card/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | tsconfig.tsbuildinfo 4 | -------------------------------------------------------------------------------- /packages/plugins/learn-card/scripts/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": false, 3 | "env": { 4 | "node": true 5 | }, 6 | "rules": { 7 | "no-console": "off", 8 | "@typescript-eslint/no-var-requires": "off" 9 | } 10 | } -------------------------------------------------------------------------------- /packages/plugins/learn-card/scripts/mixedEntypoint.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./learn-card-plugin.cjs.production.min.js'); 5 | } else { 6 | module.exports = require('./learn-card-plugin.cjs.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/plugins/learn-card/src/index.ts: -------------------------------------------------------------------------------- 1 | import { LearnCard } from '@learncard/core'; 2 | import { LearnCardPluginDependentMethods, LearnCardPlugin } from './types'; 3 | import { verifyCredential } from './verify'; 4 | 5 | export * from './types'; 6 | 7 | /** 8 | * @group Plugins 9 | */ 10 | export const getLearnCardPlugin = ( 11 | learnCard: LearnCard 12 | ): LearnCardPlugin => ({ 13 | name: 'LearnCard', 14 | displayName: 'LearnCard', 15 | description: 'Adds opinionated logic to a LearnCard', 16 | methods: { 17 | verifyCredential: verifyCredential(learnCard) as any, 18 | }, 19 | }); 20 | -------------------------------------------------------------------------------- /packages/plugins/learn-card/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "module": "ESNext", 5 | "declaration": true, 6 | "declarationMap": true, 7 | "emitDeclarationOnly": true, 8 | "outDir": "dist", 9 | "strict": true, 10 | "esModuleInterop": true, 11 | "lib": ["dom", "es2021"], 12 | "noLib": false, 13 | "rootDir": "src", 14 | "skipLibCheck": true, 15 | "paths": {}, 16 | "allowSyntheticDefaultImports": true, 17 | "moduleResolution": "node" 18 | }, 19 | "include": ["src", "src/test"], 20 | "exclude": ["node_modules", "example"] 21 | } 22 | -------------------------------------------------------------------------------- /packages/plugins/learn-cloud/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | *.config.js 4 | *.test.js 5 | *.test.ts -------------------------------------------------------------------------------- /packages/plugins/learn-cloud/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | tsconfig.tsbuildinfo 4 | -------------------------------------------------------------------------------- /packages/plugins/learn-cloud/scripts/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": false, 3 | "env": { 4 | "node": true 5 | }, 6 | "rules": { 7 | "no-console": "off", 8 | "@typescript-eslint/no-var-requires": "off" 9 | } 10 | } -------------------------------------------------------------------------------- /packages/plugins/learn-cloud/scripts/mixedEntypoint.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./learn-cloud-plugin.cjs.production.min.js'); 5 | } else { 6 | module.exports = require('./learn-cloud-plugin.cjs.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/plugins/learn-cloud/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './types'; 2 | export * from './plugin'; 3 | -------------------------------------------------------------------------------- /packages/plugins/learn-cloud/src/test/index.test.ts: -------------------------------------------------------------------------------- 1 | import { getLearnCloudPlugin } from '../'; 2 | 3 | // TODO: Find a way to mock a LearnCloud endpoint for these tests 4 | describe('LearnCloud Plugin', () => { 5 | it('exposes a function', () => { 6 | expect(getLearnCloudPlugin).toBeDefined(); 7 | }); 8 | }); 9 | -------------------------------------------------------------------------------- /packages/plugins/simple-signing-plugin/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | *.config.js 4 | *.test.js 5 | *.test.ts -------------------------------------------------------------------------------- /packages/plugins/simple-signing-plugin/.github/workflows/coverage.yml: -------------------------------------------------------------------------------- 1 | name: coverage 2 | on: 3 | pull_request: 4 | paths-ignore: 5 | - 'docs/**' 6 | - 'example/**' 7 | branches: 8 | - master 9 | jobs: 10 | coverage: 11 | name: Collecting coverage 12 | runs-on: ubuntu-latest 13 | env: 14 | CI_JOB_NUMBER: 1 15 | steps: 16 | - uses: actions/checkout@v1 17 | - uses: artiomtr/jest-coverage-report-action@v1.0 18 | with: 19 | github_token: ${{ secrets.GITHUB_TOKEN }} 20 | test_script: npm run test:coverage 21 | -------------------------------------------------------------------------------- /packages/plugins/simple-signing-plugin/.github/workflows/size.yml: -------------------------------------------------------------------------------- 1 | name: size 2 | on: 3 | pull_request: 4 | paths-ignore: 5 | - 'docs/**' 6 | - 'example/**' 7 | branches: [master] 8 | jobs: 9 | size: 10 | runs-on: ubuntu-latest 11 | env: 12 | CI_JOB_NUMBER: 1 13 | steps: 14 | - uses: actions/checkout@v1 15 | - uses: andresz1/size-limit-action@v1 16 | with: 17 | github_token: ${{ secrets.GITHUB_TOKEN }} 18 | -------------------------------------------------------------------------------- /packages/plugins/simple-signing-plugin/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | tsconfig.tsbuildinfo 4 | -------------------------------------------------------------------------------- /packages/plugins/simple-signing-plugin/scripts/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": false, 3 | "env": { 4 | "node": true 5 | }, 6 | "rules": { 7 | "no-console": "off", 8 | "@typescript-eslint/no-var-requires": "off" 9 | } 10 | } -------------------------------------------------------------------------------- /packages/plugins/simple-signing-plugin/scripts/mixedEntypoint.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./simple-signing-plugin.cjs.production.min.cjs'); 5 | } else { 6 | module.exports = require('./simple-signing-plugin.cjs.development.cjs'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/plugins/simple-signing-plugin/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './types'; 2 | export * from './plugin'; 3 | -------------------------------------------------------------------------------- /packages/plugins/vc-api/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | *.config.js 4 | *.test.js 5 | *.test.ts -------------------------------------------------------------------------------- /packages/plugins/vc-api/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | tsconfig.tsbuildinfo 4 | -------------------------------------------------------------------------------- /packages/plugins/vc-api/scripts/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": false, 3 | "env": { 4 | "node": true 5 | }, 6 | "rules": { 7 | "no-console": "off", 8 | "@typescript-eslint/no-var-requires": "off" 9 | } 10 | } -------------------------------------------------------------------------------- /packages/plugins/vc-api/scripts/mixedEntypoint.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./vc-api-plugin.cjs.production.min.js'); 5 | } else { 6 | module.exports = require('./vc-api-plugin.cjs.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/plugins/vc-api/src/helpers.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Sends a POST request via fetch 3 | */ 4 | export const post = async (url: string, data: Record): Promise => 5 | fetch(url, { 6 | method: 'POST', 7 | headers: { 'Content-Type': 'application/json' }, 8 | body: JSON.stringify(data), 9 | }); 10 | 11 | /** 12 | * Returns whether or not an HTTP status code is successful 13 | */ 14 | export const isSuccessful = (status: number) => status.toString().startsWith('2'); 15 | -------------------------------------------------------------------------------- /packages/plugins/vc-api/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "module": "ESNext", 5 | "declaration": true, 6 | "declarationMap": true, 7 | "emitDeclarationOnly": true, 8 | "outDir": "dist", 9 | "strict": true, 10 | "esModuleInterop": true, 11 | "lib": ["dom", "es2021"], 12 | "noLib": false, 13 | "rootDir": "src", 14 | "skipLibCheck": true, 15 | "paths": {}, 16 | "allowSyntheticDefaultImports": true, 17 | "moduleResolution": "node" 18 | }, 19 | "include": ["src", "src/test"], 20 | "exclude": ["node_modules", "example"] 21 | } 22 | -------------------------------------------------------------------------------- /packages/plugins/vc-templates/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | *.config.js 4 | *.test.js 5 | *.test.ts -------------------------------------------------------------------------------- /packages/plugins/vc-templates/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | tsconfig.tsbuildinfo 4 | -------------------------------------------------------------------------------- /packages/plugins/vc-templates/scripts/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": false, 3 | "env": { 4 | "node": true 5 | }, 6 | "rules": { 7 | "no-console": "off", 8 | "@typescript-eslint/no-var-requires": "off" 9 | } 10 | } -------------------------------------------------------------------------------- /packages/plugins/vc-templates/scripts/mixedEntypoint.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./vc-templates-plugin.cjs.production.min.js'); 5 | } else { 6 | module.exports = require('./vc-templates-plugin.cjs.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/plugins/vc-templates/src/index.ts: -------------------------------------------------------------------------------- 1 | export { getVCTemplatesPlugin } from './vc-templates'; 2 | export * from './types'; 3 | -------------------------------------------------------------------------------- /packages/plugins/vc-templates/src/type.helpers.ts: -------------------------------------------------------------------------------- 1 | export type DiscriminatedUnionize = { 2 | [Key in keyof T]: { [Key2 in K]: Key } & T[Key]; 3 | }[keyof T]; 4 | -------------------------------------------------------------------------------- /packages/plugins/vc/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | *.config.js 4 | *.test.js 5 | *.test.ts -------------------------------------------------------------------------------- /packages/plugins/vc/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | tsconfig.tsbuildinfo 4 | -------------------------------------------------------------------------------- /packages/plugins/vc/scripts/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": false, 3 | "env": { 4 | "node": true 5 | }, 6 | "rules": { 7 | "no-console": "off", 8 | "@typescript-eslint/no-var-requires": "off" 9 | } 10 | } -------------------------------------------------------------------------------- /packages/plugins/vc/scripts/mixedEntypoint.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./vc-plugin.cjs.production.min.js'); 5 | } else { 6 | module.exports = require('./vc-plugin.cjs.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/plugins/vc/src/index.ts: -------------------------------------------------------------------------------- 1 | export { getVCPlugin } from './vc'; 2 | export * from './types'; 3 | -------------------------------------------------------------------------------- /packages/plugins/vc/src/verifyPresentation.ts: -------------------------------------------------------------------------------- 1 | import { VP } from '@learncard/types'; 2 | 3 | import { ProofOptions } from '@learncard/didkit-plugin'; 4 | import { VCDependentLearnCard, VCImplicitLearnCard } from './types'; 5 | 6 | export const verifyPresentation = (initLearnCard: VCDependentLearnCard) => { 7 | return async ( 8 | _learnCard: VCImplicitLearnCard, 9 | presentation: VP | string, 10 | options: Partial = {} 11 | ) => { 12 | return initLearnCard.invoke.verifyPresentation(presentation, options); 13 | }; 14 | }; 15 | -------------------------------------------------------------------------------- /packages/plugins/vc/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "module": "ESNext", 5 | "declaration": true, 6 | "declarationMap": true, 7 | "emitDeclarationOnly": true, 8 | "outDir": "dist", 9 | "strict": true, 10 | "esModuleInterop": true, 11 | "lib": ["dom", "es2021"], 12 | "noLib": false, 13 | "rootDir": "src", 14 | "skipLibCheck": true, 15 | "paths": {}, 16 | "allowSyntheticDefaultImports": true, 17 | "moduleResolution": "node" 18 | }, 19 | "include": ["src", "src/test"], 20 | "exclude": ["node_modules", "example"] 21 | } 22 | -------------------------------------------------------------------------------- /packages/plugins/vpqr/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | *.config.js 4 | *.test.js 5 | *.test.ts -------------------------------------------------------------------------------- /packages/plugins/vpqr/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | tsconfig.tsbuildinfo 4 | -------------------------------------------------------------------------------- /packages/plugins/vpqr/scripts/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": false, 3 | "env": { 4 | "node": true 5 | }, 6 | "rules": { 7 | "no-console": "off", 8 | "@typescript-eslint/no-var-requires": "off" 9 | } 10 | } -------------------------------------------------------------------------------- /packages/plugins/vpqr/scripts/mixedEntypoint.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (process.env.NODE_ENV === 'production') { 4 | module.exports = require('./vpqr-plugin.cjs.production.min.js'); 5 | } else { 6 | module.exports = require('./vpqr-plugin.cjs.development.js'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/plugins/vpqr/src/types.ts: -------------------------------------------------------------------------------- 1 | import { VP } from '@learncard/types'; 2 | import { Plugin } from '@learncard/core'; 3 | 4 | /** @group VPQR Plugin */ 5 | export type VpqrPluginMethods = { 6 | vpFromQrCode: (text: string) => Promise; 7 | vpToQrCode: (vp: VP) => Promise; 8 | }; 9 | 10 | /** @group VPQR Plugin */ 11 | export type VpqrPluginDependentMethods = { 12 | contextLoader: (url: string) => Promise>; 13 | }; 14 | 15 | export type VpqrPlugin = Plugin<'Vpqr', any, VpqrPluginMethods, any, VpqrPluginDependentMethods>; 16 | -------------------------------------------------------------------------------- /packages/plugins/vpqr/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "module": "ESNext", 5 | "declaration": true, 6 | "declarationMap": true, 7 | "emitDeclarationOnly": true, 8 | "outDir": "dist", 9 | "strict": true, 10 | "esModuleInterop": true, 11 | "lib": ["dom", "es2021"], 12 | "noLib": false, 13 | "rootDir": "src", 14 | "skipLibCheck": true, 15 | "paths": {}, 16 | "allowSyntheticDefaultImports": true, 17 | "moduleResolution": "node" 18 | }, 19 | "include": ["src", "src/test"], 20 | "exclude": ["node_modules", "example"] 21 | } 22 | -------------------------------------------------------------------------------- /packages/react-learn-card/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | .changeset/ 4 | storybook-static/ 5 | -------------------------------------------------------------------------------- /packages/react-learn-card/.nvmrc: -------------------------------------------------------------------------------- 1 | v20.10.0 2 | -------------------------------------------------------------------------------- /packages/react-learn-card/.nxignore: -------------------------------------------------------------------------------- 1 | storybook-static/ 2 | -------------------------------------------------------------------------------- /packages/react-learn-card/.storybook/main.ts: -------------------------------------------------------------------------------- 1 | import type { StorybookConfig } from '@storybook/react-vite'; 2 | const config: StorybookConfig = { 3 | stories: ['../src/**/**/*.stories.@(js|jsx|ts|tsx)'], 4 | addons: ['@storybook/addon-links', '@storybook/addon-essentials', '@storybook/addon-styling'], 5 | framework: { name: '@storybook/react-vite', options: {} }, 6 | }; 7 | export default config; 8 | -------------------------------------------------------------------------------- /packages/react-learn-card/.storybook/preview.js: -------------------------------------------------------------------------------- 1 | import '../src/assets/styles/base.css'; 2 | import '../src/assets/styles/main.css'; 3 | 4 | export const parameters = { 5 | actions: { argTypesRegex: '^on[A-Z].*' }, 6 | controls: { 7 | matchers: { 8 | color: /(background|color)$/i, 9 | date: /Date$/, 10 | }, 11 | }, 12 | }; 13 | -------------------------------------------------------------------------------- /packages/react-learn-card/__mocks__/fileMock.js: -------------------------------------------------------------------------------- 1 | module.exports = 'test-file-stub'; 2 | -------------------------------------------------------------------------------- /packages/react-learn-card/__mocks__/styleMock.js: -------------------------------------------------------------------------------- 1 | module.exports = {}; 2 | -------------------------------------------------------------------------------- /packages/react-learn-card/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/icons/accomplishmentsIcon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/icons/coursesIcon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/icons/experiencesIcon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/icons/idIcon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/Accommodation-Hands.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/packages/react-learn-card/src/assets/images/Accommodation-Hands.png -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/ArrowArcLeft.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/ArrowArcRight.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/CaretRight.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/GreenCheckCircle.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/RedXCircle.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/X.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/YellowWarningCircle.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/agriculture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/packages/react-learn-card/src/assets/images/agriculture.png -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/apple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/packages/react-learn-card/src/assets/images/apple.png -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/athletics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/packages/react-learn-card/src/assets/images/athletics.png -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/backpack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/packages/react-learn-card/src/assets/images/backpack.png -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/badge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/packages/react-learn-card/src/assets/images/badge.png -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/business.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/packages/react-learn-card/src/assets/images/business.png -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/contactless-symbol.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/creative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/packages/react-learn-card/src/assets/images/creative.png -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/default-face.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/packages/react-learn-card/src/assets/images/default-face.jpeg -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/digital.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/packages/react-learn-card/src/assets/images/digital.png -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/durable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/packages/react-learn-card/src/assets/images/durable.png -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/emptystate-death.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/packages/react-learn-card/src/assets/images/emptystate-death.png -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/emptystate-dinocandle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/packages/react-learn-card/src/assets/images/emptystate-dinocandle.png -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/emptystate-ghost1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/packages/react-learn-card/src/assets/images/emptystate-ghost1.png -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/eventsGraphic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/packages/react-learn-card/src/assets/images/eventsGraphic.png -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/experience-mountain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/packages/react-learn-card/src/assets/images/experience-mountain.png -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/goals-target.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/packages/react-learn-card/src/assets/images/goals-target.png -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/icon.green.fat-arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/packages/react-learn-card/src/assets/images/icon.green.fat-arrow.png -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/id-purple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/packages/react-learn-card/src/assets/images/id-purple.png -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/id-sleeve.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/packages/react-learn-card/src/assets/images/id-sleeve.png -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/lhplaceholder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/packages/react-learn-card/src/assets/images/lhplaceholder.png -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/medical.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/packages/react-learn-card/src/assets/images/medical.png -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/membership-graphic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/packages/react-learn-card/src/assets/images/membership-graphic.png -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/mountains-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/photoplaceholder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/packages/react-learn-card/src/assets/images/photoplaceholder.png -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/relationships-cats.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/packages/react-learn-card/src/assets/images/relationships-cats.png -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/sample-badge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/packages/react-learn-card/src/assets/images/sample-badge.png -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/skillplaceholder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/packages/react-learn-card/src/assets/images/skillplaceholder.png -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/social-badge-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/packages/react-learn-card/src/assets/images/social-badge-2.png -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/social-badge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/packages/react-learn-card/src/assets/images/social-badge.png -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/social.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/packages/react-learn-card/src/assets/images/social.png -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/stem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/packages/react-learn-card/src/assets/images/stem.png -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/trade.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/packages/react-learn-card/src/assets/images/trade.png -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/user.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/verified-check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/packages/react-learn-card/src/assets/images/verified-check.png -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/walletTrophy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/packages/react-learn-card/src/assets/images/walletTrophy.png -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/walletcurrency.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/packages/react-learn-card/src/assets/images/walletcurrency.webp -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/walletids.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/packages/react-learn-card/src/assets/images/walletids.webp -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/walletjobhistory.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/packages/react-learn-card/src/assets/images/walletjobhistory.webp -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/images/walletskills.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/packages/react-learn-card/src/assets/images/walletskills.webp -------------------------------------------------------------------------------- /packages/react-learn-card/src/assets/styles/base.css: -------------------------------------------------------------------------------- 1 | @import 'tailwindcss/base'; 2 | @import 'tailwindcss/components'; 3 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/AchievementCard/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @file Automatically generated by barrelsby. 3 | */ 4 | 5 | export * from "./AchievementCard"; 6 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/BoostGenericCard/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @file Automatically generated by barrelsby. 3 | */ 4 | 5 | export * from "./BoostGenericCard"; 6 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/BoostSmallCard/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @file Automatically generated by barrelsby. 3 | */ 4 | 5 | export * from "./BoostSmallCard"; 6 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/Button/Button.stories.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Story, Meta } from '@storybook/react'; 3 | 4 | import Button, { ButtonProps } from './Button'; 5 | 6 | export default { 7 | title: 'Button', 8 | component: Button, 9 | argTypes: {}, 10 | } as Meta; 11 | 12 | const Template: Story = args => 18 | ); 19 | }; 20 | 21 | export default Button; 22 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/Button/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @file Automatically generated by barrelsby. 3 | */ 4 | 5 | export * from "./Button"; 6 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/CircleCheckButton/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @file Automatically generated by barrelsby. 3 | */ 4 | 5 | export * from "./CircleCheckButton"; 6 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/CircleIcon/ci new: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/packages/react-learn-card/src/components/CircleIcon/ci new -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/CircleIcon/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @file Automatically generated by barrelsby. 3 | */ 4 | 5 | export * from "./CircleIcon"; 6 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/CourseCard/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @file Automatically generated by barrelsby. 3 | */ 4 | 5 | export * from "./CourseCard"; 6 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/CourseVerticalCard/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @file Automatically generated by barrelsby. 3 | */ 4 | 5 | export * from "./CourseVerticalCard"; 6 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/FlippyCard/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @file Automatically generated by barrelsby. 3 | */ 4 | 5 | export * from "./FlippyCard"; 6 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/GenericCard/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @file Automatically generated by barrelsby. 3 | */ 4 | 5 | export * from "./GenericCard"; 6 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/JobHistoryCard/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @file Automatically generated by barrelsby. 3 | */ 4 | 5 | export * from "./JobHistoryCard"; 6 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/JobListCard/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @file Automatically generated by barrelsby. 3 | */ 4 | 5 | export * from "./JobListCard"; 6 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/LearnCardCreditCardBackFace/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @file Automatically generated by barrelsby. 3 | */ 4 | 5 | export * from "./LearnCardCreditCardBackFace"; 6 | export * from "./types"; 7 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/LearnCardCreditCardFrontFace/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @file Automatically generated by barrelsby. 3 | */ 4 | 5 | export * from "./LearnCardCreditCardFrontFace"; 6 | export * from "./types"; 7 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/LearnPill/LearnPill.stories.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Story, Meta } from '@storybook/react'; 3 | import { LCSubtypes } from '../../types'; 4 | import LearnPill from './LearnPill'; 5 | import { LearnPillProps } from '../../types'; 6 | 7 | export default { 8 | title: 'LearnPill', 9 | component: LearnPill, 10 | argTypes: {}, 11 | } as Meta; 12 | 13 | const Template: Story = args => ; 14 | 15 | export const LearnPillTest = Template.bind({}); 16 | LearnPillTest.args = { 17 | count: 0, 18 | type: LCSubtypes.skill, 19 | className: 'learn-pilled', 20 | }; 21 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/LearnPill/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @file Automatically generated by barrelsby. 3 | */ 4 | 5 | export * from "./LearnPill"; 6 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/Lightbox/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @file Automatically generated by barrelsby. 3 | */ 4 | 5 | export * from "./Lightbox"; 6 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/Loading/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @file Automatically generated by barrelsby. 3 | */ 4 | 5 | export * from "./CircleSpinner"; 6 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/MiniVCThumbnail/ MiniVCThumbnail.css: -------------------------------------------------------------------------------- 1 | .mini-vc-thumbnail-container { 2 | max-width: 250px; 3 | } 4 | 5 | .mini-vc-thumbnail-container::after { 6 | content: ''; 7 | background-color: #fff; 8 | border-top-left-radius: 24px; 9 | border-top-right-radius: 24px; 10 | border-bottom-left-radius: 120px; 11 | border-bottom-right-radius: 120px; 12 | position: absolute; 13 | top: 0; 14 | left: 0; 15 | height: 65%; 16 | width: 100%; 17 | z-index: 1; 18 | } 19 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/MiniVCThumbnail/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @file Automatically generated by barrelsby. 3 | */ 4 | 5 | export * from "./MiniVCThumbnail"; 6 | export * from "./types"; 7 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/Notification/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @file Automatically generated by barrelsby. 3 | */ 4 | 5 | export * from "./Notification"; 6 | export * from "./types"; 7 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/NotificationBoostCard/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @file Automatically generated by barrelsby. 3 | */ 4 | 5 | export * from "./NotificationBoostCard"; 6 | export * from "./types"; 7 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/NotificationUserAcceptedBoostCard/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @file Automatically generated by barrelsby. 3 | */ 4 | 5 | export * from "./NotificationUserAcceptedBoostCard"; 6 | export * from "./types"; 7 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/NotificationUserAcceptedBoostCard/types.ts: -------------------------------------------------------------------------------- 1 | import { UserNotificationTypeEnum } from '../../constants/notifications'; 2 | 3 | export type NotificationUserAcceptedBoostCardProps = { 4 | className?: string; 5 | thumbImage?: string; 6 | customThumbComponent?: React.ReactNode; 7 | notificationType?: UserNotificationTypeEnum.AcceptedBoost; 8 | issueDate?: string; 9 | handleCancelClick?: () => void; 10 | loadingState?: boolean; 11 | title?: string; 12 | isArchived?: boolean; 13 | }; 14 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/NotificationUserCard/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @file Automatically generated by barrelsby. 3 | */ 4 | 5 | export * from "./NotificationUserCard"; 6 | export * from "./types"; 7 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/QRCodeCard/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @file Automatically generated by barrelsby. 3 | */ 4 | 5 | export * from "./QRCodeCard"; 6 | export * from "./types"; 7 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/QRCodeCard/types.ts: -------------------------------------------------------------------------------- 1 | export type QRCodeCardProps = { 2 | /** 3 | * user handle 4 | * @type {string} 5 | */ 6 | userHandle?: string; 7 | /** 8 | * qr code value 9 | * @type {string} 10 | */ 11 | qrCodeValue: string; 12 | /** 13 | * text to display on the card 14 | * @type {React.ReactNode | null} 15 | */ 16 | text?: string; 17 | /** 18 | * custom className 19 | * @type {string} 20 | */ 21 | className?: string; 22 | }; 23 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/RoundedPill/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @file Automatically generated by barrelsby. 3 | */ 4 | 5 | export * from "./RoundedPill"; 6 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/RoundedSquare/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @file Automatically generated by barrelsby. 3 | */ 4 | 5 | export * from "./RoundedSquare"; 6 | export * from "./constants"; 7 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/RoundedSquare/roudnedquarenew: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/packages/react-learn-card/src/components/RoundedSquare/roudnedquarenew -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/SchoolIdCard/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @file Automatically generated by barrelsby. 3 | */ 4 | 5 | export * from "./SchoolIDCard"; 6 | export * from "./types"; 7 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/SkillTabCard/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @file Automatically generated by barrelsby. 3 | */ 4 | 5 | export * from "./SkillTabCard"; 6 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/SkillVerticalCard/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @file Automatically generated by barrelsby. 3 | */ 4 | 5 | export * from "./SkillVerticalCard"; 6 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/SkillsCard/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @file Automatically generated by barrelsby. 3 | */ 4 | 5 | export * from "./SkillsCard"; 6 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/SkillsStatsCard/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @file Automatically generated by barrelsby. 3 | */ 4 | 5 | export * from "./SkillsStatsCard"; 6 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/SmallAchievementCard/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @file Automatically generated by barrelsby. 3 | */ 4 | 5 | export * from "./SmallAchievementCard"; 6 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/VCCard/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @file Automatically generated by barrelsby. 3 | */ 4 | 5 | export * from "./VCCard"; 6 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/VCDisplayBackFace/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @file Automatically generated by barrelsby. 3 | */ 4 | 5 | export * from "./VCDisplayBackFace"; 6 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/VCDisplayCard/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @file Automatically generated by barrelsby. 3 | */ 4 | 5 | export * from "./VCDisplayCard"; 6 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/VCDisplayFrontFace/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @file Automatically generated by barrelsby. 3 | */ 4 | 5 | export * from "./VCDisplayFrontFace"; 6 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/VCThumbnail/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @file Automatically generated by barrelsby. 3 | */ 4 | 5 | export * from "./VCThumbnail"; 6 | export * from "./types"; 7 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/VCVerificationCheck/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @file Automatically generated by barrelsby. 3 | */ 4 | 5 | export * from "./VCVerificationCheck"; 6 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/VCVerificationPill/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @file Automatically generated by barrelsby. 3 | */ 4 | 5 | export * from "./VCVerificationPill"; 6 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/components/svgs/Line.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | type LineProps = { 4 | className?: string; 5 | width?: string; 6 | }; 7 | 8 | const Line: React.FC = ({ className = '', width = '109' }) => { 9 | return ( 10 | 17 | 18 | 19 | ); 20 | }; 21 | 22 | export default Line; 23 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/constants/notifications.ts: -------------------------------------------------------------------------------- 1 | export enum NotificationTypeEnum { 2 | Currency = 'currency', 3 | ID = 'id', 4 | Achievement = 'achievement', 5 | Skill = 'skill', 6 | Job = 'job', 7 | Learning = 'learning', 8 | SocialBadges = 'socialBadge', 9 | } 10 | 11 | export enum UserNotificationTypeEnum { 12 | ConnectionRequest = 'connection', 13 | AcceptedBoost = 'acceptedBoost', 14 | } 15 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/declaration.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.jpeg' { 2 | const value: any; 3 | export default value; 4 | } 5 | 6 | declare module '*.webp' { 7 | const value: any; 8 | export default value; 9 | } 10 | 11 | declare module '*.png' { 12 | const value: any; 13 | export default value; 14 | } 15 | 16 | declare module '*.svg' { 17 | const value: any; 18 | export default value; 19 | } 20 | 21 | declare module 'react-barcode'; 22 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/helpers/string.helpers.ts: -------------------------------------------------------------------------------- 1 | export const truncateWithEllipsis = (str: string, maxLength: number) => { 2 | return str.length > maxLength ? `${str.substring(0, maxLength)}...` : str; 3 | }; 4 | 5 | export const capitalize = (string?: string): string => { 6 | return string ? string[0].toUpperCase() + string.slice(1) : ''; 7 | }; 8 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/helpers/url.helpers.ts: -------------------------------------------------------------------------------- 1 | export const getBaseUrl = (url: string) => { 2 | return url.replace(/(https?:\/\/(www\.)?)/, '').split('/')[0]; 3 | }; 4 | -------------------------------------------------------------------------------- /packages/react-learn-card/src/index.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | export * from './components/index'; 4 | -------------------------------------------------------------------------------- /packages/react-learn-card/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vitest/config'; 2 | import tsconfigPaths from 'vite-tsconfig-paths'; 3 | 4 | export default defineConfig({ 5 | plugins: [tsconfigPaths({ root: '.' }) as any], 6 | test: { 7 | environment: 'happy-dom', 8 | globals: true, 9 | fileParallelism: false, 10 | exclude: [ 11 | '**/node_modules/**', 12 | '**/dist/**', 13 | '**/cypress/**', 14 | '**/.{idea,git,cache,output,temp}/**', 15 | '**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*', 16 | ], 17 | }, 18 | }); 19 | -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - 'docs' 3 | - 'examples/*' 4 | - 'packages/*' 5 | - 'packages/learn-card-network/*' 6 | - 'packages/plugins/*' 7 | - 'services/*' 8 | - 'services/learn-card-network/*' 9 | - 'tests/*' 10 | - 'tools/executors/workspace/*' 11 | -------------------------------------------------------------------------------- /services/learn-card-discord-bot/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log 3 | README.md 4 | .env -------------------------------------------------------------------------------- /services/learn-card-discord-bot/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules* 2 | .env 3 | 4 | dist 5 | -------------------------------------------------------------------------------- /services/learn-card-discord-bot/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM --platform=linux/amd64 node:16 2 | 3 | RUN npm --global install pnpm 4 | RUN npm install pm2 -g 5 | RUN pnpm install --save esbuild 6 | RUN pnpm install --save rollup-plugin-esbuild 7 | 8 | WORKDIR /root/monorepo 9 | COPY ../.. . 10 | # ↑ Copy the whole repository and let pnpm filter what to run 11 | RUN pnpm install --filter "learn-card-discord-bot..." 12 | RUN pnpm build --filter "learn-card-discord-bot..." 13 | RUN pnpm test --if-present --filter "learn-card-discord-bot" 14 | 15 | RUN ls -al -R 16 | 17 | EXPOSE 8080 18 | CMD [ "pnpm", "start" ] -------------------------------------------------------------------------------- /services/learn-card-discord-bot/rollup.config.js: -------------------------------------------------------------------------------- 1 | import json from '@rollup/plugin-json'; 2 | import esbuild from 'rollup-plugin-esbuild'; 3 | 4 | import packageJson from './package.json'; 5 | 6 | export default [ 7 | { 8 | input: ['src/Bot.ts'], 9 | output: [{ file: packageJson.bin, format: 'cjs', banner: '#!/usr/bin/env node' }], 10 | plugins: [json(), esbuild()], 11 | external: ['discord.js'], 12 | }, 13 | ]; 14 | -------------------------------------------------------------------------------- /services/learn-card-discord-bot/src/Command.ts: -------------------------------------------------------------------------------- 1 | import { BaseCommandInteraction, ChatInputApplicationCommandData, Client } from 'discord.js'; 2 | 3 | export interface Command extends ChatInputApplicationCommandData { 4 | run: (client: Client, interaction: BaseCommandInteraction) => void; 5 | } 6 | -------------------------------------------------------------------------------- /services/learn-card-discord-bot/src/accesslayer/credentialtemplates/create/index.ts: -------------------------------------------------------------------------------- 1 | import { randomUUID } from 'crypto'; 2 | import { CredentialTemplate } from 'src/types/index'; 3 | import { Context } from 'src/types/index'; 4 | 5 | export const PREFIX = 'credentialtemplate:'; 6 | 7 | export const createCredentialTemplate = async ( 8 | template: CredentialTemplate, 9 | context: Context, 10 | scope?: string 11 | ) => { 12 | if (!template._id) template._id = randomUUID(); 13 | return context.cache.set( 14 | `${PREFIX}${scope || 'default'}:${template._id}`, 15 | JSON.stringify(template) 16 | ); 17 | }; 18 | -------------------------------------------------------------------------------- /services/learn-card-discord-bot/src/accesslayer/credentialtemplates/update/index.ts: -------------------------------------------------------------------------------- 1 | update; 2 | -------------------------------------------------------------------------------- /services/learn-card-discord-bot/src/accesslayer/issuers/create/index.ts: -------------------------------------------------------------------------------- 1 | import { randomUUID } from 'crypto'; 2 | import { IssuerConfig } from 'src/types/index'; 3 | import { Context } from 'src/types/index'; 4 | 5 | export const PREFIX = 'issuer:'; 6 | 7 | export const createIssuerConfig = async ( 8 | issuerConfig: IssuerConfig, 9 | context: Context, 10 | scope?: string 11 | ) => { 12 | if (!issuerConfig._id) issuerConfig._id = randomUUID(); 13 | return context.cache.set( 14 | `${PREFIX}${scope || 'default'}:${issuerConfig._id}`, 15 | JSON.stringify(issuerConfig) 16 | ); 17 | }; 18 | -------------------------------------------------------------------------------- /services/learn-card-discord-bot/src/accesslayer/pendingvcs/create/index.ts: -------------------------------------------------------------------------------- 1 | import { randomUUID } from 'crypto'; 2 | import { PendingVc } from 'src/types/index'; 3 | import { Context } from 'src/types/index'; 4 | 5 | export const PREFIX = 'pendingvc:'; 6 | 7 | export const createPendingVc = async (pendingVc: PendingVc, context: Context, scope?: string) => { 8 | if (!pendingVc._id) pendingVc._id = randomUUID(); 9 | return context.cache.set( 10 | `${PREFIX}${scope || 'default'}:${pendingVc._id}`, 11 | JSON.stringify(pendingVc) 12 | ); 13 | }; 14 | -------------------------------------------------------------------------------- /services/learn-card-discord-bot/src/accesslayer/pendingvcs/delete/index.ts: -------------------------------------------------------------------------------- 1 | import { PREFIX } from '../create/index'; 2 | import { Context } from 'src/types/index'; 3 | 4 | export const deletePendingVcs = async ( 5 | context: Context, 6 | scope?: string 7 | ): Promise => { 8 | const pendingVcKeys = await context.cache.keys(`${PREFIX}${scope ? scope + ':' : ''}*`); 9 | if (!pendingVcKeys) return 0; 10 | return context.cache.delete(pendingVcKeys); 11 | }; 12 | -------------------------------------------------------------------------------- /services/learn-card-discord-bot/src/listeners/messageCreate.ts: -------------------------------------------------------------------------------- 1 | import { Message } from 'discord.js'; 2 | import { Context } from 'src/types/index'; 3 | 4 | export default ({ client }: Context): void => { 5 | console.log('Initiating messageCreate listener...'); 6 | client.on('messageCreate', async (message: Message) => { 7 | if (message.content === 'ping') { 8 | message.reply({ 9 | content: 'pong', 10 | }); 11 | } 12 | }); 13 | }; 14 | -------------------------------------------------------------------------------- /services/learn-card-discord-bot/src/listeners/ready.ts: -------------------------------------------------------------------------------- 1 | import { Client } from 'discord.js'; 2 | import { Commands } from '../Commands'; 3 | import { Tally, constructTallyMessage } from '../commands/Tally'; 4 | import { Context } from 'src/types/index'; 5 | 6 | export default async ({ client }: Context): Promise => { 7 | client.on('ready', async () => { 8 | if (!client.user || !client.application) { 9 | return; 10 | } 11 | await client.application.commands.set(Commands); 12 | console.log(`${client.user.username} is online`); 13 | }); 14 | }; 15 | -------------------------------------------------------------------------------- /services/learn-card-discord-bot/src/wallet/learncard.ts: -------------------------------------------------------------------------------- 1 | import crypto from 'crypto'; 2 | import { initLearnCard, LearnCardFromSeed } from '@learncard/init'; 3 | 4 | export const getWallet = async (seed: string): Promise => { 5 | return initLearnCard({ seed }); 6 | }; 7 | 8 | export const generateRandomSeed = () => crypto.randomBytes(32).toString('hex'); 9 | -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/.env.example: -------------------------------------------------------------------------------- 1 | SEED=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 2 | NEO4J_URI=neo4j+s://example.com 3 | NEO4J_USERNAME=neo4j 4 | NEO4J_PASSWORD=asdfasdfasdfasdfasdfasdfasdfasdfasdf 5 | -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /dist 13 | 14 | # misc 15 | .DS_Store 16 | .env 17 | .env.local 18 | .env.development.local 19 | .env.test.local 20 | .env.production.local 21 | .vscode 22 | .idea 23 | 24 | npm-debug.log* 25 | .pnpm-debug.log 26 | yarn-debug.log* 27 | yarn-error.log* 28 | 29 | # Optional eslint cache 30 | .eslintcache 31 | 32 | /.serverless 33 | /.esbuild 34 | 35 | # Sentry Auth Token 36 | .env.sentry-build-plugin 37 | -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/esbuildPlugins.cjs: -------------------------------------------------------------------------------- 1 | const { sentryEsbuildPlugin } = require('@sentry/esbuild-plugin'); 2 | 3 | module.exports = [ 4 | sentryEsbuildPlugin({ 5 | authToken: process.env.SENTRY_AUTH_TOKEN, 6 | org: process.env.SENTRY_ORG, 7 | project: process.env.SENTRY_PROJECT, 8 | }), 9 | ]; 10 | -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/jest-setup.ts: -------------------------------------------------------------------------------- 1 | import { TextEncoder, TextDecoder } from 'util'; 2 | 3 | global.TextEncoder = TextEncoder; 4 | global.TextDecoder = TextDecoder; 5 | -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/jest-testcontainers-config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | neo4j: { 3 | image: 'neo4j', 4 | tag: 'latest', 5 | ports: [7474, 7687], 6 | env: { 7 | NEO4J_AUTH: 'none', 8 | }, 9 | }, 10 | }; 11 | -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/src/accesslayer/auth-grant/delete.ts: -------------------------------------------------------------------------------- 1 | import { AuthGrant } from '@models'; 2 | 3 | export const deleteAuthGrant = async (authGrantId: string): Promise => { 4 | await AuthGrant.delete({ detach: true, where: { id: authGrantId } }); 5 | }; 6 | -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/src/accesslayer/boost/delete.ts: -------------------------------------------------------------------------------- 1 | import { BoostInstance } from '@models'; 2 | 3 | export const deleteBoost = async (boost: BoostInstance): Promise => { 4 | await boost.delete({ detach: true }); 5 | }; 6 | -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/src/accesslayer/claim-hook/create.ts: -------------------------------------------------------------------------------- 1 | import { v4 as uuid } from 'uuid'; 2 | 3 | import { ClaimHook as ClaimHookType } from 'types/claim-hook'; 4 | 5 | import { ClaimHook } from '@models'; 6 | 7 | export const createClaimHook = async ( 8 | claimHook: Omit 9 | ): Promise => { 10 | const id = uuid(); 11 | 12 | return ( 13 | await ClaimHook.createOne({ 14 | id, 15 | ...claimHook, 16 | createdAt: new Date().toISOString(), 17 | updatedAt: new Date().toISOString(), 18 | }) 19 | ).dataValues; 20 | }; 21 | -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/src/accesslayer/claim-hook/delete.ts: -------------------------------------------------------------------------------- 1 | import { ClaimHook } from '@models'; 2 | import { ClaimHook as ClaimHookType } from 'types/claim-hook'; 3 | 4 | export const deleteClaimHook = async (claimHook: ClaimHookType): Promise => { 5 | await ClaimHook.delete({ where: { id: claimHook.id }, detach: true }); 6 | }; 7 | -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/src/accesslayer/claim-hook/relationships/read.ts: -------------------------------------------------------------------------------- 1 | import { ClaimHook, BoostInstance } from '@models'; 2 | import { ClaimHook as ClaimHookType } from 'types/claim-hook'; 3 | 4 | export const getClaimBoostForClaimHook = async ( 5 | claimHook: ClaimHookType 6 | ): Promise => { 7 | const result = await ClaimHook.findRelationships({ 8 | alias: 'hookFor', 9 | limit: 1, 10 | where: { source: { id: claimHook.id } }, 11 | }); 12 | 13 | return result[0]?.target; 14 | }; 15 | -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/src/accesslayer/consentflowcontract/delete.ts: -------------------------------------------------------------------------------- 1 | import { ConsentFlowContract } from '@models'; 2 | import { DbContractType } from 'types/consentflowcontract'; 3 | 4 | export const deleteConsentFlowContract = async (contract: DbContractType): Promise => { 5 | return ConsentFlowContract.delete({ where: { id: contract.id }, detach: true }); 6 | }; 7 | -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/src/accesslayer/consentflowcontract/relationships/delete.ts: -------------------------------------------------------------------------------- 1 | import { ConsentFlowTerms } from '@models'; 2 | 3 | export const deleteTermsById = async (id: string): Promise => { 4 | return ConsentFlowTerms.delete({ where: { id }, detach: true }); 5 | }; 6 | -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/src/accesslayer/credential/create.ts: -------------------------------------------------------------------------------- 1 | import { UnsignedVC, VC, JWE } from '@learncard/types'; 2 | import { v4 as uuid } from 'uuid'; 3 | 4 | import { Credential, CredentialInstance } from '@models'; 5 | 6 | export const storeCredential = async ( 7 | credential: UnsignedVC | VC | JWE 8 | ): Promise => { 9 | const id = uuid(); 10 | 11 | return Credential.createOne({ id, credential: JSON.stringify(credential) }); 12 | }; 13 | -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/src/accesslayer/credential/delete.ts: -------------------------------------------------------------------------------- 1 | import { CredentialInstance } from '@models'; 2 | 3 | export const deleteCredential = async (credential: CredentialInstance): Promise => { 4 | await credential.delete({ detach: true }); 5 | }; 6 | -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/src/accesslayer/did-metadata/delete.ts: -------------------------------------------------------------------------------- 1 | import { DidMetadata } from '@models'; 2 | import { deleteDidDocForProfile } from '@cache/did-docs'; 3 | import { getProfilesAssociatedWithMetadata } from './relationships/read'; 4 | 5 | export const deleteDidMetadata = async (id: string): Promise => { 6 | const profiles = await getProfilesAssociatedWithMetadata(id); 7 | 8 | await Promise.all([ 9 | DidMetadata.delete({ detach: true, where: { id } }), 10 | ...profiles.map(profile => deleteDidDocForProfile(profile.profileId)), 11 | ]); 12 | }; 13 | -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/src/accesslayer/presentation/create.ts: -------------------------------------------------------------------------------- 1 | import { VP, JWE } from '@learncard/types'; 2 | import { v4 as uuid } from 'uuid'; 3 | 4 | import { Presentation, PresentationInstance } from '@models'; 5 | 6 | export const storePresentation = async (presentation: VP | JWE): Promise => { 7 | const id = uuid(); 8 | 9 | return Presentation.createOne({ id, presentation: JSON.stringify(presentation) }); 10 | }; 11 | -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/src/accesslayer/presentation/delete.ts: -------------------------------------------------------------------------------- 1 | import { PresentationInstance } from '@models'; 2 | 3 | export const deletePresentation = async (presentation: PresentationInstance): Promise => { 4 | await presentation.delete({ detach: true }); 5 | }; 6 | -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/src/accesslayer/profile-manager/create.ts: -------------------------------------------------------------------------------- 1 | import { v4 as uuid } from 'uuid'; 2 | 3 | import { ProfileManager, ProfileManagerInstance } from '@models'; 4 | import { ProfileManagerType } from 'types/profile-manager'; 5 | 6 | export const createProfileManager = async ( 7 | input: Omit 8 | ): Promise => { 9 | const id = uuid(); 10 | 11 | return ProfileManager.createOne({ ...input, id, created: new Date().toISOString() }); 12 | }; 13 | -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/src/accesslayer/profile-manager/read.ts: -------------------------------------------------------------------------------- 1 | import { ProfileManager } from '@models'; 2 | import { ProfileManagerType } from 'types/profile-manager'; 3 | 4 | export const getProfileManagerById = async (id: string): Promise => { 5 | return await ProfileManager.findOne({ where: { id }, plain: true }); 6 | }; 7 | -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/src/accesslayer/profile/delete.ts: -------------------------------------------------------------------------------- 1 | import { Profile } from '@models'; 2 | import { ProfileType } from 'types/profile'; 3 | 4 | export const deleteProfile = async (profile: ProfileType): Promise => { 5 | await Profile.delete({ detach: true, where: { profileId: profile.profileId } }); 6 | }; 7 | -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/src/accesslayer/profile/relationships/create.ts: -------------------------------------------------------------------------------- 1 | import { Profile } from '@models'; 2 | import { ProfileType } from 'types/profile'; 3 | 4 | export const createProfileManagedByRelationship = async ( 5 | manager: ProfileType, 6 | managee: ProfileType 7 | ): Promise => { 8 | return Boolean( 9 | await Profile.relateTo({ 10 | alias: 'managedBy', 11 | where: { 12 | source: { profileId: managee.profileId }, 13 | target: { profileId: manager.profileId }, 14 | }, 15 | }) 16 | ); 17 | }; 18 | -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/src/accesslayer/role/relationships/create.ts: -------------------------------------------------------------------------------- 1 | import { BoostPermissions } from '@learncard/types'; 2 | import { BoostInstance } from '@models'; 3 | import { createRole } from '../create'; 4 | 5 | export const addClaimPermissionsForBoost = async ( 6 | boost: BoostInstance, 7 | permissions: BoostPermissions 8 | ): Promise => { 9 | const role = await createRole(permissions); 10 | 11 | await boost.relateTo({ alias: 'claimRole', where: { id: role.id } }); 12 | }; 13 | -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/src/accesslayer/signing-authority/create.ts: -------------------------------------------------------------------------------- 1 | import { SigningAuthority, SigningAuthorityInstance } from '@models'; 2 | import { getSigningAuthorityByEndpoint } from './read'; 3 | 4 | export const createSigningAuthority = async ( 5 | endpoint: string 6 | ): Promise => { 7 | return SigningAuthority.createOne({ endpoint }); 8 | }; 9 | 10 | export const upsertSigningAuthority = async ( 11 | endpoint: string 12 | ): Promise => { 13 | const existing = await getSigningAuthorityByEndpoint(endpoint); 14 | return existing ? existing : SigningAuthority.createOne({ endpoint }); 15 | }; 16 | -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/src/accesslayer/signing-authority/delete.ts: -------------------------------------------------------------------------------- 1 | import { SigningAuthorityInstance } from '@models'; 2 | 3 | export const deleteSigningAuthority = async ( 4 | signingAuthority: SigningAuthorityInstance 5 | ): Promise => { 6 | await signingAuthority.delete({ detach: true }); 7 | }; 8 | -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/src/accesslayer/signing-authority/read.ts: -------------------------------------------------------------------------------- 1 | import { SigningAuthority, SigningAuthorityInstance } from '@models'; 2 | 3 | export const getSigningAuthorityByEndpoint = async ( 4 | endpoint: string 5 | ): Promise => { 6 | return SigningAuthority.findOne({ where: { endpoint } }); 7 | }; 8 | -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/src/constants/roles.ts: -------------------------------------------------------------------------------- 1 | export const CREATOR_ROLE_ID = '__creator__'; 2 | export const ADMIN_ROLE_ID = '__admin__'; 3 | export const EMPTY_ROLE_ID = '__empty__'; 4 | -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/src/helpers/challenges.helpers.ts: -------------------------------------------------------------------------------- 1 | let currentChallenge = 0; 2 | 3 | export const getChallenges = (amount: number): string[] => { 4 | if (amount > 100) throw new Error('Cannot request more than 100 challenges at a time!'); 5 | 6 | const challenges = Array(amount) 7 | .fill(currentChallenge) 8 | .map((challenge, index) => (challenge + index).toString()); 9 | 10 | currentChallenge = (currentChallenge + amount) % 1_000_000_000; 11 | 12 | return challenges; 13 | }; 14 | -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/src/helpers/profile.helpers.ts: -------------------------------------------------------------------------------- 1 | export const transformProfileId = (rawInput: string): string => 2 | rawInput.toLowerCase().replace(':', '%3A'); 3 | -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/src/helpers/types.helpers.ts: -------------------------------------------------------------------------------- 1 | import Express from 'express'; 2 | 3 | export interface TypedRequest< 4 | Body extends Record = {}, 5 | Query extends Record = {}, 6 | Params extends Record = {} 7 | > extends Express.Request { 8 | body: Body; 9 | query: Query; 10 | params: Params; 11 | } 12 | -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/src/index.ts: -------------------------------------------------------------------------------- 1 | export type { AppRouter } from './app'; 2 | export type { Context } from '@routes'; 3 | 4 | export { appRouter as mainApp } from './app'; 5 | export { app as didApp } from './dids'; 6 | export { app as swaggerApp } from './openapi'; 7 | -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/src/instance.ts: -------------------------------------------------------------------------------- 1 | import dotenv from 'dotenv'; 2 | import { Neogma, QueryBuilder } from 'neogma'; 3 | 4 | dotenv.config(); 5 | 6 | const uri = process.env.NEO4J_URI; 7 | const username = process.env.NEO4J_USERNAME; 8 | const password = process.env.NEO4J_PASSWORD; 9 | 10 | if (!uri) throw new Error('Whoops! No URI found'); 11 | if (!username) throw new Error('Whoops! No Username found'); 12 | if (!password) throw new Error('Whoops! No Password found'); 13 | 14 | export const neogma = new Neogma({ url: uri, username, password }); 15 | 16 | QueryBuilder.queryRunner = neogma.queryRunner; 17 | 18 | export default neogma; 19 | -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/src/swagger-ui/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/services/learn-card-network/brain-service/src/swagger-ui/favicon-16x16.png -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/src/swagger-ui/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/services/learn-card-network/brain-service/src/swagger-ui/favicon-32x32.png -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/src/swagger-ui/index.css: -------------------------------------------------------------------------------- 1 | html { 2 | box-sizing: border-box; 3 | overflow: -moz-scrollbars-vertical; 4 | overflow-y: scroll; 5 | } 6 | 7 | *, 8 | *:before, 9 | *:after { 10 | box-sizing: inherit; 11 | } 12 | 13 | body { 14 | margin: 0; 15 | background: #fafafa; 16 | } 17 | -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/src/swagger-ui/swagger-initializer.js: -------------------------------------------------------------------------------- 1 | window.onload = function () { 2 | // 3 | 4 | // the following lines will be replaced by docker/configurator, when it runs in a docker-container 5 | window.ui = SwaggerUIBundle({ 6 | url: window.location.origin + '/docs/openapi.json', 7 | dom_id: '#swagger-ui', 8 | deepLinking: true, 9 | presets: [SwaggerUIBundle.presets.apis, SwaggerUIStandalonePreset], 10 | plugins: [SwaggerUIBundle.plugins.DownloadUrl], 11 | layout: 'StandaloneLayout', 12 | }); 13 | 14 | // 15 | }; 16 | -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/src/types/claim-hook.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | import { ClaimHookTypeValidator } from '@learncard/types'; 3 | 4 | export const ClaimHookValidator = z.object({ 5 | id: z.string(), 6 | type: ClaimHookTypeValidator, 7 | createdAt: z.string(), 8 | updatedAt: z.string(), 9 | }); 10 | export type ClaimHook = z.infer; 11 | -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/src/types/credential.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | export const CredentialValidator = z.object({ id: z.string(), credential: z.string() }); 4 | export type CredentialType = z.infer; 5 | -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/src/types/did-metadata.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | import { DidDocumentValidator } from '@learncard/types'; 3 | 4 | export const DidMetadataValidator = DidDocumentValidator.partial().extend({ id: z.string() }); 5 | export type DidMetadataType = z.infer; 6 | 7 | export const FlatDidMetadataValidator = z.object({ id: z.string() }).catchall(z.any()); 8 | export type FlatDidMetadataType = z.infer; 9 | -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/src/types/helpers.ts: -------------------------------------------------------------------------------- 1 | export type DeepPartial = T extends object 2 | ? { 3 | [P in keyof T]?: DeepPartial; 4 | } 5 | : T; 6 | -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/src/types/presentation.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | export const PresentationValidator = z.object({ id: z.string(), presentation: z.string() }); 4 | export type PresentationType = z.infer; 5 | -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/src/types/profile-manager.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | import { LCNProfileManagerValidator } from '@learncard/types'; 3 | 4 | export const ProfileManagerValidator = LCNProfileManagerValidator; 5 | export type ProfileManagerType = z.infer; 6 | -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/src/types/role.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | import { BoostPermissionsValidator } from '@learncard/types'; 3 | 4 | export const RoleValidator = BoostPermissionsValidator.extend({ id: z.string() }); 5 | export type Role = z.infer; 6 | -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/test-setup.ts: -------------------------------------------------------------------------------- 1 | import { Neo4jContainer } from '@testcontainers/neo4j'; 2 | 3 | export default async function setup({ provide }) { 4 | const container = await new Neo4jContainer('neo4j:5').withReuse().start(); 5 | 6 | provide('neo4j-uri', container.getBoltUri()); 7 | provide('neo4j-password', container.getPassword()); 8 | 9 | return () => container?.stop?.(); 10 | } 11 | -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/test/helpers/mock-instance.ts: -------------------------------------------------------------------------------- 1 | declare module 'vitest' { 2 | export interface ProvidedContext { 3 | 'neo4j-uri': string; 4 | 'neo4j-password': string; 5 | } 6 | } 7 | 8 | import { Neogma, QueryBuilder } from 'neogma'; 9 | import { inject } from 'vitest'; 10 | 11 | const uri = inject('neo4j-uri'); 12 | const username = 'neo4j'; 13 | const password = inject('neo4j-password'); 14 | 15 | export const neogma = new Neogma({ url: uri, username, password }); 16 | 17 | QueryBuilder.queryRunner = neogma.queryRunner; 18 | 19 | export default neogma; 20 | -------------------------------------------------------------------------------- /services/learn-card-network/brain-service/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "resolveJsonModule": false, 5 | "rootDir": "src" 6 | }, 7 | "exclude": ["./test/**/*"] 8 | } 9 | -------------------------------------------------------------------------------- /services/learn-card-network/learn-cloud-service/.env.example: -------------------------------------------------------------------------------- 1 | LEARN_CLOUD_SEED=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 2 | LEARN_CLOUD_MONGO_URI=mongodb+srv://example.com 3 | LEARN_CLOUD_MONGO_DB_NAME=learncloud 4 | -------------------------------------------------------------------------------- /services/learn-card-network/learn-cloud-service/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /dist 13 | 14 | # misc 15 | .DS_Store 16 | .env 17 | .env.local 18 | .env.development.local 19 | .env.test.local 20 | .env.production.local 21 | .vscode 22 | .idea 23 | 24 | npm-debug.log* 25 | .pnpm-debug.log 26 | yarn-debug.log* 27 | yarn-error.log* 28 | 29 | # Optional eslint cache 30 | .eslintcache 31 | 32 | /.serverless 33 | /.esbuild 34 | -------------------------------------------------------------------------------- /services/learn-card-network/learn-cloud-service/.nvmrc: -------------------------------------------------------------------------------- 1 | v20.10.0 2 | -------------------------------------------------------------------------------- /services/learn-card-network/learn-cloud-service/esbuildPlugins.cjs: -------------------------------------------------------------------------------- 1 | const { sentryEsbuildPlugin } = require('@sentry/esbuild-plugin'); 2 | 3 | module.exports = [ 4 | sentryEsbuildPlugin({ 5 | authToken: process.env.SENTRY_AUTH_TOKEN, 6 | org: process.env.SENTRY_ORG, 7 | project: process.env.SENTRY_PROJECT, 8 | }), 9 | ]; 10 | -------------------------------------------------------------------------------- /services/learn-card-network/learn-cloud-service/jest-async-setup.ts: -------------------------------------------------------------------------------- 1 | import { setup } from 'jest-dev-server'; 2 | 3 | export default async () => { 4 | globalThis.servers = await setup({ command: 'pnpm start', launchTimeout: 50000, port: 3000 }); 5 | }; 6 | -------------------------------------------------------------------------------- /services/learn-card-network/learn-cloud-service/jest-mongodb-config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | mongodbMemoryServerOptions: { 3 | binary: { 4 | version: '5.1.0', 5 | skipMD5: true, 6 | }, 7 | instance: {}, 8 | autoStart: false, 9 | }, 10 | }; 11 | -------------------------------------------------------------------------------- /services/learn-card-network/learn-cloud-service/jest-teardown.ts: -------------------------------------------------------------------------------- 1 | import { teardown } from 'jest-dev-server'; 2 | 3 | export default async () => { 4 | teardown(await globalThis.servers); 5 | }; 6 | -------------------------------------------------------------------------------- /services/learn-card-network/learn-cloud-service/src/accesslayer/credential/delete.ts: -------------------------------------------------------------------------------- 1 | import { Credentials } from '.'; 2 | import { ObjectId } from 'mongodb'; 3 | 4 | export const deleteCredentialById = async (_id: string): Promise => { 5 | try { 6 | return (await Credentials.deleteOne({ _id: new ObjectId(_id) })).deletedCount; 7 | } catch (e) { 8 | console.error(e); 9 | return false; 10 | } 11 | }; 12 | -------------------------------------------------------------------------------- /services/learn-card-network/learn-cloud-service/src/accesslayer/credential/index.ts: -------------------------------------------------------------------------------- 1 | import mongodb from '@mongo'; 2 | 3 | import { CREDENTIAL_COLLECTION, MongoCredentialType } from '@models'; 4 | 5 | export const getCredentialCollection = () => { 6 | return mongodb.collection(CREDENTIAL_COLLECTION); 7 | }; 8 | 9 | export const Credentials = getCredentialCollection(); 10 | -------------------------------------------------------------------------------- /services/learn-card-network/learn-cloud-service/src/accesslayer/custom-document/index.ts: -------------------------------------------------------------------------------- 1 | import mongodb from '@mongo'; 2 | 3 | import { CUSTOM_DOCUMENT_COLLECTION, MongoCustomDocumentType } from '@models'; 4 | 5 | export const getCustomDocumentCollection = () => { 6 | return mongodb.collection(CUSTOM_DOCUMENT_COLLECTION); 7 | }; 8 | 9 | export const CustomDocuments = getCustomDocumentCollection(); 10 | 11 | CustomDocuments.createIndex({ did: 1 }); 12 | -------------------------------------------------------------------------------- /services/learn-card-network/learn-cloud-service/src/accesslayer/user/delete.ts: -------------------------------------------------------------------------------- 1 | import { ClientSession } from 'mongodb'; 2 | 3 | import { deleteCachedUsersForDid } from '@cache/user'; 4 | import { Users } from '.'; 5 | 6 | export const deleteUserByDid = async ( 7 | did: string, 8 | session?: ClientSession 9 | ): Promise => { 10 | try { 11 | await deleteCachedUsersForDid(did); 12 | 13 | return (await Users.deleteOne({ did }, { session })).deletedCount; 14 | } catch (e) { 15 | console.error(e); 16 | return false; 17 | } 18 | }; 19 | -------------------------------------------------------------------------------- /services/learn-card-network/learn-cloud-service/src/accesslayer/user/index.ts: -------------------------------------------------------------------------------- 1 | import mongodb from '@mongo'; 2 | 3 | import { USER_COLLECTION, MongoUserType } from '@models'; 4 | 5 | export const getUserCollection = () => { 6 | return mongodb.collection(USER_COLLECTION); 7 | }; 8 | 9 | export const Users = getUserCollection(); 10 | 11 | Users.createIndex({ did: 1 }, { unique: true }); 12 | Users.createIndex({ associatedDids: 1 }); 13 | Users.createIndex({ did: 1, associatedDids: 1, _id: 1 }); 14 | Users.createIndex({ dids: 1 }); 15 | -------------------------------------------------------------------------------- /services/learn-card-network/learn-cloud-service/src/cache/mutex.ts: -------------------------------------------------------------------------------- 1 | import { lock as _lock } from 'simple-redis-mutex'; 2 | import cache from '@cache'; 3 | 4 | export const lock = (resource: string) => 5 | _lock(cache.redis ?? cache.node, resource, { timeoutMillis: 10_000 }); 6 | -------------------------------------------------------------------------------- /services/learn-card-network/learn-cloud-service/src/constants/limits.ts: -------------------------------------------------------------------------------- 1 | /** Max amount that can be stored in Custom Storage (in bytes) */ 2 | export const MAX_CUSTOM_STORAGE_SIZE = 10_485_760; 3 | -------------------------------------------------------------------------------- /services/learn-card-network/learn-cloud-service/src/constants/xapi.ts: -------------------------------------------------------------------------------- 1 | export const XAPI_ENDPOINT = process.env.XAPI_ENDPOINT; 2 | -------------------------------------------------------------------------------- /services/learn-card-network/learn-cloud-service/src/helpers/challenges.helpers.ts: -------------------------------------------------------------------------------- 1 | let currentChallenge = 0; 2 | 3 | export const getChallenges = (amount: number): string[] => { 4 | if (amount > 100) throw new Error('Cannot request more than 100 challenges at a time!'); 5 | 6 | const challenges = Array(amount) 7 | .fill(currentChallenge) 8 | .map((challenge, index) => (challenge + index).toString()); 9 | 10 | currentChallenge = (currentChallenge + amount) % 1_000_000_000; 11 | 12 | return challenges; 13 | }; 14 | -------------------------------------------------------------------------------- /services/learn-card-network/learn-cloud-service/src/helpers/performance.helpers.ts: -------------------------------------------------------------------------------- 1 | /** Useful for debugging how long a function takes! This probably shouldn't make it to prod tho */ 2 | export const time = async (callback: () => Promise, message: string): Promise => { 3 | const start = performance.now(); 4 | 5 | const returnValue = await callback(); 6 | 7 | console.log(message, performance.now() - start, 'ms'); 8 | 9 | return returnValue; 10 | }; 11 | -------------------------------------------------------------------------------- /services/learn-card-network/learn-cloud-service/src/helpers/test.helpers.ts: -------------------------------------------------------------------------------- 1 | export const isTest = process.env.NODE_ENV === 'test'; 2 | -------------------------------------------------------------------------------- /services/learn-card-network/learn-cloud-service/src/helpers/types.helpers.ts: -------------------------------------------------------------------------------- 1 | import Express from 'express'; 2 | 3 | export interface TypedRequest< 4 | Body extends Record = {}, 5 | Query extends Record = {}, 6 | Params extends Record = {} 7 | > extends Express.Request { 8 | body: Body; 9 | query: Query; 10 | params: Params; 11 | } 12 | -------------------------------------------------------------------------------- /services/learn-card-network/learn-cloud-service/src/index.ts: -------------------------------------------------------------------------------- 1 | export type { Filter, UpdateFilter } from 'mongodb'; 2 | 3 | export type { AppRouter } from './app'; 4 | 5 | export { appRouter as mainApp } from './app'; 6 | export { app as didApp } from './dids'; 7 | export { app as swaggerApp } from './openapi'; 8 | 9 | export type { MongoCustomDocumentType } from '@models'; 10 | -------------------------------------------------------------------------------- /services/learn-card-network/learn-cloud-service/src/models/Credential.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | import { JWEValidator } from '@learncard/types'; 4 | 5 | export const CREDENTIAL_COLLECTION = 'credential'; 6 | 7 | export const MongoCredentialValidator = z.object({ jwe: JWEValidator }); 8 | 9 | export type MongoCredentialType = z.infer; 10 | -------------------------------------------------------------------------------- /services/learn-card-network/learn-cloud-service/src/models/CredentialRecord.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | import { EncryptedCredentialRecordValidator } from '@learncard/types'; 4 | 5 | export const CREDENTIAL_RECORD_COLLECTION = 'credential-record'; 6 | 7 | export const MongoCredentialRecordValidator = EncryptedCredentialRecordValidator.extend({ 8 | did: z.string(), 9 | cursor: z.string(), 10 | created: z.date(), 11 | modified: z.date(), 12 | }); 13 | export type MongoCredentialRecordType = z.infer; 14 | -------------------------------------------------------------------------------- /services/learn-card-network/learn-cloud-service/src/models/CustomDocument.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | import { EncryptedRecordValidator } from '@learncard/types'; 3 | 4 | export const CUSTOM_DOCUMENT_COLLECTION = 'custom-document'; 5 | 6 | export const MongoCustomDocumentValidator = EncryptedRecordValidator.extend({ 7 | did: z.string(), 8 | cursor: z.string(), 9 | created: z.date(), 10 | modified: z.date(), 11 | }); 12 | 13 | export type MongoCustomDocumentType = z.infer; 14 | -------------------------------------------------------------------------------- /services/learn-card-network/learn-cloud-service/src/models/User.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | export const USER_COLLECTION = 'user'; 4 | 5 | export const MongoUserValidator = z.object({ 6 | /** Primary Did */ 7 | did: z.string(), 8 | 9 | /** Secondary Dids */ 10 | associatedDids: z.string().array(), 11 | 12 | /** 13 | * [Primary Did, ...Secondary Dids] 14 | * 15 | * (We are storing duplicate state for read performance!) 16 | */ 17 | dids: z.string().array(), 18 | }); 19 | export type MongoUserType = z.infer; 20 | -------------------------------------------------------------------------------- /services/learn-card-network/learn-cloud-service/src/models/index.ts: -------------------------------------------------------------------------------- 1 | export * from './Credential'; 2 | export * from './CredentialRecord'; 3 | export * from './CustomDocument'; 4 | export * from './User'; 5 | -------------------------------------------------------------------------------- /services/learn-card-network/learn-cloud-service/src/swagger-ui/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/services/learn-card-network/learn-cloud-service/src/swagger-ui/favicon-16x16.png -------------------------------------------------------------------------------- /services/learn-card-network/learn-cloud-service/src/swagger-ui/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/services/learn-card-network/learn-cloud-service/src/swagger-ui/favicon-32x32.png -------------------------------------------------------------------------------- /services/learn-card-network/learn-cloud-service/src/swagger-ui/index.css: -------------------------------------------------------------------------------- 1 | html { 2 | box-sizing: border-box; 3 | overflow: -moz-scrollbars-vertical; 4 | overflow-y: scroll; 5 | } 6 | 7 | *, 8 | *:before, 9 | *:after { 10 | box-sizing: inherit; 11 | } 12 | 13 | body { 14 | margin: 0; 15 | background: #fafafa; 16 | } 17 | -------------------------------------------------------------------------------- /services/learn-card-network/learn-cloud-service/src/swagger-ui/swagger-initializer.js: -------------------------------------------------------------------------------- 1 | window.onload = function () { 2 | // 3 | 4 | // the following lines will be replaced by docker/configurator, when it runs in a docker-container 5 | window.ui = SwaggerUIBundle({ 6 | url: window.location.origin + '/docs/openapi.json', 7 | dom_id: '#swagger-ui', 8 | deepLinking: true, 9 | presets: [SwaggerUIBundle.presets.apis, SwaggerUIStandalonePreset], 10 | plugins: [SwaggerUIBundle.plugins.DownloadUrl], 11 | layout: 'StandaloneLayout', 12 | }); 13 | 14 | // 15 | }; 16 | -------------------------------------------------------------------------------- /services/learn-card-network/learn-cloud-service/src/types/mongo.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | export const PaginationOptionsValidator = z.object({ 4 | limit: z.number(), 5 | cursor: z.string().optional(), 6 | }); 7 | export type PaginationOptionsType = z.infer; 8 | 9 | export const PaginationResponseValidator = z.object({ 10 | cursor: z.string().optional(), 11 | hasMore: z.boolean(), 12 | }); 13 | export type PaginationResponseType = z.infer; 14 | -------------------------------------------------------------------------------- /services/learn-card-network/learn-cloud-service/src/types/vp.ts: -------------------------------------------------------------------------------- 1 | import type { UnsignedVP } from '@learncard/types'; 2 | 3 | export type DidAuthVP = { 4 | iss: string; 5 | vp: UnsignedVP; 6 | nonce?: string; 7 | }; 8 | -------------------------------------------------------------------------------- /services/learn-card-network/learn-cloud-service/src/types/xapi.ts: -------------------------------------------------------------------------------- 1 | import type { Statement } from '@xapi/xapi'; 2 | import type { FastifyRequest } from 'fastify'; 3 | 4 | export interface XAPIRequestQuery { 5 | agent?: string; 6 | method?: string; 7 | } 8 | 9 | export interface XAPIRequest extends FastifyRequest { 10 | Querystring?: XAPIRequestQuery; 11 | Body?: Statement; 12 | } 13 | -------------------------------------------------------------------------------- /services/learn-card-network/learn-cloud-service/test/setupFile.ts: -------------------------------------------------------------------------------- 1 | /* import { client } from '@mongo'; 2 | 3 | afterAll(async () => { 4 | try { 5 | await client.close(true); 6 | } catch (error) { } 7 | }); */ 8 | -------------------------------------------------------------------------------- /services/learn-card-network/learn-cloud-service/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "resolveJsonModule": false, 5 | "rootDir": "src" 6 | }, 7 | "exclude": ["./test/**/*"] 8 | } 9 | -------------------------------------------------------------------------------- /services/learn-card-network/learn-cloud-service/vitest-setup.ts: -------------------------------------------------------------------------------- 1 | import { MongoMemoryReplSet } from 'mongodb-memory-server'; 2 | 3 | export default async function setup({ provide }) { 4 | const db = await MongoMemoryReplSet.create(); 5 | await db.waitUntilRunning(); 6 | const uri = db.getUri(); 7 | 8 | console.log(provide, uri, typeof uri); 9 | 10 | provide('mongo-uri', uri); 11 | 12 | return () => db?.stop?.(); 13 | } 14 | -------------------------------------------------------------------------------- /services/learn-card-network/simple-signing-service/.env.example: -------------------------------------------------------------------------------- 1 | SEED=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 2 | AUTHORIZED_DIDS=did:web:network.learncard.com did:web:localhost%3A4000 3 | MONGO_URI=mongodb://localhost:27017 4 | MONGO_DB_NAME=test 5 | -------------------------------------------------------------------------------- /services/learn-card-network/simple-signing-service/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /dist 13 | 14 | # misc 15 | .DS_Store 16 | .env 17 | .env.local 18 | .env.development.local 19 | .env.test.local 20 | .env.production.local 21 | .vscode 22 | .idea 23 | 24 | npm-debug.log* 25 | .pnpm-debug.log 26 | yarn-debug.log* 27 | yarn-error.log* 28 | 29 | # Optional eslint cache 30 | .eslintcache 31 | 32 | /.serverless 33 | /.esbuild 34 | -------------------------------------------------------------------------------- /services/learn-card-network/simple-signing-service/esbuildPlugins.cjs: -------------------------------------------------------------------------------- 1 | const { sentryEsbuildPlugin } = require('@sentry/esbuild-plugin'); 2 | 3 | module.exports = [ 4 | sentryEsbuildPlugin({ 5 | authToken: process.env.SENTRY_AUTH_TOKEN, 6 | org: process.env.SENTRY_ORG, 7 | project: process.env.SENTRY_PROJECT, 8 | }), 9 | ]; 10 | -------------------------------------------------------------------------------- /services/learn-card-network/simple-signing-service/jest-mongodb-config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | mongodbMemoryServerOptions: { 3 | binary: { 4 | version: '5.1.0', 5 | skipMD5: true, 6 | }, 7 | instance: {}, 8 | autoStart: false, 9 | }, 10 | }; 11 | -------------------------------------------------------------------------------- /services/learn-card-network/simple-signing-service/jest-setup.ts: -------------------------------------------------------------------------------- 1 | import { TextEncoder, TextDecoder } from 'util'; 2 | 3 | global.TextEncoder = TextEncoder; 4 | global.TextDecoder = TextDecoder; 5 | -------------------------------------------------------------------------------- /services/learn-card-network/simple-signing-service/src/accesslayer/signing-authority/delete.ts: -------------------------------------------------------------------------------- 1 | import { SigningAuthorities } from '.'; 2 | 3 | export const deleteSigningAuthorityForDID = async ( 4 | ownerDid: string, 5 | name: string 6 | ): Promise => { 7 | console.log('Delete signing authority for user', ownerDid, name); 8 | try { 9 | return ( 10 | await SigningAuthorities.deleteOne({ 11 | ownerDid, 12 | name, 13 | }) 14 | ).deletedCount; 15 | } catch (e) { 16 | console.error(e); 17 | return false; 18 | } 19 | }; 20 | -------------------------------------------------------------------------------- /services/learn-card-network/simple-signing-service/src/accesslayer/signing-authority/index.ts: -------------------------------------------------------------------------------- 1 | import { SIGNING_AUTHORITIES_COLLECTION, MongoSigningAuthorityType } from '@models'; 2 | import mongodb from '@mongo'; 3 | 4 | export const getSigningAuthoritiesCollection = () => { 5 | return mongodb.collection(SIGNING_AUTHORITIES_COLLECTION); 6 | }; 7 | 8 | export const SigningAuthorities = getSigningAuthoritiesCollection(); 9 | 10 | SigningAuthorities.createIndex({ ownerDid: 1, name: 1 }, { unique: true }); 11 | -------------------------------------------------------------------------------- /services/learn-card-network/simple-signing-service/src/app.ts: -------------------------------------------------------------------------------- 1 | import { t } from '@routes'; 2 | import { utilitiesRouter } from '@routes/utilities'; 3 | import { signingAuthorityRouter } from '@routes/signing-authority'; 4 | import { credentialsRouter } from '@routes/credentials'; 5 | 6 | export { createContext } from '@routes'; 7 | 8 | export const appRouter = t.router({ 9 | utilities: utilitiesRouter, 10 | signingAuthority: signingAuthorityRouter, 11 | credentials: credentialsRouter, 12 | }); 13 | export type AppRouter = typeof appRouter; 14 | -------------------------------------------------------------------------------- /services/learn-card-network/simple-signing-service/src/helpers/challenges.helpers.ts: -------------------------------------------------------------------------------- 1 | let currentChallenge = 0; 2 | 3 | export const getChallenges = (amount: number): string[] => { 4 | if (amount > 100) throw new Error('Cannot request more than 100 challenges at a time!'); 5 | 6 | const challenges = Array(amount) 7 | .fill(currentChallenge) 8 | .map((challenge, index) => (challenge + index).toString()); 9 | 10 | currentChallenge = (currentChallenge + amount) % 1_000_000_000; 11 | 12 | return challenges; 13 | }; 14 | -------------------------------------------------------------------------------- /services/learn-card-network/simple-signing-service/src/helpers/profile.helpers.ts: -------------------------------------------------------------------------------- 1 | export const transformProfileId = (rawInput: string): string => 2 | rawInput.toLowerCase().replace(':', '%3A'); 3 | -------------------------------------------------------------------------------- /services/learn-card-network/simple-signing-service/src/helpers/signingAuthority.helpers.ts: -------------------------------------------------------------------------------- 1 | import dotenv from 'dotenv'; 2 | import { MongoSigningAuthorityType } from '@models'; 3 | 4 | dotenv.config(); 5 | 6 | export const getEndpoint = (domainName: string) => { 7 | return !domainName || process.env.IS_OFFLINE 8 | ? `http://localhost:${process.env.PORT || 3000}/api` 9 | : `https://${domainName}/api`; 10 | } 11 | 12 | export const getSigningAuthorityWithEndpoint = (sa: MongoSigningAuthorityType, domainName: string) => { 13 | return { 14 | ...sa, 15 | endpoint: getEndpoint(domainName) 16 | } 17 | } -------------------------------------------------------------------------------- /services/learn-card-network/simple-signing-service/src/helpers/types.helpers.ts: -------------------------------------------------------------------------------- 1 | import Express from 'express'; 2 | import { UnsignedVC, VC, UnsignedVP, VP, JWE } from '@learncard/types'; 3 | 4 | export interface TypedRequest< 5 | Body extends Record = {}, 6 | Query extends Record = {}, 7 | Params extends Record = {} 8 | > extends Express.Request { 9 | body: Body; 10 | query: Query; 11 | params: Params; 12 | } 13 | 14 | export const isEncrypted = (item: UnsignedVC | VC | UnsignedVP | VP | JWE): item is JWE => 15 | 'ciphertext' in item; 16 | -------------------------------------------------------------------------------- /services/learn-card-network/simple-signing-service/src/index.ts: -------------------------------------------------------------------------------- 1 | export type { AppRouter } from './app'; 2 | 3 | export { appRouter as mainApp } from './app'; 4 | export { app as didApp } from './dids'; 5 | export { app as swaggerApp } from './openapi'; 6 | -------------------------------------------------------------------------------- /services/learn-card-network/simple-signing-service/src/models/SigningAuthority.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | export const SIGNING_AUTHORITIES_COLLECTION = 'signingauthorities'; 4 | 5 | export const MongoSigningAuthorityValidator = z.object({ 6 | _id: z.string().optional(), 7 | ownerDid: z.string(), 8 | name: z.string(), 9 | seed: z.string(), 10 | did: z.string().optional(), 11 | endpoint: z.string().optional() 12 | }); 13 | 14 | export type MongoSigningAuthorityType = z.infer; 15 | -------------------------------------------------------------------------------- /services/learn-card-network/simple-signing-service/src/models/index.ts: -------------------------------------------------------------------------------- 1 | export * from './SigningAuthority'; 2 | -------------------------------------------------------------------------------- /services/learn-card-network/simple-signing-service/src/mongo.ts: -------------------------------------------------------------------------------- 1 | import dotenv from 'dotenv'; 2 | // Import the MongoDB driver 3 | import { MongoClient } from 'mongodb'; 4 | 5 | dotenv.config(); 6 | 7 | const isTest = process.env.NODE_ENV === 'test'; 8 | 9 | const uri = isTest 10 | ? (global as any).__MONGO_URI__ 11 | : process.env.__MONGO_URI__ || process.env.MONGO_URI; 12 | 13 | const dbName = isTest 14 | ? (global as any).__MONGO_DB_NAME__ 15 | : process.env.__MONGO_DB_NAME__ || process.env.MONGO_DB_NAME; 16 | 17 | export const client = new MongoClient(uri, { connectTimeoutMS: 30_000 }); 18 | export const mongodb = client.db(dbName); 19 | 20 | export default mongodb; 21 | -------------------------------------------------------------------------------- /services/learn-card-network/simple-signing-service/src/swagger-ui/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/services/learn-card-network/simple-signing-service/src/swagger-ui/favicon-16x16.png -------------------------------------------------------------------------------- /services/learn-card-network/simple-signing-service/src/swagger-ui/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/services/learn-card-network/simple-signing-service/src/swagger-ui/favicon-32x32.png -------------------------------------------------------------------------------- /services/learn-card-network/simple-signing-service/src/swagger-ui/index.css: -------------------------------------------------------------------------------- 1 | html { 2 | box-sizing: border-box; 3 | overflow: -moz-scrollbars-vertical; 4 | overflow-y: scroll; 5 | } 6 | 7 | *, 8 | *:before, 9 | *:after { 10 | box-sizing: inherit; 11 | } 12 | 13 | body { 14 | margin: 0; 15 | background: #fafafa; 16 | } 17 | -------------------------------------------------------------------------------- /services/learn-card-network/simple-signing-service/src/swagger-ui/swagger-initializer.js: -------------------------------------------------------------------------------- 1 | window.onload = function() { 2 | // 3 | 4 | // the following lines will be replaced by docker/configurator, when it runs in a docker-container 5 | window.ui = SwaggerUIBundle({ 6 | url: window.location.origin + '/docs/openapi.json', 7 | dom_id: '#swagger-ui', 8 | deepLinking: true, 9 | presets: [SwaggerUIBundle.presets.apis, SwaggerUIStandalonePreset], 10 | plugins: [SwaggerUIBundle.plugins.DownloadUrl], 11 | layout: 'StandaloneLayout', 12 | }); 13 | 14 | // 15 | }; 16 | -------------------------------------------------------------------------------- /services/learn-card-network/simple-signing-service/src/types/mongo.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod'; 2 | 3 | export const PaginationOptionsValidator = z.object({ 4 | limit: z.number(), 5 | cursor: z.string().optional() 6 | }); 7 | 8 | export type PaginationOptionsType = z.infer; 9 | 10 | export const PaginationResponseValidator = z.object({ 11 | cursor: z.string().optional(), 12 | hasMore: z.boolean() 13 | }); 14 | export type PaginationResponseType = z.infer; 15 | -------------------------------------------------------------------------------- /services/learn-card-network/simple-signing-service/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "resolveJsonModule": false, 5 | "rootDir": "src" 6 | }, 7 | "exclude": ["./test/**/*"] 8 | } 9 | -------------------------------------------------------------------------------- /services/learn-card-network/simple-signing-service/vitest-setup.ts: -------------------------------------------------------------------------------- 1 | import { MongoMemoryServer } from 'mongodb-memory-server'; 2 | 3 | export default async function setup({ provide }) { 4 | const db = await MongoMemoryServer.create(); 5 | const uri = db.getUri(); 6 | 7 | console.log(provide, uri, typeof uri); 8 | 9 | provide('mongo-uri', uri); 10 | 11 | return () => db?.stop?.(); 12 | } 13 | -------------------------------------------------------------------------------- /services/meta-mask-snap/.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # Please see the documentation for all configuration options: 2 | # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 3 | 4 | version: 2 5 | updates: 6 | - package-ecosystem: 'npm' 7 | directory: '/' 8 | schedule: 9 | interval: 'daily' 10 | time: '06:00' 11 | allow: 12 | - dependency-name: '@metamask/*' 13 | target-branch: 'main' 14 | versioning-strategy: 'increase-if-necessary' 15 | open-pull-requests-limit: 10 16 | -------------------------------------------------------------------------------- /services/meta-mask-snap/fixBundle.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | sed -i.bak 's/var root = freeGlobal || freeSelf || Function("return this")()/var root = { Uint8Array }/g' dist/snap.js 4 | sed -i.bak 's/exports.onRpcRequest = onRpcRequest/module.exports = { onRpcRequest }/g' dist/snap.js 5 | sed -i.bak 's/var isEdge = .*;/var isEdge = false;/g' dist/snap.js 6 | sed -i.bak 's/fetch2 = .*;/fetch2 = fetch;/g' dist/snap.js 7 | sed -i.bak 's/{ signal: abortSignal }/{}/g' dist/snap.js 8 | sed -i.bak 's/g\.AbortSignal/AbortSignal/g' dist/snap.js 9 | sed -i.bak 's/g\.AbortController/AbortController/g' dist/snap.js 10 | sed -i.bak 's/g\.AbortSignal/AbortSignal/g' dist/snap.js 11 | rm dist/snap.js.bak 12 | -------------------------------------------------------------------------------- /services/meta-mask-snap/snap.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | cliOptions: { 3 | src: './src/index.ts', 4 | port: 3002, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /services/meta-mask-snap/src/didkit_wasm_bg.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/services/meta-mask-snap/src/didkit_wasm_bg.wasm -------------------------------------------------------------------------------- /services/meta-mask-snap/src/global.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/learningeconomy/LearnCard/b330266f5de5d4a90a817eea5ce1805bf23688ae/services/meta-mask-snap/src/global.d.ts -------------------------------------------------------------------------------- /services/meta-mask-snap/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "declaration": true, 4 | "declarationMap": true, 5 | "esModuleInterop": true, 6 | "forceConsistentCasingInFileNames": true, 7 | "useUnknownInCatchVariables": false, 8 | "sourceMap": true, 9 | "strict": true, 10 | "target": "ESNext", 11 | "module": "ESNext", 12 | "moduleResolution": "node", 13 | "resolveJsonModule": true, 14 | "isolatedModules": true, 15 | "typeRoots": ["./node_modules/@types"] 16 | }, 17 | "include": ["src", "src/types/rpc.ts"] 18 | } 19 | -------------------------------------------------------------------------------- /tests/e2e/setup/test-setup.ts: -------------------------------------------------------------------------------- 1 | import { clearDatabases } from './db-utils'; 2 | import { afterEach } from 'vitest'; 3 | 4 | afterEach(clearDatabases, 120_000); 5 | beforeAll(clearDatabases, 120_000); 6 | -------------------------------------------------------------------------------- /tests/e2e/tests/global.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'hex-lite' { 2 | function toUint8Array(hex: string): Uint8Array; 3 | function fromUint8Array(array: Uint8Array): string; 4 | function toBuffer(hex: string): ArrayBuffer; 5 | function fromBuffer(buffer: ArrayBuffer): string; 6 | } 7 | -------------------------------------------------------------------------------- /tests/e2e/tests/health.spec.ts: -------------------------------------------------------------------------------- 1 | import { describe, test, expect } from 'vitest'; 2 | 3 | describe('Health checks', () => { 4 | test('LearnCard Network', async () => { 5 | const result = await fetch('http://localhost:4000/api/health-check'); 6 | 7 | expect(result.status).toEqual(200); 8 | }); 9 | 10 | test('LearnCloud', async () => { 11 | const result = await fetch('http://localhost:4100/api/health-check'); 12 | 13 | expect(result.status).toEqual(200); 14 | }); 15 | }); 16 | -------------------------------------------------------------------------------- /tools/executors/workspace/executor.json: -------------------------------------------------------------------------------- 1 | { 2 | "executors": { 3 | "run-command": { 4 | "implementation": "./run-command/dist/impl.js", 5 | "schema": "./run-command/schema.json", 6 | "description": "Runs a command" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /tools/executors/workspace/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "executors": "./executor.json" 3 | } 4 | -------------------------------------------------------------------------------- /tools/executors/workspace/run-command/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | -------------------------------------------------------------------------------- /tools/executors/workspace/run-command/esbuild.mjs: -------------------------------------------------------------------------------- 1 | import esbuild from 'esbuild'; 2 | 3 | await esbuild.build({ 4 | target: 'es2020', 5 | bundle: true, 6 | entryPoints: ['src/index.ts'], 7 | outfile: 'dist/impl.js', 8 | platform: 'node', 9 | }); 10 | -------------------------------------------------------------------------------- /tools/executors/workspace/run-command/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@learncard/nx-run-command", 3 | "version": "1.0.3", 4 | "description": "", 5 | "private": true, 6 | "main": "index.js", 7 | "scripts": { 8 | "build": "node esbuild.mjs" 9 | }, 10 | "keywords": [], 11 | "author": "Taylor Beeston", 12 | "license": "ISC", 13 | "dependencies": { 14 | "execa": "^5" 15 | }, 16 | "devDependencies": { 17 | "@nrwl/devkit": "^15.6.3", 18 | "esbuild": "^0.17.5" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /tools/executors/workspace/run-command/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/schema", 3 | "type": "object", 4 | "cli": "nx", 5 | "properties": { 6 | "command": { 7 | "type": "string", 8 | "description": "The command to run" 9 | }, 10 | "cwd": { 11 | "type": "string", 12 | "description": "The working directory to run the command in" 13 | } 14 | }, 15 | "required": [ 16 | "command" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /tools/executors/workspace/run-command/src/index.ts: -------------------------------------------------------------------------------- 1 | import { command } from 'execa'; 2 | import type { ExecutorContext } from '@nrwl/devkit'; 3 | 4 | export default async function buildExecutor( 5 | options: { command: string; cwd?: string }, 6 | context: ExecutorContext 7 | ) { 8 | await command(options.command, { 9 | cwd: options.cwd?.replace('{root}', context.root), 10 | stdio: [process.stdin, process.stdout, 'pipe'], 11 | }); 12 | 13 | return { success: true }; 14 | } 15 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | {} 2 | --------------------------------------------------------------------------------