signWebhookPayload — @gj-kit/toss-payments
A public function from @gj-kit/toss-payments/testing. The signature below is taken directly from the 0.6.1 release declaration.
Verified import example
Section titled “Verified import example”import { signWebhookPayload } from '@gj-kit/toss-payments/testing';Signature, parameters, and return type
Section titled “Signature, parameters, and return type”/** * `tosspayments-webhook-signature` 헤더 값 생성 — * HMAC-SHA256("{rawBody}:{transmissionTime}", 보안 키) → base64에 "v1:" 접두사. * * ⚠ 설계 문서(§3.6)의 동기 시그니처에서 Promise 반환으로 변형했다: 서명은 * WebCrypto(`crypto.subtle`)로만 계산하는데(플랫폼 중립 — node:crypto 금지) * subtle API가 Promise 전용이라 동기 반환이 불가능하다. */declare function signWebhookPayload(rawBody: string, transmissionTime: string, key: SecurityKey): Promise<string>;This declaration is the source of truth for parameters, optionality, generics, return values, and public union/type contracts. Check the package golden path and this subpath’s import conditions for required environment, permission, and error boundaries before calling it.
Release context
Section titled “Release context”- Package:
@gj-kit/toss-payments - Version:
0.6.1 - Public entry:
./testing - Source: GitHub