@kasufinance/kasu-sdk 1.0.1 → 1.0.2

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 (45) hide show
  1. package/.github/workflows/ci.yml +39 -0
  2. package/.github/workflows/main.yml +17 -13
  3. package/README.md +146 -0
  4. package/package.json +1 -1
  5. package/src/contracts/IClearingCoordinatorAbi.ts +0 -406
  6. package/src/contracts/IERC20MetadataAbi.ts +0 -364
  7. package/src/contracts/IFeeManagerAbi.ts +0 -182
  8. package/src/contracts/IKSULockingAbi.ts +0 -965
  9. package/src/contracts/IKasuAllowListAbi.ts +0 -605
  10. package/src/contracts/IKasuControllerAbi.ts +0 -703
  11. package/src/contracts/IKasuNFTsAbi.ts +0 -2744
  12. package/src/contracts/IKsuPriceAbi.ts +0 -87
  13. package/src/contracts/ILendingPoolAbi.ts +0 -2081
  14. package/src/contracts/ILendingPoolFactoryAbi.ts +0 -161
  15. package/src/contracts/ILendingPoolManagerAbi.ts +0 -1917
  16. package/src/contracts/ILendingPoolTrancheAbi.ts +0 -1911
  17. package/src/contracts/ISystemVariablesAbi.ts +0 -908
  18. package/src/contracts/IUserLoyaltyRewardsAbi.ts +0 -544
  19. package/src/contracts/IUserManagerAbi.ts +0 -612
  20. package/src/contracts/KSULockBonusAbi.ts +0 -124
  21. package/src/contracts/KasuPoolExternalTVLAbi.ts +0 -1071
  22. package/src/contracts/SwapperAbi.ts +0 -266
  23. package/src/contracts/common.ts +0 -44
  24. package/src/contracts/factories/IClearingCoordinatorAbi__factory.ts +0 -438
  25. package/src/contracts/factories/IERC20MetadataAbi__factory.ts +0 -248
  26. package/src/contracts/factories/IFeeManagerAbi__factory.ts +0 -90
  27. package/src/contracts/factories/IKSULockingAbi__factory.ts +0 -778
  28. package/src/contracts/factories/IKasuAllowListAbi__factory.ts +0 -479
  29. package/src/contracts/factories/IKasuControllerAbi__factory.ts +0 -447
  30. package/src/contracts/factories/IKasuNFTsAbi__factory.ts +0 -2116
  31. package/src/contracts/factories/IKsuPriceAbi__factory.ts +0 -36
  32. package/src/contracts/factories/ILendingPoolAbi__factory.ts +0 -1455
  33. package/src/contracts/factories/ILendingPoolFactoryAbi__factory.ts +0 -125
  34. package/src/contracts/factories/ILendingPoolManagerAbi__factory.ts +0 -1375
  35. package/src/contracts/factories/ILendingPoolTrancheAbi__factory.ts +0 -1345
  36. package/src/contracts/factories/ISystemVariablesAbi__factory.ts +0 -455
  37. package/src/contracts/factories/IUserLoyaltyRewardsAbi__factory.ts +0 -316
  38. package/src/contracts/factories/IUserManagerAbi__factory.ts +0 -345
  39. package/src/contracts/factories/KSULockBonusAbi__factory.ts +0 -115
  40. package/src/contracts/factories/KasuPoolExternalTVLAbi__factory.ts +0 -840
  41. package/src/contracts/factories/SwapperAbi__factory.ts +0 -167
  42. package/src/contracts/factories/index.ts +0 -21
  43. package/src/contracts/index.ts +0 -40
  44. package/tsconfig.tsbuildinfo +0 -1
  45. package/versioner.sh +0 -6
