@vercora-protocol/sdk 0.0.13 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/agents/skill.md +30 -0
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -47,6 +47,7 @@ Most transaction methods use **`provider.wallet.publicKey`** as the signer (`use
|
|
|
47
47
|
| `types` | Params and account shapes (`CreateMarketParams`, `ListedMarket`, …). |
|
|
48
48
|
| `marketUi` | Pure UI helpers (`getMarketLifecycleStatus`, `formatTimeLeft`, …). |
|
|
49
49
|
| `Vercora` (type) | Anchor `Program` generic for `Program<Vercora>`. |
|
|
50
|
+
| `agents/skill.md` | Short **AI agent entrypoint** (also mirrored at `{BASE}/agents/skill.md` on the Vercora web app). |
|
|
50
51
|
|
|
51
52
|
---
|
|
52
53
|
|
|
@@ -495,6 +496,8 @@ import type {
|
|
|
495
496
|
|
|
496
497
|
## AI agent integration
|
|
497
498
|
|
|
499
|
+
Start from **`agents/skill.md`** in this package for a stable entrypoint; the full playbook is available at **`{BASE}/agents/playbook.md`** on a deployed Vercora web app, or as `docs/AI-AGENT-SDK-PLAYBOOK.md` in the monorepo.
|
|
500
|
+
|
|
498
501
|
1. **Bootstrap**: `Connection` → `AnchorProvider` → `Program<Vercora>` from `IDL` → `PredictionMarketClient`.
|
|
499
502
|
2. **Branch**: `fetchMarket` → `market.marketType` (`completeSet` vs `parimutuel`).
|
|
500
503
|
3. **Flows**:
|
package/agents/skill.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Vercora Protocol — agent skill entry (`@vercora-protocol/sdk`)
|
|
2
|
+
|
|
3
|
+
This file ships **inside** the npm package (`agents/skill.md`) so AI agents, clawbots, and operator scripts can load instructions without depending on a particular website.
|
|
4
|
+
|
|
5
|
+
## What to read
|
|
6
|
+
|
|
7
|
+
1. **This package’s `README.md`** — install, exports, `PredictionMarketClient` API, and the **AI agent integration** section (workflow map).
|
|
8
|
+
2. **Full playbook** (longer, skills + pitfalls + decision trees) — one of:
|
|
9
|
+
- **Deployed app:** `GET {BASE}/agents/playbook.md` (replace `BASE` with the site origin, e.g. `https://vercora.xyz`).
|
|
10
|
+
- **Monorepo:** `prediction_market/docs/AI-AGENT-SDK-PLAYBOOK.md` (same content as the web mirror).
|
|
11
|
+
|
|
12
|
+
Treat the playbook as the source of truth for call order, branching, and edge cases. Pin `BASE` to the same cluster/RPC policy you use for transactions.
|
|
13
|
+
|
|
14
|
+
## Canonical URLs (when a web app is available)
|
|
15
|
+
|
|
16
|
+
| Resource | Path |
|
|
17
|
+
|----------|------|
|
|
18
|
+
| Full playbook (markdown) | `{BASE}/agents/playbook.md` |
|
|
19
|
+
| This entry (markdown) | `{BASE}/agents/skill.md` |
|
|
20
|
+
| Pointer manifest (JSON) | `{BASE}/.well-known/vercora-agents.json` |
|
|
21
|
+
|
|
22
|
+
## NPM
|
|
23
|
+
|
|
24
|
+
- Package: `@vercora-protocol/sdk`
|
|
25
|
+
- See `package.json` for the published version; align Anchor program + IDL with the same release when possible.
|
|
26
|
+
|
|
27
|
+
## Quick guardrails (parimutuel)
|
|
28
|
+
|
|
29
|
+
- After `fetchMarket(marketPda)`, read **`isEarlyWithdrawAllowed`**. If `false`, do not propose **`parimutuelWithdraw`** until close/resolution (on-chain error **`EarlyWithdrawNotAllowed`**). Creators may change this with **`updateParimutuelState`** (with penalty bps).
|
|
30
|
+
- Use **`isClosedEarly`**, **`isVoided`**, **`winningOutcomeIndex`** for lifecycle — not legacy `closed` / `voided` / `resolvedOutcomeIndex` names.
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercora-protocol/sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.14",
|
|
4
4
|
"description": "TypeScript SDK for the Vercora protocol on Solana",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist",
|
|
9
|
-
"README.md"
|
|
9
|
+
"README.md",
|
|
10
|
+
"agents"
|
|
10
11
|
],
|
|
11
12
|
"publishConfig": {
|
|
12
13
|
"access": "public",
|