@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,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Wallet and blockchain types
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.WalletType = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Cryptocurrency wallet type enumeration.
|
|
9
|
+
*
|
|
10
|
+
* Identifies different wallet providers and connection methods for blockchain interactions.
|
|
11
|
+
* Supports both browser extension wallets and protocol-based connections.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```typescript
|
|
15
|
+
* // Wallet-specific connection logic
|
|
16
|
+
* switch (walletType) {
|
|
17
|
+
* case WalletType.METAMASK:
|
|
18
|
+
* return connectMetaMask();
|
|
19
|
+
* case WalletType.WALLETCONNECT:
|
|
20
|
+
* return connectWalletConnect();
|
|
21
|
+
* }
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
var WalletType;
|
|
25
|
+
(function (WalletType) {
|
|
26
|
+
/** MetaMask browser extension wallet */
|
|
27
|
+
WalletType["METAMASK"] = "metamask";
|
|
28
|
+
/** Phantom wallet (primarily for Solana) */
|
|
29
|
+
WalletType["PHANTOM"] = "phantom";
|
|
30
|
+
/** Coinbase Wallet */
|
|
31
|
+
WalletType["COINBASE"] = "coinbase";
|
|
32
|
+
/** WalletConnect protocol for mobile wallets */
|
|
33
|
+
WalletType["WALLETCONNECT"] = "walletconnect";
|
|
34
|
+
/** Generic injected wallet provider */
|
|
35
|
+
WalletType["INJECTED"] = "injected";
|
|
36
|
+
})(WalletType || (exports.WalletType = WalletType = {}));
|
|
37
|
+
//# sourceMappingURL=wallet.js.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wallet and blockchain types
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Cryptocurrency wallet type enumeration.
|
|
6
|
+
*
|
|
7
|
+
* Identifies different wallet providers and connection methods for blockchain interactions.
|
|
8
|
+
* Supports both browser extension wallets and protocol-based connections.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* // Wallet-specific connection logic
|
|
13
|
+
* switch (walletType) {
|
|
14
|
+
* case WalletType.METAMASK:
|
|
15
|
+
* return connectMetaMask();
|
|
16
|
+
* case WalletType.WALLETCONNECT:
|
|
17
|
+
* return connectWalletConnect();
|
|
18
|
+
* }
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export declare enum WalletType {
|
|
22
|
+
/** MetaMask browser extension wallet */
|
|
23
|
+
METAMASK = "metamask",
|
|
24
|
+
/** Phantom wallet (primarily for Solana) */
|
|
25
|
+
PHANTOM = "phantom",
|
|
26
|
+
/** Coinbase Wallet */
|
|
27
|
+
COINBASE = "coinbase",
|
|
28
|
+
/** WalletConnect protocol for mobile wallets */
|
|
29
|
+
WALLETCONNECT = "walletconnect",
|
|
30
|
+
/** Generic injected wallet provider */
|
|
31
|
+
INJECTED = "injected"
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=wallet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../../../src/types/infrastructure/wallet.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH,oBAAY,UAAU;IACpB,wCAAwC;IACxC,QAAQ,aAAa;IACrB,4CAA4C;IAC5C,OAAO,YAAY;IACnB,sBAAsB;IACtB,QAAQ,aAAa;IACrB,gDAAgD;IAChD,aAAa,kBAAkB;IAC/B,uCAAuC;IACvC,QAAQ,aAAa;CACtB"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Wallet and blockchain types
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.WalletType = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Cryptocurrency wallet type enumeration.
|
|
9
|
+
*
|
|
10
|
+
* Identifies different wallet providers and connection methods for blockchain interactions.
|
|
11
|
+
* Supports both browser extension wallets and protocol-based connections.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```typescript
|
|
15
|
+
* // Wallet-specific connection logic
|
|
16
|
+
* switch (walletType) {
|
|
17
|
+
* case WalletType.METAMASK:
|
|
18
|
+
* return connectMetaMask();
|
|
19
|
+
* case WalletType.WALLETCONNECT:
|
|
20
|
+
* return connectWalletConnect();
|
|
21
|
+
* }
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
var WalletType;
|
|
25
|
+
(function (WalletType) {
|
|
26
|
+
/** MetaMask browser extension wallet */
|
|
27
|
+
WalletType["METAMASK"] = "metamask";
|
|
28
|
+
/** Phantom wallet (primarily for Solana) */
|
|
29
|
+
WalletType["PHANTOM"] = "phantom";
|
|
30
|
+
/** Coinbase Wallet */
|
|
31
|
+
WalletType["COINBASE"] = "coinbase";
|
|
32
|
+
/** WalletConnect protocol for mobile wallets */
|
|
33
|
+
WalletType["WALLETCONNECT"] = "walletconnect";
|
|
34
|
+
/** Generic injected wallet provider */
|
|
35
|
+
WalletType["INJECTED"] = "injected";
|
|
36
|
+
})(WalletType || (exports.WalletType = WalletType = {}));
|
|
37
|
+
//# sourceMappingURL=wallet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wallet.js","sourceRoot":"","sources":["../../../src/types/infrastructure/wallet.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH,IAAY,UAWX;AAXD,WAAY,UAAU;IACpB,wCAAwC;IACxC,mCAAqB,CAAA;IACrB,4CAA4C;IAC5C,iCAAmB,CAAA;IACnB,sBAAsB;IACtB,mCAAqB,CAAA;IACrB,gDAAgD;IAChD,6CAA+B,CAAA;IAC/B,uCAAuC;IACvC,mCAAqB,CAAA;AACvB,CAAC,EAXW,UAAU,0BAAV,UAAU,QAWrB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
// KYC verification types
|
|
18
|
+
__exportStar(require("./kyc-types"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/kyc/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
// KYC verification types
|
|
18
|
+
__exportStar(require("./kyc-types"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/kyc/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yBAAyB;AACzB,8CAA4B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* KYC (Know Your Customer) Verification Types
|
|
4
|
+
*
|
|
5
|
+
* Types for the 0xmail KYC verification service which integrates
|
|
6
|
+
* with Sumsub for identity verification at three levels:
|
|
7
|
+
* - Basic: Age and identity verification (18+)
|
|
8
|
+
* - Enhanced: Basic + country verification + AML screening
|
|
9
|
+
* - Accredited: Enhanced + financial verification for accredited investors
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
//# sourceMappingURL=kyc-types.js.map
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* KYC (Know Your Customer) Verification Types
|
|
3
|
+
*
|
|
4
|
+
* Types for the 0xmail KYC verification service which integrates
|
|
5
|
+
* with Sumsub for identity verification at three levels:
|
|
6
|
+
* - Basic: Age and identity verification (18+)
|
|
7
|
+
* - Enhanced: Basic + country verification + AML screening
|
|
8
|
+
* - Accredited: Enhanced + financial verification for accredited investors
|
|
9
|
+
*/
|
|
10
|
+
import type { ChainType } from '../business/enums';
|
|
11
|
+
/**
|
|
12
|
+
* Available KYC verification levels
|
|
13
|
+
*/
|
|
14
|
+
export type KYCVerificationLevel = 'basic' | 'enhanced' | 'accredited';
|
|
15
|
+
/**
|
|
16
|
+
* Status of a KYC application throughout its lifecycle
|
|
17
|
+
*/
|
|
18
|
+
export type KYCApplicationStatus = 'PENDING' | 'INITIATED' | 'IN_PROGRESS' | 'SUBMITTED' | 'COMPLETED' | 'REJECTED';
|
|
19
|
+
/**
|
|
20
|
+
* Sumsub review status values
|
|
21
|
+
*/
|
|
22
|
+
export type SumsubReviewStatus = 'init' | 'pending' | 'prechecked' | 'completed';
|
|
23
|
+
/**
|
|
24
|
+
* Sumsub review answer (verification result)
|
|
25
|
+
*/
|
|
26
|
+
export type SumsubReviewAnswer = 'GREEN' | 'RED' | 'YELLOW';
|
|
27
|
+
/**
|
|
28
|
+
* KYC Application record
|
|
29
|
+
* Main table tracking user's KYC verification applications
|
|
30
|
+
*/
|
|
31
|
+
export interface KYCApplication {
|
|
32
|
+
id: string;
|
|
33
|
+
walletAddress: string;
|
|
34
|
+
email: string;
|
|
35
|
+
chainType: ChainType;
|
|
36
|
+
sumsubApplicantId: string | null;
|
|
37
|
+
metadata: Record<string, unknown>;
|
|
38
|
+
verificationLevel: KYCVerificationLevel;
|
|
39
|
+
status: KYCApplicationStatus;
|
|
40
|
+
retryCount: number;
|
|
41
|
+
createdAt: Date;
|
|
42
|
+
updatedAt: Date;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Verification Result record
|
|
46
|
+
* Stores the outcome of verification for each level
|
|
47
|
+
*/
|
|
48
|
+
export interface VerificationResult {
|
|
49
|
+
id: string;
|
|
50
|
+
kycApplicationId: string;
|
|
51
|
+
verificationLevel: KYCVerificationLevel;
|
|
52
|
+
status: SumsubReviewAnswer;
|
|
53
|
+
reviewStatus: SumsubReviewStatus;
|
|
54
|
+
countryCode: string | null;
|
|
55
|
+
ageVerified: boolean;
|
|
56
|
+
accreditedInvestor: boolean;
|
|
57
|
+
verificationDate: Date | null;
|
|
58
|
+
subscriptionExpiresAt: Date | null;
|
|
59
|
+
sumsubReviewId: string | null;
|
|
60
|
+
sumsubInspectionId: string | null;
|
|
61
|
+
metadata: Record<string, unknown>;
|
|
62
|
+
createdAt: Date;
|
|
63
|
+
updatedAt: Date;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* User Consent record
|
|
67
|
+
* Tracks user consent for third-party DApp access
|
|
68
|
+
*/
|
|
69
|
+
export interface UserConsent {
|
|
70
|
+
id: string;
|
|
71
|
+
walletAddress: string;
|
|
72
|
+
dappIdentifier: string;
|
|
73
|
+
signedMessage: string;
|
|
74
|
+
signature: string;
|
|
75
|
+
consentScope: {
|
|
76
|
+
levels: KYCVerificationLevel[];
|
|
77
|
+
fields: string[];
|
|
78
|
+
};
|
|
79
|
+
grantedAt: Date;
|
|
80
|
+
expiresAt: Date | null;
|
|
81
|
+
revoked: boolean;
|
|
82
|
+
revokedAt: Date | null;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Sumsub configuration
|
|
86
|
+
*/
|
|
87
|
+
export interface SumsubConfig {
|
|
88
|
+
appToken: string;
|
|
89
|
+
secretKey: string;
|
|
90
|
+
baseUrl: string;
|
|
91
|
+
webhookSecret: string;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Data required to create a Sumsub applicant
|
|
95
|
+
*/
|
|
96
|
+
export interface SumsubApplicantData {
|
|
97
|
+
externalUserId: string;
|
|
98
|
+
email: string;
|
|
99
|
+
type: 'individual';
|
|
100
|
+
fixedInfo?: {
|
|
101
|
+
country?: string;
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Sumsub webhook payload structure
|
|
106
|
+
*/
|
|
107
|
+
export interface SumsubWebhookPayload {
|
|
108
|
+
applicantId: string;
|
|
109
|
+
inspectionId: string;
|
|
110
|
+
applicantType: 'individual' | 'company';
|
|
111
|
+
correlationId: string;
|
|
112
|
+
externalUserId: string;
|
|
113
|
+
levelName: string;
|
|
114
|
+
sandboxMode: boolean;
|
|
115
|
+
reviewStatus: SumsubReviewStatus;
|
|
116
|
+
reviewResult: {
|
|
117
|
+
moderationComment: string;
|
|
118
|
+
clientComment: string;
|
|
119
|
+
reviewAnswer: SumsubReviewAnswer;
|
|
120
|
+
rejectLabels: string[];
|
|
121
|
+
reviewRejectType: 'FINAL' | 'RETRY' | 'EXTERNAL';
|
|
122
|
+
};
|
|
123
|
+
createdAtMs: string;
|
|
124
|
+
clientId: string;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Sumsub applicant status response
|
|
128
|
+
*/
|
|
129
|
+
export interface SumsubApplicantStatus {
|
|
130
|
+
applicantId: string;
|
|
131
|
+
reviewStatus: SumsubReviewStatus;
|
|
132
|
+
reviewResult?: {
|
|
133
|
+
reviewAnswer: SumsubReviewAnswer;
|
|
134
|
+
rejectLabels: string[];
|
|
135
|
+
};
|
|
136
|
+
info?: {
|
|
137
|
+
idDocs?: Array<{
|
|
138
|
+
country?: string;
|
|
139
|
+
fields?: {
|
|
140
|
+
dob?: string;
|
|
141
|
+
firstName?: string;
|
|
142
|
+
lastName?: string;
|
|
143
|
+
};
|
|
144
|
+
}>;
|
|
145
|
+
addresses?: Array<{
|
|
146
|
+
country?: string;
|
|
147
|
+
}>;
|
|
148
|
+
questionnaires?: Array<{
|
|
149
|
+
sections?: {
|
|
150
|
+
income?: {
|
|
151
|
+
annualIncome?: string;
|
|
152
|
+
};
|
|
153
|
+
wealth?: {
|
|
154
|
+
netWorth?: string;
|
|
155
|
+
};
|
|
156
|
+
professional?: {
|
|
157
|
+
designation?: string;
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
}>;
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Request to initiate KYC verification
|
|
165
|
+
*/
|
|
166
|
+
export interface InitiateKYCRequest {
|
|
167
|
+
walletAddress: string;
|
|
168
|
+
chainType: ChainType;
|
|
169
|
+
verificationLevel: KYCVerificationLevel;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Response from initiating KYC verification
|
|
173
|
+
*/
|
|
174
|
+
export interface InitiateKYCResponse {
|
|
175
|
+
applicationId: string;
|
|
176
|
+
sumsubAccessToken: string;
|
|
177
|
+
status: KYCApplicationStatus;
|
|
178
|
+
verificationLevel: KYCVerificationLevel;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Response from getting KYC status
|
|
182
|
+
*/
|
|
183
|
+
export interface GetKYCStatusResponse {
|
|
184
|
+
applicationId: string;
|
|
185
|
+
walletAddress: string;
|
|
186
|
+
verificationLevel: KYCVerificationLevel;
|
|
187
|
+
status: KYCApplicationStatus;
|
|
188
|
+
results: {
|
|
189
|
+
basic?: VerificationLevelStatus;
|
|
190
|
+
enhanced?: VerificationLevelStatus;
|
|
191
|
+
accredited?: VerificationLevelStatus;
|
|
192
|
+
};
|
|
193
|
+
canRetry: boolean;
|
|
194
|
+
retriesRemaining: number;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Status for a specific verification level
|
|
198
|
+
*/
|
|
199
|
+
export interface VerificationLevelStatus {
|
|
200
|
+
verified: boolean;
|
|
201
|
+
status: SumsubReviewAnswer;
|
|
202
|
+
ageVerified?: boolean;
|
|
203
|
+
countryAllowed?: boolean;
|
|
204
|
+
countryCode?: string;
|
|
205
|
+
accreditedInvestor?: boolean;
|
|
206
|
+
verifiedAt?: Date;
|
|
207
|
+
subscriptionExpiresAt?: Date;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Request from third-party DApp to verify a user
|
|
211
|
+
*/
|
|
212
|
+
export interface VerifyUserRequest {
|
|
213
|
+
walletAddress: string;
|
|
214
|
+
signedConsent: string;
|
|
215
|
+
consentMessage: string;
|
|
216
|
+
dappIdentifier: string;
|
|
217
|
+
requestedLevel: KYCVerificationLevel;
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Response to third-party DApp verification request
|
|
221
|
+
*/
|
|
222
|
+
export interface VerifyUserResponse {
|
|
223
|
+
verified: boolean;
|
|
224
|
+
level: KYCVerificationLevel;
|
|
225
|
+
ageVerified: boolean;
|
|
226
|
+
countryAllowed: boolean;
|
|
227
|
+
accreditedInvestor: boolean;
|
|
228
|
+
verifiedAt: Date;
|
|
229
|
+
subscriptionExpiresAt: Date;
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Request to revoke consent for a DApp
|
|
233
|
+
*/
|
|
234
|
+
export interface RevokeConsentRequest {
|
|
235
|
+
walletAddress: string;
|
|
236
|
+
dappIdentifier: string;
|
|
237
|
+
signature: string;
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Response to consent revocation
|
|
241
|
+
*/
|
|
242
|
+
export interface RevokeConsentResponse {
|
|
243
|
+
success: boolean;
|
|
244
|
+
revokedAt: Date;
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Get user's granted consents
|
|
248
|
+
*/
|
|
249
|
+
export interface GetConsentsResponse {
|
|
250
|
+
consents: Array<{
|
|
251
|
+
dappIdentifier: string;
|
|
252
|
+
grantedAt: Date;
|
|
253
|
+
expiresAt: Date | null;
|
|
254
|
+
scope: {
|
|
255
|
+
levels: KYCVerificationLevel[];
|
|
256
|
+
fields: string[];
|
|
257
|
+
};
|
|
258
|
+
}>;
|
|
259
|
+
}
|
|
260
|
+
//# sourceMappingURL=kyc-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kyc-types.d.ts","sourceRoot":"","sources":["../../../src/types/kyc/kyc-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAMnD;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,OAAO,GAAG,UAAU,GAAG,YAAY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CAAC;IAC5B,WAAW,EAAE,OAAO,CAAC;IACrB,cAAc,EAAE,OAAO,CAAC;IACxB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,UAAU,EAAE,IAAI,CAAC;IACjB,qBAAqB,EAAE,IAAI,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,IAAI,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,KAAK,CAAC;QACd,cAAc,EAAE,MAAM,CAAC;QACvB,SAAS,EAAE,IAAI,CAAC;QAChB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;QACvB,KAAK,EAAE;YACL,MAAM,EAAE,oBAAoB,EAAE,CAAC;YAC/B,MAAM,EAAE,MAAM,EAAE,CAAC;SAClB,CAAC;KACH,CAAC,CAAC;CACJ"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* KYC (Know Your Customer) Verification Types
|
|
4
|
+
*
|
|
5
|
+
* Types for the 0xmail KYC verification service which integrates
|
|
6
|
+
* with Sumsub for identity verification at three levels:
|
|
7
|
+
* - Basic: Age and identity verification (18+)
|
|
8
|
+
* - Enhanced: Basic + country verification + AML screening
|
|
9
|
+
* - Accredited: Enhanced + financial verification for accredited investors
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
//# sourceMappingURL=kyc-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kyc-types.js","sourceRoot":"","sources":["../../../src/types/kyc/kyc-types.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
// Mailer and mailbox contract response types
|
|
18
|
+
__exportStar(require("./mail-types"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/mailer/index.ts"],"names":[],"mappings":"AACA,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
// Mailer and mailbox contract response types
|
|
18
|
+
__exportStar(require("./mail-types"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/mailer/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA6C;AAC7C,+CAA6B"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview Mailbox contract response types for multi-chain messaging system
|
|
4
|
+
*
|
|
5
|
+
* This module contains all structured response types for the MailBox protocol
|
|
6
|
+
* including EVM and Solana implementations. These types provide type safety
|
|
7
|
+
* and consistent structure for all client interactions.
|
|
8
|
+
*
|
|
9
|
+
* @version 1.0.0
|
|
10
|
+
* @author MailBox Protocol Team
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.isEVMResponse = isEVMResponse;
|
|
14
|
+
exports.isSolanaResponse = isSolanaResponse;
|
|
15
|
+
exports.isMailboxErrorResponse = isMailboxErrorResponse;
|
|
16
|
+
const enums_1 = require("../business/enums");
|
|
17
|
+
// =======================
|
|
18
|
+
// Type Guards
|
|
19
|
+
// =======================
|
|
20
|
+
/**
|
|
21
|
+
* Type guard to check if response is EVM-specific
|
|
22
|
+
*/
|
|
23
|
+
function isEVMResponse(response) {
|
|
24
|
+
return response.chainType === enums_1.ChainType.EVM;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Type guard to check if response is Solana-specific
|
|
28
|
+
*/
|
|
29
|
+
function isSolanaResponse(response) {
|
|
30
|
+
return response.chainType === enums_1.ChainType.SOLANA;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Type guard to check if response contains an error
|
|
34
|
+
*/
|
|
35
|
+
function isMailboxErrorResponse(response) {
|
|
36
|
+
return !response.success && response.error !== undefined;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=mail-types.js.map
|