Skip to content

Commit 5b93c42

Browse files
committed
minor updates
1 parent d036b38 commit 5b93c42

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

develop/toolkit/api-libraries/dedot.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ description: Dedot is a next-gen JavaScript client for Polkadot and Polkadot SDK
2323

2424
- **Wallet integration** – works out-of-the-box with [@polkadot/extension-based](https://github.com/polkadot-js/extension?tab=readme-ov-file#api-interface){target=\_blank} wallets
2525

26-
- **Familiar API design** – similar API style with Polkadot.js for easy and fast migration
26+
- **Familiar API design** – similar API style to Polkadot.js for easy and fast migration
2727

2828
## Installation
2929

@@ -63,14 +63,14 @@ To enable auto-completion/IntelliSense for individual chains, install the [`@ded
6363

6464
## Get Started
6565

66-
### Initialize a client instance to connect to the networks
66+
### Initialize a Client Instance
6767

6868
To connect to and interact with different networks, Dedot provides two client options depending on your needs:
6969

70-
- **[DedotClient](https://docs.dedot.dev/clients-and-providers/clients#dedotclient){target=\_blank}** - interacts with chains via the [new JSON-RPC APIs](https://paritytech.github.io/json-rpc-interface-spec/introduction.html){target=\_blank}
71-
- **[LegacyClient](https://docs.dedot.dev/clients-and-providers/clients#legacyclient){target=\_blank}** - interacts with chains via the [legacy JSON-RPC APIs](https://github.com/w3f/PSPs/blob/master/PSPs/drafts/psp-6.md){target=\_blank}
70+
- **[`DedotClient`](https://docs.dedot.dev/clients-and-providers/clients#dedotclient){target=\_blank}** - interacts with chains via the [new JSON-RPC APIs](https://paritytech.github.io/json-rpc-interface-spec/introduction.html){target=\_blank}
71+
- **[`LegacyClient`](https://docs.dedot.dev/clients-and-providers/clients#legacyclient){target=\_blank}** - interacts with chains via the [legacy JSON-RPC APIs](https://github.com/w3f/PSPs/blob/master/PSPs/drafts/psp-6.md){target=\_blank}
7272

73-
Let's connect to Polkadot network using `DedotClient`:
73+
Use the following snippets to connect to Polkadot using `DedotClient`:
7474

7575
=== "WebSocket"
7676

@@ -84,21 +84,21 @@ Let's connect to Polkadot network using `DedotClient`:
8484
--8<-- "code/develop/toolkit/api-libraries/dedot/client-initialization-via-smoldot.ts"
8585
```
8686

87-
If the node doesn't support new JSON-RPC APIs yet, you can connect to the network using the `LegacyClient` which is built on top of the legacy JSON-RPC APIs.
87+
If the node doesn't support new JSON-RPC APIs yet, you can connect to the network using the `LegacyClient`, which is built on top of the legacy JSON-RPC APIs.
8888

8989
```typescript
9090
--8<-- "code/develop/toolkit/api-libraries/dedot/legacy-client-initialization.ts"
9191
```
9292

93-
### Pick a `ChainApi` interface for the connected network
93+
### Enable Type and API Suggestions
9494

95-
We recommend specifying the `ChainApi` interface (e.g: `PolkadotApi` in the example above) of the chain that you want to interact with. This enables types and APIs suggestion/autocompletion for that particular chain (via IntelliSense). If you don't specify a `ChainApi` interface, a default `SubstrateApi` interface will be used.
95+
It is recommended to specify the `ChainApi` interface (e.g., `PolkadotApi` in the example in the previous section) of the chain you want to interact with. This enables type and API suggestions/autocompletion for that particular chain (via IntelliSense). If you don't specify a `ChainApi` interface, a default `SubstrateApi` interface will be used.
9696

9797
```typescript
9898
--8<-- "code/develop/toolkit/api-libraries/dedot/pick-chainapi-interface.ts"
9999
```
100100

101-
If you don't find the `ChainApi` for the network that you're working with in [the list](https://github.com/dedotdev/chaintypes?tab=readme-ov-file#supported-networks){target=\_blank}, you can generate the `ChainApi` (types and APIs) for it using the built-in [dedot cli](https://docs.dedot.dev/cli){target=\_blank}.
101+
If you don't find the `ChainApi` for the network you're working with in [the list](https://github.com/dedotdev/chaintypes?tab=readme-ov-file#supported-networks){target=\_blank}, you can generate the `ChainApi` (types and APIs) using the built-in [`dedot` cli](https://docs.dedot.dev/cli){target=\_blank}.
102102

103103
```bash
104104
# Generate ChainApi interface for Polkadot network via rpc endpoint: wss://rpc.polkadot.io
@@ -107,7 +107,7 @@ npx dedot chaintypes -w wss://rpc.polkadot.io
107107

108108
Or open a pull request to add your favorite network to the [`@dedot/chaintypes`](https://github.com/dedotdev/chaintypes){target=\_blank} repo.
109109

110-
### Reading On-Chain Data
110+
### Read On-Chain Data
111111

112112
Dedot provides several ways to read data from the chain:
113113

@@ -149,7 +149,7 @@ Dedot provides several ways to read data from the chain:
149149
--8<-- "code/develop/toolkit/api-libraries/dedot/watch-on-chain-events.ts"
150150
```
151151

152-
### Signing & Sending Transactions
152+
### Sign and Send Transactions
153153

154154
Sign the transaction using `IKeyringPair` from Keyring ([`@polkadot/keyring`](https://polkadot.js.org/docs/keyring/start/sign-verify){target=\_blank}) and send the transaction.
155155

0 commit comments

Comments
 (0)