// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import {InternalLeanIMT, LeanIMTData} from "./InternalLeanIMT.sol"; library LeanIMT { using InternalLeanIMT for *; function insert(LeanIMTData storage self, uint256 leaf) public returns (uint256) { return InternalLeanIMT._insert(self, leaf); } function insertMany(LeanIMTData storage self, uint256[] calldata leaves) public returns (uint256) { return InternalLeanIMT._insertMany(self, leaves); } function update( LeanIMTData storage self, uint256 oldLeaf, uint256 newLeaf, uint256[] calldata siblingNodes ) public returns (uint256) { return InternalLeanIMT._update(self, oldLeaf, newLeaf, siblingNodes); } function remove( LeanIMTData storage self, uint256 oldLeaf, uint256[] calldata siblingNodes ) public returns (uint256) { return InternalLeanIMT._remove(self, oldLeaf, siblingNodes); } function has(LeanIMTData storage self, uint256 leaf) public view returns (bool) { return InternalLeanIMT._has(self, leaf); } function indexOf(LeanIMTData storage self, uint256 leaf) public view returns (uint256) { return InternalLeanIMT._indexOf(self, leaf); } function root(LeanIMTData storage self) public view returns (uint256) { return InternalLeanIMT._root(self); } }