Request and submit KYC api endpoints #195
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:kyc requested
.Usage Condition:
To execute this endpoint, the following conditions must be met:
Submitted
state.Example KYCRequestedInfo:
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:validated
.Usage Condition:
To execute this endpoint, the following conditions must be met:
The message dates must be valid (the message has not expired and is not from the future).
The client's status must be
KYCRequested
.The client's score must be greater than 30.
Example SubmitKYCInfo:
Deployment Considerations:
New environment variables:
KYC_URL
- variable should be set to the URL of the KYC portalGITCOIN_PASSPORT_DECODER
- variable should be set to Optimism decoder contract address (https://docs.passport.xyz/building-with-passport/smart-contracts/contract-reference)PASSPORT_VERIFIER_CHAIN_ID
- variable should be set to Optimism chain ID (https://docs.optimism.io/chain/networks)GITCOIN_MINIMUM_SCORE
- variable should be set to a minimum acceptable scoreRPC_URL
- variable should be set to Optimism RPC URL (https://docs.optimism.io/chain/networks)