@0dotxyz/p0-ts-sdk 2.5.0 → 2.6.0-alpha.0

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.js CHANGED
@@ -45752,7 +45752,3380 @@ async function resolveExponentWrapperMergeContext(params) {
45752
45752
  }
45753
45753
  };
45754
45754
  }
45755
+ var GAMMA_VAULT_PROGRAM_ID = new PublicKey(
45756
+ "gvvtqvEmwQDnFwEvLJzzyweABcXV7HAYsTwTgztEHWJ"
45757
+ );
45758
+ var SEED_WITHDRAWAL_POLICY = "withdrawal_policy";
45759
+ var SEED_DEPOSIT_RECEIPT = "deposit_receipt";
45760
+ var SEED_WITHDRAW_ESCROW = "withdraw_escrow";
45761
+ var SEED_WITHDRAW_RECEIPT = "withdraw_receipt";
45762
+
45763
+ // src/vendor/gamma/idl/gamma-vault.json
45764
+ var gamma_vault_default = {
45765
+ address: "GaMmanX9i4jGmqDZZD2tbD6B2v9p21btenPneMXnTczV",
45766
+ metadata: {
45767
+ name: "gamma_vault",
45768
+ version: "2.0.0",
45769
+ spec: "0.1.0",
45770
+ description: "Gamma Protocol vault program \u2014 LP vaults with instant deposits, escrow withdrawals, and performance fees"
45771
+ },
45772
+ instructions: [
45773
+ {
45774
+ name: "assess_fees",
45775
+ docs: [
45776
+ "Assess scheduled performance fees (keeper)."
45777
+ ],
45778
+ discriminator: [
45779
+ 224,
45780
+ 15,
45781
+ 195,
45782
+ 19,
45783
+ 125,
45784
+ 145,
45785
+ 2,
45786
+ 100
45787
+ ],
45788
+ accounts: [
45789
+ {
45790
+ name: "fund_authority",
45791
+ signer: true,
45792
+ relations: [
45793
+ "lp_vault"
45794
+ ]
45795
+ },
45796
+ {
45797
+ name: "lp_vault",
45798
+ writable: true
45799
+ },
45800
+ {
45801
+ name: "shares_mint",
45802
+ writable: true,
45803
+ relations: [
45804
+ "lp_vault"
45805
+ ]
45806
+ },
45807
+ {
45808
+ name: "fee_recipient_account",
45809
+ writable: true
45810
+ },
45811
+ {
45812
+ name: "token_program"
45813
+ }
45814
+ ],
45815
+ args: []
45816
+ },
45817
+ {
45818
+ name: "close_deposit_receipt",
45819
+ docs: [
45820
+ "Close a deposit receipt and reclaim rent."
45821
+ ],
45822
+ discriminator: [
45823
+ 216,
45824
+ 104,
45825
+ 127,
45826
+ 60,
45827
+ 88,
45828
+ 217,
45829
+ 184,
45830
+ 15
45831
+ ],
45832
+ accounts: [
45833
+ {
45834
+ name: "user",
45835
+ docs: [
45836
+ "User who owns the deposit receipt."
45837
+ ],
45838
+ writable: true,
45839
+ signer: true
45840
+ },
45841
+ {
45842
+ name: "lp_vault",
45843
+ docs: [
45844
+ "The vault this receipt is associated with."
45845
+ ]
45846
+ },
45847
+ {
45848
+ name: "deposit_receipt",
45849
+ docs: [
45850
+ "Deposit receipt to close. Rent is returned to user."
45851
+ ],
45852
+ writable: true,
45853
+ pda: {
45854
+ seeds: [
45855
+ {
45856
+ kind: "const",
45857
+ value: [
45858
+ 100,
45859
+ 101,
45860
+ 112,
45861
+ 111,
45862
+ 115,
45863
+ 105,
45864
+ 116,
45865
+ 95,
45866
+ 114,
45867
+ 101,
45868
+ 99,
45869
+ 101,
45870
+ 105,
45871
+ 112,
45872
+ 116
45873
+ ]
45874
+ },
45875
+ {
45876
+ kind: "account",
45877
+ path: "user"
45878
+ },
45879
+ {
45880
+ kind: "account",
45881
+ path: "lp_vault"
45882
+ }
45883
+ ]
45884
+ }
45885
+ }
45886
+ ],
45887
+ args: []
45888
+ },
45889
+ {
45890
+ name: "complete_withdrawal",
45891
+ docs: [
45892
+ "User claims their withdrawal from escrow.",
45893
+ "Burns shares and transfers assets to user's wallet."
45894
+ ],
45895
+ discriminator: [
45896
+ 107,
45897
+ 98,
45898
+ 134,
45899
+ 131,
45900
+ 74,
45901
+ 120,
45902
+ 174,
45903
+ 121
45904
+ ],
45905
+ accounts: [
45906
+ {
45907
+ name: "user",
45908
+ docs: [
45909
+ "User claiming the withdrawal."
45910
+ ],
45911
+ writable: true,
45912
+ signer: true
45913
+ },
45914
+ {
45915
+ name: "lp_vault",
45916
+ docs: [
45917
+ "LpVault (needed for shares_mint validation)."
45918
+ ]
45919
+ },
45920
+ {
45921
+ name: "assets_mint",
45922
+ docs: [
45923
+ "Mint of the vault assets."
45924
+ ],
45925
+ relations: [
45926
+ "lp_vault"
45927
+ ]
45928
+ },
45929
+ {
45930
+ name: "shares_mint",
45931
+ docs: [
45932
+ "Mint for vault shares."
45933
+ ],
45934
+ writable: true,
45935
+ relations: [
45936
+ "lp_vault"
45937
+ ]
45938
+ },
45939
+ {
45940
+ name: "user_asset_ata",
45941
+ docs: [
45942
+ "User's asset token account (destination for claimed assets)."
45943
+ ],
45944
+ writable: true,
45945
+ pda: {
45946
+ seeds: [
45947
+ {
45948
+ kind: "account",
45949
+ path: "user"
45950
+ },
45951
+ {
45952
+ kind: "account",
45953
+ path: "token_program"
45954
+ },
45955
+ {
45956
+ kind: "account",
45957
+ path: "assets_mint"
45958
+ }
45959
+ ],
45960
+ program: {
45961
+ kind: "const",
45962
+ value: [
45963
+ 140,
45964
+ 151,
45965
+ 37,
45966
+ 143,
45967
+ 78,
45968
+ 36,
45969
+ 137,
45970
+ 241,
45971
+ 187,
45972
+ 61,
45973
+ 16,
45974
+ 41,
45975
+ 20,
45976
+ 142,
45977
+ 13,
45978
+ 131,
45979
+ 11,
45980
+ 90,
45981
+ 19,
45982
+ 153,
45983
+ 218,
45984
+ 255,
45985
+ 16,
45986
+ 132,
45987
+ 4,
45988
+ 142,
45989
+ 123,
45990
+ 216,
45991
+ 219,
45992
+ 233,
45993
+ 248,
45994
+ 89
45995
+ ]
45996
+ }
45997
+ }
45998
+ },
45999
+ {
46000
+ name: "withdraw_escrow",
46001
+ docs: [
46002
+ "User's withdraw escrow."
46003
+ ],
46004
+ writable: true,
46005
+ pda: {
46006
+ seeds: [
46007
+ {
46008
+ kind: "const",
46009
+ value: [
46010
+ 119,
46011
+ 105,
46012
+ 116,
46013
+ 104,
46014
+ 100,
46015
+ 114,
46016
+ 97,
46017
+ 119,
46018
+ 95,
46019
+ 101,
46020
+ 115,
46021
+ 99,
46022
+ 114,
46023
+ 111,
46024
+ 119
46025
+ ]
46026
+ },
46027
+ {
46028
+ kind: "account",
46029
+ path: "user"
46030
+ },
46031
+ {
46032
+ kind: "account",
46033
+ path: "lp_vault"
46034
+ }
46035
+ ]
46036
+ }
46037
+ },
46038
+ {
46039
+ name: "escrow_assets_account",
46040
+ docs: [
46041
+ "Escrow's asset token account (source of assets)."
46042
+ ],
46043
+ writable: true,
46044
+ relations: [
46045
+ "withdraw_escrow"
46046
+ ]
46047
+ },
46048
+ {
46049
+ name: "escrow_shares_account",
46050
+ docs: [
46051
+ "Escrow's share token account (shares to burn)."
46052
+ ],
46053
+ writable: true,
46054
+ relations: [
46055
+ "withdraw_escrow"
46056
+ ]
46057
+ },
46058
+ {
46059
+ name: "withdraw_receipt",
46060
+ docs: [
46061
+ "User's withdraw receipt."
46062
+ ],
46063
+ writable: true,
46064
+ pda: {
46065
+ seeds: [
46066
+ {
46067
+ kind: "const",
46068
+ value: [
46069
+ 119,
46070
+ 105,
46071
+ 116,
46072
+ 104,
46073
+ 100,
46074
+ 114,
46075
+ 97,
46076
+ 119,
46077
+ 95,
46078
+ 114,
46079
+ 101,
46080
+ 99,
46081
+ 101,
46082
+ 105,
46083
+ 112,
46084
+ 116
46085
+ ]
46086
+ },
46087
+ {
46088
+ kind: "account",
46089
+ path: "user"
46090
+ },
46091
+ {
46092
+ kind: "account",
46093
+ path: "lp_vault"
46094
+ }
46095
+ ]
46096
+ }
46097
+ },
46098
+ {
46099
+ name: "system_program",
46100
+ docs: [
46101
+ "System program."
46102
+ ],
46103
+ address: "11111111111111111111111111111111"
46104
+ },
46105
+ {
46106
+ name: "token_program",
46107
+ docs: [
46108
+ "Token program."
46109
+ ]
46110
+ },
46111
+ {
46112
+ name: "associated_token_program",
46113
+ docs: [
46114
+ "Associated token program."
46115
+ ],
46116
+ address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
46117
+ }
46118
+ ],
46119
+ args: []
46120
+ },
46121
+ {
46122
+ name: "deposit",
46123
+ docs: [
46124
+ "Deposit assets and receive shares instantly.",
46125
+ "Requires NAV to be fresh (within nav_max_staleness)."
46126
+ ],
46127
+ discriminator: [
46128
+ 242,
46129
+ 35,
46130
+ 198,
46131
+ 137,
46132
+ 82,
46133
+ 225,
46134
+ 242,
46135
+ 182
46136
+ ],
46137
+ accounts: [
46138
+ {
46139
+ name: "user",
46140
+ docs: [
46141
+ "User depositing into the vault."
46142
+ ],
46143
+ writable: true,
46144
+ signer: true
46145
+ },
46146
+ {
46147
+ name: "lp_vault",
46148
+ docs: [
46149
+ "LpVault to deposit into."
46150
+ ],
46151
+ writable: true,
46152
+ relations: [
46153
+ "withdrawal_policy"
46154
+ ]
46155
+ },
46156
+ {
46157
+ name: "withdrawal_policy",
46158
+ docs: [
46159
+ "Withdrawal policy for net capacity accounting. Deposits offset usage."
46160
+ ],
46161
+ writable: true,
46162
+ pda: {
46163
+ seeds: [
46164
+ {
46165
+ kind: "const",
46166
+ value: [
46167
+ 119,
46168
+ 105,
46169
+ 116,
46170
+ 104,
46171
+ 100,
46172
+ 114,
46173
+ 97,
46174
+ 119,
46175
+ 97,
46176
+ 108,
46177
+ 95,
46178
+ 112,
46179
+ 111,
46180
+ 108,
46181
+ 105,
46182
+ 99,
46183
+ 121
46184
+ ]
46185
+ },
46186
+ {
46187
+ kind: "account",
46188
+ path: "lp_vault"
46189
+ }
46190
+ ]
46191
+ }
46192
+ },
46193
+ {
46194
+ name: "assets_account",
46195
+ docs: [
46196
+ "Token account for vault assets."
46197
+ ],
46198
+ writable: true,
46199
+ relations: [
46200
+ "lp_vault"
46201
+ ]
46202
+ },
46203
+ {
46204
+ name: "user_asset_ata",
46205
+ docs: [
46206
+ "User's asset token account (source of deposit)."
46207
+ ],
46208
+ writable: true,
46209
+ pda: {
46210
+ seeds: [
46211
+ {
46212
+ kind: "account",
46213
+ path: "user"
46214
+ },
46215
+ {
46216
+ kind: "account",
46217
+ path: "token_program"
46218
+ },
46219
+ {
46220
+ kind: "account",
46221
+ path: "assets_mint"
46222
+ }
46223
+ ],
46224
+ program: {
46225
+ kind: "const",
46226
+ value: [
46227
+ 140,
46228
+ 151,
46229
+ 37,
46230
+ 143,
46231
+ 78,
46232
+ 36,
46233
+ 137,
46234
+ 241,
46235
+ 187,
46236
+ 61,
46237
+ 16,
46238
+ 41,
46239
+ 20,
46240
+ 142,
46241
+ 13,
46242
+ 131,
46243
+ 11,
46244
+ 90,
46245
+ 19,
46246
+ 153,
46247
+ 218,
46248
+ 255,
46249
+ 16,
46250
+ 132,
46251
+ 4,
46252
+ 142,
46253
+ 123,
46254
+ 216,
46255
+ 219,
46256
+ 233,
46257
+ 248,
46258
+ 89
46259
+ ]
46260
+ }
46261
+ }
46262
+ },
46263
+ {
46264
+ name: "user_share_ata",
46265
+ docs: [
46266
+ "User's share token account (destination for minted shares)."
46267
+ ],
46268
+ writable: true,
46269
+ pda: {
46270
+ seeds: [
46271
+ {
46272
+ kind: "account",
46273
+ path: "user"
46274
+ },
46275
+ {
46276
+ kind: "account",
46277
+ path: "token_program"
46278
+ },
46279
+ {
46280
+ kind: "account",
46281
+ path: "shares_mint"
46282
+ }
46283
+ ],
46284
+ program: {
46285
+ kind: "const",
46286
+ value: [
46287
+ 140,
46288
+ 151,
46289
+ 37,
46290
+ 143,
46291
+ 78,
46292
+ 36,
46293
+ 137,
46294
+ 241,
46295
+ 187,
46296
+ 61,
46297
+ 16,
46298
+ 41,
46299
+ 20,
46300
+ 142,
46301
+ 13,
46302
+ 131,
46303
+ 11,
46304
+ 90,
46305
+ 19,
46306
+ 153,
46307
+ 218,
46308
+ 255,
46309
+ 16,
46310
+ 132,
46311
+ 4,
46312
+ 142,
46313
+ 123,
46314
+ 216,
46315
+ 219,
46316
+ 233,
46317
+ 248,
46318
+ 89
46319
+ ]
46320
+ }
46321
+ }
46322
+ },
46323
+ {
46324
+ name: "deposit_receipt",
46325
+ docs: [
46326
+ "Deposit receipt account",
46327
+ "Derived from user pubkey and lp_vault pubkey."
46328
+ ],
46329
+ writable: true,
46330
+ pda: {
46331
+ seeds: [
46332
+ {
46333
+ kind: "const",
46334
+ value: [
46335
+ 100,
46336
+ 101,
46337
+ 112,
46338
+ 111,
46339
+ 115,
46340
+ 105,
46341
+ 116,
46342
+ 95,
46343
+ 114,
46344
+ 101,
46345
+ 99,
46346
+ 101,
46347
+ 105,
46348
+ 112,
46349
+ 116
46350
+ ]
46351
+ },
46352
+ {
46353
+ kind: "account",
46354
+ path: "user"
46355
+ },
46356
+ {
46357
+ kind: "account",
46358
+ path: "lp_vault"
46359
+ }
46360
+ ]
46361
+ }
46362
+ },
46363
+ {
46364
+ name: "assets_mint",
46365
+ docs: [
46366
+ "Mint of the vault assets."
46367
+ ],
46368
+ relations: [
46369
+ "lp_vault"
46370
+ ]
46371
+ },
46372
+ {
46373
+ name: "shares_mint",
46374
+ docs: [
46375
+ "Mint for vault shares."
46376
+ ],
46377
+ writable: true,
46378
+ relations: [
46379
+ "lp_vault"
46380
+ ]
46381
+ },
46382
+ {
46383
+ name: "system_program",
46384
+ docs: [
46385
+ "System program."
46386
+ ],
46387
+ address: "11111111111111111111111111111111"
46388
+ },
46389
+ {
46390
+ name: "token_program",
46391
+ docs: [
46392
+ "Token program."
46393
+ ]
46394
+ },
46395
+ {
46396
+ name: "associated_token_program",
46397
+ docs: [
46398
+ "Associated token program."
46399
+ ],
46400
+ address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
46401
+ }
46402
+ ],
46403
+ args: [
46404
+ {
46405
+ name: "amount",
46406
+ type: "u64"
46407
+ }
46408
+ ]
46409
+ },
46410
+ {
46411
+ name: "fulfill_withdrawal",
46412
+ docs: [
46413
+ "Fulfill pending withdrawals by transferring assets to user's escrow.",
46414
+ "Called by keeper when liquidity is available."
46415
+ ],
46416
+ discriminator: [
46417
+ 57,
46418
+ 37,
46419
+ 123,
46420
+ 221,
46421
+ 103,
46422
+ 93,
46423
+ 162,
46424
+ 176
46425
+ ],
46426
+ accounts: [
46427
+ {
46428
+ name: "signer",
46429
+ docs: [
46430
+ "Keeper signer. Must be the vault's fund_authority or keeper_authority."
46431
+ ],
46432
+ writable: true,
46433
+ signer: true
46434
+ },
46435
+ {
46436
+ name: "user"
46437
+ },
46438
+ {
46439
+ name: "lp_vault",
46440
+ docs: [
46441
+ "LpVault."
46442
+ ],
46443
+ writable: true,
46444
+ relations: [
46445
+ "withdrawal_policy"
46446
+ ]
46447
+ },
46448
+ {
46449
+ name: "withdrawal_policy",
46450
+ docs: [
46451
+ "Withdrawal policy used to retain the configured base-asset fee."
46452
+ ],
46453
+ writable: true,
46454
+ pda: {
46455
+ seeds: [
46456
+ {
46457
+ kind: "const",
46458
+ value: [
46459
+ 119,
46460
+ 105,
46461
+ 116,
46462
+ 104,
46463
+ 100,
46464
+ 114,
46465
+ 97,
46466
+ 119,
46467
+ 97,
46468
+ 108,
46469
+ 95,
46470
+ 112,
46471
+ 111,
46472
+ 108,
46473
+ 105,
46474
+ 99,
46475
+ 121
46476
+ ]
46477
+ },
46478
+ {
46479
+ kind: "account",
46480
+ path: "lp_vault"
46481
+ }
46482
+ ]
46483
+ }
46484
+ },
46485
+ {
46486
+ name: "assets_account",
46487
+ docs: [
46488
+ "Vault's asset token account."
46489
+ ],
46490
+ writable: true,
46491
+ relations: [
46492
+ "lp_vault"
46493
+ ]
46494
+ },
46495
+ {
46496
+ name: "assets_mint",
46497
+ docs: [
46498
+ "Mint of the vault assets."
46499
+ ],
46500
+ relations: [
46501
+ "lp_vault"
46502
+ ]
46503
+ },
46504
+ {
46505
+ name: "shares_mint",
46506
+ docs: [
46507
+ "Mint for vault shares."
46508
+ ],
46509
+ relations: [
46510
+ "lp_vault"
46511
+ ]
46512
+ },
46513
+ {
46514
+ name: "withdraw_escrow",
46515
+ docs: [
46516
+ "User's withdraw escrow."
46517
+ ],
46518
+ pda: {
46519
+ seeds: [
46520
+ {
46521
+ kind: "const",
46522
+ value: [
46523
+ 119,
46524
+ 105,
46525
+ 116,
46526
+ 104,
46527
+ 100,
46528
+ 114,
46529
+ 97,
46530
+ 119,
46531
+ 95,
46532
+ 101,
46533
+ 115,
46534
+ 99,
46535
+ 114,
46536
+ 111,
46537
+ 119
46538
+ ]
46539
+ },
46540
+ {
46541
+ kind: "account",
46542
+ path: "user"
46543
+ },
46544
+ {
46545
+ kind: "account",
46546
+ path: "lp_vault"
46547
+ }
46548
+ ]
46549
+ }
46550
+ },
46551
+ {
46552
+ name: "escrow_assets_account",
46553
+ docs: [
46554
+ "Escrow's asset token account (destination for assets)."
46555
+ ],
46556
+ writable: true,
46557
+ relations: [
46558
+ "withdraw_escrow"
46559
+ ]
46560
+ },
46561
+ {
46562
+ name: "withdraw_receipt",
46563
+ docs: [
46564
+ "User's withdraw receipt."
46565
+ ],
46566
+ writable: true,
46567
+ pda: {
46568
+ seeds: [
46569
+ {
46570
+ kind: "const",
46571
+ value: [
46572
+ 119,
46573
+ 105,
46574
+ 116,
46575
+ 104,
46576
+ 100,
46577
+ 114,
46578
+ 97,
46579
+ 119,
46580
+ 95,
46581
+ 114,
46582
+ 101,
46583
+ 99,
46584
+ 101,
46585
+ 105,
46586
+ 112,
46587
+ 116
46588
+ ]
46589
+ },
46590
+ {
46591
+ kind: "account",
46592
+ path: "user"
46593
+ },
46594
+ {
46595
+ kind: "account",
46596
+ path: "lp_vault"
46597
+ }
46598
+ ]
46599
+ }
46600
+ },
46601
+ {
46602
+ name: "token_program",
46603
+ docs: [
46604
+ "Token program."
46605
+ ]
46606
+ }
46607
+ ],
46608
+ args: []
46609
+ },
46610
+ {
46611
+ name: "init_global_config",
46612
+ discriminator: [
46613
+ 140,
46614
+ 136,
46615
+ 214,
46616
+ 48,
46617
+ 87,
46618
+ 0,
46619
+ 120,
46620
+ 255
46621
+ ],
46622
+ accounts: [
46623
+ {
46624
+ name: "signer",
46625
+ docs: [
46626
+ "Signer initializing the GlobalConfig. MUST be the program's",
46627
+ "BPFLoaderUpgradeable upgrade authority (proven by the constraints on",
46628
+ "`program` + `program_data` below). Becomes the super_admin; the only",
46629
+ "later rotation path is `update_admin_authorities`, which is likewise",
46630
+ "gated on the upgrade authority. On a fresh deploy, call init BEFORE",
46631
+ "finalizing the program (a finalized/`--final` program has no upgrade",
46632
+ "authority \u2192 init AND rotation impossible) and while a plain deployer",
46633
+ "keypair (not a multisig PDA) still holds it."
46634
+ ],
46635
+ writable: true,
46636
+ signer: true
46637
+ },
46638
+ {
46639
+ name: "global_config",
46640
+ docs: [
46641
+ "Global config account. Derived with a single str."
46642
+ ],
46643
+ writable: true,
46644
+ pda: {
46645
+ seeds: [
46646
+ {
46647
+ kind: "const",
46648
+ value: [
46649
+ 103,
46650
+ 108,
46651
+ 111,
46652
+ 98,
46653
+ 97,
46654
+ 108,
46655
+ 95,
46656
+ 99,
46657
+ 111,
46658
+ 110,
46659
+ 102,
46660
+ 105,
46661
+ 103
46662
+ ]
46663
+ }
46664
+ ]
46665
+ }
46666
+ },
46667
+ {
46668
+ name: "program",
46669
+ docs: [
46670
+ "This program's own account; ties `program_data` to this program so the",
46671
+ "upgrade-authority check below cannot be satisfied with an unrelated",
46672
+ "program's ProgramData."
46673
+ ],
46674
+ address: "GaMmanX9i4jGmqDZZD2tbD6B2v9p21btenPneMXnTczV"
46675
+ },
46676
+ {
46677
+ name: "program_data",
46678
+ docs: [
46679
+ "ProgramData account holding the program's upgrade authority. Gate: the",
46680
+ "signer must equal the upgrade authority. `programdata_address()` returns",
46681
+ "`Ok(None)` for a non-upgradeable load and a revoked authority is `None`,",
46682
+ "so a `None` on either side fails closed."
46683
+ ]
46684
+ },
46685
+ {
46686
+ name: "system_program",
46687
+ docs: [
46688
+ "System program."
46689
+ ],
46690
+ address: "11111111111111111111111111111111"
46691
+ }
46692
+ ],
46693
+ args: [
46694
+ {
46695
+ name: "create_authority",
46696
+ type: "pubkey"
46697
+ }
46698
+ ]
46699
+ },
46700
+ {
46701
+ name: "init_lp_vault",
46702
+ discriminator: [
46703
+ 40,
46704
+ 247,
46705
+ 24,
46706
+ 8,
46707
+ 152,
46708
+ 98,
46709
+ 18,
46710
+ 220
46711
+ ],
46712
+ accounts: [
46713
+ {
46714
+ name: "signer",
46715
+ docs: [
46716
+ "User creating the vault."
46717
+ ],
46718
+ writable: true,
46719
+ signer: true
46720
+ },
46721
+ {
46722
+ name: "lp_vault",
46723
+ docs: [
46724
+ "Lp vault being created."
46725
+ ],
46726
+ writable: true,
46727
+ pda: {
46728
+ seeds: [
46729
+ {
46730
+ kind: "arg",
46731
+ path: "vault_name"
46732
+ },
46733
+ {
46734
+ kind: "const",
46735
+ value: [
46736
+ 118,
46737
+ 97,
46738
+ 117,
46739
+ 108,
46740
+ 116
46741
+ ]
46742
+ },
46743
+ {
46744
+ kind: "account",
46745
+ path: "assets_mint"
46746
+ }
46747
+ ]
46748
+ }
46749
+ },
46750
+ {
46751
+ name: "global_config",
46752
+ pda: {
46753
+ seeds: [
46754
+ {
46755
+ kind: "const",
46756
+ value: [
46757
+ 103,
46758
+ 108,
46759
+ 111,
46760
+ 98,
46761
+ 97,
46762
+ 108,
46763
+ 95,
46764
+ 99,
46765
+ 111,
46766
+ 110,
46767
+ 102,
46768
+ 105,
46769
+ 103
46770
+ ]
46771
+ }
46772
+ ]
46773
+ }
46774
+ },
46775
+ {
46776
+ name: "shares_mint",
46777
+ docs: [
46778
+ "Mint for shares, minted on deposit."
46779
+ ],
46780
+ writable: true,
46781
+ pda: {
46782
+ seeds: [
46783
+ {
46784
+ kind: "const",
46785
+ value: [
46786
+ 115,
46787
+ 104,
46788
+ 97,
46789
+ 114,
46790
+ 101,
46791
+ 115
46792
+ ]
46793
+ },
46794
+ {
46795
+ kind: "account",
46796
+ path: "lp_vault"
46797
+ }
46798
+ ]
46799
+ }
46800
+ },
46801
+ {
46802
+ name: "assets_mint",
46803
+ docs: [
46804
+ "Mint of the assets, USDC, maybe configurable."
46805
+ ]
46806
+ },
46807
+ {
46808
+ name: "assets_account",
46809
+ docs: [
46810
+ "Token account for main asset."
46811
+ ],
46812
+ writable: true,
46813
+ pda: {
46814
+ seeds: [
46815
+ {
46816
+ kind: "const",
46817
+ value: [
46818
+ 109,
46819
+ 97,
46820
+ 105,
46821
+ 110,
46822
+ 95,
46823
+ 97,
46824
+ 115,
46825
+ 115,
46826
+ 101,
46827
+ 116,
46828
+ 115
46829
+ ]
46830
+ },
46831
+ {
46832
+ kind: "account",
46833
+ path: "lp_vault"
46834
+ }
46835
+ ]
46836
+ }
46837
+ },
46838
+ {
46839
+ name: "pending_shares_account",
46840
+ docs: [
46841
+ "Token account where shares are held during queued (illiquid) withdrawals."
46842
+ ],
46843
+ writable: true,
46844
+ pda: {
46845
+ seeds: [
46846
+ {
46847
+ kind: "const",
46848
+ value: [
46849
+ 112,
46850
+ 101,
46851
+ 110,
46852
+ 100,
46853
+ 105,
46854
+ 110,
46855
+ 103,
46856
+ 95,
46857
+ 115,
46858
+ 104,
46859
+ 97,
46860
+ 114,
46861
+ 101,
46862
+ 115
46863
+ ]
46864
+ },
46865
+ {
46866
+ kind: "account",
46867
+ path: "lp_vault"
46868
+ }
46869
+ ]
46870
+ }
46871
+ },
46872
+ {
46873
+ name: "withdrawal_policy",
46874
+ docs: [
46875
+ "Withdrawal policy PDA for retained fees and net outflow caps."
46876
+ ],
46877
+ writable: true,
46878
+ pda: {
46879
+ seeds: [
46880
+ {
46881
+ kind: "const",
46882
+ value: [
46883
+ 119,
46884
+ 105,
46885
+ 116,
46886
+ 104,
46887
+ 100,
46888
+ 114,
46889
+ 97,
46890
+ 119,
46891
+ 97,
46892
+ 108,
46893
+ 95,
46894
+ 112,
46895
+ 111,
46896
+ 108,
46897
+ 105,
46898
+ 99,
46899
+ 121
46900
+ ]
46901
+ },
46902
+ {
46903
+ kind: "account",
46904
+ path: "lp_vault"
46905
+ }
46906
+ ]
46907
+ }
46908
+ },
46909
+ {
46910
+ name: "fee_recipient_account",
46911
+ docs: [
46912
+ "Optional fee recipient token account (shares mint).",
46913
+ "Required when initializing with performance_fee_bps > 0."
46914
+ ],
46915
+ optional: true
46916
+ },
46917
+ {
46918
+ name: "system_program",
46919
+ docs: [
46920
+ "System program."
46921
+ ],
46922
+ address: "11111111111111111111111111111111"
46923
+ },
46924
+ {
46925
+ name: "token_program",
46926
+ docs: [
46927
+ "Can either be spl-token or token-2022."
46928
+ ]
46929
+ }
46930
+ ],
46931
+ args: [
46932
+ {
46933
+ name: "fund_authority",
46934
+ type: "pubkey"
46935
+ },
46936
+ {
46937
+ name: "nav_max_staleness",
46938
+ type: "u64"
46939
+ },
46940
+ {
46941
+ name: "vault_name",
46942
+ type: "string"
46943
+ },
46944
+ {
46945
+ name: "decimals",
46946
+ type: "u8"
46947
+ },
46948
+ {
46949
+ name: "performance_fee_bps",
46950
+ type: "u16"
46951
+ },
46952
+ {
46953
+ name: "assessment_interval_secs",
46954
+ type: "i64"
46955
+ },
46956
+ {
46957
+ name: "keeper_authority",
46958
+ type: {
46959
+ option: "pubkey"
46960
+ }
46961
+ }
46962
+ ]
46963
+ },
46964
+ {
46965
+ name: "set_fee_config",
46966
+ docs: [
46967
+ "Configure or disable performance fee settings."
46968
+ ],
46969
+ discriminator: [
46970
+ 221,
46971
+ 222,
46972
+ 52,
46973
+ 206,
46974
+ 114,
46975
+ 198,
46976
+ 64,
46977
+ 91
46978
+ ],
46979
+ accounts: [
46980
+ {
46981
+ name: "fund_authority",
46982
+ docs: [
46983
+ "Operator / fund authority."
46984
+ ],
46985
+ signer: true,
46986
+ relations: [
46987
+ "lp_vault"
46988
+ ]
46989
+ },
46990
+ {
46991
+ name: "lp_vault",
46992
+ writable: true
46993
+ },
46994
+ {
46995
+ name: "shares_mint",
46996
+ writable: true,
46997
+ relations: [
46998
+ "lp_vault"
46999
+ ]
47000
+ },
47001
+ {
47002
+ name: "fee_recipient_account",
47003
+ docs: [
47004
+ "Token account that will receive fee shares.",
47005
+ "Required when enabling fees (performance_fee_bps > 0) or when",
47006
+ "mid-window settlement is needed (accrued fees must be settled",
47007
+ "to the old recipient before changing config).",
47008
+ "Omit when disabling with no accrued fees.",
47009
+ "Mutable because it may be the destination of a MintTo CPI during mid-window settlement."
47010
+ ],
47011
+ writable: true,
47012
+ optional: true
47013
+ },
47014
+ {
47015
+ name: "token_program"
47016
+ }
47017
+ ],
47018
+ args: [
47019
+ {
47020
+ name: "performance_fee_bps",
47021
+ type: "u16"
47022
+ },
47023
+ {
47024
+ name: "assessment_interval_secs",
47025
+ type: "i64"
47026
+ }
47027
+ ]
47028
+ },
47029
+ {
47030
+ name: "set_keeper_authority",
47031
+ docs: [
47032
+ "Set or remove the keeper authority on a vault.",
47033
+ "When set, this key can call fulfill_withdrawal in addition to fund_authority."
47034
+ ],
47035
+ discriminator: [
47036
+ 29,
47037
+ 124,
47038
+ 191,
47039
+ 114,
47040
+ 184,
47041
+ 243,
47042
+ 33,
47043
+ 155
47044
+ ],
47045
+ accounts: [
47046
+ {
47047
+ name: "fund_authority",
47048
+ docs: [
47049
+ "Fund authority \u2014 only they can change keeper authority."
47050
+ ],
47051
+ signer: true,
47052
+ relations: [
47053
+ "lp_vault"
47054
+ ]
47055
+ },
47056
+ {
47057
+ name: "payer",
47058
+ docs: [
47059
+ "Payer for any reallocation rent."
47060
+ ],
47061
+ writable: true,
47062
+ signer: true
47063
+ },
47064
+ {
47065
+ name: "lp_vault",
47066
+ writable: true
47067
+ },
47068
+ {
47069
+ name: "system_program",
47070
+ address: "11111111111111111111111111111111"
47071
+ }
47072
+ ],
47073
+ args: [
47074
+ {
47075
+ name: "keeper_authority",
47076
+ type: "pubkey"
47077
+ }
47078
+ ]
47079
+ },
47080
+ {
47081
+ name: "set_metadata",
47082
+ discriminator: [
47083
+ 78,
47084
+ 157,
47085
+ 75,
47086
+ 242,
47087
+ 151,
47088
+ 20,
47089
+ 121,
47090
+ 144
47091
+ ],
47092
+ accounts: [
47093
+ {
47094
+ name: "fund_authority",
47095
+ docs: [
47096
+ "Fund authority - only they can set metadata."
47097
+ ],
47098
+ writable: true,
47099
+ signer: true,
47100
+ relations: [
47101
+ "lp_vault"
47102
+ ]
47103
+ },
47104
+ {
47105
+ name: "lp_vault",
47106
+ docs: [
47107
+ "LpVault that owns the shares_mint."
47108
+ ]
47109
+ },
47110
+ {
47111
+ name: "shares_mint",
47112
+ docs: [
47113
+ "Shares mint for which we're setting metadata."
47114
+ ],
47115
+ writable: true,
47116
+ relations: [
47117
+ "lp_vault"
47118
+ ]
47119
+ },
47120
+ {
47121
+ name: "metadata_account",
47122
+ docs: [
47123
+ 'Seeds: ["metadata", token_metadata_program_id, mint]'
47124
+ ],
47125
+ writable: true,
47126
+ pda: {
47127
+ seeds: [
47128
+ {
47129
+ kind: "const",
47130
+ value: [
47131
+ 109,
47132
+ 101,
47133
+ 116,
47134
+ 97,
47135
+ 100,
47136
+ 97,
47137
+ 116,
47138
+ 97
47139
+ ]
47140
+ },
47141
+ {
47142
+ kind: "const",
47143
+ value: [
47144
+ 11,
47145
+ 112,
47146
+ 101,
47147
+ 177,
47148
+ 227,
47149
+ 209,
47150
+ 124,
47151
+ 69,
47152
+ 56,
47153
+ 157,
47154
+ 82,
47155
+ 127,
47156
+ 107,
47157
+ 4,
47158
+ 195,
47159
+ 205,
47160
+ 88,
47161
+ 184,
47162
+ 108,
47163
+ 115,
47164
+ 26,
47165
+ 160,
47166
+ 253,
47167
+ 181,
47168
+ 73,
47169
+ 182,
47170
+ 209,
47171
+ 188,
47172
+ 3,
47173
+ 248,
47174
+ 41,
47175
+ 70
47176
+ ]
47177
+ },
47178
+ {
47179
+ kind: "account",
47180
+ path: "shares_mint"
47181
+ }
47182
+ ],
47183
+ program: {
47184
+ kind: "const",
47185
+ value: [
47186
+ 11,
47187
+ 112,
47188
+ 101,
47189
+ 177,
47190
+ 227,
47191
+ 209,
47192
+ 124,
47193
+ 69,
47194
+ 56,
47195
+ 157,
47196
+ 82,
47197
+ 127,
47198
+ 107,
47199
+ 4,
47200
+ 195,
47201
+ 205,
47202
+ 88,
47203
+ 184,
47204
+ 108,
47205
+ 115,
47206
+ 26,
47207
+ 160,
47208
+ 253,
47209
+ 181,
47210
+ 73,
47211
+ 182,
47212
+ 209,
47213
+ 188,
47214
+ 3,
47215
+ 248,
47216
+ 41,
47217
+ 70
47218
+ ]
47219
+ }
47220
+ }
47221
+ },
47222
+ {
47223
+ name: "token_metadata_program",
47224
+ address: "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"
47225
+ },
47226
+ {
47227
+ name: "system_program",
47228
+ docs: [
47229
+ "System program."
47230
+ ],
47231
+ address: "11111111111111111111111111111111"
47232
+ },
47233
+ {
47234
+ name: "rent",
47235
+ docs: [
47236
+ "Rent sysvar."
47237
+ ],
47238
+ address: "SysvarRent111111111111111111111111111111111"
47239
+ }
47240
+ ],
47241
+ args: [
47242
+ {
47243
+ name: "name",
47244
+ type: "string"
47245
+ },
47246
+ {
47247
+ name: "symbol",
47248
+ type: "string"
47249
+ },
47250
+ {
47251
+ name: "uri",
47252
+ type: "string"
47253
+ }
47254
+ ]
47255
+ },
47256
+ {
47257
+ name: "set_withdrawal_policy",
47258
+ docs: [
47259
+ "Configure retained withdrawal fees and net withdrawal caps."
47260
+ ],
47261
+ discriminator: [
47262
+ 3,
47263
+ 223,
47264
+ 67,
47265
+ 81,
47266
+ 69,
47267
+ 30,
47268
+ 203,
47269
+ 150
47270
+ ],
47271
+ accounts: [
47272
+ {
47273
+ name: "fund_authority",
47274
+ docs: [
47275
+ "Fund authority for the vault."
47276
+ ],
47277
+ signer: true,
47278
+ relations: [
47279
+ "lp_vault"
47280
+ ]
47281
+ },
47282
+ {
47283
+ name: "payer",
47284
+ docs: [
47285
+ "Payer for creating the policy account on existing vaults."
47286
+ ],
47287
+ writable: true,
47288
+ signer: true
47289
+ },
47290
+ {
47291
+ name: "lp_vault"
47292
+ },
47293
+ {
47294
+ name: "withdrawal_policy",
47295
+ writable: true,
47296
+ pda: {
47297
+ seeds: [
47298
+ {
47299
+ kind: "const",
47300
+ value: [
47301
+ 119,
47302
+ 105,
47303
+ 116,
47304
+ 104,
47305
+ 100,
47306
+ 114,
47307
+ 97,
47308
+ 119,
47309
+ 97,
47310
+ 108,
47311
+ 95,
47312
+ 112,
47313
+ 111,
47314
+ 108,
47315
+ 105,
47316
+ 99,
47317
+ 121
47318
+ ]
47319
+ },
47320
+ {
47321
+ kind: "account",
47322
+ path: "lp_vault"
47323
+ }
47324
+ ]
47325
+ }
47326
+ },
47327
+ {
47328
+ name: "system_program",
47329
+ address: "11111111111111111111111111111111"
47330
+ }
47331
+ ],
47332
+ args: [
47333
+ {
47334
+ name: "withdrawal_fee_bps",
47335
+ type: "u16"
47336
+ },
47337
+ {
47338
+ name: "hourly_withdrawal_cap_bps",
47339
+ type: "u16"
47340
+ },
47341
+ {
47342
+ name: "daily_withdrawal_cap_bps",
47343
+ type: "u16"
47344
+ }
47345
+ ]
47346
+ },
47347
+ {
47348
+ name: "update_admin_authorities",
47349
+ docs: [
47350
+ "Rotate super_admin, create_authority, and permissioned_creation",
47351
+ "atomically. Recovery instruction gated on the program's",
47352
+ "BPFLoaderUpgradeable upgrade authority (NOT the current super_admin),",
47353
+ "so a compromised or lost super_admin can be replaced."
47354
+ ],
47355
+ discriminator: [
47356
+ 41,
47357
+ 241,
47358
+ 142,
47359
+ 184,
47360
+ 75,
47361
+ 212,
47362
+ 72,
47363
+ 171
47364
+ ],
47365
+ accounts: [
47366
+ {
47367
+ name: "signer",
47368
+ docs: [
47369
+ "Signer rotating the authorities. MUST be the program's",
47370
+ "BPFLoaderUpgradeable upgrade authority (proven by the constraints on",
47371
+ "`program` + `program_data` below)."
47372
+ ],
47373
+ signer: true
47374
+ },
47375
+ {
47376
+ name: "global_config",
47377
+ docs: [
47378
+ "The global config account being rotated. Unique in the program.",
47379
+ "Deliberately no `has_one = super_admin`: see the struct docs."
47380
+ ],
47381
+ writable: true,
47382
+ pda: {
47383
+ seeds: [
47384
+ {
47385
+ kind: "const",
47386
+ value: [
47387
+ 103,
47388
+ 108,
47389
+ 111,
47390
+ 98,
47391
+ 97,
47392
+ 108,
47393
+ 95,
47394
+ 99,
47395
+ 111,
47396
+ 110,
47397
+ 102,
47398
+ 105,
47399
+ 103
47400
+ ]
47401
+ }
47402
+ ]
47403
+ }
47404
+ },
47405
+ {
47406
+ name: "program",
47407
+ docs: [
47408
+ "This program's own account; ties `program_data` to this program so the",
47409
+ "upgrade-authority check below cannot be satisfied with an unrelated",
47410
+ "program's ProgramData."
47411
+ ],
47412
+ address: "GaMmanX9i4jGmqDZZD2tbD6B2v9p21btenPneMXnTczV"
47413
+ },
47414
+ {
47415
+ name: "program_data",
47416
+ docs: [
47417
+ "ProgramData account holding the program's upgrade authority. Gate: the",
47418
+ "signer must equal the upgrade authority. `programdata_address()` returns",
47419
+ "`Ok(None)` for a non-upgradeable load and a revoked authority is `None`,",
47420
+ "so a `None` on either side fails closed."
47421
+ ]
47422
+ }
47423
+ ],
47424
+ args: [
47425
+ {
47426
+ name: "new_super_admin",
47427
+ type: "pubkey"
47428
+ },
47429
+ {
47430
+ name: "new_create_authority",
47431
+ type: "pubkey"
47432
+ },
47433
+ {
47434
+ name: "new_permissioned_creation",
47435
+ type: "bool"
47436
+ }
47437
+ ]
47438
+ },
47439
+ {
47440
+ name: "update_global_config",
47441
+ discriminator: [
47442
+ 164,
47443
+ 84,
47444
+ 130,
47445
+ 189,
47446
+ 111,
47447
+ 58,
47448
+ 250,
47449
+ 200
47450
+ ],
47451
+ accounts: [
47452
+ {
47453
+ name: "super_admin",
47454
+ docs: [
47455
+ "The signer must be the global_config super_admin."
47456
+ ],
47457
+ writable: true,
47458
+ signer: true,
47459
+ relations: [
47460
+ "global_config"
47461
+ ]
47462
+ },
47463
+ {
47464
+ name: "global_config",
47465
+ docs: [
47466
+ "The global config account. Unique in the program."
47467
+ ],
47468
+ writable: true,
47469
+ pda: {
47470
+ seeds: [
47471
+ {
47472
+ kind: "const",
47473
+ value: [
47474
+ 103,
47475
+ 108,
47476
+ 111,
47477
+ 98,
47478
+ 97,
47479
+ 108,
47480
+ 95,
47481
+ 99,
47482
+ 111,
47483
+ 110,
47484
+ 102,
47485
+ 105,
47486
+ 103
47487
+ ]
47488
+ }
47489
+ ]
47490
+ }
47491
+ }
47492
+ ],
47493
+ args: [
47494
+ {
47495
+ name: "new_create_authority",
47496
+ type: "pubkey"
47497
+ },
47498
+ {
47499
+ name: "is_creation_permissioned",
47500
+ type: "bool"
47501
+ }
47502
+ ]
47503
+ },
47504
+ {
47505
+ name: "update_nav",
47506
+ docs: [
47507
+ "Update the vault's NAV. Called by fund_authority (operator)."
47508
+ ],
47509
+ discriminator: [
47510
+ 56,
47511
+ 16,
47512
+ 234,
47513
+ 109,
47514
+ 155,
47515
+ 165,
47516
+ 5,
47517
+ 0
47518
+ ],
47519
+ accounts: [
47520
+ {
47521
+ name: "fund_authority",
47522
+ docs: [
47523
+ "Fund authority - only they can update NAV."
47524
+ ],
47525
+ signer: true,
47526
+ relations: [
47527
+ "lp_vault"
47528
+ ]
47529
+ },
47530
+ {
47531
+ name: "lp_vault",
47532
+ writable: true
47533
+ },
47534
+ {
47535
+ name: "shares_mint",
47536
+ relations: [
47537
+ "lp_vault"
47538
+ ]
47539
+ }
47540
+ ],
47541
+ args: [
47542
+ {
47543
+ name: "new_nav",
47544
+ type: "u64"
47545
+ }
47546
+ ]
47547
+ },
47548
+ {
47549
+ name: "update_nav_max_staleness",
47550
+ docs: [
47551
+ "Update the NAV max staleness window on a vault."
47552
+ ],
47553
+ discriminator: [
47554
+ 212,
47555
+ 225,
47556
+ 120,
47557
+ 109,
47558
+ 83,
47559
+ 96,
47560
+ 40,
47561
+ 17
47562
+ ],
47563
+ accounts: [
47564
+ {
47565
+ name: "fund_authority",
47566
+ docs: [
47567
+ "Fund authority \u2014 only they can change vault config."
47568
+ ],
47569
+ signer: true,
47570
+ relations: [
47571
+ "lp_vault"
47572
+ ]
47573
+ },
47574
+ {
47575
+ name: "lp_vault",
47576
+ writable: true
47577
+ }
47578
+ ],
47579
+ args: [
47580
+ {
47581
+ name: "nav_max_staleness",
47582
+ type: "u64"
47583
+ }
47584
+ ]
47585
+ },
47586
+ {
47587
+ name: "withdraw",
47588
+ docs: [
47589
+ "Withdraw shares for assets.",
47590
+ "If vault has sufficient liquidity: instant withdrawal.",
47591
+ "If illiquid: creates WithdrawReceipt, shares go to pending account."
47592
+ ],
47593
+ discriminator: [
47594
+ 183,
47595
+ 18,
47596
+ 70,
47597
+ 156,
47598
+ 148,
47599
+ 109,
47600
+ 161,
47601
+ 34
47602
+ ],
47603
+ accounts: [
47604
+ {
47605
+ name: "user",
47606
+ docs: [
47607
+ "User withdrawing from the vault."
47608
+ ],
47609
+ writable: true,
47610
+ signer: true
47611
+ },
47612
+ {
47613
+ name: "lp_vault",
47614
+ docs: [
47615
+ "LpVault to withdraw from."
47616
+ ],
47617
+ writable: true,
47618
+ relations: [
47619
+ "withdrawal_policy"
47620
+ ]
47621
+ },
47622
+ {
47623
+ name: "withdrawal_policy",
47624
+ docs: [
47625
+ "Withdrawal policy for retained asset fees and net withdrawal caps."
47626
+ ],
47627
+ writable: true,
47628
+ pda: {
47629
+ seeds: [
47630
+ {
47631
+ kind: "const",
47632
+ value: [
47633
+ 119,
47634
+ 105,
47635
+ 116,
47636
+ 104,
47637
+ 100,
47638
+ 114,
47639
+ 97,
47640
+ 119,
47641
+ 97,
47642
+ 108,
47643
+ 95,
47644
+ 112,
47645
+ 111,
47646
+ 108,
47647
+ 105,
47648
+ 99,
47649
+ 121
47650
+ ]
47651
+ },
47652
+ {
47653
+ kind: "account",
47654
+ path: "lp_vault"
47655
+ }
47656
+ ]
47657
+ }
47658
+ },
47659
+ {
47660
+ name: "assets_account",
47661
+ docs: [
47662
+ "Token account for vault assets."
47663
+ ],
47664
+ writable: true,
47665
+ relations: [
47666
+ "lp_vault"
47667
+ ]
47668
+ },
47669
+ {
47670
+ name: "user_share_ata",
47671
+ docs: [
47672
+ "User's share token account (source of shares)."
47673
+ ],
47674
+ writable: true,
47675
+ pda: {
47676
+ seeds: [
47677
+ {
47678
+ kind: "account",
47679
+ path: "user"
47680
+ },
47681
+ {
47682
+ kind: "account",
47683
+ path: "token_program"
47684
+ },
47685
+ {
47686
+ kind: "account",
47687
+ path: "shares_mint"
47688
+ }
47689
+ ],
47690
+ program: {
47691
+ kind: "const",
47692
+ value: [
47693
+ 140,
47694
+ 151,
47695
+ 37,
47696
+ 143,
47697
+ 78,
47698
+ 36,
47699
+ 137,
47700
+ 241,
47701
+ 187,
47702
+ 61,
47703
+ 16,
47704
+ 41,
47705
+ 20,
47706
+ 142,
47707
+ 13,
47708
+ 131,
47709
+ 11,
47710
+ 90,
47711
+ 19,
47712
+ 153,
47713
+ 218,
47714
+ 255,
47715
+ 16,
47716
+ 132,
47717
+ 4,
47718
+ 142,
47719
+ 123,
47720
+ 216,
47721
+ 219,
47722
+ 233,
47723
+ 248,
47724
+ 89
47725
+ ]
47726
+ }
47727
+ }
47728
+ },
47729
+ {
47730
+ name: "assets_mint",
47731
+ docs: [
47732
+ "Mint of the vault assets."
47733
+ ],
47734
+ relations: [
47735
+ "lp_vault"
47736
+ ]
47737
+ },
47738
+ {
47739
+ name: "shares_mint",
47740
+ docs: [
47741
+ "Mint for vault shares (mutable for fee mint CPI)."
47742
+ ],
47743
+ writable: true,
47744
+ relations: [
47745
+ "lp_vault"
47746
+ ]
47747
+ },
47748
+ {
47749
+ name: "fee_recipient_account",
47750
+ docs: [
47751
+ "Token account that receives fee shares on withdrawal.",
47752
+ "Required when `has_fee_config()` is true; omit otherwise.",
47753
+ "Mutable because it is the destination of a MintTo CPI."
47754
+ ],
47755
+ writable: true,
47756
+ optional: true
47757
+ },
47758
+ {
47759
+ name: "withdraw_escrow",
47760
+ docs: [
47761
+ "Withdraw escrow - holds assets and shares until user claims."
47762
+ ],
47763
+ writable: true,
47764
+ pda: {
47765
+ seeds: [
47766
+ {
47767
+ kind: "const",
47768
+ value: [
47769
+ 119,
47770
+ 105,
47771
+ 116,
47772
+ 104,
47773
+ 100,
47774
+ 114,
47775
+ 97,
47776
+ 119,
47777
+ 95,
47778
+ 101,
47779
+ 115,
47780
+ 99,
47781
+ 114,
47782
+ 111,
47783
+ 119
47784
+ ]
47785
+ },
47786
+ {
47787
+ kind: "account",
47788
+ path: "user"
47789
+ },
47790
+ {
47791
+ kind: "account",
47792
+ path: "lp_vault"
47793
+ }
47794
+ ]
47795
+ }
47796
+ },
47797
+ {
47798
+ name: "escrow_assets_account",
47799
+ docs: [
47800
+ "Escrow's asset token account (holds USDC for user to claim)."
47801
+ ],
47802
+ writable: true,
47803
+ pda: {
47804
+ seeds: [
47805
+ {
47806
+ kind: "account",
47807
+ path: "withdraw_escrow"
47808
+ },
47809
+ {
47810
+ kind: "account",
47811
+ path: "token_program"
47812
+ },
47813
+ {
47814
+ kind: "account",
47815
+ path: "assets_mint"
47816
+ }
47817
+ ],
47818
+ program: {
47819
+ kind: "const",
47820
+ value: [
47821
+ 140,
47822
+ 151,
47823
+ 37,
47824
+ 143,
47825
+ 78,
47826
+ 36,
47827
+ 137,
47828
+ 241,
47829
+ 187,
47830
+ 61,
47831
+ 16,
47832
+ 41,
47833
+ 20,
47834
+ 142,
47835
+ 13,
47836
+ 131,
47837
+ 11,
47838
+ 90,
47839
+ 19,
47840
+ 153,
47841
+ 218,
47842
+ 255,
47843
+ 16,
47844
+ 132,
47845
+ 4,
47846
+ 142,
47847
+ 123,
47848
+ 216,
47849
+ 219,
47850
+ 233,
47851
+ 248,
47852
+ 89
47853
+ ]
47854
+ }
47855
+ }
47856
+ },
47857
+ {
47858
+ name: "escrow_shares_account",
47859
+ docs: [
47860
+ "Escrow's share token account (holds shares until burned on claim)."
47861
+ ],
47862
+ writable: true,
47863
+ pda: {
47864
+ seeds: [
47865
+ {
47866
+ kind: "account",
47867
+ path: "withdraw_escrow"
47868
+ },
47869
+ {
47870
+ kind: "account",
47871
+ path: "token_program"
47872
+ },
47873
+ {
47874
+ kind: "account",
47875
+ path: "shares_mint"
47876
+ }
47877
+ ],
47878
+ program: {
47879
+ kind: "const",
47880
+ value: [
47881
+ 140,
47882
+ 151,
47883
+ 37,
47884
+ 143,
47885
+ 78,
47886
+ 36,
47887
+ 137,
47888
+ 241,
47889
+ 187,
47890
+ 61,
47891
+ 16,
47892
+ 41,
47893
+ 20,
47894
+ 142,
47895
+ 13,
47896
+ 131,
47897
+ 11,
47898
+ 90,
47899
+ 19,
47900
+ 153,
47901
+ 218,
47902
+ 255,
47903
+ 16,
47904
+ 132,
47905
+ 4,
47906
+ 142,
47907
+ 123,
47908
+ 216,
47909
+ 219,
47910
+ 233,
47911
+ 248,
47912
+ 89
47913
+ ]
47914
+ }
47915
+ }
47916
+ },
47917
+ {
47918
+ name: "withdraw_receipt",
47919
+ docs: [
47920
+ "Withdraw receipt - tracks pending and claimable amounts (accumulates)."
47921
+ ],
47922
+ writable: true,
47923
+ pda: {
47924
+ seeds: [
47925
+ {
47926
+ kind: "const",
47927
+ value: [
47928
+ 119,
47929
+ 105,
47930
+ 116,
47931
+ 104,
47932
+ 100,
47933
+ 114,
47934
+ 97,
47935
+ 119,
47936
+ 95,
47937
+ 114,
47938
+ 101,
47939
+ 99,
47940
+ 101,
47941
+ 105,
47942
+ 112,
47943
+ 116
47944
+ ]
47945
+ },
47946
+ {
47947
+ kind: "account",
47948
+ path: "user"
47949
+ },
47950
+ {
47951
+ kind: "account",
47952
+ path: "lp_vault"
47953
+ }
47954
+ ]
47955
+ }
47956
+ },
47957
+ {
47958
+ name: "system_program",
47959
+ docs: [
47960
+ "System program."
47961
+ ],
47962
+ address: "11111111111111111111111111111111"
47963
+ },
47964
+ {
47965
+ name: "token_program",
47966
+ docs: [
47967
+ "Token program."
47968
+ ]
47969
+ },
47970
+ {
47971
+ name: "associated_token_program",
47972
+ docs: [
47973
+ "Associated token program."
47974
+ ],
47975
+ address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
47976
+ }
47977
+ ],
47978
+ args: [
47979
+ {
47980
+ name: "shares_amount",
47981
+ type: "u64"
47982
+ }
47983
+ ]
47984
+ },
47985
+ {
47986
+ name: "withdraw_assets",
47987
+ docs: [
47988
+ "Withdraw assets from vault to operator wallet for investment."
47989
+ ],
47990
+ discriminator: [
47991
+ 202,
47992
+ 105,
47993
+ 54,
47994
+ 155,
47995
+ 56,
47996
+ 33,
47997
+ 207,
47998
+ 254
47999
+ ],
48000
+ accounts: [
48001
+ {
48002
+ name: "fund_authority",
48003
+ writable: true,
48004
+ signer: true,
48005
+ relations: [
48006
+ "lp_vault"
48007
+ ]
48008
+ },
48009
+ {
48010
+ name: "lp_vault"
48011
+ },
48012
+ {
48013
+ name: "assets_account",
48014
+ writable: true,
48015
+ relations: [
48016
+ "lp_vault"
48017
+ ]
48018
+ },
48019
+ {
48020
+ name: "authority_asset_ata",
48021
+ writable: true,
48022
+ pda: {
48023
+ seeds: [
48024
+ {
48025
+ kind: "account",
48026
+ path: "fund_authority"
48027
+ },
48028
+ {
48029
+ kind: "account",
48030
+ path: "token_program"
48031
+ },
48032
+ {
48033
+ kind: "account",
48034
+ path: "assets_mint"
48035
+ }
48036
+ ],
48037
+ program: {
48038
+ kind: "const",
48039
+ value: [
48040
+ 140,
48041
+ 151,
48042
+ 37,
48043
+ 143,
48044
+ 78,
48045
+ 36,
48046
+ 137,
48047
+ 241,
48048
+ 187,
48049
+ 61,
48050
+ 16,
48051
+ 41,
48052
+ 20,
48053
+ 142,
48054
+ 13,
48055
+ 131,
48056
+ 11,
48057
+ 90,
48058
+ 19,
48059
+ 153,
48060
+ 218,
48061
+ 255,
48062
+ 16,
48063
+ 132,
48064
+ 4,
48065
+ 142,
48066
+ 123,
48067
+ 216,
48068
+ 219,
48069
+ 233,
48070
+ 248,
48071
+ 89
48072
+ ]
48073
+ }
48074
+ }
48075
+ },
48076
+ {
48077
+ name: "assets_mint",
48078
+ relations: [
48079
+ "lp_vault"
48080
+ ]
48081
+ },
48082
+ {
48083
+ name: "system_program",
48084
+ address: "11111111111111111111111111111111"
48085
+ },
48086
+ {
48087
+ name: "token_program"
48088
+ },
48089
+ {
48090
+ name: "associated_token_program",
48091
+ address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
48092
+ }
48093
+ ],
48094
+ args: [
48095
+ {
48096
+ name: "amount",
48097
+ type: "u64"
48098
+ }
48099
+ ]
48100
+ }
48101
+ ],
48102
+ accounts: [
48103
+ {
48104
+ name: "DepositReceipt",
48105
+ discriminator: [
48106
+ 64,
48107
+ 175,
48108
+ 24,
48109
+ 183,
48110
+ 138,
48111
+ 109,
48112
+ 70,
48113
+ 78
48114
+ ]
48115
+ },
48116
+ {
48117
+ name: "GlobalConfig",
48118
+ discriminator: [
48119
+ 149,
48120
+ 8,
48121
+ 156,
48122
+ 202,
48123
+ 160,
48124
+ 252,
48125
+ 176,
48126
+ 217
48127
+ ]
48128
+ },
48129
+ {
48130
+ name: "LpVault",
48131
+ discriminator: [
48132
+ 189,
48133
+ 45,
48134
+ 167,
48135
+ 23,
48136
+ 91,
48137
+ 118,
48138
+ 105,
48139
+ 190
48140
+ ]
48141
+ },
48142
+ {
48143
+ name: "WithdrawEscrow",
48144
+ discriminator: [
48145
+ 161,
48146
+ 63,
48147
+ 221,
48148
+ 55,
48149
+ 116,
48150
+ 204,
48151
+ 131,
48152
+ 11
48153
+ ]
48154
+ },
48155
+ {
48156
+ name: "WithdrawReceipt",
48157
+ discriminator: [
48158
+ 132,
48159
+ 238,
48160
+ 44,
48161
+ 182,
48162
+ 207,
48163
+ 9,
48164
+ 124,
48165
+ 140
48166
+ ]
48167
+ },
48168
+ {
48169
+ name: "WithdrawalPolicy",
48170
+ discriminator: [
48171
+ 52,
48172
+ 231,
48173
+ 68,
48174
+ 59,
48175
+ 247,
48176
+ 250,
48177
+ 119,
48178
+ 244
48179
+ ]
48180
+ }
48181
+ ],
48182
+ events: [
48183
+ {
48184
+ name: "AdminAuthoritiesUpdated",
48185
+ discriminator: [
48186
+ 1,
48187
+ 164,
48188
+ 87,
48189
+ 62,
48190
+ 157,
48191
+ 85,
48192
+ 1,
48193
+ 113
48194
+ ]
48195
+ },
48196
+ {
48197
+ name: "FeeConfigUpdated",
48198
+ discriminator: [
48199
+ 45,
48200
+ 50,
48201
+ 42,
48202
+ 173,
48203
+ 193,
48204
+ 67,
48205
+ 52,
48206
+ 244
48207
+ ]
48208
+ },
48209
+ {
48210
+ name: "FeesAssessed",
48211
+ discriminator: [
48212
+ 210,
48213
+ 177,
48214
+ 59,
48215
+ 191,
48216
+ 116,
48217
+ 251,
48218
+ 25,
48219
+ 131
48220
+ ]
48221
+ },
48222
+ {
48223
+ name: "WithdrawalFeeRetained",
48224
+ discriminator: [
48225
+ 105,
48226
+ 104,
48227
+ 190,
48228
+ 198,
48229
+ 168,
48230
+ 231,
48231
+ 18,
48232
+ 182
48233
+ ]
48234
+ },
48235
+ {
48236
+ name: "WithdrawalFeesSettled",
48237
+ discriminator: [
48238
+ 106,
48239
+ 253,
48240
+ 199,
48241
+ 177,
48242
+ 101,
48243
+ 104,
48244
+ 38,
48245
+ 219
48246
+ ]
48247
+ },
48248
+ {
48249
+ name: "WithdrawalPolicyUpdated",
48250
+ discriminator: [
48251
+ 252,
48252
+ 196,
48253
+ 144,
48254
+ 224,
48255
+ 210,
48256
+ 3,
48257
+ 71,
48258
+ 66
48259
+ ]
48260
+ }
48261
+ ],
48262
+ errors: [
48263
+ {
48264
+ code: 6e3,
48265
+ name: "ArithmeticError",
48266
+ msg: "Arithmetic error!"
48267
+ },
48268
+ {
48269
+ code: 6001,
48270
+ name: "ObsoleteVaultData",
48271
+ msg: "LpVault data is outdated!"
48272
+ },
48273
+ {
48274
+ code: 6002,
48275
+ name: "StaleNav",
48276
+ msg: "NAV is stale - operator must update NAV before this operation!"
48277
+ },
48278
+ {
48279
+ code: 6003,
48280
+ name: "Unauthorized",
48281
+ msg: "Signer is not an authority!"
48282
+ },
48283
+ {
48284
+ code: 6004,
48285
+ name: "InvalidMint",
48286
+ msg: "Invalid mint extension!"
48287
+ },
48288
+ {
48289
+ code: 6005,
48290
+ name: "NameTooLong",
48291
+ msg: "LP Vault name is too long!"
48292
+ },
48293
+ {
48294
+ code: 6006,
48295
+ name: "BlockedDeposit",
48296
+ msg: "Deposits are blocked - NAV is zero!"
48297
+ },
48298
+ {
48299
+ code: 6007,
48300
+ name: "InsufficientLiquidity",
48301
+ msg: "Insufficient liquid assets for instant withdrawal!"
48302
+ },
48303
+ {
48304
+ code: 6008,
48305
+ name: "InvalidShareAmount",
48306
+ msg: "Invalid share amount!"
48307
+ },
48308
+ {
48309
+ code: 6009,
48310
+ name: "InvalidDepositAmount",
48311
+ msg: "Invalid deposit amount!"
48312
+ },
48313
+ {
48314
+ code: 6010,
48315
+ name: "NoPendingWithdrawal",
48316
+ msg: "No pending withdrawal to fulfill!"
48317
+ },
48318
+ {
48319
+ code: 6011,
48320
+ name: "NoClaimableAssets",
48321
+ msg: "No claimable assets to withdraw!"
48322
+ },
48323
+ {
48324
+ code: 6012,
48325
+ name: "FeeRecipientNotConfigured",
48326
+ msg: "Fee recipient is not configured!"
48327
+ },
48328
+ {
48329
+ code: 6013,
48330
+ name: "InvalidPerformanceFeeBps",
48331
+ msg: "Invalid performance fee - must be <= MAX_PERFORMANCE_FEE_BPS!"
48332
+ },
48333
+ {
48334
+ code: 6014,
48335
+ name: "InvalidFeeRecipient",
48336
+ msg: "Invalid fee recipient account!"
48337
+ },
48338
+ {
48339
+ code: 6015,
48340
+ name: "AssessmentTooEarly",
48341
+ msg: "Assessment interval has not elapsed!"
48342
+ },
48343
+ {
48344
+ code: 6016,
48345
+ name: "InvalidAssessmentInterval",
48346
+ msg: "Invalid assessment interval!"
48347
+ },
48348
+ {
48349
+ code: 6017,
48350
+ name: "NavUpdateTooLarge",
48351
+ msg: "NAV update would change share price by more than the allowed maximum!"
48352
+ },
48353
+ {
48354
+ code: 6018,
48355
+ name: "InvalidWithdrawalFeeBps",
48356
+ msg: "Invalid withdrawal fee - must be <= MAX_WITHDRAWAL_FEE_BPS!"
48357
+ },
48358
+ {
48359
+ code: 6019,
48360
+ name: "InvalidWithdrawalCapBps",
48361
+ msg: "Invalid withdrawal cap - must be <= 10000 bps!"
48362
+ },
48363
+ {
48364
+ code: 6020,
48365
+ name: "HourlyWithdrawalCapExceeded",
48366
+ msg: "Withdrawal exceeds hourly vault capacity!"
48367
+ },
48368
+ {
48369
+ code: 6021,
48370
+ name: "DailyWithdrawalCapExceeded",
48371
+ msg: "Withdrawal exceeds daily vault capacity!"
48372
+ },
48373
+ {
48374
+ code: 6022,
48375
+ name: "InvalidWithdrawalPolicy",
48376
+ msg: "Invalid withdrawal policy account!"
48377
+ },
48378
+ {
48379
+ code: 6023,
48380
+ name: "InvalidAuthority",
48381
+ msg: "New authority cannot be the default (all-zeros) pubkey!"
48382
+ }
48383
+ ],
48384
+ types: [
48385
+ {
48386
+ name: "AdminAuthoritiesUpdated",
48387
+ type: {
48388
+ kind: "struct",
48389
+ fields: [
48390
+ {
48391
+ name: "old_super_admin",
48392
+ type: "pubkey"
48393
+ },
48394
+ {
48395
+ name: "new_super_admin",
48396
+ type: "pubkey"
48397
+ },
48398
+ {
48399
+ name: "old_create_authority",
48400
+ type: "pubkey"
48401
+ },
48402
+ {
48403
+ name: "new_create_authority",
48404
+ type: "pubkey"
48405
+ },
48406
+ {
48407
+ name: "old_permissioned_creation",
48408
+ type: "bool"
48409
+ },
48410
+ {
48411
+ name: "new_permissioned_creation",
48412
+ type: "bool"
48413
+ }
48414
+ ]
48415
+ }
48416
+ },
48417
+ {
48418
+ name: "DepositReceipt",
48419
+ type: {
48420
+ kind: "struct",
48421
+ fields: [
48422
+ {
48423
+ name: "bump",
48424
+ docs: [
48425
+ "PDA bump seed."
48426
+ ],
48427
+ type: "u8"
48428
+ }
48429
+ ]
48430
+ }
48431
+ },
48432
+ {
48433
+ name: "FeeConfigUpdated",
48434
+ type: {
48435
+ kind: "struct",
48436
+ fields: [
48437
+ {
48438
+ name: "vault",
48439
+ type: "pubkey"
48440
+ },
48441
+ {
48442
+ name: "old_fee_recipient",
48443
+ type: "pubkey"
48444
+ },
48445
+ {
48446
+ name: "new_fee_recipient",
48447
+ type: "pubkey"
48448
+ },
48449
+ {
48450
+ name: "old_fee_bps",
48451
+ type: "u16"
48452
+ },
48453
+ {
48454
+ name: "new_fee_bps",
48455
+ type: "u16"
48456
+ },
48457
+ {
48458
+ name: "assessment_interval_secs",
48459
+ type: "i64"
48460
+ }
48461
+ ]
48462
+ }
48463
+ },
48464
+ {
48465
+ name: "FeesAssessed",
48466
+ type: {
48467
+ kind: "struct",
48468
+ fields: [
48469
+ {
48470
+ name: "vault",
48471
+ type: "pubkey"
48472
+ },
48473
+ {
48474
+ name: "profit_assets",
48475
+ type: "u64"
48476
+ },
48477
+ {
48478
+ name: "fee_assets",
48479
+ type: "u64"
48480
+ },
48481
+ {
48482
+ name: "fee_shares_minted",
48483
+ type: "u64"
48484
+ },
48485
+ {
48486
+ name: "new_pps",
48487
+ type: "u64"
48488
+ },
48489
+ {
48490
+ name: "checkpoint_pps",
48491
+ type: "u64"
48492
+ },
48493
+ {
48494
+ name: "timestamp",
48495
+ type: "i64"
48496
+ }
48497
+ ]
48498
+ }
48499
+ },
48500
+ {
48501
+ name: "GlobalConfig",
48502
+ type: {
48503
+ kind: "struct",
48504
+ fields: [
48505
+ {
48506
+ name: "super_admin",
48507
+ docs: [
48508
+ "Key with the ability to update the GlobalConfig. Rotatable only via",
48509
+ "`update_admin_authorities` (gated on the program upgrade authority)."
48510
+ ],
48511
+ type: "pubkey"
48512
+ },
48513
+ {
48514
+ name: "permissioned_creation",
48515
+ docs: [
48516
+ "When true InitializeLpVault requires create_authority to be a signer"
48517
+ ],
48518
+ type: "bool"
48519
+ },
48520
+ {
48521
+ name: "create_authority",
48522
+ docs: [
48523
+ "The key with authority to call `InitializeLpVault`"
48524
+ ],
48525
+ type: "pubkey"
48526
+ },
48527
+ {
48528
+ name: "bump",
48529
+ docs: [
48530
+ "Bump for increased efficiency."
48531
+ ],
48532
+ type: "u8"
48533
+ }
48534
+ ]
48535
+ }
48536
+ },
48537
+ {
48538
+ name: "LpVault",
48539
+ type: {
48540
+ kind: "struct",
48541
+ fields: [
48542
+ {
48543
+ name: "assets_account",
48544
+ docs: [
48545
+ "USDC TokenAccount where users deposit, funds agent operations."
48546
+ ],
48547
+ type: "pubkey"
48548
+ },
48549
+ {
48550
+ name: "pending_shares_account",
48551
+ docs: [
48552
+ "TokenAccount where shares are held during queued (illiquid) withdrawals."
48553
+ ],
48554
+ type: "pubkey"
48555
+ },
48556
+ {
48557
+ name: "shares_mint",
48558
+ docs: [
48559
+ "Derived mint (created on initialize) that represents LP tokens or shares."
48560
+ ],
48561
+ type: "pubkey"
48562
+ },
48563
+ {
48564
+ name: "assets_mint",
48565
+ docs: [
48566
+ "Mint corresponding to the asset, most of the time USDC."
48567
+ ],
48568
+ type: "pubkey"
48569
+ },
48570
+ {
48571
+ name: "fund_authority",
48572
+ docs: [
48573
+ "Pubkey authorized to withdraw assets from assets_account and update NAV."
48574
+ ],
48575
+ type: "pubkey"
48576
+ },
48577
+ {
48578
+ name: "nav",
48579
+ docs: [
48580
+ "Current Net Asset Value (total vault value in asset decimals)."
48581
+ ],
48582
+ type: "u64"
48583
+ },
48584
+ {
48585
+ name: "total_shares",
48586
+ docs: [
48587
+ "Total shares outstanding (cached for efficiency). May temporarily diverge",
48588
+ "from shares_mint.supply during the escrow withdrawal flow (between",
48589
+ "fulfill_withdrawal and complete_withdrawal)."
48590
+ ],
48591
+ type: "u64"
48592
+ },
48593
+ {
48594
+ name: "nav_updated_at",
48595
+ docs: [
48596
+ "Timestamp for when NAV was last updated."
48597
+ ],
48598
+ type: "i64"
48599
+ },
48600
+ {
48601
+ name: "nav_max_staleness",
48602
+ docs: [
48603
+ "Maximum NAV staleness for user operations (in seconds).",
48604
+ "Deposits and withdrawals fail if NAV is older than this."
48605
+ ],
48606
+ type: "u64"
48607
+ },
48608
+ {
48609
+ name: "bump",
48610
+ docs: [
48611
+ "PDA derivation bump, stored for CU saving purposes."
48612
+ ],
48613
+ type: "u8"
48614
+ },
48615
+ {
48616
+ name: "vault_name",
48617
+ type: "string"
48618
+ },
48619
+ {
48620
+ name: "pending_withdrawal_value",
48621
+ docs: [
48622
+ "Total value of pending withdrawals awaiting liquidity.",
48623
+ "When a withdrawal cannot be fulfilled instantly due to insufficient",
48624
+ "liquid assets, the value is tracked here. This is approximate \u2014 the",
48625
+ "value recorded at withdrawal time may differ from the value at",
48626
+ "fulfillment time (recomputed at current NAV). Used for operator",
48627
+ "visibility only, not for critical calculations."
48628
+ ],
48629
+ type: "u64"
48630
+ },
48631
+ {
48632
+ name: "fee_recipient",
48633
+ docs: [
48634
+ "Shares token account that receives fee shares. Pubkey::default() = disabled."
48635
+ ],
48636
+ type: "pubkey"
48637
+ },
48638
+ {
48639
+ name: "performance_fee_bps",
48640
+ docs: [
48641
+ "Performance fee rate in basis points (2000 = 20%). 0 = disabled."
48642
+ ],
48643
+ type: "u16"
48644
+ },
48645
+ {
48646
+ name: "assessment_interval_secs",
48647
+ docs: [
48648
+ "How often scheduled fees are assessed (seconds). E.g., 86400 = 24h."
48649
+ ],
48650
+ type: "i64"
48651
+ },
48652
+ {
48653
+ name: "last_assessment_timestamp",
48654
+ docs: [
48655
+ "Unix timestamp of last fee event (scheduled or withdrawal-triggered)."
48656
+ ],
48657
+ type: "i64"
48658
+ },
48659
+ {
48660
+ name: "price_per_share_at_last_assessment",
48661
+ docs: [
48662
+ "PPS at last fee event, scaled by PRICE_SCALE. High-water mark for fees."
48663
+ ],
48664
+ type: "u64"
48665
+ },
48666
+ {
48667
+ name: "keeper_authority",
48668
+ docs: [
48669
+ "Optional keeper authority. When set (non-default), this key can call",
48670
+ "fulfill_withdrawal in addition to fund_authority. Allows the keeper",
48671
+ "process to use a separate key from the agent/fund_authority.",
48672
+ "Pubkey::default() = not set (only fund_authority can fulfill)."
48673
+ ],
48674
+ type: "pubkey"
48675
+ }
48676
+ ]
48677
+ }
48678
+ },
48679
+ {
48680
+ name: "WithdrawEscrow",
48681
+ docs: [
48682
+ "Escrow account that holds assets and shares for a pending withdrawal.",
48683
+ "Each user has one escrow per vault, derived as PDA from [WITHDRAW_ESCROW_SEED, user, vault]."
48684
+ ],
48685
+ type: {
48686
+ kind: "struct",
48687
+ fields: [
48688
+ {
48689
+ name: "user",
48690
+ docs: [
48691
+ "User who owns this escrow."
48692
+ ],
48693
+ type: "pubkey"
48694
+ },
48695
+ {
48696
+ name: "lp_vault",
48697
+ docs: [
48698
+ "The vault this escrow is associated with."
48699
+ ],
48700
+ type: "pubkey"
48701
+ },
48702
+ {
48703
+ name: "escrow_assets_account",
48704
+ docs: [
48705
+ "Token account holding escrowed assets (USDC)."
48706
+ ],
48707
+ type: "pubkey"
48708
+ },
48709
+ {
48710
+ name: "escrow_shares_account",
48711
+ docs: [
48712
+ "Token account holding escrowed shares (for burning on claim)."
48713
+ ],
48714
+ type: "pubkey"
48715
+ },
48716
+ {
48717
+ name: "bump",
48718
+ docs: [
48719
+ "PDA derivation bump."
48720
+ ],
48721
+ type: "u8"
48722
+ }
48723
+ ]
48724
+ }
48725
+ },
48726
+ {
48727
+ name: "WithdrawReceipt",
48728
+ type: {
48729
+ kind: "struct",
48730
+ fields: [
48731
+ {
48732
+ name: "user",
48733
+ docs: [
48734
+ "User requesting withdrawal."
48735
+ ],
48736
+ type: "pubkey"
48737
+ },
48738
+ {
48739
+ name: "lp_vault",
48740
+ docs: [
48741
+ "Vault where the user has invested."
48742
+ ],
48743
+ type: "pubkey"
48744
+ },
48745
+ {
48746
+ name: "pending_shares",
48747
+ docs: [
48748
+ "Shares waiting for liquidity (keeper needs to fulfill these).",
48749
+ "These shares are held in the escrow_shares_account."
48750
+ ],
48751
+ type: "u64"
48752
+ },
48753
+ {
48754
+ name: "claimable_shares",
48755
+ docs: [
48756
+ "Shares that have been fulfilled and are ready to claim.",
48757
+ "These shares are also in escrow_shares_account, waiting to be burned on claim."
48758
+ ],
48759
+ type: "u64"
48760
+ },
48761
+ {
48762
+ name: "claimable_assets",
48763
+ docs: [
48764
+ "Asset value ready to claim (held in escrow_assets_account)."
48765
+ ],
48766
+ type: "u64"
48767
+ },
48768
+ {
48769
+ name: "oldest_pending_at",
48770
+ docs: [
48771
+ "Timestamp of the earliest pending withdrawal (for NAV staleness checks)."
48772
+ ],
48773
+ type: "i64"
48774
+ },
48775
+ {
48776
+ name: "bump",
48777
+ docs: [
48778
+ "PDA derivation bump, stored for CU saving purposes."
48779
+ ],
48780
+ type: "u8"
48781
+ }
48782
+ ]
48783
+ }
48784
+ },
48785
+ {
48786
+ name: "WithdrawalFeeRetained",
48787
+ type: {
48788
+ kind: "struct",
48789
+ fields: [
48790
+ {
48791
+ name: "vault",
48792
+ type: "pubkey"
48793
+ },
48794
+ {
48795
+ name: "user",
48796
+ type: "pubkey"
48797
+ },
48798
+ {
48799
+ name: "gross_assets",
48800
+ type: "u64"
48801
+ },
48802
+ {
48803
+ name: "fee_assets",
48804
+ type: "u64"
48805
+ },
48806
+ {
48807
+ name: "net_assets",
48808
+ type: "u64"
48809
+ },
48810
+ {
48811
+ name: "withdrawal_fee_bps",
48812
+ type: "u16"
48813
+ },
48814
+ {
48815
+ name: "timestamp",
48816
+ type: "i64"
48817
+ }
48818
+ ]
48819
+ }
48820
+ },
48821
+ {
48822
+ name: "WithdrawalFeesSettled",
48823
+ type: {
48824
+ kind: "struct",
48825
+ fields: [
48826
+ {
48827
+ name: "vault",
48828
+ type: "pubkey"
48829
+ },
48830
+ {
48831
+ name: "user",
48832
+ type: "pubkey"
48833
+ },
48834
+ {
48835
+ name: "shares_withdrawn",
48836
+ type: "u64"
48837
+ },
48838
+ {
48839
+ name: "asset_value",
48840
+ type: "u64"
48841
+ },
48842
+ {
48843
+ name: "fee_shares_minted",
48844
+ type: "u64"
48845
+ },
48846
+ {
48847
+ name: "proration_elapsed",
48848
+ type: "i64"
48849
+ },
48850
+ {
48851
+ name: "proration_interval",
48852
+ type: "i64"
48853
+ },
48854
+ {
48855
+ name: "pps_after_fees",
48856
+ type: "u64"
48857
+ }
48858
+ ]
48859
+ }
48860
+ },
48861
+ {
48862
+ name: "WithdrawalPolicy",
48863
+ type: {
48864
+ kind: "struct",
48865
+ fields: [
48866
+ {
48867
+ name: "lp_vault",
48868
+ docs: [
48869
+ "Vault this policy belongs to."
48870
+ ],
48871
+ type: "pubkey"
48872
+ },
48873
+ {
48874
+ name: "withdrawal_fee_bps",
48875
+ docs: [
48876
+ "Base-asset fee retained in the vault on withdrawal. 30 = 0.30%."
48877
+ ],
48878
+ type: "u16"
48879
+ },
48880
+ {
48881
+ name: "hourly_withdrawal_cap_bps",
48882
+ docs: [
48883
+ "Max net withdrawal accepted per hour as bps of current NAV. 0 = disabled."
48884
+ ],
48885
+ type: "u16"
48886
+ },
48887
+ {
48888
+ name: "daily_withdrawal_cap_bps",
48889
+ docs: [
48890
+ "Max net withdrawal accepted per day as bps of current NAV. 0 = disabled."
48891
+ ],
48892
+ type: "u16"
48893
+ },
48894
+ {
48895
+ name: "hourly_withdrawn_assets",
48896
+ docs: [
48897
+ "Net withdrawn assets counted in the current hourly window."
48898
+ ],
48899
+ type: "u64"
48900
+ },
48901
+ {
48902
+ name: "daily_withdrawn_assets",
48903
+ docs: [
48904
+ "Net withdrawn assets counted in the current daily window."
48905
+ ],
48906
+ type: "u64"
48907
+ },
48908
+ {
48909
+ name: "hourly_window_start",
48910
+ docs: [
48911
+ "Start timestamp for the current hourly cap window."
48912
+ ],
48913
+ type: "i64"
48914
+ },
48915
+ {
48916
+ name: "daily_window_start",
48917
+ docs: [
48918
+ "Start timestamp for the current daily cap window."
48919
+ ],
48920
+ type: "i64"
48921
+ },
48922
+ {
48923
+ name: "bump",
48924
+ docs: [
48925
+ "PDA derivation bump."
48926
+ ],
48927
+ type: "u8"
48928
+ }
48929
+ ]
48930
+ }
48931
+ },
48932
+ {
48933
+ name: "WithdrawalPolicyUpdated",
48934
+ type: {
48935
+ kind: "struct",
48936
+ fields: [
48937
+ {
48938
+ name: "vault",
48939
+ type: "pubkey"
48940
+ },
48941
+ {
48942
+ name: "withdrawal_fee_bps",
48943
+ type: "u16"
48944
+ },
48945
+ {
48946
+ name: "hourly_withdrawal_cap_bps",
48947
+ type: "u16"
48948
+ },
48949
+ {
48950
+ name: "daily_withdrawal_cap_bps",
48951
+ type: "u16"
48952
+ },
48953
+ {
48954
+ name: "timestamp",
48955
+ type: "i64"
48956
+ }
48957
+ ]
48958
+ }
48959
+ }
48960
+ ]
48961
+ };
48962
+
48963
+ // src/vendor/gamma/idl/index.ts
48964
+ var GAMMA_VAULT_IDL = gamma_vault_default;
48965
+ function deriveGammaWithdrawalPolicy(lpVault, programId = GAMMA_VAULT_PROGRAM_ID) {
48966
+ return PublicKey.findProgramAddressSync(
48967
+ [Buffer.from(SEED_WITHDRAWAL_POLICY), lpVault.toBuffer()],
48968
+ programId
48969
+ );
48970
+ }
48971
+ function deriveGammaDepositReceipt(user, lpVault, programId = GAMMA_VAULT_PROGRAM_ID) {
48972
+ return PublicKey.findProgramAddressSync(
48973
+ [Buffer.from(SEED_DEPOSIT_RECEIPT), user.toBuffer(), lpVault.toBuffer()],
48974
+ programId
48975
+ );
48976
+ }
48977
+ function deriveGammaWithdrawEscrow(user, lpVault, programId = GAMMA_VAULT_PROGRAM_ID) {
48978
+ return PublicKey.findProgramAddressSync(
48979
+ [Buffer.from(SEED_WITHDRAW_ESCROW), user.toBuffer(), lpVault.toBuffer()],
48980
+ programId
48981
+ );
48982
+ }
48983
+ function deriveGammaWithdrawReceipt(user, lpVault, programId = GAMMA_VAULT_PROGRAM_ID) {
48984
+ return PublicKey.findProgramAddressSync(
48985
+ [Buffer.from(SEED_WITHDRAW_RECEIPT), user.toBuffer(), lpVault.toBuffer()],
48986
+ programId
48987
+ );
48988
+ }
48989
+ function deriveGammaAta(mint, owner, tokenProgram = TOKEN_PROGRAM_ID) {
48990
+ return getAssociatedTokenAddressSync(
48991
+ mint,
48992
+ owner,
48993
+ true,
48994
+ tokenProgram,
48995
+ ASSOCIATED_TOKEN_PROGRAM_ID
48996
+ );
48997
+ }
48998
+ var GAMMA_ACCOUNTS_CODER = new BorshAccountsCoder(GAMMA_VAULT_IDL);
48999
+ var lpVaultDiscriminator = Buffer.from([189, 45, 167, 23, 91, 118, 105, 190]);
49000
+ var withdrawReceiptDiscriminator = Buffer.from([132, 238, 44, 182, 207, 9, 124, 140]);
49001
+ var toBN = (v) => BN5.isBN(v) ? v : new BN5((v ?? 0).toString());
49002
+ function decodeGammaLpVaultData(data, pubkey) {
49003
+ if (!data.subarray(0, 8).equals(lpVaultDiscriminator)) {
49004
+ throw new Error("invalid Gamma LpVault account discriminator");
49005
+ }
49006
+ const d = GAMMA_ACCOUNTS_CODER.decode("LpVault", data);
49007
+ return {
49008
+ pubkey,
49009
+ assetsAccount: d.assets_account ?? d.assetsAccount,
49010
+ pendingSharesAccount: d.pending_shares_account ?? d.pendingSharesAccount,
49011
+ sharesMint: d.shares_mint ?? d.sharesMint,
49012
+ assetsMint: d.assets_mint ?? d.assetsMint,
49013
+ fundAuthority: d.fund_authority ?? d.fundAuthority,
49014
+ nav: toBN(d.nav),
49015
+ totalShares: toBN(d.total_shares ?? d.totalShares),
49016
+ navUpdatedAt: toBN(d.nav_updated_at ?? d.navUpdatedAt),
49017
+ navMaxStaleness: toBN(d.nav_max_staleness ?? d.navMaxStaleness),
49018
+ bump: d.bump,
49019
+ vaultName: d.vault_name ?? d.vaultName,
49020
+ pendingWithdrawalValue: toBN(d.pending_withdrawal_value ?? d.pendingWithdrawalValue),
49021
+ feeRecipient: d.fee_recipient ?? d.feeRecipient,
49022
+ performanceFeeBps: d.performance_fee_bps ?? d.performanceFeeBps,
49023
+ assessmentIntervalSecs: toBN(d.assessment_interval_secs ?? d.assessmentIntervalSecs),
49024
+ lastAssessmentTimestamp: toBN(d.last_assessment_timestamp ?? d.lastAssessmentTimestamp),
49025
+ pricePerShareAtLastAssessment: toBN(
49026
+ d.price_per_share_at_last_assessment ?? d.pricePerShareAtLastAssessment
49027
+ ),
49028
+ keeperAuthority: d.keeper_authority ?? d.keeperAuthority
49029
+ };
49030
+ }
49031
+ function decodeGammaWithdrawReceiptData(data, pubkey) {
49032
+ if (!data.subarray(0, 8).equals(withdrawReceiptDiscriminator)) {
49033
+ throw new Error("invalid Gamma WithdrawReceipt account discriminator");
49034
+ }
49035
+ const d = GAMMA_ACCOUNTS_CODER.decode("WithdrawReceipt", data);
49036
+ return {
49037
+ pubkey,
49038
+ user: d.user,
49039
+ lpVault: d.lp_vault ?? d.lpVault,
49040
+ pendingShares: toBN(d.pending_shares ?? d.pendingShares),
49041
+ claimableShares: toBN(d.claimable_shares ?? d.claimableShares),
49042
+ claimableAssets: toBN(d.claimable_assets ?? d.claimableAssets),
49043
+ oldestPendingAt: toBN(d.oldest_pending_at ?? d.oldestPendingAt),
49044
+ bump: d.bump
49045
+ };
49046
+ }
49047
+ var DEPOSIT_DISCRIMINATOR = Buffer.from([242, 35, 198, 137, 82, 225, 242, 182]);
49048
+ var WITHDRAW_DISCRIMINATOR = Buffer.from([183, 18, 70, 156, 148, 109, 161, 34]);
49049
+ var COMPLETE_WITHDRAWAL_DISCRIMINATOR = Buffer.from([107, 98, 134, 131, 74, 120, 174, 121]);
49050
+ var encodeU64 = (amount) => amount.toArrayLike(Buffer, "le", 8);
49051
+ var meta = (pubkey, isSigner, isWritable) => ({
49052
+ pubkey,
49053
+ isSigner,
49054
+ isWritable
49055
+ });
49056
+ function makeGammaDepositIx(accounts, amount) {
49057
+ const tokenProgram = accounts.tokenProgram ?? TOKEN_PROGRAM_ID;
49058
+ const associatedTokenProgram = accounts.associatedTokenProgram ?? ASSOCIATED_TOKEN_PROGRAM_ID;
49059
+ const keys = [
49060
+ meta(accounts.user, true, true),
49061
+ meta(accounts.lpVault, false, true),
49062
+ meta(accounts.withdrawalPolicy, false, true),
49063
+ meta(accounts.assetsAccount, false, true),
49064
+ meta(accounts.userAssetAta, false, true),
49065
+ meta(accounts.userShareAta, false, true),
49066
+ meta(accounts.depositReceipt, false, true),
49067
+ meta(accounts.assetsMint, false, false),
49068
+ meta(accounts.sharesMint, false, true),
49069
+ meta(SystemProgram.programId, false, false),
49070
+ meta(tokenProgram, false, false),
49071
+ meta(associatedTokenProgram, false, false)
49072
+ ];
49073
+ return new TransactionInstruction({
49074
+ keys,
49075
+ programId: GAMMA_VAULT_PROGRAM_ID,
49076
+ data: Buffer.concat([DEPOSIT_DISCRIMINATOR, encodeU64(amount)])
49077
+ });
49078
+ }
49079
+ function makeGammaWithdrawIx(accounts, sharesAmount) {
49080
+ const tokenProgram = accounts.tokenProgram ?? TOKEN_PROGRAM_ID;
49081
+ const associatedTokenProgram = accounts.associatedTokenProgram ?? ASSOCIATED_TOKEN_PROGRAM_ID;
49082
+ const keys = [
49083
+ meta(accounts.user, true, true),
49084
+ meta(accounts.lpVault, false, true),
49085
+ meta(accounts.withdrawalPolicy, false, true),
49086
+ meta(accounts.assetsAccount, false, true),
49087
+ meta(accounts.userShareAta, false, true),
49088
+ meta(accounts.assetsMint, false, false),
49089
+ meta(accounts.sharesMint, false, true),
49090
+ meta(accounts.feeRecipientAccount, false, true),
49091
+ meta(accounts.withdrawEscrow, false, true),
49092
+ meta(accounts.escrowAssetsAccount, false, true),
49093
+ meta(accounts.escrowSharesAccount, false, true),
49094
+ meta(accounts.withdrawReceipt, false, true),
49095
+ meta(SystemProgram.programId, false, false),
49096
+ meta(tokenProgram, false, false),
49097
+ meta(associatedTokenProgram, false, false)
49098
+ ];
49099
+ return new TransactionInstruction({
49100
+ keys,
49101
+ programId: GAMMA_VAULT_PROGRAM_ID,
49102
+ data: Buffer.concat([WITHDRAW_DISCRIMINATOR, encodeU64(sharesAmount)])
49103
+ });
49104
+ }
49105
+ function makeGammaCompleteWithdrawalIx(accounts) {
49106
+ const tokenProgram = accounts.tokenProgram ?? TOKEN_PROGRAM_ID;
49107
+ const associatedTokenProgram = accounts.associatedTokenProgram ?? ASSOCIATED_TOKEN_PROGRAM_ID;
49108
+ const keys = [
49109
+ meta(accounts.user, true, true),
49110
+ meta(accounts.lpVault, false, false),
49111
+ meta(accounts.assetsMint, false, false),
49112
+ meta(accounts.sharesMint, false, true),
49113
+ meta(accounts.userAssetAta, false, true),
49114
+ meta(accounts.withdrawEscrow, false, true),
49115
+ meta(accounts.escrowAssetsAccount, false, true),
49116
+ meta(accounts.escrowSharesAccount, false, true),
49117
+ meta(accounts.withdrawReceipt, false, true),
49118
+ meta(SystemProgram.programId, false, false),
49119
+ meta(tokenProgram, false, false),
49120
+ meta(associatedTokenProgram, false, false)
49121
+ ];
49122
+ return new TransactionInstruction({
49123
+ keys,
49124
+ programId: GAMMA_VAULT_PROGRAM_ID,
49125
+ data: COMPLETE_WITHDRAWAL_DISCRIMINATOR
49126
+ });
49127
+ }
45755
49128
 
