blockcypher / java-client

Java SDK for BlockCypher
Apache License 2.0
40 stars 56 forks source link

no wallet api #5

Open spicylobe opened 8 years ago

spicylobe commented 8 years ago

Some of the cooler language clients support the /wallet api. This would be a significant improvement to the the java client. This would seem to require:

Ideally, we could also get some helper to generate the "extended public key" necessary for HD wallets.

danielalexiuc commented 7 years ago

A wallet API would be good. In the meantime, for anyone who wants to spend from a wallet without specifying input transactions, you can do it like this:

String transactionJson = "{" +
                        "\"inputs\":[{\"wallet_name\":\"" + WALLET_NAME + "\"," +
                        " \"wallet_token\":\"" + TOKEN + "\"}]," +
                        "\"outputs\":[{\"addresses\": [\"" + sendToAddress + "\"], " +
                        "\"value\": -1}]}"; // -1 means sweep all value from all addresses

                IntermediaryTransaction unsignedTx = context.getTransactionService().newTransaction(transactionJson);
quentinlesceller commented 4 years ago

I'm tagging this as help wanted as this would be really useful.