Skip to content

Commit

Permalink
Merge pull request #1 from cyberconnecthq/beta
Browse files Browse the repository at this point in the history
  • Loading branch information
akasuv committed Sep 28, 2023
2 parents f22eaec + a8c06a7 commit 90e0cac
Show file tree
Hide file tree
Showing 13 changed files with 776 additions and 192 deletions.
2 changes: 1 addition & 1 deletion .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"main",
{
"name": "beta",
"prelease": true
"prerelease": true
}
]
}
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,40 @@
# Cyber App SDK

Create a CyberWallet app easily with Cyber App SDK.

## Installation

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

## Getting Started

### Connect to CyberWallet

```typescript
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

```typescript
async function sendTransaction() {
const res = await app?.cyberWallet?.optimism
.sendTransaction({
to: "0x1234134234",
value: "0.000000000000000001",
data: "0x",
})
.catch((err: any) => console.log({ err }));
}
```
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "",
"main": "index.js",
"types": "./lib/cjs/types/index.d.ts",
"module": "./lib/esm/index.mjs",
"files": [
"lib/**/*"
],
Expand Down Expand Up @@ -50,6 +51,7 @@
"url": "https://github.com/cyberconnecthq/cyber-app-sdk.git"
},
"dependencies": {
"ts-node": "^10.9.1"
"ts-node": "^10.9.1",
"viem": "^1.8.1"
}
}
Loading

0 comments on commit 90e0cac

Please sign in to comment.