@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.
Files changed (85) hide show
  1. package/package.json +4 -1
  2. package/.github/workflows/ci.yml +0 -62
  3. package/.github/workflows/test.yml +0 -44
  4. package/.husky/pre-commit +0 -1
  5. package/.nvmrc +0 -1
  6. package/.prettierrc +0 -6
  7. package/eslint.config.mjs +0 -35
  8. package/src/contracts/cdp.ts +0 -741
  9. package/src/contracts/collector.ts +0 -98
  10. package/src/contracts/gov.ts +0 -1
  11. package/src/contracts/interest-oracle.ts +0 -149
  12. package/src/contracts/lrp.ts +0 -223
  13. package/src/contracts/one-shot.ts +0 -67
  14. package/src/contracts/stability-pool.ts +0 -684
  15. package/src/contracts/staking.ts +0 -348
  16. package/src/contracts/treasury.ts +0 -112
  17. package/src/helpers/asset-helpers.ts +0 -57
  18. package/src/helpers/helper-txs.ts +0 -30
  19. package/src/helpers/helpers.ts +0 -38
  20. package/src/helpers/indigo-helpers.ts +0 -19
  21. package/src/helpers/interest-oracle.ts +0 -57
  22. package/src/helpers/lucid-utils.ts +0 -70
  23. package/src/helpers/price-oracle-helpers.ts +0 -36
  24. package/src/helpers/stability-pool-helpers.ts +0 -207
  25. package/src/helpers/staking-helpers.ts +0 -94
  26. package/src/helpers/time-helpers.ts +0 -4
  27. package/src/helpers/value-helpers.ts +0 -16
  28. package/src/index.ts +0 -34
  29. package/src/scripts/always-fail-validator.ts +0 -7
  30. package/src/scripts/auth-token-policy.ts +0 -23
  31. package/src/scripts/cdp-creator-validator.ts +0 -53
  32. package/src/scripts/cdp-validator.ts +0 -9
  33. package/src/scripts/collector-validator.ts +0 -8
  34. package/src/scripts/execute-validator.ts +0 -52
  35. package/src/scripts/gov-validator.ts +0 -44
  36. package/src/scripts/iasset-policy.ts +0 -22
  37. package/src/scripts/interest-oracle-validator.ts +0 -23
  38. package/src/scripts/lrp-validator.ts +0 -23
  39. package/src/scripts/one-shot-policy.ts +0 -62
  40. package/src/scripts/poll-manager-validator.ts +0 -52
  41. package/src/scripts/poll-shard-validator.ts +0 -47
  42. package/src/scripts/price-oracle-validator.ts +0 -26
  43. package/src/scripts/stability-pool-validator.ts +0 -60
  44. package/src/scripts/staking-validator.ts +0 -8
  45. package/src/scripts/treasury-validator.ts +0 -8
  46. package/src/scripts/version-record-policy.ts +0 -26
  47. package/src/scripts/version-registry.ts +0 -15
  48. package/src/types/generic.ts +0 -106
  49. package/src/types/indigo/cdp-creator.ts +0 -46
  50. package/src/types/indigo/cdp.ts +0 -88
  51. package/src/types/indigo/execute.ts +0 -21
  52. package/src/types/indigo/gov.ts +0 -51
  53. package/src/types/indigo/interest-oracle.ts +0 -55
  54. package/src/types/indigo/lrp.ts +0 -54
  55. package/src/types/indigo/poll-manager.ts +0 -21
  56. package/src/types/indigo/poll-shard.ts +0 -16
  57. package/src/types/indigo/price-oracle.ts +0 -38
  58. package/src/types/indigo/stability-pool.ts +0 -233
  59. package/src/types/indigo/staking.ts +0 -99
  60. package/src/types/indigo/version-record.ts +0 -17
  61. package/src/types/on-chain-decimal.ts +0 -23
  62. package/src/types/one-shot.ts +0 -22
  63. package/src/types/system-params.ts +0 -246
  64. package/tests/data/system-params.json +0 -989
  65. package/tests/datums.test.ts +0 -286
  66. package/tests/endpoints/initialize.ts +0 -1013
  67. package/tests/hash-checks.test.ts +0 -73
  68. package/tests/indigo-test-helpers.ts +0 -115
  69. package/tests/initialize.test.ts +0 -27
  70. package/tests/interest-calculations.test.ts +0 -120
  71. package/tests/interest-oracle.test.ts +0 -90
  72. package/tests/lrp.test.ts +0 -149
  73. package/tests/queries/governance-queries.ts +0 -31
  74. package/tests/queries/iasset-queries.ts +0 -39
  75. package/tests/queries/interest-oracle-queries.ts +0 -13
  76. package/tests/queries/lrp-queries.ts +0 -39
  77. package/tests/queries/price-oracle-queries.ts +0 -27
  78. package/tests/queries/stability-pool-queries.ts +0 -75
  79. package/tests/queries/staking-queries.ts +0 -43
  80. package/tests/stability-pool.test.ts +0 -364
  81. package/tests/staking.test.ts +0 -105
  82. package/tests/test-helpers.ts +0 -38
  83. package/tsconfig.build.json +0 -4
  84. package/tsconfig.json +0 -16
  85. 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",
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 .",
@@ -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
@@ -1,6 +0,0 @@
1
- {
2
- "singleQuote": true,
3
- "trailingComma": "all",
4
- "tabWidth": 2,
5
- "semi": true
6
- }
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
- );