@@ -8,9 +8,9 @@ import { RequiredInput, InnerLabel } from '../components/Base'
8import StatelessTransaction from '../components/StatelessTransaction'
8import StatelessTransaction from '../components/StatelessTransaction'
9import { BRIDGE_ERROR } from '../lib/error'
9import { BRIDGE_ERROR } from '../lib/error'
10import { ROUTE_NAMES } from '../lib/router'
10import { ROUTE_NAMES } from '../lib/router'
11−import { attemptSeedDerivation } from '../lib/keys'
11+import { attemptSeedDerivation, genKey } from '../lib/keys'
13+import saveAs from 'file-saver'
15import { WALLET_NAMES } from '../lib/wallet'
15import { WALLET_NAMES } from '../lib/wallet'
@@ -236,14 +236,35 @@ class SetKeys extends React.Component {
239+ downloadKeyfile(networkSeed) {
240+ const { pointCache } = this.props
241+ const { pointCursor } = this.props
243+ const point = pointCursor.matchWith({
244+ Just: (pt) => pt.value,
246+ throw BRIDGE_ERROR.MISSING_POINT
250+ const pointDetails =
253+ : (() => { throw BRIDGE_ERROR.MISSING_POINT })()
255+ const revision = parseInt(pointDetails.keyRevisionNumber)
256+ const keyfile = genKey(networkSeed, point, revision)
257+ let blob = new Blob([keyfile], {type:"text/plain;charset=utf-8"});
258+ saveAs(blob, `${ob.patp(point).slice(1)}-${revision}.key`)
241 handleSubmit(){
261 handleSubmit(){
242 const { props, state } = this
262 const { props, state } = this
243 sendSignedTransaction(props.web3.value, state.stx)
263 sendSignedTransaction(props.web3.value, state.stx)
244 .then(sent => {
264 .then(sent => {
245− props.setTxnHashCursor(sent)
246 props.setNetworkSeedCache(this.state.networkSeed)
265 props.setNetworkSeedCache(this.state.networkSeed)
266+ this.downloadKeyfile(this.state.networkSeed)
267+ props.setTxnHashCursor(sent)
247 props.popRoute()
268 props.popRoute()
248 props.pushRoute(ROUTE_NAMES.SENT_TRANSACTION)
269 props.pushRoute(ROUTE_NAMES.SENT_TRANSACTION)
@@ -333,15 +354,7 @@ class SetKeys extends React.Component {
336− `Please enter a network seed for generating and setting your public
357+ `Set new authentication and encryption keys for your Arvo ship. Once the transaction is sent, a keyfile will be downloaded, enabling you to instantiate your ship on the network.`
337− network authentication and encryption keys. Your network seed
338− must be a string of 64 characters (containing 0-9, A-Z, a-z).`
343− `If you've authenticated with a master ticket or management proxy
344− mnemonic, a seed will be generated for you automatically.`