@kamino-finance/klend-sdk 5.13.21-beta.0 → 5.13.21
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/dist/classes/farm_utils.d.ts.map +1 -1
- package/dist/classes/farm_utils.js +10 -3
- package/dist/classes/farm_utils.js.map +1 -1
- package/dist/classes/manager.d.ts +12 -5
- package/dist/classes/manager.d.ts.map +1 -1
- package/dist/classes/manager.js +300 -39
- package/dist/classes/manager.js.map +1 -1
- package/dist/classes/obligation.d.ts.map +1 -1
- package/dist/classes/obligation.js +0 -14
- package/dist/classes/obligation.js.map +1 -1
- package/dist/classes/reserve.d.ts +14 -5
- package/dist/classes/reserve.d.ts.map +1 -1
- package/dist/classes/reserve.js +463 -91
- package/dist/classes/reserve.js.map +1 -1
- package/dist/classes/utils.d.ts +0 -1
- package/dist/classes/utils.d.ts.map +1 -1
- package/dist/classes/utils.js +0 -12
- package/dist/classes/utils.js.map +1 -1
- package/dist/classes/vault.d.ts +2 -1
- package/dist/classes/vault.d.ts.map +1 -1
- package/dist/classes/vault.js +9 -5
- package/dist/classes/vault.js.map +1 -1
- package/dist/client_kamino_manager.d.ts.map +1 -1
- package/dist/client_kamino_manager.js +26 -27
- package/dist/client_kamino_manager.js.map +1 -1
- package/dist/idl.json +9 -186
- package/dist/idl_codegen/accounts/LendingMarket.d.ts +3 -24
- package/dist/idl_codegen/accounts/LendingMarket.d.ts.map +1 -1
- package/dist/idl_codegen/accounts/LendingMarket.js +7 -25
- package/dist/idl_codegen/accounts/LendingMarket.js.map +1 -1
- package/dist/idl_codegen/accounts/index.d.ts +0 -2
- package/dist/idl_codegen/accounts/index.d.ts.map +1 -1
- package/dist/idl_codegen/accounts/index.js +1 -3
- package/dist/idl_codegen/accounts/index.js.map +1 -1
- package/dist/idl_codegen/errors/custom.d.ts +1 -25
- package/dist/idl_codegen/errors/custom.d.ts.map +1 -1
- package/dist/idl_codegen/errors/custom.js +1 -43
- package/dist/idl_codegen/errors/custom.js.map +1 -1
- package/dist/idl_codegen/instructions/idlMissingTypes.d.ts +1 -2
- package/dist/idl_codegen/instructions/idlMissingTypes.d.ts.map +1 -1
- package/dist/idl_codegen/instructions/idlMissingTypes.js +1 -2
- package/dist/idl_codegen/instructions/idlMissingTypes.js.map +1 -1
- package/dist/idl_codegen/instructions/index.d.ts +0 -6
- package/dist/idl_codegen/instructions/index.d.ts.map +1 -1
- package/dist/idl_codegen/instructions/index.js +1 -7
- package/dist/idl_codegen/instructions/index.js.map +1 -1
- package/dist/idl_codegen/instructions/updateReserveConfig.d.ts +3 -4
- package/dist/idl_codegen/instructions/updateReserveConfig.d.ts.map +1 -1
- package/dist/idl_codegen/instructions/updateReserveConfig.js +3 -5
- package/dist/idl_codegen/instructions/updateReserveConfig.js.map +1 -1
- package/dist/idl_codegen/instructions/withdrawProtocolFee.d.ts +2 -2
- package/dist/idl_codegen/instructions/withdrawProtocolFee.d.ts.map +1 -1
- package/dist/idl_codegen/instructions/withdrawProtocolFee.js +6 -2
- package/dist/idl_codegen/instructions/withdrawProtocolFee.js.map +1 -1
- package/dist/idl_codegen/types/UpdateLendingMarketMode.d.ts +7 -33
- package/dist/idl_codegen/types/UpdateLendingMarketMode.d.ts.map +1 -1
- package/dist/idl_codegen/types/UpdateLendingMarketMode.js +12 -60
- package/dist/idl_codegen/types/UpdateLendingMarketMode.js.map +1 -1
- package/dist/idl_codegen/types/index.d.ts +2 -6
- package/dist/idl_codegen/types/index.d.ts.map +1 -1
- package/dist/idl_codegen/types/index.js +1 -3
- package/dist/idl_codegen/types/index.js.map +1 -1
- package/dist/utils/accountListing.d.ts +1 -1
- package/dist/utils/accountListing.d.ts.map +1 -1
- package/dist/utils/accountListing.js +2 -2
- package/dist/utils/accountListing.js.map +1 -1
- package/dist/utils/lookupTable.d.ts.map +1 -1
- package/dist/utils/lookupTable.js +6 -1
- package/dist/utils/lookupTable.js.map +1 -1
- package/dist/utils/managerTypes.d.ts.map +1 -1
- package/dist/utils/managerTypes.js +4 -10
- package/dist/utils/managerTypes.js.map +1 -1
- package/dist/utils/seeds.d.ts +0 -16
- package/dist/utils/seeds.d.ts.map +1 -1
- package/dist/utils/seeds.js +1 -23
- package/dist/utils/seeds.js.map +1 -1
- package/package.json +1 -1
- package/src/classes/farm_utils.ts +11 -3
- package/src/classes/manager.ts +401 -51
- package/src/classes/obligation.ts +0 -16
- package/src/classes/reserve.ts +783 -119
- package/src/classes/utils.ts +0 -12
- package/src/classes/vault.ts +18 -7
- package/src/client_kamino_manager.ts +34 -42
- package/src/idl.json +9 -186
- package/src/idl_codegen/accounts/LendingMarket.ts +9 -41
- package/src/idl_codegen/accounts/index.ts +0 -2
- package/src/idl_codegen/errors/custom.ts +0 -45
- package/src/idl_codegen/instructions/idlMissingTypes.ts +2 -4
- package/src/idl_codegen/instructions/index.ts +0 -9
- package/src/idl_codegen/instructions/updateReserveConfig.ts +5 -7
- package/src/idl_codegen/instructions/withdrawProtocolFee.ts +8 -4
- package/src/idl_codegen/types/UpdateLendingMarketMode.ts +13 -73
- package/src/idl_codegen/types/index.ts +2 -16
- package/src/utils/accountListing.ts +3 -2
- package/src/utils/lookupTable.ts +7 -1
- package/src/utils/managerTypes.ts +4 -10
- package/src/utils/seeds.ts +0 -25
- package/dist/classes/configItems.d.ts +0 -166
- package/dist/classes/configItems.d.ts.map +0 -1
- package/dist/classes/configItems.js +0 -202
- package/dist/classes/configItems.js.map +0 -1
- package/dist/idl_codegen/accounts/GlobalConfig.d.ts +0 -40
- package/dist/idl_codegen/accounts/GlobalConfig.d.ts.map +0 -1
- package/dist/idl_codegen/accounts/GlobalConfig.js +0 -116
- package/dist/idl_codegen/accounts/GlobalConfig.js.map +0 -1
- package/dist/idl_codegen/instructions/initGlobalConfig.d.ts +0 -10
- package/dist/idl_codegen/instructions/initGlobalConfig.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/initGlobalConfig.js +0 -19
- package/dist/idl_codegen/instructions/initGlobalConfig.js.map +0 -1
- package/dist/idl_codegen/instructions/updateGlobalConfig.d.ts +0 -13
- package/dist/idl_codegen/instructions/updateGlobalConfig.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/updateGlobalConfig.js +0 -61
- package/dist/idl_codegen/instructions/updateGlobalConfig.js.map +0 -1
- package/dist/idl_codegen/instructions/updateGlobalConfigAdmin.d.ts +0 -7
- package/dist/idl_codegen/instructions/updateGlobalConfigAdmin.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/updateGlobalConfigAdmin.js +0 -16
- package/dist/idl_codegen/instructions/updateGlobalConfigAdmin.js.map +0 -1
- package/dist/idl_codegen/types/UpdateGlobalConfigMode.d.ts +0 -32
- package/dist/idl_codegen/types/UpdateGlobalConfigMode.d.ts.map +0 -1
- package/dist/idl_codegen/types/UpdateGlobalConfigMode.js +0 -108
- package/dist/idl_codegen/types/UpdateGlobalConfigMode.js.map +0 -1
- package/src/classes/configItems.ts +0 -295
- package/src/idl_codegen/accounts/GlobalConfig.ts +0 -125
- package/src/idl_codegen/instructions/initGlobalConfig.ts +0 -30
- package/src/idl_codegen/instructions/updateGlobalConfig.ts +0 -47
- package/src/idl_codegen/instructions/updateGlobalConfigAdmin.ts +0 -24
- package/src/idl_codegen/types/UpdateGlobalConfigMode.ts +0 -90
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { PublicKey } from "@solana/web3.js" // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
2
|
-
import BN from "bn.js" // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
3
|
-
import * as types from "../types" // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
4
|
-
import * as borsh from "@coral-xyz/borsh"
|
|
5
|
-
|
|
6
|
-
export interface PendingAdminJSON {
|
|
7
|
-
kind: "PendingAdmin"
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export class PendingAdmin {
|
|
11
|
-
static readonly discriminator = 0
|
|
12
|
-
static readonly kind = "PendingAdmin"
|
|
13
|
-
readonly discriminator = 0
|
|
14
|
-
readonly kind = "PendingAdmin"
|
|
15
|
-
|
|
16
|
-
toJSON(): PendingAdminJSON {
|
|
17
|
-
return {
|
|
18
|
-
kind: "PendingAdmin",
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
toEncodable() {
|
|
23
|
-
return {
|
|
24
|
-
PendingAdmin: {},
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export interface FeeCollectorJSON {
|
|
30
|
-
kind: "FeeCollector"
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export class FeeCollector {
|
|
34
|
-
static readonly discriminator = 1
|
|
35
|
-
static readonly kind = "FeeCollector"
|
|
36
|
-
readonly discriminator = 1
|
|
37
|
-
readonly kind = "FeeCollector"
|
|
38
|
-
|
|
39
|
-
toJSON(): FeeCollectorJSON {
|
|
40
|
-
return {
|
|
41
|
-
kind: "FeeCollector",
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
toEncodable() {
|
|
46
|
-
return {
|
|
47
|
-
FeeCollector: {},
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
53
|
-
export function fromDecoded(obj: any): types.UpdateGlobalConfigModeKind {
|
|
54
|
-
if (typeof obj !== "object") {
|
|
55
|
-
throw new Error("Invalid enum object")
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
if ("PendingAdmin" in obj) {
|
|
59
|
-
return new PendingAdmin()
|
|
60
|
-
}
|
|
61
|
-
if ("FeeCollector" in obj) {
|
|
62
|
-
return new FeeCollector()
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
throw new Error("Invalid enum object")
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export function fromJSON(
|
|
69
|
-
obj: types.UpdateGlobalConfigModeJSON
|
|
70
|
-
): types.UpdateGlobalConfigModeKind {
|
|
71
|
-
switch (obj.kind) {
|
|
72
|
-
case "PendingAdmin": {
|
|
73
|
-
return new PendingAdmin()
|
|
74
|
-
}
|
|
75
|
-
case "FeeCollector": {
|
|
76
|
-
return new FeeCollector()
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
export function layout(property?: string) {
|
|
82
|
-
const ret = borsh.rustEnum([
|
|
83
|
-
borsh.struct([], "PendingAdmin"),
|
|
84
|
-
borsh.struct([], "FeeCollector"),
|
|
85
|
-
])
|
|
86
|
-
if (property !== undefined) {
|
|
87
|
-
return ret.replicate(property)
|
|
88
|
-
}
|
|
89
|
-
return ret
|
|
90
|
-
}
|