@overcast-xyz/solana-program 0.1.1

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.
@@ -0,0 +1,533 @@
1
+ /**
2
+ * Program IDL in camelCase format in order to be used in JS/TS.
3
+ *
4
+ * Note that this is only a type helper and is not the actual IDL. The original
5
+ * IDL can be found at `target/idl/overcast_fee_hook.json`.
6
+ */
7
+ export type OvercastFeeHook = {
8
+ address: "KCauVaXvP8pdxsAVo62JciiuCKAaCmUQEApUtXjthpJ";
9
+ metadata: {
10
+ name: "overcastFeeHook";
11
+ version: "0.1.0";
12
+ spec: "0.1.0";
13
+ description: "Created with Anchor";
14
+ };
15
+ instructions: [
16
+ {
17
+ name: "claim";
18
+ discriminator: [62, 198, 214, 193, 213, 159, 108, 210];
19
+ accounts: [
20
+ {
21
+ name: "signer";
22
+ writable: true;
23
+ signer: true;
24
+ },
25
+ {
26
+ name: "protocolFee";
27
+ pda: {
28
+ seeds: [
29
+ {
30
+ kind: "const";
31
+ value: [
32
+ 115,
33
+ 116,
34
+ 97,
35
+ 116,
36
+ 105,
37
+ 99,
38
+ 45,
39
+ 112,
40
+ 114,
41
+ 111,
42
+ 116,
43
+ 111,
44
+ 99,
45
+ 111,
46
+ 108,
47
+ 45,
48
+ 102,
49
+ 101,
50
+ 101
51
+ ];
52
+ },
53
+ {
54
+ kind: "arg";
55
+ path: "config.salt";
56
+ }
57
+ ];
58
+ };
59
+ },
60
+ {
61
+ name: "protocolFeeAta";
62
+ writable: true;
63
+ pda: {
64
+ seeds: [
65
+ {
66
+ kind: "account";
67
+ path: "protocolFee";
68
+ },
69
+ {
70
+ kind: "account";
71
+ path: "tokenProgram";
72
+ },
73
+ {
74
+ kind: "account";
75
+ path: "claimMint";
76
+ }
77
+ ];
78
+ program: {
79
+ kind: "const";
80
+ value: [
81
+ 140,
82
+ 151,
83
+ 37,
84
+ 143,
85
+ 78,
86
+ 36,
87
+ 137,
88
+ 241,
89
+ 187,
90
+ 61,
91
+ 16,
92
+ 41,
93
+ 20,
94
+ 142,
95
+ 13,
96
+ 131,
97
+ 11,
98
+ 90,
99
+ 19,
100
+ 153,
101
+ 218,
102
+ 255,
103
+ 16,
104
+ 132,
105
+ 4,
106
+ 142,
107
+ 123,
108
+ 216,
109
+ 219,
110
+ 233,
111
+ 248,
112
+ 89
113
+ ];
114
+ };
115
+ };
116
+ },
117
+ {
118
+ name: "tokenReceiver";
119
+ writable: true;
120
+ },
121
+ {
122
+ name: "claimMint";
123
+ },
124
+ {
125
+ name: "tokenProgram";
126
+ },
127
+ {
128
+ name: "associatedTokenProgram";
129
+ address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
130
+ },
131
+ {
132
+ name: "systemProgram";
133
+ address: "11111111111111111111111111111111";
134
+ }
135
+ ];
136
+ args: [
137
+ {
138
+ name: "config";
139
+ type: {
140
+ defined: {
141
+ name: "protocolFee";
142
+ };
143
+ };
144
+ },
145
+ {
146
+ name: "amount";
147
+ type: "u64";
148
+ }
149
+ ];
150
+ },
151
+ {
152
+ name: "initialize";
153
+ discriminator: [175, 175, 109, 31, 13, 152, 155, 237];
154
+ accounts: [
155
+ {
156
+ name: "signer";
157
+ writable: true;
158
+ signer: true;
159
+ },
160
+ {
161
+ name: "protocolFee";
162
+ writable: true;
163
+ pda: {
164
+ seeds: [
165
+ {
166
+ kind: "const";
167
+ value: [
168
+ 115,
169
+ 116,
170
+ 97,
171
+ 116,
172
+ 105,
173
+ 99,
174
+ 45,
175
+ 112,
176
+ 114,
177
+ 111,
178
+ 116,
179
+ 111,
180
+ 99,
181
+ 111,
182
+ 108,
183
+ 45,
184
+ 102,
185
+ 101,
186
+ 101
187
+ ];
188
+ },
189
+ {
190
+ kind: "arg";
191
+ path: "config.salt";
192
+ }
193
+ ];
194
+ };
195
+ },
196
+ {
197
+ name: "systemProgram";
198
+ address: "11111111111111111111111111111111";
199
+ }
200
+ ];
201
+ args: [
202
+ {
203
+ name: "config";
204
+ type: {
205
+ defined: {
206
+ name: "protocolFee";
207
+ };
208
+ };
209
+ }
210
+ ];
211
+ },
212
+ {
213
+ name: "onCreateOption";
214
+ discriminator: [77, 121, 77, 57, 251, 113, 10, 237];
215
+ accounts: [
216
+ {
217
+ name: "protocolFees";
218
+ }
219
+ ];
220
+ args: [
221
+ {
222
+ name: "option";
223
+ type: {
224
+ defined: {
225
+ name: "marketOption";
226
+ };
227
+ };
228
+ },
229
+ {
230
+ name: "metadata";
231
+ type: "bytes";
232
+ }
233
+ ];
234
+ returns: {
235
+ defined: {
236
+ name: "feeResolution";
237
+ };
238
+ };
239
+ },
240
+ {
241
+ name: "update";
242
+ discriminator: [219, 200, 88, 176, 158, 63, 253, 127];
243
+ accounts: [
244
+ {
245
+ name: "signer";
246
+ writable: true;
247
+ signer: true;
248
+ },
249
+ {
250
+ name: "protocolFee";
251
+ writable: true;
252
+ pda: {
253
+ seeds: [
254
+ {
255
+ kind: "const";
256
+ value: [
257
+ 115,
258
+ 116,
259
+ 97,
260
+ 116,
261
+ 105,
262
+ 99,
263
+ 45,
264
+ 112,
265
+ 114,
266
+ 111,
267
+ 116,
268
+ 111,
269
+ 99,
270
+ 111,
271
+ 108,
272
+ 45,
273
+ 102,
274
+ 101,
275
+ 101
276
+ ];
277
+ },
278
+ {
279
+ kind: "arg";
280
+ path: "config.salt";
281
+ }
282
+ ];
283
+ };
284
+ },
285
+ {
286
+ name: "systemProgram";
287
+ address: "11111111111111111111111111111111";
288
+ }
289
+ ];
290
+ args: [
291
+ {
292
+ name: "config";
293
+ type: {
294
+ defined: {
295
+ name: "protocolFee";
296
+ };
297
+ };
298
+ }
299
+ ];
300
+ }
301
+ ];
302
+ accounts: [
303
+ {
304
+ name: "protocolFee";
305
+ discriminator: [121, 127, 98, 139, 72, 110, 44, 118];
306
+ }
307
+ ];
308
+ events: [
309
+ {
310
+ name: "feesClaimed";
311
+ discriminator: [22, 104, 110, 222, 38, 157, 14, 62];
312
+ }
313
+ ];
314
+ errors: [
315
+ {
316
+ code: 6000;
317
+ name: "customError";
318
+ msg: "Custom error message";
319
+ },
320
+ {
321
+ code: 6001;
322
+ name: "arithmeticOverflow";
323
+ msg: "Arithmetic overflow computing settlement";
324
+ },
325
+ {
326
+ code: 6002;
327
+ name: "unauthorized";
328
+ msg: "Signer is not authorized to perform this action";
329
+ }
330
+ ];
331
+ types: [
332
+ {
333
+ name: "feeConfig";
334
+ type: {
335
+ kind: "enum";
336
+ variants: [
337
+ {
338
+ name: "linear";
339
+ fields: [
340
+ {
341
+ name: "bps";
342
+ type: "u32";
343
+ }
344
+ ];
345
+ }
346
+ ];
347
+ };
348
+ },
349
+ {
350
+ name: "feeResolution";
351
+ docs: [
352
+ "An option-creation hook returns this from `on_create_option` to tell core how",
353
+ "much of the premium to divert as a protocol fee."
354
+ ];
355
+ type: {
356
+ kind: "struct";
357
+ fields: [
358
+ {
359
+ name: "premiumFeeAmount";
360
+ type: "u64";
361
+ }
362
+ ];
363
+ };
364
+ },
365
+ {
366
+ name: "feesClaimed";
367
+ type: {
368
+ kind: "struct";
369
+ fields: [
370
+ {
371
+ name: "protocolFee";
372
+ type: "pubkey";
373
+ },
374
+ {
375
+ name: "mint";
376
+ type: "pubkey";
377
+ },
378
+ {
379
+ name: "receiver";
380
+ type: "pubkey";
381
+ },
382
+ {
383
+ name: "amount";
384
+ type: "u64";
385
+ }
386
+ ];
387
+ };
388
+ },
389
+ {
390
+ name: "marketOption";
391
+ docs: [
392
+ "A live option, as passed to a settlement layer / hook. Mirrors",
393
+ "`overcast_core::state::MarketOption` byte-for-byte."
394
+ ];
395
+ type: {
396
+ kind: "struct";
397
+ fields: [
398
+ {
399
+ name: "details";
400
+ type: {
401
+ defined: {
402
+ name: "optionDetails";
403
+ };
404
+ };
405
+ },
406
+ {
407
+ name: "taker";
408
+ type: "pubkey";
409
+ },
410
+ {
411
+ name: "maker";
412
+ type: "pubkey";
413
+ },
414
+ {
415
+ name: "settlementOffer";
416
+ type: "pubkey";
417
+ },
418
+ {
419
+ name: "collateralOffer";
420
+ type: "pubkey";
421
+ },
422
+ {
423
+ name: "borrowedCollateral";
424
+ docs: [
425
+ "Collateral currently out on loan via `borrow_collateral` and not yet",
426
+ "returned via `repay_collateral`."
427
+ ];
428
+ type: "u64";
429
+ }
430
+ ];
431
+ };
432
+ },
433
+ {
434
+ name: "optionDetails";
435
+ docs: [
436
+ "The economic terms of an option, as seen by a settlement layer / hook.",
437
+ "",
438
+ "Mirrors `overcast_core::state::OptionDetails` byte-for-byte — core owns the",
439
+ "on-chain account representation, this is the shared interface view."
440
+ ];
441
+ type: {
442
+ kind: "struct";
443
+ fields: [
444
+ {
445
+ name: "domain";
446
+ type: "u32";
447
+ },
448
+ {
449
+ name: "startTimestamp";
450
+ type: "i64";
451
+ },
452
+ {
453
+ name: "endTimestamp";
454
+ type: "i64";
455
+ },
456
+ {
457
+ name: "premiumAsset";
458
+ type: "pubkey";
459
+ },
460
+ {
461
+ name: "premiumAmount";
462
+ type: "u64";
463
+ },
464
+ {
465
+ name: "collateralAsset";
466
+ type: "pubkey";
467
+ },
468
+ {
469
+ name: "collateralAmount";
470
+ type: "u64";
471
+ },
472
+ {
473
+ name: "settlementAsset";
474
+ type: "pubkey";
475
+ },
476
+ {
477
+ name: "settlementAmount";
478
+ type: "u64";
479
+ },
480
+ {
481
+ name: "settlementLayer";
482
+ type: "pubkey";
483
+ },
484
+ {
485
+ name: "borrowAllowed";
486
+ docs: [
487
+ "Opt-in flag: if false, `borrow_collateral` is hard-rejected by core",
488
+ "regardless of what the settlement layer says. If true, the layer is",
489
+ "CPI'd and can still refuse."
490
+ ];
491
+ type: "bool";
492
+ }
493
+ ];
494
+ };
495
+ },
496
+ {
497
+ name: "protocolFee";
498
+ type: {
499
+ kind: "struct";
500
+ fields: [
501
+ {
502
+ name: "authority";
503
+ type: "pubkey";
504
+ },
505
+ {
506
+ name: "payoutAuthority";
507
+ type: "pubkey";
508
+ },
509
+ {
510
+ name: "claimAuthority";
511
+ type: "pubkey";
512
+ },
513
+ {
514
+ name: "feeConfig";
515
+ type: {
516
+ defined: {
517
+ name: "feeConfig";
518
+ };
519
+ };
520
+ },
521
+ {
522
+ name: "salt";
523
+ type: "pubkey";
524
+ },
525
+ {
526
+ name: "bump";
527
+ type: "u8";
528
+ }
529
+ ];
530
+ };
531
+ }
532
+ ];
533
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });