-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit bf47d1b
Showing
35 changed files
with
4,486 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,20 @@ | ||
name: Package Size Report | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
pkg-size-report: | ||
name: Package Size Report | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Package size report | ||
id: pkg-size-report | ||
uses: privatenumber/pkg-size-action@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains 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,57 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: main | ||
|
||
permissions: | ||
contents: read # for checkout | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write # to be able to publish a GitHub release | ||
issues: write # to be able to comment on released issues | ||
pull-requests: write # to be able to comment on released pull requests | ||
id-token: write # to enable use of OIDC for npm provenance | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: .nvmrc | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/action-setup@v3 | ||
with: | ||
version: 9 | ||
run_install: true | ||
|
||
- name: Build | ||
run: pnpm build | ||
|
||
- name: Lint | ||
run: pnpm lint | ||
|
||
- name: Type check | ||
run: pnpm type-check | ||
|
||
- name: Test | ||
run: pnpm test | ||
|
||
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies | ||
run: pnpm audit signatures | ||
|
||
- name: Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: pnpm dlx semantic-release |
This file contains 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,42 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: [main, develop] | ||
pull_request: | ||
branches: [main, develop] | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: .nvmrc | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/action-setup@v3 | ||
with: | ||
version: 9 | ||
run_install: true | ||
|
||
- name: Type check | ||
run: pnpm type-check | ||
|
||
- name: Build | ||
run: pnpm build | ||
|
||
- name: Test | ||
run: pnpm test | ||
|
||
- name: Test Node.js v16 | ||
run: pnpm --use-node-version=16.20.0 test | ||
|
||
- name: Lint | ||
run: pnpm lint |
This file contains 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,23 @@ | ||
# macOS | ||
.DS_Store | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
|
||
# Dependency directories | ||
node_modules/ | ||
|
||
# Output of 'npm pack' | ||
/*.tgz | ||
|
||
# dotenv environment variables file | ||
.env | ||
.env.test | ||
|
||
# Distribution | ||
dist | ||
|
||
# Cache | ||
.eslintcache |
This file contains 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 @@ | ||
v20.12 |
This file contains 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 @@ | ||
{} |
This file contains 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,3 @@ | ||
{ | ||
"typescript.tsdk": "node_modules/typescript/lib" | ||
} |
This file contains 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,8 @@ | ||
# AnchorES | ||
|
||
Minimal Solana transaction parser. | ||
|
||
- Tree-shakeable: 10KB (2.5KB gzip) to parse Jupiter Swap Events | ||
- ESM and commonjs | ||
- No IDL, structs defined in code | ||
- Minimal dependencies |
This file contains 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,11 @@ | ||
import unjs from "eslint-config-unjs"; | ||
|
||
export default unjs({ | ||
ignores: [ | ||
// ignore paths | ||
], | ||
rules: { | ||
// rule overrides | ||
"unicorn/no-array-callback-reference": "off", | ||
}, | ||
}); |
This file contains 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,100 @@ | ||
{ | ||
"name": "anchores", | ||
"version": "0.0.1", | ||
"description": "", | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC", | ||
"type": "module", | ||
"sideEffects": false, | ||
"files": [ | ||
"dist" | ||
], | ||
"main": "./dist/index.cjs", | ||
"module": "./dist/index.mjs", | ||
"types": "./dist/index.d.cts", | ||
"exports": { | ||
".": { | ||
"require": { | ||
"types": "./dist/index.d.cts", | ||
"default": "./dist/index.cjs" | ||
}, | ||
"import": { | ||
"types": "./dist/index.d.mts", | ||
"default": "./dist/index.mjs" | ||
} | ||
}, | ||
"./binary": { | ||
"require": { | ||
"types": "./dist/binary.d.cts", | ||
"default": "./dist/binary.cjs" | ||
}, | ||
"import": { | ||
"types": "./dist/binary.d.mts", | ||
"default": "./dist/binary.mjs" | ||
} | ||
}, | ||
"./anchor": { | ||
"require": { | ||
"types": "./dist/anchor.d.cts", | ||
"default": "./dist/anchor.cjs" | ||
}, | ||
"import": { | ||
"types": "./dist/anchor.d.mts", | ||
"default": "./dist/anchor.mjs" | ||
} | ||
}, | ||
"./parsers": { | ||
"require": { | ||
"types": "./dist/parsers/types.d.cts" | ||
}, | ||
"import": { | ||
"types": "./dist/parsers/types.d.mts" | ||
} | ||
}, | ||
"./parsers/jupiter": { | ||
"require": { | ||
"types": "./dist/parsers/jupiter.d.cts", | ||
"default": "./dist/parsers/jupiter.cjs" | ||
}, | ||
"import": { | ||
"types": "./dist/parsers/jupiter.d.mts", | ||
"default": "./dist/parsers/jupiter.mjs" | ||
} | ||
}, | ||
"./parsers/meteora-dlmm": { | ||
"require": { | ||
"types": "./dist/parsers/meteora-dlmm.d.cts", | ||
"default": "./dist/parsers/meteora-dlmm.cjs" | ||
}, | ||
"import": { | ||
"types": "./dist/parsers/meteora-dlmm.d.mts", | ||
"default": "./dist/parsers/meteora-dlmm.mjs" | ||
} | ||
} | ||
}, | ||
"scripts": { | ||
"lint": "eslint --cache . && prettier -c src", | ||
"lint:fix": "eslint --cache . --fix && prettier -w src", | ||
"test": "vitest --typecheck", | ||
"dev": "pkgroll --watch", | ||
"build": "pkgroll --minify", | ||
"type-check": "tsc --noEmit", | ||
"prepack": "pnpm build && clean-pkg-json" | ||
}, | ||
"devDependencies": { | ||
"@solana/web3.js": "^1.94.0", | ||
"@types/node": "^20.14.2", | ||
"clean-pkg-json": "^1.2.0", | ||
"eslint": "^9.6.0", | ||
"eslint-config-unjs": "^0.3.2", | ||
"pkgroll": "^2.1.1", | ||
"prettier": "^3.3.2", | ||
"typescript": "^5.4.5", | ||
"vitest": "^1.6.0" | ||
}, | ||
"dependencies": { | ||
"@noble/hashes": "^1.4.0", | ||
"@scure/base": "^1.1.7" | ||
} | ||
} |
Oops, something went wrong.