Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
push:
branches:
- main
- feat/native-antelope-sdk-v1
pull_request:

permissions:
Expand All @@ -17,20 +18,18 @@ concurrency:
jobs:
validate:
runs-on: ubuntu-latest
timeout-minutes: 15

timeout-minutes: 20
steps:
- name: Check out repository
uses: actions/checkout@v6

- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: "24"
package-manager-cache: false

- name: Install dependencies
run: npm ci

- name: Validate SDK
run: npm install --no-audit --no-fund
- name: Validate native Antelope packages
run: npm run validate:native
- name: Validate full SDK
run: npm run validate
165 changes: 40 additions & 125 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,151 +1,66 @@
# Wind Stack SDK
# WindStack SDK

TypeScript packages used by Wind Stack applications and Wisp Wallet integrations.
Modern TypeScript SDKs for Antelope/Vexanium, Wisp Wallet, EVM, and Solana.

The SDK keeps each chain integration separate. VEX Native applications use WharfKit SessionKit and the Wisp wallet plugin. EVM applications use the standard EIP-1193 provider interface, with EIP-6963 discovery when a wallet supports it.
**Created by Gilang Ramadan** · Copyright © 2026 PT WIND KRIPTOGRAFI TEKNOLOGI · MIT.

## Packages
## Native Antelope v1

| Package | Use it for |
| --- | --- |
| `@windstack/core` | Provider contract, errors, events, dApp metadata, and shared types |
| `@windstack/evm` | EIP-1193 requests and EIP-6963 wallet discovery |
| `@windstack/solana` | Wisp-compatible Solana provider requests |
| `@windstack/vexanium` | Vexanium provider access, chain metadata, VSR, and explorer helpers |
| `@windstack/wallet-plugin-wisp` | Wisp integration for WharfKit SessionKit |
| `@windstack/session` | An optional facade for apps that need more than one chain family |

All published packages are ESM and require Node.js 18 or newer.
The new Antelope stack is built from protocol specifications and Web-standard APIs; it is **not a WharfKit fork**.

## VEX Native
| Package | Purpose |
| --- | --- |
| `@windstack/crypto` | K1/R1 private keys, public keys, recoverable signatures, Antelope encodings |
| `@windstack/abi` | ABI binary codec, names/assets/symbols, structs, aliases, variants |
| `@windstack/rpc` | Typed nodeos RPC with timeout/failover/AbortSignal |
| `@windstack/contract` | ABI-aware actions, tables and ABI cache |
| `@windstack/account` | Account, token balance and system-action helpers |
| `@windstack/antelope` | TAPOS, transaction serialization, digest, signing, broadcast, unified client |
| `@windstack/session` | Native SessionKit-style wallet/session orchestration |

Install the Vexanium package, the wallet plugin, and WharfKit:
The v1 native package graph does not depend on `@wharfkit/*`, `elliptic`, `bn.js`, `crypto-browserify`, or Node Buffer APIs. Crypto primitives use current Noble packages (`@noble/curves` and `@noble/hashes`). Noble v2 is ESM-only, so Node.js **20.19+** is required when running directly on Node.

```bash
npm install @windstack/vexanium @windstack/wallet-plugin-wisp \
@wharfkit/session @wharfkit/antelope @wharfkit/signing-request
```

```ts
import { SessionKit } from "@wharfkit/session";
import { WispWalletPlugin } from "@windstack/wallet-plugin-wisp";
import { vexNative } from "@windstack/vexanium";

const sessionKit = new SessionKit({
appName: "My Vexanium App",
chains: [{ id: vexNative.chainId, url: vexNative.rpcUrl }],
walletPlugins: [new WispWalletPlugin()],
});

const { session } = await sessionKit.login();

await session.transact({
action: {
account: "vex.token",
name: "transfer",
authorization: [session.permissionLevel],
data: {
from: session.actor,
to: "receiver",
quantity: "1.0000 VEX",
memo: "",
},
},
});
npm install @windstack/antelope @windstack/session
```

SessionKit resolves the signer, ABI data, TAPOS, and transaction. `WispWalletPlugin` sends the resulting serialized bytes to `vex_signTransaction` without rebuilding the transaction.

### Direct provider access

Use the lower-level client when SessionKit is not responsible for the flow:

```ts
import { createVexaniumClient, vexNative } from "@windstack/vexanium";

const client = await createVexaniumClient({
dapp: {
name: "My Vexanium App",
url: "https://app.example",
icon: "https://app.example/icon.png",
},
});

let accounts = await client.getAccounts();
if (accounts.length === 0) {
accounts = await client.connect({ chainId: vexNative.chainId });
}
```

