@0dotxyz/p0-ts-sdk 2.7.1 → 2.7.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.
package/dist/vendor.d.cts CHANGED
@@ -23256,13 +23256,13 @@ declare const JUP_REWARDS_PROGRAM_ID: PublicKey;
23256
23256
  * Program IDL in camelCase format in order to be used in JS/TS.
23257
23257
  *
23258
23258
  * Note that this is only a type helper and is not the actual IDL. The original
23259
- * IDL was extracted from the compiled @jup-ag/lend SDK.
23259
+ * IDL was extracted from https://github.com/jup-ag/jupiter-lend (target/idl/lending.json).
23260
23260
  */
23261
23261
  type JupLend = {
23262
23262
  address: "jup3YeL8QhtSx1e253b2FDvsMNC87fDrgQZivbrndc9";
23263
23263
  metadata: {
23264
23264
  name: "lending";
23265
- version: "0.1.0";
23265
+ version: "0.1.4";
23266
23266
  spec: "0.1.0";
23267
23267
  description: "Created with Anchor";
23268
23268
  };
@@ -23277,37 +23277,39 @@ type JupLend = {
23277
23277
  signer: true;
23278
23278
  },
23279
23279
  {
23280
- name: "depositor_token_account";
23280
+ name: "depositorTokenAccount";
23281
23281
  writable: true;
23282
23282
  },
23283
23283
  {
23284
- name: "recipient_token_account";
23284
+ name: "recipientTokenAccount";
23285
23285
  writable: true;
23286
23286
  },
23287
23287
  {
23288
23288
  name: "mint";
23289
+ relations: ["lending", "rewardsRateModel"];
23289
23290
  },
23290
23291
  {
23291
- name: "lending_admin";
23292
+ name: "lendingAdmin";
23292
23293
  },
23293
23294
  {
23294
23295
  name: "lending";
23295
23296
  writable: true;
23296
23297
  },
23297
23298
  {
23298
- name: "f_token_mint";
23299
+ name: "fTokenMint";
23299
23300
  writable: true;
23301
+ relations: ["lending"];
23300
23302
  },
23301
23303
  {
23302
- name: "supply_token_reserves_liquidity";
23304
+ name: "supplyTokenReservesLiquidity";
23303
23305
  writable: true;
23304
23306
  },
23305
23307
  {
23306
- name: "lending_supply_position_on_liquidity";
23308
+ name: "lendingSupplyPositionOnLiquidity";
23307
23309
  writable: true;
23308
23310
  },
23309
23311
  {
23310
- name: "rate_model";
23312
+ name: "rateModel";
23311
23313
  },
23312
23314
  {
23313
23315
  name: "vault";
@@ -23318,31 +23320,36 @@ type JupLend = {
23318
23320
  writable: true;
23319
23321
  },
23320
23322
  {
23321
- name: "liquidity_program";
23322
- writable: true;
23323
+ name: "liquidityProgram";
23324
+ relations: ["lendingAdmin"];
23323
23325
  },
23324
23326
  {
23325
- name: "rewards_rate_model";
23327
+ name: "rewardsRateModel";
23326
23328
  },
23327
23329
  {
23328
- name: "token_program";
23330
+ name: "tokenProgram";
23329
23331
  },
23330
23332
  {
23331
- name: "associated_token_program";
23333
+ name: "associatedTokenProgram";
23334
+ optional: true;
23335
+ address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
23332
23336
  },
23333
23337
  {
23334
- name: "system_program";
23338
+ name: "systemProgram";
23339
+ address: "11111111111111111111111111111111";
23340
+ }
23341
+ ];
23342
+ args: [
23343
+ {
23344
+ name: "assets";
23345
+ type: "u64";
23335
23346
  }
23336
23347
  ];
23337
- args: [{
23338
- name: "assets";
23339
- type: "u64";
23340
- }];
23341
23348
  returns: "u64";
23342
23349
  },
