@dynamic-labs/utils 0.19.0-alpha.1 → 0.19.0-alpha.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 (100) hide show
  1. package/CHANGELOG.md +202 -0
  2. package/package.json +7 -4
  3. package/src/CancellablePromise/CancellablePromise.cjs +128 -26
  4. package/src/CancellablePromise/CancellablePromise.d.ts +54 -9
  5. package/src/CancellablePromise/CancellablePromise.js +128 -26
  6. package/src/CancellablePromise/index.d.ts +1 -1
  7. package/src/bigIntToHex/bigIntToHex.cjs +15 -0
  8. package/src/bigIntToHex/bigIntToHex.d.ts +1 -0
  9. package/src/bigIntToHex/bigIntToHex.js +11 -0
  10. package/src/bigIntToHex/index.d.ts +1 -0
  11. package/src/bufferToBase64.cjs +5 -5
  12. package/src/bufferToBase64.d.ts +1 -1
  13. package/src/bufferToBase64.js +5 -5
  14. package/src/errors/AccountExistsError.cjs +6 -6
  15. package/src/errors/AccountExistsError.d.ts +13 -13
  16. package/src/errors/AccountExistsError.js +6 -6
  17. package/src/errors/ChainalysisError.cjs +5 -5
  18. package/src/errors/ChainalysisError.d.ts +5 -5
  19. package/src/errors/ChainalysisError.js +5 -5
  20. package/src/errors/CustomError.cjs +16 -16
  21. package/src/errors/CustomError.d.ts +11 -11
  22. package/src/errors/CustomError.js +16 -16
  23. package/src/errors/DynamicError.cjs +1 -1
  24. package/src/errors/DynamicError.d.ts +3 -3
  25. package/src/errors/DynamicError.js +1 -1
  26. package/src/errors/EmailAlreadyExistsError.cjs +4 -4
  27. package/src/errors/EmailAlreadyExistsError.d.ts +4 -4
  28. package/src/errors/EmailAlreadyExistsError.js +4 -4
  29. package/src/errors/EmailProviderError.cjs +4 -4
  30. package/src/errors/EmailProviderError.d.ts +4 -4
  31. package/src/errors/EmailProviderError.js +4 -4
  32. package/src/errors/EmailVerificationError.cjs +4 -4
  33. package/src/errors/EmailVerificationError.d.ts +4 -4
  34. package/src/errors/EmailVerificationError.js +4 -4
  35. package/src/errors/GateBlockedError.cjs +5 -5
  36. package/src/errors/GateBlockedError.d.ts +5 -5
  37. package/src/errors/GateBlockedError.js +5 -5
  38. package/src/errors/MissingEnvironmentIdError.cjs +4 -4
  39. package/src/errors/MissingEnvironmentIdError.d.ts +4 -4
  40. package/src/errors/MissingEnvironmentIdError.js +4 -4
  41. package/src/errors/NoAccessError.cjs +6 -6
  42. package/src/errors/NoAccessError.d.ts +9 -9
  43. package/src/errors/NoAccessError.js +6 -6
  44. package/src/errors/NotSupportedError.cjs +1 -1
  45. package/src/errors/NotSupportedError.d.ts +3 -3
  46. package/src/errors/NotSupportedError.js +1 -1
  47. package/src/errors/SocialAccountAlreadyExistsError.cjs +13 -0
  48. package/src/errors/SocialAccountAlreadyExistsError.d.ts +4 -0
  49. package/src/errors/SocialAccountAlreadyExistsError.js +9 -0
  50. package/src/errors/UserHasAccountWithEmailError.cjs +5 -5
  51. package/src/errors/UserHasAccountWithEmailError.d.ts +5 -5
  52. package/src/errors/UserHasAccountWithEmailError.js +5 -5
  53. package/src/errors/UsernameAlreadyExistsError.cjs +4 -4
  54. package/src/errors/UsernameAlreadyExistsError.d.ts +4 -4
  55. package/src/errors/UsernameAlreadyExistsError.js +4 -4
  56. package/src/errors/WalletNotDeployedError.cjs +4 -4
  57. package/src/errors/WalletNotDeployedError.d.ts +4 -4
  58. package/src/errors/WalletNotDeployedError.js +4 -4
  59. package/src/errors/WalletUsedError.cjs +4 -4
  60. package/src/errors/WalletUsedError.d.ts +4 -4
  61. package/src/errors/WalletUsedError.js +4 -4
  62. package/src/errors/index.d.ts +16 -15
  63. package/src/getOrMapViemChain.cjs +77 -0
  64. package/src/getOrMapViemChain.d.ts +11 -0
  65. package/src/getOrMapViemChain.js +51 -0
  66. package/src/getPathFromObject.cjs +34 -0
  67. package/src/getPathFromObject.d.ts +8 -0
  68. package/src/getPathFromObject.js +30 -0
  69. package/src/index.cjs +17 -0
  70. package/src/index.d.ts +14 -8
  71. package/src/index.js +8 -1
  72. package/src/isBigInt/index.d.ts +1 -0
  73. package/src/isBigInt/isBigInt.cjs +7 -0
  74. package/src/isBigInt/isBigInt.d.ts +1 -0
  75. package/src/isBigInt/isBigInt.js +3 -0
  76. package/src/isFunction/index.d.ts +1 -1
  77. package/src/isFunction/isFunction.cjs +1 -1
  78. package/src/isFunction/isFunction.d.ts +1 -1
  79. package/src/isFunction/isFunction.js +1 -1
  80. package/src/isMobile.cjs +111 -56
  81. package/src/isMobile.d.ts +16 -15
  82. package/src/isMobile.js +111 -57
  83. package/src/last.cjs +21 -0
  84. package/src/last.d.ts +15 -0
  85. package/src/last.js +17 -0
  86. package/src/localStorageAsync.cjs +17 -17
  87. package/src/localStorageAsync.d.ts +3 -3
  88. package/src/localStorageAsync.js +17 -17
  89. package/src/logger/index.d.ts +1 -0
  90. package/src/logger/logger.cjs +9 -0
  91. package/src/logger/logger.d.ts +2 -0
  92. package/src/logger/logger.js +5 -0
  93. package/src/parseChainId.d.ts +1 -1
  94. package/src/parseEvmNetworks.cjs +6 -6
  95. package/src/parseEvmNetworks.d.ts +2 -2
  96. package/src/parseEvmNetworks.js +6 -6
  97. package/src/sleep/index.d.ts +1 -0
  98. package/src/sleep/sleep.cjs +12 -0
  99. package/src/sleep/sleep.d.ts +11 -0
  100. package/src/sleep/sleep.js +8 -0
