Function Signature
@dynamic-labs-wallet/node.
Description
Signs a message with a P-256 session private JWK using the exact encoding the keyshares relay expects: ECDSA P-256 / SHA-256 over the UTF-8 message, returned as the raw 64-byter‖s in lowercase hex.
Use it to implement the getSessionSignature option of authenticateJwt:
getSessionSignature against that signer directly — it must return the same encoding (raw r‖s, lowercase hex).
Parameters
Required Parameters
message(string) - The message to sign. The SDK supplies these; you do not construct them.privateKeyJwk(JsonWebKey) - The session private key from generateSessionKeyPair.
Returns
Promise<string>- The signature: raw ECDSA P-256r‖s(64 bytes) as lowercase hex.
Example
Related Functions
generateSessionKeyPair()- Generate the session key pairauthenticateJwt()- Where the signer is configured