def sign.key
import bend-kit-webhooks@0.11.0.1/webhooks.bend as Webhooksimport Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes
324def sign.key(k: Maybe<&1, Bytes.Bytes>, +id: String, +ts: String, r: Bytes.Bytes & Bytes.Bytes) ->
325 IO(Bytes.Bytes & Result<&1, &1, Err, Map<&2, List<&2, String>>>):
326 match k:
327 case None{}:
328 back(Map<&2, List<&2, String>>, r, BadSecret{})
329 case Some{b}:
330 sign.mac(b, id, ts, r)