@@ -1 +1 @@
1
- export { CancellablePromise } from './CancellablePromise';
1
+ export { CancellablePromise } from './CancellablePromise';
@@ -0,0 +1,15 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const bigIntToHex = (value) => {
6
+ if (typeof value !== 'bigint') {
7
+ throw new TypeError('Input must be of type BigInt');
8
+ }
9
+ if (value < 0) {
10
+ throw new RangeError('Negative BigInt values are not supported');
11
+ }
12
+ return `0x${value.toString(16)}`;
13
+ };
14
+
15
+ exports.bigIntToHex = bigIntToHex;
@@ -0,0 +1 @@
1
+ export declare const bigIntToHex: (value: bigint) => `0x${string}`;
@@ -0,0 +1,11 @@
1
+ const bigIntToHex = (value) => {
2
+ if (typeof value !== 'bigint') {
3
+ throw new TypeError('Input must be of type BigInt');
4
+ }
5
+ if (value < 0) {
6
+ throw new RangeError('Negative BigInt values are not supported');
7
+ }
8
+ return `0x${value.toString(16)}`;
9
+ };
10
+
11
+ export { bigIntToHex };
@@ -0,0 +1 @@
1
+ export { bigIntToHex } from './bigIntToHex';
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
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');
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
10
  };
11
11
 
12
12
  exports.bufferToBase64 = bufferToBase64;
@@ -1 +1 @@
1
- export declare const bufferToBase64: (buf: Uint8Array) => string;
1
+ export declare const bufferToBase64: (buf: Uint8Array) => string;
@@ -1,8 +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');
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
6
  };
7
7
 
8
8
  export { bufferToBase64 };
@@ -4,12 +4,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var DynamicError = require('./DynamicError.cjs');
6
6
 
