@omegax/protocol-sdk 0.4.4 → 0.6.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.
Files changed (57) hide show
  1. package/NOTICE +5 -0
  2. package/README.md +88 -20
  3. package/dist/claims.d.ts +1 -2
  4. package/dist/claims.js +101 -166
  5. package/dist/internal/protocol/all.d.ts +283 -0
  6. package/dist/internal/protocol/all.js +7195 -0
  7. package/dist/internal/protocol/builders.d.ts +1 -0
  8. package/dist/internal/protocol/builders.js +1 -0
  9. package/dist/internal/protocol/client.d.ts +1 -0
  10. package/dist/internal/protocol/client.js +1 -0
  11. package/dist/internal/protocol/constants.d.ts +1 -0
  12. package/dist/internal/protocol/constants.js +1 -0
  13. package/dist/internal/protocol/decoders.d.ts +1 -0
  14. package/dist/internal/protocol/decoders.js +1 -0
  15. package/dist/internal/protocol/fetchers.d.ts +1 -0
  16. package/dist/internal/protocol/fetchers.js +1 -0
  17. package/dist/internal/protocol/shared.d.ts +1 -0
  18. package/dist/internal/protocol/shared.js +1 -0
  19. package/dist/internal/protocol-seeds/all.d.ts +265 -0
  20. package/dist/internal/protocol-seeds/all.js +455 -0
  21. package/dist/internal/protocol-seeds/claims.d.ts +1 -0
  22. package/dist/internal/protocol-seeds/claims.js +1 -0
  23. package/dist/internal/protocol-seeds/core.d.ts +1 -0
  24. package/dist/internal/protocol-seeds/core.js +1 -0
  25. package/dist/internal/protocol-seeds/liquidity.d.ts +1 -0
  26. package/dist/internal/protocol-seeds/liquidity.js +1 -0
  27. package/dist/internal/protocol-seeds/oracle.d.ts +1 -0
  28. package/dist/internal/protocol-seeds/oracle.js +1 -0
  29. package/dist/internal/protocol-seeds/policy.d.ts +1 -0
  30. package/dist/internal/protocol-seeds/policy.js +1 -0
  31. package/dist/internal/reward-claim.d.ts +17 -0
  32. package/dist/internal/reward-claim.js +27 -0
  33. package/dist/internal/rpc.d.ts +15 -0
  34. package/dist/internal/rpc.js +26 -0
  35. package/dist/internal/types/all.d.ts +1952 -0
  36. package/dist/internal/types/all.js +1 -0
  37. package/dist/internal/types/builders.d.ts +1 -0
  38. package/dist/internal/types/builders.js +1 -0
  39. package/dist/internal/types/claims.d.ts +1 -0
  40. package/dist/internal/types/claims.js +1 -0
  41. package/dist/internal/types/oracle.d.ts +1 -0
  42. package/dist/internal/types/oracle.js +1 -0
  43. package/dist/internal/types/protocol.d.ts +1 -0
  44. package/dist/internal/types/protocol.js +1 -0
  45. package/dist/internal/types/rpc.d.ts +1 -0
  46. package/dist/internal/types/rpc.js +1 -0
  47. package/dist/oracle.js +3 -2
  48. package/dist/protocol.d.ts +3 -13
  49. package/dist/protocol.js +3 -4534
  50. package/dist/protocol_seeds.d.ts +1 -220
  51. package/dist/protocol_seeds.js +1 -324
  52. package/dist/rpc.js +51 -6
  53. package/dist/transactions.d.ts +1 -0
  54. package/dist/transactions.js +28 -6
  55. package/dist/types.d.ts +1 -1424
  56. package/dist/types.js +1 -1
  57. package/package.json +22 -5
package/dist/types.d.ts CHANGED
@@ -1,1424 +1 @@
1
- import type { PublicKey, Connection, Transaction } from '@solana/web3.js';
2
- export type ClaimLifecycleStatus = 'prepared' | 'submitted' | 'confirmed' | 'failed' | 'expired';
3
- export type ClaimFailureCode = 'invalid_claimant_wallet' | 'wallet_mismatch' | 'pool_not_found' | 'pool_not_active' | 'membership_not_active' | 'claim_window_not_set' | 'claim_window_not_open' | 'claim_window_closed' | 'no_passing_outcomes' | 'seeker_rule_misconfigured' | 'seeker_commitment_disabled' | 'intent_expired' | 'intent_message_mismatch' | 'required_signer_mismatch' | 'simulation_failed_insufficient_funds' | 'simulation_failed_pool_paused' | 'simulation_failed_membership_invalid' | 'simulation_failed_unknown' | 'rpc_rejected' | 'rpc_timeout' | 'already_claimed' | 'unknown';
4
- export interface ClaimFailureDetail {
5
- code: ClaimFailureCode;
6
- message: string;
7
- }
8
- export interface RewardSummary {
9
- wallet: {
10
- connected: boolean;
11
- address: string | null;
12
- provider: string | null;
13
- };
14
- cycle: {
15
- id: string;
16
- status: 'active' | 'completed' | 'abandoned' | 'paused';
17
- primaryGoalId: string | null;
18
- outcomesPassed: number;
19
- outcomesTotal: number;
20
- startIso: string;
21
- endIso: string;
22
- };
23
- rewards: {
24
- asset: string;
25
- claimableRaw: string;
26
- claimableUi: string;
27
- status: 'eligible' | 'not_eligible' | 'pending' | 'claimed' | 'failed';
28
- errorCode?: string | null;
29
- errorMessage?: string | null;
30
- };
31
- }
32
- export interface ClaimIntent {
33
- intentId: string;
34
- unsignedTxBase64: string;
35
- requiredSigner: string;
36
- expiresAtIso: string;
37
- attestationRefs: string[];
38
- }
39
- export interface RewardClaimIntent {
40
- intentHashHex: string;
41
- unsignedTxBase64: string;
42
- requiredSigner: string;
43
- }
44
- export interface OutcomeAttestation {
45
- id: string;
46
- userId: string;
47
- cycleId: string;
48
- outcomeId: string;
49
- asOfIso: string;
50
- issuedAtIso: string;
51
- payload: Record<string, unknown>;
52
- verifier: {
53
- keyId: string;
54
- publicKeyBase58: string;
55
- algorithm: 'ed25519';
56
- };
57
- signatureBase64: string;
58
- digestHex: string;
59
- }
60
- export interface OracleSigner {
61
- keyId: string;
62
- publicKeyBase58: string;
63
- sign: (message: Uint8Array) => Promise<Uint8Array>;
64
- }
65
- export interface OracleKmsSignerAdapter {
66
- keyId: string;
67
- publicKeyBase58: string;
68
- signWithKms: (message: Uint8Array) => Promise<Uint8Array>;
69
- }
70
- export interface BuildUnsignedClaimTxParams {
71
- intentId: string;
72
- claimantWallet: string;
73
- cycleId: string;
74
- outcomeId: string;
75
- attestationRefs: string[];
76
- recentBlockhash: string;
77
- expiresAtIso: string;
78
- programId: string;
79
- poolAddress: string;
80
- }
81
- export interface BuildUnsignedRewardClaimTxParams {
82
- claimantWallet: string;
83
- member: string;
84
- poolAddress: string;
85
- cycleId: string;
86
- ruleHashHex: string;
87
- intentHashHex: string;
88
- payoutAmount: bigint;
89
- recipient: string;
90
- recipientSystemAccount: string;
91
- claimDelegate?: string;
92
- poolAssetVault?: string;
93
- poolVaultTokenAccount?: string;
94
- recipientTokenAccount?: string;
95
- recentBlockhash: string;
96
- programId: string;
97
- }
98
- export interface ValidateSignedClaimTxParams {
99
- signedTxBase64: string;
100
- requiredSigner: string;
101
- expectedUnsignedTxBase64?: string;
102
- }
103
- export type ValidateSignedClaimTxReason = 'invalid_transaction_base64' | 'missing_fee_payer' | 'required_signer_mismatch' | 'missing_required_signature' | 'invalid_required_signature' | 'intent_message_mismatch';
104
- export interface ValidateSignedClaimTxResult {
105
- valid: boolean;
106
- txSignature: string | null;
107
- reason: ValidateSignedClaimTxReason | null;
108
- signer: string | null;
109
- }
110
- export interface BroadcastSignedTxParams {
111
- signedTxBase64: string;
112
- commitment?: 'processed' | 'confirmed' | 'finalized';
113
- skipPreflight?: boolean;
114
- maxRetries?: number;
115
- }
116
- export interface BroadcastSignedTxResult {
117
- signature: string;
118
- status: ClaimLifecycleStatus;
119
- slot: number | null;
120
- }
121
- export interface SimulateSignedTxParams {
122
- signedTxBase64: string;
123
- commitment?: 'processed' | 'confirmed' | 'finalized';
124
- replaceRecentBlockhash?: boolean;
125
- sigVerify?: boolean;
126
- }
127
- export interface SimulateSignedTxResult {
128
- ok: boolean;
129
- logs: string[];
130
- unitsConsumed: number | null;
131
- err: unknown | null;
132
- failure: ClaimFailureDetail | null;
133
- }
134
- export type SignatureLifecycleStatus = 'processed' | 'confirmed' | 'finalized' | 'failed' | 'unknown';
135
- export interface GetSignatureStatusParams {
136
- signature: string;
137
- searchTransactionHistory?: boolean;
138
- }
139
- export interface GetSignatureStatusResult {
140
- signature: string;
141
- status: SignatureLifecycleStatus;
142
- confirmations: number | null;
143
- slot: number | null;
144
- err: unknown | null;
145
- }
146
- export interface RpcClient {
147
- getRecentBlockhash: () => Promise<string>;
148
- broadcastSignedTx: (params: BroadcastSignedTxParams) => Promise<BroadcastSignedTxResult>;
149
- simulateSignedTx: (params: SimulateSignedTxParams) => Promise<SimulateSignedTxResult>;
150
- getSignatureStatus: (params: GetSignatureStatusParams) => Promise<GetSignatureStatusResult>;
151
- }
152
- export type ProgramAccountLike = {
153
- pubkey: string | PublicKey;
154
- isSigner?: boolean;
155
- isWritable?: boolean;
156
- };
157
- export type ProtocolPoolStatus = 'draft' | 'active' | 'paused' | 'closed' | 'unknown';
158
- export type ProtocolMembershipStatus = 'active' | 'revoked' | 'unknown';
159
- export interface ProtocolConfigAccount {
160
- address: string;
161
- admin: string;
162
- protocolFeeBps: number;
163
- emergencyPaused: boolean;
164
- bump: number;
165
- }
166
- export interface ProtocolPoolAccount {
167
- address: string;
168
- authority: string;
169
- poolId: string;
170
- organizationRef: string;
171
- payoutLamportsPerPass: bigint;
172
- membershipMode: number;
173
- tokenGateMint: string;
174
- tokenGateMinBalance: bigint;
175
- inviteIssuer: string;
176
- statusCode: number;
177
- status: ProtocolPoolStatus;
178
- bump: number;
179
- }
180
- export interface ProtocolOracleRegistryEntryAccount {
181
- address: string;
182
- oracle: string;
183
- active: boolean;
184
- bump: number;
185
- metadataUri: string;
186
- }
187
- export interface ProtocolOracleProfileAccount {
188
- address: string;
189
- oracle: string;
190
- admin: string;
191
- oracleType: number;
192
- displayName: string;
193
- legalName: string;
194
- websiteUrl: string;
195
- appUrl: string;
196
- logoUri: string;
197
- webhookUrl: string;
198
- supportedSchemaCount: number;
199
- supportedSchemaKeyHashesHex: string[];
200
- claimed: boolean;
201
- createdAtTs: number;
202
- updatedAtTs: number;
203
- bump: number;
204
- }
205
- export interface ProtocolPoolOracleApprovalAccount {
206
- address: string;
207
- pool: string;
208
- oracle: string;
209
- active: boolean;
210
- bump: number;
211
- }
212
- export interface ProtocolMembershipRecordAccount {
213
- address: string;
214
- pool: string;
215
- member: string;
216
- subjectCommitmentHex: string;
217
- statusCode: number;
218
- status: ProtocolMembershipStatus;
219
- enrolledAt: number;
220
- updatedAt: number;
221
- bump: number;
222
- }
223
- export interface ProtocolCycleOutcomeAccount {
224
- address: string;
225
- pool: string;
226
- member: string;
227
- cycleHashHex: string;
228
- passCount: number;
229
- attestationCount: number;
230
- latestAsOfTs: number;
231
- claimed: boolean;
232
- bump: number;
233
- }
234
- export interface ProtocolCycleWindowAccount {
235
- address: string;
236
- pool: string;
237
- cycleHashHex: string;
238
- authority: string;
239
- claimOpenTs: number;
240
- claimCloseTs: number;
241
- bump: number;
242
- }
243
- export interface ProtocolClaimRecordAccount {
244
- address: string;
245
- pool: string;
246
- member: string;
247
- cycleHashHex: string;
248
- claimIntentHex: string;
249
- payoutLamports: bigint;
250
- passCount: number;
251
- submittedAt: number;
252
- bump: number;
253
- }
254
- export interface BuildInitializeProtocolTxParams {
255
- admin: string;
256
- protocolFeeBps: number;
257
- recentBlockhash: string;
258
- programId: string;
259
- }
260
- export interface BuildSetProtocolPauseTxParams {
261
- admin: string;
262
- paused: boolean;
263
- recentBlockhash: string;
264
- programId: string;
265
- }
266
- export interface BuildCreatePoolTxParams {
267
- authority: string;
268
- poolId: string;
269
- organizationRef: string;
270
- payoutLamportsPerPass: bigint;
271
- membershipMode: number;
272
- tokenGateMint?: string;
273
- tokenGateMinBalance?: bigint;
274
- inviteIssuer?: string;
275
- recentBlockhash: string;
276
- programId: string;
277
- }
278
- export interface BuildSetPoolStatusTxParams {
279
- authority: string;
280
- poolAddress: string;
281
- status: number;
282
- recentBlockhash: string;
283
- programId: string;
284
- }
285
- export interface BuildSetCycleWindowTxParams {
286
- authority: string;
287
- poolAddress: string;
288
- cycleId: string;
289
- claimOpenTs: number;
290
- claimCloseTs: number;
291
- recentBlockhash: string;
292
- programId: string;
293
- }
294
- export interface BuildFundPoolTxParams {
295
- funder: string;
296
- poolAddress: string;
297
- lamports: bigint;
298
- recentBlockhash: string;
299
- programId: string;
300
- }
301
- export interface BuildRegisterOracleTxParams {
302
- oracle: string;
303
- metadataUri: string;
304
- recentBlockhash: string;
305
- programId: string;
306
- }
307
- export interface BuildSetPoolOracleTxParams {
308
- authority: string;
309
- poolAddress: string;
310
- oracle: string;
311
- active: boolean;
312
- recentBlockhash: string;
313
- programId: string;
314
- }
315
- export interface BuildEnrollMemberTxParams {
316
- member: string;
317
- poolAddress: string;
318
- subjectCommitmentHex?: string;
319
- inviteCodeHashHex?: string;
320
- tokenGateAccount?: string;
321
- inviteIssuer?: string;
322
- recentBlockhash: string;
323
- programId: string;
324
- }
325
- export interface BuildRevokeMemberTxParams {
326
- authority: string;
327
- poolAddress: string;
328
- member: string;
329
- recentBlockhash: string;
330
- programId: string;
331
- }
332
- export interface BuildSubmitOutcomeAttestationTxParams {
333
- oracle: string;
334
- member: string;
335
- poolAddress: string;
336
- cycleId: string;
337
- outcomeId: string;
338
- replayKey: string;
339
- asOfIso: string;
340
- passed: boolean;
341
- attestationDigestHex?: string;
342
- recentBlockhash: string;
343
- programId: string;
344
- }
345
- export interface BuildSubmitClaimTxParams {
346
- claimant: string;
347
- poolAddress: string;
348
- cycleId: string;
349
- intentId: string;
350
- recentBlockhash: string;
351
- programId: string;
352
- }
353
- export interface ProtocolCycleQuoteFields {
354
- poolAddress: string;
355
- member: string;
356
- productIdHashHex: string;
357
- paymentMint: string;
358
- premiumAmountRaw: bigint;
359
- canonicalPremiumAmount: bigint;
360
- periodIndex: bigint;
361
- commitmentEnabled: boolean;
362
- bondAmountRaw: bigint;
363
- shieldFeeRaw: bigint;
364
- protocolFeeRaw: bigint;
365
- oracleFeeRaw: bigint;
366
- netPoolPremiumRaw: bigint;
367
- totalAmountRaw: bigint;
368
- includedShieldCount: number;
369
- thresholdBps: number;
370
- expiresAtTs: bigint;
371
- nonceHashHex: string;
372
- quoteMetaHashHex: string;
373
- }
374
- export interface BuildActivateCycleWithQuoteSolTxParams {
375
- payer: string;
376
- member: string;
377
- poolAddress: string;
378
- oracle: string;
379
- productIdHashHex: string;
380
- premiumAmountRaw: bigint;
381
- canonicalPremiumAmount: bigint;
382
- periodIndex: bigint;
383
- commitmentEnabled: boolean;
384
- bondAmountRaw: bigint;
385
- shieldFeeRaw: bigint;
386
- protocolFeeRaw: bigint;
387
- oracleFeeRaw: bigint;
388
- netPoolPremiumRaw: bigint;
389
- totalAmountRaw: bigint;
390
- includedShieldCount: number;
391
- thresholdBps: number;
392
- expiresAtTs: bigint;
393
- nonceHashHex: string;
394
- quoteMetaHashHex: string;
395
- quoteMessage: Uint8Array;
396
- oracleSecretKey: Uint8Array;
397
- computeUnitLimit?: number;
398
- recentBlockhash: string;
399
- programId: string;
400
- }
401
- export interface BuildActivateCycleWithQuoteSplTxParams {
402
- payer: string;
403
- member: string;
404
- poolAddress: string;
405
- oracle: string;
406
- productIdHashHex: string;
407
- paymentMint: string;
408
- premiumAmountRaw: bigint;
409
- canonicalPremiumAmount: bigint;
410
- periodIndex: bigint;
411
- commitmentEnabled: boolean;
412
- bondAmountRaw: bigint;
413
- shieldFeeRaw: bigint;
414
- protocolFeeRaw: bigint;
415
- oracleFeeRaw: bigint;
416
- netPoolPremiumRaw: bigint;
417
- totalAmountRaw: bigint;
418
- includedShieldCount: number;
419
- thresholdBps: number;
420
- expiresAtTs: bigint;
421
- nonceHashHex: string;
422
- quoteMetaHashHex: string;
423
- quoteMessage: Uint8Array;
424
- oracleSecretKey: Uint8Array;
425
- computeUnitLimit?: number;
426
- recentBlockhash: string;
427
- programId: string;
428
- }
429
- export interface BuildSettleCycleCommitmentTxParams {
430
- payer: string;
431
- oracle: string;
432
- member: string;
433
- poolAddress: string;
434
- productIdHashHex: string;
435
- paymentMint: string;
436
- periodIndex: bigint;
437
- passed: boolean;
438
- shieldConsumed: boolean;
439
- recentBlockhash: string;
440
- programId: string;
441
- }
442
- export interface BuildSettleCycleCommitmentSolTxParams {
443
- payer: string;
444
- oracle: string;
445
- member: string;
446
- poolAddress: string;
447
- productIdHashHex: string;
448
- periodIndex: bigint;
449
- passed: boolean;
450
- shieldConsumed: boolean;
451
- recentBlockhash: string;
452
- programId: string;
453
- }
454
- export interface BuildWithdrawPoolTreasurySplTxParams {
455
- payer: string;
456
- oracle: string;
457
- poolAddress: string;
458
- paymentMint: string;
459
- amount: bigint;
460
- recipientTokenAccount: string;
461
- recentBlockhash: string;
462
- programId: string;
463
- }
464
- export interface BuildWithdrawPoolTreasurySolTxParams {
465
- payer: string;
466
- oracle: string;
467
- poolAddress: string;
468
- amount: bigint;
469
- recipientSystemAccount: string;
470
- recentBlockhash: string;
471
- programId: string;
472
- }
473
- export interface BuildSetPoolCoverageReserveFloorTxParams {
474
- authority: string;
475
- poolAddress: string;
476
- paymentMint: string;
477
- amount: bigint;
478
- recentBlockhash: string;
479
- programId: string;
480
- }
481
- export interface BuildWithdrawProtocolFeeSplTxParams {
482
- governanceAuthority: string;
483
- paymentMint: string;
484
- amount: bigint;
485
- recipientTokenAccount: string;
486
- recentBlockhash: string;
487
- programId: string;
488
- }
489
- export interface BuildWithdrawProtocolFeeSolTxParams {
490
- governanceAuthority: string;
491
- amount: bigint;
492
- recipientSystemAccount: string;
493
- recentBlockhash: string;
494
- programId: string;
495
- }
496
- export interface BuildWithdrawPoolOracleFeeSplTxParams {
497
- oracle: string;
498
- poolAddress: string;
499
- paymentMint: string;
500
- amount: bigint;
501
- recipientTokenAccount: string;
502
- recentBlockhash: string;
503
- programId: string;
504
- }
505
- export interface BuildWithdrawPoolOracleFeeSolTxParams {
506
- oracle: string;
507
- poolAddress: string;
508
- amount: bigint;
509
- recipientSystemAccount: string;
510
- recentBlockhash: string;
511
- programId: string;
512
- }
513
- export interface ProtocolClient {
514
- connection: Connection;
515
- programId: PublicKey;
516
- buildInitializeProtocolTx?: (params: BuildInitializeProtocolTxParams) => Transaction;
517
- buildSetProtocolPauseTx?: (params: BuildSetProtocolPauseTxParams) => Transaction;
518
- buildCreatePoolTx?: (params: BuildCreatePoolTxParams) => Transaction;
519
- buildSetPoolStatusTx?: (params: BuildSetPoolStatusTxParams) => Transaction;
520
- buildSetCycleWindowTx?: (params: BuildSetCycleWindowTxParams) => Transaction;
521
- buildFundPoolTx?: (params: BuildFundPoolTxParams) => Transaction;
522
- buildRegisterOracleTx?: (params: BuildRegisterOracleTxParams) => Transaction;
523
- buildSetPoolOracleTx?: (params: BuildSetPoolOracleTxParams) => Transaction;
524
- buildEnrollMemberTx?: (params: BuildEnrollMemberTxParams) => Transaction;
525
- buildRevokeMemberTx?: (params: BuildRevokeMemberTxParams) => Transaction;
526
- buildSubmitOutcomeAttestationTx?: (params: BuildSubmitOutcomeAttestationTxParams) => Transaction;
527
- buildSubmitClaimTx?: (params: BuildSubmitClaimTxParams) => Transaction;
528
- buildActivateCycleWithQuoteSolTx?: (params: BuildActivateCycleWithQuoteSolTxParams) => Transaction;
529
- buildActivateCycleWithQuoteSplTx?: (params: BuildActivateCycleWithQuoteSplTxParams) => Transaction;
530
- buildSettleCycleCommitmentTx?: (params: BuildSettleCycleCommitmentTxParams) => Transaction;
531
- buildSettleCycleCommitmentSolTx?: (params: BuildSettleCycleCommitmentSolTxParams) => Transaction;
532
- buildWithdrawPoolTreasurySplTx?: (params: BuildWithdrawPoolTreasurySplTxParams) => Transaction;
533
- buildWithdrawPoolTreasurySolTx?: (params: BuildWithdrawPoolTreasurySolTxParams) => Transaction;
534
- buildSetPoolCoverageReserveFloorTx?: (params: BuildSetPoolCoverageReserveFloorTxParams) => Transaction;
535
- buildWithdrawProtocolFeeSplTx?: (params: BuildWithdrawProtocolFeeSplTxParams) => Transaction;
536
- buildWithdrawProtocolFeeSolTx?: (params: BuildWithdrawProtocolFeeSolTxParams) => Transaction;
537
- buildWithdrawPoolOracleFeeSplTx?: (params: BuildWithdrawPoolOracleFeeSplTxParams) => Transaction;
538
- buildWithdrawPoolOracleFeeSolTx?: (params: BuildWithdrawPoolOracleFeeSolTxParams) => Transaction;
539
- fetchProtocolConfig?: () => Promise<ProtocolConfigAccount | null>;
540
- fetchPool?: (poolAddress: string) => Promise<ProtocolPoolAccount | null>;
541
- fetchOracleRegistryEntry?: (oracle: string) => Promise<ProtocolOracleRegistryEntryAccount | null>;
542
- fetchPoolOracleApproval?: (params: {
543
- poolAddress: string;
544
- oracle: string;
545
- }) => Promise<ProtocolPoolOracleApprovalAccount | null>;
546
- fetchMembershipRecord?: (params: {
547
- poolAddress: string;
548
- member: string;
549
- }) => Promise<ProtocolMembershipRecordAccount | null>;
550
- fetchCycleOutcome?: (params: {
551
- poolAddress: string;
552
- member: string;
553
- cycleId: string;
554
- }) => Promise<ProtocolCycleOutcomeAccount | null>;
555
- fetchCycleWindow?: (params: {
556
- poolAddress: string;
557
- cycleId: string;
558
- }) => Promise<ProtocolCycleWindowAccount | null>;
559
- fetchClaimRecord?: (params: {
560
- poolAddress: string;
561
- member: string;
562
- cycleId: string;
563
- }) => Promise<ProtocolClaimRecordAccount | null>;
564
- buildInitializeProtocolV2Tx?: (params: BuildInitializeProtocolV2TxParams) => Transaction;
565
- buildSetProtocolParamsTx?: (params: BuildSetProtocolParamsTxParams) => Transaction;
566
- buildRotateGovernanceAuthorityTx?: (params: BuildRotateGovernanceAuthorityTxParams) => Transaction;
567
- buildRegisterOracleV2Tx?: (params: BuildRegisterOracleV2TxParams) => Transaction;
568
- buildClaimOracleV2Tx?: (params: BuildClaimOracleV2TxParams) => Transaction;
569
- buildUpdateOracleProfileV2Tx?: (params: BuildUpdateOracleProfileV2TxParams) => Transaction;
570
- buildUpdateOracleMetadataTx?: (params: BuildUpdateOracleMetadataTxParams) => Transaction;
571
- buildStakeOracleTx?: (params: BuildStakeOracleTxParams) => Transaction;
572
- buildRequestUnstakeTx?: (params: BuildRequestUnstakeTxParams) => Transaction;
573
- buildFinalizeUnstakeTx?: (params: BuildFinalizeUnstakeTxParams) => Transaction;
574
- buildSlashOracleTx?: (params: BuildSlashOracleTxParams) => Transaction;
575
- buildCreatePoolV2Tx?: (params: BuildCreatePoolV2TxParams) => Transaction;
576
- buildSetPoolOraclePolicyTx?: (params: BuildSetPoolOraclePolicyTxParams) => Transaction;
577
- buildSetPoolOraclePermissionsTx?: (params: BuildSetPoolOraclePermissionsTxParams) => Transaction;
578
- buildSetPoolTermsHashTx?: (params: BuildSetPoolTermsHashTxParams) => Transaction;
579
- buildRegisterOutcomeSchemaTx?: (params: BuildRegisterOutcomeSchemaTxParams) => Transaction;
580
- buildVerifyOutcomeSchemaTx?: (params: BuildVerifyOutcomeSchemaTxParams) => Transaction;
581
- buildSetPoolOutcomeRuleTx?: (params: BuildSetPoolOutcomeRuleTxParams) => Transaction;
582
- buildRegisterInviteIssuerTx?: (params: BuildRegisterInviteIssuerTxParams) => Transaction;
583
- buildEnrollMemberOpenTx?: (params: BuildEnrollMemberOpenTxParams) => Transaction;
584
- buildEnrollMemberTokenGateTx?: (params: BuildEnrollMemberTokenGateTxParams) => Transaction;
585
- buildEnrollMemberInvitePermitTx?: (params: BuildEnrollMemberInvitePermitTxParams) => Transaction;
586
- buildSetClaimDelegateTx?: (params: BuildSetClaimDelegateTxParams) => Transaction;
587
- buildFundPoolSolTx?: (params: BuildFundPoolSolTxParams) => Transaction;
588
- buildFundPoolSplTx?: (params: BuildFundPoolSplTxParams) => Transaction;
589
- buildSubmitOutcomeAttestationVoteTx?: (params: BuildSubmitOutcomeAttestationVoteTxParams) => Transaction;
590
- buildFinalizeCycleOutcomeTx?: (params: BuildFinalizeCycleOutcomeTxParams) => Transaction;
591
- buildSubmitRewardClaimTx?: (params: BuildSubmitRewardClaimTxParams) => Transaction;
592
- buildRegisterCoverageProductV2Tx?: (params: BuildRegisterCoverageProductV2TxParams) => Transaction;
593
- buildUpdateCoverageProductV2Tx?: (params: BuildUpdateCoverageProductV2TxParams) => Transaction;
594
- buildUpsertCoverageProductPaymentOptionTx?: (params: BuildUpsertCoverageProductPaymentOptionTxParams) => Transaction;
595
- buildSubscribeCoverageProductV2Tx?: (params: BuildSubscribeCoverageProductV2TxParams) => Transaction;
596
- buildIssueCoveragePolicyFromProductV2Tx?: (params: BuildIssueCoveragePolicyFromProductV2TxParams) => Transaction;
597
- buildCreateCoveragePolicyTx?: (params: BuildCreateCoveragePolicyTxParams) => Transaction;
598
- buildMintPolicyNftTx?: (params: BuildMintPolicyNftTxParams) => Transaction;
599
- buildPayPremiumOnchainTx?: (params: BuildPayPremiumOnchainTxParams) => Transaction;
600
- buildAttestPremiumPaidOffchainTx?: (params: BuildAttestPremiumPaidOffchainTxParams) => Transaction;
601
- buildSubmitCoverageClaimTx?: (params: BuildSubmitCoverageClaimTxParams) => Transaction;
602
- buildSettleCoverageClaimTx?: (params: BuildSettleCoverageClaimTxParams) => Transaction;
603
- buildMigratePoolV1ToV2Tx?: (params: BuildMigratePoolV1ToV2TxParams) => Transaction;
604
- buildMigrateMembershipV1ToV2Tx?: (params: BuildMigrateMembershipV1ToV2TxParams) => Transaction;
605
- fetchProtocolConfigV2?: () => Promise<ProtocolConfigV2Account | null>;
606
- fetchOracleProfile?: (oracle: string) => Promise<ProtocolOracleProfileAccount | null>;
607
- fetchOracleStakePosition?: (params: {
608
- oracle: string;
609
- staker: string;
610
- }) => Promise<ProtocolOracleStakePositionAccount | null>;
611
- fetchPoolOraclePolicy?: (poolAddress: string) => Promise<ProtocolPoolOraclePolicyAccount | null>;
612
- fetchPoolTerms?: (poolAddress: string) => Promise<ProtocolPoolTermsAccount | null>;
613
- fetchPoolAssetVault?: (params: {
614
- poolAddress: string;
615
- payoutMint: string;
616
- }) => Promise<ProtocolPoolAssetVaultAccount | null>;
617
- fetchProtocolFeeVault?: (paymentMint: string) => Promise<ProtocolFeeVaultAccount | null>;
618
- fetchPoolOracleFeeVault?: (params: {
619
- poolAddress: string;
620
- oracle: string;
621
- paymentMint: string;
622
- }) => Promise<ProtocolPoolOracleFeeVaultAccount | null>;
623
- fetchPoolOraclePermissionSet?: (params: {
624
- poolAddress: string;
625
- oracle: string;
626
- }) => Promise<ProtocolPoolOraclePermissionSetAccount | null>;
627
- fetchOutcomeSchema?: (schemaKeyHashHex: string) => Promise<ProtocolOutcomeSchemaRegistryEntryAccount | null>;
628
- fetchPoolOutcomeRule?: (params: {
629
- poolAddress: string;
630
- ruleHashHex: string;
631
- }) => Promise<ProtocolPoolOutcomeRuleAccount | null>;
632
- fetchInviteIssuer?: (issuer: string) => Promise<ProtocolInviteIssuerRegistryEntryAccount | null>;
633
- fetchCycleOutcomeAggregate?: (params: {
634
- poolAddress: string;
635
- member: string;
636
- cycleId: string;
637
- ruleHashHex: string;
638
- }) => Promise<ProtocolCycleOutcomeAggregateAccount | null>;
639
- fetchEnrollmentPermitReplay?: (params: {
640
- poolAddress: string;
641
- member: string;
642
- nonceHashHex: string;
643
- }) => Promise<ProtocolEnrollmentPermitReplayAccount | null>;
644
- fetchAttestationVote?: (params: {
645
- poolAddress: string;
646
- member: string;
647
- cycleId: string;
648
- ruleHashHex: string;
649
- oracle: string;
650
- }) => Promise<ProtocolAttestationVoteAccount | null>;
651
- fetchClaimDelegate?: (params: {
652
- poolAddress: string;
653
- member: string;
654
- }) => Promise<ProtocolClaimDelegateAuthorizationAccount | null>;
655
- fetchClaimRecordV2?: (params: {
656
- poolAddress: string;
657
- member: string;
658
- cycleId: string;
659
- ruleHashHex: string;
660
- }) => Promise<ProtocolClaimRecordV2Account | null>;
661
- fetchCoverageProduct?: (params: {
662
- poolAddress: string;
663
- productIdHashHex: string;
664
- }) => Promise<ProtocolCoverageProductAccount | null>;
665
- fetchCoverageProductPaymentOption?: (params: {
666
- poolAddress: string;
667
- productIdHashHex: string;
668
- paymentMint: string;
669
- }) => Promise<ProtocolCoverageProductPaymentOptionAccount | null>;
670
- fetchCoveragePolicy?: (params: {
671
- poolAddress: string;
672
- member: string;
673
- }) => Promise<ProtocolCoveragePolicyAccount | null>;
674
- fetchCoveragePolicyPositionNft?: (params: {
675
- poolAddress: string;
676
- member: string;
677
- }) => Promise<ProtocolCoveragePolicyPositionNftAccount | null>;
678
- fetchMemberCycle?: (params: {
679
- poolAddress: string;
680
- member: string;
681
- periodIndex: bigint | number;
682
- }) => Promise<ProtocolMemberCycleAccount | null>;
683
- fetchCycleQuoteReplay?: (params: {
684
- poolAddress: string;
685
- member: string;
686
- nonceHashHex: string;
687
- }) => Promise<ProtocolCycleQuoteReplayAccount | null>;
688
- fetchPoolTreasuryReserve?: (params: {
689
- poolAddress: string;
690
- paymentMint: string;
691
- }) => Promise<ProtocolPoolTreasuryReserveAccount | null>;
692
- fetchPremiumLedger?: (params: {
693
- poolAddress: string;
694
- member: string;
695
- }) => Promise<ProtocolPremiumLedgerAccount | null>;
696
- fetchPremiumAttestationReplay?: (params: {
697
- poolAddress: string;
698
- member: string;
699
- replayHashHex: string;
700
- }) => Promise<ProtocolPremiumAttestationReplayAccount | null>;
701
- fetchCoverageClaimRecord?: (params: {
702
- poolAddress: string;
703
- member: string;
704
- intentHashHex: string;
705
- }) => Promise<ProtocolCoverageClaimRecordAccount | null>;
706
- }
707
- export type ProtocolPoolType = 'reward' | 'coverage' | 'unknown';
708
- export interface ProtocolConfigV2Account {
709
- address: string;
710
- admin: string;
711
- governanceAuthority: string;
712
- governanceRealm: string;
713
- governanceConfig: string;
714
- defaultStakeMint: string;
715
- protocolFeeBps: number;
716
- minOracleStake: bigint;
717
- emergencyPaused: boolean;
718
- allowedPayoutMintsHashHex: string;
719
- bump: number;
720
- }
721
- export interface ProtocolOracleStakePositionAccount {
722
- address: string;
723
- oracle: string;
724
- staker: string;
725
- stakeMint: string;
726
- stakeVault: string;
727
- stakedAmount: bigint;
728
- pendingUnstakeAmount: bigint;
729
- canFinalizeUnstakeAt: number;
730
- slashPending: boolean;
731
- bump: number;
732
- }
733
- export interface ProtocolPoolOraclePolicyAccount {
734
- address: string;
735
- pool: string;
736
- quorumM: number;
737
- quorumN: number;
738
- requireVerifiedSchema: boolean;
739
- oracleFeeBps: number;
740
- allowDelegateClaim: boolean;
741
- bump: number;
742
- }
743
- export interface ProtocolPoolTermsAccount {
744
- address: string;
745
- pool: string;
746
- poolTypeCode: number;
747
- poolType: ProtocolPoolType;
748
- payoutAssetMint: string;
749
- termsHashHex: string;
750
- payoutPolicyHashHex: string;
751
- cycleMode: number;
752
- metadataUri: string;
753
- bump: number;
754
- }
755
- export interface ProtocolPoolAssetVaultAccount {
756
- address: string;
757
- pool: string;
758
- payoutMint: string;
759
- vaultTokenAccount: string;
760
- active: boolean;
761
- bump: number;
762
- }
763
- export interface ProtocolFeeVaultAccount {
764
- address: string;
765
- paymentMint: string;
766
- bump: number;
767
- }
768
- export interface ProtocolPoolOracleFeeVaultAccount {
769
- address: string;
770
- pool: string;
771
- oracle: string;
772
- paymentMint: string;
773
- bump: number;
774
- }
775
- export interface ProtocolPoolOraclePermissionSetAccount {
776
- address: string;
777
- pool: string;
778
- oracle: string;
779
- permissions: number;
780
- bump: number;
781
- }
782
- export type ProtocolMemberCycleStatus = 'active' | 'settled' | 'unknown';
783
- export interface ProtocolMemberCycleAccount {
784
- address: string;
785
- pool: string;
786
- member: string;
787
- productIdHashHex: string;
788
- periodIndex: bigint;
789
- paymentMint: string;
790
- premiumAmountRaw: bigint;
791
- bondAmountRaw: bigint;
792
- shieldFeeRaw: bigint;
793
- protocolFeeRaw: bigint;
794
- oracleFeeRaw: bigint;
795
- netPoolPremiumRaw: bigint;
796
- totalAmountRaw: bigint;
797
- canonicalPremiumAmount: bigint;
798
- commitmentEnabled: boolean;
799
- thresholdBps: number;
800
- includedShieldCount: number;
801
- shieldConsumed: boolean;
802
- statusCode: number;
803
- status: ProtocolMemberCycleStatus;
804
- passed: boolean;
805
- activatedAt: number;
806
- settledAt: number;
807
- quoteHashHex: string;
808
- bump: number;
809
- }
810
- export interface ProtocolCycleQuoteReplayAccount {
811
- address: string;
812
- pool: string;
813
- member: string;
814
- nonceHashHex: string;
815
- quoteHashHex: string;
816
- createdAt: number;
817
- bump: number;
818
- }
819
- export interface ProtocolPoolTreasuryReserveAccount {
820
- address: string;
821
- pool: string;
822
- paymentMint: string;
823
- reservedRefundAmount: bigint;
824
- reservedRewardAmount: bigint;
825
- manualCoverageReserveAmount: bigint;
826
- bump: number;
827
- }
828
- export interface ProtocolOutcomeSchemaRegistryEntryAccount {
829
- address: string;
830
- schemaKeyHashHex: string;
831
- schemaKey: string;
832
- version: number;
833
- schemaHashHex: string;
834
- publisher: string;
835
- verified: boolean;
836
- metadataUri: string;
837
- bump: number;
838
- }
839
- export interface ProtocolPoolOutcomeRuleAccount {
840
- address: string;
841
- pool: string;
842
- ruleHashHex: string;
843
- schemaKeyHashHex: string;
844
- ruleId: string;
845
- schemaKey: string;
846
- schemaVersion: number;
847
- payoutHashHex: string;
848
- enabled: boolean;
849
- bump: number;
850
- }
851
- export interface ProtocolInviteIssuerRegistryEntryAccount {
852
- address: string;
853
- issuer: string;
854
- organizationRef: string;
855
- metadataUri: string;
856
- active: boolean;
857
- bump: number;
858
- }
859
- export interface ProtocolCycleOutcomeAggregateAccount {
860
- address: string;
861
- pool: string;
862
- member: string;
863
- cycleHashHex: string;
864
- ruleHashHex: string;
865
- passVotes: number;
866
- failVotes: number;
867
- quorumM: number;
868
- quorumN: number;
869
- finalized: boolean;
870
- passed: boolean;
871
- claimed: boolean;
872
- rewardLiabilityReserved: boolean;
873
- latestAsOfTs: number;
874
- bump: number;
875
- }
876
- export interface ProtocolClaimDelegateAuthorizationAccount {
877
- address: string;
878
- pool: string;
879
- member: string;
880
- delegate: string;
881
- active: boolean;
882
- updatedAt: number;
883
- bump: number;
884
- }
885
- export interface ProtocolCoveragePolicyAccount {
886
- address: string;
887
- pool: string;
888
- member: string;
889
- termsHashHex: string;
890
- status: number;
891
- startsAt: number;
892
- endsAt: number;
893
- premiumDueEverySecs: number;
894
- premiumGraceSecs: number;
895
- nextDueAt: number;
896
- nftMint: string;
897
- bump: number;
898
- }
899
- export interface ProtocolPremiumLedgerAccount {
900
- address: string;
901
- pool: string;
902
- member: string;
903
- periodIndex: bigint;
904
- amount: bigint;
905
- source: number;
906
- paidAt: number;
907
- bump: number;
908
- }
909
- export interface ProtocolEnrollmentPermitReplayAccount {
910
- address: string;
911
- pool: string;
912
- issuer: string;
913
- member: string;
914
- nonceHashHex: string;
915
- inviteIdHashHex: string;
916
- createdAt: number;
917
- bump: number;
918
- }
919
- export interface ProtocolAttestationVoteAccount {
920
- address: string;
921
- pool: string;
922
- member: string;
923
- cycleHashHex: string;
924
- ruleHashHex: string;
925
- oracle: string;
926
- passed: boolean;
927
- attestationDigestHex: string;
928
- observedValueHashHex: string;
929
- asOfTs: number;
930
- bump: number;
931
- }
932
- export interface ProtocolClaimRecordV2Account {
933
- address: string;
934
- pool: string;
935
- member: string;
936
- claimant: string;
937
- cycleHashHex: string;
938
- ruleHashHex: string;
939
- intentHashHex: string;
940
- payoutMint: string;
941
- payoutAmount: bigint;
942
- recipient: string;
943
- submittedAt: number;
944
- bump: number;
945
- }
946
- export interface ProtocolCoverageProductAccount {
947
- address: string;
948
- pool: string;
949
- admin: string;
950
- productIdHashHex: string;
951
- active: boolean;
952
- displayName: string;
953
- metadataUri: string;
954
- termsHashHex: string;
955
- durationSecs: number;
956
- premiumDueEverySecs: number;
957
- premiumGraceSecs: number;
958
- premiumAmount: bigint;
959
- createdAtTs: number;
960
- updatedAtTs: number;
961
- bump: number;
962
- }
963
- export interface ProtocolCoverageProductPaymentOptionAccount {
964
- address: string;
965
- pool: string;
966
- productIdHashHex: string;
967
- paymentMint: string;
968
- paymentAmount: bigint;
969
- active: boolean;
970
- bump: number;
971
- }
972
- export interface ProtocolCoveragePolicyPositionNftAccount {
973
- address: string;
974
- pool: string;
975
- member: string;
976
- nftMint: string;
977
- metadataUri: string;
978
- bump: number;
979
- }
980
- export interface ProtocolPremiumAttestationReplayAccount {
981
- address: string;
982
- pool: string;
983
- member: string;
984
- periodIndex: bigint;
985
- replayHashHex: string;
986
- oracle: string;
987
- createdAt: number;
988
- bump: number;
989
- }
990
- export interface ProtocolCoverageClaimRecordAccount {
991
- address: string;
992
- pool: string;
993
- member: string;
994
- claimant: string;
995
- intentHashHex: string;
996
- eventHashHex: string;
997
- status: number;
998
- submittedAt: number;
999
- settledAt: number;
1000
- bump: number;
1001
- }
1002
- export interface BuildInitializeProtocolV2TxParams {
1003
- admin: string;
1004
- protocolFeeBps: number;
1005
- governanceRealm: string;
1006
- governanceConfig: string;
1007
- defaultStakeMint: string;
1008
- minOracleStake: bigint;
1009
- recentBlockhash: string;
1010
- programId: string;
1011
- }
1012
- export interface BuildSetProtocolParamsTxParams {
1013
- governanceAuthority: string;
1014
- protocolFeeBps: number;
1015
- allowedPayoutMintsHashHex: string;
1016
- minOracleStake: bigint;
1017
- emergencyPaused: boolean;
1018
- recentBlockhash: string;
1019
- programId: string;
1020
- }
1021
- export interface BuildUpdateOracleMetadataTxParams {
1022
- oracle: string;
1023
- metadataUri: string;
1024
- active: boolean;
1025
- recentBlockhash: string;
1026
- programId: string;
1027
- }
1028
- export interface BuildStakeOracleTxParams {
1029
- staker: string;
1030
- oracle: string;
1031
- stakeMint: string;
1032
- stakeVault: string;
1033
- stakerTokenAccount: string;
1034
- amount: bigint;
1035
- recentBlockhash: string;
1036
- programId: string;
1037
- }
1038
- export interface BuildRequestUnstakeTxParams {
1039
- staker: string;
1040
- oracle: string;
1041
- amount: bigint;
1042
- cooldownSeconds: number;
1043
- recentBlockhash: string;
1044
- programId: string;
1045
- }
1046
- export interface BuildFinalizeUnstakeTxParams {
1047
- staker: string;
1048
- oracle: string;
1049
- stakeVault: string;
1050
- destinationTokenAccount: string;
1051
- recentBlockhash: string;
1052
- programId: string;
1053
- }
1054
- export interface BuildSlashOracleTxParams {
1055
- governanceAuthority: string;
1056
- oracle: string;
1057
- staker: string;
1058
- stakeVault: string;
1059
- slashTreasuryTokenAccount: string;
1060
- amount: bigint;
1061
- recentBlockhash: string;
1062
- programId: string;
1063
- }
1064
- export interface BuildCreatePoolV2TxParams {
1065
- authority: string;
1066
- poolId: string;
1067
- organizationRef: string;
1068
- payoutLamportsPerPass: bigint;
1069
- membershipMode: number;
1070
- tokenGateMint: string;
1071
- tokenGateMinBalance: bigint;
1072
- inviteIssuer: string;
1073
- poolType: number;
1074
- payoutAssetMint: string;
1075
- termsHashHex: string;
1076
- payoutPolicyHashHex: string;
1077
- cycleMode: number;
1078
- metadataUri: string;
1079
- recentBlockhash: string;
1080
- programId: string;
1081
- }
1082
- export interface BuildRegisterOracleV2TxParams {
1083
- admin: string;
1084
- oraclePubkey: string;
1085
- oracleType: number;
1086
- displayName: string;
1087
- legalName: string;
1088
- websiteUrl: string;
1089
- appUrl: string;
1090
- logoUri: string;
1091
- webhookUrl: string;
1092
- supportedSchemaKeyHashesHex: string[];
1093
- recentBlockhash: string;
1094
- programId: string;
1095
- }
1096
- export interface BuildClaimOracleV2TxParams {
1097
- oracle: string;
1098
- recentBlockhash: string;
1099
- programId: string;
1100
- }
1101
- export interface BuildUpdateOracleProfileV2TxParams {
1102
- authority: string;
1103
- oracle: string;
1104
- oracleType: number;
1105
- displayName: string;
1106
- legalName: string;
1107
- websiteUrl: string;
1108
- appUrl: string;
1109
- logoUri: string;
1110
- webhookUrl: string;
1111
- supportedSchemaKeyHashesHex: string[];
1112
- recentBlockhash: string;
1113
- programId: string;
1114
- }
1115
- export interface BuildRotateGovernanceAuthorityTxParams {
1116
- governanceAuthority: string;
1117
- newAuthority: string;
1118
- recentBlockhash: string;
1119
- programId: string;
1120
- }
1121
- export interface BuildSetPoolOraclePolicyTxParams {
1122
- authority: string;
1123
- poolAddress: string;
1124
- quorumM: number;
1125
- quorumN: number;
1126
- requireVerifiedSchema: boolean;
1127
- oracleFeeBps: number;
1128
- allowDelegateClaim: boolean;
1129
- recentBlockhash: string;
1130
- programId: string;
1131
- }
1132
- export interface BuildSetPoolOraclePermissionsTxParams {
1133
- authority: string;
1134
- poolAddress: string;
1135
- oracle: string;
1136
- permissions: number;
1137
- recentBlockhash: string;
1138
- programId: string;
1139
- }
1140
- export interface BuildSetPoolTermsHashTxParams {
1141
- authority: string;
1142
- poolAddress: string;
1143
- termsHashHex: string;
1144
- payoutPolicyHashHex: string;
1145
- cycleMode: number;
1146
- metadataUri: string;
1147
- recentBlockhash: string;
1148
- programId: string;
1149
- }
1150
- export interface BuildRegisterOutcomeSchemaTxParams {
1151
- publisher: string;
1152
- schemaKeyHashHex: string;
1153
- schemaKey: string;
1154
- version: number;
1155
- schemaHashHex: string;
1156
- metadataUri: string;
1157
- recentBlockhash: string;
1158
- programId: string;
1159
- }
1160
- export interface BuildVerifyOutcomeSchemaTxParams {
1161
- governanceAuthority: string;
1162
- schemaKeyHashHex: string;
1163
- verified: boolean;
1164
- recentBlockhash: string;
1165
- programId: string;
1166
- }
1167
- export interface BuildSetPoolOutcomeRuleTxParams {
1168
- authority: string;
1169
- poolAddress: string;
1170
- ruleHashHex: string;
1171
- schemaKeyHashHex: string;
1172
- ruleId: string;
1173
- schemaKey: string;
1174
- schemaVersion: number;
1175
- payoutHashHex: string;
1176
- enabled: boolean;
1177
- recentBlockhash: string;
1178
- programId: string;
1179
- }
1180
- export interface BuildRegisterInviteIssuerTxParams {
1181
- issuer: string;
1182
- organizationRef: string;
1183
- metadataUri: string;
1184
- active: boolean;
1185
- recentBlockhash: string;
1186
- programId: string;
1187
- }
1188
- export interface BuildEnrollMemberOpenTxParams {
1189
- member: string;
1190
- poolAddress: string;
1191
- subjectCommitmentHex?: string;
1192
- recentBlockhash: string;
1193
- programId: string;
1194
- }
1195
- export interface BuildEnrollMemberTokenGateTxParams {
1196
- member: string;
1197
- poolAddress: string;
1198
- tokenGateAccount: string;
1199
- subjectCommitmentHex?: string;
1200
- recentBlockhash: string;
1201
- programId: string;
1202
- }
1203
- export interface BuildEnrollMemberInvitePermitTxParams {
1204
- member: string;
1205
- poolAddress: string;
1206
- issuer: string;
1207
- subjectCommitmentHex?: string;
1208
- nonceHashHex: string;
1209
- inviteIdHashHex: string;
1210
- expiresAtTs: number;
1211
- recentBlockhash: string;
1212
- programId: string;
1213
- }
1214
- export interface BuildSetClaimDelegateTxParams {
1215
- member: string;
1216
- poolAddress: string;
1217
- delegate: string;
1218
- active: boolean;
1219
- recentBlockhash: string;
1220
- programId: string;
1221
- }
1222
- export interface BuildFundPoolSolTxParams {
1223
- funder: string;
1224
- poolAddress: string;
1225
- lamports: bigint;
1226
- recentBlockhash: string;
1227
- programId: string;
1228
- }
1229
- export interface BuildFundPoolSplTxParams {
1230
- funder: string;
1231
- poolAddress: string;
1232
- payoutMint: string;
1233
- poolVaultTokenAccount: string;
1234
- funderTokenAccount: string;
1235
- amount: bigint;
1236
- recentBlockhash: string;
1237
- programId: string;
1238
- }
1239
- export interface BuildSubmitOutcomeAttestationVoteTxParams {
1240
- oracle: string;
1241
- poolAddress: string;
1242
- member: string;
1243
- cycleId: string;
1244
- ruleHashHex: string;
1245
- schemaKeyHashHex: string;
1246
- payoutMint: string;
1247
- attestationDigestHex: string;
1248
- observedValueHashHex: string;
1249
- asOfTs: number;
1250
- passed: boolean;
1251
- recentBlockhash: string;
1252
- programId: string;
1253
- }
1254
- export interface BuildFinalizeCycleOutcomeTxParams {
1255
- poolAddress: string;
1256
- member: string;
1257
- cycleId: string;
1258
- ruleHashHex: string;
1259
- payoutMint: string;
1260
- recentBlockhash: string;
1261
- payer: string;
1262
- programId: string;
1263
- }
1264
- export interface BuildSubmitRewardClaimTxParams {
1265
- claimant: string;
1266
- poolAddress: string;
1267
- member: string;
1268
- cycleId: string;
1269
- ruleHashHex: string;
1270
- intentHashHex: string;
1271
- payoutAmount: bigint;
1272
- payoutMint: string;
1273
- recipient: string;
1274
- recipientSystemAccount: string;
1275
- claimDelegate?: string;
1276
- poolAssetVault?: string;
1277
- poolVaultTokenAccount?: string;
1278
- recipientTokenAccount?: string;
1279
- recentBlockhash: string;
1280
- programId: string;
1281
- }
1282
- export interface BuildCreateCoveragePolicyTxParams {
1283
- authority: string;
1284
- poolAddress: string;
1285
- member: string;
1286
- termsHashHex: string;
1287
- startsAt: number;
1288
- endsAt: number;
1289
- premiumDueEverySecs: number;
1290
- premiumGraceSecs: number;
1291
- recentBlockhash: string;
1292
- programId: string;
1293
- }
1294
- export interface BuildMintPolicyNftTxParams {
1295
- authority: string;
1296
- poolAddress: string;
1297
- member: string;
1298
- nftMint: string;
1299
- metadataUri: string;
1300
- recentBlockhash: string;
1301
- programId: string;
1302
- }
1303
- export interface BuildPayPremiumOnchainTxParams {
1304
- payer: string;
1305
- poolAddress: string;
1306
- member: string;
1307
- payoutMint: string;
1308
- periodIndex: bigint;
1309
- amount: bigint;
1310
- payerTokenAccount: string;
1311
- poolVaultTokenAccount: string;
1312
- recentBlockhash: string;
1313
- programId: string;
1314
- }
1315
- export interface BuildAttestPremiumPaidOffchainTxParams {
1316
- oracle: string;
1317
- poolAddress: string;
1318
- member: string;
1319
- periodIndex: bigint;
1320
- replayHashHex: string;
1321
- amount: bigint;
1322
- paidAtTs: number;
1323
- recentBlockhash: string;
1324
- programId: string;
1325
- }
1326
- export interface BuildSubmitCoverageClaimTxParams {
1327
- claimant: string;
1328
- poolAddress: string;
1329
- member: string;
1330
- intentHashHex: string;
1331
- eventHashHex: string;
1332
- claimDelegate?: string;
1333
- recentBlockhash: string;
1334
- programId: string;
1335
- }
1336
- export interface BuildSettleCoverageClaimTxParams {
1337
- authority: string;
1338
- claimant: string;
1339
- poolAddress: string;
1340
- member: string;
1341
- intentHashHex: string;
1342
- payoutAmount: bigint;
1343
- recipientSystemAccount: string;
1344
- poolAssetVault: string;
1345
- poolVaultTokenAccount: string;
1346
- recipientTokenAccount: string;
1347
- recentBlockhash: string;
1348
- programId: string;
1349
- }
1350
- export interface BuildRegisterCoverageProductV2TxParams {
1351
- authority: string;
1352
- poolAddress: string;
1353
- productIdHashHex: string;
1354
- displayName: string;
1355
- metadataUri: string;
1356
- termsHashHex: string;
1357
- durationSecs: number;
1358
- premiumDueEverySecs: number;
1359
- premiumGraceSecs: number;
1360
- premiumAmount: bigint;
1361
- active: boolean;
1362
- recentBlockhash: string;
1363
- programId: string;
1364
- }
1365
- export interface BuildUpsertCoverageProductPaymentOptionTxParams {
1366
- authority: string;
1367
- poolAddress: string;
1368
- productIdHashHex: string;
1369
- paymentMint: string;
1370
- paymentAmount: bigint;
1371
- active: boolean;
1372
- recentBlockhash: string;
1373
- programId: string;
1374
- }
1375
- export interface BuildUpdateCoverageProductV2TxParams {
1376
- authority: string;
1377
- poolAddress: string;
1378
- productIdHashHex: string;
1379
- displayName: string;
1380
- metadataUri: string;
1381
- termsHashHex: string;
1382
- durationSecs: number;
1383
- premiumDueEverySecs: number;
1384
- premiumGraceSecs: number;
1385
- premiumAmount: bigint;
1386
- active: boolean;
1387
- recentBlockhash: string;
1388
- programId: string;
1389
- }
1390
- export interface BuildSubscribeCoverageProductV2TxParams {
1391
- member: string;
1392
- poolAddress: string;
1393
- productIdHashHex: string;
1394
- startsAt: number;
1395
- recentBlockhash: string;
1396
- programId: string;
1397
- }
1398
- export interface BuildIssueCoveragePolicyFromProductV2TxParams {
1399
- authority: string;
1400
- poolAddress: string;
1401
- member: string;
1402
- productIdHashHex: string;
1403
- startsAt: number;
1404
- recentBlockhash: string;
1405
- programId: string;
1406
- }
1407
- export interface BuildMigratePoolV1ToV2TxParams {
1408
- authority: string;
1409
- poolAddress: string;
1410
- poolType: number;
1411
- payoutAssetMint: string;
1412
- termsHashHex: string;
1413
- payoutPolicyHashHex: string;
1414
- cycleMode: number;
1415
- metadataUri: string;
1416
- recentBlockhash: string;
1417
- programId: string;
1418
- }
1419
- export interface BuildMigrateMembershipV1ToV2TxParams {
1420
- member: string;
1421
- poolAddress: string;
1422
- recentBlockhash: string;
1423
- programId: string;
1424
- }
1
+ export * from './internal/types/all.js';