`getAccounts()` is a silent read. `connect()` may open the wallet approval screen.

### Portable requests

Vexanium Signing Requests use the `vsr:` URI scheme. The payload is handled by WharfKit's Signing Request library. Existing `esr:` input is validated by WharfKit and forwarded without rewriting the URI or encoded transaction.

```ts
import { createSigningRequest, vexNative } from "@windstack/vexanium";

const request = await createSigningRequest({
chainId: vexNative.chainId,
broadcast: true,
action: {
account: "vex.token",
name: "transfer",
authorization: [{ actor: "alice", permission: "active" }],
data: {
from: "alice",
to: "bob",
quantity: "1.0000 VEX",
memo: "",
},
},
});
import { AntelopeClient } from "@windstack/antelope";

const client = new AntelopeClient({ endpoints: ["https://api.windcrypto.com"] });
const token = client.contract("vex.token");
const action = await token.action("transfer", {
from: "alice",
to: "bob",
quantity: "1.0000 VEX",
memo: "WindStack",
}, ["alice@active"]);
```

Use VSR for QR codes, links, and other portable requests. Do not wrap a transaction that SessionKit has already resolved; the wallet plugin signs those exact bytes directly.
## Existing packages

## VEX EVM
`@windstack/core`, `@windstack/evm`, `@windstack/solana`, `@windstack/vexanium`, and `@windstack/wallet-plugin-wisp` remain in this monorepo for compatibility. The legacy Vexanium/WharfKit integration is not a dependency of the seven native Antelope v1 packages above.

VEX EVM uses chain ID `6736` (`0x1a50`) and 18 decimals for its native VEX balance. Its public JSON-RPC endpoint is `https://api.windcrypto.com/rpc`, and its explorer starts at `https://explorer.windcrypto.com/evm`. Indexed EVM data is available at `https://api.windcrypto.com/v3/evm`, including the live stats endpoint at `https://api.windcrypto.com/v3/evm/stats`.

Use `vexEvm.rpcUrl` for JSON-RPC and `wallet_addEthereumChain`. The REST stats endpoint is for indexed network statistics, not provider requests.

For an injected EVM wallet:

