1
0
mirror of https://github.com/oceanprotocol-archive/squid-js.git synced 2024-02-02 15:31:51 +01:00

added env

This commit is contained in:
Sebastian Gerske 2018-08-31 16:26:23 +02:00
parent 97b891925b
commit 9cbb52dbed
5 changed files with 477 additions and 209 deletions

View File

@ -1,5 +1,6 @@
{ {
"presets": [ "presets": [
["env", { "useBuiltIns": true }],
"stage-2" "stage-2"
] ]
} }

View File

@ -1,22 +1,71 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _truffleContract = require('truffle-contract');
var _truffleContract2 = _interopRequireDefault(_truffleContract);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
import TruffleContract from 'truffle-contract'; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
const contracts = []; var contracts = [];
export default class ContractLoader { var ContractLoader = function () {
static _doLoad(what, where, provider) { function ContractLoader() {
return _asyncToGenerator(function* () { _classCallCheck(this, ContractLoader);
// console.log("Loading", what, "from", where)
const artifact = require(`@oceanprotocol/keeper-contracts/artifacts/${what}.${where}`);
const contract = TruffleContract(artifact);
contract.setProvider(provider);
contracts[what] = yield contract.at(artifact.address);
return contracts[what];
})();
} }
static load(what, where, provider) { _createClass(ContractLoader, null, [{
return contracts[what] || ContractLoader._doLoad(what, where, provider); key: '_doLoad',
} value: function () {
} var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(what, where, provider) {
var artifact, contract;
return regeneratorRuntime.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
// console.log("Loading", what, "from", where)
artifact = require('@oceanprotocol/keeper-contracts/artifacts/' + what + '.' + where);
contract = (0, _truffleContract2.default)(artifact);
contract.setProvider(provider);
_context.next = 5;
return contract.at(artifact.address);
case 5:
contracts[what] = _context.sent;
return _context.abrupt('return', contracts[what]);
case 7:
case 'end':
return _context.stop();
}
}
}, _callee, this);
}));
function _doLoad(_x, _x2, _x3) {
return _ref.apply(this, arguments);
}
return _doLoad;
}()
}, {
key: 'load',
value: function load(what, where, provider) {
return contracts[what] || ContractLoader._doLoad(what, where, provider);
}
}]);
return ContractLoader;
}();
exports.default = ContractLoader;

74
dist/ocean-agent.js vendored
View File

@ -1,31 +1,55 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/* global fetch */ /* global fetch */
export default class OceanAgent { var OceanAgent = function () {
constructor(connectionUrl) { function OceanAgent(connectionUrl) {
_classCallCheck(this, OceanAgent);
this.assetsUrl = connectionUrl + '/assets'; this.assetsUrl = connectionUrl + '/assets';
} }
getAssetsMetadata() { _createClass(OceanAgent, [{
return fetch(this.assetsUrl + '/metadata', { method: 'GET' }).then(res => res.json()).then(data => JSON.parse(data)); key: 'getAssetsMetadata',
} value: function getAssetsMetadata() {
return fetch(this.assetsUrl + '/metadata', { method: 'GET' }).then(function (res) {
publishDataAsset(asset) { return res.json();
return fetch(this.assetsUrl + '/metadata', { }).then(function (data) {
method: 'POST', return JSON.parse(data);
body: JSON.stringify(asset), });
headers: { 'Content-type': 'application/json' } }
}).then(response => { }, {
console.log('Success:', response); key: 'publishDataAsset',
if (response.ok) { value: function publishDataAsset(asset) {
return fetch(this.assetsUrl + '/metadata', {
method: 'POST',
body: JSON.stringify(asset),
headers: { 'Content-type': 'application/json' }
}).then(function (response) {
console.log('Success:', response); console.log('Success:', response);
return true; if (response.ok) {
} console.log('Success:', response);
console.log('Failed: ', response.status, response.statusText); return true;
return false; }
// throw new Error(response.statusText ? response.statusText : `publish asset failed with status ${response.status}`) console.log('Failed: ', response.status, response.statusText);
}).catch(error => { return false;
console.log(`Publish asset to ocean database could not be completed: ${error.message()}`); // throw new Error(response.statusText ? response.statusText : `publish asset failed with status ${response.status}`)
return false; }).catch(function (error) {
}); console.log('Publish asset to ocean database could not be completed: ' + error.message());
} return false;
} });
}
}]);
return OceanAgent;
}();
exports.default = OceanAgent;

