@theliem/xmarket-sdk 4.1.0 → 4.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +33 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +33 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -479,11 +479,12 @@ var MarketClient = class {
|
|
|
479
479
|
return this.provider.wallet.publicKey;
|
|
480
480
|
}
|
|
481
481
|
// ─── Instructions (return Transaction — caller signs + sends) ───────────────
|
|
482
|
-
async initialize(admin, oracle, owner = this.walletPubkey) {
|
|
482
|
+
async initialize(admin, oracle, oracleProgram, owner = this.walletPubkey) {
|
|
483
483
|
return this.program.methods.initialize({
|
|
484
484
|
admin,
|
|
485
485
|
conditionalTokensProgram: this.programIds.conditionalTokens,
|
|
486
|
-
oracle
|
|
486
|
+
oracle,
|
|
487
|
+
oracleProgram
|
|
487
488
|
}).accounts({
|
|
488
489
|
owner,
|
|
489
490
|
config: this.configPda,
|
|
@@ -550,7 +551,8 @@ var MarketClient = class {
|
|
|
550
551
|
newAdmin: params.newAdmin ?? null,
|
|
551
552
|
newOracle: params.newOracle ?? null,
|
|
552
553
|
isPaused: params.isPaused ?? null,
|
|
553
|
-
newConditionalTokensProgram: params.newConditionalTokensProgram ?? null
|
|
554
|
+
newConditionalTokensProgram: params.newConditionalTokensProgram ?? null,
|
|
555
|
+
newOracleProgram: params.newOracleProgram ?? null
|
|
554
556
|
}).accounts({
|
|
555
557
|
authority,
|
|
556
558
|
payer,
|
|
@@ -612,6 +614,7 @@ var MarketClient = class {
|
|
|
612
614
|
owner: acc.owner,
|
|
613
615
|
admin: acc.admin,
|
|
614
616
|
oracle: acc.oracle,
|
|
617
|
+
oracleProgram: acc.oracleProgram,
|
|
615
618
|
conditionalTokensProgram: acc.conditionalTokensProgram,
|
|
616
619
|
questionCount: acc.questionCount.toNumber(),
|
|
617
620
|
approvedCount: acc.approvedCount.toNumber(),
|
|
@@ -6075,7 +6078,7 @@ var question_market_default = {
|
|
|
6075
6078
|
{
|
|
6076
6079
|
name: "oracle_program",
|
|
6077
6080
|
docs: [
|
|
6078
|
-
"Oracle program (for reading QuestionResult)"
|
|
6081
|
+
"Oracle program (for reading QuestionResult) \u2014 must match config.oracle_program"
|
|
6079
6082
|
]
|
|
6080
6083
|
},
|
|
6081
6084
|
{
|
|
@@ -6698,7 +6701,14 @@ var question_market_default = {
|
|
|
6698
6701
|
{
|
|
6699
6702
|
name: "oracle",
|
|
6700
6703
|
docs: [
|
|
6701
|
-
"Oracle
|
|
6704
|
+
"Oracle config PDA that will resolve conditions"
|
|
6705
|
+
],
|
|
6706
|
+
type: "pubkey"
|
|
6707
|
+
},
|
|
6708
|
+
{
|
|
6709
|
+
name: "oracle_program",
|
|
6710
|
+
docs: [
|
|
6711
|
+
"Oracle program ID \u2014 used to validate oracle proofs in resolve_question"
|
|
6702
6712
|
],
|
|
6703
6713
|
type: "pubkey"
|
|
6704
6714
|
}
|
|
@@ -7170,7 +7180,14 @@ var question_market_default = {
|
|
|
7170
7180
|
{
|
|
7171
7181
|
name: "oracle",
|
|
7172
7182
|
docs: [
|
|
7173
|
-
"Oracle
|
|
7183
|
+
"Oracle config PDA that will resolve conditions"
|
|
7184
|
+
],
|
|
7185
|
+
type: "pubkey"
|
|
7186
|
+
},
|
|
7187
|
+
{
|
|
7188
|
+
name: "oracle_program",
|
|
7189
|
+
docs: [
|
|
7190
|
+
"Oracle program ID \u2014 pinned for CPI validation in resolve_question"
|
|
7174
7191
|
],
|
|
7175
7192
|
type: "pubkey"
|
|
7176
7193
|
},
|
|
@@ -7243,7 +7260,7 @@ var question_market_default = {
|
|
|
7243
7260
|
type: {
|
|
7244
7261
|
array: [
|
|
7245
7262
|
"u8",
|
|
7246
|
-
|
|
7263
|
+
408
|
|
7247
7264
|
]
|
|
7248
7265
|
}
|
|
7249
7266
|
}
|
|
@@ -7441,6 +7458,15 @@ var question_market_default = {
|
|
|
7441
7458
|
type: {
|
|
7442
7459
|
option: "pubkey"
|
|
7443
7460
|
}
|
|
7461
|
+
},
|
|
7462
|
+
{
|
|
7463
|
+
name: "new_oracle_program",
|
|
7464
|
+
docs: [
|
|
7465
|
+
"New oracle program ID (optional) \u2014 used to validate oracle proofs in resolve_question"
|
|
7466
|
+
],
|
|
7467
|
+
type: {
|
|
7468
|
+
option: "pubkey"
|
|
7469
|
+
}
|
|
7444
7470
|
}
|
|
7445
7471
|
]
|
|
7446
7472
|
}
|