Run the SDK method query example
Use examples/sdk-method-query to call SDK methods from a Vite React app that loads Dynamic.
This example uses bundled mainnet canister and production service defaults. It exposes state-changing SDK methods that can create protocol state or submit wallet transactions. Review the selected method and all arguments before you select Run method.
The method query screen provides the following capabilities:
| Capability | Use |
|---|---|
| Method dropdown | Pick an SDK method |
| JSON editor | Edit method arguments |
| Wallet defaults | Apply connected-wallet values where relevant |
| Raw result view | Inspect return payloads |
Start the example
Use Node.js 20.19 or later in the 20.x line, or Node.js 22.12 or later. Use
pnpm 11 or later.
To start the example, follow these steps:
-
From the SDK root, install the workspace dependencies:
pnpm install -
Optional: To enable Ethereum reads, copy the environment template:
cp examples/sdk-method-query/.env.example examples/sdk-method-query/.envSet
VITE_EVM_RPC_URLto a complete Ethereum mainnet Remote Procedure Call (RPC) URL, or setVITE_INFURA_API_KEYto an Infura API key. Values with theVITE_prefix are included in the browser bundle. Use only browser-safe, restricted credentials. -
Start the example:
pnpm --filter @liquidium/example-sdk-method-query dev -
Open the local URL that Vite prints.
The page shows SDK Method Query when the example starts.
Included method templates cover account, market, position, activity, history, quote, lending, and Simple Loans methods.