509
dist/ocean-keeper.js vendored
View File

@ -1,193 +1,372 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _web = require('web3');
var _web2 = _interopRequireDefault(_web);
var _contractLoader = require('./contractLoader');
var _contractLoader2 = _interopRequireDefault(_contractLoader);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
import Web3 from 'web3'; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
import ContractLoader from "./contractLoader";
const DEFAULT_GAS = 300000; var DEFAULT_GAS = 300000;
export default class OceanKeeper { var OceanKeeper = function () {
constructor(uri, network) { function OceanKeeper(uri, network) {
const web3Provider = new Web3.providers.HttpProvider(uri); _classCallCheck(this, OceanKeeper);
this.web3 = new Web3(web3Provider);
var web3Provider = new _web2.default.providers.HttpProvider(uri);
this.web3 = new _web2.default(web3Provider);
this.defaultGas = DEFAULT_GAS; this.defaultGas = DEFAULT_GAS;
this.network = network || 'development'; this.network = network || 'development';
} }
initContracts() { _createClass(OceanKeeper, [{
var _this = this; key: 'initContracts',
value: function () {
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
return regeneratorRuntime.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return _contractLoader2.default.load('OceanToken', this.network, this.web3.currentProvider);
return _asyncToGenerator(function* () { case 2:
_this.oceanToken = yield ContractLoader.load('OceanToken', _this.network, _this.web3.currentProvider); this.oceanToken = _context.sent;
_this.oceanMarket = yield ContractLoader.load('OceanMarket', _this.network, _this.web3.currentProvider); _context.next = 5;
_this.oceanAuth = yield ContractLoader.load('OceanAuth', _this.network, _this.web3.currentProvider); return _contractLoader2.default.load('OceanMarket', this.network, this.web3.currentProvider);
return { case 5:
oceanToken: _this.oceanToken, this.oceanMarket = _context.sent;
oceanMarket: _this.oceanMarket, _context.next = 8;
oceanAuth: _this.oceanAuth return _contractLoader2.default.load('OceanAuth', this.network, this.web3.currentProvider);
};
})();
}
// web3 wrappers case 8:
sign(accountAddress, message) { this.oceanAuth = _context.sent;
return this.web3.eth.sign(accountAddress, message); return _context.abrupt('return', {
} oceanToken: this.oceanToken,
oceanMarket: this.oceanMarket,
oceanAuth: this.oceanAuth
});
getMessageHash(message) { case 10:
return this.web3.sha3(`\x19Ethereum Signed Message:\n${message.length}${message}`); case 'end':
} return _context.stop();
}
// call functions (costs no gas)
checkAsset(assetId) {
return this.oceanMarket.checkAsset(assetId);
}
getBalance(accountAddress) {
return this.oceanToken.balanceOf.call(accountAddress);
}
getAssetPrice(assetId) {
return this.oceanMarket.getAssetPrice(assetId).then(price => price.toNumber());
}
getOrderStatus(orderId) {
return this.oceanAuth.statusOfAccessRequest(orderId);
}
verifyOrderPayment(orderId) {
return this.oceanMarket.verifyPaymentReceived(orderId);
}
getEncryptedAccessToken(orderId, senderAddress) {
return this.oceanAuth.getEncryptedAccessToken(orderId, { from: senderAddress });
}
getConsumerOrders(consumerAddress) {
var _this2 = this;
return _asyncToGenerator(function* () {
let accessConsentEvent = _this2.oceanAuth.AccessConsentRequested({ _consumer: consumerAddress }, {
fromBlock: 0,
toBlock: 'latest'
});
let _resolve = null;
let _reject = null;
const promise = new Promise(function (resolve, reject) {
_resolve = resolve;
_reject = reject;
});
const getEvents = function () {
accessConsentEvent.get(function (error, logs) {
if (error) {
_reject(error);
throw new Error(error);
} else {
_resolve(logs);
} }
}); }, _callee, this);
return promise; }));
};
const events = yield getEvents().then(function (events) {
return events;
});
// let orders = await this.buildOrdersFromEvents(events, consumerAddress).then((result) => result)
let orders = events.filter(function (obj) {
return obj.args._consumer === consumerAddress;
}).map((() => {
var _ref = _asyncToGenerator(function* (event) {
return _extends({}, event.args, {
timeout: event.args._timeout.toNumber(),
status: yield _this2.getOrderStatus(event.args._id).then(function (status) {
return status.toNumber();
}),
paid: yield _this2.verifyOrderPayment(event.args._id).then(function (received) {
return received;
}),
key: null
});
});
return function (_x) { function initContracts() {
return _ref.apply(this, arguments); return _ref.apply(this, arguments);
}; }
})());
console.debug('got orders: ', orders);
return orders;
})();
}
// Transactions with gas cost return initContracts;
requestTokens(senderAddress, numTokens) { }()
return this.oceanMarket.requestTokens(numTokens, { from: senderAddress });
}
registerDataAsset(name, description, price, publisherAddress) { // web3 wrappers
var _this3 = this;
return _asyncToGenerator(function* () { }, {
const assetId = yield _this3.oceanMarket.generateId(name + description); key: 'sign',
const result = yield _this3.oceanMarket.register(assetId, price, { from: publisherAddress, gas: _this3.defaultGas }); value: function sign(accountAddress, message) {
console.log('registered: ', result); return this.web3.eth.sign(accountAddress, message);
return assetId; }
})(); }, {
} key: 'getMessageHash',
value: function getMessageHash(message) {
return this.web3.sha3('\x19Ethereum Signed Message:\n' + message.length + message);
}
sendPayment(assetId, order, publisherAddress, senderAddress) { // call functions (costs no gas)
var _this4 = this;
return _asyncToGenerator(function* () { }, {
let assetPrice = yield _this4.oceanMarket.getAssetPrice(assetId).then(function (price) { key: 'checkAsset',
value: function checkAsset(assetId) {
return this.oceanMarket.checkAsset(assetId);
}
}, {
key: 'getBalance',
value: function getBalance(accountAddress) {
return this.oceanToken.balanceOf.call(accountAddress);
}
}, {
key: 'getAssetPrice',
value: function getAssetPrice(assetId) {
return this.oceanMarket.getAssetPrice(assetId).then(function (price) {
return price.toNumber(); return price.toNumber();
}); });
_this4.oceanMarket.sendPayment(order.id, publisherAddress, assetPrice, order.timeout, { }
from: senderAddress, }, {
gas: 2000000 key: 'getOrderStatus',
}); value: function getOrderStatus(orderId) {
})(); return this.oceanAuth.statusOfAccessRequest(orderId);
} }
}, {
key: 'verifyOrderPayment',
value: function verifyOrderPayment(orderId) {
return this.oceanMarket.verifyPaymentReceived(orderId);
}
}, {
key: 'getEncryptedAccessToken',
value: function getEncryptedAccessToken(orderId, senderAddress) {
return this.oceanAuth.getEncryptedAccessToken(orderId, { from: senderAddress });
}
}, {
key: 'getConsumerOrders',
value: function () {
var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(consumerAddress) {
var _this = this;
cancelAccessRequest(orderId, senderAddress) { var accessConsentEvent, _resolve, _reject, promise, getEvents, events, orders;
return this.oceanAuth.cancelAccessRequest(orderId, { from: senderAddress });
}
orchestrateResourcePurchase(assetId, publisherId, price, privateKey, publicKey, timeout, senderAddress, initialRequestEventHandler, accessCommittedEventHandler, tokenPublishedEventHandler) { return regeneratorRuntime.wrap(function _callee3$(_context3) {
const { oceanToken, oceanMarket, oceanAuth } = this; while (1) {
// Allow OceanMarket contract to transfer funds on the consumer's behalf switch (_context3.prev = _context3.next) {
oceanToken.approve(oceanMarket.address, price, { from: senderAddress, gas: 2000000 }); case 0:
// Submit the access request accessConsentEvent = this.oceanAuth.AccessConsentRequested({ _consumer: consumerAddress }, {
oceanAuth.initiateAccessRequest(assetId, publisherId, publicKey, timeout, { from: senderAddress, gas: 1000000 }); fromBlock: 0,
toBlock: 'latest'
});
_resolve = null;
_reject = null;
promise = new Promise(function (resolve, reject) {
_resolve = resolve;
_reject = reject;
});
const resourceFilter = { _resourceId: assetId, _consumer: senderAddress }; getEvents = function getEvents() {
const initRequestEvent = oceanAuth.AccessConsentRequested(resourceFilter); accessConsentEvent.get(function (error, logs) {
let order = {}; if (error) {
this._listenOnce(initRequestEvent, 'AccessConsentRequested', (result, error) => { _reject(error);
order = initialRequestEventHandler(result, error); throw new Error(error);
const requestIdFilter = { _id: order.id }; } else {
const accessCommittedEvent = oceanAuth.AccessRequestCommitted(requestIdFilter); _resolve(logs);
const tokenPublishedEvent = oceanAuth.EncryptedTokenPublished(requestIdFilter); }
this._listenOnce(accessCommittedEvent, 'AccessRequestCommitted', (result, error) => { });
accessCommittedEventHandler(result, order, error); return promise;
}); };
this._listenOnce(tokenPublishedEvent, 'EncryptedTokenPublished', (result, error) => {
tokenPublishedEventHandler(result, order, error);
});
});
return order;
}
// Helper functions (private) _context3.next = 7;
_listenOnce(event, eventName, callback) { return getEvents().then(function (events) {
event.watch((error, result) => { return events;
event.stopWatching(); });
if (error) {
console.log(`Error in keeper ${eventName} event: `, error); case 7:
events = _context3.sent;
// let orders = await this.buildOrdersFromEvents(events, consumerAddress).then((result) => result)
orders = events.filter(function (obj) {
return obj.args._consumer === consumerAddress;
}).map(function () {
var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(event) {
return regeneratorRuntime.wrap(function _callee2$(_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
_context2.t0 = _extends;
_context2.t1 = {};
_context2.t2 = event.args;
_context2.t3 = event.args._timeout.toNumber();
_context2.next = 6;
return _this.getOrderStatus(event.args._id).then(function (status) {
return status.toNumber();
});
case 6:
_context2.t4 = _context2.sent;
_context2.next = 9;
return _this.verifyOrderPayment(event.args._id).then(function (received) {
return received;
});
case 9:
_context2.t5 = _context2.sent;
_context2.t6 = {
timeout: _context2.t3,
status: _context2.t4,
paid: _context2.t5,
key: null
};
return _context2.abrupt('return', (0, _context2.t0)(_context2.t1, _context2.t2, _context2.t6));
case 12:
case 'end':
return _context2.stop();
}
}
}, _callee2, _this);
}));
return function (_x2) {
return _ref3.apply(this, arguments);
};
}());
console.debug('got orders: ', orders);
return _context3.abrupt('return', orders);
case 11:
case 'end':
return _context3.stop();
}
}
}, _callee3, this);
}));
function getConsumerOrders(_x) {
return _ref2.apply(this, arguments);
} }
callback(result, error);
}); return getConsumerOrders;
} }()
}
// Transactions with gas cost
}, {
key: 'requestTokens',
value: function requestTokens(senderAddress, numTokens) {
return this.oceanMarket.requestTokens(numTokens, { from: senderAddress });
}
}, {
key: 'registerDataAsset',
value: function () {
var _ref4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(name, description, price, publisherAddress) {
var assetId, result;
return regeneratorRuntime.wrap(function _callee4$(_context4) {
while (1) {
switch (_context4.prev = _context4.next) {
case 0:
_context4.next = 2;
return this.oceanMarket.generateId(name + description);
case 2:
assetId = _context4.sent;
_context4.next = 5;
return this.oceanMarket.register(assetId, price, { from: publisherAddress, gas: this.defaultGas });
case 5:
result = _context4.sent;
console.log('registered: ', result);
return _context4.abrupt('return', assetId);
case 8:
case 'end':
return _context4.stop();
}
}
}, _callee4, this);
}));
function registerDataAsset(_x3, _x4, _x5, _x6) {
return _ref4.apply(this, arguments);
}
return registerDataAsset;
}()
}, {
key: 'sendPayment',
value: function () {
var _ref5 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5(assetId, order, publisherAddress, senderAddress) {
var assetPrice;
return regeneratorRuntime.wrap(function _callee5$(_context5) {
while (1) {
switch (_context5.prev = _context5.next) {
case 0:
_context5.next = 2;
return this.oceanMarket.getAssetPrice(assetId).then(function (price) {
return price.toNumber();
});
case 2:
assetPrice = _context5.sent;
this.oceanMarket.sendPayment(order.id, publisherAddress, assetPrice, order.timeout, {
from: senderAddress,
gas: 2000000
});
case 4:
case 'end':
return _context5.stop();
}
}
}, _callee5, this);
}));
function sendPayment(_x7, _x8, _x9, _x10) {
return _ref5.apply(this, arguments);
}
return sendPayment;
}()
}, {
key: 'cancelAccessRequest',
value: function cancelAccessRequest(orderId, senderAddress) {
return this.oceanAuth.cancelAccessRequest(orderId, { from: senderAddress });
}
}, {
key: 'orchestrateResourcePurchase',
value: function orchestrateResourcePurchase(assetId, publisherId, price, privateKey, publicKey, timeout, senderAddress, initialRequestEventHandler, accessCommittedEventHandler, tokenPublishedEventHandler) {
var _this2 = this;
var oceanToken = this.oceanToken,
oceanMarket = this.oceanMarket,
oceanAuth = this.oceanAuth;
// Allow OceanMarket contract to transfer funds on the consumer's behalf
oceanToken.approve(oceanMarket.address, price, { from: senderAddress, gas: 2000000 });
// Submit the access request
oceanAuth.initiateAccessRequest(assetId, publisherId, publicKey, timeout, { from: senderAddress, gas: 1000000 });
var resourceFilter = { _resourceId: assetId, _consumer: senderAddress };
var initRequestEvent = oceanAuth.AccessConsentRequested(resourceFilter);
var order = {};
this._listenOnce(initRequestEvent, 'AccessConsentRequested', function (result, error) {
order = initialRequestEventHandler(result, error);
var requestIdFilter = { _id: order.id };
var accessCommittedEvent = oceanAuth.AccessRequestCommitted(requestIdFilter);
var tokenPublishedEvent = oceanAuth.EncryptedTokenPublished(requestIdFilter);
_this2._listenOnce(accessCommittedEvent, 'AccessRequestCommitted', function (result, error) {
accessCommittedEventHandler(result, order, error);
});
_this2._listenOnce(tokenPublishedEvent, 'EncryptedTokenPublished', function (result, error) {
tokenPublishedEventHandler(result, order, error);
});
});
return order;
}
// Helper functions (private)
}, {
key: '_listenOnce',
value: function _listenOnce(event, eventName, callback) {
event.watch(function (error, result) {
event.stopWatching();
if (error) {
console.log('Error in keeper ' + eventName + ' event: ', error);
}
callback(result, error);
});
}
}]);
return OceanKeeper;
}();
exports.default = OceanKeeper;

21
dist/squid.js vendored
View File

@ -1,4 +1,19 @@
import OceanAgent from './ocean-agent'; 'use strict';
import OceanKeeper from './ocean-keeper';
export { OceanAgent, OceanKeeper }; Object.defineProperty(exports, "__esModule", {
value: true
});
exports.OceanKeeper = exports.OceanAgent = undefined;
var _oceanAgent = require('./ocean-agent');
var _oceanAgent2 = _interopRequireDefault(_oceanAgent);
var _oceanKeeper = require('./ocean-keeper');
var _oceanKeeper2 = _interopRequireDefault(_oceanKeeper);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.OceanAgent = _oceanAgent2.default;
exports.OceanKeeper = _oceanKeeper2.default;