@Test public void getNep5Balances() throws IOException { WireMock.configure(); Neow3j neow = Neow3j.build(new HttpService("http: Account a = Account.fromAddress(ADDRESS); WalletTestHelper.setUpWireMockForCall("getnep5balances", "getnep5balances_AZt9DgwW8PKSEQsa9QLX86SyE1DSNjSbsS.json", ADDRESS); Map<ScriptHash, BigInteger> balances = a.getNep5Balances(neow); assertThat(balances.keySet(), contains(GAS_SCRIPT_HASH, NEO_SCRIPT_HASH)); assertThat(balances.values(), contains( new BigInteger("300000000"), new BigInteger("5"))); }
public Map<ScriptHash, BigInteger> getNep5Balances(Neow3j neow3j) throws IOException { NeoGetNep5Balances result = neow3j.getNep5Balances(getAddress()).send(); Map<ScriptHash, BigInteger> balances = new HashMap<>(); result.getBalances().getBalances().forEach(b -> balances.put(new ScriptHash(b.getAssetHash()), new BigInteger(b.getAmount()))); return balances; }
Account { public Map<ScriptHash, BigInteger> getNep5Balances(Neow3j neow3j) throws IOException { NeoGetNep5Balances result = neow3j.getNep5Balances(getAddress()).send(); Map<ScriptHash, BigInteger> balances = new HashMap<>(); result.getBalances().getBalances().forEach(b -> balances.put(new ScriptHash(b.getAssetHash()), new BigInteger(b.getAmount()))); return balances; } }
Account { public Map<ScriptHash, BigInteger> getNep5Balances(Neow3j neow3j) throws IOException { NeoGetNep5Balances result = neow3j.getNep5Balances(getAddress()).send(); Map<ScriptHash, BigInteger> balances = new HashMap<>(); result.getBalances().getBalances().forEach(b -> balances.put(new ScriptHash(b.getAssetHash()), new BigInteger(b.getAmount()))); return balances; } protected  Account();  Account(ECKeyPair ecKeyPair); }
Account { public Map<ScriptHash, BigInteger> getNep5Balances(Neow3j neow3j) throws IOException { NeoGetNep5Balances result = neow3j.getNep5Balances(getAddress()).send(); Map<ScriptHash, BigInteger> balances = new HashMap<>(); result.getBalances().getBalances().forEach(b -> balances.put(new ScriptHash(b.getAssetHash()), new BigInteger(b.getAmount()))); return balances; } protected  Account();  Account(ECKeyPair ecKeyPair); String getAddress(); ScriptHash getScriptHash(); ECKeyPair getECKeyPair(); String getLabel(); Account label(String label); Wallet getWallet(); Boolean isDefault(); Boolean isLocked(); Account lock(); void unlock(); VerificationScript getVerificationScript(); String getEncryptedPrivateKey(); void decryptPrivateKey(String password); void decryptPrivateKey(String password, ScryptParams scryptParams); void encryptPrivateKey(String password); void encryptPrivateKey(String password, ScryptParams scryptParams); boolean isMultiSig(); Map<ScriptHash, BigInteger> getNep5Balances(Neow3j neow3j); NEP6Account toNEP6Account(); static Account createMultiSigAccount(List<ECPublicKey> publicKeys, int signatureThreshold); static Account fromWIF(String wif); static Account fromNewECKeyPair(); static Account fromNEP6Account(NEP6Account nep6Acct); static Account fromAddress(String address); static Account createAccount(); }
Account { public Map<ScriptHash, BigInteger> getNep5Balances(Neow3j neow3j) throws IOException { NeoGetNep5Balances result = neow3j.getNep5Balances(getAddress()).send(); Map<ScriptHash, BigInteger> balances = new HashMap<>(); result.getBalances().getBalances().forEach(b -> balances.put(new ScriptHash(b.getAssetHash()), new BigInteger(b.getAmount()))); return balances; } protected  Account();  Account(ECKeyPair ecKeyPair); String getAddress(); ScriptHash getScriptHash(); ECKeyPair getECKeyPair(); String getLabel(); Account label(String label); Wallet getWallet(); Boolean isDefault(); Boolean isLocked(); Account lock(); void unlock(); VerificationScript getVerificationScript(); String getEncryptedPrivateKey(); void decryptPrivateKey(String password); void decryptPrivateKey(String password, ScryptParams scryptParams); void encryptPrivateKey(String password); void encryptPrivateKey(String password, ScryptParams scryptParams); boolean isMultiSig(); Map<ScriptHash, BigInteger> getNep5Balances(Neow3j neow3j); NEP6Account toNEP6Account(); static Account createMultiSigAccount(List<ECPublicKey> publicKeys, int signatureThreshold); static Account fromWIF(String wif); static Account fromNewECKeyPair(); static Account fromNEP6Account(NEP6Account nep6Acct); static Account fromAddress(String address); static Account createAccount();  }