func CalcInclusionProofNodeAddresses(size, index int64) ([]NodeFetch, error) {
	if size < 1 {
		return nil, status.Errorf(codes.InvalidArgument, "invalid parameter for inclusion proof: size %d < 1", size)
	}
	if index >= size {
		return nil, status.Errorf(codes.InvalidArgument, "invalid parameter for inclusion proof: index %d is >= size %d", index, size)
	}
	if index < 0 {
		return nil, status.Errorf(codes.InvalidArgument, "invalid parameter for inclusion proof: index %d is < 0", index)
	}
	return proofNodes(uint64(index), 0, uint64(size), true), nil
}
CalcInclusionProofNodeAddresses returns the tree node IDs needed to build an
inclusion proof for a specified tree size and leaf index. All the returned
nodes represent complete subtrees in the tree of this size or above.

Use Rehash function to compose the proof after the node hashes are fetched.
package merkle
import (
	"errors"
	"math/bits"
	"github.com/google/trillian/merkle/compact"
	"google.golang.org/grpc/codes"
	"google.golang.org/grpc/status"
)
type NodeFetch struct {
	ID     compact.NodeID
	Rehash bool
}