@pear-protocol/symmio-client 0.3.17 → 0.3.19
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.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -0
- package/dist/index.mjs.map +1 -1
- package/dist/react/index.js +6 -0
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.mjs +6 -0
- package/dist/react/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -19808,7 +19808,7 @@ declare class SymmioSDKError extends Error {
|
|
|
19808
19808
|
*/
|
|
19809
19809
|
declare function validateAddress(address: string, name: string): Address;
|
|
19810
19810
|
/**
|
|
19811
|
-
* Validates that an amount is positive.
|
|
19811
|
+
* Validates that an amount is a defined, positive bigint.
|
|
19812
19812
|
*/
|
|
19813
19813
|
declare function validateAmount(amount: bigint, name: string): void;
|
|
19814
19814
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -19808,7 +19808,7 @@ declare class SymmioSDKError extends Error {
|
|
|
19808
19808
|
*/
|
|
19809
19809
|
declare function validateAddress(address: string, name: string): Address;
|
|
19810
19810
|
/**
|
|
19811
|
-
* Validates that an amount is positive.
|
|
19811
|
+
* Validates that an amount is a defined, positive bigint.
|
|
19812
19812
|
*/
|
|
19813
19813
|
declare function validateAmount(amount: bigint, name: string): void;
|
|
19814
19814
|
/**
|
package/dist/index.js
CHANGED
|
@@ -23294,6 +23294,12 @@ function validateAddress(address, name) {
|
|
|
23294
23294
|
return address;
|
|
23295
23295
|
}
|
|
23296
23296
|
function validateAmount(amount, name) {
|
|
23297
|
+
if (typeof amount !== "bigint") {
|
|
23298
|
+
throw new SymmioSDKError(
|
|
23299
|
+
`${name} must be a bigint, got ${amount === void 0 ? "undefined" : typeof amount} (${amount})`,
|
|
23300
|
+
"INVALID_AMOUNT"
|
|
23301
|
+
);
|
|
23302
|
+
}
|
|
23297
23303
|
if (amount <= 0n) {
|
|
23298
23304
|
throw new SymmioSDKError(
|
|
23299
23305
|
`${name} must be a positive amount, got ${amount}`,
|
|
@@ -23319,6 +23325,12 @@ function validateDeadline(deadline) {
|
|
|
23319
23325
|
}
|
|
23320
23326
|
}
|
|
23321
23327
|
function validateQuantity(quantity) {
|
|
23328
|
+
if (typeof quantity !== "bigint") {
|
|
23329
|
+
throw new SymmioSDKError(
|
|
23330
|
+
`Quantity must be a bigint, got ${quantity === void 0 ? "undefined" : typeof quantity} (${quantity})`,
|
|
23331
|
+
"INVALID_QUANTITY"
|
|
23332
|
+
);
|
|
23333
|
+
}
|
|
23322
23334
|
if (quantity <= 0n) {
|
|
23323
23335
|
throw new SymmioSDKError(
|
|
23324
23336
|
`Quantity must be positive, got ${quantity}`,
|