@@ -1,167 +0,0 @@
1
- /* Autogenerated file. Do not edit manually. */
2
- /* tslint:disable */
3
- /* eslint-disable */
4
-
5
- import { Contract, Signer, utils } from "ethers";
6
- import type { Provider } from "@ethersproject/providers";
7
- import type { SwapperAbi, SwapperAbiInterface } from "../SwapperAbi";
8
-
9
- const _abi = [
10
- {
11
- anonymous: false,
12
- inputs: [
13
- {
14
- indexed: true,
15
- internalType: "address",
16
- name: "exchange",
17
- type: "address",
18
- },
19
- {
20
- indexed: false,
21
- internalType: "bool",
22
- name: "isAllowed",
23
- type: "bool",
24
- },
25
- ],
26
- name: "ExchangeAllowlistUpdated",
27
- type: "event",
28
- },
29
- {
30
- anonymous: false,
31
- inputs: [
32
- {
33
- indexed: true,
34
- internalType: "address",
35
- name: "receiver",
36
- type: "address",
37
- },
38
- {
39
- indexed: false,
40
- internalType: "address[]",
41
- name: "tokensIn",
42
- type: "address[]",
43
- },
44
- {
45
- indexed: false,
46
- internalType: "address",
47
- name: "tokenOut",
48
- type: "address",
49
- },
50
- {
51
- indexed: false,
52
- internalType: "uint256[]",
53
- name: "amountsIn",
54
- type: "uint256[]",
55
- },
56
- {
57
- indexed: false,
58
- internalType: "uint256",
59
- name: "amountOut",
60
- type: "uint256",
61
- },
62
- ],
63
- name: "Swapped",
64
- type: "event",
65
- },
66
- {
67
- inputs: [
68
- {
69
- internalType: "address",
70
- name: "exchange",
71
- type: "address",
72
- },
73
- ],
74
- name: "isExchangeAllowed",
75
- outputs: [
76
- {
77
- internalType: "bool",
78
- name: "isAllowed",
79
- type: "bool",
80
- },
81
- ],
82
- stateMutability: "view",
83
- type: "function",
84
- },
85
- {
86
- inputs: [
87
- {
88
- internalType: "address[]",
89
- name: "tokensIn",
90
- type: "address[]",
91
- },
92
- {
93
- components: [
94
- {
95
- internalType: "address",
96
- name: "swapTarget",
97
- type: "address",
98
- },
99
- {
100
- internalType: "address",
101
- name: "token",
102
- type: "address",
103
- },
104
- {
105
- internalType: "bytes",
106
- name: "swapCallData",
107
- type: "bytes",
108
- },
109
- ],
110
- internalType: "struct SwapInfo[]",
111
- name: "swapInfo",
112
- type: "tuple[]",
113
- },
114
- {
115
- internalType: "address",
116
- name: "tokenOut",
117
- type: "address",
118
- },
119
- {
120
- internalType: "address",
121
- name: "receiver",
122
- type: "address",
123
- },
124
- ],
125
- name: "swap",
126
- outputs: [
127
- {
128
- internalType: "uint256",
129
- name: "amountOut",
130
- type: "uint256",
131
- },
132
- ],
133
- stateMutability: "nonpayable",
134
- type: "function",
135
- },
136
- {
137
- inputs: [
138
- {
139
- internalType: "address[]",
140
- name: "exchanges",
141
- type: "address[]",
142
- },
143
- {
144
- internalType: "bool[]",
145
- name: "allowed",
146
- type: "bool[]",
147
- },
148
- ],
149
- name: "updateExchangeAllowlist",
150
- outputs: [],
151
- stateMutability: "nonpayable",
152
- type: "function",
153
- },
154
- ] as const;
155
-
156
- export class SwapperAbi__factory {
157
- static readonly abi = _abi;
158
- static createInterface(): SwapperAbiInterface {
159
- return new utils.Interface(_abi) as SwapperAbiInterface;
160
- }
161
- static connect(
162
- address: string,
163
- signerOrProvider: Signer | Provider
164
- ): SwapperAbi {
165
- return new Contract(address, _abi, signerOrProvider) as SwapperAbi;
166
- }
167
- }
@@ -1,21 +0,0 @@
1
- /* Autogenerated file. Do not edit manually. */
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- export { IClearingCoordinatorAbi__factory } from "./IClearingCoordinatorAbi__factory";
5
- export { IERC20MetadataAbi__factory } from "./IERC20MetadataAbi__factory";
6
- export { IFeeManagerAbi__factory } from "./IFeeManagerAbi__factory";
7
- export { IKSULockingAbi__factory } from "./IKSULockingAbi__factory";
8
- export { IKasuAllowListAbi__factory } from "./IKasuAllowListAbi__factory";
9
- export { IKasuControllerAbi__factory } from "./IKasuControllerAbi__factory";
10
- export { IKasuNFTsAbi__factory } from "./IKasuNFTsAbi__factory";
11
- export { IKsuPriceAbi__factory } from "./IKsuPriceAbi__factory";
12
- export { ILendingPoolAbi__factory } from "./ILendingPoolAbi__factory";
13
- export { ILendingPoolFactoryAbi__factory } from "./ILendingPoolFactoryAbi__factory";
14
- export { ILendingPoolManagerAbi__factory } from "./ILendingPoolManagerAbi__factory";
15
- export { ILendingPoolTrancheAbi__factory } from "./ILendingPoolTrancheAbi__factory";
16
- export { ISystemVariablesAbi__factory } from "./ISystemVariablesAbi__factory";
17
- export { IUserLoyaltyRewardsAbi__factory } from "./IUserLoyaltyRewardsAbi__factory";
18
- export { IUserManagerAbi__factory } from "./IUserManagerAbi__factory";
19
- export { KSULockBonusAbi__factory } from "./KSULockBonusAbi__factory";
20
- export { KasuPoolExternalTVLAbi__factory } from "./KasuPoolExternalTVLAbi__factory";
21
- export { SwapperAbi__factory } from "./SwapperAbi__factory";
@@ -1,40 +0,0 @@
1
- /* Autogenerated file. Do not edit manually. */
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- export type { IClearingCoordinatorAbi } from "./IClearingCoordinatorAbi";
5
- export type { IERC20MetadataAbi } from "./IERC20MetadataAbi";
6
- export type { IFeeManagerAbi } from "./IFeeManagerAbi";
7
- export type { IKSULockingAbi } from "./IKSULockingAbi";
8
- export type { IKasuAllowListAbi } from "./IKasuAllowListAbi";
9
- export type { IKasuControllerAbi } from "./IKasuControllerAbi";
10
- export type { IKasuNFTsAbi } from "./IKasuNFTsAbi";
11
- export type { IKsuPriceAbi } from "./IKsuPriceAbi";
12
- export type { ILendingPoolAbi } from "./ILendingPoolAbi";
13
- export type { ILendingPoolFactoryAbi } from "./ILendingPoolFactoryAbi";
14
- export type { ILendingPoolManagerAbi } from "./ILendingPoolManagerAbi";
15
- export type { ILendingPoolTrancheAbi } from "./ILendingPoolTrancheAbi";
16
- export type { ISystemVariablesAbi } from "./ISystemVariablesAbi";
17
- export type { IUserLoyaltyRewardsAbi } from "./IUserLoyaltyRewardsAbi";
18
- export type { IUserManagerAbi } from "./IUserManagerAbi";
19
- export type { KSULockBonusAbi } from "./KSULockBonusAbi";
20
- export type { KasuPoolExternalTVLAbi } from "./KasuPoolExternalTVLAbi";
21
- export type { SwapperAbi } from "./SwapperAbi";
22
- export * as factories from "./factories";
23
- export { IClearingCoordinatorAbi__factory } from "./factories/IClearingCoordinatorAbi__factory";
24
- export { IERC20MetadataAbi__factory } from "./factories/IERC20MetadataAbi__factory";
25
- export { IFeeManagerAbi__factory } from "./factories/IFeeManagerAbi__factory";
26
- export { IKasuAllowListAbi__factory } from "./factories/IKasuAllowListAbi__factory";
27
- export { IKasuControllerAbi__factory } from "./factories/IKasuControllerAbi__factory";
28
- export { IKasuNFTsAbi__factory } from "./factories/IKasuNFTsAbi__factory";
29
- export { IKSULockingAbi__factory } from "./factories/IKSULockingAbi__factory";
30
- export { IKsuPriceAbi__factory } from "./factories/IKsuPriceAbi__factory";
31
- export { ILendingPoolAbi__factory } from "./factories/ILendingPoolAbi__factory";
32
- export { ILendingPoolFactoryAbi__factory } from "./factories/ILendingPoolFactoryAbi__factory";
33
- export { ILendingPoolManagerAbi__factory } from "./factories/ILendingPoolManagerAbi__factory";
34
- export { ILendingPoolTrancheAbi__factory } from "./factories/ILendingPoolTrancheAbi__factory";
35
- export { ISystemVariablesAbi__factory } from "./factories/ISystemVariablesAbi__factory";
36
- export { IUserLoyaltyRewardsAbi__factory } from "./factories/IUserLoyaltyRewardsAbi__factory";
37
- export { IUserManagerAbi__factory } from "./factories/IUserManagerAbi__factory";
38
- export { KasuPoolExternalTVLAbi__factory } from "./factories/KasuPoolExternalTVLAbi__factory";
39
- export { KSULockBonusAbi__factory } from "./factories/KSULockBonusAbi__factory";
40
- export { SwapperAbi__factory } from "./factories/SwapperAbi__factory";
@@ -1 +0,0 @@
1
- {"root":["./src/index.ts","./src/sdk-config.ts","./src/contracts/IClearingCoordinatorAbi.ts","./src/contracts/IERC20MetadataAbi.ts","./src/contracts/IFeeManagerAbi.ts","./src/contracts/IKSULockingAbi.ts","./src/contracts/IKasuAllowListAbi.ts","./src/contracts/IKasuControllerAbi.ts","./src/contracts/IKasuNFTsAbi.ts","./src/contracts/IKsuPriceAbi.ts","./src/contracts/ILendingPoolAbi.ts","./src/contracts/ILendingPoolFactoryAbi.ts","./src/contracts/ILendingPoolManagerAbi.ts","./src/contracts/ILendingPoolTrancheAbi.ts","./src/contracts/ISystemVariablesAbi.ts","./src/contracts/IUserLoyaltyRewardsAbi.ts","./src/contracts/IUserManagerAbi.ts","./src/contracts/KSULockBonusAbi.ts","./src/contracts/KasuPoolExternalTVLAbi.ts","./src/contracts/SwapperAbi.ts","./src/contracts/common.ts","./src/contracts/index.ts","./src/contracts/factories/IClearingCoordinatorAbi__factory.ts","./src/contracts/factories/IERC20MetadataAbi__factory.ts","./src/contracts/factories/IFeeManagerAbi__factory.ts","./src/contracts/factories/IKSULockingAbi__factory.ts","./src/contracts/factories/IKasuAllowListAbi__factory.ts","./src/contracts/factories/IKasuControllerAbi__factory.ts","./src/contracts/factories/IKasuNFTsAbi__factory.ts","./src/contracts/factories/IKsuPriceAbi__factory.ts","./src/contracts/factories/ILendingPoolAbi__factory.ts","./src/contracts/factories/ILendingPoolFactoryAbi__factory.ts","./src/contracts/factories/ILendingPoolManagerAbi__factory.ts","./src/contracts/factories/ILendingPoolTrancheAbi__factory.ts","./src/contracts/factories/ISystemVariablesAbi__factory.ts","./src/contracts/factories/IUserLoyaltyRewardsAbi__factory.ts","./src/contracts/factories/IUserManagerAbi__factory.ts","./src/contracts/factories/KSULockBonusAbi__factory.ts","./src/contracts/factories/KasuPoolExternalTVLAbi__factory.ts","./src/contracts/factories/SwapperAbi__factory.ts","./src/contracts/factories/index.ts","./src/services/shared.ts","./src/services/DataService/data-service.ts","./src/services/DataService/directus-types.ts","./src/services/DataService/queries.ts","./src/services/DataService/subgraph-types.ts","./src/services/DataService/types.ts","./src/services/Locking/locking.ts","./src/services/Locking/queries.ts","./src/services/Locking/types.ts","./src/services/Portfolio/portfolio.ts","./src/services/Portfolio/queries.ts","./src/services/Portfolio/types.ts","./src/services/Swapper/swapper.ts","./src/services/Swapper/types.ts","./src/services/UserLending/helper.ts","./src/services/UserLending/queries.ts","./src/services/UserLending/subgraph-types.ts","./src/services/UserLending/types.ts","./src/services/UserLending/user-lending.ts","./src/tests/sample.test.ts"],"version":"5.8.3"}
package/versioner.sh DELETED
@@ -1,6 +0,0 @@
1
- #!/bin/bash
2
-
3
- # This script replaces the version inside package.json
4
- version=$1
5
-
6
- sed -i "s/\"version\": \"[0-9]\+.[0-9]\+.[0-9]\+\"/\"version\": \"$version\"/" package.json