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

Request and submit KYC api endpoints #195

Merged
merged 1 commit into from
Jun 6, 2024
Merged

Request and submit KYC api endpoints #195

merged 1 commit into from
Jun 6, 2024

Conversation

Filip-L
Copy link
Collaborator

@Filip-L Filip-L commented Jun 4, 2024

KYC Portal

Endpoint: [POST] verifier/application/request_kyc

Description:
The functionality enables Allocators to request their clients to undergo the KYC process.

The verifier/application/request_kyc endpoint checks, based on the query params (VerifierActionsQueryParams), the current state of the application. If the condition is met, it:

  • Updates the application's state to KYC requested.
  • Updates the record in the database.
  • Adds a comment on relevant GitHub issue and the label to kyc requested.
  • Creates a commit with the updated application state on relevant branch.

Usage Condition:
To execute this endpoint, the following conditions must be met:

  1. The application must be in the Submitted state.

Example KYCRequestedInfo:

{
  "github_username": "github_username",
  "repo": "repo_name",
  "owner": "owner_name",
  "id": "client_address"
}

Endpoint: [POST] application/submit_kyc

Description:
The application/submit_kyc endpoint allows clients to confirm their KYC status based on the received data (SubmitKYCInfo). It validates the provided information, checks the current KYC status, and if all conditions are met it:

  • Updates the application's state to Submitted.
  • Updates the record in the database.
  • Adds a comment on relevant GitHub issue and the label to validated.
  • Creates a commit with the updated application state on relevant branch.

Usage Condition:
To execute this endpoint, the following conditions must be met:

  1. The message dates must be valid (the message has not expired and is not from the future).

  2. The client's status must be KYCRequested.

  3. The client's score must be greater than 30.

Example SubmitKYCInfo:

{
  "message": 
    "KycApproval": {
      "message": "message",
      "client_id": "client_address",
      "issued_at": "issued_date",
      "expires_at": "expiry_date",
      "allocator_repo_name": "repo_name",
      "allocator_repo_owner": "owner_name"
    },
  "signature": "client_signature",
}

Deployment Considerations:

@kacperzuk-neti kacperzuk-neti merged commit 7ef514a into main Jun 6, 2024
1 check passed
@kacperzuk-neti kacperzuk-neti deleted the KYC-portal branch June 6, 2024 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants