Fetch Attribute Values

Quadrata SDK API Service: Fetch Attribute Values

Fetch underlying attribute values for a given wallet address. This is an attribute query and incurs Quad Unit charges.

Parameters

Name
Type
Description

apiAccessToken*

string

walletAddress*

hex string

Wallet Address

attributes

QuadrataAttribute[]

Attribute name array Can be provided in sdkConfig

options

object

API and Fetch Options

Parameter Options

Name
Type
Description

allowUnsafeClientApiCall

boolean

Allow service to run in client

SDK Configuration

Name
Type
Description

environment*

QuadrataEnvironment

attributes

QuadrataAttribute[]

Attribute name array Can be provided in params

See Query Attributes Via API for more information about the underlying API endpoint.

Example

import type { API } from '@quadrata/sdk/types';
import { fetchAttributeValues, QuadrataAttribute, QuadrataEnvironment } from '@quadrata/sdk/api';

type ResponseType = API.Services.FetchAttributeValues.Response;

const response: ResponseType = await fetchAttributeValues(
    // params
    {
        apiAccessToken: 'jwt token from createAccessToken',
        walletAddress: '0x123',
        
        // optional, if provided in config
        attributes: [QuadrataAttribute.AML, QuadrataAttribute.DID],
        
        options: {
            // not recommended
            allowUnsafeClientApiCall: true,
            
            // optional fetch options
            cache: 'no-cache'
        }
    },
    // sdk config
    {
        // optional, if provided in above params
        attributes: [QuadrataAttribute.AML, QuadrataAttribute.DID],
        
        // required
        environment: QuadrataEnvironment.PRODUCTION
    }
);

const { data: { queryResult } } = response;

Last updated