code: func signProposal(ctx contextApi.Client, proposal *pb.Proposal) (*pb.SignedProposal, error) {
  	proposalBytes, err := proto.Marshal(proposal)
  	if err != nil {
  		return nil, errors.Wrap(err, "mashal proposal failed")
  	}
  
  	signingMgr := ctx.SigningManager()
  	if signingMgr == nil {
  		return nil, errors.New("signing manager is nil")
  	}
  
  	signature, err := signingMgr.Sign(proposalBytes, ctx.PrivateKey())
  	if err != nil {
  		return nil, errors.WithMessage(err, "sign failed")
  	}
  
  	return &pb.SignedProposal{ProposalBytes: proposalBytes, Signature: signature}, nil
  }
docs: // signProposal creates a SignedProposal based on the current context.