@indigo-labs/indigo-sdk 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -1
- package/.github/workflows/ci.yml +0 -62
- package/.github/workflows/test.yml +0 -44
- package/.husky/pre-commit +0 -1
- package/.nvmrc +0 -1
- package/.prettierrc +0 -6
- package/eslint.config.mjs +0 -35
- package/src/contracts/cdp.ts +0 -741
- package/src/contracts/collector.ts +0 -98
- package/src/contracts/gov.ts +0 -1
- package/src/contracts/interest-oracle.ts +0 -149
- package/src/contracts/lrp.ts +0 -223
- package/src/contracts/one-shot.ts +0 -67
- package/src/contracts/stability-pool.ts +0 -684
- package/src/contracts/staking.ts +0 -348
- package/src/contracts/treasury.ts +0 -112
- package/src/helpers/asset-helpers.ts +0 -57
- package/src/helpers/helper-txs.ts +0 -30
- package/src/helpers/helpers.ts +0 -38
- package/src/helpers/indigo-helpers.ts +0 -19
- package/src/helpers/interest-oracle.ts +0 -57
- package/src/helpers/lucid-utils.ts +0 -70
- package/src/helpers/price-oracle-helpers.ts +0 -36
- package/src/helpers/stability-pool-helpers.ts +0 -207
- package/src/helpers/staking-helpers.ts +0 -94
- package/src/helpers/time-helpers.ts +0 -4
- package/src/helpers/value-helpers.ts +0 -16
- package/src/index.ts +0 -34
- package/src/scripts/always-fail-validator.ts +0 -7
- package/src/scripts/auth-token-policy.ts +0 -23
- package/src/scripts/cdp-creator-validator.ts +0 -53
- package/src/scripts/cdp-validator.ts +0 -9
- package/src/scripts/collector-validator.ts +0 -8
- package/src/scripts/execute-validator.ts +0 -52
- package/src/scripts/gov-validator.ts +0 -44
- package/src/scripts/iasset-policy.ts +0 -22
- package/src/scripts/interest-oracle-validator.ts +0 -23
- package/src/scripts/lrp-validator.ts +0 -23
- package/src/scripts/one-shot-policy.ts +0 -62
- package/src/scripts/poll-manager-validator.ts +0 -52
- package/src/scripts/poll-shard-validator.ts +0 -47
- package/src/scripts/price-oracle-validator.ts +0 -26
- package/src/scripts/stability-pool-validator.ts +0 -60
- package/src/scripts/staking-validator.ts +0 -8
- package/src/scripts/treasury-validator.ts +0 -8
- package/src/scripts/version-record-policy.ts +0 -26
- package/src/scripts/version-registry.ts +0 -15
- package/src/types/generic.ts +0 -106
- package/src/types/indigo/cdp-creator.ts +0 -46
- package/src/types/indigo/cdp.ts +0 -88
- package/src/types/indigo/execute.ts +0 -21
- package/src/types/indigo/gov.ts +0 -51
- package/src/types/indigo/interest-oracle.ts +0 -55
- package/src/types/indigo/lrp.ts +0 -54
- package/src/types/indigo/poll-manager.ts +0 -21
- package/src/types/indigo/poll-shard.ts +0 -16
- package/src/types/indigo/price-oracle.ts +0 -38
- package/src/types/indigo/stability-pool.ts +0 -233
- package/src/types/indigo/staking.ts +0 -99
- package/src/types/indigo/version-record.ts +0 -17
- package/src/types/on-chain-decimal.ts +0 -23
- package/src/types/one-shot.ts +0 -22
- package/src/types/system-params.ts +0 -246
- package/tests/data/system-params.json +0 -989
- package/tests/datums.test.ts +0 -286
- package/tests/endpoints/initialize.ts +0 -1013
- package/tests/hash-checks.test.ts +0 -73
- package/tests/indigo-test-helpers.ts +0 -115
- package/tests/initialize.test.ts +0 -27
- package/tests/interest-calculations.test.ts +0 -120
- package/tests/interest-oracle.test.ts +0 -90
- package/tests/lrp.test.ts +0 -149
- package/tests/queries/governance-queries.ts +0 -31
- package/tests/queries/iasset-queries.ts +0 -39
- package/tests/queries/interest-oracle-queries.ts +0 -13
- package/tests/queries/lrp-queries.ts +0 -39
- package/tests/queries/price-oracle-queries.ts +0 -27
- package/tests/queries/stability-pool-queries.ts +0 -75
- package/tests/queries/staking-queries.ts +0 -43
- package/tests/stability-pool.test.ts +0 -364
- package/tests/staking.test.ts +0 -105
- package/tests/test-helpers.ts +0 -38
- package/tsconfig.build.json +0 -4
- package/tsconfig.json +0 -16
- package/vitest.config.ts +0 -9
package/package.json
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@indigo-labs/indigo-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Indigo SDK for interacting with Indigo endpoints via lucid-evolution",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
8
11
|
"scripts": {
|
|
9
12
|
"build": "tsup src/index.ts --format esm,cjs --dts --clean --tsconfig tsconfig.build.json",
|
|
10
13
|
"lint": "npx eslint .",
|
package/.github/workflows/ci.yml
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
name: CI
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [main]
|
|
6
|
-
pull_request:
|
|
7
|
-
branches: [main]
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
lint-and-build:
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
|
|
13
|
-
steps:
|
|
14
|
-
- name: Checkout code
|
|
15
|
-
uses: actions/checkout@v4
|
|
16
|
-
|
|
17
|
-
- name: Setup Node.js
|
|
18
|
-
uses: actions/setup-node@v4
|
|
19
|
-
with:
|
|
20
|
-
node-version-file: '.nvmrc'
|
|
21
|
-
|
|
22
|
-
- name: Setup pnpm
|
|
23
|
-
uses: pnpm/action-setup@v4
|
|
24
|
-
with:
|
|
25
|
-
version: latest
|
|
26
|
-
|
|
27
|
-
- name: Get pnpm store directory
|
|
28
|
-
shell: bash
|
|
29
|
-
run: |
|
|
30
|
-
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
|
31
|
-
|
|
32
|
-
- name: Setup pnpm cache
|
|
33
|
-
uses: actions/cache@v4
|
|
34
|
-
with:
|
|
35
|
-
path: ${{ env.STORE_PATH }}
|
|
36
|
-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
37
|
-
restore-keys: |
|
|
38
|
-
${{ runner.os }}-pnpm-store-
|
|
39
|
-
|
|
40
|
-
- name: Install dependencies
|
|
41
|
-
run: pnpm install --frozen-lockfile
|
|
42
|
-
|
|
43
|
-
- name: Check formatting
|
|
44
|
-
run: pnpm run format:check
|
|
45
|
-
|
|
46
|
-
- name: Check linting
|
|
47
|
-
run: pnpm run lint
|
|
48
|
-
|
|
49
|
-
- name: Build project
|
|
50
|
-
run: pnpm run build
|
|
51
|
-
|
|
52
|
-
- name: Verify build output
|
|
53
|
-
run: |
|
|
54
|
-
if [ ! -d "dist" ]; then
|
|
55
|
-
echo "Build failed: dist directory not found"
|
|
56
|
-
exit 1
|
|
57
|
-
fi
|
|
58
|
-
if [ ! -f "dist/index.js" ] || [ ! -f "dist/index.mjs" ] || [ ! -f "dist/index.d.ts" ]; then
|
|
59
|
-
echo "Build failed: expected output files not found"
|
|
60
|
-
exit 1
|
|
61
|
-
fi
|
|
62
|
-
echo "Build verification passed"
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
name: Tests
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [main]
|
|
6
|
-
pull_request:
|
|
7
|
-
branches: [main]
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
test:
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
|
|
13
|
-
steps:
|
|
14
|
-
- name: Checkout code
|
|
15
|
-
uses: actions/checkout@v4
|
|
16
|
-
|
|
17
|
-
- name: Setup Node.js
|
|
18
|
-
uses: actions/setup-node@v4
|
|
19
|
-
with:
|
|
20
|
-
node-version-file: '.nvmrc'
|
|
21
|
-
|
|
22
|
-
- name: Setup pnpm
|
|
23
|
-
uses: pnpm/action-setup@v4
|
|
24
|
-
with:
|
|
25
|
-
version: latest
|
|
26
|
-
|
|
27
|
-
- name: Get pnpm store directory
|
|
28
|
-
shell: bash
|
|
29
|
-
run: |
|
|
30
|
-
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
|
31
|
-
|
|
32
|
-
- name: Setup pnpm cache
|
|
33
|
-
uses: actions/cache@v4
|
|
34
|
-
with:
|
|
35
|
-
path: ${{ env.STORE_PATH }}
|
|
36
|
-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
37
|
-
restore-keys: |
|
|
38
|
-
${{ runner.os }}-pnpm-store-
|
|
39
|
-
|
|
40
|
-
- name: Install dependencies
|
|
41
|
-
run: pnpm install --frozen-lockfile
|
|
42
|
-
|
|
43
|
-
- name: Run tests
|
|
44
|
-
run: pnpm run test
|
package/.husky/pre-commit
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
pnpm exec lint-staged
|
package/.nvmrc
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
v18.19.1
|
package/.prettierrc
DELETED
package/eslint.config.mjs
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import eslint from '@eslint/js';
|
|
2
|
-
import tseslint from 'typescript-eslint';
|
|
3
|
-
|
|
4
|
-
export default tseslint.config(
|
|
5
|
-
{
|
|
6
|
-
ignores: ['**/dist/*', '**/node_modules/*'],
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
files: ['**/*.ts'],
|
|
10
|
-
extends: [
|
|
11
|
-
eslint.configs.recommended,
|
|
12
|
-
tseslint.configs.recommendedTypeChecked,
|
|
13
|
-
{
|
|
14
|
-
languageOptions: {
|
|
15
|
-
parserOptions: {
|
|
16
|
-
projectService: true,
|
|
17
|
-
tsconfigRootDir: import.meta.dirname,
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
],
|
|
22
|
-
rules: {
|
|
23
|
-
'no-use-before-define': 'error',
|
|
24
|
-
'@typescript-eslint/no-unused-vars': [
|
|
25
|
-
'error',
|
|
26
|
-
{
|
|
27
|
-
args: 'all',
|
|
28
|
-
argsIgnorePattern: '^_',
|
|
29
|
-
varsIgnorePattern: '^_',
|
|
30
|
-
caughtErrorsIgnorePattern: '^_',
|
|
31
|
-
},
|
|
32
|
-
],
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
);
|