Search in sources :

Example 1 with BIP47Meta

use of com.samourai.wallet.bip47.BIP47Meta in project samourai-wallet-android by Samourai-Wallet.

the class BIP47Meta method getUnspentAddresses.

public ArrayList<String> getUnspentAddresses(Context ctx, String pcode) {
    ArrayList<String> ret = new ArrayList<String>();
    try {
        ArrayList<Integer> idxs = getUnspent(pcode);
        if (idxs != null) {
            for (int i = 0; i < idxs.size(); i++) {
                info("BIP47Meta", "address has unspents:" + BIP47Util.getInstance(ctx).getReceivePubKey(new PaymentCode(pcode), idxs.get(i)));
                ret.add(BIP47Util.getInstance(ctx).getReceivePubKey(new PaymentCode(pcode), idxs.get(i)));
            }
        }
    } catch (Exception e) {
        ;
    }
    return ret;
}
Also used : PaymentCode(com.samourai.wallet.bip47.rpc.PaymentCode) ArrayList(java.util.ArrayList) JSONException(org.json.JSONException)

Aggregations

PaymentCode (com.samourai.wallet.bip47.rpc.PaymentCode)1 ArrayList (java.util.ArrayList)1 JSONException (org.json.JSONException)1