String network = "nodes.devnet.iota.org"; int port = 443; IotaAPI api = new IotaAPI.Builder() .host(network) .port(port) .protocol("https") .timeout(500) .localPoW(new PearlDiverLocalPoW()) .build(); String seed = "9999999999TESTSEED9999999"; IotaAccount account = new IotaAccount.Builder(seed) .api(api) .securityLevel(2) .mwm(14) .store(new AccountFileStore("account.store")) .build(); // One hour timeout Date hour = new Date(System.currentTimeMillis() + 1000 * 60 * 60); Future dep = account.newDepositAddress(hour, false, 1000); String magnet = DepositFactory.get().build(dep.get(), MagnetMethod.class); // iota://YWEQLREFJQORXXKKEBBBDKOPAXHXJRGVPBUTBJFSRPPYVWWYUWSBDJTIUBJVFREXEAUZWRICKH9VBSQE9KPNLTCLNC/?timeout_at=1554472983208&multi_use=false&expected_amount=1000 System.out.println(magnet); account.shutdown();