-
Notifications
You must be signed in to change notification settings - Fork 87
feat: light token kit #2289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
sergeytimoshin
wants to merge
4
commits into
main
Choose a base branch
from
sergey/feat-light-token-kit
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
feat: light token kit #2289
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - "js/token-sdk/**" | ||
| - "js/token-client/**" | ||
| - "js/token-idl/**" | ||
| - "pnpm-lock.yaml" | ||
| pull_request: | ||
| branches: | ||
| - "*" | ||
| paths: | ||
| - "js/token-sdk/**" | ||
| - "js/token-client/**" | ||
| - "js/token-idl/**" | ||
| - "pnpm-lock.yaml" | ||
| types: | ||
| - opened | ||
| - synchronize | ||
| - reopened | ||
| - ready_for_review | ||
|
|
||
| name: token-kit | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| token-kit-tests: | ||
| name: token-kit-tests | ||
| if: github.event.pull_request.draft == false | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout sources | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: "22" | ||
|
|
||
| - name: Setup pnpm | ||
| uses: pnpm/action-setup@v4 | ||
| with: | ||
| version: 9 | ||
| run_install: false | ||
|
|
||
| - name: Install just | ||
| uses: extractions/setup-just@v2 | ||
|
|
||
| - name: Install dependencies | ||
| run: pnpm install --frozen-lockfile | ||
|
|
||
| - name: Build token-sdk | ||
| run: cd js/token-sdk && pnpm build | ||
|
|
||
| - name: Run token-sdk unit tests | ||
| run: just js test-token-sdk | ||
|
|
||
| - name: Run token-client unit tests | ||
| run: just js test-token-client | ||
|
|
||
| - name: Lint token-sdk | ||
| run: just js lint-token-kit | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| { | ||
| "name": "@lightprotocol/token-client", | ||
| "version": "0.1.0", | ||
| "description": "Light Protocol indexer client for compressed tokens", | ||
| "type": "module", | ||
| "main": "./dist/index.js", | ||
| "types": "./dist/index.d.ts", | ||
| "exports": { | ||
| ".": { | ||
| "import": "./dist/index.js", | ||
| "types": "./dist/index.d.ts" | ||
| } | ||
| }, | ||
| "files": [ | ||
| "dist", | ||
| "src" | ||
| ], | ||
| "scripts": { | ||
| "build": "tsc", | ||
| "clean": "rm -rf dist", | ||
| "test": "vitest run tests/unit/", | ||
| "test:e2e": "vitest run --config vitest.e2e.config.ts", | ||
| "test:watch": "vitest" | ||
| }, | ||
| "peerDependencies": { | ||
| "@solana/kit": "^2.1.0" | ||
| }, | ||
| "dependencies": { | ||
| "@lightprotocol/token-sdk": "workspace:*", | ||
| "@solana/addresses": "^2.1.0", | ||
| "@solana/codecs": "^2.1.0", | ||
| "@solana/instructions": "^2.1.0" | ||
| }, | ||
| "devDependencies": { | ||
| "typescript": "^5.7.3", | ||
| "vitest": "^2.1.8" | ||
| }, | ||
| "engines": { | ||
| "node": ">=18" | ||
| }, | ||
| "keywords": [ | ||
| "solana", | ||
| "light-protocol", | ||
| "compressed-token", | ||
| "indexer", | ||
| "zk-compression" | ||
| ], | ||
| "license": "Apache-2.0", | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "https://github.com/Lightprotocol/light-protocol.git", | ||
| "directory": "js/token-client" | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Copilot Autofix
AI about 15 hours ago
In general, fix this by explicitly declaring a minimal
permissionsblock either at the workflow root (applies to all jobs) or on the specific job. Since this workflow only checks out code and runs local build/test/lint commands, it only needs read access to repository contents. We can safely setpermissions: contents: readfor the job (or at the top level) without changing any existing behavior.The single best fix here is to add a
permissionsblock to thetoken-kit-testsjob definition in.github/workflows/token-kit.yml, just under the job name (orruns-on) and beforesteps. Concretely, we will insert:This does not require any imports or additional methods, and it keeps the change localized to the shown snippet. No other files or sections need modification.