@jup-ag/lend 0.1.8 → 0.1.9

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.
@@ -1,5 +1,5 @@
1
- import { V as Vaults, L as LiquidateParams } from '../shared/lend.Cg37G_AM.mjs';
2
- export { C as ConnectionParams, I as InitPositionIxParams, e as LiquidateContextParams, O as OperateContextParams, a as OperateParams, c as getInitPositionContext, b as getInitPositionIx, f as getLiquidateContext, h as getLiquidateIx, g as getOperateContext, d as getOperateIx } from '../shared/lend.Cg37G_AM.mjs';
1
+ import { V as Vaults, L as LiquidateParams } from '../shared/lend.B1GEdPEJ.mjs';
2
+ export { C as ConnectionParams, I as InitPositionIxParams, e as LiquidateContextParams, O as OperateContextParams, a as OperateParams, c as getInitPositionContext, b as getInitPositionIx, f as getLiquidateContext, h as getLiquidateIx, g as getOperateContext, d as getOperateIx } from '../shared/lend.B1GEdPEJ.mjs';
3
3
  import { Program } from '@coral-xyz/anchor';
4
4
  import BN__default from 'bn.js';
5
5
  import * as _solana_web3_js from '@solana/web3.js';
@@ -96,6 +96,7 @@ declare function readOraclePrice({ connection, signer, oracle, }: {
96
96
  chainlink?: undefined;
97
97
  singlePool?: undefined;
98
98
  jupLend?: undefined;
99
+ chainlinkDataStreams?: undefined;
99
100
  } & {
100
101
  pyth: Record<string, never>;
101
102
  }) | ({
@@ -105,6 +106,7 @@ declare function readOraclePrice({ connection, signer, oracle, }: {
105
106
  chainlink?: undefined;
106
107
  singlePool?: undefined;
107
108
  jupLend?: undefined;
109
+ chainlinkDataStreams?: undefined;
108
110
  } & {
109
111
  stakePool: Record<string, never>;
110
112
  }) | ({
@@ -114,6 +116,7 @@ declare function readOraclePrice({ connection, signer, oracle, }: {
114
116
  chainlink?: undefined;
115
117
  singlePool?: undefined;
116
118
  jupLend?: undefined;
119
+ chainlinkDataStreams?: undefined;
117
120
  } & {
118
121
  msolPool: Record<string, never>;
119
122
  }) | ({
@@ -123,6 +126,7 @@ declare function readOraclePrice({ connection, signer, oracle, }: {
123
126
  chainlink?: undefined;
124
127
  singlePool?: undefined;
125
128
  jupLend?: undefined;
129
+ chainlinkDataStreams?: undefined;
126
130
  } & {
127
131
  redstone: Record<string, never>;
128
132
  }) | ({
@@ -132,6 +136,7 @@ declare function readOraclePrice({ connection, signer, oracle, }: {
132
136
  redstone?: undefined;
133
137
  singlePool?: undefined;
134
138
  jupLend?: undefined;
139
+ chainlinkDataStreams?: undefined;
135
140
  } & {
136
141
  chainlink: Record<string, never>;
137
142
  }) | ({
@@ -141,6 +146,7 @@ declare function readOraclePrice({ connection, signer, oracle, }: {
141
146
  redstone?: undefined;
142
147
  chainlink?: undefined;
143
148
  jupLend?: undefined;
149
+ chainlinkDataStreams?: undefined;
144
150
  } & {
145
151
  singlePool: Record<string, never>;
146
152
  }) | ({
@@ -150,8 +156,19 @@ declare function readOraclePrice({ connection, signer, oracle, }: {
150
156
  redstone?: undefined;
151
157
  chainlink?: undefined;
152
158
  singlePool?: undefined;
159
+ chainlinkDataStreams?: undefined;
153
160
  } & {
154
161
  jupLend: Record<string, never>;
162
+ }) | ({
163
+ pyth?: undefined;
164
+ stakePool?: undefined;
165
+ msolPool?: undefined;
166
+ redstone?: undefined;
167
+ chainlink?: undefined;
168
+ singlePool?: undefined;
169
+ jupLend?: undefined;
170
+ } & {
171
+ chainlinkDataStreams: Record<string, never>;
155
172
  });
156
173
  }[];
157
174
  }>;
@@ -1,5 +1,5 @@
1
- import { V as Vaults, L as LiquidateParams } from '../shared/lend.Cg37G_AM.js';
2
- export { C as ConnectionParams, I as InitPositionIxParams, e as LiquidateContextParams, O as OperateContextParams, a as OperateParams, c as getInitPositionContext, b as getInitPositionIx, f as getLiquidateContext, h as getLiquidateIx, g as getOperateContext, d as getOperateIx } from '../shared/lend.Cg37G_AM.js';
1
+ import { V as Vaults, L as LiquidateParams } from '../shared/lend.B1GEdPEJ.js';
2
+ export { C as ConnectionParams, I as InitPositionIxParams, e as LiquidateContextParams, O as OperateContextParams, a as OperateParams, c as getInitPositionContext, b as getInitPositionIx, f as getLiquidateContext, h as getLiquidateIx, g as getOperateContext, d as getOperateIx } from '../shared/lend.B1GEdPEJ.js';
3
3
  import { Program } from '@coral-xyz/anchor';
4
4
  import BN__default from 'bn.js';
5
5
  import * as _solana_web3_js from '@solana/web3.js';
@@ -96,6 +96,7 @@ declare function readOraclePrice({ connection, signer, oracle, }: {
96
96
  chainlink?: undefined;
97
97
  singlePool?: undefined;
98
98
  jupLend?: undefined;
99
+ chainlinkDataStreams?: undefined;
99
100
  } & {
100
101
  pyth: Record<string, never>;
101
102
  }) | ({
@@ -105,6 +106,7 @@ declare function readOraclePrice({ connection, signer, oracle, }: {
105
106
  chainlink?: undefined;
106
107
  singlePool?: undefined;
107
108
  jupLend?: undefined;
109
+ chainlinkDataStreams?: undefined;
108
110
  } & {
109
111
  stakePool: Record<string, never>;
110
112
  }) | ({
@@ -114,6 +116,7 @@ declare function readOraclePrice({ connection, signer, oracle, }: {
114
116
  chainlink?: undefined;
115
117
  singlePool?: undefined;
116
118
  jupLend?: undefined;
119
+ chainlinkDataStreams?: undefined;
117
120
  } & {
118
121
  msolPool: Record<string, never>;
119
122
  }) | ({
@@ -123,6 +126,7 @@ declare function readOraclePrice({ connection, signer, oracle, }: {
123
126
  chainlink?: undefined;
124
127
  singlePool?: undefined;
125
128
  jupLend?: undefined;
129
+ chainlinkDataStreams?: undefined;
126
130
  } & {
127
131
  redstone: Record<string, never>;
128
132
  }) | ({
@@ -132,6 +136,7 @@ declare function readOraclePrice({ connection, signer, oracle, }: {
132
136
  redstone?: undefined;
133
137
  singlePool?: undefined;
134
138
  jupLend?: undefined;
139
+ chainlinkDataStreams?: undefined;
135
140
  } & {
136
141
  chainlink: Record<string, never>;
137
142
  }) | ({
@@ -141,6 +146,7 @@ declare function readOraclePrice({ connection, signer, oracle, }: {
141
146
  redstone?: undefined;
142
147
  chainlink?: undefined;
143
148
  jupLend?: undefined;
149
+ chainlinkDataStreams?: undefined;
144
150
  } & {
145
151
  singlePool: Record<string, never>;
146
152
  }) | ({
@@ -150,8 +156,19 @@ declare function readOraclePrice({ connection, signer, oracle, }: {
150
156
  redstone?: undefined;
151
157
  chainlink?: undefined;
152
158
  singlePool?: undefined;
159
+ chainlinkDataStreams?: undefined;
153
160
  } & {
154
161
  jupLend: Record<string, never>;
162
+ }) | ({
163
+ pyth?: undefined;
164
+ stakePool?: undefined;
165
+ msolPool?: undefined;
166
+ redstone?: undefined;
167
+ chainlink?: undefined;
168
+ singlePool?: undefined;
169
+ jupLend?: undefined;
170
+ } & {
171
+ chainlinkDataStreams: Record<string, never>;
155
172
  });
156
173
  }[];
157
174
  }>;
@@ -1,8 +1,8 @@
1
- import { g as getLiquidateIx, a as getVaultsProgram } from '../shared/lend.BSHVKmia.mjs';
2
- export { I as INIT_TICK, h as MAX_REPAY_AMOUNT, t as MAX_TICK, i as MAX_WITHDRAW_AMOUNT, M as MIN_I128, s as MIN_TICK, u as TICKS_PER_TICK_HAS_DEBT, T as TICK_HAS_DEBT_ARRAY_SIZE, v as TICK_HAS_DEBT_CHILDREN_SIZE, w as TICK_HAS_DEBT_CHILDREN_SIZE_IN_BITS, x as TOTAL_INDICES_NEEDED, Z as ZERO_TICK_SCALED_RATIO, D as findNextTickWithDebt, j as getAccountOwner, k as getCurrentPosition, l as getCurrentPositionState, m as getFinalPosition, A as getFirstTickForIndex, d as getInitPositionContext, c as getInitPositionIx, f as getLiquidateContext, b as getOperateContext, e as getOperateIx, y as getRatioAtTick, z as getTickAtRatio, B as getTickIndices, n as loadRelevantBranches, q as loadRelevantBranchesForLiquidate, o as loadRelevantTicksHasDebtArrays, p as loadRelevantTicksHasDebtArraysLiquidate, r as readOraclePrice, C as readTickHasDebtArray } from '../shared/lend.BSHVKmia.mjs';
1
+ import { g as getLiquidateIx, a as getVaultsProgram } from '../shared/lend.BaZsInAi.mjs';
2
+ export { I as INIT_TICK, h as MAX_REPAY_AMOUNT, t as MAX_TICK, i as MAX_WITHDRAW_AMOUNT, M as MIN_I128, s as MIN_TICK, u as TICKS_PER_TICK_HAS_DEBT, T as TICK_HAS_DEBT_ARRAY_SIZE, v as TICK_HAS_DEBT_CHILDREN_SIZE, w as TICK_HAS_DEBT_CHILDREN_SIZE_IN_BITS, x as TOTAL_INDICES_NEEDED, Z as ZERO_TICK_SCALED_RATIO, D as findNextTickWithDebt, j as getAccountOwner, k as getCurrentPosition, l as getCurrentPositionState, m as getFinalPosition, A as getFirstTickForIndex, d as getInitPositionContext, c as getInitPositionIx, f as getLiquidateContext, b as getOperateContext, e as getOperateIx, y as getRatioAtTick, z as getTickAtRatio, B as getTickIndices, n as loadRelevantBranches, q as loadRelevantBranchesForLiquidate, o as loadRelevantTicksHasDebtArrays, p as loadRelevantTicksHasDebtArraysLiquidate, r as readOraclePrice, C as readTickHasDebtArray } from '../shared/lend.BaZsInAi.mjs';
3
3
  import { PublicKey, TransactionMessage, ComputeBudgetProgram, VersionedTransaction } from '@solana/web3.js';
4
4
  import BN from 'bn.js';
5
- import { g as getVaultAdmin } from '../shared/lend.CsYeVtpe.mjs';
5
+ import { g as getVaultAdmin } from '../shared/lend.Cw-khlBI.mjs';
6
6
  import '@coral-xyz/anchor';
7
7
  import '../shared/lend.CioR9-te.mjs';
8
8
  import '@solana/spl-token';
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  export { l as lendingPda, a as lendingRewardRateModelPda } from './shared/lend.DS0KoPpL.mjs';
2
2
  export { l as liquidityPda } from './shared/lend.BzG5ldOV.mjs';
3
- export { b as borrowPda } from './shared/lend.CsYeVtpe.mjs';
3
+ export { b as borrowPda } from './shared/lend.Cw-khlBI.mjs';
4
4
  export { f as flashloanPda } from './shared/lend.Cr2l14_0.mjs';
5
5
  export { m as merkleDistributorPda } from './shared/lend.Bpqe1Iia.mjs';
6
6
  import '@solana/web3.js';
@@ -8,6 +8,6 @@ import './shared/lend.CioR9-te.mjs';
8
8
  import '@solana/spl-token';
9
9
  import 'bn.js';
10
10
 
11
- const version = "0.1.8";
11
+ const version = "0.1.9";
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.Cg37G_AM.mjs';
3
+ import { O as OperateContextParams } from '../shared/lend.B1GEdPEJ.mjs';
4
4
  import 'bn.js';
5
5
  import '@coral-xyz/anchor';
6
6
 
@@ -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.Cg37G_AM.js';
3
+ import { O as OperateContextParams } from '../shared/lend.B1GEdPEJ.js';
4
4
  import 'bn.js';
5
5
  import '@coral-xyz/anchor';
6
6
 
@@ -1,5 +1,5 @@
1
- import { v as vaultsIdl } from '../shared/lend.CsYeVtpe.mjs';
2
- import { e as getOperateIx } from '../shared/lend.BSHVKmia.mjs';
1
+ import { v as vaultsIdl } from '../shared/lend.Cw-khlBI.mjs';
2
+ import { e as getOperateIx } from '../shared/lend.BaZsInAi.mjs';
3
3
  import { PublicKey } from '@solana/web3.js';
4
4
  import { Program } from '@coral-xyz/anchor';
5
5
  import '../shared/lend.CioR9-te.mjs';
@@ -13,7 +13,7 @@ type Vaults = {
13
13
  address: "jupr81YtYssSyPt8jbnGuiWon5f6x9TcDEFxYe3Bdzi";
14
14
  metadata: {
15
15
  name: "vaults";
16
- version: "0.1.0";
16
+ version: "0.1.2";
17
17
  spec: "0.1.0";
18
18
  description: "Created with Anchor";
19
19
  };
@@ -3324,6 +3324,9 @@ type Vaults = {
3324
3324
  },
3325
3325
  {
3326
3326
  name: "jupLend";
3327
+ },
3328
+ {
3329
+ name: "chainlinkDataStreams";
3327
3330
  }
3328
3331
  ];
3329
3332
  };
@@ -13,7 +13,7 @@ type Vaults = {
13
13
  address: "jupr81YtYssSyPt8jbnGuiWon5f6x9TcDEFxYe3Bdzi";
14
14
  metadata: {
15
15
  name: "vaults";
16
- version: "0.1.0";
16
+ version: "0.1.2";
17
17
  spec: "0.1.0";
18
18
  description: "Created with Anchor";
19
19
  };
@@ -3324,6 +3324,9 @@ type Vaults = {
3324
3324
  },
3325
3325
  {
3326
3326
  name: "jupLend";
3327
+ },
3328
+ {
3329
+ name: "chainlinkDataStreams";
3327
3330
  }
3328
3331
  ];
3329
3332
  };
@@ -3,17 +3,46 @@ import BN from 'bn.js';
3
3
  import { Program, AnchorProvider } from '@coral-xyz/anchor';
4
4
  import { l as liquidity } from './lend.CioR9-te.mjs';
5
5
  import { getAssociatedTokenAddressSync, ASSOCIATED_TOKEN_PROGRAM_ID, TOKEN_PROGRAM_ID, NATIVE_MINT } from '@solana/spl-token';
6
- import { a as getTickHasDebt, v as vaultsIdl, c as getPosition, d as getTick, e as getTickIdLiquidation, f as getVaultConfig, h as getBranch, i as getVaultState, j as getVaultMetadata, k as getLiquidity, l as getRateModel, m as getUserBorrowPosition, n as getUserSupplyPosition, o as getLiquidityReserve, p as getPositionTokenAccount, q as getPositionMetadata, r as getPositionMint, g as getVaultAdmin, s as getClaimAccount } from './lend.CsYeVtpe.mjs';
6
+ import { a as getTickHasDebt, v as vaultsIdl, c as getPosition, d as getTick, e as getTickIdLiquidation, f as getVaultConfig, h as getBranch, i as getVaultState, j as getVaultMetadata, k as getLiquidity, l as getRateModel, m as getUserBorrowPosition, n as getUserSupplyPosition, o as getLiquidityReserve, p as getPositionTokenAccount, q as getPositionMetadata, r as getPositionMint, g as getVaultAdmin, s as getClaimAccount } from './lend.Cw-khlBI.mjs';
7
7
  import { e as getReserve } from './lend.BzG5ldOV.mjs';
8
8
 
9
9
  const address = "jupnw4B6Eqs7ft6rxpzYLJZYSnrpRgPcr589n5Kv4oc";
10
10
  const metadata = {
11
11
  name: "oracle",
12
- version: "0.1.0",
12
+ version: "0.1.3",
13
13
  spec: "0.1.0",
14
14
  description: "Created with Anchor"
15
15
  };
16
16
  const instructions = [
17
+ {
18
+ name: "chainlink_data_streams_feed_access_controller",
19
+ discriminator: [
20
+ 181,
21
+ 88,
22
+ 179,
23
+ 151,
24
+ 225,
25
+ 38,
26
+ 9,
27
+ 6
28
+ ],
29
+ accounts: [
30
+ {
31
+ name: "authority",
32
+ signer: true
33
+ },
34
+ {
35
+ name: "chainlink_ds_cache",
36
+ writable: true
37
+ }
38
+ ],
39
+ args: [
40
+ {
41
+ name: "suspend",
42
+ type: "bool"
43
+ }
44
+ ]
45
+ },
17
46
  {
18
47
  name: "get_both_exchange_rate",
19
48
  discriminator: [
@@ -168,6 +197,84 @@ const instructions = [
168
197
  }
169
198
  ]
170
199
  },
200
+ {
201
+ name: "init_chainlink_data_streams_cache",
202
+ discriminator: [
203
+ 47,
204
+ 174,
205
+ 206,
206
+ 189,
207
+ 94,
208
+ 253,
209
+ 25,
210
+ 233
211
+ ],
212
+ accounts: [
213
+ {
214
+ name: "signer",
215
+ writable: true,
216
+ signer: true
217
+ },
218
+ {
219
+ name: "oracle_admin"
220
+ },
221
+ {
222
+ name: "chainlink_ds_cache",
223
+ writable: true,
224
+ pda: {
225
+ seeds: [
226
+ {
227
+ kind: "const",
228
+ value: [
229
+ 99,
230
+ 104,
231
+ 97,
232
+ 105,
233
+ 110,
234
+ 108,
235
+ 105,
236
+ 110,
237
+ 107,
238
+ 95,
239
+ 100,
240
+ 115
241
+ ]
242
+ },
243
+ {
244
+ kind: "arg",
245
+ path: "nonce"
246
+ }
247
+ ]
248
+ }
249
+ },
250
+ {
251
+ name: "system_program",
252
+ address: "11111111111111111111111111111111"
253
+ }
254
+ ],
255
+ args: [
256
+ {
257
+ name: "nonce",
258
+ type: "u16"
259
+ },
260
+ {
261
+ name: "feeds",
262
+ type: {
263
+ vec: {
264
+ defined: {
265
+ name: "FeedEntry"
266
+ }
267
+ }
268
+ }
269
+ },
270
+ {
271
+ name: "keepers",
272
+ type: {
273
+ vec: "pubkey"
274
+ }
275
+ }
276
+ ]
277
+ },
171
278
  {
172
279
  name: "init_oracle_config",
173
280
  discriminator: [
@@ -234,6 +341,59 @@ const instructions = [
234
341
  }
235
342
  ]
236
343
  },
344
+ {
345
+ name: "refresh_price_feed_with_chainlink",
346
+ discriminator: [
347
+ 74,
348
+ 3,
349
+ 0,
350
+ 183,
351
+ 242,
352
+ 117,
353
+ 152,
354
+ 203
355
+ ],
356
+ accounts: [
357
+ {
358
+ name: "signer",
359
+ signer: true
360
+ },
361
+ {
362
+ name: "chainlink_ds_cache",
363
+ writable: true
364
+ },
365
+ {
366
+ name: "verifier_account",
367
+ address: "HJR45sRiFdGncL69HVzRK4HLS2SXcVW3KeTPkp2aFmWC"
368
+ },
369
+ {
370
+ name: "access_controller",
371
+ address: "7mSn5MoBjyRLKoJShgkep8J17ueGG8rYioVAiSg5YWMF"
372
+ },
373
+ {
374
+ name: "config_account"
375
+ },
376
+ {
377
+ name: "verifier_program_id",
378
+ address: "Gt9S41PtjR58CbG9JhJ3J6vxesqrNAswbWYbLNTMZA3c"
379
+ }
380
+ ],
381
+ args: [
382
+ {
383
+ name: "feed_id",
384
+ type: {
385
+ array: [
386
+ "u8",
387
+ 32
388
+ ]
389
+ }
390
+ },
391
+ {
392
+ name: "serialized_report",
393
+ type: "bytes"
394
+ }
395
+ ]
396
+ },
237
397
  {
238
398
  name: "update_authority",
239
399
  discriminator: [
@@ -297,9 +457,100 @@ const instructions = [
297
457
  }
298
458
  }
299
459
  ]
460
+ },
461
+ {
462
+ name: "update_chainlink_data_streams_cache_feeds",
463
+ discriminator: [
464
+ 55,
465
+ 69,
466
+ 93,
467
+ 203,
468
+ 144,
469
+ 30,
470
+ 248,
471
+ 173
472
+ ],
473
+ accounts: [
474
+ {
475
+ name: "signer",
476
+ writable: true,
477
+ signer: true
478
+ },
479
+ {
480
+ name: "oracle_admin"
481
+ },
482
+ {
483
+ name: "chainlink_ds_cache",
484
+ writable: true
485
+ }
486
+ ],
487
+ args: [
488
+ {
489
+ name: "feeds",
490
+ type: {
491
+ vec: {
492
+ defined: {
493
+ name: "FeedEntry"
494
+ }
495
+ }
496
+ }
497
+ }
498
+ ]
499
+ },
500
+ {
501
+ name: "update_chainlink_data_streams_cache_keepers",
502
+ discriminator: [
503
+ 125,
504
+ 168,
505
+ 188,
506
+ 187,
507
+ 148,
508
+ 203,
509
+ 102,
510
+ 87
511
+ ],
512
+ accounts: [
513
+ {
514
+ name: "signer",
515
+ writable: true,
516
+ signer: true
517
+ },
518
+ {
519
+ name: "oracle_admin"
520
+ },
521
+ {
522
+ name: "chainlink_ds_cache",
523
+ writable: true
524
+ }
525
+ ],
526
+ args: [
527
+ {
528
+ name: "keeper_status",
529
+ type: {
530
+ vec: {
531
+ defined: {
532
+ name: "AddressBool"
533
+ }
534
+ }
535
+ }
536
+ }
537
+ ]
300
538
  }
301
539
  ];
302
540
  const accounts = [
541
+ {
542
+ name: "ChainlinkDataStreamsCache",
543
+ discriminator: [
544
+ 65,
545
+ 102,
546
+ 75,
547
+ 47,
548
+ 79,
549
+ 156,
550
+ 109,
551
+ 193
552
+ ]
553
+ },
303
554
  {
304
555
  name: "Oracle",
305
556
  discriminator: [
@@ -328,6 +579,32 @@ const accounts = [
328
579
  }
329
580
  ];
330
581
  const events = [
582
+ {
583
+ name: "LogChainlinkDataStreamsFeedMarketIsInTransition",
584
+ discriminator: [
585
+ 211,
586
+ 67,
587
+ 128,
588
+ 58,
589
+ 147,
590
+ 192,
591
+ 179,
592
+ 111
593
+ ]
594
+ },
595
+ {
596
+ name: "LogChainlinkDataStreamsFeedSuspended",
597
+ discriminator: [
598
+ 63,
599
+ 149,
600
+ 247,
601
+ 255,
602
+ 189,
603
+ 80,
604
+ 154,
605
+ 253
606
+ ]
607
+ },
331
608
  {
332
609
  name: "LogStakePoolHighFeeDetected",
333
610
  discriminator: [
@@ -366,6 +643,32 @@ const events = [
366
643
  76,
367
644
  251
368
645
  ]
646
+ },
647
+ {
648
+ name: "LogUpdateCacheFeeds",
649
+ discriminator: [
650
+ 75,
651
+ 155,
652
+ 134,
653
+ 56,
654
+ 17,
655
+ 94,
656
+ 235,
657
+ 191
658
+ ]
659
+ },
660
+ {
661
+ name: "LogUpdateCacheKeepers",
662
+ discriminator: [
663
+ 33,
664
+ 129,
665
+ 191,
666
+ 130,
667
+ 117,
668
+ 119,
669
+ 198,
670
+ 235
671
+ ]
369
672
  }
370
673
  ];
371
674
  const errors = [
@@ -493,6 +796,106 @@ const errors = [
493
796
  code: 6024,
494
797
  name: "JupLendAccountMismatch",
495
798
  msg: "JUP_LEND_ACCOUNT_MISMATCH"
799
+ },
800
+ {
801
+ code: 6025,
802
+ name: "ChainlinkDataStreamsNoReportData",
803
+ msg: "CHAINLINK_DATA_STREAMS_NO_REPORT_DATA"
804
+ },
805
+ {
806
+ code: 6026,
807
+ name: "ChainlinkDataStreamsInvalidReport",
808
+ msg: "CHAINLINK_DATA_STREAMS_INVALID_REPORT"
809
+ },
810
+ {
811
+ code: 6027,
812
+ name: "ChainlinkDataStreamsFeedIdMismatch",
813
+ msg: "CHAINLINK_DATA_STREAMS_FEED_ID_MISMATCH"
814
+ },
815
+ {
816
+ code: 6028,
817
+ name: "ChainlinkDataStreamsInvalidReportType",
818
+ msg: "CHAINLINK_DATA_STREAMS_INVALID_REPORT_TYPE"
819
+ },
820
+ {
821
+ code: 6029,
822
+ name: "ChainlinkDataStreamsFeedSuspended",
823
+ msg: "CHAINLINK_DATA_STREAMS_FEED_SUSPENDED"
824
+ },
825
+ {
826
+ code: 6030,
827
+ name: "ChainlinkDataStreamsFeedAlreadySuspendedOrResumed",
828
+ msg: "CHAINLINK_DATA_STREAMS_FEED_ALREADY_SUSPENDED_OR_RESUMED"
829
+ },
830
+ {
831
+ code: 6031,
832
+ name: "ChainlinkDataStreamsNotAKeeper",
833
+ msg: "CHAINLINK_DATA_STREAMS_NOT_A_KEEPER"
834
+ },
835
+ {
836
+ code: 6032,
837
+ name: "ChainlinkDataStreamsMaxFeedKeeperCountReached",
838
+ msg: "CHAINLINK_DATA_STREAMS_MAX_FEED_KEEPER_COUNT_REACHED"
839
+ },
840
+ {
841
+ code: 6033,
842
+ name: "ChainlinkDataStreamsMarketStatusUnknown",
843
+ msg: "CHAINLINK_DATA_STREAMS_MARKET_STATUS_UNKNOWN"
844
+ },
845
+ {
846
+ code: 6034,
847
+ name: "ChainlinkDataStreamsPriceTooOld",
848
+ msg: "CHAINLINK_DATA_STREAMS_PRICE_TOO_OLD"
849
+ },
850
+ {
851
+ code: 6035,
852
+ name: "ChainlinkDataStreamsV10PriceNotAllowed",
853
+ msg: "CHAINLINK_DATA_STREAMS_V10_PRICE_NOT_ALLOWED"
854
+ },
855
+ {
856
+ code: 6036,
857
+ name: "ChainlinkDataStreamsMultipleV10Feeds",
858
+ msg: "CHAINLINK_DATA_STREAMS_MULTIPLE_V10_FEEDS"
859
+ },
860
+ {
861
+ code: 6037,
862
+ name: "ChainlinkDataStreamsV11FeedRequiresV10Feed",
863
+ msg: "CHAINLINK_DATA_STREAMS_V11_FEED_REQUIRES_V10_FEED"
864
+ },
865
+ {
866
+ code: 6038,
867
+ name: "ChainlinkDataStreamsAllowedFeedNotFound",
868
+ msg: "CHAINLINK_DATA_STREAMS_ALLOWED_FEED_NOT_FOUND"
869
+ },
870
+ {
871
+ code: 6039,
872
+ name: "ChainlinkDataStreamsMarketStatusNotSupportedByFeed",
873
+ msg: "CHAINLINK_DATA_STREAMS_MARKET_STATUS_NOT_SUPPORTED_BY_FEED"
874
+ },
875
+ {
876
+ code: 6040,
877
+ name: "ChainlinkDataStreamsObservationTimestampTooOld",
878
+ msg: "CHAINLINK_DATA_STREAMS_OBSERVATION_TIMESTAMP_TOO_OLD"
879
+ },
880
+ {
881
+ code: 6041,
882
+ name: "ChainlinkDataStreamsFeedIdZero",
883
+ msg: "CHAINLINK_DATA_STREAMS_FEED_ID_ZERO"
884
+ },
885
+ {
886
+ code: 6042,
887
+ name: "ChainlinkDataStreamsDuplicateFeedIdReportType",
888
+ msg: "CHAINLINK_DATA_STREAMS_DUPLICATE_FEED_ID_REPORT_TYPE"
889
+ },
890
+ {
891
+ code: 6043,
892
+ name: "ChainlinkDataStreamsDuplicateFeedId",
893
+ msg: "CHAINLINK_DATA_STREAMS_DUPLICATE_FEED_ID"
894
+ },
895
+ {
896
+ code: 6044,
897
+ name: "ChainlinkDataStreamsNoFeedKeepers",
898
+ msg: "CHAINLINK_DATA_STREAMS_NO_FEED_KEEPERS"
496
899
  }
497
900
  ];
498
901
  const types = [
@@ -512,6 +915,218 @@ const types = [
512
915
  ]
513
916
  }
514
917
  },
918
+ {
919
+ name: "ChainlinkDataStreamsCache",
920
+ type: {
921
+ kind: "struct",
922
+ fields: [
923
+ {
924
+ name: "nonce",
925
+ type: "u16"
926
+ },
927
+ {
928
+ name: "feeds",
929
+ type: {
930
+ vec: {
931
+ defined: {
932
+ name: "FeedEntry"
933
+ }
934
+ }
935
+ }
936
+ },
937
+ {
938
+ name: "price",
939
+ type: "u128"
940
+ },
941
+ {
942
+ name: "last_update_timestamp_price",
943
+ type: "u64"
944
+ },
945
+ {
946
+ name: "last_update_timestamp_multiplier",
947
+ type: "u64"
948
+ },
949
+ {
950
+ name: "last_observations_timestamp",
951
+ type: "u64"
952
+ },
953
+ {
954
+ name: "generic_data",
955
+ type: {
956
+ defined: {
957
+ name: "ChainlinkDsCacheGenericData"
958
+ }
959
+ }
960
+ },
961
+ {
962
+ name: "keepers",
963
+ type: {
964
+ vec: "pubkey"
965
+ }
966
+ }
967
+ ]
968
+ }
969
+ },
970
+ {
971
+ name: "ChainlinkDsCacheGenericData",
972
+ type: {
973
+ kind: "struct",
974
+ fields: [
975
+ {
976
+ name: "xstocks_activation_date_time",
977
+ type: "u64"
978
+ },
979
+ {
980
+ name: "xstocks_suspended",
981
+ type: "bool"
982
+ },
983
+ {
984
+ name: "market_status",
985
+ docs: [
986
+ "Last market status observed from the most recent report (0 = not yet seen / Unknown).",
987
+ "Set directly from the report's market_status field on every cache refresh.",
988
+ "For V8/V10 feeds this maps to ReportDataMarketStatus; for V11 to ReportDataV11MarketStatus."
989
+ ],
990
+ type: "u32"
991
+ },
992
+ {
993
+ name: "v11_transition_timestamp_s",
994
+ type: "u64"
995
+ },
996
+ {
997
+ name: "xstocks_last_multiplier",
998
+ docs: [
999
+ "Last current_multiplier seen for this feed via a v10 report."
1000
+ ],
1001
+ type: "u128"
1002
+ },
1003
+ {
1004
+ name: "xstocks_last_observations_timestamp_multiplier_s",
1005
+ docs: [
1006
+ "`observations_timestamp` (seconds) from the last accepted V10 report.",
1007
+ "Enforces strictly-monotonic sequencing to prevent replay of old multiplier reports."
1008
+ ],
1009
+ type: "u64"
1010
+ },
1011
+ {
1012
+ name: "_padding",
1013
+ type: {
1014
+ array: [
1015
+ "u8",
1016
+ 24
1017
+ ]
1018
+ }
1019
+ }
1020
+ ]
1021
+ }
1022
+ },
1023
+ {
1024
+ name: "ChainlinkReportType",
1025
+ repr: {
1026
+ kind: "rust"
1027
+ },
1028
+ type: {
1029
+ kind: "enum",
1030
+ variants: [
1031
+ {
1032
+ name: "XStocks"
1033
+ },
1034
+ {
1035
+ name: "RWA"
1036
+ },
1037
+ {
1038
+ name: "NAV"
1039
+ },
1040
+ {
1041
+ name: "RWAAdvanced"
1042
+ },
1043
+ {
1044
+ name: "ExchangeRate"
1045
+ },
1046
+ {
1047
+ name: "CryptoPrice"
1048
+ }
1049
+ ]
1050
+ }
1051
+ },
1052
+ {
1053
+ name: "FeedEntry",
1054
+ docs: [
1055
+ "One entry in the feed map: a 32-byte Chainlink feed ID paired with its report schema",
1056
+ "type and, for V11 feeds, the set of trading sessions the feed supports."
1057
+ ],
1058
+ type: {
1059
+ kind: "struct",
1060
+ fields: [
1061
+ {
1062
+ name: "feed_id",
1063
+ type: {
1064
+ array: [
1065
+ "u8",
1066
+ 32
1067
+ ]
1068
+ }
1069
+ },
1070
+ {
1071
+ name: "report_type",
1072
+ type: {
1073
+ defined: {
1074
+ name: "ChainlinkReportType"
1075
+ }
1076
+ }
1077
+ },
1078
+ {
1079
+ name: "v11_session_type",
1080
+ type: {
1081
+ defined: {
1082
+ name: "V11FeedSessionType"
1083
+ }
1084
+ }
1085
+ }
1086
+ ]
1087
+ }
1088
+ },
1089
+ {
1090
+ name: "LogChainlinkDataStreamsFeedMarketIsInTransition",
1091
+ type: {
1092
+ kind: "struct",
1093
+ fields: [
1094
+ {
1095
+ name: "feed_id",
1096
+ type: {
1097
+ array: [
1098
+ "u8",
1099
+ 32
1100
+ ]
1101
+ }
1102
+ },
1103
+ {
1104
+ name: "v11_transition_timestamp_s",
1105
+ type: "u64"
1106
+ }
1107
+ ]
1108
+ }
1109
+ },
1110
+ {
1111
+ name: "LogChainlinkDataStreamsFeedSuspended",
1112
+ type: {
1113
+ kind: "struct",
1114
+ fields: [
1115
+ {
1116
+ name: "chainlink_data_streams_cache",
1117
+ type: "pubkey"
1118
+ },
1119
+ {
1120
+ name: "keeper",
1121
+ type: "pubkey"
1122
+ },
1123
+ {
1124
+ name: "xstocks_suspended",
1125
+ type: "bool"
1126
+ }
1127
+ ]
1128
+ }
1129
+ },
515
1130
  {
516
1131
  name: "LogStakePoolHighFeeDetected",
517
1132
  type: {
@@ -558,6 +1173,50 @@ const types = [
558
1173
  ]
559
1174
  }
560
1175
  },
1176
+ {
1177
+ name: "LogUpdateCacheFeeds",
1178
+ type: {
1179
+ kind: "struct",
1180
+ fields: [
1181
+ {
1182
+ name: "chainlink_data_streams_cache",
1183
+ type: "pubkey"
1184
+ },
1185
+ {
1186
+ name: "feeds",
1187
+ type: {
1188
+ vec: {
1189
+ defined: {
1190
+ name: "FeedEntry"
1191
+ }
1192
+ }
1193
+ }
1194
+ }
1195
+ ]
1196
+ }
1197
+ },
1198
+ {
1199
+ name: "LogUpdateCacheKeepers",
1200
+ type: {
1201
+ kind: "struct",
1202
+ fields: [
1203
+ {
1204
+ name: "chainlink_data_streams_cache",
1205
+ type: "pubkey"
1206
+ },
1207
+ {
1208
+ name: "keeper_status",
1209
+ type: {
1210
+ vec: {
1211
+ defined: {
1212
+ name: "AddressBool"
1213
+ }
1214
+ }
1215
+ }
1216
+ }
1217
+ ]
1218
+ }
1219
+ },
561
1220
  {
562
1221
  name: "Oracle",
563
1222
  type: {
@@ -627,6 +1286,9 @@ const types = [
627
1286
  },
628
1287
  {
629
1288
  name: "JupLend"
1289
+ },
1290
+ {
1291
+ name: "ChainlinkDataStreams"
630
1292
  }
631
1293
  ]
632
1294
  }
@@ -662,6 +1324,37 @@ const types = [
662
1324
  }
663
1325
  ]
664
1326
  }
1327
+ },
1328
+ {
1329
+ name: "V11FeedSessionType",
1330
+ docs: [
1331
+ "Trading-session scope for a V11 (24/5 US Equities) feed.",
1332
+ "",
1333
+ "Chainlink publishes a `market_status` field in every v11 report that indicates which",
1334
+ "trading phase is currently active. This is done here because even when market is not",
1335
+ "in session chainlink feeds can public other sessions data.",
1336
+ "This enum captures which phases are valid for a given feed so that reports arriving",
1337
+ "with an unsupported status can be rejected early rather than silently accepted.",
1338
+ "",
1339
+ "For non-V11 feed entries (`report_type != RWAAdvanced`) this field is ignored."
1340
+ ],
1341
+ repr: {
1342
+ kind: "rust"
1343
+ },
1344
+ type: {
1345
+ kind: "enum",
1346
+ variants: [
1347
+ {
1348
+ name: "Regular"
1349
+ },
1350
+ {
1351
+ name: "Extended"
1352
+ },
1353
+ {
1354
+ name: "Overnight"
1355
+ }
1356
+ ]
1357
+ }
665
1358
  }
666
1359
  ];
667
1360
  const oracle = {
@@ -6,7 +6,7 @@ import BN from 'bn.js';
6
6
  const address = "jupr81YtYssSyPt8jbnGuiWon5f6x9TcDEFxYe3Bdzi";
7
7
  const metadata = {
8
8
  name: "vaults",
9
- version: "0.1.0",
9
+ version: "0.1.2",
10
10
  spec: "0.1.0",
11
11
  description: "Created with Anchor"
12
12
  };
@@ -4119,6 +4119,9 @@ const types = [
4119
4119
  },
4120
4120
  {
4121
4121
  name: "JupLend"
4122
+ },
4123
+ {
4124
+ name: "ChainlinkDataStreams"
4122
4125
  }
4123
4126
  ]
4124
4127
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jup-ag/lend",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "type": "module",