Skip to content

Add Polkadot integration #44

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -936,6 +936,42 @@ The optional parameters that the object takes in are: value, contractAbi, gas pr
}
```

## PolkadotChain Usage

### Initialize PolkadotChain

```typescript

import { PolkadotChain } from './services/wallet/chains/polkadot';

const polkadot = new PolkadotChain();
await polkadot.init();


// Generate a wallet

const wallet = await polkadot.generateWallet();
console.log(wallet);


// Get Balance

const balance = await polkadot.getBalance('address');
console.log(balance);

// Disconnect

await polkadot.disconnect();
```

## RPC Requirements

The `PolkadotChain` class requires a WebSocket RPC endpoint.

```typescript
await polkadot.init('wss://custom-rpc-url');
```

### Want to contribute?

Contributions are welcome! Kindly refer to the [contribution guidelines](CONTRIBUTING.md).
Loading