Core SDK
Imported keys
Import, inspect, deactivate, reactivate, and sign with externally generated keys.
Import a key
typescript
await leaf.importKey({
keyVaultAddr,
authProof: importAuthProof,
keyId,
privateKey,
publicKey: "0x",
curve: 0, // CurveType.SECP256K1
chain: 0, // ChainType.ETHEREUM
label: "Operations key",
});Lifecycle
- getImportedKeyIds, getKeyMetadata, keyExists, and getImportedKeyAddress are public views.
- deactivateKey prevents signing without erasing the key identity.
- activateKey restores signing after fresh authentication.
- signWithImportedKey binds the proof to keyId and digest.
