aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/mist/assets/ext/qml_messaging.js
blob: 8222c848d7632629e0247e9a9dcc99ec319f770a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
function HandleMessage(data) {
    var message;
    try { message = JSON.parse(data) } catch(e) {};

    if(message) {
        switch(message.type) {
            case "coinbase":
                return eth.coinBase();
            case "block":
                return eth.blockByNumber(0);
        }
    }
}