Plaid (ZK Range Proof)
The Plaid Data Connector Example
The sample code is presented at https://github.com/CliqueOfficial/SibylPlaidDataConnector.
Test the deployed oracle pipeline hosted by Clique here:
curl --location 'https://sibyl.clique-test.social:3443/query' -k
--header 'Accept: application/json'
--header 'Connection: Close'
--header 'Content-Type: application/json'
--data '{
"query_type": "plaid_bank_balance_range_zkp",
"query_param": {
"clientId": "YOUR_CLIENT_ID",
"secret": "YOUR_SECRET",
"accessToken": "YOUR_ACCESS_TOKEN",
"rangeUpperBound": 2000,
"rangeBottomBound": 0
}
}'
Plaid
plaid_sandbox_public_token
plaid_sandbox_public_token
Get the public token (sandbox environment).
Parameters:
clientId
: string, Plaid clientIdsecret
: string, Plaid secretinstitutionId
: string, institution id of the bank you want to query
For more details, please refer to Plaid's document.
plaid_sandbox_exchange_access_token
plaid_sandbox_exchange_access_token
Exchange the public token for an access token.
Parameters:
clientId
: same as abovesecret
: same as abovepublicToken
: string, public token returned fromplaid_sandbox_public_token
plaid_bank_balance_range
plaid_bank_balance_range
Query the user's balance in a bank account and return if the balance is within a given range. The result is only a boolean so that the original balance will not be seen by any party except the secure environment.
Parameters:
clientId
secret
accessToken
string, access token returned fromplaid_bank_balance_range
rangeUpperBound
int, the upper bound of the query rangerangeBottomBound
int, the lower bound of the query range
plaid_bank_balance_range_zkp
plaid_bank_balance_range_zkp
Query the user's balance in its bank account and generate a zero-knowledge range proof for it.
Parameters:
clientId
secret
accessToken
string, access token returned fromplaid_bank_balance_range
rangeUpperBound
int, the upper bound of the query rangerangeBottomBound
int, the lower bound of the query range
The general workflow for making a Plaid API call is very simple:
We first need to get the public token through
plaid_sandbox_public_token
Then, we exchange the public token for an access token through
plaid_sandbox_exchange_access_token
.
Last updated