# web3js-1x

[`@marinade.finance/web3js-1x`](https://www.npmjs.com/package/@marinade.finance/web3js-1x)

Utilities to work with [Solana web3.js](https://github.com/solana-labs/solana-web3.js/) library
in **version 1.x**

Be aware when working with @solana/web3.js 2.x or @solana/kit use the
[`@marinade.finance/web3js-kit`](https://github.com/marinade-finance/typescript-common/tree/main/packages/web3js-kit) library.

## Usage

### Pre-requisites

The [`@marinade.finance/web3js-1x`](https://www.npmjs.com/package/@marinade.finance/web3js-1x) depends
on [`@marinade.finance/ts-common`](https://www.npmjs.com/package/@marinade.finance/ts-common) library.

```sh
pnpm add @marinade.finance/ts-common@latest
```

### Dependencies

Library defines set of `peerDependencies` that are required to be directly installed by dependent program.


```sh
pnpm add @solana/web3.js@1
pnpm add @marinade.finance/ledger-utils@latest
pnpm add @solana/buffer-layout@4.0.1
pnpm add bn.js@5.2.2
pnpm add borsh@0.7.0
pnpm add bs58@6.0.0
```

### Installation

```sh
# see Pre-requisites and Dependencies
pnpm add @marinade.finance/web3js-1x@latest
```

## History

Before refactoring this library was named as `@marinade.finance/web3js-common`
and it was published in versions `2.x.x`.
At the time, the version `@marinade.finance/web3js-common@2` was part of
the [marinade-ts-cli](https://github.com/marinade-finance/marinade-ts-cli).
After refactoring it was renamed to `@marinade.finance/web3js-1x` and the versioning started from `4.0.0`.
See history notes at [`@marinade.finance/web3js-kit`](../web3js-kit/README.md#history).