@sudobility/types 1.8.21
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/CLAUDE.md +285 -0
- package/README.md +310 -0
- package/dist/index.cjs +62 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +62 -0
- package/dist/index.js.map +1 -0
- package/dist/types/blockchain/common.cjs +102 -0
- package/dist/types/blockchain/common.d.ts +262 -0
- package/dist/types/blockchain/common.d.ts.map +1 -0
- package/dist/types/blockchain/common.js +102 -0
- package/dist/types/blockchain/common.js.map +1 -0
- package/dist/types/blockchain/index.cjs +18 -0
- package/dist/types/blockchain/index.d.ts +4 -0
- package/dist/types/blockchain/index.d.ts.map +1 -0
- package/dist/types/blockchain/index.js +18 -0
- package/dist/types/blockchain/index.js.map +1 -0
- package/dist/types/blockchain/validation.cjs +88 -0
- package/dist/types/blockchain/validation.d.ts +9 -0
- package/dist/types/blockchain/validation.d.ts.map +1 -0
- package/dist/types/blockchain/validation.js +88 -0
- package/dist/types/blockchain/validation.js.map +1 -0
- package/dist/types/business/enums.cjs +314 -0
- package/dist/types/business/enums.d.ts +227 -0
- package/dist/types/business/enums.d.ts.map +1 -0
- package/dist/types/business/enums.js +314 -0
- package/dist/types/business/enums.js.map +1 -0
- package/dist/types/business/index.cjs +33 -0
- package/dist/types/business/index.d.ts +5 -0
- package/dist/types/business/index.d.ts.map +1 -0
- package/dist/types/business/index.js +33 -0
- package/dist/types/business/index.js.map +1 -0
- package/dist/types/business/wallet-status.cjs +38 -0
- package/dist/types/business/wallet-status.d.ts +32 -0
- package/dist/types/business/wallet-status.d.ts.map +1 -0
- package/dist/types/business/wallet-status.js +38 -0
- package/dist/types/business/wallet-status.js.map +1 -0
- package/dist/types/common.cjs +6 -0
- package/dist/types/common.d.ts +142 -0
- package/dist/types/common.d.ts.map +1 -0
- package/dist/types/common.js +6 -0
- package/dist/types/common.js.map +1 -0
- package/dist/types/config/app-config.cjs +6 -0
- package/dist/types/config/app-config.d.ts +67 -0
- package/dist/types/config/app-config.d.ts.map +1 -0
- package/dist/types/config/app-config.js +6 -0
- package/dist/types/config/app-config.js.map +1 -0
- package/dist/types/config/environment.cjs +24 -0
- package/dist/types/config/environment.d.ts +68 -0
- package/dist/types/config/environment.d.ts.map +1 -0
- package/dist/types/config/environment.js +24 -0
- package/dist/types/config/environment.js.map +1 -0
- package/dist/types/config/index.cjs +6 -0
- package/dist/types/config/index.d.ts +4 -0
- package/dist/types/config/index.d.ts.map +1 -0
- package/dist/types/config/index.js +6 -0
- package/dist/types/config/index.js.map +1 -0
- package/dist/types/index.cjs +35 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +35 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/indexer/index.cjs +19 -0
- package/dist/types/indexer/index.d.ts +3 -0
- package/dist/types/indexer/index.d.ts.map +1 -0
- package/dist/types/indexer/index.js +19 -0
- package/dist/types/indexer/index.js.map +1 -0
- package/dist/types/indexer/indexer-guards.cjs +145 -0
- package/dist/types/indexer/indexer-guards.d.ts +26 -0
- package/dist/types/indexer/indexer-guards.d.ts.map +1 -0
- package/dist/types/indexer/indexer-guards.js +145 -0
- package/dist/types/indexer/indexer-guards.js.map +1 -0
- package/dist/types/indexer/indexer-responses.cjs +8 -0
- package/dist/types/indexer/indexer-responses.d.ts +136 -0
- package/dist/types/indexer/indexer-responses.d.ts.map +1 -0
- package/dist/types/indexer/indexer-responses.js +8 -0
- package/dist/types/indexer/indexer-responses.js.map +1 -0
- package/dist/types/infrastructure/analytics.cjs +212 -0
- package/dist/types/infrastructure/analytics.d.ts +449 -0
- package/dist/types/infrastructure/analytics.d.ts.map +1 -0
- package/dist/types/infrastructure/analytics.js +212 -0
- package/dist/types/infrastructure/analytics.js.map +1 -0
- package/dist/types/infrastructure/api.cjs +17 -0
- package/dist/types/infrastructure/api.d.ts +152 -0
- package/dist/types/infrastructure/api.d.ts.map +1 -0
- package/dist/types/infrastructure/api.js +17 -0
- package/dist/types/infrastructure/api.js.map +1 -0
- package/dist/types/infrastructure/index.cjs +14 -0
- package/dist/types/infrastructure/index.d.ts +9 -0
- package/dist/types/infrastructure/index.d.ts.map +1 -0
- package/dist/types/infrastructure/index.js +14 -0
- package/dist/types/infrastructure/index.js.map +1 -0
- package/dist/types/infrastructure/navigation.cjs +3 -0
- package/dist/types/infrastructure/navigation.d.ts +56 -0
- package/dist/types/infrastructure/navigation.d.ts.map +1 -0
- package/dist/types/infrastructure/navigation.js +3 -0
- package/dist/types/infrastructure/navigation.js.map +1 -0
- package/dist/types/infrastructure/network.cjs +18 -0
- package/dist/types/infrastructure/network.d.ts +48 -0
- package/dist/types/infrastructure/network.d.ts.map +1 -0
- package/dist/types/infrastructure/network.js +18 -0
- package/dist/types/infrastructure/network.js.map +1 -0
- package/dist/types/infrastructure/wallet.cjs +37 -0
- package/dist/types/infrastructure/wallet.d.ts +33 -0
- package/dist/types/infrastructure/wallet.d.ts.map +1 -0
- package/dist/types/infrastructure/wallet.js +37 -0
- package/dist/types/infrastructure/wallet.js.map +1 -0
- package/dist/types/kyc/index.cjs +19 -0
- package/dist/types/kyc/index.d.ts +2 -0
- package/dist/types/kyc/index.d.ts.map +1 -0
- package/dist/types/kyc/index.js +19 -0
- package/dist/types/kyc/index.js.map +1 -0
- package/dist/types/kyc/kyc-types.cjs +12 -0
- package/dist/types/kyc/kyc-types.d.ts +260 -0
- package/dist/types/kyc/kyc-types.d.ts.map +1 -0
- package/dist/types/kyc/kyc-types.js +12 -0
- package/dist/types/kyc/kyc-types.js.map +1 -0
- package/dist/types/mailer/index.cjs +19 -0
- package/dist/types/mailer/index.d.ts +2 -0
- package/dist/types/mailer/index.d.ts.map +1 -0
- package/dist/types/mailer/index.js +19 -0
- package/dist/types/mailer/index.js.map +1 -0
- package/dist/types/mailer/mail-types.cjs +38 -0
- package/dist/types/mailer/mail-types.d.ts +296 -0
- package/dist/types/mailer/mail-types.d.ts.map +1 -0
- package/dist/types/mailer/mail-types.js +38 -0
- package/dist/types/mailer/mail-types.js.map +1 -0
- package/dist/types/wildduck/index.cjs +19 -0
- package/dist/types/wildduck/index.d.ts +2 -0
- package/dist/types/wildduck/index.d.ts.map +1 -0
- package/dist/types/wildduck/index.js +19 -0
- package/dist/types/wildduck/index.js.map +1 -0
- package/dist/types/wildduck/wildduck-types.cjs +48 -0
- package/dist/types/wildduck/wildduck-types.d.ts +1239 -0
- package/dist/types/wildduck/wildduck-types.d.ts.map +1 -0
- package/dist/types/wildduck/wildduck-types.js +48 -0
- package/dist/types/wildduck/wildduck-types.js.map +1 -0
- package/dist/utils/async-helpers.cjs +130 -0
- package/dist/utils/async-helpers.d.ts +35 -0
- package/dist/utils/async-helpers.d.ts.map +1 -0
- package/dist/utils/async-helpers.js +130 -0
- package/dist/utils/async-helpers.js.map +1 -0
- package/dist/utils/auth/auth.cjs +96 -0
- package/dist/utils/auth/auth.d.ts +40 -0
- package/dist/utils/auth/auth.d.ts.map +1 -0
- package/dist/utils/auth/auth.js +96 -0
- package/dist/utils/auth/auth.js.map +1 -0
- package/dist/utils/auth/index.cjs +14 -0
- package/dist/utils/auth/index.d.ts +2 -0
- package/dist/utils/auth/index.d.ts.map +1 -0
- package/dist/utils/auth/index.js +14 -0
- package/dist/utils/auth/index.js.map +1 -0
- package/dist/utils/blockchain/address.cjs +231 -0
- package/dist/utils/blockchain/address.d.ts +65 -0
- package/dist/utils/blockchain/address.d.ts.map +1 -0
- package/dist/utils/blockchain/address.js +231 -0
- package/dist/utils/blockchain/address.js.map +1 -0
- package/dist/utils/blockchain/event-helpers.cjs +143 -0
- package/dist/utils/blockchain/event-helpers.d.ts +87 -0
- package/dist/utils/blockchain/event-helpers.d.ts.map +1 -0
- package/dist/utils/blockchain/event-helpers.js +143 -0
- package/dist/utils/blockchain/event-helpers.js.map +1 -0
- package/dist/utils/blockchain/index.cjs +30 -0
- package/dist/utils/blockchain/index.d.ts +8 -0
- package/dist/utils/blockchain/index.d.ts.map +1 -0
- package/dist/utils/blockchain/index.js +30 -0
- package/dist/utils/blockchain/index.js.map +1 -0
- package/dist/utils/blockchain/rpc-helpers.cjs +865 -0
- package/dist/utils/blockchain/rpc-helpers.d.ts +251 -0
- package/dist/utils/blockchain/rpc-helpers.d.ts.map +1 -0
- package/dist/utils/blockchain/rpc-helpers.js +865 -0
- package/dist/utils/blockchain/rpc-helpers.js.map +1 -0
- package/dist/utils/constants/application.cjs +158 -0
- package/dist/utils/constants/application.d.ts +119 -0
- package/dist/utils/constants/application.d.ts.map +1 -0
- package/dist/utils/constants/application.js +158 -0
- package/dist/utils/constants/application.js.map +1 -0
- package/dist/utils/constants/index.cjs +30 -0
- package/dist/utils/constants/index.d.ts +7 -0
- package/dist/utils/constants/index.d.ts.map +1 -0
- package/dist/utils/constants/index.js +30 -0
- package/dist/utils/constants/index.js.map +1 -0
- package/dist/utils/constants/status-values.cjs +14 -0
- package/dist/utils/constants/status-values.d.ts +12 -0
- package/dist/utils/constants/status-values.d.ts.map +1 -0
- package/dist/utils/constants/status-values.js +14 -0
- package/dist/utils/constants/status-values.js.map +1 -0
- package/dist/utils/formatting/currency.cjs +36 -0
- package/dist/utils/formatting/currency.d.ts +26 -0
- package/dist/utils/formatting/currency.d.ts.map +1 -0
- package/dist/utils/formatting/currency.js +36 -0
- package/dist/utils/formatting/currency.js.map +1 -0
- package/dist/utils/formatting/date.cjs +138 -0
- package/dist/utils/formatting/date.d.ts +33 -0
- package/dist/utils/formatting/date.d.ts.map +1 -0
- package/dist/utils/formatting/date.js +138 -0
- package/dist/utils/formatting/date.js.map +1 -0
- package/dist/utils/formatting/index.cjs +37 -0
- package/dist/utils/formatting/index.d.ts +4 -0
- package/dist/utils/formatting/index.d.ts.map +1 -0
- package/dist/utils/formatting/index.js +37 -0
- package/dist/utils/formatting/index.js.map +1 -0
- package/dist/utils/formatting/string.cjs +193 -0
- package/dist/utils/formatting/string.d.ts +69 -0
- package/dist/utils/formatting/string.d.ts.map +1 -0
- package/dist/utils/formatting/string.js +193 -0
- package/dist/utils/formatting/string.js.map +1 -0
- package/dist/utils/index.cjs +28 -0
- package/dist/utils/index.d.ts +12 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +28 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/logging/index.cjs +16 -0
- package/dist/utils/logging/index.d.ts +5 -0
- package/dist/utils/logging/index.d.ts.map +1 -0
- package/dist/utils/logging/index.js +16 -0
- package/dist/utils/logging/index.js.map +1 -0
- package/dist/utils/logging/logger.cjs +92 -0
- package/dist/utils/logging/logger.d.ts +70 -0
- package/dist/utils/logging/logger.d.ts.map +1 -0
- package/dist/utils/logging/logger.js +92 -0
- package/dist/utils/logging/logger.js.map +1 -0
- package/dist/utils/url/index.cjs +13 -0
- package/dist/utils/url/index.d.ts +5 -0
- package/dist/utils/url/index.d.ts.map +1 -0
- package/dist/utils/url/index.js +13 -0
- package/dist/utils/url/index.js.map +1 -0
- package/dist/utils/url/url-params.cjs +128 -0
- package/dist/utils/url/url-params.d.ts +36 -0
- package/dist/utils/url/url-params.d.ts.map +1 -0
- package/dist/utils/url/url-params.js +128 -0
- package/dist/utils/url/url-params.js.map +1 -0
- package/dist/utils/validation/index.cjs +25 -0
- package/dist/utils/validation/index.d.ts +5 -0
- package/dist/utils/validation/index.d.ts.map +1 -0
- package/dist/utils/validation/index.js +25 -0
- package/dist/utils/validation/index.js.map +1 -0
- package/dist/utils/validation/type-validation.cjs +167 -0
- package/dist/utils/validation/type-validation.d.ts +68 -0
- package/dist/utils/validation/type-validation.d.ts.map +1 -0
- package/dist/utils/validation/type-validation.js +167 -0
- package/dist/utils/validation/type-validation.js.map +1 -0
- package/dist/utils/validation/web3-username-validator.cjs +132 -0
- package/dist/utils/validation/web3-username-validator.d.ts +43 -0
- package/dist/utils/validation/web3-username-validator.d.ts.map +1 -0
- package/dist/utils/validation/web3-username-validator.js +132 -0
- package/dist/utils/validation/web3-username-validator.js.map +1 -0
- package/package.json +80 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Validation utilities for multi-chain operations
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.validateDomain = validateDomain;
|
|
7
|
+
exports.validateMessage = validateMessage;
|
|
8
|
+
exports.validateAddress = validateAddress;
|
|
9
|
+
exports.validateAmount = validateAmount;
|
|
10
|
+
const address_1 = require("../../utils/blockchain/address");
|
|
11
|
+
function validateDomain(domain) {
|
|
12
|
+
if (!domain || domain.length === 0) {
|
|
13
|
+
throw new Error('Domain cannot be empty');
|
|
14
|
+
}
|
|
15
|
+
if (domain.length > 100) {
|
|
16
|
+
throw new Error('Domain cannot exceed 100 characters');
|
|
17
|
+
}
|
|
18
|
+
// Basic domain validation - can be expanded
|
|
19
|
+
const domainRegex = /^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
|
|
20
|
+
if (!domainRegex.test(domain)) {
|
|
21
|
+
throw new Error('Invalid domain format');
|
|
22
|
+
}
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
function validateMessage(subject, body) {
|
|
26
|
+
if (!subject || subject.length === 0) {
|
|
27
|
+
throw new Error('Message subject cannot be empty');
|
|
28
|
+
}
|
|
29
|
+
if (subject.length > 200) {
|
|
30
|
+
throw new Error('Message subject cannot exceed 200 characters');
|
|
31
|
+
}
|
|
32
|
+
if (!body || body.length === 0) {
|
|
33
|
+
throw new Error('Message body cannot be empty');
|
|
34
|
+
}
|
|
35
|
+
if (body.length > 10000) {
|
|
36
|
+
throw new Error('Message body cannot exceed 10000 characters');
|
|
37
|
+
}
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
function validateAddress(address, chainType) {
|
|
41
|
+
if (!address || address.length === 0) {
|
|
42
|
+
throw new Error('Address cannot be empty');
|
|
43
|
+
}
|
|
44
|
+
if (!(0, address_1.isValidWalletAddress)(address, chainType)) {
|
|
45
|
+
throw new Error(`Invalid ${chainType} address format`);
|
|
46
|
+
}
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
function validateAmount(amount) {
|
|
50
|
+
// Check for null, undefined, or empty string
|
|
51
|
+
if (amount === null ||
|
|
52
|
+
amount === undefined ||
|
|
53
|
+
amount === '' ||
|
|
54
|
+
(typeof amount === 'string' && amount.trim() === '')) {
|
|
55
|
+
throw new Error('Invalid amount format');
|
|
56
|
+
}
|
|
57
|
+
let amountBigInt;
|
|
58
|
+
try {
|
|
59
|
+
if (typeof amount === 'string') {
|
|
60
|
+
// Check for non-numeric strings
|
|
61
|
+
if (!/^-?\d+$/.test(amount.trim())) {
|
|
62
|
+
throw new Error('Invalid amount format');
|
|
63
|
+
}
|
|
64
|
+
amountBigInt = BigInt(amount);
|
|
65
|
+
}
|
|
66
|
+
else if (typeof amount === 'number') {
|
|
67
|
+
// Check for NaN or Infinity
|
|
68
|
+
if (!Number.isFinite(amount)) {
|
|
69
|
+
throw new Error('Invalid amount format');
|
|
70
|
+
}
|
|
71
|
+
amountBigInt = BigInt(Math.floor(amount));
|
|
72
|
+
}
|
|
73
|
+
else if (typeof amount === 'bigint') {
|
|
74
|
+
amountBigInt = amount;
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
throw new Error('Invalid amount format');
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
catch {
|
|
81
|
+
throw new Error('Invalid amount format');
|
|
82
|
+
}
|
|
83
|
+
if (amountBigInt < 0n) {
|
|
84
|
+
throw new Error('Amount cannot be negative');
|
|
85
|
+
}
|
|
86
|
+
return amountBigInt;
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=validation.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validation utilities for multi-chain operations
|
|
3
|
+
*/
|
|
4
|
+
import { ChainType } from '../business/enums';
|
|
5
|
+
export declare function validateDomain(domain: string): boolean;
|
|
6
|
+
export declare function validateMessage(subject: string, body: string): boolean;
|
|
7
|
+
export declare function validateAddress(address: string, chainType: ChainType): boolean;
|
|
8
|
+
export declare function validateAmount(amount: string | number | bigint): bigint;
|
|
9
|
+
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/types/blockchain/validation.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAG9C,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CActD;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CActE;AAED,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,SAAS,GACnB,OAAO,CAUT;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAwCvE"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Validation utilities for multi-chain operations
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.validateDomain = validateDomain;
|
|
7
|
+
exports.validateMessage = validateMessage;
|
|
8
|
+
exports.validateAddress = validateAddress;
|
|
9
|
+
exports.validateAmount = validateAmount;
|
|
10
|
+
const address_1 = require("../../utils/blockchain/address");
|
|
11
|
+
function validateDomain(domain) {
|
|
12
|
+
if (!domain || domain.length === 0) {
|
|
13
|
+
throw new Error('Domain cannot be empty');
|
|
14
|
+
}
|
|
15
|
+
if (domain.length > 100) {
|
|
16
|
+
throw new Error('Domain cannot exceed 100 characters');
|
|
17
|
+
}
|
|
18
|
+
// Basic domain validation - can be expanded
|
|
19
|
+
const domainRegex = /^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
|
|
20
|
+
if (!domainRegex.test(domain)) {
|
|
21
|
+
throw new Error('Invalid domain format');
|
|
22
|
+
}
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
function validateMessage(subject, body) {
|
|
26
|
+
if (!subject || subject.length === 0) {
|
|
27
|
+
throw new Error('Message subject cannot be empty');
|
|
28
|
+
}
|
|
29
|
+
if (subject.length > 200) {
|
|
30
|
+
throw new Error('Message subject cannot exceed 200 characters');
|
|
31
|
+
}
|
|
32
|
+
if (!body || body.length === 0) {
|
|
33
|
+
throw new Error('Message body cannot be empty');
|
|
34
|
+
}
|
|
35
|
+
if (body.length > 10000) {
|
|
36
|
+
throw new Error('Message body cannot exceed 10000 characters');
|
|
37
|
+
}
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
function validateAddress(address, chainType) {
|
|
41
|
+
if (!address || address.length === 0) {
|
|
42
|
+
throw new Error('Address cannot be empty');
|
|
43
|
+
}
|
|
44
|
+
if (!(0, address_1.isValidWalletAddress)(address, chainType)) {
|
|
45
|
+
throw new Error(`Invalid ${chainType} address format`);
|
|
46
|
+
}
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
function validateAmount(amount) {
|
|
50
|
+
// Check for null, undefined, or empty string
|
|
51
|
+
if (amount === null ||
|
|
52
|
+
amount === undefined ||
|
|
53
|
+
amount === '' ||
|
|
54
|
+
(typeof amount === 'string' && amount.trim() === '')) {
|
|
55
|
+
throw new Error('Invalid amount format');
|
|
56
|
+
}
|
|
57
|
+
let amountBigInt;
|
|
58
|
+
try {
|
|
59
|
+
if (typeof amount === 'string') {
|
|
60
|
+
// Check for non-numeric strings
|
|
61
|
+
if (!/^-?\d+$/.test(amount.trim())) {
|
|
62
|
+
throw new Error('Invalid amount format');
|
|
63
|
+
}
|
|
64
|
+
amountBigInt = BigInt(amount);
|
|
65
|
+
}
|
|
66
|
+
else if (typeof amount === 'number') {
|
|
67
|
+
// Check for NaN or Infinity
|
|
68
|
+
if (!Number.isFinite(amount)) {
|
|
69
|
+
throw new Error('Invalid amount format');
|
|
70
|
+
}
|
|
71
|
+
amountBigInt = BigInt(Math.floor(amount));
|
|
72
|
+
}
|
|
73
|
+
else if (typeof amount === 'bigint') {
|
|
74
|
+
amountBigInt = amount;
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
throw new Error('Invalid amount format');
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
catch {
|
|
81
|
+
throw new Error('Invalid amount format');
|
|
82
|
+
}
|
|
83
|
+
if (amountBigInt < 0n) {
|
|
84
|
+
throw new Error('Amount cannot be negative');
|
|
85
|
+
}
|
|
86
|
+
return amountBigInt;
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=validation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../../src/types/blockchain/validation.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Platform-agnostic enums for discrete states
|
|
4
|
+
* These replace string literals throughout the application
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.Currency = exports.ErrorType = exports.FeatureFlag = exports.EmailValidationState = exports.PlatformType = exports.ConnectionState = exports.ConnectionType = exports.MailboxType = exports.EmailSortCriteria = exports.SortOrder = exports.EmailAddressType = exports.NotificationType = exports.RequestStatus = exports.SubscriptionAction = exports.EmailAction = exports.MediumView = exports.MobileView = exports.EmailComposeType = exports.EmailFolderUtils = exports.FontSize = exports.Theme = exports.Chain = exports.ChainType = exports.AuthStatus = void 0;
|
|
8
|
+
// Authentication states - aligned with @johnqh/di
|
|
9
|
+
var AuthStatus;
|
|
10
|
+
(function (AuthStatus) {
|
|
11
|
+
AuthStatus["CONNECTED"] = "connected";
|
|
12
|
+
AuthStatus["DISCONNECTED"] = "disconnected";
|
|
13
|
+
AuthStatus["VERIFIED"] = "verified";
|
|
14
|
+
})(AuthStatus || (exports.AuthStatus = AuthStatus = {}));
|
|
15
|
+
// Chain types (more specific than @johnqh/di version)
|
|
16
|
+
var ChainType;
|
|
17
|
+
(function (ChainType) {
|
|
18
|
+
ChainType["EVM"] = "evm";
|
|
19
|
+
ChainType["SOLANA"] = "solana";
|
|
20
|
+
})(ChainType || (exports.ChainType = ChainType = {}));
|
|
21
|
+
// Supported blockchain networks
|
|
22
|
+
var Chain;
|
|
23
|
+
(function (Chain) {
|
|
24
|
+
// Ethereum
|
|
25
|
+
Chain["ETH_MAINNET"] = "eth-mainnet";
|
|
26
|
+
Chain["ETH_SEPOLIA"] = "eth-sepolia";
|
|
27
|
+
Chain["ETH_GOERLI"] = "eth-goerli";
|
|
28
|
+
// Polygon
|
|
29
|
+
Chain["POLYGON_MAINNET"] = "polygon-mainnet";
|
|
30
|
+
Chain["POLYGON_MUMBAI"] = "polygon-mumbai";
|
|
31
|
+
Chain["POLYGON_AMOY"] = "polygon-amoy";
|
|
32
|
+
// Optimism
|
|
33
|
+
Chain["OPTIMISM_MAINNET"] = "optimism-mainnet";
|
|
34
|
+
Chain["OPTIMISM_SEPOLIA"] = "optimism-sepolia";
|
|
35
|
+
Chain["OPTIMISM_GOERLI"] = "optimism-goerli";
|
|
36
|
+
// Arbitrum
|
|
37
|
+
Chain["ARBITRUM_MAINNET"] = "arbitrum-mainnet";
|
|
38
|
+
Chain["ARBITRUM_SEPOLIA"] = "arbitrum-sepolia";
|
|
39
|
+
Chain["ARBITRUM_GOERLI"] = "arbitrum-goerli";
|
|
40
|
+
// Base
|
|
41
|
+
Chain["BASE_MAINNET"] = "base-mainnet";
|
|
42
|
+
Chain["BASE_SEPOLIA"] = "base-sepolia";
|
|
43
|
+
Chain["BASE_GOERLI"] = "base-goerli";
|
|
44
|
+
// Avalanche
|
|
45
|
+
Chain["AVALANCHE_MAINNET"] = "avalanche-mainnet";
|
|
46
|
+
Chain["AVALANCHE_FUJI"] = "avalanche-fuji";
|
|
47
|
+
// BNB Chain (formerly Binance Smart Chain)
|
|
48
|
+
Chain["BNB_MAINNET"] = "bnb-mainnet";
|
|
49
|
+
Chain["BNB_TESTNET"] = "bnb-testnet";
|
|
50
|
+
// Gnosis Chain (formerly xDai)
|
|
51
|
+
Chain["GNOSIS_MAINNET"] = "gnosis-mainnet";
|
|
52
|
+
Chain["GNOSIS_CHIADO"] = "gnosis-chiado";
|
|
53
|
+
// Celo
|
|
54
|
+
Chain["CELO_MAINNET"] = "celo-mainnet";
|
|
55
|
+
Chain["CELO_ALFAJORES"] = "celo-alfajores";
|
|
56
|
+
// zkSync
|
|
57
|
+
Chain["ZKSYNC_MAINNET"] = "zksync-mainnet";
|
|
58
|
+
Chain["ZKSYNC_SEPOLIA"] = "zksync-sepolia";
|
|
59
|
+
// Linea
|
|
60
|
+
Chain["LINEA_MAINNET"] = "linea-mainnet";
|
|
61
|
+
Chain["LINEA_SEPOLIA"] = "linea-sepolia";
|
|
62
|
+
// Scroll
|
|
63
|
+
Chain["SCROLL_MAINNET"] = "scroll-mainnet";
|
|
64
|
+
Chain["SCROLL_SEPOLIA"] = "scroll-sepolia";
|
|
65
|
+
// Monad
|
|
66
|
+
Chain["MONAD_MAINNET"] = "monad-mainnet";
|
|
67
|
+
Chain["MONAD_TESTNET"] = "monad-testnet";
|
|
68
|
+
// Story Protocol
|
|
69
|
+
Chain["STORY_MAINNET"] = "story-mainnet";
|
|
70
|
+
Chain["STORY_TESTNET"] = "story-testnet";
|
|
71
|
+
// Plume Network
|
|
72
|
+
Chain["PLUME_MAINNET"] = "plume-mainnet";
|
|
73
|
+
Chain["PLUME_TESTNET"] = "plume-testnet";
|
|
74
|
+
// Nexus
|
|
75
|
+
Chain["NEXUS_MAINNET"] = "nexus-mainnet";
|
|
76
|
+
Chain["NEXUS_TESTNET"] = "nexus-testnet";
|
|
77
|
+
// HyperEVM
|
|
78
|
+
Chain["HYPEREVM_MAINNET"] = "hyperevm-mainnet";
|
|
79
|
+
Chain["HYPEREVM_TESTNET"] = "hyperevm-testnet";
|
|
80
|
+
// Sonic (gaming-focused chain)
|
|
81
|
+
Chain["SONIC_MAINNET"] = "sonic-mainnet";
|
|
82
|
+
Chain["SONIC_TESTNET"] = "sonic-testnet";
|
|
83
|
+
Chain["SONIC_BLAZE"] = "sonic-blaze";
|
|
84
|
+
// Unichain (Uniswap L2)
|
|
85
|
+
Chain["UNICHAIN_MAINNET"] = "unichain-mainnet";
|
|
86
|
+
Chain["UNICHAIN_SEPOLIA"] = "unichain-sepolia";
|
|
87
|
+
// World Chain (Worldcoin L2)
|
|
88
|
+
Chain["WORLD_MAINNET"] = "world-mainnet";
|
|
89
|
+
// XDC Network
|
|
90
|
+
Chain["XDC_MAINNET"] = "xdc-mainnet";
|
|
91
|
+
// Ink
|
|
92
|
+
Chain["INK_TESTNET"] = "ink-testnet";
|
|
93
|
+
// AI-focused chains
|
|
94
|
+
// Bittensor (TAO) - Substrate-based, not EVM
|
|
95
|
+
// Fetch.ai
|
|
96
|
+
Chain["FETCH_MAINNET"] = "fetch-mainnet";
|
|
97
|
+
Chain["FETCH_TESTNET"] = "fetch-testnet";
|
|
98
|
+
// Akash Network - Cosmos-based, not EVM
|
|
99
|
+
// Gensyn - AI compute chain
|
|
100
|
+
Chain["GENSYN_MAINNET"] = "gensyn-mainnet";
|
|
101
|
+
Chain["GENSYN_TESTNET"] = "gensyn-testnet";
|
|
102
|
+
// Ritual - AI inference chain
|
|
103
|
+
Chain["RITUAL_MAINNET"] = "ritual-mainnet";
|
|
104
|
+
Chain["RITUAL_TESTNET"] = "ritual-testnet";
|
|
105
|
+
// Solana
|
|
106
|
+
Chain["SOLANA_MAINNET"] = "solana-mainnet";
|
|
107
|
+
Chain["SOLANA_DEVNET"] = "solana-devnet";
|
|
108
|
+
Chain["SOLANA_TESTNET"] = "solana-testnet";
|
|
109
|
+
// Local development
|
|
110
|
+
Chain["EVM_LOCAL"] = "evm-local";
|
|
111
|
+
Chain["SOLANA_LOCAL"] = "solana-local";
|
|
112
|
+
})(Chain || (exports.Chain = Chain = {}));
|
|
113
|
+
// Theme states
|
|
114
|
+
var Theme;
|
|
115
|
+
(function (Theme) {
|
|
116
|
+
Theme["LIGHT"] = "light";
|
|
117
|
+
Theme["DARK"] = "dark";
|
|
118
|
+
Theme["SYSTEM"] = "system";
|
|
119
|
+
})(Theme || (exports.Theme = Theme = {}));
|
|
120
|
+
// Font sizes
|
|
121
|
+
var FontSize;
|
|
122
|
+
(function (FontSize) {
|
|
123
|
+
FontSize["SMALL"] = "small";
|
|
124
|
+
FontSize["MEDIUM"] = "medium";
|
|
125
|
+
FontSize["LARGE"] = "large";
|
|
126
|
+
})(FontSize || (exports.FontSize = FontSize = {}));
|
|
127
|
+
// Utility functions for working with email folders
|
|
128
|
+
exports.EmailFolderUtils = {
|
|
129
|
+
/**
|
|
130
|
+
* Check if a folder name is one of the standard mailbox types
|
|
131
|
+
*/
|
|
132
|
+
isStandardFolder(folder) {
|
|
133
|
+
return Object.values(MailboxType).includes(folder);
|
|
134
|
+
},
|
|
135
|
+
/**
|
|
136
|
+
* Get all standard folder names
|
|
137
|
+
*/
|
|
138
|
+
getStandardFolders() {
|
|
139
|
+
return Object.values(MailboxType);
|
|
140
|
+
},
|
|
141
|
+
/**
|
|
142
|
+
* Check if a folder is a custom folder (not one of the standard ones)
|
|
143
|
+
*/
|
|
144
|
+
isCustomFolder(folder) {
|
|
145
|
+
return !this.isStandardFolder(folder);
|
|
146
|
+
},
|
|
147
|
+
/**
|
|
148
|
+
* Normalize folder name for display (capitalize first letter)
|
|
149
|
+
*/
|
|
150
|
+
displayName(folder) {
|
|
151
|
+
return folder.charAt(0).toUpperCase() + folder.slice(1);
|
|
152
|
+
},
|
|
153
|
+
};
|
|
154
|
+
// Email compose types
|
|
155
|
+
var EmailComposeType;
|
|
156
|
+
(function (EmailComposeType) {
|
|
157
|
+
EmailComposeType["NEW"] = "new";
|
|
158
|
+
EmailComposeType["REPLY"] = "reply";
|
|
159
|
+
EmailComposeType["REPLY_ALL"] = "replyAll";
|
|
160
|
+
EmailComposeType["FORWARD"] = "forward";
|
|
161
|
+
})(EmailComposeType || (exports.EmailComposeType = EmailComposeType = {}));
|
|
162
|
+
// Mobile navigation views
|
|
163
|
+
var MobileView;
|
|
164
|
+
(function (MobileView) {
|
|
165
|
+
MobileView["EMAIL_ADDRESSES"] = "emailAddresses";
|
|
166
|
+
MobileView["FOLDERS"] = "folders";
|
|
167
|
+
MobileView["EMAILS"] = "emails";
|
|
168
|
+
MobileView["EMAIL_BODY"] = "emailBody";
|
|
169
|
+
})(MobileView || (exports.MobileView = MobileView = {}));
|
|
170
|
+
// Medium screen navigation
|
|
171
|
+
var MediumView;
|
|
172
|
+
(function (MediumView) {
|
|
173
|
+
MediumView["LEFT"] = "left";
|
|
174
|
+
MediumView["RIGHT"] = "right";
|
|
175
|
+
})(MediumView || (exports.MediumView = MediumView = {}));
|
|
176
|
+
// Email actions
|
|
177
|
+
var EmailAction;
|
|
178
|
+
(function (EmailAction) {
|
|
179
|
+
EmailAction["OPEN"] = "open";
|
|
180
|
+
EmailAction["REPLY"] = "reply";
|
|
181
|
+
EmailAction["FORWARD"] = "forward";
|
|
182
|
+
EmailAction["DELETE"] = "delete";
|
|
183
|
+
EmailAction["STAR"] = "star";
|
|
184
|
+
EmailAction["UNSTAR"] = "unstar";
|
|
185
|
+
EmailAction["MARK_READ"] = "mark_read";
|
|
186
|
+
EmailAction["MARK_UNREAD"] = "mark_unread";
|
|
187
|
+
})(EmailAction || (exports.EmailAction = EmailAction = {}));
|
|
188
|
+
// Subscription actions
|
|
189
|
+
var SubscriptionAction;
|
|
190
|
+
(function (SubscriptionAction) {
|
|
191
|
+
SubscriptionAction["VIEW"] = "view";
|
|
192
|
+
SubscriptionAction["PURCHASE"] = "purchase";
|
|
193
|
+
SubscriptionAction["CANCEL"] = "cancel";
|
|
194
|
+
SubscriptionAction["RESTORE"] = "restore";
|
|
195
|
+
})(SubscriptionAction || (exports.SubscriptionAction = SubscriptionAction = {}));
|
|
196
|
+
// Network request states
|
|
197
|
+
var RequestStatus;
|
|
198
|
+
(function (RequestStatus) {
|
|
199
|
+
RequestStatus["IDLE"] = "idle";
|
|
200
|
+
RequestStatus["LOADING"] = "loading";
|
|
201
|
+
RequestStatus["SUCCESS"] = "success";
|
|
202
|
+
RequestStatus["ERROR"] = "error";
|
|
203
|
+
})(RequestStatus || (exports.RequestStatus = RequestStatus = {}));
|
|
204
|
+
// Notification types
|
|
205
|
+
var NotificationType;
|
|
206
|
+
(function (NotificationType) {
|
|
207
|
+
NotificationType["INFO"] = "info";
|
|
208
|
+
NotificationType["SUCCESS"] = "success";
|
|
209
|
+
NotificationType["WARNING"] = "warning";
|
|
210
|
+
NotificationType["ERROR"] = "error";
|
|
211
|
+
})(NotificationType || (exports.NotificationType = NotificationType = {}));
|
|
212
|
+
// Email address types
|
|
213
|
+
var EmailAddressType;
|
|
214
|
+
(function (EmailAddressType) {
|
|
215
|
+
EmailAddressType["DIRECT"] = "direct";
|
|
216
|
+
EmailAddressType["ENS"] = "ens";
|
|
217
|
+
EmailAddressType["SNS"] = "sns";
|
|
218
|
+
EmailAddressType["CUSTOM"] = "custom";
|
|
219
|
+
})(EmailAddressType || (exports.EmailAddressType = EmailAddressType = {}));
|
|
220
|
+
// Mailbox sort orders
|
|
221
|
+
var SortOrder;
|
|
222
|
+
(function (SortOrder) {
|
|
223
|
+
SortOrder["ASC"] = "asc";
|
|
224
|
+
SortOrder["DESC"] = "desc";
|
|
225
|
+
})(SortOrder || (exports.SortOrder = SortOrder = {}));
|
|
226
|
+
// Email sort criteria
|
|
227
|
+
var EmailSortCriteria;
|
|
228
|
+
(function (EmailSortCriteria) {
|
|
229
|
+
EmailSortCriteria["DATE"] = "date";
|
|
230
|
+
EmailSortCriteria["SUBJECT"] = "subject";
|
|
231
|
+
EmailSortCriteria["FROM"] = "from";
|
|
232
|
+
EmailSortCriteria["SIZE"] = "size";
|
|
233
|
+
})(EmailSortCriteria || (exports.EmailSortCriteria = EmailSortCriteria = {}));
|
|
234
|
+
// Mailbox types (consolidated from StandardEmailFolder and MailboxType)
|
|
235
|
+
var MailboxType;
|
|
236
|
+
(function (MailboxType) {
|
|
237
|
+
MailboxType["INBOX"] = "inbox";
|
|
238
|
+
MailboxType["SENT"] = "sent";
|
|
239
|
+
MailboxType["DRAFTS"] = "drafts";
|
|
240
|
+
MailboxType["SPAM"] = "spam";
|
|
241
|
+
MailboxType["TRASH"] = "trash";
|
|
242
|
+
MailboxType["STARRED"] = "starred";
|
|
243
|
+
MailboxType["SNOOZED"] = "snoozed";
|
|
244
|
+
MailboxType["ARCHIVE"] = "archive";
|
|
245
|
+
MailboxType["CUSTOM"] = "custom";
|
|
246
|
+
})(MailboxType || (exports.MailboxType = MailboxType = {}));
|
|
247
|
+
// Connection types
|
|
248
|
+
var ConnectionType;
|
|
249
|
+
(function (ConnectionType) {
|
|
250
|
+
ConnectionType["UNKNOWN"] = "unknown";
|
|
251
|
+
ConnectionType["NONE"] = "none";
|
|
252
|
+
ConnectionType["WIFI"] = "wifi";
|
|
253
|
+
ConnectionType["CELLULAR_2G"] = "2g";
|
|
254
|
+
ConnectionType["CELLULAR_3G"] = "3g";
|
|
255
|
+
ConnectionType["CELLULAR_4G"] = "4g";
|
|
256
|
+
ConnectionType["CELLULAR_5G"] = "5g";
|
|
257
|
+
ConnectionType["ETHERNET"] = "ethernet";
|
|
258
|
+
})(ConnectionType || (exports.ConnectionType = ConnectionType = {}));
|
|
259
|
+
// Connection states (consolidated from WalletConnectionState, NetworkStatus, and ConnectionState)
|
|
260
|
+
var ConnectionState;
|
|
261
|
+
(function (ConnectionState) {
|
|
262
|
+
ConnectionState["UNKNOWN"] = "unknown";
|
|
263
|
+
ConnectionState["DISCONNECTED"] = "disconnected";
|
|
264
|
+
ConnectionState["CONNECTING"] = "connecting";
|
|
265
|
+
ConnectionState["CONNECTED"] = "connected";
|
|
266
|
+
ConnectionState["RECONNECTING"] = "reconnecting";
|
|
267
|
+
ConnectionState["VERIFIED"] = "verified";
|
|
268
|
+
ConnectionState["LIMITED"] = "limited";
|
|
269
|
+
ConnectionState["ERROR"] = "error";
|
|
270
|
+
})(ConnectionState || (exports.ConnectionState = ConnectionState = {}));
|
|
271
|
+
// Platform types
|
|
272
|
+
var PlatformType;
|
|
273
|
+
(function (PlatformType) {
|
|
274
|
+
PlatformType["WEB"] = "web";
|
|
275
|
+
PlatformType["REACT_NATIVE"] = "react_native";
|
|
276
|
+
PlatformType["DESKTOP"] = "desktop";
|
|
277
|
+
})(PlatformType || (exports.PlatformType = PlatformType = {}));
|
|
278
|
+
// Email validation states
|
|
279
|
+
var EmailValidationState;
|
|
280
|
+
(function (EmailValidationState) {
|
|
281
|
+
EmailValidationState["VALID"] = "valid";
|
|
282
|
+
EmailValidationState["INVALID"] = "invalid";
|
|
283
|
+
EmailValidationState["PENDING"] = "pending";
|
|
284
|
+
EmailValidationState["UNKNOWN"] = "unknown";
|
|
285
|
+
})(EmailValidationState || (exports.EmailValidationState = EmailValidationState = {}));
|
|
286
|
+
// Feature flags
|
|
287
|
+
var FeatureFlag;
|
|
288
|
+
(function (FeatureFlag) {
|
|
289
|
+
FeatureFlag["AI_SEARCH"] = "ai_search";
|
|
290
|
+
FeatureFlag["SMART_COMPOSE"] = "smart_compose";
|
|
291
|
+
FeatureFlag["ADVANCED_FILTERS"] = "advanced_filters";
|
|
292
|
+
FeatureFlag["DARK_MODE"] = "dark_mode";
|
|
293
|
+
FeatureFlag["NOTIFICATIONS"] = "notifications";
|
|
294
|
+
FeatureFlag["ANALYTICS"] = "analytics";
|
|
295
|
+
})(FeatureFlag || (exports.FeatureFlag = FeatureFlag = {}));
|
|
296
|
+
// Error types
|
|
297
|
+
var ErrorType;
|
|
298
|
+
(function (ErrorType) {
|
|
299
|
+
ErrorType["NETWORK"] = "network";
|
|
300
|
+
ErrorType["AUTH"] = "auth";
|
|
301
|
+
ErrorType["VALIDATION"] = "validation";
|
|
302
|
+
ErrorType["PERMISSION"] = "permission";
|
|
303
|
+
ErrorType["UNKNOWN"] = "unknown";
|
|
304
|
+
})(ErrorType || (exports.ErrorType = ErrorType = {}));
|
|
305
|
+
// Currency types for subscriptions
|
|
306
|
+
var Currency;
|
|
307
|
+
(function (Currency) {
|
|
308
|
+
Currency["USD"] = "USD";
|
|
309
|
+
Currency["EUR"] = "EUR";
|
|
310
|
+
Currency["GBP"] = "GBP";
|
|
311
|
+
Currency["CAD"] = "CAD";
|
|
312
|
+
Currency["AUD"] = "AUD";
|
|
313
|
+
})(Currency || (exports.Currency = Currency = {}));
|
|
314
|
+
//# sourceMappingURL=enums.js.map
|