Fetch Privacy Grants
Quadrata SDK API Service: Fetch Privacy Grants
Fetch which privacy data has been granted consent to your dApp by a known wallet address. This feature must be enabled for your dApp.
Parameters
Name
Type
Description
apiKey
*
string
Your API Key
walletAddress
*
hex string
Wallet address
privateKeyDerBase64
string
Base64 DER String
privateKeyDer
string
DER Binary String
privateKeyPem
string
PEM String
privateKey
CryptoKey
CryptoKey object
options
object
Fetch Options
SDK Configuration
Name
Type
Description
Example
import type { API } from '@quadrata/sdk/types';
import { fetchPrivacyGrants, QuadrataEnvironment } from '@quadrata/sdk/api';
type ResponseType = API.Service.FetchPrivacyGrants.Response;
type ParsedResponseType = API.Service.FetchPrivacyGrants.ParsedResponse;
const response: ResponseType = await fetchPrivacyGrants(
// params
{
apiKey: process.env.QUADRATA_API_KEY,
walletAddress: '0x123',
// private signing key
privateKeyDerBase64: process.env.QUADRATA_PRIVATE_KEY_DER_BASE64,
// optional fetch options
options: {
cache: 'no-cache'
}
},
// sdk config
{ environment: QuadrataEnvironment.PRODUCTION }
);
const grantedConsent: ParsedResponse = response.data.grants;
Last updated