Skip to content

SignPayload

Source: src/AWS/Signer/SignPayload.ts

Runtime binding for signer:SignPayload.

Signs a binary payload synchronously with the bound SigningProfile and returns the signature inline — the API behind Notation container-image signing (use a Notation-OCI-SHA384-ECDSA profile). The profile name is injected from the binding. Provide the implementation with Effect.provide(AWS.Signer.SignPayloadHttp).

// init — bind the operation to the Notation profile
const signPayload = yield* AWS.Signer.SignPayload(profile);
// runtime
const { jobId, signature } = yield* signPayload({
payload: new TextEncoder().encode(JSON.stringify(notaryPayload)),
payloadFormat: "application/vnd.cncf.notary.payload.v1+json",
});