@triadxyz/triad-protocol 4.1.5 → 4.1.7
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.ts
CHANGED
|
@@ -117,8 +117,9 @@ export default class TriadProtocol {
|
|
|
117
117
|
* @param args.marketId - The ID of the Market
|
|
118
118
|
* @param args.winningDirection - The Winning Direction of the Market
|
|
119
119
|
* @param args.poolId - The ID of the Pool
|
|
120
|
+
* @param args.withPayout - Whether to allow the market to payout
|
|
120
121
|
*/
|
|
121
|
-
updateMarketWinningDirection({ marketId, winningDirection, poolId }: UpdateMarketWinningDirectionArgs): Promise<string | import("@solana/web3.js").VersionedTransaction>;
|
|
122
|
+
updateMarketWinningDirection({ marketId, winningDirection, poolId, withPayout }: UpdateMarketWinningDirectionArgs): Promise<string | import("@solana/web3.js").VersionedTransaction>;
|
|
122
123
|
/**
|
|
123
124
|
* Update Market Payout
|
|
124
125
|
* @param args.marketId - The ID of the market
|
package/dist/index.js
CHANGED
|
@@ -340,8 +340,9 @@ class TriadProtocol {
|
|
|
340
340
|
* @param args.marketId - The ID of the Market
|
|
341
341
|
* @param args.winningDirection - The Winning Direction of the Market
|
|
342
342
|
* @param args.poolId - The ID of the Pool
|
|
343
|
+
* @param args.withPayout - Whether to allow the market to payout
|
|
343
344
|
*/
|
|
344
|
-
updateMarketWinningDirection({ marketId, winningDirection, poolId }) {
|
|
345
|
+
updateMarketWinningDirection({ marketId, winningDirection, poolId, withPayout = false }) {
|
|
345
346
|
return __awaiter(this, void 0, void 0, function* () {
|
|
346
347
|
const ixs = [
|
|
347
348
|
yield this.program.methods
|
|
@@ -353,6 +354,15 @@ class TriadProtocol {
|
|
|
353
354
|
})
|
|
354
355
|
.instruction()
|
|
355
356
|
];
|
|
357
|
+
if (withPayout) {
|
|
358
|
+
ixs.push(yield this.program.methods
|
|
359
|
+
.updateMarketPayout(true)
|
|
360
|
+
.accounts({
|
|
361
|
+
signer: this.program.provider.publicKey,
|
|
362
|
+
market: (0, pda_1.getMarketPDA)(this.program.programId, marketId)
|
|
363
|
+
})
|
|
364
|
+
.instruction());
|
|
365
|
+
}
|
|
356
366
|
return (0, sendVersionedTransaction_1.default)(this.program, ixs, this.rpcOptions);
|
|
357
367
|
});
|
|
358
368
|
}
|
|
@@ -3417,6 +3417,10 @@
|
|
|
3417
3417
|
"type": {
|
|
3418
3418
|
"kind": "struct",
|
|
3419
3419
|
"fields": [
|
|
3420
|
+
{
|
|
3421
|
+
"name": "market_id",
|
|
3422
|
+
"type": "u64"
|
|
3423
|
+
},
|
|
3420
3424
|
{
|
|
3421
3425
|
"name": "hype_price",
|
|
3422
3426
|
"type": "u64"
|
|
@@ -3444,6 +3448,10 @@
|
|
|
3444
3448
|
{
|
|
3445
3449
|
"name": "volume",
|
|
3446
3450
|
"type": "u64"
|
|
3451
|
+
},
|
|
3452
|
+
{
|
|
3453
|
+
"name": "timestamp",
|
|
3454
|
+
"type": "i64"
|
|
3447
3455
|
}
|
|
3448
3456
|
]
|
|
3449
3457
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -4363,6 +4363,10 @@ export type TriadProtocol = {
|
|
|
4363
4363
|
type: {
|
|
4364
4364
|
kind: 'struct';
|
|
4365
4365
|
fields: [
|
|
4366
|
+
{
|
|
4367
|
+
name: 'marketId';
|
|
4368
|
+
type: 'u64';
|
|
4369
|
+
},
|
|
4366
4370
|
{
|
|
4367
4371
|
name: 'hypePrice';
|
|
4368
4372
|
type: 'u64';
|
|
@@ -4390,6 +4394,10 @@ export type TriadProtocol = {
|
|
|
4390
4394
|
{
|
|
4391
4395
|
name: 'volume';
|
|
4392
4396
|
type: 'u64';
|
|
4397
|
+
},
|
|
4398
|
+
{
|
|
4399
|
+
name: 'timestamp';
|
|
4400
|
+
type: 'i64';
|
|
4393
4401
|
}
|
|
4394
4402
|
];
|
|
4395
4403
|
};
|