# Supportive methods

#### Fetching list of vaults <a href="#key-features" id="key-features"></a>

This method returns a promise that resolves to an array of vault objects, each containing:

* Address
* Name
* Timestamp of creation
* Block number of creation

```typescript
const vaults = await sdk.data.getVaults();
```

#### Fetching client data <a href="#key-features" id="key-features"></a>

This method returns the range of pool IDs (minimum to maximum) associated with a given client, as well as the client's name:

```typescript
const { minPool, maxPool, clientName } = await sdk.data.getClientData(integratorAddress, vault);
```

#### Activate pool <a href="#key-features" id="key-features"></a>

Once the Yelay team assigns a pool range to a client and their `integratorAddress`, each `poolId` must be activated before deposits are allowed.

* Activation can be done by Yelay or by the client using the method below.
* Only a whitelisted operator address can perform this action.
* To whitelist an address, provide your operator address to the Yelay team.

```typescript
const poolToActivate = minPool + 5; // should be in range: minPool <= poolToActivate <= maxPool
const isPoolActive = await sdk.data.isPoolActive(vault, poolToActivate);
if (!isPoolActive) {
	await sdk.actions.activatePool(vault, poolToActivate);
}
```

#### Migrate user deposits between pools <a href="#key-features" id="key-features"></a>

This method allows withdrawing a user’s liquidity from Pool A and depositing it into Pool B (both operated by the same client) in a single transaction:

```typescript
const vault = '0x1234';
const fromPool = 123;
const toPool = 456;
const amount = 1000000n; // Amount of shares to migrate
const migrateTx = await sdk.actions.migrate(vault, fromPool, toPool, amount);
```


---

# 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.yelay.io/yelay-sdk/supportive-methods.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.
