Code Monkey home page Code Monkey logo

blockchain's Introduction

Alan Evans

Android Engineer at Zillow.

Previously Signal, Twitter, New York Times

Many recent public contributions have been under my alan-signal profile.

Public contributions

Writing

Fun fact

  • In 2019 I wrote a genetic algorithm to take the BF-joust hill at zem.fi/bfjoust. After 100M individual bots were tested across thousands of generations over 24 hrs and rated both on their ability to beat the other bots on the hill and minimal program length, an almost unbeatable bot emerged which I named after one of my cats. Today, westonian.Sookie still holds the hill if you want to take a shot!

blockchain's People

Contributors

westonal avatar

Watchers

 avatar

blockchain's Issues

Create basic UI

AC:

  • UI with databinding and View model class(es)
  • Scrollable list of transactions

Challenge

Display a scrollable list of transactions retrieved from our multiaddress API.

Each item should at least have a BTC value, some indication if money was sent or received and a transaction time.

Details

Retrieve the data via GET https://blockchain.info/multiaddr?active=xpub6CfLQa8fLgtouvLxrb8EtvjbXfoC1yqzH6YbTJw4dP7srt523AhcMV8Uh4K3TWSHz9oDWmn9MuJogzdGU3ncxkBsAC9wFBLmFrWT9Ek81kQ. You are welcome to use your own xPub or address if you so wish.

An example response can be found here.

Much of the information can be discarded for the purpose of this challenge. The information you’ll be most interested in is as follows:

“wallet” -> “final_balance” - the current balance of the xPub or address, in Satoshis

“txs” -> “result” - the amount sent to or sent from the xPub or address. Negative balances (“-123456”) are sent from the wallet

“txs” -> “time” - the timestamp of the transaction

“txs” -> “out” - an array of the outputs of the transaction. Transactions can have multiple outputs, but the majority only have two. One is a “change” output that is returned to the wallet and should be ignored if you’re planning on displaying the recipient’s address. A “change” output easily spotted because the output has an “xpub” -> “m” field which matches the xPub parameter in the multiaddress call

“txs” -> “hash” - a unique identifier for each transaction

“txs” -> “fee” - the total fee for the transaction

All values in the response JSON are in Satoshis. 1 BTC is found by dividing the Satoshi value by 1e8, rounded to 8 significant figures.

Hints

The challenge is deliberately quite open ended; you can do as much or as little as you see fit. However there are a few things that we’d like to see:

  • Kotlin preferred, although please use Java if you’re more comfortable
  • Some testing, Unit and/or integration and/or UI
  • Some use of RxJava
  • Some use of your preferred dependency injection framework
  • A nice Material Design UI is a plus, as is handling loading/content/failure states
  • Leave us notes! If you want to explain what you were thinking or trying to achieve, document it in code.

Error handling

AC:

  • Don't crash in any error, e.g. failure to connect to server
  • Allow user to retry in event of any error

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.