Skip to content
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