# DataStreamsLocalSimulatorFork v0.3.0 API Reference
Source: https://docs.chain.link/chainlink-local/api-reference/v0.3.0/data-streams-local-simulator-fork

> For the complete documentation index, see [llms.txt](/llms.txt).

> **NOTE: Integrate Chainlink Local into your project**
>
> ### npm
>
> If you use [NPM](https://www.npmjs.com/), install the [@chainlink/local NPM
> package](https://www.npmjs.com/package/@chainlink/local):
>
> ```shell
> npm install @chainlink/local@0.3.0
> ```
>
> ### yarn
>
> If you use [Yarn](https://yarnpkg.com/), install the [@chainlink/local NPM
> package](https://www.npmjs.com/package/@chainlink/local):
>
> ```shell
> yarn add @chainlink/local@0.3.0
> ```
>
> ### foundry
>
> If you use [Foundry](https://book.getfoundry.sh/):
>
> ```shell
> forge install smartcontractkit/chainlink-local@v0.3.0
> ```
>
> and then set remappings to: `@chainlink/local/=lib/chainlink-local/` in either `remappings.txt` or `foundry.toml` file
>
> ### RemixIDE
>
> Import the `CCIPLocalSimulator` contract from the `@chainlink/local` package:
>
> ```solidity
> import {CCIPLocalSimulator} from "@chainlink/local@0.3.0/src/ccip/CCIPLocalSimulator.sol";
> ```

## DataStreamsLocalSimulatorFork

Data Streams simulator for forked networks.

[DataStreamsLocalSimulatorFork](https://github.com/smartcontractkit/chainlink-local/blob/v0.3.0/src/data-streams/DataStreamsLocalSimulatorFork.sol)

## Variables

### i\_register

The immutable register instance

```solidity
Register immutable i_register
```

### LINK\_FAUCET

The address of the LINK faucet

```solidity
address constant LINK_FAUCET = 0x4281eCF07378Ee595C564a59048801330f3084eE
```

## Functions

### constructor

Constructor to initialize the contract

```solidity
constructor() ;
```

### getNetworkDetails

Returns the default values for currently Data Streams supported networks. If
network is not present or some of the values are changed, user can manually add
new network details using the `setNetworkDetails` function.

```solidity
function getNetworkDetails(uint256 chainId) external view returns (Register.NetworkDetails memory);
```

**Parameters**

| Name      | Type      | Description                                                                   |
| --------- | --------- | ----------------------------------------------------------------------------- |
| `chainId` | `uint256` | - The blockchain network chain ID. For example 11155111 for Ethereum Sepolia. |

**Returns**

| Name     | Type                      | Description                                                                                                                                                  |
| -------- | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `<none>` | `Register.NetworkDetails` | networkDetails - The tuple containing: verifierProxyAddress - The address of the Verifier Proxy smart contract. linkAddress - The address of the LINK token. |

### requestLinkFromFaucet

Requests LINK tokens from the faucet. The provided amount of tokens are
transferred to provided destination address.

```solidity
function requestLinkFromFaucet(address to, uint256 amount) external returns (bool success);
```

**Parameters**

| Name     | Type      | Description                                        |
| -------- | --------- | -------------------------------------------------- |
| `to`     | `address` | - The address to which LINK tokens are to be sent. |
| `amount` | `uint256` | - The amount of LINK tokens to send.               |

**Returns**

| Name      | Type   | Description                                                                   |
| --------- | ------ | ----------------------------------------------------------------------------- |
| `success` | `bool` | - Returns `true` if the transfer of tokens was successful, otherwise `false`. |

### requestNativeFromFaucet

Requests native coints from the faucet.

```solidity
function requestNativeFromFaucet(address to, uint256 amount) external;
```

**Parameters**

| Name     | Type      | Description                                         |
| -------- | --------- | --------------------------------------------------- |
| `to`     | `address` | - The address to which native coins are to be sent. |
| `amount` | `uint256` | - The amount of native coins to send.               |

### setNetworkDetails

If network details are not present or some of the values are changed, user can
manually add new network details using the `setNetworkDetails` function.

```solidity
function setNetworkDetails(uint256 chainId, Register.NetworkDetails memory networkDetails) external;
```

**Parameters**

| Name             | Type                      | Description                                                                                                                                   |
| ---------------- | ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `chainId`        | `uint256`                 | - The blockchain network chain ID. For example 11155111 for Ethereum Sepolia.                                                                 |
| `networkDetails` | `Register.NetworkDetails` | - The tuple containing: verifierProxyAddress - The address of the Verifier Proxy smart contract. linkAddress - The address of the LINK token. |