```ts
import { createEVMClient } from "@windstack/evm";

const client = await createEVMClient();
const accounts = await client.connect();
const chainId = await client.getChainId();
## Development

if (chainId !== "0x1a50") {
await client.switchChain("0x1a50");
}
```bash
npm install
npm run validate:native
npm run validate
```

## Provider Contract
## Publish native packages from VPS

Vexanium wallets expose `window.vexanium` and identify themselves through `providerInfo`. The SDK checks the provider shape, negotiates protocol version `1.x`, and verifies declared capabilities before connect or signing calls.

`WISP_PROVIDER_CONTRACT` from `@windstack/core` is the runtime single source for shared Wisp/Vexanium and EVM provider identity, methods, events, capabilities, and chain identifiers. The EVM and Vexanium packages derive their exported constants from that object.

The matching machine-readable specification is stored at [`specs/wisp-provider-contract.json`](./specs/wisp-provider-contract.json). Validation fails if the JSON specification, core export, or package constants drift apart. Wisp Wallet independently synchronizes its local runtime contract from this specification.

The full Vexanium wallet-facing contract is documented in [VEXANIUM-PROVIDER-V1.md](./VEXANIUM-PROVIDER-V1.md).

## Development
Authenticate to npm first (`npm whoami`). Then:

```bash
npm ci
npm run validate
npm install
npm run release:dry-run
npm run release:npm
```

`validate` runs a clean TypeScript build, provider/signing regression tests, canonical provider specification checks, and an npm package dry run for every workspace.

WharfKit is kept at its latest published package versions. npm currently reports a low-severity advisory in WharfKit's transitive `elliptic` dependency; there is no patched WharfKit release to upgrade to. The suggested npm remediation is an incompatible downgrade and is intentionally not applied.
`release:npm` publishes only the seven native packages, in dependency order.

## License

MIT, PT WIND KRIPTOGRAFI TEKNOLOGI.
MIT. Created by Gilang Ramadan; copyright PT WIND KRIPTOGRAFI TEKNOLOGI.
46 changes: 19 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,30 @@
{
"name": "windstack-sdk",
"version": "0.6.2",
"version": "1.0.0",
"private": true,
"type": "module",
"workspaces": [
"packages/*"
],
"workspaces": ["packages/*"],
"scripts": {
"clean": "rm -rf packages/*/dist packages/*/*.tsbuildinfo",
"build": "tsc -b packages/core packages/evm packages/solana packages/vexanium packages/wallet-plugin-wisp packages/session",
"typecheck": "tsc -b packages/core packages/evm packages/solana packages/vexanium packages/wallet-plugin-wisp packages/session --pretty",
"build:native": "tsc -b packages/crypto packages/abi packages/rpc packages/contract packages/account packages/antelope packages/session",
"build": "tsc -b packages/core packages/evm packages/solana packages/crypto packages/abi packages/rpc packages/contract packages/account packages/antelope packages/vexanium packages/wallet-plugin-wisp packages/session",
"typecheck": "npm run build",
"pack:native": "npm pack --dry-run -w @windstack/crypto -w @windstack/abi -w @windstack/rpc -w @windstack/contract -w @windstack/account -w @windstack/antelope -w @windstack/session",
"pack:dry-run": "npm pack --dry-run --workspaces",
"test": "node scripts/test-signing.mjs && node scripts/test-provider-contract.mjs && node scripts/test-provider-spec.mjs && node scripts/test-sdk-behavior.mjs",
"validate": "npm run clean && npm run typecheck && npm run build && npm test && npm run pack:dry-run",
"prepublishOnly": "npm run validate",
"test:signing": "node scripts/test-signing.mjs",
"test:provider": "node scripts/test-provider-contract.mjs && node scripts/test-provider-spec.mjs",
"test:provider-spec": "node scripts/test-provider-spec.mjs"
},
"devDependencies": {
"typescript": "^7.0.2"
},
"engines": {
"node": ">=18"
"test": "node scripts/test-signing.mjs && node scripts/test-provider-contract.mjs && node scripts/test-provider-spec.mjs && node scripts/test-sdk-behavior.mjs && node scripts/test-native-antelope.mjs",
"test:native": "node scripts/test-native-antelope.mjs",
"validate:native": "npm run clean && npm run build:native && npm run test:native && npm run pack:native",
"validate": "npm run clean && npm run build && npm test && npm run pack:dry-run",
"release:dry-run": "npm run validate:native",
"release:npm": "npm publish -w @windstack/crypto --access public && npm publish -w @windstack/abi --access public && npm publish -w @windstack/rpc --access public && npm publish -w @windstack/contract --access public && npm publish -w @windstack/account --access public && npm publish -w @windstack/antelope --access public && npm publish -w @windstack/session --access public"
},
"devDependencies": { "typescript": "^7.0.2" },
"engines": { "node": ">=20.19.0" },
"license": "MIT",
"author": "PT WIND KRIPTOGRAFI TEKNOLOGI",
"description": "TypeScript SDK packages for Wind Stack, Wisp Wallet, Wind Explorer, and Vexanium dApps.",
"author": "Gilang Ramadan",
"contributors": ["PT WIND KRIPTOGRAFI TEKNOLOGI"],
"description": "Modern TypeScript SDK packages for WindStack, Wisp Wallet, Vexanium and Antelope applications.",
"homepage": "https://github.com/windvex/windstack-sdk#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/windvex/windstack-sdk.git"
},
"bugs": {
"url": "https://github.com/windvex/windstack-sdk/issues"
}
"repository": { "type": "git", "url": "git+https://github.com/windvex/windstack-sdk.git" },
"bugs": { "url": "https://github.com/windvex/windstack-sdk/issues" }
}
21 changes: 21 additions & 0 deletions packages/abi/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 PT WIND KRIPTOGRAFI TEKNOLOGI

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
7 changes: 7 additions & 0 deletions packages/abi/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# @windstack/abi

Pure TypeScript Antelope ABI encoder/decoder for browser, Node.js, and React Native. Supports aliases, structs/inheritance, arrays, optionals, binary extensions, variants, names, assets, symbols, public keys, signatures, checksums, and standard integer/string/bytes primitives.

Created by **Gilang Ramadan**.

MIT © 2026 PT WIND KRIPTOGRAFI TEKNOLOGI.
18 changes: 18 additions & 0 deletions packages/abi/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "@windstack/abi",
"version": "1.0.0",
"description": "Pure TypeScript Antelope ABI serializer and binary codec for WindStack.",
"type": "module",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": { ".": { "types": "./dist/index.d.ts", "import": "./dist/index.js" } },
"files": ["dist", "README.md", "LICENSE", "package.json"],
"scripts": { "build": "tsc -p tsconfig.json", "prepack": "npm run build" },
"dependencies": { "@windstack/crypto": "1.0.0" },
"sideEffects": false,
"license": "MIT",
"author": "Gilang Ramadan",
"repository": { "type": "git", "url": "git+https://github.com/windvex/windstack-sdk.git", "directory": "packages/abi" },
"publishConfig": { "access": "public" },
"engines": { "node": ">=20.19.0" }
}
Loading