aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/order-utils/src/signature_utils.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/order-utils/src/signature_utils.ts b/packages/order-utils/src/signature_utils.ts
index 7fb459326..5b56ef577 100644
--- a/packages/order-utils/src/signature_utils.ts
+++ b/packages/order-utils/src/signature_utils.ts
@@ -230,6 +230,13 @@ export async function ecSignOrderHashAsync(
throw new Error(OrderError.InvalidSignature);
}
+/**
+ * Adds the relevant prefix to the message being signed.
+ * @param message Message to sign
+ * @param messagePrefixType The type of message prefix to add. Different signers expect
+ * specific message prefixes.
+ * @return Prefixed message
+ */
export function addSignedMessagePrefix(message: string, messagePrefixType: MessagePrefixType): string {
switch (messagePrefixType) {
case MessagePrefixType.None: