@vercora-protocol/sdk 0.0.14 → 0.0.17

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 ADDED
@@ -0,0 +1,51 @@
1
+ # Changelog
2
+
3
+ All notable changes to `@vercora-protocol/sdk` are documented in this file.
4
+
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
+
7
+
8
+ ### [0.0.17](https://github.com/vercora/vercora-anchor/compare/v0.0.16...v0.0.17) (2026-04-10)
9
+
10
+ ### 0.0.16 (2026-04-10)
11
+
12
+ ### Features
13
+
14
+ - **all:** add agent sdk playbook and new logos ([f2c8176](https://github.com/vercora/vercora-anchor/commit/f2c817670975dbfaf732cc79217fc173e3cbca63))
15
+ - **all:** add dev app deployment ([9f67c0c](https://github.com/vercora/vercora-anchor/commit/9f67c0cb8ccfa195bb300c690bb5518433b90cd5))
16
+ - **all:** add is early withdraw allowed feature ([4cdf2aa](https://github.com/vercora/vercora-anchor/commit/4cdf2aa5d4ba5e132f257292ef6806ef7372baba))
17
+ - **all:** add market category ([1ffb91b](https://github.com/vercora/vercora-anchor/commit/1ffb91b76179ce68e66627a5d489cd52fbc5088a))
18
+ - **all:** add new branding v1 ([ffd7a78](https://github.com/vercora/vercora-anchor/commit/ffd7a78e741a4f6aa6c9e3d59277f6c1a209ad35))
19
+ - **all:** add new logo nd branding changes ([16444cb](https://github.com/vercora/vercora-anchor/commit/16444cb510c95cb748192470ab30c5ca8a552193))
20
+ - **all:** add pari mutuel ([5ae3c5c](https://github.com/vercora/vercora-anchor/commit/5ae3c5cd9383afbbe18cf2f551d2f5b16fda38d3))
21
+ - **all:** add prod app deployment with coming soon popup ([e24896c](https://github.com/vercora/vercora-anchor/commit/e24896c8936f9b5995c78d41b560be5adc8f6b48))
22
+ - **all:** add support for multiple type of token ([4db40aa](https://github.com/vercora/vercora-anchor/commit/4db40aacfd4f89dc54aef16af8a963bb6763bdcc))
23
+ - **all:** add update early withdraw allowed instruction ([ad41486](https://github.com/vercora/vercora-anchor/commit/ad414862c2a25a2f278a3478b9579a810204fe2e))
24
+ - **all:** add user profile ([5fddb13](https://github.com/vercora/vercora-anchor/commit/5fddb13e000a67f4909ba50d4b80d8400e65b96d))
25
+ - **all:** renaming project ([efa79b1](https://github.com/vercora/vercora-anchor/commit/efa79b136475a3c47fdbb215c5ed1708b85d807e))
26
+ - **all:** update pari mutuel stake calculation ([917f820](https://github.com/vercora/vercora-anchor/commit/917f82039200165148c7d0b77e1a6c7d46dcceef))
27
+ - **all:** update ui for complete-set implementation ([17575c8](https://github.com/vercora/vercora-anchor/commit/17575c8b02028e9edb4665196ef6bd2c9fc9028f))
28
+ - **anchor:** add abandon market methods ([79a348e](https://github.com/vercora/vercora-anchor/commit/79a348ea10a34475aa4ae61043f75f88afb1f5be))
29
+ - **anchor:** add new market outcome and max amount per outcome ([d6e7119](https://github.com/vercora/vercora-anchor/commit/d6e71197cdbc821ed3b3c22eef2bf00347b17f8a))
30
+ - **anchor:** add platform id and update state size ([37c7229](https://github.com/vercora/vercora-anchor/commit/37c7229d9ba55a035768719454a686bd995e70be))
31
+ - **anchor:** crate a key provider ([1e09a71](https://github.com/vercora/vercora-anchor/commit/1e09a71460c1d7d5d798ba7ca535fb88eda5f970))
32
+ - **sdk:** add changelog to sdk ([dae1319](https://github.com/vercora/vercora-anchor/commit/dae1319467880f14b09f2a37c84dc8e22b32d368))
33
+ - **sdk:** add creator with platform filter ([73865ba](https://github.com/vercora/vercora-anchor/commit/73865ba947240f967bdb46cd8d5242b2585a1b91))
34
+ - **sdk:** add fetch markets by platform ([4e9a723](https://github.com/vercora/vercora-anchor/commit/4e9a723f2d9ff730faf3036539187d5260ec73ae))
35
+ - **sdk:** add IDL to the sdk ([ca265f3](https://github.com/vercora/vercora-anchor/commit/ca265f3ef0154510258bff362b11f35dc4c9539b))
36
+ - **sdk:** add main file ([aab9f84](https://github.com/vercora/vercora-anchor/commit/aab9f8457d443873eaf769deea86d0640857f652))
37
+ - **sdk:** add skills to sdk to avoid website crawler ([db37d10](https://github.com/vercora/vercora-anchor/commit/db37d109a7dc351d4d708a0243daa2a8ed375c28))
38
+ - **sdk:** udate sdk methods ([500389f](https://github.com/vercora/vercora-anchor/commit/500389fa4d22871f6bc25bf318367d9c24dc92bc))
39
+ - **sdk:** update sdk to include more fixes ([270b9fe](https://github.com/vercora/vercora-anchor/commit/270b9fedf66fa50e76ac30967a81d913bff732fd))
40
+ - **sdk:** update sdk version ([741b6a9](https://github.com/vercora/vercora-anchor/commit/741b6a91ded237b0bef3643a33d0afe4e2dd4964))
41
+
42
+ ### Bug Fixes
43
+
44
+ - **all:** add npm sdk release ([d615231](https://github.com/vercora/vercora-anchor/commit/d6152312b0bb0c0c2521ee8221d5838567f88e04))
45
+ - **all:** show early withdraw amount ([15818b7](https://github.com/vercora/vercora-anchor/commit/15818b7392740684edc0b2a37d0ea35f14c35a05))
46
+ - **all:** update early withdraw fee ([c16aeb9](https://github.com/vercora/vercora-anchor/commit/c16aeb9b735488d7c73150dfe4a84f2bb19c3167))
47
+ - **all:** update sdk and anchor test deployment ([bc4cf54](https://github.com/vercora/vercora-anchor/commit/bc4cf54ec1e03ca6de6e1b65028faa541a615a28))
48
+
49
+ ## [0.0.15] - 2026-04-10
50
+
51
+ Baseline entry for automated releases (`standard-version`). Earlier releases are not listed here; add bullets manually if you need a historical record.
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** (also mirrored at `{BASE}/agents/skill.md` on the Vercora web app). |
50
+ | `agents/skill.md` | Short **AI agent entrypoint** (production: `https://vercora.xyz/agents/skill.md`). |
51
51
 
52
52
  ---
53
53
 
@@ -496,7 +496,7 @@ import type {
496
496
 
497
497
  ## AI agent integration
498
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.
499
+ 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.
500
500
 
501
501
  1. **Bootstrap**: `Connection` → `AnchorProvider` → `Program<Vercora>` from `IDL` → `PredictionMarketClient`.
502
502
  2. **Branch**: `fetchMarket` → `market.marketType` (`completeSet` vs `parimutuel`).
@@ -509,6 +509,21 @@ Start from **`agents/skill.md`** in this package for a stable entrypoint; the fu
509
509
  4. **Discovery**: `fetchAllMarkets`, `getUsersMarkets`, `fetchMarketsByCreator`.
510
510
  5. **Safety**: verify signers, PDAs, ATAs, and RPC limits on `getProgramAccounts`.
511
511
 
512
+ ## Changelog
513
+
514
+ 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`.
515
+
516
+ ## Releasing (maintainers)
517
+
518
+ From `prediction_market/app/sdk`:
519
+
520
+ 1. Commit SDK work with conventional messages so the next bump has sensible notes.
521
+ 2. `npm run release:check` — confirms `package.json` version matches git tag `v<version>` (follow the script’s hints if not).
522
+ 3. `npm run release:patch`, `release:minor`, or `release:major` — bumps version, updates `CHANGELOG.md`, creates a release commit, and tags `vX.Y.Z`.
523
+ 4. Adjust `CHANGELOG.md` or message if needed (`git commit --amend` or a follow-up commit), then `npm publish`.
524
+
525
+ Preview without writing: `npx standard-version --dry-run --release-as patch` (only after `release:check` passes).
526
+
512
527
  ## Links
513
528
 
514
529
  - [Vercora app](https://vercora.xyz)
package/agents/skill.md CHANGED
@@ -2,22 +2,64 @@
2
2
 
3
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
4
 
5
- ## What to read
5
+ ## Public production deployment (Vercora)
6
+
7
+ The canonical HTTPS deployment—use this when you **do not** have the monorepo—is **[vercora.xyz](https://vercora.xyz)**. Fetch these over TLS; use a Solana `Connection` and cluster that match the deployment you operate against (see this package’s `README.md`).
8
+
9
+ | Resource | URL |
10
+ |----------|-----|
11
+ | Full AI playbook (markdown) | `https://vercora.xyz/agents/playbook.md` |
12
+ | This skill entry (markdown) | `https://vercora.xyz/agents/skill.md` |
13
+ | Pointer manifest (JSON) | `https://vercora.xyz/.well-known/vercora-agents.json` |
14
+ | Developer docs (human) | `https://vercora.xyz/docs` |
15
+ | AI / agents page (human) | `https://vercora.xyz/docs/agents` |
16
+
17
+ Example:
18
+
19
+ ```http
20
+ GET https://vercora.xyz/agents/playbook.md
21
+ ```
22
+
23
+ ## Other front-end deployments
24
+
25
+ For self-hosted or staging sites, use the same path suffixes with your origin: `{BASE}/agents/playbook.md`, `{BASE}/agents/skill.md`, `{BASE}/.well-known/vercora-agents.json` (where `BASE` is `https://your-host` with no trailing slash).
26
+
27
+ ## What to read first
6
28
 
7
29
  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).
30
+ 2. **Full playbook** (skills, pitfalls, decision trees):
31
+ - **Production:** `https://vercora.xyz/agents/playbook.md`
32
+ - **Monorepo (contributors):** `prediction_market/docs/AI-AGENT-SDK-PLAYBOOK.md` (content matches the production mirror).
33
+
34
+ The playbook is the source of truth for instruction order, branching, and edge cases.
35
+
36
+ ## Key files in the published npm package
37
+
38
+ Paths are under `node_modules/@vercora-protocol/sdk/` after install.
11
39
 
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.
40
+ | Path | Purpose |
41
+ |------|---------|
42
+ | `README.md` | Install, API tables, examples, AI agent integration |
43
+ | `agents/skill.md` | This entry |
44
+ | `dist/index.js` / `dist/index.d.ts` | Package entry (`PredictionMarketClient`, re-exports) |
45
+ | `dist/idl/vercora.json` | Anchor **IDL** JSON (`IDL` / `PROGRAM_ID` match this release) |
46
+ | `dist/client.js` | `PredictionMarketClient` implementation |
47
+ | `dist/types.d.ts` | `CreateMarketParams`, `MarketAccount`, `UpdateParimutuelStateParams`, etc. |
48
+ | `dist/generated/vercora.d.ts` | Anchor codegen types; use as `Program<Vercora>` generic |
49
+ | `dist/pda.d.ts` | PDA helpers (`deriveMarket`, `deriveVault`, …) |
50
+ | `dist/marketUi.d.ts` | `getMarketLifecycleStatus`, `formatTimeLeft`, … |
51
+ | `package.json` | Version and peer dependencies |
13
52
 
14
- ## Canonical URLs (when a web app is available)
53
+ ## Monorepo paths (source / docs, not shipped in npm)
15
54
 
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` |
55
+ | Path | Purpose |
56
+ |------|---------|
57
+ | `prediction_market/docs/AI-AGENT-SDK-PLAYBOOK.md` | Full AI playbook (synced to `https://vercora.xyz/agents/playbook.md`) |
58
+ | `prediction_market/docs/market-mechanics-and-ux-options.md` | Mechanics and UX notes (non-normative) |
59
+ | `prediction_market/app/sdk/src/` | SDK TypeScript source |
60
+ | `prediction_market/target/idl/vercora.json` | IDL from `anchor build` (synced into SDK + web) |
61
+ | `prediction_market/programs/vercora/` | On-chain program (Rust) |
62
+ | `prediction_market/app/web/public/.well-known/vercora-agents.json` | Pointer manifest (deployed at `https://vercora.xyz/.well-known/vercora-agents.json`) |
21
63
 
22
64
  ## NPM
23
65
 
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@vercora-protocol/sdk",
3
- "version": "0.0.14",
3
+ "version": "0.0.17",
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
9
  "README.md",
10
+ "CHANGELOG.md",
10
11
  "agents"
11
12
  ],
12
13
  "publishConfig": {
@@ -17,7 +18,11 @@
17
18
  "prebuild": "node scripts/sync-anchor-types.cjs",
18
19
  "build": "tsc -p tsconfig.build.json",
19
20
  "typecheck": "tsc -p tsconfig.build.json --noEmit",
20
- "example": "npx ts-node --project . example.ts"
21
+ "example": "npx ts-node --project . example.ts",
22
+ "release:check": "bash scripts/release-with-check.sh --check",
23
+ "release:patch": "bash scripts/release-with-check.sh --release-as patch",
24
+ "release:minor": "bash scripts/release-with-check.sh --release-as minor",
25
+ "release:major": "bash scripts/release-with-check.sh --release-as major"
21
26
  },
22
27
  "peerDependencies": {
23
28
  "@coral-xyz/anchor": "^0.31.1",
@@ -31,6 +36,7 @@
31
36
  "@solana/web3.js": "^1.95.0",
32
37
  "@types/node": "^22.10.0",
33
38
  "bn.js": "^5.2.1",
39
+ "standard-version": "^9.5.0",
34
40
  "ts-node": "^10.9.2",
35
41
  "typescript": "^5.7.3"
36
42
  }