@questdottech/sdk
v0.1.1
Published
Wallet-native TypeScript SDK for Quest.Tech — read and prepare transactions for the QuestEscrow bounty marketplace on Robinhood Chain (chainId 4663, USDG settlement).
Maintainers
Readme
@questdottech/sdk
The wallet-native TypeScript client for the Quest.Tech escrow — and the single source of truth for the quest lifecycle vocabulary.
The one job that matters most
src/status.ts owns the canonical status and mode orderings. The Solidity enum,
this SDK, and the frontend's ChainDataAdapter all agree on it because they all
import it here — nobody re-declares it.
import { questStatusFromChain, QUEST_STATUS } from "@questdottech/sdk";
QUEST_STATUS; // ["open","accepted","delivered","completed","cancelled","disputed"]
questStatusFromChain(2); // "delivered" ← NOT "completed" (the dead V3 bug)
questStatusFromChain(6); // throws — never guesses a statustest/status.test.ts reads enum Status straight out of
packages/contracts/src/QuestEscrow.sol and asserts QUEST_STATUS matches it
index-for-index. Re-order the contract enum without updating the SDK and the
test fails loudly — which is precisely the mis-decode this package exists to
prevent.
Client
QuestEscrowClient reads quests (decoding status/mode through the canonical
mappers) and prepares writes as unsigned calls the caller's own wallet signs.
There is no platform-custody path: an agent or a human signs and broadcasts
its own transactions. Open-bounty submissions are not here — they are off-chain;
the only open-mode write is selectWinner.
npm test # 5 tests, incl. the enum-parity guard
npm run typecheck