Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
TWITTER_ANALYTICS_VIEWS_SECRET=your-twitter-secret
GITHUB_ACCOUNT_VERIFICATION_SECRET=your-github-secret
RECLAIM_GITHUB_TOKEN=your-github-token
RECLAIM_GITHUB_TOKEN=your-github-token
83 changes: 83 additions & 0 deletions CRIP/CRIP-MonkeyType_120s.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
| proposal | title | description | author | discussions-to | status | type | category | created | requires |
|----------|--------------------|-------------------------------|----------------------------|----------------|--------|-------------|----------|------------|----------|
| CRIP-2 | Monkeytype Integration | Integration with MonekeyType to get users typing speed in 120 sec | Ashwin KV <[email protected]> | | Draft | Integration | CRIP | 2024-07-07 | |

## Title

Monkeytype Integration 60s

## Introduction

This proposal outlines the integration of monkeytype as a data provider for the Catoff-Reclaim integration project. The integration aims to retrieve and process user top typing speed data of 120 seconds from monkeytype, such as username, WPM,Accuracy and Time of achivement to be used within the Catoff platform. This will enable users to validate their typing speed and use them for various challenges and verifications on Catoff.

## External APIs Needed

- nill

## Use Cases

1. **User Verification**: Validate users' typing speeds and accuracy to ensure they meet specific standards for challenges and competitions.
2. **Challenge Participation**: Allow users to participate in typing challenges that require proof of their fastest typing speed and accuracy.
3. **Skill Assessment**: Assess users' typing skills based on their best performance on Monkeytype, helping to identify areas of improvement and track progress.
3. **Leaderboard Ranking**: Create leaderboards on the Catoff platform based on users' fastest typing speeds and accuracy from Monkeytype
3. **Team Competitions**: Organize team-based typing competitions where each team member's performance on Monkeytype contributes to the team's overall score.

## Data Provider

- **Name**: Monkeytype 120 sec data
- **Hash Value**: 0x059fe3942bf736c935700846a1b71ca91b93bdaaa65b37ea0d06834c90ee16b3

## Code Snippet

Below is a code snippet that demonstrates the key parts of the GitHub integration. The full implementation should follow the service file template.

**`services/monkeyTypeService.js`**

```javascript
const { ReclaimServiceResponse } = require('../utils/reclaimServiceResponse')

exports.processMonkeyTypeData = async (proof, providerName) => {
// Extract relevant data from the proof
const wpm = JSON.parse(proof[0].claimData.context).extractedParameters.wpm
const acc = JSON.parse(proof[0].claimData.context).extractedParameters.acc
const timeStamp = JSON.parse(proof[0].claimData.context)
.extractedParameters.completionTime
const username = JSON.parse(proof[0].claimData.context).extractedParameters
.username

const date = new Date(Number(timeStamp))
// Options for formatting timestamp
const options = {
year: 'numeric',
month: 'long',
day: 'numeric',
hour: '2-digit',
minute: '2-digit',
second: '2-digit',
timeZoneName: 'short',
}

// Format the date and time
const completionTime = date.toLocaleString('en-US', options)
// The complete processedData from monkeyType
const ProcessedData = {
providerName,
wpm,
acc,
completionTime,
username,
}
const lastUpdateTimeStamp = JSON.parse(proof[0].claimData.timestampS)

// Create a ReclaimServiceResponse object with the processed data
return new ReclaimServiceResponse(
providerName,
lastUpdateTimeStamp,
username,
ProcessedData,
proof[0]
)
}


```
83 changes: 83 additions & 0 deletions CRIP/CRIP-MonkeyType_15s.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
| proposal | title | description | author | discussions-to | status | type | category | created | requires |
|----------|--------------------|-------------------------------|----------------------------|----------------|--------|-------------|----------|------------|----------|
| CRIP-2 | Monkeytype Integration | Integration with MonekeyType to get users typing speed in 15 sec | Ashwin KV <[email protected]> | | Draft | Integration | CRIP | 2024-07-05 | |

## Title

Monkeytype Integration 15s

## Introduction

This proposal outlines the integration of monkeytype as a data provider for the Catoff-Reclaim integration project. The integration aims to retrieve and process user top typing speed data of 15 seconds from monkeytype, such as username, WPM,Accuracy and Time of achivement to be used within the Catoff platform. This will enable users to validate their typing speed and use them for various challenges and verifications on Catoff.

## External APIs Needed

- nill

## Use Cases

