@quirks/core
Version:
15 lines (14 loc) • 380 B
JavaScript
import { assertIsDefined as e } from "./index8.js";
function a(s, p = []) {
var i, n;
let t;
typeof s == "string" ? t = p.find((c) => c.chain_name === s) : t = s, e(t), e((i = t.apis) == null ? void 0 : i.rpc), e((n = t.apis) == null ? void 0 : n.rest);
const r = t.apis.rpc[0], o = t.apis.rest[0];
return {
rpc: r,
rest: o
};
}
export {
a as getEndpoint
};