@kasufinance/kasu-sdk 2.3.0 → 2.4.0
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/.github/workflows/gitleaks.yml +22 -0
- package/.github/workflows/main.yml +9 -15
- package/.gitleaksignore +19 -0
- package/package.json +1 -1
- package/src/services/DataService/data-service.ts +2 -0
- package/src/services/DataService/directus-types.ts +1 -0
- package/src/services/DataService/types.ts +10 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
name: gitleaks
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, master, develop]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
gitleaks:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
with:
|
|
17
|
+
fetch-depth: 0
|
|
18
|
+
|
|
19
|
+
- name: Run gitleaks
|
|
20
|
+
run: |
|
|
21
|
+
curl -sSfL https://github.com/gitleaks/gitleaks/releases/download/v8.30.1/gitleaks_8.30.1_linux_x64.tar.gz | tar -xz gitleaks
|
|
22
|
+
./gitleaks git --redact --no-banner .
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
name:
|
|
1
|
+
name: Verify release tag
|
|
2
|
+
|
|
3
|
+
# npm publishes are intentionally manual (policy: always run `npm publish`
|
|
4
|
+
# locally as a kasu_finance org member). This workflow only verifies the
|
|
5
|
+
# pushed tag matches package.json — it does NOT publish.
|
|
2
6
|
|
|
3
7
|
on:
|
|
4
8
|
push:
|
|
@@ -8,14 +12,13 @@ on:
|
|
|
8
12
|
workflow_dispatch:
|
|
9
13
|
|
|
10
14
|
jobs:
|
|
11
|
-
|
|
15
|
+
verify:
|
|
12
16
|
runs-on: ubuntu-latest
|
|
13
17
|
permissions:
|
|
14
18
|
contents: read
|
|
15
|
-
packages: write
|
|
16
19
|
|
|
17
20
|
steps:
|
|
18
|
-
- uses: actions/checkout@
|
|
21
|
+
- uses: actions/checkout@v4
|
|
19
22
|
|
|
20
23
|
- name: Get tag version
|
|
21
24
|
id: tag_version
|
|
@@ -32,16 +35,7 @@ jobs:
|
|
|
32
35
|
- name: Ensure tag matches package.json
|
|
33
36
|
run: |
|
|
34
37
|
if [ "${{ steps.tag_version.outputs.TAG_VERSION }}" != "${{ steps.package_version.outputs.PACKAGE_VERSION }}" ]; then
|
|
35
|
-
echo "Tag
|
|
38
|
+
echo "Tag ${{ steps.tag_version.outputs.TAG_VERSION }} does not match package.json ${{ steps.package_version.outputs.PACKAGE_VERSION }}."
|
|
36
39
|
exit 1
|
|
37
40
|
fi
|
|
38
|
-
|
|
39
|
-
- uses: actions/setup-node@v3
|
|
40
|
-
with:
|
|
41
|
-
node-version: 18
|
|
42
|
-
registry-url: https://registry.npmjs.org/
|
|
43
|
-
scope: '@kasufinance'
|
|
44
|
-
|
|
45
|
-
- run: npm install && npm run build-tc && npm run build && npm run rollup-build && npm publish
|
|
46
|
-
env:
|
|
47
|
-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
|
41
|
+
echo "Tag ${{ steps.tag_version.outputs.TAG_VERSION }} matches package.json. Run 'npm publish' locally to release."
|
package/.gitleaksignore
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Baseline: historical findings triaged 2026-08-11 (real ones rotated, rest false positives).
|
|
2
|
+
# New findings will still fail CI. Format: commit:file:rule:line
|
|
3
|
+
0a13e5c82c4b0dea51a1bca2bcffd4dbe7d9e9c8:src/config/sdk/mainnet.config.ts:generic-api-key:9
|
|
4
|
+
0a13e5c82c4b0dea51a1bca2bcffd4dbe7d9e9c8:src/config/sdk/testnet.config.ts:generic-api-key:9
|
|
5
|
+
1a0e64886602fdbb0789b72e3be80460dfb2a9bc:src/tests/sample.test.ts:generic-api-key:18
|
|
6
|
+
41992e186efdd602e49a07a9cfaa17a046194afd:src/tests/sample.test.ts:generic-api-key:20
|
|
7
|
+
61345a2c016dd28bd3fe647b01ae92321f4e6797:src/config/sdk/mainnet.config.ts:generic-api-key:9
|
|
8
|
+
61345a2c016dd28bd3fe647b01ae92321f4e6797:src/config/sdk/testnet.config.ts:generic-api-key:9
|
|
9
|
+
678e94f28e9894246569775e06b7bfc145c90db9:src/config/sdk/mainnet.config.ts:generic-api-key:9
|
|
10
|
+
678e94f28e9894246569775e06b7bfc145c90db9:src/config/sdk/testnet.config.ts:generic-api-key:9
|
|
11
|
+
76241c92f25050ca6b73e77ce0514abc8c5038d8:src/config/sdk/mainnet.config.ts:generic-api-key:9
|
|
12
|
+
76241c92f25050ca6b73e77ce0514abc8c5038d8:src/config/sdk/testnet.config.ts:generic-api-key:9
|
|
13
|
+
aa4522559522cf1f207b834fbd0318ef96f1f635:src/app/api/kyc-challenge/route.ts:generic-api-key:5
|
|
14
|
+
c65a422c4f96ba302c047fe1a4e3d6d74dcc2744:src/facade/chain-configs.ts:generic-api-key:18
|
|
15
|
+
cee7050d62ae95f1b6d88592de8eaff576719d28:src/tests/sample.test.ts:generic-api-key:18
|
|
16
|
+
f085d18b3b818f5853a934aee12ce1611afc738e:src/config/sdk/mainnet.config.ts:generic-api-key:9
|
|
17
|
+
f085d18b3b818f5853a934aee12ce1611afc738e:src/config/sdk/testnet.config.ts:generic-api-key:9
|
|
18
|
+
f92e12c74df7990a519eec7c4940a655cbaa3160:src/actions/getTokenPrice.ts:generic-api-key:52
|
|
19
|
+
fc75e2491f414032d69a352f7a0e1fcd3f515f99:.env.local:generic-api-key:2
|
package/package.json
CHANGED
|
@@ -352,6 +352,7 @@ export class DataService {
|
|
|
352
352
|
|
|
353
353
|
return {
|
|
354
354
|
id: tranche.id,
|
|
355
|
+
balance: tranche.balance,
|
|
355
356
|
apy: baseApy.toString(),
|
|
356
357
|
minApy: minApy.toString(),
|
|
357
358
|
maxApy: maxApy.toString(),
|
|
@@ -445,6 +446,7 @@ export class DataService {
|
|
|
445
446
|
lendingPoolDirectus?.poolName ??
|
|
446
447
|
lendingPoolSubgraph.name,
|
|
447
448
|
subheading: lendingPoolDirectus?.subheading,
|
|
449
|
+
operatingSince: lendingPoolDirectus?.operatingSince,
|
|
448
450
|
totalValueLocked: {
|
|
449
451
|
total: (
|
|
450
452
|
parseFloat(lendingPoolSubgraph.balance) +
|
|
@@ -6,6 +6,11 @@ import {
|
|
|
6
6
|
export interface PoolOverview {
|
|
7
7
|
poolName: string;
|
|
8
8
|
subheading?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Month/year the strategy began operating, editor-authored in Directus.
|
|
11
|
+
* Absent until the CMS column is populated.
|
|
12
|
+
*/
|
|
13
|
+
operatingSince?: string;
|
|
9
14
|
id: string;
|
|
10
15
|
enabled: boolean;
|
|
11
16
|
isOversubscribed: boolean;
|
|
@@ -87,6 +92,11 @@ export interface RiskPerformance {
|
|
|
87
92
|
|
|
88
93
|
export interface TrancheData {
|
|
89
94
|
id: string;
|
|
95
|
+
/**
|
|
96
|
+
* Current amount lent through this tranche, in the pool's stable-asset
|
|
97
|
+
* units, from the subgraph tranche entity.
|
|
98
|
+
*/
|
|
99
|
+
balance: string;
|
|
90
100
|
minApy: string;
|
|
91
101
|
maxApy: string;
|
|
92
102
|
apy: string;
|