1. **User Verification**: Validate users' typing speeds and accuracy to ensure they meet specific standards for challenges and competitions.
2. **Challenge Participation**: Allow users to participate in typing challenges that require proof of their fastest typing speed and accuracy.
3. **Skill Assessment**: Assess users' typing skills based on their best performance on Monkeytype, helping to identify areas of improvement and track progress.
3. **Leaderboard Ranking**: Create leaderboards on the Catoff platform based on users' fastest typing speeds and accuracy from Monkeytype
3. **Team Competitions**: Organize team-based typing competitions where each team member's performance on Monkeytype contributes to the team's overall score.

## Data Provider

- **Name**: Monkeytype 15 sec data
- **Hash Value**: 0x604f5228860b144b6e63ff47e541c1419b38d119cc3828a917dd9966dc7bb3a1

## Code Snippet

Below is a code snippet that demonstrates the key parts of the GitHub integration. The full implementation should follow the service file template.

**`services/monkeyTypeService.js`**

```javascript
const { ReclaimServiceResponse } = require('../utils/reclaimServiceResponse')

exports.processMonkeyTypeData = async (proof, providerName) => {
// Extract relevant data from the proof
const wpm = JSON.parse(proof[0].claimData.context).extractedParameters.wpm
const acc = JSON.parse(proof[0].claimData.context).extractedParameters.acc
const timeStamp = JSON.parse(proof[0].claimData.context)
.extractedParameters.completionTime
const username = JSON.parse(proof[0].claimData.context).extractedParameters
.username

const date = new Date(Number(timeStamp))
// Options for formatting timestamp
const options = {
year: 'numeric',
month: 'long',
day: 'numeric',
hour: '2-digit',
minute: '2-digit',
second: '2-digit',
timeZoneName: 'short',
}

// Format the date and time
const completionTime = date.toLocaleString('en-US', options)
// The complete processedData from monkeyType
const ProcessedData = {
providerName,
wpm,
acc,
completionTime,
username,
}
const lastUpdateTimeStamp = JSON.parse(proof[0].claimData.timestampS)

// Create a ReclaimServiceResponse object with the processed data
return new ReclaimServiceResponse(
providerName,
lastUpdateTimeStamp,
username,
ProcessedData,
proof[0]
)
}


```
83 changes: 83 additions & 0 deletions CRIP/CRIP-MonkeyType_30s.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
| proposal | title | description | author | discussions-to | status | type | category | created | requires |
|----------|--------------------|-------------------------------|----------------------------|----------------|--------|-------------|----------|------------|----------|
| CRIP-2 | Monkeytype Integration | Integration with MonekeyType to get users typing speed in 30 sec | Ashwin KV <[email protected]> | | Draft | Integration | CRIP | 2024-07-07 | |

## Title

Monkeytype Integration 30s

## Introduction

This proposal outlines the integration of monkeytype as a data provider for the Catoff-Reclaim integration project. The integration aims to retrieve and process user top typing speed data of 30 seconds from monkeytype, such as username, WPM,Accuracy and Time of achivement to be used within the Catoff platform. This will enable users to validate their typing speed and use them for various challenges and verifications on Catoff.

## External APIs Needed

- nill

## Use Cases

1. **User Verification**: Validate users' typing speeds and accuracy to ensure they meet specific standards for challenges and competitions.
2. **Challenge Participation**: Allow users to participate in typing challenges that require proof of their fastest typing speed and accuracy.
3. **Skill Assessment**: Assess users' typing skills based on their best performance on Monkeytype, helping to identify areas of improvement and track progress.
3. **Leaderboard Ranking**: Create leaderboards on the Catoff platform based on users' fastest typing speeds and accuracy from Monkeytype
3. **Team Competitions**: Organize team-based typing competitions where each team member's performance on Monkeytype contributes to the team's overall score.

## Data Provider

- **Name**: Monkeytype 30 sec data
- **Hash Value**: 0x12bfd8a194c63765e7dc5aa47d74114f812f26652bf8cae1b0677d2ad471815e

## Code Snippet

Below is a code snippet that demonstrates the key parts of the GitHub integration. The full implementation should follow the service file template.

**`services/monkeyTypeService.js`**

