@temboplus/frontend-core 0.2.12 → 0.2.13

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.
@@ -726,6 +726,27 @@ declare class Amount {
726
726
  * @returns True if the amount data is available and valid
727
727
  */
728
728
  validate(): boolean;
729
+ /**
730
+ * Gets payout constraints (min/max amounts) for a specific currency
731
+ *
732
+ * Returns Amount objects that can be directly compared and formatted,
733
+ * providing type safety and automatic currency context.
734
+ *
735
+ * @param currency - The currency code to get constraints for
736
+ * @returns Object with min and max Amount objects, or undefined if currency not supported
737
+ *
738
+ * @example
739
+ * ```typescript
740
+ * const constraints = Amount.getTransactionLimits('TZS');
741
+ * if (constraints && myAmount.lessThan(constraints.min)) {
742
+ * throw new Error(`Minimum amount is ${constraints.min.label}`);
743
+ * }
744
+ * ```
745
+ */
746
+ static getTransactionLimits(currency: CurrencyCode): {
747
+ min: Amount;
748
+ max: Amount;
749
+ } | undefined;
729
750
  }
730
751
  /**
731
752
  * Export the Amount class and regex pattern
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@temboplus/frontend-core",
3
- "version": "0.2.12",
3
+ "version": "0.2.13",
4
4
  "description": "A JavaScript/TypeScript package providing common utilities and logic shared across front-end TemboPlus projects.",
5
5
  "author": "Okello Gerald",
6
6
  "license": "MIT",