live · mainnetoc · docs
specs · api · guides
docs / documentation

@orangecheck/webhook-verify


@orangecheck/webhook-verify / sign

Function: sign()

function sign(secret: string, rawBody: string | Uint8Array<ArrayBufferLike>): string;

Defined in: index.ts:91

Compute the expected signature for a given body. Useful for tests on the customer side — generate the sig, attach it to a fake request, verify the receiver accepts it.

Parameters

ParameterType
secretstring
rawBodystring | Uint8Array&lt;ArrayBufferLike>

Returns

string