@metamask-previews/perps-controller 22.1.2-preview-2c49dc768 → 22.1.2-preview-4a5ac306d

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 (68) hide show
  1. package/CHANGELOG.md +16 -11
  2. package/dist/PerpsController-method-action-types.d.ts +5 -7
  3. package/dist/PerpsController-method-action-types.d.ts.map +1 -1
  4. package/dist/PerpsController-method-action-types.js.map +1 -1
  5. package/dist/PerpsController.d.ts +5 -7
  6. package/dist/PerpsController.d.ts.map +1 -1
  7. package/dist/PerpsController.js +5 -7
  8. package/dist/PerpsController.js.map +1 -1
  9. package/dist/constants/perpsConfig.d.ts +22 -0
  10. package/dist/constants/perpsConfig.d.ts.map +1 -1
  11. package/dist/constants/perpsConfig.js +18 -0
  12. package/dist/constants/perpsConfig.js.map +1 -1
  13. package/dist/errors.d.ts +2 -13
  14. package/dist/errors.d.ts.map +1 -1
  15. package/dist/errors.js +2 -2
  16. package/dist/errors.js.map +1 -1
  17. package/dist/index.d.ts +6 -4
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +3 -2
  20. package/dist/index.js.map +1 -1
  21. package/dist/perpsErrorCodes.d.ts +0 -2
  22. package/dist/perpsErrorCodes.d.ts.map +1 -1
  23. package/dist/perpsErrorCodes.js +0 -3
  24. package/dist/perpsErrorCodes.js.map +1 -1
  25. package/dist/providers/AggregatedPerpsProvider.d.ts.map +1 -1
  26. package/dist/providers/AggregatedPerpsProvider.js +5 -6
  27. package/dist/providers/AggregatedPerpsProvider.js.map +1 -1
  28. package/dist/providers/HyperLiquidProvider.d.ts.map +1 -1
  29. package/dist/providers/HyperLiquidProvider.js +133 -107
  30. package/dist/providers/HyperLiquidProvider.js.map +1 -1
  31. package/dist/services/TradingService.d.ts.map +1 -1
  32. package/dist/services/TradingService.js +4 -7
  33. package/dist/services/TradingService.js.map +1 -1
  34. package/dist/types/index.d.ts +1 -36
  35. package/dist/types/index.d.ts.map +1 -1
  36. package/dist/types/index.js.map +1 -1
  37. package/dist/utils/accountUtils.d.ts +61 -0
  38. package/dist/utils/accountUtils.d.ts.map +1 -1
  39. package/dist/utils/accountUtils.js +50 -0
  40. package/dist/utils/accountUtils.js.map +1 -1
  41. package/dist/utils/errorContext.d.ts +0 -33
  42. package/dist/utils/errorContext.d.ts.map +1 -1
  43. package/dist/utils/errorContext.js +0 -41
  44. package/dist/utils/errorContext.js.map +1 -1
  45. package/dist/utils/errorUtils.d.ts +0 -18
  46. package/dist/utils/errorUtils.d.ts.map +1 -1
  47. package/dist/utils/errorUtils.js +1 -127
  48. package/dist/utils/errorUtils.js.map +1 -1
  49. package/dist/utils/hyperLiquidValidation.d.ts +2 -9
  50. package/dist/utils/hyperLiquidValidation.d.ts.map +1 -1
  51. package/dist/utils/hyperLiquidValidation.js +17 -18
  52. package/dist/utils/hyperLiquidValidation.js.map +1 -1
  53. package/dist/utils/index.d.ts +1 -0
  54. package/dist/utils/index.d.ts.map +1 -1
  55. package/dist/utils/index.js +1 -0
  56. package/dist/utils/index.js.map +1 -1
  57. package/dist/utils/significantFigures.d.ts.map +1 -1
  58. package/dist/utils/significantFigures.js +4 -6
  59. package/dist/utils/significantFigures.js.map +1 -1
  60. package/dist/utils/stringParseUtils.d.ts +8 -0
  61. package/dist/utils/stringParseUtils.d.ts.map +1 -1
  62. package/dist/utils/stringParseUtils.js +10 -0
  63. package/dist/utils/stringParseUtils.js.map +1 -1
  64. package/dist/utils/tpslCalculations.d.ts +187 -0
  65. package/dist/utils/tpslCalculations.d.ts.map +1 -0
  66. package/dist/utils/tpslCalculations.js +405 -0
  67. package/dist/utils/tpslCalculations.js.map +1 -0
  68. package/package.json +2 -2
@@ -5129,13 +5129,11 @@ export class PerpsController extends BaseController {
5129
5129
  * - `NO_ACCOUNT_SELECTED` when no account is selected;
5130
5130
  * - `PROVIDER_LIFECYCLE_STALE` when the provider disconnected or the account
5131
5131
  * changed during setup;
5132
- * - provider-tagged `UNKNOWN_ERROR` when HyperLiquid refused the builder fee
5133
- * approval for a reason signing again cannot fix (for example the builder
5134
- * wallet cannot be approved). The venue sentence stays on the error cause
5135
- * and in the debug log; it is not logged to Sentry, and the approval is not
5136
- * asked for again until the provider disconnects;
5137
- * - otherwise a provider-tagged code for the error that stopped setup,
5138
- * which is logged. Text that is not a known code becomes `UNKNOWN_ERROR`.
5132
+ * - the venue's message when HyperLiquid refused the builder fee approval
5133
+ * for a reason signing again cannot fix (for example "Builder has
5134
+ * insufficient balance to be approved"); it is not logged, and the
5135
+ * approval is not asked for again until the provider disconnects;
5136
+ * - otherwise the message of the error that stopped setup, which is logged.
5139
5137
  * @throws Like the other provider-backed actions, `CLIENT_NOT_INITIALIZED`
5140
5138
  * before `init`, and `CLIENT_REINITIALIZING` or `PROVIDER_NOT_AVAILABLE`
5141
5139
  * when no active provider is available.