Explorer

definy.rpc-authorization-message

description
The bytes signed for the Authorization header: definy-rpc-v1, the method in uppercase, the path, the time and the SHA-256 of the body (URL-safe Base64) joined with newlines
type
Fn(method: String, path: String, time_seconds: Number, body: String) -> List<Number>
expression
fn(method$0, path$1, time_seconds$2, body$3) =>
  @core.string-to-bytes(
    value: @std.string-join(
      items: [
        "definy-rpc-v1",
        @std.ascii-uppercase(value: $0),
        $1,
        @std.number-to-string(value: $2),
        @core.bytes-to-base64url(bytes: @core.sha256(bytes: @core.string-to-bytes(value: $3)))
      ],
      separator: "\n"
    )
  )
visibility
public
definy.rpc-authorization-message (project definy, branch main, snapshot l0VFjJZP174d8CbZWFoujAGTYjgsQu4uTq5uWCZaXgo)
id: 7vQPlig8jE0Z0Wb5JXKGhkEkFcxNeO7Dj6aPqDjJbqI
content hash: gNZTHm9Hqlz7xeZQNzLnz1hs1dnG6K0nsg4Egam7FYs