UNPKG

xud

Version:
19 lines 952 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isPeerOrder = exports.isOwnOrder = exports.PlaceOrderEventType = void 0; var PlaceOrderEventType; (function (PlaceOrderEventType) { PlaceOrderEventType[PlaceOrderEventType["Match"] = 0] = "Match"; PlaceOrderEventType[PlaceOrderEventType["SwapSuccess"] = 1] = "SwapSuccess"; PlaceOrderEventType[PlaceOrderEventType["RemainingOrder"] = 2] = "RemainingOrder"; PlaceOrderEventType[PlaceOrderEventType["SwapFailure"] = 3] = "SwapFailure"; })(PlaceOrderEventType = exports.PlaceOrderEventType || (exports.PlaceOrderEventType = {})); function isOwnOrder(order) { return order.peerPubKey === undefined && typeof order.localId === 'string'; } exports.isOwnOrder = isOwnOrder; function isPeerOrder(order) { return order.localId === undefined && typeof order.peerPubKey === 'string'; } exports.isPeerOrder = isPeerOrder; //# sourceMappingURL=types.js.map