The JavaScript SDK supports EVM and Substrate transactions. In order to communicate and generate transactions using the peaq blockchain an instance must be created.Documentation Index
Fetch the complete documentation index at: https://docs.peaq.xyz/llms.txt
Use this file to discover all available pages before exploring further.
createInstance(baseUrl, chainType, seed)
| Parameter | Type | EVM | Substrate | Description |
|---|---|---|---|---|
| baseUrl | string | Required | Required | RPC/WSS URL used to connect to the blockchain. Reference Connecting to peaq for supported URLs. Use RPC for EVM and WSS for Substrate (and EVM reads). |
| chainType | ChainType | Required | Optional | Defines whether the instance will generate EVM or Substrate transactions (defaults to Substrate). Accessible via the SDK. |
| seed | string | N/A | Optional | Mnemonic phrase used in Substrate instances to execute write transactions on behalf of the user. |

