Skip to content

Commit 07d7128

Browse files
committed
chore: OPSEC scrub public SDK surface
0 parents  commit 07d7128

50 files changed

Lines changed: 16703 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/rules/api-conformance.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
paths:
3+
- "src/**"
4+
- "lib/**"
5+
- "*.ts"
6+
- "*.js"
7+
- "*.py"
8+
- "*.go"
9+
- "*.rs"
10+
- "*.java"
11+
- "*.cs"
12+
- "*.vb"
13+
- "*.php"
14+
- "*.rb"
15+
- "*.pl"
16+
- "*.swift"
17+
- "*.cpp"
18+
- "*.h"
19+
- "*.lua"
20+
- "*.luau"
21+
---
22+
# API v1 Conformance
23+
24+
- Default API base: `https://api.licensechain.app/v1`
25+
- Verify endpoint: `POST /licenses/verify` body: `{ key, hwuid? }`
26+
- Webhook verification: HMAC-SHA256 with constant-time comparison
27+
- License JWT claim: `token_use` must equal `licensechain_license_v1`
28+
- JWKS endpoint: `GET /v1/licenses/jwks` (RS256)
29+
- Never use `===` or `==` for signature comparison

.claude/settings.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"$schema": "https://json.schemastore.org/claude-code-settings.json",
3+
"permissions": {
4+
"allow": [
5+
"Bash(git status)",
6+
"Bash(git diff *)",
7+
"Bash(git log *)",
8+
"Read",
9+
"Write",
10+
"Edit",
11+
"Glob",
12+
"Grep"
13+
],
14+
"deny": [
15+
"Bash(rm -rf *)",
16+
"Bash(curl *)",
17+
"Read(.env)",
18+
"Read(.env.*)"
19+
]
20+
}
21+
}

.github/workflows/ci.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main, develop ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [18.x, 20.x]
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Use Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
cache: 'npm'
25+
26+
- name: Install dependencies
27+
run: |
28+
if [ -f package-lock.json ]; then
29+
npm ci
30+
else
31+
npm install
32+
fi
33+
34+
- name: Run linter
35+
run: npm run lint || true
36+
continue-on-error: true
37+
38+
- name: Build
39+
run: npm run build
40+
41+
- name: Run tests
42+
run: npm test || true
43+
continue-on-error: true
44+
45+
publish:
46+
needs: test
47+
runs-on: ubuntu-latest
48+
if: github.event_name == 'release' && github.event.action == 'published'
49+
50+
steps:
51+
- uses: actions/checkout@v4
52+
53+
- name: Use Node.js
54+
uses: actions/setup-node@v4
55+
with:
56+
node-version: '20.x'
57+
registry-url: 'https://registry.npmjs.org'
58+
59+
- name: Install dependencies
60+
run: |
61+
if [ -f package-lock.json ]; then
62+
npm ci
63+
else
64+
npm install
65+
fi
66+
67+
- name: Build
68+
run: npm run build
69+
70+
- name: Publish to npm
71+
run: npm publish --access public
72+
env:
73+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
74+

.gitignore

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# Dependencies
2+
node_modules/
3+
npm-debug.log*
4+
yarn-debug.log*
5+
yarn-error.log*
6+
7+
# Build outputs
8+
dist/
9+
build/
10+
*.tsbuildinfo
11+
12+
# Environment variables
13+
.env
14+
.env.local
15+
.env.development.local
16+
.env.test.local
17+
.env.production.local
18+
19+
# IDE
20+
.vscode/
21+
.idea/
22+
*.swp
23+
*.swo
24+
*~
25+
26+
# OS
27+
.DS_Store
28+
Thumbs.db
29+
30+
# Logs
31+
logs/
32+
*.log
33+
34+
# Runtime data
35+
pids/
36+
*.pid
37+
*.seed
38+
*.pid.lock
39+
40+
# Coverage directory used by tools like istanbul
41+
coverage/
42+
*.lcov
43+
44+
# nyc test coverage
45+
.nyc_output
46+
47+
# Dependency directories
48+
jspm_packages/
49+
50+
# Optional npm cache directory
51+
.npm
52+
53+
# Optional eslint cache
54+
.eslintcache
55+
56+
# Optional REPL history
57+
.node_repl_history
58+
59+
# Output of 'npm pack'
60+
*.tgz
61+
62+
# Yarn Integrity file
63+
.yarn-integrity
64+
65+
# parcel-bundler cache (https://parceljs.org/)
66+
.cache
67+
.parcel-cache
68+
69+
# next.js build output
70+
.next
71+
72+
# nuxt.js build output
73+
.nuxt
74+
75+
# vuepress build output
76+
.vuepress/dist
77+
78+
# Serverless directories
79+
.serverless
80+
81+
# FuseBox cache
82+
.fusebox/
83+
84+
# DynamoDB Local files
85+
.dynamodb/
86+
87+
# TernJS port file
88+
.tern-port
89+
90+
# Stores VSCode versions used for testing VSCode extensions
91+
.vscode-test

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Changelog
2+
3+
All notable changes to this SDK are documented in this file.
4+
5+
## [Unreleased]
6+
7+
- Root exports: `verifyLicenseAssertionJwt`, `LICENSE_TOKEN_USE_CLAIM`, and `VerifyLicenseAssertionOptions` — parity with `licensechain-node-sdk` (`src/license-assertion.ts`). Rollup marks `jose` as external for CJS/ESM. `license-assertion.cjs` re-exports from `dist/index.js` for back-compat.
8+
9+
## 2026-04-06
10+
11+
- Added repository-level `ROADMAP.md` and `CHANGELOG.md` for SDK workspace doc-gap conformance.
12+
- Captured JavaScript SDK consolidation posture with shared JavaScript/Node core governance.

CLAUDE.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# LicenseChain JavaScript SDK
2+
3+
- **Language**: TypeScript / JavaScript (isomorphic)
4+
- **Package**: `licensechain-js-sdk` (npm)
5+
- **Tier**: 1 (release-blocking)
6+
- **Group**: core-language
7+
- **Build**: `npm run build` (tsc)
8+
- **Test**: `npm test`
9+
- **API base**: `https://api.licensechain.app/v1`
10+
- **JWKS**: `verifyLicenseAssertionJwt` via `jose` (ESM+bundler or Node; UMD: jose external)
11+
- **Verify**: `LicenseService.verifyWithDetails` — sends `{ key, hwuid? }`
12+
- **Webhooks**: HMAC-SHA256 with `crypto.timingSafeEqual`
13+
- **Role**: Isomorphic/default choice SDK (consolidation with Node.js SDK shares HTTP core)

LICENSE

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Elastic License 2.0 (ELv2)
2+
3+
Copyright (c) 2025 LicenseChain LLC
4+
5+
This software and associated documentation files (the "Software") are provided
6+
under the Elastic License 2.0 (the "License"). You may not use this file except
7+
in compliance with the License. You may obtain a copy of the License at:
8+
9+
https://www.elastic.co/licensing/elastic-license
10+
11+
Unless required by applicable law or agreed to in writing, software distributed
12+
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
13+
CONDITIONS OF ANY KIND, either express or implied. See the License for the
14+
specific language governing permissions and limitations under the License.
15+

LicenseChain.rbxm

22.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)