# internal/adapters/sign

Package sign signs receipts with an Ed25519 private key kept on the host, and refuses a key file that its group or other users can read.

## Ed25519Signer

```go
type Ed25519Signer struct {
	PrivateKeyPath string
}
```

Ed25519Signer loads an on-host private key and signs canonical receipt bytes.

- `PrivateKeyPath: string`: 

## Sign

```go
func (s Ed25519Signer) Sign(body receipt.Body) (receipt.DetachedSignature, error)
```

Sign signs the canonical receipt body and returns its detached signature.

## SignCanonical

```go
func (s Ed25519Signer) SignCanonical(canonical []byte) (receipt.DetachedSignature, error)
```

SignCanonical signs caller-supplied canonical receipt bytes.
