Skip to content

Commit

Permalink
doc: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
akasuv committed Sep 25, 2023
1 parent f9cfcfc commit 04a5615
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,38 @@
# Cyber App SDK

Create a CyberWallet app easily with Cyber App SDK.

## Installation

```bash
npm install cyber-app-sdk
```

## Getting Started

### Connect to CyberWallet

```javascript
import { CyberApp } from "@cyberlab/cyber-app-sdk";

const app = new CyberApp({ name: "testapp" });
const { connected } = await app.start();

if (connected) {
console.log("Connected to CyberWallet");
} else {
console.log("Connection to CyberWallet failed");
}
```

### Send a transaction

```javascript
const res = await app?.cyberWallet
?.sendTransaction({
to: address,
value: parseUnits("0.0001", 18),
data: "0x",
})
.catch((err: any) => console.log({ err }));
```

0 comments on commit 04a5615

Please sign in to comment.