Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Funkit backend onramp/offramp #131

Open
4 tasks
MSghais opened this issue Sep 25, 2024 · 7 comments · May be fixed by #141
Open
4 tasks

Funkit backend onramp/offramp #131

MSghais opened this issue Sep 25, 2024 · 7 comments · May be fixed by #141
Assignees
Labels
backend features Build new features good first issue Good for newcomers mobile React native dev ODHack8 OD Hack 8 issues

Comments

@MSghais
Copy link
Contributor

MSghais commented Sep 25, 2024

Description

We want to add onramp/offramp for Starknet like Vault one.
Fun kit offramp/onramp integration in the backend.

Some examples of the database and backend are here in Vault repo.

https://github.com/keep-starknet-strange/vault/tree/main/backend/src/routes

Todo

  • Add database models for onramp/offramp with Nostr pubkey/Starknet address or Passkey
  • Funkit SDK integration
  • Routes and endpoint with write/read

Optional or can be split in another issues:

  • UI simple integration in the React native mobile app
@MSghais MSghais added good first issue Good for newcomers features Build new features backend ODHack8 OD Hack 8 issues mobile React native dev labels Sep 25, 2024
@ShantelPeters
Copy link

ShantelPeters commented Sep 25, 2024

Hi @MSghais i will like to take this up
Kindly assign

Copy link

onlydustapp bot commented Sep 25, 2024

Hi @ShantelPeters!
Maintainers during the ODHack # 8.0 will be tracking applications via OnlyDust.
Therefore, in order for you to have a chance at being assigned to this issue, please apply directly here, or else your application may not be considered.

@Josh-121
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

software engineer(backend) and contributor in similar project from last hacthons(https://app.onlydust.com/u/Josh-121). looking to make first contribution here

How I plan on tackling this issue

Set Up Database Models
Review Vault Repo: Analyze the existing database models in the Vault repository under the src/routes directory to understand how data is structured.
Define Models for Onramp/Offramp: Create new database models for the onramp/offramp process. This should include fields such as:
Nostr Pubkey/Starknet Address: For user identification.
Passkey (if applicable): As an alternative to Starknet or Nostr keys.
Transaction Data: Include fields for tracking transaction status (e.g., pending, completed, failed), timestamps, and any metadata related to the onramp/offramp process.
Migration Scripts: Write database migration scripts to add these models to the existing schema.
2. FunKit SDK Integration
Install FunKit SDK: Integrate the FunKit SDK into the backend. Ensure all necessary SDK functions for Starknet onramp/offramp are imported.
Handle Onramp/Offramp Logic: Write service functions using the FunKit SDK to handle:
Onramp: Depositing assets from external sources to Starknet.
Offramp: Withdrawing assets from Starknet to external sources.
Ensure proper error handling and logging for potential issues in the onramp/offramp process.
3. Create Backend Routes & Endpoints
Write New API Endpoints:
Onramp Endpoint: Allow users to initiate an onramp transaction by sending their Nostr pubkey/Starknet address and relevant onramp data.
Offramp Endpoint: Allow users to initiate an offramp transaction similarly.
Read/Write to Database: Ensure these routes can both log transactions (write) and query their status (read) by interacting with the database models.
Security & Validation: Implement necessary validation for Starknet addresses, Nostr pubkeys, and Passkeys. Add security measures such as rate limiting and input sanitization to avoid abuse.
4. Testing and Validation
Unit Testing: Write tests for the new models, service functions, and API routes. Mock the FunKit SDK calls to simulate successful and failed transactions.
Integration Testing: Test the end-to-end flow for both onramp and offramp to ensure data is correctly written to the database and transactions complete without errors.

@EjembiEmmanuel
Copy link
Contributor

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hello @ @MSghais please kindly assigned as discussed.

ETA: 2 days

@thesledge04
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I have experience in developing backend systems and integrating various SDKs, including FunKit, which aligns with the requirements for adding onramp/offramp functionality for Starknet. My familiarity with database modeling and API route implementation will enable me to efficiently create the necessary models and endpoints. Additionally, I have a strong understanding of React Native, which will be beneficial if UI integration is pursued in a future task.

How I plan on tackling this issue

Review existing code for insights into database models and structure.
Create database models for onramp/offramp.
Integrate Funkit SDK for transactions.
Develop routes and endpoints for handling requests.
Test functionality thoroughly.

@ScottyDavies
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I have a solid background in backend development and database management, with experience in integrating APIs and SDKs

How I plan on tackling this issue

To implement this, I would:

Examine the Vault repo to understand the current database models and backend structure.

Create new database models for onramp/offramp functionality that include Nostr pubkey, Starknet address, or Passkey.

Set up the Funkit SDK in the backend to handle onramp/offramp transactions.

Create the necessary routes and endpoints for reading and writing data related to onramp/offramp operations.

Implement unit and integration tests to ensure functionality and reliability.

If needed, outline a plan for simple UI integration in the React Native app for user interaction.

Copy link

onlydustapp bot commented Sep 26, 2024

The maintainer MSghais has assigned EjembiEmmanuel to this issue via OnlyDust Platform.
Good luck!

@EjembiEmmanuel EjembiEmmanuel linked a pull request Sep 30, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend features Build new features good first issue Good for newcomers mobile React native dev ODHack8 OD Hack 8 issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants