package cmtservice

import (
	"context"

	coretypes "git.cw.tr/mukan-network/mukan-consensus/rpc/core/types"

	"git.cw.tr/mukan-network/mukan-sdk/client"
)

func getValidators(ctx context.Context, clientCtx client.Context, height *int64, page, limit int) (*coretypes.ResultValidators, error) {
	node, err := clientCtx.GetNode()
	if err != nil {
		return nil, err
	}
	return node.Validators(ctx, height, &page, &limit)
}
