@dynamic-labs/utils 0.17.0-RC.10

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.
Files changed (63) hide show
  1. package/CHANGELOG.md +793 -0
  2. package/LICENSE +21 -0
  3. package/README.md +0 -0
  4. package/_virtual/_tslib.cjs +30 -0
  5. package/_virtual/_tslib.js +26 -0
  6. package/package.json +32 -0
  7. package/src/CancellablePromise/CancellablePromise.cjs +33 -0
  8. package/src/CancellablePromise/CancellablePromise.d.ts +9 -0
  9. package/src/CancellablePromise/CancellablePromise.js +29 -0
  10. package/src/CancellablePromise/index.d.ts +1 -0
  11. package/src/bufferToBase64.cjs +12 -0
  12. package/src/bufferToBase64.d.ts +1 -0
  13. package/src/bufferToBase64.js +8 -0
  14. package/src/errors/ChainalysisError.cjs +14 -0
  15. package/src/errors/ChainalysisError.d.ts +5 -0
  16. package/src/errors/ChainalysisError.js +10 -0
  17. package/src/errors/CustomError.cjs +23 -0
  18. package/src/errors/CustomError.d.ts +11 -0
  19. package/src/errors/CustomError.js +19 -0
  20. package/src/errors/DynamicError.cjs +10 -0
  21. package/src/errors/DynamicError.d.ts +3 -0
  22. package/src/errors/DynamicError.js +6 -0
  23. package/src/errors/EmailAlreadyExistsError.cjs +13 -0
  24. package/src/errors/EmailAlreadyExistsError.d.ts +4 -0
  25. package/src/errors/EmailAlreadyExistsError.js +9 -0
  26. package/src/errors/EmailVerificationError.cjs +13 -0
  27. package/src/errors/EmailVerificationError.d.ts +4 -0
  28. package/src/errors/EmailVerificationError.js +9 -0
  29. package/src/errors/NoAccessError.cjs +15 -0
  30. package/src/errors/NoAccessError.d.ts +9 -0
  31. package/src/errors/NoAccessError.js +11 -0
  32. package/src/errors/NotSupportedError.cjs +10 -0
  33. package/src/errors/NotSupportedError.d.ts +3 -0
  34. package/src/errors/NotSupportedError.js +6 -0
  35. package/src/errors/UsernameAlreadyExistsError.cjs +13 -0
  36. package/src/errors/UsernameAlreadyExistsError.d.ts +4 -0
  37. package/src/errors/UsernameAlreadyExistsError.js +9 -0
  38. package/src/errors/WalletNotDeployedError.cjs +13 -0
  39. package/src/errors/WalletNotDeployedError.d.ts +4 -0
  40. package/src/errors/WalletNotDeployedError.js +9 -0
  41. package/src/errors/WalletUsedError.cjs +13 -0
  42. package/src/errors/WalletUsedError.d.ts +4 -0
  43. package/src/errors/WalletUsedError.js +9 -0
  44. package/src/errors/index.d.ts +10 -0
  45. package/src/index.cjs +47 -0
  46. package/src/index.d.ts +8 -0
  47. package/src/index.js +17 -0
  48. package/src/isFunction/index.d.ts +1 -0
  49. package/src/isFunction/isFunction.cjs +8 -0
  50. package/src/isFunction/isFunction.d.ts +1 -0
  51. package/src/isFunction/isFunction.js +4 -0
  52. package/src/isMobile.cjs +54 -0
  53. package/src/isMobile.d.ts +13 -0
  54. package/src/isMobile.js +46 -0
  55. package/src/localStorageAsync.cjs +28 -0
  56. package/src/localStorageAsync.d.ts +3 -0
  57. package/src/localStorageAsync.js +22 -0
  58. package/src/parseChainId.cjs +7 -0
  59. package/src/parseChainId.d.ts +1 -0
  60. package/src/parseChainId.js +3 -0
  61. package/src/parseEvmNetworks.cjs +15 -0
  62. package/src/parseEvmNetworks.d.ts +2 -0
  63. package/src/parseEvmNetworks.js +11 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Dynamic Labs, Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
