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

package atproto

// schema: com.atproto.identity.signPlcOperation

import (
	"context"

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

// IdentitySignPlcOperation_Input is the input argument to a com.atproto.identity.signPlcOperation call.
type IdentitySignPlcOperation_Input struct {
	AlsoKnownAs  []string                 `json:"alsoKnownAs,omitempty" cborgen:"alsoKnownAs,omitempty"`
	RotationKeys []string                 `json:"rotationKeys,omitempty" cborgen:"rotationKeys,omitempty"`
	Services     *util.LexiconTypeDecoder `json:"services,omitempty" cborgen:"services,omitempty"`
	// token: A token received through com.atproto.identity.requestPlcOperationSignature
	Token               *string                  `json:"token,omitempty" cborgen:"token,omitempty"`
	VerificationMethods *util.LexiconTypeDecoder `json:"verificationMethods,omitempty" cborgen:"verificationMethods,omitempty"`
}

// IdentitySignPlcOperation_Output is the output of a com.atproto.identity.signPlcOperation call.
type IdentitySignPlcOperation_Output struct {
	// operation: A signed DID PLC operation.
	Operation *util.LexiconTypeDecoder `json:"operation" cborgen:"operation"`
}

// IdentitySignPlcOperation calls the XRPC method "com.atproto.identity.signPlcOperation".
func IdentitySignPlcOperation(ctx context.Context, c *xrpc.Client, input *IdentitySignPlcOperation_Input) (*IdentitySignPlcOperation_Output, error) {
	var out IdentitySignPlcOperation_Output
	if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.identity.signPlcOperation", nil, input, &out); err != nil {
		return nil, err
	}

	return &out, nil
}
