Remember·SPC · same-tx async

DKMS

TEE key derivation

Derive secp256k1 keys deterministically inside a TEE. Owner + index → key.

0x000000000000000000000000000000000000081BExplorer
SPC mode. Same owner + index always derives the same key. Private key never leaves the TEE.
click 'use connected' to fill
any uint256
to: 0x000000000000000000000000000000000000081BchainId 1979 · SPC
Output
Click Validate to encode the DKMS request.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

import {PrecompileConsumer} from "./utils/PrecompileConsumer.sol";

contract DKMSExample is PrecompileConsumer {
    address constant DKMS = address(0x81B);

    event KeyDerived(address owner, uint256 index, bytes pubkey);

    function deriveKey() external {
        bytes memory encoded = abi.encode(
            "0x0000000000000000000000000000000000000000",  // owner
            uint256(0),                     // keyIndex
            uint8(0)                       // keyFormat (0=secp256k1)
        );
        bytes memory output = _executePrecompile(DKMS, encoded);
        // Output is the derived public key bytes
        emit KeyDerived("0x0000000000000000000000000000000000000000", 0, output);
    }
}