@dynamic-labs/utils 0.18.0 → 0.18.100-viem.1
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/CHANGELOG.md +0 -24
- package/package.json +6 -4
- package/src/CancellablePromise/CancellablePromise.cjs +26 -26
- package/src/CancellablePromise/CancellablePromise.d.ts +9 -9
- package/src/CancellablePromise/CancellablePromise.js +26 -26
- package/src/CancellablePromise/index.d.ts +1 -1
- package/src/bufferToBase64.cjs +5 -5
- package/src/bufferToBase64.d.ts +1 -1
- package/src/bufferToBase64.js +5 -5
- package/src/errors/AccountExistsError.cjs +6 -6
- package/src/errors/AccountExistsError.d.ts +13 -13
- package/src/errors/AccountExistsError.js +6 -6
- package/src/errors/ChainalysisError.cjs +5 -5
- package/src/errors/ChainalysisError.d.ts +5 -5
- package/src/errors/ChainalysisError.js +5 -5
- package/src/errors/CustomError.cjs +16 -16
- package/src/errors/CustomError.d.ts +11 -11
- package/src/errors/CustomError.js +16 -16
- package/src/errors/DynamicError.cjs +1 -1
- package/src/errors/DynamicError.d.ts +3 -3
- package/src/errors/DynamicError.js +1 -1
- package/src/errors/EmailAlreadyExistsError.cjs +4 -4
- package/src/errors/EmailAlreadyExistsError.d.ts +4 -4
- package/src/errors/EmailAlreadyExistsError.js +4 -4
- package/src/errors/EmailProviderError.cjs +4 -4
- package/src/errors/EmailProviderError.d.ts +4 -4
- package/src/errors/EmailProviderError.js +4 -4
- package/src/errors/EmailVerificationError.cjs +4 -4
- package/src/errors/EmailVerificationError.d.ts +4 -4
- package/src/errors/EmailVerificationError.js +4 -4
- package/src/errors/GateBlockedError.cjs +5 -5
- package/src/errors/GateBlockedError.d.ts +5 -5
- package/src/errors/GateBlockedError.js +5 -5
- package/src/errors/MissingEnvironmentIdError.cjs +4 -4
- package/src/errors/MissingEnvironmentIdError.d.ts +4 -4
- package/src/errors/MissingEnvironmentIdError.js +4 -4
- package/src/errors/NoAccessError.cjs +6 -6
- package/src/errors/NoAccessError.d.ts +9 -9
- package/src/errors/NoAccessError.js +6 -6
- package/src/errors/NotSupportedError.cjs +1 -1
- package/src/errors/NotSupportedError.d.ts +3 -3
- package/src/errors/NotSupportedError.js +1 -1
- package/src/errors/UserHasAccountWithEmailError.cjs +5 -5
- package/src/errors/UserHasAccountWithEmailError.d.ts +5 -5
- package/src/errors/UserHasAccountWithEmailError.js +5 -5
- package/src/errors/UsernameAlreadyExistsError.cjs +4 -4
- package/src/errors/UsernameAlreadyExistsError.d.ts +4 -4
- package/src/errors/UsernameAlreadyExistsError.js +4 -4
- package/src/errors/WalletNotDeployedError.cjs +4 -4
- package/src/errors/WalletNotDeployedError.d.ts +4 -4
- package/src/errors/WalletNotDeployedError.js +4 -4
- package/src/errors/WalletUsedError.cjs +4 -4
- package/src/errors/WalletUsedError.d.ts +4 -4
- package/src/errors/WalletUsedError.js +4 -4
- package/src/errors/index.d.ts +15 -15
- package/src/getOrMapViemChain.cjs +77 -0
- package/src/getOrMapViemChain.d.ts +11 -0
- package/src/getOrMapViemChain.js +51 -0
- package/src/index.cjs +4 -0
- package/src/index.d.ts +9 -8
- package/src/index.js +1 -0
- package/src/isFunction/index.d.ts +1 -1
- package/src/isFunction/isFunction.cjs +1 -1
- package/src/isFunction/isFunction.d.ts +1 -1
- package/src/isFunction/isFunction.js +1 -1
- package/src/isMobile.cjs +56 -56
- package/src/isMobile.d.ts +15 -15
- package/src/isMobile.js +56 -56
- package/src/localStorageAsync.cjs +17 -17
- package/src/localStorageAsync.d.ts +3 -3
- package/src/localStorageAsync.js +17 -17
- package/src/parseChainId.d.ts +1 -1
- package/src/parseEvmNetworks.cjs +6 -6
- package/src/parseEvmNetworks.d.ts +2 -2
- package/src/parseEvmNetworks.js +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,28 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
## [0.18.0](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.0-beta.32...v0.18.0) (2023-08-13)
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
### Features
|
|
6
|
-
|
|
7
|
-
* add in OKX wallet integration ([#2871](https://github.com/dynamic-labs/DynamicAuth/issues/2871)) ([#2927](https://github.com/dynamic-labs/DynamicAuth/issues/2927)) ([f6d06bc](https://github.com/dynamic-labs/DynamicAuth/commit/f6d06bc75ee0e53c9d972f5fab1f4de11818bd82))
|
|
8
|
-
* update wallet locked view ([#2923](https://github.com/dynamic-labs/DynamicAuth/issues/2923)) ([3cc03ee](https://github.com/dynamic-labs/DynamicAuth/commit/3cc03ee5913434d99386fc89d4d26d5d3fb3ca19))
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
### Bug Fixes
|
|
12
|
-
|
|
13
|
-
* account already exist message not displaying automatically ([#2896](https://github.com/dynamic-labs/DynamicAuth/issues/2896)) ([#2906](https://github.com/dynamic-labs/DynamicAuth/issues/2906)) ([5e7478a](https://github.com/dynamic-labs/DynamicAuth/commit/5e7478acd864451a7cf7e8e62845cca7ef5439c6))
|
|
14
|
-
* don't let user update email if it's tied to an embedded wallet ([#2903](https://github.com/dynamic-labs/DynamicAuth/issues/2903)) ([33c52b5](https://github.com/dynamic-labs/DynamicAuth/commit/33c52b50a880a34b4161a700b8b1805c9b01527d)), closes [#2883](https://github.com/dynamic-labs/DynamicAuth/issues/2883)
|
|
15
|
-
* **GVTY-195:** issues with mergeUserAccountsView ([#2945](https://github.com/dynamic-labs/DynamicAuth/issues/2945)) ([2c6265e](https://github.com/dynamic-labs/DynamicAuth/commit/2c6265e3e709edb9ff1af6e6c139b85418e46d76))
|
|
16
|
-
* **Magic:** improve gas estimate for transactions ([#2947](https://github.com/dynamic-labs/DynamicAuth/issues/2947)) ([ad35a72](https://github.com/dynamic-labs/DynamicAuth/commit/ad35a722df6abd54b98ea491661ff4ec3e602621))
|
|
17
|
-
* missing enable isVerificationInProgress ([#2926](https://github.com/dynamic-labs/DynamicAuth/issues/2926)) ([98f54fd](https://github.com/dynamic-labs/DynamicAuth/commit/98f54fd1345713dfaf0ef837502dfaca3709d633))
|
|
18
|
-
* **networks:** merge custom network after API networks ([#2949](https://github.com/dynamic-labs/DynamicAuth/issues/2949)) ([ab22303](https://github.com/dynamic-labs/DynamicAuth/commit/ab22303294123c2a914a65f0d2c15481740647bb))
|
|
19
|
-
* onBeforeConnectSuccessConfirmation is being called multiple time ([#2965](https://github.com/dynamic-labs/DynamicAuth/issues/2965)) ([a276968](https://github.com/dynamic-labs/DynamicAuth/commit/a2769689bc82350dfb8123e1fe8a4e92a60b262c))
|
|
20
|
-
* **QNTM-249:** broken email update when user is authenticated ([#2932](https://github.com/dynamic-labs/DynamicAuth/issues/2932)) ([db33ba1](https://github.com/dynamic-labs/DynamicAuth/commit/db33ba14c317469958ce314a3822b706e20b07d0))
|
|
21
|
-
* reformat social sign-in text ([#2956](https://github.com/dynamic-labs/DynamicAuth/issues/2956)) ([#2961](https://github.com/dynamic-labs/DynamicAuth/issues/2961)) ([f8d2222](https://github.com/dynamic-labs/DynamicAuth/commit/f8d2222d102f5335f95ec917cbb63bf9b55eff0b))
|
|
22
|
-
* **transaction:** improve gas estimate in transaction confirmation ([#2938](https://github.com/dynamic-labs/DynamicAuth/issues/2938)) ([02d0f46](https://github.com/dynamic-labs/DynamicAuth/commit/02d0f46127e94e83b4decbaaf6a45dbae135c89d))
|
|
23
|
-
* useSyncPrimaryWallet overrides views with "wallet-locked-view" ([#2921](https://github.com/dynamic-labs/DynamicAuth/issues/2921)) ([aa8c369](https://github.com/dynamic-labs/DynamicAuth/commit/aa8c369d2a713eb57ecc99b16a6b62d465789370))
|
|
24
|
-
* **wallet-list:** update key to distinguish wallet and wallet group ([#2922](https://github.com/dynamic-labs/DynamicAuth/issues/2922)) ([f40c07c](https://github.com/dynamic-labs/DynamicAuth/commit/f40c07c65915775e99a1dbb8d07bb23824a92915)), closes [#2909](https://github.com/dynamic-labs/DynamicAuth/issues/2909)
|
|
25
|
-
|
|
26
2
|
## [0.18.0-beta.32](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.0-beta.31...v0.18.0-beta.32) (2023-08-09)
|
|
27
3
|
|
|
28
4
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/utils",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.100-viem.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/dynamic-labs/DynamicAuth.git",
|
|
@@ -25,8 +25,10 @@
|
|
|
25
25
|
},
|
|
26
26
|
"./package.json": "./package.json"
|
|
27
27
|
},
|
|
28
|
-
"
|
|
29
|
-
"
|
|
28
|
+
"peerDependencies": {
|
|
29
|
+
"viem": "^1.5.3"
|
|
30
30
|
},
|
|
31
|
-
"
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@dynamic-labs/types": "0.18.100-viem.1"
|
|
33
|
+
}
|
|
32
34
|
}
|
|
@@ -2,32 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
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
|
-
}
|
|
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
31
|
}
|
|
32
32
|
|
|
33
33
|
exports.CancellablePromise = CancellablePromise;
|
|
@@ -1,9 +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 {};
|
|
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 {};
|
|
@@ -1,29 +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
|
-
}
|
|
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
27
|
}
|
|
28
28
|
|
|
29
29
|
export { CancellablePromise };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { CancellablePromise } from './CancellablePromise';
|
|
1
|
+
export { CancellablePromise } from './CancellablePromise';
|
package/src/bufferToBase64.cjs
CHANGED
|
@@ -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;
|
package/src/bufferToBase64.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const bufferToBase64: (buf: Uint8Array) => string;
|
|
1
|
+
export declare const bufferToBase64: (buf: Uint8Array) => string;
|
package/src/bufferToBase64.js
CHANGED
|
@@ -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
|
+
}
|
|
@@ -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 };
|