7
- class AccountExistsError extends DynamicError.DynamicError {
8
- constructor(errorMessage, errorPayload) {
9
- super(errorMessage);
10
- this.errorMessage = errorMessage;
11
- this.errorPayload = errorPayload;
12
- }
7
+ class AccountExistsError extends DynamicError.DynamicError {
8
+ constructor(errorMessage, errorPayload) {
9
+ super(errorMessage);
10
+ this.errorMessage = errorMessage;
11
+ this.errorPayload = errorPayload;
12
+ }
13
13
  }
14
14
 
15
15
  exports.AccountExistsError = AccountExistsError;
@@ -1,13 +1,13 @@
1
- import { DynamicError } from './DynamicError';
2
- type AccountExistsPayload = {
3
- email: string;
4
- embeddedSocialSigninProvider: string;
5
- embeddedWalletName: string;
6
- loginProvider: string;
7
- };
8
- export declare class AccountExistsError extends DynamicError {
9
- errorMessage: string;
10
- errorPayload: AccountExistsPayload;
11
- constructor(errorMessage: string, errorPayload: AccountExistsPayload);
12
- }
13
- export {};
1
+ import { DynamicError } from './DynamicError';
2
+ type AccountExistsPayload = {
3
+ email: string;
4
+ embeddedSocialSigninProvider: string;
5
+ embeddedWalletName: string;
6
+ loginProvider: string;
7
+ };
8
+ export declare class AccountExistsError extends DynamicError {
9
+ errorMessage: string;
10
+ errorPayload: AccountExistsPayload;
11
+ constructor(errorMessage: string, errorPayload: AccountExistsPayload);
12
+ }
13
+ export {};
@@ -1,11 +1,11 @@
1
1
  import { DynamicError } from './DynamicError.js';
2
2
 
3
- class AccountExistsError extends DynamicError {
4
- constructor(errorMessage, errorPayload) {
5
- super(errorMessage);
6
- this.errorMessage = errorMessage;
7
- this.errorPayload = errorPayload;
8
- }
3
+ class AccountExistsError extends DynamicError {
4
+ constructor(errorMessage, errorPayload) {
5
+ super(errorMessage);
6
+ this.errorMessage = errorMessage;
7
+ this.errorPayload = errorPayload;
8
+ }
9
9
  }
10
10
 
11
11
  export { AccountExistsError };
@@ -4,11 +4,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var DynamicError = require('./DynamicError.cjs');
6
6
 
7
- class ChainalysisError extends DynamicError.DynamicError {
8
- constructor(walletPublicKey) {
9
- super('This address is not approved for access');
10
- this.walletPublicKey = walletPublicKey;
11
- }
7
+ class ChainalysisError extends DynamicError.DynamicError {
8
+ constructor(walletPublicKey) {
9
+ super('This address is not approved for access');
10
+ this.walletPublicKey = walletPublicKey;
11
+ }
12
12
  }
13
13
 
14
14
  exports.ChainalysisError = ChainalysisError;
@@ -1,5 +1,5 @@
1
- import { DynamicError } from './DynamicError';
2
- export declare class ChainalysisError extends DynamicError {
3
- walletPublicKey: string | undefined;
4
- constructor(walletPublicKey: string);
5
- }
1
+ import { DynamicError } from './DynamicError';
2
+ export declare class ChainalysisError extends DynamicError {
3
+ walletPublicKey: string | undefined;
4
+ constructor(walletPublicKey: string);
5
+ }
@@ -1,10 +1,10 @@
1
1
  import { DynamicError } from './DynamicError.js';
2
2
 
3
- class ChainalysisError extends DynamicError {
4
- constructor(walletPublicKey) {
5
- super('This address is not approved for access');
6
- this.walletPublicKey = walletPublicKey;
7
- }
3
+ class ChainalysisError extends DynamicError {
4
+ constructor(walletPublicKey) {
5
+ super('This address is not approved for access');
6
+ this.walletPublicKey = walletPublicKey;
7
+ }
8
8
  }
9
9
 
10
10
  export { ChainalysisError };
@@ -2,22 +2,22 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
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
- }
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
21
  }
22
22
 
23
23
  exports.CustomError = CustomError;
@@ -1,11 +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
- }
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
+ }
@@ -1,19 +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
- }
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
17
  }
18
18
 
19
19
  export { CustomError };
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var CustomError = require('./CustomError.cjs');
6
6
 
