@jup-ag/lend 0.2.0-beta.1 → 0.2.0-beta.3

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.
@@ -35,7 +35,6 @@ declare function getFlashloanContext({ signer, asset, connection, market, }: Fla
35
35
  liquidity: PublicKey;
36
36
  liquidityProgram: PublicKey;
37
37
  tokenProgram: PublicKey;
38
- associatedTokenProgram: PublicKey;
39
38
  systemProgram: PublicKey;
40
39
  instructionSysvar: PublicKey;
41
40
  }>;
@@ -35,7 +35,6 @@ declare function getFlashloanContext({ signer, asset, connection, market, }: Fla
35
35
  liquidity: PublicKey;
36
36
  liquidityProgram: PublicKey;
37
37
  tokenProgram: PublicKey;
38
- associatedTokenProgram: PublicKey;
39
38
  systemProgram: PublicKey;
40
39
  instructionSysvar: PublicKey;
41
40
  }>;
@@ -1,13 +1,13 @@
1
1
  import { SYSVAR_INSTRUCTIONS_PUBKEY, SystemProgram, PublicKey } from '@solana/web3.js';
2
2
  import BN from 'bn.js';
3
- import { ASSOCIATED_TOKEN_PROGRAM_ID, getAssociatedTokenAddressSync } from '@solana/spl-token';
3
+ import { getAssociatedTokenAddressSync } from '@solana/spl-token';
4
4
  import { Program } from '@coral-xyz/anchor';
5
5
  import { g as getLiquidity, a as getRateModel, b as getFlashloanBorrowPosition, c as getLiquidityReserve, d as getFlashloanAdmin } from '../shared/lend.BXNM1zms.mjs';
6
6
 
7
7
  const address = "jupgfSgfuAXv4B6R2Uxu85Z1qdzgju79s6MfZekN6XS";
8
8
  const metadata = {
9
9
  name: "flashloan",
10
- version: "0.1.0",
10
+ version: "0.1.2",
11
11
  spec: "0.1.0",
12
12
  description: "Created with Anchor"
13
13
  };
@@ -61,60 +61,7 @@ const instructions = [
61
61
  },
62
62
  {
63
63
  name: "signer_borrow_token_account",
64
- writable: true,
65
- pda: {
66
- seeds: [
67
- {
68
- kind: "account",
69
- path: "signer"
70
- },
71
- {
72
- kind: "account",
73
- path: "token_program"
74
- },
75
- {
76
- kind: "account",
77
- path: "mint"
78
- }
79
- ],
80
- program: {
81
- kind: "const",
82
- value: [
83
- 140,
84
- 151,
85
- 37,
86
- 143,
87
- 78,
88
- 36,
89
- 137,
90
- 241,
91
- 187,
92
- 61,
93
- 16,
94
- 41,
95
- 20,
96
- 142,
97
- 13,
98
- 131,
99
- 11,
100
- 90,
101
- 19,
102
- 153,
103
- 218,
104
- 255,
105
- 16,
106
- 132,
107
- 4,
108
- 142,
109
- 123,
110
- 216,
111
- 219,
112
- 233,
113
- 248,
114
- 89
115
- ]
116
- }
117
- }
64
+ writable: true
118
65
  },