23343
23350
  {
23344
- name: "mint";
23345
- discriminator: [51, 57, 225, 47, 182, 146, 137, 166];
23351
+ name: "depositWithMinAmountOut";
23352
+ discriminator: [116, 144, 16, 97, 118, 109, 40, 119];
23346
23353
  accounts: [
23347
23354
  {
23348
23355
  name: "signer";
@@ -23350,37 +23357,39 @@ type JupLend = {
23350
23357
  signer: true;
23351
23358
  },
23352
23359
  {
23353
- name: "depositor_token_account";
23360
+ name: "depositorTokenAccount";
23354
23361
  writable: true;
23355
23362
  },
23356
23363
  {
23357
- name: "recipient_token_account";
23364
+ name: "recipientTokenAccount";
23358
23365
  writable: true;
23359
23366
  },
23360
23367
  {
23361
23368
  name: "mint";
23369
+ relations: ["lending", "rewardsRateModel"];
23362
23370
  },
23363
23371
  {
23364
- name: "lending_admin";
23372
+ name: "lendingAdmin";
23365
23373
  },
23366
23374
  {
23367
23375
  name: "lending";
23368
23376
  writable: true;
23369
23377
  },
23370
23378
  {
23371
- name: "f_token_mint";
23379
+ name: "fTokenMint";
23372
23380
  writable: true;
23381
+ relations: ["lending"];
23373
23382
  },
23374
23383
  {
23375
- name: "supply_token_reserves_liquidity";
23384
+ name: "supplyTokenReservesLiquidity";
23376
23385
  writable: true;
23377
23386
  },
23378
23387
  {
23379
- name: "lending_supply_position_on_liquidity";
23388
+ name: "lendingSupplyPositionOnLiquidity";
23380
23389
  writable: true;
23381
23390
  },
23382
23391
  {
23383
- name: "rate_model";
23392
+ name: "rateModel";
23384
23393
  },
23385
23394
  {
23386
23395
  name: "vault";
@@ -23391,31 +23400,39 @@ type JupLend = {
23391
23400
  writable: true;
23392
23401
  },
23393
23402
  {
23394
- name: "liquidity_program";
23395
- writable: true;
23403
+ name: "liquidityProgram";
23404
+ relations: ["lendingAdmin"];
23396
23405
  },
23397
23406
  {
23398
- name: "rewards_rate_model";
23407
+ name: "rewardsRateModel";
23399
23408
  },
23400
23409
  {
23401
- name: "token_program";
23410
+ name: "tokenProgram";
23402
23411
  },
23403
23412
  {
23404
- name: "associated_token_program";
23413
+ name: "associatedTokenProgram";
23414
+ optional: true;
23415
+ address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
23405
23416
  },
23406
23417
  {
23407
- name: "system_program";
23418
+ name: "systemProgram";
23419
+ address: "11111111111111111111111111111111";
23420
+ }
23421
+ ];
23422
+ args: [
23423
+ {
23424
+ name: "assets";
23425
+ type: "u64";
23426
+ },
23427
+ {
23428
+ name: "minAmountOut";
23429
+ type: "u64";
23408
23430
  }
23409
23431
  ];
23410
- args: [{
23411
- name: "shares";
23412
- type: "u64";
23413
- }];
23414
- returns: "u64";
23415
23432
  },
23416
23433
  {
23417
- name: "withdraw";
23418
- discriminator: [183, 18, 70, 156, 148, 109, 161, 34];
23434
+ name: "initLending";
23435
+ discriminator: [156, 224, 67, 46, 89, 189, 157, 209];
23419
23436
  accounts: [
23420
23437
  {
23421
23438
  name: "signer";
@@ -23423,76 +23440,244 @@ type JupLend = {
23423
23440
  signer: true;
23424
23441
  },
23425
23442
  {
23426
- name: "owner_token_account";
23443
+ name: "lendingAdmin";
23427
23444
  writable: true;
23428
23445
  },
23429
23446
  {
23430
- name: "recipient_token_account";
23447
+ name: "mint";
23448
+ relations: ["tokenReservesLiquidity"];
23449
+ },
23450
+ {
23451
+ name: "fTokenMint";
23431
23452
  writable: true;
23453
+ pda: {
23454
+ seeds: [
23455
+ {
23456
+ kind: "const";
23457
+ value: [
23458
+ 102,
23459
+ 95,
23460
+ 116,
23461
+ 111,
23462
+ 107,
23463
+ 101,
23464
+ 110,
23465
+ 95,
23466
+ 109,
23467
+ 105,
23468
+ 110,
23469
+ 116
23470
+ ];
23471
+ },
23472
+ {
23473
+ kind: "account";
23474
+ path: "mint";
23475
+ }
23476
+ ];
23477
+ };
23432
23478
  },
23433
23479
  {
23434
- name: "lending_admin";
23480
+ name: "metadataAccount";
23481
+ writable: true;
23482
+ pda: {
23483
+ seeds: [
23484
+ {
23485
+ kind: "const";
23486
+ value: [109, 101, 116, 97, 100, 97, 116, 97];
23487
+ },
23488
+ {
23489
+ kind: "const";
23490
+ value: [
23491
+ 11,
23492
+ 112,
23493
+ 101,
23494
+ 177,
23495
+ 227,
23496
+ 209,
23497
+ 124,
23498
+ 69,
23499
+ 56,
23500
+ 157,
23501
+ 82,
23502
+ 127,
23503
+ 107,
23504
+ 4,
23505
+ 195,
23506
+ 205,
23507
+ 88,
23508
+ 184,
23509
+ 108,
23510
+ 115,
23511
+ 26,
23512
+ 160,
23513
+ 253,
23514
+ 181,
23515
+ 73,
23516
+ 182,
23517
+ 209,
23518
+ 188,
23519
+ 3,
23520
+ 248,
23521
+ 41,
23522
+ 70
23523
+ ];
23524
+ },
23525
+ {
23526
+ kind: "account";
23527
+ path: "fTokenMint";
23528
+ }
23529
+ ];
23530
+ program: {
23531
+ kind: "const";
23532
+ value: [
23533
+ 11,
23534
+ 112,
23535
+ 101,
23536
+ 177,
23537
+ 227,
23538
+ 209,
23539
+ 124,
23540
+ 69,
23541
+ 56,
23542
+ 157,
23543
+ 82,
23544
+ 127,
23545
+ 107,
23546
+ 4,
23547
+ 195,
23548
+ 205,
23549
+ 88,
23550
+ 184,
23551
+ 108,
23552
+ 115,
23553
+ 26,
23554
+ 160,
23555
+ 253,
23556
+ 181,
23557
+ 73,
23558
+ 182,
23559
+ 209,
23560
+ 188,
23561
+ 3,
23562
+ 248,
23563
+ 41,
23564
+ 70
23565
+ ];
23566
+ };
23567
+ };
23435
23568
  },
23436
23569
  {
23437
23570
  name: "lending";
23438
23571
  writable: true;
23572
+ pda: {
23573
+ seeds: [
23574
+ {
23575
+ kind: "const";
23576
+ value: [108, 101, 110, 100, 105, 110, 103];
23577
+ },
23578
+ {
23579
+ kind: "account";
23580
+ path: "mint";
23581
+ },
23582
+ {
23583
+ kind: "account";
23584
+ path: "fTokenMint";
23585
+ }
23586
+ ];
23587
+ };
23439
23588
  },
23440
23589
  {
23441
- name: "mint";
23590
+ name: "tokenReservesLiquidity";
23442
23591
  },
23443
23592
  {
23444
- name: "f_token_mint";
23445
- writable: true;
23593
+ name: "tokenProgram";
23446
23594
  },
23447
23595
  {
23448
- name: "supply_token_reserves_liquidity";
23449
- writable: true;
23596
+ name: "systemProgram";
23597
+ address: "11111111111111111111111111111111";
23450
23598
  },
23451
23599
  {
23452
- name: "lending_supply_position_on_liquidity";
23453
- writable: true;
23600
+ name: "sysvarInstruction";
23601
+ address: "Sysvar1nstructions1111111111111111111111111";
23454
23602
  },
23455
23603
  {
23456
- name: "rate_model";
23604
+ name: "metadataProgram";
23605
+ address: "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s";
23457
23606
  },
23458
23607
  {
23459
- name: "vault";
23460
- writable: true;
23461
- },
23608
+ name: "rent";
23609
+ address: "SysvarRent111111111111111111111111111111111";
23610
+ }
23611
+ ];
23612
+ args: [
23462
23613
  {
23463
- name: "claim_account";
23464
- writable: true;
23614
+ name: "symbol";
23615
+ type: "string";
23465
23616
  },
23466
23617
  {
23467
- name: "liquidity";
23618
+ name: "liquidityProgram";
23619
+ type: "pubkey";
23620
+ }
23621
+ ];
23622
+ },
23623
+ {
23624
+ name: "initLendingAdmin";
23625
+ discriminator: [203, 185, 241, 165, 56, 254, 33, 9];
23626
+ accounts: [
23627
+ {
23628
+ name: "authority";
23468
23629
  writable: true;
23630
+ signer: true;
23469
23631
  },
23470
23632
  {
23471
- name: "liquidity_program";
23633
+ name: "lendingAdmin";
23472
23634
  writable: true;
23635
+ pda: {
23636
+ seeds: [
23637
+ {
23638
+ kind: "const";
23639
+ value: [
23640
+ 108,
23641
+ 101,
23642
+ 110,
23643
+ 100,
23644
+ 105,
23645
+ 110,
23646
+ 103,
23647
+ 95,
23648
+ 97,
23649
+ 100,
23650
+ 109,
23651
+ 105,
23652
+ 110
23653
+ ];
23654
+ }
23655
+ ];
23656
+ };
23473
23657
  },
23474
23658
  {
23475
- name: "rewards_rate_model";
23476
- },
23659
+ name: "systemProgram";
23660
+ address: "11111111111111111111111111111111";
23661
+ }
23662
+ ];
23663
+ args: [
23477
23664
  {
23478
- name: "token_program";
23665
+ name: "liquidityProgram";
23666
+ type: "pubkey";
23479
23667
  },
23480
23668
  {
23481
- name: "associated_token_program";
23669
+ name: "rebalancer";
23670
+ type: "pubkey";
23482
23671
  },
23483
23672
  {
23484
- name: "system_program";
23673
+ name: "authority";
23674
+ type: "pubkey";
23485
23675
  }
23486
23676
  ];
23487
- args: [{
23488
- name: "amount";
23489
- type: "u64";
23490
- }];
23491
- returns: "u64";
23492
23677
  },
23493
23678
  {
23494
- name: "redeem";
23495
- discriminator: [184, 12, 86, 149, 70, 196, 97, 225];
23679
+ name: "mint";
23680
+ discriminator: [51, 57, 225, 47, 182, 146, 137, 166];
23496
23681
  accounts: [
23497
23682
  {
23498
23683
  name: "signer";
@@ -23500,76 +23685,79 @@ type JupLend = {
23500
23685
  signer: true;
23501
23686
  },
23502
23687
  {
23503
- name: "owner_token_account";
23688
+ name: "depositorTokenAccount";
23504
23689
  writable: true;
23505
23690
  },
23506
23691
  {
23507
- name: "recipient_token_account";
23692
+ name: "recipientTokenAccount";
23508
23693
  writable: true;
23509
23694
  },
23510
23695
  {
23511
- name: "lending_admin";
23696
+ name: "mint";
23697
+ relations: ["lending", "rewardsRateModel"];
23512
23698
  },
23513
23699
  {
23514
- name: "lending";
23515
- writable: true;
23700
+ name: "lendingAdmin";
23516
23701
  },
23517
23702
  {
23518
- name: "mint";
23703
+ name: "lending";
23704
+ writable: true;
23519
23705
  },
23520
23706
  {
23521
- name: "f_token_mint";
23707
+ name: "fTokenMint";
23522
23708
  writable: true;
23709
+ relations: ["lending"];
23523
23710
  },
23524
23711
  {
23525
- name: "supply_token_reserves_liquidity";
23712
+ name: "supplyTokenReservesLiquidity";
23526
23713
  writable: true;
23527
23714
  },
23528
23715
  {
23529
- name: "lending_supply_position_on_liquidity";
23716
+ name: "lendingSupplyPositionOnLiquidity";
23530
23717
  writable: true;
23531
23718
  },
23532
23719
  {
23533
- name: "rate_model";
23720
+ name: "rateModel";
23534
23721
  },
23535
23722
  {
23536
23723
  name: "vault";
23537
23724
  writable: true;
23538
23725
  },
23539
- {
23540
- name: "claim_account";
23541
- writable: true;
23542
- },
23543
23726
  {
23544
23727
  name: "liquidity";
23545
23728
  writable: true;
23546
23729
  },
23547
23730
  {
23548
- name: "liquidity_program";
23549
- writable: true;
23731
+ name: "liquidityProgram";
23732
+ relations: ["lendingAdmin"];
23550
23733
  },
23551
23734
  {
23552
- name: "rewards_rate_model";
23735
+ name: "rewardsRateModel";
23553
23736
  },
23554
23737
  {
23555
- name: "token_program";
23738
+ name: "tokenProgram";
23556
23739
  },
23557
23740
  {
23558
- name: "associated_token_program";
23741
+ name: "associatedTokenProgram";
23742
+ optional: true;
23743
+ address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
23559
23744
  },
23560
23745
  {
23561
- name: "system_program";
23746
+ name: "systemProgram";
23747
+ address: "11111111111111111111111111111111";
23748
+ }
23749
+ ];
23750
+ args: [
23751
+ {
23752
+ name: "shares";
23753
+ type: "u64";
23562
23754
  }
23563
23755
  ];
23564
- args: [{
23565
- name: "shares";
23566
- type: "u64";
23567
- }];
23568
23756
  returns: "u64";
23569
23757
  },
23570
23758
  {
23571
- name: "rebalance";
23572
- discriminator: [108, 158, 77, 9, 210, 52, 88, 62];
23759
+ name: "mintWithMaxAssets";
23760
+ discriminator: [6, 94, 69, 122, 30, 179, 146, 171];
23573
23761
  accounts: [
23574
23762
  {
23575
23763
  name: "signer";
@@ -23577,304 +23765,97 @@ type JupLend = {
23577
23765
  signer: true;
23578
23766
  },
23579
23767
  {
23580
- name: "depositor_token_account";
23768
+ name: "depositorTokenAccount";
23581
23769
  writable: true;
23582
23770
  },
23583
23771
  {
23584
- name: "lending_admin";
23585
- },
23586
- {
23587
- name: "lending";
23772
+ name: "recipientTokenAccount";
23588
23773
  writable: true;
23589
23774
  },
23590
23775
  {
23591
23776
  name: "mint";
23777
+ relations: ["lending", "rewardsRateModel"];
23592
23778
  },
23593
23779
  {
23594
- name: "f_token_mint";
23595
- writable: true;
23780
+ name: "lendingAdmin";
23596
23781
  },
23597
23782
  {
23598
- name: "supply_token_reserves_liquidity";
23783
+ name: "lending";
23599
23784
  writable: true;
23600
23785
  },
23601
23786
  {
23602
- name: "lending_supply_position_on_liquidity";
23787
+ name: "fTokenMint";
23603
23788
  writable: true;
23789
+ relations: ["lending"];
23604
23790
  },
23605
23791
  {
23606
- name: "rate_model";
23792
+ name: "supplyTokenReservesLiquidity";
23607
23793
  writable: true;
23608
23794
  },
23609
23795
  {
23610
- name: "vault";
23796
+ name: "lendingSupplyPositionOnLiquidity";
23611
23797
  writable: true;
23612
23798
  },
23613
23799
  {
23614
- name: "liquidity";
23615
- writable: true;
23800
+ name: "rateModel";
23616
23801
  },
23617
23802
  {
23618
- name: "liquidity_program";
23803
+ name: "vault";
23619
23804
  writable: true;
23620
23805
  },
23621
23806
  {
23622
- name: "rewards_rate_model";
23623
- },
23624
- {
23625
- name: "token_program";
23626
- },
23627
- {
23628
- name: "associated_token_program";
23629
- },
23630
- {
23631
- name: "system_program";
23632
- }
23633
- ];
23634
- args: [];
23635
- },
23636
- {
23637
- name: "update_rate";
23638
- discriminator: [24, 225, 53, 189, 72, 212, 225, 178];
23639
- accounts: [
23640
- {
23641
- name: "lending";
23807
+ name: "liquidity";
23642
23808
  writable: true;
23643
23809
  },
23644
23810
  {
23645
- name: "mint";
23646
- },
23647
- {
23648
- name: "f_token_mint";
23811
+ name: "liquidityProgram";
23812
+ relations: ["lendingAdmin"];
23649
23813
  },
23650
23814
  {
23651
- name: "supply_token_reserves_liquidity";
23815
+ name: "rewardsRateModel";
23652
23816
  },
23653
23817
  {
23654
- name: "rewards_rate_model";
23655
- }
23656
- ];
23657
- args: [];
23658
- }
23659
- ];
23660
- accounts: [
23661
- {
23662
- name: "Lending";
23663
- discriminator: [135, 199, 82, 16, 249, 131, 182, 241];
23664
- },
23665
- {
23666
- name: "LendingAdmin";
23667
- discriminator: [42, 8, 33, 220, 163, 40, 210, 5];
23668
- },
23669
- {
23670
- name: "LendingRewardsRateModel";
23671
- discriminator: [166, 72, 71, 131, 172, 74, 166, 181];
23672
- },
23673
- {
23674
- name: "TokenReserve";
23675
- discriminator: [21, 18, 59, 135, 120, 20, 31, 12];
23676
- },
23677
- {
23678
- name: "UserSupplyPosition";
23679
- discriminator: [202, 219, 136, 118, 61, 177, 21, 146];
23680
- }
23681
- ];
23682
- types: [
23683
- {
23684
- name: "Lending";
23685
- type: {
23686
- kind: "struct";
23687
- fields: [
23688
- {
23689
- name: "mint";
23690
- type: "pubkey";
23691
- },
23692
- {
23693
- name: "f_token_mint";
23694
- type: "pubkey";
23695
- },
23696
- {
23697
- name: "lending_id";
23698
- type: "u16";
23699
- },
23700
- {
23701
- name: "decimals";
23702
- type: "u8";
23703
- },
23704
- {
23705
- name: "rewards_rate_model";
23706
- type: "pubkey";
23707
- },
23708
- {
23709
- name: "liquidity_exchange_price";
23710
- type: "u64";
23711
- },
23712
- {
23713
- name: "token_exchange_price";
23714
- type: "u64";
23715
- },
23716
- {
23717
- name: "last_update_timestamp";
23718
- type: "u64";
23719
- },
23720
- {
23721
- name: "token_reserves_liquidity";
23722
- type: "pubkey";
23723
- },
23724
- {
23725
- name: "supply_position_on_liquidity";
23726
- type: "pubkey";
23727
- },
23728
- {
23729
- name: "bump";
23730
- type: "u8";
23731
- }
23732
- ];
23733
- };
23734
- },
23735
- {
23736
- name: "LendingAdmin";
23737
- type: {
23738
- kind: "struct";
23739
- fields: [
23740
- {
23741
- name: "authority";
23742
- type: "pubkey";
23743
- },
23744
- {
23745
- name: "liquidity_program";
23746
- type: "pubkey";
23747
- },
23748
- {
23749
- name: "rebalancer";
23750
- type: "pubkey";
23751
- },
23752
- {
23753
- name: "next_lending_id";
23754
- type: "u16";
23755
- },
23756
- {
23757
- name: "auths";
23758
- type: {
23759
- vec: "pubkey";
23760
- };
23761
- },
23762
- {
23763
- name: "bump";
23764
- type: "u8";
23765
- }
23766
- ];
23767
- };
23768
- },
23769
- {
23770
- name: "LendingRewardsRateModel";
23771
- type: {
23772
- kind: "struct";
23773
- fields: [
23774
- {
23775
- name: "mint";
23776
- type: "pubkey";
23777
- },
23778
- {
23779
- name: "start_tvl";
23780
- type: "u64";
23781
- },
23782
- {
23783
- name: "duration";
23784
- type: "u64";
23785
- },
23786
- {
23787
- name: "start_time";
23788
- type: "u64";
23789
- },
23790
- {
23791
- name: "yearly_reward";
23792
- type: "u64";
23793
- },
23794
- {
23795
- name: "next_duration";
23796
- type: "u64";
23797
- },
23798
- {
23799
- name: "next_reward_amount";
23800
- type: "u64";
23801
- },
23802
- {
23803
- name: "bump";
23804
- type: "u8";
23805
- }
23806
- ];
23807
- };
23808
- }
23809
- ];
23810
- };
23811
-
23812
- /**
23813
- * Program IDL in camelCase format in order to be used in JS/TS.
23814
- *
23815
- * Note that this is only a type helper and is not the actual IDL. The original
23816
- * IDL can be found at `target/idl/liquidity.json`.
23817
- */
23818
- type Liquidity = {
23819
- address: "jupeiUmn818Jg1ekPURTpr4mFo29p46vygyykFJ3wZC";
23820
- metadata: {
23821
- name: "liquidity";
23822
- version: "0.1.0";
23823
- spec: "0.1.0";
23824
- description: "Created with Anchor";
23825
- };
23826
- instructions: [
23827
- {
23828
- name: "changeStatus";
23829
- discriminator: [236, 145, 131, 228, 227, 17, 192, 255];
23830
- accounts: [
23831
- {
23832
- name: "authority";
23833
- signer: true;
23818
+ name: "tokenProgram";
23834
23819
  },
23835
23820
  {
23836
- name: "liquidity";
23837
- writable: true;
23821
+ name: "associatedTokenProgram";
23822
+ optional: true;
23823
+ address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
23838
23824
  },
23839
23825
  {
23840
- name: "authList";
23826
+ name: "systemProgram";
23827
+ address: "11111111111111111111111111111111";
23841
23828
  }
23842
23829
  ];
23843
23830
  args: [
23844
23831
  {
23845
- name: "status";
23846
- type: "bool";
23832
+ name: "shares";
23833
+ type: "u64";
23834
+ },
23835
+ {
23836
+ name: "maxAssets";
23837
+ type: "u64";
23847
23838
  }
23848
23839
  ];
23840
+ returns: "u64";
23849
23841
  },
23850
23842
  {
23851
- name: "claim";
23852
- discriminator: [62, 198, 214, 193, 213, 159, 108, 210];
23843
+ name: "rebalance";
23844
+ discriminator: [108, 158, 77, 9, 210, 52, 88, 62];
23853
23845
  accounts: [
23854
23846
  {
23855
- name: "user";
23856
- signer: true;
23857
- relations: ["claimAccount"];
23858
- },
23859
- {
23860
- name: "liquidity";
23861
- },
23862
- {
23863
- name: "tokenReserve";
23847
+ name: "signer";
23864
23848
  writable: true;
23849
+ signer: true;
23865
23850
  },
23866
23851
  {
23867
- name: "mint";
23868
- relations: ["tokenReserve", "claimAccount"];
23869
- },
23870
- {
23871
- name: "recipientTokenAccount";
23852
+ name: "depositorTokenAccount";
23872
23853
  writable: true;
23873
23854
  pda: {
23874
23855
  seeds: [
23875
23856
  {
23876
- kind: "arg";
23877
- path: "recipient";
23857
+ kind: "account";
23858
+ path: "signer";
23878
23859
  },
23879
23860
  {
23880
23861
  kind: "account";
@@ -23924,136 +23905,80 @@ type Liquidity = {
23924
23905
  };
23925
23906
  };
23926
23907
  },
23908
+ {
23909
+ name: "lendingAdmin";
23910
+ },
23911
+ {
23912
+ name: "lending";
23913
+ writable: true;
23914
+ },
23915
+ {
23916
+ name: "mint";
23917
+ relations: ["lending", "rewardsRateModel"];
23918
+ },
23919
+ {
23920
+ name: "fTokenMint";
23921
+ writable: true;
23922
+ relations: ["lending"];
23923
+ },
23924
+ {
23925
+ name: "supplyTokenReservesLiquidity";
23926
+ writable: true;
23927
+ },
23928
+ {
23929
+ name: "lendingSupplyPositionOnLiquidity";
23930
+ writable: true;
23931
+ },
23932
+ {
23933
+ name: "rateModel";
23934
+ writable: true;
23935
+ },
23927
23936
  {
23928
23937
  name: "vault";
23929
23938
  writable: true;
23930
- pda: {
23931
- seeds: [
23932
- {
23933
- kind: "account";
23934
- path: "liquidity";
23935
- },
23936
- {
23937
- kind: "account";
23938
- path: "tokenProgram";
23939
- },
23940
- {
23941
- kind: "account";
23942
- path: "mint";
23943
- }
23944
- ];
23945
- program: {
23946
- kind: "const";
23947
- value: [
23948
- 140,
23949
- 151,
23950
- 37,
23951
- 143,
23952
- 78,
23953
- 36,
23954
- 137,
23955
- 241,
23956
- 187,
23957
- 61,
23958
- 16,
23959
- 41,
23960
- 20,
23961
- 142,
23962
- 13,
23963
- 131,
23964
- 11,
23965
- 90,
23966
- 19,
23967
- 153,
23968
- 218,
23969
- 255,
23970
- 16,
23971
- 132,
23972
- 4,
23973
- 142,
23974
- 123,
23975
- 216,
23976
- 219,
23977
- 233,
23978
- 248,
23979
- 89
23980
- ];
23981
- };
23982
- };
23983
- relations: ["tokenReserve"];
23984
23939
  },
23985
23940
  {
23986
- name: "claimAccount";
23941
+ name: "liquidity";
23987
23942
  writable: true;
23988
23943
  },
23989
23944
  {
23990
- name: "tokenProgram";
23945
+ name: "liquidityProgram";
23946
+ relations: ["lendingAdmin"];
23991
23947
  },
23992
23948
  {
23993
- name: "associatedTokenProgram";
23994
- address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
23995
- }
23996
- ];
23997
- args: [
23998
- {
23999
- name: "recipient";
24000
- type: "pubkey";
24001
- }
24002
- ];
24003
- },
24004
- {
24005
- name: "closeClaimAccount";
24006
- discriminator: [241, 146, 203, 216, 58, 222, 91, 118];
24007
- accounts: [
23949
+ name: "rewardsRateModel";
23950
+ },
24008
23951
  {
24009
- name: "user";
24010
- writable: true;
24011
- signer: true;
24012
- relations: ["claimAccount"];
23952
+ name: "tokenProgram";
24013
23953
  },
24014
23954
  {
24015
- name: "claimAccount";
24016
- writable: true;
23955
+ name: "associatedTokenProgram";
23956
+ address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
24017
23957
  },
24018
23958
  {
24019
23959
  name: "systemProgram";
24020
23960
  address: "11111111111111111111111111111111";
24021
23961
  }
24022
23962
  ];
24023
- args: [
24024
- {
24025
- name: "mint";
24026
- type: "pubkey";
24027
- }
24028
- ];
23963
+ args: [];
24029
23964
  },
24030
23965
  {
24031
- name: "collectRevenue";
24032
- discriminator: [87, 96, 211, 36, 240, 43, 246, 87];
23966
+ name: "rebalanceWithAmounts";
23967
+ discriminator: [190, 33, 144, 182, 86, 4, 141, 73];
24033
23968
  accounts: [
24034
23969
  {
24035
- name: "authority";
23970
+ name: "signer";
24036
23971
  writable: true;
24037
23972
  signer: true;
24038
23973
  },
24039
23974
  {
24040
- name: "liquidity";
24041
- },
24042
- {
24043
- name: "authList";
24044
- },
24045
- {
24046
- name: "mint";
24047
- relations: ["tokenReserve"];
24048
- },
24049
- {
24050
- name: "revenueCollectorAccount";
23975
+ name: "depositorTokenAccount";
24051
23976
  writable: true;
24052
23977
  pda: {
24053
23978
  seeds: [
24054
23979
  {
24055
23980
  kind: "account";
24056
- path: "revenueCollector";
23981
+ path: "signer";
24057
23982
  },
24058
23983
  {
24059
23984
  kind: "account";
@@ -24104,112 +24029,54 @@ type Liquidity = {
24104
24029
  };
24105
24030
  },
24106
24031
  {
24107
- name: "revenueCollector";
24032
+ name: "lendingAdmin";
24108
24033
  },
24109
24034
  {
24110
- name: "tokenReserve";
24035
+ name: "lending";
24111
24036
  writable: true;
24112
24037
  },
24113
24038
  {
24114
- name: "vault";
24039
+ name: "mint";
24040
+ relations: ["lending", "rewardsRateModel"];
24041
+ },
24042
+ {
24043
+ name: "fTokenMint";
24115
24044
  writable: true;
24116
- pda: {
24117
- seeds: [
24118
- {
24119
- kind: "account";
24120
- path: "liquidity";
24121
- },
24122
- {
24123
- kind: "account";
24124
- path: "tokenProgram";
24125
- },
24126
- {
24127
- kind: "account";
24128
- path: "mint";
24129
- }
24130
- ];
24131
- program: {
24132
- kind: "const";
24133
- value: [
24134
- 140,
24135
- 151,
24136
- 37,
24137
- 143,
24138
- 78,
24139
- 36,
24140
- 137,
24141
- 241,
24142
- 187,
24143
- 61,
24144
- 16,
24145
- 41,
24146
- 20,
24147
- 142,
24148
- 13,
24149
- 131,
24150
- 11,
24151
- 90,
24152
- 19,
24153
- 153,
24154
- 218,
24155
- 255,
24156
- 16,
24157
- 132,
24158
- 4,
24159
- 142,
24160
- 123,
24161
- 216,
24162
- 219,
24163
- 233,
24164
- 248,
24165
- 89
24166
- ];
24167
- };
24168
- };
24169
- relations: ["tokenReserve"];
24045
+ relations: ["lending"];
24170
24046
  },
24171
24047
  {
24172
- name: "tokenProgram";
24048
+ name: "supplyTokenReservesLiquidity";
24049
+ writable: true;
24173
24050
  },
24174
24051
  {
24175
- name: "associatedTokenProgram";
24176
- address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
24052
+ name: "lendingSupplyPositionOnLiquidity";
24053
+ writable: true;
24177
24054
  },
24178
24055
  {
24179
- name: "systemProgram";
24180
- address: "11111111111111111111111111111111";
24181
- }
24182
- ];
24183
- args: [];
24184
- },
24185
- {
24186
- name: "initClaimAccount";
24187
- discriminator: [112, 141, 47, 170, 42, 99, 144, 145];
24188
- accounts: [
24056
+ name: "rateModel";
24057
+ writable: true;
24058
+ },
24189
24059
  {
24190
- name: "signer";
24060
+ name: "vault";
24191
24061
  writable: true;
24192
- signer: true;
24193
24062
  },
24194
24063
  {
24195
- name: "claimAccount";
24064
+ name: "liquidity";
24196
24065
  writable: true;
24197
- pda: {
24198
- seeds: [
24199
- {
24200
- kind: "const";
24201
- value: [117, 115, 101, 114, 95, 99, 108, 97, 105, 109];
24202
- },
24203
- {
24204
- kind: "arg";
24205
- path: "user";
24206
- },
24207
- {
24208
- kind: "arg";
24209
- path: "mint";
24210
- }
24211
- ];
24212
- };
24066
+ },
24067
+ {
24068
+ name: "liquidityProgram";
24069
+ relations: ["lendingAdmin"];
24070
+ },
24071
+ {
24072
+ name: "rewardsRateModel";
24073
+ },
24074
+ {
24075
+ name: "tokenProgram";
24076
+ },
24077
+ {
24078
+ name: "associatedTokenProgram";
24079
+ address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
24213
24080
  },
24214
24081
  {
24215
24082
  name: "systemProgram";
@@ -24218,18 +24085,16 @@ type Liquidity = {
24218
24085
  ];
24219
24086
  args: [
24220
24087
  {
24221
- name: "mint";
24222
- type: "pubkey";
24223
- },
24224
- {
24225
- name: "user";
24226
- type: "pubkey";
24088
+ name: "amount";
24089
+ type: {
24090
+ option: "u64";
24091
+ };
24227
24092
  }
24228
24093
  ];
24229
24094
  },
24230
24095
  {
24231
- name: "initLiquidity";
24232
- discriminator: [95, 189, 216, 183, 188, 62, 244, 108];
24096
+ name: "redeem";
24097
+ discriminator: [184, 12, 86, 149, 70, 196, 97, 225];
24233
24098
  accounts: [
24234
24099
  {
24235
24100
  name: "signer";
@@ -24237,138 +24102,67 @@ type Liquidity = {
24237
24102
  signer: true;
24238
24103
  },
24239
24104
  {
24240
- name: "liquidity";
24105
+ name: "ownerTokenAccount";
24241
24106
  writable: true;
24242
- pda: {
24243
- seeds: [
24244
- {
24245
- kind: "const";
24246
- value: [108, 105, 113, 117, 105, 100, 105, 116, 121];
24247
- }
24248
- ];
24249
- };
24250
24107
  },
24251
24108
  {
24252
- name: "authList";
24109
+ name: "recipientTokenAccount";
24253
24110
  writable: true;
24254
- pda: {
24255
- seeds: [
24256
- {
24257
- kind: "const";
24258
- value: [97, 117, 116, 104, 95, 108, 105, 115, 116];
24259
- }
24260
- ];
24261
- };
24262
24111
  },
24263
24112
  {
24264
- name: "systemProgram";
24265
- address: "11111111111111111111111111111111";
24266
- }
24267
- ];
24268
- args: [
24269
- {
24270
- name: "authority";
24271
- type: "pubkey";
24113
+ name: "lendingAdmin";
24272
24114
  },
24273
24115
  {
24274
- name: "revenueCollector";
24275
- type: "pubkey";
24276
- }
24277
- ];
24278
- },
24279
- {
24280
- name: "initNewProtocol";
24281
- discriminator: [193, 147, 5, 32, 138, 135, 213, 158];
24282
- accounts: [
24283
- {
24284
- name: "authority";
24116
+ name: "lending";
24285
24117
  writable: true;
24286
- signer: true;
24287
24118
  },
24288
24119
  {
24289
- name: "authList";
24120
+ name: "mint";
24121
+ relations: ["lending", "rewardsRateModel"];
24290
24122
  },
24291
24123
  {
24292
- name: "userSupplyPosition";
24124
+ name: "fTokenMint";
24293
24125
  writable: true;
24294
- pda: {
24295
- seeds: [
24296
- {
24297
- kind: "const";
24298
- value: [
24299
- 117,
24300
- 115,
24301
- 101,
24302
- 114,
24303
- 95,
24304
- 115,
24305
- 117,
24306
- 112,
24307
- 112,
24308
- 108,
24309
- 121,
24310
- 95,
24311
- 112,
24312
- 111,
24313
- 115,
24314
- 105,
24315
- 116,
24316
- 105,
24317
- 111,
24318
- 110
24319
- ];
24320
- },
24321
- {
24322
- kind: "arg";
24323
- path: "supplyMint";
24324
- },
24325
- {
24326
- kind: "arg";
24327
- path: "protocol";
24328
- }
24329
- ];
24330
- };
24126
+ relations: ["lending"];
24331
24127
  },
24332
24128
  {
24333
- name: "userBorrowPosition";
24129
+ name: "supplyTokenReservesLiquidity";
24334
24130
  writable: true;
24335
- pda: {
24336
- seeds: [
24337
- {
24338
- kind: "const";
24339
- value: [
24340
- 117,
24341
- 115,
24342
- 101,
24343
- 114,
24344
- 95,
24345
- 98,
24346
- 111,
24347
- 114,
24348
- 114,
24349
- 111,
24350
- 119,
24351
- 95,
24352
- 112,
24353
- 111,
24354
- 115,
24355
- 105,
24356
- 116,
24357
- 105,
24358
- 111,
24359
- 110
24360
- ];
24361
- },
24362
- {
24363
- kind: "arg";
24364
- path: "borrowMint";
24365
- },
24366
- {
24367
- kind: "arg";
24368
- path: "protocol";
24369
- }
24370
- ];
24371
- };
24131
+ },
24132
+ {
24133
+ name: "lendingSupplyPositionOnLiquidity";
24134
+ writable: true;
24135
+ },
24136
+ {
24137
+ name: "rateModel";
24138
+ },
24139
+ {
24140
+ name: "vault";
24141
+ writable: true;
24142
+ },
24143
+ {
24144
+ name: "claimAccount";
24145
+ writable: true;
24146
+ optional: true;
24147
+ },
24148
+ {
24149
+ name: "liquidity";
24150
+ writable: true;
24151
+ },
24152
+ {
24153
+ name: "liquidityProgram";
24154
+ relations: ["lendingAdmin"];
24155
+ },
24156
+ {
24157
+ name: "rewardsRateModel";
24158
+ },
24159
+ {
24160
+ name: "tokenProgram";
24161
+ },
24162
+ {
24163
+ name: "associatedTokenProgram";
24164
+ optional: true;
24165
+ address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
24372
24166
  },
24373
24167
  {
24374
24168
  name: "systemProgram";
@@ -24377,131 +24171,82 @@ type Liquidity = {
24377
24171
  ];
24378
24172
  args: [
24379
24173
  {
24380
- name: "supplyMint";
24381
- type: "pubkey";
24382
- },
24383
- {
24384
- name: "borrowMint";
24385
- type: "pubkey";
24386
- },
24387
- {
24388
- name: "protocol";
24389
- type: "pubkey";
24174
+ name: "shares";
24175
+ type: "u64";
24390
24176
  }
24391
24177
  ];
24178
+ returns: "u64";
24392
24179
  },
24393
24180
  {
24394
- name: "initTokenReserve";
24395
- discriminator: [228, 235, 65, 129, 159, 15, 6, 84];
24181
+ name: "redeemWithMinAmountOut";
24182
+ discriminator: [235, 189, 237, 56, 166, 180, 184, 149];
24396
24183
  accounts: [
24397
24184
  {
24398
- name: "authority";
24185
+ name: "signer";
24399
24186
  writable: true;
24400
24187
  signer: true;
24401
24188
  },
24402
24189
  {
24403
- name: "liquidity";
24190
+ name: "ownerTokenAccount";
24191
+ writable: true;
24404
24192
  },
24405
24193
  {
24406
- name: "authList";
24194
+ name: "recipientTokenAccount";
24195
+ writable: true;
24196
+ },
24197
+ {
24198
+ name: "lendingAdmin";
24199
+ },
24200
+ {
24201
+ name: "lending";
24202
+ writable: true;
24407
24203
  },
24408
24204
  {
24409
24205
  name: "mint";
24206
+ relations: ["lending", "rewardsRateModel"];
24410
24207
  },
24411
24208
  {
24412
- name: "vault";
24209
+ name: "fTokenMint";
24210
+ writable: true;
24211
+ relations: ["lending"];
24212
+ },
24213
+ {
24214
+ name: "supplyTokenReservesLiquidity";
24215
+ writable: true;
24216
+ },
24217
+ {
24218
+ name: "lendingSupplyPositionOnLiquidity";
24413
24219
  writable: true;
24414
- pda: {
24415
- seeds: [
24416
- {
24417
- kind: "account";
24418
- path: "liquidity";
24419
- },
24420
- {
24421
- kind: "account";
24422
- path: "tokenProgram";
24423
- },
24424
- {
24425
- kind: "account";
24426
- path: "mint";
24427
- }
24428
- ];
24429
- program: {
24430
- kind: "const";
24431
- value: [
24432
- 140,
24433
- 151,
24434
- 37,
24435
- 143,
24436
- 78,
24437
- 36,
24438
- 137,
24439
- 241,
24440
- 187,
24441
- 61,
24442
- 16,
24443
- 41,
24444
- 20,
24445
- 142,
24446
- 13,
24447
- 131,
24448
- 11,
24449
- 90,
24450
- 19,
24451
- 153,
24452
- 218,
24453
- 255,
24454
- 16,
24455
- 132,
24456
- 4,
24457
- 142,
24458
- 123,
24459
- 216,
24460
- 219,
24461
- 233,
24462
- 248,
24463
- 89
24464
- ];
24465
- };
24466
- };
24467
24220
  },
24468
24221
  {
24469
24222
  name: "rateModel";
24223
+ },
24224
+ {
24225
+ name: "vault";
24470
24226
  writable: true;
24471
- pda: {
24472
- seeds: [
24473
- {
24474
- kind: "const";
24475
- value: [114, 97, 116, 101, 95, 109, 111, 100, 101, 108];
24476
- },
24477
- {
24478
- kind: "account";
24479
- path: "mint";
24480
- }
24481
- ];
24482
- };
24483
24227
  },
24484
24228
  {
24485
- name: "tokenReserve";
24229
+ name: "claimAccount";
24486
24230
  writable: true;
24487
- pda: {
24488
- seeds: [
24489
- {
24490
- kind: "const";
24491
- value: [114, 101, 115, 101, 114, 118, 101];
24492
- },
24493
- {
24494
- kind: "account";
24495
- path: "mint";
24496
- }
24497
- ];
24498
- };
24231
+ optional: true;
24232
+ },
24233
+ {
24234
+ name: "liquidity";
24235
+ writable: true;
24236
+ },
24237
+ {
24238
+ name: "liquidityProgram";
24239
+ relations: ["lendingAdmin"];
24240
+ },
24241
+ {
24242
+ name: "rewardsRateModel";
24499
24243
  },
24500
24244
  {
24501
24245
  name: "tokenProgram";
24502
24246
  },
24503
24247
  {
24504
24248
  name: "associatedTokenProgram";
24249
+ optional: true;
24505
24250
  address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
24506
24251
  },
24507
24252
  {
@@ -24509,36 +24254,1023 @@ type Liquidity = {
24509
24254
  address: "11111111111111111111111111111111";
24510
24255
  }
24511
24256
  ];
24512
- args: [];
24257
+ args: [
24258
+ {
24259
+ name: "shares";
24260
+ type: "u64";
24261
+ },
24262
+ {
24263
+ name: "minAmountOut";
24264
+ type: "u64";
24265
+ }
24266
+ ];
24513
24267
  },
24514
24268
  {
24515
- name: "operate";
24516
- discriminator: [217, 106, 208, 99, 116, 151, 42, 135];
24269
+ name: "setRewardsRateModel";
24270
+ discriminator: [174, 231, 116, 203, 8, 58, 143, 203];
24517
24271
  accounts: [
24518
24272
  {
24519
- name: "protocol";
24273
+ name: "signer";
24274
+ signer: true;
24275
+ },
24276
+ {
24277
+ name: "lendingAdmin";
24278
+ },
24279
+ {
24280
+ name: "lending";
24281
+ writable: true;
24282
+ },
24283
+ {
24284
+ name: "fTokenMint";
24285
+ relations: ["lending"];
24286
+ },
24287
+ {
24288
+ name: "newRewardsRateModel";
24289
+ },
24290
+ {
24291
+ name: "supplyTokenReservesLiquidity";
24292
+ }
24293
+ ];
24294
+ args: [
24295
+ {
24296
+ name: "mint";
24297
+ type: "pubkey";
24298
+ }
24299
+ ];
24300
+ },
24301
+ {
24302
+ name: "updateAuthority";
24303
+ discriminator: [32, 46, 64, 28, 149, 75, 243, 88];
24304
+ accounts: [
24305
+ {
24306
+ name: "signer";
24307
+ signer: true;
24308
+ },
24309
+ {
24310
+ name: "lendingAdmin";
24311
+ writable: true;
24312
+ }
24313
+ ];
24314
+ args: [
24315
+ {
24316
+ name: "newAuthority";
24317
+ type: "pubkey";
24318
+ }
24319
+ ];
24320
+ },
24321
+ {
24322
+ name: "updateAuths";
24323
+ discriminator: [93, 96, 178, 156, 57, 117, 253, 209];
24324
+ accounts: [
24325
+ {
24326
+ name: "signer";
24327
+ signer: true;
24328
+ },
24329
+ {
24330
+ name: "lendingAdmin";
24331
+ writable: true;
24332
+ }
24333
+ ];
24334
+ args: [
24335
+ {
24336
+ name: "authStatus";
24337
+ type: {
24338
+ vec: {
24339
+ defined: {
24340
+ name: "addressBool";
24341
+ };
24342
+ };
24343
+ };
24344
+ }
24345
+ ];
24346
+ },
24347
+ {
24348
+ name: "updateRate";
24349
+ discriminator: [24, 225, 53, 189, 72, 212, 225, 178];
24350
+ accounts: [
24351
+ {
24352
+ name: "lending";
24353
+ writable: true;
24354
+ },
24355
+ {
24356
+ name: "mint";
24357
+ relations: ["lending", "supplyTokenReservesLiquidity"];
24358
+ },
24359
+ {
24360
+ name: "fTokenMint";
24361
+ relations: ["lending"];
24362
+ },
24363
+ {
24364
+ name: "supplyTokenReservesLiquidity";
24365
+ },
24366
+ {
24367
+ name: "rewardsRateModel";
24368
+ }
24369
+ ];
24370
+ args: [];
24371
+ },
24372
+ {
24373
+ name: "updateRebalancer";
24374
+ discriminator: [206, 187, 54, 228, 145, 8, 203, 111];
24375
+ accounts: [
24376
+ {
24377
+ name: "signer";
24378
+ signer: true;
24379
+ },
24380
+ {
24381
+ name: "lendingAdmin";
24382
+ writable: true;
24383
+ }
24384
+ ];
24385
+ args: [
24386
+ {
24387
+ name: "newRebalancer";
24388
+ type: "pubkey";
24389
+ }
24390
+ ];
24391
+ },
24392
+ {
24393
+ name: "withdraw";
24394
+ discriminator: [183, 18, 70, 156, 148, 109, 161, 34];
24395
+ accounts: [
24396
+ {
24397
+ name: "signer";
24398
+ writable: true;
24399
+ signer: true;
24400
+ },
24401
+ {
24402
+ name: "ownerTokenAccount";
24403
+ writable: true;
24404
+ },
24405
+ {
24406
+ name: "recipientTokenAccount";
24407
+ writable: true;
24408
+ },
24409
+ {
24410
+ name: "lendingAdmin";
24411
+ },
24412
+ {
24413
+ name: "lending";
24414
+ writable: true;
24415
+ },
24416
+ {
24417
+ name: "mint";
24418
+ relations: ["lending", "rewardsRateModel"];
24419
+ },
24420
+ {
24421
+ name: "fTokenMint";
24422
+ writable: true;
24423
+ relations: ["lending"];
24424
+ },
24425
+ {
24426
+ name: "supplyTokenReservesLiquidity";
24427
+ writable: true;
24428
+ },
24429
+ {
24430
+ name: "lendingSupplyPositionOnLiquidity";
24431
+ writable: true;
24432
+ },
24433
+ {
24434
+ name: "rateModel";
24435
+ },
24436
+ {
24437
+ name: "vault";
24438
+ writable: true;
24439
+ },
24440
+ {
24441
+ name: "claimAccount";
24442
+ writable: true;
24443
+ optional: true;
24444
+ },
24445
+ {
24446
+ name: "liquidity";
24447
+ writable: true;
24448
+ },
24449
+ {
24450
+ name: "liquidityProgram";
24451
+ relations: ["lendingAdmin"];
24452
+ },
24453
+ {
24454
+ name: "rewardsRateModel";
24455
+ },
24456
+ {
24457
+ name: "tokenProgram";
24458
+ },
24459
+ {
24460
+ name: "associatedTokenProgram";
24461
+ optional: true;
24462
+ address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
24463
+ },
24464
+ {
24465
+ name: "systemProgram";
24466
+ address: "11111111111111111111111111111111";
24467
+ }
24468
+ ];
24469
+ args: [
24470
+ {
24471
+ name: "amount";
24472
+ type: "u64";
24473
+ }
24474
+ ];
24475
+ returns: "u64";
24476
+ },
24477
+ {
24478
+ name: "withdrawWithMaxSharesBurn";
24479
+ discriminator: [47, 197, 183, 171, 239, 18, 245, 171];
24480
+ accounts: [
24481
+ {
24482
+ name: "signer";
24483
+ writable: true;
24484
+ signer: true;
24485
+ },
24486
+ {
24487
+ name: "ownerTokenAccount";
24488
+ writable: true;
24489
+ },
24490
+ {
24491
+ name: "recipientTokenAccount";
24492
+ writable: true;
24493
+ },
24494
+ {
24495
+ name: "lendingAdmin";
24496
+ },
24497
+ {
24498
+ name: "lending";
24499
+ writable: true;
24500
+ },
24501
+ {
24502
+ name: "mint";
24503
+ relations: ["lending", "rewardsRateModel"];
24504
+ },
24505
+ {
24506
+ name: "fTokenMint";
24507
+ writable: true;
24508
+ relations: ["lending"];
24509
+ },
24510
+ {
24511
+ name: "supplyTokenReservesLiquidity";
24512
+ writable: true;
24513
+ },
24514
+ {
24515
+ name: "lendingSupplyPositionOnLiquidity";
24516
+ writable: true;
24517
+ },
24518
+ {
24519
+ name: "rateModel";
24520
+ },
24521
+ {
24522
+ name: "vault";
24523
+ writable: true;
24524
+ },
24525
+ {
24526
+ name: "claimAccount";
24527
+ writable: true;
24528
+ optional: true;
24529
+ },
24530
+ {
24531
+ name: "liquidity";
24532
+ writable: true;
24533
+ },
24534
+ {
24535
+ name: "liquidityProgram";
24536
+ relations: ["lendingAdmin"];
24537
+ },
24538
+ {
24539
+ name: "rewardsRateModel";
24540
+ },
24541
+ {
24542
+ name: "tokenProgram";
24543
+ },
24544
+ {
24545
+ name: "associatedTokenProgram";
24546
+ optional: true;
24547
+ address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
24548
+ },
24549
+ {
24550
+ name: "systemProgram";
24551
+ address: "11111111111111111111111111111111";
24552
+ }
24553
+ ];
24554
+ args: [
24555
+ {
24556
+ name: "amount";
24557
+ type: "u64";
24558
+ },
24559
+ {
24560
+ name: "maxSharesBurn";
24561
+ type: "u64";
24562
+ }
24563
+ ];
24564
+ returns: "u64";
24565
+ }
24566
+ ];
24567
+ accounts: [
24568
+ {
24569
+ name: "lending";
24570
+ discriminator: [135, 199, 82, 16, 249, 131, 182, 241];
24571
+ },
24572
+ {
24573
+ name: "lendingAdmin";
24574
+ discriminator: [42, 8, 33, 220, 163, 40, 210, 5];
24575
+ },
24576
+ {
24577
+ name: "lendingRewardsRateModel";
24578
+ discriminator: [166, 72, 71, 131, 172, 74, 166, 181];
24579
+ },
24580
+ {
24581
+ name: "tokenReserve";
24582
+ discriminator: [21, 18, 59, 135, 120, 20, 31, 12];
24583
+ },
24584
+ {
24585
+ name: "userSupplyPosition";
24586
+ discriminator: [202, 219, 136, 118, 61, 177, 21, 146];
24587
+ }
24588
+ ];
24589
+ events: [
24590
+ {
24591
+ name: "logDeposit";
24592
+ discriminator: [176, 243, 1, 56, 142, 206, 1, 106];
24593
+ },
24594
+ {
24595
+ name: "logRebalance";
24596
+ discriminator: [90, 67, 219, 41, 181, 118, 132, 9];
24597
+ },
24598
+ {
24599
+ name: "logUpdateAuthority";
24600
+ discriminator: [150, 152, 157, 143, 6, 135, 193, 101];
24601
+ },
24602
+ {
24603
+ name: "logUpdateAuths";
24604
+ discriminator: [88, 80, 109, 48, 111, 203, 76, 251];
24605
+ },
24606
+ {
24607
+ name: "logUpdateRates";
24608
+ discriminator: [222, 11, 113, 60, 147, 15, 68, 217];
24609
+ },
24610
+ {
24611
+ name: "logUpdateRebalancer";
24612
+ discriminator: [66, 79, 144, 204, 26, 217, 153, 225];
24613
+ },
24614
+ {
24615
+ name: "logUpdateRewards";
24616
+ discriminator: [37, 13, 111, 186, 47, 245, 162, 121];
24617
+ },
24618
+ {
24619
+ name: "logWithdraw";
24620
+ discriminator: [49, 9, 176, 179, 222, 190, 6, 117];
24621
+ }
24622
+ ];
24623
+ errors: [
24624
+ {
24625
+ code: 6000;
24626
+ name: "fTokenDepositInsignificant";
24627
+ msg: "fTokenDepositInsignificant";
24628
+ },
24629
+ {
24630
+ code: 6001;
24631
+ name: "fTokenMinAmountOut";
24632
+ msg: "fTokenMinAmountOut";
24633
+ },
24634
+ {
24635
+ code: 6002;
24636
+ name: "fTokenMaxAmount";
24637
+ msg: "fTokenMaxAmount";
24638
+ },
24639
+ {
24640
+ code: 6003;
24641
+ name: "fTokenInvalidParams";
24642
+ msg: "fTokenInvalidParams";
24643
+ },
24644
+ {
24645
+ code: 6004;
24646
+ name: "fTokenRewardsRateModelAlreadySet";
24647
+ msg: "fTokenRewardsRateModelAlreadySet";
24648
+ },
24649
+ {
24650
+ code: 6005;
24651
+ name: "fTokenMaxAuthCountReached";
24652
+ msg: "fTokenMaxAuthCount";
24653
+ },
24654
+ {
24655
+ code: 6006;
24656
+ name: "fTokenLiquidityExchangePriceUnexpected";
24657
+ msg: "fTokenLiquidityExchangePriceUnexpected";
24658
+ },
24659
+ {
24660
+ code: 6007;
24661
+ name: "fTokenCpiToLiquidityFailed";
24662
+ msg: "fTokenCpiToLiquidityFailed";
24663
+ },
24664
+ {
24665
+ code: 6008;
24666
+ name: "fTokenOnlyAuth";
24667
+ msg: "fTokenOnlyAuth";
24668
+ },
24669
+ {
24670
+ code: 6009;
24671
+ name: "fTokenOnlyAuthority";
24672
+ msg: "fTokenOnlyAuthority";
24673
+ },
24674
+ {
24675
+ code: 6010;
24676
+ name: "fTokenOnlyRebalancer";
24677
+ msg: "fTokenOnlyRebalancer";
24678
+ },
24679
+ {
24680
+ code: 6011;
24681
+ name: "fTokenUserSupplyPositionRequired";
24682
+ msg: "fTokenUserSupplyPositionRequired";
24683
+ },
24684
+ {
24685
+ code: 6012;
24686
+ name: "fTokenLiquidityProgramMismatch";
24687
+ msg: "fTokenLiquidityProgramMismatch";
24688
+ }
24689
+ ];
24690
+ types: [
24691
+ {
24692
+ name: "addressBool";
24693
+ type: {
24694
+ kind: "struct";
24695
+ fields: [
24696
+ {
24697
+ name: "addr";
24698
+ type: "pubkey";
24699
+ },
24700
+ {
24701
+ name: "value";
24702
+ type: "bool";
24703
+ }
24704
+ ];
24705
+ };
24706
+ },
24707
+ {
24708
+ name: "lending";
24709
+ type: {
24710
+ kind: "struct";
24711
+ fields: [
24712
+ {
24713
+ name: "mint";
24714
+ type: "pubkey";
24715
+ },
24716
+ {
24717
+ name: "fTokenMint";
24718
+ type: "pubkey";
24719
+ },
24720
+ {
24721
+ name: "lendingId";
24722
+ type: "u16";
24723
+ },
24724
+ {
24725
+ name: "decimals";
24726
+ docs: ["@dev number of decimals for the fToken, same as ASSET"];
24727
+ type: "u8";
24728
+ },
24729
+ {
24730
+ name: "rewardsRateModel";
24731
+ docs: [
24732
+ "@dev To read PDA of rewards rate model to get_rate instruction"
24733
+ ];
24734
+ type: "pubkey";
24735
+ },
24736
+ {
24737
+ name: "liquidityExchangePrice";
24738
+ docs: [
24739
+ "@dev exchange price for the underlying asset in the liquidity protocol (without rewards)"
24740
+ ];
24741
+ type: "u64";
24742
+ },
24743
+ {
24744
+ name: "tokenExchangePrice";
24745
+ docs: [
24746
+ "@dev exchange price between fToken and the underlying asset (with rewards)"
24747
+ ];
24748
+ type: "u64";
24749
+ },
24750
+ {
24751
+ name: "lastUpdateTimestamp";
24752
+ docs: [
24753
+ "@dev timestamp when exchange prices were updated the last time"
24754
+ ];
24755
+ type: "u64";
24756
+ },
24757
+ {
24758
+ name: "tokenReservesLiquidity";
24759
+ type: "pubkey";
24760
+ },
24761
+ {
24762
+ name: "supplyPositionOnLiquidity";
24763
+ type: "pubkey";
24764
+ },
24765
+ {
24766
+ name: "bump";
24767
+ type: "u8";
24768
+ }
24769
+ ];
24770
+ };
24771
+ },
24772
+ {
24773
+ name: "lendingAdmin";
24774
+ type: {
24775
+ kind: "struct";
24776
+ fields: [
24777
+ {
24778
+ name: "authority";
24779
+ type: "pubkey";
24780
+ },
24781
+ {
24782
+ name: "liquidityProgram";
24783
+ type: "pubkey";
24784
+ },
24785
+ {
24786
+ name: "rebalancer";
24787
+ type: "pubkey";
24788
+ },
24789
+ {
24790
+ name: "nextLendingId";
24791
+ type: "u16";
24792
+ },
24793
+ {
24794
+ name: "auths";
24795
+ type: {
24796
+ vec: "pubkey";
24797
+ };
24798
+ },
24799
+ {
24800
+ name: "bump";
24801
+ type: "u8";
24802
+ }
24803
+ ];
24804
+ };
24805
+ },
24806
+ {
24807
+ name: "lendingRewardsRateModel";
24808
+ type: {
24809
+ kind: "struct";
24810
+ fields: [
24811
+ {
24812
+ name: "mint";
24813
+ docs: ["@dev mint address"];
24814
+ type: "pubkey";
24815
+ },
24816
+ {
24817
+ name: "startTvl";
24818
+ docs: [
24819
+ "@dev tvl below which rewards rate is 0. If current TVL is below this value, triggering `update_rate()` on the fToken",
24820
+ "might bring the total TVL above this cut-off."
24821
+ ];
24822
+ type: "u64";
24823
+ },
24824
+ {
24825
+ name: "duration";
24826
+ docs: ["@dev for how long current rewards should run"];
24827
+ type: "u64";
24828
+ },
24829
+ {
24830
+ name: "startTime";
24831
+ docs: ["@dev when current rewards got started"];
24832
+ type: "u64";
24833
+ },
24834
+ {
24835
+ name: "yearlyReward";
24836
+ docs: [
24837
+ "@dev current annualized reward based on input params (duration, rewardAmount)"
24838
+ ];
24839
+ type: "u64";
24840
+ },
24841
+ {
24842
+ name: "nextDuration";
24843
+ docs: ["@dev Duration for the next rewards phase"];
24844
+ type: "u64";
24845
+ },
24846
+ {
24847
+ name: "nextRewardAmount";
24848
+ docs: ["@dev Amount of rewards for the next phase"];
24849
+ type: "u64";
24850
+ },
24851
+ {
24852
+ name: "bump";
24853
+ type: "u8";
24854
+ }
24855
+ ];
24856
+ };
24857
+ },
24858
+ {
24859
+ name: "logDeposit";
24860
+ type: {
24861
+ kind: "struct";
24862
+ fields: [
24863
+ {
24864
+ name: "sender";
24865
+ type: "pubkey";
24866
+ },
24867
+ {
24868
+ name: "receiver";
24869
+ type: "pubkey";
24870
+ },
24871
+ {
24872
+ name: "assets";
24873
+ type: "u64";
24874
+ },
24875
+ {
24876
+ name: "sharesMinted";
24877
+ type: "u64";
24878
+ }
24879
+ ];
24880
+ };
24881
+ },
24882
+ {
24883
+ name: "logRebalance";
24884
+ type: {
24885
+ kind: "struct";
24886
+ fields: [
24887
+ {
24888
+ name: "assets";
24889
+ type: "u64";
24890
+ }
24891
+ ];
24892
+ };
24893
+ },
24894
+ {
24895
+ name: "logUpdateAuthority";
24896
+ type: {
24897
+ kind: "struct";
24898
+ fields: [
24899
+ {
24900
+ name: "newAuthority";
24901
+ type: "pubkey";
24902
+ }
24903
+ ];
24904
+ };
24905
+ },
24906
+ {
24907
+ name: "logUpdateAuths";
24908
+ type: {
24909
+ kind: "struct";
24910
+ fields: [
24911
+ {
24912
+ name: "authStatus";
24913
+ type: {
24914
+ vec: {
24915
+ defined: {
24916
+ name: "addressBool";
24917
+ };
24918
+ };
24919
+ };
24920
+ }
24921
+ ];
24922
+ };
24923
+ },
24924
+ {
24925
+ name: "logUpdateRates";
24926
+ type: {
24927
+ kind: "struct";
24928
+ fields: [
24929
+ {
24930
+ name: "tokenExchangePrice";
24931
+ type: "u64";
24932
+ },
24933
+ {
24934
+ name: "liquidityExchangePrice";
24935
+ type: "u64";
24936
+ }
24937
+ ];
24938
+ };
24939
+ },
24940
+ {
24941
+ name: "logUpdateRebalancer";
24942
+ type: {
24943
+ kind: "struct";
24944
+ fields: [
24945
+ {
24946
+ name: "newRebalancer";
24947
+ type: "pubkey";
24948
+ }
24949
+ ];
24950
+ };
24951
+ },
24952
+ {
24953
+ name: "logUpdateRewards";
24954
+ type: {
24955
+ kind: "struct";
24956
+ fields: [
24957
+ {
24958
+ name: "rewardsRateModel";
24959
+ type: "pubkey";
24960
+ }
24961
+ ];
24962
+ };
24963
+ },
24964
+ {
24965
+ name: "logWithdraw";
24966
+ type: {
24967
+ kind: "struct";
24968
+ fields: [
24969
+ {
24970
+ name: "sender";
24971
+ type: "pubkey";
24972
+ },
24973
+ {
24974
+ name: "receiver";
24975
+ type: "pubkey";
24976
+ },
24977
+ {
24978
+ name: "owner";
24979
+ type: "pubkey";
24980
+ },
24981
+ {
24982
+ name: "assets";
24983
+ type: "u64";
24984
+ },
24985
+ {
24986
+ name: "sharesBurned";
24987
+ type: "u64";
24988
+ }
24989
+ ];
24990
+ };
24991
+ },
24992
+ {
24993
+ name: "tokenReserve";
24994
+ docs: ["Token configuration and exchange prices"];
24995
+ serialization: "bytemuck";
24996
+ repr: {
24997
+ kind: "c";
24998
+ packed: true;
24999
+ };
25000
+ type: {
25001
+ kind: "struct";
25002
+ fields: [
25003
+ {
25004
+ name: "mint";
25005
+ type: "pubkey";
25006
+ },
25007
+ {
25008
+ name: "vault";
25009
+ type: "pubkey";
25010
+ },
25011
+ {
25012
+ name: "borrowRate";
25013
+ type: "u16";
25014
+ },
25015
+ {
25016
+ name: "feeOnInterest";
25017
+ type: "u16";
25018
+ },
25019
+ {
25020
+ name: "lastUtilization";
25021
+ type: "u16";
25022
+ },
25023
+ {
25024
+ name: "lastUpdateTimestamp";
25025
+ type: "u64";
25026
+ },
25027
+ {
25028
+ name: "supplyExchangePrice";
25029
+ type: "u64";
25030
+ },
25031
+ {
25032
+ name: "borrowExchangePrice";
25033
+ type: "u64";
25034
+ },
25035
+ {
25036
+ name: "maxUtilization";
25037
+ type: "u16";
25038
+ },
25039
+ {
25040
+ name: "totalSupplyWithInterest";
25041
+ type: "u64";
25042
+ },
25043
+ {
25044
+ name: "totalSupplyInterestFree";
25045
+ type: "u64";
25046
+ },
25047
+ {
25048
+ name: "totalBorrowWithInterest";
25049
+ type: "u64";
25050
+ },
25051
+ {
25052
+ name: "totalBorrowInterestFree";
25053
+ type: "u64";
25054
+ },
25055
+ {
25056
+ name: "totalClaimAmount";
25057
+ type: "u64";
25058
+ },
25059
+ {
25060
+ name: "interactingProtocol";
25061
+ type: "pubkey";
25062
+ },
25063
+ {
25064
+ name: "interactingTimestamp";
25065
+ type: "u64";
25066
+ },
25067
+ {
25068
+ name: "interactingBalance";
25069
+ type: "u64";
25070
+ }
25071
+ ];
25072
+ };
25073
+ },
25074
+ {
25075
+ name: "userSupplyPosition";
25076
+ docs: ["User supply position"];
25077
+ serialization: "bytemuck";
25078
+ repr: {
25079
+ kind: "c";
25080
+ packed: true;
25081
+ };
25082
+ type: {
25083
+ kind: "struct";
25084
+ fields: [
25085
+ {
25086
+ name: "protocol";
25087
+ type: "pubkey";
25088
+ },
25089
+ {
25090
+ name: "mint";
25091
+ type: "pubkey";
25092
+ },
25093
+ {
25094
+ name: "withInterest";
25095
+ type: "u8";
25096
+ },
25097
+ {
25098
+ name: "amount";
25099
+ type: "u64";
25100
+ },
25101
+ {
25102
+ name: "withdrawalLimit";
25103
+ type: "u64";
25104
+ },
25105
+ {
25106
+ name: "decayAmount";
25107
+ type: "u64";
25108
+ },
25109
+ {
25110
+ name: "lastUpdate";
25111
+ type: "u64";
25112
+ },
25113
+ {
25114
+ name: "expandPct";
25115
+ type: "u16";
25116
+ },
25117
+ {
25118
+ name: "expandDuration";
25119
+ type: "u32";
25120
+ },
25121
+ {
25122
+ name: "decayDuration";
25123
+ type: "u32";
25124
+ },
25125
+ {
25126
+ name: "baseWithdrawalLimit";
25127
+ type: "u64";
25128
+ },
25129
+ {
25130
+ name: "status";
25131
+ type: "u8";
25132
+ }
25133
+ ];
25134
+ };
25135
+ }
25136
+ ];
25137
+ };
25138
+
25139
+ /**
25140
+ * Program IDL in camelCase format in order to be used in JS/TS.
25141
+ *
25142
+ * Note that this is only a type helper and is not the actual IDL. The original
25143
+ * IDL was extracted from https://github.com/jup-ag/jupiter-lend (target/idl/liquidity.json).
25144
+ */
25145
+ type Liquidity = {
25146
+ address: "jupeiUmn818Jg1ekPURTpr4mFo29p46vygyykFJ3wZC";
25147
+ metadata: {
25148
+ name: "liquidity";
25149
+ version: "0.1.5";
25150
+ spec: "0.1.0";
25151
+ description: "Created with Anchor";
25152
+ };
25153
+ instructions: [
25154
+ {
25155
+ name: "changeStatus";
25156
+ discriminator: [236, 145, 131, 228, 227, 17, 192, 255];
25157
+ accounts: [
25158
+ {
25159
+ name: "authority";
25160
+ signer: true;
25161
+ },
25162
+ {
25163
+ name: "liquidity";
25164
+ writable: true;
25165
+ },
25166
+ {
25167
+ name: "authList";
25168
+ }
25169
+ ];
25170
+ args: [
25171
+ {
25172
+ name: "status";
25173
+ type: "bool";
25174
+ }
25175
+ ];
25176
+ },
25177
+ {
25178
+ name: "claim";
25179
+ discriminator: [62, 198, 214, 193, 213, 159, 108, 210];
25180
+ accounts: [
25181
+ {
25182
+ name: "user";
25183
+ signer: true;
25184
+ relations: ["claimAccount"];
25185
+ },
25186
+ {
25187
+ name: "liquidity";
25188
+ },
25189
+ {
25190
+ name: "tokenReserve";
25191
+ writable: true;
25192
+ },
25193
+ {
25194
+ name: "mint";
25195
+ relations: ["tokenReserve", "claimAccount"];
25196
+ },
25197
+ {
25198
+ name: "recipientTokenAccount";
25199
+ writable: true;
25200
+ },
25201
+ {
25202
+ name: "vault";
25203
+ writable: true;
25204
+ relations: ["tokenReserve"];
25205
+ },
25206
+ {
25207
+ name: "claimAccount";
25208
+ writable: true;
25209
+ },
25210
+ {
25211
+ name: "tokenProgram";
25212
+ }
25213
+ ];
25214
+ args: [
25215
+ {
25216
+ name: "recipient";
25217
+ type: "pubkey";
25218
+ }
25219
+ ];
25220
+ },
25221
+ {
25222
+ name: "closeClaimAccount";
25223
+ discriminator: [241, 146, 203, 216, 58, 222, 91, 118];
25224
+ accounts: [
25225
+ {
25226
+ name: "user";
25227
+ writable: true;
25228
+ signer: true;
25229
+ relations: ["claimAccount"];
25230
+ },
25231
+ {
25232
+ name: "claimAccount";
25233
+ writable: true;
25234
+ },
25235
+ {
25236
+ name: "systemProgram";
25237
+ address: "11111111111111111111111111111111";
25238
+ }
25239
+ ];
25240
+ args: [
25241
+ {
25242
+ name: "mint";
25243
+ type: "pubkey";
25244
+ }
25245
+ ];
25246
+ },
25247
+ {
25248
+ name: "collectRevenue";
25249
+ discriminator: [87, 96, 211, 36, 240, 43, 246, 87];
25250
+ accounts: [
25251
+ {
25252
+ name: "authority";
25253
+ writable: true;
24520
25254
  signer: true;
24521
- relations: ["userSupplyPosition", "userBorrowPosition"];
24522
25255
  },
24523
25256
  {
24524
25257
  name: "liquidity";
24525
25258
  },
24526
25259
  {
24527
- name: "tokenReserve";
24528
- writable: true;
25260
+ name: "authList";
24529
25261
  },
24530
25262
  {
24531
25263
  name: "mint";
24532
- relations: ["tokenReserve", "rateModel", "borrowClaimAccount", "withdrawClaimAccount"];
25264
+ relations: ["tokenReserve"];
24533
25265
  },
24534
25266
  {
24535
- name: "vault";
25267
+ name: "revenueCollectorAccount";
24536
25268
  writable: true;
24537
25269
  pda: {
24538
25270
  seeds: [
24539
25271
  {
24540
25272
  kind: "account";
24541
- path: "liquidity";
25273
+ path: "revenueCollector";
24542
25274
  },
24543
25275
  {
24544
25276
  kind: "account";
@@ -24587,30 +25319,22 @@ type Liquidity = {
24587
25319
  ];
24588
25320
  };
24589
25321
  };
24590
- relations: ["tokenReserve"];
24591
25322
  },
24592
25323
  {
24593
- name: "userSupplyPosition";
24594
- writable: true;
24595
- optional: true;
25324
+ name: "revenueCollector";
24596
25325
  },
24597
25326
  {
24598
- name: "userBorrowPosition";
25327
+ name: "tokenReserve";
24599
25328
  writable: true;
24600
- optional: true;
24601
- },
24602
- {
24603
- name: "rateModel";
24604
25329
  },
24605
25330
  {
24606
- name: "withdrawToAccount";
25331
+ name: "vault";
24607
25332
  writable: true;
24608
- optional: true;
24609
25333
  pda: {
24610
25334
  seeds: [
24611
25335
  {
24612
- kind: "arg";
24613
- path: "withdrawTo";
25336
+ kind: "account";
25337
+ path: "liquidity";
24614
25338
  },
24615
25339
  {
24616
25340
  kind: "account";
@@ -24659,16 +25383,256 @@ type Liquidity = {
24659
25383
  ];
24660
25384
  };
24661
25385
  };
25386
+ relations: ["tokenReserve"];
25387
+ },
25388
+ {
25389
+ name: "tokenProgram";
25390
+ },
25391
+ {
25392
+ name: "associatedTokenProgram";
25393
+ address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
25394
+ },
25395
+ {
25396
+ name: "systemProgram";
25397
+ address: "11111111111111111111111111111111";
25398
+ }
25399
+ ];
25400
+ args: [];
25401
+ },
25402
+ {
25403
+ name: "initClaimAccount";
25404
+ discriminator: [112, 141, 47, 170, 42, 99, 144, 145];
25405
+ accounts: [
25406
+ {
25407
+ name: "signer";
25408
+ writable: true;
25409
+ signer: true;
25410
+ },
25411
+ {
25412
+ name: "claimAccount";
25413
+ writable: true;
25414
+ pda: {
25415
+ seeds: [
25416
+ {
25417
+ kind: "const";
25418
+ value: [117, 115, 101, 114, 95, 99, 108, 97, 105, 109];
25419
+ },
25420
+ {
25421
+ kind: "arg";
25422
+ path: "user";
25423
+ },
25424
+ {
25425
+ kind: "arg";
25426
+ path: "mint";
25427
+ }
25428
+ ];
25429
+ };
25430
+ },
25431
+ {
25432
+ name: "systemProgram";
25433
+ address: "11111111111111111111111111111111";
25434
+ }
25435
+ ];
25436
+ args: [
25437
+ {
25438
+ name: "mint";
25439
+ type: "pubkey";
25440
+ },
25441
+ {
25442
+ name: "user";
25443
+ type: "pubkey";
25444
+ }
25445
+ ];
25446
+ },
25447
+ {
25448
+ name: "initLiquidity";
25449
+ discriminator: [95, 189, 216, 183, 188, 62, 244, 108];
25450
+ accounts: [
25451
+ {
25452
+ name: "signer";
25453
+ writable: true;
25454
+ signer: true;
25455
+ },
25456
+ {
25457
+ name: "liquidity";
25458
+ writable: true;
25459
+ pda: {
25460
+ seeds: [
25461
+ {
25462
+ kind: "const";
25463
+ value: [108, 105, 113, 117, 105, 100, 105, 116, 121];
25464
+ }
25465
+ ];
25466
+ };
25467
+ },
25468
+ {
25469
+ name: "authList";
25470
+ writable: true;
25471
+ pda: {
25472
+ seeds: [
25473
+ {
25474
+ kind: "const";
25475
+ value: [97, 117, 116, 104, 95, 108, 105, 115, 116];
25476
+ }
25477
+ ];
25478
+ };
25479
+ },
25480
+ {
25481
+ name: "systemProgram";
25482
+ address: "11111111111111111111111111111111";
25483
+ }
25484
+ ];
25485
+ args: [
25486
+ {
25487
+ name: "authority";
25488
+ type: "pubkey";
25489
+ },
25490
+ {
25491
+ name: "revenueCollector";
25492
+ type: "pubkey";
25493
+ }
25494
+ ];
25495
+ },
25496
+ {
25497
+ name: "initNewProtocol";
25498
+ discriminator: [193, 147, 5, 32, 138, 135, 213, 158];
25499
+ accounts: [
25500
+ {
25501
+ name: "authority";
25502
+ writable: true;
25503
+ signer: true;
25504
+ },
25505
+ {
25506
+ name: "authList";
25507
+ },
25508
+ {
25509
+ name: "userSupplyPosition";
25510
+ writable: true;
25511
+ pda: {
25512
+ seeds: [
25513
+ {
25514
+ kind: "const";
25515
+ value: [
25516
+ 117,
25517
+ 115,
25518
+ 101,
25519
+ 114,
25520
+ 95,
25521
+ 115,
25522
+ 117,
25523
+ 112,
25524
+ 112,
25525
+ 108,
25526
+ 121,
25527
+ 95,
25528
+ 112,
25529
+ 111,
25530
+ 115,
25531
+ 105,
25532
+ 116,
25533
+ 105,
25534
+ 111,
25535
+ 110
25536
+ ];
25537
+ },
25538
+ {
25539
+ kind: "arg";
25540
+ path: "supplyMint";
25541
+ },
25542
+ {
25543
+ kind: "arg";
25544
+ path: "protocol";
25545
+ }
25546
+ ];
25547
+ };
25548
+ },
25549
+ {
25550
+ name: "userBorrowPosition";
25551
+ writable: true;
25552
+ pda: {
25553
+ seeds: [
25554
+ {
25555
+ kind: "const";
25556
+ value: [
25557
+ 117,
25558
+ 115,
25559
+ 101,
25560
+ 114,
25561
+ 95,
25562
+ 98,
25563
+ 111,
25564
+ 114,
25565
+ 114,
25566
+ 111,
25567
+ 119,
25568
+ 95,
25569
+ 112,
25570
+ 111,
25571
+ 115,
25572
+ 105,
25573
+ 116,
25574
+ 105,
25575
+ 111,
25576
+ 110
25577
+ ];
25578
+ },
25579
+ {
25580
+ kind: "arg";
25581
+ path: "borrowMint";
25582
+ },
25583
+ {
25584
+ kind: "arg";
25585
+ path: "protocol";
25586
+ }
25587
+ ];
25588
+ };
25589
+ },
25590
+ {
25591
+ name: "systemProgram";
25592
+ address: "11111111111111111111111111111111";
25593
+ }
25594
+ ];
25595
+ args: [
25596
+ {
25597
+ name: "supplyMint";
25598
+ type: "pubkey";
25599
+ },
25600
+ {
25601
+ name: "borrowMint";
25602
+ type: "pubkey";
25603
+ },
25604
+ {
25605
+ name: "protocol";
25606
+ type: "pubkey";
25607
+ }
25608
+ ];
25609
+ },
25610
+ {
25611
+ name: "initTokenReserve";
25612
+ discriminator: [228, 235, 65, 129, 159, 15, 6, 84];
25613
+ accounts: [
25614
+ {
25615
+ name: "authority";
25616
+ writable: true;
25617
+ signer: true;
24662
25618
  },
24663
25619
  {
24664
- name: "borrowToAccount";
25620
+ name: "liquidity";
25621
+ },
25622
+ {
25623
+ name: "authList";
25624
+ },
25625
+ {
25626
+ name: "mint";
25627
+ },
25628
+ {
25629
+ name: "vault";
24665
25630
  writable: true;
24666
- optional: true;
24667
25631
  pda: {
24668
25632
  seeds: [
24669
25633
  {
24670
- kind: "arg";
24671
- path: "borrowTo";
25634
+ kind: "account";
25635
+ path: "liquidity";
24672
25636
  },
24673
25637
  {
24674
25638
  kind: "account";
@@ -24719,14 +25683,36 @@ type Liquidity = {
24719
25683
  };
24720
25684
  },
24721
25685
  {
24722
- name: "borrowClaimAccount";
25686
+ name: "rateModel";
24723
25687
  writable: true;
24724
- optional: true;
25688
+ pda: {
25689
+ seeds: [
25690
+ {
25691
+ kind: "const";
25692
+ value: [114, 97, 116, 101, 95, 109, 111, 100, 101, 108];
25693
+ },
25694
+ {
25695
+ kind: "account";
25696
+ path: "mint";
25697
+ }
25698
+ ];
25699
+ };
24725
25700
  },
24726
25701
  {
24727
- name: "withdrawClaimAccount";
25702
+ name: "tokenReserve";
24728
25703
  writable: true;
24729
- optional: true;
25704
+ pda: {
25705
+ seeds: [
25706
+ {
25707
+ kind: "const";
25708
+ value: [114, 101, 115, 101, 114, 118, 101];
25709
+ },
25710
+ {
25711
+ kind: "account";
25712
+ path: "mint";
25713
+ }
25714
+ ];
25715
+ };
24730
25716
  },
24731
25717
  {
24732
25718
  name: "tokenProgram";
@@ -24734,6 +25720,79 @@ type Liquidity = {
24734
25720
  {
24735
25721
  name: "associatedTokenProgram";
24736
25722
  address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
25723
+ },
25724
+ {
25725
+ name: "systemProgram";
25726
+ address: "11111111111111111111111111111111";
25727
+ }
25728
+ ];
25729
+ args: [];
25730
+ },
25731
+ {
25732
+ name: "operate";
25733
+ discriminator: [217, 106, 208, 99, 116, 151, 42, 135];
25734
+ accounts: [
25735
+ {
25736
+ name: "protocol";
25737
+ signer: true;
25738
+ relations: ["userSupplyPosition", "userBorrowPosition"];
25739
+ },
25740
+ {
25741
+ name: "liquidity";
25742
+ },
25743
+ {
25744
+ name: "tokenReserve";
25745
+ writable: true;
25746
+ },
25747
+ {
25748
+ name: "mint";
25749
+ relations: [
25750
+ "tokenReserve",
25751
+ "rateModel",
25752
+ "borrowClaimAccount",
25753
+ "withdrawClaimAccount"
25754
+ ];
25755
+ },
25756
+ {
25757
+ name: "vault";
25758
+ writable: true;
25759
+ relations: ["tokenReserve"];
25760
+ },
25761
+ {
25762
+ name: "userSupplyPosition";
25763
+ writable: true;
25764
+ optional: true;
25765
+ },
25766
+ {
25767
+ name: "userBorrowPosition";
25768
+ writable: true;
25769
+ optional: true;
25770
+ },
25771
+ {
25772
+ name: "rateModel";
25773
+ },
25774
+ {
25775
+ name: "withdrawToAccount";
25776
+ writable: true;
25777
+ optional: true;
25778
+ },
25779
+ {
25780
+ name: "borrowToAccount";
25781
+ writable: true;
25782
+ optional: true;
25783
+ },
25784
+ {
25785
+ name: "borrowClaimAccount";
25786
+ writable: true;
25787
+ optional: true;
25788
+ },
25789
+ {
25790
+ name: "withdrawClaimAccount";
25791
+ writable: true;
25792
+ optional: true;
25793
+ },
25794
+ {
25795
+ name: "tokenProgram";
24737
25796
  }
24738
25797
  ];
24739
25798
  args: [
@@ -24763,6 +25822,29 @@ type Liquidity = {
24763
25822
  }
24764
25823
  ];
24765
25824
  },
25825
+ {
25826
+ name: "pauseToken";
25827
+ discriminator: [226, 150, 72, 211, 159, 51, 226, 39];
25828
+ accounts: [
25829
+ {
25830
+ name: "authority";
25831
+ signer: true;
25832
+ },
25833
+ {
25834
+ name: "authList";
25835
+ },
25836
+ {
25837
+ name: "tokenReserve";
25838
+ writable: true;
25839
+ }
25840
+ ];
25841
+ args: [
25842
+ {
25843
+ name: "mint";
25844
+ type: "pubkey";
25845
+ }
25846
+ ];
25847
+ },
24766
25848
  {
24767
25849
  name: "pauseUser";
24768
25850
  discriminator: [18, 63, 43, 94, 239, 53, 101, 14];
@@ -24832,59 +25914,6 @@ type Liquidity = {
24832
25914
  },
24833
25915
  {
24834
25916
  name: "vault";
24835
- pda: {
24836
- seeds: [
24837
- {
24838
- kind: "account";
24839
- path: "liquidity";
24840
- },
24841
- {
24842
- kind: "account";
24843
- path: "tokenProgram";
24844
- },
24845
- {
24846
- kind: "arg";
24847
- path: "mint";
24848
- }
24849
- ];
24850
- program: {
24851
- kind: "const";
24852
- value: [
24853
- 140,
24854
- 151,
24855
- 37,
24856
- 143,
24857
- 78,
24858
- 36,
24859
- 137,
24860
- 241,
24861
- 187,
24862
- 61,
24863
- 16,
24864
- 41,
24865
- 20,
24866
- 142,
24867
- 13,
24868
- 131,
24869
- 11,
24870
- 90,
24871
- 19,
24872
- 153,
24873
- 218,
24874
- 255,
24875
- 16,
24876
- 132,
24877
- 4,
24878
- 142,
24879
- 123,
24880
- 216,
24881
- 219,
24882
- 233,
24883
- 248,
24884
- 89
24885
- ];
24886
- };
24887
- };
24888
25917
  relations: ["tokenReserve"];
24889
25918
  },
24890
25919
  {
@@ -24892,11 +25921,30 @@ type Liquidity = {
24892
25921
  writable: true;
24893
25922
  },
24894
25923
  {
24895
- name: "associatedTokenProgram";
24896
- address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
25924
+ name: "tokenProgram";
25925
+ }
25926
+ ];
25927
+ args: [
25928
+ {
25929
+ name: "mint";
25930
+ type: "pubkey";
25931
+ }
25932
+ ];
25933
+ },
25934
+ {
25935
+ name: "unpauseToken";
25936
+ discriminator: [108, 117, 62, 30, 200, 92, 255, 202];
25937
+ accounts: [
25938
+ {
25939
+ name: "authority";
25940
+ signer: true;
24897
25941
  },
24898
25942
  {
24899
- name: "tokenProgram";
25943
+ name: "authList";
25944
+ },
25945
+ {
25946
+ name: "tokenReserve";
25947
+ writable: true;
24900
25948
  }
24901
25949
  ];
24902
25950
  args: [
@@ -25016,7 +26064,6 @@ type Liquidity = {
25016
26064
  },
25017
26065
  {
25018
26066
  name: "rateModel";
25019
- writable: true;
25020
26067
  }
25021
26068
  ];
25022
26069
  args: [
@@ -25377,6 +26424,10 @@ type Liquidity = {
25377
26424
  name: "logPauseUser";
25378
26425
  discriminator: [100, 17, 114, 224, 180, 30, 52, 170];
25379
26426
  },
26427
+ {
26428
+ name: "logTokenLockdown";
26429
+ discriminator: [2, 103, 171, 11, 0, 27, 20, 40];
26430
+ },
25380
26431
  {
25381
26432
  name: "logUnpauseUser";
25382
26433
  discriminator: [170, 91, 132, 96, 179, 77, 168, 26];
@@ -25645,6 +26696,26 @@ type Liquidity = {
25645
26696
  code: 6042;
25646
26697
  name: "protocolLockdown";
25647
26698
  msg: "protocolLockdown";
26699
+ },
26700
+ {
26701
+ code: 6043;
26702
+ name: "tokenLockDown";
26703
+ msg: "tokenLockedDown";
26704
+ },
26705
+ {
26706
+ code: 6044;
26707
+ name: "tokenAlreadyLocked";
26708
+ msg: "tokenAlreadyLocked";
26709
+ },
26710
+ {
26711
+ code: 6045;
26712
+ name: "tokenAlreadyUnlocked";
26713
+ msg: "tokenAlreadyUnlocked";
26714
+ },
26715
+ {
26716
+ code: 6046;
26717
+ name: "operateSkipTransferInvalid";
26718
+ msg: "userModuleOperateSkipTransferInvalid";
25648
26719
  }
25649
26720
  ];
25650
26721
  types: [
@@ -25858,6 +26929,22 @@ type Liquidity = {
25858
26929
  ];
25859
26930
  };
25860
26931
  },
26932
+ {
26933
+ name: "logTokenLockdown";
26934
+ type: {
26935
+ kind: "struct";
26936
+ fields: [
26937
+ {
26938
+ name: "mint";
26939
+ type: "pubkey";
26940
+ },
26941
+ {
26942
+ name: "suspend";
26943
+ type: "bool";
26944
+ }
26945
+ ];
26946
+ };
26947
+ },
25861
26948
  {
25862
26949
  name: "logUnpauseUser";
25863
26950
  type: {
@@ -26116,7 +27203,10 @@ type Liquidity = {
26116
27203
  fields: [
26117
27204
  {
26118
27205
  name: "kink";
26119
- docs: ["", "@param kink in borrow rate. in 1e2: 100% = 10_000; 1% = 100"];
27206
+ docs: [
27207
+ "",
27208
+ "@param kink in borrow rate. in 1e2: 100% = 10_000; 1% = 100"
27209
+ ];
26120
27210
  type: "u128";
26121
27211
  },
26122
27212
  {
@@ -26613,7 +27703,11 @@ type Liquidity = {
26613
27703
  },
26614
27704
  {
26615
27705
  name: "withdrawalLimit";
26616
- type: "u128";
27706
+ type: "u64";
27707
+ },
27708
+ {
27709
+ name: "decayAmount";
27710
+ type: "u64";
26617
27711
  },
26618
27712
  {
26619
27713
  name: "lastUpdate";
@@ -26625,7 +27719,11 @@ type Liquidity = {
26625
27719
  },
26626
27720
  {
26627
27721
  name: "expandDuration";
26628
- type: "u64";
27722
+ type: "u32";
27723
+ },
27724
+ {
27725
+ name: "decayDuration";
27726
+ type: "u32";
26629
27727
  },
26630
27728
  {
26631
27729
  name: "baseWithdrawalLimit";