signTransformUrl
function signTransformUrl(unsignedUrl, signingKey): Promise<string>;Defined in: packages/asset-client/src/transform.ts:348
Sign a transform URL with the tenant’s HMAC signing key. Appends
?sig=<hex> where hex = HMAC-SHA256(signingKey, <canonical-DSL>/<filename>).
Must agree byte-for-byte with the server’s verifyTransformSignature.
Uses WebCrypto, so works in browsers, Node ≥ 16, Bun, and Workers.
The canonical DSL is the one already produced by serializeTransform
(sort keys + lowercase strings), so signing a URL built by getTransformUrl
is automatic — the same canonical form is in the URL path.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
unsignedUrl |
string |
signingKey |
string |
Returns
Section titled “Returns”Promise<string>