@panoptic-eng/sdk 1.0.68 → 1.0.70

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.
Files changed (34) hide show
  1. package/dist/cow/index.js +47 -2
  2. package/dist/cow/index.js.map +1 -1
  3. package/dist/{cow-CGgPXhY6.js → cow-sGuN0eas.js} +1 -1
  4. package/dist/{greeks-CGtgLUyh.js → greeks-DNPP24KL.js} +115 -9
  5. package/dist/index.d.ts +67 -25
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +161 -62
  8. package/dist/index.js.map +1 -1
  9. package/dist/{irm-BDxwCFDm.js → irm-6RzXXa1_.js} +927 -3
  10. package/dist/panoptic/v2/greeks/index.d.ts +7 -4
  11. package/dist/panoptic/v2/greeks/index.d.ts.map +1 -1
  12. package/dist/panoptic/v2/greeks/index.js +74 -7
  13. package/dist/panoptic/v2/greeks/index.js.map +1 -1
  14. package/dist/panoptic/v2/index.d.ts +244 -6
  15. package/dist/panoptic/v2/index.d.ts.map +1 -1
  16. package/dist/panoptic/v2/index.js +2554 -464
  17. package/dist/panoptic/v2/index.js.map +1 -1
  18. package/dist/panoptic/v2/react-public.d.ts +258 -9
  19. package/dist/panoptic/v2/react-public.d.ts.map +1 -1
  20. package/dist/panoptic/v2/react-public.js +4655 -2909
  21. package/dist/panoptic/v2/react-public.js.map +1 -1
  22. package/dist/{providers-DubVMHWU.js → providers-CbcNt27n.js} +2 -1
  23. package/dist/{rates-BHS-Qiu7.js → rates-DDK4ZimJ.js} +40 -4
  24. package/dist/{router-BW6TqwOO.js → router-njWsLvZc.js} +969 -39
  25. package/dist/rpc/index.d.ts +12 -1
  26. package/dist/rpc/index.d.ts.map +1 -1
  27. package/dist/rpc/index.js +65 -5
  28. package/dist/rpc/index.js.map +1 -1
  29. package/dist/uniswap/index.js +53 -13
  30. package/dist/uniswap/index.js.map +1 -1
  31. package/dist/{v2-Dgh6JxG_.js → v2-BrG4T_Gh.js} +681 -32
  32. package/dist/{writes-CG612Vuk.js → writes-CI6Haer-.js} +34 -3
  33. package/package.json +1 -1
  34. package/dist/router-IDtCENST.js +0 -942
package/dist/cow/index.js CHANGED
@@ -3168,6 +3168,9 @@ var NotMarginCalledError = class extends PanopticError {
3168
3168
  */
3169
3169
  var NotEnoughTokensError = class extends PanopticError {
3170
3170
  name = "NotEnoughTokensError";
3171
+ get deficit() {
3172
+ return this.assetsRequested > this.assetBalance ? this.assetsRequested - this.assetBalance : 0n;
3173
+ }
3171
3174
  constructor(tokenAddress, assetsRequested, assetBalance, cause) {
3172
3175
  super(`Not enough tokens: requested=${assetsRequested}, balance=${assetBalance}, token=${tokenAddress}`, cause);
3173
3176
  this.tokenAddress = tokenAddress;
@@ -3780,6 +3783,39 @@ const panopticErrorsAbi = [
3780
3783
  }
3781
3784
  ]
3782
3785
  },
3786
+ {
3787
+ type: "error",
3788
+ name: "NotEnoughTokens",
3789
+ inputs: [
3790
+ {
3791
+ name: "tokenAddress",
3792
+ type: "address"
3793
+ },
3794
+ {
3795
+ name: "account",
3796
+ type: "address"
3797
+ },
3798
+ {
3799
+ name: "assetsRequested",
3800
+ type: "uint256"
3801
+ },
3802
+ {
3803
+ name: "assetBalance",
3804
+ type: "uint256"
3805
+ }
3806
+ ]
3807
+ },
3808
+ {
3809
+ type: "error",
3810
+ name: "ExecuteError",
3811
+ inputs: [{
3812
+ name: "callIndex",
3813
+ type: "uint256"
3814
+ }, {
3815
+ name: "revertData",
3816
+ type: "bytes"
3817
+ }]
3818
+ },
3783
3819
  {
3784
3820
  type: "error",
3785
3821
  name: "NotGuardian",
@@ -3921,7 +3957,7 @@ const errorConstructors = {
3921
3957
  AccountInsolvent: (args, cause) => new AccountInsolventError(args[0], args[1], cause),
3922
3958
  NotMarginCalled: (_args, cause) => new NotMarginCalledError(cause),
3923
3959
  CreateFail: (_args, cause) => new CreateFailError(cause),
3924
- NotEnoughTokens: (args, cause) => new NotEnoughTokensError(args[0], args[1], args[2], cause),
3960
+ NotEnoughTokens: (args, cause) => new NotEnoughTokensError(args[0], args[args.length === 4 ? 2 : 1], args[args.length === 4 ? 3 : 2], cause),
3925
3961
  NotEnoughLiquidityInChunk: (_args, cause) => new NotEnoughLiquidityInChunkError(cause),
3926
3962
  InsufficientCreditLiquidity: (_args, cause) => new InsufficientCreditLiquidityError(cause),
3927
3963
  DepositTooLarge: (_args, cause) => new DepositTooLargeError(cause),
@@ -4466,7 +4502,7 @@ const DISPATCH_FROM_SELECTOR = toFunctionSelector(panopticPoolV2Abi.find((e) =>
4466
4502
 
4467
4503
  //#endregion
4468
4504
  //#region src/panoptic/v2/formatters/tick.ts
4469
- const Q192$3 = 1n << 192n;
4505
+ const Q192$4 = 1n << 192n;
4470
4506
  function tickToSqrtPriceX96(tick) {
4471
4507
  if (tick < MIN_TICK || tick > MAX_TICK) throw new RangeError("Tick out of bounds");
4472
4508
  const absTick = tick < 0n ? -tick : tick;
@@ -4547,6 +4583,15 @@ const IMPLEMENTATIONS = {
4547
4583
  }
4548
4584
  };
4549
4585
 
4586
+ //#endregion
4587
+ //#region src/uniswap/lpGreeks.ts
4588
+ const Q96$3 = 1n << 96n;
4589
+ const Q192$3 = 1n << 192n;
4590
+
4591
+ //#endregion
4592
+ //#region src/panoptic/v2/greeks/legLiquidity.ts
4593
+ const Q96$2 = 1n << 96n;
4594
+
4550
4595
  //#endregion
4551
4596
  //#region src/panoptic/v2/greeks/index.ts
4552
4597
  /** Fixed-point scale constants for sqrtPriceX96 arithmetic */