@triadxyz/triad-protocol 2.2.1-beta → 2.2.2-beta
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/trade.d.ts
CHANGED
|
@@ -156,7 +156,7 @@ export default class Trade {
|
|
|
156
156
|
* @param options - RPC options
|
|
157
157
|
*
|
|
158
158
|
*/
|
|
159
|
-
createMarket({ marketId, startTime, endTime, question, feeBps, customer, payoutFee, mint }: CreateMarketArgs, options?: RpcOptions): Promise<string>;
|
|
159
|
+
createMarket({ marketId, startTime, endTime, question, feeBps, customer, payoutFee, mint, poolId }: CreateMarketArgs, options?: RpcOptions): Promise<string>;
|
|
160
160
|
/**
|
|
161
161
|
* Create Pool
|
|
162
162
|
* @param poolId - The ID of the pool
|
package/dist/trade.js
CHANGED
|
@@ -117,12 +117,16 @@ class Trade {
|
|
|
117
117
|
* @param options - RPC options
|
|
118
118
|
*
|
|
119
119
|
*/
|
|
120
|
-
createMarket({ marketId, startTime, endTime, question, feeBps, customer, payoutFee, mint }, options) {
|
|
120
|
+
createMarket({ marketId, startTime, endTime, question, feeBps, customer, payoutFee, mint, poolId }, options) {
|
|
121
121
|
return __awaiter(this, void 0, void 0, function* () {
|
|
122
122
|
if (question.length > 80) {
|
|
123
123
|
throw new Error('Question must be less than 80 characters');
|
|
124
124
|
}
|
|
125
125
|
const ixs = [];
|
|
126
|
+
let poolPDA = null;
|
|
127
|
+
if (poolId) {
|
|
128
|
+
poolPDA = (0, pda_1.getPoolPDA)(this.program.programId, poolId);
|
|
129
|
+
}
|
|
126
130
|
ixs.push(yield this.program.methods
|
|
127
131
|
.createMarket({
|
|
128
132
|
marketId: new bn_js_1.default(marketId),
|
|
@@ -137,7 +141,7 @@ class Trade {
|
|
|
137
141
|
mint,
|
|
138
142
|
tokenProgram: (0, helpers_1.getTokenProgram)(mint),
|
|
139
143
|
customer,
|
|
140
|
-
pool:
|
|
144
|
+
pool: poolPDA
|
|
141
145
|
})
|
|
142
146
|
.instruction());
|
|
143
147
|
return (0, sendVersionedTransaction_1.default)(this.program, ixs, options);
|
package/dist/types/trade.d.ts
CHANGED
|
@@ -139,16 +139,17 @@ export type CreateMarketArgs = {
|
|
|
139
139
|
customer: PublicKey | null;
|
|
140
140
|
payoutFee: number;
|
|
141
141
|
mint: PublicKey;
|
|
142
|
+
poolId?: number;
|
|
142
143
|
};
|
|
143
144
|
export type CreatePoolArgs = {
|
|
144
145
|
poolId: number;
|
|
145
146
|
question: string;
|
|
146
|
-
startTime
|
|
147
|
-
endTime
|
|
148
|
-
feeBps
|
|
149
|
-
payoutFee
|
|
150
|
-
mint
|
|
151
|
-
customer
|
|
147
|
+
startTime?: number;
|
|
148
|
+
endTime?: number;
|
|
149
|
+
feeBps?: number;
|
|
150
|
+
payoutFee?: number;
|
|
151
|
+
mint?: PublicKey;
|
|
152
|
+
customer?: PublicKey | null;
|
|
152
153
|
markets: {
|
|
153
154
|
marketId: number;
|
|
154
155
|
question: string;
|
|
@@ -2833,11 +2833,6 @@ export type TriadProtocol = {
|
|
|
2833
2833
|
writable: true;
|
|
2834
2834
|
signer: true;
|
|
2835
2835
|
},
|
|
2836
|
-
{
|
|
2837
|
-
name: 'squads';
|
|
2838
|
-
writable: true;
|
|
2839
|
-
address: '6fcSf6qfwPNR9AUUNC1UWYZDy5cQ4TzTb2aaipN2zFdq';
|
|
2840
|
-
},
|
|
2841
2836
|
{
|
|
2842
2837
|
name: 'nft';
|
|
2843
2838
|
writable: true;
|