@epicentral/sos-sdk 0.13.1-beta → 0.13.2-beta
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.
|
@@ -7,13 +7,62 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import {
|
|
10
|
+
assertIsInstructionWithAccounts,
|
|
10
11
|
containsBytes,
|
|
11
12
|
fixEncoderSize,
|
|
12
13
|
getBytesEncoder,
|
|
13
14
|
type Address,
|
|
15
|
+
type Instruction,
|
|
16
|
+
type InstructionWithData,
|
|
14
17
|
type ReadonlyUint8Array,
|
|
15
18
|
} from "@solana/kit";
|
|
16
19
|
import {
|
|
20
|
+
parseAcceptAdminInstruction,
|
|
21
|
+
parseAutoExerciseAllExpiredInstruction,
|
|
22
|
+
parseAutoExerciseExpiredInstruction,
|
|
23
|
+
parseBorrowFromPoolInstruction,
|
|
24
|
+
parseBuyFromPoolInstruction,
|
|
25
|
+
parseClaimBuyerSettlementInstruction,
|
|
26
|
+
parseClaimMakerRemainingInstruction,
|
|
27
|
+
parseClaimMakerSettlementInstruction,
|
|
28
|
+
parseCloseLongToPoolInstruction,
|
|
29
|
+
parseCloseOptionInstruction,
|
|
30
|
+
parseCreateEscrowV2Instruction,
|
|
31
|
+
parseDepositCollateralInstruction,
|
|
32
|
+
parseDepositToPositionInstruction,
|
|
33
|
+
parseInitCollateralPoolInstruction,
|
|
34
|
+
parseInitConfigInstruction,
|
|
35
|
+
parseInitializeMarketDataInstruction,
|
|
36
|
+
parseInitOptionPoolInstruction,
|
|
37
|
+
parseLiquidateWriterPositionInstruction,
|
|
38
|
+
parseLiquidateWriterPositionRescueInstruction,
|
|
39
|
+
parseMigrateCollateralPoolV1ToV2Instruction,
|
|
40
|
+
parseMigrateMarketDataVolOracleInstruction,
|
|
41
|
+
parseOmlpCreateVaultInstruction,
|
|
42
|
+
parseOmlpUpdateFeeWalletInstruction,
|
|
43
|
+
parseOmlpUpdateInterestModelInstruction,
|
|
44
|
+
parseOmlpUpdateLiquidationThresholdInstruction,
|
|
45
|
+
parseOmlpUpdateMaintenanceBufferInstruction,
|
|
46
|
+
parseOmlpUpdateMaxBorrowCapInstruction,
|
|
47
|
+
parseOmlpUpdateMaxLeverageInstruction,
|
|
48
|
+
parseOmlpUpdateProtocolFeeInstruction,
|
|
49
|
+
parseOmlpUpdateSupplyLimitInstruction,
|
|
50
|
+
parseOptionExerciseInstruction,
|
|
51
|
+
parseOptionMintInstruction,
|
|
52
|
+
parseOptionValidateInstruction,
|
|
53
|
+
parsePrepareBuyerSettlementInstruction,
|
|
54
|
+
parsePrepareMakerSettlementInstruction,
|
|
55
|
+
parseRepayPoolLoanFromCollateralInstruction,
|
|
56
|
+
parseRepayPoolLoanFromWalletInstruction,
|
|
57
|
+
parseRepayPoolLoanInstruction,
|
|
58
|
+
parseSettleMakerCollateralInstruction,
|
|
59
|
+
parseSyncWriterPositionInstruction,
|
|
60
|
+
parseTransferAdminInstruction,
|
|
61
|
+
parseUnwindWriterUnsoldInstruction,
|
|
62
|
+
parseUpdateImpliedVolatilityInstruction,
|
|
63
|
+
parseUpdateMarketDataInstruction,
|
|
64
|
+
parseWithdrawFromPositionInstruction,
|
|
65
|
+
parseWriteToPoolInstruction,
|
|
17
66
|
type ParsedAcceptAdminInstruction,
|
|
18
67
|
type ParsedAutoExerciseAllExpiredInstruction,
|
|
19
68
|
type ParsedAutoExerciseExpiredInstruction,
|
|
@@ -950,3 +999,338 @@ export type ParsedOptionProgramInstruction<
|
|
|
950
999
|
| ({
|
|
951
1000
|
instructionType: OptionProgramInstruction.WriteToPool;
|
|
952
1001
|
} & ParsedWriteToPoolInstruction<TProgram>);
|
|
1002
|
+
|
|
1003
|
+
export function parseOptionProgramInstruction<TProgram extends string>(
|
|
1004
|
+
instruction: Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array>,
|
|
1005
|
+
): ParsedOptionProgramInstruction<TProgram> {
|
|
1006
|
+
const instructionType = identifyOptionProgramInstruction(instruction);
|
|
1007
|
+
switch (instructionType) {
|
|
1008
|
+
case OptionProgramInstruction.AcceptAdmin: {
|
|
1009
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1010
|
+
return {
|
|
1011
|
+
instructionType: OptionProgramInstruction.AcceptAdmin,
|
|
1012
|
+
...parseAcceptAdminInstruction(instruction),
|
|
1013
|
+
};
|
|
1014
|
+
}
|
|
1015
|
+
case OptionProgramInstruction.AutoExerciseAllExpired: {
|
|
1016
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1017
|
+
return {
|
|
1018
|
+
instructionType: OptionProgramInstruction.AutoExerciseAllExpired,
|
|
1019
|
+
...parseAutoExerciseAllExpiredInstruction(instruction),
|
|
1020
|
+
};
|
|
1021
|
+
}
|
|
1022
|
+
case OptionProgramInstruction.AutoExerciseExpired: {
|
|
1023
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1024
|
+
return {
|
|
1025
|
+
instructionType: OptionProgramInstruction.AutoExerciseExpired,
|
|
1026
|
+
...parseAutoExerciseExpiredInstruction(instruction),
|
|
1027
|
+
};
|
|
1028
|
+
}
|
|
1029
|
+
case OptionProgramInstruction.BorrowFromPool: {
|
|
1030
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1031
|
+
return {
|
|
1032
|
+
instructionType: OptionProgramInstruction.BorrowFromPool,
|
|
1033
|
+
...parseBorrowFromPoolInstruction(instruction),
|
|
1034
|
+
};
|
|
1035
|
+
}
|
|
1036
|
+
case OptionProgramInstruction.BuyFromPool: {
|
|
1037
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1038
|
+
return {
|
|
1039
|
+
instructionType: OptionProgramInstruction.BuyFromPool,
|
|
1040
|
+
...parseBuyFromPoolInstruction(instruction),
|
|
1041
|
+
};
|
|
1042
|
+
}
|
|
1043
|
+
case OptionProgramInstruction.ClaimBuyerSettlement: {
|
|
1044
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1045
|
+
return {
|
|
1046
|
+
instructionType: OptionProgramInstruction.ClaimBuyerSettlement,
|
|
1047
|
+
...parseClaimBuyerSettlementInstruction(instruction),
|
|
1048
|
+
};
|
|
1049
|
+
}
|
|
1050
|
+
case OptionProgramInstruction.ClaimMakerRemaining: {
|
|
1051
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1052
|
+
return {
|
|
1053
|
+
instructionType: OptionProgramInstruction.ClaimMakerRemaining,
|
|
1054
|
+
...parseClaimMakerRemainingInstruction(instruction),
|
|
1055
|
+
};
|
|
1056
|
+
}
|
|
1057
|
+
case OptionProgramInstruction.ClaimMakerSettlement: {
|
|
1058
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1059
|
+
return {
|
|
1060
|
+
instructionType: OptionProgramInstruction.ClaimMakerSettlement,
|
|
1061
|
+
...parseClaimMakerSettlementInstruction(instruction),
|
|
1062
|
+
};
|
|
1063
|
+
}
|
|
1064
|
+
case OptionProgramInstruction.CloseLongToPool: {
|
|
1065
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1066
|
+
return {
|
|
1067
|
+
instructionType: OptionProgramInstruction.CloseLongToPool,
|
|
1068
|
+
...parseCloseLongToPoolInstruction(instruction),
|
|
1069
|
+
};
|
|
1070
|
+
}
|
|
1071
|
+
case OptionProgramInstruction.CloseOption: {
|
|
1072
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1073
|
+
return {
|
|
1074
|
+
instructionType: OptionProgramInstruction.CloseOption,
|
|
1075
|
+
...parseCloseOptionInstruction(instruction),
|
|
1076
|
+
};
|
|
1077
|
+
}
|
|
1078
|
+
case OptionProgramInstruction.CreateEscrowV2: {
|
|
1079
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1080
|
+
return {
|
|
1081
|
+
instructionType: OptionProgramInstruction.CreateEscrowV2,
|
|
1082
|
+
...parseCreateEscrowV2Instruction(instruction),
|
|
1083
|
+
};
|
|
1084
|
+
}
|
|
1085
|
+
case OptionProgramInstruction.DepositCollateral: {
|
|
1086
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1087
|
+
return {
|
|
1088
|
+
instructionType: OptionProgramInstruction.DepositCollateral,
|
|
1089
|
+
...parseDepositCollateralInstruction(instruction),
|
|
1090
|
+
};
|
|
1091
|
+
}
|
|
1092
|
+
case OptionProgramInstruction.DepositToPosition: {
|
|
1093
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1094
|
+
return {
|
|
1095
|
+
instructionType: OptionProgramInstruction.DepositToPosition,
|
|
1096
|
+
...parseDepositToPositionInstruction(instruction),
|
|
1097
|
+
};
|
|
1098
|
+
}
|
|
1099
|
+
case OptionProgramInstruction.InitCollateralPool: {
|
|
1100
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1101
|
+
return {
|
|
1102
|
+
instructionType: OptionProgramInstruction.InitCollateralPool,
|
|
1103
|
+
...parseInitCollateralPoolInstruction(instruction),
|
|
1104
|
+
};
|
|
1105
|
+
}
|
|
1106
|
+
case OptionProgramInstruction.InitConfig: {
|
|
1107
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1108
|
+
return {
|
|
1109
|
+
instructionType: OptionProgramInstruction.InitConfig,
|
|
1110
|
+
...parseInitConfigInstruction(instruction),
|
|
1111
|
+
};
|
|
1112
|
+
}
|
|
1113
|
+
case OptionProgramInstruction.InitOptionPool: {
|
|
1114
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1115
|
+
return {
|
|
1116
|
+
instructionType: OptionProgramInstruction.InitOptionPool,
|
|
1117
|
+
...parseInitOptionPoolInstruction(instruction),
|
|
1118
|
+
};
|
|
1119
|
+
}
|
|
1120
|
+
case OptionProgramInstruction.InitializeMarketData: {
|
|
1121
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1122
|
+
return {
|
|
1123
|
+
instructionType: OptionProgramInstruction.InitializeMarketData,
|
|
1124
|
+
...parseInitializeMarketDataInstruction(instruction),
|
|
1125
|
+
};
|
|
1126
|
+
}
|
|
1127
|
+
case OptionProgramInstruction.LiquidateWriterPosition: {
|
|
1128
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1129
|
+
return {
|
|
1130
|
+
instructionType: OptionProgramInstruction.LiquidateWriterPosition,
|
|
1131
|
+
...parseLiquidateWriterPositionInstruction(instruction),
|
|
1132
|
+
};
|
|
1133
|
+
}
|
|
1134
|
+
case OptionProgramInstruction.LiquidateWriterPositionRescue: {
|
|
1135
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1136
|
+
return {
|
|
1137
|
+
instructionType: OptionProgramInstruction.LiquidateWriterPositionRescue,
|
|
1138
|
+
...parseLiquidateWriterPositionRescueInstruction(instruction),
|
|
1139
|
+
};
|
|
1140
|
+
}
|
|
1141
|
+
case OptionProgramInstruction.MigrateCollateralPoolV1ToV2: {
|
|
1142
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1143
|
+
return {
|
|
1144
|
+
instructionType: OptionProgramInstruction.MigrateCollateralPoolV1ToV2,
|
|
1145
|
+
...parseMigrateCollateralPoolV1ToV2Instruction(instruction),
|
|
1146
|
+
};
|
|
1147
|
+
}
|
|
1148
|
+
case OptionProgramInstruction.MigrateMarketDataVolOracle: {
|
|
1149
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1150
|
+
return {
|
|
1151
|
+
instructionType: OptionProgramInstruction.MigrateMarketDataVolOracle,
|
|
1152
|
+
...parseMigrateMarketDataVolOracleInstruction(instruction),
|
|
1153
|
+
};
|
|
1154
|
+
}
|
|
1155
|
+
case OptionProgramInstruction.OmlpCreateVault: {
|
|
1156
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1157
|
+
return {
|
|
1158
|
+
instructionType: OptionProgramInstruction.OmlpCreateVault,
|
|
1159
|
+
...parseOmlpCreateVaultInstruction(instruction),
|
|
1160
|
+
};
|
|
1161
|
+
}
|
|
1162
|
+
case OptionProgramInstruction.OmlpUpdateFeeWallet: {
|
|
1163
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1164
|
+
return {
|
|
1165
|
+
instructionType: OptionProgramInstruction.OmlpUpdateFeeWallet,
|
|
1166
|
+
...parseOmlpUpdateFeeWalletInstruction(instruction),
|
|
1167
|
+
};
|
|
1168
|
+
}
|
|
1169
|
+
case OptionProgramInstruction.OmlpUpdateInterestModel: {
|
|
1170
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1171
|
+
return {
|
|
1172
|
+
instructionType: OptionProgramInstruction.OmlpUpdateInterestModel,
|
|
1173
|
+
...parseOmlpUpdateInterestModelInstruction(instruction),
|
|
1174
|
+
};
|
|
1175
|
+
}
|
|
1176
|
+
case OptionProgramInstruction.OmlpUpdateLiquidationThreshold: {
|
|
1177
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1178
|
+
return {
|
|
1179
|
+
instructionType:
|
|
1180
|
+
OptionProgramInstruction.OmlpUpdateLiquidationThreshold,
|
|
1181
|
+
...parseOmlpUpdateLiquidationThresholdInstruction(instruction),
|
|
1182
|
+
};
|
|
1183
|
+
}
|
|
1184
|
+
case OptionProgramInstruction.OmlpUpdateMaintenanceBuffer: {
|
|
1185
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1186
|
+
return {
|
|
1187
|
+
instructionType: OptionProgramInstruction.OmlpUpdateMaintenanceBuffer,
|
|
1188
|
+
...parseOmlpUpdateMaintenanceBufferInstruction(instruction),
|
|
1189
|
+
};
|
|
1190
|
+
}
|
|
1191
|
+
case OptionProgramInstruction.OmlpUpdateMaxBorrowCap: {
|
|
1192
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1193
|
+
return {
|
|
1194
|
+
instructionType: OptionProgramInstruction.OmlpUpdateMaxBorrowCap,
|
|
1195
|
+
...parseOmlpUpdateMaxBorrowCapInstruction(instruction),
|
|
1196
|
+
};
|
|
1197
|
+
}
|
|
1198
|
+
case OptionProgramInstruction.OmlpUpdateMaxLeverage: {
|
|
1199
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1200
|
+
return {
|
|
1201
|
+
instructionType: OptionProgramInstruction.OmlpUpdateMaxLeverage,
|
|
1202
|
+
...parseOmlpUpdateMaxLeverageInstruction(instruction),
|
|
1203
|
+
};
|
|
1204
|
+
}
|
|
1205
|
+
case OptionProgramInstruction.OmlpUpdateProtocolFee: {
|
|
1206
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1207
|
+
return {
|
|
1208
|
+
instructionType: OptionProgramInstruction.OmlpUpdateProtocolFee,
|
|
1209
|
+
...parseOmlpUpdateProtocolFeeInstruction(instruction),
|
|
1210
|
+
};
|
|
1211
|
+
}
|
|
1212
|
+
case OptionProgramInstruction.OmlpUpdateSupplyLimit: {
|
|
1213
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1214
|
+
return {
|
|
1215
|
+
instructionType: OptionProgramInstruction.OmlpUpdateSupplyLimit,
|
|
1216
|
+
...parseOmlpUpdateSupplyLimitInstruction(instruction),
|
|
1217
|
+
};
|
|
1218
|
+
}
|
|
1219
|
+
case OptionProgramInstruction.OptionExercise: {
|
|
1220
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1221
|
+
return {
|
|
1222
|
+
instructionType: OptionProgramInstruction.OptionExercise,
|
|
1223
|
+
...parseOptionExerciseInstruction(instruction),
|
|
1224
|
+
};
|
|
1225
|
+
}
|
|
1226
|
+
case OptionProgramInstruction.OptionMint: {
|
|
1227
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1228
|
+
return {
|
|
1229
|
+
instructionType: OptionProgramInstruction.OptionMint,
|
|
1230
|
+
...parseOptionMintInstruction(instruction),
|
|
1231
|
+
};
|
|
1232
|
+
}
|
|
1233
|
+
case OptionProgramInstruction.OptionValidate: {
|
|
1234
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1235
|
+
return {
|
|
1236
|
+
instructionType: OptionProgramInstruction.OptionValidate,
|
|
1237
|
+
...parseOptionValidateInstruction(instruction),
|
|
1238
|
+
};
|
|
1239
|
+
}
|
|
1240
|
+
case OptionProgramInstruction.PrepareBuyerSettlement: {
|
|
1241
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1242
|
+
return {
|
|
1243
|
+
instructionType: OptionProgramInstruction.PrepareBuyerSettlement,
|
|
1244
|
+
...parsePrepareBuyerSettlementInstruction(instruction),
|
|
1245
|
+
};
|
|
1246
|
+
}
|
|
1247
|
+
case OptionProgramInstruction.PrepareMakerSettlement: {
|
|
1248
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1249
|
+
return {
|
|
1250
|
+
instructionType: OptionProgramInstruction.PrepareMakerSettlement,
|
|
1251
|
+
...parsePrepareMakerSettlementInstruction(instruction),
|
|
1252
|
+
};
|
|
1253
|
+
}
|
|
1254
|
+
case OptionProgramInstruction.RepayPoolLoan: {
|
|
1255
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1256
|
+
return {
|
|
1257
|
+
instructionType: OptionProgramInstruction.RepayPoolLoan,
|
|
1258
|
+
...parseRepayPoolLoanInstruction(instruction),
|
|
1259
|
+
};
|
|
1260
|
+
}
|
|
1261
|
+
case OptionProgramInstruction.RepayPoolLoanFromCollateral: {
|
|
1262
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1263
|
+
return {
|
|
1264
|
+
instructionType: OptionProgramInstruction.RepayPoolLoanFromCollateral,
|
|
1265
|
+
...parseRepayPoolLoanFromCollateralInstruction(instruction),
|
|
1266
|
+
};
|
|
1267
|
+
}
|
|
1268
|
+
case OptionProgramInstruction.RepayPoolLoanFromWallet: {
|
|
1269
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1270
|
+
return {
|
|
1271
|
+
instructionType: OptionProgramInstruction.RepayPoolLoanFromWallet,
|
|
1272
|
+
...parseRepayPoolLoanFromWalletInstruction(instruction),
|
|
1273
|
+
};
|
|
1274
|
+
}
|
|
1275
|
+
case OptionProgramInstruction.SettleMakerCollateral: {
|
|
1276
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1277
|
+
return {
|
|
1278
|
+
instructionType: OptionProgramInstruction.SettleMakerCollateral,
|
|
1279
|
+
...parseSettleMakerCollateralInstruction(instruction),
|
|
1280
|
+
};
|
|
1281
|
+
}
|
|
1282
|
+
case OptionProgramInstruction.SyncWriterPosition: {
|
|
1283
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1284
|
+
return {
|
|
1285
|
+
instructionType: OptionProgramInstruction.SyncWriterPosition,
|
|
1286
|
+
...parseSyncWriterPositionInstruction(instruction),
|
|
1287
|
+
};
|
|
1288
|
+
}
|
|
1289
|
+
case OptionProgramInstruction.TransferAdmin: {
|
|
1290
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1291
|
+
return {
|
|
1292
|
+
instructionType: OptionProgramInstruction.TransferAdmin,
|
|
1293
|
+
...parseTransferAdminInstruction(instruction),
|
|
1294
|
+
};
|
|
1295
|
+
}
|
|
1296
|
+
case OptionProgramInstruction.UnwindWriterUnsold: {
|
|
1297
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1298
|
+
return {
|
|
1299
|
+
instructionType: OptionProgramInstruction.UnwindWriterUnsold,
|
|
1300
|
+
...parseUnwindWriterUnsoldInstruction(instruction),
|
|
1301
|
+
};
|
|
1302
|
+
}
|
|
1303
|
+
case OptionProgramInstruction.UpdateImpliedVolatility: {
|
|
1304
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1305
|
+
return {
|
|
1306
|
+
instructionType: OptionProgramInstruction.UpdateImpliedVolatility,
|
|
1307
|
+
...parseUpdateImpliedVolatilityInstruction(instruction),
|
|
1308
|
+
};
|
|
1309
|
+
}
|
|
1310
|
+
case OptionProgramInstruction.UpdateMarketData: {
|
|
1311
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1312
|
+
return {
|
|
1313
|
+
instructionType: OptionProgramInstruction.UpdateMarketData,
|
|
1314
|
+
...parseUpdateMarketDataInstruction(instruction),
|
|
1315
|
+
};
|
|
1316
|
+
}
|
|
1317
|
+
case OptionProgramInstruction.WithdrawFromPosition: {
|
|
1318
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1319
|
+
return {
|
|
1320
|
+
instructionType: OptionProgramInstruction.WithdrawFromPosition,
|
|
1321
|
+
...parseWithdrawFromPositionInstruction(instruction),
|
|
1322
|
+
};
|
|
1323
|
+
}
|
|
1324
|
+
case OptionProgramInstruction.WriteToPool: {
|
|
1325
|
+
assertIsInstructionWithAccounts(instruction);
|
|
1326
|
+
return {
|
|
1327
|
+
instructionType: OptionProgramInstruction.WriteToPool,
|
|
1328
|
+
...parseWriteToPoolInstruction(instruction),
|
|
1329
|
+
};
|
|
1330
|
+
}
|
|
1331
|
+
default:
|
|
1332
|
+
throw new Error(
|
|
1333
|
+
`Unrecognized instruction type: ${instructionType as string}`,
|
|
1334
|
+
);
|
|
1335
|
+
}
|
|
1336
|
+
}
|
package/package.json
CHANGED