Skip to main content

Client

import { createShlpClient } from "@arc/shlp-sdk";

const shlp = createShlpClient({
  apiBaseUrl: "https://shlp-web-production.up.railway.app",
  signer: walletProvider,
  fetch,
});

Reads

const [config, vault, health, position] = await Promise.all([
  shlp.getConfig(),
  shlp.getVault(),
  shlp.getHealth(),
  shlp.getPosition(userAddress),
]);

Transactions

All action endpoints return API transaction objects. Send them through the SDK:
await shlp.sendApiTransaction(quote.tx, userAddress);
The SDK should verify HyperEVM chain 999 before sending.

Action lifecycle

Poll action status after sending a transaction or when rendering an existing redeem request:
const byTx = await shlp.getActionStatus({
  wallet: userAddress,
  txHash,
});

const byRedeem = await shlp.getActionStatus({
  wallet: userAddress,
  redeemId: "2",
});
Use status.steps to drive user-facing progress UI. Do not expose internal keeper logs directly.

Type generation

The web/API repo can regenerate OpenAPI client types:
API_BASE=https://shlp-web-production.up.railway.app npm run typegen:api
npm run typecheck:api