> ## Documentation Index
> Fetch the complete documentation index at: https://docs.solanamobile.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Web3.js Reference

> Interact with accounts and programs on the Solana network through the Solana JSON RPC API.

export const Button = ({href, children}) => {
  return <div className="not-prose group mt-3">
      <a href={href}>
        <button className="flex items-center space-x-2.5 py-1 px-4 bg-primary-dark dark:bg-white text-white dark:text-gray-950 rounded-xl group-hover:opacity-[0.9] font-medium">
          <span>{children}</span>
        </button>
      </a>
    </div>;
};

Interact with accounts and programs on the
Solana network through the Solana [JSON RPC API](https://docs.solana.com/api/http).

<Button href="https://solana-labs.github.io/solana-web3.js/">
  API Reference
</Button>

### Install dependencies

<CodeGroup>
  ```shell yarn theme={null}
  yarn add \
    @solana/web3.js \
    react-native-get-random-values \
    react-native-url-polyfill \
    @craftzdog/react-native-buffer
  ```

  ```shell npm theme={null}
  npm install \
    @solana/web3.js \
    react-native-get-random-values \
    react-native-url-polyfill \
    @craftzdog/react-native-buffer
  ```
</CodeGroup>

### Polyfills

Enable all of them in `index.js`

```typescript theme={null}
import "react-native-get-random-values";
import "react-native-url-polyfill/auto";
import { Buffer } from "@craftzdog/react-native-buffer";
global.Buffer = Buffer;
```
