get Contract Salt
Computes the contract salt from a WebAuthn credential ID.
The salt is used as part of the contract address derivation process to ensure each credential ID results in a unique contract address. This is computed as the SHA-256 hash of the credential ID.
Return
SHA-256 hash of the credential ID (32 bytes)
Example:
val credentialId = ... // from WebAuthn registration
val salt = SmartAccountUtils.getContractSalt(credentialId)Content copied to clipboard
Parameters
credential Id
WebAuthn credential ID