# @shadow-drive/sdk

> Interfaces for GenesysGo ShadowDrive

Latest version **6.0.0** (published 2024-07-12) · SEE LICENSE IN LICENSE license · 0 weekly downloads

## Install

```sh
npm install @shadow-drive/sdk
pnpm add @shadow-drive/sdk
yarn add @shadow-drive/sdk
bun add @shadow-drive/sdk
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 6.0.0 |
| Published | 2024-07-12 |
| First published | 2022-05-13 |
| Weekly downloads | 0 |
| License | SEE LICENSE IN LICENSE |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 9 |
| Unpacked size | 779.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 80 |
| Maintainers | gengotracy, khalilnafis |

## Links

- npm: https://www.npmjs.com/package/@shadow-drive/sdk
- Repository: https://github.com/GenesysGo/shadow-drive
- Homepage: https://github.com/GenesysGo/shadow-drive#readme
- Issues: https://github.com/GenesysGo/shadow-drive/issues
- npm.io page: https://npm.io/package/@shadow-drive/sdk

## Dependencies (9)

- [rxjs](https://npm.io/package/rxjs.md) ^7.5.5
- [form-data](https://npm.io/package/form-data.md) ^4.0.0
- [tweetnacl](https://npm.io/package/tweetnacl.md) ^1.0.3
- [node-fetch](https://npm.io/package/node-fetch.md) 2
- [cross-fetch](https://npm.io/package/cross-fetch.md) ^3.1.5
- [@types/bn.js](https://npm.io/package/@types/bn.js.md) ^5.1.1
- [@coral-xyz/borsh](https://npm.io/package/@coral-xyz/borsh.md) ^0.28.0
- [@coral-xyz/anchor](https://npm.io/package/@coral-xyz/anchor.md) ^0.27.0
- [@solana/spl-token](https://npm.io/package/@solana/spl-token.md) ^0.2.0

## Recent versions

- 6.0.0 (latest) — 2024-07-12
- 4.0.1-beta.0 (beta) — 2023-06-23
- 4.0.0-rc1 (next) — 2023-05-16
- 5.1.1 — 2024-06-08
- 5.1.0 — 2024-06-07
- 5.0.0 — 2023-08-22
- 4.1.0 — 2023-08-22
- 4.0.3 — 2023-07-14
- 4.0.2 — 2023-06-27
- 4.0.1 — 2023-05-22
- 4.0.0 — 2023-05-22
- 3.3.0 — 2023-03-15
- 3.2.2 — 2023-02-28
- 3.2.1 — 2023-02-27
- 3.2.0 — 2023-02-27
- … 26 more at https://npm.io/package/@shadow-drive/sdk/versions

## README

<div align="center">
  <img height="170x" src="https://github.com/GenesysGo/shadow-drive/raw/main/assets/genesysgo.jpeg" />

  <h1>Shadow Drive</h1>
   <p>
    <a href="https://genesysgo.github.io/shadow-drive/"><img alt="Docs" src="https://img.shields.io/badge/docs-typedoc-blueviolet" /></a>
	</p>
</div>

Typescript components for Shadow Drive.

## Quick Setup

### Install

Install these dependencies:

```shell
yarn add @shadow-drive/sdk
```

### Setup (React)

```tsx
import React, { useEffect } from "react";
import * as anchor from "@coral-xyz/anchor";
import { ShdwDrive } from "@shadow-drive/sdk";
import {
    AnchorWallet,
    useAnchorWallet,
    useConnection,
} from "@solana/wallet-adapter-react";

export default function Drive() {
    const { connection } = useConnection();
    const wallet = useAnchorWallet();
    useEffect(() => {
        (async () => {
            if (wallet?.publicKey) {
                const drive = await new ShdwDrive(connection, wallet).init();
            }
        })();
    }, [wallet?.publicKey]);
    return <div></div>;
}
```

### Setup (NodeJS)

```js
import { ShdwDrive } from "@shadow-drive/sdk";
import * as web3 from "@solana/web3.js";
const connection = new web3.Connection("{rpc-url}", "confirmed");
const drive = await new ShdwDrive(connection, wallet).init();
```

### Examples

| package                                                                   | description                                       |
| ------------------------------------------------------------------------- | ------------------------------------------------- |
| [react](https://github.com/GenesysGo/shadow-drive/tree/main/examples/web) | Using shadow-drive in a react/browser environment |

### Build From Source

1. Clone the project:

```shell
git clone https://github.com/genesysgo/shadow-drive.git
```

2. Install dependencies:

```shell
cd shadow-drive
yarn install
```

---
_Source: https://npm.io/package/@shadow-drive/sdk · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