7
- class DynamicError extends CustomError.CustomError {
7
+ class DynamicError extends CustomError.CustomError {
8
8
  }
9
9
 
10
10
  exports.DynamicError = DynamicError;
@@ -1,3 +1,3 @@
1
- import { CustomError } from './CustomError';
2
- export declare class DynamicError extends CustomError {
3
- }
1
+ import { CustomError } from './CustomError';
2
+ export declare class DynamicError extends CustomError {
3
+ }
@@ -1,6 +1,6 @@
1
1
  import { CustomError } from './CustomError.js';
2
2
 
3
- class DynamicError extends CustomError {
3
+ class DynamicError extends CustomError {
4
4
  }
5
5
 
6
6
  export { DynamicError };
@@ -4,10 +4,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var DynamicError = require('./DynamicError.cjs');
6
6
 
7
- class EmailAlreadyExistsError extends DynamicError.DynamicError {
8
- constructor() {
9
- super('Email already exists');
10
- }
7
+ class EmailAlreadyExistsError extends DynamicError.DynamicError {
8
+ constructor() {
9
+ super('Email already exists');
10
+ }
11
11
  }
12
12
 
13
13
  exports.EmailAlreadyExistsError = EmailAlreadyExistsError;
@@ -1,4 +1,4 @@
1
- import { DynamicError } from './DynamicError';
2
- export declare class EmailAlreadyExistsError extends DynamicError {
3
- constructor();
4
- }
1
+ import { DynamicError } from './DynamicError';
2
+ export declare class EmailAlreadyExistsError extends DynamicError {
3
+ constructor();
4
+ }
@@ -1,9 +1,9 @@
1
1
  import { DynamicError } from './DynamicError.js';
2
2
 
3
- class EmailAlreadyExistsError extends DynamicError {
4
- constructor() {
5
- super('Email already exists');
6
- }
3
+ class EmailAlreadyExistsError extends DynamicError {
4
+ constructor() {
5
+ super('Email already exists');
6
+ }
7
7
  }
8
8
 
9
9
  export { EmailAlreadyExistsError };
@@ -4,10 +4,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var DynamicError = require('./DynamicError.cjs');
6
6
 
7
- class EmailProviderError extends DynamicError.DynamicError {
8
- constructor(code) {
9
- super('EmailProviderError', code);
10
- }
7
+ class EmailProviderError extends DynamicError.DynamicError {
8
+ constructor(code) {
9
+ super('EmailProviderError', code);
10
+ }
11
11
  }
12
12
 
13
13
  exports.EmailProviderError = EmailProviderError;
@@ -1,4 +1,4 @@
1
- import { DynamicError } from './DynamicError';
2
- export declare class EmailProviderError extends DynamicError {
3
- constructor(code: string);
4
- }
1
+ import { DynamicError } from './DynamicError';
2
+ export declare class EmailProviderError extends DynamicError {
3
+ constructor(code: string);
4
+ }
@@ -1,9 +1,9 @@
1
1
  import { DynamicError } from './DynamicError.js';
2
2
 
3
- class EmailProviderError extends DynamicError {
4
- constructor(code) {
5
- super('EmailProviderError', code);
6
- }
3
+ class EmailProviderError extends DynamicError {
4
+ constructor(code) {
5
+ super('EmailProviderError', code);
6
+ }
7
7
  }
8
8
 
9
9
  export { EmailProviderError };
@@ -4,10 +4,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var DynamicError = require('./DynamicError.cjs');
6
6
 
7
- class EmailVerificationError extends DynamicError.DynamicError {
8
- constructor(code) {
9
- super('EmailVerificationError', code);
10
- }
7
+ class EmailVerificationError extends DynamicError.DynamicError {
8
+ constructor(code) {
9
+ super('EmailVerificationError', code);
10
+ }
11
11
  }
12
12
 
13
13
  exports.EmailVerificationError = EmailVerificationError;
@@ -1,4 +1,4 @@
1
- import { DynamicError } from './DynamicError';
2
- export declare class EmailVerificationError extends DynamicError {
3
- constructor(code: string);
4
- }
1
+ import { DynamicError } from './DynamicError';
2
+ export declare class EmailVerificationError extends DynamicError {
3
+ constructor(code: string);
4
+ }
@@ -1,9 +1,9 @@
1
1
  import { DynamicError } from './DynamicError.js';
2
2
 
3
- class EmailVerificationError extends DynamicError {
4
- constructor(code) {
5
- super('EmailVerificationError', code);
6
- }
3
+ class EmailVerificationError extends DynamicError {
4
+ constructor(code) {
5
+ super('EmailVerificationError', code);
6
+ }
7
7
  }
8
8
 
9
9
  export { EmailVerificationError };
@@ -4,11 +4,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var DynamicError = require('./DynamicError.cjs');
6
6
 
7
- class GateBlockedError extends DynamicError.DynamicError {
8
- constructor(walletPublicKey) {
9
- super('This address is blocked by the gate');
10
- this.walletPublicKey = walletPublicKey;
11
- }
7
+ class GateBlockedError extends DynamicError.DynamicError {
8
+ constructor(walletPublicKey) {
9
+ super('This address is blocked by the gate');
10
+ this.walletPublicKey = walletPublicKey;
11
+ }
12
12
  }
13
13
 
14
14
  exports.GateBlockedError = GateBlockedError;
@@ -1,5 +1,5 @@
1
- import { DynamicError } from './DynamicError';
2
- export declare class GateBlockedError extends DynamicError {
3
- walletPublicKey: string | undefined;
4
- constructor(walletPublicKey: string);
5
- }
1
+ import { DynamicError } from './DynamicError';
2
+ export declare class GateBlockedError extends DynamicError {
3
+ walletPublicKey: string | undefined;
4
+ constructor(walletPublicKey: string);
5
+ }
@@ -1,10 +1,10 @@
1
1
  import { DynamicError } from './DynamicError.js';
2
2
 
3
- class GateBlockedError extends DynamicError {
4
- constructor(walletPublicKey) {
5
- super('This address is blocked by the gate');
6
- this.walletPublicKey = walletPublicKey;
7
- }
3
+ class GateBlockedError extends DynamicError {
4
+ constructor(walletPublicKey) {
5
+ super('This address is blocked by the gate');
6
+ this.walletPublicKey = walletPublicKey;
7
+ }
8
8
  }
9
9
 
10
10
  export { GateBlockedError };
@@ -4,10 +4,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var DynamicError = require('./DynamicError.cjs');
6
6
 
7
- class MissingEnvironmentIdError extends DynamicError.DynamicError {
8
- constructor() {
9
- super('You are missing the environmentId field in yours DynamicContextProvider settings prop');
10
- }
7
+ class MissingEnvironmentIdError extends DynamicError.DynamicError {
8
+ constructor() {
9
+ super('You are missing the environmentId field in yours DynamicContextProvider settings prop');
10
+ }
11
11
  }
12
12
 
13
13
  exports.MissingEnvironmentIdError = MissingEnvironmentIdError;
@@ -1,4 +1,4 @@
1
- import { DynamicError } from './DynamicError';
2
- export declare class MissingEnvironmentIdError extends DynamicError {
3
- constructor();
4
- }
1
+ import { DynamicError } from './DynamicError';
2
+ export declare class MissingEnvironmentIdError extends DynamicError {
3
+ constructor();
4
+ }
@@ -1,9 +1,9 @@
1
1
  import { DynamicError } from './DynamicError.js';
2
2
 
3
- class MissingEnvironmentIdError extends DynamicError {
4
- constructor() {
5
- super('You are missing the environmentId field in yours DynamicContextProvider settings prop');
6
- }
3
+ class MissingEnvironmentIdError extends DynamicError {
4
+ constructor() {
5
+ super('You are missing the environmentId field in yours DynamicContextProvider settings prop');
6
+ }
7
7
  }
8
8
 
9
9
  export { MissingEnvironmentIdError };
@@ -4,12 +4,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var DynamicError = require('./DynamicError.cjs');
6
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
- }
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
13
  }
14
14
 
15
15
  exports.NoAccessError = NoAccessError;
@@ -1,9 +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
- }
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
+ }
@@ -1,11 +1,11 @@
1
1
  import { DynamicError } from './DynamicError.js';
2
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
- }
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
9
  }
10
10
 
11
11
  export { NoAccessError };
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var DynamicError = require('./DynamicError.cjs');
6
6
 
7
- class NotSupportedError extends DynamicError.DynamicError {
7
+ class NotSupportedError extends DynamicError.DynamicError {
8
8
  }
9
9
 
10
10
  exports.NotSupportedError = NotSupportedError;
@@ -1,3 +1,3 @@
1
- import { DynamicError } from './DynamicError';
2
- export declare class NotSupportedError extends DynamicError {
3
- }
1
+ import { DynamicError } from './DynamicError';
2
+ export declare class NotSupportedError extends DynamicError {
3
+ }
@@ -1,6 +1,6 @@
1
1
  import { DynamicError } from './DynamicError.js';
2
2
 
3
- class NotSupportedError extends DynamicError {
3
+ class NotSupportedError extends DynamicError {
4
4
  }
5
5
 
6
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 SocialAccountAlreadyExistsError extends DynamicError.DynamicError {
8
+ constructor() {
9
+ super('Social account already exists');
10
+ }
11
+ }
12
+
13
+ exports.SocialAccountAlreadyExistsError = SocialAccountAlreadyExistsError;
@@ -0,0 +1,4 @@
1
+ import { DynamicError } from './DynamicError';
2
+ export declare class SocialAccountAlreadyExistsError extends DynamicError {
3
+ constructor();
4
+ }
@@ -0,0 +1,9 @@
1
+ import { DynamicError } from './DynamicError.js';
2
+
3
+ class SocialAccountAlreadyExistsError extends DynamicError {
4
+ constructor() {
5
+ super('Social account already exists');
6
+ }
7
+ }
8
+
9
+ export { SocialAccountAlreadyExistsError };