rain-sdk-v2 2.0.5 → 2.0.6

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/README.md CHANGED
@@ -187,7 +187,7 @@ const txsRain = await rain.buildCreateMarketTx({
187
187
  | `inputAmountWei` | `bigint` | Initial liquidity in base token wei |
188
188
  | `disputeTimer` | `number` | Oracle end time duration in seconds (e.g. 259200 = 3 days). Auto-set from environment config |
189
189
  | `barValues` | `number[]` | Probability distribution (0-100 scale) |
190
- | `initialYesPrices` | `bigint[]` | *(Optional)* Initial Yes prices per option in 1e18 scale (e.g. `500000000000000000n` = 50%). Defaults to 50% for AMM. Forced to `0n` for OrderBook |
190
+ | `initialYesPrices` | `bigint[]` | *(Optional)* Initial Yes prices per option in 1e18 scale (e.g. `500000000000000000n` = 50%). Defaults to 50% for both AMM and OrderBook |
191
191
  | `baseToken` | `0x${string}` | Base token address (USDT or RAIN) |
192
192
  | `tradingModel` | `TradingModel` | `AMM (0)` or `OrderBook (1)` |
193
193
  | `marketImage` | `string` | Market image URL (required) |
@@ -37,13 +37,10 @@ export async function buildCreateMarketRawTx(params) {
37
37
  ipfsUri: ipfsUrl,
38
38
  initialLiquidity: inputAmountWei,
39
39
  liquidityPercentages,
40
- initialYesPrices: (tradingModel ?? 0) === 1
41
- ? liquidityPercentages.map(() => 0n)
42
- : (params.initialYesPrices ?? liquidityPercentages.map(() => 500000000000000000n)),
40
+ initialYesPrices: params.initialYesPrices ?? liquidityPercentages.map(() => 500000000000000000n),
43
41
  baseToken,
44
42
  tradingModel: tradingModel ?? 0,
45
43
  };
46
- console.log('createMarketParams: ', createMarketParams);
47
44
  createMarketTransactions.push({
48
45
  to: factoryContractAddress,
49
46
  data: encodeFunctionData({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rain-sdk-v2",
3
- "version": "2.0.5",
3
+ "version": "2.0.6",
4
4
  "type": "module",
5
5
  "description": "Rain SDK V2 — TypeScript SDK for Rain prediction markets on Arbitrum. Market creation, trading, liquidity, order book, split/merge, dispute, and smart account support.",
6
6
  "main": "dist/index.js",