File without changes
@@ -0,0 +1,30 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ /******************************************************************************
6
+ Copyright (c) Microsoft Corporation.
7
+
8
+ Permission to use, copy, modify, and/or distribute this software for any
9
+ purpose with or without fee is hereby granted.
10
+
11
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
12
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
13
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
14
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
15
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
16
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17
+ PERFORMANCE OF THIS SOFTWARE.
18
+ ***************************************************************************** */
19
+
20
+ function __awaiter(thisArg, _arguments, P, generator) {
21
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
22
+ return new (P || (P = Promise))(function (resolve, reject) {
23
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
24
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
25
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
26
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
27
+ });
28
+ }
29
+
30
+ exports.__awaiter = __awaiter;
@@ -0,0 +1,26 @@
1
+ /******************************************************************************
2
+ Copyright (c) Microsoft Corporation.
3
+
4
+ Permission to use, copy, modify, and/or distribute this software for any
5
+ purpose with or without fee is hereby granted.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
10
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
11
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
12
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13
+ PERFORMANCE OF THIS SOFTWARE.
14
+ ***************************************************************************** */
15
+
16
+ function __awaiter(thisArg, _arguments, P, generator) {
17
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
18
+ return new (P || (P = Promise))(function (resolve, reject) {
19
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
20
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
21
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
22
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
23
+ });
24
+ }
25
+
26
+ export { __awaiter };
package/package.json ADDED
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "@dynamic-labs/utils",
3
+ "version": "0.17.0-RC.10",
4
+ "repository": {
5
+ "type": "git",
6
+ "url": "https://github.com/dynamic-labs/DynamicAuth.git",
7
+ "directory": "packages/utils"
8
+ },
9
+ "description": "A React SDK for implementing wallet web3 authentication and authorization to your website.",
10
+ "bugs": {
11
+ "url": "https://github.com/dynamic-labs/DynamicAuth/issues"
12
+ },
13
+ "homepage": "https://github.com/dynamic-labs/DynamicAuth#readme",
14
+ "author": "Dynamic Labs, Inc.",
15
+ "license": "MIT",
16
+ "main": "./src/index.cjs",
17
+ "module": "./src/index.js",
18
+ "types": "./src/index.d.ts",
19
+ "type": "module",
20
+ "exports": {
21
+ ".": {
22
+ "types": "./src/index.d.ts",
23
+ "import": "./src/index.js",
24
+ "require": "./src/index.cjs"
25
+ },
26
+ "./package.json": "./package.json"
27
+ },
28
+ "dependencies": {
29
+ "@dynamic-labs/types": "0.17.0-RC.10"
30
+ },
31
+ "peerDependencies": {}
32
+ }
@@ -0,0 +1,33 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ class CancellablePromise extends Promise {
6
+ constructor(executor) {
7
+ super((resolve, reject) => {
8
+ executor((val) => {
9
+ if (this.isCancelled)
10
+ return;
11
+ resolve(val);
12
+ }, (err) => {
13
+ if (this.isCancelled)
14
+ return;
15
+ reject(err);
16
+ });
17
+ });
18
+ this._controller = new AbortController();
19
+ }
20
+ get isCancelled() {
21
+ return this._controller.signal.aborted;
22
+ }
23
+ cancel() {
24
+ this._controller.abort();
25
+ }
26
+ static fromPromise(promise) {
27
+ return new CancellablePromise((resolve, reject) => {
28
+ promise.then(resolve).catch(reject);
29
+ });
30
+ }
31
+ }
32
+
33
+ exports.CancellablePromise = CancellablePromise;
@@ -0,0 +1,9 @@
1
+ type Executor<T> = (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: unknown) => void) => void;
2
+ export declare class CancellablePromise<T> extends Promise<T> {
3
+ _controller: AbortController;
4
+ constructor(executor: Executor<T>);
5
+ get isCancelled(): boolean;
6
+ cancel(): void;
7
+ static fromPromise<T>(promise: Promise<T>): CancellablePromise<T>;
8
+ }
9
+ export {};
@@ -0,0 +1,29 @@
1
+ class CancellablePromise extends Promise {
2
+ constructor(executor) {
3
+ super((resolve, reject) => {
4
+ executor((val) => {
5
+ if (this.isCancelled)
6
+ return;
7
+ resolve(val);
8
+ }, (err) => {
9
+ if (this.isCancelled)
10
+ return;
11
+ reject(err);
12
+ });
13
+ });
14
+ this._controller = new AbortController();
15
+ }
16
+ get isCancelled() {
17
+ return this._controller.signal.aborted;
18
+ }
19
+ cancel() {
20
+ this._controller.abort();
21
+ }
22
+ static fromPromise(promise) {
23
+ return new CancellablePromise((resolve, reject) => {
24
+ promise.then(resolve).catch(reject);
25
+ });
26
+ }
27
+ }
28
+
29
+ export { CancellablePromise };
@@ -0,0 +1 @@
1
+ export { CancellablePromise } from './CancellablePromise';
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const bufferToBase64 = (buf) => {
6
+ const binstr = Array.prototype.map
7
+ .call(buf, (ch) => String.fromCharCode(ch))
8
+ .join('');
9
+ return Buffer.from(binstr, 'binary').toString('base64');
10
+ };
11
+
12
+ exports.bufferToBase64 = bufferToBase64;
@@ -0,0 +1 @@
1
+ export declare const bufferToBase64: (buf: Uint8Array) => string;
@@ -0,0 +1,8 @@
1
+ const bufferToBase64 = (buf) => {
2
+ const binstr = Array.prototype.map
3
+ .call(buf, (ch) => String.fromCharCode(ch))
4
+ .join('');
5
+ return Buffer.from(binstr, 'binary').toString('base64');
6
+ };
7
+
8
+ export { bufferToBase64 };
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var DynamicError = require('./DynamicError.cjs');
6
+
7
+ class ChainalysisError extends DynamicError.DynamicError {
8
+ constructor(walletPublicKey) {
9
+ super('This address is not approved for access');
10
+ this.walletPublicKey = walletPublicKey;
11
+ }
12
+ }
13
+
14
+ exports.ChainalysisError = ChainalysisError;
@@ -0,0 +1,5 @@
1
+ import { DynamicError } from './DynamicError';
2
+ export declare class ChainalysisError extends DynamicError {
3
+ walletPublicKey: string | undefined;
4
+ constructor(walletPublicKey: string);
5
+ }
@@ -0,0 +1,10 @@
1
+ import { DynamicError } from './DynamicError.js';
2
+
3
+ class ChainalysisError extends DynamicError {
4
+ constructor(walletPublicKey) {
5
+ super('This address is not approved for access');
6
+ this.walletPublicKey = walletPublicKey;
7
+ }
8
+ }
9
+
10
+ export { ChainalysisError };
@@ -0,0 +1,23 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ /**
6
+ * Extend this class to allow usage of instanceof
7
+ */
8
+ class CustomError extends Error {
9
+ constructor(message, code) {
10
+ super(message);
11
+ this.code = undefined;
12
+ this.code = code;
13
+ Object.setPrototypeOf(this, this.constructor.prototype);
14
+ }
15
+ toJSON() {
16
+ return {
17
+ code: this.code,
18
+ error: this.message,
19
+ };
20
+ }
21
+ }
22
+
23
+ exports.CustomError = CustomError;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Extend this class to allow usage of instanceof
3
+ */
4
+ export declare class CustomError extends Error {
5
+ code: string | undefined;
6
+ constructor(message?: string | undefined, code?: string);
7
+ toJSON(): {
8
+ code: string | undefined;
9
+ error: string;
10
+ };
11
+ }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Extend this class to allow usage of instanceof
3
+ */
4
+ class CustomError extends Error {
5
+ constructor(message, code) {
6
+ super(message);
7
+ this.code = undefined;
8
+ this.code = code;
9
+ Object.setPrototypeOf(this, this.constructor.prototype);
10
+ }
11
+ toJSON() {
12
+ return {
13
+ code: this.code,
14
+ error: this.message,
15
+ };
16
+ }
17
+ }
18
+
19
+ export { CustomError };
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var CustomError = require('./CustomError.cjs');
6
+
7
+ class DynamicError extends CustomError.CustomError {
8
+ }
9
+
10
+ exports.DynamicError = DynamicError;
@@ -0,0 +1,3 @@
1
+ import { CustomError } from './CustomError';
2
+ export declare class DynamicError extends CustomError {
3
+ }
@@ -0,0 +1,6 @@
1
+ import { CustomError } from './CustomError.js';
2
+
3
+ class DynamicError extends CustomError {
4
+ }
5
+
6
+ export { DynamicError };
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var DynamicError = require('./DynamicError.cjs');
6
+
7
+ class EmailAlreadyExistsError extends DynamicError.DynamicError {
8
+ constructor() {
9
+ super('Email already exists');
10
+ }
11
+ }
12
+
13
+ exports.EmailAlreadyExistsError = EmailAlreadyExistsError;
@@ -0,0 +1,4 @@
1
+ import { DynamicError } from './DynamicError';
2
+ export declare class EmailAlreadyExistsError extends DynamicError {
3
+ constructor();
4
+ }
@@ -0,0 +1,9 @@
1
+ import { DynamicError } from './DynamicError.js';
2
+
3
+ class EmailAlreadyExistsError extends DynamicError {
4
+ constructor() {
5
+ super('Email already exists');
6
+ }
7
+ }
8
+
9
+ export { EmailAlreadyExistsError };
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var DynamicError = require('./DynamicError.cjs');
6
+
7
+ class EmailVerificationError extends DynamicError.DynamicError {
8
+ constructor(code) {
9
+ super('EmailVerificationError', code);
10
+ }
11
+ }
12
+
13
+ exports.EmailVerificationError = EmailVerificationError;
@@ -0,0 +1,4 @@
1
+ import { DynamicError } from './DynamicError';
2
+ export declare class EmailVerificationError extends DynamicError {
3
+ constructor(code: string);
4
+ }
@@ -0,0 +1,9 @@
1
+ import { DynamicError } from './DynamicError.js';
2
+
3
+ class EmailVerificationError extends DynamicError {
4
+ constructor(code) {
5
+ super('EmailVerificationError', code);
6
+ }
7
+ }
8
+
9
+ export { EmailVerificationError };
@@ -0,0 +1,15 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var DynamicError = require('./DynamicError.cjs');
6
+
7
+ class NoAccessError extends DynamicError.DynamicError {
8
+ constructor({ walletPublicKey, email, }) {
9
+ super('User does not have access');
10
+ this.email = email;
11
+ this.walletPublicKey = walletPublicKey;
12
+ }
13
+ }
14
+
15
+ exports.NoAccessError = NoAccessError;
@@ -0,0 +1,9 @@
1
+ import { DynamicError } from './DynamicError';
2
+ export declare class NoAccessError extends DynamicError {
3
+ walletPublicKey?: string;
4
+ email?: string;
5
+ constructor({ walletPublicKey, email, }: {
6
+ email?: string;
7
+ walletPublicKey?: string;
8
+ });
9
+ }
@@ -0,0 +1,11 @@
1
+ import { DynamicError } from './DynamicError.js';
2
+
3
+ class NoAccessError extends DynamicError {
4
+ constructor({ walletPublicKey, email, }) {
5
+ super('User does not have access');
6
+ this.email = email;
7
+ this.walletPublicKey = walletPublicKey;
8
+ }
9
+ }
10
+
11
+ export { NoAccessError };
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var DynamicError = require('./DynamicError.cjs');
6
+
7
+ class NotSupportedError extends DynamicError.DynamicError {
8
+ }
9
+
10
+ exports.NotSupportedError = NotSupportedError;
@@ -0,0 +1,3 @@
1
+ import { DynamicError } from './DynamicError';
2
+ export declare class NotSupportedError extends DynamicError {
3
+ }
@@ -0,0 +1,6 @@
1
+ import { DynamicError } from './DynamicError.js';
2
+
3
+ class NotSupportedError extends DynamicError {
4
+ }
5
+
6
+ export { NotSupportedError };
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var DynamicError = require('./DynamicError.cjs');
6
+
7
+ class UsernameAlreadyExistsError extends DynamicError.DynamicError {
8
+ constructor() {
9
+ super('Username already exists');
10
+ }
11
+ }
12
+
13
+ exports.UsernameAlreadyExistsError = UsernameAlreadyExistsError;
@@ -0,0 +1,4 @@
1
+ import { DynamicError } from './DynamicError';
2
+ export declare class UsernameAlreadyExistsError extends DynamicError {
3
+ constructor();
4
+ }
@@ -0,0 +1,9 @@
1
+ import { DynamicError } from './DynamicError.js';
2
+
3
+ class UsernameAlreadyExistsError extends DynamicError {
4
+ constructor() {
5
+ super('Username already exists');
6
+ }
7
+ }
8
+
9
+ export { UsernameAlreadyExistsError };
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var DynamicError = require('./DynamicError.cjs');
6
+
7
+ class WalletNotDeployedError extends DynamicError.DynamicError {
8
+ constructor() {
9
+ super('Wallet has not been deployed', 'wallet_not_deployed');
10
+ }
11
+ }
12
+
13
+ exports.WalletNotDeployedError = WalletNotDeployedError;
@@ -0,0 +1,4 @@
1
+ import { DynamicError } from './DynamicError';
2
+ export declare class WalletNotDeployedError extends DynamicError {
3
+ constructor();
4
+ }
@@ -0,0 +1,9 @@
1
+ import { DynamicError } from './DynamicError.js';
2
+
3
+ class WalletNotDeployedError extends DynamicError {
4
+ constructor() {
5
+ super('Wallet has not been deployed', 'wallet_not_deployed');
6
+ }
7
+ }
8
+
9
+ export { WalletNotDeployedError };
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var DynamicError = require('./DynamicError.cjs');
6
+
7
+ class WalletUsedError extends DynamicError.DynamicError {
8
+ constructor(code) {
9
+ super('WalletUsedError', code);
10
+ }
11
+ }
12
+
13
+ exports.WalletUsedError = WalletUsedError;
@@ -0,0 +1,4 @@
1
+ import { DynamicError } from './DynamicError';
2
+ export declare class WalletUsedError extends DynamicError {
3
+ constructor(code: string);
4
+ }
@@ -0,0 +1,9 @@
1
+ import { DynamicError } from './DynamicError.js';
2
+
3
+ class WalletUsedError extends DynamicError {
4
+ constructor(code) {
5
+ super('WalletUsedError', code);
6
+ }
7
+ }
8
+
9
+ export { WalletUsedError };
@@ -0,0 +1,10 @@
1
+ export * from './ChainalysisError';
2
+ export * from './CustomError';
3
+ export * from './DynamicError';
4
+ export * from './EmailAlreadyExistsError';
5
+ export * from './EmailVerificationError';
6
+ export * from './NoAccessError';
7
+ export * from './NotSupportedError';
8
+ export * from './UsernameAlreadyExistsError';
9
+ export * from './WalletNotDeployedError';
10
+ export * from './WalletUsedError';
package/src/index.cjs ADDED
@@ -0,0 +1,47 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var parseChainId = require('./parseChainId.cjs');
6
+ var parseEvmNetworks = require('./parseEvmNetworks.cjs');
7
+ var ChainalysisError = require('./errors/ChainalysisError.cjs');
8
+ var CustomError = require('./errors/CustomError.cjs');
9
+ var DynamicError = require('./errors/DynamicError.cjs');
10
+ var EmailAlreadyExistsError = require('./errors/EmailAlreadyExistsError.cjs');
11
+ var EmailVerificationError = require('./errors/EmailVerificationError.cjs');
12
+ var NoAccessError = require('./errors/NoAccessError.cjs');
13
+ var NotSupportedError = require('./errors/NotSupportedError.cjs');
14
+ var UsernameAlreadyExistsError = require('./errors/UsernameAlreadyExistsError.cjs');
15
+ var WalletNotDeployedError = require('./errors/WalletNotDeployedError.cjs');
16
+ var WalletUsedError = require('./errors/WalletUsedError.cjs');
17
+ var CancellablePromise = require('./CancellablePromise/CancellablePromise.cjs');
18
+ var isFunction = require('./isFunction/isFunction.cjs');
19
+ var isMobile = require('./isMobile.cjs');
20
+ var localStorageAsync = require('./localStorageAsync.cjs');
21
+ var bufferToBase64 = require('./bufferToBase64.cjs');
22
+
23
+
24
+
25
+ exports.parseChainId = parseChainId.parseChainId;
26
+ exports.parseEvmNetworks = parseEvmNetworks.parseEvmNetworks;
27
+ exports.ChainalysisError = ChainalysisError.ChainalysisError;
28
+ exports.CustomError = CustomError.CustomError;
29
+ exports.DynamicError = DynamicError.DynamicError;
30
+ exports.EmailAlreadyExistsError = EmailAlreadyExistsError.EmailAlreadyExistsError;
31
+ exports.EmailVerificationError = EmailVerificationError.EmailVerificationError;
32
+ exports.NoAccessError = NoAccessError.NoAccessError;
33
+ exports.NotSupportedError = NotSupportedError.NotSupportedError;
34
+ exports.UsernameAlreadyExistsError = UsernameAlreadyExistsError.UsernameAlreadyExistsError;
35
+ exports.WalletNotDeployedError = WalletNotDeployedError.WalletNotDeployedError;
36
+ exports.WalletUsedError = WalletUsedError.WalletUsedError;
37
+ exports.CancellablePromise = CancellablePromise.CancellablePromise;
38
+ exports.isFunction = isFunction.isFunction;
39
+ exports.isIOS = isMobile.isIOS;
40
+ exports.isIPad = isMobile.isIPad;
41
+ exports.isIPhone = isMobile.isIPhone;
42
+ exports.isMobile = isMobile.isMobile;
43
+ exports.isSamsungBrowser = isMobile.isSamsungBrowser;
44
+ exports.getItemAsync = localStorageAsync.getItemAsync;
45
+ exports.removeItemAsync = localStorageAsync.removeItemAsync;
46
+ exports.setItemAsync = localStorageAsync.setItemAsync;
47
+ exports.bufferToBase64 = bufferToBase64.bufferToBase64;
package/src/index.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ export * from './parseChainId';
2
+ export * from './parseEvmNetworks';
3
+ export * from './errors';
4
+ export * from './CancellablePromise';
5
+ export * from './isFunction';
6
+ export * from './isMobile';
7
+ export * from './localStorageAsync';
8
+ export * from './bufferToBase64';
package/src/index.js ADDED
@@ -0,0 +1,17 @@
1
+ export { parseChainId } from './parseChainId.js';
2
+ export { parseEvmNetworks } from './parseEvmNetworks.js';
3
+ export { ChainalysisError } from './errors/ChainalysisError.js';
4
+ export { CustomError } from './errors/CustomError.js';
5
+ export { DynamicError } from './errors/DynamicError.js';
6
+ export { EmailAlreadyExistsError } from './errors/EmailAlreadyExistsError.js';
7
+ export { EmailVerificationError } from './errors/EmailVerificationError.js';
8
+ export { NoAccessError } from './errors/NoAccessError.js';
9
+ export { NotSupportedError } from './errors/NotSupportedError.js';
10
+ export { UsernameAlreadyExistsError } from './errors/UsernameAlreadyExistsError.js';
11
+ export { WalletNotDeployedError } from './errors/WalletNotDeployedError.js';
12
+ export { WalletUsedError } from './errors/WalletUsedError.js';
13
+ export { CancellablePromise } from './CancellablePromise/CancellablePromise.js';
14
+ export { isFunction } from './isFunction/isFunction.js';
15
+ export { isIOS, isIPad, isIPhone, isMobile, isSamsungBrowser } from './isMobile.js';
16
+ export { getItemAsync, removeItemAsync, setItemAsync } from './localStorageAsync.js';
17
+ export { bufferToBase64 } from './bufferToBase64.js';
@@ -0,0 +1 @@
1
+ export { isFunction } from './isFunction';