// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.

package tangled

// schema: sh.tangled.knot.version

import (
	"context"

	"github.com/bluesky-social/indigo/lex/util"
)

const (
	KnotVersionNSID = "sh.tangled.knot.version"
)

// KnotVersion_Output is the output of a sh.tangled.knot.version call.
type KnotVersion_Output struct {
	// capabilities: Protocol capability tokens this knot implements, such as knot-acl. Knots that omit this field are treated as legacy.
	Capabilities []string `json:"capabilities,omitempty" cborgen:"capabilities,omitempty"`
	Version      string   `json:"version" cborgen:"version"`
}

// KnotVersion calls the XRPC method "sh.tangled.knot.version".
func KnotVersion(ctx context.Context, c util.LexClient) (*KnotVersion_Output, error) {
	var out KnotVersion_Output
	if err := c.LexDo(ctx, util.Query, "", "sh.tangled.knot.version", nil, nil, &out); err != nil {
		return nil, err
	}

	return &out, nil
}
