# All files / server key.js

28.57% Statements 2/7
100% Branches 0/0
0% Functions 0/4
28.57% Lines 2/7

Press n or j to go to the next uncovered block, b, p or k for the previous block.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    241x
    1x

     import { expose } from 'postmsg-rpc'
    import { pre } from 'prepost'

    export default function (getIpfs, opts) {
      return {
        gen: expose('ipfs.key.gen', pre(
          opts.pre('key.gen'),
          (...args) => getIpfs().key.gen(...args)
        ), opts),
        list: expose('ipfs.key.list', pre(
          opts.pre('key.list'),
          () => getIpfs().key.list()
        ), opts),
        rename: expose('ipfs.key.rename', pre(
          opts.pre('key.rename'),
          (...args) => getIpfs().key.rename(...args)
        ), opts),
        rm: expose('ipfs.key.rm', pre(
          opts.pre('key.rm'),
          (...args) => getIpfs().key.rm(...args)
        ), opts)
      }
    }