1import React from 'react'
2import { Row, Col, H2, H4 } from '../../components/Base'
4import { ETH_ZERO_ADDR, eqAddr } from '../../lib/wallet'
7 '0x0000000000000000000000000000000000000000000000000000000000000000'
9const renderAddress = (addr) =>
10 eqAddr(addr, ETH_ZERO_ADDR)
15 <div><code>{ addr.slice(0, 14) }</code></div>
16 <div><code>{ addr.slice(14, 28) }</code></div>
17 <div><code>{ addr.slice(28) }</code></div>
20const renderNetworkKey = (hex) => {
21 const sl = i => hex.slice(i, i + 4)
22 const rowFrom = i => `${sl(i)}.${sl(i + 4)}.${sl(i + 8)}.${sl(i + 12)}`
29 <div><code>{ hex.slice(0, 2) }</code></div>
31 <code>{ rowFrom(2) }</code>
34 <code>{ rowFrom(18) }</code>
37 <code>{ rowFrom(34) }</code>
40 <code>{ rowFrom(50) }</code>
46const KeysAndMetadata = (props) => {
47 const { pointDetails } = props
52 <H2>{ 'Ownership and Proxy Addresses' }</H2>
55 <Col className={'flex flex-column items-start col-md-3'}>
58 pointDetails.matchWith({
59 Nothing: () => <div />,
60 Just: (deets) => renderAddress(deets.value.owner)
66 <Col className={'flex flex-column items-start col-md-3'}>
67 <H4>{ 'Transfer Proxy' }</H4>
69 pointDetails.matchWith({
70 Nothing: () => <div />,
71 Just: (deets) => renderAddress(deets.value.transferProxy)
77 <Col className={'flex flex-column items-start col-md-3'}>
78 <H4>{ 'Spawn Proxy' }</H4>
80 pointDetails.matchWith({
81 Nothing: () => <div />,
82 Just: (deets) => renderAddress(deets.value.spawnProxy)
88 <Col className={'flex flex-column items-start col-md-3'}>
89 <H4>{ 'Mgmt Proxy' }</H4>
91 pointDetails.matchWith({
92 Nothing: () => <div />,
93 Just: (deets) => renderAddress(deets.value.managementProxy)
100 <UrbitNetworking pointDetails={ pointDetails } />
108const UrbitNetworking = props => {
109 const { pointDetails } = props
111 const booted = pointDetails.matchWith({
113 Just: (details) => details.value.keyRevisionNumber > 0
122 <Col className={'flex flex-column items-start col-md-4'}>
123 <H4>{ 'Authentication' }</H4>
125 pointDetails.matchWith({
126 Nothing: () => <div />,
128 renderNetworkKey(deets.value.authenticationKey)
133 <Col className={'flex flex-column items-start col-md-4'}>
134 <H4>{ 'Encryption' }</H4>
136 pointDetails.matchWith({
137 Nothing: () => <div />,
139 renderNetworkKey(deets.value.encryptionKey)
144 <Col className={'flex flex-column items-start col-md-4'}>
145 <H4>{ 'Revision' }</H4>
147 pointDetails.matchWith({
149 Just: (deets) => deets.value.keyRevisionNumber
154 <H4>{ 'Continuity era' }</H4>
156 pointDetails.matchWith({
158 Just: (deets) => deets.value.continuityNumber
162 <H4>{ 'Crypto suite version' }</H4>
164 pointDetails.matchWith({
166 Just: (deets) => deets.value.cryptoSuiteVersion
174 <H2>{ 'Public Keys' }</H2>
181export default KeysAndMetadata
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list