```javascript
const { ReclaimServiceResponse } = require('../utils/reclaimServiceResponse')

exports.processMonkeyTypeData = async (proof, providerName) => {
// Extract relevant data from the proof
const wpm = JSON.parse(proof[0].claimData.context).extractedParameters.wpm
const acc = JSON.parse(proof[0].claimData.context).extractedParameters.acc
const timeStamp = JSON.parse(proof[0].claimData.context)
.extractedParameters.completionTime
const username = JSON.parse(proof[0].claimData.context).extractedParameters
.username

const date = new Date(Number(timeStamp))
// Options for formatting timestamp
const options = {
year: 'numeric',
month: 'long',
day: 'numeric',
hour: '2-digit',
minute: '2-digit',
second: '2-digit',
timeZoneName: 'short',
}

// Format the date and time
const completionTime = date.toLocaleString('en-US', options)
// The complete processedData from monkeyType
const ProcessedData = {
providerName,
wpm,
acc,
completionTime,
username,
}
const lastUpdateTimeStamp = JSON.parse(proof[0].claimData.timestampS)

// Create a ReclaimServiceResponse object with the processed data
return new ReclaimServiceResponse(
providerName,
lastUpdateTimeStamp,
username,
ProcessedData,
proof[0]
)
}


```
83 changes: 83 additions & 0 deletions CRIP/CRIP-MonkeyType_60s.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
| proposal | title | description | author | discussions-to | status | type | category | created | requires |
|----------|--------------------|-------------------------------|----------------------------|----------------|--------|-------------|----------|------------|----------|
| CRIP-2 | Monkeytype Integration | Integration with MonekeyType to get users typing speed in 60 sec | Ashwin KV <[email protected]> | | Draft | Integration | CRIP | 2024-07-07 | |

## Title

Monkeytype Integration 60s

## Introduction

This proposal outlines the integration of monkeytype as a data provider for the Catoff-Reclaim integration project. The integration aims to retrieve and process user top typing speed data of 60 seconds from monkeytype, such as username, WPM,Accuracy and Time of achivement to be used within the Catoff platform. This will enable users to validate their typing speed and use them for various challenges and verifications on Catoff.

## External APIs Needed

- nill

## Use Cases

1. **User Verification**: Validate users' typing speeds and accuracy to ensure they meet specific standards for challenges and competitions.
2. **Challenge Participation**: Allow users to participate in typing challenges that require proof of their fastest typing speed and accuracy.
3. **Skill Assessment**: Assess users' typing skills based on their best performance on Monkeytype, helping to identify areas of improvement and track progress.
3. **Leaderboard Ranking**: Create leaderboards on the Catoff platform based on users' fastest typing speeds and accuracy from Monkeytype
3. **Team Competitions**: Organize team-based typing competitions where each team member's performance on Monkeytype contributes to the team's overall score.

## Data Provider

- **Name**: Monkeytype 60 sec data
- **Hash Value**: 0x3904d64f3f1ce330bcd893fbaf9cf6ab94e58e3b22a200099f73a156bad646b7

## Code Snippet

Below is a code snippet that demonstrates the key parts of the GitHub integration. The full implementation should follow the service file template.

**`services/monkeyTypeService.js`**

```javascript
const { ReclaimServiceResponse } = require('../utils/reclaimServiceResponse')

exports.processMonkeyTypeData = async (proof, providerName) => {
// Extract relevant data from the proof
const wpm = JSON.parse(proof[0].claimData.context).extractedParameters.wpm
const acc = JSON.parse(proof[0].claimData.context).extractedParameters.acc
const timeStamp = JSON.parse(proof[0].claimData.context)
.extractedParameters.completionTime
const username = JSON.parse(proof[0].claimData.context).extractedParameters
.username

const date = new Date(Number(timeStamp))
// Options for formatting timestamp
const options = {
year: 'numeric',
month: 'long',
day: 'numeric',
hour: '2-digit',
minute: '2-digit',
second: '2-digit',
timeZoneName: 'short',
}

// Format the date and time
const completionTime = date.toLocaleString('en-US', options)
// The complete processedData from monkeyType
const ProcessedData = {
providerName,
wpm,
acc,
completionTime,
username,
}
const lastUpdateTimeStamp = JSON.parse(proof[0].claimData.timestampS)

// Create a ReclaimServiceResponse object with the processed data
return new ReclaimServiceResponse(
providerName,
lastUpdateTimeStamp,
username,
ProcessedData,
proof[0]
)
}


```
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "CRIP is an open source project to receieve community proposals for catoff challenges which are based on reclaim integration",
"main": "index.js",
"scripts": {
"start": "node index.js",
"start": "node --env-file=.env index.js ",
"lint": "eslint '**/*.js'",
"lint:fix": "eslint '**/*.js' --fix",
"format": "prettier --write '**/*.js'"
Expand Down Expand Up @@ -32,4 +32,4 @@
"eslint-plugin-prettier": "^5.1.3",
"prettier": "^3.2.5"
}
}
}
Loading