Skip to content

Conversation

@yug49
Copy link

@yug49 yug49 commented Nov 29, 2025

This pull request updates the off-chain authentication documentation to clarify the handling of session key expiration and EIP-712 signature creation. The most important changes are grouped below:

Session Key Expiration Format

  • Changed the expires_at field in the session key policy to require a 10-digit Unix timestamp in seconds, not milliseconds, and clarified that it must match the EIP-712 uint64 type.

EIP-712 Signature Structure and Example

  • Removed the EIP712Domain type from the signature example, simplifying the domain to only include the name field.
  • Updated the signature example to show expires_at as a BigInt in seconds and clarified the format for allowances.
  • Added a detailed code example using viem for signing EIP-712 typed data, specifying the domain, types, and message fields, and emphasizing the need for expires_at to be a BigInt for uint64.Updated the 'expires_at' field to reflect Unix timestamp in seconds instead of milliseconds and adjusted the signing process to use BigInt for 'expires_at'.

Updated the 'expires_at' field to reflect Unix timestamp in seconds instead of milliseconds and adjusted the signing process to use BigInt for 'expires_at'.
@yug49 yug49 requested a review from dpatsora as a code owner November 29, 2025 09:59
```typescript
{
types: {
EIP712Domain: [
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@philanton @nksazonov idea for future releases: if we include <application_name> in EIP712Domain instead of domain:, then this app name would be shown in metamask header

Copy link
Author

@yug49 yug49 Dec 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I have included it

@yug49 yug49 requested a review from dimast-x December 2, 2025 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants