+ *
+ * @param {String} alias - User specified, unique identifier.
+ * @param {String} password - User specified, key password.
+ */
+keysSDK.prototype.createKey = function(alias, password) {
+ var normalizedAlias = alias.toLowerCase().trim();
+
+ let data = {};
+ data.alias = normalizedAlias;
+ data.password = password;
+ const res = createkey(data);
+ return res;
+};
+
+/**
+ * Create a new key.
+ *
+ * @param {String} alias - User specified, unique identifier.
+ * @param {String} password - User specified, key password.
+ */
+keysSDK.prototype.restoreFromMnemonic = function(alias, password, mnemonic) {
+ var normalizedAlias = alias.toLowerCase().trim();
+
+ let data = {};
+ data.alias = normalizedAlias;
+ data.password = password;
+ data.mnemonic = mnemonic;
+
+ const res = createkey(data);
+
+ const xpub = res.xpub;
+
+ //Todo: /account/wallets api find if xpub exist in the blockcenter, yes restore, otherwise create new account
+
+ return res;
+};
+
+/**
+ * Create a new key.