---
title: Typescript SDK
description:
  Learn how to interact with Solana using the JavaScript/TypeScript client
  library (@solana/web3.js).
h1: JavaScript SDK for Solana
---

## Packages

There are two packages that are useful for developing with Typescript:

- [`@solana/web3.js`](https://www.npmjs.com/package/@solana/web3.js)
- [`@solana/wallet-adapter`](https://github.com/anza-xyz/wallet-adapter)

You'll be able to create a scaffold using both of these using `npx create-solana-dapp`.

## Installation

### yarn

```shell  title="Terminal"
yarn add @solana/web3.js@1
```

### npm

```shell  title="Terminal"
npm install --save @solana/web3.js@1
```

### Bundle

```html  title="index.html"
<!-- Development (un-minified) -->
<script src="https://unpkg.com/@solana/web3.js@latest/lib/index.iife.js"></script>

<!-- Production (minified) -->
<script src="https://unpkg.com/@solana/web3.js@latest/lib/index.iife.min.js"></script>
```

## Usage

#### Javascript

```javascript
const solanaWeb3 = require("@solana/web3.js");
console.log(solanaWeb3);
```

#### ES6

```javascript
import * as solanaWeb3 from "@solana/web3.js";
console.log(solanaWeb3);
```

#### Browser Bundle

```javascript
// solanaWeb3 is provided in the global namespace by the bundle script
console.log(solanaWeb3);
```

