(secret?: string)
| 41 | } |
| 42 | |
| 43 | function buildSignFields(secret?: string): Record<string, unknown> { |
| 44 | if (!secret) return {}; |
| 45 | const timestamp = Math.floor(Date.now() / 1000); |
| 46 | return { timestamp: String(timestamp), sign: genSign(secret, timestamp) }; |
| 47 | } |
| 48 | |
| 49 | export async function verifyWebhook( |
| 50 | webhookUrl: string, |
no test coverage detected