@particle-network/auth
Advanced tools
Comparing version 0.9.2 to 0.9.3
@@ -157,2 +157,18 @@ "use strict"; | ||
} | ||
accountSecurity() { | ||
var _a; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
if (!this.isLogin()) { | ||
return Promise.reject(types_1.AuthError.notLogin()); | ||
} | ||
const container = yield this.openUrl(yield this.buildUrl("/account/security", { token: (_a = this.userInfo()) === null || _a === void 0 ? void 0 : _a.token })); | ||
return new Promise((resolve, reject) => { | ||
this.setAuthResult({ | ||
resolve, | ||
reject, | ||
container: container, | ||
}); | ||
}); | ||
}); | ||
} | ||
sign(method, message) { | ||
@@ -159,0 +175,0 @@ var _a, _b; |
@@ -23,2 +23,3 @@ /// <reference types="node" /> | ||
logout(hideLoading?: boolean): Promise<void>; | ||
accountSecurity(): Promise<void>; | ||
sign(method: string, message: Base58String | PrefixedHexString): Promise<string>; | ||
@@ -25,0 +26,0 @@ signAllTransactions(messages: Base58String[]): Promise<string[]>; |
@@ -40,2 +40,7 @@ import { ChainName, ChainId, Chain } from "@particle-network/common"; | ||
export declare type AuthType = AuthTypeTuple[number]; | ||
export interface SecurityAccount { | ||
email?: string; | ||
phone?: string; | ||
has_set_payment_password: boolean; | ||
} | ||
export interface UserInfo { | ||
@@ -71,2 +76,3 @@ uuid: string; | ||
jwt_id?: string; | ||
security_account?: SecurityAccount; | ||
} | ||
@@ -73,0 +79,0 @@ export interface ThirdpartyUserInfo { |
{ | ||
"name": "@particle-network/auth", | ||
"version": "0.9.2", | ||
"version": "0.9.3", | ||
"files": [ | ||
@@ -18,3 +18,3 @@ "lib", | ||
"@particle-network/analytics": "^0.1.1-alpha.0", | ||
"@particle-network/common": "^0.3.1-alpha.0", | ||
"@particle-network/common": "^0.3.1", | ||
"@particle-network/crypto": "^0.2.0", | ||
@@ -35,3 +35,3 @@ "draggabilly": "^3.0.0", | ||
}, | ||
"gitHead": "e5b5ec5d29a3a6fd4c31b546dae989b37d9540b7" | ||
"gitHead": "bab3bc95b4cae5735ddb0c8fc9ce63a9706db3b0" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
503949
4675