45756
- export { ACCOUNT_SIZE, ACCOUNT_TYPE_SIZE, ASSOCIATED_TOKEN_PROGRAM_ID, AccountLayout, AccountState, AccountType, ConnectionClosed, CorpAction, DEFAULT_RECENT_SLOT_DURATION_MS, DRIFT_IDL, DRIFT_PROGRAM_ID, DriftSpotBalanceType, EXPONENT_CLMM_IDL, EXPONENT_CLMM_PROGRAM_ID, EXPONENT_CORE_IDL, EXPONENT_CORE_PROGRAM_ID, EXPONENT_EVENT_AUTHORITY_SEED, EXPONENT_GENERIC_SY_PROGRAM_ID, EXPONENT_JITO_RESTAKING_SY_PROGRAM_ID, EXPONENT_KAMINO_SY_PROGRAM_ID, EXPONENT_MARGINFI_SY_PROGRAM_ID, EXPONENT_NUMBER_DENOM, EXPONENT_ORDERBOOK_PROGRAM_ID, EXPONENT_PERENA_SY_PROGRAM_ID, EXPONENT_VAULTS_PROGRAM_ID, ErrorResponse, ExponentSwapDirection, ExtensionType, FARMS_PROGRAM_ID, JUP_EXCHANGE_PRICES_PRECISION, JUP_LEND_IDL, JUP_LEND_PROGRAM_ID, JUP_LIQUIDITY_IDL, JUP_LIQUIDITY_PROGRAM_ID, JUP_MAX_REWARDS_RATE, JUP_REWARDS_PROGRAM_ID, JUP_SECONDS_PER_YEAR, KFARMS_IDL, KLEND_ACCOUNT_CODER, KLEND_IDL, KLEND_PROGRAM_ID, LENGTH_SIZE, MAX_SLOT_DIFFERENCE, MEMO_PROGRAM_ID, MINT_SIZE, MULTISIG_SIZE, MintLayout, MultisigLayout, NATIVE_MINT, ONE, ONE_HUNDRED_PCT_IN_BPS, ONE_YEAR, PERCENTAGE_PRECISION, PERCENTAGE_PRECISION_EXP, PriceStatus, PriceType, REFRESH_OBLIGATION_DISCRIMINATOR, SEED_BASE_REFERRER_STATE, SEED_BASE_REFERRER_TOKEN_STATE, SEED_BASE_SHORT_URL, SEED_BASE_USER_METADATA, SEED_DRIFT_SIGNER, SEED_DRIFT_STATE, SEED_FEE_RECEIVER, SEED_F_TOKEN_MINT, SEED_LENDING, SEED_LENDING_ADMIN, SEED_LENDING_MARKET_AUTH, SEED_LENDING_REWARDS_RATE_MODEL, SEED_LIQUIDITY, SEED_RATE_MODEL, SEED_RESERVE, SEED_RESERVE_COLL_MINT, SEED_RESERVE_COLL_SUPPLY, SEED_RESERVE_LIQ_SUPPLY, SEED_SPOT_MARKET, SEED_SPOT_MARKET_VAULT, SEED_USER, SEED_USER_CLAIM, SEED_USER_STATE, SEED_USER_STATS, SEED_USER_SUPPLY_POSITION, SLOTS_PER_DAY, SLOTS_PER_HOUR, SLOTS_PER_MINUTE, SLOTS_PER_SECOND, SLOTS_PER_YEAR, SPOT_MARKET_RATE_PRECISION, SPOT_MARKET_RATE_PRECISION_EXP, SPOT_MARKET_UTILIZATION_PRECISION, SPOT_MARKET_UTILIZATION_PRECISION_EXP, SWITCHBOARD_ONDEMANDE_PRICE_PRECISION, SinglePoolInstruction, SplAccountType, SpotBalanceType, StreamError, SwapMode, SwapVersion, TEN, TOKEN_2022_PROGRAM_ID, TOKEN_PROGRAM_ID, TYPE_SIZE, TokenAccountNotFoundError, TokenError, TokenInstruction, TokenInvalidAccountError, TokenInvalidAccountOwnerError, TokenInvalidAccountSizeError, TokenInvalidInstructionDataError, TokenInvalidInstructionKeysError, TokenInvalidInstructionProgramError, TokenInvalidInstructionTypeError, TokenInvalidMintError, TokenInvalidOwnerError, TokenOwnerOffCurveError, TokenUnsupportedInstructionError, V1Client, ZERO, addSigners, approveInstructionData, buildSwapQuoteResult, buildTitanTemplate, calculateAPYFromAPR, calculateDriftBorrowAPR, calculateDriftBorrowAPY, calculateDriftBorrowRate, calculateDriftDepositRate, calculateDriftInterestRate, calculateDriftLendingAPR, calculateDriftLendingAPY, calculateDriftUtilization, calculateJupLendBorrowRate, calculateJupLendLiquiditySupplyRate, calculateJupLendNewExchangePrice, calculateJupLendRewardsRate, calculateJupLendRewardsRateForExchangePrice, calculateJupLendSupplyAPY, calculateJupLendSupplyRate, calculateJupLendTotalAssets, calculateKaminoEstimatedBorrowRate, calculateKaminoEstimatedSupplyRate, calculateKaminoSupplyAPY, calculateRewardApy, calculateSlotAdjustmentFactor, calculateUtilizationRatio, closeAccountInstructionData, createAccountIx, createApproveInstruction, createAssociatedTokenAccountIdempotentInstruction, createAssociatedTokenAccountInstruction, createCloseAccountInstruction, createInitializeAccountInstruction, createMemoInstruction, createPoolOnrampIx, createSyncNativeInstruction, createTransferCheckedInstruction, decodeDriftSpotMarketData, decodeDriftStateData, decodeDriftUserData, decodeDriftUserStatsData, decodeExponentMarketThree, decodeExponentMarketTwo, decodeExponentMarketVault, decodeExponentVault, decodeFarmDataRaw, decodeJupLendingRewardsRateModelData, decodeJupLendingStateData, decodeJupRateModelData, decodeJupTokenReserveData, decodeKlendObligationData, decodeKlendReserveData, decodeSwitchboardPullFeedData, deriveBaseObligation, deriveDriftSigner, deriveDriftSpotMarket, deriveDriftSpotMarketVault, deriveDriftState, deriveDriftUser, deriveDriftUserStats, deriveExponentClmmEventAuthority, deriveExponentEventAuthority, deriveFeeReceiver, deriveJupLendClaimAccount, deriveJupLendFTokenMint, deriveJupLendLending, deriveJupLendLendingAdmin, deriveJupLendLendingPdas, deriveJupLendLendingRewardsRateModel, deriveJupLendLiquidity, deriveJupLendLiquiditySupplyPositionPda, deriveJupLendLiquidityVaultAta, deriveJupLendRateModel, deriveJupLendTokenReserve, deriveLendingMarketAuthority, deriveObligation, deriveReferrerState, deriveReferrerTokenState, deriveReserveCollateralMint, deriveReserveCollateralSupply, deriveReserveLiquiditySupply, deriveShortUrl, deriveUserMetadata, deriveUserState, deserializeSerializedInstruction, deserializeTitanWireInstruction, driftRewardsRawToDto, driftSpotMarketRawToDto, driftStateRawToDto, driftUserRawToDto, driftUserStatsRawToDto, dtoToDriftRewardsRaw, dtoToDriftSpotMarketRaw, dtoToDriftStateRaw, dtoToDriftUserRaw, dtoToDriftUserStatsRaw, dtoToJupLendingRewardsRateModelRaw, dtoToJupLendingStateRaw, dtoToJupRateModelRaw, dtoToJupTokenReserveRaw, dtoToKaminoFarmState, dtoToKaminoObligation, dtoToKaminoReserve, encodeTitanTemplate, exponentBuyPtArgs, exponentClmmBuyPtArgs, exponentNumberToBigNumber, fetchExponentMarketThree, fetchExponentMarketTwo, fetchExponentVault, fetchExponentVaultFromMarket, fetchTitanQuoteSwapV3, findMplMetadataAddress, findPoolAddress, findPoolMintAddress, findPoolMintAddressByVoteAccount, findPoolMintAuthorityAddress, findPoolMplAuthorityAddress, findPoolOnRampAddress, findPoolStakeAddress, findPoolStakeAuthorityAddress, generateDriftReserveCurve, generateJupLendSupplyCurve, generateKaminoReserveCurve, getAccount, getAccountLen, getAllDerivedDriftAccounts, getAllDerivedJupLendAccounts, getAllDerivedKaminoAccounts, getAllRequiredMarkets, getAssociatedTokenAddressSync, getDriftRewards, getDriftTokenAmount, getFixedHostInterestRate, getJupLendRewards, getKaminoBorrowRate, getKaminoTotalSupply, getMinimumBalanceForRentExemptAccount, getMinimumBalanceForRentExemptAccountWithExtensions, getMint, getMintDecimals, getMultipleAccounts, getProtocolTakeRatePct, getReserveRewardsApy, getRewardPerTimeUnitSecond, getStakeAccount, getSwitchboardProgram, initializeAccountInstructionData, initializeStakedPoolIxs, initializeStakedPoolTx, instructionToTitanWire, interpolateLinear, isJitoDontFront, isSpotBalanceTypeVariant, jupLendingRewardsRateModelRawToDto, jupLendingStateRawToDto, jupRateModelRawToDto, jupTokenReserveRawToDto, kaminoFarmStateToDto, kaminoObligationToDto, kaminoReserveToDto, layout, lutToTitanWire, makeExponentClmmTradePtIx, makeExponentMergeIx, makeExponentStripIx, makeExponentTradePtIx, makeExponentWrapperMergeIx, makeRefreshObligationIx, makeRefreshReservesBatchIx, makeRefreshingIxs, makeSplStakePoolUpdateBalanceIx, makeUpdateJupLendRate, makeUpdateJupLendRateIx, makeUpdateSpotMarketCumulativeInterestIx, makeUpdateSpotMarketIx, parsePriceData, parsePriceInfo2 as parsePriceInfo, replenishPoolIx, resolveExponentClmmTradePtContext, resolveExponentMergeContext, resolveExponentStripContext, resolveExponentTradePtContext, resolveExponentWrapperMergeContext, resolveLookupTables, scaledSupplies, selectBestRoute, selectGatewayRoute, slotAdjustmentFactor, switchboardAccountCoder, syncNativeInstructionData, transferCheckedInstructionData, truncateBorrowCurve, unpackAccount };
49129
+ export { ACCOUNT_SIZE, ACCOUNT_TYPE_SIZE, ASSOCIATED_TOKEN_PROGRAM_ID, AccountLayout, AccountState, AccountType, ConnectionClosed, CorpAction, DEFAULT_RECENT_SLOT_DURATION_MS, DRIFT_IDL, DRIFT_PROGRAM_ID, DriftSpotBalanceType, EXPONENT_CLMM_IDL, EXPONENT_CLMM_PROGRAM_ID, EXPONENT_CORE_IDL, EXPONENT_CORE_PROGRAM_ID, EXPONENT_EVENT_AUTHORITY_SEED, EXPONENT_GENERIC_SY_PROGRAM_ID, EXPONENT_JITO_RESTAKING_SY_PROGRAM_ID, EXPONENT_KAMINO_SY_PROGRAM_ID, EXPONENT_MARGINFI_SY_PROGRAM_ID, EXPONENT_NUMBER_DENOM, EXPONENT_ORDERBOOK_PROGRAM_ID, EXPONENT_PERENA_SY_PROGRAM_ID, EXPONENT_VAULTS_PROGRAM_ID, ErrorResponse, ExponentSwapDirection, ExtensionType, FARMS_PROGRAM_ID, GAMMA_VAULT_IDL, GAMMA_VAULT_PROGRAM_ID, JUP_EXCHANGE_PRICES_PRECISION, JUP_LEND_IDL, JUP_LEND_PROGRAM_ID, JUP_LIQUIDITY_IDL, JUP_LIQUIDITY_PROGRAM_ID, JUP_MAX_REWARDS_RATE, JUP_REWARDS_PROGRAM_ID, JUP_SECONDS_PER_YEAR, KFARMS_IDL, KLEND_ACCOUNT_CODER, KLEND_IDL, KLEND_PROGRAM_ID, LENGTH_SIZE, MAX_SLOT_DIFFERENCE, MEMO_PROGRAM_ID, MINT_SIZE, MULTISIG_SIZE, MintLayout, MultisigLayout, NATIVE_MINT, ONE, ONE_HUNDRED_PCT_IN_BPS, ONE_YEAR, PERCENTAGE_PRECISION, PERCENTAGE_PRECISION_EXP, PriceStatus, PriceType, REFRESH_OBLIGATION_DISCRIMINATOR, SEED_BASE_REFERRER_STATE, SEED_BASE_REFERRER_TOKEN_STATE, SEED_BASE_SHORT_URL, SEED_BASE_USER_METADATA, SEED_DEPOSIT_RECEIPT, SEED_DRIFT_SIGNER, SEED_DRIFT_STATE, SEED_FEE_RECEIVER, SEED_F_TOKEN_MINT, SEED_LENDING, SEED_LENDING_ADMIN, SEED_LENDING_MARKET_AUTH, SEED_LENDING_REWARDS_RATE_MODEL, SEED_LIQUIDITY, SEED_RATE_MODEL, SEED_RESERVE, SEED_RESERVE_COLL_MINT, SEED_RESERVE_COLL_SUPPLY, SEED_RESERVE_LIQ_SUPPLY, SEED_SPOT_MARKET, SEED_SPOT_MARKET_VAULT, SEED_USER, SEED_USER_CLAIM, SEED_USER_STATE, SEED_USER_STATS, SEED_USER_SUPPLY_POSITION, SEED_WITHDRAWAL_POLICY, SEED_WITHDRAW_ESCROW, SEED_WITHDRAW_RECEIPT, SLOTS_PER_DAY, SLOTS_PER_HOUR, SLOTS_PER_MINUTE, SLOTS_PER_SECOND, SLOTS_PER_YEAR, SPOT_MARKET_RATE_PRECISION, SPOT_MARKET_RATE_PRECISION_EXP, SPOT_MARKET_UTILIZATION_PRECISION, SPOT_MARKET_UTILIZATION_PRECISION_EXP, SWITCHBOARD_ONDEMANDE_PRICE_PRECISION, SinglePoolInstruction, SplAccountType, SpotBalanceType, StreamError, SwapMode, SwapVersion, TEN, TOKEN_2022_PROGRAM_ID, TOKEN_PROGRAM_ID, TYPE_SIZE, TokenAccountNotFoundError, TokenError, TokenInstruction, TokenInvalidAccountError, TokenInvalidAccountOwnerError, TokenInvalidAccountSizeError, TokenInvalidInstructionDataError, TokenInvalidInstructionKeysError, TokenInvalidInstructionProgramError, TokenInvalidInstructionTypeError, TokenInvalidMintError, TokenInvalidOwnerError, TokenOwnerOffCurveError, TokenUnsupportedInstructionError, V1Client, ZERO, addSigners, approveInstructionData, buildSwapQuoteResult, buildTitanTemplate, calculateAPYFromAPR, calculateDriftBorrowAPR, calculateDriftBorrowAPY, calculateDriftBorrowRate, calculateDriftDepositRate, calculateDriftInterestRate, calculateDriftLendingAPR, calculateDriftLendingAPY, calculateDriftUtilization, calculateJupLendBorrowRate, calculateJupLendLiquiditySupplyRate, calculateJupLendNewExchangePrice, calculateJupLendRewardsRate, calculateJupLendRewardsRateForExchangePrice, calculateJupLendSupplyAPY, calculateJupLendSupplyRate, calculateJupLendTotalAssets, calculateKaminoEstimatedBorrowRate, calculateKaminoEstimatedSupplyRate, calculateKaminoSupplyAPY, calculateRewardApy, calculateSlotAdjustmentFactor, calculateUtilizationRatio, closeAccountInstructionData, createAccountIx, createApproveInstruction, createAssociatedTokenAccountIdempotentInstruction, createAssociatedTokenAccountInstruction, createCloseAccountInstruction, createInitializeAccountInstruction, createMemoInstruction, createPoolOnrampIx, createSyncNativeInstruction, createTransferCheckedInstruction, decodeDriftSpotMarketData, decodeDriftStateData, decodeDriftUserData, decodeDriftUserStatsData, decodeExponentMarketThree, decodeExponentMarketTwo, decodeExponentMarketVault, decodeExponentVault, decodeFarmDataRaw, decodeGammaLpVaultData, decodeGammaWithdrawReceiptData, decodeJupLendingRewardsRateModelData, decodeJupLendingStateData, decodeJupRateModelData, decodeJupTokenReserveData, decodeKlendObligationData, decodeKlendReserveData, decodeSwitchboardPullFeedData, deriveBaseObligation, deriveDriftSigner, deriveDriftSpotMarket, deriveDriftSpotMarketVault, deriveDriftState, deriveDriftUser, deriveDriftUserStats, deriveExponentClmmEventAuthority, deriveExponentEventAuthority, deriveFeeReceiver, deriveGammaAta, deriveGammaDepositReceipt, deriveGammaWithdrawEscrow, deriveGammaWithdrawReceipt, deriveGammaWithdrawalPolicy, deriveJupLendClaimAccount, deriveJupLendFTokenMint, deriveJupLendLending, deriveJupLendLendingAdmin, deriveJupLendLendingPdas, deriveJupLendLendingRewardsRateModel, deriveJupLendLiquidity, deriveJupLendLiquiditySupplyPositionPda, deriveJupLendLiquidityVaultAta, deriveJupLendRateModel, deriveJupLendTokenReserve, deriveLendingMarketAuthority, deriveObligation, deriveReferrerState, deriveReferrerTokenState, deriveReserveCollateralMint, deriveReserveCollateralSupply, deriveReserveLiquiditySupply, deriveShortUrl, deriveUserMetadata, deriveUserState, deserializeSerializedInstruction, deserializeTitanWireInstruction, driftRewardsRawToDto, driftSpotMarketRawToDto, driftStateRawToDto, driftUserRawToDto, driftUserStatsRawToDto, dtoToDriftRewardsRaw, dtoToDriftSpotMarketRaw, dtoToDriftStateRaw, dtoToDriftUserRaw, dtoToDriftUserStatsRaw, dtoToJupLendingRewardsRateModelRaw, dtoToJupLendingStateRaw, dtoToJupRateModelRaw, dtoToJupTokenReserveRaw, dtoToKaminoFarmState, dtoToKaminoObligation, dtoToKaminoReserve, encodeTitanTemplate, exponentBuyPtArgs, exponentClmmBuyPtArgs, exponentNumberToBigNumber, fetchExponentMarketThree, fetchExponentMarketTwo, fetchExponentVault, fetchExponentVaultFromMarket, fetchTitanQuoteSwapV3, findMplMetadataAddress, findPoolAddress, findPoolMintAddress, findPoolMintAddressByVoteAccount, findPoolMintAuthorityAddress, findPoolMplAuthorityAddress, findPoolOnRampAddress, findPoolStakeAddress, findPoolStakeAuthorityAddress, generateDriftReserveCurve, generateJupLendSupplyCurve, generateKaminoReserveCurve, getAccount, getAccountLen, getAllDerivedDriftAccounts, getAllDerivedJupLendAccounts, getAllDerivedKaminoAccounts, getAllRequiredMarkets, getAssociatedTokenAddressSync, getDriftRewards, getDriftTokenAmount, getFixedHostInterestRate, getJupLendRewards, getKaminoBorrowRate, getKaminoTotalSupply, getMinimumBalanceForRentExemptAccount, getMinimumBalanceForRentExemptAccountWithExtensions, getMint, getMintDecimals, getMultipleAccounts, getProtocolTakeRatePct, getReserveRewardsApy, getRewardPerTimeUnitSecond, getStakeAccount, getSwitchboardProgram, initializeAccountInstructionData, initializeStakedPoolIxs, initializeStakedPoolTx, instructionToTitanWire, interpolateLinear, isJitoDontFront, isSpotBalanceTypeVariant, jupLendingRewardsRateModelRawToDto, jupLendingStateRawToDto, jupRateModelRawToDto, jupTokenReserveRawToDto, kaminoFarmStateToDto, kaminoObligationToDto, kaminoReserveToDto, layout, lutToTitanWire, makeExponentClmmTradePtIx, makeExponentMergeIx, makeExponentStripIx, makeExponentTradePtIx, makeExponentWrapperMergeIx, makeGammaCompleteWithdrawalIx, makeGammaDepositIx, makeGammaWithdrawIx, makeRefreshObligationIx, makeRefreshReservesBatchIx, makeRefreshingIxs, makeSplStakePoolUpdateBalanceIx, makeUpdateJupLendRate, makeUpdateJupLendRateIx, makeUpdateSpotMarketCumulativeInterestIx, makeUpdateSpotMarketIx, parsePriceData, parsePriceInfo2 as parsePriceInfo, replenishPoolIx, resolveExponentClmmTradePtContext, resolveExponentMergeContext, resolveExponentStripContext, resolveExponentTradePtContext, resolveExponentWrapperMergeContext, resolveLookupTables, scaledSupplies, selectBestRoute, selectGatewayRoute, slotAdjustmentFactor, switchboardAccountCoder, syncNativeInstructionData, transferCheckedInstructionData, truncateBorrowCurve, unpackAccount };
45757
49130
  //# sourceMappingURL=vendor.js.map
45758
49131
  //# sourceMappingURL=vendor.js.map