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
81 changes: 81 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Deploy TypeDoc to GitHub Pages

on:
push:
branches:
- main

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 9.2.0

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> "$GITHUB_ENV"

- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build stateless.js
run: cd js/stateless.js && pnpm run build

- name: Generate TypeDoc for stateless.js
run: npx typedoc --options typedoc.stateless.json

- name: Generate TypeDoc for compressed-token
run: npx typedoc --options typedoc.compressed-token.json

- name: Create index page
run: cp api-docs-index.html api-docs/index.html

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './api-docs'

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
!sdk-tests/sdk-anchor-test/target/

**/dist/
api-docs/

# rpc
/rpc/node_modules/
Expand Down
106 changes: 106 additions & 0 deletions api-docs-index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ZK Compression TypeScript SDK - API Documentation</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
line-height: 1.6;
color: #333;
background: #f5f5f5;
padding: 2rem;
}
.container {
max-width: 800px;
margin: 0 auto;
background: white;
padding: 3rem;
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
h1 {
font-size: 2.5rem;
margin-bottom: 1rem;
color: #1a1a1a;
}
p {
font-size: 1.125rem;
color: #666;
margin-bottom: 2rem;
}
.packages {
display: grid;
gap: 1.5rem;
margin-top: 2rem;
}
.package {
border: 1px solid #e0e0e0;
border-radius: 6px;
padding: 1.5rem;
transition: all 0.2s;
text-decoration: none;
display: block;
}
.package:hover {
border-color: #9333ea;
box-shadow: 0 4px 12px rgba(147, 51, 234, 0.1);
transform: translateY(-2px);
}
.package h2 {
font-size: 1.5rem;
color: #1a1a1a;
margin-bottom: 0.5rem;
}
.package p {
font-size: 1rem;
color: #666;
margin-bottom: 0;
}
.links {
margin-top: 2rem;
padding-top: 2rem;
border-top: 1px solid #e0e0e0;
display: flex;
gap: 1.5rem;
}
.links a {
color: #9333ea;
text-decoration: none;
font-weight: 500;
}
.links a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<div class="container">
<h1>ZK Compression TypeScript SDK</h1>
<p>API reference documentation for Light Protocol's ZK Compression TypeScript libraries.</p>

<div class="packages">
<a href="stateless.js/index.html" class="package">
<h2>@lightprotocol/stateless.js</h2>
<p>Core JavaScript API for ZK Compression and Light Protocol</p>
</a>

<a href="compressed-token/index.html" class="package">
<h2>@lightprotocol/compressed-token</h2>
<p>JavaScript client for the compressed-token program</p>
</a>
</div>

<div class="links">
<a href="https://www.zkcompression.com">Documentation</a>
<a href="https://github.com/Lightprotocol/light-protocol">GitHub</a>
</div>
</div>
</body>
</html>
6 changes: 5 additions & 1 deletion js/compressed-token/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
</a>
<img src="https://img.shields.io/npm/l/%40lightprotocol%2Fcompressed-token" alt="package license" height="18">
<img src="https://img.shields.io/npm/dw/%40lightprotocol%2Fcompressed-token" alt="package weekly downloads" height="18" />
<a href="https://deepwiki.com/Lightprotocol/light-protocol/3.1-javascripttypescript-sdks">
<img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki" height="18" />
</a>
</p>

### Installation
Expand All @@ -29,7 +32,8 @@ npm install --save \
### Documentation and examples

- [Latest Source code](https://github.com/lightprotocol/light-protocol/tree/main/js/compressed-token)
- [Creating and sending compressed tokens](https://www.zkcompression.com/developers/typescript-client#creating-minting-and-transferring-a-compressed-token)
- [Compressed Token Guides](https://www.zkcompression.com/compressed-tokens/guides)
- [Other Libraries](https://lightprotocol.github.io/light-protocol/)

### Getting help

Expand Down
5 changes: 4 additions & 1 deletion js/stateless.js/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
</a>
<img src="https://img.shields.io/npm/l/%40lightprotocol%2Fstateless.js" alt="package license" height="18">
<img src="https://img.shields.io/npm/dw/%40lightprotocol%2Fstateless.js" alt="package weekly downloads" height="18" />
<a href="https://deepwiki.com/Lightprotocol/light-protocol/3.1-javascripttypescript-sdks">
<img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki" height="18" />
</a>
</p>

## Usage
Expand All @@ -33,8 +36,8 @@ For a more detailed documentation on usage, please check [the respective section
For example implementations, including web and Node, refer to the respective repositories:

- [Web application example implementation](https://github.com/Lightprotocol/example-web-client)

- [Node server example implementation](https://github.com/Lightprotocol/example-nodejs-client)
- [Other Libraries](https://lightprotocol.github.io/light-protocol/)

## Troubleshooting

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"playwright": "^1.55.1",
"prettier": "^3.6.2",
"syncpack": "^13.0.4",
"typedoc": "^0.28.14",
"typescript": "^5.9.3"
},
"packageManager": "pnpm@9.2.0"
Expand Down
Loading
Loading