-
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
Showing
193 changed files
with
40,541 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,7 @@ | ||
dist | ||
node_modules | ||
src/@codegen | ||
src/accounts | ||
src/errors | ||
src/instructions | ||
src/types |
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,28 @@ | ||
module.exports = { | ||
root: true, | ||
parser: '@typescript-eslint/parser', | ||
plugins: ['@typescript-eslint', 'import', 'mocha'], | ||
extends: ['eslint:recommended', 'plugin:@typescript-eslint/eslint-recommended', 'prettier'], | ||
env: { | ||
node: true, | ||
es6: true, | ||
}, | ||
parserOptions: { | ||
ecmaVersion: 2018, | ||
sourceType: 'module', | ||
}, | ||
rules: { | ||
'@typescript-eslint/no-unused-vars': ['error', { varsIgnorePattern: '^_', argsIgnorePattern: '^_' }], | ||
'no-case-declarations': 'off', | ||
'no-unused-vars': ['warn', { varsIgnorePattern: '^_', argsIgnorePattern: '^_' }], | ||
}, | ||
settings: { | ||
'import/resolver': { | ||
node: { | ||
extensions: ['.js', '.jsx', '.d.ts', '.ts', '.tsx'], | ||
moduleDirectory: ['src'], | ||
paths: 'src', | ||
}, | ||
}, | ||
}, | ||
}; |
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,32 @@ | ||
name: Prettier | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- 'release/**' | ||
pull_request: | ||
branches: | ||
- master | ||
- 'release/**' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Cache dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }} | ||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
- name: Run eslint | ||
run: |- | ||
yarn 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,90 @@ | ||
name: Publish Release | ||
on: | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Version to publish, by semver keyword.' | ||
required: true | ||
default: patch | ||
type: choice | ||
options: | ||
- patch | ||
- minor | ||
- major | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
env: | ||
# NPM automation token (skips 2FA) | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
submodules: recursive | ||
token: ${{ secrets.HUBBLEPROTOCOLBOT_WRITE_REPO_PAT }} # use bot to avoid branch protection | ||
|
||
- name: Master-branch check | ||
run: | | ||
echo "Must be on master branch to publish the package." | ||
exit 1 | ||
if: github.ref != 'refs/heads/master' | ||
|
||
- name: Setup .npmrc file for publish | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '19' | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Configure Git User | ||
run: | | ||
git config --global user.name "Kamino Bot" | ||
git config --global user.username "kamino-bot" | ||
git config --global user.email "[email protected]" | ||
- name: Install dependencies | ||
run: | | ||
yarn install --frozen-lockfile | ||
- name: Build package | ||
run: yarn build | ||
|
||
- name: Get latest version | ||
id: get_latest_version | ||
run: | | ||
latest_version=$(npm view @kamino-finance/scope-sdk version) | ||
echo "Latest version: $latest_version" | ||
echo "::set-output name=latest_version::$latest_version" | ||
- name: Bump version | ||
uses: anothrNick/[email protected] | ||
id: semver | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.HUBBLEPROTOCOLBOT_WRITE_REPO_PAT }} | ||
DEFAULT_BUMP: ${{ inputs.version }} | ||
DEFAULT_BRANCH: master | ||
INITIAL_VERSION: ${{ steps.get_latest_version.outputs.latest_version }} | ||
WITH_V: false | ||
RELEASE_BRANCHES: master | ||
TAG_CONTEXT: repo | ||
PRERELEASE: false | ||
VERBOSE: false | ||
|
||
- name: Publish to npm | ||
run: yarn publish --new-version ${{ steps.semver.outputs.new_tag }} | ||
|
||
- name: Create git commit | ||
# force push to avoid branch protection | ||
run: | | ||
yarn config set version-git-message "@kamino-finance/scope-sdk:%s" | ||
yarn version --new-version ${{ steps.semver.outputs.new_tag }} | ||
git push --force origin master | ||
- name: Create Git tag | ||
if: steps.semver.outputs.tag_created == 'true' | ||
run: | | ||
git tag "v${{ steps.semver.outputs.new_tag }}" | ||
git push origin ${{ steps.semver.outputs.new_tag }} |
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,43 @@ | ||
name: Tests | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
push: | ||
branches: | ||
- master | ||
|
||
env: | ||
solana_version: 'v1.18.15' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: hubbleprotocol/[email protected] | ||
id: solana-setup | ||
with: | ||
solana-version: ${{ env.solana_version }} | ||
rust-shared-key: 'tests' | ||
- name: Cache dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }} | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 19 | ||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
- name: Build | ||
run: yarn build | ||
- name: Run tests | ||
# Add solana binaries to path - todo should not be needed | ||
run: | | ||
echo "/home/runner/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH | ||
yarn start-validator-and-test |
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,7 @@ | ||
dist/ | ||
node_modules/ | ||
test-ledger/ | ||
.idea/ | ||
keys/localnet/farms.json | ||
keys/localnet/owner.json | ||
.env |
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,7 @@ | ||
node_modules | ||
tests | ||
deps | ||
test-ledger | ||
.idea | ||
.github | ||
|
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,15 @@ | ||
dist/ | ||
docs/ | ||
node_modules/ | ||
*.md | ||
src/kamino-client | ||
src/meteora_client | ||
src/raydium_client | ||
src/whirlpools-client | ||
test-ledger/ | ||
deps/ | ||
src/@codegen | ||
src/accounts | ||
src/errors | ||
src/instructions | ||
src/types |
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,10 @@ | ||
{ | ||
"proseWrap": "never", | ||
"semi": true, | ||
"trailingComma": "es5", | ||
"singleQuote": true, | ||
"jsxSingleQuote": false, | ||
"printWidth": 120, | ||
"tabWidth": 2, | ||
"bracketSpacing": true | ||
} |
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,24 @@ | ||
# Scope SDK | ||
|
||
The Scope SDK is a TypeScript client SDK for easy access to the [Scope price oracle aggregator](https://github.com/kamino-finance/scope/) for Solana. | ||
|
||
## Install | ||
|
||
[![npm](https://img.shields.io/npm/v/@kamino-finance/scope-sdk)](https://www.npmjs.com/package/@kamino-finance/scope-sdk) | ||
|
||
```shell | ||
npm install @solana/web3.js @kamino-finance/scope-sdk | ||
``` | ||
|
||
## Usage | ||
|
||
```javascript | ||
import { Scope, ScopeToken } from '@kamino-finance/scope-sdk'; | ||
import { clusterApiUrl, Connection } from '@solana/web3.js'; | ||
|
||
const connection = new Connection(clusterApiUrl('mainnet-beta')); | ||
const scope = new Scope('mainnet-beta', web3Client.connection); | ||
|
||
// get all prices supported by Scope Oracle | ||
const oraclePrices = await scope.getOraclePrices(); | ||
``` |
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,14 @@ | ||
{ | ||
"pubkey": "AWUuZ6o4ZJX2fDqjUqDaA1pfHenZ6XEbmuTamMgM911E", | ||
"account": { | ||
"lamports": 46618080, | ||
"data": [ | ||
"GEZivzqQe54j/U/kXsJigJ63LUesTNR4lCVcKeIc4dvlIBcKWIJx304OAAB4nOUb23LbuvFXMH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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", | ||
"base64" | ||
], | ||
"owner": "HFn8GnPADiny6XqUoWE8uRPPxb29ikn4yTuPa9MF2fWJ", | ||
"executable": false, | ||
"rentEpoch": 18446744073709551615, | ||
"space": 6570 | ||
} | ||
} |
Binary file not shown.
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,74 @@ | ||
{ | ||
"name": "@kamino-finance/scope-sdk", | ||
"description": "Scope Oracle SDK", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"version": "7.0.0", | ||
"scripts": { | ||
"prepublish": "yarn build", | ||
"build": "rm -rf dist/; tsc", | ||
"test": "npx ts-mocha tests/**/*.test.ts --exit --timeout 60000", | ||
"watch": "tsc --watch", | ||
"lint": "yarn prettier --check .; yarn eslint .", | ||
"lint:fix": "yarn prettier --write .; yarn eslint . --fix", | ||
"start-validator": "solana-test-validator --bpf-program HFn8GnPADiny6XqUoWE8uRPPxb29ikn4yTuPa9MF2fWJ ./deps/scope.so --clone 3NJYftD5sjVfxSnUdZ1wVML8f3aC6mp1CXCL6L7TnU8C --quiet --reset -u m", | ||
"start-validator-and-test": "yarn start-server-and-test 'yarn start-validator' http://127.0.0.1:8899/health test", | ||
"codegen": "anchor-client-gen ./src/scope.json ./src/ --program-id HFn8GnPADiny6XqUoWE8uRPPxb29ikn4yTuPa9MF2fWJ && anchor-client-gen ./src/kamino.json ./src/@codegen/kamino --program-id 6LtLpnUFNByNXLyCoK9wA2MykKAmQNZKBdY8s47dehDc" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/kamino-finance/scope-sdk.git" | ||
}, | ||
"keywords": [ | ||
"kamino-finance", | ||
"common", | ||
"sdk", | ||
"client", | ||
"scope" | ||
], | ||
"author": "Kamino Finance", | ||
"license": "Apache-2.0", | ||
"bugs": { | ||
"url": "https://github.com/kamino-finance/scope-sdk/issues" | ||
}, | ||
"homepage": "https://github.com/kamino-finance/scope-sdk", | ||
"dependencies": { | ||
"@coral-xyz/anchor": "^0.29.0", | ||
"@solana/buffer-layout": "^4.0.1", | ||
"@solana/web3.js": "^1.78.4", | ||
"bn.js": "^5.2.1", | ||
"decimal.js": "^10.3.1" | ||
}, | ||
"devDependencies": { | ||
"@types/bn.js": "^5.1.5", | ||
"@types/bs58": "^4.0.4", | ||
"@types/chai": "^4.3.5", | ||
"@types/chai-as-promised": "^7.1.8", | ||
"@types/mocha": "^10.0.7", | ||
"@types/node-fetch": "^2.6.7", | ||
"@typescript-eslint/eslint-plugin": "^5.5.0", | ||
"@typescript-eslint/parser": "^5.5.0", | ||
"anchor-client-gen": "^0.28.1", | ||
"chai": "^4.3.7", | ||
"chai-as-promised": "^7.1.1", | ||
"chai-bignumber": "^3.1.0", | ||
"chai-decimaljs": "^0.0.1", | ||
"eslint": "^8.4.0", | ||
"eslint-config-airbnb-base": "^15.0.0", | ||
"eslint-config-airbnb-typescript": "^16.1.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint-plugin-import": "^2.25.3", | ||
"eslint-plugin-mocha": "^10.1.0", | ||
"eslint-plugin-react": "^7.27.1", | ||
"mocha": "^10.2.0", | ||
"prettier": "^3.3.2", | ||
"start-server-and-test": "^2.0.0", | ||
"ts-mocha": "^10.0.0", | ||
"tweetnacl-ts": "^1.0.3", | ||
"typescript": "^5.5.4", | ||
"typescript-eslint": "^0.0.1-alpha.0" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
} | ||
} |
Oops, something went wrong.