@jup-ag/lend 0.0.52 → 0.0.53
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/api/index.d.mts +34 -0
- package/dist/api/index.d.ts +34 -0
- package/dist/api/index.mjs +39 -0
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/api/index.d.mts
CHANGED
|
@@ -81,12 +81,46 @@ type Vault = {
|
|
|
81
81
|
borrowable: string;
|
|
82
82
|
};
|
|
83
83
|
};
|
|
84
|
+
type InstructionsResult$1 = {
|
|
85
|
+
nftId: number;
|
|
86
|
+
instructions: Array<{
|
|
87
|
+
programId: string;
|
|
88
|
+
accounts: Array<{
|
|
89
|
+
pubkey: string;
|
|
90
|
+
isSigner: boolean;
|
|
91
|
+
isWritable: boolean;
|
|
92
|
+
}>;
|
|
93
|
+
data: string;
|
|
94
|
+
}>;
|
|
95
|
+
addressLookupTableAddresses: string[];
|
|
96
|
+
};
|
|
84
97
|
declare class BorrowClient {
|
|
85
98
|
private http;
|
|
86
99
|
constructor({ http }: {
|
|
87
100
|
http: HttpClient;
|
|
88
101
|
});
|
|
89
102
|
getVaults(): Promise<Vault[]>;
|
|
103
|
+
operate({ signer, colAmount, debtAmount, vaultId, positionId, positionOwner, }: {
|
|
104
|
+
colAmount: string;
|
|
105
|
+
debtAmount: string;
|
|
106
|
+
vaultId: number;
|
|
107
|
+
positionId: number;
|
|
108
|
+
positionOwner?: string;
|
|
109
|
+
signer: string;
|
|
110
|
+
amount: string;
|
|
111
|
+
}): Promise<{
|
|
112
|
+
nftId: number;
|
|
113
|
+
transaction: string;
|
|
114
|
+
}>;
|
|
115
|
+
operateInstructions({ signer, colAmount, debtAmount, vaultId, positionId, positionOwner, }: {
|
|
116
|
+
colAmount: string;
|
|
117
|
+
debtAmount: string;
|
|
118
|
+
vaultId: number;
|
|
119
|
+
positionId: number;
|
|
120
|
+
positionOwner?: string;
|
|
121
|
+
signer: string;
|
|
122
|
+
amount: string;
|
|
123
|
+
}): Promise<InstructionsResult$1>;
|
|
90
124
|
}
|
|
91
125
|
|
|
92
126
|
type LendingToken = {
|
package/dist/api/index.d.ts
CHANGED
|
@@ -81,12 +81,46 @@ type Vault = {
|
|
|
81
81
|
borrowable: string;
|
|
82
82
|
};
|
|
83
83
|
};
|
|
84
|
+
type InstructionsResult$1 = {
|
|
85
|
+
nftId: number;
|
|
86
|
+
instructions: Array<{
|
|
87
|
+
programId: string;
|
|
88
|
+
accounts: Array<{
|
|
89
|
+
pubkey: string;
|
|
90
|
+
isSigner: boolean;
|
|
91
|
+
isWritable: boolean;
|
|
92
|
+
}>;
|
|
93
|
+
data: string;
|
|
94
|
+
}>;
|
|
95
|
+
addressLookupTableAddresses: string[];
|
|
96
|
+
};
|
|
84
97
|
declare class BorrowClient {
|
|
85
98
|
private http;
|
|
86
99
|
constructor({ http }: {
|
|
87
100
|
http: HttpClient;
|
|
88
101
|
});
|
|
89
102
|
getVaults(): Promise<Vault[]>;
|
|
103
|
+
operate({ signer, colAmount, debtAmount, vaultId, positionId, positionOwner, }: {
|
|
104
|
+
colAmount: string;
|
|
105
|
+
debtAmount: string;
|
|
106
|
+
vaultId: number;
|
|
107
|
+
positionId: number;
|
|
108
|
+
positionOwner?: string;
|
|
109
|
+
signer: string;
|
|
110
|
+
amount: string;
|
|
111
|
+
}): Promise<{
|
|
112
|
+
nftId: number;
|
|
113
|
+
transaction: string;
|
|
114
|
+
}>;
|
|
115
|
+
operateInstructions({ signer, colAmount, debtAmount, vaultId, positionId, positionOwner, }: {
|
|
116
|
+
colAmount: string;
|
|
117
|
+
debtAmount: string;
|
|
118
|
+
vaultId: number;
|
|
119
|
+
positionId: number;
|
|
120
|
+
positionOwner?: string;
|
|
121
|
+
signer: string;
|
|
122
|
+
amount: string;
|
|
123
|
+
}): Promise<InstructionsResult$1>;
|
|
90
124
|
}
|
|
91
125
|
|
|
92
126
|
type LendingToken = {
|
package/dist/api/index.mjs
CHANGED
|
@@ -9,6 +9,45 @@ class BorrowClient {
|
|
|
9
9
|
const { data } = await this.http.get("/v1/borrow/vaults");
|
|
10
10
|
return data;
|
|
11
11
|
}
|
|
12
|
+
async operate({
|
|
13
|
+
signer,
|
|
14
|
+
colAmount,
|
|
15
|
+
debtAmount,
|
|
16
|
+
vaultId,
|
|
17
|
+
positionId,
|
|
18
|
+
positionOwner
|
|
19
|
+
}) {
|
|
20
|
+
const { data } = await this.http.post("/v1/borrow/operate", {
|
|
21
|
+
signer,
|
|
22
|
+
colAmount,
|
|
23
|
+
debtAmount,
|
|
24
|
+
vaultId,
|
|
25
|
+
positionId,
|
|
26
|
+
positionOwner
|
|
27
|
+
});
|
|
28
|
+
return data;
|
|
29
|
+
}
|
|
30
|
+
async operateInstructions({
|
|
31
|
+
signer,
|
|
32
|
+
colAmount,
|
|
33
|
+
debtAmount,
|
|
34
|
+
vaultId,
|
|
35
|
+
positionId,
|
|
36
|
+
positionOwner
|
|
37
|
+
}) {
|
|
38
|
+
const { data } = await this.http.post(
|
|
39
|
+
"/v1/borrow/operate-instructions",
|
|
40
|
+
{
|
|
41
|
+
signer,
|
|
42
|
+
colAmount,
|
|
43
|
+
debtAmount,
|
|
44
|
+
vaultId,
|
|
45
|
+
positionId,
|
|
46
|
+
positionOwner
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
return data;
|
|
50
|
+
}
|
|
12
51
|
}
|
|
13
52
|
|
|
14
53
|
class EarnClient {
|
package/dist/index.mjs
CHANGED