Add better modals to ethereum:elements

ethereum:elements gives you useful elements to make building a dapp more fun. One element, which was there since a while has now got a better API. Instead of realing on iron:router, it uses now a global object called EthElements.Modal to show and hide modals, read below to see how you can make use of them. Note that when you use the modals in combination with the dapp-styles, they look even more awesome! To start just place a modal placeholder before the closing body tag. {{> dapp_modalPlaceholder}} Render without route To render the modal simply call: EthElements.Modal.show(‘myContentTemplate’); // Or with data for the template EthElements.Modal.show({ template: ‘myContentTemplate’, data: { myData: ‘some …

Improved ethereum:tools and ethereum:elements

Right when kraken.com starts trading I’ve add a new EthTools.formatBalance() method to the ethereum:tools package, which allows you to display an ethereum wei value in any ether unit or supported currency from kraken (BTC, USD, EUR, CAD, GBP and JPY). Simply use: // HTML/Blaze {{dapp_formatBalance “1000000000000000000” “0,0.00[0000] UNIT” “btc”}} // JS EthTools.formatBalance(“1000000000000000000”, “0,0.00[0000] UNIT”, “btc”) // “0.012345 BTC” I’ve also add a special EthTools.toWei() method, which allows you to convert e.g. BTC to to wei: var wei = EthTools.toWei(23, ‘btc’); // wei = “80000000000000000000” There are many more helpful methods (EthTools.formatNumber(), EthTools.setUnit(), EthTools.getUnit, EthTools.ticker, EthTools.setLocale()) in that package take a look its readme for more. Note that the ethereum:tools package …

Ethereum Meteor package updates

I add a new element to the ethereum:elements package, which gives you a simple account select with identicon: Additionally I improved the {{> dapp_addressInput}} to it now removes whitespaces and adds the 0x to any address. Also take a look at the new improved ethereum:tools, ethereum:accounts and ethereum:blocks package. https://atmospherejs.com/ethereum (ethereum:tools works also without meteor, by simply linking the ethtools.js) If you wonder how to get the static files of your meteor dapp check out meteor-build-client.