🖇️Integration Process
Last updated
Last updated
Centic provide Web Application to support Users and Businesses explore the Growth of an Ecosystem. However, for more strong Growth, we support three methods for DApps to integrate Centic’s Intelligence into their Ecosystem, including:
Using Centic pre-build UI
Using Centic SDK
Using Restful API
Go to the Integration tab.
Click the eye icon to show the newly created API key.
Append the API key created to the x-API key field in the header of every API request
The integration method to choose depends on the specific business logic of your app.
This method can be used to prove the wallet score of users without revealing their wallet address. This can be done by generating a ZkProof of the user score, the proof will be then verified by your app later. This way, your app can know the validity of the user's score without knowing about their wallet address.
Centic Prebuilt UI is only used to get the user's wallet score (for example Crypto credit score). The process flow can be described in the following picture:
To start the process your app will need to send an HTTP request to Centic server to get the temporary URL.
API endpoint: https://develop.centic.io/v1
HTTP request: GET /centic-services/createUrl
Parameter detail
Param name
Type
Required
Description
web2Id
string
yes
The string identity of the user using your app
condition
number
yes
The minimum credit score required, user having credit score under this value cannot generate the proof
scoreId
string
yes
The score model ID
Response
Name
Type
Example
url
string
sessionId
string
527ae6d7-6741-4680-98e6-ee31ba8fbc9c
After getting the temporary URL, redirect the user to that URL, the URL will lead to a Centic prebuilt UI to generate the score proof.
The sessionId returned in step 1 can be used to check the proof generation status and get the proof if the proof generation process is finished.
API endpoint: https://develop.centic.io/v1
HTTP request: GET /centic/services/getProofData
Parameter detail
Param name
Type
Required
Description
sessionId
string
yes
The string identity of the user using your app
Response
Name
Type
Description
status
string
the proof generation status, either “PROCESSING” or “FINISHED”
proof
string
the proof generated if the status is “PROCESSING” this field will not be returned
After getting the proof, you can implement the verification process on your server or use the Centic verify service.
The user credit score then can be extracted from the first element of the public Signals field.
Verify proof on Centic Server.
You can send and verify proof on Centic server using Api Call:
API endpoint: https://develop.centic.io/v1
HTTP request: POST /bank/user/verify
Request body detail
Param name
Type
Required
Description
proof
object
yes
The proof generated
Response
Name
Type
Description
valid
boolean
The verification result
This method allows you to calculate an entity score right on your app based on the score calculation model.
You can see the detailed instructions including full code to integrate through Centic SDK HERE
This method is used to get any entity score (for example: Token health score, AAVE ecosystem wallet reputation).
API endpoint: https://develop.centic.io/v1
HTTP request: GET /centic-services/calculateCustomScore/{entity address}
Parameter detail
Param name
Type
Required
Description
scoreId
string
yes
The score model ID
Response
Name
Type
Description
Example
score
number
The entity score calculated
700
other props
any
These props will vary depend on the score model