Package com.xeiam.xchange.blockchain.dto

Examples of com.xeiam.xchange.blockchain.dto.BitcoinAddress


    // Read in the JSON from the example resources
    InputStream is = AddressJSONTest.class.getResourceAsStream("/address.json");

    ObjectMapper mapper = new ObjectMapper();
    mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
    BitcoinAddress address = mapper.readValue(is, BitcoinAddress.class);

    // Verify that the example data was unmarshalled correctly
    assertThat(address.getNumTransactions()).isEqualTo(59);
    assertThat(address.getFinalBalance()).isEqualTo(78399012);
    assertThat(address.getFinalBalanceDecimal()).isEqualTo(new BigDecimal(".78399012"));
    assertThat(address.getAddress()).isEqualTo("17dQktcAmU4urXz7tGk2sbuiCqykm3WLs6");
  }
View Full Code Here


  public static void main(String[] args) throws IOException {

    Exchange blockchainExchangexchange = ExchangeFactory.INSTANCE.createExchange(BlockchainExchange.class.getName());
    Blockchain blockchain = RestProxyFactory.createProxy(Blockchain.class, blockchainExchangexchange.getExchangeSpecification().getPlainTextUri());

    BitcoinAddress bitcoinAddress = blockchain.getBitcoinAddress("17dQktcAmU4urXz7tGk2sbuiCqykm3WLs6");
    System.out.println(bitcoinAddress.toString());

    BitcoinAddresses bitcoinAddresses = blockchain.getBitcoinAddresses("17dQktcAmU4urXz7tGk2sbuiCqykm3WLs6|15MvtM8e3bzepmZ5vTe8cHvrEZg6eDzw2w");
    for (BitcoinAddress bitcoinAddress2 : bitcoinAddresses.getBitcoinAddresses()) {
      System.out.println(bitcoinAddress2.toString());
    }
View Full Code Here

TOP

Related Classes of com.xeiam.xchange.blockchain.dto.BitcoinAddress

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.