@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 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, CreatePoolArgs, BookOrder, MarketAskOrderArgs, RpcOptions, CollectMarketFeeArgs } from './types';
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
- createOrEditPool({ poolId, question, markets, mint, customer, startTime, endTime, feeBps, payoutFee, isFast }: CreatePoolArgs, options?: RpcOptions): Promise<string>;
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
- createOrEditPool({ poolId, question, markets, mint, customer, startTime, endTime, feeBps, payoutFee, isFast }, options) {
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');
@@ -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 CreatePoolArgs = {
170
+ export type CreateOrUpdatePoolArgs = {
173
171
  poolId: number;
174
- question: string;
175
- startTime?: number;
176
- endTime?: number;
177
- feeBps?: number;
178
- payoutFee?: number;
179
- mint?: PublicKey;
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
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@triadxyz/triad-protocol",
3
- "version": "2.4.3-beta",
3
+ "version": "2.4.5-beta",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",