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. SOL uses the bundled production pool. No API URL or SOL pool override is needed. 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 |
| Method argument type | Inspect request types and their declaration comments, including string-union aliases |
| Wallet defaults | Apply connected-wallet values where relevant |
| Raw result view | Inspect return payloads |
The execution mode defaults to Mock wallet, which does not open wallet prompts. SDK calls still use production and can change protocol state. Select Connected wallet to sign messages or send transfers with an ETH or SOL wallet. This mode ignores mock signatures and transaction IDs for wallet execution. Review the account, destination, and amount before running a method.
Start the example
Use Node.js 22.22.3 or later in the 22.x line, 24.x, or 26 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.