async init(username, seed) {
    this.username = username

    this.seed = seed
    this.id = nacl.sign.keyPair.fromSeed(this.seed)
    this.pubkey = bin(this.id.publicKey)

    this.block_keypair = nacl.sign.keyPair.fromSeed(sha3('block' + this.seed))
    this.block_pubkey = bin(this.block_keypair.publicKey).toString('hex')

    this.box = nacl.box.keyPair.fromSecretKey(this.seed)

    PK.username = username
    PK.seed = seed.toString('hex')
    PK.usedBanks = [1]
    PK.usedAssets = [1, 2]

    if (K) {
      // use 1st bank by default
      require('./internal_rpc/with_channel')({
        method: 'setLimits',
        they_pubkey: K.banks[0].pubkey,
        asset: 1,
        rebalance: K.rebalance,
        credit: K.credit
      })
    }

    await promise_writeFile(datadir + '/offchain/pk.json', JSON.stringify(PK))
  }
// derives needed keys from the seed, saves creds into pk.json
derives needed keys from the seed, saves creds into pk.json
derives needed keys from the seed saves creds into pk . json
async init(username, seed) {
    this.username = username
    this.seed = seed
    this.id = nacl.sign.keyPair.fromSeed(this.seed)
    this.pubkey = bin(this.id.publicKey)
    this.block_keypair = nacl.sign.keyPair.fromSeed(sha3('block' + this.seed))
    this.block_pubkey = bin(this.block_keypair.publicKey).toString('hex')
    this.box = nacl.box.keyPair.fromSecretKey(this.seed)
    PK.username = username
    PK.seed = seed.toString('hex')
    PK.usedBanks = [1]
    PK.usedAssets = [1, 2]
    if (K) {
      require('./internal_rpc/with_channel')({
        method: 'setLimits',
        they_pubkey: K.banks[0].pubkey,
        asset: 1,
        rebalance: K.rebalance,
        credit: K.credit
      })
    }
    await promise_writeFile(datadir + '/offchain/pk.json', JSON.stringify(PK))
  }
async init ( username , seed ) { this . username = username this . seed = seed this . id = nacl . sign . keyPair . fromSeed ( this . seed ) this . pubkey = bin ( this . id . publicKey ) this . block_keypair = nacl . sign . keyPair . fromSeed ( sha3 ( 'block' + this . seed ) ) this . block_pubkey = bin ( this . block_keypair . publicKey ) . toString ( 'hex' ) this . box = nacl . box . keyPair . fromSecretKey ( this . seed ) PK . username = username PK . seed = seed . toString ( 'hex' ) PK . usedBanks = [ 1 ] PK . usedAssets = [ 1 , 2 ] if ( K ) { require ( './internal_rpc/with_channel' ) ( { method : 'setLimits' , they_pubkey : K . banks [ 0 ] . pubkey , asset : 1 , rebalance : K . rebalance , credit : K . credit } ) } await promise_writeFile ( datadir + '/offchain/pk.json' , JSON . stringify ( PK ) ) }
derives needed keys from the seed, saves creds into pk.json
derives needed keys from the seed saves creds into pk . json
// use 1st bank by default