0

I want to use the compressed NFT SDK from Tensor to create and delist NFTs.

Using the DAS API I would like to know how I can get the root.

Fetching using fetchMerkleTree from umi I get the changeLogs and I do not know how to proceed from here.

    const merkleTreeAccount = await fetchMerkleTree(umi, merkleTree)

1 Answer 1

2

You can access the root of your fetched Merkle Tree account using the getCurrentRoot helper function like so:

const merkleTreeAccount = await fetchMerkleTree(umi, merkleTree);
const root = getCurrentRoot(merkleTreeAccount.tree)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.