Tomasz Drwięga
@tomusdrw
Parity Technologies
6th Dec, Tech Deep Dive
Core & Protocol Development
(Rust)
Second Layer / Middleware
(Node.js / Rust)
Dapps/UI
& Dev. Libraries (JavaScript)
Pluggable consensus
Standards compliant
id.parity.io, sms-verification.parity.io, email-verification.parity.io
// npm i oo7-parity
import {Bonds, hexToAscii} from 'oo7-parity'
const bonds = Bonds()
// A bond for latest block number
bonds.blockNumber
.tie(console.log) // 5971971
// A bond for latest block extra data
bonds.blocks[bonds.blockNumber]
.extraData
.map(hexToAscii)
.tie(console.log) // Parity.1.7
// npm i oo7-parity
import {Bonds, formatBalance} from 'oo7-parity'
const bonds = Bonds()
bonds.balance(bonds.me)
.map(formatBalance)
.tie(console.log) // 4.45 ETH
Bonds also work for contract queries and transactions
// Import reactive element
import {Rspan} from 'oo7-react'
import {Bonds, formatBalance} from 'oo7-parity'
const bond = new Bond()
class App extends Component {
render() {
return (
<Rspan>
{bonds.me} has
{bonds.balance(bonds.me).map(formatBalance)}
</Rspan>
);
}
}
import {Bonds} from 'oo7-parity'
import {AccountIcon} from 'parity-reactive-ui'
const bonds = Bonds();
class App extends React.Component {
render () {
return (
<AccountIcon address={bonds.me} />
)
}
}
Tomasz Drwięga
@tomusdrw
Parity Technologies