# SDK Configuration

Both the API and Client libraries require configuration to work correctly. The same configuration object can be used for both libraries.

## Configuration Properties

The configuration object is a plain JavaScript object that contains the following properties:

* **`environment`**: <mark style="color:red;">(</mark> <mark style="color:red;"></mark>*<mark style="color:red;">Required</mark>* <mark style="color:red;"></mark><mark style="color:red;">)</mark> The environment to use for the SDK. This is mapped from the `QuadrataEnvironment` enum. The API URL used by both Client and API libraries is determined by the environment you configure.
  * `QuadrataEnvironment.SANDBOX` - *"SANDBOX"*
  * `QuadrataEnvironment.PRODUCTION` - *"PRODUCTION"*
* **`attributes`**: ( *Optional* ) An object containing the attributes to use for the SDK. For client libraries, these are the attributes that you want to claim. For API libraries, these are the attributes that you want to query. If not provided, you must pass the attributes as props to the SDK components or functions. These attributes are mapped from the `QuadrataAttribute` enum.
  * `QuadrataAttribute.AML` - *"AML"*
  * `QuadrataAttribute.COUNTRY` - *"COUNTRY"*
  * `QuadrataAttribute.DID` - *"DID"*
  * `QuadrataAttribute.INVESTOR_STATUS` - *"INVESTOR\_STATUS"*
* **`network`**: ( *Optional* ) The network to use for the SDK. This is mapped from the `QuadrataNetwork` enum. If not provided, you must pass the network as props to the SDK components or functions. For client components, this comes from the `chainId` prop, and for API functions, this comes from the `network` parameter.
  * Sandbox
    * `QuadrataNetwork.SEPOLIA` - *11155111*
    * `QuadrataNetwork.MUMBAI` - *80001*
    * `QuadrataNetwork.FUJI` - *43113*
    * `QuadrataNetwork.TEVMOS` - *9000*
    * `QuadrataNetwork.OPTIMISM_GOERLI` - *420*
    * `QuadrataNetwork.ARBITRUM_GOERLI` - *421613*
    * `QuadrataNetwork.KAVA_TESTNET` - *2221*
    * `QuadrataNetwork.ZKSYNC_GOERLI` - *280*
    * `QuadrataNetwork.ZKSYNC_SEPOLIA` - *300*
    * `QuadrataNetwork.BASE_GOERLI` - *84531*
  * Production
    * `QuadrataNetwork.MAINNET` - *1*
    * `QuadrataNetwork.POLYGON` - *137*
    * `QuadrataNetwork.AVALANCHE` - *43114*
    * `QuadrataNetwork.EVMOS` - *9001*
    * `QuadrataNetwork.ARBITRUM` - *42161*
    * `QuadrataNetwork.OPTIMISM` - *10*
    * `QuadrataNetwork.KAVA` - *2222*
    * `QuadrataNetwork.BASE` - *8453*
    * `QuadrataNetwork.ZKSYNC_ERA` - *324*
* **`privacyScopes`**: ( *Optional* ) An array of privacy scopes to use for the SDK. This is mapped from the `QuadrataPrivacyConsent` enum. If not provided, you must pass the privacy scopes as props to the SDK components or functions.
  * `QuadrataPrivacyConsent.ADDRESS` *- "ADR"*
  * `QuadrataPrivacyConsent.DATE_OF_BIRTH` - *"DOB"*
  * `QuadrataPrivacyConsent.EMAIL` - *"EM"*
  * `QuadrataPrivacyConsent.FIRST_NAME` - *"FN"*
  * `QuadrataPrivacyConsent.GOV_ID_NUM` - *"G"*
  * `QuadrataPrivacyConsent.GOV_ID_CLASS` - *"GC"*
  * `QuadrataPrivacyConsent.GOV_ID_EXPIRY_DATE` - *"GE"*
  * `QuadrataPrivacyConsent.GOV_ID_ISSUE_DATE` - *"GI"*
  * `QuadrataPrivacyConsent.GOV_ID_ISSUE_AUTHORITY` - *"GIS"*
  * `QuadrataPrivacyConsent.GOV_ID_PHOTO` - *"GIP"*
  * `QuadrataPrivacyConsent.LAST_NAME` - *"LN"*
  * `QuadrataPrivacyConsent.MIDDLE_NAME` - *"MN"*

## Example

```typescript
import * as QuadrataTypes from '@quadrata/sdk/types';

const quadrataSdkConfiguration: QuadrataTypes.QuadrataSdkConfiguration = {
    // required
    environment: QuadrataTypes.QuadrataEnvironment.SANDBOX;
    
    // optional
    attributes: [
        QuadrataTypes.QuadrataAttribute.DID,
        QuadrataTypes.QuadrataAttribute.COUNTRY,
        QuadrataTypes.QuadrataAttribute.AML
    ],
    
    // optional
    network: QuadrataTypes.QuadrataNetwork.SEPOLIA,
    
    // optional
    privacyScopes: [
        QuadrataTypes.QuadrataPrivacyConsent.DATE_OF_BIRTH,
        QuadrataTypes.QuadrataPrivacyConsent.EMAIL
    ]
};
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.quadrata.com/integration/how-to-integrate/quadrata-sdk/advanced/sdk-configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
