@triadxyz/triad-protocol 2.4.3-beta → 2.4.5-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/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/types/index.d.ts +7 -11
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { Connection, PublicKey, TransactionInstruction } from '@solana/web3.js';
|
|
|
2
2
|
import { AnchorProvider, Program, Wallet } from '@coral-xyz/anchor';
|
|
3
3
|
import BN from 'bn.js';
|
|
4
4
|
import { TriadProtocol } from './types/triad_protocol';
|
|
5
|
-
import { CreateMarketArgs, OpenOrderArgs, UserTrade, CreateCustomerArgs, MarketBidOrderArgs, CancelBidOrderArgs, CancelAskOrderArgs, PlaceBidOrderArgs, PlaceAskOrderArgs,
|
|
5
|
+
import { CreateMarketArgs, OpenOrderArgs, UserTrade, CreateCustomerArgs, MarketBidOrderArgs, CancelBidOrderArgs, CancelAskOrderArgs, PlaceBidOrderArgs, PlaceAskOrderArgs, CreateOrUpdatePoolArgs, BookOrder, MarketAskOrderArgs, RpcOptions, CollectMarketFeeArgs } from './types';
|
|
6
6
|
import Stake from './stake';
|
|
7
7
|
import Poseidon from './poseidon';
|
|
8
8
|
export default class TriadProtocolClient {
|
|
@@ -188,7 +188,7 @@ export default class TriadProtocolClient {
|
|
|
188
188
|
*
|
|
189
189
|
* @param options - RPC options
|
|
190
190
|
*/
|
|
191
|
-
|
|
191
|
+
createOrUpdatePool({ poolId, question, markets, mint, customer, startTime, endTime, feeBps, payoutFee, isFast }: CreateOrUpdatePoolArgs, options?: RpcOptions): Promise<string>;
|
|
192
192
|
/**
|
|
193
193
|
* Open Order
|
|
194
194
|
* @param args.marketId - The ID of the Market
|
package/dist/index.js
CHANGED
|
@@ -209,7 +209,7 @@ class TriadProtocolClient {
|
|
|
209
209
|
*
|
|
210
210
|
* @param options - RPC options
|
|
211
211
|
*/
|
|
212
|
-
|
|
212
|
+
createOrUpdatePool({ poolId, question, markets, mint, customer, startTime, endTime, feeBps, payoutFee, isFast }, options) {
|
|
213
213
|
return __awaiter(this, void 0, void 0, function* () {
|
|
214
214
|
if (question.length > 80) {
|
|
215
215
|
throw new Error('Pool question must be less than 80 characters');
|
package/dist/types/index.d.ts
CHANGED
|
@@ -166,23 +166,19 @@ export type CreateMarketArgs = {
|
|
|
166
166
|
mint: PublicKey;
|
|
167
167
|
poolId?: number;
|
|
168
168
|
currentMarketId?: number;
|
|
169
|
-
upPrice?: number;
|
|
170
|
-
downPrice?: number;
|
|
171
169
|
};
|
|
172
|
-
export type
|
|
170
|
+
export type CreateOrUpdatePoolArgs = {
|
|
173
171
|
poolId: number;
|
|
174
|
-
question
|
|
175
|
-
startTime
|
|
176
|
-
endTime
|
|
177
|
-
feeBps
|
|
178
|
-
payoutFee
|
|
179
|
-
mint
|
|
172
|
+
question?: string;
|
|
173
|
+
startTime: number;
|
|
174
|
+
endTime: number;
|
|
175
|
+
feeBps: number;
|
|
176
|
+
payoutFee: number;
|
|
177
|
+
mint: PublicKey;
|
|
180
178
|
customer?: PublicKey | null;
|
|
181
179
|
markets: {
|
|
182
180
|
marketId: number;
|
|
183
181
|
question: string;
|
|
184
|
-
upPrice?: number;
|
|
185
|
-
downPrice?: number;
|
|
186
182
|
}[];
|
|
187
183
|
isFast?: boolean;
|
|
188
184
|
};
|