This repository has been archived by the owner on Dec 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0b2b89b
commit 94824e6
Showing
16 changed files
with
9,347 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"presets": [ | ||
"@babel/preset-env", | ||
["@babel/preset-react", { "runtime": "automatic" }], | ||
"@babel/preset-typescript" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"name": "tbDex WASM Example", | ||
"tests": { | ||
"command": "npm test" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# WASM Exemplar | ||
|
||
A complete implementation demonstrating the TBDex protocol flow using our TypeScript npm package. | ||
|
||
## Overview | ||
|
||
This project showcases a full TBDex flow implementation using our TBDex WASM sdk. It demonstrates the interaction between a client and a PFI endpoint using the TBDex protocol. | ||
|
||
## Prerequisites | ||
|
||
- Node.js (v14 or higher) | ||
- npm (v6 or higher) | ||
- Git | ||
|
||
## Dependencies | ||
|
||
- TBDex TypeScript package | ||
- A running PFI endpoint | ||
|
||
## Getting Started | ||
|
||
### Setting up the PFI Endpoint | ||
|
||
1. Clone the PFI example repository: | ||
```bash | ||
git clone https://github.com/TBD54566975/tbdex-rs.git | ||
cd tbdex-rs/examples/hosted-wallet-ts | ||
``` | ||
|
||
2. Install dependencies and start the PFI server: | ||
```bash | ||
npm install | ||
npm run start:pfi | ||
``` | ||
|
||
### Running the WASM Exemplar | ||
|
||
1. Clone this repository: | ||
```bash | ||
git clone https://github.com/TBD54566975/tbd-examples.git | ||
cd javascript/tbdex-wasm-exemplar/ | ||
``` | ||
|
||
2. Install dependencies: | ||
```bash | ||
npm install | ||
``` | ||
|
||
3. Start the development server: | ||
```bash | ||
npm run dev | ||
``` | ||
|
||
## Usage | ||
|
||
The application comes pre-configured with default Verifiable Credentials (VC) and Decentralized Identifier (DID) for testing purposes. | ||
|
||
### Quick Start | ||
1. Navigate to the application in your browser | ||
2. Click the "Execute Happy Path Flow" button to initiate a complete TBDex flow | ||
|
||
### Flow Visualization | ||
 | ||
|
||
## Architecture | ||
|
||
This project demonstrates: | ||
- WASM integration with TBDex | ||
- Protocol message flow | ||
- PFI endpoint interaction | ||
- VC and DID handling |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<title>My React App</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<!-- Import the main TypeScript file --> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
export default { | ||
testEnvironment: 'jsdom', | ||
transform: { | ||
'^.+\\.(ts|tsx|js|jsx)$': 'babel-jest', | ||
}, | ||
moduleNameMapper: { | ||
'\\.(css|less|scss|sass)$': 'identity-obj-proxy', | ||
'^@/(.*)$': '<rootDir>/src/$1' | ||
}, | ||
setupFilesAfterEnv: ['@testing-library/jest-dom'], | ||
testMatch: ['<rootDir>/src/**/*.test.{ts,tsx,js,jsx}'], | ||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'] | ||
}; |
Oops, something went wrong.