Skip to content

Function: signHash() ​

ts
function signHash(hashHex, privateKeyBase64): string;

Defined in: packages/x402-core/src/verify/primitives.ts:83

Ed25519-sign a prepared-transaction hash (hex) with a base64 32-byte seed, returning the signature as hex. Counterpart to verifySignature — the signature it produces is exactly what verifySignature (and the facilitator) accept.

Parameters ​

hashHex ​

string

privateKeyBase64 ​

string

Returns ​

string