UNPKG

@ledgerhq/live-common

Version:
32 lines 1.32 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.toScanAccountEventRaw = exports.fromScanAccountEventRaw = exports.getAccountBridge = exports.getCurrencyBridge = void 0; const account_1 = require("../account"); var impl_1 = require("./impl"); Object.defineProperty(exports, "getCurrencyBridge", { enumerable: true, get: function () { return impl_1.getCurrencyBridge; } }); Object.defineProperty(exports, "getAccountBridge", { enumerable: true, get: function () { return impl_1.getAccountBridge; } }); function fromScanAccountEventRaw(raw) { switch (raw.type) { case "discovered": return { type: raw.type, account: (0, account_1.fromAccountRaw)(raw.account), }; default: throw new Error("unsupported ScanAccountEvent " + raw.type); } } exports.fromScanAccountEventRaw = fromScanAccountEventRaw; function toScanAccountEventRaw(e) { switch (e.type) { case "discovered": return { type: e.type, account: (0, account_1.toAccountRaw)(e.account), }; default: throw new Error("unsupported ScanAccountEvent " + e.type); } } exports.toScanAccountEventRaw = toScanAccountEventRaw; //# sourceMappingURL=index.js.map