Genrate public and private key for passkey integration.

I am trying to integrate passkey in my project, But I am not able to find how can I generate public and private key for specific account for specific user. I did found following resources but non of them contains public-private key generation code!

Supporting passkeys

Connecting to a service with passkeys

Any of these resource does not contains code to generate public/private key generation code.

Like with the WebAuthn API, passkeys are generated for you by the system. All you need to do is perform a passkey registration request, and the system will take care of the key generation and storage, as well as storing other metadata about the credential, like the username and where it can be used. This helps ensure that the private key is never exposed except where the user explicitly decides to share it.

Genrate public and private key for passkey integration.
 
 
Q