create Pending Credential
Creates a new pending credential in storage.
The credential is created with:
deploymentStatus: PENDING
isPrimary: false (set to true by wallet creation flow)
createdAt: current timestamp
Validation:
Public key must be exactly 65 bytes (uncompressed secp256r1 format)
Credential ID must not be empty
Credential ID must be unique (no existing credential with same ID)
Return
The newly created credential
Parameters
The Base64URL-encoded credential ID (must be unique and non-empty)
The uncompressed secp256r1 public key (must be 65 bytes)
The smart account contract address (C-address)
Optional user-friendly display name for the credential
Authenticator transport hints (e.g., "usb", "nfc", "ble", "internal")
Authenticator device type ("singleDevice" or "multiDevice")
Whether the passkey is backed up or synced
Throws
if validation fails
if a credential with the same ID exists
if saving fails
Example:
val credential = manager.createPendingCredential(
credentialId = "abc123",
publicKey = publicKeyData,
contractId = "CBCD1234...",
nickname = "Alice",
transports = listOf("internal"),
deviceType = "multiDevice",
backedUp = true
)
println("Created credential: ${credential.credentialId}")