You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: develop/toolkit/api-libraries/dedot.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ description: Dedot is a next-gen JavaScript client for Polkadot and Polkadot SDK
23
23
24
24
-**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
25
25
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
27
27
28
28
## Installation
29
29
@@ -63,14 +63,14 @@ To enable auto-completion/IntelliSense for individual chains, install the [`@ded
63
63
64
64
## Get Started
65
65
66
-
### Initialize a client instance to connect to the networks
66
+
### Initialize a Client Instance
67
67
68
68
To connect to and interact with different networks, Dedot provides two client options depending on your needs:
69
69
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}
72
72
73
-
Let's connect to Polkadot network using `DedotClient`:
73
+
Use the following snippets to connect to Polkadot using `DedotClient`:
74
74
75
75
=== "WebSocket"
76
76
@@ -84,21 +84,21 @@ Let's connect to Polkadot network using `DedotClient`:
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.
### Pick a `ChainApi` interface for the connected network
93
+
### Enable Type and API Suggestions
94
94
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.
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}.
102
102
103
103
```bash
104
104
# Generate ChainApi interface for Polkadot network via rpc endpoint: wss://rpc.polkadot.io
Signthetransactionusing`IKeyringPair`fromKeyring ([`@polkadot/keyring`](https://polkadot.js.org/docs/keyring/start/sign-verify){target=\_blank}) and send the transaction.
0 commit comments