UNPKG

@exromany/lido-csm-sdk

Version:

[![GitHub license](https://img.shields.io/github/license/lidofinance/lido-csm-sdk?color=limegreen)](https://github.com/lidofinance/lido-csm-sdk/blob/main/LICENSE.txt) [![Version npm](https://img.shields.io/npm/v/@lidofinance/lido-csm-sdk?label=version)](h

10 lines 395 B
import { isAddressEqual } from 'viem'; import { findIndexAndLeaf } from './find-index-and-leaf.js'; export const findAddressProof = (tree, address) => { const [index, leaf] = findIndexAndLeaf(tree, (leaf) => isAddressEqual(leaf[0], address)); if (index !== undefined && leaf) { return tree.getProof(index); } return null; }; //# sourceMappingURL=find-address-proof.js.map