liquid-sdk 1.5.3 → 1.5.4

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/AGENT_README.md CHANGED
@@ -428,10 +428,31 @@ const maxRounds = await sdk.getAuctionMaxRounds();
428
428
  ```typescript
429
429
  const gasPrice = await sdk.getAuctionGasPriceForBid(
430
430
  auction.gasPeg,
431
- parseEther("1"), // desired bid
431
+ parseEther("0.001"), // desired bid
432
432
  );
433
433
  ```
434
434
 
435
+ #### `sdk.bidInAuction(params, gasPrice)` — Bid in auction and swap tokens
436
+
437
+ Requires wallet. Auto-wraps ETH → WETH and approves SniperUtilV2 if needed. Sets gas manually (800K) and both `maxFeePerGas`/`maxPriorityFeePerGas` to the auction gas price.
438
+
439
+ ```typescript
440
+ const rewards = await sdk.getTokenRewards(tokenAddress);
441
+ const zeroForOne = rewards.poolKey.currency0.toLowerCase() === EXTERNAL.WETH.toLowerCase();
442
+
443
+ const result = await sdk.bidInAuction({
444
+ poolKey: rewards.poolKey,
445
+ zeroForOne, // depends on token sort order vs WETH
446
+ amountIn: parseEther("0.001"), // WETH to swap (auto-wrapped from ETH)
447
+ amountOutMinimum: 0n, // set slippage in production
448
+ round: auction.round, // must match current on-chain round
449
+ bidAmount: parseEther("0.0005"), // ETH bid (sent as msg.value)
450
+ }, gasPrice);
451
+ // result.txHash — transaction hash
452
+ ```
453
+
454
+ **Important:** The bid is valid only at `nextAuctionBlock`. Submit when `currentBlock === nextAuctionBlock - 1`. The `amountIn` is pulled from your WETH balance (separate from the bid's `msg.value`). Auction runs 5 rounds, every 2 blocks, starting 2 blocks after deployment.
455
+
435
456
  ---
436
457
 
437
458
  ### MEV Protection
package/dist/index.js CHANGED
@@ -1740,7 +1740,7 @@ var LiquidSDK = class {
1740
1740
  value: params.bidAmount,
1741
1741
  chain: import_chains2.base,
1742
1742
  account,
1743
- gas: 500000n,
1743
+ gas: 800000n,
1744
1744
  maxFeePerGas,
1745
1745
  maxPriorityFeePerGas: maxFeePerGas
1746
1746
  });