Import
Signature
Generate legacy identity verification headers signed with an Algorand private key. Signs the ASCII message x402-identity:<sender_address>:<timestamp> using Ed25519 and returns the three legacy headers x-sender-address, x-sender-timestamp, and x-sender-signature. Notes .. deprecated:: 0.5.0 Use sign_identity_txn, whose proof is bound to one network’s genesis hash. sign_identity keeps working and servers keep accepting its headers; it emits a DeprecationWarning and will be removed in a future major release.

Parameters

str
required
Base64-encoded 32-byte Algorand private key.
int | None
default:"None"
Unix timestamp in seconds. If None, defaults to int(time.time()).

Returns

dict[str, str]
Dictionary with keys x-sender-address, x-sender-timestamp, and x-sender-signature (base64-encoded signature).

Examples

See also

  • sign_identity_txn: Preferred modern transaction-based proof.
  • verify_identity: Validates both modern and legacy identity headers.
Source: ai_economy_sdk/identity.py