# All files / lib/client index.js

100% Statements 32/32
100% Branches 4/4
100% Functions 2/2
100% Lines 32/32

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78

    1x

    1x

    1x

    1x

    1x

    1x

    1x

    1x

    1x

    1x

    1x

    1x

    1x

    1x

    1x

    1x

    1x

    1x

    1x

    1x

    1x

    1x

    1x

    1x

    11x

    1x
    19x

    19x
    19x
    19x
    19x

    19x
     'use strict';

    Object.defineProperty(exports, "__esModule", {
      value: true
    });

    var _postmsgRpc = require('postmsg-rpc');

    var _callbackify = require('callbackify');

    var _callbackify2 = _interopRequireDefault(_callbackify);

    var _block = require('./block');

    var _block2 = _interopRequireDefault(_block);

    var _config = require('./config');

    var _config2 = _interopRequireDefault(_config);

    var _dag = require('./dag');

    var _dag2 = _interopRequireDefault(_dag);

    var _dht = require('./dht');

    var _dht2 = _interopRequireDefault(_dht);

    var _files = require('./files');

    var _files2 = _interopRequireDefault(_files);

    var _key = require('./key');

    var _key2 = _interopRequireDefault(_key);

    var _object = require('./object');

    var _object2 = _interopRequireDefault(_object);

    var _pin = require('./pin');

    var _pin2 = _interopRequireDefault(_pin);

    var _pubsub = require('./pubsub');

    var _pubsub2 = _interopRequireDefault(_pubsub);

    var _swarm = require('./swarm');

    var _swarm2 = _interopRequireDefault(_swarm);

    function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

    exports.default = function (opts) {
      var ipfs = {
        id: (0, _callbackify2.default)((0, _postmsgRpc.caller)('ipfs.id', opts)),
        version: (0, _callbackify2.default)((0, _postmsgRpc.caller)('ipfs.version', opts)),
        dns: _callbackify2.default.variadic((0, _postmsgRpc.caller)('ipfs.dns', opts)),
        block: (0, _block2.default)(opts),
        config: (0, _config2.default)(opts),
        dag: (0, _dag2.default)(opts),
        dht: (0, _dht2.default)(opts),
        files: (0, _files2.default)(opts),
        key: (0, _key2.default)(opts),
        object: (0, _object2.default)(opts),
        pin: (0, _pin2.default)(opts),
        pubsub: (0, _pubsub2.default)(opts),
        swarm: (0, _swarm2.default)(opts)

        // Aliases
      };ipfs.add = ipfs.files.add;
      ipfs.ls = ipfs.files.ls;
      ipfs.lsReadableStream = ipfs.files.lsReadableStream;
      ipfs.lsPullStream = ipfs.files.lsPullStream;

      return ipfs;
    };