syntax = "proto3";

package web3auth;

option go_package = "github.com/echofi-ai/schema/v2/types/web3auth";

// Wallet message represents a Web3 wallet connected to a user
message Wallet {
  // Wallet ID
  string id = 1;

  // User ID that owns this wallet
  string user_id = 2;

  // Wallet address (Ethereum address format)
  string wallet_address = 3;

  // Creation timestamp (Unix seconds)
  int64 created_at = 4;

  // Last update timestamp (Unix seconds)
  int64 updated_at = 5;
}

// Web3User represents a user with wallet information
message Web3User {
  // User ID
  string id = 1;

  // User name (optional)
  optional string name = 2;

  // Email address (optional, may be null for wallet-only users)
  optional string email = 3;

  // Email verification timestamp (optional, Unix seconds)
  optional int64 email_verified = 4;

  // Profile image URL (optional)
  optional string image = 5;

  // Creation timestamp (Unix seconds)
  int64 created_at = 6;

  // Last update timestamp (Unix seconds)
  int64 updated_at = 7;
  
  // Connected wallet information
  Wallet wallet = 8;
}
