func (e *Engine) SignedKeyringV1(ctx context.Context, body *primitive.KeyringV1,
	sigID *identity.ID, sigKP *SignatureKeyPair) (*envelope.KeyringV1, error) {
	id, sig, err := e.signAndID(ctx, body, sigID, sigKP)
	if err != nil {
		return nil, err
	}
	return &envelope.KeyringV1{
		ID:        id,
		Version:   uint8(body.Version()),
		Body:      body,
		Signature: *sig,
	}, nil
}
SignedKeyringV1 returns a KeyringV1Envelope that is signed, and includes
a tamper-proof ID.
package crypto
import (
	"context"
	"github.com/manifoldco/torus-cli/envelope"
	"github.com/manifoldco/torus-cli/identity"
	"github.com/manifoldco/torus-cli/primitive"
)
func (e *Engine) SignedPublicKey(ctx context.Context, body *primitive.PublicKey,
	sigID *identity.ID, sigKP *SignatureKeyPair) (*envelope.PublicKey, error) {
	id, sig, err := e.signAndID(ctx, body, sigID, sigKP)
	if err != nil {
		return nil, err
	}
	return &envelope.PublicKey{
		ID:        id,
		Version:   uint8(body.Version()),
		Body:      body,
		Signature: *sig,
	}, nil
}
func (e *Engine) SignedPrivateKey(ctx context.Context, body *primitive.PrivateKey,
	sigID *identity.ID, sigKP *SignatureKeyPair) (*envelope.PrivateKey, error) {
	id, sig, err := e.signAndID(ctx, body, sigID, sigKP)
	if err != nil {
		return nil, err
	}
	return &envelope.PrivateKey{
		ID:        id,
		Version:   uint8(body.Version()),
		Body:      body,
		Signature: *sig,
	}, nil
}
func (e *Engine) SignedClaim(ctx context.Context, body *primitive.Claim,
	sigID *identity.ID, sigKP *SignatureKeyPair) (*envelope.Claim, error) {
	id, sig, err := e.signAndID(ctx, body, sigID, sigKP)
	if err != nil {
		return nil, err
	}
	return &envelope.Claim{
		ID:        id,
		Version:   uint8(body.Version()),
		Body:      body,
		Signature: *sig,
	}, nil
}