Saltar al contenido principal
Superteam Brasil
Atrás
+20 XP
2/12

Challenge: Wallet Connection Flow

Simulate a wallet connection flow by generating a keypair (representing a wallet) and extracting key information.

Requirements

  • Create a function that simulates connecting to a wallet
  • Generate a new keypair to represent the wallet
  • Validate that the public key is on the ed25519 curve
  • Return an object with publicKey (base58 string), connected (boolean), and isValid (boolean)

Casos de Prueba

Should return object with publicKey (string), connected (boolean), isValid (boolean)
Entrada: Esperado: typeof result.publicKey === 'string' && typeof result.connected === 'boolean' && typeof result.isValid === 'boolean'
Public key should be a valid base58 string
Entrada: Esperado: result.publicKey.length >= 32 && result.publicKey.length <= 44

Discusión