@vercora-protocol/sdk 0.0.19 → 0.0.21
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/CHANGELOG.md +16 -0
- package/README.md +87 -30
- package/agents/skill.md +16 -5
- package/dist/client.d.ts +25 -3
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +157 -9
- package/dist/client.js.map +1 -1
- package/dist/generated/vercora.d.ts +1388 -137
- package/dist/generated/vercora.d.ts.map +1 -1
- package/dist/idl/vercora.json +1389 -138
- package/dist/pda.d.ts +5 -1
- package/dist/pda.d.ts.map +1 -1
- package/dist/pda.js +8 -2
- package/dist/pda.js.map +1 -1
- package/dist/types.d.ts +61 -4
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,22 @@ All notable changes to `@vercora-protocol/sdk` are documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
7
|
|
|
8
|
+
### [0.0.21](https://github.com/vercora/vercora-anchor/compare/v0.0.20...v0.0.21) (2026-04-17)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **all:** add bonded staked vote ([d7dc0c3](https://github.com/vercora/vercora-anchor/commit/d7dc0c3d22b6ab005a0be6a17bc6922d7a1da266))
|
|
14
|
+
|
|
15
|
+
### [0.0.20](https://github.com/vercora/vercora-anchor/compare/v0.0.19...v0.0.20) (2026-04-16)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* **all:** add min and max stake allowed per wallet ([ecac974](https://github.com/vercora/vercora-anchor/commit/ecac974c671140fc4a65d3a2aded958fc830cda5))
|
|
21
|
+
|
|
22
|
+
### [0.0.20](https://github.com/vercora/vercora-anchor/compare/v0.0.19...v0.0.20) (2026-04-16)
|
|
23
|
+
|
|
8
24
|
### [0.0.19](https://github.com/vercora/vercora-anchor/compare/v0.0.18...v0.0.19) (2026-04-12)
|
|
9
25
|
|
|
10
26
|
|
package/README.md
CHANGED
|
@@ -47,7 +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** (production: `https://vercora.xyz/agents/skill.md`). |
|
|
50
|
+
| `agents/skill.md` | Short **AI agent entrypoint** (production: `https://vercora.xyz/agents/skill.md`). Human UI with the same resolution narrative: **`https://vercora.xyz/docs/agents`**. |
|
|
51
51
|
|
|
52
52
|
---
|
|
53
53
|
|
|
@@ -84,9 +84,13 @@ Public properties: **`program`**, **`connection`**, **`globalConfig`** (PDA).
|
|
|
84
84
|
| `initializeMarketMints(marketPda, marketId)` | Mint 8 outcome SPLs (complete-set only). |
|
|
85
85
|
| `initializeParimutuelState(marketPda, params)` | Standalone pari pool + penalty params (if not bundled with resolvers). |
|
|
86
86
|
| `createMarketFull(creator, collateralMint, creatorFeeAccount, resolverPubkeys, params)` | Runs create → outcomes → resolvers (+ mints **or** pari state in one flow). |
|
|
87
|
-
| `updateParimutuelState(marketPda, params)` | Creator updates penalty split and **`
|
|
87
|
+
| `updateParimutuelState(marketPda, params)` | Creator updates penalty split, **`isEarlyWithdrawAllowed`**, **`maxWalletOutcomeInvestment`**, and **`isWalletOutcomeStakeExact`** (open pari pool). |
|
|
88
88
|
|
|
89
|
-
**`CreateMarketParams` (pari-mutuel):** optional **`isEarlyWithdrawAllowed`** (default **`true`**). **`
|
|
89
|
+
**`CreateMarketParams`:** requires **`platformId`** (**`> 0`**, BN) with a registered platform + **`upsertPlatformProfile`** (resolver stake, challenge window, and refute bond are set on the profile — not per market). **`CreateMarketParams` (pari-mutuel):** optional **`isEarlyWithdrawAllowed`** (default **`true`**). Optional **`maxWalletOutcomeInvestment`** (`BN`, **`0`** = unlimited per-wallet per-outcome net stake cap in collateral base units). Optional **`isWalletOutcomeStakeExact`**: when **`true`** (parimutuel only), each stake must bring the wallet’s net on that outcome to **exactly** `maxWalletOutcomeInvestment`; requires **`maxWalletOutcomeInvestment > 0`**. Setting exact mode on a complete-set market fails with **`InvalidWalletOutcomeStakeExactConfig`**. Ignored for complete-set markets otherwise.
|
|
90
|
+
|
|
91
|
+
**`UpdateParimutuelStateParams`:** every call writes **all** fields — pass **current** values from **`fetchMarket`** / **`fetchParimutuelState`** for anything you are not changing. Includes **`earlyWithdrawPenaltyBps`**, **`penaltyKeptInPoolBps`**, **`isEarlyWithdrawAllowed`**, **`maxWalletOutcomeInvestment`**, **`isWalletOutcomeStakeExact`**. If **`isWalletOutcomeStakeExact`** is **`true`**, **`maxWalletOutcomeInvestment`** must be **> 0** (same rule as create). Use this to tighten or relax per-wallet caps and to toggle exact vs ceiling mode **after** launch (market must still be open and not resolved/voided).
|
|
92
|
+
|
|
93
|
+
When **`isEarlyWithdrawAllowed`** is **`false`**, early **`parimutuelWithdraw`** fails with **`EarlyWithdrawNotAllowed`** until close or resolution **(voided markets are exempt — full net-stake refunds, no penalty fees).** Read **`fetchMarket(marketPda)`** for **`isEarlyWithdrawAllowed`**, **`maxWalletOutcomeInvestment`**, **`isWalletOutcomeStakeExact`**.
|
|
90
94
|
|
|
91
95
|
### Complete-set trading
|
|
92
96
|
|
|
@@ -108,14 +112,21 @@ Public properties: **`program`**, **`connection`**, **`globalConfig`** (PDA).
|
|
|
108
112
|
|
|
109
113
|
| Method | Purpose |
|
|
110
114
|
| ----------------------------------------- | --------------------------------------------- |
|
|
111
|
-
| `voteResolution(marketPda, params)` | Resolver vote.
|
|
112
|
-
| `revokeResolutionVote(marketPda, params)` | Clear vote before changing.
|
|
113
|
-
| `finalizeResolution(marketPda, params)` |
|
|
115
|
+
| `voteResolution(marketPda, params)` | Resolver vote; may escrow **resolver stake** to the market’s resolver stake vault (see platform policy). |
|
|
116
|
+
| `revokeResolutionVote(marketPda, params)` | Clear vote before changing (blocked once a proposal exists). |
|
|
117
|
+
| `finalizeResolution(marketPda, params)` | When M-of-N agree on one outcome, **proposes** that outcome — sets `ResolutionState.proposed_outcome` + `proposal_ts`; does **not** set `Market.winning_outcome_index` yet. |
|
|
118
|
+
| `confirmResolution(marketPda, params)` | After the **challenge window** elapses with **no open dispute**, anyone can call this to set **`Market.winning_outcome_index`** (final approval / settlement). |
|
|
119
|
+
| `openRefute(marketPda, params)` | During the challenge window: post a **refute bond** and name an alternative winning outcome (dispute). |
|
|
120
|
+
| `resolveRefute(marketPda, params)` | Authority dismisses an open refute (signer: `GlobalConfig.dispute_resolution_authority`, or primary/secondary if unset, or platform `profileAuthority`). |
|
|
121
|
+
| `claimResolverStake(marketPda, params)` | After resolution: resolver claims stake back or protocol routes slash per rules. |
|
|
122
|
+
| `fetchResolutionState(marketPda)` | Read proposal, dispute, refute bond locked (`ResolutionState`). Challenge length and resolver stake size come from **`fetchPlatformProfile`**. |
|
|
114
123
|
| `closeMarketEarly(marketPda, params)` | Creator / config authority before `close_at`. |
|
|
115
124
|
| `voidMarket(marketPda, params)` | Void market. **Creator** cannot void while pari **outcome pools** (active stakes) or complete-set outstanding is non-zero — use a **global config** authority to cancel live markets. Parimutuel: then **`parimutuelWithdraw`** for full net refunds. |
|
|
116
125
|
| `claimVoidedParimutuelSurplus(marketPda, params)` | **Global config authority only.** After void, if pari **outcome pools** are zero but **`total_pool`** still holds early-exit **pool-keep** (no stakers left), sweeps that amount from the vault to the platform treasury. |
|
|
117
126
|
| `abandonMarket(marketPda, params)` | Creator abandons empty market (reclaim rent). |
|
|
118
127
|
|
|
128
|
+
See **[Resolution approval flow](#resolution-approval-flow-propose--challenge--confirm)** below for the full sequence and SDK usage.
|
|
129
|
+
|
|
119
130
|
### Discovery & reads
|
|
120
131
|
|
|
121
132
|
| Method | Purpose |
|
|
@@ -135,6 +146,7 @@ Public properties: **`program`**, **`connection`**, **`globalConfig`** (PDA).
|
|
|
135
146
|
| `fetchMarketCategory(categoryPda)` | One category. |
|
|
136
147
|
| `fetchAllMarketCategories()` | All categories (sorted). |
|
|
137
148
|
| `fetchResolutionVote(marketPda, resolverIndex)` | Vote PDA or null. |
|
|
149
|
+
| `fetchResolutionState(marketPda)` | Proposal, dispute, refute bond (`ResolutionState` PDA). Use **`fetchPlatformProfile`** for challenge window and resolver stake. |
|
|
138
150
|
| `fetchMarketOutcomesSnapshot(marketPda, outcomeCount)` | Decoded outcomes + tallies. |
|
|
139
151
|
| `fetchOutcomeTallyCounts(marketPda)` | Quick tally array. |
|
|
140
152
|
| `fetchAllowedCollateralMints()` | Allowlist mints. |
|
|
@@ -212,7 +224,7 @@ const { marketPda } = await client.createMarket(
|
|
|
212
224
|
maxOutcomeInvestment: new BN(0),
|
|
213
225
|
title: "Will it rain tomorrow?",
|
|
214
226
|
marketType: "completeSet",
|
|
215
|
-
platformId: new BN(
|
|
227
|
+
platformId: new BN(1), // must be > 0 — register_platform + upsert_platform_profile first
|
|
216
228
|
categoryId: new BN(0),
|
|
217
229
|
},
|
|
218
230
|
);
|
|
@@ -250,6 +262,8 @@ const marketPda = await client.createMarketFull(
|
|
|
250
262
|
title: "Two-outcome market",
|
|
251
263
|
marketType: "completeSet",
|
|
252
264
|
outcomeLabels: ["Yes", "No"],
|
|
265
|
+
platformId: new BN(1),
|
|
266
|
+
categoryId: new BN(0),
|
|
253
267
|
},
|
|
254
268
|
);
|
|
255
269
|
```
|
|
@@ -274,6 +288,8 @@ const marketPda = await client.createMarketFull(
|
|
|
274
288
|
title: "Pari pool",
|
|
275
289
|
marketType: "parimutuel",
|
|
276
290
|
outcomeLabels: ["A", "B"],
|
|
291
|
+
platformId: new BN(1),
|
|
292
|
+
categoryId: new BN(0),
|
|
277
293
|
// Optional — default true. Set false to lock stakes until close/resolution (no early parimutuelWithdraw).
|
|
278
294
|
isEarlyWithdrawAllowed: true,
|
|
279
295
|
parimutuelInit: {
|
|
@@ -350,9 +366,9 @@ const state = await client.fetchParimutuelState(marketPda);
|
|
|
350
366
|
const odds = client.computeParimutuelOdds(state, 2);
|
|
351
367
|
```
|
|
352
368
|
|
|
353
|
-
### Creator: update
|
|
369
|
+
### Creator: update pari pool settings (`updateParimutuelState`)
|
|
354
370
|
|
|
355
|
-
Only the **market creator** can call this while the market is open (not resolved/voided). Pass **current**
|
|
371
|
+
Only the **market creator** can call this while the market is open (not resolved/voided). The instruction updates **penalty bps**, **early-withdraw allowance**, and **per-wallet per-outcome stake rules** in one transaction. Pass **current** values from **`fetchParimutuelState`** and **`fetchMarket`** for any field you are not changing:
|
|
356
372
|
|
|
357
373
|
```ts
|
|
358
374
|
const m = await client.fetchMarket(marketPda);
|
|
@@ -363,18 +379,36 @@ await client.updateParimutuelState(marketPda, {
|
|
|
363
379
|
earlyWithdrawPenaltyBps: pari.earlyWithdrawPenaltyBps,
|
|
364
380
|
penaltyKeptInPoolBps: pari.penaltyKeptInPoolBps,
|
|
365
381
|
isEarlyWithdrawAllowed: false, // block parimutuelWithdraw until close/resolution
|
|
382
|
+
maxWalletOutcomeInvestment: m.maxWalletOutcomeInvestment, // keep existing cap
|
|
383
|
+
isWalletOutcomeStakeExact: m.isWalletOutcomeStakeExact, // keep exact vs ceiling mode
|
|
366
384
|
});
|
|
367
385
|
|
|
368
|
-
// Re-enable early exit later:
|
|
386
|
+
// Re-enable early exit later (still pass wallet fields from `m`):
|
|
369
387
|
await client.updateParimutuelState(marketPda, {
|
|
370
388
|
marketId,
|
|
371
389
|
earlyWithdrawPenaltyBps: pari.earlyWithdrawPenaltyBps,
|
|
372
390
|
penaltyKeptInPoolBps: pari.penaltyKeptInPoolBps,
|
|
373
391
|
isEarlyWithdrawAllowed: true,
|
|
392
|
+
maxWalletOutcomeInvestment: m.maxWalletOutcomeInvestment,
|
|
393
|
+
isWalletOutcomeStakeExact: m.isWalletOutcomeStakeExact,
|
|
394
|
+
});
|
|
395
|
+
|
|
396
|
+
// Example: set a per-wallet cap (base units) and ceiling mode only:
|
|
397
|
+
await client.updateParimutuelState(marketPda, {
|
|
398
|
+
marketId,
|
|
399
|
+
earlyWithdrawPenaltyBps: pari.earlyWithdrawPenaltyBps,
|
|
400
|
+
penaltyKeptInPoolBps: pari.penaltyKeptInPoolBps,
|
|
401
|
+
isEarlyWithdrawAllowed: m.isEarlyWithdrawAllowed,
|
|
402
|
+
maxWalletOutcomeInvestment: new BN(1_000_000),
|
|
403
|
+
isWalletOutcomeStakeExact: false,
|
|
374
404
|
});
|
|
375
405
|
```
|
|
376
406
|
|
|
377
|
-
|
|
407
|
+
Staking errors when caps apply: **`WalletOutcomeInvestmentCapExceeded`** (6050), **`WalletOutcomeExactStakeMismatch`** (6052) when exact mode is on, **`InvalidWalletOutcomeStakeExactConfig`** (6051) if exact mode is enabled with a zero cap (create or update).
|
|
408
|
+
|
|
409
|
+
### Resolution (minimal)
|
|
410
|
+
|
|
411
|
+
Resolvers vote, then **`finalizeResolution`** records a **proposal**. After the **challenge window**, if no dispute blocks confirmation, **`confirmResolution`** sets the final winner on the market account. See the full flow in the next section.
|
|
378
412
|
|
|
379
413
|
```ts
|
|
380
414
|
await client.voteResolution(marketPda, {
|
|
@@ -383,7 +417,11 @@ await client.voteResolution(marketPda, {
|
|
|
383
417
|
outcomeIndex: 1,
|
|
384
418
|
});
|
|
385
419
|
|
|
420
|
+
// Records proposed_outcome + proposal_ts when M-of-N threshold is met (not final settlement yet).
|
|
386
421
|
await client.finalizeResolution(marketPda, { marketId });
|
|
422
|
+
|
|
423
|
+
// After challenge_window_secs (and no open refute blocking), anyone confirms final outcome:
|
|
424
|
+
await client.confirmResolution(marketPda, { marketId });
|
|
387
425
|
```
|
|
388
426
|
|
|
389
427
|
### Discovery
|
|
@@ -418,21 +456,49 @@ const profile = await client.fetchUserProfile(wallet.publicKey);
|
|
|
418
456
|
|
|
419
457
|
---
|
|
420
458
|
|
|
459
|
+
## Resolution approval flow (propose → challenge → confirm)
|
|
460
|
+
|
|
461
|
+
Settlement is **two-phase**: first a **proposal** is recorded on `ResolutionState`, then — after an optional **challenge window** — the market is **approved** into a final winner on the `Market` account.
|
|
462
|
+
|
|
463
|
+
1. **Platform prerequisite** — `create_market` requires **`platform_id > 0`**: a registered **`PlatformRegistry`**, an initialized **`PlatformProfile`** (single **`resolver_stake`**, **`challenge_window_secs`**, **`refute_bond`** for that platform), and PDAs for **`resolution_state`** and **`resolver_stake_vault`**.
|
|
464
|
+
|
|
465
|
+
2. **Votes** — Each assigned resolver calls **`voteResolution`** with their outcome. Votes update per-outcome tallies; resolver **stake** (from **`PlatformProfile.resolver_stake`**) transfers into the market’s **resolver stake vault**.
|
|
466
|
+
|
|
467
|
+
3. **Propose (`finalizeResolution`)** — When at least **`resolution_threshold`** resolvers agree on the **same** outcome, anyone may call **`finalizeResolution`**. On-chain this **does not** immediately set `Market.winning_outcome_index`. It sets **`ResolutionState.proposed_outcome`**, **`proposal_ts`**, and starts the **challenge window** (duration from **`PlatformProfile.challenge_window_secs`**).
|
|
468
|
+
|
|
469
|
+
4. **Challenge window** — Until **`proposal_ts + challenge_window_secs`** elapses, a participant may **`openRefute`** with **exactly** **`platform_profile.refute_bond`**: lock that collateral and assert a **different** winning outcome. An authorized party (global **dispute resolution authority**, or platform **profile authority** when configured) may **`resolveRefute`** to dismiss a refute. While a dispute is active, **`confirmResolution`** is rejected.
|
|
470
|
+
|
|
471
|
+
5. **Confirm (final approval)** — After **`proposal_ts + challenge_window`**, if there is **no** blocking dispute, anyone calls **`confirmResolution`**. This writes **`Market.winning_outcome_index`** — the outcome is now final for **`redeemWinning`** / **`parimutuelClaim`**.
|
|
472
|
+
|
|
473
|
+
6. **Resolver stake** — After settlement, resolvers use **`claimResolverStake`** to recover escrowed stake or accept protocol routing of bonds per rules.
|
|
474
|
+
|
|
475
|
+
**Reads**
|
|
476
|
+
|
|
477
|
+
- **`fetchResolutionState(marketPda)`** — `proposed_outcome`, `proposal_ts`, `dispute_active`, `refute_bond_amount`, etc.
|
|
478
|
+
- **`fetchPlatformProfile(platformId)`** — `challenge_window_secs`, `resolver_stake`, `refute_bond` (challenge length and stake are not stored on `ResolutionState`).
|
|
479
|
+
- **`fetchMarket(marketPda)`** — `winningOutcomeIndex` is **`null`** until **`confirmResolution`** succeeds.
|
|
480
|
+
|
|
481
|
+
**UI / agent logic**
|
|
482
|
+
|
|
483
|
+
- Treat **`finalizeResolution`** as “proposal passed”; show countdown until **`confirmResolution`** is allowed.
|
|
484
|
+
- Gate “resolved” UX on **`winningOutcomeIndex !== null`**, not on proposal alone.
|
|
485
|
+
|
|
421
486
|
## Platforms and categories
|
|
422
487
|
|
|
423
488
|
On-chain, **`platform_id`** is **`u32`** and **`category_id`** is **`u8`** in `CreateMarketArgs` (not pubkeys).
|
|
424
489
|
|
|
425
|
-
1. **`register_platform`** — assigns the next id from `GlobalConfig.next_platform_id
|
|
426
|
-
2. **`
|
|
427
|
-
3. **`
|
|
490
|
+
1. **`register_platform`** — assigns the next id from `GlobalConfig.next_platform_id` (starts at **1**); PDA `["platform", platform_id le u32]`.
|
|
491
|
+
2. **`upsert_platform_profile`** — metadata + **resolution policy** (`resolver_stake`, `challenge_window_secs`, `refute_bond`).
|
|
492
|
+
3. **`create_market_category`** — `category_id` must equal `PlatformRegistry.next_category_id`; PDA `["market-category", platform_id, category_id]`.
|
|
493
|
+
4. **`create_market`** — requires **`platform_id > 0`**, **`platform_registry`**, **`platform_profile`**, **`resolution_state`**, **`resolver_stake_vault`**. Use **`category_id == 0`** for uncategorized markets (omit **`market_category`** account). Non-zero **`category_id`** requires an active **`market_category`** PDA for that platform.
|
|
428
494
|
|
|
429
|
-
Use **`derivePlatformRegistry`**, **`derivePlatformProfile`**, **`deriveMarketCategory`** when building instructions manually.
|
|
495
|
+
Use **`derivePlatformRegistry`**, **`derivePlatformProfile`**, **`deriveMarketCategory`**, **`deriveResolutionState`**, **`deriveResolverStakeVault`** when building instructions manually.
|
|
430
496
|
|
|
431
497
|
## Market types
|
|
432
498
|
|
|
433
499
|
Use `marketType: 'parimutuel'` or `'completeSet'` at creation; the choice is permanent.
|
|
434
500
|
|
|
435
|
-
- **Parimutuel** — pooled stakes, no outcome SPLs; good default for prediction apps. **`isEarlyWithdrawAllowed`** is set at create (default **allowed**) and can be changed by the creator via **`updateParimutuelState`**; when disabled, early **`parimutuelWithdraw`** is blocked until close or resolution. After **`voidMarket`**, participants **`parimutuelWithdraw`** full net stakes (no penalty / withdraw fees).
|
|
501
|
+
- **Parimutuel** — pooled stakes, no outcome SPLs; good default for prediction apps. **`isEarlyWithdrawAllowed`** is set at create (default **allowed**) and can be changed by the creator via **`updateParimutuelState`**; when disabled, early **`parimutuelWithdraw`** is blocked until close or resolution. **`maxWalletOutcomeInvestment`** and **`isWalletOutcomeStakeExact`** are set at create and can be updated via **`updateParimutuelState`** (same instruction as penalty / early-withdraw edits). After **`voidMarket`**, participants **`parimutuelWithdraw`** full net stakes (no penalty / withdraw fees).
|
|
436
502
|
- **Complete-set** — outcome SPL tokens; you still need external liquidity for single-leg trading.
|
|
437
503
|
|
|
438
504
|
## PDA helpers
|
|
@@ -459,6 +525,8 @@ import {
|
|
|
459
525
|
derivePlatformRegistry,
|
|
460
526
|
derivePlatformProfile,
|
|
461
527
|
deriveMarketCategory,
|
|
528
|
+
deriveResolutionState,
|
|
529
|
+
deriveResolverStakeVault,
|
|
462
530
|
bnLike,
|
|
463
531
|
bnToU32,
|
|
464
532
|
bnToU8,
|
|
@@ -505,7 +573,7 @@ import type {
|
|
|
505
573
|
|
|
506
574
|
## AI agent integration
|
|
507
575
|
|
|
508
|
-
Start from **`agents/skill.md`** in this package for a stable entrypoint; the full playbook is at **`https://vercora.xyz/agents/playbook.md`** (production), or `docs/AI-AGENT-SDK-PLAYBOOK.md` in the monorepo.
|
|
576
|
+
Start from **`agents/skill.md`** in this package for a stable entrypoint; the full playbook is at **`https://vercora.xyz/agents/playbook.md`** (production), or `docs/AI-AGENT-SDK-PLAYBOOK.md` in the monorepo. **Humans:** the web app serves the same playbook at **`https://vercora.xyz/docs/agents`** with a **Resolution at a glance** summary (aligned with **`https://vercora.xyz/docs#resolution-flow`**).
|
|
509
577
|
|
|
510
578
|
1. **Bootstrap**: `Connection` → `AnchorProvider` → `Program<Vercora>` from `IDL` → `PredictionMarketClient`.
|
|
511
579
|
2. **Branch**: `fetchMarket` → `market.marketType` (`completeSet` vs `parimutuel`).
|
|
@@ -513,8 +581,8 @@ Start from **`agents/skill.md`** in this package for a stable entrypoint; the fu
|
|
|
513
581
|
- Optional: `registerPlatform` → `createMarketCategory` → `createMarket` with ids.
|
|
514
582
|
- Create: `createMarketFull` **or** `createMarket` + resolver / outcome / mint **or** pari init.
|
|
515
583
|
- Complete-set: `mintCompleteSet` → `redeemCompleteSet` → `redeemWinning`.
|
|
516
|
-
- Parimutuel: `parimutuelStake` → optional `parimutuelWithdraw` (if `isEarlyWithdrawAllowed`, or after `voidMarket` for full refunds) → `parimutuelClaim`; creator may
|
|
517
|
-
- Resolution: `voteResolution` → `finalizeResolution
|
|
584
|
+
- Parimutuel: `parimutuelStake` → optional `parimutuelWithdraw` (if `isEarlyWithdrawAllowed`, or after `voidMarket` for full refunds) → `parimutuelClaim`; creator may change penalty split, early withdraw, and per-wallet caps (`maxWalletOutcomeInvestment`, `isWalletOutcomeStakeExact`) with `updateParimutuelState` (pass full params from `fetchMarket` / `fetchParimutuelState` when only changing some fields).
|
|
585
|
+
- Resolution: `voteResolution` → `finalizeResolution` (proposal) → challenge window → optional `openRefute` / `resolveRefute` → `confirmResolution` (final `winningOutcomeIndex`) → `claimResolverStake`; then redeem/claim for traders.
|
|
518
586
|
4. **Discovery**: `fetchAllMarkets`, `getUsersMarkets`, `fetchMarketsByCreator`, `fetchVoidedMarkets`, `fetchVoidedParimutuelSurplusCandidates`.
|
|
519
587
|
5. **Safety**: verify signers, PDAs, ATAs, and RPC limits on `getProgramAccounts`.
|
|
520
588
|
|
|
@@ -522,17 +590,6 @@ Start from **`agents/skill.md`** in this package for a stable entrypoint; the fu
|
|
|
522
590
|
|
|
523
591
|
See [`CHANGELOG.md`](./CHANGELOG.md) in the package (published to npm). Releases are generated with [standard-version](https://github.com/conventional-changelog/standard-version) from [Conventional Commits](https://www.conventionalcommits.org/) in `app/sdk` (e.g. `feat:`, `fix:`). After running a release script you can edit `CHANGELOG.md` or amend the release commit before `npm publish`.
|
|
524
592
|
|
|
525
|
-
## Releasing (maintainers)
|
|
526
|
-
|
|
527
|
-
From `prediction_market/app/sdk`:
|
|
528
|
-
|
|
529
|
-
1. Commit SDK work with conventional messages so the next bump has sensible notes.
|
|
530
|
-
2. `npm run release:check` — confirms `package.json` version matches git tag `v<version>` (follow the script’s hints if not).
|
|
531
|
-
3. `npm run release:patch`, `release:minor`, or `release:major` — bumps version, updates `CHANGELOG.md`, creates a release commit, and tags `vX.Y.Z`.
|
|
532
|
-
4. Adjust `CHANGELOG.md` or message if needed (`git commit --amend` or a follow-up commit), then `npm publish`.
|
|
533
|
-
|
|
534
|
-
Preview without writing: `npx standard-version --dry-run --release-as patch` (only after `release:check` passes).
|
|
535
|
-
|
|
536
593
|
## Links
|
|
537
594
|
|
|
538
595
|
- [Vercora app](https://vercora.xyz)
|
package/agents/skill.md
CHANGED
|
@@ -11,8 +11,8 @@ The canonical HTTPS deployment—use this when you **do not** have the monorepo
|
|
|
11
11
|
| Full AI playbook (markdown) | `https://vercora.xyz/agents/playbook.md` |
|
|
12
12
|
| This skill entry (markdown) | `https://vercora.xyz/agents/skill.md` |
|
|
13
13
|
| Pointer manifest (JSON) | `https://vercora.xyz/.well-known/vercora-agents.json` |
|
|
14
|
-
| Developer docs (human) | `https://vercora.xyz/docs` |
|
|
15
|
-
| AI / agents
|
|
14
|
+
| Developer docs (human) | `https://vercora.xyz/docs` (includes **Resolution flow** — same narrative as agents) |
|
|
15
|
+
| AI / agents playbook (human + markdown) | `https://vercora.xyz/docs/agents` — full playbook + **resolution at a glance** |
|
|
16
16
|
|
|
17
17
|
Example:
|
|
18
18
|
|
|
@@ -27,11 +27,12 @@ For self-hosted or staging sites, use the same path suffixes with your origin: `
|
|
|
27
27
|
## What to read first
|
|
28
28
|
|
|
29
29
|
1. **This package’s `README.md`** — install, exports, `PredictionMarketClient` API, and the **AI agent integration** section (workflow map).
|
|
30
|
-
2. **
|
|
30
|
+
2. **Human playbook UI** — **`https://vercora.xyz/docs/agents`**: same playbook as below, plus a **Resolution at a glance** block (vote → propose → challenge → confirm), aligned with **`https://vercora.xyz/docs#resolution-flow`**.
|
|
31
|
+
3. **Full playbook** (skills, pitfalls, decision trees):
|
|
31
32
|
- **Production:** `https://vercora.xyz/agents/playbook.md`
|
|
32
33
|
- **Monorepo (contributors):** `prediction_market/docs/AI-AGENT-SDK-PLAYBOOK.md` (content matches the production mirror).
|
|
33
34
|
|
|
34
|
-
The playbook is the source of truth for instruction order, branching, and edge cases.
|
|
35
|
+
The playbook is the source of truth for instruction order, branching, and edge cases (humans and agents use the same narrative).
|
|
35
36
|
|
|
36
37
|
## Key files in the published npm package
|
|
37
38
|
|
|
@@ -69,7 +70,17 @@ Paths are under `node_modules/@vercora-protocol/sdk/` after install.
|
|
|
69
70
|
## Quick guardrails (parimutuel)
|
|
70
71
|
|
|
71
72
|
- **`updateConfig`:** `params.secondaryAuthority` is written to chain on **every** call. When only adjusting fees/treasury, pass the **existing** secondary pubkey to keep (from `fetchGlobalConfig()`). Passing the primary key there removes the backup authority.
|
|
72
|
-
- After `fetchMarket(marketPda)`, read **`isEarlyWithdrawAllowed`**. If `false`, do not propose early-exit **`parimutuelWithdraw`** until close/resolution (**`EarlyWithdrawNotAllowed`**), **unless `isVoided`** — then **`parimutuelWithdraw`** refunds full net stakes (no penalty / withdraw fees).
|
|
73
|
+
- After `fetchMarket(marketPda)`, read **`isEarlyWithdrawAllowed`**. If `false`, do not propose early-exit **`parimutuelWithdraw`** until close/resolution (**`EarlyWithdrawNotAllowed`**), **unless `isVoided`** — then **`parimutuelWithdraw`** refunds full net stakes (no penalty / withdraw fees).
|
|
74
|
+
- Also read **`maxWalletOutcomeInvestment`** (`BN`, `0` = unlimited) and **`isWalletOutcomeStakeExact`**. When proposing **`parimutuelStake`**, enforce per-wallet caps and exact-stake rules (**`WalletOutcomeInvestmentCapExceeded`**, **`WalletOutcomeExactStakeMismatch`**).
|
|
75
|
+
- **Creators** (open pari market, not resolved/voided): **`updateParimutuelState`** updates penalty bps, **`isEarlyWithdrawAllowed`**, **`maxWalletOutcomeInvestment`**, and **`isWalletOutcomeStakeExact`** in one instruction — pass **full** params (current values from **`fetchMarket`** + **`fetchParimutuelState`** for fields you keep unchanged). If **`isWalletOutcomeStakeExact`** is `true`, **`maxWalletOutcomeInvestment`** must be **> 0** (**`InvalidWalletOutcomeStakeExactConfig`** otherwise).
|
|
73
76
|
- **`voidMarket`:** the **creator** cannot void while pari **outcome pools** (active stakes) or complete-set outstanding is non-zero (**`CreatorCannotVoidWithActiveLiquidity`**). Propose a **global config authority** wallet to cancel live markets; SDK passes **`parimutuelState`** for pari markets.
|
|
74
77
|
- **`claimVoidedParimutuelSurplus`:** **global authority only** — if a voided pari market has **zero outcome stakes** but **`total_pool` > 0** (early-exit pool-keep left in the vault), sweep that surplus to the platform treasury. Call after users have finished void refunds.
|
|
75
78
|
- Use **`isClosedEarly`**, **`isVoided`**, **`winningOutcomeIndex`** for lifecycle — not legacy `closed` / `voided` / `resolvedOutcomeIndex` names.
|
|
79
|
+
|
|
80
|
+
## Quick guardrails (resolution)
|
|
81
|
+
|
|
82
|
+
- **`create_market`** requires **`platform_id > 0`**: register a platform, **`upsert_platform_profile`**, and pass **`platform_registry`**, **`platform_profile`**, **`resolution_state`**, **`resolver_stake_vault`** (SDK methods wire PDAs when you use `PredictionMarketClient`).
|
|
83
|
+
- Settlement is **two-phase**: **`finalizeResolution`** records a **proposal** on **`fetchResolutionState`** (`proposed_outcome`, `proposal_ts`). It does **not** set **`winningOutcomeIndex`** on the market.
|
|
84
|
+
- After **`challenge_window_secs`** from **`fetchPlatformProfile(platformId)`** (same value used on-chain for the challenge window), call **`confirmResolution`** to finalize **`Market.winningOutcomeIndex`**. Until then, traders cannot **`redeemWinning`** / **`parimutuelClaim`** as “resolved.”
|
|
85
|
+
- Optional dispute: **`openRefute`** (bond + alternative outcome) during the window; **`resolveRefute`** dismisses refutes (authorized signers per program). **`confirmResolution`** fails while a dispute blocks it.
|
|
86
|
+
- After final winner is set, resolvers may **`claimResolverStake`**. Read **`fetchResolutionState`** + **`fetchMarket`** together for UI (proposal vs final).
|
package/dist/client.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as anchor from '@coral-xyz/anchor';
|
|
|
2
2
|
import { Program, BN } from '@coral-xyz/anchor';
|
|
3
3
|
import { Connection, PublicKey } from '@solana/web3.js';
|
|
4
4
|
import type { Vercora } from './generated/vercora';
|
|
5
|
-
import type { CreateMarketParams, InitializeParimutuelStateParams, ParimutuelStakeParams, ParimutuelWithdrawParams, ParimutuelClaimParams, InitializeConfigParams, UpdateConfigParams, InitializeMarketResolverSlotsParams, InitializeMarketOutcomeSlotsParams, MintCompleteSetParams, RedeemCompleteSetParams, VoteResolutionParams, FinalizeResolutionParams, RevokeResolutionVoteParams, RedeemWinningParams, CloseMarketEarlyParams, VoidMarketParams, ClaimVoidedParimutuelSurplusParams, AbandonMarketParams, GlobalConfigAccount, MarketAccount, ResolverAccount, UpsertUserProfileParams, VerifyUserProfileParams, UserProfileAccount, UpsertPlatformProfileParams, VerifyPlatformProfileParams, PlatformProfileAccount, ParimutuelStateAccount, ParimutuelPositionAccount, ParimutuelOdds, MarketCategoryAccount, CreateMarketCategoryParams, UpdateMarketCategoryParams, RegisterPlatformParams, UpdateParimutuelStateParams, ResolutionVoteAccount, ListedMarket, GetUsersMarketsFilters, VoidedParimutuelSurplusCandidate } from './types';
|
|
5
|
+
import type { CreateMarketParams, InitializeParimutuelStateParams, ParimutuelStakeParams, ParimutuelWithdrawParams, ParimutuelClaimParams, InitializeConfigParams, UpdateConfigParams, InitializeMarketResolverSlotsParams, InitializeMarketOutcomeSlotsParams, MintCompleteSetParams, RedeemCompleteSetParams, VoteResolutionParams, FinalizeResolutionParams, RevokeResolutionVoteParams, RedeemWinningParams, CloseMarketEarlyParams, VoidMarketParams, ClaimVoidedParimutuelSurplusParams, AbandonMarketParams, GlobalConfigAccount, MarketAccount, ResolverAccount, UpsertUserProfileParams, VerifyUserProfileParams, UserProfileAccount, UpsertPlatformProfileParams, VerifyPlatformProfileParams, PlatformProfileAccount, ParimutuelStateAccount, ParimutuelPositionAccount, ParimutuelOdds, MarketCategoryAccount, CreateMarketCategoryParams, UpdateMarketCategoryParams, RegisterPlatformParams, UpdateParimutuelStateParams, ResolutionVoteAccount, ResolutionStateAccount, ListedMarket, GetUsersMarketsFilters, VoidedParimutuelSurplusCandidate } from './types';
|
|
6
6
|
export declare class PredictionMarketClient {
|
|
7
7
|
readonly program: Program<Vercora>;
|
|
8
8
|
readonly connection: Connection;
|
|
@@ -93,9 +93,10 @@ export declare class PredictionMarketClient {
|
|
|
93
93
|
/** Pari-mutuel pool + penalty params (step after resolvers, replaces mint init). */
|
|
94
94
|
initializeParimutuelState(marketPda: PublicKey, params: InitializeParimutuelStateParams, opts?: anchor.web3.ConfirmOptions): Promise<string>;
|
|
95
95
|
/**
|
|
96
|
-
* Update early-exit penalty parameters
|
|
96
|
+
* Update early-exit penalty parameters, whether early `parimutuelWithdraw` is allowed (`Market.isEarlyWithdrawAllowed`),
|
|
97
|
+
* and per-wallet per-outcome stake rules (`maxWalletOutcomeInvestment`, `isWalletOutcomeStakeExact`).
|
|
97
98
|
* Only the market creator; market must be pari-mutuel and not resolved/voided.
|
|
98
|
-
* To
|
|
99
|
+
* To change only one knob, pass current values from `fetchMarket` / `fetchParimutuelState` for the rest.
|
|
99
100
|
*/
|
|
100
101
|
updateParimutuelState(marketPda: PublicKey, params: UpdateParimutuelStateParams, opts?: anchor.web3.ConfirmOptions): Promise<string>;
|
|
101
102
|
parimutuelStake(marketPda: PublicKey, params: ParimutuelStakeParams, opts?: anchor.web3.ConfirmOptions): Promise<string>;
|
|
@@ -138,6 +139,27 @@ export declare class PredictionMarketClient {
|
|
|
138
139
|
* Passes optional per-outcome tally accounts (null if that tally PDA was never created).
|
|
139
140
|
*/
|
|
140
141
|
finalizeResolution(marketPda: PublicKey, params: FinalizeResolutionParams, opts?: anchor.web3.ConfirmOptions): Promise<string>;
|
|
142
|
+
/** During the challenge window: post a refute bond (collateral) and claim an alternative outcome. */
|
|
143
|
+
openRefute(marketPda: PublicKey, params: {
|
|
144
|
+
marketId: BN;
|
|
145
|
+
refuteBondAmount: BN;
|
|
146
|
+
disputedOutcome: number;
|
|
147
|
+
}, opts?: anchor.web3.ConfirmOptions): Promise<string>;
|
|
148
|
+
/**
|
|
149
|
+
* Dismiss an open refute: slash the bond to the platform treasury ATA.
|
|
150
|
+
* Signer must be `GlobalConfig.disputeResolutionAuthority` (or primary/secondary if unset) or platform `profileAuthority`.
|
|
151
|
+
*/
|
|
152
|
+
resolveRefute(marketPda: PublicKey, params: {
|
|
153
|
+
marketId: BN;
|
|
154
|
+
}, opts?: anchor.web3.ConfirmOptions): Promise<string>;
|
|
155
|
+
/** After resolution: claim staked collateral back if correct, or slash to treasury if wrong. */
|
|
156
|
+
claimResolverStake(marketPda: PublicKey, params: {
|
|
157
|
+
marketId: BN;
|
|
158
|
+
resolverIndex: number;
|
|
159
|
+
}, opts?: anchor.web3.ConfirmOptions): Promise<string>;
|
|
160
|
+
fetchResolutionState(marketPda: PublicKey): Promise<ResolutionStateAccount>;
|
|
161
|
+
/** After the challenge window, if no open dispute — finalize `winning_outcome_index`. */
|
|
162
|
+
confirmResolution(marketPda: PublicKey, params: FinalizeResolutionParams, opts?: anchor.web3.ConfirmOptions): Promise<string>;
|
|
141
163
|
/**
|
|
142
164
|
* Burn `amount` winning outcome token base units and receive the same
|
|
143
165
|
* amount of collateral base units from the vault.
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EACL,UAAU,EACV,SAAS,EAOV,MAAM,iBAAiB,CAAC;AASzB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EACL,UAAU,EACV,SAAS,EAOV,MAAM,iBAAiB,CAAC;AASzB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AA+BnD,OAAO,KAAK,EACV,kBAAkB,EAClB,+BAA+B,EAC/B,qBAAqB,EACrB,wBAAwB,EACxB,qBAAqB,EACrB,sBAAsB,EACtB,kBAAkB,EAClB,mCAAmC,EACnC,kCAAkC,EAClC,qBAAqB,EACrB,uBAAuB,EACvB,oBAAoB,EACpB,wBAAwB,EACxB,0BAA0B,EAC1B,mBAAmB,EACnB,sBAAsB,EACtB,gBAAgB,EAChB,kCAAkC,EAClC,mBAAmB,EACnB,mBAAmB,EACnB,aAAa,EACb,eAAe,EACf,uBAAuB,EACvB,uBAAuB,EACvB,kBAAkB,EAClB,2BAA2B,EAC3B,2BAA2B,EAC3B,sBAAsB,EACtB,sBAAsB,EACtB,yBAAyB,EACzB,cAAc,EAEd,qBAAqB,EACrB,0BAA0B,EAC1B,0BAA0B,EAC1B,sBAAsB,EACtB,2BAA2B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