Comprehensive JavaScript SDK for building Solana blockchain applications with modern architecture and type safety
93
Evaluation — 93%
↑ 1.29xAgent success when using this tile
Build a wallet key management utility for a Solana application that generates and manages cryptographic keypairs. The utility should support creating new keypairs, restoring keypairs from existing secret keys, generating deterministic keypairs from seeds, and signing messages.
Create a function that generates a new random cryptographic keypair. Each generated keypair should be unique and suitable for wallet creation.
Support restoring a full keypair from a previously saved secret key in byte array format (64 bytes). This allows recovering a keypair from its secret key.
Implement functionality to generate a deterministic keypair from a 32-byte seed. Using the same seed should always produce the same keypair.
Provide capability to sign arbitrary byte messages using a keypair. Return the signature as a byte array.
@generates
/**
* Generates a new random cryptographic keypair
* @returns {Object} A keypair object with publicKey and secretKey
*/
function generateKeypair() {
// Implementation
}
/**
* Restores a keypair from a secret key
* @param {Uint8Array} secretKey - The 64-byte secret key
* @returns {Object} The restored keypair
*/
function restoreFromSecretKey(secretKey) {
// Implementation
}
/**
* Generates a deterministic keypair from a seed
* @param {Uint8Array} seed - The seed bytes (32 bytes)
* @returns {Object} A keypair derived from the seed
*/
function generateFromSeed(seed) {
// Implementation
}
/**
* Signs a message using a keypair
* @param {Object} keypair - The keypair to sign with
* @param {Uint8Array} message - The message to sign
* @returns {Uint8Array} The signature bytes (64 bytes)
*/
function signMessage(keypair, message) {
// Implementation
}
module.exports = {
generateKeypair,
restoreFromSecretKey,
generateFromSeed,
signMessage
};Provides Solana blockchain cryptographic primitives and utilities.
Install with Tessl CLI
npx tessl i tessl/npm-solana--web3-jsdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10