# Initialization

### TypeScript SDK

Each action described in the following sections requires an initialised coreSDK instance. It can be done using the following snippet. When there are multiple actors involved in some flow, each of them needs its own instance./

```typescript
import { Contract, providers, utils, Wallet } from "ethers";
import { CoreSDK, getEnvConfigById } from "@bosonprotocol/core-sdk";
import { EthersAdapter } from "@bosonprotocol/ethers-sdk";

const envName = "testing"; // amoy testnet
const configId = "testing-80002-0";

const defaultConfig = getEnvConfigById(envName, configId);
const ethereumProvider = new providers.JsonRpcProvider(
  "https://yourEthereumRPCProvider"
);

const signerWallet = Wallet.createRandom(ethereumProvider);
const coreSDK = CoreSDK.fromDefaultConfig({
    envName,
    configId,
    web3Lib: new EthersAdapter(provider, signerWallet),
  });
```

To use the coreSDK with the testnet or production protocols, the following parameters can be used.

|                  | envName    | configId           |
| ---------------- | ---------- | ------------------ |
| Amoy             | testing    | testing-80002-0    |
| Sepolia          | testing    | testing-11155111-0 |
| Base Sepolia     | testing    | testing-84532-0    |
| Optimism Sepolia | testing    | testing-11155420-0 |
| Arbitrum Sepolia | testing    | testing-421614-0   |
| Polygon          | production | production-137-0   |
| Ethereum         | production | production-137-0   |
| Base             | production | production-8453-0  |
| Optimism         | production | production-10-0    |
| Arbitrum         | production | production-42161-0 |


---

# 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.bosonprotocol.io/v2.4.2/using-the-protocol/dacp-tools/initialization.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.
