Integrating Smart-ID provided personal identification data into zkApps
Follow the steps below to fetch the data and use it inside your own smart contract.
Mock data
For testing purposes use mock data provider. It does not require real personal identification number and data request approval by the user. This is useful for testing environment and quick prototyping.
To fetch real personal data follow the example provided below. Keep in mind that to do this, you must ask the user to provide valid personal identification code and country of citizenship.
In order to fetch read data of a person, the individual must have installed and set up the Smart-ID app and account on their mobile device.
// prepare input data
const url = 'https://id-mask-oracle-e6ngsd55oa-uc.a.run.app/'
const body = {
pno: 34204108221, // personal idintification number
country: 'EE', // country of citizenship
displayText: '🙋, this is zkApp requesting your data 🙌' // message to be shown on user's phone
}