@epicentral/sos-sdk 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +239 -0
- package/accounts/fetchers.ts +140 -0
- package/accounts/list.ts +152 -0
- package/accounts/pdas.ts +308 -0
- package/client/lookup-table.ts +32 -0
- package/client/program.ts +13 -0
- package/client/types.ts +8 -0
- package/generated/accounts/collateralPool.ts +217 -0
- package/generated/accounts/config.ts +156 -0
- package/generated/accounts/dualSourceContract.ts +235 -0
- package/generated/accounts/escrowState.ts +183 -0
- package/generated/accounts/index.ts +24 -0
- package/generated/accounts/lenderPosition.ts +211 -0
- package/generated/accounts/liquidityRouter.ts +223 -0
- package/generated/accounts/makerCollateralShare.ts +229 -0
- package/generated/accounts/makerPoolShare.ts +203 -0
- package/generated/accounts/marketDataAccount.ts +176 -0
- package/generated/accounts/optionAccount.ts +247 -0
- package/generated/accounts/optionPool.ts +253 -0
- package/generated/accounts/poolLoan.ts +220 -0
- package/generated/accounts/positionAccount.ts +187 -0
- package/generated/accounts/priceUpdateV2.ts +163 -0
- package/generated/accounts/vault.ts +304 -0
- package/generated/accounts/writerPosition.ts +297 -0
- package/generated/errors/index.ts +9 -0
- package/generated/errors/optionProgram.ts +392 -0
- package/generated/index.ts +13 -0
- package/generated/instructions/acceptAdmin.ts +230 -0
- package/generated/instructions/autoExerciseAllExpired.ts +523 -0
- package/generated/instructions/autoExerciseExpired.ts +623 -0
- package/generated/instructions/borrowFromPool.ts +554 -0
- package/generated/instructions/buyFromPool.ts +684 -0
- package/generated/instructions/claimPremium.ts +377 -0
- package/generated/instructions/closeLongToPool.ts +716 -0
- package/generated/instructions/closeOption.ts +235 -0
- package/generated/instructions/createEscrowV2.ts +518 -0
- package/generated/instructions/createLiquidityRouter.ts +361 -0
- package/generated/instructions/depositCollateral.ts +624 -0
- package/generated/instructions/depositToPool.ts +497 -0
- package/generated/instructions/depositToPosition.ts +429 -0
- package/generated/instructions/index.ts +45 -0
- package/generated/instructions/initCollateralPool.ts +513 -0
- package/generated/instructions/initConfig.ts +279 -0
- package/generated/instructions/initOptionPool.ts +587 -0
- package/generated/instructions/initializeMarketData.ts +359 -0
- package/generated/instructions/liquidateWriterPosition.ts +592 -0
- package/generated/instructions/omlpCreateVault.ts +547 -0
- package/generated/instructions/omlpTakeOfferWithFailover.ts +606 -0
- package/generated/instructions/omlpUpdateMaxLeverage.ts +304 -0
- package/generated/instructions/omlpUpdateProtocolFee.ts +304 -0
- package/generated/instructions/omlpUpdateSupplyLimit.ts +304 -0
- package/generated/instructions/optionExercise.ts +540 -0
- package/generated/instructions/optionMint.ts +1349 -0
- package/generated/instructions/optionValidate.ts +255 -0
- package/generated/instructions/repayPoolLoan.ts +499 -0
- package/generated/instructions/repayPoolLoanFromCollateral.ts +514 -0
- package/generated/instructions/settleMakerCollateral.ts +472 -0
- package/generated/instructions/syncWriterPosition.ts +206 -0
- package/generated/instructions/transferAdmin.ts +245 -0
- package/generated/instructions/unwindWriterUnsold.ts +668 -0
- package/generated/instructions/updateImpliedVolatility.ts +226 -0
- package/generated/instructions/updateMarketData.ts +315 -0
- package/generated/instructions/withdrawFromPool.ts +429 -0
- package/generated/instructions/withdrawFromPosition.ts +405 -0
- package/generated/instructions/writeToPool.ts +594 -0
- package/generated/programs/index.ts +9 -0
- package/generated/programs/optionProgram.ts +832 -0
- package/generated/shared/index.ts +164 -0
- package/generated/types/borrowedFromSAP1.ts +75 -0
- package/generated/types/borrowedFromSAP2.ts +83 -0
- package/generated/types/failoverTriggered.ts +85 -0
- package/generated/types/impliedVolatilityUpdated.ts +73 -0
- package/generated/types/index.ts +32 -0
- package/generated/types/liquidationExecuted.ts +73 -0
- package/generated/types/liquidityMetrics.ts +69 -0
- package/generated/types/liquidityRouterCreated.ts +79 -0
- package/generated/types/marketDataInitialized.ts +61 -0
- package/generated/types/marketDataUpdated.ts +69 -0
- package/generated/types/optionClosed.ts +56 -0
- package/generated/types/optionExercised.ts +62 -0
- package/generated/types/optionExpired.ts +49 -0
- package/generated/types/optionMinted.ts +78 -0
- package/generated/types/optionType.ts +38 -0
- package/generated/types/optionValidated.ts +82 -0
- package/generated/types/poolLoanCreated.ts +74 -0
- package/generated/types/poolLoanRepaid.ts +74 -0
- package/generated/types/positionDeposited.ts +73 -0
- package/generated/types/positionWithdrawn.ts +81 -0
- package/generated/types/priceFeedMessage.ts +117 -0
- package/generated/types/protocolFeeUpdated.ts +69 -0
- package/generated/types/sap2Provider.ts +38 -0
- package/generated/types/vaultCreated.ts +60 -0
- package/generated/types/verificationLevel.ts +95 -0
- package/index.ts +25 -0
- package/long/builders.ts +126 -0
- package/long/exercise.ts +49 -0
- package/long/quotes.ts +48 -0
- package/omlp/builders.ts +74 -0
- package/omlp/service.ts +94 -0
- package/package.json +22 -0
- package/shared/amounts.ts +32 -0
- package/shared/errors.ts +12 -0
- package/shared/remaining-accounts.ts +41 -0
- package/shared/transactions.ts +49 -0
- package/short/builders.ts +268 -0
- package/short/claim-premium.ts +37 -0
- package/short/close-option.ts +34 -0
- package/short/pool.ts +224 -0
- package/tsconfig.json +12 -0
|
@@ -0,0 +1,832 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import {
|
|
10
|
+
containsBytes,
|
|
11
|
+
fixEncoderSize,
|
|
12
|
+
getBytesEncoder,
|
|
13
|
+
type Address,
|
|
14
|
+
type ReadonlyUint8Array,
|
|
15
|
+
} from "@solana/kit";
|
|
16
|
+
import {
|
|
17
|
+
type ParsedAcceptAdminInstruction,
|
|
18
|
+
type ParsedAutoExerciseAllExpiredInstruction,
|
|
19
|
+
type ParsedAutoExerciseExpiredInstruction,
|
|
20
|
+
type ParsedBorrowFromPoolInstruction,
|
|
21
|
+
type ParsedBuyFromPoolInstruction,
|
|
22
|
+
type ParsedClaimPremiumInstruction,
|
|
23
|
+
type ParsedCloseLongToPoolInstruction,
|
|
24
|
+
type ParsedCloseOptionInstruction,
|
|
25
|
+
type ParsedCreateEscrowV2Instruction,
|
|
26
|
+
type ParsedCreateLiquidityRouterInstruction,
|
|
27
|
+
type ParsedDepositCollateralInstruction,
|
|
28
|
+
type ParsedDepositToPoolInstruction,
|
|
29
|
+
type ParsedDepositToPositionInstruction,
|
|
30
|
+
type ParsedInitCollateralPoolInstruction,
|
|
31
|
+
type ParsedInitConfigInstruction,
|
|
32
|
+
type ParsedInitializeMarketDataInstruction,
|
|
33
|
+
type ParsedInitOptionPoolInstruction,
|
|
34
|
+
type ParsedLiquidateWriterPositionInstruction,
|
|
35
|
+
type ParsedOmlpCreateVaultInstruction,
|
|
36
|
+
type ParsedOmlpTakeOfferWithFailoverInstruction,
|
|
37
|
+
type ParsedOmlpUpdateMaxLeverageInstruction,
|
|
38
|
+
type ParsedOmlpUpdateProtocolFeeInstruction,
|
|
39
|
+
type ParsedOmlpUpdateSupplyLimitInstruction,
|
|
40
|
+
type ParsedOptionExerciseInstruction,
|
|
41
|
+
type ParsedOptionMintInstruction,
|
|
42
|
+
type ParsedOptionValidateInstruction,
|
|
43
|
+
type ParsedRepayPoolLoanFromCollateralInstruction,
|
|
44
|
+
type ParsedRepayPoolLoanInstruction,
|
|
45
|
+
type ParsedSettleMakerCollateralInstruction,
|
|
46
|
+
type ParsedSyncWriterPositionInstruction,
|
|
47
|
+
type ParsedTransferAdminInstruction,
|
|
48
|
+
type ParsedUnwindWriterUnsoldInstruction,
|
|
49
|
+
type ParsedUpdateImpliedVolatilityInstruction,
|
|
50
|
+
type ParsedUpdateMarketDataInstruction,
|
|
51
|
+
type ParsedWithdrawFromPoolInstruction,
|
|
52
|
+
type ParsedWithdrawFromPositionInstruction,
|
|
53
|
+
type ParsedWriteToPoolInstruction,
|
|
54
|
+
} from "../instructions";
|
|
55
|
+
|
|
56
|
+
export const OPTION_PROGRAM_PROGRAM_ADDRESS =
|
|
57
|
+
"BAo7w76URdPRGBc9SuA5p2fUB7zsXpepNjntN8MGLodZ" as Address<"BAo7w76URdPRGBc9SuA5p2fUB7zsXpepNjntN8MGLodZ">;
|
|
58
|
+
|
|
59
|
+
export enum OptionProgramAccount {
|
|
60
|
+
CollateralPool,
|
|
61
|
+
Config,
|
|
62
|
+
DualSourceContract,
|
|
63
|
+
EscrowState,
|
|
64
|
+
LenderPosition,
|
|
65
|
+
LiquidityRouter,
|
|
66
|
+
MakerCollateralShare,
|
|
67
|
+
MakerPoolShare,
|
|
68
|
+
MarketDataAccount,
|
|
69
|
+
OptionAccount,
|
|
70
|
+
OptionPool,
|
|
71
|
+
PoolLoan,
|
|
72
|
+
PositionAccount,
|
|
73
|
+
PriceUpdateV2,
|
|
74
|
+
Vault,
|
|
75
|
+
WriterPosition,
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function identifyOptionProgramAccount(
|
|
79
|
+
account: { data: ReadonlyUint8Array } | ReadonlyUint8Array,
|
|
80
|
+
): OptionProgramAccount {
|
|
81
|
+
const data = "data" in account ? account.data : account;
|
|
82
|
+
if (
|
|
83
|
+
containsBytes(
|
|
84
|
+
data,
|
|
85
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
86
|
+
new Uint8Array([186, 4, 253, 240, 93, 243, 212, 195]),
|
|
87
|
+
),
|
|
88
|
+
0,
|
|
89
|
+
)
|
|
90
|
+
) {
|
|
91
|
+
return OptionProgramAccount.CollateralPool;
|
|
92
|
+
}
|
|
93
|
+
if (
|
|
94
|
+
containsBytes(
|
|
95
|
+
data,
|
|
96
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
97
|
+
new Uint8Array([155, 12, 170, 224, 30, 250, 204, 130]),
|
|
98
|
+
),
|
|
99
|
+
0,
|
|
100
|
+
)
|
|
101
|
+
) {
|
|
102
|
+
return OptionProgramAccount.Config;
|
|
103
|
+
}
|
|
104
|
+
if (
|
|
105
|
+
containsBytes(
|
|
106
|
+
data,
|
|
107
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
108
|
+
new Uint8Array([114, 105, 97, 181, 162, 170, 126, 215]),
|
|
109
|
+
),
|
|
110
|
+
0,
|
|
111
|
+
)
|
|
112
|
+
) {
|
|
113
|
+
return OptionProgramAccount.DualSourceContract;
|
|
114
|
+
}
|
|
115
|
+
if (
|
|
116
|
+
containsBytes(
|
|
117
|
+
data,
|
|
118
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
119
|
+
new Uint8Array([19, 90, 148, 111, 55, 130, 229, 108]),
|
|
120
|
+
),
|
|
121
|
+
0,
|
|
122
|
+
)
|
|
123
|
+
) {
|
|
124
|
+
return OptionProgramAccount.EscrowState;
|
|
125
|
+
}
|
|
126
|
+
if (
|
|
127
|
+
containsBytes(
|
|
128
|
+
data,
|
|
129
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
130
|
+
new Uint8Array([165, 98, 244, 204, 209, 158, 88, 19]),
|
|
131
|
+
),
|
|
132
|
+
0,
|
|
133
|
+
)
|
|
134
|
+
) {
|
|
135
|
+
return OptionProgramAccount.LenderPosition;
|
|
136
|
+
}
|
|
137
|
+
if (
|
|
138
|
+
containsBytes(
|
|
139
|
+
data,
|
|
140
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
141
|
+
new Uint8Array([151, 96, 76, 12, 200, 0, 147, 111]),
|
|
142
|
+
),
|
|
143
|
+
0,
|
|
144
|
+
)
|
|
145
|
+
) {
|
|
146
|
+
return OptionProgramAccount.LiquidityRouter;
|
|
147
|
+
}
|
|
148
|
+
if (
|
|
149
|
+
containsBytes(
|
|
150
|
+
data,
|
|
151
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
152
|
+
new Uint8Array([44, 113, 163, 132, 92, 188, 13, 158]),
|
|
153
|
+
),
|
|
154
|
+
0,
|
|
155
|
+
)
|
|
156
|
+
) {
|
|
157
|
+
return OptionProgramAccount.MakerCollateralShare;
|
|
158
|
+
}
|
|
159
|
+
if (
|
|
160
|
+
containsBytes(
|
|
161
|
+
data,
|
|
162
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
163
|
+
new Uint8Array([171, 211, 240, 11, 182, 141, 59, 217]),
|
|
164
|
+
),
|
|
165
|
+
0,
|
|
166
|
+
)
|
|
167
|
+
) {
|
|
168
|
+
return OptionProgramAccount.MakerPoolShare;
|
|
169
|
+
}
|
|
170
|
+
if (
|
|
171
|
+
containsBytes(
|
|
172
|
+
data,
|
|
173
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
174
|
+
new Uint8Array([181, 15, 209, 146, 116, 22, 98, 208]),
|
|
175
|
+
),
|
|
176
|
+
0,
|
|
177
|
+
)
|
|
178
|
+
) {
|
|
179
|
+
return OptionProgramAccount.MarketDataAccount;
|
|
180
|
+
}
|
|
181
|
+
if (
|
|
182
|
+
containsBytes(
|
|
183
|
+
data,
|
|
184
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
185
|
+
new Uint8Array([82, 44, 195, 42, 219, 57, 18, 92]),
|
|
186
|
+
),
|
|
187
|
+
0,
|
|
188
|
+
)
|
|
189
|
+
) {
|
|
190
|
+
return OptionProgramAccount.OptionAccount;
|
|
191
|
+
}
|
|
192
|
+
if (
|
|
193
|
+
containsBytes(
|
|
194
|
+
data,
|
|
195
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
196
|
+
new Uint8Array([100, 175, 136, 125, 88, 244, 169, 209]),
|
|
197
|
+
),
|
|
198
|
+
0,
|
|
199
|
+
)
|
|
200
|
+
) {
|
|
201
|
+
return OptionProgramAccount.OptionPool;
|
|
202
|
+
}
|
|
203
|
+
if (
|
|
204
|
+
containsBytes(
|
|
205
|
+
data,
|
|
206
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
207
|
+
new Uint8Array([31, 179, 93, 157, 68, 113, 2, 128]),
|
|
208
|
+
),
|
|
209
|
+
0,
|
|
210
|
+
)
|
|
211
|
+
) {
|
|
212
|
+
return OptionProgramAccount.PoolLoan;
|
|
213
|
+
}
|
|
214
|
+
if (
|
|
215
|
+
containsBytes(
|
|
216
|
+
data,
|
|
217
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
218
|
+
new Uint8Array([60, 125, 250, 193, 181, 109, 238, 86]),
|
|
219
|
+
),
|
|
220
|
+
0,
|
|
221
|
+
)
|
|
222
|
+
) {
|
|
223
|
+
return OptionProgramAccount.PositionAccount;
|
|
224
|
+
}
|
|
225
|
+
if (
|
|
226
|
+
containsBytes(
|
|
227
|
+
data,
|
|
228
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
229
|
+
new Uint8Array([34, 241, 35, 99, 157, 126, 244, 205]),
|
|
230
|
+
),
|
|
231
|
+
0,
|
|
232
|
+
)
|
|
233
|
+
) {
|
|
234
|
+
return OptionProgramAccount.PriceUpdateV2;
|
|
235
|
+
}
|
|
236
|
+
if (
|
|
237
|
+
containsBytes(
|
|
238
|
+
data,
|
|
239
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
240
|
+
new Uint8Array([211, 8, 232, 43, 2, 152, 117, 119]),
|
|
241
|
+
),
|
|
242
|
+
0,
|
|
243
|
+
)
|
|
244
|
+
) {
|
|
245
|
+
return OptionProgramAccount.Vault;
|
|
246
|
+
}
|
|
247
|
+
if (
|
|
248
|
+
containsBytes(
|
|
249
|
+
data,
|
|
250
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
251
|
+
new Uint8Array([195, 252, 56, 77, 221, 13, 8, 69]),
|
|
252
|
+
),
|
|
253
|
+
0,
|
|
254
|
+
)
|
|
255
|
+
) {
|
|
256
|
+
return OptionProgramAccount.WriterPosition;
|
|
257
|
+
}
|
|
258
|
+
throw new Error(
|
|
259
|
+
"The provided account could not be identified as a optionProgram account.",
|
|
260
|
+
);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
export enum OptionProgramInstruction {
|
|
264
|
+
AcceptAdmin,
|
|
265
|
+
AutoExerciseAllExpired,
|
|
266
|
+
AutoExerciseExpired,
|
|
267
|
+
BorrowFromPool,
|
|
268
|
+
BuyFromPool,
|
|
269
|
+
ClaimPremium,
|
|
270
|
+
CloseLongToPool,
|
|
271
|
+
CloseOption,
|
|
272
|
+
CreateEscrowV2,
|
|
273
|
+
CreateLiquidityRouter,
|
|
274
|
+
DepositCollateral,
|
|
275
|
+
DepositToPool,
|
|
276
|
+
DepositToPosition,
|
|
277
|
+
InitCollateralPool,
|
|
278
|
+
InitConfig,
|
|
279
|
+
InitOptionPool,
|
|
280
|
+
InitializeMarketData,
|
|
281
|
+
LiquidateWriterPosition,
|
|
282
|
+
OmlpCreateVault,
|
|
283
|
+
OmlpTakeOfferWithFailover,
|
|
284
|
+
OmlpUpdateMaxLeverage,
|
|
285
|
+
OmlpUpdateProtocolFee,
|
|
286
|
+
OmlpUpdateSupplyLimit,
|
|
287
|
+
OptionExercise,
|
|
288
|
+
OptionMint,
|
|
289
|
+
OptionValidate,
|
|
290
|
+
RepayPoolLoan,
|
|
291
|
+
RepayPoolLoanFromCollateral,
|
|
292
|
+
SettleMakerCollateral,
|
|
293
|
+
SyncWriterPosition,
|
|
294
|
+
TransferAdmin,
|
|
295
|
+
UnwindWriterUnsold,
|
|
296
|
+
UpdateImpliedVolatility,
|
|
297
|
+
UpdateMarketData,
|
|
298
|
+
WithdrawFromPool,
|
|
299
|
+
WithdrawFromPosition,
|
|
300
|
+
WriteToPool,
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
export function identifyOptionProgramInstruction(
|
|
304
|
+
instruction: { data: ReadonlyUint8Array } | ReadonlyUint8Array,
|
|
305
|
+
): OptionProgramInstruction {
|
|
306
|
+
const data = "data" in instruction ? instruction.data : instruction;
|
|
307
|
+
if (
|
|
308
|
+
containsBytes(
|
|
309
|
+
data,
|
|
310
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
311
|
+
new Uint8Array([112, 42, 45, 90, 116, 181, 13, 170]),
|
|
312
|
+
),
|
|
313
|
+
0,
|
|
314
|
+
)
|
|
315
|
+
) {
|
|
316
|
+
return OptionProgramInstruction.AcceptAdmin;
|
|
317
|
+
}
|
|
318
|
+
if (
|
|
319
|
+
containsBytes(
|
|
320
|
+
data,
|
|
321
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
322
|
+
new Uint8Array([114, 241, 93, 137, 214, 147, 43, 57]),
|
|
323
|
+
),
|
|
324
|
+
0,
|
|
325
|
+
)
|
|
326
|
+
) {
|
|
327
|
+
return OptionProgramInstruction.AutoExerciseAllExpired;
|
|
328
|
+
}
|
|
329
|
+
if (
|
|
330
|
+
containsBytes(
|
|
331
|
+
data,
|
|
332
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
333
|
+
new Uint8Array([93, 222, 81, 8, 181, 25, 68, 25]),
|
|
334
|
+
),
|
|
335
|
+
0,
|
|
336
|
+
)
|
|
337
|
+
) {
|
|
338
|
+
return OptionProgramInstruction.AutoExerciseExpired;
|
|
339
|
+
}
|
|
340
|
+
if (
|
|
341
|
+
containsBytes(
|
|
342
|
+
data,
|
|
343
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
344
|
+
new Uint8Array([186, 246, 186, 247, 84, 17, 148, 182]),
|
|
345
|
+
),
|
|
346
|
+
0,
|
|
347
|
+
)
|
|
348
|
+
) {
|
|
349
|
+
return OptionProgramInstruction.BorrowFromPool;
|
|
350
|
+
}
|
|
351
|
+
if (
|
|
352
|
+
containsBytes(
|
|
353
|
+
data,
|
|
354
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
355
|
+
new Uint8Array([118, 108, 243, 198, 19, 184, 41, 246]),
|
|
356
|
+
),
|
|
357
|
+
0,
|
|
358
|
+
)
|
|
359
|
+
) {
|
|
360
|
+
return OptionProgramInstruction.BuyFromPool;
|
|
361
|
+
}
|
|
362
|
+
if (
|
|
363
|
+
containsBytes(
|
|
364
|
+
data,
|
|
365
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
366
|
+
new Uint8Array([225, 124, 12, 107, 24, 154, 37, 100]),
|
|
367
|
+
),
|
|
368
|
+
0,
|
|
369
|
+
)
|
|
370
|
+
) {
|
|
371
|
+
return OptionProgramInstruction.ClaimPremium;
|
|
372
|
+
}
|
|
373
|
+
if (
|
|
374
|
+
containsBytes(
|
|
375
|
+
data,
|
|
376
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
377
|
+
new Uint8Array([72, 117, 94, 238, 111, 113, 243, 91]),
|
|
378
|
+
),
|
|
379
|
+
0,
|
|
380
|
+
)
|
|
381
|
+
) {
|
|
382
|
+
return OptionProgramInstruction.CloseLongToPool;
|
|
383
|
+
}
|
|
384
|
+
if (
|
|
385
|
+
containsBytes(
|
|
386
|
+
data,
|
|
387
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
388
|
+
new Uint8Array([138, 79, 53, 54, 221, 16, 109, 141]),
|
|
389
|
+
),
|
|
390
|
+
0,
|
|
391
|
+
)
|
|
392
|
+
) {
|
|
393
|
+
return OptionProgramInstruction.CloseOption;
|
|
394
|
+
}
|
|
395
|
+
if (
|
|
396
|
+
containsBytes(
|
|
397
|
+
data,
|
|
398
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
399
|
+
new Uint8Array([235, 71, 10, 36, 206, 55, 150, 187]),
|
|
400
|
+
),
|
|
401
|
+
0,
|
|
402
|
+
)
|
|
403
|
+
) {
|
|
404
|
+
return OptionProgramInstruction.CreateEscrowV2;
|
|
405
|
+
}
|
|
406
|
+
if (
|
|
407
|
+
containsBytes(
|
|
408
|
+
data,
|
|
409
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
410
|
+
new Uint8Array([226, 122, 201, 80, 25, 49, 83, 84]),
|
|
411
|
+
),
|
|
412
|
+
0,
|
|
413
|
+
)
|
|
414
|
+
) {
|
|
415
|
+
return OptionProgramInstruction.CreateLiquidityRouter;
|
|
416
|
+
}
|
|
417
|
+
if (
|
|
418
|
+
containsBytes(
|
|
419
|
+
data,
|
|
420
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
421
|
+
new Uint8Array([156, 131, 142, 116, 146, 247, 162, 120]),
|
|
422
|
+
),
|
|
423
|
+
0,
|
|
424
|
+
)
|
|
425
|
+
) {
|
|
426
|
+
return OptionProgramInstruction.DepositCollateral;
|
|
427
|
+
}
|
|
428
|
+
if (
|
|
429
|
+
containsBytes(
|
|
430
|
+
data,
|
|
431
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
432
|
+
new Uint8Array([99, 136, 15, 66, 85, 146, 24, 89]),
|
|
433
|
+
),
|
|
434
|
+
0,
|
|
435
|
+
)
|
|
436
|
+
) {
|
|
437
|
+
return OptionProgramInstruction.DepositToPool;
|
|
438
|
+
}
|
|
439
|
+
if (
|
|
440
|
+
containsBytes(
|
|
441
|
+
data,
|
|
442
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
443
|
+
new Uint8Array([4, 236, 119, 21, 20, 228, 104, 139]),
|
|
444
|
+
),
|
|
445
|
+
0,
|
|
446
|
+
)
|
|
447
|
+
) {
|
|
448
|
+
return OptionProgramInstruction.DepositToPosition;
|
|
449
|
+
}
|
|
450
|
+
if (
|
|
451
|
+
containsBytes(
|
|
452
|
+
data,
|
|
453
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
454
|
+
new Uint8Array([76, 233, 1, 25, 52, 227, 208, 101]),
|
|
455
|
+
),
|
|
456
|
+
0,
|
|
457
|
+
)
|
|
458
|
+
) {
|
|
459
|
+
return OptionProgramInstruction.InitCollateralPool;
|
|
460
|
+
}
|
|
461
|
+
if (
|
|
462
|
+
containsBytes(
|
|
463
|
+
data,
|
|
464
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
465
|
+
new Uint8Array([23, 235, 115, 232, 168, 96, 1, 231]),
|
|
466
|
+
),
|
|
467
|
+
0,
|
|
468
|
+
)
|
|
469
|
+
) {
|
|
470
|
+
return OptionProgramInstruction.InitConfig;
|
|
471
|
+
}
|
|
472
|
+
if (
|
|
473
|
+
containsBytes(
|
|
474
|
+
data,
|
|
475
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
476
|
+
new Uint8Array([204, 113, 12, 141, 240, 219, 74, 220]),
|
|
477
|
+
),
|
|
478
|
+
0,
|
|
479
|
+
)
|
|
480
|
+
) {
|
|
481
|
+
return OptionProgramInstruction.InitOptionPool;
|
|
482
|
+
}
|
|
483
|
+
if (
|
|
484
|
+
containsBytes(
|
|
485
|
+
data,
|
|
486
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
487
|
+
new Uint8Array([250, 21, 97, 28, 194, 42, 173, 236]),
|
|
488
|
+
),
|
|
489
|
+
0,
|
|
490
|
+
)
|
|
491
|
+
) {
|
|
492
|
+
return OptionProgramInstruction.InitializeMarketData;
|
|
493
|
+
}
|
|
494
|
+
if (
|
|
495
|
+
containsBytes(
|
|
496
|
+
data,
|
|
497
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
498
|
+
new Uint8Array([184, 117, 16, 217, 120, 32, 16, 63]),
|
|
499
|
+
),
|
|
500
|
+
0,
|
|
501
|
+
)
|
|
502
|
+
) {
|
|
503
|
+
return OptionProgramInstruction.LiquidateWriterPosition;
|
|
504
|
+
}
|
|
505
|
+
if (
|
|
506
|
+
containsBytes(
|
|
507
|
+
data,
|
|
508
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
509
|
+
new Uint8Array([129, 63, 75, 202, 228, 221, 137, 221]),
|
|
510
|
+
),
|
|
511
|
+
0,
|
|
512
|
+
)
|
|
513
|
+
) {
|
|
514
|
+
return OptionProgramInstruction.OmlpCreateVault;
|
|
515
|
+
}
|
|
516
|
+
if (
|
|
517
|
+
containsBytes(
|
|
518
|
+
data,
|
|
519
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
520
|
+
new Uint8Array([39, 155, 118, 226, 84, 159, 5, 76]),
|
|
521
|
+
),
|
|
522
|
+
0,
|
|
523
|
+
)
|
|
524
|
+
) {
|
|
525
|
+
return OptionProgramInstruction.OmlpTakeOfferWithFailover;
|
|
526
|
+
}
|
|
527
|
+
if (
|
|
528
|
+
containsBytes(
|
|
529
|
+
data,
|
|
530
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
531
|
+
new Uint8Array([108, 142, 71, 44, 21, 120, 202, 28]),
|
|
532
|
+
),
|
|
533
|
+
0,
|
|
534
|
+
)
|
|
535
|
+
) {
|
|
536
|
+
return OptionProgramInstruction.OmlpUpdateMaxLeverage;
|
|
537
|
+
}
|
|
538
|
+
if (
|
|
539
|
+
containsBytes(
|
|
540
|
+
data,
|
|
541
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
542
|
+
new Uint8Array([41, 17, 189, 37, 78, 53, 240, 52]),
|
|
543
|
+
),
|
|
544
|
+
0,
|
|
545
|
+
)
|
|
546
|
+
) {
|
|
547
|
+
return OptionProgramInstruction.OmlpUpdateProtocolFee;
|
|
548
|
+
}
|
|
549
|
+
if (
|
|
550
|
+
containsBytes(
|
|
551
|
+
data,
|
|
552
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
553
|
+
new Uint8Array([38, 178, 193, 188, 127, 170, 122, 42]),
|
|
554
|
+
),
|
|
555
|
+
0,
|
|
556
|
+
)
|
|
557
|
+
) {
|
|
558
|
+
return OptionProgramInstruction.OmlpUpdateSupplyLimit;
|
|
559
|
+
}
|
|
560
|
+
if (
|
|
561
|
+
containsBytes(
|
|
562
|
+
data,
|
|
563
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
564
|
+
new Uint8Array([43, 86, 237, 78, 235, 74, 131, 206]),
|
|
565
|
+
),
|
|
566
|
+
0,
|
|
567
|
+
)
|
|
568
|
+
) {
|
|
569
|
+
return OptionProgramInstruction.OptionExercise;
|
|
570
|
+
}
|
|
571
|
+
if (
|
|
572
|
+
containsBytes(
|
|
573
|
+
data,
|
|
574
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
575
|
+
new Uint8Array([210, 192, 217, 89, 138, 0, 94, 90]),
|
|
576
|
+
),
|
|
577
|
+
0,
|
|
578
|
+
)
|
|
579
|
+
) {
|
|
580
|
+
return OptionProgramInstruction.OptionMint;
|
|
581
|
+
}
|
|
582
|
+
if (
|
|
583
|
+
containsBytes(
|
|
584
|
+
data,
|
|
585
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
586
|
+
new Uint8Array([67, 10, 20, 254, 66, 53, 251, 6]),
|
|
587
|
+
),
|
|
588
|
+
0,
|
|
589
|
+
)
|
|
590
|
+
) {
|
|
591
|
+
return OptionProgramInstruction.OptionValidate;
|
|
592
|
+
}
|
|
593
|
+
if (
|
|
594
|
+
containsBytes(
|
|
595
|
+
data,
|
|
596
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
597
|
+
new Uint8Array([166, 161, 84, 231, 244, 103, 63, 224]),
|
|
598
|
+
),
|
|
599
|
+
0,
|
|
600
|
+
)
|
|
601
|
+
) {
|
|
602
|
+
return OptionProgramInstruction.RepayPoolLoan;
|
|
603
|
+
}
|
|
604
|
+
if (
|
|
605
|
+
containsBytes(
|
|
606
|
+
data,
|
|
607
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
608
|
+
new Uint8Array([213, 59, 182, 125, 195, 39, 67, 33]),
|
|
609
|
+
),
|
|
610
|
+
0,
|
|
611
|
+
)
|
|
612
|
+
) {
|
|
613
|
+
return OptionProgramInstruction.RepayPoolLoanFromCollateral;
|
|
614
|
+
}
|
|
615
|
+
if (
|
|
616
|
+
containsBytes(
|
|
617
|
+
data,
|
|
618
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
619
|
+
new Uint8Array([47, 169, 97, 199, 29, 197, 115, 148]),
|
|
620
|
+
),
|
|
621
|
+
0,
|
|
622
|
+
)
|
|
623
|
+
) {
|
|
624
|
+
return OptionProgramInstruction.SettleMakerCollateral;
|
|
625
|
+
}
|
|
626
|
+
if (
|
|
627
|
+
containsBytes(
|
|
628
|
+
data,
|
|
629
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
630
|
+
new Uint8Array([57, 19, 103, 217, 187, 66, 3, 4]),
|
|
631
|
+
),
|
|
632
|
+
0,
|
|
633
|
+
)
|
|
634
|
+
) {
|
|
635
|
+
return OptionProgramInstruction.SyncWriterPosition;
|
|
636
|
+
}
|
|
637
|
+
if (
|
|
638
|
+
containsBytes(
|
|
639
|
+
data,
|
|
640
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
641
|
+
new Uint8Array([42, 242, 66, 106, 228, 10, 111, 156]),
|
|
642
|
+
),
|
|
643
|
+
0,
|
|
644
|
+
)
|
|
645
|
+
) {
|
|
646
|
+
return OptionProgramInstruction.TransferAdmin;
|
|
647
|
+
}
|
|
648
|
+
if (
|
|
649
|
+
containsBytes(
|
|
650
|
+
data,
|
|
651
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
652
|
+
new Uint8Array([48, 116, 34, 53, 22, 225, 22, 79]),
|
|
653
|
+
),
|
|
654
|
+
0,
|
|
655
|
+
)
|
|
656
|
+
) {
|
|
657
|
+
return OptionProgramInstruction.UnwindWriterUnsold;
|
|
658
|
+
}
|
|
659
|
+
if (
|
|
660
|
+
containsBytes(
|
|
661
|
+
data,
|
|
662
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
663
|
+
new Uint8Array([73, 16, 245, 77, 198, 16, 17, 11]),
|
|
664
|
+
),
|
|
665
|
+
0,
|
|
666
|
+
)
|
|
667
|
+
) {
|
|
668
|
+
return OptionProgramInstruction.UpdateImpliedVolatility;
|
|
669
|
+
}
|
|
670
|
+
if (
|
|
671
|
+
containsBytes(
|
|
672
|
+
data,
|
|
673
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
674
|
+
new Uint8Array([38, 27, 206, 55, 6, 151, 187, 10]),
|
|
675
|
+
),
|
|
676
|
+
0,
|
|
677
|
+
)
|
|
678
|
+
) {
|
|
679
|
+
return OptionProgramInstruction.UpdateMarketData;
|
|
680
|
+
}
|
|
681
|
+
if (
|
|
682
|
+
containsBytes(
|
|
683
|
+
data,
|
|
684
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
685
|
+
new Uint8Array([62, 33, 128, 81, 40, 234, 29, 77]),
|
|
686
|
+
),
|
|
687
|
+
0,
|
|
688
|
+
)
|
|
689
|
+
) {
|
|
690
|
+
return OptionProgramInstruction.WithdrawFromPool;
|
|
691
|
+
}
|
|
692
|
+
if (
|
|
693
|
+
containsBytes(
|
|
694
|
+
data,
|
|
695
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
696
|
+
new Uint8Array([39, 178, 255, 108, 24, 150, 180, 238]),
|
|
697
|
+
),
|
|
698
|
+
0,
|
|
699
|
+
)
|
|
700
|
+
) {
|
|
701
|
+
return OptionProgramInstruction.WithdrawFromPosition;
|
|
702
|
+
}
|
|
703
|
+
if (
|
|
704
|
+
containsBytes(
|
|
705
|
+
data,
|
|
706
|
+
fixEncoderSize(getBytesEncoder(), 8).encode(
|
|
707
|
+
new Uint8Array([169, 94, 104, 228, 81, 205, 147, 71]),
|
|
708
|
+
),
|
|
709
|
+
0,
|
|
710
|
+
)
|
|
711
|
+
) {
|
|
712
|
+
return OptionProgramInstruction.WriteToPool;
|
|
713
|
+
}
|
|
714
|
+
throw new Error(
|
|
715
|
+
"The provided instruction could not be identified as a optionProgram instruction.",
|
|
716
|
+
);
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
export type ParsedOptionProgramInstruction<
|
|
720
|
+
TProgram extends string = "BAo7w76URdPRGBc9SuA5p2fUB7zsXpepNjntN8MGLodZ",
|
|
721
|
+
> =
|
|
722
|
+
| ({
|
|
723
|
+
instructionType: OptionProgramInstruction.AcceptAdmin;
|
|
724
|
+
} & ParsedAcceptAdminInstruction<TProgram>)
|
|
725
|
+
| ({
|
|
726
|
+
instructionType: OptionProgramInstruction.AutoExerciseAllExpired;
|
|
727
|
+
} & ParsedAutoExerciseAllExpiredInstruction<TProgram>)
|
|
728
|
+
| ({
|
|
729
|
+
instructionType: OptionProgramInstruction.AutoExerciseExpired;
|
|
730
|
+
} & ParsedAutoExerciseExpiredInstruction<TProgram>)
|
|
731
|
+
| ({
|
|
732
|
+
instructionType: OptionProgramInstruction.BorrowFromPool;
|
|
733
|
+
} & ParsedBorrowFromPoolInstruction<TProgram>)
|
|
734
|
+
| ({
|
|
735
|
+
instructionType: OptionProgramInstruction.BuyFromPool;
|
|
736
|
+
} & ParsedBuyFromPoolInstruction<TProgram>)
|
|
737
|
+
| ({
|
|
738
|
+
instructionType: OptionProgramInstruction.ClaimPremium;
|
|
739
|
+
} & ParsedClaimPremiumInstruction<TProgram>)
|
|
740
|
+
| ({
|
|
741
|
+
instructionType: OptionProgramInstruction.CloseLongToPool;
|
|
742
|
+
} & ParsedCloseLongToPoolInstruction<TProgram>)
|
|
743
|
+
| ({
|
|
744
|
+
instructionType: OptionProgramInstruction.CloseOption;
|
|
745
|
+
} & ParsedCloseOptionInstruction<TProgram>)
|
|
746
|
+
| ({
|
|
747
|
+
instructionType: OptionProgramInstruction.CreateEscrowV2;
|
|
748
|
+
} & ParsedCreateEscrowV2Instruction<TProgram>)
|
|
749
|
+
| ({
|
|
750
|
+
instructionType: OptionProgramInstruction.CreateLiquidityRouter;
|
|
751
|
+
} & ParsedCreateLiquidityRouterInstruction<TProgram>)
|
|
752
|
+
| ({
|
|
753
|
+
instructionType: OptionProgramInstruction.DepositCollateral;
|
|
754
|
+
} & ParsedDepositCollateralInstruction<TProgram>)
|
|
755
|
+
| ({
|
|
756
|
+
instructionType: OptionProgramInstruction.DepositToPool;
|
|
757
|
+
} & ParsedDepositToPoolInstruction<TProgram>)
|
|
758
|
+
| ({
|
|
759
|
+
instructionType: OptionProgramInstruction.DepositToPosition;
|
|
760
|
+
} & ParsedDepositToPositionInstruction<TProgram>)
|
|
761
|
+
| ({
|
|
762
|
+
instructionType: OptionProgramInstruction.InitCollateralPool;
|
|
763
|
+
} & ParsedInitCollateralPoolInstruction<TProgram>)
|
|
764
|
+
| ({
|
|
765
|
+
instructionType: OptionProgramInstruction.InitConfig;
|
|
766
|
+
} & ParsedInitConfigInstruction<TProgram>)
|
|
767
|
+
| ({
|
|
768
|
+
instructionType: OptionProgramInstruction.InitOptionPool;
|
|
769
|
+
} & ParsedInitOptionPoolInstruction<TProgram>)
|
|
770
|
+
| ({
|
|
771
|
+
instructionType: OptionProgramInstruction.InitializeMarketData;
|
|
772
|
+
} & ParsedInitializeMarketDataInstruction<TProgram>)
|
|
773
|
+
| ({
|
|
774
|
+
instructionType: OptionProgramInstruction.LiquidateWriterPosition;
|
|
775
|
+
} & ParsedLiquidateWriterPositionInstruction<TProgram>)
|
|
776
|
+
| ({
|
|
777
|
+
instructionType: OptionProgramInstruction.OmlpCreateVault;
|
|
778
|
+
} & ParsedOmlpCreateVaultInstruction<TProgram>)
|
|
779
|
+
| ({
|
|
780
|
+
instructionType: OptionProgramInstruction.OmlpTakeOfferWithFailover;
|
|
781
|
+
} & ParsedOmlpTakeOfferWithFailoverInstruction<TProgram>)
|
|
782
|
+
| ({
|
|
783
|
+
instructionType: OptionProgramInstruction.OmlpUpdateMaxLeverage;
|
|
784
|
+
} & ParsedOmlpUpdateMaxLeverageInstruction<TProgram>)
|
|
785
|
+
| ({
|
|
786
|
+
instructionType: OptionProgramInstruction.OmlpUpdateProtocolFee;
|
|
787
|
+
} & ParsedOmlpUpdateProtocolFeeInstruction<TProgram>)
|
|
788
|
+
| ({
|
|
789
|
+
instructionType: OptionProgramInstruction.OmlpUpdateSupplyLimit;
|
|
790
|
+
} & ParsedOmlpUpdateSupplyLimitInstruction<TProgram>)
|
|
791
|
+
| ({
|
|
792
|
+
instructionType: OptionProgramInstruction.OptionExercise;
|
|
793
|
+
} & ParsedOptionExerciseInstruction<TProgram>)
|
|
794
|
+
| ({
|
|
795
|
+
instructionType: OptionProgramInstruction.OptionMint;
|
|
796
|
+
} & ParsedOptionMintInstruction<TProgram>)
|
|
797
|
+
| ({
|
|
798
|
+
instructionType: OptionProgramInstruction.OptionValidate;
|
|
799
|
+
} & ParsedOptionValidateInstruction<TProgram>)
|
|
800
|
+
| ({
|
|
801
|
+
instructionType: OptionProgramInstruction.RepayPoolLoan;
|
|
802
|
+
} & ParsedRepayPoolLoanInstruction<TProgram>)
|
|
803
|
+
| ({
|
|
804
|
+
instructionType: OptionProgramInstruction.RepayPoolLoanFromCollateral;
|
|
805
|
+
} & ParsedRepayPoolLoanFromCollateralInstruction<TProgram>)
|
|
806
|
+
| ({
|
|
807
|
+
instructionType: OptionProgramInstruction.SettleMakerCollateral;
|
|
808
|
+
} & ParsedSettleMakerCollateralInstruction<TProgram>)
|
|
809
|
+
| ({
|
|
810
|
+
instructionType: OptionProgramInstruction.SyncWriterPosition;
|
|
811
|
+
} & ParsedSyncWriterPositionInstruction<TProgram>)
|
|
812
|
+
| ({
|
|
813
|
+
instructionType: OptionProgramInstruction.TransferAdmin;
|
|
814
|
+
} & ParsedTransferAdminInstruction<TProgram>)
|
|
815
|
+
| ({
|
|
816
|
+
instructionType: OptionProgramInstruction.UnwindWriterUnsold;
|
|
817
|
+
} & ParsedUnwindWriterUnsoldInstruction<TProgram>)
|
|
818
|
+
| ({
|
|
819
|
+
instructionType: OptionProgramInstruction.UpdateImpliedVolatility;
|
|
820
|
+
} & ParsedUpdateImpliedVolatilityInstruction<TProgram>)
|
|
821
|
+
| ({
|
|
822
|
+
instructionType: OptionProgramInstruction.UpdateMarketData;
|
|
823
|
+
} & ParsedUpdateMarketDataInstruction<TProgram>)
|
|
824
|
+
| ({
|
|
825
|
+
instructionType: OptionProgramInstruction.WithdrawFromPool;
|
|
826
|
+
} & ParsedWithdrawFromPoolInstruction<TProgram>)
|
|
827
|
+
| ({
|
|
828
|
+
instructionType: OptionProgramInstruction.WithdrawFromPosition;
|
|
829
|
+
} & ParsedWithdrawFromPositionInstruction<TProgram>)
|
|
830
|
+
| ({
|
|
831
|
+
instructionType: OptionProgramInstruction.WriteToPool;
|
|
832
|
+
} & ParsedWriteToPoolInstruction<TProgram>);
|