@Test(expected = IllegalArgumentException.class) public void testCreateWalletWithAccounts_noAccounts() { Wallet.withAccounts(); }
public static Wallet withAccounts(Account... accounts) { if (accounts.length == 0) { throw new IllegalArgumentException("No accounts provided to initialize a wallet."); } return new Wallet() .addAccounts(accounts) .defaultAccount(accounts[0].getScriptHash()); }
Wallet { public static Wallet withAccounts(Account... accounts) { if (accounts.length == 0) { throw new IllegalArgumentException("No accounts provided to initialize a wallet."); } return new Wallet() .addAccounts(accounts) .defaultAccount(accounts[0].getScriptHash()); } }
Wallet { public static Wallet withAccounts(Account... accounts) { if (accounts.length == 0) { throw new IllegalArgumentException("No accounts provided to initialize a wallet."); } return new Wallet() .addAccounts(accounts) .defaultAccount(accounts[0].getScriptHash()); } private  Wallet(); }
Wallet { public static Wallet withAccounts(Account... accounts) { if (accounts.length == 0) { throw new IllegalArgumentException("No accounts provided to initialize a wallet."); } return new Wallet() .addAccounts(accounts) .defaultAccount(accounts[0].getScriptHash()); } private  Wallet(); String getName(); String getVersion(); List<Account> getAccounts(); Wallet defaultAccount(ScriptHash accountScriptHash); ScryptParams getScryptParams(); Account getDefaultAccount(); Boolean isDefault(ScriptHash accountScriptHash); Wallet name(String name); Wallet version(String version); Wallet scryptParams(ScryptParams scryptParams); Wallet addAccounts(Account... accounts); boolean removeAccount(ScriptHash scriptHash); void decryptAllAccounts(String password); void encryptAllAccounts(String password); NEP6Wallet toNEP6Wallet(); static Wallet fromNEP6Wallet(String nep6WalletFileName); static Wallet fromNEP6Wallet(URI nep6WalletFileUri); static Wallet fromNEP6Wallet(File nep6WalletFile); static Wallet fromNEP6Wallet(InputStream nep6WalletFileInputStream); static Wallet fromNEP6Wallet(NEP6Wallet nep6Wallet); Wallet saveNEP6Wallet(File destination); Map<ScriptHash, BigInteger> getNep5TokenBalances(Neow3j neow3j); static Wallet createWallet(); static Wallet createWallet(final String password); static Wallet createWallet(String password, File destination); static Wallet withAccounts(Account... accounts); boolean holdsAccount(ScriptHash scriptHash); Account getAccount(ScriptHash scriptHash); }
Wallet { public static Wallet withAccounts(Account... accounts) { if (accounts.length == 0) { throw new IllegalArgumentException("No accounts provided to initialize a wallet."); } return new Wallet() .addAccounts(accounts) .defaultAccount(accounts[0].getScriptHash()); } private  Wallet(); String getName(); String getVersion(); List<Account> getAccounts(); Wallet defaultAccount(ScriptHash accountScriptHash); ScryptParams getScryptParams(); Account getDefaultAccount(); Boolean isDefault(ScriptHash accountScriptHash); Wallet name(String name); Wallet version(String version); Wallet scryptParams(ScryptParams scryptParams); Wallet addAccounts(Account... accounts); boolean removeAccount(ScriptHash scriptHash); void decryptAllAccounts(String password); void encryptAllAccounts(String password); NEP6Wallet toNEP6Wallet(); static Wallet fromNEP6Wallet(String nep6WalletFileName); static Wallet fromNEP6Wallet(URI nep6WalletFileUri); static Wallet fromNEP6Wallet(File nep6WalletFile); static Wallet fromNEP6Wallet(InputStream nep6WalletFileInputStream); static Wallet fromNEP6Wallet(NEP6Wallet nep6Wallet); Wallet saveNEP6Wallet(File destination); Map<ScriptHash, BigInteger> getNep5TokenBalances(Neow3j neow3j); static Wallet createWallet(); static Wallet createWallet(final String password); static Wallet createWallet(String password, File destination); static Wallet withAccounts(Account... accounts); boolean holdsAccount(ScriptHash scriptHash); Account getAccount(ScriptHash scriptHash); static final String CURRENT_VERSION; static final ObjectMapper OBJECT_MAPPER; }