@neutral-trade/sdk 0.4.8 → 0.4.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +31 -4
- package/dist/index.mjs +10 -4
- package/dist/internal.d.mts +2 -2
- package/dist/internal.mjs +2 -2
- package/dist/{neutral-trade-core-BGjOiCsY.d.mts → neutral-trade-core-B_KCeEMm.d.mts} +613 -2
- package/dist/{neutral-trade-core-B8iDgu5K.mjs → neutral-trade-core-DCc6Dvgi.mjs} +1459 -252
- package/package.json +1 -1
|
@@ -175,6 +175,37 @@ interface Ntbundle {
|
|
|
175
175
|
name: 'clearMask';
|
|
176
176
|
type: 'u8';
|
|
177
177
|
}];
|
|
178
|
+
}, {
|
|
179
|
+
name: 'clearUserWithdrawalTimingOverride';
|
|
180
|
+
discriminator: [203, 96, 230, 216, 217, 104, 244, 74];
|
|
181
|
+
accounts: [{
|
|
182
|
+
name: 'manager';
|
|
183
|
+
writable: true;
|
|
184
|
+
signer: true;
|
|
185
|
+
}, {
|
|
186
|
+
name: 'userBundleAccountOwner';
|
|
187
|
+
}, {
|
|
188
|
+
name: 'userBundleAccount';
|
|
189
|
+
writable: true;
|
|
190
|
+
pda: {
|
|
191
|
+
seeds: [{
|
|
192
|
+
kind: 'const';
|
|
193
|
+
value: [85, 83, 69, 82, 95, 66, 85, 78, 68, 76, 69];
|
|
194
|
+
}, {
|
|
195
|
+
kind: 'account';
|
|
196
|
+
path: 'userBundleAccountOwner';
|
|
197
|
+
}, {
|
|
198
|
+
kind: 'account';
|
|
199
|
+
path: 'bundleAccount';
|
|
200
|
+
}];
|
|
201
|
+
};
|
|
202
|
+
}, {
|
|
203
|
+
name: 'bundleAccount';
|
|
204
|
+
}];
|
|
205
|
+
args: [{
|
|
206
|
+
name: 'clearMask';
|
|
207
|
+
type: 'u8';
|
|
208
|
+
}];
|
|
178
209
|
}, {
|
|
179
210
|
name: 'closeUserBundleAccount';
|
|
180
211
|
discriminator: [201, 195, 126, 228, 9, 173, 79, 215];
|
|
@@ -991,6 +1022,178 @@ interface Ntbundle {
|
|
|
991
1022
|
address: '11111111111111111111111111111111';
|
|
992
1023
|
}];
|
|
993
1024
|
args: [];
|
|
1025
|
+
}, {
|
|
1026
|
+
name: 'processSwitch';
|
|
1027
|
+
discriminator: [186, 170, 0, 66, 104, 81, 57, 195];
|
|
1028
|
+
accounts: [{
|
|
1029
|
+
name: 'keeper';
|
|
1030
|
+
writable: true;
|
|
1031
|
+
signer: true;
|
|
1032
|
+
}, {
|
|
1033
|
+
name: 'userBundleAccountOwner';
|
|
1034
|
+
}, {
|
|
1035
|
+
name: 'userTokenAccount';
|
|
1036
|
+
writable: true;
|
|
1037
|
+
}, {
|
|
1038
|
+
name: 'assetAddress';
|
|
1039
|
+
writable: true;
|
|
1040
|
+
}, {
|
|
1041
|
+
name: 'sourceBundleAssetAccount';
|
|
1042
|
+
writable: true;
|
|
1043
|
+
pda: {
|
|
1044
|
+
seeds: [{
|
|
1045
|
+
kind: 'account';
|
|
1046
|
+
path: 'sourceBundleAssetAuthority';
|
|
1047
|
+
}, {
|
|
1048
|
+
kind: 'const';
|
|
1049
|
+
value: [6, 221, 246, 225, 215, 101, 161, 147, 217, 203, 225, 70, 206, 235, 121, 172, 28, 180, 133, 237, 95, 91, 55, 145, 58, 140, 245, 133, 126, 255, 0, 169];
|
|
1050
|
+
}, {
|
|
1051
|
+
kind: 'account';
|
|
1052
|
+
path: 'assetAddress';
|
|
1053
|
+
}];
|
|
1054
|
+
program: {
|
|
1055
|
+
kind: 'const';
|
|
1056
|
+
value: [140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89];
|
|
1057
|
+
};
|
|
1058
|
+
};
|
|
1059
|
+
}, {
|
|
1060
|
+
name: 'sourceUserBundleAccount';
|
|
1061
|
+
writable: true;
|
|
1062
|
+
pda: {
|
|
1063
|
+
seeds: [{
|
|
1064
|
+
kind: 'const';
|
|
1065
|
+
value: [85, 83, 69, 82, 95, 66, 85, 78, 68, 76, 69];
|
|
1066
|
+
}, {
|
|
1067
|
+
kind: 'account';
|
|
1068
|
+
path: 'userBundleAccountOwner';
|
|
1069
|
+
}, {
|
|
1070
|
+
kind: 'account';
|
|
1071
|
+
path: 'sourceBundleAccount';
|
|
1072
|
+
}];
|
|
1073
|
+
};
|
|
1074
|
+
}, {
|
|
1075
|
+
name: 'sourceTreasuryAccount';
|
|
1076
|
+
writable: true;
|
|
1077
|
+
}, {
|
|
1078
|
+
name: 'sourceBundleAssetAuthority';
|
|
1079
|
+
writable: true;
|
|
1080
|
+
pda: {
|
|
1081
|
+
seeds: [{
|
|
1082
|
+
kind: 'const';
|
|
1083
|
+
value: [66, 85, 78, 68, 76, 69, 95, 65, 83, 83, 69, 84, 95, 65, 85, 84, 72, 79, 82, 73, 84, 89];
|
|
1084
|
+
}, {
|
|
1085
|
+
kind: 'account';
|
|
1086
|
+
path: 'sourceBundleAccount';
|
|
1087
|
+
}];
|
|
1088
|
+
};
|
|
1089
|
+
}, {
|
|
1090
|
+
name: 'sourceBundleAccount';
|
|
1091
|
+
writable: true;
|
|
1092
|
+
}, {
|
|
1093
|
+
name: 'sourceBundleTempData';
|
|
1094
|
+
writable: true;
|
|
1095
|
+
pda: {
|
|
1096
|
+
seeds: [{
|
|
1097
|
+
kind: 'const';
|
|
1098
|
+
value: [66, 85, 78, 68, 76, 69, 95, 84, 69, 77, 80, 95, 68, 65, 84, 65];
|
|
1099
|
+
}, {
|
|
1100
|
+
kind: 'account';
|
|
1101
|
+
path: 'sourceBundleAccount';
|
|
1102
|
+
}];
|
|
1103
|
+
};
|
|
1104
|
+
}, {
|
|
1105
|
+
name: 'sourceOracleData';
|
|
1106
|
+
writable: true;
|
|
1107
|
+
pda: {
|
|
1108
|
+
seeds: [{
|
|
1109
|
+
kind: 'const';
|
|
1110
|
+
value: [79, 82, 65, 67, 76, 69];
|
|
1111
|
+
}, {
|
|
1112
|
+
kind: 'account';
|
|
1113
|
+
path: 'sourceBundleAccount';
|
|
1114
|
+
}];
|
|
1115
|
+
};
|
|
1116
|
+
}, {
|
|
1117
|
+
name: 'targetBundleAccount';
|
|
1118
|
+
}, {
|
|
1119
|
+
name: 'targetUserBundleAccount';
|
|
1120
|
+
writable: true;
|
|
1121
|
+
pda: {
|
|
1122
|
+
seeds: [{
|
|
1123
|
+
kind: 'const';
|
|
1124
|
+
value: [85, 83, 69, 82, 95, 66, 85, 78, 68, 76, 69];
|
|
1125
|
+
}, {
|
|
1126
|
+
kind: 'account';
|
|
1127
|
+
path: 'userBundleAccountOwner';
|
|
1128
|
+
}, {
|
|
1129
|
+
kind: 'account';
|
|
1130
|
+
path: 'targetBundleAccount';
|
|
1131
|
+
}];
|
|
1132
|
+
};
|
|
1133
|
+
}, {
|
|
1134
|
+
name: 'targetBundleTempData';
|
|
1135
|
+
writable: true;
|
|
1136
|
+
pda: {
|
|
1137
|
+
seeds: [{
|
|
1138
|
+
kind: 'const';
|
|
1139
|
+
value: [66, 85, 78, 68, 76, 69, 95, 84, 69, 77, 80, 95, 68, 65, 84, 65];
|
|
1140
|
+
}, {
|
|
1141
|
+
kind: 'account';
|
|
1142
|
+
path: 'targetBundleAccount';
|
|
1143
|
+
}];
|
|
1144
|
+
};
|
|
1145
|
+
}, {
|
|
1146
|
+
name: 'targetPendingDepositTokenAccount';
|
|
1147
|
+
writable: true;
|
|
1148
|
+
pda: {
|
|
1149
|
+
seeds: [{
|
|
1150
|
+
kind: 'account';
|
|
1151
|
+
path: 'targetPendingBundleAssetAuthority';
|
|
1152
|
+
}, {
|
|
1153
|
+
kind: 'const';
|
|
1154
|
+
value: [6, 221, 246, 225, 215, 101, 161, 147, 217, 203, 225, 70, 206, 235, 121, 172, 28, 180, 133, 237, 95, 91, 55, 145, 58, 140, 245, 133, 126, 255, 0, 169];
|
|
1155
|
+
}, {
|
|
1156
|
+
kind: 'account';
|
|
1157
|
+
path: 'assetAddress';
|
|
1158
|
+
}];
|
|
1159
|
+
program: {
|
|
1160
|
+
kind: 'const';
|
|
1161
|
+
value: [140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89];
|
|
1162
|
+
};
|
|
1163
|
+
};
|
|
1164
|
+
}, {
|
|
1165
|
+
name: 'targetPendingBundleAssetAuthority';
|
|
1166
|
+
pda: {
|
|
1167
|
+
seeds: [{
|
|
1168
|
+
kind: 'const';
|
|
1169
|
+
value: [80, 69, 78, 68, 73, 78, 71, 95, 66, 85, 78, 68, 76, 69, 95, 65, 83, 83, 69, 84, 95, 65, 85, 84, 72, 79, 82, 73, 84, 89];
|
|
1170
|
+
}, {
|
|
1171
|
+
kind: 'account';
|
|
1172
|
+
path: 'targetBundleAccount';
|
|
1173
|
+
}];
|
|
1174
|
+
};
|
|
1175
|
+
}, {
|
|
1176
|
+
name: 'targetOracleData';
|
|
1177
|
+
pda: {
|
|
1178
|
+
seeds: [{
|
|
1179
|
+
kind: 'const';
|
|
1180
|
+
value: [79, 82, 65, 67, 76, 69];
|
|
1181
|
+
}, {
|
|
1182
|
+
kind: 'account';
|
|
1183
|
+
path: 'targetBundleAccount';
|
|
1184
|
+
}];
|
|
1185
|
+
};
|
|
1186
|
+
}, {
|
|
1187
|
+
name: 'targetTreasuryAccount';
|
|
1188
|
+
writable: true;
|
|
1189
|
+
}, {
|
|
1190
|
+
name: 'tokenProgram';
|
|
1191
|
+
address: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA';
|
|
1192
|
+
}, {
|
|
1193
|
+
name: 'systemProgram';
|
|
1194
|
+
address: '11111111111111111111111111111111';
|
|
1195
|
+
}];
|
|
1196
|
+
args: [];
|
|
994
1197
|
}, {
|
|
995
1198
|
name: 'processWithdrawal';
|
|
996
1199
|
discriminator: [51, 97, 236, 17, 37, 33, 196, 64];
|
|
@@ -1220,6 +1423,89 @@ interface Ntbundle {
|
|
|
1220
1423
|
address: '11111111111111111111111111111111';
|
|
1221
1424
|
}];
|
|
1222
1425
|
args: [];
|
|
1426
|
+
}, {
|
|
1427
|
+
name: 'requestBundleSwitch';
|
|
1428
|
+
discriminator: [66, 9, 104, 111, 227, 251, 51, 176];
|
|
1429
|
+
accounts: [{
|
|
1430
|
+
name: 'withdrawalRequest';
|
|
1431
|
+
accounts: [{
|
|
1432
|
+
name: 'user';
|
|
1433
|
+
writable: true;
|
|
1434
|
+
signer: true;
|
|
1435
|
+
}, {
|
|
1436
|
+
name: 'userBundleAccount';
|
|
1437
|
+
writable: true;
|
|
1438
|
+
pda: {
|
|
1439
|
+
seeds: [{
|
|
1440
|
+
kind: 'const';
|
|
1441
|
+
value: [85, 83, 69, 82, 95, 66, 85, 78, 68, 76, 69];
|
|
1442
|
+
}, {
|
|
1443
|
+
kind: 'account';
|
|
1444
|
+
path: 'user';
|
|
1445
|
+
}, {
|
|
1446
|
+
kind: 'account';
|
|
1447
|
+
path: 'bundleAccount';
|
|
1448
|
+
}];
|
|
1449
|
+
};
|
|
1450
|
+
}, {
|
|
1451
|
+
name: 'bundleAccount';
|
|
1452
|
+
writable: true;
|
|
1453
|
+
}, {
|
|
1454
|
+
name: 'oracleData';
|
|
1455
|
+
writable: true;
|
|
1456
|
+
pda: {
|
|
1457
|
+
seeds: [{
|
|
1458
|
+
kind: 'const';
|
|
1459
|
+
value: [79, 82, 65, 67, 76, 69];
|
|
1460
|
+
}, {
|
|
1461
|
+
kind: 'account';
|
|
1462
|
+
path: 'bundleAccount';
|
|
1463
|
+
}];
|
|
1464
|
+
};
|
|
1465
|
+
}, {
|
|
1466
|
+
name: 'bundleTempData';
|
|
1467
|
+
writable: true;
|
|
1468
|
+
pda: {
|
|
1469
|
+
seeds: [{
|
|
1470
|
+
kind: 'const';
|
|
1471
|
+
value: [66, 85, 78, 68, 76, 69, 95, 84, 69, 77, 80, 95, 68, 65, 84, 65];
|
|
1472
|
+
}, {
|
|
1473
|
+
kind: 'account';
|
|
1474
|
+
path: 'bundleAccount';
|
|
1475
|
+
}];
|
|
1476
|
+
};
|
|
1477
|
+
}, {
|
|
1478
|
+
name: 'tokenProgram';
|
|
1479
|
+
address: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA';
|
|
1480
|
+
}, {
|
|
1481
|
+
name: 'systemProgram';
|
|
1482
|
+
address: '11111111111111111111111111111111';
|
|
1483
|
+
}, {
|
|
1484
|
+
name: 'rent';
|
|
1485
|
+
address: 'SysvarRent111111111111111111111111111111111';
|
|
1486
|
+
}];
|
|
1487
|
+
}, {
|
|
1488
|
+
name: 'targetBundleAccount';
|
|
1489
|
+
}, {
|
|
1490
|
+
name: 'targetUserBundleAccount';
|
|
1491
|
+
pda: {
|
|
1492
|
+
seeds: [{
|
|
1493
|
+
kind: 'const';
|
|
1494
|
+
value: [85, 83, 69, 82, 95, 66, 85, 78, 68, 76, 69];
|
|
1495
|
+
}, {
|
|
1496
|
+
kind: 'account';
|
|
1497
|
+
path: 'withdrawal_request.user';
|
|
1498
|
+
account: 'requestWithdrawal';
|
|
1499
|
+
}, {
|
|
1500
|
+
kind: 'account';
|
|
1501
|
+
path: 'targetBundleAccount';
|
|
1502
|
+
}];
|
|
1503
|
+
};
|
|
1504
|
+
}];
|
|
1505
|
+
args: [{
|
|
1506
|
+
name: 'sharesAmount';
|
|
1507
|
+
type: 'u128';
|
|
1508
|
+
}];
|
|
1223
1509
|
}, {
|
|
1224
1510
|
name: 'requestDeposit';
|
|
1225
1511
|
discriminator: [243, 202, 197, 215, 135, 97, 213, 109];
|
|
@@ -1606,6 +1892,49 @@ interface Ntbundle {
|
|
|
1606
1892
|
name: 'customManagementFeeBps';
|
|
1607
1893
|
type: 'u32';
|
|
1608
1894
|
}];
|
|
1895
|
+
}, {
|
|
1896
|
+
name: 'setUserWithdrawalTimingOverride';
|
|
1897
|
+
discriminator: [21, 31, 116, 121, 140, 237, 174, 244];
|
|
1898
|
+
accounts: [{
|
|
1899
|
+
name: 'manager';
|
|
1900
|
+
writable: true;
|
|
1901
|
+
signer: true;
|
|
1902
|
+
}, {
|
|
1903
|
+
name: 'userBundleAccountOwner';
|
|
1904
|
+
}, {
|
|
1905
|
+
name: 'userBundleAccount';
|
|
1906
|
+
writable: true;
|
|
1907
|
+
pda: {
|
|
1908
|
+
seeds: [{
|
|
1909
|
+
kind: 'const';
|
|
1910
|
+
value: [85, 83, 69, 82, 95, 66, 85, 78, 68, 76, 69];
|
|
1911
|
+
}, {
|
|
1912
|
+
kind: 'account';
|
|
1913
|
+
path: 'userBundleAccountOwner';
|
|
1914
|
+
}, {
|
|
1915
|
+
kind: 'account';
|
|
1916
|
+
path: 'bundleAccount';
|
|
1917
|
+
}];
|
|
1918
|
+
};
|
|
1919
|
+
}, {
|
|
1920
|
+
name: 'bundleAccount';
|
|
1921
|
+
}];
|
|
1922
|
+
args: [{
|
|
1923
|
+
name: 'overrideMask';
|
|
1924
|
+
type: 'u8';
|
|
1925
|
+
}, {
|
|
1926
|
+
name: 'customWithdrawalDelay';
|
|
1927
|
+
type: 'u64';
|
|
1928
|
+
}, {
|
|
1929
|
+
name: 'customWithdrawalTMin';
|
|
1930
|
+
type: 'i64';
|
|
1931
|
+
}, {
|
|
1932
|
+
name: 'customWithdrawalTMax';
|
|
1933
|
+
type: 'i64';
|
|
1934
|
+
}, {
|
|
1935
|
+
name: 'customWithdrawalCurve';
|
|
1936
|
+
type: 'f32';
|
|
1937
|
+
}];
|
|
1609
1938
|
}, {
|
|
1610
1939
|
name: 'setWithdrawalRedemptionSchedule';
|
|
1611
1940
|
discriminator: [134, 108, 237, 103, 185, 13, 177, 105];
|
|
@@ -1785,6 +2114,15 @@ interface Ntbundle {
|
|
|
1785
2114
|
}, {
|
|
1786
2115
|
name: 'bundleMasterAdminChanged';
|
|
1787
2116
|
discriminator: [220, 192, 90, 93, 19, 132, 73, 208];
|
|
2117
|
+
}, {
|
|
2118
|
+
name: 'bundleSwitchCompleted';
|
|
2119
|
+
discriminator: [189, 237, 164, 90, 103, 174, 64, 73];
|
|
2120
|
+
}, {
|
|
2121
|
+
name: 'bundleSwitchFallbackToWallet';
|
|
2122
|
+
discriminator: [214, 242, 67, 218, 119, 180, 28, 139];
|
|
2123
|
+
}, {
|
|
2124
|
+
name: 'bundleSwitchRequested';
|
|
2125
|
+
discriminator: [88, 172, 46, 180, 196, 3, 226, 44];
|
|
1788
2126
|
}, {
|
|
1789
2127
|
name: 'changedCoreParams';
|
|
1790
2128
|
discriminator: [156, 119, 46, 221, 22, 121, 186, 53];
|
|
@@ -1884,6 +2222,12 @@ interface Ntbundle {
|
|
|
1884
2222
|
}, {
|
|
1885
2223
|
name: 'userFeeOverrideSet';
|
|
1886
2224
|
discriminator: [194, 56, 240, 83, 158, 247, 78, 66];
|
|
2225
|
+
}, {
|
|
2226
|
+
name: 'userWithdrawalTimingOverrideCleared';
|
|
2227
|
+
discriminator: [78, 111, 250, 12, 64, 54, 226, 251];
|
|
2228
|
+
}, {
|
|
2229
|
+
name: 'userWithdrawalTimingOverrideSet';
|
|
2230
|
+
discriminator: [119, 165, 226, 212, 49, 249, 115, 145];
|
|
1887
2231
|
}, {
|
|
1888
2232
|
name: 'vaultNeutralFeeIncrementerSet';
|
|
1889
2233
|
discriminator: [7, 53, 169, 104, 118, 22, 134, 207];
|
|
@@ -2193,6 +2537,42 @@ interface Ntbundle {
|
|
|
2193
2537
|
code: 6073;
|
|
2194
2538
|
name: 'noUserFeeOverrideToClear';
|
|
2195
2539
|
msg: 'No user fee override to clear';
|
|
2540
|
+
}, {
|
|
2541
|
+
code: 6074;
|
|
2542
|
+
name: 'invalidUserWithdrawalTimingConfig';
|
|
2543
|
+
msg: 'Invalid user withdrawal timing configuration';
|
|
2544
|
+
}, {
|
|
2545
|
+
code: 6075;
|
|
2546
|
+
name: 'emptyUserWithdrawalTimingClearRequest';
|
|
2547
|
+
msg: 'Empty user withdrawal timing clear request';
|
|
2548
|
+
}, {
|
|
2549
|
+
code: 6076;
|
|
2550
|
+
name: 'noUserWithdrawalTimingOverrideToClear';
|
|
2551
|
+
msg: 'No user withdrawal timing override to clear';
|
|
2552
|
+
}, {
|
|
2553
|
+
code: 6077;
|
|
2554
|
+
name: 'switchTargetSameAsSource';
|
|
2555
|
+
msg: 'Switch target cannot be source bundle';
|
|
2556
|
+
}, {
|
|
2557
|
+
code: 6078;
|
|
2558
|
+
name: 'switchAssetMintMismatch';
|
|
2559
|
+
msg: 'Switch asset mint mismatch';
|
|
2560
|
+
}, {
|
|
2561
|
+
code: 6079;
|
|
2562
|
+
name: 'switchAlreadyActive';
|
|
2563
|
+
msg: 'Switch already active';
|
|
2564
|
+
}, {
|
|
2565
|
+
code: 6080;
|
|
2566
|
+
name: 'noPendingSwitch';
|
|
2567
|
+
msg: 'No pending switch';
|
|
2568
|
+
}, {
|
|
2569
|
+
code: 6081;
|
|
2570
|
+
name: 'switchTargetAccountsMissing';
|
|
2571
|
+
msg: 'Switch target accounts missing';
|
|
2572
|
+
}, {
|
|
2573
|
+
code: 6082;
|
|
2574
|
+
name: 'switchTargetAccountMismatch';
|
|
2575
|
+
msg: 'Switch target account mismatch';
|
|
2196
2576
|
}];
|
|
2197
2577
|
types: [{
|
|
2198
2578
|
name: 'allocated';
|
|
@@ -2441,6 +2821,126 @@ interface Ntbundle {
|
|
|
2441
2821
|
type: 'pubkey';
|
|
2442
2822
|
}];
|
|
2443
2823
|
};
|
|
2824
|
+
}, {
|
|
2825
|
+
name: 'bundleSwitchCompleted';
|
|
2826
|
+
type: {
|
|
2827
|
+
kind: 'struct';
|
|
2828
|
+
fields: [{
|
|
2829
|
+
name: 'user';
|
|
2830
|
+
type: 'pubkey';
|
|
2831
|
+
}, {
|
|
2832
|
+
name: 'sourceBundle';
|
|
2833
|
+
type: 'pubkey';
|
|
2834
|
+
}, {
|
|
2835
|
+
name: 'targetBundle';
|
|
2836
|
+
type: 'pubkey';
|
|
2837
|
+
}, {
|
|
2838
|
+
name: 'sharesRedeemed';
|
|
2839
|
+
type: 'u128';
|
|
2840
|
+
}, {
|
|
2841
|
+
name: 'grossRedemption';
|
|
2842
|
+
type: 'u64';
|
|
2843
|
+
}, {
|
|
2844
|
+
name: 'netToDestination';
|
|
2845
|
+
type: 'u64';
|
|
2846
|
+
}, {
|
|
2847
|
+
name: 'netCreditedToDestination';
|
|
2848
|
+
type: 'u64';
|
|
2849
|
+
}, {
|
|
2850
|
+
name: 'withdrawalFeeA';
|
|
2851
|
+
type: 'u64';
|
|
2852
|
+
}, {
|
|
2853
|
+
name: 'depositFeeB';
|
|
2854
|
+
type: 'u64';
|
|
2855
|
+
}, {
|
|
2856
|
+
name: 'sharePrice';
|
|
2857
|
+
type: 'u128';
|
|
2858
|
+
}, {
|
|
2859
|
+
name: 'userSharesBefore';
|
|
2860
|
+
type: 'u128';
|
|
2861
|
+
}, {
|
|
2862
|
+
name: 'userSharesAfter';
|
|
2863
|
+
type: 'u128';
|
|
2864
|
+
}, {
|
|
2865
|
+
name: 'totalSharesBefore';
|
|
2866
|
+
type: 'u128';
|
|
2867
|
+
}, {
|
|
2868
|
+
name: 'totalSharesAfter';
|
|
2869
|
+
type: 'u128';
|
|
2870
|
+
}, {
|
|
2871
|
+
name: 'timestamp';
|
|
2872
|
+
type: 'i64';
|
|
2873
|
+
}];
|
|
2874
|
+
};
|
|
2875
|
+
}, {
|
|
2876
|
+
name: 'bundleSwitchFallbackToWallet';
|
|
2877
|
+
type: {
|
|
2878
|
+
kind: 'struct';
|
|
2879
|
+
fields: [{
|
|
2880
|
+
name: 'user';
|
|
2881
|
+
type: 'pubkey';
|
|
2882
|
+
}, {
|
|
2883
|
+
name: 'sourceBundle';
|
|
2884
|
+
type: 'pubkey';
|
|
2885
|
+
}, {
|
|
2886
|
+
name: 'targetBundle';
|
|
2887
|
+
type: 'pubkey';
|
|
2888
|
+
}, {
|
|
2889
|
+
name: 'sharesRedeemed';
|
|
2890
|
+
type: 'u128';
|
|
2891
|
+
}, {
|
|
2892
|
+
name: 'grossRedemption';
|
|
2893
|
+
type: 'u64';
|
|
2894
|
+
}, {
|
|
2895
|
+
name: 'netToWallet';
|
|
2896
|
+
type: 'u64';
|
|
2897
|
+
}, {
|
|
2898
|
+
name: 'withdrawalFeeA';
|
|
2899
|
+
type: 'u64';
|
|
2900
|
+
}, {
|
|
2901
|
+
name: 'reason';
|
|
2902
|
+
type: 'u8';
|
|
2903
|
+
}, {
|
|
2904
|
+
name: 'timestamp';
|
|
2905
|
+
type: 'i64';
|
|
2906
|
+
}];
|
|
2907
|
+
};
|
|
2908
|
+
}, {
|
|
2909
|
+
name: 'bundleSwitchRequested';
|
|
2910
|
+
type: {
|
|
2911
|
+
kind: 'struct';
|
|
2912
|
+
fields: [{
|
|
2913
|
+
name: 'user';
|
|
2914
|
+
type: 'pubkey';
|
|
2915
|
+
}, {
|
|
2916
|
+
name: 'sourceBundle';
|
|
2917
|
+
type: 'pubkey';
|
|
2918
|
+
}, {
|
|
2919
|
+
name: 'targetBundle';
|
|
2920
|
+
type: 'pubkey';
|
|
2921
|
+
}, {
|
|
2922
|
+
name: 'sharesAmount';
|
|
2923
|
+
type: 'u128';
|
|
2924
|
+
}, {
|
|
2925
|
+
name: 'estimatedGrossRedemption';
|
|
2926
|
+
type: 'u64';
|
|
2927
|
+
}, {
|
|
2928
|
+
name: 'estimatedNetToDestination';
|
|
2929
|
+
type: 'u64';
|
|
2930
|
+
}, {
|
|
2931
|
+
name: 'estimatedDestinationDepositFee';
|
|
2932
|
+
type: 'u64';
|
|
2933
|
+
}, {
|
|
2934
|
+
name: 'estimatedDestinationPendingDeposit';
|
|
2935
|
+
type: 'u64';
|
|
2936
|
+
}, {
|
|
2937
|
+
name: 'cooldownEndTimestamp';
|
|
2938
|
+
type: 'i64';
|
|
2939
|
+
}, {
|
|
2940
|
+
name: 'timestamp';
|
|
2941
|
+
type: 'i64';
|
|
2942
|
+
}];
|
|
2943
|
+
};
|
|
2444
2944
|
}, {
|
|
2445
2945
|
name: 'bundleTempData';
|
|
2446
2946
|
type: {
|
|
@@ -3018,10 +3518,34 @@ interface Ntbundle {
|
|
|
3018
3518
|
}, {
|
|
3019
3519
|
name: 'feeOverrideFlags';
|
|
3020
3520
|
type: 'u8';
|
|
3521
|
+
}, {
|
|
3522
|
+
name: 'customWithdrawalDelay';
|
|
3523
|
+
type: 'u64';
|
|
3524
|
+
}, {
|
|
3525
|
+
name: 'customWithdrawalTMin';
|
|
3526
|
+
type: 'i64';
|
|
3527
|
+
}, {
|
|
3528
|
+
name: 'customWithdrawalTMax';
|
|
3529
|
+
type: 'i64';
|
|
3530
|
+
}, {
|
|
3531
|
+
name: 'customWithdrawalCurve';
|
|
3532
|
+
type: 'f32';
|
|
3533
|
+
}, {
|
|
3534
|
+
name: 'withdrawalTimingOverrideFlags';
|
|
3535
|
+
type: 'u8';
|
|
3536
|
+
}, {
|
|
3537
|
+
name: 'switchActive';
|
|
3538
|
+
type: 'bool';
|
|
3539
|
+
}, {
|
|
3540
|
+
name: 'switchTargetBundle';
|
|
3541
|
+
type: 'pubkey';
|
|
3542
|
+
}, {
|
|
3543
|
+
name: 'switchCreatedAt';
|
|
3544
|
+
type: 'i64';
|
|
3021
3545
|
}, {
|
|
3022
3546
|
name: 'padding';
|
|
3023
3547
|
type: {
|
|
3024
|
-
array: ['u8',
|
|
3548
|
+
array: ['u8', 177];
|
|
3025
3549
|
};
|
|
3026
3550
|
}];
|
|
3027
3551
|
};
|
|
@@ -3106,6 +3630,72 @@ interface Ntbundle {
|
|
|
3106
3630
|
type: 'i64';
|
|
3107
3631
|
}];
|
|
3108
3632
|
};
|
|
3633
|
+
}, {
|
|
3634
|
+
name: 'userWithdrawalTimingOverrideCleared';
|
|
3635
|
+
type: {
|
|
3636
|
+
kind: 'struct';
|
|
3637
|
+
fields: [{
|
|
3638
|
+
name: 'manager';
|
|
3639
|
+
type: 'pubkey';
|
|
3640
|
+
}, {
|
|
3641
|
+
name: 'user';
|
|
3642
|
+
type: 'pubkey';
|
|
3643
|
+
}, {
|
|
3644
|
+
name: 'bundleAccountKey';
|
|
3645
|
+
type: 'pubkey';
|
|
3646
|
+
}, {
|
|
3647
|
+
name: 'clearMask';
|
|
3648
|
+
type: 'u8';
|
|
3649
|
+
}, {
|
|
3650
|
+
name: 'previousFlags';
|
|
3651
|
+
type: 'u8';
|
|
3652
|
+
}, {
|
|
3653
|
+
name: 'newFlags';
|
|
3654
|
+
type: 'u8';
|
|
3655
|
+
}, {
|
|
3656
|
+
name: 'timestamp';
|
|
3657
|
+
type: 'i64';
|
|
3658
|
+
}];
|
|
3659
|
+
};
|
|
3660
|
+
}, {
|
|
3661
|
+
name: 'userWithdrawalTimingOverrideSet';
|
|
3662
|
+
type: {
|
|
3663
|
+
kind: 'struct';
|
|
3664
|
+
fields: [{
|
|
3665
|
+
name: 'manager';
|
|
3666
|
+
type: 'pubkey';
|
|
3667
|
+
}, {
|
|
3668
|
+
name: 'user';
|
|
3669
|
+
type: 'pubkey';
|
|
3670
|
+
}, {
|
|
3671
|
+
name: 'bundleAccountKey';
|
|
3672
|
+
type: 'pubkey';
|
|
3673
|
+
}, {
|
|
3674
|
+
name: 'overrideMask';
|
|
3675
|
+
type: 'u8';
|
|
3676
|
+
}, {
|
|
3677
|
+
name: 'previousFlags';
|
|
3678
|
+
type: 'u8';
|
|
3679
|
+
}, {
|
|
3680
|
+
name: 'newFlags';
|
|
3681
|
+
type: 'u8';
|
|
3682
|
+
}, {
|
|
3683
|
+
name: 'customWithdrawalDelay';
|
|
3684
|
+
type: 'u64';
|
|
3685
|
+
}, {
|
|
3686
|
+
name: 'customWithdrawalTMin';
|
|
3687
|
+
type: 'i64';
|
|
3688
|
+
}, {
|
|
3689
|
+
name: 'customWithdrawalTMax';
|
|
3690
|
+
type: 'i64';
|
|
3691
|
+
}, {
|
|
3692
|
+
name: 'customWithdrawalCurve';
|
|
3693
|
+
type: 'f32';
|
|
3694
|
+
}, {
|
|
3695
|
+
name: 'timestamp';
|
|
3696
|
+
type: 'i64';
|
|
3697
|
+
}];
|
|
3698
|
+
};
|
|
3109
3699
|
}, {
|
|
3110
3700
|
name: 'vaultNeutralFeeIncrementerSet';
|
|
3111
3701
|
type: {
|
|
@@ -3399,6 +3989,15 @@ interface BuildBundleRequestWithdrawInstructionCoreParams {
|
|
|
3399
3989
|
/** Smallest token units (decimal string) to request withdrawing. */
|
|
3400
3990
|
amountRaw: string;
|
|
3401
3991
|
}
|
|
3992
|
+
interface BuildBundleRequestSwitchInstructionCoreParams {
|
|
3993
|
+
bundleProgram: Program<Ntbundle>;
|
|
3994
|
+
bundleCluster?: BundleCluster;
|
|
3995
|
+
sourceVault: VaultRegistryEntry;
|
|
3996
|
+
targetVault: VaultRegistryEntry;
|
|
3997
|
+
user: PublicKey;
|
|
3998
|
+
/** Smallest token units (decimal string) to switch out of the source vault. */
|
|
3999
|
+
amountRaw: string;
|
|
4000
|
+
}
|
|
3402
4001
|
/**
|
|
3403
4002
|
* `initializeBundleDepositor` (when missing) + `requestDeposit`. Fetches bundle + user bundle internally.
|
|
3404
4003
|
* @internal
|
|
@@ -3421,6 +4020,18 @@ declare function buildBundleRequestWithdrawInstructionWithVault({
|
|
|
3421
4020
|
user,
|
|
3422
4021
|
amountRaw
|
|
3423
4022
|
}: BuildBundleRequestWithdrawInstructionCoreParams): Promise<TransactionInstruction>;
|
|
4023
|
+
/**
|
|
4024
|
+
* `requestBundleSwitch` only. Fetches source bundle, oracle, user bundle, and target bundle internally.
|
|
4025
|
+
* @internal
|
|
4026
|
+
*/
|
|
4027
|
+
declare function buildBundleRequestSwitchInstructionWithVault({
|
|
4028
|
+
bundleProgram,
|
|
4029
|
+
bundleCluster,
|
|
4030
|
+
sourceVault,
|
|
4031
|
+
targetVault,
|
|
4032
|
+
user,
|
|
4033
|
+
amountRaw
|
|
4034
|
+
}: BuildBundleRequestSwitchInstructionCoreParams): Promise<TransactionInstruction>;
|
|
3424
4035
|
//#endregion
|
|
3425
4036
|
//#region src/neutral-trade-core.d.ts
|
|
3426
4037
|
interface NeutralTradeCoreContext {
|
|
@@ -3442,4 +4053,4 @@ declare function buildRequestWithdrawInstructionForVaultId(core: NeutralTradeCor
|
|
|
3442
4053
|
}): Promise<TransactionInstruction>;
|
|
3443
4054
|
declare function getBundleProgramForVault(core: NeutralTradeCoreContext, vaultId: number, cluster: BundleCluster): ReturnType<typeof createAllowlistedBundleProgram>;
|
|
3444
4055
|
//#endregion
|
|
3445
|
-
export {
|
|
4056
|
+
export { UserBundleTempData as A, BundleProgram as B, VaultCategory as C, BundleAccount as D, VaultType as E, getSolanaTokenMint as F, createAllowlistedBundleProgram as G, DEFAULT_BUNDLE_PROGRAM_ID_DEVNET as H, tokens as I, isAllowlistedBundleProgramId as J, createBundleProgramById as K, ALLOWLISTED_BUNDLE_PROGRAM_IDS_BY_CLUSTER as L, SupportedToken as M, Token as N, OracleData as O, getSolanaTokenDecimals as P, BUNDLE_PROGRAM_ID_V2_MAINNET as R, VaultBalanceData as S, VaultRegistryEntry as T, DEFAULT_BUNDLE_PROGRAM_ID_MAINNET as U, BundleProvider as V, assertAllowlistedBundleProgramId as W, getVaultRegistry as _, initNeutralTradeCore as a, vaultsDevnet as b, BuildBundleRequestWithdrawInstructionCoreParams as c, buildBundleRequestWithdrawInstructionWithVault as d, NeutralTrade as f, getVaultById as g, getVaultByAddress as h, getBundleProgramForVault as i, SupportedChain as j, UserBundleAccount as k, buildBundleDepositInstructionsWithVault as l, getBundleProgramId as m, buildDepositInstructionsForVaultId as n, BuildBundleDepositInstructionsCoreParams as o, NeutralTradeConfig as p, getDefaultBundleProgramIdByCluster as q, buildRequestWithdrawInstructionForVaultId as r, BuildBundleRequestSwitchInstructionCoreParams as s, NeutralTradeCoreContext as t, buildBundleRequestSwitchInstructionWithVault as u, isValidVaultAddress as v, VaultRegistry as w, UserBalanceResult as x, vaults as y, BundleCluster as z };
|