Webhooks.std.check: def of bend-kit-webhooks@0.11.0.1 Import: import bend-kit-webhooks@0.11.0.1/webhooks.bend as Webhooks Lines 283-291 of bend-kit-webhooks@0.11.0.1/webhooks.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-webhooks@0.11.0.1/webhooks.bend&start_line=283&end_line=291 import Base import bend-kit-time@0.3.0.0/time.bend as Time import bend-kit-int@0.2.0.0/int.bend as Int def std.check(+tol: U32, now: Time.Instant, +h: Map<&2, List<&2, String>>) -> Result<&1, &1, Err, String & String & List<&2, String>>: do Result<&1, &1, Err, String & String & List<&2, String>>: +id : String <- need("webhook-id", field(h, "webhook-id")) +ts : String <- need("webhook-timestamp", field(h, "webhook-timestamp")) sig : String <- need("webhook-signature", field(h, "webhook-signature")) u : Unit <- id.check(id) t : Int.I64 <- ts.read(ts) w : Unit <- window(tol, now, t) return (id, id ++ "." ++ ts ++ ".", std.sigs(String.split(sig, ' '))) Uses (22): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Map https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result.pure https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.split https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=bend-kit-int@0.2.0.0/int.bend&name=I64 https://jend.leeeet.dev/definition.txt?path=bend-kit-time@0.3.0.0/time.bend&name=Instant https://jend.leeeet.dev/definition.txt?path=bend-kit-webhooks@0.11.0.1/webhooks.bend&name=Err https://jend.leeeet.dev/definition.txt?path=bend-kit-webhooks@0.11.0.1/webhooks.bend&name=field https://jend.leeeet.dev/definition.txt?path=bend-kit-webhooks@0.11.0.1/webhooks.bend&name=id.check https://jend.leeeet.dev/definition.txt?path=bend-kit-webhooks@0.11.0.1/webhooks.bend&name=need https://jend.leeeet.dev/definition.txt?path=bend-kit-webhooks@0.11.0.1/webhooks.bend&name=std.sigs https://jend.leeeet.dev/definition.txt?path=bend-kit-webhooks@0.11.0.1/webhooks.bend&name=ts.read https://jend.leeeet.dev/definition.txt?path=bend-kit-webhooks@0.11.0.1/webhooks.bend&name=window