@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.
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +2 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/models/amount/amount.d.ts +21 -0
- package/package.json +1 -1
|
@@ -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