UNPKG

@morpho-org/midnight-sdk

Version:

Viem-based package for Morpho Midnight that exports protocol utilities, fetch helpers, and Midnight API utilities under a dedicated API subpath.

13 lines (12 loc) • 602 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.parseStandardRatifierTree = parseStandardRatifierTree; const errors_js_1 = require("../errors.js"); const Tree_js_1 = require("./Tree.js"); /** @internal Parses tagged standard-ratifier inputs and rejects legacy or mismatched routes. */ function parseStandardRatifierTree(tree, expected) { if (tree.type !== expected) { throw new errors_js_1.InvalidTreeError(`Expected a "${expected}" tree. Create a tree with an explicit matching ratifier type.`); } return Tree_js_1.Tree.fromDescriptor(tree); }