@theliem/xmarket-sdk 4.0.2 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +13 -5
- package/dist/index.d.ts +13 -5
- package/dist/index.js +188 -48
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +188 -48
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -64,8 +64,8 @@ interface Condition {
|
|
|
64
64
|
collateralVault: PublicKey;
|
|
65
65
|
yesMint: PublicKey;
|
|
66
66
|
noMint: PublicKey;
|
|
67
|
-
hookProgram: PublicKey;
|
|
68
67
|
authorizedClob: PublicKey;
|
|
68
|
+
authorizedResolver: PublicKey;
|
|
69
69
|
isResolved: boolean;
|
|
70
70
|
resolvedAt: number;
|
|
71
71
|
bump: number;
|
|
@@ -301,7 +301,7 @@ declare class CtfClient {
|
|
|
301
301
|
* so that wallet can later sign reportPayouts.
|
|
302
302
|
* payer covers rent for condition + mints.
|
|
303
303
|
*/
|
|
304
|
-
prepareCondition(questionId: Uint8Array, oracle: PublicKey, collateralMint: PublicKey, authorizedClob: PublicKey, payer?: PublicKey, signers?: Keypair[]): Promise<{
|
|
304
|
+
prepareCondition(questionId: Uint8Array, oracle: PublicKey, collateralMint: PublicKey, authorizedClob: PublicKey, authorizedResolver?: PublicKey, payer?: PublicKey, signers?: Keypair[]): Promise<{
|
|
305
305
|
signature: string;
|
|
306
306
|
conditionPda: PublicKey;
|
|
307
307
|
yesMint: PublicKey;
|
|
@@ -391,11 +391,10 @@ declare class MarketClient {
|
|
|
391
391
|
initialize(admin: PublicKey, oracle: PublicKey, owner?: PublicKey): Promise<Transaction>;
|
|
392
392
|
/**
|
|
393
393
|
* Build createQuestionAdmin transaction (whitelist/admin path — status = Approved immediately).
|
|
394
|
-
* V2: no hookProgram param, uses TOKEN_PROGRAM_ID for YES/NO mints.
|
|
395
394
|
* @param creator - Whitelisted creator (must be in whitelist or be admin/owner)
|
|
396
395
|
* @param payer - Fee payer (pays rent; can differ from creator)
|
|
397
396
|
*/
|
|
398
|
-
createQuestionAdmin(params:
|
|
397
|
+
createQuestionAdmin(params: CreateQuestionParams, oracle: PublicKey, creator?: PublicKey, payer?: PublicKey): Promise<{
|
|
399
398
|
tx: Transaction;
|
|
400
399
|
questionPda: PublicKey;
|
|
401
400
|
conditionPda: PublicKey;
|
|
@@ -452,7 +451,6 @@ declare class MarketClient {
|
|
|
452
451
|
}>;
|
|
453
452
|
/**
|
|
454
453
|
* Whitelist-only: approve presale → creates question + CTF condition + market_oracle in one tx.
|
|
455
|
-
* V2: no hookProgram param — removes Token-2022 hook from CPI call.
|
|
456
454
|
*
|
|
457
455
|
* @param presalePda the presale account
|
|
458
456
|
* @param contentHash 32-byte hash for question content
|
|
@@ -727,6 +725,16 @@ declare class ClobClient {
|
|
|
727
725
|
*/
|
|
728
726
|
private _buildMergeIx;
|
|
729
727
|
private matchMergeOrders;
|
|
728
|
+
/**
|
|
729
|
+
* Build ixs for a mixed batch: some makers COMPLEMENTARY (same tokenId as taker),
|
|
730
|
+
* others MINT/MERGE (opposite tokenId). Packs all into a single ix array so the
|
|
731
|
+
* caller can send them in one atomic tx.
|
|
732
|
+
*
|
|
733
|
+
* Supported taker configurations:
|
|
734
|
+
* YES BUY + YES SELL makers + NO BUY makers → COMP ixs + MINT ix
|
|
735
|
+
* YES SELL + YES BUY makers + NO SELL makers → COMP ixs + MERGE ix
|
|
736
|
+
*/
|
|
737
|
+
private _buildMixedMatchIxs;
|
|
730
738
|
/**
|
|
731
739
|
* Auto-detect match type and execute 2-phase:
|
|
732
740
|
* Phase 1 — register all orders (taker + makers) on-chain in parallel.
|
package/dist/index.d.ts
CHANGED
|
@@ -64,8 +64,8 @@ interface Condition {
|
|
|
64
64
|
collateralVault: PublicKey;
|
|
65
65
|
yesMint: PublicKey;
|
|
66
66
|
noMint: PublicKey;
|
|
67
|
-
hookProgram: PublicKey;
|
|
68
67
|
authorizedClob: PublicKey;
|
|
68
|
+
authorizedResolver: PublicKey;
|
|
69
69
|
isResolved: boolean;
|
|
70
70
|
resolvedAt: number;
|
|
71
71
|
bump: number;
|
|
@@ -301,7 +301,7 @@ declare class CtfClient {
|
|
|
301
301
|
* so that wallet can later sign reportPayouts.
|
|
302
302
|
* payer covers rent for condition + mints.
|
|
303
303
|
*/
|
|
304
|
-
prepareCondition(questionId: Uint8Array, oracle: PublicKey, collateralMint: PublicKey, authorizedClob: PublicKey, payer?: PublicKey, signers?: Keypair[]): Promise<{
|
|
304
|
+
prepareCondition(questionId: Uint8Array, oracle: PublicKey, collateralMint: PublicKey, authorizedClob: PublicKey, authorizedResolver?: PublicKey, payer?: PublicKey, signers?: Keypair[]): Promise<{
|
|
305
305
|
signature: string;
|
|
306
306
|
conditionPda: PublicKey;
|
|
307
307
|
yesMint: PublicKey;
|
|
@@ -391,11 +391,10 @@ declare class MarketClient {
|
|
|
391
391
|
initialize(admin: PublicKey, oracle: PublicKey, owner?: PublicKey): Promise<Transaction>;
|
|
392
392
|
/**
|
|
393
393
|
* Build createQuestionAdmin transaction (whitelist/admin path — status = Approved immediately).
|
|
394
|
-
* V2: no hookProgram param, uses TOKEN_PROGRAM_ID for YES/NO mints.
|
|
395
394
|
* @param creator - Whitelisted creator (must be in whitelist or be admin/owner)
|
|
396
395
|
* @param payer - Fee payer (pays rent; can differ from creator)
|
|
397
396
|
*/
|
|
398
|
-
createQuestionAdmin(params:
|
|
397
|
+
createQuestionAdmin(params: CreateQuestionParams, oracle: PublicKey, creator?: PublicKey, payer?: PublicKey): Promise<{
|
|
399
398
|
tx: Transaction;
|
|
400
399
|
questionPda: PublicKey;
|
|
401
400
|
conditionPda: PublicKey;
|
|
@@ -452,7 +451,6 @@ declare class MarketClient {
|
|
|
452
451
|
}>;
|
|
453
452
|
/**
|
|
454
453
|
* Whitelist-only: approve presale → creates question + CTF condition + market_oracle in one tx.
|
|
455
|
-
* V2: no hookProgram param — removes Token-2022 hook from CPI call.
|
|
456
454
|
*
|
|
457
455
|
* @param presalePda the presale account
|
|
458
456
|
* @param contentHash 32-byte hash for question content
|
|
@@ -727,6 +725,16 @@ declare class ClobClient {
|
|
|
727
725
|
*/
|
|
728
726
|
private _buildMergeIx;
|
|
729
727
|
private matchMergeOrders;
|
|
728
|
+
/**
|
|
729
|
+
* Build ixs for a mixed batch: some makers COMPLEMENTARY (same tokenId as taker),
|
|
730
|
+
* others MINT/MERGE (opposite tokenId). Packs all into a single ix array so the
|
|
731
|
+
* caller can send them in one atomic tx.
|
|
732
|
+
*
|
|
733
|
+
* Supported taker configurations:
|
|
734
|
+
* YES BUY + YES SELL makers + NO BUY makers → COMP ixs + MINT ix
|
|
735
|
+
* YES SELL + YES BUY makers + NO SELL makers → COMP ixs + MERGE ix
|
|
736
|
+
*/
|
|
737
|
+
private _buildMixedMatchIxs;
|
|
730
738
|
/**
|
|
731
739
|
* Auto-detect match type and execute 2-phase:
|
|
732
740
|
* Phase 1 — register all orders (taker + makers) on-chain in parallel.
|
package/dist/index.js
CHANGED
|
@@ -518,7 +518,6 @@ var MarketClient = class {
|
|
|
518
518
|
}
|
|
519
519
|
/**
|
|
520
520
|
* Build createQuestionAdmin transaction (whitelist/admin path — status = Approved immediately).
|
|
521
|
-
* V2: no hookProgram param, uses TOKEN_PROGRAM_ID for YES/NO mints.
|
|
522
521
|
* @param creator - Whitelisted creator (must be in whitelist or be admin/owner)
|
|
523
522
|
* @param payer - Fee payer (pays rent; can differ from creator)
|
|
524
523
|
*/
|
|
@@ -755,7 +754,6 @@ var MarketClient = class {
|
|
|
755
754
|
}
|
|
756
755
|
/**
|
|
757
756
|
* Whitelist-only: approve presale → creates question + CTF condition + market_oracle in one tx.
|
|
758
|
-
* V2: no hookProgram param — removes Token-2022 hook from CPI call.
|
|
759
757
|
*
|
|
760
758
|
* @param presalePda the presale account
|
|
761
759
|
* @param contentHash 32-byte hash for question content
|
|
@@ -966,7 +964,7 @@ var CtfClient = class {
|
|
|
966
964
|
* so that wallet can later sign reportPayouts.
|
|
967
965
|
* payer covers rent for condition + mints.
|
|
968
966
|
*/
|
|
969
|
-
async prepareCondition(questionId, oracle, collateralMint, authorizedClob, payer = this.walletPubkey, signers = []) {
|
|
967
|
+
async prepareCondition(questionId, oracle, collateralMint, authorizedClob, authorizedResolver = oracle, payer = this.walletPubkey, signers = []) {
|
|
970
968
|
const [conditionPda] = PDA.condition(oracle, questionId, this.programIds);
|
|
971
969
|
const [yesMint] = PDA.yesMint(conditionPda, this.programIds);
|
|
972
970
|
const [noMint] = PDA.noMint(conditionPda, this.programIds);
|
|
@@ -974,7 +972,8 @@ var CtfClient = class {
|
|
|
974
972
|
const [collateralVault] = PDA.collateralVault(collateralMint, this.programIds);
|
|
975
973
|
const sig = await this.program.methods.prepareCondition(
|
|
976
974
|
Array.from(questionId),
|
|
977
|
-
authorizedClob
|
|
975
|
+
authorizedClob,
|
|
976
|
+
authorizedResolver
|
|
978
977
|
).accounts({
|
|
979
978
|
oracle,
|
|
980
979
|
condition: conditionPda,
|
|
@@ -1225,8 +1224,8 @@ var CtfClient = class {
|
|
|
1225
1224
|
collateralVault: acc.collateralVault,
|
|
1226
1225
|
yesMint: acc.yesMint,
|
|
1227
1226
|
noMint: acc.noMint,
|
|
1228
|
-
hookProgram: acc.hookProgram,
|
|
1229
1227
|
authorizedClob: acc.authorizedClob,
|
|
1228
|
+
authorizedResolver: acc.authorizedResolver,
|
|
1230
1229
|
isResolved: acc.isResolved,
|
|
1231
1230
|
resolvedAt: acc.resolvedAt?.toNumber() ?? 0,
|
|
1232
1231
|
bump: acc.bump
|
|
@@ -2297,6 +2296,54 @@ ${logs.join("\n")}`);
|
|
|
2297
2296
|
const sig = await this.sendMatchTx([matchIx], lookupTable, operatorWallet);
|
|
2298
2297
|
return { signature: sig };
|
|
2299
2298
|
}
|
|
2299
|
+
/**
|
|
2300
|
+
* Build ixs for a mixed batch: some makers COMPLEMENTARY (same tokenId as taker),
|
|
2301
|
+
* others MINT/MERGE (opposite tokenId). Packs all into a single ix array so the
|
|
2302
|
+
* caller can send them in one atomic tx.
|
|
2303
|
+
*
|
|
2304
|
+
* Supported taker configurations:
|
|
2305
|
+
* YES BUY + YES SELL makers + NO BUY makers → COMP ixs + MINT ix
|
|
2306
|
+
* YES SELL + YES BUY makers + NO SELL makers → COMP ixs + MERGE ix
|
|
2307
|
+
*/
|
|
2308
|
+
async _buildMixedMatchIxs(taker, complementaryMakers, mintMergeMakers, collateralMint, feeRecipient, operator, opts) {
|
|
2309
|
+
const t = taker.order;
|
|
2310
|
+
const SIDE_BUY = 0;
|
|
2311
|
+
const SIDE_SELL = 1;
|
|
2312
|
+
const useTakerPrice = t.side === SIDE_BUY;
|
|
2313
|
+
const compIxs = await this.buildMatchComplementaryIxs(
|
|
2314
|
+
taker,
|
|
2315
|
+
complementaryMakers,
|
|
2316
|
+
collateralMint,
|
|
2317
|
+
feeRecipient,
|
|
2318
|
+
operator,
|
|
2319
|
+
opts,
|
|
2320
|
+
useTakerPrice
|
|
2321
|
+
);
|
|
2322
|
+
const allBuy = t.side === SIDE_BUY && mintMergeMakers.every((m) => m.order.side === SIDE_BUY);
|
|
2323
|
+
const allSell = t.side === SIDE_SELL && mintMergeMakers.every((m) => m.order.side === SIDE_SELL);
|
|
2324
|
+
if (!allBuy && !allSell) {
|
|
2325
|
+
throw new InvalidParamError("MINT/MERGE makers in mixed batch must all share taker side");
|
|
2326
|
+
}
|
|
2327
|
+
const condition = t.condition;
|
|
2328
|
+
const clobConfig = this.configPda();
|
|
2329
|
+
const [yesMint] = PDA.yesMint(condition, this.programIds);
|
|
2330
|
+
const [noMint] = PDA.noMint(condition, this.programIds);
|
|
2331
|
+
const clobYesAta = splToken.getAssociatedTokenAddressSync(yesMint, clobConfig, true, splToken.TOKEN_PROGRAM_ID);
|
|
2332
|
+
const clobNoAta = splToken.getAssociatedTokenAddressSync(noMint, clobConfig, true, splToken.TOKEN_PROGRAM_ID);
|
|
2333
|
+
await this._ensureClobOutcomeAtas(yesMint, noMint, clobConfig, clobYesAta, clobNoAta);
|
|
2334
|
+
let mmIxs;
|
|
2335
|
+
if (t.tokenId === 1) {
|
|
2336
|
+
const ix = allBuy ? await this._buildMintIx(taker, mintMergeMakers, collateralMint, operator, this.walletPubkey) : await this._buildMergeIx(taker, mintMergeMakers, collateralMint, operator, this.walletPubkey, opts);
|
|
2337
|
+
mmIxs = [ix];
|
|
2338
|
+
} else {
|
|
2339
|
+
mmIxs = [];
|
|
2340
|
+
for (const yesMaker of mintMergeMakers) {
|
|
2341
|
+
const ix = allBuy ? await this._buildMintIx(yesMaker, [taker], collateralMint, operator, this.walletPubkey) : await this._buildMergeIx(yesMaker, [taker], collateralMint, operator, this.walletPubkey, opts);
|
|
2342
|
+
mmIxs.push(ix);
|
|
2343
|
+
}
|
|
2344
|
+
}
|
|
2345
|
+
return [...compIxs, ...mmIxs];
|
|
2346
|
+
}
|
|
2300
2347
|
/**
|
|
2301
2348
|
* Auto-detect match type and execute 2-phase:
|
|
2302
2349
|
* Phase 1 — register all orders (taker + makers) on-chain in parallel.
|
|
@@ -2325,9 +2372,28 @@ ${logs.join("\n")}`);
|
|
|
2325
2372
|
makers
|
|
2326
2373
|
);
|
|
2327
2374
|
const t = taker.order;
|
|
2328
|
-
const m0 = makers[0].order;
|
|
2329
2375
|
const SIDE_BUY = 0;
|
|
2330
2376
|
const SIDE_SELL = 1;
|
|
2377
|
+
const complementaryMakers = makers.filter((m) => m.order.tokenId === t.tokenId);
|
|
2378
|
+
const mintMergeMakers = makers.filter((m) => m.order.tokenId !== t.tokenId);
|
|
2379
|
+
if (complementaryMakers.length > 0 && mintMergeMakers.length > 0) {
|
|
2380
|
+
await Promise.all([
|
|
2381
|
+
this.registerOrderIfNeeded(taker),
|
|
2382
|
+
...makers.map((m) => this.registerOrderIfNeeded(m))
|
|
2383
|
+
]);
|
|
2384
|
+
const ixs = await this._buildMixedMatchIxs(
|
|
2385
|
+
taker,
|
|
2386
|
+
complementaryMakers,
|
|
2387
|
+
mintMergeMakers,
|
|
2388
|
+
collateralMint,
|
|
2389
|
+
feeRecipient,
|
|
2390
|
+
operatorWallet.publicKey,
|
|
2391
|
+
opts
|
|
2392
|
+
);
|
|
2393
|
+
const sig = await this.sendMatchTx(ixs, alt, operatorWallet);
|
|
2394
|
+
return { signature: sig };
|
|
2395
|
+
}
|
|
2396
|
+
const m0 = makers[0].order;
|
|
2331
2397
|
if (t.tokenId === m0.tokenId) {
|
|
2332
2398
|
let buySignedOrder, sellCandidates;
|
|
2333
2399
|
if (t.side === SIDE_BUY && makers.every((m) => m.order.side === SIDE_SELL)) {
|
|
@@ -2428,9 +2494,34 @@ ${logs.join("\n")}`);
|
|
|
2428
2494
|
const feeRecipient = cfg.feeRecipient;
|
|
2429
2495
|
const alt = await this.ensureAlt(taker.order.condition, collateralMint, taker, makers);
|
|
2430
2496
|
const t = taker.order;
|
|
2431
|
-
const m0 = makers[0].order;
|
|
2432
2497
|
const SIDE_BUY = 0;
|
|
2433
2498
|
const SIDE_SELL = 1;
|
|
2499
|
+
const complementaryMakers = makers.filter((m) => m.order.tokenId === t.tokenId);
|
|
2500
|
+
const mintMergeMakers = makers.filter((m) => m.order.tokenId !== t.tokenId);
|
|
2501
|
+
if (complementaryMakers.length > 0 && mintMergeMakers.length > 0) {
|
|
2502
|
+
await Promise.all([
|
|
2503
|
+
this.registerOrderIfNeeded(taker),
|
|
2504
|
+
...makers.map((m) => this.registerOrderIfNeeded(m))
|
|
2505
|
+
]);
|
|
2506
|
+
const oracleVaultInitIx2 = await this.buildInitOracleVaultIfNeeded(
|
|
2507
|
+
t.condition,
|
|
2508
|
+
collateralMint,
|
|
2509
|
+
t.fee,
|
|
2510
|
+
payer
|
|
2511
|
+
);
|
|
2512
|
+
const preIxs2 = oracleVaultInitIx2 ? [oracleVaultInitIx2] : [];
|
|
2513
|
+
const ixs2 = await this._buildMixedMatchIxs(
|
|
2514
|
+
taker,
|
|
2515
|
+
complementaryMakers,
|
|
2516
|
+
mintMergeMakers,
|
|
2517
|
+
collateralMint,
|
|
2518
|
+
feeRecipient,
|
|
2519
|
+
operator,
|
|
2520
|
+
opts
|
|
2521
|
+
);
|
|
2522
|
+
return this._buildUnsignedVtx([...preIxs2, ...ixs2], alt, payer);
|
|
2523
|
+
}
|
|
2524
|
+
const m0 = makers[0].order;
|
|
2434
2525
|
const oracleVaultInitIx = await this.buildInitOracleVaultIfNeeded(
|
|
2435
2526
|
t.condition,
|
|
2436
2527
|
collateralMint,
|
|
@@ -3800,7 +3891,7 @@ var DisputeClient = class {
|
|
|
3800
3891
|
|
|
3801
3892
|
// src/idls/oracle.json
|
|
3802
3893
|
var oracle_default = {
|
|
3803
|
-
address: "
|
|
3894
|
+
address: "8uNiLDZnarxyFyoCi1bE1qkBMsLs2Tpyohtdzdvjkg8j",
|
|
3804
3895
|
metadata: {
|
|
3805
3896
|
name: "oracle_v2",
|
|
3806
3897
|
version: "0.1.0",
|
|
@@ -4525,7 +4616,7 @@ var oracle_default = {
|
|
|
4525
4616
|
|
|
4526
4617
|
// src/idls/question_market.json
|
|
4527
4618
|
var question_market_default = {
|
|
4528
|
-
address: "
|
|
4619
|
+
address: "FkpHo3zb5h2nNS5n6tWAvDwXPTXR2qqVLjDmEkMayott",
|
|
4529
4620
|
metadata: {
|
|
4530
4621
|
name: "question_market_v2",
|
|
4531
4622
|
version: "0.1.0",
|
|
@@ -4859,19 +4950,19 @@ var question_market_default = {
|
|
|
4859
4950
|
},
|
|
4860
4951
|
{
|
|
4861
4952
|
name: "fee_management_program",
|
|
4862
|
-
address: "
|
|
4953
|
+
address: "8S6hxqbDc8kgHf4uUzq2t15PeY36QSCYEpBVvM4Fhrkm"
|
|
4863
4954
|
},
|
|
4864
4955
|
{
|
|
4865
4956
|
name: "presale_program",
|
|
4866
|
-
address: "
|
|
4957
|
+
address: "CKd94vPibAMAr8R5eLv21r8PYXkgLRithipBe8GV7J6C"
|
|
4867
4958
|
},
|
|
4868
4959
|
{
|
|
4869
4960
|
name: "market_oracle_program",
|
|
4870
|
-
address: "
|
|
4961
|
+
address: "Agt6beCbghi4jV9A8v9geRP5dnt2wDkJBVgy9oM33zit"
|
|
4871
4962
|
},
|
|
4872
4963
|
{
|
|
4873
4964
|
name: "admin_program",
|
|
4874
|
-
address: "
|
|
4965
|
+
address: "2HsyCdr59W5ndeboaE9JAmhEQ46m5Gm2ZWBfYEs1tC1i"
|
|
4875
4966
|
},
|
|
4876
4967
|
{
|
|
4877
4968
|
name: "token_program",
|
|
@@ -5133,11 +5224,11 @@ var question_market_default = {
|
|
|
5133
5224
|
},
|
|
5134
5225
|
{
|
|
5135
5226
|
name: "presale_program",
|
|
5136
|
-
address: "
|
|
5227
|
+
address: "CKd94vPibAMAr8R5eLv21r8PYXkgLRithipBe8GV7J6C"
|
|
5137
5228
|
},
|
|
5138
5229
|
{
|
|
5139
5230
|
name: "admin_program",
|
|
5140
|
-
address: "
|
|
5231
|
+
address: "2HsyCdr59W5ndeboaE9JAmhEQ46m5Gm2ZWBfYEs1tC1i"
|
|
5141
5232
|
},
|
|
5142
5233
|
{
|
|
5143
5234
|
name: "token_program",
|
|
@@ -5219,7 +5310,7 @@ var question_market_default = {
|
|
|
5219
5310
|
},
|
|
5220
5311
|
{
|
|
5221
5312
|
name: "market_oracle_program",
|
|
5222
|
-
address: "
|
|
5313
|
+
address: "Agt6beCbghi4jV9A8v9geRP5dnt2wDkJBVgy9oM33zit"
|
|
5223
5314
|
}
|
|
5224
5315
|
],
|
|
5225
5316
|
args: []
|
|
@@ -5447,7 +5538,7 @@ var question_market_default = {
|
|
|
5447
5538
|
},
|
|
5448
5539
|
{
|
|
5449
5540
|
name: "presale_program",
|
|
5450
|
-
address: "
|
|
5541
|
+
address: "CKd94vPibAMAr8R5eLv21r8PYXkgLRithipBe8GV7J6C"
|
|
5451
5542
|
},
|
|
5452
5543
|
{
|
|
5453
5544
|
name: "token_program",
|
|
@@ -5583,7 +5674,7 @@ var question_market_default = {
|
|
|
5583
5674
|
},
|
|
5584
5675
|
{
|
|
5585
5676
|
name: "fee_management_program",
|
|
5586
|
-
address: "
|
|
5677
|
+
address: "8S6hxqbDc8kgHf4uUzq2t15PeY36QSCYEpBVvM4Fhrkm"
|
|
5587
5678
|
},
|
|
5588
5679
|
{
|
|
5589
5680
|
name: "token_program",
|
|
@@ -5776,7 +5867,7 @@ var question_market_default = {
|
|
|
5776
5867
|
},
|
|
5777
5868
|
{
|
|
5778
5869
|
name: "presale_program",
|
|
5779
|
-
address: "
|
|
5870
|
+
address: "CKd94vPibAMAr8R5eLv21r8PYXkgLRithipBe8GV7J6C"
|
|
5780
5871
|
}
|
|
5781
5872
|
],
|
|
5782
5873
|
args: []
|
|
@@ -5996,7 +6087,8 @@ var question_market_default = {
|
|
|
5996
6087
|
{
|
|
5997
6088
|
name: "condition",
|
|
5998
6089
|
docs: [
|
|
5999
|
-
"The Condition account in CTF (will be updated via CPI)"
|
|
6090
|
+
"The Condition account in CTF (will be updated via CPI).",
|
|
6091
|
+
"Must match question.condition \u2014 prevents cross-market resolution."
|
|
6000
6092
|
],
|
|
6001
6093
|
writable: true
|
|
6002
6094
|
},
|
|
@@ -7384,7 +7476,7 @@ var question_market_default = {
|
|
|
7384
7476
|
|
|
7385
7477
|
// src/idls/conditional_tokens.json
|
|
7386
7478
|
var conditional_tokens_default = {
|
|
7387
|
-
address: "
|
|
7479
|
+
address: "xpn3htSptTZECudoRA8WJmAEtiijxDseTqtawYysVNT",
|
|
7388
7480
|
metadata: {
|
|
7389
7481
|
name: "conditional_tokens_v2",
|
|
7390
7482
|
version: "0.1.0",
|
|
@@ -7805,6 +7897,10 @@ var conditional_tokens_default = {
|
|
|
7805
7897
|
{
|
|
7806
7898
|
name: "authorized_clob",
|
|
7807
7899
|
type: "pubkey"
|
|
7900
|
+
},
|
|
7901
|
+
{
|
|
7902
|
+
name: "authorized_resolver",
|
|
7903
|
+
type: "pubkey"
|
|
7808
7904
|
}
|
|
7809
7905
|
]
|
|
7810
7906
|
},
|
|
@@ -7934,9 +8030,6 @@ var conditional_tokens_default = {
|
|
|
7934
8030
|
},
|
|
7935
8031
|
{
|
|
7936
8032
|
name: "collateral_vault",
|
|
7937
|
-
docs: [
|
|
7938
|
-
"Use canonical bump derivation (no bump = vault.bump) so corrupt bump doesn't block us"
|
|
7939
|
-
],
|
|
7940
8033
|
writable: true,
|
|
7941
8034
|
pda: {
|
|
7942
8035
|
seeds: [
|
|
@@ -7970,9 +8063,6 @@ var conditional_tokens_default = {
|
|
|
7970
8063
|
},
|
|
7971
8064
|
{
|
|
7972
8065
|
name: "vault_token_account",
|
|
7973
|
-
docs: [
|
|
7974
|
-
"Existing vault token account \u2014 just update the reference"
|
|
7975
|
-
],
|
|
7976
8066
|
writable: true,
|
|
7977
8067
|
pda: {
|
|
7978
8068
|
seeds: [
|
|
@@ -8650,6 +8740,14 @@ var conditional_tokens_default = {
|
|
|
8650
8740
|
],
|
|
8651
8741
|
type: "u8"
|
|
8652
8742
|
},
|
|
8743
|
+
{
|
|
8744
|
+
name: "admin",
|
|
8745
|
+
docs: [
|
|
8746
|
+
"Admin pubkey \u2014 only this address can call reinitialize_vault.",
|
|
8747
|
+
"Set at initialize_vault time. If Pubkey::default(), first caller sets it (bootstrap)."
|
|
8748
|
+
],
|
|
8749
|
+
type: "pubkey"
|
|
8750
|
+
},
|
|
8653
8751
|
{
|
|
8654
8752
|
name: "_reserved",
|
|
8655
8753
|
docs: [
|
|
@@ -8658,7 +8756,7 @@ var conditional_tokens_default = {
|
|
|
8658
8756
|
type: {
|
|
8659
8757
|
array: [
|
|
8660
8758
|
"u8",
|
|
8661
|
-
|
|
8759
|
+
32
|
|
8662
8760
|
]
|
|
8663
8761
|
}
|
|
8664
8762
|
}
|
|
@@ -8736,12 +8834,20 @@ var conditional_tokens_default = {
|
|
|
8736
8834
|
name: "bump",
|
|
8737
8835
|
type: "u8"
|
|
8738
8836
|
},
|
|
8837
|
+
{
|
|
8838
|
+
name: "authorized_resolver",
|
|
8839
|
+
docs: [
|
|
8840
|
+
"QuestionMarket config PDA authorized to call set_payout.",
|
|
8841
|
+
"Uses first 32 bytes of old _reserved \u2014 existing accounts read as Pubkey::default()."
|
|
8842
|
+
],
|
|
8843
|
+
type: "pubkey"
|
|
8844
|
+
},
|
|
8739
8845
|
{
|
|
8740
8846
|
name: "_reserved",
|
|
8741
8847
|
type: {
|
|
8742
8848
|
array: [
|
|
8743
8849
|
"u8",
|
|
8744
|
-
|
|
8850
|
+
32
|
|
8745
8851
|
]
|
|
8746
8852
|
}
|
|
8747
8853
|
}
|
|
@@ -9087,7 +9193,7 @@ var conditional_tokens_default = {
|
|
|
9087
9193
|
|
|
9088
9194
|
// src/idls/clob_exchange.json
|
|
9089
9195
|
var clob_exchange_default = {
|
|
9090
|
-
address: "
|
|
9196
|
+
address: "AFT8SM1Vv8g8AQTf81LoE5oLteUTyhWzWTLj7SKZjkY1",
|
|
9091
9197
|
metadata: {
|
|
9092
9198
|
name: "clob_exchange_v2",
|
|
9093
9199
|
version: "0.1.0",
|
|
@@ -9280,7 +9386,7 @@ var clob_exchange_default = {
|
|
|
9280
9386
|
},
|
|
9281
9387
|
{
|
|
9282
9388
|
name: "conditional_tokens_program",
|
|
9283
|
-
address: "
|
|
9389
|
+
address: "xpn3htSptTZECudoRA8WJmAEtiijxDseTqtawYysVNT"
|
|
9284
9390
|
},
|
|
9285
9391
|
{
|
|
9286
9392
|
name: "token_program",
|
|
@@ -9431,7 +9537,7 @@ var clob_exchange_default = {
|
|
|
9431
9537
|
},
|
|
9432
9538
|
{
|
|
9433
9539
|
name: "conditional_tokens_program",
|
|
9434
|
-
address: "
|
|
9540
|
+
address: "xpn3htSptTZECudoRA8WJmAEtiijxDseTqtawYysVNT"
|
|
9435
9541
|
},
|
|
9436
9542
|
{
|
|
9437
9543
|
name: "token_program",
|
|
@@ -9578,7 +9684,7 @@ var clob_exchange_default = {
|
|
|
9578
9684
|
},
|
|
9579
9685
|
{
|
|
9580
9686
|
name: "conditional_tokens_program",
|
|
9581
|
-
address: "
|
|
9687
|
+
address: "xpn3htSptTZECudoRA8WJmAEtiijxDseTqtawYysVNT"
|
|
9582
9688
|
},
|
|
9583
9689
|
{
|
|
9584
9690
|
name: "token_program",
|
|
@@ -9941,7 +10047,7 @@ var clob_exchange_default = {
|
|
|
9941
10047
|
},
|
|
9942
10048
|
{
|
|
9943
10049
|
name: "conditional_tokens_program",
|
|
9944
|
-
address: "
|
|
10050
|
+
address: "xpn3htSptTZECudoRA8WJmAEtiijxDseTqtawYysVNT"
|
|
9945
10051
|
},
|
|
9946
10052
|
{
|
|
9947
10053
|
name: "token_program",
|
|
@@ -10213,7 +10319,7 @@ var clob_exchange_default = {
|
|
|
10213
10319
|
},
|
|
10214
10320
|
{
|
|
10215
10321
|
name: "conditional_tokens_program",
|
|
10216
|
-
address: "
|
|
10322
|
+
address: "xpn3htSptTZECudoRA8WJmAEtiijxDseTqtawYysVNT"
|
|
10217
10323
|
},
|
|
10218
10324
|
{
|
|
10219
10325
|
name: "collateral_token_program",
|
|
@@ -10489,7 +10595,7 @@ var clob_exchange_default = {
|
|
|
10489
10595
|
},
|
|
10490
10596
|
{
|
|
10491
10597
|
name: "conditional_tokens_program",
|
|
10492
|
-
address: "
|
|
10598
|
+
address: "xpn3htSptTZECudoRA8WJmAEtiijxDseTqtawYysVNT"
|
|
10493
10599
|
},
|
|
10494
10600
|
{
|
|
10495
10601
|
name: "collateral_token_program",
|
|
@@ -11229,6 +11335,14 @@ var clob_exchange_default = {
|
|
|
11229
11335
|
],
|
|
11230
11336
|
type: "u8"
|
|
11231
11337
|
},
|
|
11338
|
+
{
|
|
11339
|
+
name: "admin",
|
|
11340
|
+
docs: [
|
|
11341
|
+
"Admin pubkey \u2014 only this address can call reinitialize_vault.",
|
|
11342
|
+
"Set at initialize_vault time. If Pubkey::default(), first caller sets it (bootstrap)."
|
|
11343
|
+
],
|
|
11344
|
+
type: "pubkey"
|
|
11345
|
+
},
|
|
11232
11346
|
{
|
|
11233
11347
|
name: "_reserved",
|
|
11234
11348
|
docs: [
|
|
@@ -11237,7 +11351,7 @@ var clob_exchange_default = {
|
|
|
11237
11351
|
type: {
|
|
11238
11352
|
array: [
|
|
11239
11353
|
"u8",
|
|
11240
|
-
|
|
11354
|
+
32
|
|
11241
11355
|
]
|
|
11242
11356
|
}
|
|
11243
11357
|
}
|
|
@@ -11386,12 +11500,20 @@ var clob_exchange_default = {
|
|
|
11386
11500
|
name: "bump",
|
|
11387
11501
|
type: "u8"
|
|
11388
11502
|
},
|
|
11503
|
+
{
|
|
11504
|
+
name: "authorized_resolver",
|
|
11505
|
+
docs: [
|
|
11506
|
+
"QuestionMarket config PDA authorized to call set_payout.",
|
|
11507
|
+
"Uses first 32 bytes of old _reserved \u2014 existing accounts read as Pubkey::default()."
|
|
11508
|
+
],
|
|
11509
|
+
type: "pubkey"
|
|
11510
|
+
},
|
|
11389
11511
|
{
|
|
11390
11512
|
name: "_reserved",
|
|
11391
11513
|
type: {
|
|
11392
11514
|
array: [
|
|
11393
11515
|
"u8",
|
|
11394
|
-
|
|
11516
|
+
32
|
|
11395
11517
|
]
|
|
11396
11518
|
}
|
|
11397
11519
|
}
|
|
@@ -11597,7 +11719,7 @@ var clob_exchange_default = {
|
|
|
11597
11719
|
|
|
11598
11720
|
// src/idls/fee_management.json
|
|
11599
11721
|
var fee_management_default = {
|
|
11600
|
-
address: "
|
|
11722
|
+
address: "8S6hxqbDc8kgHf4uUzq2t15PeY36QSCYEpBVvM4Fhrkm",
|
|
11601
11723
|
metadata: {
|
|
11602
11724
|
name: "fee_management",
|
|
11603
11725
|
version: "0.1.0",
|
|
@@ -13067,7 +13189,7 @@ var fee_management_default = {
|
|
|
13067
13189
|
|
|
13068
13190
|
// src/idls/presale.json
|
|
13069
13191
|
var presale_default = {
|
|
13070
|
-
address: "
|
|
13192
|
+
address: "CKd94vPibAMAr8R5eLv21r8PYXkgLRithipBe8GV7J6C",
|
|
13071
13193
|
metadata: {
|
|
13072
13194
|
name: "presale",
|
|
13073
13195
|
version: "0.1.0",
|
|
@@ -14734,7 +14856,7 @@ var presale_default = {
|
|
|
14734
14856
|
|
|
14735
14857
|
// src/idls/market_oracle.json
|
|
14736
14858
|
var market_oracle_default = {
|
|
14737
|
-
address: "
|
|
14859
|
+
address: "Agt6beCbghi4jV9A8v9geRP5dnt2wDkJBVgy9oM33zit",
|
|
14738
14860
|
metadata: {
|
|
14739
14861
|
name: "market_oracle",
|
|
14740
14862
|
version: "0.1.0",
|
|
@@ -15435,7 +15557,7 @@ var market_oracle_default = {
|
|
|
15435
15557
|
|
|
15436
15558
|
// src/idls/admin_contract.json
|
|
15437
15559
|
var admin_contract_default = {
|
|
15438
|
-
address: "
|
|
15560
|
+
address: "2HsyCdr59W5ndeboaE9JAmhEQ46m5Gm2ZWBfYEs1tC1i",
|
|
15439
15561
|
metadata: {
|
|
15440
15562
|
name: "admin_contract",
|
|
15441
15563
|
version: "0.1.0",
|
|
@@ -16286,11 +16408,29 @@ var admin_contract_default = {
|
|
|
16286
16408
|
accounts: [
|
|
16287
16409
|
{
|
|
16288
16410
|
name: "AdminConfig",
|
|
16289
|
-
discriminator: [
|
|
16411
|
+
discriminator: [
|
|
16412
|
+
156,
|
|
16413
|
+
10,
|
|
16414
|
+
79,
|
|
16415
|
+
161,
|
|
16416
|
+
71,
|
|
16417
|
+
9,
|
|
16418
|
+
62,
|
|
16419
|
+
77
|
|
16420
|
+
]
|
|
16290
16421
|
},
|
|
16291
16422
|
{
|
|
16292
16423
|
name: "ClaimRecord",
|
|
16293
|
-
discriminator: [
|
|
16424
|
+
discriminator: [
|
|
16425
|
+
57,
|
|
16426
|
+
229,
|
|
16427
|
+
0,
|
|
16428
|
+
9,
|
|
16429
|
+
65,
|
|
16430
|
+
62,
|
|
16431
|
+
96,
|
|
16432
|
+
7
|
|
16433
|
+
]
|
|
16294
16434
|
}
|
|
16295
16435
|
],
|
|
16296
16436
|
types: [
|
|
@@ -16381,9 +16521,9 @@ var admin_contract_default = {
|
|
|
16381
16521
|
|
|
16382
16522
|
// src/idls/referral.json
|
|
16383
16523
|
var referral_default = {
|
|
16384
|
-
address: "
|
|
16524
|
+
address: "9kyNMtUEFR6hDeZHUTbRKH3t1EJisfSvWQKKUev7ujoC",
|
|
16385
16525
|
metadata: {
|
|
16386
|
-
name: "
|
|
16526
|
+
name: "referral_v2",
|
|
16387
16527
|
version: "0.1.0",
|
|
16388
16528
|
spec: "0.1.0",
|
|
16389
16529
|
description: "Referral program for XMarket \u2014 whitelist-gated batch USDS distribution"
|
|
@@ -16872,9 +17012,9 @@ var referral_default = {
|
|
|
16872
17012
|
|
|
16873
17013
|
// src/idls/dispute.json
|
|
16874
17014
|
var dispute_default = {
|
|
16875
|
-
address: "
|
|
17015
|
+
address: "8gqHPY1WtGFGmYNbrGrPVoct1kqPL6cCaUtJ17EHSsFp",
|
|
16876
17016
|
metadata: {
|
|
16877
|
-
name: "
|
|
17017
|
+
name: "dispute_v2",
|
|
16878
17018
|
version: "0.1.0",
|
|
16879
17019
|
spec: "0.1.0",
|
|
16880
17020
|
description: "Dispute program for XMarket \u2014 raise/resolve/claim disputes on prediction markets"
|