@perena/vault-sdk 1.0.18 → 1.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +63 -7
- package/dist/index.d.ts +2721 -505
- package/dist/index.js +2915 -585
- 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,
|
|
@@ -1460,12 +1461,14 @@ __export(index_exports, {
|
|
|
1460
1461
|
WithdrawalQueueService: () => WithdrawalQueueService,
|
|
1461
1462
|
addCashflowUpdate: () => addCashflowUpdate,
|
|
1462
1463
|
address: () => import_kit10.address,
|
|
1464
|
+
confirmYieldPayment: () => confirmYieldPayment,
|
|
1463
1465
|
createAccount: () => createAccount,
|
|
1464
1466
|
createLiveConsensusOracleDeps: () => createLiveConsensusOracleDeps,
|
|
1465
1467
|
createRpcFromConnection: () => createRpcFromConnection,
|
|
1466
1468
|
createTokenMint: () => createTokenMint,
|
|
1467
1469
|
createTokenMintIxs: () => createTokenMintIxs,
|
|
1468
1470
|
createVaultClient: () => createVaultClient,
|
|
1471
|
+
createYieldPayment: () => createYieldPayment,
|
|
1469
1472
|
dateToStr: () => dateToStr,
|
|
1470
1473
|
defaultKeypairPath: () => defaultKeypairPath,
|
|
1471
1474
|
deleteAccount: () => deleteAccount,
|
|
@@ -1474,9 +1477,11 @@ __export(index_exports, {
|
|
|
1474
1477
|
getBalance: () => getBalance,
|
|
1475
1478
|
getCashflows: () => getCashflows,
|
|
1476
1479
|
getRpcUrl: () => getRpcUrl,
|
|
1480
|
+
getTotalOutstandingYield: () => getTotalOutstandingYield,
|
|
1477
1481
|
getTotalYield: () => getTotalYield,
|
|
1478
1482
|
getVaultProgramId: () => getVaultProgramId,
|
|
1479
1483
|
getYield: () => getYield,
|
|
1484
|
+
getYieldPayments: () => getYieldPayments,
|
|
1480
1485
|
isVaultEnv: () => isVaultEnv,
|
|
1481
1486
|
keypairAddress: () => keypairAddress,
|
|
1482
1487
|
loadKeypair: () => loadKeypair,
|
|
@@ -1511,6 +1516,9 @@ var PROGRAM_FEE_EXEMPT_OWNER_WHITELIST = [
|
|
|
1511
1516
|
(0, import_kit.address)("7C39GeKrqLygmgV9D4bicUaiyFhKrX6Eevk6PDACwuj7"),
|
|
1512
1517
|
(0, import_kit.address)("LYC8YiiSzQfPpxUW2tpxfuPKGZwywAJhXKUfDP2B66f")
|
|
1513
1518
|
];
|
|
1519
|
+
var VAULT_CREATOR_WHITELIST = [
|
|
1520
|
+
(0, import_kit.address)("11111111111111111111111111111111")
|
|
1521
|
+
];
|
|
1514
1522
|
var TOKEN_PROGRAM_ID = (0, import_kit.address)(
|
|
1515
1523
|
import_spl_token.TOKEN_2022_PROGRAM_ID.toBase58()
|
|
1516
1524
|
);
|
|
@@ -2990,27 +2998,24 @@ var IDL = {
|
|
|
2990
2998
|
{
|
|
2991
2999
|
"name": "share_mint",
|
|
2992
3000
|
"docs": [
|
|
2993
|
-
"Curator-supplied share mint.
|
|
2994
|
-
"
|
|
2995
|
-
"
|
|
3001
|
+
"Curator-supplied share mint. Its decimals must match `asset_mint`.",
|
|
3002
|
+
"Unless `for_migration`, it must have zero supply with mint authority on",
|
|
3003
|
+
"the curator; authority is transferred to the vault PDA on success.",
|
|
3004
|
+
"Migration uses the legacy bank mint and defers transfer."
|
|
2996
3005
|
],
|
|
2997
3006
|
"writable": true
|
|
2998
3007
|
},
|
|
2999
3008
|
{
|
|
3000
3009
|
"name": "asset_mint",
|
|
3001
3010
|
"docs": [
|
|
3002
|
-
"Base
|
|
3003
|
-
|
|
3004
|
-
"`Whitelist` mode."
|
|
3005
|
-
],
|
|
3006
|
-
"optional": true
|
|
3011
|
+
"Base asset mint used to create the vault's permanent base holding."
|
|
3012
|
+
]
|
|
3007
3013
|
},
|
|
3008
3014
|
{
|
|
3009
3015
|
"name": "asset_token_program",
|
|
3010
3016
|
"docs": [
|
|
3011
3017
|
"Token program owning `asset_mint`."
|
|
3012
|
-
]
|
|
3013
|
-
"optional": true
|
|
3018
|
+
]
|
|
3014
3019
|
},
|
|
3015
3020
|
{
|
|
3016
3021
|
"name": "token_program"
|
|
@@ -3069,7 +3074,12 @@ var IDL = {
|
|
|
3069
3074
|
],
|
|
3070
3075
|
"accounts": [
|
|
3071
3076
|
{
|
|
3072
|
-
"name": "user"
|
|
3077
|
+
"name": "user",
|
|
3078
|
+
"docs": [
|
|
3079
|
+
"Token-account authority. May be a transaction signer or a PDA signer",
|
|
3080
|
+
"supplied by an integrating program through `invoke_signed`."
|
|
3081
|
+
],
|
|
3082
|
+
"signer": true
|
|
3073
3083
|
},
|
|
3074
3084
|
{
|
|
3075
3085
|
"name": "vault",
|
|
@@ -3346,26 +3356,24 @@ var IDL = {
|
|
|
3346
3356
|
]
|
|
3347
3357
|
},
|
|
3348
3358
|
{
|
|
3349
|
-
"name": "
|
|
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
|
-
],
|
|
3359
|
+
"name": "execute_deposit_fee_exempt",
|
|
3355
3360
|
"discriminator": [
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3361
|
+
99,
|
|
3362
|
+
227,
|
|
3363
|
+
32,
|
|
3364
|
+
27,
|
|
3365
|
+
95,
|
|
3366
|
+
184,
|
|
3367
|
+
49,
|
|
3368
|
+
2
|
|
3364
3369
|
],
|
|
3365
3370
|
"accounts": [
|
|
3366
3371
|
{
|
|
3367
3372
|
"name": "user",
|
|
3368
|
-
"
|
|
3373
|
+
"docs": [
|
|
3374
|
+
"Token-account authority. May be a transaction signer or a PDA signer",
|
|
3375
|
+
"supplied by an integrating program through `invoke_signed`."
|
|
3376
|
+
],
|
|
3369
3377
|
"signer": true
|
|
3370
3378
|
},
|
|
3371
3379
|
{
|
|
@@ -3377,27 +3385,23 @@ var IDL = {
|
|
|
3377
3385
|
},
|
|
3378
3386
|
{
|
|
3379
3387
|
"name": "vault_tranche_state",
|
|
3380
|
-
"
|
|
3388
|
+
"optional": true
|
|
3381
3389
|
},
|
|
3382
3390
|
{
|
|
3383
|
-
"name": "
|
|
3391
|
+
"name": "asset_mint",
|
|
3384
3392
|
"docs": [
|
|
3385
|
-
"
|
|
3386
|
-
]
|
|
3387
|
-
"writable": true
|
|
3393
|
+
"Mint being deposited. Must match the vault's asset-mode rule."
|
|
3394
|
+
]
|
|
3388
3395
|
},
|
|
3389
3396
|
{
|
|
3390
|
-
"name": "
|
|
3397
|
+
"name": "share_mint",
|
|
3391
3398
|
"docs": [
|
|
3392
|
-
"
|
|
3399
|
+
"Vault's share mint (mint authority = vault PDA)."
|
|
3393
3400
|
],
|
|
3394
3401
|
"writable": true
|
|
3395
3402
|
},
|
|
3396
3403
|
{
|
|
3397
|
-
"name": "
|
|
3398
|
-
"docs": [
|
|
3399
|
-
"User's regular-share ATA (burned from)."
|
|
3400
|
-
],
|
|
3404
|
+
"name": "user_asset_ata",
|
|
3401
3405
|
"writable": true,
|
|
3402
3406
|
"pda": {
|
|
3403
3407
|
"seeds": [
|
|
@@ -3407,11 +3411,11 @@ var IDL = {
|
|
|
3407
3411
|
},
|
|
3408
3412
|
{
|
|
3409
3413
|
"kind": "account",
|
|
3410
|
-
"path": "
|
|
3414
|
+
"path": "asset_token_program"
|
|
3411
3415
|
},
|
|
3412
3416
|
{
|
|
3413
3417
|
"kind": "account",
|
|
3414
|
-
"path": "
|
|
3418
|
+
"path": "asset_mint"
|
|
3415
3419
|
}
|
|
3416
3420
|
],
|
|
3417
3421
|
"program": {
|
|
@@ -3454,24 +3458,21 @@ var IDL = {
|
|
|
3454
3458
|
}
|
|
3455
3459
|
},
|
|
3456
3460
|
{
|
|
3457
|
-
"name": "
|
|
3458
|
-
"docs": [
|
|
3459
|
-
"User's tranche-share ATA (minted into, created if absent)."
|
|
3460
|
-
],
|
|
3461
|
+
"name": "vault_asset_ata",
|
|
3461
3462
|
"writable": true,
|
|
3462
3463
|
"pda": {
|
|
3463
3464
|
"seeds": [
|
|
3464
3465
|
{
|
|
3465
3466
|
"kind": "account",
|
|
3466
|
-
"path": "
|
|
3467
|
+
"path": "vault"
|
|
3467
3468
|
},
|
|
3468
3469
|
{
|
|
3469
3470
|
"kind": "account",
|
|
3470
|
-
"path": "
|
|
3471
|
+
"path": "asset_token_program"
|
|
3471
3472
|
},
|
|
3472
3473
|
{
|
|
3473
3474
|
"kind": "account",
|
|
3474
|
-
"path": "
|
|
3475
|
+
"path": "asset_mint"
|
|
3475
3476
|
}
|
|
3476
3477
|
],
|
|
3477
3478
|
"program": {
|
|
@@ -3514,85 +3515,21 @@ var IDL = {
|
|
|
3514
3515
|
}
|
|
3515
3516
|
},
|
|
3516
3517
|
{
|
|
3517
|
-
"name": "
|
|
3518
|
-
"docs": [
|
|
3519
|
-
"Token program for the regular vault share mint."
|
|
3520
|
-
]
|
|
3521
|
-
},
|
|
3522
|
-
{
|
|
3523
|
-
"name": "tranche_share_token_program",
|
|
3518
|
+
"name": "fee_vault",
|
|
3524
3519
|
"docs": [
|
|
3525
|
-
"
|
|
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",
|
|
3520
|
+
"Per-vault fee-vault PDA: token authority + accounting. The mint fee",
|
|
3521
|
+
"accrues here and is swept to the fee collector by the permissionless crank."
|
|
3522
|
+
],
|
|
3586
3523
|
"writable": true
|
|
3587
3524
|
},
|
|
3588
3525
|
{
|
|
3589
|
-
"name": "
|
|
3526
|
+
"name": "fee_vault_ata",
|
|
3590
3527
|
"writable": true,
|
|
3591
3528
|
"pda": {
|
|
3592
3529
|
"seeds": [
|
|
3593
3530
|
{
|
|
3594
3531
|
"kind": "account",
|
|
3595
|
-
"path": "
|
|
3532
|
+
"path": "fee_vault"
|
|
3596
3533
|
},
|
|
3597
3534
|
{
|
|
3598
3535
|
"kind": "account",
|
|
@@ -3643,21 +3580,21 @@ var IDL = {
|
|
|
3643
3580
|
}
|
|
3644
3581
|
},
|
|
3645
3582
|
{
|
|
3646
|
-
"name": "
|
|
3583
|
+
"name": "user_share_ata",
|
|
3647
3584
|
"writable": true,
|
|
3648
3585
|
"pda": {
|
|
3649
3586
|
"seeds": [
|
|
3650
3587
|
{
|
|
3651
3588
|
"kind": "account",
|
|
3652
|
-
"path": "
|
|
3589
|
+
"path": "user"
|
|
3653
3590
|
},
|
|
3654
3591
|
{
|
|
3655
3592
|
"kind": "account",
|
|
3656
|
-
"path": "
|
|
3593
|
+
"path": "share_token_program"
|
|
3657
3594
|
},
|
|
3658
3595
|
{
|
|
3659
3596
|
"kind": "account",
|
|
3660
|
-
"path": "
|
|
3597
|
+
"path": "share_mint"
|
|
3661
3598
|
}
|
|
3662
3599
|
],
|
|
3663
3600
|
"program": {
|
|
@@ -3700,29 +3637,92 @@ var IDL = {
|
|
|
3700
3637
|
}
|
|
3701
3638
|
},
|
|
3702
3639
|
{
|
|
3703
|
-
"name": "
|
|
3640
|
+
"name": "asset_token_program"
|
|
3641
|
+
},
|
|
3642
|
+
{
|
|
3643
|
+
"name": "share_token_program"
|
|
3644
|
+
}
|
|
3645
|
+
],
|
|
3646
|
+
"args": [
|
|
3647
|
+
{
|
|
3648
|
+
"name": "amount",
|
|
3649
|
+
"type": "u64"
|
|
3650
|
+
},
|
|
3651
|
+
{
|
|
3652
|
+
"name": "signer_seeds",
|
|
3653
|
+
"type": {
|
|
3654
|
+
"vec": "bytes"
|
|
3655
|
+
}
|
|
3656
|
+
}
|
|
3657
|
+
]
|
|
3658
|
+
},
|
|
3659
|
+
{
|
|
3660
|
+
"name": "execute_share_swap",
|
|
3661
|
+
"docs": [
|
|
3662
|
+
"Convert regular vault shares into tranche shares (senior or junior).",
|
|
3663
|
+
"No underlying assets move; the backing simply shifts from the regular",
|
|
3664
|
+
"pool into the selected tranche class."
|
|
3665
|
+
],
|
|
3666
|
+
"discriminator": [
|
|
3667
|
+
127,
|
|
3668
|
+
53,
|
|
3669
|
+
127,
|
|
3670
|
+
156,
|
|
3671
|
+
151,
|
|
3672
|
+
80,
|
|
3673
|
+
135,
|
|
3674
|
+
67
|
|
3675
|
+
],
|
|
3676
|
+
"accounts": [
|
|
3677
|
+
{
|
|
3678
|
+
"name": "user",
|
|
3679
|
+
"writable": true,
|
|
3680
|
+
"signer": true
|
|
3681
|
+
},
|
|
3682
|
+
{
|
|
3683
|
+
"name": "vault",
|
|
3684
|
+
"writable": true
|
|
3685
|
+
},
|
|
3686
|
+
{
|
|
3687
|
+
"name": "vault_oracle"
|
|
3688
|
+
},
|
|
3689
|
+
{
|
|
3690
|
+
"name": "vault_tranche_state",
|
|
3691
|
+
"writable": true
|
|
3692
|
+
},
|
|
3693
|
+
{
|
|
3694
|
+
"name": "share_mint",
|
|
3704
3695
|
"docs": [
|
|
3705
|
-
"
|
|
3706
|
-
"accrue here and are swept by the permissionless fee crank."
|
|
3696
|
+
"Regular vault share mint. The user burns from this."
|
|
3707
3697
|
],
|
|
3708
3698
|
"writable": true
|
|
3709
3699
|
},
|
|
3710
3700
|
{
|
|
3711
|
-
"name": "
|
|
3701
|
+
"name": "tranche_share_mint",
|
|
3702
|
+
"docs": [
|
|
3703
|
+
"Target tranche share mint (senior or junior, as selected by `kind`)."
|
|
3704
|
+
],
|
|
3705
|
+
"writable": true
|
|
3706
|
+
},
|
|
3707
|
+
{
|
|
3708
|
+
"name": "user_share_ata",
|
|
3709
|
+
"docs": [
|
|
3710
|
+
"User's regular-share ATA (burned from)."
|
|
3711
|
+
],
|
|
3712
3712
|
"writable": true,
|
|
3713
3713
|
"pda": {
|
|
3714
3714
|
"seeds": [
|
|
3715
3715
|
{
|
|
3716
3716
|
"kind": "account",
|
|
3717
|
-
"path": "
|
|
3717
|
+
"path": "user"
|
|
3718
3718
|
},
|
|
3719
3719
|
{
|
|
3720
3720
|
"kind": "account",
|
|
3721
|
-
"path": "
|
|
3721
|
+
"path": "share_token_program"
|
|
3722
3722
|
},
|
|
3723
3723
|
{
|
|
3724
3724
|
"kind": "account",
|
|
3725
|
-
"path": "
|
|
3725
|
+
"path": "share_mint"
|
|
3726
3726
|
}
|
|
3727
3727
|
],
|
|
3728
3728
|
"program": {
|
|
@@ -3766,6 +3766,9 @@ var IDL = {
|
|
|
3766
3766
|
},
|
|
3767
3767
|
{
|
|
3768
3768
|
"name": "user_tranche_share_ata",
|
|
3769
|
+
"docs": [
|
|
3770
|
+
"User's tranche-share ATA (minted into, created if absent)."
|
|
3771
|
+
],
|
|
3769
3772
|
"writable": true,
|
|
3770
3773
|
"pda": {
|
|
3771
3774
|
"seeds": [
|
|
@@ -3775,7 +3778,7 @@ var IDL = {
|
|
|
3775
3778
|
},
|
|
3776
3779
|
{
|
|
3777
3780
|
"kind": "account",
|
|
3778
|
-
"path": "
|
|
3781
|
+
"path": "tranche_share_token_program"
|
|
3779
3782
|
},
|
|
3780
3783
|
{
|
|
3781
3784
|
"kind": "account",
|
|
@@ -3822,10 +3825,16 @@ var IDL = {
|
|
|
3822
3825
|
}
|
|
3823
3826
|
},
|
|
3824
3827
|
{
|
|
3825
|
-
"name": "
|
|
3828
|
+
"name": "share_token_program",
|
|
3829
|
+
"docs": [
|
|
3830
|
+
"Token program for the regular vault share mint."
|
|
3831
|
+
]
|
|
3826
3832
|
},
|
|
3827
3833
|
{
|
|
3828
|
-
"name": "
|
|
3834
|
+
"name": "tranche_share_token_program",
|
|
3835
|
+
"docs": [
|
|
3836
|
+
"Token program for the tranche share mint."
|
|
3837
|
+
]
|
|
3829
3838
|
},
|
|
3830
3839
|
{
|
|
3831
3840
|
"name": "associated_token_program",
|
|
@@ -3846,24 +3855,24 @@ var IDL = {
|
|
|
3846
3855
|
}
|
|
3847
3856
|
},
|
|
3848
3857
|
{
|
|
3849
|
-
"name": "
|
|
3858
|
+
"name": "share_amount",
|
|
3850
3859
|
"type": "u64"
|
|
3851
3860
|
}
|
|
3852
3861
|
]
|
|
3853
3862
|
},
|
|
3854
3863
|
{
|
|
3855
|
-
"name": "
|
|
3864
|
+
"name": "execute_tranche_deposit",
|
|
3856
3865
|
"discriminator": [
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
],
|
|
3866
|
-
"accounts": [
|
|
3866
|
+
231,
|
|
3867
|
+
224,
|
|
3868
|
+
46,
|
|
3869
|
+
207,
|
|
3870
|
+
175,
|
|
3871
|
+
45,
|
|
3872
|
+
77,
|
|
3873
|
+
148
|
|
3874
|
+
],
|
|
3875
|
+
"accounts": [
|
|
3867
3876
|
{
|
|
3868
3877
|
"name": "user",
|
|
3869
3878
|
"writable": true,
|
|
@@ -4001,6 +4010,71 @@ var IDL = {
|
|
|
4001
4010
|
}
|
|
4002
4011
|
}
|
|
4003
4012
|
},
|
|
4013
|
+
{
|
|
4014
|
+
"name": "fee_vault",
|
|
4015
|
+
"docs": [
|
|
4016
|
+
"Per-vault fee-vault PDA: token authority + accounting. Mint fees",
|
|
4017
|
+
"accrue here and are swept by the permissionless fee crank."
|
|
4018
|
+
],
|
|
4019
|
+
"writable": true
|
|
4020
|
+
},
|
|
4021
|
+
{
|
|
4022
|
+
"name": "fee_vault_ata",
|
|
4023
|
+
"writable": true,
|
|
4024
|
+
"pda": {
|
|
4025
|
+
"seeds": [
|
|
4026
|
+
{
|
|
4027
|
+
"kind": "account",
|
|
4028
|
+
"path": "fee_vault"
|
|
4029
|
+
},
|
|
4030
|
+
{
|
|
4031
|
+
"kind": "account",
|
|
4032
|
+
"path": "asset_token_program"
|
|
4033
|
+
},
|
|
4034
|
+
{
|
|
4035
|
+
"kind": "account",
|
|
4036
|
+
"path": "asset_mint"
|
|
4037
|
+
}
|
|
4038
|
+
],
|
|
4039
|
+
"program": {
|
|
4040
|
+
"kind": "const",
|
|
4041
|
+
"value": [
|
|
4042
|
+
140,
|
|
4043
|
+
151,
|
|
4044
|
+
37,
|
|
4045
|
+
143,
|
|
4046
|
+
78,
|
|
4047
|
+
36,
|
|
4048
|
+
137,
|
|
4049
|
+
241,
|
|
4050
|
+
187,
|
|
4051
|
+
61,
|
|
4052
|
+
16,
|
|
4053
|
+
41,
|
|
4054
|
+
20,
|
|
4055
|
+
142,
|
|
4056
|
+
13,
|
|
4057
|
+
131,
|
|
4058
|
+
11,
|
|
4059
|
+
90,
|
|
4060
|
+
19,
|
|
4061
|
+
153,
|
|
4062
|
+
218,
|
|
4063
|
+
255,
|
|
4064
|
+
16,
|
|
4065
|
+
132,
|
|
4066
|
+
4,
|
|
4067
|
+
142,
|
|
4068
|
+
123,
|
|
4069
|
+
216,
|
|
4070
|
+
219,
|
|
4071
|
+
233,
|
|
4072
|
+
248,
|
|
4073
|
+
89
|
|
4074
|
+
]
|
|
4075
|
+
}
|
|
4076
|
+
}
|
|
4077
|
+
},
|
|
4004
4078
|
{
|
|
4005
4079
|
"name": "user_tranche_share_ata",
|
|
4006
4080
|
"writable": true,
|
|
@@ -4083,26 +4157,28 @@ var IDL = {
|
|
|
4083
4157
|
}
|
|
4084
4158
|
},
|
|
4085
4159
|
{
|
|
4086
|
-
"name": "
|
|
4160
|
+
"name": "amount",
|
|
4087
4161
|
"type": "u64"
|
|
4088
4162
|
}
|
|
4089
4163
|
]
|
|
4090
4164
|
},
|
|
4091
4165
|
{
|
|
4092
|
-
"name": "
|
|
4166
|
+
"name": "execute_tranche_deposit_fee_exempt",
|
|
4093
4167
|
"discriminator": [
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4168
|
+
202,
|
|
4169
|
+
226,
|
|
4170
|
+
54,
|
|
4171
|
+
182,
|
|
4097
4172
|
141,
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
162
|
|
4173
|
+
178,
|
|
4174
|
+
91,
|
|
4175
|
+
231
|
|
4102
4176
|
],
|
|
4103
4177
|
"accounts": [
|
|
4104
4178
|
{
|
|
4105
|
-
"name": "user"
|
|
4179
|
+
"name": "user",
|
|
4180
|
+
"writable": true,
|
|
4181
|
+
"signer": true
|
|
4106
4182
|
},
|
|
4107
4183
|
{
|
|
4108
4184
|
"name": "vault",
|
|
@@ -4113,13 +4189,13 @@ var IDL = {
|
|
|
4113
4189
|
},
|
|
4114
4190
|
{
|
|
4115
4191
|
"name": "vault_tranche_state",
|
|
4116
|
-
"
|
|
4192
|
+
"writable": true
|
|
4117
4193
|
},
|
|
4118
4194
|
{
|
|
4119
4195
|
"name": "asset_mint"
|
|
4120
4196
|
},
|
|
4121
4197
|
{
|
|
4122
|
-
"name": "
|
|
4198
|
+
"name": "tranche_share_mint",
|
|
4123
4199
|
"writable": true
|
|
4124
4200
|
},
|
|
4125
4201
|
{
|
|
@@ -4239,8 +4315,8 @@ var IDL = {
|
|
|
4239
4315
|
{
|
|
4240
4316
|
"name": "fee_vault",
|
|
4241
4317
|
"docs": [
|
|
4242
|
-
"Per-vault fee-vault PDA: token authority + accounting.
|
|
4243
|
-
"here and
|
|
4318
|
+
"Per-vault fee-vault PDA: token authority + accounting. Mint fees",
|
|
4319
|
+
"accrue here and are swept by the permissionless fee crank."
|
|
4244
4320
|
],
|
|
4245
4321
|
"writable": true
|
|
4246
4322
|
},
|
|
@@ -4302,7 +4378,7 @@ var IDL = {
|
|
|
4302
4378
|
}
|
|
4303
4379
|
},
|
|
4304
4380
|
{
|
|
4305
|
-
"name": "
|
|
4381
|
+
"name": "user_tranche_share_ata",
|
|
4306
4382
|
"writable": true,
|
|
4307
4383
|
"pda": {
|
|
4308
4384
|
"seeds": [
|
|
@@ -4316,7 +4392,7 @@ var IDL = {
|
|
|
4316
4392
|
},
|
|
4317
4393
|
{
|
|
4318
4394
|
"kind": "account",
|
|
4319
|
-
"path": "
|
|
4395
|
+
"path": "tranche_share_mint"
|
|
4320
4396
|
}
|
|
4321
4397
|
],
|
|
4322
4398
|
"program": {
|
|
@@ -4363,30 +4439,54 @@ var IDL = {
|
|
|
4363
4439
|
},
|
|
4364
4440
|
{
|
|
4365
4441
|
"name": "share_token_program"
|
|
4442
|
+
},
|
|
4443
|
+
{
|
|
4444
|
+
"name": "associated_token_program",
|
|
4445
|
+
"address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
|
|
4446
|
+
},
|
|
4447
|
+
{
|
|
4448
|
+
"name": "system_program",
|
|
4449
|
+
"address": "11111111111111111111111111111111"
|
|
4366
4450
|
}
|
|
4367
4451
|
],
|
|
4368
4452
|
"args": [
|
|
4369
4453
|
{
|
|
4370
|
-
"name": "
|
|
4454
|
+
"name": "kind",
|
|
4455
|
+
"type": {
|
|
4456
|
+
"defined": {
|
|
4457
|
+
"name": "TrancheKind"
|
|
4458
|
+
}
|
|
4459
|
+
}
|
|
4460
|
+
},
|
|
4461
|
+
{
|
|
4462
|
+
"name": "amount",
|
|
4371
4463
|
"type": "u64"
|
|
4464
|
+
},
|
|
4465
|
+
{
|
|
4466
|
+
"name": "signer_seeds",
|
|
4467
|
+
"type": {
|
|
4468
|
+
"vec": "bytes"
|
|
4469
|
+
}
|
|
4372
4470
|
}
|
|
4373
4471
|
]
|
|
4374
4472
|
},
|
|
4375
4473
|
{
|
|
4376
|
-
"name": "
|
|
4474
|
+
"name": "execute_tranche_withdraw",
|
|
4377
4475
|
"discriminator": [
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4476
|
+
240,
|
|
4477
|
+
82,
|
|
4478
|
+
254,
|
|
4479
|
+
246,
|
|
4480
|
+
177,
|
|
4481
|
+
29,
|
|
4482
|
+
57,
|
|
4483
|
+
126
|
|
4386
4484
|
],
|
|
4387
4485
|
"accounts": [
|
|
4388
4486
|
{
|
|
4389
|
-
"name": "user"
|
|
4487
|
+
"name": "user",
|
|
4488
|
+
"writable": true,
|
|
4489
|
+
"signer": true
|
|
4390
4490
|
},
|
|
4391
4491
|
{
|
|
4392
4492
|
"name": "vault",
|
|
@@ -4397,13 +4497,13 @@ var IDL = {
|
|
|
4397
4497
|
},
|
|
4398
4498
|
{
|
|
4399
4499
|
"name": "vault_tranche_state",
|
|
4400
|
-
"
|
|
4500
|
+
"writable": true
|
|
4401
4501
|
},
|
|
4402
4502
|
{
|
|
4403
4503
|
"name": "asset_mint"
|
|
4404
4504
|
},
|
|
4405
4505
|
{
|
|
4406
|
-
"name": "
|
|
4506
|
+
"name": "tranche_share_mint",
|
|
4407
4507
|
"writable": true
|
|
4408
4508
|
},
|
|
4409
4509
|
{
|
|
@@ -4521,29 +4621,21 @@ var IDL = {
|
|
|
4521
4621
|
}
|
|
4522
4622
|
},
|
|
4523
4623
|
{
|
|
4524
|
-
"name": "
|
|
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
|
|
4530
|
-
},
|
|
4531
|
-
{
|
|
4532
|
-
"name": "fee_vault_ata",
|
|
4624
|
+
"name": "user_tranche_share_ata",
|
|
4533
4625
|
"writable": true,
|
|
4534
4626
|
"pda": {
|
|
4535
4627
|
"seeds": [
|
|
4536
4628
|
{
|
|
4537
4629
|
"kind": "account",
|
|
4538
|
-
"path": "
|
|
4630
|
+
"path": "user"
|
|
4539
4631
|
},
|
|
4540
4632
|
{
|
|
4541
4633
|
"kind": "account",
|
|
4542
|
-
"path": "
|
|
4634
|
+
"path": "share_token_program"
|
|
4543
4635
|
},
|
|
4544
4636
|
{
|
|
4545
4637
|
"kind": "account",
|
|
4546
|
-
"path": "
|
|
4638
|
+
"path": "tranche_share_mint"
|
|
4547
4639
|
}
|
|
4548
4640
|
],
|
|
4549
4641
|
"program": {
|
|
@@ -4586,7 +4678,73 @@ var IDL = {
|
|
|
4586
4678
|
}
|
|
4587
4679
|
},
|
|
4588
4680
|
{
|
|
4589
|
-
"name": "
|
|
4681
|
+
"name": "asset_token_program"
|
|
4682
|
+
},
|
|
4683
|
+
{
|
|
4684
|
+
"name": "share_token_program"
|
|
4685
|
+
},
|
|
4686
|
+
{
|
|
4687
|
+
"name": "associated_token_program",
|
|
4688
|
+
"address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
|
|
4689
|
+
},
|
|
4690
|
+
{
|
|
4691
|
+
"name": "system_program",
|
|
4692
|
+
"address": "11111111111111111111111111111111"
|
|
4693
|
+
}
|
|
4694
|
+
],
|
|
4695
|
+
"args": [
|
|
4696
|
+
{
|
|
4697
|
+
"name": "kind",
|
|
4698
|
+
"type": {
|
|
4699
|
+
"defined": {
|
|
4700
|
+
"name": "TrancheKind"
|
|
4701
|
+
}
|
|
4702
|
+
}
|
|
4703
|
+
},
|
|
4704
|
+
{
|
|
4705
|
+
"name": "share_amount",
|
|
4706
|
+
"type": "u64"
|
|
4707
|
+
}
|
|
4708
|
+
]
|
|
4709
|
+
},
|
|
4710
|
+
{
|
|
4711
|
+
"name": "execute_tranche_withdraw_fee_exempt",
|
|
4712
|
+
"discriminator": [
|
|
4713
|
+
130,
|
|
4714
|
+
36,
|
|
4715
|
+
243,
|
|
4716
|
+
242,
|
|
4717
|
+
125,
|
|
4718
|
+
2,
|
|
4719
|
+
207,
|
|
4720
|
+
206
|
|
4721
|
+
],
|
|
4722
|
+
"accounts": [
|
|
4723
|
+
{
|
|
4724
|
+
"name": "user",
|
|
4725
|
+
"writable": true,
|
|
4726
|
+
"signer": true
|
|
4727
|
+
},
|
|
4728
|
+
{
|
|
4729
|
+
"name": "vault",
|
|
4730
|
+
"writable": true
|
|
4731
|
+
},
|
|
4732
|
+
{
|
|
4733
|
+
"name": "vault_oracle"
|
|
4734
|
+
},
|
|
4735
|
+
{
|
|
4736
|
+
"name": "vault_tranche_state",
|
|
4737
|
+
"writable": true
|
|
4738
|
+
},
|
|
4739
|
+
{
|
|
4740
|
+
"name": "asset_mint"
|
|
4741
|
+
},
|
|
4742
|
+
{
|
|
4743
|
+
"name": "tranche_share_mint",
|
|
4744
|
+
"writable": true
|
|
4745
|
+
},
|
|
4746
|
+
{
|
|
4747
|
+
"name": "user_asset_ata",
|
|
4590
4748
|
"writable": true,
|
|
4591
4749
|
"pda": {
|
|
4592
4750
|
"seeds": [
|
|
@@ -4596,11 +4754,11 @@ var IDL = {
|
|
|
4596
4754
|
},
|
|
4597
4755
|
{
|
|
4598
4756
|
"kind": "account",
|
|
4599
|
-
"path": "
|
|
4757
|
+
"path": "asset_token_program"
|
|
4600
4758
|
},
|
|
4601
4759
|
{
|
|
4602
4760
|
"kind": "account",
|
|
4603
|
-
"path": "
|
|
4761
|
+
"path": "asset_mint"
|
|
4604
4762
|
}
|
|
4605
4763
|
],
|
|
4606
4764
|
"program": {
|
|
@@ -4643,46 +4801,1665 @@ var IDL = {
|
|
|
4643
4801
|
}
|
|
4644
4802
|
},
|
|
4645
4803
|
{
|
|
4646
|
-
"name": "
|
|
4647
|
-
|
|
4648
|
-
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4804
|
+
"name": "vault_asset_ata",
|
|
4805
|
+
"writable": true,
|
|
4806
|
+
"pda": {
|
|
4807
|
+
"seeds": [
|
|
4808
|
+
{
|
|
4809
|
+
"kind": "account",
|
|
4810
|
+
"path": "vault"
|
|
4811
|
+
},
|
|
4812
|
+
{
|
|
4813
|
+
"kind": "account",
|
|
4814
|
+
"path": "asset_token_program"
|
|
4815
|
+
},
|
|
4816
|
+
{
|
|
4817
|
+
"kind": "account",
|
|
4818
|
+
"path": "asset_mint"
|
|
4819
|
+
}
|
|
4820
|
+
],
|
|
4821
|
+
"program": {
|
|
4822
|
+
"kind": "const",
|
|
4823
|
+
"value": [
|
|
4824
|
+
140,
|
|
4825
|
+
151,
|
|
4826
|
+
37,
|
|
4827
|
+
143,
|
|
4828
|
+
78,
|
|
4829
|
+
36,
|
|
4830
|
+
137,
|
|
4831
|
+
241,
|
|
4832
|
+
187,
|
|
4833
|
+
61,
|
|
4834
|
+
16,
|
|
4835
|
+
41,
|
|
4836
|
+
20,
|
|
4837
|
+
142,
|
|
4838
|
+
13,
|
|
4839
|
+
131,
|
|
4840
|
+
11,
|
|
4841
|
+
90,
|
|
4842
|
+
19,
|
|
4843
|
+
153,
|
|
4844
|
+
218,
|
|
4845
|
+
255,
|
|
4846
|
+
16,
|
|
4847
|
+
132,
|
|
4848
|
+
4,
|
|
4849
|
+
142,
|
|
4850
|
+
123,
|
|
4851
|
+
216,
|
|
4852
|
+
219,
|
|
4853
|
+
233,
|
|
4854
|
+
248,
|
|
4855
|
+
89
|
|
4856
|
+
]
|
|
4857
|
+
}
|
|
4858
|
+
}
|
|
4859
|
+
},
|
|
4860
|
+
{
|
|
4861
|
+
"name": "user_tranche_share_ata",
|
|
4862
|
+
"writable": true,
|
|
4863
|
+
"pda": {
|
|
4864
|
+
"seeds": [
|
|
4865
|
+
{
|
|
4866
|
+
"kind": "account",
|
|
4867
|
+
"path": "user"
|
|
4868
|
+
},
|
|
4869
|
+
{
|
|
4870
|
+
"kind": "account",
|
|
4871
|
+
"path": "share_token_program"
|
|
4872
|
+
},
|
|
4873
|
+
{
|
|
4874
|
+
"kind": "account",
|
|
4875
|
+
"path": "tranche_share_mint"
|
|
4876
|
+
}
|
|
4877
|
+
],
|
|
4878
|
+
"program": {
|
|
4879
|
+
"kind": "const",
|
|
4880
|
+
"value": [
|
|
4881
|
+
140,
|
|
4882
|
+
151,
|
|
4883
|
+
37,
|
|
4884
|
+
143,
|
|
4885
|
+
78,
|
|
4886
|
+
36,
|
|
4887
|
+
137,
|
|
4888
|
+
241,
|
|
4889
|
+
187,
|
|
4890
|
+
61,
|
|
4891
|
+
16,
|
|
4892
|
+
41,
|
|
4893
|
+
20,
|
|
4894
|
+
142,
|
|
4895
|
+
13,
|
|
4896
|
+
131,
|
|
4897
|
+
11,
|
|
4898
|
+
90,
|
|
4899
|
+
19,
|
|
4900
|
+
153,
|
|
4901
|
+
218,
|
|
4902
|
+
255,
|
|
4903
|
+
16,
|
|
4904
|
+
132,
|
|
4905
|
+
4,
|
|
4906
|
+
142,
|
|
4907
|
+
123,
|
|
4908
|
+
216,
|
|
4909
|
+
219,
|
|
4910
|
+
233,
|
|
4911
|
+
248,
|
|
4912
|
+
89
|
|
4913
|
+
]
|
|
4914
|
+
}
|
|
4915
|
+
}
|
|
4916
|
+
},
|
|
4917
|
+
{
|
|
4918
|
+
"name": "asset_token_program"
|
|
4919
|
+
},
|
|
4920
|
+
{
|
|
4921
|
+
"name": "share_token_program"
|
|
4922
|
+
},
|
|
4923
|
+
{
|
|
4924
|
+
"name": "associated_token_program",
|
|
4925
|
+
"address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
|
|
4926
|
+
},
|
|
4927
|
+
{
|
|
4928
|
+
"name": "system_program",
|
|
4929
|
+
"address": "11111111111111111111111111111111"
|
|
4930
|
+
}
|
|
4931
|
+
],
|
|
4932
|
+
"args": [
|
|
4933
|
+
{
|
|
4934
|
+
"name": "kind",
|
|
4935
|
+
"type": {
|
|
4936
|
+
"defined": {
|
|
4937
|
+
"name": "TrancheKind"
|
|
4938
|
+
}
|
|
4939
|
+
}
|
|
4940
|
+
},
|
|
4941
|
+
{
|
|
4942
|
+
"name": "share_amount",
|
|
4943
|
+
"type": "u64"
|
|
4944
|
+
},
|
|
4945
|
+
{
|
|
4946
|
+
"name": "signer_seeds",
|
|
4947
|
+
"type": {
|
|
4948
|
+
"vec": "bytes"
|
|
4949
|
+
}
|
|
4950
|
+
}
|
|
4951
|
+
]
|
|
4952
|
+
},
|
|
4953
|
+
{
|
|
4954
|
+
"name": "execute_withdraw",
|
|
4955
|
+
"discriminator": [
|
|
4956
|
+
255,
|
|
4957
|
+
93,
|
|
4958
|
+
15,
|
|
4959
|
+
141,
|
|
4960
|
+
187,
|
|
4961
|
+
94,
|
|
4962
|
+
246,
|
|
4963
|
+
162
|
|
4964
|
+
],
|
|
4965
|
+
"accounts": [
|
|
4966
|
+
{
|
|
4967
|
+
"name": "user",
|
|
4968
|
+
"docs": [
|
|
4969
|
+
"Token-account authority. May be a transaction signer or a PDA signer",
|
|
4970
|
+
"supplied by an integrating program through `invoke_signed`."
|
|
4971
|
+
],
|
|
4972
|
+
"signer": true
|
|
4973
|
+
},
|
|
4974
|
+
{
|
|
4975
|
+
"name": "vault",
|
|
4976
|
+
"writable": true
|
|
4977
|
+
},
|
|
4978
|
+
{
|
|
4979
|
+
"name": "vault_oracle"
|
|
4980
|
+
},
|
|
4981
|
+
{
|
|
4982
|
+
"name": "vault_tranche_state",
|
|
4983
|
+
"optional": true
|
|
4984
|
+
},
|
|
4985
|
+
{
|
|
4986
|
+
"name": "asset_mint"
|
|
4987
|
+
},
|
|
4988
|
+
{
|
|
4989
|
+
"name": "share_mint",
|
|
4990
|
+
"writable": true
|
|
4991
|
+
},
|
|
4992
|
+
{
|
|
4993
|
+
"name": "user_asset_ata",
|
|
4994
|
+
"writable": true,
|
|
4995
|
+
"pda": {
|
|
4996
|
+
"seeds": [
|
|
4997
|
+
{
|
|
4998
|
+
"kind": "account",
|
|
4999
|
+
"path": "user"
|
|
5000
|
+
},
|
|
5001
|
+
{
|
|
5002
|
+
"kind": "account",
|
|
5003
|
+
"path": "asset_token_program"
|
|
5004
|
+
},
|
|
5005
|
+
{
|
|
5006
|
+
"kind": "account",
|
|
5007
|
+
"path": "asset_mint"
|
|
5008
|
+
}
|
|
5009
|
+
],
|
|
5010
|
+
"program": {
|
|
5011
|
+
"kind": "const",
|
|
5012
|
+
"value": [
|
|
5013
|
+
140,
|
|
5014
|
+
151,
|
|
5015
|
+
37,
|
|
5016
|
+
143,
|
|
5017
|
+
78,
|
|
5018
|
+
36,
|
|
5019
|
+
137,
|
|
5020
|
+
241,
|
|
5021
|
+
187,
|
|
5022
|
+
61,
|
|
5023
|
+
16,
|
|
5024
|
+
41,
|
|
5025
|
+
20,
|
|
5026
|
+
142,
|
|
5027
|
+
13,
|
|
5028
|
+
131,
|
|
5029
|
+
11,
|
|
5030
|
+
90,
|
|
5031
|
+
19,
|
|
5032
|
+
153,
|
|
5033
|
+
218,
|
|
5034
|
+
255,
|
|
5035
|
+
16,
|
|
5036
|
+
132,
|
|
5037
|
+
4,
|
|
5038
|
+
142,
|
|
5039
|
+
123,
|
|
5040
|
+
216,
|
|
5041
|
+
219,
|
|
5042
|
+
233,
|
|
5043
|
+
248,
|
|
5044
|
+
89
|
|
5045
|
+
]
|
|
5046
|
+
}
|
|
5047
|
+
}
|
|
5048
|
+
},
|
|
5049
|
+
{
|
|
5050
|
+
"name": "vault_asset_ata",
|
|
5051
|
+
"writable": true,
|
|
5052
|
+
"pda": {
|
|
5053
|
+
"seeds": [
|
|
5054
|
+
{
|
|
5055
|
+
"kind": "account",
|
|
5056
|
+
"path": "vault"
|
|
5057
|
+
},
|
|
5058
|
+
{
|
|
5059
|
+
"kind": "account",
|
|
5060
|
+
"path": "asset_token_program"
|
|
5061
|
+
},
|
|
5062
|
+
{
|
|
5063
|
+
"kind": "account",
|
|
5064
|
+
"path": "asset_mint"
|
|
5065
|
+
}
|
|
5066
|
+
],
|
|
5067
|
+
"program": {
|
|
5068
|
+
"kind": "const",
|
|
5069
|
+
"value": [
|
|
5070
|
+
140,
|
|
5071
|
+
151,
|
|
5072
|
+
37,
|
|
5073
|
+
143,
|
|
5074
|
+
78,
|
|
5075
|
+
36,
|
|
5076
|
+
137,
|
|
5077
|
+
241,
|
|
5078
|
+
187,
|
|
5079
|
+
61,
|
|
5080
|
+
16,
|
|
5081
|
+
41,
|
|
5082
|
+
20,
|
|
5083
|
+
142,
|
|
5084
|
+
13,
|
|
5085
|
+
131,
|
|
5086
|
+
11,
|
|
5087
|
+
90,
|
|
5088
|
+
19,
|
|
5089
|
+
153,
|
|
5090
|
+
218,
|
|
5091
|
+
255,
|
|
5092
|
+
16,
|
|
5093
|
+
132,
|
|
5094
|
+
4,
|
|
5095
|
+
142,
|
|
5096
|
+
123,
|
|
5097
|
+
216,
|
|
5098
|
+
219,
|
|
5099
|
+
233,
|
|
5100
|
+
248,
|
|
5101
|
+
89
|
|
5102
|
+
]
|
|
5103
|
+
}
|
|
5104
|
+
}
|
|
5105
|
+
},
|
|
5106
|
+
{
|
|
5107
|
+
"name": "fee_vault",
|
|
5108
|
+
"docs": [
|
|
5109
|
+
"Per-vault fee-vault PDA: token authority + accounting. The burn fee accrues",
|
|
5110
|
+
"here and is swept to the fee collector by the permissionless crank."
|
|
5111
|
+
],
|
|
5112
|
+
"writable": true
|
|
5113
|
+
},
|
|
5114
|
+
{
|
|
5115
|
+
"name": "fee_vault_ata",
|
|
5116
|
+
"writable": true,
|
|
5117
|
+
"pda": {
|
|
5118
|
+
"seeds": [
|
|
5119
|
+
{
|
|
5120
|
+
"kind": "account",
|
|
5121
|
+
"path": "fee_vault"
|
|
5122
|
+
},
|
|
5123
|
+
{
|
|
5124
|
+
"kind": "account",
|
|
5125
|
+
"path": "asset_token_program"
|
|
5126
|
+
},
|
|
5127
|
+
{
|
|
5128
|
+
"kind": "account",
|
|
5129
|
+
"path": "asset_mint"
|
|
5130
|
+
}
|
|
5131
|
+
],
|
|
5132
|
+
"program": {
|
|
5133
|
+
"kind": "const",
|
|
5134
|
+
"value": [
|
|
5135
|
+
140,
|
|
5136
|
+
151,
|
|
5137
|
+
37,
|
|
5138
|
+
143,
|
|
5139
|
+
78,
|
|
5140
|
+
36,
|
|
5141
|
+
137,
|
|
5142
|
+
241,
|
|
5143
|
+
187,
|
|
5144
|
+
61,
|
|
5145
|
+
16,
|
|
5146
|
+
41,
|
|
5147
|
+
20,
|
|
5148
|
+
142,
|
|
5149
|
+
13,
|
|
5150
|
+
131,
|
|
5151
|
+
11,
|
|
5152
|
+
90,
|
|
5153
|
+
19,
|
|
5154
|
+
153,
|
|
5155
|
+
218,
|
|
5156
|
+
255,
|
|
5157
|
+
16,
|
|
5158
|
+
132,
|
|
5159
|
+
4,
|
|
5160
|
+
142,
|
|
5161
|
+
123,
|
|
5162
|
+
216,
|
|
5163
|
+
219,
|
|
5164
|
+
233,
|
|
5165
|
+
248,
|
|
5166
|
+
89
|
|
5167
|
+
]
|
|
5168
|
+
}
|
|
5169
|
+
}
|
|
5170
|
+
},
|
|
5171
|
+
{
|
|
5172
|
+
"name": "user_share_ata",
|
|
5173
|
+
"writable": true,
|
|
5174
|
+
"pda": {
|
|
5175
|
+
"seeds": [
|
|
5176
|
+
{
|
|
5177
|
+
"kind": "account",
|
|
5178
|
+
"path": "user"
|
|
5179
|
+
},
|
|
5180
|
+
{
|
|
5181
|
+
"kind": "account",
|
|
5182
|
+
"path": "share_token_program"
|
|
5183
|
+
},
|
|
5184
|
+
{
|
|
5185
|
+
"kind": "account",
|
|
5186
|
+
"path": "share_mint"
|
|
5187
|
+
}
|
|
5188
|
+
],
|
|
5189
|
+
"program": {
|
|
5190
|
+
"kind": "const",
|
|
5191
|
+
"value": [
|
|
5192
|
+
140,
|
|
5193
|
+
151,
|
|
5194
|
+
37,
|
|
5195
|
+
143,
|
|
5196
|
+
78,
|
|
5197
|
+
36,
|
|
5198
|
+
137,
|
|
5199
|
+
241,
|
|
5200
|
+
187,
|
|
5201
|
+
61,
|
|
5202
|
+
16,
|
|
5203
|
+
41,
|
|
5204
|
+
20,
|
|
5205
|
+
142,
|
|
5206
|
+
13,
|
|
5207
|
+
131,
|
|
5208
|
+
11,
|
|
5209
|
+
90,
|
|
5210
|
+
19,
|
|
5211
|
+
153,
|
|
5212
|
+
218,
|
|
5213
|
+
255,
|
|
5214
|
+
16,
|
|
5215
|
+
132,
|
|
5216
|
+
4,
|
|
5217
|
+
142,
|
|
5218
|
+
123,
|
|
5219
|
+
216,
|
|
5220
|
+
219,
|
|
5221
|
+
233,
|
|
5222
|
+
248,
|
|
5223
|
+
89
|
|
5224
|
+
]
|
|
5225
|
+
}
|
|
5226
|
+
}
|
|
5227
|
+
},
|
|
5228
|
+
{
|
|
5229
|
+
"name": "asset_token_program"
|
|
5230
|
+
},
|
|
5231
|
+
{
|
|
5232
|
+
"name": "share_token_program"
|
|
5233
|
+
}
|
|
5234
|
+
],
|
|
5235
|
+
"args": [
|
|
5236
|
+
{
|
|
5237
|
+
"name": "share_amount",
|
|
5238
|
+
"type": "u64"
|
|
5239
|
+
}
|
|
5240
|
+
]
|
|
5241
|
+
},
|
|
5242
|
+
{
|
|
5243
|
+
"name": "execute_withdraw_fee_exempt",
|
|
5244
|
+
"discriminator": [
|
|
5245
|
+
47,
|
|
5246
|
+
77,
|
|
5247
|
+
139,
|
|
5248
|
+
253,
|
|
5249
|
+
122,
|
|
5250
|
+
181,
|
|
5251
|
+
108,
|
|
5252
|
+
216
|
|
5253
|
+
],
|
|
5254
|
+
"accounts": [
|
|
5255
|
+
{
|
|
5256
|
+
"name": "user",
|
|
5257
|
+
"docs": [
|
|
5258
|
+
"Token-account authority. May be a transaction signer or a PDA signer",
|
|
5259
|
+
"supplied by an integrating program through `invoke_signed`."
|
|
5260
|
+
],
|
|
5261
|
+
"signer": true
|
|
5262
|
+
},
|
|
5263
|
+
{
|
|
5264
|
+
"name": "vault",
|
|
5265
|
+
"writable": true
|
|
5266
|
+
},
|
|
5267
|
+
{
|
|
5268
|
+
"name": "vault_oracle"
|
|
5269
|
+
},
|
|
5270
|
+
{
|
|
5271
|
+
"name": "vault_tranche_state",
|
|
5272
|
+
"optional": true
|
|
5273
|
+
},
|
|
5274
|
+
{
|
|
5275
|
+
"name": "asset_mint"
|
|
5276
|
+
},
|
|
5277
|
+
{
|
|
5278
|
+
"name": "share_mint",
|
|
5279
|
+
"writable": true
|
|
5280
|
+
},
|
|
5281
|
+
{
|
|
5282
|
+
"name": "user_asset_ata",
|
|
5283
|
+
"writable": true,
|
|
5284
|
+
"pda": {
|
|
5285
|
+
"seeds": [
|
|
5286
|
+
{
|
|
5287
|
+
"kind": "account",
|
|
5288
|
+
"path": "user"
|
|
5289
|
+
},
|
|
5290
|
+
{
|
|
5291
|
+
"kind": "account",
|
|
5292
|
+
"path": "asset_token_program"
|
|
5293
|
+
},
|
|
5294
|
+
{
|
|
5295
|
+
"kind": "account",
|
|
5296
|
+
"path": "asset_mint"
|
|
5297
|
+
}
|
|
5298
|
+
],
|
|
5299
|
+
"program": {
|
|
5300
|
+
"kind": "const",
|
|
5301
|
+
"value": [
|
|
5302
|
+
140,
|
|
5303
|
+
151,
|
|
5304
|
+
37,
|
|
5305
|
+
143,
|
|
5306
|
+
78,
|
|
5307
|
+
36,
|
|
5308
|
+
137,
|
|
5309
|
+
241,
|
|
5310
|
+
187,
|
|
5311
|
+
61,
|
|
5312
|
+
16,
|
|
5313
|
+
41,
|
|
5314
|
+
20,
|
|
5315
|
+
142,
|
|
5316
|
+
13,
|
|
5317
|
+
131,
|
|
5318
|
+
11,
|
|
5319
|
+
90,
|
|
5320
|
+
19,
|
|
5321
|
+
153,
|
|
5322
|
+
218,
|
|
5323
|
+
255,
|
|
5324
|
+
16,
|
|
5325
|
+
132,
|
|
5326
|
+
4,
|
|
5327
|
+
142,
|
|
5328
|
+
123,
|
|
5329
|
+
216,
|
|
5330
|
+
219,
|
|
5331
|
+
233,
|
|
5332
|
+
248,
|
|
5333
|
+
89
|
|
5334
|
+
]
|
|
5335
|
+
}
|
|
5336
|
+
}
|
|
5337
|
+
},
|
|
5338
|
+
{
|
|
5339
|
+
"name": "vault_asset_ata",
|
|
5340
|
+
"writable": true,
|
|
5341
|
+
"pda": {
|
|
5342
|
+
"seeds": [
|
|
5343
|
+
{
|
|
5344
|
+
"kind": "account",
|
|
5345
|
+
"path": "vault"
|
|
5346
|
+
},
|
|
5347
|
+
{
|
|
5348
|
+
"kind": "account",
|
|
5349
|
+
"path": "asset_token_program"
|
|
5350
|
+
},
|
|
5351
|
+
{
|
|
5352
|
+
"kind": "account",
|
|
5353
|
+
"path": "asset_mint"
|
|
5354
|
+
}
|
|
5355
|
+
],
|
|
5356
|
+
"program": {
|
|
5357
|
+
"kind": "const",
|
|
5358
|
+
"value": [
|
|
5359
|
+
140,
|
|
5360
|
+
151,
|
|
5361
|
+
37,
|
|
5362
|
+
143,
|
|
5363
|
+
78,
|
|
5364
|
+
36,
|
|
5365
|
+
137,
|
|
5366
|
+
241,
|
|
5367
|
+
187,
|
|
5368
|
+
61,
|
|
5369
|
+
16,
|
|
5370
|
+
41,
|
|
5371
|
+
20,
|
|
5372
|
+
142,
|
|
5373
|
+
13,
|
|
5374
|
+
131,
|
|
5375
|
+
11,
|
|
5376
|
+
90,
|
|
5377
|
+
19,
|
|
5378
|
+
153,
|
|
5379
|
+
218,
|
|
5380
|
+
255,
|
|
5381
|
+
16,
|
|
5382
|
+
132,
|
|
5383
|
+
4,
|
|
5384
|
+
142,
|
|
5385
|
+
123,
|
|
5386
|
+
216,
|
|
5387
|
+
219,
|
|
5388
|
+
233,
|
|
5389
|
+
248,
|
|
5390
|
+
89
|
|
5391
|
+
]
|
|
5392
|
+
}
|
|
5393
|
+
}
|
|
5394
|
+
},
|
|
5395
|
+
{
|
|
5396
|
+
"name": "fee_vault",
|
|
5397
|
+
"docs": [
|
|
5398
|
+
"Per-vault fee-vault PDA: token authority + accounting. The burn fee accrues",
|
|
5399
|
+
"here and is swept to the fee collector by the permissionless crank."
|
|
5400
|
+
],
|
|
5401
|
+
"writable": true
|
|
5402
|
+
},
|
|
5403
|
+
{
|
|
5404
|
+
"name": "fee_vault_ata",
|
|
5405
|
+
"writable": true,
|
|
5406
|
+
"pda": {
|
|
5407
|
+
"seeds": [
|
|
5408
|
+
{
|
|
5409
|
+
"kind": "account",
|
|
5410
|
+
"path": "fee_vault"
|
|
5411
|
+
},
|
|
5412
|
+
{
|
|
5413
|
+
"kind": "account",
|
|
5414
|
+
"path": "asset_token_program"
|
|
5415
|
+
},
|
|
5416
|
+
{
|
|
5417
|
+
"kind": "account",
|
|
5418
|
+
"path": "asset_mint"
|
|
5419
|
+
}
|
|
5420
|
+
],
|
|
5421
|
+
"program": {
|
|
5422
|
+
"kind": "const",
|
|
5423
|
+
"value": [
|
|
5424
|
+
140,
|
|
5425
|
+
151,
|
|
5426
|
+
37,
|
|
5427
|
+
143,
|
|
5428
|
+
78,
|
|
5429
|
+
36,
|
|
5430
|
+
137,
|
|
5431
|
+
241,
|
|
5432
|
+
187,
|
|
5433
|
+
61,
|
|
5434
|
+
16,
|
|
5435
|
+
41,
|
|
5436
|
+
20,
|
|
5437
|
+
142,
|
|
5438
|
+
13,
|
|
5439
|
+
131,
|
|
5440
|
+
11,
|
|
5441
|
+
90,
|
|
5442
|
+
19,
|
|
5443
|
+
153,
|
|
5444
|
+
218,
|
|
5445
|
+
255,
|
|
5446
|
+
16,
|
|
5447
|
+
132,
|
|
5448
|
+
4,
|
|
5449
|
+
142,
|
|
5450
|
+
123,
|
|
5451
|
+
216,
|
|
5452
|
+
219,
|
|
5453
|
+
233,
|
|
5454
|
+
248,
|
|
5455
|
+
89
|
|
5456
|
+
]
|
|
5457
|
+
}
|
|
5458
|
+
}
|
|
5459
|
+
},
|
|
5460
|
+
{
|
|
5461
|
+
"name": "user_share_ata",
|
|
5462
|
+
"writable": true,
|
|
5463
|
+
"pda": {
|
|
5464
|
+
"seeds": [
|
|
5465
|
+
{
|
|
5466
|
+
"kind": "account",
|
|
5467
|
+
"path": "user"
|
|
5468
|
+
},
|
|
5469
|
+
{
|
|
5470
|
+
"kind": "account",
|
|
5471
|
+
"path": "share_token_program"
|
|
5472
|
+
},
|
|
5473
|
+
{
|
|
5474
|
+
"kind": "account",
|
|
5475
|
+
"path": "share_mint"
|
|
5476
|
+
}
|
|
5477
|
+
],
|
|
5478
|
+
"program": {
|
|
5479
|
+
"kind": "const",
|
|
5480
|
+
"value": [
|
|
5481
|
+
140,
|
|
5482
|
+
151,
|
|
5483
|
+
37,
|
|
5484
|
+
143,
|
|
5485
|
+
78,
|
|
5486
|
+
36,
|
|
5487
|
+
137,
|
|
5488
|
+
241,
|
|
5489
|
+
187,
|
|
5490
|
+
61,
|
|
5491
|
+
16,
|
|
5492
|
+
41,
|
|
5493
|
+
20,
|
|
5494
|
+
142,
|
|
5495
|
+
13,
|
|
5496
|
+
131,
|
|
5497
|
+
11,
|
|
5498
|
+
90,
|
|
5499
|
+
19,
|
|
5500
|
+
153,
|
|
5501
|
+
218,
|
|
5502
|
+
255,
|
|
5503
|
+
16,
|
|
5504
|
+
132,
|
|
5505
|
+
4,
|
|
5506
|
+
142,
|
|
5507
|
+
123,
|
|
5508
|
+
216,
|
|
5509
|
+
219,
|
|
5510
|
+
233,
|
|
5511
|
+
248,
|
|
5512
|
+
89
|
|
5513
|
+
]
|
|
5514
|
+
}
|
|
5515
|
+
}
|
|
5516
|
+
},
|
|
5517
|
+
{
|
|
5518
|
+
"name": "asset_token_program"
|
|
5519
|
+
},
|
|
5520
|
+
{
|
|
5521
|
+
"name": "share_token_program"
|
|
5522
|
+
}
|
|
5523
|
+
],
|
|
5524
|
+
"args": [
|
|
5525
|
+
{
|
|
5526
|
+
"name": "share_amount",
|
|
5527
|
+
"type": "u64"
|
|
5528
|
+
},
|
|
5529
|
+
{
|
|
5530
|
+
"name": "signer_seeds",
|
|
5531
|
+
"type": {
|
|
5532
|
+
"vec": "bytes"
|
|
5533
|
+
}
|
|
5534
|
+
}
|
|
5535
|
+
]
|
|
5536
|
+
},
|
|
5537
|
+
{
|
|
5538
|
+
"name": "execute_withdraw_from_external",
|
|
5539
|
+
"discriminator": [
|
|
5540
|
+
91,
|
|
5541
|
+
38,
|
|
5542
|
+
26,
|
|
5543
|
+
250,
|
|
5544
|
+
138,
|
|
5545
|
+
227,
|
|
5546
|
+
18,
|
|
5547
|
+
88
|
|
5548
|
+
],
|
|
5549
|
+
"accounts": [
|
|
5550
|
+
{
|
|
5551
|
+
"name": "user",
|
|
5552
|
+
"docs": [
|
|
5553
|
+
"Token-account authority. May be a transaction signer or a PDA signer",
|
|
5554
|
+
"supplied by an integrating program through `invoke_signed`."
|
|
5555
|
+
],
|
|
5556
|
+
"signer": true
|
|
5557
|
+
},
|
|
5558
|
+
{
|
|
5559
|
+
"name": "vault",
|
|
5560
|
+
"writable": true
|
|
5561
|
+
},
|
|
5562
|
+
{
|
|
5563
|
+
"name": "vault_oracle"
|
|
5564
|
+
},
|
|
5565
|
+
{
|
|
5566
|
+
"name": "vault_tranche_state",
|
|
5567
|
+
"optional": true
|
|
5568
|
+
},
|
|
5569
|
+
{
|
|
5570
|
+
"name": "asset_mint"
|
|
5571
|
+
},
|
|
5572
|
+
{
|
|
5573
|
+
"name": "share_mint",
|
|
5574
|
+
"writable": true
|
|
5575
|
+
},
|
|
5576
|
+
{
|
|
5577
|
+
"name": "user_asset_ata",
|
|
5578
|
+
"writable": true,
|
|
5579
|
+
"pda": {
|
|
5580
|
+
"seeds": [
|
|
5581
|
+
{
|
|
5582
|
+
"kind": "account",
|
|
5583
|
+
"path": "user"
|
|
5584
|
+
},
|
|
5585
|
+
{
|
|
5586
|
+
"kind": "account",
|
|
5587
|
+
"path": "asset_token_program"
|
|
5588
|
+
},
|
|
5589
|
+
{
|
|
5590
|
+
"kind": "account",
|
|
5591
|
+
"path": "asset_mint"
|
|
5592
|
+
}
|
|
5593
|
+
],
|
|
5594
|
+
"program": {
|
|
5595
|
+
"kind": "const",
|
|
5596
|
+
"value": [
|
|
5597
|
+
140,
|
|
5598
|
+
151,
|
|
5599
|
+
37,
|
|
5600
|
+
143,
|
|
5601
|
+
78,
|
|
5602
|
+
36,
|
|
5603
|
+
137,
|
|
5604
|
+
241,
|
|
5605
|
+
187,
|
|
5606
|
+
61,
|
|
5607
|
+
16,
|
|
5608
|
+
41,
|
|
5609
|
+
20,
|
|
5610
|
+
142,
|
|
5611
|
+
13,
|
|
5612
|
+
131,
|
|
5613
|
+
11,
|
|
5614
|
+
90,
|
|
5615
|
+
19,
|
|
5616
|
+
153,
|
|
5617
|
+
218,
|
|
5618
|
+
255,
|
|
5619
|
+
16,
|
|
5620
|
+
132,
|
|
5621
|
+
4,
|
|
5622
|
+
142,
|
|
5623
|
+
123,
|
|
5624
|
+
216,
|
|
5625
|
+
219,
|
|
5626
|
+
233,
|
|
5627
|
+
248,
|
|
5628
|
+
89
|
|
5629
|
+
]
|
|
5630
|
+
}
|
|
5631
|
+
}
|
|
5632
|
+
},
|
|
5633
|
+
{
|
|
5634
|
+
"name": "vault_asset_ata",
|
|
5635
|
+
"writable": true,
|
|
5636
|
+
"pda": {
|
|
5637
|
+
"seeds": [
|
|
5638
|
+
{
|
|
5639
|
+
"kind": "account",
|
|
5640
|
+
"path": "vault"
|
|
5641
|
+
},
|
|
5642
|
+
{
|
|
5643
|
+
"kind": "account",
|
|
5644
|
+
"path": "asset_token_program"
|
|
5645
|
+
},
|
|
5646
|
+
{
|
|
5647
|
+
"kind": "account",
|
|
5648
|
+
"path": "asset_mint"
|
|
5649
|
+
}
|
|
5650
|
+
],
|
|
5651
|
+
"program": {
|
|
5652
|
+
"kind": "const",
|
|
5653
|
+
"value": [
|
|
5654
|
+
140,
|
|
5655
|
+
151,
|
|
5656
|
+
37,
|
|
5657
|
+
143,
|
|
5658
|
+
78,
|
|
5659
|
+
36,
|
|
5660
|
+
137,
|
|
5661
|
+
241,
|
|
5662
|
+
187,
|
|
5663
|
+
61,
|
|
5664
|
+
16,
|
|
5665
|
+
41,
|
|
5666
|
+
20,
|
|
5667
|
+
142,
|
|
5668
|
+
13,
|
|
5669
|
+
131,
|
|
5670
|
+
11,
|
|
5671
|
+
90,
|
|
5672
|
+
19,
|
|
5673
|
+
153,
|
|
5674
|
+
218,
|
|
5675
|
+
255,
|
|
5676
|
+
16,
|
|
5677
|
+
132,
|
|
5678
|
+
4,
|
|
5679
|
+
142,
|
|
5680
|
+
123,
|
|
5681
|
+
216,
|
|
5682
|
+
219,
|
|
5683
|
+
233,
|
|
5684
|
+
248,
|
|
5685
|
+
89
|
|
5686
|
+
]
|
|
5687
|
+
}
|
|
5688
|
+
}
|
|
5689
|
+
},
|
|
5690
|
+
{
|
|
5691
|
+
"name": "fee_vault",
|
|
5692
|
+
"docs": [
|
|
5693
|
+
"Per-vault fee-vault PDA: token authority + accounting. The burn fee accrues",
|
|
5694
|
+
"here and is swept to the fee collector by the permissionless crank."
|
|
5695
|
+
],
|
|
5696
|
+
"writable": true
|
|
5697
|
+
},
|
|
5698
|
+
{
|
|
5699
|
+
"name": "fee_vault_ata",
|
|
5700
|
+
"writable": true,
|
|
5701
|
+
"pda": {
|
|
5702
|
+
"seeds": [
|
|
5703
|
+
{
|
|
5704
|
+
"kind": "account",
|
|
5705
|
+
"path": "fee_vault"
|
|
5706
|
+
},
|
|
5707
|
+
{
|
|
5708
|
+
"kind": "account",
|
|
5709
|
+
"path": "asset_token_program"
|
|
5710
|
+
},
|
|
5711
|
+
{
|
|
5712
|
+
"kind": "account",
|
|
5713
|
+
"path": "asset_mint"
|
|
5714
|
+
}
|
|
5715
|
+
],
|
|
5716
|
+
"program": {
|
|
5717
|
+
"kind": "const",
|
|
5718
|
+
"value": [
|
|
5719
|
+
140,
|
|
5720
|
+
151,
|
|
5721
|
+
37,
|
|
5722
|
+
143,
|
|
5723
|
+
78,
|
|
5724
|
+
36,
|
|
5725
|
+
137,
|
|
5726
|
+
241,
|
|
5727
|
+
187,
|
|
5728
|
+
61,
|
|
5729
|
+
16,
|
|
5730
|
+
41,
|
|
5731
|
+
20,
|
|
5732
|
+
142,
|
|
5733
|
+
13,
|
|
5734
|
+
131,
|
|
5735
|
+
11,
|
|
5736
|
+
90,
|
|
5737
|
+
19,
|
|
5738
|
+
153,
|
|
5739
|
+
218,
|
|
5740
|
+
255,
|
|
5741
|
+
16,
|
|
5742
|
+
132,
|
|
5743
|
+
4,
|
|
5744
|
+
142,
|
|
5745
|
+
123,
|
|
5746
|
+
216,
|
|
5747
|
+
219,
|
|
5748
|
+
233,
|
|
5749
|
+
248,
|
|
5750
|
+
89
|
|
5751
|
+
]
|
|
5752
|
+
}
|
|
5753
|
+
}
|
|
5754
|
+
},
|
|
5755
|
+
{
|
|
5756
|
+
"name": "user_share_ata",
|
|
5757
|
+
"writable": true,
|
|
5758
|
+
"pda": {
|
|
5759
|
+
"seeds": [
|
|
5760
|
+
{
|
|
5761
|
+
"kind": "account",
|
|
5762
|
+
"path": "user"
|
|
5763
|
+
},
|
|
5764
|
+
{
|
|
5765
|
+
"kind": "account",
|
|
5766
|
+
"path": "share_token_program"
|
|
5767
|
+
},
|
|
5768
|
+
{
|
|
5769
|
+
"kind": "account",
|
|
5770
|
+
"path": "share_mint"
|
|
5771
|
+
}
|
|
5772
|
+
],
|
|
5773
|
+
"program": {
|
|
5774
|
+
"kind": "const",
|
|
5775
|
+
"value": [
|
|
5776
|
+
140,
|
|
5777
|
+
151,
|
|
5778
|
+
37,
|
|
5779
|
+
143,
|
|
5780
|
+
78,
|
|
5781
|
+
36,
|
|
5782
|
+
137,
|
|
5783
|
+
241,
|
|
5784
|
+
187,
|
|
5785
|
+
61,
|
|
5786
|
+
16,
|
|
5787
|
+
41,
|
|
5788
|
+
20,
|
|
5789
|
+
142,
|
|
5790
|
+
13,
|
|
5791
|
+
131,
|
|
5792
|
+
11,
|
|
5793
|
+
90,
|
|
5794
|
+
19,
|
|
5795
|
+
153,
|
|
5796
|
+
218,
|
|
5797
|
+
255,
|
|
5798
|
+
16,
|
|
5799
|
+
132,
|
|
5800
|
+
4,
|
|
5801
|
+
142,
|
|
5802
|
+
123,
|
|
5803
|
+
216,
|
|
5804
|
+
219,
|
|
5805
|
+
233,
|
|
5806
|
+
248,
|
|
5807
|
+
89
|
|
5808
|
+
]
|
|
5809
|
+
}
|
|
5810
|
+
}
|
|
5811
|
+
},
|
|
5812
|
+
{
|
|
5813
|
+
"name": "asset_token_program"
|
|
5814
|
+
},
|
|
5815
|
+
{
|
|
5816
|
+
"name": "share_token_program"
|
|
5817
|
+
}
|
|
5818
|
+
],
|
|
5819
|
+
"args": [
|
|
5820
|
+
{
|
|
5821
|
+
"name": "share_amount",
|
|
5822
|
+
"type": "u64"
|
|
5823
|
+
},
|
|
5824
|
+
{
|
|
5825
|
+
"name": "external_withdraw_ix_refs",
|
|
5826
|
+
"type": {
|
|
5827
|
+
"option": {
|
|
5828
|
+
"defined": {
|
|
5829
|
+
"name": "InstructionRefs"
|
|
5830
|
+
}
|
|
5831
|
+
}
|
|
5832
|
+
}
|
|
5833
|
+
},
|
|
5834
|
+
{
|
|
5835
|
+
"name": "external_liquidity_source",
|
|
5836
|
+
"type": {
|
|
5837
|
+
"option": "u8"
|
|
5838
|
+
}
|
|
5839
|
+
}
|
|
5840
|
+
]
|
|
5841
|
+
},
|
|
5842
|
+
{
|
|
5843
|
+
"name": "execute_withdraw_from_external_fee_exempt",
|
|
5844
|
+
"discriminator": [
|
|
5845
|
+
8,
|
|
5846
|
+
18,
|
|
5847
|
+
138,
|
|
5848
|
+
251,
|
|
5849
|
+
162,
|
|
5850
|
+
172,
|
|
5851
|
+
171,
|
|
5852
|
+
185
|
|
5853
|
+
],
|
|
5854
|
+
"accounts": [
|
|
5855
|
+
{
|
|
5856
|
+
"name": "user",
|
|
5857
|
+
"docs": [
|
|
5858
|
+
"Token-account authority. May be a transaction signer or a PDA signer",
|
|
5859
|
+
"supplied by an integrating program through `invoke_signed`."
|
|
5860
|
+
],
|
|
5861
|
+
"signer": true
|
|
5862
|
+
},
|
|
5863
|
+
{
|
|
5864
|
+
"name": "vault",
|
|
5865
|
+
"writable": true
|
|
5866
|
+
},
|
|
5867
|
+
{
|
|
5868
|
+
"name": "vault_oracle"
|
|
5869
|
+
},
|
|
5870
|
+
{
|
|
5871
|
+
"name": "vault_tranche_state",
|
|
5872
|
+
"optional": true
|
|
5873
|
+
},
|
|
5874
|
+
{
|
|
5875
|
+
"name": "asset_mint"
|
|
5876
|
+
},
|
|
5877
|
+
{
|
|
5878
|
+
"name": "share_mint",
|
|
5879
|
+
"writable": true
|
|
5880
|
+
},
|
|
5881
|
+
{
|
|
5882
|
+
"name": "user_asset_ata",
|
|
5883
|
+
"writable": true,
|
|
5884
|
+
"pda": {
|
|
5885
|
+
"seeds": [
|
|
5886
|
+
{
|
|
5887
|
+
"kind": "account",
|
|
5888
|
+
"path": "user"
|
|
5889
|
+
},
|
|
5890
|
+
{
|
|
5891
|
+
"kind": "account",
|
|
5892
|
+
"path": "asset_token_program"
|
|
5893
|
+
},
|
|
5894
|
+
{
|
|
5895
|
+
"kind": "account",
|
|
5896
|
+
"path": "asset_mint"
|
|
5897
|
+
}
|
|
5898
|
+
],
|
|
5899
|
+
"program": {
|
|
5900
|
+
"kind": "const",
|
|
5901
|
+
"value": [
|
|
5902
|
+
140,
|
|
5903
|
+
151,
|
|
5904
|
+
37,
|
|
5905
|
+
143,
|
|
5906
|
+
78,
|
|
5907
|
+
36,
|
|
5908
|
+
137,
|
|
5909
|
+
241,
|
|
5910
|
+
187,
|
|
5911
|
+
61,
|
|
5912
|
+
16,
|
|
5913
|
+
41,
|
|
5914
|
+
20,
|
|
5915
|
+
142,
|
|
5916
|
+
13,
|
|
5917
|
+
131,
|
|
5918
|
+
11,
|
|
5919
|
+
90,
|
|
5920
|
+
19,
|
|
5921
|
+
153,
|
|
5922
|
+
218,
|
|
5923
|
+
255,
|
|
5924
|
+
16,
|
|
5925
|
+
132,
|
|
5926
|
+
4,
|
|
5927
|
+
142,
|
|
5928
|
+
123,
|
|
5929
|
+
216,
|
|
5930
|
+
219,
|
|
5931
|
+
233,
|
|
5932
|
+
248,
|
|
5933
|
+
89
|
|
5934
|
+
]
|
|
5935
|
+
}
|
|
5936
|
+
}
|
|
5937
|
+
},
|
|
5938
|
+
{
|
|
5939
|
+
"name": "vault_asset_ata",
|
|
5940
|
+
"writable": true,
|
|
5941
|
+
"pda": {
|
|
5942
|
+
"seeds": [
|
|
5943
|
+
{
|
|
5944
|
+
"kind": "account",
|
|
5945
|
+
"path": "vault"
|
|
5946
|
+
},
|
|
5947
|
+
{
|
|
5948
|
+
"kind": "account",
|
|
5949
|
+
"path": "asset_token_program"
|
|
5950
|
+
},
|
|
5951
|
+
{
|
|
5952
|
+
"kind": "account",
|
|
5953
|
+
"path": "asset_mint"
|
|
5954
|
+
}
|
|
5955
|
+
],
|
|
5956
|
+
"program": {
|
|
5957
|
+
"kind": "const",
|
|
5958
|
+
"value": [
|
|
5959
|
+
140,
|
|
5960
|
+
151,
|
|
5961
|
+
37,
|
|
5962
|
+
143,
|
|
5963
|
+
78,
|
|
5964
|
+
36,
|
|
5965
|
+
137,
|
|
5966
|
+
241,
|
|
5967
|
+
187,
|
|
5968
|
+
61,
|
|
5969
|
+
16,
|
|
5970
|
+
41,
|
|
5971
|
+
20,
|
|
5972
|
+
142,
|
|
5973
|
+
13,
|
|
5974
|
+
131,
|
|
5975
|
+
11,
|
|
5976
|
+
90,
|
|
5977
|
+
19,
|
|
5978
|
+
153,
|
|
5979
|
+
218,
|
|
5980
|
+
255,
|
|
5981
|
+
16,
|
|
5982
|
+
132,
|
|
5983
|
+
4,
|
|
5984
|
+
142,
|
|
5985
|
+
123,
|
|
5986
|
+
216,
|
|
5987
|
+
219,
|
|
5988
|
+
233,
|
|
5989
|
+
248,
|
|
5990
|
+
89
|
|
5991
|
+
]
|
|
5992
|
+
}
|
|
5993
|
+
}
|
|
5994
|
+
},
|
|
5995
|
+
{
|
|
5996
|
+
"name": "fee_vault",
|
|
5997
|
+
"docs": [
|
|
5998
|
+
"Per-vault fee-vault PDA: token authority + accounting. The burn fee accrues",
|
|
5999
|
+
"here and is swept to the fee collector by the permissionless crank."
|
|
6000
|
+
],
|
|
6001
|
+
"writable": true
|
|
6002
|
+
},
|
|
6003
|
+
{
|
|
6004
|
+
"name": "fee_vault_ata",
|
|
6005
|
+
"writable": true,
|
|
6006
|
+
"pda": {
|
|
6007
|
+
"seeds": [
|
|
6008
|
+
{
|
|
6009
|
+
"kind": "account",
|
|
6010
|
+
"path": "fee_vault"
|
|
6011
|
+
},
|
|
6012
|
+
{
|
|
6013
|
+
"kind": "account",
|
|
6014
|
+
"path": "asset_token_program"
|
|
6015
|
+
},
|
|
6016
|
+
{
|
|
6017
|
+
"kind": "account",
|
|
6018
|
+
"path": "asset_mint"
|
|
6019
|
+
}
|
|
6020
|
+
],
|
|
6021
|
+
"program": {
|
|
6022
|
+
"kind": "const",
|
|
6023
|
+
"value": [
|
|
6024
|
+
140,
|
|
6025
|
+
151,
|
|
6026
|
+
37,
|
|
6027
|
+
143,
|
|
6028
|
+
78,
|
|
6029
|
+
36,
|
|
6030
|
+
137,
|
|
6031
|
+
241,
|
|
6032
|
+
187,
|
|
6033
|
+
61,
|
|
6034
|
+
16,
|
|
6035
|
+
41,
|
|
6036
|
+
20,
|
|
6037
|
+
142,
|
|
6038
|
+
13,
|
|
6039
|
+
131,
|
|
6040
|
+
11,
|
|
6041
|
+
90,
|
|
6042
|
+
19,
|
|
6043
|
+
153,
|
|
6044
|
+
218,
|
|
6045
|
+
255,
|
|
6046
|
+
16,
|
|
6047
|
+
132,
|
|
6048
|
+
4,
|
|
6049
|
+
142,
|
|
6050
|
+
123,
|
|
6051
|
+
216,
|
|
6052
|
+
219,
|
|
6053
|
+
233,
|
|
6054
|
+
248,
|
|
6055
|
+
89
|
|
6056
|
+
]
|
|
6057
|
+
}
|
|
6058
|
+
}
|
|
6059
|
+
},
|
|
6060
|
+
{
|
|
6061
|
+
"name": "user_share_ata",
|
|
6062
|
+
"writable": true,
|
|
6063
|
+
"pda": {
|
|
6064
|
+
"seeds": [
|
|
6065
|
+
{
|
|
6066
|
+
"kind": "account",
|
|
6067
|
+
"path": "user"
|
|
6068
|
+
},
|
|
6069
|
+
{
|
|
6070
|
+
"kind": "account",
|
|
6071
|
+
"path": "share_token_program"
|
|
6072
|
+
},
|
|
6073
|
+
{
|
|
6074
|
+
"kind": "account",
|
|
6075
|
+
"path": "share_mint"
|
|
6076
|
+
}
|
|
6077
|
+
],
|
|
6078
|
+
"program": {
|
|
6079
|
+
"kind": "const",
|
|
6080
|
+
"value": [
|
|
6081
|
+
140,
|
|
6082
|
+
151,
|
|
6083
|
+
37,
|
|
6084
|
+
143,
|
|
6085
|
+
78,
|
|
6086
|
+
36,
|
|
6087
|
+
137,
|
|
6088
|
+
241,
|
|
6089
|
+
187,
|
|
6090
|
+
61,
|
|
6091
|
+
16,
|
|
6092
|
+
41,
|
|
6093
|
+
20,
|
|
6094
|
+
142,
|
|
6095
|
+
13,
|
|
6096
|
+
131,
|
|
6097
|
+
11,
|
|
6098
|
+
90,
|
|
6099
|
+
19,
|
|
6100
|
+
153,
|
|
6101
|
+
218,
|
|
6102
|
+
255,
|
|
6103
|
+
16,
|
|
6104
|
+
132,
|
|
6105
|
+
4,
|
|
6106
|
+
142,
|
|
6107
|
+
123,
|
|
6108
|
+
216,
|
|
6109
|
+
219,
|
|
6110
|
+
233,
|
|
6111
|
+
248,
|
|
6112
|
+
89
|
|
6113
|
+
]
|
|
6114
|
+
}
|
|
6115
|
+
}
|
|
6116
|
+
},
|
|
6117
|
+
{
|
|
6118
|
+
"name": "asset_token_program"
|
|
6119
|
+
},
|
|
6120
|
+
{
|
|
6121
|
+
"name": "share_token_program"
|
|
6122
|
+
}
|
|
6123
|
+
],
|
|
6124
|
+
"args": [
|
|
6125
|
+
{
|
|
6126
|
+
"name": "share_amount",
|
|
6127
|
+
"type": "u64"
|
|
6128
|
+
},
|
|
6129
|
+
{
|
|
6130
|
+
"name": "external_withdraw_ix_refs",
|
|
6131
|
+
"type": {
|
|
6132
|
+
"option": {
|
|
6133
|
+
"defined": {
|
|
6134
|
+
"name": "InstructionRefs"
|
|
6135
|
+
}
|
|
6136
|
+
}
|
|
6137
|
+
}
|
|
6138
|
+
},
|
|
6139
|
+
{
|
|
6140
|
+
"name": "external_liquidity_source",
|
|
6141
|
+
"type": {
|
|
6142
|
+
"option": "u8"
|
|
6143
|
+
}
|
|
6144
|
+
},
|
|
6145
|
+
{
|
|
6146
|
+
"name": "signer_seeds",
|
|
6147
|
+
"type": {
|
|
6148
|
+
"vec": "bytes"
|
|
6149
|
+
}
|
|
6150
|
+
}
|
|
6151
|
+
]
|
|
6152
|
+
},
|
|
6153
|
+
{
|
|
6154
|
+
"name": "fulfill_junior_tranche_withdraw",
|
|
6155
|
+
"discriminator": [
|
|
6156
|
+
127,
|
|
6157
|
+
229,
|
|
6158
|
+
153,
|
|
6159
|
+
168,
|
|
6160
|
+
116,
|
|
6161
|
+
50,
|
|
6162
|
+
248,
|
|
6163
|
+
103
|
|
6164
|
+
],
|
|
6165
|
+
"accounts": [
|
|
6166
|
+
{
|
|
6167
|
+
"name": "signer",
|
|
6168
|
+
"writable": true,
|
|
6169
|
+
"signer": true
|
|
6170
|
+
},
|
|
6171
|
+
{
|
|
6172
|
+
"name": "owner"
|
|
6173
|
+
},
|
|
6174
|
+
{
|
|
6175
|
+
"name": "queue_payer",
|
|
6176
|
+
"writable": true
|
|
6177
|
+
},
|
|
6178
|
+
{
|
|
6179
|
+
"name": "vault",
|
|
6180
|
+
"writable": true
|
|
6181
|
+
},
|
|
6182
|
+
{
|
|
6183
|
+
"name": "vault_oracle"
|
|
6184
|
+
},
|
|
6185
|
+
{
|
|
6186
|
+
"name": "vault_tranche_state",
|
|
6187
|
+
"writable": true
|
|
6188
|
+
},
|
|
6189
|
+
{
|
|
6190
|
+
"name": "withdrawal_queue",
|
|
6191
|
+
"writable": true
|
|
6192
|
+
},
|
|
6193
|
+
{
|
|
6194
|
+
"name": "output_mint"
|
|
6195
|
+
},
|
|
6196
|
+
{
|
|
6197
|
+
"name": "input_mint",
|
|
6198
|
+
"writable": true
|
|
6199
|
+
},
|
|
6200
|
+
{
|
|
6201
|
+
"name": "owner_input_ata",
|
|
6202
|
+
"writable": true
|
|
6203
|
+
},
|
|
6204
|
+
{
|
|
6205
|
+
"name": "owner_output_ata",
|
|
6206
|
+
"writable": true,
|
|
6207
|
+
"pda": {
|
|
6208
|
+
"seeds": [
|
|
6209
|
+
{
|
|
6210
|
+
"kind": "account",
|
|
6211
|
+
"path": "owner"
|
|
6212
|
+
},
|
|
6213
|
+
{
|
|
6214
|
+
"kind": "account",
|
|
6215
|
+
"path": "asset_token_program"
|
|
6216
|
+
},
|
|
6217
|
+
{
|
|
6218
|
+
"kind": "account",
|
|
6219
|
+
"path": "output_mint"
|
|
6220
|
+
}
|
|
6221
|
+
],
|
|
6222
|
+
"program": {
|
|
6223
|
+
"kind": "const",
|
|
6224
|
+
"value": [
|
|
6225
|
+
140,
|
|
6226
|
+
151,
|
|
6227
|
+
37,
|
|
6228
|
+
143,
|
|
6229
|
+
78,
|
|
6230
|
+
36,
|
|
6231
|
+
137,
|
|
6232
|
+
241,
|
|
6233
|
+
187,
|
|
6234
|
+
61,
|
|
6235
|
+
16,
|
|
6236
|
+
41,
|
|
6237
|
+
20,
|
|
6238
|
+
142,
|
|
6239
|
+
13,
|
|
6240
|
+
131,
|
|
6241
|
+
11,
|
|
6242
|
+
90,
|
|
6243
|
+
19,
|
|
6244
|
+
153,
|
|
6245
|
+
218,
|
|
6246
|
+
255,
|
|
6247
|
+
16,
|
|
6248
|
+
132,
|
|
6249
|
+
4,
|
|
6250
|
+
142,
|
|
6251
|
+
123,
|
|
6252
|
+
216,
|
|
6253
|
+
219,
|
|
6254
|
+
233,
|
|
6255
|
+
248,
|
|
6256
|
+
89
|
|
6257
|
+
]
|
|
6258
|
+
}
|
|
6259
|
+
}
|
|
6260
|
+
},
|
|
6261
|
+
{
|
|
6262
|
+
"name": "vault_output_ata",
|
|
6263
|
+
"writable": true,
|
|
6264
|
+
"pda": {
|
|
6265
|
+
"seeds": [
|
|
6266
|
+
{
|
|
6267
|
+
"kind": "account",
|
|
6268
|
+
"path": "vault"
|
|
6269
|
+
},
|
|
6270
|
+
{
|
|
6271
|
+
"kind": "account",
|
|
6272
|
+
"path": "asset_token_program"
|
|
6273
|
+
},
|
|
6274
|
+
{
|
|
6275
|
+
"kind": "account",
|
|
6276
|
+
"path": "output_mint"
|
|
6277
|
+
}
|
|
6278
|
+
],
|
|
6279
|
+
"program": {
|
|
6280
|
+
"kind": "const",
|
|
6281
|
+
"value": [
|
|
6282
|
+
140,
|
|
6283
|
+
151,
|
|
6284
|
+
37,
|
|
6285
|
+
143,
|
|
6286
|
+
78,
|
|
6287
|
+
36,
|
|
6288
|
+
137,
|
|
6289
|
+
241,
|
|
6290
|
+
187,
|
|
6291
|
+
61,
|
|
6292
|
+
16,
|
|
6293
|
+
41,
|
|
6294
|
+
20,
|
|
6295
|
+
142,
|
|
6296
|
+
13,
|
|
6297
|
+
131,
|
|
6298
|
+
11,
|
|
6299
|
+
90,
|
|
6300
|
+
19,
|
|
6301
|
+
153,
|
|
6302
|
+
218,
|
|
6303
|
+
255,
|
|
6304
|
+
16,
|
|
6305
|
+
132,
|
|
6306
|
+
4,
|
|
6307
|
+
142,
|
|
6308
|
+
123,
|
|
6309
|
+
216,
|
|
6310
|
+
219,
|
|
6311
|
+
233,
|
|
6312
|
+
248,
|
|
6313
|
+
89
|
|
6314
|
+
]
|
|
6315
|
+
}
|
|
6316
|
+
}
|
|
6317
|
+
},
|
|
6318
|
+
{
|
|
6319
|
+
"name": "fee_collector"
|
|
6320
|
+
},
|
|
6321
|
+
{
|
|
6322
|
+
"name": "fee_collector_output_ata",
|
|
6323
|
+
"writable": true,
|
|
6324
|
+
"pda": {
|
|
6325
|
+
"seeds": [
|
|
6326
|
+
{
|
|
6327
|
+
"kind": "account",
|
|
6328
|
+
"path": "fee_collector"
|
|
6329
|
+
},
|
|
6330
|
+
{
|
|
6331
|
+
"kind": "account",
|
|
6332
|
+
"path": "asset_token_program"
|
|
6333
|
+
},
|
|
6334
|
+
{
|
|
6335
|
+
"kind": "account",
|
|
6336
|
+
"path": "output_mint"
|
|
6337
|
+
}
|
|
6338
|
+
],
|
|
6339
|
+
"program": {
|
|
6340
|
+
"kind": "const",
|
|
6341
|
+
"value": [
|
|
6342
|
+
140,
|
|
6343
|
+
151,
|
|
6344
|
+
37,
|
|
6345
|
+
143,
|
|
6346
|
+
78,
|
|
6347
|
+
36,
|
|
6348
|
+
137,
|
|
6349
|
+
241,
|
|
6350
|
+
187,
|
|
6351
|
+
61,
|
|
6352
|
+
16,
|
|
6353
|
+
41,
|
|
6354
|
+
20,
|
|
6355
|
+
142,
|
|
6356
|
+
13,
|
|
6357
|
+
131,
|
|
6358
|
+
11,
|
|
6359
|
+
90,
|
|
6360
|
+
19,
|
|
6361
|
+
153,
|
|
6362
|
+
218,
|
|
6363
|
+
255,
|
|
6364
|
+
16,
|
|
6365
|
+
132,
|
|
6366
|
+
4,
|
|
6367
|
+
142,
|
|
6368
|
+
123,
|
|
6369
|
+
216,
|
|
6370
|
+
219,
|
|
6371
|
+
233,
|
|
6372
|
+
248,
|
|
6373
|
+
89
|
|
6374
|
+
]
|
|
6375
|
+
}
|
|
6376
|
+
}
|
|
6377
|
+
},
|
|
6378
|
+
{
|
|
6379
|
+
"name": "queue_input_ata",
|
|
6380
|
+
"writable": true,
|
|
6381
|
+
"pda": {
|
|
6382
|
+
"seeds": [
|
|
6383
|
+
{
|
|
6384
|
+
"kind": "account",
|
|
6385
|
+
"path": "withdrawal_queue"
|
|
6386
|
+
},
|
|
6387
|
+
{
|
|
6388
|
+
"kind": "account",
|
|
6389
|
+
"path": "share_token_program"
|
|
6390
|
+
},
|
|
6391
|
+
{
|
|
6392
|
+
"kind": "account",
|
|
6393
|
+
"path": "input_mint"
|
|
6394
|
+
}
|
|
6395
|
+
],
|
|
6396
|
+
"program": {
|
|
6397
|
+
"kind": "const",
|
|
6398
|
+
"value": [
|
|
6399
|
+
140,
|
|
6400
|
+
151,
|
|
6401
|
+
37,
|
|
6402
|
+
143,
|
|
6403
|
+
78,
|
|
6404
|
+
36,
|
|
6405
|
+
137,
|
|
6406
|
+
241,
|
|
6407
|
+
187,
|
|
6408
|
+
61,
|
|
6409
|
+
16,
|
|
6410
|
+
41,
|
|
6411
|
+
20,
|
|
6412
|
+
142,
|
|
6413
|
+
13,
|
|
6414
|
+
131,
|
|
6415
|
+
11,
|
|
6416
|
+
90,
|
|
6417
|
+
19,
|
|
6418
|
+
153,
|
|
6419
|
+
218,
|
|
6420
|
+
255,
|
|
6421
|
+
16,
|
|
6422
|
+
132,
|
|
6423
|
+
4,
|
|
6424
|
+
142,
|
|
6425
|
+
123,
|
|
6426
|
+
216,
|
|
6427
|
+
219,
|
|
6428
|
+
233,
|
|
6429
|
+
248,
|
|
6430
|
+
89
|
|
6431
|
+
]
|
|
6432
|
+
}
|
|
6433
|
+
}
|
|
6434
|
+
},
|
|
6435
|
+
{
|
|
6436
|
+
"name": "asset_token_program"
|
|
6437
|
+
},
|
|
4653
6438
|
{
|
|
4654
|
-
"name": "
|
|
4655
|
-
"type": "u64"
|
|
6439
|
+
"name": "share_token_program"
|
|
4656
6440
|
},
|
|
4657
6441
|
{
|
|
4658
|
-
"name": "
|
|
4659
|
-
"
|
|
4660
|
-
"option": {
|
|
4661
|
-
"defined": {
|
|
4662
|
-
"name": "InstructionRefs"
|
|
4663
|
-
}
|
|
4664
|
-
}
|
|
4665
|
-
}
|
|
6442
|
+
"name": "associated_token_program",
|
|
6443
|
+
"address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
|
|
4666
6444
|
},
|
|
4667
6445
|
{
|
|
4668
|
-
"name": "
|
|
4669
|
-
"
|
|
4670
|
-
"option": "u8"
|
|
4671
|
-
}
|
|
6446
|
+
"name": "system_program",
|
|
6447
|
+
"address": "11111111111111111111111111111111"
|
|
4672
6448
|
}
|
|
4673
|
-
]
|
|
6449
|
+
],
|
|
6450
|
+
"args": []
|
|
4674
6451
|
},
|
|
4675
6452
|
{
|
|
4676
|
-
"name": "
|
|
6453
|
+
"name": "fulfill_junior_tranche_withdraw_fee_exempt",
|
|
4677
6454
|
"discriminator": [
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
6455
|
+
148,
|
|
6456
|
+
163,
|
|
6457
|
+
159,
|
|
6458
|
+
43,
|
|
6459
|
+
165,
|
|
6460
|
+
131,
|
|
6461
|
+
51,
|
|
6462
|
+
85
|
|
4686
6463
|
],
|
|
4687
6464
|
"accounts": [
|
|
4688
6465
|
{
|
|
@@ -4969,7 +6746,14 @@ var IDL = {
|
|
|
4969
6746
|
"address": "11111111111111111111111111111111"
|
|
4970
6747
|
}
|
|
4971
6748
|
],
|
|
4972
|
-
"args": [
|
|
6749
|
+
"args": [
|
|
6750
|
+
{
|
|
6751
|
+
"name": "signer_seeds",
|
|
6752
|
+
"type": {
|
|
6753
|
+
"vec": "bytes"
|
|
6754
|
+
}
|
|
6755
|
+
}
|
|
6756
|
+
]
|
|
4973
6757
|
},
|
|
4974
6758
|
{
|
|
4975
6759
|
"name": "get_nav",
|
|
@@ -5243,6 +7027,10 @@ var IDL = {
|
|
|
5243
7027
|
],
|
|
5244
7028
|
"writable": true,
|
|
5245
7029
|
"optional": true
|
|
7030
|
+
},
|
|
7031
|
+
{
|
|
7032
|
+
"name": "vault_tranche_state",
|
|
7033
|
+
"optional": true
|
|
5246
7034
|
}
|
|
5247
7035
|
],
|
|
5248
7036
|
"args": [
|
|
@@ -5627,12 +7415,39 @@ var IDL = {
|
|
|
5627
7415
|
"name": "idle_bank_mint",
|
|
5628
7416
|
"writable": true
|
|
5629
7417
|
},
|
|
7418
|
+
{
|
|
7419
|
+
"name": "idle_bank_tranche",
|
|
7420
|
+
"docs": [
|
|
7421
|
+
"path rejects initialized state because it cannot represent junior claims."
|
|
7422
|
+
],
|
|
7423
|
+
"pda": {
|
|
7424
|
+
"seeds": [
|
|
7425
|
+
{
|
|
7426
|
+
"kind": "const",
|
|
7427
|
+
"value": [
|
|
7428
|
+
84,
|
|
7429
|
+
82,
|
|
7430
|
+
65,
|
|
7431
|
+
78,
|
|
7432
|
+
67,
|
|
7433
|
+
72,
|
|
7434
|
+
69
|
|
7435
|
+
]
|
|
7436
|
+
},
|
|
7437
|
+
{
|
|
7438
|
+
"kind": "account",
|
|
7439
|
+
"path": "idle_bank_state"
|
|
7440
|
+
}
|
|
7441
|
+
]
|
|
7442
|
+
}
|
|
7443
|
+
},
|
|
5630
7444
|
{
|
|
5631
7445
|
"name": "idle_vault",
|
|
5632
7446
|
"writable": true
|
|
5633
7447
|
},
|
|
5634
7448
|
{
|
|
5635
7449
|
"name": "idle_vault_oracle",
|
|
7450
|
+
"writable": true,
|
|
5636
7451
|
"pda": {
|
|
5637
7452
|
"seeds": [
|
|
5638
7453
|
{
|
|
@@ -5737,7 +7552,24 @@ var IDL = {
|
|
|
5737
7552
|
},
|
|
5738
7553
|
{
|
|
5739
7554
|
"name": "yielding_bank_state",
|
|
5740
|
-
"writable": true
|
|
7555
|
+
"writable": true,
|
|
7556
|
+
"pda": {
|
|
7557
|
+
"seeds": [
|
|
7558
|
+
{
|
|
7559
|
+
"kind": "const",
|
|
7560
|
+
"value": [
|
|
7561
|
+
66,
|
|
7562
|
+
65,
|
|
7563
|
+
78,
|
|
7564
|
+
75
|
|
7565
|
+
]
|
|
7566
|
+
},
|
|
7567
|
+
{
|
|
7568
|
+
"kind": "account",
|
|
7569
|
+
"path": "yielding_bank_state"
|
|
7570
|
+
}
|
|
7571
|
+
]
|
|
7572
|
+
}
|
|
5741
7573
|
},
|
|
5742
7574
|
{
|
|
5743
7575
|
"name": "yielding_bank_mint",
|
|
@@ -5745,7 +7577,9 @@ var IDL = {
|
|
|
5745
7577
|
},
|
|
5746
7578
|
{
|
|
5747
7579
|
"name": "yielding_bank_tranche",
|
|
5748
|
-
"
|
|
7580
|
+
"docs": [
|
|
7581
|
+
"state so an active senior-price regime cannot be hidden by omission."
|
|
7582
|
+
],
|
|
5749
7583
|
"pda": {
|
|
5750
7584
|
"seeds": [
|
|
5751
7585
|
{
|
|
@@ -5860,7 +7694,8 @@ var IDL = {
|
|
|
5860
7694
|
"writable": true
|
|
5861
7695
|
},
|
|
5862
7696
|
{
|
|
5863
|
-
"name": "destination_vault_oracle"
|
|
7697
|
+
"name": "destination_vault_oracle",
|
|
7698
|
+
"writable": true
|
|
5864
7699
|
},
|
|
5865
7700
|
{
|
|
5866
7701
|
"name": "destination_vault_asset_ata",
|
|
@@ -5921,12 +7756,43 @@ var IDL = {
|
|
|
5921
7756
|
},
|
|
5922
7757
|
{
|
|
5923
7758
|
"name": "vault_tranche_state",
|
|
7759
|
+
"docs": [
|
|
7760
|
+
"be initialized and consistent with destination.tranching_enabled."
|
|
7761
|
+
],
|
|
5924
7762
|
"writable": true,
|
|
5925
|
-
"
|
|
7763
|
+
"pda": {
|
|
7764
|
+
"seeds": [
|
|
7765
|
+
{
|
|
7766
|
+
"kind": "const",
|
|
7767
|
+
"value": [
|
|
7768
|
+
118,
|
|
7769
|
+
97,
|
|
7770
|
+
117,
|
|
7771
|
+
108,
|
|
7772
|
+
116,
|
|
7773
|
+
95,
|
|
7774
|
+
116,
|
|
7775
|
+
114,
|
|
7776
|
+
97,
|
|
7777
|
+
110,
|
|
7778
|
+
99,
|
|
7779
|
+
104,
|
|
7780
|
+
101
|
|
7781
|
+
]
|
|
7782
|
+
},
|
|
7783
|
+
{
|
|
7784
|
+
"kind": "account",
|
|
7785
|
+
"path": "destination_vault"
|
|
7786
|
+
}
|
|
7787
|
+
]
|
|
7788
|
+
}
|
|
5926
7789
|
},
|
|
5927
7790
|
{
|
|
5928
7791
|
"name": "yielding_token_program"
|
|
5929
7792
|
},
|
|
7793
|
+
{
|
|
7794
|
+
"name": "idle_bank_mint_token_program"
|
|
7795
|
+
},
|
|
5930
7796
|
{
|
|
5931
7797
|
"name": "bank_mint_token_program"
|
|
5932
7798
|
},
|
|
@@ -6132,134 +7998,18 @@ var IDL = {
|
|
|
6132
7998
|
"name": "destination_vault_asset_ata",
|
|
6133
7999
|
"writable": true,
|
|
6134
8000
|
"pda": {
|
|
6135
|
-
"seeds": [
|
|
6136
|
-
{
|
|
6137
|
-
"kind": "account",
|
|
6138
|
-
"path": "destination_vault"
|
|
6139
|
-
},
|
|
6140
|
-
{
|
|
6141
|
-
"kind": "account",
|
|
6142
|
-
"path": "yielding_token_program"
|
|
6143
|
-
},
|
|
6144
|
-
{
|
|
6145
|
-
"kind": "account",
|
|
6146
|
-
"path": "yielding_mint"
|
|
6147
|
-
}
|
|
6148
|
-
],
|
|
6149
|
-
"program": {
|
|
6150
|
-
"kind": "const",
|
|
6151
|
-
"value": [
|
|
6152
|
-
140,
|
|
6153
|
-
151,
|
|
6154
|
-
37,
|
|
6155
|
-
143,
|
|
6156
|
-
78,
|
|
6157
|
-
36,
|
|
6158
|
-
137,
|
|
6159
|
-
241,
|
|
6160
|
-
187,
|
|
6161
|
-
61,
|
|
6162
|
-
16,
|
|
6163
|
-
41,
|
|
6164
|
-
20,
|
|
6165
|
-
142,
|
|
6166
|
-
13,
|
|
6167
|
-
131,
|
|
6168
|
-
11,
|
|
6169
|
-
90,
|
|
6170
|
-
19,
|
|
6171
|
-
153,
|
|
6172
|
-
218,
|
|
6173
|
-
255,
|
|
6174
|
-
16,
|
|
6175
|
-
132,
|
|
6176
|
-
4,
|
|
6177
|
-
142,
|
|
6178
|
-
123,
|
|
6179
|
-
216,
|
|
6180
|
-
219,
|
|
6181
|
-
233,
|
|
6182
|
-
248,
|
|
6183
|
-
89
|
|
6184
|
-
]
|
|
6185
|
-
}
|
|
6186
|
-
}
|
|
6187
|
-
},
|
|
6188
|
-
{
|
|
6189
|
-
"name": "tranche_state",
|
|
6190
|
-
"writable": true,
|
|
6191
|
-
"optional": true,
|
|
6192
|
-
"pda": {
|
|
6193
|
-
"seeds": [
|
|
6194
|
-
{
|
|
6195
|
-
"kind": "const",
|
|
6196
|
-
"value": [
|
|
6197
|
-
84,
|
|
6198
|
-
82,
|
|
6199
|
-
65,
|
|
6200
|
-
78,
|
|
6201
|
-
67,
|
|
6202
|
-
72,
|
|
6203
|
-
69
|
|
6204
|
-
]
|
|
6205
|
-
},
|
|
6206
|
-
{
|
|
6207
|
-
"kind": "account",
|
|
6208
|
-
"path": "bank_state"
|
|
6209
|
-
}
|
|
6210
|
-
]
|
|
6211
|
-
}
|
|
6212
|
-
},
|
|
6213
|
-
{
|
|
6214
|
-
"name": "junior_escrow_ata",
|
|
6215
|
-
"writable": true,
|
|
6216
|
-
"optional": true,
|
|
6217
|
-
"pda": {
|
|
6218
|
-
"seeds": [
|
|
6219
|
-
{
|
|
6220
|
-
"kind": "account",
|
|
6221
|
-
"path": "tranche_state"
|
|
6222
|
-
},
|
|
6223
|
-
{
|
|
6224
|
-
"kind": "const",
|
|
6225
|
-
"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,
|
|
6246
|
-
95,
|
|
6247
|
-
91,
|
|
6248
|
-
55,
|
|
6249
|
-
145,
|
|
6250
|
-
58,
|
|
6251
|
-
140,
|
|
6252
|
-
245,
|
|
6253
|
-
133,
|
|
6254
|
-
126,
|
|
6255
|
-
255,
|
|
6256
|
-
0,
|
|
6257
|
-
169
|
|
6258
|
-
]
|
|
8001
|
+
"seeds": [
|
|
8002
|
+
{
|
|
8003
|
+
"kind": "account",
|
|
8004
|
+
"path": "destination_vault"
|
|
6259
8005
|
},
|
|
6260
8006
|
{
|
|
6261
8007
|
"kind": "account",
|
|
6262
|
-
"path": "
|
|
8008
|
+
"path": "yielding_token_program"
|
|
8009
|
+
},
|
|
8010
|
+
{
|
|
8011
|
+
"kind": "account",
|
|
8012
|
+
"path": "yielding_mint"
|
|
6263
8013
|
}
|
|
6264
8014
|
],
|
|
6265
8015
|
"program": {
|
|
@@ -6301,17 +8051,90 @@ var IDL = {
|
|
|
6301
8051
|
}
|
|
6302
8052
|
}
|
|
6303
8053
|
},
|
|
8054
|
+
{
|
|
8055
|
+
"name": "tranche_state",
|
|
8056
|
+
"docs": [
|
|
8057
|
+
"initialized TrancheState from an empty, uninitialized PDA."
|
|
8058
|
+
],
|
|
8059
|
+
"writable": true,
|
|
8060
|
+
"pda": {
|
|
8061
|
+
"seeds": [
|
|
8062
|
+
{
|
|
8063
|
+
"kind": "const",
|
|
8064
|
+
"value": [
|
|
8065
|
+
84,
|
|
8066
|
+
82,
|
|
8067
|
+
65,
|
|
8068
|
+
78,
|
|
8069
|
+
67,
|
|
8070
|
+
72,
|
|
8071
|
+
69
|
|
8072
|
+
]
|
|
8073
|
+
},
|
|
8074
|
+
{
|
|
8075
|
+
"kind": "account",
|
|
8076
|
+
"path": "bank_state"
|
|
8077
|
+
}
|
|
8078
|
+
]
|
|
8079
|
+
}
|
|
8080
|
+
},
|
|
8081
|
+
{
|
|
8082
|
+
"name": "junior_escrow_ata",
|
|
8083
|
+
"docs": [
|
|
8084
|
+
"authority, and balance are validated before any migration mutation."
|
|
8085
|
+
],
|
|
8086
|
+
"writable": true
|
|
8087
|
+
},
|
|
6304
8088
|
{
|
|
6305
8089
|
"name": "vault_tranche_state",
|
|
8090
|
+
"docs": [
|
|
8091
|
+
"initialized/uninitialized state against destination.tranching_enabled."
|
|
8092
|
+
],
|
|
6306
8093
|
"writable": true,
|
|
8094
|
+
"pda": {
|
|
8095
|
+
"seeds": [
|
|
8096
|
+
{
|
|
8097
|
+
"kind": "const",
|
|
8098
|
+
"value": [
|
|
8099
|
+
118,
|
|
8100
|
+
97,
|
|
8101
|
+
117,
|
|
8102
|
+
108,
|
|
8103
|
+
116,
|
|
8104
|
+
95,
|
|
8105
|
+
116,
|
|
8106
|
+
114,
|
|
8107
|
+
97,
|
|
8108
|
+
110,
|
|
8109
|
+
99,
|
|
8110
|
+
104,
|
|
8111
|
+
101
|
|
8112
|
+
]
|
|
8113
|
+
},
|
|
8114
|
+
{
|
|
8115
|
+
"kind": "account",
|
|
8116
|
+
"path": "destination_vault"
|
|
8117
|
+
}
|
|
8118
|
+
]
|
|
8119
|
+
}
|
|
8120
|
+
},
|
|
8121
|
+
{
|
|
8122
|
+
"name": "junior_share_mint",
|
|
8123
|
+
"optional": true
|
|
8124
|
+
},
|
|
8125
|
+
{
|
|
8126
|
+
"name": "locked_junior_shares_ata",
|
|
8127
|
+
"docs": [
|
|
8128
|
+
"withdrawals. Required and fully validated when the source tranche exists;",
|
|
8129
|
+
"absent for a bank that never initialized a legacy tranche."
|
|
8130
|
+
],
|
|
6307
8131
|
"optional": true
|
|
6308
8132
|
},
|
|
6309
8133
|
{
|
|
6310
8134
|
"name": "yielding_token_program"
|
|
6311
8135
|
},
|
|
6312
8136
|
{
|
|
6313
|
-
"name": "bank_token_program"
|
|
6314
|
-
"optional": true
|
|
8137
|
+
"name": "bank_token_program"
|
|
6315
8138
|
},
|
|
6316
8139
|
{
|
|
6317
8140
|
"name": "associated_token_program",
|
|
@@ -7257,16 +9080,216 @@ var IDL = {
|
|
|
7257
9080
|
}
|
|
7258
9081
|
},
|
|
7259
9082
|
{
|
|
7260
|
-
"name": "user_junior_mint_ata",
|
|
7261
|
-
"docs": [
|
|
7262
|
-
"User's ATA for receiving junior share tokens"
|
|
7263
|
-
],
|
|
9083
|
+
"name": "user_junior_mint_ata",
|
|
9084
|
+
"docs": [
|
|
9085
|
+
"User's ATA for receiving junior share tokens"
|
|
9086
|
+
],
|
|
9087
|
+
"writable": true,
|
|
9088
|
+
"pda": {
|
|
9089
|
+
"seeds": [
|
|
9090
|
+
{
|
|
9091
|
+
"kind": "account",
|
|
9092
|
+
"path": "user"
|
|
9093
|
+
},
|
|
9094
|
+
{
|
|
9095
|
+
"kind": "account",
|
|
9096
|
+
"path": "token_program"
|
|
9097
|
+
},
|
|
9098
|
+
{
|
|
9099
|
+
"kind": "account",
|
|
9100
|
+
"path": "junior_mint"
|
|
9101
|
+
}
|
|
9102
|
+
],
|
|
9103
|
+
"program": {
|
|
9104
|
+
"kind": "const",
|
|
9105
|
+
"value": [
|
|
9106
|
+
140,
|
|
9107
|
+
151,
|
|
9108
|
+
37,
|
|
9109
|
+
143,
|
|
9110
|
+
78,
|
|
9111
|
+
36,
|
|
9112
|
+
137,
|
|
9113
|
+
241,
|
|
9114
|
+
187,
|
|
9115
|
+
61,
|
|
9116
|
+
16,
|
|
9117
|
+
41,
|
|
9118
|
+
20,
|
|
9119
|
+
142,
|
|
9120
|
+
13,
|
|
9121
|
+
131,
|
|
9122
|
+
11,
|
|
9123
|
+
90,
|
|
9124
|
+
19,
|
|
9125
|
+
153,
|
|
9126
|
+
218,
|
|
9127
|
+
255,
|
|
9128
|
+
16,
|
|
9129
|
+
132,
|
|
9130
|
+
4,
|
|
9131
|
+
142,
|
|
9132
|
+
123,
|
|
9133
|
+
216,
|
|
9134
|
+
219,
|
|
9135
|
+
233,
|
|
9136
|
+
248,
|
|
9137
|
+
89
|
|
9138
|
+
]
|
|
9139
|
+
}
|
|
9140
|
+
}
|
|
9141
|
+
},
|
|
9142
|
+
{
|
|
9143
|
+
"name": "junior_escrow_ata",
|
|
9144
|
+
"docs": [
|
|
9145
|
+
"The escrow ATA for staked bank mint tokens, owned by the tranche state PDA"
|
|
9146
|
+
],
|
|
9147
|
+
"writable": true,
|
|
9148
|
+
"pda": {
|
|
9149
|
+
"seeds": [
|
|
9150
|
+
{
|
|
9151
|
+
"kind": "account",
|
|
9152
|
+
"path": "tranche_state"
|
|
9153
|
+
},
|
|
9154
|
+
{
|
|
9155
|
+
"kind": "account",
|
|
9156
|
+
"path": "token_program"
|
|
9157
|
+
},
|
|
9158
|
+
{
|
|
9159
|
+
"kind": "account",
|
|
9160
|
+
"path": "bank_mint"
|
|
9161
|
+
}
|
|
9162
|
+
],
|
|
9163
|
+
"program": {
|
|
9164
|
+
"kind": "const",
|
|
9165
|
+
"value": [
|
|
9166
|
+
140,
|
|
9167
|
+
151,
|
|
9168
|
+
37,
|
|
9169
|
+
143,
|
|
9170
|
+
78,
|
|
9171
|
+
36,
|
|
9172
|
+
137,
|
|
9173
|
+
241,
|
|
9174
|
+
187,
|
|
9175
|
+
61,
|
|
9176
|
+
16,
|
|
9177
|
+
41,
|
|
9178
|
+
20,
|
|
9179
|
+
142,
|
|
9180
|
+
13,
|
|
9181
|
+
131,
|
|
9182
|
+
11,
|
|
9183
|
+
90,
|
|
9184
|
+
19,
|
|
9185
|
+
153,
|
|
9186
|
+
218,
|
|
9187
|
+
255,
|
|
9188
|
+
16,
|
|
9189
|
+
132,
|
|
9190
|
+
4,
|
|
9191
|
+
142,
|
|
9192
|
+
123,
|
|
9193
|
+
216,
|
|
9194
|
+
219,
|
|
9195
|
+
233,
|
|
9196
|
+
248,
|
|
9197
|
+
89
|
|
9198
|
+
]
|
|
9199
|
+
}
|
|
9200
|
+
}
|
|
9201
|
+
},
|
|
9202
|
+
{
|
|
9203
|
+
"name": "system_program",
|
|
9204
|
+
"address": "11111111111111111111111111111111"
|
|
9205
|
+
},
|
|
9206
|
+
{
|
|
9207
|
+
"name": "token_program"
|
|
9208
|
+
},
|
|
9209
|
+
{
|
|
9210
|
+
"name": "associated_token_program",
|
|
9211
|
+
"address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
|
|
9212
|
+
}
|
|
9213
|
+
],
|
|
9214
|
+
"args": [
|
|
9215
|
+
{
|
|
9216
|
+
"name": "amount",
|
|
9217
|
+
"type": "u64"
|
|
9218
|
+
}
|
|
9219
|
+
]
|
|
9220
|
+
},
|
|
9221
|
+
{
|
|
9222
|
+
"name": "sweep_legacy_junior_escrow_excess",
|
|
9223
|
+
"discriminator": [
|
|
9224
|
+
66,
|
|
9225
|
+
219,
|
|
9226
|
+
143,
|
|
9227
|
+
146,
|
|
9228
|
+
126,
|
|
9229
|
+
14,
|
|
9230
|
+
138,
|
|
9231
|
+
156
|
|
9232
|
+
],
|
|
9233
|
+
"accounts": [
|
|
9234
|
+
{
|
|
9235
|
+
"name": "manager",
|
|
9236
|
+
"writable": true,
|
|
9237
|
+
"signer": true
|
|
9238
|
+
},
|
|
9239
|
+
{
|
|
9240
|
+
"name": "bank_state",
|
|
9241
|
+
"pda": {
|
|
9242
|
+
"seeds": [
|
|
9243
|
+
{
|
|
9244
|
+
"kind": "const",
|
|
9245
|
+
"value": [
|
|
9246
|
+
66,
|
|
9247
|
+
65,
|
|
9248
|
+
78,
|
|
9249
|
+
75
|
|
9250
|
+
]
|
|
9251
|
+
},
|
|
9252
|
+
{
|
|
9253
|
+
"kind": "account",
|
|
9254
|
+
"path": "bank_state"
|
|
9255
|
+
}
|
|
9256
|
+
]
|
|
9257
|
+
}
|
|
9258
|
+
},
|
|
9259
|
+
{
|
|
9260
|
+
"name": "tranche_state",
|
|
9261
|
+
"pda": {
|
|
9262
|
+
"seeds": [
|
|
9263
|
+
{
|
|
9264
|
+
"kind": "const",
|
|
9265
|
+
"value": [
|
|
9266
|
+
84,
|
|
9267
|
+
82,
|
|
9268
|
+
65,
|
|
9269
|
+
78,
|
|
9270
|
+
67,
|
|
9271
|
+
72,
|
|
9272
|
+
69
|
|
9273
|
+
]
|
|
9274
|
+
},
|
|
9275
|
+
{
|
|
9276
|
+
"kind": "account",
|
|
9277
|
+
"path": "bank_state"
|
|
9278
|
+
}
|
|
9279
|
+
]
|
|
9280
|
+
}
|
|
9281
|
+
},
|
|
9282
|
+
{
|
|
9283
|
+
"name": "bank_mint"
|
|
9284
|
+
},
|
|
9285
|
+
{
|
|
9286
|
+
"name": "junior_escrow_ata",
|
|
7264
9287
|
"writable": true,
|
|
7265
9288
|
"pda": {
|
|
7266
9289
|
"seeds": [
|
|
7267
9290
|
{
|
|
7268
9291
|
"kind": "account",
|
|
7269
|
-
"path": "
|
|
9292
|
+
"path": "tranche_state"
|
|
7270
9293
|
},
|
|
7271
9294
|
{
|
|
7272
9295
|
"kind": "account",
|
|
@@ -7274,7 +9297,7 @@ var IDL = {
|
|
|
7274
9297
|
},
|
|
7275
9298
|
{
|
|
7276
9299
|
"kind": "account",
|
|
7277
|
-
"path": "
|
|
9300
|
+
"path": "bank_mint"
|
|
7278
9301
|
}
|
|
7279
9302
|
],
|
|
7280
9303
|
"program": {
|
|
@@ -7317,16 +9340,13 @@ var IDL = {
|
|
|
7317
9340
|
}
|
|
7318
9341
|
},
|
|
7319
9342
|
{
|
|
7320
|
-
"name": "
|
|
7321
|
-
"docs": [
|
|
7322
|
-
"The escrow ATA for staked bank mint tokens, owned by the tranche state PDA"
|
|
7323
|
-
],
|
|
9343
|
+
"name": "destination_ata",
|
|
7324
9344
|
"writable": true,
|
|
7325
9345
|
"pda": {
|
|
7326
9346
|
"seeds": [
|
|
7327
9347
|
{
|
|
7328
9348
|
"kind": "account",
|
|
7329
|
-
"path": "
|
|
9349
|
+
"path": "manager"
|
|
7330
9350
|
},
|
|
7331
9351
|
{
|
|
7332
9352
|
"kind": "account",
|
|
@@ -7376,24 +9396,19 @@ var IDL = {
|
|
|
7376
9396
|
}
|
|
7377
9397
|
}
|
|
7378
9398
|
},
|
|
7379
|
-
{
|
|
7380
|
-
"name": "system_program",
|
|
7381
|
-
"address": "11111111111111111111111111111111"
|
|
7382
|
-
},
|
|
7383
9399
|
{
|
|
7384
9400
|
"name": "token_program"
|
|
7385
9401
|
},
|
|
7386
9402
|
{
|
|
7387
9403
|
"name": "associated_token_program",
|
|
7388
9404
|
"address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
|
|
7389
|
-
}
|
|
7390
|
-
],
|
|
7391
|
-
"args": [
|
|
9405
|
+
},
|
|
7392
9406
|
{
|
|
7393
|
-
"name": "
|
|
7394
|
-
"
|
|
9407
|
+
"name": "system_program",
|
|
9408
|
+
"address": "11111111111111111111111111111111"
|
|
7395
9409
|
}
|
|
7396
|
-
]
|
|
9410
|
+
],
|
|
9411
|
+
"args": []
|
|
7397
9412
|
},
|
|
7398
9413
|
{
|
|
7399
9414
|
"name": "team_withdraws_fees",
|
|
@@ -7701,8 +9716,10 @@ var IDL = {
|
|
|
7701
9716
|
},
|
|
7702
9717
|
{
|
|
7703
9718
|
"name": "tranche_state",
|
|
7704
|
-
"
|
|
7705
|
-
|
|
9719
|
+
"docs": [
|
|
9720
|
+
"for a source bank that never enabled tranching; the handler verifies its",
|
|
9721
|
+
"owner and deserializes it when it exists."
|
|
9722
|
+
],
|
|
7706
9723
|
"pda": {
|
|
7707
9724
|
"seeds": [
|
|
7708
9725
|
{
|
|
@@ -7724,6 +9741,20 @@ var IDL = {
|
|
|
7724
9741
|
]
|
|
7725
9742
|
}
|
|
7726
9743
|
},
|
|
9744
|
+
{
|
|
9745
|
+
"name": "junior_escrow_ata",
|
|
9746
|
+
"docs": [
|
|
9747
|
+
"from the source bank mint and token program, then validates and requires an",
|
|
9748
|
+
"empty token account whenever the source tranche exists."
|
|
9749
|
+
]
|
|
9750
|
+
},
|
|
9751
|
+
{
|
|
9752
|
+
"name": "locked_junior_shares_ata",
|
|
9753
|
+
"docs": [
|
|
9754
|
+
"when transferring the junior receipt mint authority."
|
|
9755
|
+
],
|
|
9756
|
+
"optional": true
|
|
9757
|
+
},
|
|
7727
9758
|
{
|
|
7728
9759
|
"name": "vault_tranche_state",
|
|
7729
9760
|
"writable": true,
|
|
@@ -7731,6 +9762,13 @@ var IDL = {
|
|
|
7731
9762
|
},
|
|
7732
9763
|
{
|
|
7733
9764
|
"name": "token_program"
|
|
9765
|
+
},
|
|
9766
|
+
{
|
|
9767
|
+
"name": "bank_token_program",
|
|
9768
|
+
"docs": [
|
|
9769
|
+
"Token program that owns the legacy bank mint and junior escrow. This can",
|
|
9770
|
+
"differ from `token_program` when transferring the junior receipt mint."
|
|
9771
|
+
]
|
|
7734
9772
|
}
|
|
7735
9773
|
],
|
|
7736
9774
|
"args": [
|
|
@@ -8410,6 +10448,22 @@ var IDL = {
|
|
|
8410
10448
|
{
|
|
8411
10449
|
"name": "system_program",
|
|
8412
10450
|
"address": "11111111111111111111111111111111"
|
|
10451
|
+
},
|
|
10452
|
+
{
|
|
10453
|
+
"name": "vault_oracle",
|
|
10454
|
+
"docs": [
|
|
10455
|
+
"Required when enabling tranching organically (`for_migration == false`)",
|
|
10456
|
+
"on a vault that still has main shareholders accruing fixed APY: that APY",
|
|
10457
|
+
"is only folded into `mint_share_price` while tranching is off, so a fresh",
|
|
10458
|
+
"NAV must have been settled just before the switch or the accrued APY owed",
|
|
10459
|
+
"to those shareholders is forfeited. Not needed on the migration path,",
|
|
10460
|
+
"whose accounting is reconstructed wholesale from the legacy state.",
|
|
10461
|
+
"",
|
|
10462
|
+
"Kept LAST (a trailing optional account) so legacy clients that predate it",
|
|
10463
|
+
"\u2014 e.g. the migration path building against the frozen bankineco IDL \u2014",
|
|
10464
|
+
"simply omit it and the program reads it as `None`."
|
|
10465
|
+
],
|
|
10466
|
+
"optional": true
|
|
8413
10467
|
}
|
|
8414
10468
|
],
|
|
8415
10469
|
"args": [
|
|
@@ -8584,6 +10638,14 @@ var IDL = {
|
|
|
8584
10638
|
{
|
|
8585
10639
|
"name": "system_program",
|
|
8586
10640
|
"address": "11111111111111111111111111111111"
|
|
10641
|
+
},
|
|
10642
|
+
{
|
|
10643
|
+
"name": "source_vault_tranche_state",
|
|
10644
|
+
"optional": true
|
|
10645
|
+
},
|
|
10646
|
+
{
|
|
10647
|
+
"name": "destination_vault_tranche_state",
|
|
10648
|
+
"optional": true
|
|
8587
10649
|
}
|
|
8588
10650
|
],
|
|
8589
10651
|
"args": [
|
|
@@ -8967,239 +11029,224 @@ var IDL = {
|
|
|
8967
11029
|
],
|
|
8968
11030
|
"errors": [
|
|
8969
11031
|
{
|
|
8970
|
-
"code":
|
|
8971
|
-
"name": "
|
|
8972
|
-
"msg": "
|
|
8973
|
-
},
|
|
8974
|
-
{
|
|
8975
|
-
"code": 14002,
|
|
8976
|
-
"name": "InvalidBankMint",
|
|
8977
|
-
"msg": "Invalid mint"
|
|
8978
|
-
},
|
|
8979
|
-
{
|
|
8980
|
-
"code": 14003,
|
|
8981
|
-
"name": "AccountingIssue",
|
|
8982
|
-
"msg": "Accounting issue"
|
|
11032
|
+
"code": 6e3,
|
|
11033
|
+
"name": "MintSupplyNonZero",
|
|
11034
|
+
"msg": "Supplied share mint already has non-zero supply"
|
|
8983
11035
|
},
|
|
8984
11036
|
{
|
|
8985
|
-
"code":
|
|
8986
|
-
"name": "
|
|
8987
|
-
"msg": "
|
|
11037
|
+
"code": 6001,
|
|
11038
|
+
"name": "InvalidAssetMint",
|
|
11039
|
+
"msg": "Supplied mint is not accepted by this vault"
|
|
8988
11040
|
},
|
|
8989
11041
|
{
|
|
8990
|
-
"code":
|
|
8991
|
-
"name": "
|
|
8992
|
-
"msg": "
|
|
11042
|
+
"code": 6002,
|
|
11043
|
+
"name": "ZeroDepositAmount",
|
|
11044
|
+
"msg": "Deposit amount must be greater than zero"
|
|
8993
11045
|
},
|
|
8994
11046
|
{
|
|
8995
|
-
"code":
|
|
8996
|
-
"name": "
|
|
8997
|
-
"msg": "
|
|
11047
|
+
"code": 6003,
|
|
11048
|
+
"name": "ExceedsTvlLimit",
|
|
11049
|
+
"msg": "Deposit would exceed the vault's TVL limit"
|
|
8998
11050
|
},
|
|
8999
11051
|
{
|
|
9000
|
-
"code":
|
|
9001
|
-
"name": "
|
|
9002
|
-
"msg": "
|
|
11052
|
+
"code": 6004,
|
|
11053
|
+
"name": "ZeroBurnAmount",
|
|
11054
|
+
"msg": "Burn amount must be greater than zero"
|
|
9003
11055
|
},
|
|
9004
11056
|
{
|
|
9005
|
-
"code":
|
|
9006
|
-
"name": "
|
|
9007
|
-
"msg": "
|
|
11057
|
+
"code": 6005,
|
|
11058
|
+
"name": "ZeroAssetAmount",
|
|
11059
|
+
"msg": "Asset amount must be greater than zero"
|
|
9008
11060
|
},
|
|
9009
11061
|
{
|
|
9010
|
-
"code":
|
|
9011
|
-
"name": "
|
|
9012
|
-
"msg": "
|
|
11062
|
+
"code": 6006,
|
|
11063
|
+
"name": "InsufficientVaultLiquidity",
|
|
11064
|
+
"msg": "Insufficient vault liquidity to satisfy withdrawal"
|
|
9013
11065
|
},
|
|
9014
11066
|
{
|
|
9015
|
-
"code":
|
|
9016
|
-
"name": "
|
|
9017
|
-
"msg": "
|
|
11067
|
+
"code": 6007,
|
|
11068
|
+
"name": "MintAuthorityNotCurator",
|
|
11069
|
+
"msg": "Mint authority is not the curator"
|
|
9018
11070
|
},
|
|
9019
11071
|
{
|
|
9020
|
-
"code":
|
|
9021
|
-
"name": "
|
|
9022
|
-
"msg": "
|
|
11072
|
+
"code": 6008,
|
|
11073
|
+
"name": "ZeroTotalSupply",
|
|
11074
|
+
"msg": "Vault total supply is zero"
|
|
9023
11075
|
},
|
|
9024
11076
|
{
|
|
9025
|
-
"code":
|
|
11077
|
+
"code": 6009,
|
|
9026
11078
|
"name": "StaleOracle",
|
|
9027
|
-
"msg": "
|
|
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"
|
|
11079
|
+
"msg": "Vault oracle is stale"
|
|
9038
11080
|
},
|
|
9039
11081
|
{
|
|
9040
|
-
"code":
|
|
9041
|
-
"name": "
|
|
9042
|
-
"msg": "
|
|
11082
|
+
"code": 6010,
|
|
11083
|
+
"name": "InvalidOracleUpdate",
|
|
11084
|
+
"msg": "Invalid oracle update"
|
|
9043
11085
|
},
|
|
9044
11086
|
{
|
|
9045
|
-
"code":
|
|
9046
|
-
"name": "
|
|
9047
|
-
"msg": "
|
|
11087
|
+
"code": 6011,
|
|
11088
|
+
"name": "InvalidInitialMintSharePrice",
|
|
11089
|
+
"msg": "Initial mint share price must be greater than zero"
|
|
9048
11090
|
},
|
|
9049
11091
|
{
|
|
9050
|
-
"code":
|
|
9051
|
-
"name": "
|
|
9052
|
-
"msg": "
|
|
11092
|
+
"code": 6012,
|
|
11093
|
+
"name": "MaxApyExceeded",
|
|
11094
|
+
"msg": "Oracle NAV update exceeds the vault's maximum acceptable APY"
|
|
9053
11095
|
},
|
|
9054
11096
|
{
|
|
9055
|
-
"code":
|
|
9056
|
-
"name": "
|
|
9057
|
-
"msg": "
|
|
11097
|
+
"code": 6013,
|
|
11098
|
+
"name": "InvalidApyConfig",
|
|
11099
|
+
"msg": "Invalid APY configuration"
|
|
9058
11100
|
},
|
|
9059
11101
|
{
|
|
9060
|
-
"code":
|
|
9061
|
-
"name": "
|
|
9062
|
-
"msg": "
|
|
11102
|
+
"code": 6014,
|
|
11103
|
+
"name": "InvalidFeeConfig",
|
|
11104
|
+
"msg": "Invalid fee configuration"
|
|
9063
11105
|
},
|
|
9064
11106
|
{
|
|
9065
|
-
"code":
|
|
9066
|
-
"name": "
|
|
9067
|
-
"msg": "
|
|
11107
|
+
"code": 6015,
|
|
11108
|
+
"name": "VaultHasLiveAssets",
|
|
11109
|
+
"msg": "Vault has live supply, TVL, or holdings"
|
|
9068
11110
|
},
|
|
9069
11111
|
{
|
|
9070
|
-
"code":
|
|
9071
|
-
"name": "
|
|
9072
|
-
"msg": "
|
|
11112
|
+
"code": 6016,
|
|
11113
|
+
"name": "DepositMintsZeroShares",
|
|
11114
|
+
"msg": "Deposit would mint zero shares"
|
|
9073
11115
|
},
|
|
9074
11116
|
{
|
|
9075
|
-
"code":
|
|
9076
|
-
"name": "
|
|
9077
|
-
"msg": "
|
|
11117
|
+
"code": 6017,
|
|
11118
|
+
"name": "InsufficientAccruedApyBalance",
|
|
11119
|
+
"msg": "Insufficient accrued APY balance"
|
|
9078
11120
|
},
|
|
9079
11121
|
{
|
|
9080
|
-
"code":
|
|
9081
|
-
"name": "
|
|
9082
|
-
"msg": "Invalid
|
|
11122
|
+
"code": 6018,
|
|
11123
|
+
"name": "InvalidRole",
|
|
11124
|
+
"msg": "Invalid role configuration"
|
|
9083
11125
|
},
|
|
9084
11126
|
{
|
|
9085
|
-
"code":
|
|
9086
|
-
"name": "
|
|
9087
|
-
"msg": "Invalid
|
|
11127
|
+
"code": 6019,
|
|
11128
|
+
"name": "InvalidProtocolInteraction",
|
|
11129
|
+
"msg": "Invalid protocol interaction CPI"
|
|
9088
11130
|
},
|
|
9089
11131
|
{
|
|
9090
|
-
"code":
|
|
9091
|
-
"name": "
|
|
9092
|
-
"msg": "
|
|
11132
|
+
"code": 6020,
|
|
11133
|
+
"name": "_Reserved7020",
|
|
11134
|
+
"msg": "Reserved"
|
|
9093
11135
|
},
|
|
9094
11136
|
{
|
|
9095
|
-
"code":
|
|
9096
|
-
"name": "
|
|
9097
|
-
"msg": "Invalid
|
|
11137
|
+
"code": 6021,
|
|
11138
|
+
"name": "InvalidExternalLiquidity",
|
|
11139
|
+
"msg": "Invalid external liquidity configuration"
|
|
9098
11140
|
},
|
|
9099
11141
|
{
|
|
9100
|
-
"code":
|
|
9101
|
-
"name": "
|
|
9102
|
-
"msg": "
|
|
11142
|
+
"code": 6022,
|
|
11143
|
+
"name": "SwapBalanceUnchanged",
|
|
11144
|
+
"msg": "Swap did not change both source and destination balances"
|
|
9103
11145
|
},
|
|
9104
11146
|
{
|
|
9105
|
-
"code":
|
|
9106
|
-
"name": "
|
|
9107
|
-
"msg": "
|
|
11147
|
+
"code": 6023,
|
|
11148
|
+
"name": "ProtocolBalanceUnchanged",
|
|
11149
|
+
"msg": "Protocol interaction did not change the affected token balance"
|
|
9108
11150
|
},
|
|
9109
11151
|
{
|
|
9110
|
-
"code":
|
|
9111
|
-
"name": "
|
|
9112
|
-
"msg": "
|
|
11152
|
+
"code": 6024,
|
|
11153
|
+
"name": "ExcessiveSwapSlippage",
|
|
11154
|
+
"msg": "Swap TVL loss exceeds the allowed slippage"
|
|
9113
11155
|
},
|
|
9114
11156
|
{
|
|
9115
|
-
"code":
|
|
9116
|
-
"name": "
|
|
9117
|
-
"msg": "
|
|
11157
|
+
"code": 6025,
|
|
11158
|
+
"name": "TranchingNotEnabled",
|
|
11159
|
+
"msg": "Vault tranching is not enabled"
|
|
9118
11160
|
},
|
|
9119
11161
|
{
|
|
9120
|
-
"code":
|
|
9121
|
-
"name": "
|
|
9122
|
-
"msg": "
|
|
11162
|
+
"code": 6026,
|
|
11163
|
+
"name": "TranchingAlreadyEnabled",
|
|
11164
|
+
"msg": "Vault tranching is already enabled"
|
|
9123
11165
|
},
|
|
9124
11166
|
{
|
|
9125
|
-
"code":
|
|
9126
|
-
"name": "
|
|
9127
|
-
"msg": "
|
|
11167
|
+
"code": 6027,
|
|
11168
|
+
"name": "TrancheStateRequired",
|
|
11169
|
+
"msg": "Tranche state account is required"
|
|
9128
11170
|
},
|
|
9129
11171
|
{
|
|
9130
|
-
"code":
|
|
9131
|
-
"name": "
|
|
9132
|
-
"msg": "
|
|
11172
|
+
"code": 6028,
|
|
11173
|
+
"name": "InvalidTrancheConfig",
|
|
11174
|
+
"msg": "Invalid tranche configuration"
|
|
9133
11175
|
},
|
|
9134
11176
|
{
|
|
9135
|
-
"code":
|
|
9136
|
-
"name": "
|
|
9137
|
-
"msg": "
|
|
11177
|
+
"code": 6029,
|
|
11178
|
+
"name": "InvalidTrancheMint",
|
|
11179
|
+
"msg": "Invalid tranche mint"
|
|
9138
11180
|
},
|
|
9139
11181
|
{
|
|
9140
|
-
"code":
|
|
9141
|
-
"name": "
|
|
9142
|
-
"msg": "
|
|
11182
|
+
"code": 6030,
|
|
11183
|
+
"name": "LossesDisabled",
|
|
11184
|
+
"msg": "Vault losses are not enabled"
|
|
9143
11185
|
},
|
|
9144
11186
|
{
|
|
9145
|
-
"code":
|
|
11187
|
+
"code": 6031,
|
|
9146
11188
|
"name": "WithdrawalQueueNotExpired",
|
|
9147
|
-
"msg": "Withdrawal queue
|
|
11189
|
+
"msg": "Withdrawal queue is not yet expired"
|
|
9148
11190
|
},
|
|
9149
11191
|
{
|
|
9150
|
-
"code":
|
|
11192
|
+
"code": 6032,
|
|
9151
11193
|
"name": "InvalidWithdrawalQueue",
|
|
9152
|
-
"msg": "
|
|
11194
|
+
"msg": "Invalid withdrawal queue"
|
|
11195
|
+
},
|
|
11196
|
+
{
|
|
11197
|
+
"code": 6033,
|
|
11198
|
+
"name": "AssetPriceNotSet",
|
|
11199
|
+
"msg": "Destination asset has no price set; a consensus oracle price is required before swapping"
|
|
9153
11200
|
},
|
|
9154
11201
|
{
|
|
9155
|
-
"code":
|
|
9156
|
-
"name": "
|
|
9157
|
-
"msg": "
|
|
11202
|
+
"code": 6034,
|
|
11203
|
+
"name": "AssetHoldingNotEmpty",
|
|
11204
|
+
"msg": "Asset holding still has a balance and cannot be removed"
|
|
9158
11205
|
},
|
|
9159
11206
|
{
|
|
9160
|
-
"code":
|
|
9161
|
-
"name": "
|
|
9162
|
-
"msg": "
|
|
11207
|
+
"code": 6035,
|
|
11208
|
+
"name": "CannotRemoveBaseHolding",
|
|
11209
|
+
"msg": "The base asset holding cannot be removed"
|
|
9163
11210
|
},
|
|
9164
11211
|
{
|
|
9165
|
-
"code":
|
|
9166
|
-
"name": "
|
|
9167
|
-
"msg": "
|
|
11212
|
+
"code": 6036,
|
|
11213
|
+
"name": "UnauthorizedPriceUpdater",
|
|
11214
|
+
"msg": "Caller is not authorized to trigger an asset price update"
|
|
9168
11215
|
},
|
|
9169
11216
|
{
|
|
9170
|
-
"code":
|
|
9171
|
-
"name": "
|
|
9172
|
-
"msg": "
|
|
11217
|
+
"code": 6037,
|
|
11218
|
+
"name": "InvalidStalenessConfig",
|
|
11219
|
+
"msg": "Invalid asset-price staleness threshold"
|
|
9173
11220
|
},
|
|
9174
11221
|
{
|
|
9175
|
-
"code":
|
|
9176
|
-
"name": "
|
|
9177
|
-
"msg": "
|
|
11222
|
+
"code": 6038,
|
|
11223
|
+
"name": "AssetRebalanceRateLimitExceeded",
|
|
11224
|
+
"msg": "Asset was rebalanced too recently"
|
|
9178
11225
|
},
|
|
9179
11226
|
{
|
|
9180
|
-
"code":
|
|
9181
|
-
"name": "
|
|
9182
|
-
"msg": "
|
|
11227
|
+
"code": 6039,
|
|
11228
|
+
"name": "InvalidShareTokenProgram",
|
|
11229
|
+
"msg": "Share token program does not match the vault/tranche mint configuration"
|
|
9183
11230
|
},
|
|
9184
11231
|
{
|
|
9185
|
-
"code":
|
|
9186
|
-
"name": "
|
|
9187
|
-
"msg": "
|
|
11232
|
+
"code": 6040,
|
|
11233
|
+
"name": "UnauthorizedVaultCreator",
|
|
11234
|
+
"msg": "Caller is not on the vault-creator whitelist"
|
|
9188
11235
|
},
|
|
9189
11236
|
{
|
|
9190
|
-
"code":
|
|
9191
|
-
"name": "
|
|
9192
|
-
"msg": "
|
|
11237
|
+
"code": 6041,
|
|
11238
|
+
"name": "InvalidShareMintDecimals",
|
|
11239
|
+
"msg": "Share mint decimals must match the deposit asset mint decimals"
|
|
9193
11240
|
},
|
|
9194
11241
|
{
|
|
9195
|
-
"code":
|
|
9196
|
-
"name": "
|
|
9197
|
-
"msg": "
|
|
11242
|
+
"code": 6042,
|
|
11243
|
+
"name": "InvalidFeeExemption",
|
|
11244
|
+
"msg": "Invalid fee-exemption PDA signer or seeds"
|
|
9198
11245
|
},
|
|
9199
11246
|
{
|
|
9200
|
-
"code":
|
|
9201
|
-
"name": "
|
|
9202
|
-
"msg": "
|
|
11247
|
+
"code": 6043,
|
|
11248
|
+
"name": "ExceedsJuniorDepositCap",
|
|
11249
|
+
"msg": "Deposit would exceed the junior tranche deposit cap"
|
|
9203
11250
|
}
|
|
9204
11251
|
],
|
|
9205
11252
|
"types": [
|
|
@@ -9208,7 +11255,7 @@ var IDL = {
|
|
|
9208
11255
|
"docs": [
|
|
9209
11256
|
"APY targets and deficit tracking.",
|
|
9210
11257
|
"",
|
|
9211
|
-
"Expected share price at time `t` is computed from the anchor:",
|
|
11258
|
+
"Expected share price at time `t` is computed from the durable anchor:",
|
|
9212
11259
|
"expected = anchor_share_price * (1 + fixed_apy_bps/10_000)^((t - anchor_ts)/YEAR)",
|
|
9213
11260
|
"",
|
|
9214
11261
|
"The anchor must be reset whenever any of the following change:",
|
|
@@ -9271,16 +11318,15 @@ var IDL = {
|
|
|
9271
11318
|
{
|
|
9272
11319
|
"name": "accrued_apy_balance",
|
|
9273
11320
|
"docs": [
|
|
9274
|
-
"
|
|
9275
|
-
"
|
|
9276
|
-
"
|
|
9277
|
-
"deficits.",
|
|
11321
|
+
"Current divergence between holdings-derived NAV and the fixed-APY target,",
|
|
11322
|
+
"in the same accounting unit as `VaultAccounting::tvl`: positive means",
|
|
11323
|
+
"holdings are above target; negative means they are below target.",
|
|
9278
11324
|
"",
|
|
9279
11325
|
"Used in two cases:",
|
|
9280
11326
|
"",
|
|
9281
11327
|
"1. APY tracking when `fixed_apy_bps` is set -- the",
|
|
9282
|
-
"
|
|
9283
|
-
"
|
|
11328
|
+
"difference between expected NAV and actual holdings-derived NAV is",
|
|
11329
|
+
"recorded here on each settlement.",
|
|
9284
11330
|
"2. NAV reconciliation regardless of APY settings -- when the oracle's",
|
|
9285
11331
|
"settled NAV diverges from the booked `VaultAccounting::tvl`, the",
|
|
9286
11332
|
"difference accrues here (oracle NAV above book = surplus; below =",
|
|
@@ -11344,11 +13390,10 @@ var IDL = {
|
|
|
11344
13390
|
}
|
|
11345
13391
|
},
|
|
11346
13392
|
{
|
|
11347
|
-
"name": "
|
|
13393
|
+
"name": "_padding_bool",
|
|
11348
13394
|
"docs": [
|
|
11349
|
-
"
|
|
11350
|
-
"
|
|
11351
|
-
"for that settlement (first-pricing legitimately moves NAV). Was padding."
|
|
13395
|
+
"Reserved padding (previously `apy_settle_skip`). Kept as a field to",
|
|
13396
|
+
"preserve the on-chain account layout for already-deployed vaults."
|
|
11352
13397
|
],
|
|
11353
13398
|
"type": {
|
|
11354
13399
|
"defined": {
|
|
@@ -11586,6 +13631,13 @@ var IDL = {
|
|
|
11586
13631
|
"name": "target_lockup_duration_secs",
|
|
11587
13632
|
"type": "i64"
|
|
11588
13633
|
},
|
|
13634
|
+
{
|
|
13635
|
+
"name": "junior_deposit_cap",
|
|
13636
|
+
"docs": [
|
|
13637
|
+
"Maximum junior tranche value in accounting units. Zero means uncapped."
|
|
13638
|
+
],
|
|
13639
|
+
"type": "u64"
|
|
13640
|
+
},
|
|
11589
13641
|
{
|
|
11590
13642
|
"name": "for_migration",
|
|
11591
13643
|
"docs": [
|
|
@@ -11629,10 +13681,6 @@ var IDL = {
|
|
|
11629
13681
|
],
|
|
11630
13682
|
"type": "pubkey"
|
|
11631
13683
|
},
|
|
11632
|
-
{
|
|
11633
|
-
"name": "asset_decimals",
|
|
11634
|
-
"type": "u8"
|
|
11635
|
-
},
|
|
11636
13684
|
{
|
|
11637
13685
|
"name": "mint_fee_bps",
|
|
11638
13686
|
"type": "u16"
|
|
@@ -12306,12 +14354,24 @@ var IDL = {
|
|
|
12306
14354
|
"name": "protocol_fees_accrued",
|
|
12307
14355
|
"type": "u64"
|
|
12308
14356
|
},
|
|
14357
|
+
{
|
|
14358
|
+
"name": "hwm_share_price",
|
|
14359
|
+
"docs": [
|
|
14360
|
+
"High-water mark for this class's performance fee, in the same fixed-point",
|
|
14361
|
+
"units as `share_price`. Only share-price growth above this mark is charged",
|
|
14362
|
+
'a performance/protocol fee. `0` means "not yet initialized" and is lazily',
|
|
14363
|
+
"set to the current share price on the next settlement (so pre-existing",
|
|
14364
|
+
"accounts never retroactively pay on gains earned before this field",
|
|
14365
|
+
"existed). Only the junior class charges a fee; senior is exempt."
|
|
14366
|
+
],
|
|
14367
|
+
"type": "u64"
|
|
14368
|
+
},
|
|
12309
14369
|
{
|
|
12310
14370
|
"name": "_padding1",
|
|
12311
14371
|
"type": {
|
|
12312
14372
|
"array": [
|
|
12313
14373
|
"u64",
|
|
12314
|
-
|
|
14374
|
+
13
|
|
12315
14375
|
]
|
|
12316
14376
|
}
|
|
12317
14377
|
}
|
|
@@ -12375,12 +14435,21 @@ var IDL = {
|
|
|
12375
14435
|
"name": "target_lockup_duration_secs",
|
|
12376
14436
|
"type": "i64"
|
|
12377
14437
|
},
|
|
14438
|
+
{
|
|
14439
|
+
"name": "junior_deposit_cap",
|
|
14440
|
+
"docs": [
|
|
14441
|
+
"Maximum junior tranche value in vault accounting units. Zero disables",
|
|
14442
|
+
"the cap. Yield may carry the tranche above this value, but further",
|
|
14443
|
+
"junior deposits remain blocked until its value falls below the cap."
|
|
14444
|
+
],
|
|
14445
|
+
"type": "u64"
|
|
14446
|
+
},
|
|
12378
14447
|
{
|
|
12379
14448
|
"name": "_padding2",
|
|
12380
14449
|
"type": {
|
|
12381
14450
|
"array": [
|
|
12382
14451
|
"u64",
|
|
12383
|
-
|
|
14452
|
+
13
|
|
12384
14453
|
]
|
|
12385
14454
|
}
|
|
12386
14455
|
}
|
|
@@ -12440,7 +14509,21 @@ var IDL = {
|
|
|
12440
14509
|
{
|
|
12441
14510
|
"name": "last_settled_ts",
|
|
12442
14511
|
"docs": [
|
|
12443
|
-
"Last
|
|
14512
|
+
"Last NAV settlement timestamp."
|
|
14513
|
+
],
|
|
14514
|
+
"type": "i64"
|
|
14515
|
+
},
|
|
14516
|
+
{
|
|
14517
|
+
"name": "senior_apy_anchor_share_price",
|
|
14518
|
+
"docs": [
|
|
14519
|
+
"Senior share price at the start of the current APY regime."
|
|
14520
|
+
],
|
|
14521
|
+
"type": "u64"
|
|
14522
|
+
},
|
|
14523
|
+
{
|
|
14524
|
+
"name": "senior_apy_anchor_ts",
|
|
14525
|
+
"docs": [
|
|
14526
|
+
"Unix timestamp when the senior APY anchor was set."
|
|
12444
14527
|
],
|
|
12445
14528
|
"type": "i64"
|
|
12446
14529
|
},
|
|
@@ -12449,7 +14532,7 @@ var IDL = {
|
|
|
12449
14532
|
"type": {
|
|
12450
14533
|
"array": [
|
|
12451
14534
|
"u64",
|
|
12452
|
-
|
|
14535
|
+
29
|
|
12453
14536
|
]
|
|
12454
14537
|
}
|
|
12455
14538
|
}
|
|
@@ -12484,6 +14567,15 @@ var IDL = {
|
|
|
12484
14567
|
"type": {
|
|
12485
14568
|
"option": "i64"
|
|
12486
14569
|
}
|
|
14570
|
+
},
|
|
14571
|
+
{
|
|
14572
|
+
"name": "junior_deposit_cap",
|
|
14573
|
+
"docs": [
|
|
14574
|
+
"Maximum junior tranche value in accounting units. Zero means uncapped."
|
|
14575
|
+
],
|
|
14576
|
+
"type": {
|
|
14577
|
+
"option": "u64"
|
|
14578
|
+
}
|
|
12487
14579
|
}
|
|
12488
14580
|
]
|
|
12489
14581
|
}
|
|
@@ -12691,8 +14783,8 @@ var IDL = {
|
|
|
12691
14783
|
"name": "hwm_share_price",
|
|
12692
14784
|
"docs": [
|
|
12693
14785
|
"High-water mark for the performance fee. Only share-price growth above",
|
|
12694
|
-
"this value is fee-eligible
|
|
12695
|
-
"
|
|
14786
|
+
"this value is fee-eligible. Fee-rate changes re-anchor it to the current",
|
|
14787
|
+
"share price so the new rate does not apply retroactively."
|
|
12696
14788
|
],
|
|
12697
14789
|
"type": "u64"
|
|
12698
14790
|
},
|
|
@@ -13360,7 +15452,11 @@ var VaultQuoteClient = class {
|
|
|
13360
15452
|
this.account.fetchVault(args.vault, { fresh: args.fresh }),
|
|
13361
15453
|
this.fetchSignerOwner(args.signer)
|
|
13362
15454
|
]);
|
|
13363
|
-
const feeExempt = this.
|
|
15455
|
+
const feeExempt = this.isFeeExemptSigner(
|
|
15456
|
+
args.signer,
|
|
15457
|
+
signerOwner,
|
|
15458
|
+
args.addressSeeds
|
|
15459
|
+
);
|
|
13364
15460
|
if (args.shareClass === "regular") {
|
|
13365
15461
|
return this.quoteRegular(args, vault, signerOwner, feeExempt);
|
|
13366
15462
|
}
|
|
@@ -13371,12 +15467,21 @@ var VaultQuoteClient = class {
|
|
|
13371
15467
|
const info = await this.connection.getAccountInfo(new import_web32.PublicKey(signer), "confirmed").catch(() => null);
|
|
13372
15468
|
return info ? (0, import_kit4.address)(info.owner.toBase58()) : null;
|
|
13373
15469
|
}
|
|
13374
|
-
|
|
13375
|
-
if (!owner) return false;
|
|
15470
|
+
isFeeExemptSigner(signer, owner, seeds) {
|
|
15471
|
+
if (!owner || !seeds) return false;
|
|
13376
15472
|
const ownerString = owner.toString();
|
|
13377
|
-
|
|
15473
|
+
const approvedOwner = ownerString === this.programId.toString() || PROGRAM_FEE_EXEMPT_OWNER_WHITELIST.some(
|
|
13378
15474
|
(whitelisted) => whitelisted.toString() === ownerString
|
|
13379
15475
|
);
|
|
15476
|
+
if (!approvedOwner) return false;
|
|
15477
|
+
try {
|
|
15478
|
+
return import_web32.PublicKey.createProgramAddressSync(
|
|
15479
|
+
seeds.map((seed) => Buffer.from(seed)),
|
|
15480
|
+
new import_web32.PublicKey(ownerString)
|
|
15481
|
+
).equals(new import_web32.PublicKey(signer));
|
|
15482
|
+
} catch {
|
|
15483
|
+
return false;
|
|
15484
|
+
}
|
|
13380
15485
|
}
|
|
13381
15486
|
async fetchTrancheState(args) {
|
|
13382
15487
|
if (args.vaultTrancheState) {
|
|
@@ -13715,10 +15820,15 @@ var CancelJuniorTrancheWithdrawBuilder = class extends VaultBuilderBase {
|
|
|
13715
15820
|
txArgs.user,
|
|
13716
15821
|
txArgs.queueId
|
|
13717
15822
|
),
|
|
13718
|
-
resolveTrancheShare(
|
|
13719
|
-
|
|
13720
|
-
|
|
13721
|
-
|
|
15823
|
+
resolveTrancheShare(
|
|
15824
|
+
this.account,
|
|
15825
|
+
txArgs.vault,
|
|
15826
|
+
{ junior: {} },
|
|
15827
|
+
{
|
|
15828
|
+
mint: txArgs.juniorShareMint,
|
|
15829
|
+
tokenProgram: txArgs.shareTokenProgram
|
|
15830
|
+
}
|
|
15831
|
+
)
|
|
13722
15832
|
]);
|
|
13723
15833
|
const { mint: juniorShareMint, tokenProgram: shareTokenProgram } = juniorShare;
|
|
13724
15834
|
const queuePda = txArgs.withdrawalQueue ?? withdrawalQueue;
|
|
@@ -13855,6 +15965,7 @@ var CreateTrancheStateBuilder = class extends VaultBuilderBase {
|
|
|
13855
15965
|
earlyUnstakeFeeBps: args.earlyUnstakeFeeBps,
|
|
13856
15966
|
standardUnstakeFeeBps: args.standardUnstakeFeeBps,
|
|
13857
15967
|
targetLockupDurationSecs: args.targetLockupDurationSecs,
|
|
15968
|
+
juniorDepositCap: args.juniorDepositCap,
|
|
13858
15969
|
forMigration: args.forMigration
|
|
13859
15970
|
}).accountsPartial({
|
|
13860
15971
|
curator: (0, import_common8.toWeb3Pk)(args.curator),
|
|
@@ -13862,6 +15973,10 @@ var CreateTrancheStateBuilder = class extends VaultBuilderBase {
|
|
|
13862
15973
|
vaultTrancheState: (0, import_common8.toWeb3Pk)(args.vaultTrancheState),
|
|
13863
15974
|
juniorShareMint: (0, import_common8.toWeb3Pk)(args.juniorShareMint),
|
|
13864
15975
|
seniorShareMint: (0, import_common8.toWeb3Pk)(args.seniorShareMint),
|
|
15976
|
+
// Optional on-chain: required only on the organic path, where the
|
|
15977
|
+
// program enforces a fresh NAV before enabling tranching. Left null on
|
|
15978
|
+
// the migration path so Anchor resolves it to the program ID.
|
|
15979
|
+
vaultOracle: args.vaultOracle ? (0, import_common8.toWeb3Pk)(args.vaultOracle) : null,
|
|
13865
15980
|
tokenProgram: (0, import_common8.toWeb3Pk)(args.tokenProgram),
|
|
13866
15981
|
systemProgram: import_web35.SystemProgram.programId
|
|
13867
15982
|
}).instruction().then(import_common8.toKitInstruction);
|
|
@@ -13870,19 +15985,33 @@ var CreateTrancheStateBuilder = class extends VaultBuilderBase {
|
|
|
13870
15985
|
const [vaultTrancheState] = await this.pda.deriveVaultTrancheStatePda(
|
|
13871
15986
|
txArgs.vault
|
|
13872
15987
|
);
|
|
15988
|
+
const forMigration = txArgs.forMigration ?? false;
|
|
15989
|
+
let vaultOracle = txArgs.vaultOracle;
|
|
15990
|
+
if (!forMigration && vaultOracle === void 0) {
|
|
15991
|
+
const vaultData = await this.account.fetchVault(txArgs.vault, {
|
|
15992
|
+
fresh: true
|
|
15993
|
+
});
|
|
15994
|
+
const hasMainShares = BigInt(vaultData.accounting.totalMintSupply.toString()) > 0n;
|
|
15995
|
+
const hasFixedApy = vaultData.config.apy.fixedApyBps > 0;
|
|
15996
|
+
if (hasMainShares && hasFixedApy) {
|
|
15997
|
+
[vaultOracle] = await this.pda.deriveVaultOraclePda(txArgs.vault);
|
|
15998
|
+
}
|
|
15999
|
+
}
|
|
13873
16000
|
return {
|
|
13874
16001
|
curator: txArgs.curator,
|
|
13875
16002
|
vault: txArgs.vault,
|
|
13876
16003
|
vaultTrancheState,
|
|
13877
16004
|
juniorShareMint: txArgs.juniorShareMint,
|
|
13878
16005
|
seniorShareMint: txArgs.seniorShareMint,
|
|
16006
|
+
vaultOracle,
|
|
13879
16007
|
seniorFixedApyBps: txArgs.seniorFixedApyBps ?? 0,
|
|
13880
16008
|
earlyUnstakeFeeBps: txArgs.earlyUnstakeFeeBps ?? DEFAULT_JUNIOR_EARLY_UNSTAKE_FEE_BPS,
|
|
13881
16009
|
standardUnstakeFeeBps: txArgs.standardUnstakeFeeBps ?? DEFAULT_JUNIOR_STANDARD_UNSTAKE_FEE_BPS,
|
|
13882
16010
|
targetLockupDurationSecs: new import_core.BN(
|
|
13883
16011
|
(txArgs.targetLockupDurationSecs ?? DEFAULT_JUNIOR_WITHDRAWAL_LOCKUP_SECS).toString()
|
|
13884
16012
|
),
|
|
13885
|
-
|
|
16013
|
+
juniorDepositCap: new import_core.BN((txArgs.juniorDepositCap ?? 0n).toString()),
|
|
16014
|
+
forMigration,
|
|
13886
16015
|
tokenProgram: txArgs.tokenProgram ?? TOKEN_PROGRAM_ID
|
|
13887
16016
|
};
|
|
13888
16017
|
}
|
|
@@ -13916,6 +16045,7 @@ var ActivateCircuitBreakerBuilder = class extends VaultBuilderBase {
|
|
|
13916
16045
|
|
|
13917
16046
|
// src/client/builders/createVault.ts
|
|
13918
16047
|
var import_core3 = require("@anchor-lang/core");
|
|
16048
|
+
var import_token = require("@solana-program/token");
|
|
13919
16049
|
var import_spl_token4 = require("@solana/spl-token");
|
|
13920
16050
|
var import_web36 = require("@solana/web3.js");
|
|
13921
16051
|
var import_common11 = __toESM(require_dist());
|
|
@@ -13982,6 +16112,7 @@ var CreateVaultBuilder = class extends VaultBuilderBase {
|
|
|
13982
16112
|
const [vault] = await this.pda.deriveVaultPda(vaultId);
|
|
13983
16113
|
const [vaultOracle] = await this.pda.deriveVaultOraclePda(vault);
|
|
13984
16114
|
const [feeVault] = await this.pda.deriveFeeAuthorityPda(vault);
|
|
16115
|
+
const assetDecimals = (await (0, import_token.fetchMint)(this.rpc, txArgs.strictAssetMint)).data.decimals;
|
|
13985
16116
|
return {
|
|
13986
16117
|
curator: txArgs.curator,
|
|
13987
16118
|
vault,
|
|
@@ -13996,7 +16127,6 @@ var CreateVaultBuilder = class extends VaultBuilderBase {
|
|
|
13996
16127
|
cbTrigger: txArgs.cbTrigger ?? txArgs.curator,
|
|
13997
16128
|
feeCollector: txArgs.feeCollector ?? txArgs.curator,
|
|
13998
16129
|
baseAssetMint: txArgs.strictAssetMint,
|
|
13999
|
-
assetDecimals: txArgs.assetDecimals,
|
|
14000
16130
|
mintFeeBps: txArgs.mintFeeBps ?? 0,
|
|
14001
16131
|
burnFeeBps: txArgs.burnFeeBps ?? 0,
|
|
14002
16132
|
performanceFeeBps: txArgs.performanceFeeBps ?? 0,
|
|
@@ -14007,7 +16137,7 @@ var CreateVaultBuilder = class extends VaultBuilderBase {
|
|
|
14007
16137
|
initialMintSharePrice: null,
|
|
14008
16138
|
basePriceOracleType: txArgs.basePriceOracleType ?? 1,
|
|
14009
16139
|
basePrice: new import_core3.BN(
|
|
14010
|
-
(txArgs.basePrice ?? 10n ** BigInt(
|
|
16140
|
+
(txArgs.basePrice ?? 10n ** BigInt(assetDecimals)).toString()
|
|
14011
16141
|
),
|
|
14012
16142
|
basePriceOracleAccount: txArgs.basePriceOracleAccount ?? DEFAULT_PRICE_ORACLE_ACCOUNT,
|
|
14013
16143
|
forMigration: txArgs.forMigration ?? false
|
|
@@ -14678,7 +16808,12 @@ var ExecuteShareSwapBuilder = class extends VaultBuilderBase {
|
|
|
14678
16808
|
return this.program.methods.executeShareSwap(data.kind, data.shareAmount).accountsPartial(this.getIxAccounts(args)).instruction().then(import_common23.toKitInstruction);
|
|
14679
16809
|
}
|
|
14680
16810
|
async deriveIxArgs(txArgs) {
|
|
14681
|
-
const [
|
|
16811
|
+
const [
|
|
16812
|
+
[vaultOracle],
|
|
16813
|
+
[vaultTrancheState],
|
|
16814
|
+
trancheShare,
|
|
16815
|
+
shareTokenProgram
|
|
16816
|
+
] = await Promise.all([
|
|
14682
16817
|
this.pda.deriveVaultOraclePda(txArgs.vault),
|
|
14683
16818
|
this.pda.deriveVaultTrancheStatePda(txArgs.vault),
|
|
14684
16819
|
resolveTrancheShare(this.account, txArgs.vault, txArgs.kind, {
|
|
@@ -14767,12 +16902,19 @@ var ExecuteDepositBuilder = class extends VaultBuilderBase {
|
|
|
14767
16902
|
}
|
|
14768
16903
|
getIxData(args) {
|
|
14769
16904
|
return {
|
|
14770
|
-
amount: args.amount
|
|
16905
|
+
amount: args.amount,
|
|
16906
|
+
addressSeeds: args.addressSeeds
|
|
14771
16907
|
};
|
|
14772
16908
|
}
|
|
14773
16909
|
async getIx(args) {
|
|
14774
16910
|
const data = this.getIxData(args);
|
|
14775
|
-
|
|
16911
|
+
const methods = data.addressSeeds ? this.program.methods.executeDepositFeeExempt(
|
|
16912
|
+
data.amount,
|
|
16913
|
+
data.addressSeeds.map((seed) => Buffer.from(seed))
|
|
16914
|
+
) : this.program.methods.executeDeposit(data.amount);
|
|
16915
|
+
return methods.accountsPartial(
|
|
16916
|
+
this.getIxAccounts(args)
|
|
16917
|
+
).instruction().then(import_common24.toKitInstruction);
|
|
14776
16918
|
}
|
|
14777
16919
|
async deriveIxArgs(txArgs) {
|
|
14778
16920
|
const connection = this.program.provider.connection;
|
|
@@ -14812,6 +16954,7 @@ var ExecuteDepositBuilder = class extends VaultBuilderBase {
|
|
|
14812
16954
|
assetMint: txArgs.assetMint,
|
|
14813
16955
|
shareMint: txArgs.shareMint,
|
|
14814
16956
|
amount: new import_core7.BN(txArgs.amount.toString()),
|
|
16957
|
+
addressSeeds: txArgs.addressSeeds,
|
|
14815
16958
|
assetTokenProgram,
|
|
14816
16959
|
shareTokenProgram,
|
|
14817
16960
|
userAssetAta: txArgs.userAssetAta ?? (0, import_common24.getAtaAddress)(txArgs.assetMint, txArgs.user, assetTokenProgram),
|
|
@@ -14911,12 +17054,20 @@ var ExecuteTrancheDepositBuilder = class extends VaultBuilderBase {
|
|
|
14911
17054
|
getIxData(args) {
|
|
14912
17055
|
return {
|
|
14913
17056
|
kind: args.kind,
|
|
14914
|
-
amount: args.amount
|
|
17057
|
+
amount: args.amount,
|
|
17058
|
+
addressSeeds: args.addressSeeds
|
|
14915
17059
|
};
|
|
14916
17060
|
}
|
|
14917
17061
|
async getIx(args) {
|
|
14918
17062
|
const data = this.getIxData(args);
|
|
14919
|
-
|
|
17063
|
+
const methods = data.addressSeeds ? this.program.methods.executeTrancheDepositFeeExempt(
|
|
17064
|
+
data.kind,
|
|
17065
|
+
data.amount,
|
|
17066
|
+
data.addressSeeds.map((seed) => Buffer.from(seed))
|
|
17067
|
+
) : this.program.methods.executeTrancheDeposit(data.kind, data.amount);
|
|
17068
|
+
return methods.accountsPartial(
|
|
17069
|
+
this.getIxAccounts(args)
|
|
17070
|
+
).instruction().then(import_common25.toKitInstruction);
|
|
14920
17071
|
}
|
|
14921
17072
|
async deriveIxArgs(txArgs) {
|
|
14922
17073
|
const connection = this.program.provider.connection;
|
|
@@ -14946,6 +17097,7 @@ var ExecuteTrancheDepositBuilder = class extends VaultBuilderBase {
|
|
|
14946
17097
|
trancheShareMint,
|
|
14947
17098
|
kind: txArgs.kind,
|
|
14948
17099
|
amount: new import_core8.BN(txArgs.amount.toString()),
|
|
17100
|
+
addressSeeds: txArgs.addressSeeds,
|
|
14949
17101
|
assetTokenProgram,
|
|
14950
17102
|
shareTokenProgram,
|
|
14951
17103
|
userAssetAta: (0, import_common25.getAtaAddress)(
|
|
@@ -15048,12 +17200,23 @@ var ExecuteTrancheWithdrawBuilder = class extends VaultBuilderBase {
|
|
|
15048
17200
|
getIxData(args) {
|
|
15049
17201
|
return {
|
|
15050
17202
|
kind: args.kind,
|
|
15051
|
-
shareAmount: args.shareAmount
|
|
17203
|
+
shareAmount: args.shareAmount,
|
|
17204
|
+
addressSeeds: args.addressSeeds
|
|
15052
17205
|
};
|
|
15053
17206
|
}
|
|
15054
17207
|
async getIx(args) {
|
|
15055
17208
|
const data = this.getIxData(args);
|
|
15056
|
-
|
|
17209
|
+
const methods = data.addressSeeds ? this.program.methods.executeTrancheWithdrawFeeExempt(
|
|
17210
|
+
data.kind,
|
|
17211
|
+
data.shareAmount,
|
|
17212
|
+
data.addressSeeds.map((seed) => Buffer.from(seed))
|
|
17213
|
+
) : this.program.methods.executeTrancheWithdraw(
|
|
17214
|
+
data.kind,
|
|
17215
|
+
data.shareAmount
|
|
17216
|
+
);
|
|
17217
|
+
return methods.accountsPartial(
|
|
17218
|
+
this.getIxAccounts(args)
|
|
17219
|
+
).instruction().then(import_common26.toKitInstruction);
|
|
15057
17220
|
}
|
|
15058
17221
|
async deriveIxArgs(txArgs) {
|
|
15059
17222
|
const connection = this.program.provider.connection;
|
|
@@ -15082,6 +17245,7 @@ var ExecuteTrancheWithdrawBuilder = class extends VaultBuilderBase {
|
|
|
15082
17245
|
trancheShareMint,
|
|
15083
17246
|
kind: txArgs.kind,
|
|
15084
17247
|
shareAmount: new import_core9.BN(txArgs.shareAmount.toString()),
|
|
17248
|
+
addressSeeds: txArgs.addressSeeds,
|
|
15085
17249
|
assetTokenProgram,
|
|
15086
17250
|
shareTokenProgram,
|
|
15087
17251
|
userAssetAta: (0, import_common26.getAtaAddress)(
|
|
@@ -15177,13 +17341,23 @@ var ExecuteWithdrawBuilder = class extends VaultBuilderBase {
|
|
|
15177
17341
|
return {
|
|
15178
17342
|
shareAmount: args.shareAmount,
|
|
15179
17343
|
externalWithdrawIxRefs: args.externalWithdrawIxRefs ?? null,
|
|
15180
|
-
externalLiquiditySource: args.externalLiquiditySource ?? null
|
|
17344
|
+
externalLiquiditySource: args.externalLiquiditySource ?? null,
|
|
17345
|
+
addressSeeds: args.addressSeeds
|
|
15181
17346
|
};
|
|
15182
17347
|
}
|
|
15183
17348
|
async getIx(args) {
|
|
15184
17349
|
const data = this.getIxData(args);
|
|
15185
17350
|
const useExternal = data.externalWithdrawIxRefs != null || data.externalLiquiditySource != null;
|
|
15186
|
-
const
|
|
17351
|
+
const anchorSeeds = data.addressSeeds?.map((seed) => Buffer.from(seed));
|
|
17352
|
+
const methods = anchorSeeds ? useExternal ? this.program.methods.executeWithdrawFromExternalFeeExempt(
|
|
17353
|
+
data.shareAmount,
|
|
17354
|
+
data.externalWithdrawIxRefs,
|
|
17355
|
+
data.externalLiquiditySource,
|
|
17356
|
+
anchorSeeds
|
|
17357
|
+
) : this.program.methods.executeWithdrawFeeExempt(
|
|
17358
|
+
data.shareAmount,
|
|
17359
|
+
anchorSeeds
|
|
17360
|
+
) : useExternal ? this.program.methods.executeWithdrawFromExternal(
|
|
15187
17361
|
data.shareAmount,
|
|
15188
17362
|
data.externalWithdrawIxRefs,
|
|
15189
17363
|
data.externalLiquiditySource
|
|
@@ -15276,7 +17450,8 @@ var ExecuteWithdrawBuilder = class extends VaultBuilderBase {
|
|
|
15276
17450
|
userShareAta: txArgs.userShareAta ?? (0, import_common27.getAtaAddress)(txArgs.shareMint, txArgs.user, shareTokenProgram),
|
|
15277
17451
|
externalWithdrawIxRefs,
|
|
15278
17452
|
externalLiquiditySource,
|
|
15279
|
-
externalWithdrawAccounts
|
|
17453
|
+
externalWithdrawAccounts,
|
|
17454
|
+
addressSeeds: txArgs.addressSeeds
|
|
15280
17455
|
};
|
|
15281
17456
|
}
|
|
15282
17457
|
async buildLookupTables(_args, txArgs) {
|
|
@@ -15322,7 +17497,10 @@ var import_web313 = require("@solana/web3.js");
|
|
|
15322
17497
|
var import_common28 = __toESM(require_dist());
|
|
15323
17498
|
var FulfillJuniorTrancheWithdrawBuilder = class extends VaultBuilderBase {
|
|
15324
17499
|
async getIx(args) {
|
|
15325
|
-
|
|
17500
|
+
const methods = args.addressSeeds ? this.program.methods.fulfillJuniorTrancheWithdrawFeeExempt(
|
|
17501
|
+
args.addressSeeds.map((seed) => Buffer.from(seed))
|
|
17502
|
+
) : this.program.methods.fulfillJuniorTrancheWithdraw();
|
|
17503
|
+
return methods.accountsPartial({
|
|
15326
17504
|
signer: (0, import_common28.toWeb3Pk)(args.signer),
|
|
15327
17505
|
owner: (0, import_common28.toWeb3Pk)(args.owner),
|
|
15328
17506
|
queuePayer: (0, import_common28.toWeb3Pk)(args.queuePayer),
|
|
@@ -15371,10 +17549,15 @@ var FulfillJuniorTrancheWithdrawBuilder = class extends VaultBuilderBase {
|
|
|
15371
17549
|
txArgs.assetMint,
|
|
15372
17550
|
txArgs.assetTokenProgram
|
|
15373
17551
|
),
|
|
15374
|
-
resolveTrancheShare(
|
|
15375
|
-
|
|
15376
|
-
|
|
15377
|
-
|
|
17552
|
+
resolveTrancheShare(
|
|
17553
|
+
this.account,
|
|
17554
|
+
txArgs.vault,
|
|
17555
|
+
{ junior: {} },
|
|
17556
|
+
{
|
|
17557
|
+
mint: txArgs.juniorShareMint,
|
|
17558
|
+
tokenProgram: txArgs.shareTokenProgram
|
|
17559
|
+
}
|
|
17560
|
+
)
|
|
15378
17561
|
]);
|
|
15379
17562
|
const { mint: juniorShareMint, tokenProgram: shareTokenProgram } = juniorShare;
|
|
15380
17563
|
const queuePda = txArgs.withdrawalQueue ?? withdrawalQueue;
|
|
@@ -15413,7 +17596,8 @@ var FulfillJuniorTrancheWithdrawBuilder = class extends VaultBuilderBase {
|
|
|
15413
17596
|
queuePda,
|
|
15414
17597
|
shareTokenProgram,
|
|
15415
17598
|
true
|
|
15416
|
-
)
|
|
17599
|
+
),
|
|
17600
|
+
addressSeeds: txArgs.addressSeeds
|
|
15417
17601
|
};
|
|
15418
17602
|
}
|
|
15419
17603
|
async buildPreambleInstructions(args) {
|
|
@@ -15460,7 +17644,8 @@ var UpdateTrancheConfigBuilder = class extends VaultBuilderBase {
|
|
|
15460
17644
|
seniorFixedApyBps: args.seniorFixedApyBps,
|
|
15461
17645
|
earlyUnstakeFeeBps: args.earlyUnstakeFeeBps,
|
|
15462
17646
|
standardUnstakeFeeBps: args.standardUnstakeFeeBps,
|
|
15463
|
-
targetLockupDurationSecs: args.targetLockupDurationSecs
|
|
17647
|
+
targetLockupDurationSecs: args.targetLockupDurationSecs,
|
|
17648
|
+
juniorDepositCap: args.juniorDepositCap
|
|
15464
17649
|
}).accountsPartial({
|
|
15465
17650
|
curator: (0, import_common29.toWeb3Pk)(args.curator),
|
|
15466
17651
|
vault: (0, import_common29.toWeb3Pk)(args.vault),
|
|
@@ -15481,7 +17666,8 @@ var UpdateTrancheConfigBuilder = class extends VaultBuilderBase {
|
|
|
15481
17666
|
seniorFixedApyBps: txArgs.seniorFixedApyBps ?? null,
|
|
15482
17667
|
earlyUnstakeFeeBps: txArgs.earlyUnstakeFeeBps ?? null,
|
|
15483
17668
|
standardUnstakeFeeBps: txArgs.standardUnstakeFeeBps ?? null,
|
|
15484
|
-
targetLockupDurationSecs: txArgs.targetLockupDurationSecs === void 0 ? null : new import_core11.BN(txArgs.targetLockupDurationSecs.toString())
|
|
17669
|
+
targetLockupDurationSecs: txArgs.targetLockupDurationSecs === void 0 ? null : new import_core11.BN(txArgs.targetLockupDurationSecs.toString()),
|
|
17670
|
+
juniorDepositCap: txArgs.juniorDepositCap === void 0 ? null : new import_core11.BN(txArgs.juniorDepositCap.toString())
|
|
15485
17671
|
};
|
|
15486
17672
|
}
|
|
15487
17673
|
async buildPlanExtras(args) {
|
|
@@ -15681,7 +17867,8 @@ var JupiterSwapBuilder = class extends VaultBuilderBase {
|
|
|
15681
17867
|
sourceTokenProgram: (0, import_common32.toWeb3Pk)(args.sourceTokenProgram),
|
|
15682
17868
|
destinationTokenProgram: (0, import_common32.toWeb3Pk)(args.destinationTokenProgram),
|
|
15683
17869
|
destinationOracleAccount: args.destinationOracleAccount ? (0, import_common32.toWeb3Pk)(args.destinationOracleAccount) : null,
|
|
15684
|
-
vaultOracle: (0, import_common32.toWeb3Pk)(args.vaultOracle)
|
|
17870
|
+
vaultOracle: (0, import_common32.toWeb3Pk)(args.vaultOracle),
|
|
17871
|
+
vaultTrancheState: args.vaultTrancheState ? (0, import_common32.toWeb3Pk)(args.vaultTrancheState) : null
|
|
15685
17872
|
}).remainingAccounts(args.accounts.map(toWeb3AccountMeta2)).instruction().then(import_common32.toKitInstruction);
|
|
15686
17873
|
}
|
|
15687
17874
|
async deriveIxArgs(txArgs) {
|
|
@@ -15699,6 +17886,7 @@ var JupiterSwapBuilder = class extends VaultBuilderBase {
|
|
|
15699
17886
|
),
|
|
15700
17887
|
destinationOracleAccount: txArgs.destinationOracleAccount ?? null,
|
|
15701
17888
|
vaultOracle: txArgs.vaultOracle ?? vaultOracle,
|
|
17889
|
+
vaultTrancheState: txArgs.vaultTrancheState ?? null,
|
|
15702
17890
|
accounts: txArgs.accounts,
|
|
15703
17891
|
sourceTokenProgram,
|
|
15704
17892
|
destinationTokenProgram,
|
|
@@ -15741,7 +17929,15 @@ var JupiterSwapBuilder = class extends VaultBuilderBase {
|
|
|
15741
17929
|
}
|
|
15742
17930
|
async buildPlanExtras(args) {
|
|
15743
17931
|
return {
|
|
15744
|
-
postSuccessCacheInvalidations: [
|
|
17932
|
+
postSuccessCacheInvalidations: [
|
|
17933
|
+
{ vaultPda: args.vault },
|
|
17934
|
+
...args.vaultTrancheState ? [
|
|
17935
|
+
{
|
|
17936
|
+
vaultPda: args.vault,
|
|
17937
|
+
vaultTrancheStatePda: args.vaultTrancheState
|
|
17938
|
+
}
|
|
17939
|
+
] : []
|
|
17940
|
+
]
|
|
15745
17941
|
};
|
|
15746
17942
|
}
|
|
15747
17943
|
async getTx(txArgs) {
|
|
@@ -15783,12 +17979,7 @@ var RequestJuniorTrancheWithdrawBuilder = class extends VaultBuilderBase {
|
|
|
15783
17979
|
}
|
|
15784
17980
|
async deriveIxArgs(txArgs) {
|
|
15785
17981
|
const payer = txArgs.payer ?? txArgs.user;
|
|
15786
|
-
const [
|
|
15787
|
-
[vaultOracle],
|
|
15788
|
-
[vaultTrancheState],
|
|
15789
|
-
[withdrawalQueue],
|
|
15790
|
-
juniorShare
|
|
15791
|
-
] = await Promise.all([
|
|
17982
|
+
const [[vaultOracle], [vaultTrancheState], [withdrawalQueue], juniorShare] = await Promise.all([
|
|
15792
17983
|
this.pda.deriveVaultOraclePda(txArgs.vault),
|
|
15793
17984
|
this.pda.deriveVaultTrancheStatePda(txArgs.vault),
|
|
15794
17985
|
this.pda.deriveVaultTrancheWithdrawalQueuePda(
|
|
@@ -15796,10 +17987,15 @@ var RequestJuniorTrancheWithdrawBuilder = class extends VaultBuilderBase {
|
|
|
15796
17987
|
txArgs.user,
|
|
15797
17988
|
txArgs.queueId
|
|
15798
17989
|
),
|
|
15799
|
-
resolveTrancheShare(
|
|
15800
|
-
|
|
15801
|
-
|
|
15802
|
-
|
|
17990
|
+
resolveTrancheShare(
|
|
17991
|
+
this.account,
|
|
17992
|
+
txArgs.vault,
|
|
17993
|
+
{ junior: {} },
|
|
17994
|
+
{
|
|
17995
|
+
mint: txArgs.juniorShareMint,
|
|
17996
|
+
tokenProgram: txArgs.shareTokenProgram
|
|
17997
|
+
}
|
|
17998
|
+
)
|
|
15803
17999
|
]);
|
|
15804
18000
|
const { mint: juniorShareMint, tokenProgram: shareTokenProgram } = juniorShare;
|
|
15805
18001
|
const queuePda = txArgs.withdrawalQueue ?? withdrawalQueue;
|
|
@@ -15883,6 +18079,8 @@ var VaultReallocationBuilder = class extends VaultBuilderBase {
|
|
|
15883
18079
|
allocationDestinationShareAta: (0, import_common34.toWeb3Pk)(
|
|
15884
18080
|
args.allocationDestinationShareAta
|
|
15885
18081
|
),
|
|
18082
|
+
sourceVaultTrancheState: args.sourceVaultTrancheState ? (0, import_common34.toWeb3Pk)(args.sourceVaultTrancheState) : null,
|
|
18083
|
+
destinationVaultTrancheState: args.destinationVaultTrancheState ? (0, import_common34.toWeb3Pk)(args.destinationVaultTrancheState) : null,
|
|
15886
18084
|
assetOracleAccount: args.assetOracleAccount ? (0, import_common34.toWeb3Pk)(args.assetOracleAccount) : null,
|
|
15887
18085
|
assetTokenProgram: (0, import_common34.toWeb3Pk)(args.assetTokenProgram),
|
|
15888
18086
|
sourceShareTokenProgram: (0, import_common34.toWeb3Pk)(args.sourceShareTokenProgram),
|
|
@@ -15918,6 +18116,8 @@ var VaultReallocationBuilder = class extends VaultBuilderBase {
|
|
|
15918
18116
|
destinationShareMint: txArgs.destinationShareMint,
|
|
15919
18117
|
amount: new import_core16.BN(txArgs.amount.toString()),
|
|
15920
18118
|
assetPriceOracle: toAssetPriceOracleConfig2(txArgs.assetPriceOracle),
|
|
18119
|
+
sourceVaultTrancheState: txArgs.sourceVaultTrancheState ?? null,
|
|
18120
|
+
destinationVaultTrancheState: txArgs.destinationVaultTrancheState ?? null,
|
|
15921
18121
|
assetOracleAccount: txArgs.assetOracleAccount ?? null,
|
|
15922
18122
|
assetTokenProgram,
|
|
15923
18123
|
sourceShareTokenProgram,
|
|
@@ -16019,7 +18219,19 @@ var VaultReallocationBuilder = class extends VaultBuilderBase {
|
|
|
16019
18219
|
postSuccessCacheInvalidations: [
|
|
16020
18220
|
{ vaultPda: args.allocationVault },
|
|
16021
18221
|
{ vaultPda: args.destinationVault },
|
|
16022
|
-
...args.sourceVault ? [{ vaultPda: args.sourceVault }] : []
|
|
18222
|
+
...args.sourceVault ? [{ vaultPda: args.sourceVault }] : [],
|
|
18223
|
+
...args.sourceVault && args.sourceVaultTrancheState ? [
|
|
18224
|
+
{
|
|
18225
|
+
vaultPda: args.sourceVault,
|
|
18226
|
+
vaultTrancheStatePda: args.sourceVaultTrancheState
|
|
18227
|
+
}
|
|
18228
|
+
] : [],
|
|
18229
|
+
...args.destinationVaultTrancheState ? [
|
|
18230
|
+
{
|
|
18231
|
+
vaultPda: args.destinationVault,
|
|
18232
|
+
vaultTrancheStatePda: args.destinationVaultTrancheState
|
|
18233
|
+
}
|
|
18234
|
+
] : []
|
|
16023
18235
|
]
|
|
16024
18236
|
};
|
|
16025
18237
|
}
|
|
@@ -16503,6 +18715,40 @@ async function getBalance(accountName, atTime) {
|
|
|
16503
18715
|
"GET"
|
|
16504
18716
|
)).data;
|
|
16505
18717
|
}
|
|
18718
|
+
async function createYieldPayment(params) {
|
|
18719
|
+
return unwrapData(
|
|
18720
|
+
await yieldApiReq(
|
|
18721
|
+
accountEndpoint(params.accountName, "yield-payments"),
|
|
18722
|
+
"POST",
|
|
18723
|
+
{
|
|
18724
|
+
amount: params.amount,
|
|
18725
|
+
effective_at: dateToStr(params.effectiveAt),
|
|
18726
|
+
idempotency_key: params.idempotencyKey,
|
|
18727
|
+
password: params.password
|
|
18728
|
+
}
|
|
18729
|
+
)
|
|
18730
|
+
);
|
|
18731
|
+
}
|
|
18732
|
+
async function confirmYieldPayment(params) {
|
|
18733
|
+
return unwrapData(
|
|
18734
|
+
await yieldApiReq(
|
|
18735
|
+
accountEndpoint(
|
|
18736
|
+
params.accountName,
|
|
18737
|
+
`yield-payments/${encodeURIComponent(params.paymentId)}/confirm`
|
|
18738
|
+
),
|
|
18739
|
+
"POST",
|
|
18740
|
+
{
|
|
18741
|
+
transaction_signature: params.transactionSignature,
|
|
18742
|
+
password: params.password
|
|
18743
|
+
}
|
|
18744
|
+
)
|
|
18745
|
+
);
|
|
18746
|
+
}
|
|
18747
|
+
async function getYieldPayments(accountName) {
|
|
18748
|
+
return unwrapData(
|
|
18749
|
+
await yieldApiReq(accountEndpoint(accountName, "yield-payments"), "GET")
|
|
18750
|
+
);
|
|
18751
|
+
}
|
|
16506
18752
|
async function getYield(accountName, start, end) {
|
|
16507
18753
|
return (await yieldApiReq(
|
|
16508
18754
|
accountEndpoint(accountName, "yield") + (start ? `?start=${dateToStr(start)}` : "") + (start && end ? `&end=${dateToStr(end)}` : end ? `?end=${dateToStr(end)}` : ""),
|
|
@@ -16518,6 +18764,14 @@ async function getTotalYield(accountNames, start, end) {
|
|
|
16518
18764
|
}
|
|
16519
18765
|
return totalYield;
|
|
16520
18766
|
}
|
|
18767
|
+
async function getTotalOutstandingYield(accountNames, start, end) {
|
|
18768
|
+
let total = 0;
|
|
18769
|
+
for (const accountName of accountNames) {
|
|
18770
|
+
const response = await getYield(accountName, start, end);
|
|
18771
|
+
total += response.outstanding_yield;
|
|
18772
|
+
}
|
|
18773
|
+
return total;
|
|
18774
|
+
}
|
|
16521
18775
|
|
|
16522
18776
|
// src/services/withdrawalQueueService.ts
|
|
16523
18777
|
var import_common38 = __toESM(require_dist());
|
|
@@ -17414,7 +19668,7 @@ var ConsensusOracleService = class {
|
|
|
17414
19668
|
/** Accrued yield (base units) attributed to a holding via its configured accounts. */
|
|
17415
19669
|
async resolveYieldAmount(cfg, decimals) {
|
|
17416
19670
|
if (!this.deps.yieldTracker || !cfg?.yieldAccountNames?.length) return 0n;
|
|
17417
|
-
const totalYieldUi = await this.deps.yieldTracker.
|
|
19671
|
+
const totalYieldUi = await this.deps.yieldTracker.getTotalOutstandingYield(
|
|
17418
19672
|
cfg.yieldAccountNames
|
|
17419
19673
|
);
|
|
17420
19674
|
return totalYieldUi > 0 ? (0, import_common41.fromUiAmount)(totalYieldUi, decimals) : 0n;
|
|
@@ -17592,7 +19846,8 @@ var MockYieldTracker = class {
|
|
|
17592
19846
|
aprBps: cfg.aprBps,
|
|
17593
19847
|
initialPrincipal: cfg.principal ?? 0,
|
|
17594
19848
|
startTs: cfg.startTs ?? this.clock.now(),
|
|
17595
|
-
cashflows: []
|
|
19849
|
+
cashflows: [],
|
|
19850
|
+
yieldPayments: []
|
|
17596
19851
|
});
|
|
17597
19852
|
}
|
|
17598
19853
|
}
|
|
@@ -17602,7 +19857,8 @@ var MockYieldTracker = class {
|
|
|
17602
19857
|
aprBps: cfg.aprBps,
|
|
17603
19858
|
initialPrincipal: cfg.principal ?? 0,
|
|
17604
19859
|
startTs: cfg.startTs ?? this.clock.now(),
|
|
17605
|
-
cashflows: []
|
|
19860
|
+
cashflows: [],
|
|
19861
|
+
yieldPayments: []
|
|
17606
19862
|
});
|
|
17607
19863
|
}
|
|
17608
19864
|
require(name) {
|
|
@@ -17635,9 +19891,16 @@ var MockYieldTracker = class {
|
|
|
17635
19891
|
}
|
|
17636
19892
|
const tailSecs = Math.max(0, (windowEndMs - segStart) / 1e3);
|
|
17637
19893
|
totalYield += principal * apr * (tailSecs / SECONDS_PER_YEAR);
|
|
19894
|
+
const paidYield = state.yieldPayments.reduce((sum, payment) => {
|
|
19895
|
+
return payment.status === "confirmed" && payment.effectiveAt > windowStartMs && payment.effectiveAt <= windowEndMs ? sum + payment.amount : sum;
|
|
19896
|
+
}, 0);
|
|
19897
|
+
const outstandingYield = Math.max(0, totalYield - paidYield);
|
|
17638
19898
|
return {
|
|
17639
19899
|
account: accountName,
|
|
17640
19900
|
totalYield,
|
|
19901
|
+
grossYield: totalYield,
|
|
19902
|
+
paidYield,
|
|
19903
|
+
outstandingYield,
|
|
17641
19904
|
principalAtEnd: principal,
|
|
17642
19905
|
aprUsed: apr,
|
|
17643
19906
|
accrualStart: new Date(windowStartMs),
|
|
@@ -17652,9 +19915,17 @@ var MockYieldTracker = class {
|
|
|
17652
19915
|
}
|
|
17653
19916
|
return total;
|
|
17654
19917
|
}
|
|
19918
|
+
async getTotalOutstandingYield(accountNames, start, end) {
|
|
19919
|
+
let total = 0;
|
|
19920
|
+
for (const name of accountNames) {
|
|
19921
|
+
const snapshot = await this.getYield(name, start, end);
|
|
19922
|
+
total += snapshot.outstandingYield;
|
|
19923
|
+
}
|
|
19924
|
+
return total;
|
|
19925
|
+
}
|
|
17655
19926
|
async getBalance(accountName, atTime) {
|
|
17656
19927
|
const snapshot = await this.getYield(accountName, void 0, atTime);
|
|
17657
|
-
return snapshot.principalAtEnd + snapshot.
|
|
19928
|
+
return snapshot.principalAtEnd + snapshot.outstandingYield;
|
|
17658
19929
|
}
|
|
17659
19930
|
async addCashflow(params) {
|
|
17660
19931
|
const state = this.require(params.accountName);
|
|
@@ -17664,6 +19935,60 @@ var MockYieldTracker = class {
|
|
|
17664
19935
|
amount: signed
|
|
17665
19936
|
});
|
|
17666
19937
|
}
|
|
19938
|
+
async createYieldPayment(params) {
|
|
19939
|
+
const state = this.require(params.accountName);
|
|
19940
|
+
if (!(params.amount > 0)) throw new Error("Yield payment must be positive");
|
|
19941
|
+
const existing = state.yieldPayments.find(
|
|
19942
|
+
(payment) => payment.paymentId === params.paymentId
|
|
19943
|
+
);
|
|
19944
|
+
if (existing) {
|
|
19945
|
+
if (existing.amount !== params.amount || existing.effectiveAt !== params.effectiveAt.getTime()) {
|
|
19946
|
+
throw new Error(
|
|
19947
|
+
`Yield payment "${params.paymentId}" already exists with different details`
|
|
19948
|
+
);
|
|
19949
|
+
}
|
|
19950
|
+
return;
|
|
19951
|
+
}
|
|
19952
|
+
state.yieldPayments.push({
|
|
19953
|
+
paymentId: params.paymentId,
|
|
19954
|
+
amount: params.amount,
|
|
19955
|
+
effectiveAt: params.effectiveAt.getTime(),
|
|
19956
|
+
status: "pending"
|
|
19957
|
+
});
|
|
19958
|
+
}
|
|
19959
|
+
async confirmYieldPayment(params) {
|
|
19960
|
+
const state = this.require(params.accountName);
|
|
19961
|
+
const payment = state.yieldPayments.find(
|
|
19962
|
+
(candidate) => candidate.paymentId === params.paymentId
|
|
19963
|
+
);
|
|
19964
|
+
if (!payment)
|
|
19965
|
+
throw new Error(`Unknown yield payment "${params.paymentId}"`);
|
|
19966
|
+
if (payment.status === "confirmed") {
|
|
19967
|
+
if (payment.transactionSignature !== params.transactionSignature) {
|
|
19968
|
+
throw new Error(
|
|
19969
|
+
"Yield payment already confirmed with another signature"
|
|
19970
|
+
);
|
|
19971
|
+
}
|
|
19972
|
+
return;
|
|
19973
|
+
}
|
|
19974
|
+
const chronologicalPayments = state.yieldPayments.filter(
|
|
19975
|
+
(candidate) => candidate.status === "confirmed" || candidate === payment
|
|
19976
|
+
).sort((a, b) => a.effectiveAt - b.effectiveAt);
|
|
19977
|
+
let cumulativePaid = 0;
|
|
19978
|
+
for (const candidate of chronologicalPayments) {
|
|
19979
|
+
cumulativePaid += candidate.amount;
|
|
19980
|
+
const snapshot = await this.getYield(
|
|
19981
|
+
params.accountName,
|
|
19982
|
+
void 0,
|
|
19983
|
+
new Date(candidate.effectiveAt)
|
|
19984
|
+
);
|
|
19985
|
+
if (cumulativePaid > snapshot.totalYield + 1e-9) {
|
|
19986
|
+
throw new Error("Confirmed payment exceeds accrued unpaid yield");
|
|
19987
|
+
}
|
|
19988
|
+
}
|
|
19989
|
+
payment.status = "confirmed";
|
|
19990
|
+
payment.transactionSignature = params.transactionSignature;
|
|
19991
|
+
}
|
|
17667
19992
|
};
|
|
17668
19993
|
|
|
17669
19994
|
// src/services/externalLiquidityIntegrityService.ts
|
|
@@ -17921,6 +20246,7 @@ var ExternalLiquidityIntegrityService = class {
|
|
|
17921
20246
|
UpdateConsensusSignersBuilder,
|
|
17922
20247
|
UpdateTrancheConfigBuilder,
|
|
17923
20248
|
VAULT_CACHE_CATEGORY,
|
|
20249
|
+
VAULT_CREATOR_WHITELIST,
|
|
17924
20250
|
VAULT_ENVIRONMENTS,
|
|
17925
20251
|
VAULT_ORACLE_CACHE_CATEGORY,
|
|
17926
20252
|
VAULT_PROGRAM_ID,
|
|
@@ -17936,12 +20262,14 @@ var ExternalLiquidityIntegrityService = class {
|
|
|
17936
20262
|
WithdrawalQueueService,
|
|
17937
20263
|
addCashflowUpdate,
|
|
17938
20264
|
address,
|
|
20265
|
+
confirmYieldPayment,
|
|
17939
20266
|
createAccount,
|
|
17940
20267
|
createLiveConsensusOracleDeps,
|
|
17941
20268
|
createRpcFromConnection,
|
|
17942
20269
|
createTokenMint,
|
|
17943
20270
|
createTokenMintIxs,
|
|
17944
20271
|
createVaultClient,
|
|
20272
|
+
createYieldPayment,
|
|
17945
20273
|
dateToStr,
|
|
17946
20274
|
defaultKeypairPath,
|
|
17947
20275
|
deleteAccount,
|
|
@@ -17950,9 +20278,11 @@ var ExternalLiquidityIntegrityService = class {
|
|
|
17950
20278
|
getBalance,
|
|
17951
20279
|
getCashflows,
|
|
17952
20280
|
getRpcUrl,
|
|
20281
|
+
getTotalOutstandingYield,
|
|
17953
20282
|
getTotalYield,
|
|
17954
20283
|
getVaultProgramId,
|
|
17955
20284
|
getYield,
|
|
20285
|
+
getYieldPayments,
|
|
17956
20286
|
isVaultEnv,
|
|
17957
20287
|
keypairAddress,
|
|
17958
20288
|
loadKeypair,
|