Config holds the configuration for creation of a Signer
type Config struct {
MSPID string
IdentityPath string
KeyPath string
}
type ECDSASignature struct {
R, S *big.Int
}
Signer signs messages. TODO: Ideally we'd use an MSP to be agnostic, but since it's impossible to initialize an MSP without a CA cert that signs the signing identity, this will do for now.
type Signer struct {
Creator []byte
// contains filtered or unexported fields
}
func NewSigner(conf Config) (*Signer, error)
NewSigner creates a new Signer out of the given configuration
func (si *Signer) NewSignatureHeader() (*common.SignatureHeader, error)
func (si *Signer) Sign(msg []byte) ([]byte, error)