@perena/vault-sdk 1.0.18 → 1.0.19

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.
Files changed (4) hide show
  1. package/README.md +63 -7
  2. package/dist/index.d.ts +2613 -497
  3. package/dist/index.js +2721 -546
  4. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1445,6 +1445,7 @@ __export(index_exports, {
1445
1445
  UpdateConsensusSignersBuilder: () => UpdateConsensusSignersBuilder,
1446
1446
  UpdateTrancheConfigBuilder: () => UpdateTrancheConfigBuilder,
1447
1447
  VAULT_CACHE_CATEGORY: () => VAULT_CACHE_CATEGORY,
1448
+ VAULT_CREATOR_WHITELIST: () => VAULT_CREATOR_WHITELIST,
1448
1449
  VAULT_ENVIRONMENTS: () => VAULT_ENVIRONMENTS,
1449
1450
  VAULT_ORACLE_CACHE_CATEGORY: () => VAULT_ORACLE_CACHE_CATEGORY,
1450
1451
  VAULT_PROGRAM_ID: () => VAULT_PROGRAM_ID,
@@ -1511,6 +1512,9 @@ var PROGRAM_FEE_EXEMPT_OWNER_WHITELIST = [
1511
1512
  (0, import_kit.address)("7C39GeKrqLygmgV9D4bicUaiyFhKrX6Eevk6PDACwuj7"),
1512
1513
  (0, import_kit.address)("LYC8YiiSzQfPpxUW2tpxfuPKGZwywAJhXKUfDP2B66f")
1513
1514
  ];
1515
+ var VAULT_CREATOR_WHITELIST = [
1516
+ (0, import_kit.address)("11111111111111111111111111111111")
1517
+ ];
1514
1518
  var TOKEN_PROGRAM_ID = (0, import_kit.address)(
1515
1519
  import_spl_token.TOKEN_2022_PROGRAM_ID.toBase58()
1516
1520
  );
@@ -2990,27 +2994,24 @@ var IDL = {
2990
2994
  {
2991
2995
  "name": "share_mint",
2992
2996
  "docs": [
2993
- "Curator-supplied share mint. Unless `for_migration`, must have zero supply",
2994
- "with mint authority on the curator; authority is transferred to the vault",
2995
- "PDA on success. Migration uses the legacy bank mint and defers transfer."
2997
+ "Curator-supplied share mint. Its decimals must match `asset_mint`.",
2998
+ "Unless `for_migration`, it must have zero supply with mint authority on",
2999
+ "the curator; authority is transferred to the vault PDA on success.",
3000
+ "Migration uses the legacy bank mint and defers transfer."
2996
3001
  ],
2997
3002
  "writable": true
2998
3003
  },
2999
3004
  {
3000
3005
  "name": "asset_mint",
3001
3006
  "docs": [
3002
- "Base (strict) asset mint. Required in `Strict` mode so the base holding is",
3003
- "created with the mint's real decimals and token program; omitted in",
3004
- "`Whitelist` mode."
3005
- ],
3006
- "optional": true
3007
+ "Base asset mint used to create the vault's permanent base holding."
3008
+ ]
3007
3009
  },
3008
3010
  {
3009
3011
  "name": "asset_token_program",
3010
3012
  "docs": [
3011
3013
  "Token program owning `asset_mint`."
3012
- ],
3013
- "optional": true
3014
+ ]
3014
3015
  },
3015
3016
  {
3016
3017
  "name": "token_program"
@@ -3069,7 +3070,12 @@ var IDL = {
3069
3070
  ],
3070
3071
  "accounts": [
3071
3072
  {
3072
- "name": "user"
3073
+ "name": "user",
3074
+ "docs": [
3075
+ "Token-account authority. May be a transaction signer or a PDA signer",
3076
+ "supplied by an integrating program through `invoke_signed`."
3077
+ ],
3078
+ "signer": true
3073
3079
  },
3074
3080
  {
3075
3081
  "name": "vault",
@@ -3346,26 +3352,24 @@ var IDL = {
3346
3352
  ]
3347
3353
  },
3348
3354
  {
3349
- "name": "execute_share_swap",
3350
- "docs": [
3351
- "Convert regular vault shares into tranche shares (senior or junior).",
3352
- "No underlying assets move; the backing simply shifts from the regular",
3353
- "pool into the selected tranche class."
3354
- ],
3355
+ "name": "execute_deposit_fee_exempt",
3355
3356
  "discriminator": [
3356
- 127,
3357
- 53,
3358
- 127,
3359
- 156,
3360
- 151,
3361
- 80,
3362
- 135,
3363
- 67
3357
+ 99,
3358
+ 227,
3359
+ 32,
3360
+ 27,
3361
+ 95,
3362
+ 184,
3363
+ 49,
3364
+ 2
3364
3365
  ],
3365
3366
  "accounts": [
3366
3367
  {
3367
3368
  "name": "user",
3368
- "writable": true,
3369
+ "docs": [
3370
+ "Token-account authority. May be a transaction signer or a PDA signer",
3371
+ "supplied by an integrating program through `invoke_signed`."
3372
+ ],
3369
3373
  "signer": true
3370
3374
  },
3371
3375
  {
@@ -3377,27 +3381,23 @@ var IDL = {
3377
3381
  },
3378
3382
  {
3379
3383
  "name": "vault_tranche_state",
3380
- "writable": true
3384
+ "optional": true
3381
3385
  },
3382
3386
  {
3383
- "name": "share_mint",
3387
+ "name": "asset_mint",
3384
3388
  "docs": [
3385
- "Regular vault share mint. The user burns from this."
3386
- ],
3387
- "writable": true
3389
+ "Mint being deposited. Must match the vault's asset-mode rule."
3390
+ ]
3388
3391
  },
3389
3392
  {
3390
- "name": "tranche_share_mint",
3393
+ "name": "share_mint",
3391
3394
  "docs": [
3392
- "Target tranche share mint (senior or junior, as selected by `kind`)."
3395
+ "Vault's share mint (mint authority = vault PDA)."
3393
3396
  ],
3394
3397
  "writable": true
3395
3398
  },
3396
3399
  {
3397
- "name": "user_share_ata",
3398
- "docs": [
3399
- "User's regular-share ATA (burned from)."
3400
- ],
3400
+ "name": "user_asset_ata",
3401
3401
  "writable": true,
3402
3402
  "pda": {
3403
3403
  "seeds": [
@@ -3407,11 +3407,11 @@ var IDL = {
3407
3407
  },
3408
3408
  {
3409
3409
  "kind": "account",
3410
- "path": "share_token_program"
3410
+ "path": "asset_token_program"
3411
3411
  },
3412
3412
  {
3413
3413
  "kind": "account",
3414
- "path": "share_mint"
3414
+ "path": "asset_mint"
3415
3415
  }
3416
3416
  ],
3417
3417
  "program": {
@@ -3454,24 +3454,21 @@ var IDL = {
3454
3454
  }
3455
3455
  },
3456
3456
  {
3457
- "name": "user_tranche_share_ata",
3458
- "docs": [
3459
- "User's tranche-share ATA (minted into, created if absent)."
3460
- ],
3457
+ "name": "vault_asset_ata",
3461
3458
  "writable": true,
3462
3459
  "pda": {
3463
3460
  "seeds": [
3464
3461
  {
3465
3462
  "kind": "account",
3466
- "path": "user"
3463
+ "path": "vault"
3467
3464
  },
3468
3465
  {
3469
3466
  "kind": "account",
3470
- "path": "tranche_share_token_program"
3467
+ "path": "asset_token_program"
3471
3468
  },
3472
3469
  {
3473
3470
  "kind": "account",
3474
- "path": "tranche_share_mint"
3471
+ "path": "asset_mint"
3475
3472
  }
3476
3473
  ],
3477
3474
  "program": {
@@ -3514,85 +3511,21 @@ var IDL = {
3514
3511
  }
3515
3512
  },
3516
3513
  {
3517
- "name": "share_token_program",
3518
- "docs": [
3519
- "Token program for the regular vault share mint."
3520
- ]
3521
- },
3522
- {
3523
- "name": "tranche_share_token_program",
3514
+ "name": "fee_vault",
3524
3515
  "docs": [
3525
- "Token program for the tranche share mint."
3526
- ]
3527
- },
3528
- {
3529
- "name": "associated_token_program",
3530
- "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
3531
- },
3532
- {
3533
- "name": "system_program",
3534
- "address": "11111111111111111111111111111111"
3535
- }
3536
- ],
3537
- "args": [
3538
- {
3539
- "name": "kind",
3540
- "type": {
3541
- "defined": {
3542
- "name": "TrancheKind"
3543
- }
3544
- }
3545
- },
3546
- {
3547
- "name": "share_amount",
3548
- "type": "u64"
3549
- }
3550
- ]
3551
- },
3552
- {
3553
- "name": "execute_tranche_deposit",
3554
- "discriminator": [
3555
- 231,
3556
- 224,
3557
- 46,
3558
- 207,
3559
- 175,
3560
- 45,
3561
- 77,
3562
- 148
3563
- ],
3564
- "accounts": [
3565
- {
3566
- "name": "user",
3567
- "writable": true,
3568
- "signer": true
3569
- },
3570
- {
3571
- "name": "vault",
3572
- "writable": true
3573
- },
3574
- {
3575
- "name": "vault_oracle"
3576
- },
3577
- {
3578
- "name": "vault_tranche_state",
3579
- "writable": true
3580
- },
3581
- {
3582
- "name": "asset_mint"
3583
- },
3584
- {
3585
- "name": "tranche_share_mint",
3516
+ "Per-vault fee-vault PDA: token authority + accounting. The mint fee",
3517
+ "accrues here and is swept to the fee collector by the permissionless crank."
3518
+ ],
3586
3519
  "writable": true
3587
3520
  },
3588
3521
  {
3589
- "name": "user_asset_ata",
3522
+ "name": "fee_vault_ata",
3590
3523
  "writable": true,
3591
3524
  "pda": {
3592
3525
  "seeds": [
3593
3526
  {
3594
3527
  "kind": "account",
3595
- "path": "user"
3528
+ "path": "fee_vault"
3596
3529
  },
3597
3530
  {
3598
3531
  "kind": "account",
@@ -3643,21 +3576,21 @@ var IDL = {
3643
3576
  }
3644
3577
  },
3645
3578
  {
3646
- "name": "vault_asset_ata",
3579
+ "name": "user_share_ata",
3647
3580
  "writable": true,
3648
3581
  "pda": {
3649
3582
  "seeds": [
3650
3583
  {
3651
3584
  "kind": "account",
3652
- "path": "vault"
3585
+ "path": "user"
3653
3586
  },
3654
3587
  {
3655
3588
  "kind": "account",
3656
- "path": "asset_token_program"
3589
+ "path": "share_token_program"
3657
3590
  },
3658
3591
  {
3659
3592
  "kind": "account",
3660
- "path": "asset_mint"
3593
+ "path": "share_mint"
3661
3594
  }
3662
3595
  ],
3663
3596
  "program": {
@@ -3700,29 +3633,92 @@ var IDL = {
3700
3633
  }
3701
3634
  },
3702
3635
  {
3703
- "name": "fee_vault",
3636
+ "name": "asset_token_program"
3637
+ },
3638
+ {
3639
+ "name": "share_token_program"
3640
+ }
3641
+ ],
3642
+ "args": [
3643
+ {
3644
+ "name": "amount",
3645
+ "type": "u64"
3646
+ },
3647
+ {
3648
+ "name": "signer_seeds",
3649
+ "type": {
3650
+ "vec": "bytes"
3651
+ }
3652
+ }
3653
+ ]
3654
+ },
3655
+ {
3656
+ "name": "execute_share_swap",
3657
+ "docs": [
3658
+ "Convert regular vault shares into tranche shares (senior or junior).",
3659
+ "No underlying assets move; the backing simply shifts from the regular",
3660
+ "pool into the selected tranche class."
3661
+ ],
3662
+ "discriminator": [
3663
+ 127,
3664
+ 53,
3665
+ 127,
3666
+ 156,
3667
+ 151,
3668
+ 80,
3669
+ 135,
3670
+ 67
3671
+ ],
3672
+ "accounts": [
3673
+ {
3674
+ "name": "user",
3675
+ "writable": true,
3676
+ "signer": true
3677
+ },
3678
+ {
3679
+ "name": "vault",
3680
+ "writable": true
3681
+ },
3682
+ {
3683
+ "name": "vault_oracle"
3684
+ },
3685
+ {
3686
+ "name": "vault_tranche_state",
3687
+ "writable": true
3688
+ },
3689
+ {
3690
+ "name": "share_mint",
3704
3691
  "docs": [
3705
- "Per-vault fee-vault PDA: token authority + accounting. Mint fees",
3706
- "accrue here and are swept by the permissionless fee crank."
3692
+ "Regular vault share mint. The user burns from this."
3707
3693
  ],
3708
3694
  "writable": true
3709
3695
  },
3710
3696
  {
3711
- "name": "fee_vault_ata",
3697
+ "name": "tranche_share_mint",
3698
+ "docs": [
3699
+ "Target tranche share mint (senior or junior, as selected by `kind`)."
3700
+ ],
3701
+ "writable": true
3702
+ },
3703
+ {
3704
+ "name": "user_share_ata",
3705
+ "docs": [
3706
+ "User's regular-share ATA (burned from)."
3707
+ ],
3712
3708
  "writable": true,
3713
3709
  "pda": {
3714
3710
  "seeds": [
3715
3711
  {
3716
3712
  "kind": "account",
3717
- "path": "fee_vault"
3713
+ "path": "user"
3718
3714
  },
3719
3715
  {
3720
3716
  "kind": "account",
3721
- "path": "asset_token_program"
3717
+ "path": "share_token_program"
3722
3718
  },
3723
3719
  {
3724
3720
  "kind": "account",
3725
- "path": "asset_mint"
3721
+ "path": "share_mint"
3726
3722
  }
3727
3723
  ],
3728
3724
  "program": {
@@ -3766,6 +3762,9 @@ var IDL = {
3766
3762
  },
3767
3763
  {
3768
3764
  "name": "user_tranche_share_ata",
3765
+ "docs": [
3766
+ "User's tranche-share ATA (minted into, created if absent)."
3767
+ ],
3769
3768
  "writable": true,
3770
3769
  "pda": {
3771
3770
  "seeds": [
@@ -3775,7 +3774,7 @@ var IDL = {
3775
3774
  },
3776
3775
  {
3777
3776
  "kind": "account",
3778
- "path": "share_token_program"
3777
+ "path": "tranche_share_token_program"
3779
3778
  },
3780
3779
  {
3781
3780
  "kind": "account",
@@ -3822,10 +3821,16 @@ var IDL = {
3822
3821
  }
3823
3822
  },
3824
3823
  {
3825
- "name": "asset_token_program"
3824
+ "name": "share_token_program",
3825
+ "docs": [
3826
+ "Token program for the regular vault share mint."
3827
+ ]
3826
3828
  },
3827
3829
  {
3828
- "name": "share_token_program"
3830
+ "name": "tranche_share_token_program",
3831
+ "docs": [
3832
+ "Token program for the tranche share mint."
3833
+ ]
3829
3834
  },
3830
3835
  {
3831
3836
  "name": "associated_token_program",
@@ -3846,24 +3851,24 @@ var IDL = {
3846
3851
  }
3847
3852
  },
3848
3853
  {
3849
- "name": "amount",
3854
+ "name": "share_amount",
3850
3855
  "type": "u64"
3851
3856
  }
3852
3857
  ]
3853
3858
  },
3854
3859
  {
3855
- "name": "execute_tranche_withdraw",
3860
+ "name": "execute_tranche_deposit",
3856
3861
  "discriminator": [
3857
- 240,
3858
- 82,
3859
- 254,
3860
- 246,
3861
- 177,
3862
- 29,
3863
- 57,
3864
- 126
3865
- ],
3866
- "accounts": [
3862
+ 231,
3863
+ 224,
3864
+ 46,
3865
+ 207,
3866
+ 175,
3867
+ 45,
3868
+ 77,
3869
+ 148
3870
+ ],
3871
+ "accounts": [
3867
3872
  {
3868
3873
  "name": "user",
3869
3874
  "writable": true,
@@ -3945,13 +3950,1755 @@ var IDL = {
3945
3950
  }
3946
3951
  },
3947
3952
  {
3948
- "name": "vault_asset_ata",
3953
+ "name": "vault_asset_ata",
3954
+ "writable": true,
3955
+ "pda": {
3956
+ "seeds": [
3957
+ {
3958
+ "kind": "account",
3959
+ "path": "vault"
3960
+ },
3961
+ {
3962
+ "kind": "account",
3963
+ "path": "asset_token_program"
3964
+ },
3965
+ {
3966
+ "kind": "account",
3967
+ "path": "asset_mint"
3968
+ }
3969
+ ],
3970
+ "program": {
3971
+ "kind": "const",
3972
+ "value": [
3973
+ 140,
3974
+ 151,
3975
+ 37,
3976
+ 143,
3977
+ 78,
3978
+ 36,
3979
+ 137,
3980
+ 241,
3981
+ 187,
3982
+ 61,
3983
+ 16,
3984
+ 41,
3985
+ 20,
3986
+ 142,
3987
+ 13,
3988
+ 131,
3989
+ 11,
3990
+ 90,
3991
+ 19,
3992
+ 153,
3993
+ 218,
3994
+ 255,
3995
+ 16,
3996
+ 132,
3997
+ 4,
3998
+ 142,
3999
+ 123,
4000
+ 216,
4001
+ 219,
4002
+ 233,
4003
+ 248,
4004
+ 89
4005
+ ]
4006
+ }
4007
+ }
4008
+ },
4009
+ {
4010
+ "name": "fee_vault",
4011
+ "docs": [
4012
+ "Per-vault fee-vault PDA: token authority + accounting. Mint fees",
4013
+ "accrue here and are swept by the permissionless fee crank."
4014
+ ],
4015
+ "writable": true
4016
+ },
4017
+ {
4018
+ "name": "fee_vault_ata",
4019
+ "writable": true,
4020
+ "pda": {
4021
+ "seeds": [
4022
+ {
4023
+ "kind": "account",
4024
+ "path": "fee_vault"
4025
+ },
4026
+ {
4027
+ "kind": "account",
4028
+ "path": "asset_token_program"
4029
+ },
4030
+ {
4031
+ "kind": "account",
4032
+ "path": "asset_mint"
4033
+ }
4034
+ ],
4035
+ "program": {
4036
+ "kind": "const",
4037
+ "value": [
4038
+ 140,
4039
+ 151,
4040
+ 37,
4041
+ 143,
4042
+ 78,
4043
+ 36,
4044
+ 137,
4045
+ 241,
4046
+ 187,
4047
+ 61,
4048
+ 16,
4049
+ 41,
4050
+ 20,
4051
+ 142,
4052
+ 13,
4053
+ 131,
4054
+ 11,
4055
+ 90,
4056
+ 19,
4057
+ 153,
4058
+ 218,
4059
+ 255,
4060
+ 16,
4061
+ 132,
4062
+ 4,
4063
+ 142,
4064
+ 123,
4065
+ 216,
4066
+ 219,
4067
+ 233,
4068
+ 248,
4069
+ 89
4070
+ ]
4071
+ }
4072
+ }
4073
+ },
4074
+ {
4075
+ "name": "user_tranche_share_ata",
4076
+ "writable": true,
4077
+ "pda": {
4078
+ "seeds": [
4079
+ {
4080
+ "kind": "account",
4081
+ "path": "user"
4082
+ },
4083
+ {
4084
+ "kind": "account",
4085
+ "path": "share_token_program"
4086
+ },
4087
+ {
4088
+ "kind": "account",
4089
+ "path": "tranche_share_mint"
4090
+ }
4091
+ ],
4092
+ "program": {
4093
+ "kind": "const",
4094
+ "value": [
4095
+ 140,
4096
+ 151,
4097
+ 37,
4098
+ 143,
4099
+ 78,
4100
+ 36,
4101
+ 137,
4102
+ 241,
4103
+ 187,
4104
+ 61,
4105
+ 16,
4106
+ 41,
4107
+ 20,
4108
+ 142,
4109
+ 13,
4110
+ 131,
4111
+ 11,
4112
+ 90,
4113
+ 19,
4114
+ 153,
4115
+ 218,
4116
+ 255,
4117
+ 16,
4118
+ 132,
4119
+ 4,
4120
+ 142,
4121
+ 123,
4122
+ 216,
4123
+ 219,
4124
+ 233,
4125
+ 248,
4126
+ 89
4127
+ ]
4128
+ }
4129
+ }
4130
+ },
4131
+ {
4132
+ "name": "asset_token_program"
4133
+ },
4134
+ {
4135
+ "name": "share_token_program"
4136
+ },
4137
+ {
4138
+ "name": "associated_token_program",
4139
+ "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
4140
+ },
4141
+ {
4142
+ "name": "system_program",
4143
+ "address": "11111111111111111111111111111111"
4144
+ }
4145
+ ],
4146
+ "args": [
4147
+ {
4148
+ "name": "kind",
4149
+ "type": {
4150
+ "defined": {
4151
+ "name": "TrancheKind"
4152
+ }
4153
+ }
4154
+ },
4155
+ {
4156
+ "name": "amount",
4157
+ "type": "u64"
4158
+ }
4159
+ ]
4160
+ },
4161
+ {
4162
+ "name": "execute_tranche_deposit_fee_exempt",
4163
+ "discriminator": [
4164
+ 202,
4165
+ 226,
4166
+ 54,
4167
+ 182,
4168
+ 141,
4169
+ 178,
4170
+ 91,
4171
+ 231
4172
+ ],
4173
+ "accounts": [
4174
+ {
4175
+ "name": "user",
4176
+ "writable": true,
4177
+ "signer": true
4178
+ },
4179
+ {
4180
+ "name": "vault",
4181
+ "writable": true
4182
+ },
4183
+ {
4184
+ "name": "vault_oracle"
4185
+ },
4186
+ {
4187
+ "name": "vault_tranche_state",
4188
+ "writable": true
4189
+ },
4190
+ {
4191
+ "name": "asset_mint"
4192
+ },
4193
+ {
4194
+ "name": "tranche_share_mint",
4195
+ "writable": true
4196
+ },
4197
+ {
4198
+ "name": "user_asset_ata",
4199
+ "writable": true,
4200
+ "pda": {
4201
+ "seeds": [
4202
+ {
4203
+ "kind": "account",
4204
+ "path": "user"
4205
+ },
4206
+ {
4207
+ "kind": "account",
4208
+ "path": "asset_token_program"
4209
+ },
4210
+ {
4211
+ "kind": "account",
4212
+ "path": "asset_mint"
4213
+ }
4214
+ ],
4215
+ "program": {
4216
+ "kind": "const",
4217
+ "value": [
4218
+ 140,
4219
+ 151,
4220
+ 37,
4221
+ 143,
4222
+ 78,
4223
+ 36,
4224
+ 137,
4225
+ 241,
4226
+ 187,
4227
+ 61,
4228
+ 16,
4229
+ 41,
4230
+ 20,
4231
+ 142,
4232
+ 13,
4233
+ 131,
4234
+ 11,
4235
+ 90,
4236
+ 19,
4237
+ 153,
4238
+ 218,
4239
+ 255,
4240
+ 16,
4241
+ 132,
4242
+ 4,
4243
+ 142,
4244
+ 123,
4245
+ 216,
4246
+ 219,
4247
+ 233,
4248
+ 248,
4249
+ 89
4250
+ ]
4251
+ }
4252
+ }
4253
+ },
4254
+ {
4255
+ "name": "vault_asset_ata",
4256
+ "writable": true,
4257
+ "pda": {
4258
+ "seeds": [
4259
+ {
4260
+ "kind": "account",
4261
+ "path": "vault"
4262
+ },
4263
+ {
4264
+ "kind": "account",
4265
+ "path": "asset_token_program"
4266
+ },
4267
+ {
4268
+ "kind": "account",
4269
+ "path": "asset_mint"
4270
+ }
4271
+ ],
4272
+ "program": {
4273
+ "kind": "const",
4274
+ "value": [
4275
+ 140,
4276
+ 151,
4277
+ 37,
4278
+ 143,
4279
+ 78,
4280
+ 36,
4281
+ 137,
4282
+ 241,
4283
+ 187,
4284
+ 61,
4285
+ 16,
4286
+ 41,
4287
+ 20,
4288
+ 142,
4289
+ 13,
4290
+ 131,
4291
+ 11,
4292
+ 90,
4293
+ 19,
4294
+ 153,
4295
+ 218,
4296
+ 255,
4297
+ 16,
4298
+ 132,
4299
+ 4,
4300
+ 142,
4301
+ 123,
4302
+ 216,
4303
+ 219,
4304
+ 233,
4305
+ 248,
4306
+ 89
4307
+ ]
4308
+ }
4309
+ }
4310
+ },
4311
+ {
4312
+ "name": "fee_vault",
4313
+ "docs": [
4314
+ "Per-vault fee-vault PDA: token authority + accounting. Mint fees",
4315
+ "accrue here and are swept by the permissionless fee crank."
4316
+ ],
4317
+ "writable": true
4318
+ },
4319
+ {
4320
+ "name": "fee_vault_ata",
4321
+ "writable": true,
4322
+ "pda": {
4323
+ "seeds": [
4324
+ {
4325
+ "kind": "account",
4326
+ "path": "fee_vault"
4327
+ },
4328
+ {
4329
+ "kind": "account",
4330
+ "path": "asset_token_program"
4331
+ },
4332
+ {
4333
+ "kind": "account",
4334
+ "path": "asset_mint"
4335
+ }
4336
+ ],
4337
+ "program": {
4338
+ "kind": "const",
4339
+ "value": [
4340
+ 140,
4341
+ 151,
4342
+ 37,
4343
+ 143,
4344
+ 78,
4345
+ 36,
4346
+ 137,
4347
+ 241,
4348
+ 187,
4349
+ 61,
4350
+ 16,
4351
+ 41,
4352
+ 20,
4353
+ 142,
4354
+ 13,
4355
+ 131,
4356
+ 11,
4357
+ 90,
4358
+ 19,
4359
+ 153,
4360
+ 218,
4361
+ 255,
4362
+ 16,
4363
+ 132,
4364
+ 4,
4365
+ 142,
4366
+ 123,
4367
+ 216,
4368
+ 219,
4369
+ 233,
4370
+ 248,
4371
+ 89
4372
+ ]
4373
+ }
4374
+ }
4375
+ },
4376
+ {
4377
+ "name": "user_tranche_share_ata",
4378
+ "writable": true,
4379
+ "pda": {
4380
+ "seeds": [
4381
+ {
4382
+ "kind": "account",
4383
+ "path": "user"
4384
+ },
4385
+ {
4386
+ "kind": "account",
4387
+ "path": "share_token_program"
4388
+ },
4389
+ {
4390
+ "kind": "account",
4391
+ "path": "tranche_share_mint"
4392
+ }
4393
+ ],
4394
+ "program": {
4395
+ "kind": "const",
4396
+ "value": [
4397
+ 140,
4398
+ 151,
4399
+ 37,
4400
+ 143,
4401
+ 78,
4402
+ 36,
4403
+ 137,
4404
+ 241,
4405
+ 187,
4406
+ 61,
4407
+ 16,
4408
+ 41,
4409
+ 20,
4410
+ 142,
4411
+ 13,
4412
+ 131,
4413
+ 11,
4414
+ 90,
4415
+ 19,
4416
+ 153,
4417
+ 218,
4418
+ 255,
4419
+ 16,
4420
+ 132,
4421
+ 4,
4422
+ 142,
4423
+ 123,
4424
+ 216,
4425
+ 219,
4426
+ 233,
4427
+ 248,
4428
+ 89
4429
+ ]
4430
+ }
4431
+ }
4432
+ },
4433
+ {
4434
+ "name": "asset_token_program"
4435
+ },
4436
+ {
4437
+ "name": "share_token_program"
4438
+ },
4439
+ {
4440
+ "name": "associated_token_program",
4441
+ "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
4442
+ },
4443
+ {
4444
+ "name": "system_program",
4445
+ "address": "11111111111111111111111111111111"
4446
+ }
4447
+ ],
4448
+ "args": [
4449
+ {
4450
+ "name": "kind",
4451
+ "type": {
4452
+ "defined": {
4453
+ "name": "TrancheKind"
4454
+ }
4455
+ }
4456
+ },
4457
+ {
4458
+ "name": "amount",
4459
+ "type": "u64"
4460
+ },
4461
+ {
4462
+ "name": "signer_seeds",
4463
+ "type": {
4464
+ "vec": "bytes"
4465
+ }
4466
+ }
4467
+ ]
4468
+ },
4469
+ {
4470
+ "name": "execute_tranche_withdraw",
4471
+ "discriminator": [
4472
+ 240,
4473
+ 82,
4474
+ 254,
4475
+ 246,
4476
+ 177,
4477
+ 29,
4478
+ 57,
4479
+ 126
4480
+ ],
4481
+ "accounts": [
4482
+ {
4483
+ "name": "user",
4484
+ "writable": true,
4485
+ "signer": true
4486
+ },
4487
+ {
4488
+ "name": "vault",
4489
+ "writable": true
4490
+ },
4491
+ {
4492
+ "name": "vault_oracle"
4493
+ },
4494
+ {
4495
+ "name": "vault_tranche_state",
4496
+ "writable": true
4497
+ },
4498
+ {
4499
+ "name": "asset_mint"
4500
+ },
4501
+ {
4502
+ "name": "tranche_share_mint",
4503
+ "writable": true
4504
+ },
4505
+ {
4506
+ "name": "user_asset_ata",
4507
+ "writable": true,
4508
+ "pda": {
4509
+ "seeds": [
4510
+ {
4511
+ "kind": "account",
4512
+ "path": "user"
4513
+ },
4514
+ {
4515
+ "kind": "account",
4516
+ "path": "asset_token_program"
4517
+ },
4518
+ {
4519
+ "kind": "account",
4520
+ "path": "asset_mint"
4521
+ }
4522
+ ],
4523
+ "program": {
4524
+ "kind": "const",
4525
+ "value": [
4526
+ 140,
4527
+ 151,
4528
+ 37,
4529
+ 143,
4530
+ 78,
4531
+ 36,
4532
+ 137,
4533
+ 241,
4534
+ 187,
4535
+ 61,
4536
+ 16,
4537
+ 41,
4538
+ 20,
4539
+ 142,
4540
+ 13,
4541
+ 131,
4542
+ 11,
4543
+ 90,
4544
+ 19,
4545
+ 153,
4546
+ 218,
4547
+ 255,
4548
+ 16,
4549
+ 132,
4550
+ 4,
4551
+ 142,
4552
+ 123,
4553
+ 216,
4554
+ 219,
4555
+ 233,
4556
+ 248,
4557
+ 89
4558
+ ]
4559
+ }
4560
+ }
4561
+ },
4562
+ {
4563
+ "name": "vault_asset_ata",
4564
+ "writable": true,
4565
+ "pda": {
4566
+ "seeds": [
4567
+ {
4568
+ "kind": "account",
4569
+ "path": "vault"
4570
+ },
4571
+ {
4572
+ "kind": "account",
4573
+ "path": "asset_token_program"
4574
+ },
4575
+ {
4576
+ "kind": "account",
4577
+ "path": "asset_mint"
4578
+ }
4579
+ ],
4580
+ "program": {
4581
+ "kind": "const",
4582
+ "value": [
4583
+ 140,
4584
+ 151,
4585
+ 37,
4586
+ 143,
4587
+ 78,
4588
+ 36,
4589
+ 137,
4590
+ 241,
4591
+ 187,
4592
+ 61,
4593
+ 16,
4594
+ 41,
4595
+ 20,
4596
+ 142,
4597
+ 13,
4598
+ 131,
4599
+ 11,
4600
+ 90,
4601
+ 19,
4602
+ 153,
4603
+ 218,
4604
+ 255,
4605
+ 16,
4606
+ 132,
4607
+ 4,
4608
+ 142,
4609
+ 123,
4610
+ 216,
4611
+ 219,
4612
+ 233,
4613
+ 248,
4614
+ 89
4615
+ ]
4616
+ }
4617
+ }
4618
+ },
4619
+ {
4620
+ "name": "user_tranche_share_ata",
4621
+ "writable": true,
4622
+ "pda": {
4623
+ "seeds": [
4624
+ {
4625
+ "kind": "account",
4626
+ "path": "user"
4627
+ },
4628
+ {
4629
+ "kind": "account",
4630
+ "path": "share_token_program"
4631
+ },
4632
+ {
4633
+ "kind": "account",
4634
+ "path": "tranche_share_mint"
4635
+ }
4636
+ ],
4637
+ "program": {
4638
+ "kind": "const",
4639
+ "value": [
4640
+ 140,
4641
+ 151,
4642
+ 37,
4643
+ 143,
4644
+ 78,
4645
+ 36,
4646
+ 137,
4647
+ 241,
4648
+ 187,
4649
+ 61,
4650
+ 16,
4651
+ 41,
4652
+ 20,
4653
+ 142,
4654
+ 13,
4655
+ 131,
4656
+ 11,
4657
+ 90,
4658
+ 19,
4659
+ 153,
4660
+ 218,
4661
+ 255,
4662
+ 16,
4663
+ 132,
4664
+ 4,
4665
+ 142,
4666
+ 123,
4667
+ 216,
4668
+ 219,
4669
+ 233,
4670
+ 248,
4671
+ 89
4672
+ ]
4673
+ }
4674
+ }
4675
+ },
4676
+ {
4677
+ "name": "asset_token_program"
4678
+ },
4679
+ {
4680
+ "name": "share_token_program"
4681
+ },
4682
+ {
4683
+ "name": "associated_token_program",
4684
+ "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
4685
+ },
4686
+ {
4687
+ "name": "system_program",
4688
+ "address": "11111111111111111111111111111111"
4689
+ }
4690
+ ],
4691
+ "args": [
4692
+ {
4693
+ "name": "kind",
4694
+ "type": {
4695
+ "defined": {
4696
+ "name": "TrancheKind"
4697
+ }
4698
+ }
4699
+ },
4700
+ {
4701
+ "name": "share_amount",
4702
+ "type": "u64"
4703
+ }
4704
+ ]
4705
+ },
4706
+ {
4707
+ "name": "execute_tranche_withdraw_fee_exempt",
4708
+ "discriminator": [
4709
+ 130,
4710
+ 36,
4711
+ 243,
4712
+ 242,
4713
+ 125,
4714
+ 2,
4715
+ 207,
4716
+ 206
4717
+ ],
4718
+ "accounts": [
4719
+ {
4720
+ "name": "user",
4721
+ "writable": true,
4722
+ "signer": true
4723
+ },
4724
+ {
4725
+ "name": "vault",
4726
+ "writable": true
4727
+ },
4728
+ {
4729
+ "name": "vault_oracle"
4730
+ },
4731
+ {
4732
+ "name": "vault_tranche_state",
4733
+ "writable": true
4734
+ },
4735
+ {
4736
+ "name": "asset_mint"
4737
+ },
4738
+ {
4739
+ "name": "tranche_share_mint",
4740
+ "writable": true
4741
+ },
4742
+ {
4743
+ "name": "user_asset_ata",
4744
+ "writable": true,
4745
+ "pda": {
4746
+ "seeds": [
4747
+ {
4748
+ "kind": "account",
4749
+ "path": "user"
4750
+ },
4751
+ {
4752
+ "kind": "account",
4753
+ "path": "asset_token_program"
4754
+ },
4755
+ {
4756
+ "kind": "account",
4757
+ "path": "asset_mint"
4758
+ }
4759
+ ],
4760
+ "program": {
4761
+ "kind": "const",
4762
+ "value": [
4763
+ 140,
4764
+ 151,
4765
+ 37,
4766
+ 143,
4767
+ 78,
4768
+ 36,
4769
+ 137,
4770
+ 241,
4771
+ 187,
4772
+ 61,
4773
+ 16,
4774
+ 41,
4775
+ 20,
4776
+ 142,
4777
+ 13,
4778
+ 131,
4779
+ 11,
4780
+ 90,
4781
+ 19,
4782
+ 153,
4783
+ 218,
4784
+ 255,
4785
+ 16,
4786
+ 132,
4787
+ 4,
4788
+ 142,
4789
+ 123,
4790
+ 216,
4791
+ 219,
4792
+ 233,
4793
+ 248,
4794
+ 89
4795
+ ]
4796
+ }
4797
+ }
4798
+ },
4799
+ {
4800
+ "name": "vault_asset_ata",
4801
+ "writable": true,
4802
+ "pda": {
4803
+ "seeds": [
4804
+ {
4805
+ "kind": "account",
4806
+ "path": "vault"
4807
+ },
4808
+ {
4809
+ "kind": "account",
4810
+ "path": "asset_token_program"
4811
+ },
4812
+ {
4813
+ "kind": "account",
4814
+ "path": "asset_mint"
4815
+ }
4816
+ ],
4817
+ "program": {
4818
+ "kind": "const",
4819
+ "value": [
4820
+ 140,
4821
+ 151,
4822
+ 37,
4823
+ 143,
4824
+ 78,
4825
+ 36,
4826
+ 137,
4827
+ 241,
4828
+ 187,
4829
+ 61,
4830
+ 16,
4831
+ 41,
4832
+ 20,
4833
+ 142,
4834
+ 13,
4835
+ 131,
4836
+ 11,
4837
+ 90,
4838
+ 19,
4839
+ 153,
4840
+ 218,
4841
+ 255,
4842
+ 16,
4843
+ 132,
4844
+ 4,
4845
+ 142,
4846
+ 123,
4847
+ 216,
4848
+ 219,
4849
+ 233,
4850
+ 248,
4851
+ 89
4852
+ ]
4853
+ }
4854
+ }
4855
+ },
4856
+ {
4857
+ "name": "user_tranche_share_ata",
4858
+ "writable": true,
4859
+ "pda": {
4860
+ "seeds": [
4861
+ {
4862
+ "kind": "account",
4863
+ "path": "user"
4864
+ },
4865
+ {
4866
+ "kind": "account",
4867
+ "path": "share_token_program"
4868
+ },
4869
+ {
4870
+ "kind": "account",
4871
+ "path": "tranche_share_mint"
4872
+ }
4873
+ ],
4874
+ "program": {
4875
+ "kind": "const",
4876
+ "value": [
4877
+ 140,
4878
+ 151,
4879
+ 37,
4880
+ 143,
4881
+ 78,
4882
+ 36,
4883
+ 137,
4884
+ 241,
4885
+ 187,
4886
+ 61,
4887
+ 16,
4888
+ 41,
4889
+ 20,
4890
+ 142,
4891
+ 13,
4892
+ 131,
4893
+ 11,
4894
+ 90,
4895
+ 19,
4896
+ 153,
4897
+ 218,
4898
+ 255,
4899
+ 16,
4900
+ 132,
4901
+ 4,
4902
+ 142,
4903
+ 123,
4904
+ 216,
4905
+ 219,
4906
+ 233,
4907
+ 248,
4908
+ 89
4909
+ ]
4910
+ }
4911
+ }
4912
+ },
4913
+ {
4914
+ "name": "asset_token_program"
4915
+ },
4916
+ {
4917
+ "name": "share_token_program"
4918
+ },
4919
+ {
4920
+ "name": "associated_token_program",
4921
+ "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
4922
+ },
4923
+ {
4924
+ "name": "system_program",
4925
+ "address": "11111111111111111111111111111111"
4926
+ }
4927
+ ],
4928
+ "args": [
4929
+ {
4930
+ "name": "kind",
4931
+ "type": {
4932
+ "defined": {
4933
+ "name": "TrancheKind"
4934
+ }
4935
+ }
4936
+ },
4937
+ {
4938
+ "name": "share_amount",
4939
+ "type": "u64"
4940
+ },
4941
+ {
4942
+ "name": "signer_seeds",
4943
+ "type": {
4944
+ "vec": "bytes"
4945
+ }
4946
+ }
4947
+ ]
4948
+ },
4949
+ {
4950
+ "name": "execute_withdraw",
4951
+ "discriminator": [
4952
+ 255,
4953
+ 93,
4954
+ 15,
4955
+ 141,
4956
+ 187,
4957
+ 94,
4958
+ 246,
4959
+ 162
4960
+ ],
4961
+ "accounts": [
4962
+ {
4963
+ "name": "user",
4964
+ "docs": [
4965
+ "Token-account authority. May be a transaction signer or a PDA signer",
4966
+ "supplied by an integrating program through `invoke_signed`."
4967
+ ],
4968
+ "signer": true
4969
+ },
4970
+ {
4971
+ "name": "vault",
4972
+ "writable": true
4973
+ },
4974
+ {
4975
+ "name": "vault_oracle"
4976
+ },
4977
+ {
4978
+ "name": "vault_tranche_state",
4979
+ "optional": true
4980
+ },
4981
+ {
4982
+ "name": "asset_mint"
4983
+ },
4984
+ {
4985
+ "name": "share_mint",
4986
+ "writable": true
4987
+ },
4988
+ {
4989
+ "name": "user_asset_ata",
4990
+ "writable": true,
4991
+ "pda": {
4992
+ "seeds": [
4993
+ {
4994
+ "kind": "account",
4995
+ "path": "user"
4996
+ },
4997
+ {
4998
+ "kind": "account",
4999
+ "path": "asset_token_program"
5000
+ },
5001
+ {
5002
+ "kind": "account",
5003
+ "path": "asset_mint"
5004
+ }
5005
+ ],
5006
+ "program": {
5007
+ "kind": "const",
5008
+ "value": [
5009
+ 140,
5010
+ 151,
5011
+ 37,
5012
+ 143,
5013
+ 78,
5014
+ 36,
5015
+ 137,
5016
+ 241,
5017
+ 187,
5018
+ 61,
5019
+ 16,
5020
+ 41,
5021
+ 20,
5022
+ 142,
5023
+ 13,
5024
+ 131,
5025
+ 11,
5026
+ 90,
5027
+ 19,
5028
+ 153,
5029
+ 218,
5030
+ 255,
5031
+ 16,
5032
+ 132,
5033
+ 4,
5034
+ 142,
5035
+ 123,
5036
+ 216,
5037
+ 219,
5038
+ 233,
5039
+ 248,
5040
+ 89
5041
+ ]
5042
+ }
5043
+ }
5044
+ },
5045
+ {
5046
+ "name": "vault_asset_ata",
5047
+ "writable": true,
5048
+ "pda": {
5049
+ "seeds": [
5050
+ {
5051
+ "kind": "account",
5052
+ "path": "vault"
5053
+ },
5054
+ {
5055
+ "kind": "account",
5056
+ "path": "asset_token_program"
5057
+ },
5058
+ {
5059
+ "kind": "account",
5060
+ "path": "asset_mint"
5061
+ }
5062
+ ],
5063
+ "program": {
5064
+ "kind": "const",
5065
+ "value": [
5066
+ 140,
5067
+ 151,
5068
+ 37,
5069
+ 143,
5070
+ 78,
5071
+ 36,
5072
+ 137,
5073
+ 241,
5074
+ 187,
5075
+ 61,
5076
+ 16,
5077
+ 41,
5078
+ 20,
5079
+ 142,
5080
+ 13,
5081
+ 131,
5082
+ 11,
5083
+ 90,
5084
+ 19,
5085
+ 153,
5086
+ 218,
5087
+ 255,
5088
+ 16,
5089
+ 132,
5090
+ 4,
5091
+ 142,
5092
+ 123,
5093
+ 216,
5094
+ 219,
5095
+ 233,
5096
+ 248,
5097
+ 89
5098
+ ]
5099
+ }
5100
+ }
5101
+ },
5102
+ {
5103
+ "name": "fee_vault",
5104
+ "docs": [
5105
+ "Per-vault fee-vault PDA: token authority + accounting. The burn fee accrues",
5106
+ "here and is swept to the fee collector by the permissionless crank."
5107
+ ],
5108
+ "writable": true
5109
+ },
5110
+ {
5111
+ "name": "fee_vault_ata",
5112
+ "writable": true,
5113
+ "pda": {
5114
+ "seeds": [
5115
+ {
5116
+ "kind": "account",
5117
+ "path": "fee_vault"
5118
+ },
5119
+ {
5120
+ "kind": "account",
5121
+ "path": "asset_token_program"
5122
+ },
5123
+ {
5124
+ "kind": "account",
5125
+ "path": "asset_mint"
5126
+ }
5127
+ ],
5128
+ "program": {
5129
+ "kind": "const",
5130
+ "value": [
5131
+ 140,
5132
+ 151,
5133
+ 37,
5134
+ 143,
5135
+ 78,
5136
+ 36,
5137
+ 137,
5138
+ 241,
5139
+ 187,
5140
+ 61,
5141
+ 16,
5142
+ 41,
5143
+ 20,
5144
+ 142,
5145
+ 13,
5146
+ 131,
5147
+ 11,
5148
+ 90,
5149
+ 19,
5150
+ 153,
5151
+ 218,
5152
+ 255,
5153
+ 16,
5154
+ 132,
5155
+ 4,
5156
+ 142,
5157
+ 123,
5158
+ 216,
5159
+ 219,
5160
+ 233,
5161
+ 248,
5162
+ 89
5163
+ ]
5164
+ }
5165
+ }
5166
+ },
5167
+ {
5168
+ "name": "user_share_ata",
5169
+ "writable": true,
5170
+ "pda": {
5171
+ "seeds": [
5172
+ {
5173
+ "kind": "account",
5174
+ "path": "user"
5175
+ },
5176
+ {
5177
+ "kind": "account",
5178
+ "path": "share_token_program"
5179
+ },
5180
+ {
5181
+ "kind": "account",
5182
+ "path": "share_mint"
5183
+ }
5184
+ ],
5185
+ "program": {
5186
+ "kind": "const",
5187
+ "value": [
5188
+ 140,
5189
+ 151,
5190
+ 37,
5191
+ 143,
5192
+ 78,
5193
+ 36,
5194
+ 137,
5195
+ 241,
5196
+ 187,
5197
+ 61,
5198
+ 16,
5199
+ 41,
5200
+ 20,
5201
+ 142,
5202
+ 13,
5203
+ 131,
5204
+ 11,
5205
+ 90,
5206
+ 19,
5207
+ 153,
5208
+ 218,
5209
+ 255,
5210
+ 16,
5211
+ 132,
5212
+ 4,
5213
+ 142,
5214
+ 123,
5215
+ 216,
5216
+ 219,
5217
+ 233,
5218
+ 248,
5219
+ 89
5220
+ ]
5221
+ }
5222
+ }
5223
+ },
5224
+ {
5225
+ "name": "asset_token_program"
5226
+ },
5227
+ {
5228
+ "name": "share_token_program"
5229
+ }
5230
+ ],
5231
+ "args": [
5232
+ {
5233
+ "name": "share_amount",
5234
+ "type": "u64"
5235
+ }
5236
+ ]
5237
+ },
5238
+ {
5239
+ "name": "execute_withdraw_fee_exempt",
5240
+ "discriminator": [
5241
+ 47,
5242
+ 77,
5243
+ 139,
5244
+ 253,
5245
+ 122,
5246
+ 181,
5247
+ 108,
5248
+ 216
5249
+ ],
5250
+ "accounts": [
5251
+ {
5252
+ "name": "user",
5253
+ "docs": [
5254
+ "Token-account authority. May be a transaction signer or a PDA signer",
5255
+ "supplied by an integrating program through `invoke_signed`."
5256
+ ],
5257
+ "signer": true
5258
+ },
5259
+ {
5260
+ "name": "vault",
5261
+ "writable": true
5262
+ },
5263
+ {
5264
+ "name": "vault_oracle"
5265
+ },
5266
+ {
5267
+ "name": "vault_tranche_state",
5268
+ "optional": true
5269
+ },
5270
+ {
5271
+ "name": "asset_mint"
5272
+ },
5273
+ {
5274
+ "name": "share_mint",
5275
+ "writable": true
5276
+ },
5277
+ {
5278
+ "name": "user_asset_ata",
5279
+ "writable": true,
5280
+ "pda": {
5281
+ "seeds": [
5282
+ {
5283
+ "kind": "account",
5284
+ "path": "user"
5285
+ },
5286
+ {
5287
+ "kind": "account",
5288
+ "path": "asset_token_program"
5289
+ },
5290
+ {
5291
+ "kind": "account",
5292
+ "path": "asset_mint"
5293
+ }
5294
+ ],
5295
+ "program": {
5296
+ "kind": "const",
5297
+ "value": [
5298
+ 140,
5299
+ 151,
5300
+ 37,
5301
+ 143,
5302
+ 78,
5303
+ 36,
5304
+ 137,
5305
+ 241,
5306
+ 187,
5307
+ 61,
5308
+ 16,
5309
+ 41,
5310
+ 20,
5311
+ 142,
5312
+ 13,
5313
+ 131,
5314
+ 11,
5315
+ 90,
5316
+ 19,
5317
+ 153,
5318
+ 218,
5319
+ 255,
5320
+ 16,
5321
+ 132,
5322
+ 4,
5323
+ 142,
5324
+ 123,
5325
+ 216,
5326
+ 219,
5327
+ 233,
5328
+ 248,
5329
+ 89
5330
+ ]
5331
+ }
5332
+ }
5333
+ },
5334
+ {
5335
+ "name": "vault_asset_ata",
5336
+ "writable": true,
5337
+ "pda": {
5338
+ "seeds": [
5339
+ {
5340
+ "kind": "account",
5341
+ "path": "vault"
5342
+ },
5343
+ {
5344
+ "kind": "account",
5345
+ "path": "asset_token_program"
5346
+ },
5347
+ {
5348
+ "kind": "account",
5349
+ "path": "asset_mint"
5350
+ }
5351
+ ],
5352
+ "program": {
5353
+ "kind": "const",
5354
+ "value": [
5355
+ 140,
5356
+ 151,
5357
+ 37,
5358
+ 143,
5359
+ 78,
5360
+ 36,
5361
+ 137,
5362
+ 241,
5363
+ 187,
5364
+ 61,
5365
+ 16,
5366
+ 41,
5367
+ 20,
5368
+ 142,
5369
+ 13,
5370
+ 131,
5371
+ 11,
5372
+ 90,
5373
+ 19,
5374
+ 153,
5375
+ 218,
5376
+ 255,
5377
+ 16,
5378
+ 132,
5379
+ 4,
5380
+ 142,
5381
+ 123,
5382
+ 216,
5383
+ 219,
5384
+ 233,
5385
+ 248,
5386
+ 89
5387
+ ]
5388
+ }
5389
+ }
5390
+ },
5391
+ {
5392
+ "name": "fee_vault",
5393
+ "docs": [
5394
+ "Per-vault fee-vault PDA: token authority + accounting. The burn fee accrues",
5395
+ "here and is swept to the fee collector by the permissionless crank."
5396
+ ],
5397
+ "writable": true
5398
+ },
5399
+ {
5400
+ "name": "fee_vault_ata",
5401
+ "writable": true,
5402
+ "pda": {
5403
+ "seeds": [
5404
+ {
5405
+ "kind": "account",
5406
+ "path": "fee_vault"
5407
+ },
5408
+ {
5409
+ "kind": "account",
5410
+ "path": "asset_token_program"
5411
+ },
5412
+ {
5413
+ "kind": "account",
5414
+ "path": "asset_mint"
5415
+ }
5416
+ ],
5417
+ "program": {
5418
+ "kind": "const",
5419
+ "value": [
5420
+ 140,
5421
+ 151,
5422
+ 37,
5423
+ 143,
5424
+ 78,
5425
+ 36,
5426
+ 137,
5427
+ 241,
5428
+ 187,
5429
+ 61,
5430
+ 16,
5431
+ 41,
5432
+ 20,
5433
+ 142,
5434
+ 13,
5435
+ 131,
5436
+ 11,
5437
+ 90,
5438
+ 19,
5439
+ 153,
5440
+ 218,
5441
+ 255,
5442
+ 16,
5443
+ 132,
5444
+ 4,
5445
+ 142,
5446
+ 123,
5447
+ 216,
5448
+ 219,
5449
+ 233,
5450
+ 248,
5451
+ 89
5452
+ ]
5453
+ }
5454
+ }
5455
+ },
5456
+ {
5457
+ "name": "user_share_ata",
5458
+ "writable": true,
5459
+ "pda": {
5460
+ "seeds": [
5461
+ {
5462
+ "kind": "account",
5463
+ "path": "user"
5464
+ },
5465
+ {
5466
+ "kind": "account",
5467
+ "path": "share_token_program"
5468
+ },
5469
+ {
5470
+ "kind": "account",
5471
+ "path": "share_mint"
5472
+ }
5473
+ ],
5474
+ "program": {
5475
+ "kind": "const",
5476
+ "value": [
5477
+ 140,
5478
+ 151,
5479
+ 37,
5480
+ 143,
5481
+ 78,
5482
+ 36,
5483
+ 137,
5484
+ 241,
5485
+ 187,
5486
+ 61,
5487
+ 16,
5488
+ 41,
5489
+ 20,
5490
+ 142,
5491
+ 13,
5492
+ 131,
5493
+ 11,
5494
+ 90,
5495
+ 19,
5496
+ 153,
5497
+ 218,
5498
+ 255,
5499
+ 16,
5500
+ 132,
5501
+ 4,
5502
+ 142,
5503
+ 123,
5504
+ 216,
5505
+ 219,
5506
+ 233,
5507
+ 248,
5508
+ 89
5509
+ ]
5510
+ }
5511
+ }
5512
+ },
5513
+ {
5514
+ "name": "asset_token_program"
5515
+ },
5516
+ {
5517
+ "name": "share_token_program"
5518
+ }
5519
+ ],
5520
+ "args": [
5521
+ {
5522
+ "name": "share_amount",
5523
+ "type": "u64"
5524
+ },
5525
+ {
5526
+ "name": "signer_seeds",
5527
+ "type": {
5528
+ "vec": "bytes"
5529
+ }
5530
+ }
5531
+ ]
5532
+ },
5533
+ {
5534
+ "name": "execute_withdraw_from_external",
5535
+ "discriminator": [
5536
+ 91,
5537
+ 38,
5538
+ 26,
5539
+ 250,
5540
+ 138,
5541
+ 227,
5542
+ 18,
5543
+ 88
5544
+ ],
5545
+ "accounts": [
5546
+ {
5547
+ "name": "user",
5548
+ "docs": [
5549
+ "Token-account authority. May be a transaction signer or a PDA signer",
5550
+ "supplied by an integrating program through `invoke_signed`."
5551
+ ],
5552
+ "signer": true
5553
+ },
5554
+ {
5555
+ "name": "vault",
5556
+ "writable": true
5557
+ },
5558
+ {
5559
+ "name": "vault_oracle"
5560
+ },
5561
+ {
5562
+ "name": "vault_tranche_state",
5563
+ "optional": true
5564
+ },
5565
+ {
5566
+ "name": "asset_mint"
5567
+ },
5568
+ {
5569
+ "name": "share_mint",
5570
+ "writable": true
5571
+ },
5572
+ {
5573
+ "name": "user_asset_ata",
5574
+ "writable": true,
5575
+ "pda": {
5576
+ "seeds": [
5577
+ {
5578
+ "kind": "account",
5579
+ "path": "user"
5580
+ },
5581
+ {
5582
+ "kind": "account",
5583
+ "path": "asset_token_program"
5584
+ },
5585
+ {
5586
+ "kind": "account",
5587
+ "path": "asset_mint"
5588
+ }
5589
+ ],
5590
+ "program": {
5591
+ "kind": "const",
5592
+ "value": [
5593
+ 140,
5594
+ 151,
5595
+ 37,
5596
+ 143,
5597
+ 78,
5598
+ 36,
5599
+ 137,
5600
+ 241,
5601
+ 187,
5602
+ 61,
5603
+ 16,
5604
+ 41,
5605
+ 20,
5606
+ 142,
5607
+ 13,
5608
+ 131,
5609
+ 11,
5610
+ 90,
5611
+ 19,
5612
+ 153,
5613
+ 218,
5614
+ 255,
5615
+ 16,
5616
+ 132,
5617
+ 4,
5618
+ 142,
5619
+ 123,
5620
+ 216,
5621
+ 219,
5622
+ 233,
5623
+ 248,
5624
+ 89
5625
+ ]
5626
+ }
5627
+ }
5628
+ },
5629
+ {
5630
+ "name": "vault_asset_ata",
5631
+ "writable": true,
5632
+ "pda": {
5633
+ "seeds": [
5634
+ {
5635
+ "kind": "account",
5636
+ "path": "vault"
5637
+ },
5638
+ {
5639
+ "kind": "account",
5640
+ "path": "asset_token_program"
5641
+ },
5642
+ {
5643
+ "kind": "account",
5644
+ "path": "asset_mint"
5645
+ }
5646
+ ],
5647
+ "program": {
5648
+ "kind": "const",
5649
+ "value": [
5650
+ 140,
5651
+ 151,
5652
+ 37,
5653
+ 143,
5654
+ 78,
5655
+ 36,
5656
+ 137,
5657
+ 241,
5658
+ 187,
5659
+ 61,
5660
+ 16,
5661
+ 41,
5662
+ 20,
5663
+ 142,
5664
+ 13,
5665
+ 131,
5666
+ 11,
5667
+ 90,
5668
+ 19,
5669
+ 153,
5670
+ 218,
5671
+ 255,
5672
+ 16,
5673
+ 132,
5674
+ 4,
5675
+ 142,
5676
+ 123,
5677
+ 216,
5678
+ 219,
5679
+ 233,
5680
+ 248,
5681
+ 89
5682
+ ]
5683
+ }
5684
+ }
5685
+ },
5686
+ {
5687
+ "name": "fee_vault",
5688
+ "docs": [
5689
+ "Per-vault fee-vault PDA: token authority + accounting. The burn fee accrues",
5690
+ "here and is swept to the fee collector by the permissionless crank."
5691
+ ],
5692
+ "writable": true
5693
+ },
5694
+ {
5695
+ "name": "fee_vault_ata",
3949
5696
  "writable": true,
3950
5697
  "pda": {
3951
5698
  "seeds": [
3952
5699
  {
3953
5700
  "kind": "account",
3954
- "path": "vault"
5701
+ "path": "fee_vault"
3955
5702
  },
3956
5703
  {
3957
5704
  "kind": "account",
@@ -4002,7 +5749,7 @@ var IDL = {
4002
5749
  }
4003
5750
  },
4004
5751
  {
4005
- "name": "user_tranche_share_ata",
5752
+ "name": "user_share_ata",
4006
5753
  "writable": true,
4007
5754
  "pda": {
4008
5755
  "seeds": [
@@ -4016,7 +5763,7 @@ var IDL = {
4016
5763
  },
4017
5764
  {
4018
5765
  "kind": "account",
4019
- "path": "tranche_share_mint"
5766
+ "path": "share_mint"
4020
5767
  }
4021
5768
  ],
4022
5769
  "program": {
@@ -4063,46 +5810,51 @@ var IDL = {
4063
5810
  },
4064
5811
  {
4065
5812
  "name": "share_token_program"
4066
- },
4067
- {
4068
- "name": "associated_token_program",
4069
- "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
4070
- },
4071
- {
4072
- "name": "system_program",
4073
- "address": "11111111111111111111111111111111"
4074
5813
  }
4075
5814
  ],
4076
5815
  "args": [
4077
5816
  {
4078
- "name": "kind",
5817
+ "name": "share_amount",
5818
+ "type": "u64"
5819
+ },
5820
+ {
5821
+ "name": "external_withdraw_ix_refs",
4079
5822
  "type": {
4080
- "defined": {
4081
- "name": "TrancheKind"
5823
+ "option": {
5824
+ "defined": {
5825
+ "name": "InstructionRefs"
5826
+ }
4082
5827
  }
4083
5828
  }
4084
5829
  },
4085
5830
  {
4086
- "name": "share_amount",
4087
- "type": "u64"
5831
+ "name": "external_liquidity_source",
5832
+ "type": {
5833
+ "option": "u8"
5834
+ }
4088
5835
  }
4089
5836
  ]
4090
5837
  },
4091
5838
  {
4092
- "name": "execute_withdraw",
5839
+ "name": "execute_withdraw_from_external_fee_exempt",
4093
5840
  "discriminator": [
4094
- 255,
4095
- 93,
4096
- 15,
4097
- 141,
4098
- 187,
4099
- 94,
4100
- 246,
4101
- 162
5841
+ 8,
5842
+ 18,
5843
+ 138,
5844
+ 251,
5845
+ 162,
5846
+ 172,
5847
+ 171,
5848
+ 185
4102
5849
  ],
4103
5850
  "accounts": [
4104
5851
  {
4105
- "name": "user"
5852
+ "name": "user",
5853
+ "docs": [
5854
+ "Token-account authority. May be a transaction signer or a PDA signer",
5855
+ "supplied by an integrating program through `invoke_signed`."
5856
+ ],
5857
+ "signer": true
4106
5858
  },
4107
5859
  {
4108
5860
  "name": "vault",
@@ -4369,24 +6121,55 @@ var IDL = {
4369
6121
  {
4370
6122
  "name": "share_amount",
4371
6123
  "type": "u64"
6124
+ },
6125
+ {
6126
+ "name": "external_withdraw_ix_refs",
6127
+ "type": {
6128
+ "option": {
6129
+ "defined": {
6130
+ "name": "InstructionRefs"
6131
+ }
6132
+ }
6133
+ }
6134
+ },
6135
+ {
6136
+ "name": "external_liquidity_source",
6137
+ "type": {
6138
+ "option": "u8"
6139
+ }
6140
+ },
6141
+ {
6142
+ "name": "signer_seeds",
6143
+ "type": {
6144
+ "vec": "bytes"
6145
+ }
4372
6146
  }
4373
6147
  ]
4374
6148
  },
4375
6149
  {
4376
- "name": "execute_withdraw_from_external",
6150
+ "name": "fulfill_junior_tranche_withdraw",
4377
6151
  "discriminator": [
4378
- 91,
4379
- 38,
4380
- 26,
4381
- 250,
4382
- 138,
4383
- 227,
4384
- 18,
4385
- 88
6152
+ 127,
6153
+ 229,
6154
+ 153,
6155
+ 168,
6156
+ 116,
6157
+ 50,
6158
+ 248,
6159
+ 103
4386
6160
  ],
4387
6161
  "accounts": [
4388
6162
  {
4389
- "name": "user"
6163
+ "name": "signer",
6164
+ "writable": true,
6165
+ "signer": true
6166
+ },
6167
+ {
6168
+ "name": "owner"
6169
+ },
6170
+ {
6171
+ "name": "queue_payer",
6172
+ "writable": true
4390
6173
  },
4391
6174
  {
4392
6175
  "name": "vault",
@@ -4397,23 +6180,31 @@ var IDL = {
4397
6180
  },
4398
6181
  {
4399
6182
  "name": "vault_tranche_state",
4400
- "optional": true
6183
+ "writable": true
4401
6184
  },
4402
6185
  {
4403
- "name": "asset_mint"
6186
+ "name": "withdrawal_queue",
6187
+ "writable": true
4404
6188
  },
4405
6189
  {
4406
- "name": "share_mint",
6190
+ "name": "output_mint"
6191
+ },
6192
+ {
6193
+ "name": "input_mint",
4407
6194
  "writable": true
4408
6195
  },
4409
6196
  {
4410
- "name": "user_asset_ata",
6197
+ "name": "owner_input_ata",
6198
+ "writable": true
6199
+ },
6200
+ {
6201
+ "name": "owner_output_ata",
4411
6202
  "writable": true,
4412
6203
  "pda": {
4413
6204
  "seeds": [
4414
6205
  {
4415
6206
  "kind": "account",
4416
- "path": "user"
6207
+ "path": "owner"
4417
6208
  },
4418
6209
  {
4419
6210
  "kind": "account",
@@ -4421,7 +6212,7 @@ var IDL = {
4421
6212
  },
4422
6213
  {
4423
6214
  "kind": "account",
4424
- "path": "asset_mint"
6215
+ "path": "output_mint"
4425
6216
  }
4426
6217
  ],
4427
6218
  "program": {
@@ -4464,7 +6255,7 @@ var IDL = {
4464
6255
  }
4465
6256
  },
4466
6257
  {
4467
- "name": "vault_asset_ata",
6258
+ "name": "vault_output_ata",
4468
6259
  "writable": true,
4469
6260
  "pda": {
4470
6261
  "seeds": [
@@ -4478,7 +6269,7 @@ var IDL = {
4478
6269
  },
4479
6270
  {
4480
6271
  "kind": "account",
4481
- "path": "asset_mint"
6272
+ "path": "output_mint"
4482
6273
  }
4483
6274
  ],
4484
6275
  "program": {
@@ -4521,21 +6312,16 @@ var IDL = {
4521
6312
  }
4522
6313
  },
4523
6314
  {
4524
- "name": "fee_vault",
4525
- "docs": [
4526
- "Per-vault fee-vault PDA: token authority + accounting. The burn fee accrues",
4527
- "here and is swept to the fee collector by the permissionless crank."
4528
- ],
4529
- "writable": true
6315
+ "name": "fee_collector"
4530
6316
  },
4531
6317
  {
4532
- "name": "fee_vault_ata",
6318
+ "name": "fee_collector_output_ata",
4533
6319
  "writable": true,
4534
6320
  "pda": {
4535
6321
  "seeds": [
4536
6322
  {
4537
6323
  "kind": "account",
4538
- "path": "fee_vault"
6324
+ "path": "fee_collector"
4539
6325
  },
4540
6326
  {
4541
6327
  "kind": "account",
@@ -4543,7 +6329,7 @@ var IDL = {
4543
6329
  },
4544
6330
  {
4545
6331
  "kind": "account",
4546
- "path": "asset_mint"
6332
+ "path": "output_mint"
4547
6333
  }
4548
6334
  ],
4549
6335
  "program": {
@@ -4586,13 +6372,13 @@ var IDL = {
4586
6372
  }
4587
6373
  },
4588
6374
  {
4589
- "name": "user_share_ata",
6375
+ "name": "queue_input_ata",
4590
6376
  "writable": true,
4591
6377
  "pda": {
4592
6378
  "seeds": [
4593
6379
  {
4594
6380
  "kind": "account",
4595
- "path": "user"
6381
+ "path": "withdrawal_queue"
4596
6382
  },
4597
6383
  {
4598
6384
  "kind": "account",
@@ -4600,7 +6386,7 @@ var IDL = {
4600
6386
  },
4601
6387
  {
4602
6388
  "kind": "account",
4603
- "path": "share_mint"
6389
+ "path": "input_mint"
4604
6390
  }
4605
6391
  ],
4606
6392
  "program": {
@@ -4647,42 +6433,29 @@ var IDL = {
4647
6433
  },
4648
6434
  {
4649
6435
  "name": "share_token_program"
4650
- }
4651
- ],
4652
- "args": [
4653
- {
4654
- "name": "share_amount",
4655
- "type": "u64"
4656
6436
  },
4657
6437
  {
4658
- "name": "external_withdraw_ix_refs",
4659
- "type": {
4660
- "option": {
4661
- "defined": {
4662
- "name": "InstructionRefs"
4663
- }
4664
- }
4665
- }
6438
+ "name": "associated_token_program",
6439
+ "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
4666
6440
  },
4667
6441
  {
4668
- "name": "external_liquidity_source",
4669
- "type": {
4670
- "option": "u8"
4671
- }
6442
+ "name": "system_program",
6443
+ "address": "11111111111111111111111111111111"
4672
6444
  }
4673
- ]
6445
+ ],
6446
+ "args": []
4674
6447
  },
4675
6448
  {
4676
- "name": "fulfill_junior_tranche_withdraw",
6449
+ "name": "fulfill_junior_tranche_withdraw_fee_exempt",
4677
6450
  "discriminator": [
4678
- 127,
4679
- 229,
4680
- 153,
4681
- 168,
4682
- 116,
4683
- 50,
4684
- 248,
4685
- 103
6451
+ 148,
6452
+ 163,
6453
+ 159,
6454
+ 43,
6455
+ 165,
6456
+ 131,
6457
+ 51,
6458
+ 85
4686
6459
  ],
4687
6460
  "accounts": [
4688
6461
  {
@@ -4969,7 +6742,14 @@ var IDL = {
4969
6742
  "address": "11111111111111111111111111111111"
4970
6743
  }
4971
6744
  ],
4972
- "args": []
6745
+ "args": [
6746
+ {
6747
+ "name": "signer_seeds",
6748
+ "type": {
6749
+ "vec": "bytes"
6750
+ }
6751
+ }
6752
+ ]
4973
6753
  },
4974
6754
  {
4975
6755
  "name": "get_nav",
@@ -5243,6 +7023,10 @@ var IDL = {
5243
7023
  ],
5244
7024
  "writable": true,
5245
7025
  "optional": true
7026
+ },
7027
+ {
7028
+ "name": "vault_tranche_state",
7029
+ "optional": true
5246
7030
  }
5247
7031
  ],
5248
7032
  "args": [
@@ -5627,12 +7411,39 @@ var IDL = {
5627
7411
  "name": "idle_bank_mint",
5628
7412
  "writable": true
5629
7413
  },
7414
+ {
7415
+ "name": "idle_bank_tranche",
7416
+ "docs": [
7417
+ "path rejects initialized state because it cannot represent junior claims."
7418
+ ],
7419
+ "pda": {
7420
+ "seeds": [
7421
+ {
7422
+ "kind": "const",
7423
+ "value": [
7424
+ 84,
7425
+ 82,
7426
+ 65,
7427
+ 78,
7428
+ 67,
7429
+ 72,
7430
+ 69
7431
+ ]
7432
+ },
7433
+ {
7434
+ "kind": "account",
7435
+ "path": "idle_bank_state"
7436
+ }
7437
+ ]
7438
+ }
7439
+ },
5630
7440
  {
5631
7441
  "name": "idle_vault",
5632
7442
  "writable": true
5633
7443
  },
5634
7444
  {
5635
7445
  "name": "idle_vault_oracle",
7446
+ "writable": true,
5636
7447
  "pda": {
5637
7448
  "seeds": [
5638
7449
  {
@@ -5737,7 +7548,24 @@ var IDL = {
5737
7548
  },
5738
7549
  {
5739
7550
  "name": "yielding_bank_state",
5740
- "writable": true
7551
+ "writable": true,
7552
+ "pda": {
7553
+ "seeds": [
7554
+ {
7555
+ "kind": "const",
7556
+ "value": [
7557
+ 66,
7558
+ 65,
7559
+ 78,
7560
+ 75
7561
+ ]
7562
+ },
7563
+ {
7564
+ "kind": "account",
7565
+ "path": "yielding_bank_state"
7566
+ }
7567
+ ]
7568
+ }
5741
7569
  },
5742
7570
  {
5743
7571
  "name": "yielding_bank_mint",
@@ -5745,7 +7573,9 @@ var IDL = {
5745
7573
  },
5746
7574
  {
5747
7575
  "name": "yielding_bank_tranche",
5748
- "optional": true,
7576
+ "docs": [
7577
+ "state so an active senior-price regime cannot be hidden by omission."
7578
+ ],
5749
7579
  "pda": {
5750
7580
  "seeds": [
5751
7581
  {
@@ -5860,7 +7690,8 @@ var IDL = {
5860
7690
  "writable": true
5861
7691
  },
5862
7692
  {
5863
- "name": "destination_vault_oracle"
7693
+ "name": "destination_vault_oracle",
7694
+ "writable": true
5864
7695
  },
5865
7696
  {
5866
7697
  "name": "destination_vault_asset_ata",
@@ -5920,12 +7751,43 @@ var IDL = {
5920
7751
  }
5921
7752
  },
5922
7753
  {
5923
- "name": "vault_tranche_state",
5924
- "writable": true,
5925
- "optional": true
7754
+ "name": "vault_tranche_state",
7755
+ "docs": [
7756
+ "be initialized and consistent with destination.tranching_enabled."
7757
+ ],
7758
+ "writable": true,
7759
+ "pda": {
7760
+ "seeds": [
7761
+ {
7762
+ "kind": "const",
7763
+ "value": [
7764
+ 118,
7765
+ 97,
7766
+ 117,
7767
+ 108,
7768
+ 116,
7769
+ 95,
7770
+ 116,
7771
+ 114,
7772
+ 97,
7773
+ 110,
7774
+ 99,
7775
+ 104,
7776
+ 101
7777
+ ]
7778
+ },
7779
+ {
7780
+ "kind": "account",
7781
+ "path": "destination_vault"
7782
+ }
7783
+ ]
7784
+ }
7785
+ },
7786
+ {
7787
+ "name": "yielding_token_program"
5926
7788
  },
5927
7789
  {
5928
- "name": "yielding_token_program"
7790
+ "name": "idle_bank_mint_token_program"
5929
7791
  },
5930
7792
  {
5931
7793
  "name": "bank_mint_token_program"
@@ -6187,8 +8049,10 @@ var IDL = {
6187
8049
  },
6188
8050
  {
6189
8051
  "name": "tranche_state",
8052
+ "docs": [
8053
+ "initialized TrancheState from an empty, uninitialized PDA."
8054
+ ],
6190
8055
  "writable": true,
6191
- "optional": true,
6192
8056
  "pda": {
6193
8057
  "seeds": [
6194
8058
  {
@@ -6212,106 +8076,61 @@ var IDL = {
6212
8076
  },
6213
8077
  {
6214
8078
  "name": "junior_escrow_ata",
8079
+ "docs": [
8080
+ "authority, and balance are validated before any migration mutation."
8081
+ ],
8082
+ "writable": true
8083
+ },
8084
+ {
8085
+ "name": "vault_tranche_state",
8086
+ "docs": [
8087
+ "initialized/uninitialized state against destination.tranching_enabled."
8088
+ ],
6215
8089
  "writable": true,
6216
- "optional": true,
6217
8090
  "pda": {
6218
8091
  "seeds": [
6219
- {
6220
- "kind": "account",
6221
- "path": "tranche_state"
6222
- },
6223
8092
  {
6224
8093
  "kind": "const",
6225
8094
  "value": [
6226
- 6,
6227
- 221,
6228
- 246,
6229
- 225,
6230
- 215,
6231
- 101,
6232
- 161,
6233
- 147,
6234
- 217,
6235
- 203,
6236
- 225,
6237
- 70,
6238
- 206,
6239
- 235,
6240
- 121,
6241
- 172,
6242
- 28,
6243
- 180,
6244
- 133,
6245
- 237,
8095
+ 118,
8096
+ 97,
8097
+ 117,
8098
+ 108,
8099
+ 116,
6246
8100
  95,
6247
- 91,
6248
- 55,
6249
- 145,
6250
- 58,
6251
- 140,
6252
- 245,
6253
- 133,
6254
- 126,
6255
- 255,
6256
- 0,
6257
- 169
8101
+ 116,
8102
+ 114,
8103
+ 97,
8104
+ 110,
8105
+ 99,
8106
+ 104,
8107
+ 101
6258
8108
  ]
6259
8109
  },
6260
8110
  {
6261
8111
  "kind": "account",
6262
- "path": "bank_mint"
8112
+ "path": "destination_vault"
6263
8113
  }
6264
- ],
6265
- "program": {
6266
- "kind": "const",
6267
- "value": [
6268
- 140,
6269
- 151,
6270
- 37,
6271
- 143,
6272
- 78,
6273
- 36,
6274
- 137,
6275
- 241,
6276
- 187,
6277
- 61,
6278
- 16,
6279
- 41,
6280
- 20,
6281
- 142,
6282
- 13,
6283
- 131,
6284
- 11,
6285
- 90,
6286
- 19,
6287
- 153,
6288
- 218,
6289
- 255,
6290
- 16,
6291
- 132,
6292
- 4,
6293
- 142,
6294
- 123,
6295
- 216,
6296
- 219,
6297
- 233,
6298
- 248,
6299
- 89
6300
- ]
6301
- }
8114
+ ]
6302
8115
  }
6303
8116
  },
6304
8117
  {
6305
- "name": "vault_tranche_state",
6306
- "writable": true,
8118
+ "name": "junior_share_mint",
8119
+ "optional": true
8120
+ },
8121
+ {
8122
+ "name": "locked_junior_shares_ata",
8123
+ "docs": [
8124
+ "withdrawals. Required and fully validated when the source tranche exists;",
8125
+ "absent for a bank that never initialized a legacy tranche."
8126
+ ],
6307
8127
  "optional": true
6308
8128
  },
6309
8129
  {
6310
8130
  "name": "yielding_token_program"
6311
8131
  },
6312
8132
  {
6313
- "name": "bank_token_program",
6314
- "optional": true
8133
+ "name": "bank_token_program"
6315
8134
  },
6316
8135
  {
6317
8136
  "name": "associated_token_program",
@@ -7200,13 +9019,133 @@ var IDL = {
7200
9019
  "writable": true
7201
9020
  },
7202
9021
  {
7203
- "name": "user_bank_mint_ata",
9022
+ "name": "user_bank_mint_ata",
9023
+ "writable": true,
9024
+ "pda": {
9025
+ "seeds": [
9026
+ {
9027
+ "kind": "account",
9028
+ "path": "user"
9029
+ },
9030
+ {
9031
+ "kind": "account",
9032
+ "path": "token_program"
9033
+ },
9034
+ {
9035
+ "kind": "account",
9036
+ "path": "bank_mint"
9037
+ }
9038
+ ],
9039
+ "program": {
9040
+ "kind": "const",
9041
+ "value": [
9042
+ 140,
9043
+ 151,
9044
+ 37,
9045
+ 143,
9046
+ 78,
9047
+ 36,
9048
+ 137,
9049
+ 241,
9050
+ 187,
9051
+ 61,
9052
+ 16,
9053
+ 41,
9054
+ 20,
9055
+ 142,
9056
+ 13,
9057
+ 131,
9058
+ 11,
9059
+ 90,
9060
+ 19,
9061
+ 153,
9062
+ 218,
9063
+ 255,
9064
+ 16,
9065
+ 132,
9066
+ 4,
9067
+ 142,
9068
+ 123,
9069
+ 216,
9070
+ 219,
9071
+ 233,
9072
+ 248,
9073
+ 89
9074
+ ]
9075
+ }
9076
+ }
9077
+ },
9078
+ {
9079
+ "name": "user_junior_mint_ata",
9080
+ "docs": [
9081
+ "User's ATA for receiving junior share tokens"
9082
+ ],
9083
+ "writable": true,
9084
+ "pda": {
9085
+ "seeds": [
9086
+ {
9087
+ "kind": "account",
9088
+ "path": "user"
9089
+ },
9090
+ {
9091
+ "kind": "account",
9092
+ "path": "token_program"
9093
+ },
9094
+ {
9095
+ "kind": "account",
9096
+ "path": "junior_mint"
9097
+ }
9098
+ ],
9099
+ "program": {
9100
+ "kind": "const",
9101
+ "value": [
9102
+ 140,
9103
+ 151,
9104
+ 37,
9105
+ 143,
9106
+ 78,
9107
+ 36,
9108
+ 137,
9109
+ 241,
9110
+ 187,
9111
+ 61,
9112
+ 16,
9113
+ 41,
9114
+ 20,
9115
+ 142,
9116
+ 13,
9117
+ 131,
9118
+ 11,
9119
+ 90,
9120
+ 19,
9121
+ 153,
9122
+ 218,
9123
+ 255,
9124
+ 16,
9125
+ 132,
9126
+ 4,
9127
+ 142,
9128
+ 123,
9129
+ 216,
9130
+ 219,
9131
+ 233,
9132
+ 248,
9133
+ 89
9134
+ ]
9135
+ }
9136
+ }
9137
+ },
9138
+ {
9139
+ "name": "junior_escrow_ata",
9140
+ "docs": [
9141
+ "The escrow ATA for staked bank mint tokens, owned by the tranche state PDA"
9142
+ ],
7204
9143
  "writable": true,
7205
9144
  "pda": {
7206
9145
  "seeds": [
7207
9146
  {
7208
9147
  "kind": "account",
7209
- "path": "user"
9148
+ "path": "tranche_state"
7210
9149
  },
7211
9150
  {
7212
9151
  "kind": "account",
@@ -7257,16 +9196,96 @@ var IDL = {
7257
9196
  }
7258
9197
  },
7259
9198
  {
7260
- "name": "user_junior_mint_ata",
7261
- "docs": [
7262
- "User's ATA for receiving junior share tokens"
7263
- ],
9199
+ "name": "system_program",
9200
+ "address": "11111111111111111111111111111111"
9201
+ },
9202
+ {
9203
+ "name": "token_program"
9204
+ },
9205
+ {
9206
+ "name": "associated_token_program",
9207
+ "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
9208
+ }
9209
+ ],
9210
+ "args": [
9211
+ {
9212
+ "name": "amount",
9213
+ "type": "u64"
9214
+ }
9215
+ ]
9216
+ },
9217
+ {
9218
+ "name": "sweep_legacy_junior_escrow_excess",
9219
+ "discriminator": [
9220
+ 66,
9221
+ 219,
9222
+ 143,
9223
+ 146,
9224
+ 126,
9225
+ 14,
9226
+ 138,
9227
+ 156
9228
+ ],
9229
+ "accounts": [
9230
+ {
9231
+ "name": "manager",
7264
9232
  "writable": true,
9233
+ "signer": true
9234
+ },
9235
+ {
9236
+ "name": "bank_state",
7265
9237
  "pda": {
7266
9238
  "seeds": [
9239
+ {
9240
+ "kind": "const",
9241
+ "value": [
9242
+ 66,
9243
+ 65,
9244
+ 78,
9245
+ 75
9246
+ ]
9247
+ },
7267
9248
  {
7268
9249
  "kind": "account",
7269
- "path": "user"
9250
+ "path": "bank_state"
9251
+ }
9252
+ ]
9253
+ }
9254
+ },
9255
+ {
9256
+ "name": "tranche_state",
9257
+ "pda": {
9258
+ "seeds": [
9259
+ {
9260
+ "kind": "const",
9261
+ "value": [
9262
+ 84,
9263
+ 82,
9264
+ 65,
9265
+ 78,
9266
+ 67,
9267
+ 72,
9268
+ 69
9269
+ ]
9270
+ },
9271
+ {
9272
+ "kind": "account",
9273
+ "path": "bank_state"
9274
+ }
9275
+ ]
9276
+ }
9277
+ },
9278
+ {
9279
+ "name": "bank_mint"
9280
+ },
9281
+ {
9282
+ "name": "junior_escrow_ata",
9283
+ "writable": true,
9284
+ "pda": {
9285
+ "seeds": [
9286
+ {
9287
+ "kind": "account",
9288
+ "path": "tranche_state"
7270
9289
  },
7271
9290
  {
7272
9291
  "kind": "account",
@@ -7274,7 +9293,7 @@ var IDL = {
7274
9293
  },
7275
9294
  {
7276
9295
  "kind": "account",
7277
- "path": "junior_mint"
9296
+ "path": "bank_mint"
7278
9297
  }
7279
9298
  ],
7280
9299
  "program": {
@@ -7317,16 +9336,13 @@ var IDL = {
7317
9336
  }
7318
9337
  },
7319
9338
  {
7320
- "name": "junior_escrow_ata",
7321
- "docs": [
7322
- "The escrow ATA for staked bank mint tokens, owned by the tranche state PDA"
7323
- ],
9339
+ "name": "destination_ata",
7324
9340
  "writable": true,
7325
9341
  "pda": {
7326
9342
  "seeds": [
7327
9343
  {
7328
9344
  "kind": "account",
7329
- "path": "tranche_state"
9345
+ "path": "manager"
7330
9346
  },
7331
9347
  {
7332
9348
  "kind": "account",
@@ -7376,24 +9392,19 @@ var IDL = {
7376
9392
  }
7377
9393
  }
7378
9394
  },
7379
- {
7380
- "name": "system_program",
7381
- "address": "11111111111111111111111111111111"
7382
- },
7383
9395
  {
7384
9396
  "name": "token_program"
7385
9397
  },
7386
9398
  {
7387
9399
  "name": "associated_token_program",
7388
9400
  "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
7389
- }
7390
- ],
7391
- "args": [
9401
+ },
7392
9402
  {
7393
- "name": "amount",
7394
- "type": "u64"
9403
+ "name": "system_program",
9404
+ "address": "11111111111111111111111111111111"
7395
9405
  }
7396
- ]
9406
+ ],
9407
+ "args": []
7397
9408
  },
7398
9409
  {
7399
9410
  "name": "team_withdraws_fees",
@@ -7701,8 +9712,10 @@ var IDL = {
7701
9712
  },
7702
9713
  {
7703
9714
  "name": "tranche_state",
7704
- "writable": true,
7705
- "optional": true,
9715
+ "docs": [
9716
+ "for a source bank that never enabled tranching; the handler verifies its",
9717
+ "owner and deserializes it when it exists."
9718
+ ],
7706
9719
  "pda": {
7707
9720
  "seeds": [
7708
9721
  {
@@ -7724,6 +9737,20 @@ var IDL = {
7724
9737
  ]
7725
9738
  }
7726
9739
  },
9740
+ {
9741
+ "name": "junior_escrow_ata",
9742
+ "docs": [
9743
+ "from the source bank mint and token program, then validates and requires an",
9744
+ "empty token account whenever the source tranche exists."
9745
+ ]
9746
+ },
9747
+ {
9748
+ "name": "locked_junior_shares_ata",
9749
+ "docs": [
9750
+ "when transferring the junior receipt mint authority."
9751
+ ],
9752
+ "optional": true
9753
+ },
7727
9754
  {
7728
9755
  "name": "vault_tranche_state",
7729
9756
  "writable": true,
@@ -7731,6 +9758,13 @@ var IDL = {
7731
9758
  },
7732
9759
  {
7733
9760
  "name": "token_program"
9761
+ },
9762
+ {
9763
+ "name": "bank_token_program",
9764
+ "docs": [
9765
+ "Token program that owns the legacy bank mint and junior escrow. This can",
9766
+ "differ from `token_program` when transferring the junior receipt mint."
9767
+ ]
7734
9768
  }
7735
9769
  ],
7736
9770
  "args": [
@@ -8410,6 +10444,22 @@ var IDL = {
8410
10444
  {
8411
10445
  "name": "system_program",
8412
10446
  "address": "11111111111111111111111111111111"
10447
+ },
10448
+ {
10449
+ "name": "vault_oracle",
10450
+ "docs": [
10451
+ "Required when enabling tranching organically (`for_migration == false`)",
10452
+ "on a vault that still has main shareholders accruing fixed APY: that APY",
10453
+ "is only folded into `mint_share_price` while tranching is off, so a fresh",
10454
+ "NAV must have been settled just before the switch or the accrued APY owed",
10455
+ "to those shareholders is forfeited. Not needed on the migration path,",
10456
+ "whose accounting is reconstructed wholesale from the legacy state.",
10457
+ "",
10458
+ "Kept LAST (a trailing optional account) so legacy clients that predate it",
10459
+ "\u2014 e.g. the migration path building against the frozen bankineco IDL \u2014",
10460
+ "simply omit it and the program reads it as `None`."
10461
+ ],
10462
+ "optional": true
8413
10463
  }
8414
10464
  ],
8415
10465
  "args": [
@@ -8584,6 +10634,14 @@ var IDL = {
8584
10634
  {
8585
10635
  "name": "system_program",
8586
10636
  "address": "11111111111111111111111111111111"
10637
+ },
10638
+ {
10639
+ "name": "source_vault_tranche_state",
10640
+ "optional": true
10641
+ },
10642
+ {
10643
+ "name": "destination_vault_tranche_state",
10644
+ "optional": true
8587
10645
  }
8588
10646
  ],
8589
10647
  "args": [
@@ -8967,239 +11025,219 @@ var IDL = {
8967
11025
  ],
8968
11026
  "errors": [
8969
11027
  {
8970
- "code": 14001,
8971
- "name": "Unauthorized",
8972
- "msg": "You are not authorized to perform this action."
11028
+ "code": 6e3,
11029
+ "name": "MintSupplyNonZero",
11030
+ "msg": "Supplied share mint already has non-zero supply"
8973
11031
  },
8974
11032
  {
8975
- "code": 14002,
8976
- "name": "InvalidBankMint",
8977
- "msg": "Invalid mint"
11033
+ "code": 6001,
11034
+ "name": "InvalidAssetMint",
11035
+ "msg": "Supplied mint is not accepted by this vault"
8978
11036
  },
8979
11037
  {
8980
- "code": 14003,
8981
- "name": "AccountingIssue",
8982
- "msg": "Accounting issue"
11038
+ "code": 6002,
11039
+ "name": "ZeroDepositAmount",
11040
+ "msg": "Deposit amount must be greater than zero"
8983
11041
  },
8984
11042
  {
8985
- "code": 14004,
8986
- "name": "VaultAccountingIssue",
8987
- "msg": "Vault accounting issue"
11043
+ "code": 6003,
11044
+ "name": "ExceedsTvlLimit",
11045
+ "msg": "Deposit would exceed the vault's TVL limit"
8988
11046
  },
8989
11047
  {
8990
- "code": 14005,
8991
- "name": "BankAccountingIssue",
8992
- "msg": "Bank accounting issue"
11048
+ "code": 6004,
11049
+ "name": "ZeroBurnAmount",
11050
+ "msg": "Burn amount must be greater than zero"
8993
11051
  },
8994
11052
  {
8995
- "code": 14006,
8996
- "name": "OnchainAccountingIssue",
8997
- "msg": "Onchain accounting issue"
11053
+ "code": 6005,
11054
+ "name": "ZeroAssetAmount",
11055
+ "msg": "Asset amount must be greater than zero"
8998
11056
  },
8999
11057
  {
9000
- "code": 14007,
9001
- "name": "ExternalAccountingIssue",
9002
- "msg": "External accounting issue"
11058
+ "code": 6006,
11059
+ "name": "InsufficientVaultLiquidity",
11060
+ "msg": "Insufficient vault liquidity to satisfy withdrawal"
9003
11061
  },
9004
11062
  {
9005
- "code": 14008,
9006
- "name": "MintSlippage",
9007
- "msg": "Minting failed due to slippage."
11063
+ "code": 6007,
11064
+ "name": "MintAuthorityNotCurator",
11065
+ "msg": "Mint authority is not the curator"
9008
11066
  },
9009
11067
  {
9010
- "code": 14009,
9011
- "name": "BurningSlippage",
9012
- "msg": "Burning failed due to slippage."
11068
+ "code": 6008,
11069
+ "name": "ZeroTotalSupply",
11070
+ "msg": "Vault total supply is zero"
9013
11071
  },
9014
11072
  {
9015
- "code": 14010,
9016
- "name": "TeamAccountAlreadyExists",
9017
- "msg": "Team account already exists"
9018
- },
9019
- {
9020
- "code": 14011,
9021
- "name": "OracleAccountAlreadyExists",
9022
- "msg": "Oracle account already exists"
9023
- },
9024
- {
9025
- "code": 14012,
11073
+ "code": 6009,
9026
11074
  "name": "StaleOracle",
9027
- "msg": "Stale oracle"
9028
- },
9029
- {
9030
- "code": 14013,
9031
- "name": "LocalSignificantPriceChange",
9032
- "msg": "Price change is too large locally"
9033
- },
9034
- {
9035
- "code": 14014,
9036
- "name": "SignificantPriceChange",
9037
- "msg": "Price change is too large"
11075
+ "msg": "Vault oracle is stale"
9038
11076
  },
9039
11077
  {
9040
- "code": 14015,
9041
- "name": "RoundingImpact",
9042
- "msg": "Rounding impacts the protocol"
11078
+ "code": 6010,
11079
+ "name": "InvalidOracleUpdate",
11080
+ "msg": "Invalid oracle update"
9043
11081
  },
9044
11082
  {
9045
- "code": 14016,
9046
- "name": "BankIsHalted",
9047
- "msg": "Bank is halted"
11083
+ "code": 6011,
11084
+ "name": "InvalidInitialMintSharePrice",
11085
+ "msg": "Initial mint share price must be greater than zero"
9048
11086
  },
9049
11087
  {
9050
- "code": 14017,
9051
- "name": "VaultIsHalted",
9052
- "msg": "Vault is halted"
11088
+ "code": 6012,
11089
+ "name": "MaxApyExceeded",
11090
+ "msg": "Oracle NAV update exceeds the vault's maximum acceptable APY"
9053
11091
  },
9054
11092
  {
9055
- "code": 14018,
9056
- "name": "ConversionOverflow",
9057
- "msg": "Conversion Overflow"
11093
+ "code": 6013,
11094
+ "name": "InvalidApyConfig",
11095
+ "msg": "Invalid APY configuration"
9058
11096
  },
9059
11097
  {
9060
- "code": 14019,
9061
- "name": "_Reserved8019",
9062
- "msg": "Reserved"
11098
+ "code": 6014,
11099
+ "name": "InvalidFeeConfig",
11100
+ "msg": "Invalid fee configuration"
9063
11101
  },
9064
11102
  {
9065
- "code": 14020,
9066
- "name": "InvalidArgument",
9067
- "msg": "Invalid argument"
11103
+ "code": 6015,
11104
+ "name": "VaultHasLiveAssets",
11105
+ "msg": "Vault has live supply, TVL, or holdings"
9068
11106
  },
9069
11107
  {
9070
- "code": 14021,
9071
- "name": "UserSanityCheck",
9072
- "msg": "User Sanity Check"
11108
+ "code": 6016,
11109
+ "name": "DepositMintsZeroShares",
11110
+ "msg": "Deposit would mint zero shares"
9073
11111
  },
9074
11112
  {
9075
- "code": 14022,
9076
- "name": "MathOverflow",
9077
- "msg": "Math overflow"
11113
+ "code": 6017,
11114
+ "name": "InsufficientAccruedApyBalance",
11115
+ "msg": "Insufficient accrued APY balance"
9078
11116
  },
9079
11117
  {
9080
- "code": 14023,
9081
- "name": "InvalidMarginFiAccount",
9082
- "msg": "Invalid MarginFi account - must be correct PDA for this vault"
11118
+ "code": 6018,
11119
+ "name": "InvalidRole",
11120
+ "msg": "Invalid role configuration"
9083
11121
  },
9084
11122
  {
9085
- "code": 14024,
9086
- "name": "InvalidStartMarker",
9087
- "msg": "Invalid start marker"
11123
+ "code": 6019,
11124
+ "name": "InvalidProtocolInteraction",
11125
+ "msg": "Invalid protocol interaction CPI"
9088
11126
  },
9089
11127
  {
9090
- "code": 14025,
9091
- "name": "OracleUpdateOnEmptyReserve",
9092
- "msg": "Unable to push oracle update on an empty vault reserve"
11128
+ "code": 6020,
11129
+ "name": "_Reserved7020",
11130
+ "msg": "Reserved"
9093
11131
  },
9094
11132
  {
9095
- "code": 14026,
9096
- "name": "InvalidRemainingAccountsLength",
9097
- "msg": "Invalid remaining accounts length"
11133
+ "code": 6021,
11134
+ "name": "InvalidExternalLiquidity",
11135
+ "msg": "Invalid external liquidity configuration"
9098
11136
  },
9099
11137
  {
9100
- "code": 14027,
9101
- "name": "WithdrawalExceedsBalance",
9102
- "msg": "Specified withdrawal exceeds available balance"
11138
+ "code": 6022,
11139
+ "name": "SwapBalanceUnchanged",
11140
+ "msg": "Swap did not change both source and destination balances"
9103
11141
  },
9104
11142
  {
9105
- "code": 14028,
9106
- "name": "InsufficientPendingYield",
9107
- "msg": "Insufficient pending yield"
11143
+ "code": 6023,
11144
+ "name": "ProtocolBalanceUnchanged",
11145
+ "msg": "Protocol interaction did not change the affected token balance"
9108
11146
  },
9109
11147
  {
9110
- "code": 14029,
9111
- "name": "NotSupported",
9112
- "msg": "Not supported"
11148
+ "code": 6024,
11149
+ "name": "ExcessiveSwapSlippage",
11150
+ "msg": "Swap TVL loss exceeds the allowed slippage"
9113
11151
  },
9114
11152
  {
9115
- "code": 14030,
9116
- "name": "ExceedsMaxYieldingTvl",
9117
- "msg": "Exceeds maximum yielding TVL"
11153
+ "code": 6025,
11154
+ "name": "TranchingNotEnabled",
11155
+ "msg": "Vault tranching is not enabled"
9118
11156
  },
9119
11157
  {
9120
- "code": 14031,
9121
- "name": "TranchingNotEnabled",
9122
- "msg": "Tranching is not enabled for this bank"
11158
+ "code": 6026,
11159
+ "name": "TranchingAlreadyEnabled",
11160
+ "msg": "Vault tranching is already enabled"
9123
11161
  },
9124
11162
  {
9125
- "code": 14032,
9126
- "name": "InvalidLeverageFactor",
9127
- "msg": "Invalid leverage factor - must be at least 10000 (1x)"
11163
+ "code": 6027,
11164
+ "name": "TrancheStateRequired",
11165
+ "msg": "Tranche state account is required"
9128
11166
  },
9129
11167
  {
9130
- "code": 14033,
9131
- "name": "InsufficientStakedAmount",
9132
- "msg": "Insufficient staked amount"
11168
+ "code": 6028,
11169
+ "name": "InvalidTrancheConfig",
11170
+ "msg": "Invalid tranche configuration"
9133
11171
  },
9134
11172
  {
9135
- "code": 14034,
9136
- "name": "JuniorTrancheEmpty",
9137
- "msg": "Junior tranche has no value"
11173
+ "code": 6029,
11174
+ "name": "InvalidTrancheMint",
11175
+ "msg": "Invalid tranche mint"
9138
11176
  },
9139
11177
  {
9140
- "code": 14035,
9141
- "name": "InvalidTrancheConfig",
9142
- "msg": "Invalid tranche config parameter"
11178
+ "code": 6030,
11179
+ "name": "LossesDisabled",
11180
+ "msg": "Vault losses are not enabled"
9143
11181
  },
9144
11182
  {
9145
- "code": 14036,
11183
+ "code": 6031,
9146
11184
  "name": "WithdrawalQueueNotExpired",
9147
- "msg": "Withdrawal queue lockup period has not expired"
11185
+ "msg": "Withdrawal queue is not yet expired"
9148
11186
  },
9149
11187
  {
9150
- "code": 14037,
11188
+ "code": 6032,
9151
11189
  "name": "InvalidWithdrawalQueue",
9152
- "msg": "Withdrawal queue entry is not in a valid state"
11190
+ "msg": "Invalid withdrawal queue"
9153
11191
  },
9154
11192
  {
9155
- "code": 14038,
9156
- "name": "InvalidAccount",
9157
- "msg": "Account does not belong to the expected parent"
11193
+ "code": 6033,
11194
+ "name": "AssetPriceNotSet",
11195
+ "msg": "Destination asset has no price set; a consensus oracle price is required before swapping"
9158
11196
  },
9159
11197
  {
9160
- "code": 14039,
9161
- "name": "MissingAccount",
9162
- "msg": "Required optional account is missing"
11198
+ "code": 6034,
11199
+ "name": "AssetHoldingNotEmpty",
11200
+ "msg": "Asset holding still has a balance and cannot be removed"
9163
11201
  },
9164
11202
  {
9165
- "code": 14040,
9166
- "name": "TrancheWipedOut",
9167
- "msg": "Junior tranche is wiped out and cannot accept new stakes"
11203
+ "code": 6035,
11204
+ "name": "CannotRemoveBaseHolding",
11205
+ "msg": "The base asset holding cannot be removed"
9168
11206
  },
9169
11207
  {
9170
- "code": 14041,
9171
- "name": "VaultLossNotAccepted",
9172
- "msg": "Vault does not accept losses \u2014 enable losses_accepted before retrying"
11208
+ "code": 6036,
11209
+ "name": "UnauthorizedPriceUpdater",
11210
+ "msg": "Caller is not authorized to trigger an asset price update"
9173
11211
  },
9174
11212
  {
9175
- "code": 14042,
9176
- "name": "CapitalLossExceedsReserve",
9177
- "msg": "Capital loss exceeds available yielding reserve"
11213
+ "code": 6037,
11214
+ "name": "InvalidStalenessConfig",
11215
+ "msg": "Invalid asset-price staleness threshold"
9178
11216
  },
9179
11217
  {
9180
- "code": 14043,
9181
- "name": "RollingWithdrawalLimitExceeded",
9182
- "msg": "Rolling withdrawal limit exceeded"
11218
+ "code": 6038,
11219
+ "name": "AssetRebalanceRateLimitExceeded",
11220
+ "msg": "Asset was rebalanced too recently"
9183
11221
  },
9184
11222
  {
9185
- "code": 14044,
9186
- "name": "VaultAlreadyMigrated",
9187
- "msg": "Legacy vault has already been migrated"
11223
+ "code": 6039,
11224
+ "name": "InvalidShareTokenProgram",
11225
+ "msg": "Share token program does not match the vault/tranche mint configuration"
9188
11226
  },
9189
11227
  {
9190
- "code": 14045,
9191
- "name": "InvalidMigrationState",
9192
- "msg": "Legacy vault migration is incomplete or invalid"
11228
+ "code": 6040,
11229
+ "name": "UnauthorizedVaultCreator",
11230
+ "msg": "Caller is not on the vault-creator whitelist"
9193
11231
  },
9194
11232
  {
9195
- "code": 14046,
9196
- "name": "InvalidMigrationMintAuthority",
9197
- "msg": "Mint authority does not match the expected migration source"
11233
+ "code": 6041,
11234
+ "name": "InvalidShareMintDecimals",
11235
+ "msg": "Share mint decimals must match the deposit asset mint decimals"
9198
11236
  },
9199
11237
  {
9200
- "code": 14047,
9201
- "name": "BankMigrationIncomplete",
9202
- "msg": "Bank migration is incomplete \u2014 yielding TVL must be zero before main mint authority transfer"
11238
+ "code": 6042,
11239
+ "name": "InvalidFeeExemption",
11240
+ "msg": "Invalid fee-exemption PDA signer or seeds"
9203
11241
  }
9204
11242
  ],
9205
11243
  "types": [
@@ -9208,7 +11246,7 @@ var IDL = {
9208
11246
  "docs": [
9209
11247
  "APY targets and deficit tracking.",
9210
11248
  "",
9211
- "Expected share price at time `t` is computed from the anchor:",
11249
+ "Expected share price at time `t` is computed from the durable anchor:",
9212
11250
  "expected = anchor_share_price * (1 + fixed_apy_bps/10_000)^((t - anchor_ts)/YEAR)",
9213
11251
  "",
9214
11252
  "The anchor must be reset whenever any of the following change:",
@@ -9271,16 +11309,15 @@ var IDL = {
9271
11309
  {
9272
11310
  "name": "accrued_apy_balance",
9273
11311
  "docs": [
9274
- "Realised performance balance, carried across re-anchors. A TVL-",
9275
- "denominated amount (same accounting unit as `VaultAccounting::tvl`):",
9276
- "positive = banked surplus credit available to cover future fixed-APY",
9277
- "deficits.",
11312
+ "Current divergence between holdings-derived NAV and the fixed-APY target,",
11313
+ "in the same accounting unit as `VaultAccounting::tvl`: positive means",
11314
+ "holdings are above target; negative means they are below target.",
9278
11315
  "",
9279
11316
  "Used in two cases:",
9280
11317
  "",
9281
11318
  "1. APY tracking when `fixed_apy_bps` is set -- the",
9282
- "delta between expected share price (from the anchor + fixed APY) and",
9283
- "actual share price feeds in here on each settlement.",
11319
+ "difference between expected NAV and actual holdings-derived NAV is",
11320
+ "recorded here on each settlement.",
9284
11321
  "2. NAV reconciliation regardless of APY settings -- when the oracle's",
9285
11322
  "settled NAV diverges from the booked `VaultAccounting::tvl`, the",
9286
11323
  "difference accrues here (oracle NAV above book = surplus; below =",
@@ -11344,11 +13381,10 @@ var IDL = {
11344
13381
  }
11345
13382
  },
11346
13383
  {
11347
- "name": "apy_settle_skip",
13384
+ "name": "_padding_bool",
11348
13385
  "docs": [
11349
- "Set when a holding is first priced (price 0 -> non-zero) by an oracle",
11350
- "update; consumed by the next `crank_nav` to skip the realized-APY guard",
11351
- "for that settlement (first-pricing legitimately moves NAV). Was padding."
13386
+ "Reserved padding (previously `apy_settle_skip`). Kept as a field to",
13387
+ "preserve the on-chain account layout for already-deployed vaults."
11352
13388
  ],
11353
13389
  "type": {
11354
13390
  "defined": {
@@ -11629,10 +13665,6 @@ var IDL = {
11629
13665
  ],
11630
13666
  "type": "pubkey"
11631
13667
  },
11632
- {
11633
- "name": "asset_decimals",
11634
- "type": "u8"
11635
- },
11636
13668
  {
11637
13669
  "name": "mint_fee_bps",
11638
13670
  "type": "u16"
@@ -12306,12 +14338,24 @@ var IDL = {
12306
14338
  "name": "protocol_fees_accrued",
12307
14339
  "type": "u64"
12308
14340
  },
14341
+ {
14342
+ "name": "hwm_share_price",
14343
+ "docs": [
14344
+ "High-water mark for this class's performance fee, in the same fixed-point",
14345
+ "units as `share_price`. Only share-price growth above this mark is charged",
14346
+ 'a performance/protocol fee. `0` means "not yet initialized" and is lazily',
14347
+ "set to the current share price on the next settlement (so pre-existing",
14348
+ "accounts never retroactively pay on gains earned before this field",
14349
+ "existed). Only the junior class charges a fee; senior is exempt."
14350
+ ],
14351
+ "type": "u64"
14352
+ },
12309
14353
  {
12310
14354
  "name": "_padding1",
12311
14355
  "type": {
12312
14356
  "array": [
12313
14357
  "u64",
12314
- 14
14358
+ 13
12315
14359
  ]
12316
14360
  }
12317
14361
  }
@@ -12440,7 +14484,21 @@ var IDL = {
12440
14484
  {
12441
14485
  "name": "last_settled_ts",
12442
14486
  "docs": [
12443
- "Last timestamp used for senior fixed-APY entitlement accrual."
14487
+ "Last NAV settlement timestamp."
14488
+ ],
14489
+ "type": "i64"
14490
+ },
14491
+ {
14492
+ "name": "senior_apy_anchor_share_price",
14493
+ "docs": [
14494
+ "Senior share price at the start of the current APY regime."
14495
+ ],
14496
+ "type": "u64"
14497
+ },
14498
+ {
14499
+ "name": "senior_apy_anchor_ts",
14500
+ "docs": [
14501
+ "Unix timestamp when the senior APY anchor was set."
12444
14502
  ],
12445
14503
  "type": "i64"
12446
14504
  },
@@ -12449,7 +14507,7 @@ var IDL = {
12449
14507
  "type": {
12450
14508
  "array": [
12451
14509
  "u64",
12452
- 31
14510
+ 29
12453
14511
  ]
12454
14512
  }
12455
14513
  }
@@ -12691,8 +14749,8 @@ var IDL = {
12691
14749
  "name": "hwm_share_price",
12692
14750
  "docs": [
12693
14751
  "High-water mark for the performance fee. Only share-price growth above",
12694
- "this value is fee-eligible; monotonically increasing and never reset",
12695
- "on fee changes (resetting would be a giveback to the curator)."
14752
+ "this value is fee-eligible. Fee-rate changes re-anchor it to the current",
14753
+ "share price so the new rate does not apply retroactively."
12696
14754
  ],
12697
14755
  "type": "u64"
12698
14756
  },
@@ -13360,7 +15418,11 @@ var VaultQuoteClient = class {
13360
15418
  this.account.fetchVault(args.vault, { fresh: args.fresh }),
13361
15419
  this.fetchSignerOwner(args.signer)
13362
15420
  ]);
13363
- const feeExempt = this.isFeeExemptSignerOwner(signerOwner);
15421
+ const feeExempt = this.isFeeExemptSigner(
15422
+ args.signer,
15423
+ signerOwner,
15424
+ args.addressSeeds
15425
+ );
13364
15426
  if (args.shareClass === "regular") {
13365
15427
  return this.quoteRegular(args, vault, signerOwner, feeExempt);
13366
15428
  }
@@ -13371,12 +15433,21 @@ var VaultQuoteClient = class {
13371
15433
  const info = await this.connection.getAccountInfo(new import_web32.PublicKey(signer), "confirmed").catch(() => null);
13372
15434
  return info ? (0, import_kit4.address)(info.owner.toBase58()) : null;
13373
15435
  }
13374
- isFeeExemptSignerOwner(owner) {
13375
- if (!owner) return false;
15436
+ isFeeExemptSigner(signer, owner, seeds) {
15437
+ if (!owner || !seeds) return false;
13376
15438
  const ownerString = owner.toString();
13377
- return ownerString === this.programId.toString() || PROGRAM_FEE_EXEMPT_OWNER_WHITELIST.some(
15439
+ const approvedOwner = ownerString === this.programId.toString() || PROGRAM_FEE_EXEMPT_OWNER_WHITELIST.some(
13378
15440
  (whitelisted) => whitelisted.toString() === ownerString
13379
15441
  );
15442
+ if (!approvedOwner) return false;
15443
+ try {
15444
+ return import_web32.PublicKey.createProgramAddressSync(
15445
+ seeds.map((seed) => Buffer.from(seed)),
15446
+ new import_web32.PublicKey(ownerString)
15447
+ ).equals(new import_web32.PublicKey(signer));
15448
+ } catch {
15449
+ return false;
15450
+ }
13380
15451
  }
13381
15452
  async fetchTrancheState(args) {
13382
15453
  if (args.vaultTrancheState) {
@@ -13715,10 +15786,15 @@ var CancelJuniorTrancheWithdrawBuilder = class extends VaultBuilderBase {
13715
15786
  txArgs.user,
13716
15787
  txArgs.queueId
13717
15788
  ),
13718
- resolveTrancheShare(this.account, txArgs.vault, { junior: {} }, {
13719
- mint: txArgs.juniorShareMint,
13720
- tokenProgram: txArgs.shareTokenProgram
13721
- })
15789
+ resolveTrancheShare(
15790
+ this.account,
15791
+ txArgs.vault,
15792
+ { junior: {} },
15793
+ {
15794
+ mint: txArgs.juniorShareMint,
15795
+ tokenProgram: txArgs.shareTokenProgram
15796
+ }
15797
+ )
13722
15798
  ]);
13723
15799
  const { mint: juniorShareMint, tokenProgram: shareTokenProgram } = juniorShare;
13724
15800
  const queuePda = txArgs.withdrawalQueue ?? withdrawalQueue;
@@ -13862,6 +15938,10 @@ var CreateTrancheStateBuilder = class extends VaultBuilderBase {
13862
15938
  vaultTrancheState: (0, import_common8.toWeb3Pk)(args.vaultTrancheState),
13863
15939
  juniorShareMint: (0, import_common8.toWeb3Pk)(args.juniorShareMint),
13864
15940
  seniorShareMint: (0, import_common8.toWeb3Pk)(args.seniorShareMint),
15941
+ // Optional on-chain: required only on the organic path, where the
15942
+ // program enforces a fresh NAV before enabling tranching. Left null on
15943
+ // the migration path so Anchor resolves it to the program ID.
15944
+ vaultOracle: args.vaultOracle ? (0, import_common8.toWeb3Pk)(args.vaultOracle) : null,
13865
15945
  tokenProgram: (0, import_common8.toWeb3Pk)(args.tokenProgram),
13866
15946
  systemProgram: import_web35.SystemProgram.programId
13867
15947
  }).instruction().then(import_common8.toKitInstruction);
@@ -13870,19 +15950,32 @@ var CreateTrancheStateBuilder = class extends VaultBuilderBase {
13870
15950
  const [vaultTrancheState] = await this.pda.deriveVaultTrancheStatePda(
13871
15951
  txArgs.vault
13872
15952
  );
15953
+ const forMigration = txArgs.forMigration ?? false;
15954
+ let vaultOracle = txArgs.vaultOracle;
15955
+ if (!forMigration && vaultOracle === void 0) {
15956
+ const vaultData = await this.account.fetchVault(txArgs.vault, {
15957
+ fresh: true
15958
+ });
15959
+ const hasMainShares = BigInt(vaultData.accounting.totalMintSupply.toString()) > 0n;
15960
+ const hasFixedApy = vaultData.config.apy.fixedApyBps > 0;
15961
+ if (hasMainShares && hasFixedApy) {
15962
+ [vaultOracle] = await this.pda.deriveVaultOraclePda(txArgs.vault);
15963
+ }
15964
+ }
13873
15965
  return {
13874
15966
  curator: txArgs.curator,
13875
15967
  vault: txArgs.vault,
13876
15968
  vaultTrancheState,
13877
15969
  juniorShareMint: txArgs.juniorShareMint,
13878
15970
  seniorShareMint: txArgs.seniorShareMint,
15971
+ vaultOracle,
13879
15972
  seniorFixedApyBps: txArgs.seniorFixedApyBps ?? 0,
13880
15973
  earlyUnstakeFeeBps: txArgs.earlyUnstakeFeeBps ?? DEFAULT_JUNIOR_EARLY_UNSTAKE_FEE_BPS,
13881
15974
  standardUnstakeFeeBps: txArgs.standardUnstakeFeeBps ?? DEFAULT_JUNIOR_STANDARD_UNSTAKE_FEE_BPS,
13882
15975
  targetLockupDurationSecs: new import_core.BN(
13883
15976
  (txArgs.targetLockupDurationSecs ?? DEFAULT_JUNIOR_WITHDRAWAL_LOCKUP_SECS).toString()
13884
15977
  ),
13885
- forMigration: txArgs.forMigration ?? false,
15978
+ forMigration,
13886
15979
  tokenProgram: txArgs.tokenProgram ?? TOKEN_PROGRAM_ID
13887
15980
  };
13888
15981
  }
@@ -13916,6 +16009,7 @@ var ActivateCircuitBreakerBuilder = class extends VaultBuilderBase {
13916
16009
 
13917
16010
  // src/client/builders/createVault.ts
13918
16011
  var import_core3 = require("@anchor-lang/core");
16012
+ var import_token = require("@solana-program/token");
13919
16013
  var import_spl_token4 = require("@solana/spl-token");
13920
16014
  var import_web36 = require("@solana/web3.js");
13921
16015
  var import_common11 = __toESM(require_dist());
@@ -13982,6 +16076,7 @@ var CreateVaultBuilder = class extends VaultBuilderBase {
13982
16076
  const [vault] = await this.pda.deriveVaultPda(vaultId);
13983
16077
  const [vaultOracle] = await this.pda.deriveVaultOraclePda(vault);
13984
16078
  const [feeVault] = await this.pda.deriveFeeAuthorityPda(vault);
16079
+ const assetDecimals = (await (0, import_token.fetchMint)(this.rpc, txArgs.strictAssetMint)).data.decimals;
13985
16080
  return {
13986
16081
  curator: txArgs.curator,
13987
16082
  vault,
@@ -13996,7 +16091,6 @@ var CreateVaultBuilder = class extends VaultBuilderBase {
13996
16091
  cbTrigger: txArgs.cbTrigger ?? txArgs.curator,
13997
16092
  feeCollector: txArgs.feeCollector ?? txArgs.curator,
13998
16093
  baseAssetMint: txArgs.strictAssetMint,
13999
- assetDecimals: txArgs.assetDecimals,
14000
16094
  mintFeeBps: txArgs.mintFeeBps ?? 0,
14001
16095
  burnFeeBps: txArgs.burnFeeBps ?? 0,
14002
16096
  performanceFeeBps: txArgs.performanceFeeBps ?? 0,
@@ -14007,7 +16101,7 @@ var CreateVaultBuilder = class extends VaultBuilderBase {
14007
16101
  initialMintSharePrice: null,
14008
16102
  basePriceOracleType: txArgs.basePriceOracleType ?? 1,
14009
16103
  basePrice: new import_core3.BN(
14010
- (txArgs.basePrice ?? 10n ** BigInt(txArgs.assetDecimals)).toString()
16104
+ (txArgs.basePrice ?? 10n ** BigInt(assetDecimals)).toString()
14011
16105
  ),
14012
16106
  basePriceOracleAccount: txArgs.basePriceOracleAccount ?? DEFAULT_PRICE_ORACLE_ACCOUNT,
14013
16107
  forMigration: txArgs.forMigration ?? false
@@ -14678,7 +16772,12 @@ var ExecuteShareSwapBuilder = class extends VaultBuilderBase {
14678
16772
  return this.program.methods.executeShareSwap(data.kind, data.shareAmount).accountsPartial(this.getIxAccounts(args)).instruction().then(import_common23.toKitInstruction);
14679
16773
  }
14680
16774
  async deriveIxArgs(txArgs) {
14681
- const [[vaultOracle], [vaultTrancheState], trancheShare, shareTokenProgram] = await Promise.all([
16775
+ const [
16776
+ [vaultOracle],
16777
+ [vaultTrancheState],
16778
+ trancheShare,
16779
+ shareTokenProgram
16780
+ ] = await Promise.all([
14682
16781
  this.pda.deriveVaultOraclePda(txArgs.vault),
14683
16782
  this.pda.deriveVaultTrancheStatePda(txArgs.vault),
14684
16783
  resolveTrancheShare(this.account, txArgs.vault, txArgs.kind, {
@@ -14767,12 +16866,19 @@ var ExecuteDepositBuilder = class extends VaultBuilderBase {
14767
16866
  }
14768
16867
  getIxData(args) {
14769
16868
  return {
14770
- amount: args.amount
16869
+ amount: args.amount,
16870
+ addressSeeds: args.addressSeeds
14771
16871
  };
14772
16872
  }
14773
16873
  async getIx(args) {
14774
16874
  const data = this.getIxData(args);
14775
- return this.program.methods.executeDeposit(data.amount).accountsPartial(this.getIxAccounts(args)).instruction().then(import_common24.toKitInstruction);
16875
+ const methods = data.addressSeeds ? this.program.methods.executeDepositFeeExempt(
16876
+ data.amount,
16877
+ data.addressSeeds.map((seed) => Buffer.from(seed))
16878
+ ) : this.program.methods.executeDeposit(data.amount);
16879
+ return methods.accountsPartial(
16880
+ this.getIxAccounts(args)
16881
+ ).instruction().then(import_common24.toKitInstruction);
14776
16882
  }
14777
16883
  async deriveIxArgs(txArgs) {
14778
16884
  const connection = this.program.provider.connection;
@@ -14812,6 +16918,7 @@ var ExecuteDepositBuilder = class extends VaultBuilderBase {
14812
16918
  assetMint: txArgs.assetMint,
14813
16919
  shareMint: txArgs.shareMint,
14814
16920
  amount: new import_core7.BN(txArgs.amount.toString()),
16921
+ addressSeeds: txArgs.addressSeeds,
14815
16922
  assetTokenProgram,
14816
16923
  shareTokenProgram,
14817
16924
  userAssetAta: txArgs.userAssetAta ?? (0, import_common24.getAtaAddress)(txArgs.assetMint, txArgs.user, assetTokenProgram),
@@ -14911,12 +17018,20 @@ var ExecuteTrancheDepositBuilder = class extends VaultBuilderBase {
14911
17018
  getIxData(args) {
14912
17019
  return {
14913
17020
  kind: args.kind,
14914
- amount: args.amount
17021
+ amount: args.amount,
17022
+ addressSeeds: args.addressSeeds
14915
17023
  };
14916
17024
  }
14917
17025
  async getIx(args) {
14918
17026
  const data = this.getIxData(args);
14919
- return this.program.methods.executeTrancheDeposit(data.kind, data.amount).accountsPartial(this.getIxAccounts(args)).instruction().then(import_common25.toKitInstruction);
17027
+ const methods = data.addressSeeds ? this.program.methods.executeTrancheDepositFeeExempt(
17028
+ data.kind,
17029
+ data.amount,
17030
+ data.addressSeeds.map((seed) => Buffer.from(seed))
17031
+ ) : this.program.methods.executeTrancheDeposit(data.kind, data.amount);
17032
+ return methods.accountsPartial(
17033
+ this.getIxAccounts(args)
17034
+ ).instruction().then(import_common25.toKitInstruction);
14920
17035
  }
14921
17036
  async deriveIxArgs(txArgs) {
14922
17037
  const connection = this.program.provider.connection;
@@ -14946,6 +17061,7 @@ var ExecuteTrancheDepositBuilder = class extends VaultBuilderBase {
14946
17061
  trancheShareMint,
14947
17062
  kind: txArgs.kind,
14948
17063
  amount: new import_core8.BN(txArgs.amount.toString()),
17064
+ addressSeeds: txArgs.addressSeeds,
14949
17065
  assetTokenProgram,
14950
17066
  shareTokenProgram,
14951
17067
  userAssetAta: (0, import_common25.getAtaAddress)(
@@ -15048,12 +17164,23 @@ var ExecuteTrancheWithdrawBuilder = class extends VaultBuilderBase {
15048
17164
  getIxData(args) {
15049
17165
  return {
15050
17166
  kind: args.kind,
15051
- shareAmount: args.shareAmount
17167
+ shareAmount: args.shareAmount,
17168
+ addressSeeds: args.addressSeeds
15052
17169
  };
15053
17170
  }
15054
17171
  async getIx(args) {
15055
17172
  const data = this.getIxData(args);
15056
- return this.program.methods.executeTrancheWithdraw(data.kind, data.shareAmount).accountsPartial(this.getIxAccounts(args)).instruction().then(import_common26.toKitInstruction);
17173
+ const methods = data.addressSeeds ? this.program.methods.executeTrancheWithdrawFeeExempt(
17174
+ data.kind,
17175
+ data.shareAmount,
17176
+ data.addressSeeds.map((seed) => Buffer.from(seed))
17177
+ ) : this.program.methods.executeTrancheWithdraw(
17178
+ data.kind,
17179
+ data.shareAmount
17180
+ );
17181
+ return methods.accountsPartial(
17182
+ this.getIxAccounts(args)
17183
+ ).instruction().then(import_common26.toKitInstruction);
15057
17184
  }
15058
17185
  async deriveIxArgs(txArgs) {
15059
17186
  const connection = this.program.provider.connection;
@@ -15082,6 +17209,7 @@ var ExecuteTrancheWithdrawBuilder = class extends VaultBuilderBase {
15082
17209
  trancheShareMint,
15083
17210
  kind: txArgs.kind,
15084
17211
  shareAmount: new import_core9.BN(txArgs.shareAmount.toString()),
17212
+ addressSeeds: txArgs.addressSeeds,
15085
17213
  assetTokenProgram,
15086
17214
  shareTokenProgram,
15087
17215
  userAssetAta: (0, import_common26.getAtaAddress)(
@@ -15177,13 +17305,23 @@ var ExecuteWithdrawBuilder = class extends VaultBuilderBase {
15177
17305
  return {
15178
17306
  shareAmount: args.shareAmount,
15179
17307
  externalWithdrawIxRefs: args.externalWithdrawIxRefs ?? null,
15180
- externalLiquiditySource: args.externalLiquiditySource ?? null
17308
+ externalLiquiditySource: args.externalLiquiditySource ?? null,
17309
+ addressSeeds: args.addressSeeds
15181
17310
  };
15182
17311
  }
15183
17312
  async getIx(args) {
15184
17313
  const data = this.getIxData(args);
15185
17314
  const useExternal = data.externalWithdrawIxRefs != null || data.externalLiquiditySource != null;
15186
- const methods = useExternal ? this.program.methods.executeWithdrawFromExternal(
17315
+ const anchorSeeds = data.addressSeeds?.map((seed) => Buffer.from(seed));
17316
+ const methods = anchorSeeds ? useExternal ? this.program.methods.executeWithdrawFromExternalFeeExempt(
17317
+ data.shareAmount,
17318
+ data.externalWithdrawIxRefs,
17319
+ data.externalLiquiditySource,
17320
+ anchorSeeds
17321
+ ) : this.program.methods.executeWithdrawFeeExempt(
17322
+ data.shareAmount,
17323
+ anchorSeeds
17324
+ ) : useExternal ? this.program.methods.executeWithdrawFromExternal(
15187
17325
  data.shareAmount,
15188
17326
  data.externalWithdrawIxRefs,
15189
17327
  data.externalLiquiditySource
@@ -15276,7 +17414,8 @@ var ExecuteWithdrawBuilder = class extends VaultBuilderBase {
15276
17414
  userShareAta: txArgs.userShareAta ?? (0, import_common27.getAtaAddress)(txArgs.shareMint, txArgs.user, shareTokenProgram),
15277
17415
  externalWithdrawIxRefs,
15278
17416
  externalLiquiditySource,
15279
- externalWithdrawAccounts
17417
+ externalWithdrawAccounts,
17418
+ addressSeeds: txArgs.addressSeeds
15280
17419
  };
15281
17420
  }
15282
17421
  async buildLookupTables(_args, txArgs) {
@@ -15322,7 +17461,10 @@ var import_web313 = require("@solana/web3.js");
15322
17461
  var import_common28 = __toESM(require_dist());
15323
17462
  var FulfillJuniorTrancheWithdrawBuilder = class extends VaultBuilderBase {
15324
17463
  async getIx(args) {
15325
- return this.program.methods.fulfillJuniorTrancheWithdraw().accountsPartial({
17464
+ const methods = args.addressSeeds ? this.program.methods.fulfillJuniorTrancheWithdrawFeeExempt(
17465
+ args.addressSeeds.map((seed) => Buffer.from(seed))
17466
+ ) : this.program.methods.fulfillJuniorTrancheWithdraw();
17467
+ return methods.accountsPartial({
15326
17468
  signer: (0, import_common28.toWeb3Pk)(args.signer),
15327
17469
  owner: (0, import_common28.toWeb3Pk)(args.owner),
15328
17470
  queuePayer: (0, import_common28.toWeb3Pk)(args.queuePayer),
@@ -15371,10 +17513,15 @@ var FulfillJuniorTrancheWithdrawBuilder = class extends VaultBuilderBase {
15371
17513
  txArgs.assetMint,
15372
17514
  txArgs.assetTokenProgram
15373
17515
  ),
15374
- resolveTrancheShare(this.account, txArgs.vault, { junior: {} }, {
15375
- mint: txArgs.juniorShareMint,
15376
- tokenProgram: txArgs.shareTokenProgram
15377
- })
17516
+ resolveTrancheShare(
17517
+ this.account,
17518
+ txArgs.vault,
17519
+ { junior: {} },
17520
+ {
17521
+ mint: txArgs.juniorShareMint,
17522
+ tokenProgram: txArgs.shareTokenProgram
17523
+ }
17524
+ )
15378
17525
  ]);
15379
17526
  const { mint: juniorShareMint, tokenProgram: shareTokenProgram } = juniorShare;
15380
17527
  const queuePda = txArgs.withdrawalQueue ?? withdrawalQueue;
@@ -15413,7 +17560,8 @@ var FulfillJuniorTrancheWithdrawBuilder = class extends VaultBuilderBase {
15413
17560
  queuePda,
15414
17561
  shareTokenProgram,
15415
17562
  true
15416
- )
17563
+ ),
17564
+ addressSeeds: txArgs.addressSeeds
15417
17565
  };
15418
17566
  }
15419
17567
  async buildPreambleInstructions(args) {
@@ -15681,7 +17829,8 @@ var JupiterSwapBuilder = class extends VaultBuilderBase {
15681
17829
  sourceTokenProgram: (0, import_common32.toWeb3Pk)(args.sourceTokenProgram),
15682
17830
  destinationTokenProgram: (0, import_common32.toWeb3Pk)(args.destinationTokenProgram),
15683
17831
  destinationOracleAccount: args.destinationOracleAccount ? (0, import_common32.toWeb3Pk)(args.destinationOracleAccount) : null,
15684
- vaultOracle: (0, import_common32.toWeb3Pk)(args.vaultOracle)
17832
+ vaultOracle: (0, import_common32.toWeb3Pk)(args.vaultOracle),
17833
+ vaultTrancheState: args.vaultTrancheState ? (0, import_common32.toWeb3Pk)(args.vaultTrancheState) : null
15685
17834
  }).remainingAccounts(args.accounts.map(toWeb3AccountMeta2)).instruction().then(import_common32.toKitInstruction);
15686
17835
  }
15687
17836
  async deriveIxArgs(txArgs) {
@@ -15699,6 +17848,7 @@ var JupiterSwapBuilder = class extends VaultBuilderBase {
15699
17848
  ),
15700
17849
  destinationOracleAccount: txArgs.destinationOracleAccount ?? null,
15701
17850
  vaultOracle: txArgs.vaultOracle ?? vaultOracle,
17851
+ vaultTrancheState: txArgs.vaultTrancheState ?? null,
15702
17852
  accounts: txArgs.accounts,
15703
17853
  sourceTokenProgram,
15704
17854
  destinationTokenProgram,
@@ -15741,7 +17891,15 @@ var JupiterSwapBuilder = class extends VaultBuilderBase {
15741
17891
  }
15742
17892
  async buildPlanExtras(args) {
15743
17893
  return {
15744
- postSuccessCacheInvalidations: [{ vaultPda: args.vault }]
17894
+ postSuccessCacheInvalidations: [
17895
+ { vaultPda: args.vault },
17896
+ ...args.vaultTrancheState ? [
17897
+ {
17898
+ vaultPda: args.vault,
17899
+ vaultTrancheStatePda: args.vaultTrancheState
17900
+ }
17901
+ ] : []
17902
+ ]
15745
17903
  };
15746
17904
  }
15747
17905
  async getTx(txArgs) {
@@ -15783,12 +17941,7 @@ var RequestJuniorTrancheWithdrawBuilder = class extends VaultBuilderBase {
15783
17941
  }
15784
17942
  async deriveIxArgs(txArgs) {
15785
17943
  const payer = txArgs.payer ?? txArgs.user;
15786
- const [
15787
- [vaultOracle],
15788
- [vaultTrancheState],
15789
- [withdrawalQueue],
15790
- juniorShare
15791
- ] = await Promise.all([
17944
+ const [[vaultOracle], [vaultTrancheState], [withdrawalQueue], juniorShare] = await Promise.all([
15792
17945
  this.pda.deriveVaultOraclePda(txArgs.vault),
15793
17946
  this.pda.deriveVaultTrancheStatePda(txArgs.vault),
15794
17947
  this.pda.deriveVaultTrancheWithdrawalQueuePda(
@@ -15796,10 +17949,15 @@ var RequestJuniorTrancheWithdrawBuilder = class extends VaultBuilderBase {
15796
17949
  txArgs.user,
15797
17950
  txArgs.queueId
15798
17951
  ),
15799
- resolveTrancheShare(this.account, txArgs.vault, { junior: {} }, {
15800
- mint: txArgs.juniorShareMint,
15801
- tokenProgram: txArgs.shareTokenProgram
15802
- })
17952
+ resolveTrancheShare(
17953
+ this.account,
17954
+ txArgs.vault,
17955
+ { junior: {} },
17956
+ {
17957
+ mint: txArgs.juniorShareMint,
17958
+ tokenProgram: txArgs.shareTokenProgram
17959
+ }
17960
+ )
15803
17961
  ]);
15804
17962
  const { mint: juniorShareMint, tokenProgram: shareTokenProgram } = juniorShare;
15805
17963
  const queuePda = txArgs.withdrawalQueue ?? withdrawalQueue;
@@ -15883,6 +18041,8 @@ var VaultReallocationBuilder = class extends VaultBuilderBase {
15883
18041
  allocationDestinationShareAta: (0, import_common34.toWeb3Pk)(
15884
18042
  args.allocationDestinationShareAta
15885
18043
  ),
18044
+ sourceVaultTrancheState: args.sourceVaultTrancheState ? (0, import_common34.toWeb3Pk)(args.sourceVaultTrancheState) : null,
18045
+ destinationVaultTrancheState: args.destinationVaultTrancheState ? (0, import_common34.toWeb3Pk)(args.destinationVaultTrancheState) : null,
15886
18046
  assetOracleAccount: args.assetOracleAccount ? (0, import_common34.toWeb3Pk)(args.assetOracleAccount) : null,
15887
18047
  assetTokenProgram: (0, import_common34.toWeb3Pk)(args.assetTokenProgram),
15888
18048
  sourceShareTokenProgram: (0, import_common34.toWeb3Pk)(args.sourceShareTokenProgram),
@@ -15918,6 +18078,8 @@ var VaultReallocationBuilder = class extends VaultBuilderBase {
15918
18078
  destinationShareMint: txArgs.destinationShareMint,
15919
18079
  amount: new import_core16.BN(txArgs.amount.toString()),
15920
18080
  assetPriceOracle: toAssetPriceOracleConfig2(txArgs.assetPriceOracle),
18081
+ sourceVaultTrancheState: txArgs.sourceVaultTrancheState ?? null,
18082
+ destinationVaultTrancheState: txArgs.destinationVaultTrancheState ?? null,
15921
18083
  assetOracleAccount: txArgs.assetOracleAccount ?? null,
15922
18084
  assetTokenProgram,
15923
18085
  sourceShareTokenProgram,
@@ -16019,7 +18181,19 @@ var VaultReallocationBuilder = class extends VaultBuilderBase {
16019
18181
  postSuccessCacheInvalidations: [
16020
18182
  { vaultPda: args.allocationVault },
16021
18183
  { vaultPda: args.destinationVault },
16022
- ...args.sourceVault ? [{ vaultPda: args.sourceVault }] : []
18184
+ ...args.sourceVault ? [{ vaultPda: args.sourceVault }] : [],
18185
+ ...args.sourceVault && args.sourceVaultTrancheState ? [
18186
+ {
18187
+ vaultPda: args.sourceVault,
18188
+ vaultTrancheStatePda: args.sourceVaultTrancheState
18189
+ }
18190
+ ] : [],
18191
+ ...args.destinationVaultTrancheState ? [
18192
+ {
18193
+ vaultPda: args.destinationVault,
18194
+ vaultTrancheStatePda: args.destinationVaultTrancheState
18195
+ }
18196
+ ] : []
16023
18197
  ]
16024
18198
  };
16025
18199
  }
@@ -17921,6 +20095,7 @@ var ExternalLiquidityIntegrityService = class {
17921
20095
  UpdateConsensusSignersBuilder,
17922
20096
  UpdateTrancheConfigBuilder,
17923
20097
  VAULT_CACHE_CATEGORY,
20098
+ VAULT_CREATOR_WHITELIST,
17924
20099
  VAULT_ENVIRONMENTS,
17925
20100
  VAULT_ORACLE_CACHE_CATEGORY,
17926
20101
  VAULT_PROGRAM_ID,