3.2.0 • Published 7 months ago
react-native-shadow-drive v3.2.0
Typescript components for Shadow Drive.
Quick Setup
Install
Install these dependencies:
yarn add @shadow-drive/sdk
Setup (React)
import React, { useEffect } from "react";
import * as anchor from "@project-serum/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)
import { ShdwDrive } from "@shadow-drive/sdk";
import * as web3 from "@solana/web3.js";
const connection = new web3.Connection("{rpc-url}", "processed");
const drive = await new ShdwDrive(connection, wallet).init();
Examples
package | description |
---|---|
react | Using shadow-drive in a react/browser environment |
Build From Source
- Clone the project:
git clone https://github.com/genesysgo/shadow-drive.git
- Install dependencies:
cd shadow-drive
yarn install
3.1.9
7 months ago
3.2.0
7 months ago
3.1.8
1 year ago
3.1.7
1 year ago
3.1.6
1 year ago
3.1.5
1 year ago
3.1.4
1 year ago
3.1.3
1 year ago
3.1.2
1 year ago
3.1.1
2 years ago
3.1.0
2 years ago
3.0.9991
2 years ago
3.0.999
2 years ago
3.0.998
2 years ago
3.0.997
2 years ago
3.0.996
2 years ago
3.0.995
2 years ago
3.0.994
2 years ago
3.0.993
2 years ago
3.0.992
2 years ago
3.0.991
2 years ago
3.0.98
2 years ago
3.0.97
2 years ago
3.0.96
2 years ago
3.0.95
2 years ago
3.0.94
2 years ago
3.0.93
2 years ago
3.0.92
2 years ago
3.0.91
2 years ago
3.0.9
2 years ago
3.0.8
2 years ago