filecoin-project / filplus-backend

Other
2 stars 1 forks source link

Request and submit KYC api endpoints #195

Closed Filip-L closed 3 months ago

Filip-L commented 3 months ago

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:

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:

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: