@theliem/xmarket-sdk 3.21.0 → 3.23.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/dist/index.js CHANGED
@@ -63,7 +63,11 @@ var SEEDS = {
63
63
  userClaim: Buffer.from("user_claim"),
64
64
  // Admin Contract
65
65
  adminConfig: Buffer.from("admin_config"),
66
- claimRecord: Buffer.from("claim_record")
66
+ claimRecord: Buffer.from("claim_record"),
67
+ // Dispute
68
+ disputeConfig: Buffer.from("dispute_config"),
69
+ disputeMarket: Buffer.from("dispute_market"),
70
+ userDispute: Buffer.from("user_dispute")
67
71
  };
68
72
  var PDA = class {
69
73
  // ─── Question Market ────────────────────────────────────────────────────────
@@ -274,6 +278,28 @@ var PDA = class {
274
278
  programIds.adminContract
275
279
  );
276
280
  }
281
+ // ─── Dispute ─────────────────────────────────────────────────────────────
282
+ static disputeConfig(owner, programIds) {
283
+ if (!programIds.dispute) throw new Error("dispute program ID not configured");
284
+ return web3_js.PublicKey.findProgramAddressSync(
285
+ [SEEDS.disputeConfig, owner.toBuffer()],
286
+ programIds.dispute
287
+ );
288
+ }
289
+ static disputeMarket(conditionId, programIds) {
290
+ if (!programIds.dispute) throw new Error("dispute program ID not configured");
291
+ return web3_js.PublicKey.findProgramAddressSync(
292
+ [SEEDS.disputeMarket, Buffer.from(conditionId)],
293
+ programIds.dispute
294
+ );
295
+ }
296
+ static userDispute(user, conditionId, programIds) {
297
+ if (!programIds.dispute) throw new Error("dispute program ID not configured");
298
+ return web3_js.PublicKey.findProgramAddressSync(
299
+ [SEEDS.userDispute, user.toBuffer(), Buffer.from(conditionId)],
300
+ programIds.dispute
301
+ );
302
+ }
277
303
  };
278
304
  function generateQuestionId(content, salt) {
279
305
  const input = content + (salt ?? Date.now());
@@ -1756,8 +1782,8 @@ var ClobClient = class {
1756
1782
  async _sendLegacyTxSig(instructions) {
1757
1783
  const { connection } = this.provider;
1758
1784
  const { blockhash, lastValidBlockHeight } = await connection.getLatestBlockhash();
1759
- const { Transaction: Transaction10 } = await import('@solana/web3.js');
1760
- const tx = new Transaction10();
1785
+ const { Transaction: Transaction11 } = await import('@solana/web3.js');
1786
+ const tx = new Transaction11();
1761
1787
  tx.recentBlockhash = blockhash;
1762
1788
  tx.feePayer = this.walletPubkey;
1763
1789
  tx.add(...instructions);
@@ -2630,8 +2656,83 @@ ${logs.join("\n")}`);
2630
2656
  token2022Program: splToken.TOKEN_2022_PROGRAM_ID,
2631
2657
  systemProgram: web3_js.SystemProgram.programId
2632
2658
  }).remainingAccounts([...userAccounts, ...hookAccounts, ...feeAccounts]).instruction();
2633
- const cachedAlt = this._altCache.get(condition.toBase58());
2634
- return this._buildUnsignedVtx([...hookInitIxs, ed25519Ix, collectIx], cachedAlt, payer);
2659
+ const alt = opts?.lookupTable ?? this._altCache.get(condition.toBase58()) ?? await this.buildAltForCondition(condition, payer, collateralMint);
2660
+ return this._buildUnsignedVtx([...hookInitIxs, ed25519Ix, collectIx], alt, payer);
2661
+ }
2662
+ /**
2663
+ * Build ALT with static accounts for a condition — no order-specific PDAs needed.
2664
+ * Use before buildBatchCollectRedeemEarlyTx when no prior buildMatchOrdersTx ran in this session.
2665
+ */
2666
+ async buildAltForCondition(condition, _payer, collateralMint) {
2667
+ const cacheKey = condition.toBase58();
2668
+ if (this._altCache.has(cacheKey)) return this._altCache.get(cacheKey);
2669
+ const mint = collateralMint ?? this.networkConfig.defaultCollateral.mint;
2670
+ const payer = this.walletPubkey;
2671
+ const { connection } = this.provider;
2672
+ const clobConfigPda = this.configPda();
2673
+ const [yesMint] = PDA.yesMint(condition, this.programIds);
2674
+ const [noMint] = PDA.noMint(condition, this.programIds);
2675
+ const [extraAccountMeta] = PDA.extraAccountMetaList(yesMint, this.programIds);
2676
+ const [hookConfig] = PDA.hookConfig(this.programIds);
2677
+ const [collateralVault] = PDA.collateralVault(mint, this.programIds);
2678
+ const [vaultTokenAccount] = PDA.vaultToken(mint, this.programIds);
2679
+ const clobYesAta = splToken.getAssociatedTokenAddressSync(yesMint, clobConfigPda, true, splToken.TOKEN_2022_PROGRAM_ID);
2680
+ const clobNoAta = splToken.getAssociatedTokenAddressSync(noMint, clobConfigPda, true, splToken.TOKEN_2022_PROGRAM_ID);
2681
+ const feeRecipientAddr = (await this.fetchConfig())?.feeRecipient;
2682
+ const addresses = [
2683
+ web3_js.Ed25519Program.programId,
2684
+ this.programIds.clobExchange,
2685
+ this.programIds.conditionalTokens,
2686
+ this.programIds.hook,
2687
+ splToken.TOKEN_PROGRAM_ID,
2688
+ splToken.TOKEN_2022_PROGRAM_ID,
2689
+ web3_js.SystemProgram.programId,
2690
+ web3_js.SYSVAR_INSTRUCTIONS_PUBKEY,
2691
+ clobConfigPda,
2692
+ hookConfig,
2693
+ condition,
2694
+ yesMint,
2695
+ noMint,
2696
+ extraAccountMeta,
2697
+ collateralVault,
2698
+ vaultTokenAccount,
2699
+ clobYesAta,
2700
+ clobNoAta
2701
+ ];
2702
+ if (feeRecipientAddr) addresses.push(feeRecipientAddr);
2703
+ if (this.feeConfigOwner && this.programIds.feeManagement) {
2704
+ const companyAddr = await this.companyAddress();
2705
+ const refVault = await this.referralVault();
2706
+ addresses.push(this.programIds.feeManagement);
2707
+ addresses.push(PDA.feeConfig(this.feeConfigOwner, this.programIds)[0]);
2708
+ addresses.push(PDA.marketFeeOverride(condition, this.programIds)[0]);
2709
+ if (companyAddr) addresses.push(splToken.getAssociatedTokenAddressSync(mint, companyAddr));
2710
+ if (refVault) addresses.push(refVault);
2711
+ const oracleVault = await this.getMarketOracleVault(condition, mint) ?? payer;
2712
+ addresses.push(oracleVault);
2713
+ }
2714
+ const slot = await connection.getSlot("finalized");
2715
+ const [createIx, altAddress] = web3_js.AddressLookupTableProgram.createLookupTable(
2716
+ { authority: payer, payer, recentSlot: slot }
2717
+ );
2718
+ const BATCH = 30;
2719
+ const extendIxs = [];
2720
+ for (let i = 0; i < addresses.length; i += BATCH) {
2721
+ extendIxs.push(web3_js.AddressLookupTableProgram.extendLookupTable(
2722
+ { payer, authority: payer, lookupTable: altAddress, addresses: addresses.slice(i, i + BATCH) }
2723
+ ));
2724
+ }
2725
+ await this._sendLegacyTx([createIx, extendIxs[0]]);
2726
+ for (let i = 1; i < extendIxs.length; i++) await this._sendLegacyTx([extendIxs[i]]);
2727
+ for (let attempt = 0; attempt < 30; attempt++) {
2728
+ await new Promise((r) => setTimeout(r, 1e3));
2729
+ const res = await connection.getAddressLookupTable(altAddress);
2730
+ if (res.value && res.value.state.addresses.length === addresses.length) {
2731
+ this._altCache.set(cacheKey, res.value);
2732
+ return res.value;
2733
+ }
2734
+ }
2735
+ throw new Error(`ALT ${altAddress.toBase58()} not active after 30s`);
2635
2736
  }
2636
2737
  // ─── Queries ─────────────────────────────────────────────────────────────────
2637
2738
  async fetchConfig() {
@@ -3270,6 +3371,137 @@ var ReferralClient = class {
3270
3371
  ).transaction();
3271
3372
  }
3272
3373
  };
3374
+ var DisputeClient = class {
3375
+ constructor(program, provider, programIds) {
3376
+ this.program = program;
3377
+ this.provider = provider;
3378
+ this.programIds = programIds;
3379
+ }
3380
+ get walletPubkey() {
3381
+ return this.provider.wallet.publicKey;
3382
+ }
3383
+ configPdaFor(owner) {
3384
+ const [pda] = PDA.disputeConfig(owner, this.programIds);
3385
+ return pda;
3386
+ }
3387
+ disputeVault(owner, collateralMint) {
3388
+ const configPda = this.configPdaFor(owner);
3389
+ return splToken.getAssociatedTokenAddressSync(collateralMint, configPda, true);
3390
+ }
3391
+ // ─── Fetch ────────────────────────────────────────────────────────────────
3392
+ async fetchConfig(owner = this.walletPubkey) {
3393
+ const [configPda] = PDA.disputeConfig(owner, this.programIds);
3394
+ try {
3395
+ const acc = await this.program.account.disputeConfig.fetch(configPda);
3396
+ return {
3397
+ version: acc.version,
3398
+ owner: acc.owner,
3399
+ admin: acc.admin,
3400
+ collateralMint: acc.collateralMint,
3401
+ bump: acc.bump
3402
+ };
3403
+ } catch {
3404
+ return null;
3405
+ }
3406
+ }
3407
+ async fetchDisputeMarket(conditionId) {
3408
+ const [pda] = PDA.disputeMarket(conditionId, this.programIds);
3409
+ try {
3410
+ const acc = await this.program.account.disputeMarket.fetch(pda);
3411
+ return {
3412
+ version: acc.version,
3413
+ conditionId: acc.conditionId,
3414
+ deadline: acc.deadline,
3415
+ bond: acc.bond,
3416
+ amount: acc.amount,
3417
+ isResolved: acc.isResolved,
3418
+ bump: acc.bump
3419
+ };
3420
+ } catch {
3421
+ return null;
3422
+ }
3423
+ }
3424
+ async fetchUserDispute(user, conditionId) {
3425
+ const [pda] = PDA.userDispute(user, conditionId, this.programIds);
3426
+ try {
3427
+ const acc = await this.program.account.userDispute.fetch(pda);
3428
+ return {
3429
+ version: acc.version,
3430
+ user: acc.user,
3431
+ conditionId: acc.conditionId,
3432
+ amount: acc.amount,
3433
+ bump: acc.bump
3434
+ };
3435
+ } catch {
3436
+ return null;
3437
+ }
3438
+ }
3439
+ // ─── Instructions ─────────────────────────────────────────────────────────
3440
+ async initialize(collateralMint, owner = this.walletPubkey) {
3441
+ const [configPda] = PDA.disputeConfig(owner, this.programIds);
3442
+ const vault = splToken.getAssociatedTokenAddressSync(collateralMint, configPda, true);
3443
+ return this.program.methods.initialize().accounts({
3444
+ owner,
3445
+ disputeConfig: configPda,
3446
+ collateralMint,
3447
+ disputeVault: vault,
3448
+ tokenProgram: splToken.TOKEN_PROGRAM_ID,
3449
+ associatedTokenProgram: splToken.ASSOCIATED_TOKEN_PROGRAM_ID,
3450
+ systemProgram: web3_js.SystemProgram.programId
3451
+ }).transaction();
3452
+ }
3453
+ async buildSetAdminTx(newAdmin, owner = this.walletPubkey) {
3454
+ const [configPda] = PDA.disputeConfig(owner, this.programIds);
3455
+ return this.program.methods.setAdmin(newAdmin).accounts({
3456
+ owner,
3457
+ disputeConfig: configPda
3458
+ }).transaction();
3459
+ }
3460
+ async buildRaiseDisputeTx(conditionId, collateralMint, owner, user = this.walletPubkey, payer = user) {
3461
+ const [configPda] = PDA.disputeConfig(owner, this.programIds);
3462
+ const [disputeMarket] = PDA.disputeMarket(conditionId, this.programIds);
3463
+ const [userDispute] = PDA.userDispute(user, conditionId, this.programIds);
3464
+ const userAta = splToken.getAssociatedTokenAddressSync(collateralMint, user);
3465
+ const vault = splToken.getAssociatedTokenAddressSync(collateralMint, configPda, true);
3466
+ return this.program.methods.raiseDispute(Array.from(conditionId)).accounts({
3467
+ user,
3468
+ payer,
3469
+ disputeConfig: configPda,
3470
+ disputeMarket,
3471
+ userDispute,
3472
+ userAta,
3473
+ disputeVault: vault,
3474
+ tokenProgram: splToken.TOKEN_PROGRAM_ID,
3475
+ associatedTokenProgram: splToken.ASSOCIATED_TOKEN_PROGRAM_ID,
3476
+ systemProgram: web3_js.SystemProgram.programId
3477
+ }).transaction();
3478
+ }
3479
+ async buildClaimTx(conditionId, collateralMint, owner, user = this.walletPubkey) {
3480
+ const [configPda] = PDA.disputeConfig(owner, this.programIds);
3481
+ const [disputeMarket] = PDA.disputeMarket(conditionId, this.programIds);
3482
+ const [userDispute] = PDA.userDispute(user, conditionId, this.programIds);
3483
+ const vault = splToken.getAssociatedTokenAddressSync(collateralMint, configPda, true);
3484
+ const userAta = splToken.getAssociatedTokenAddressSync(collateralMint, user);
3485
+ return this.program.methods.claim(Array.from(conditionId)).accounts({
3486
+ user,
3487
+ disputeConfig: configPda,
3488
+ disputeMarket,
3489
+ userDispute,
3490
+ disputeVault: vault,
3491
+ userAta,
3492
+ tokenProgram: splToken.TOKEN_PROGRAM_ID
3493
+ }).transaction();
3494
+ }
3495
+ async buildResolveDisputeTx(conditionId, amount, isRefunded, owner, admin = this.walletPubkey) {
3496
+ const [configPda] = PDA.disputeConfig(owner, this.programIds);
3497
+ const [disputeMarket] = PDA.disputeMarket(conditionId, this.programIds);
3498
+ return this.program.methods.resolveDispute(Array.from(conditionId), amount, isRefunded).accounts({
3499
+ admin,
3500
+ disputeConfig: configPda,
3501
+ disputeMarket
3502
+ }).transaction();
3503
+ }
3504
+ };
3273
3505
 
3274
3506
  // src/idls/oracle.json
3275
3507
  var oracle_default = {
@@ -16391,105 +16623,1134 @@ var referral_default = {
16391
16623
  ]
16392
16624
  };
16393
16625
 
16394
- // src/sdk.ts
16395
- var XMarketSDK = class {
16396
- constructor(config, wallet, marketOwner) {
16397
- this.networkConfig = config;
16398
- this.provider = new anchor5__namespace.AnchorProvider(
16399
- new web3_js.Connection(config.rpcUrl, "confirmed"),
16400
- wallet,
16401
- { commitment: "confirmed", preflightCommitment: "confirmed" }
16402
- );
16403
- anchor5__namespace.setProvider(this.provider);
16404
- this._programIds = config.programIds;
16405
- this._marketOwner = marketOwner ?? wallet.publicKey;
16406
- }
16407
- _withAddress(idl, address) {
16408
- return { ...idl, address: address.toBase58() };
16409
- }
16410
- get oracle() {
16411
- if (!this._oracle) {
16412
- const program = new anchor5__namespace.Program(this._withAddress(oracle_default, this._programIds.oracle), this.provider);
16413
- this._oracle = new OracleClient(program, this.provider, this._programIds);
16414
- }
16415
- return this._oracle;
16416
- }
16417
- get hook() {
16418
- if (!this._hook) {
16419
- const program = new anchor5__namespace.Program(this._withAddress(hook_default, this._programIds.hook), this.provider);
16420
- this._hook = new HookClient(program, this.provider, this._programIds);
16421
- }
16422
- return this._hook;
16423
- }
16424
- get market() {
16425
- if (!this._market) {
16426
- const program = new anchor5__namespace.Program(this._withAddress(question_market_default, this._programIds.questionMarket), this.provider);
16427
- this._market = new MarketClient(program, this.provider, this._programIds, this._marketOwner);
16428
- this._market.ctfClient = this.ctf;
16429
- this._market.feeConfigOwner = this.networkConfig.feeConfigOwner ?? this._marketOwner;
16430
- }
16431
- return this._market;
16432
- }
16433
- get ctf() {
16434
- if (!this._ctf) {
16435
- const program = new anchor5__namespace.Program(this._withAddress(conditional_tokens_default, this._programIds.conditionalTokens), this.provider);
16436
- this._ctf = new CtfClient(program, this.provider, this._programIds);
16437
- }
16438
- return this._ctf;
16439
- }
16440
- get clob() {
16441
- if (!this._clob) {
16442
- const program = new anchor5__namespace.Program(this._withAddress(clob_exchange_default, this._programIds.clobExchange), this.provider);
16443
- this._clob = new ClobClient(program, this.provider, this._programIds, this.networkConfig);
16444
- if (this.networkConfig.feeConfigOwner && this._programIds.feeManagement) {
16445
- this._clob.feeConfigOwner = this.networkConfig.feeConfigOwner;
16446
- this._clob.feeClient = this.fee;
16447
- }
16448
- this._clob.ctfClient = this.ctf;
16449
- this._clob.qmConfigPda = this.market.configPda;
16450
- this._clob.hookClient = this.hook;
16451
- }
16452
- return this._clob;
16453
- }
16454
- get fee() {
16455
- if (!this._fee) {
16456
- if (!this._programIds.feeManagement) throw new Error("feeManagement program ID not configured in NetworkConfig");
16457
- const program = new anchor5__namespace.Program(this._withAddress(fee_management_default, this._programIds.feeManagement), this.provider);
16458
- this._fee = new FeeManagementClient(program, this.provider, this._programIds);
16459
- }
16460
- return this._fee;
16461
- }
16462
- get presale() {
16463
- if (!this._presale) {
16464
- if (!this._programIds.presale) throw new Error("presale program ID not configured in NetworkConfig");
16465
- const program = new anchor5__namespace.Program(this._withAddress(presale_default, this._programIds.presale), this.provider);
16466
- this._presale = new PresaleClient(program, this.provider, this._programIds);
16467
- }
16468
- return this._presale;
16469
- }
16470
- get marketOracle() {
16471
- if (!this._marketOracle) {
16472
- if (!this._programIds.marketOracle) throw new Error("marketOracle program ID not configured in NetworkConfig");
16473
- const program = new anchor5__namespace.Program(this._withAddress(market_oracle_default, this._programIds.marketOracle), this.provider);
16474
- this._marketOracle = new MarketOracleClient(program, this.provider, this._programIds);
16475
- }
16476
- return this._marketOracle;
16477
- }
16478
- get admin() {
16479
- if (!this._admin) {
16480
- if (!this._programIds.adminContract) throw new Error("adminContract program ID not configured in NetworkConfig");
16481
- const program = new anchor5__namespace.Program(this._withAddress(admin_contract_default, this._programIds.adminContract), this.provider);
16482
- this._admin = new AdminClient(program, this.provider, this._programIds);
16483
- }
16484
- return this._admin;
16485
- }
16486
- get referral() {
16487
- if (!this._referral) {
16488
- if (!this._programIds.referral) throw new Error("referral program ID not configured in NetworkConfig");
16489
- const program = new anchor5__namespace.Program(this._withAddress(referral_default, this._programIds.referral), this.provider);
16490
- this._referral = new ReferralClient(program, this.provider, this._programIds);
16491
- }
16492
- return this._referral;
16626
+ // src/idls/dispute.json
16627
+ var dispute_default = {
16628
+ address: "4toSDWDCcx37R6HZ78P71nDp3NNoJvcmQpzP4sfivVvL",
16629
+ metadata: {
16630
+ name: "dispute",
16631
+ version: "0.1.0",
16632
+ spec: "0.1.0",
16633
+ description: "Dispute program for XMarket \u2014 raise/resolve/claim disputes on prediction markets"
16634
+ },
16635
+ instructions: [
16636
+ {
16637
+ name: "claim",
16638
+ discriminator: [
16639
+ 62,
16640
+ 198,
16641
+ 214,
16642
+ 193,
16643
+ 213,
16644
+ 159,
16645
+ 108,
16646
+ 210
16647
+ ],
16648
+ accounts: [
16649
+ {
16650
+ name: "user",
16651
+ signer: true
16652
+ },
16653
+ {
16654
+ name: "dispute_config",
16655
+ pda: {
16656
+ seeds: [
16657
+ {
16658
+ kind: "const",
16659
+ value: [
16660
+ 100,
16661
+ 105,
16662
+ 115,
16663
+ 112,
16664
+ 117,
16665
+ 116,
16666
+ 101,
16667
+ 95,
16668
+ 99,
16669
+ 111,
16670
+ 110,
16671
+ 102,
16672
+ 105,
16673
+ 103
16674
+ ]
16675
+ },
16676
+ {
16677
+ kind: "account",
16678
+ path: "dispute_config.owner",
16679
+ account: "DisputeConfig"
16680
+ }
16681
+ ]
16682
+ }
16683
+ },
16684
+ {
16685
+ name: "dispute_market",
16686
+ pda: {
16687
+ seeds: [
16688
+ {
16689
+ kind: "const",
16690
+ value: [
16691
+ 100,
16692
+ 105,
16693
+ 115,
16694
+ 112,
16695
+ 117,
16696
+ 116,
16697
+ 101,
16698
+ 95,
16699
+ 109,
16700
+ 97,
16701
+ 114,
16702
+ 107,
16703
+ 101,
16704
+ 116
16705
+ ]
16706
+ },
16707
+ {
16708
+ kind: "arg",
16709
+ path: "condition_id"
16710
+ }
16711
+ ]
16712
+ }
16713
+ },
16714
+ {
16715
+ name: "user_dispute",
16716
+ writable: true,
16717
+ pda: {
16718
+ seeds: [
16719
+ {
16720
+ kind: "const",
16721
+ value: [
16722
+ 117,
16723
+ 115,
16724
+ 101,
16725
+ 114,
16726
+ 95,
16727
+ 100,
16728
+ 105,
16729
+ 115,
16730
+ 112,
16731
+ 117,
16732
+ 116,
16733
+ 101
16734
+ ]
16735
+ },
16736
+ {
16737
+ kind: "account",
16738
+ path: "user"
16739
+ },
16740
+ {
16741
+ kind: "arg",
16742
+ path: "condition_id"
16743
+ }
16744
+ ]
16745
+ }
16746
+ },
16747
+ {
16748
+ name: "dispute_vault",
16749
+ writable: true,
16750
+ pda: {
16751
+ seeds: [
16752
+ {
16753
+ kind: "account",
16754
+ path: "dispute_config"
16755
+ },
16756
+ {
16757
+ kind: "const",
16758
+ value: [
16759
+ 6,
16760
+ 221,
16761
+ 246,
16762
+ 225,
16763
+ 215,
16764
+ 101,
16765
+ 161,
16766
+ 147,
16767
+ 217,
16768
+ 203,
16769
+ 225,
16770
+ 70,
16771
+ 206,
16772
+ 235,
16773
+ 121,
16774
+ 172,
16775
+ 28,
16776
+ 180,
16777
+ 133,
16778
+ 237,
16779
+ 95,
16780
+ 91,
16781
+ 55,
16782
+ 145,
16783
+ 58,
16784
+ 140,
16785
+ 245,
16786
+ 133,
16787
+ 126,
16788
+ 255,
16789
+ 0,
16790
+ 169
16791
+ ]
16792
+ },
16793
+ {
16794
+ kind: "account",
16795
+ path: "dispute_config.collateral_mint",
16796
+ account: "DisputeConfig"
16797
+ }
16798
+ ],
16799
+ program: {
16800
+ kind: "const",
16801
+ value: [
16802
+ 140,
16803
+ 151,
16804
+ 37,
16805
+ 143,
16806
+ 78,
16807
+ 36,
16808
+ 137,
16809
+ 241,
16810
+ 187,
16811
+ 61,
16812
+ 16,
16813
+ 41,
16814
+ 20,
16815
+ 142,
16816
+ 13,
16817
+ 131,
16818
+ 11,
16819
+ 90,
16820
+ 19,
16821
+ 153,
16822
+ 218,
16823
+ 255,
16824
+ 16,
16825
+ 132,
16826
+ 4,
16827
+ 142,
16828
+ 123,
16829
+ 216,
16830
+ 219,
16831
+ 233,
16832
+ 248,
16833
+ 89
16834
+ ]
16835
+ }
16836
+ }
16837
+ },
16838
+ {
16839
+ name: "user_ata",
16840
+ writable: true
16841
+ },
16842
+ {
16843
+ name: "token_program",
16844
+ address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
16845
+ }
16846
+ ],
16847
+ args: [
16848
+ {
16849
+ name: "condition_id",
16850
+ type: {
16851
+ array: [
16852
+ "u8",
16853
+ 32
16854
+ ]
16855
+ }
16856
+ }
16857
+ ]
16858
+ },
16859
+ {
16860
+ name: "initialize",
16861
+ discriminator: [
16862
+ 175,
16863
+ 175,
16864
+ 109,
16865
+ 31,
16866
+ 13,
16867
+ 152,
16868
+ 155,
16869
+ 237
16870
+ ],
16871
+ accounts: [
16872
+ {
16873
+ name: "owner",
16874
+ writable: true,
16875
+ signer: true
16876
+ },
16877
+ {
16878
+ name: "dispute_config",
16879
+ writable: true,
16880
+ pda: {
16881
+ seeds: [
16882
+ {
16883
+ kind: "const",
16884
+ value: [
16885
+ 100,
16886
+ 105,
16887
+ 115,
16888
+ 112,
16889
+ 117,
16890
+ 116,
16891
+ 101,
16892
+ 95,
16893
+ 99,
16894
+ 111,
16895
+ 110,
16896
+ 102,
16897
+ 105,
16898
+ 103
16899
+ ]
16900
+ },
16901
+ {
16902
+ kind: "account",
16903
+ path: "owner"
16904
+ }
16905
+ ]
16906
+ }
16907
+ },
16908
+ {
16909
+ name: "collateral_mint"
16910
+ },
16911
+ {
16912
+ name: "dispute_vault",
16913
+ docs: [
16914
+ "ATA owned by dispute_config PDA \u2014 holds USDS bonds from all dispute raisers"
16915
+ ],
16916
+ writable: true,
16917
+ pda: {
16918
+ seeds: [
16919
+ {
16920
+ kind: "account",
16921
+ path: "dispute_config"
16922
+ },
16923
+ {
16924
+ kind: "const",
16925
+ value: [
16926
+ 6,
16927
+ 221,
16928
+ 246,
16929
+ 225,
16930
+ 215,
16931
+ 101,
16932
+ 161,
16933
+ 147,
16934
+ 217,
16935
+ 203,
16936
+ 225,
16937
+ 70,
16938
+ 206,
16939
+ 235,
16940
+ 121,
16941
+ 172,
16942
+ 28,
16943
+ 180,
16944
+ 133,
16945
+ 237,
16946
+ 95,
16947
+ 91,
16948
+ 55,
16949
+ 145,
16950
+ 58,
16951
+ 140,
16952
+ 245,
16953
+ 133,
16954
+ 126,
16955
+ 255,
16956
+ 0,
16957
+ 169
16958
+ ]
16959
+ },
16960
+ {
16961
+ kind: "account",
16962
+ path: "collateral_mint"
16963
+ }
16964
+ ],
16965
+ program: {
16966
+ kind: "const",
16967
+ value: [
16968
+ 140,
16969
+ 151,
16970
+ 37,
16971
+ 143,
16972
+ 78,
16973
+ 36,
16974
+ 137,
16975
+ 241,
16976
+ 187,
16977
+ 61,
16978
+ 16,
16979
+ 41,
16980
+ 20,
16981
+ 142,
16982
+ 13,
16983
+ 131,
16984
+ 11,
16985
+ 90,
16986
+ 19,
16987
+ 153,
16988
+ 218,
16989
+ 255,
16990
+ 16,
16991
+ 132,
16992
+ 4,
16993
+ 142,
16994
+ 123,
16995
+ 216,
16996
+ 219,
16997
+ 233,
16998
+ 248,
16999
+ 89
17000
+ ]
17001
+ }
17002
+ }
17003
+ },
17004
+ {
17005
+ name: "token_program",
17006
+ address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
17007
+ },
17008
+ {
17009
+ name: "associated_token_program",
17010
+ address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
17011
+ },
17012
+ {
17013
+ name: "system_program",
17014
+ address: "11111111111111111111111111111111"
17015
+ }
17016
+ ],
17017
+ args: []
17018
+ },
17019
+ {
17020
+ name: "raise_dispute",
17021
+ discriminator: [
17022
+ 41,
17023
+ 243,
17024
+ 1,
17025
+ 51,
17026
+ 150,
17027
+ 95,
17028
+ 246,
17029
+ 73
17030
+ ],
17031
+ accounts: [
17032
+ {
17033
+ name: "user",
17034
+ signer: true
17035
+ },
17036
+ {
17037
+ name: "payer",
17038
+ writable: true,
17039
+ signer: true
17040
+ },
17041
+ {
17042
+ name: "dispute_config",
17043
+ pda: {
17044
+ seeds: [
17045
+ {
17046
+ kind: "const",
17047
+ value: [
17048
+ 100,
17049
+ 105,
17050
+ 115,
17051
+ 112,
17052
+ 117,
17053
+ 116,
17054
+ 101,
17055
+ 95,
17056
+ 99,
17057
+ 111,
17058
+ 110,
17059
+ 102,
17060
+ 105,
17061
+ 103
17062
+ ]
17063
+ },
17064
+ {
17065
+ kind: "account",
17066
+ path: "dispute_config.owner",
17067
+ account: "DisputeConfig"
17068
+ }
17069
+ ]
17070
+ }
17071
+ },
17072
+ {
17073
+ name: "dispute_market",
17074
+ writable: true,
17075
+ pda: {
17076
+ seeds: [
17077
+ {
17078
+ kind: "const",
17079
+ value: [
17080
+ 100,
17081
+ 105,
17082
+ 115,
17083
+ 112,
17084
+ 117,
17085
+ 116,
17086
+ 101,
17087
+ 95,
17088
+ 109,
17089
+ 97,
17090
+ 114,
17091
+ 107,
17092
+ 101,
17093
+ 116
17094
+ ]
17095
+ },
17096
+ {
17097
+ kind: "arg",
17098
+ path: "condition_id"
17099
+ }
17100
+ ]
17101
+ }
17102
+ },
17103
+ {
17104
+ name: "user_dispute",
17105
+ writable: true,
17106
+ pda: {
17107
+ seeds: [
17108
+ {
17109
+ kind: "const",
17110
+ value: [
17111
+ 117,
17112
+ 115,
17113
+ 101,
17114
+ 114,
17115
+ 95,
17116
+ 100,
17117
+ 105,
17118
+ 115,
17119
+ 112,
17120
+ 117,
17121
+ 116,
17122
+ 101
17123
+ ]
17124
+ },
17125
+ {
17126
+ kind: "account",
17127
+ path: "user"
17128
+ },
17129
+ {
17130
+ kind: "arg",
17131
+ path: "condition_id"
17132
+ }
17133
+ ]
17134
+ }
17135
+ },
17136
+ {
17137
+ name: "user_ata",
17138
+ writable: true,
17139
+ pda: {
17140
+ seeds: [
17141
+ {
17142
+ kind: "account",
17143
+ path: "user"
17144
+ },
17145
+ {
17146
+ kind: "const",
17147
+ value: [
17148
+ 6,
17149
+ 221,
17150
+ 246,
17151
+ 225,
17152
+ 215,
17153
+ 101,
17154
+ 161,
17155
+ 147,
17156
+ 217,
17157
+ 203,
17158
+ 225,
17159
+ 70,
17160
+ 206,
17161
+ 235,
17162
+ 121,
17163
+ 172,
17164
+ 28,
17165
+ 180,
17166
+ 133,
17167
+ 237,
17168
+ 95,
17169
+ 91,
17170
+ 55,
17171
+ 145,
17172
+ 58,
17173
+ 140,
17174
+ 245,
17175
+ 133,
17176
+ 126,
17177
+ 255,
17178
+ 0,
17179
+ 169
17180
+ ]
17181
+ },
17182
+ {
17183
+ kind: "account",
17184
+ path: "dispute_config.collateral_mint",
17185
+ account: "DisputeConfig"
17186
+ }
17187
+ ],
17188
+ program: {
17189
+ kind: "const",
17190
+ value: [
17191
+ 140,
17192
+ 151,
17193
+ 37,
17194
+ 143,
17195
+ 78,
17196
+ 36,
17197
+ 137,
17198
+ 241,
17199
+ 187,
17200
+ 61,
17201
+ 16,
17202
+ 41,
17203
+ 20,
17204
+ 142,
17205
+ 13,
17206
+ 131,
17207
+ 11,
17208
+ 90,
17209
+ 19,
17210
+ 153,
17211
+ 218,
17212
+ 255,
17213
+ 16,
17214
+ 132,
17215
+ 4,
17216
+ 142,
17217
+ 123,
17218
+ 216,
17219
+ 219,
17220
+ 233,
17221
+ 248,
17222
+ 89
17223
+ ]
17224
+ }
17225
+ }
17226
+ },
17227
+ {
17228
+ name: "dispute_vault",
17229
+ writable: true,
17230
+ pda: {
17231
+ seeds: [
17232
+ {
17233
+ kind: "account",
17234
+ path: "dispute_config"
17235
+ },
17236
+ {
17237
+ kind: "const",
17238
+ value: [
17239
+ 6,
17240
+ 221,
17241
+ 246,
17242
+ 225,
17243
+ 215,
17244
+ 101,
17245
+ 161,
17246
+ 147,
17247
+ 217,
17248
+ 203,
17249
+ 225,
17250
+ 70,
17251
+ 206,
17252
+ 235,
17253
+ 121,
17254
+ 172,
17255
+ 28,
17256
+ 180,
17257
+ 133,
17258
+ 237,
17259
+ 95,
17260
+ 91,
17261
+ 55,
17262
+ 145,
17263
+ 58,
17264
+ 140,
17265
+ 245,
17266
+ 133,
17267
+ 126,
17268
+ 255,
17269
+ 0,
17270
+ 169
17271
+ ]
17272
+ },
17273
+ {
17274
+ kind: "account",
17275
+ path: "dispute_config.collateral_mint",
17276
+ account: "DisputeConfig"
17277
+ }
17278
+ ],
17279
+ program: {
17280
+ kind: "const",
17281
+ value: [
17282
+ 140,
17283
+ 151,
17284
+ 37,
17285
+ 143,
17286
+ 78,
17287
+ 36,
17288
+ 137,
17289
+ 241,
17290
+ 187,
17291
+ 61,
17292
+ 16,
17293
+ 41,
17294
+ 20,
17295
+ 142,
17296
+ 13,
17297
+ 131,
17298
+ 11,
17299
+ 90,
17300
+ 19,
17301
+ 153,
17302
+ 218,
17303
+ 255,
17304
+ 16,
17305
+ 132,
17306
+ 4,
17307
+ 142,
17308
+ 123,
17309
+ 216,
17310
+ 219,
17311
+ 233,
17312
+ 248,
17313
+ 89
17314
+ ]
17315
+ }
17316
+ }
17317
+ },
17318
+ {
17319
+ name: "token_program",
17320
+ address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
17321
+ },
17322
+ {
17323
+ name: "associated_token_program",
17324
+ address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
17325
+ },
17326
+ {
17327
+ name: "system_program",
17328
+ address: "11111111111111111111111111111111"
17329
+ }
17330
+ ],
17331
+ args: [
17332
+ {
17333
+ name: "condition_id",
17334
+ type: {
17335
+ array: [
17336
+ "u8",
17337
+ 32
17338
+ ]
17339
+ }
17340
+ }
17341
+ ]
17342
+ },
17343
+ {
17344
+ name: "resolve_dispute",
17345
+ discriminator: [
17346
+ 231,
17347
+ 6,
17348
+ 202,
17349
+ 6,
17350
+ 96,
17351
+ 103,
17352
+ 12,
17353
+ 230
17354
+ ],
17355
+ accounts: [
17356
+ {
17357
+ name: "admin",
17358
+ signer: true
17359
+ },
17360
+ {
17361
+ name: "dispute_config",
17362
+ pda: {
17363
+ seeds: [
17364
+ {
17365
+ kind: "const",
17366
+ value: [
17367
+ 100,
17368
+ 105,
17369
+ 115,
17370
+ 112,
17371
+ 117,
17372
+ 116,
17373
+ 101,
17374
+ 95,
17375
+ 99,
17376
+ 111,
17377
+ 110,
17378
+ 102,
17379
+ 105,
17380
+ 103
17381
+ ]
17382
+ },
17383
+ {
17384
+ kind: "account",
17385
+ path: "dispute_config.owner",
17386
+ account: "DisputeConfig"
17387
+ }
17388
+ ]
17389
+ }
17390
+ },
17391
+ {
17392
+ name: "dispute_market",
17393
+ writable: true,
17394
+ pda: {
17395
+ seeds: [
17396
+ {
17397
+ kind: "const",
17398
+ value: [
17399
+ 100,
17400
+ 105,
17401
+ 115,
17402
+ 112,
17403
+ 117,
17404
+ 116,
17405
+ 101,
17406
+ 95,
17407
+ 109,
17408
+ 97,
17409
+ 114,
17410
+ 107,
17411
+ 101,
17412
+ 116
17413
+ ]
17414
+ },
17415
+ {
17416
+ kind: "arg",
17417
+ path: "condition_id"
17418
+ }
17419
+ ]
17420
+ }
17421
+ }
17422
+ ],
17423
+ args: [
17424
+ {
17425
+ name: "condition_id",
17426
+ type: {
17427
+ array: [
17428
+ "u8",
17429
+ 32
17430
+ ]
17431
+ }
17432
+ },
17433
+ {
17434
+ name: "amount",
17435
+ type: "u64"
17436
+ },
17437
+ {
17438
+ name: "is_refunded",
17439
+ type: "bool"
17440
+ }
17441
+ ]
17442
+ },
17443
+ {
17444
+ name: "set_admin",
17445
+ discriminator: [
17446
+ 251,
17447
+ 163,
17448
+ 0,
17449
+ 52,
17450
+ 91,
17451
+ 194,
17452
+ 187,
17453
+ 92
17454
+ ],
17455
+ accounts: [
17456
+ {
17457
+ name: "owner",
17458
+ signer: true
17459
+ },
17460
+ {
17461
+ name: "dispute_config",
17462
+ writable: true,
17463
+ pda: {
17464
+ seeds: [
17465
+ {
17466
+ kind: "const",
17467
+ value: [
17468
+ 100,
17469
+ 105,
17470
+ 115,
17471
+ 112,
17472
+ 117,
17473
+ 116,
17474
+ 101,
17475
+ 95,
17476
+ 99,
17477
+ 111,
17478
+ 110,
17479
+ 102,
17480
+ 105,
17481
+ 103
17482
+ ]
17483
+ },
17484
+ {
17485
+ kind: "account",
17486
+ path: "owner"
17487
+ }
17488
+ ]
17489
+ }
17490
+ }
17491
+ ],
17492
+ args: [
17493
+ {
17494
+ name: "new_admin",
17495
+ type: "pubkey"
17496
+ }
17497
+ ]
17498
+ }
17499
+ ],
17500
+ accounts: [
17501
+ {
17502
+ name: "DisputeConfig",
17503
+ discriminator: [
17504
+ 230,
17505
+ 88,
17506
+ 200,
17507
+ 99,
17508
+ 12,
17509
+ 93,
17510
+ 56,
17511
+ 156
17512
+ ]
17513
+ },
17514
+ {
17515
+ name: "DisputeMarket",
17516
+ discriminator: [
17517
+ 235,
17518
+ 222,
17519
+ 113,
17520
+ 250,
17521
+ 83,
17522
+ 196,
17523
+ 239,
17524
+ 159
17525
+ ]
17526
+ },
17527
+ {
17528
+ name: "UserDispute",
17529
+ discriminator: [
17530
+ 54,
17531
+ 252,
17532
+ 42,
17533
+ 67,
17534
+ 211,
17535
+ 11,
17536
+ 192,
17537
+ 188
17538
+ ]
17539
+ }
17540
+ ],
17541
+ types: [
17542
+ {
17543
+ name: "DisputeConfig",
17544
+ type: {
17545
+ kind: "struct",
17546
+ fields: [
17547
+ {
17548
+ name: "version",
17549
+ type: "u8"
17550
+ },
17551
+ {
17552
+ name: "owner",
17553
+ type: "pubkey"
17554
+ },
17555
+ {
17556
+ name: "admin",
17557
+ type: "pubkey"
17558
+ },
17559
+ {
17560
+ name: "collateral_mint",
17561
+ type: "pubkey"
17562
+ },
17563
+ {
17564
+ name: "bump",
17565
+ type: "u8"
17566
+ }
17567
+ ]
17568
+ }
17569
+ },
17570
+ {
17571
+ name: "DisputeMarket",
17572
+ type: {
17573
+ kind: "struct",
17574
+ fields: [
17575
+ {
17576
+ name: "version",
17577
+ type: "u8"
17578
+ },
17579
+ {
17580
+ name: "condition_id",
17581
+ type: {
17582
+ array: [
17583
+ "u8",
17584
+ 32
17585
+ ]
17586
+ }
17587
+ },
17588
+ {
17589
+ name: "deadline",
17590
+ type: "i64"
17591
+ },
17592
+ {
17593
+ name: "bond",
17594
+ type: "u64"
17595
+ },
17596
+ {
17597
+ name: "amount",
17598
+ type: "u64"
17599
+ },
17600
+ {
17601
+ name: "is_resolved",
17602
+ type: "bool"
17603
+ },
17604
+ {
17605
+ name: "bump",
17606
+ type: "u8"
17607
+ }
17608
+ ]
17609
+ }
17610
+ },
17611
+ {
17612
+ name: "UserDispute",
17613
+ type: {
17614
+ kind: "struct",
17615
+ fields: [
17616
+ {
17617
+ name: "version",
17618
+ type: "u8"
17619
+ },
17620
+ {
17621
+ name: "user",
17622
+ type: "pubkey"
17623
+ },
17624
+ {
17625
+ name: "condition_id",
17626
+ type: {
17627
+ array: [
17628
+ "u8",
17629
+ 32
17630
+ ]
17631
+ }
17632
+ },
17633
+ {
17634
+ name: "amount",
17635
+ type: "u64"
17636
+ },
17637
+ {
17638
+ name: "bump",
17639
+ type: "u8"
17640
+ }
17641
+ ]
17642
+ }
17643
+ }
17644
+ ]
17645
+ };
17646
+
17647
+ // src/sdk.ts
17648
+ var XMarketSDK = class {
17649
+ constructor(config, wallet, marketOwner) {
17650
+ this.networkConfig = config;
17651
+ this.provider = new anchor5__namespace.AnchorProvider(
17652
+ new web3_js.Connection(config.rpcUrl, "confirmed"),
17653
+ wallet,
17654
+ { commitment: "confirmed", preflightCommitment: "confirmed" }
17655
+ );
17656
+ anchor5__namespace.setProvider(this.provider);
17657
+ this._programIds = config.programIds;
17658
+ this._marketOwner = marketOwner ?? wallet.publicKey;
17659
+ }
17660
+ _withAddress(idl, address) {
17661
+ return { ...idl, address: address.toBase58() };
17662
+ }
17663
+ get oracle() {
17664
+ if (!this._oracle) {
17665
+ const program = new anchor5__namespace.Program(this._withAddress(oracle_default, this._programIds.oracle), this.provider);
17666
+ this._oracle = new OracleClient(program, this.provider, this._programIds);
17667
+ }
17668
+ return this._oracle;
17669
+ }
17670
+ get hook() {
17671
+ if (!this._hook) {
17672
+ const program = new anchor5__namespace.Program(this._withAddress(hook_default, this._programIds.hook), this.provider);
17673
+ this._hook = new HookClient(program, this.provider, this._programIds);
17674
+ }
17675
+ return this._hook;
17676
+ }
17677
+ get market() {
17678
+ if (!this._market) {
17679
+ const program = new anchor5__namespace.Program(this._withAddress(question_market_default, this._programIds.questionMarket), this.provider);
17680
+ this._market = new MarketClient(program, this.provider, this._programIds, this._marketOwner);
17681
+ this._market.ctfClient = this.ctf;
17682
+ this._market.feeConfigOwner = this.networkConfig.feeConfigOwner ?? this._marketOwner;
17683
+ }
17684
+ return this._market;
17685
+ }
17686
+ get ctf() {
17687
+ if (!this._ctf) {
17688
+ const program = new anchor5__namespace.Program(this._withAddress(conditional_tokens_default, this._programIds.conditionalTokens), this.provider);
17689
+ this._ctf = new CtfClient(program, this.provider, this._programIds);
17690
+ }
17691
+ return this._ctf;
17692
+ }
17693
+ get clob() {
17694
+ if (!this._clob) {
17695
+ const program = new anchor5__namespace.Program(this._withAddress(clob_exchange_default, this._programIds.clobExchange), this.provider);
17696
+ this._clob = new ClobClient(program, this.provider, this._programIds, this.networkConfig);
17697
+ if (this.networkConfig.feeConfigOwner && this._programIds.feeManagement) {
17698
+ this._clob.feeConfigOwner = this.networkConfig.feeConfigOwner;
17699
+ this._clob.feeClient = this.fee;
17700
+ }
17701
+ this._clob.ctfClient = this.ctf;
17702
+ this._clob.qmConfigPda = this.market.configPda;
17703
+ this._clob.hookClient = this.hook;
17704
+ }
17705
+ return this._clob;
17706
+ }
17707
+ get fee() {
17708
+ if (!this._fee) {
17709
+ if (!this._programIds.feeManagement) throw new Error("feeManagement program ID not configured in NetworkConfig");
17710
+ const program = new anchor5__namespace.Program(this._withAddress(fee_management_default, this._programIds.feeManagement), this.provider);
17711
+ this._fee = new FeeManagementClient(program, this.provider, this._programIds);
17712
+ }
17713
+ return this._fee;
17714
+ }
17715
+ get presale() {
17716
+ if (!this._presale) {
17717
+ if (!this._programIds.presale) throw new Error("presale program ID not configured in NetworkConfig");
17718
+ const program = new anchor5__namespace.Program(this._withAddress(presale_default, this._programIds.presale), this.provider);
17719
+ this._presale = new PresaleClient(program, this.provider, this._programIds);
17720
+ }
17721
+ return this._presale;
17722
+ }
17723
+ get marketOracle() {
17724
+ if (!this._marketOracle) {
17725
+ if (!this._programIds.marketOracle) throw new Error("marketOracle program ID not configured in NetworkConfig");
17726
+ const program = new anchor5__namespace.Program(this._withAddress(market_oracle_default, this._programIds.marketOracle), this.provider);
17727
+ this._marketOracle = new MarketOracleClient(program, this.provider, this._programIds);
17728
+ }
17729
+ return this._marketOracle;
17730
+ }
17731
+ get admin() {
17732
+ if (!this._admin) {
17733
+ if (!this._programIds.adminContract) throw new Error("adminContract program ID not configured in NetworkConfig");
17734
+ const program = new anchor5__namespace.Program(this._withAddress(admin_contract_default, this._programIds.adminContract), this.provider);
17735
+ this._admin = new AdminClient(program, this.provider, this._programIds);
17736
+ }
17737
+ return this._admin;
17738
+ }
17739
+ get referral() {
17740
+ if (!this._referral) {
17741
+ if (!this._programIds.referral) throw new Error("referral program ID not configured in NetworkConfig");
17742
+ const program = new anchor5__namespace.Program(this._withAddress(referral_default, this._programIds.referral), this.provider);
17743
+ this._referral = new ReferralClient(program, this.provider, this._programIds);
17744
+ }
17745
+ return this._referral;
17746
+ }
17747
+ get dispute() {
17748
+ if (!this._dispute) {
17749
+ if (!this._programIds.dispute) throw new Error("dispute program ID not configured in NetworkConfig");
17750
+ const program = new anchor5__namespace.Program(this._withAddress(dispute_default, this._programIds.dispute), this.provider);
17751
+ this._dispute = new DisputeClient(program, this.provider, this._programIds);
17752
+ }
17753
+ return this._dispute;
16493
17754
  }
16494
17755
  };
16495
17756
  var MAX_APPROVE_AMOUNT = new BN4__default.default("18446744073709551615");
@@ -16567,6 +17828,7 @@ exports.AccountNotFoundError = AccountNotFoundError;
16567
17828
  exports.AdminClient = AdminClient;
16568
17829
  exports.ClobClient = ClobClient;
16569
17830
  exports.CtfClient = CtfClient;
17831
+ exports.DisputeClient = DisputeClient;
16570
17832
  exports.FEE_DENOMINATOR = FEE_DENOMINATOR;
16571
17833
  exports.FeeManagementClient = FeeManagementClient;
16572
17834
  exports.HookClient = HookClient;