Prerequisites
authContextis required. This is the result from the authentication flow.pubkeyis required. This is the public key of the PKP to sign with.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Use your PKP to sign a message with the selected chain and scheme. The signing operation will automatically find the most optimised price, or you can specify a custom maximum price using the userMaxPrice parameter.
authContext is required. This is the result from the authentication flow.pubkey is required. This is the public key of the PKP to sign with.// The message string will be UTF-8 encoded before signing.
// Hashing (e.g., Keccak256 for Ethereum, SHA256 for Bitcoin)
// is handled automatically by the Lit Protocol based on the selected chain.
const messageBytes = new TextEncoder().encode(messageToSign);
const signatures = await litClient.chain.raw.pkpSign({
chain: "ethereum",
signingScheme: "EcdsaK256Sha256",
pubKey: pkpInfo.pubkey,
authContext: authContext,
toSign: messageBytes, // UTF-8 encoded message
});
| Scheme | Curve |
|---|---|
EcdsaK256Sha256 | secp256k1 |
EcdsaP256Sha256 | NIST P‑256 |
EcdsaP384Sha384 | NIST P‑384 |
| Scheme | Curve |
|---|---|
SchnorrEd25519Sha512 | ed25519 |
SchnorrEd448Shake256 | ed448 |
| Scheme | Curve |
|---|---|
SchnorrK256Taproot | secp256k1 |
SchnorrK256Sha256 | secp256k1 |
SchnorrP256Sha256 | NIST P‑256 |
SchnorrP384Sha384 | NIST P‑384 |
| Scheme | Curve |
|---|---|
SchnorrRistretto25519Sha512 | Ristretto25519 |
SchnorrRedJubjubBlake2b512 | Jubjub |
SchnorrRedDecaf377Blake2b512 | Decaf377 |
SchnorrkelSubstrate | sr25519 |
Was this page helpful?