OSDN Git Service

update create key
[bytom/Bytom-JS-SDK.git] / src / sdk / wallet.js
index 661569b..9fa14f7 100644 (file)
@@ -1,5 +1,6 @@
 import {initDB, getDB} from '../db/db';
 import { restoreFromKeyStore } from '../utils/account';
+import accountsSDK from './accounts';
 
 function walletSDK(bytom) {
     this.http = bytom.serverHttp;
@@ -52,6 +53,12 @@ walletSDK.prototype.backup = function() {
     return retPromise;
 };
 
+walletSDK.prototype.list = function(pubkey) {
+    let net = this.bytom.net;
+    let pm = {pubkey};
+    return this.http.request('account/wallets', pm, net);
+};
+
 /**
  * Restore wallet.
  *