119
66
  {
120
67
  name: "mint"
@@ -148,6 +95,7 @@ const instructions = [
148
95
  },
149
96
  {
150
97
  name: "associated_token_program",
98
+ optional: true,
151
99
  address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
152
100
  },
153
101
  {
@@ -190,60 +138,7 @@ const instructions = [
190
138
  },
191
139
  {
192
140
  name: "signer_borrow_token_account",
193
- writable: true,
194
- pda: {
195
- seeds: [
196
- {
197
- kind: "account",
198
- path: "signer"
199
- },
200
- {
201
- kind: "account",
202
- path: "token_program"
203
- },
204
- {
205
- kind: "account",
206
- path: "mint"
207
- }
208
- ],
209
- program: {
210
- kind: "const",
211
- value: [
212
- 140,
213
- 151,
214
- 37,
215
- 143,
216
- 78,
217
- 36,
218
- 137,
219
- 241,
220
- 187,
221
- 61,
222
- 16,
223
- 41,
224
- 20,
225
- 142,
226
- 13,
227
- 131,
228
- 11,
229
- 90,
230
- 19,
231
- 153,
232
- 218,
233
- 255,
234
- 16,
235
- 132,
236
- 4,
237
- 142,
238
- 123,
239
- 216,
240
- 219,
241
- 233,
242
- 248,
243
- 89
244
- ]
245
- }
246
- }
141
+ writable: true
247
142
  },
248
143
  {
249
144
  name: "mint"
@@ -277,6 +172,7 @@ const instructions = [
277
172
  },
278
173
  {
279
174
  name: "associated_token_program",
175
+ optional: true,
280
176
  address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
281
177
  },
282
178
  {
@@ -736,7 +632,6 @@ async function getFlashloanContext({
736
632
  liquidity: getLiquidity(market),
737
633
  liquidityProgram: getLiquidityProgramId(market),
738
634
  tokenProgram,
739
- associatedTokenProgram: ASSOCIATED_TOKEN_PROGRAM_ID,
740
635
  systemProgram: SystemProgram.programId,
741
636
  instructionSysvar: SYSVAR_INSTRUCTIONS_PUBKEY
742
637
  };
package/dist/index.d.mts CHANGED
@@ -119,11 +119,14 @@ declare namespace borrow {
119
119
  }
120
120
 
121
121
  declare const getDex: (dexId: number) => PublicKey;
122
+ declare const getDexMetadata: (dexId: number) => PublicKey;
122
123
 
123
124
  declare const dex_getDex: typeof getDex;
125
+ declare const dex_getDexMetadata: typeof getDexMetadata;
124
126
  declare namespace dex {
125
127
  export {
126
128
  dex_getDex as getDex,
129
+ dex_getDexMetadata as getDexMetadata,
127
130
  };
128
131
  }
129
132
 
package/dist/index.d.ts CHANGED
@@ -119,11 +119,14 @@ declare namespace borrow {
119
119
  }
120
120
 
121
121
  declare const getDex: (dexId: number) => PublicKey;
122
+ declare const getDexMetadata: (dexId: number) => PublicKey;
122
123
 
123
124
  declare const dex_getDex: typeof getDex;
125
+ declare const dex_getDexMetadata: typeof getDexMetadata;
124
126
  declare namespace dex {
125
127
  export {
126
128
  dex_getDex as getDex,
129
+ dex_getDexMetadata as getDexMetadata,
127
130
  };
128
131
  }
129
132
 
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- export { b as borrowPda } from './shared/lend.ByiEG4eI.mjs';
2
- export { d as dexPda } from './shared/lend.BC5Y1398.mjs';
1
+ export { b as borrowPda } from './shared/lend.a53XYkl5.mjs';
2
+ export { d as dexPda } from './shared/lend.s0kjiHy3.mjs';
3
3
  export { f as flashloanPda } from './shared/lend.BXNM1zms.mjs';
4
4
  export { l as lendingPda, e as lendingRewardRateModelPda } from './shared/lend.BQkL9C4i.mjs';
5
5
  export { l as liquidityPda } from './shared/lend.C3XdrR6R.mjs';
@@ -8,6 +8,6 @@ import '@solana/web3.js';
8
8
  import '@solana/spl-token';
9
9
  import 'bn.js';
10
10
 
11
- const version = "0.2.0-beta.1";
11
+ const version = "0.2.0-beta.3";
12
12
 
13
13
  export { version };
@@ -1,6 +1,6 @@
1
1
  import * as _solana_web3_js from '@solana/web3.js';
2
2
  import { PublicKey } from '@solana/web3.js';
3
- import { O as OperateContextParams } from '../shared/lend.BT41yQVJ.mjs';
3
+ import { O as OperateContextParams } from '../shared/lend.CdoFqRFx.mjs';
4
4
  import 'bn.js';
5
5
  import '@coral-xyz/anchor';
6
6
 
@@ -40,7 +40,6 @@ declare function getRefinanceIx(params: OperateContextParams): Promise<{
40
40
  oracleProgram: PublicKey;
41
41
  supplyTokenProgram: PublicKey;
42
42
  borrowTokenProgram: PublicKey;
43
- associatedTokenProgram: PublicKey;
44
43
  systemProgram: PublicKey;
45
44
  };
46
45
  remainingAccounts: {
@@ -1,6 +1,6 @@
1
1
  import * as _solana_web3_js from '@solana/web3.js';
2
2
  import { PublicKey } from '@solana/web3.js';
3
- import { O as OperateContextParams } from '../shared/lend.BT41yQVJ.js';
3
+ import { O as OperateContextParams } from '../shared/lend.CdoFqRFx.js';
4
4
  import 'bn.js';
5
5
  import '@coral-xyz/anchor';
6
6
 
@@ -40,7 +40,6 @@ declare function getRefinanceIx(params: OperateContextParams): Promise<{
40
40
  oracleProgram: PublicKey;
41
41
  supplyTokenProgram: PublicKey;
42
42
  borrowTokenProgram: PublicKey;
43
- associatedTokenProgram: PublicKey;
44
43
  systemProgram: PublicKey;
45
44
  };
46
45
  remainingAccounts: {
@@ -1,10 +1,12 @@
1
- import { v as getOperateIx, F as vaultsIdl } from '../shared/lend.CTcB5yyK.mjs';
1
+ import { C as vaultsIdl } from '../shared/lend.CVtn-ehf.mjs';
2
+ import { e as getOperateIx } from '../shared/lend.CS-bkwRq.mjs';
2
3
  import { PublicKey } from '@solana/web3.js';
3
4
  import { Program } from '@coral-xyz/anchor';
4
5
  import 'bn.js';
6
+ import '../shared/lend.a53XYkl5.mjs';
5
7
  import '@solana/spl-token';
6
- import '../shared/lend.ByiEG4eI.mjs';
7
8
  import '../shared/lend.C3XdrR6R.mjs';
9
+ import '../shared/lend.B80NmXTG.mjs';
8
10
 
9
11
  const address = "jup8QcdtqecBGw1iXHW3hQAsHQbTgEqbLbNMvvULmeK";
10
12
  const metadata = {