feat(): use web crypto API by default for sign, expose param to inject custom sign function

This commit is contained in:
tiagosiebler
2025-01-21 16:47:14 +00:00
parent 13cc5dd702
commit 13cd799e7c
10 changed files with 317 additions and 55 deletions

View File

@@ -77,6 +77,13 @@ export interface RestClientOptions {
/** Default: false. Enable to throw error if rate limit parser fails */
throwOnFailedRateLimitParse?: boolean;
/**
* Allows you to provide a custom "signMessage" function, e.g. to use node's much faster createHmac method
*
* Look in the examples folder for a demonstration on using node's createHmac instead.
*/
customSignMessageFn?: (message: string, secret: string) => Promise<string>;
}
/**