CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/npm-walletconnect--types

tessl install tessl/npm-walletconnect--types@2.21.0

TypeScript type definitions and interfaces for the WalletConnect Protocol v2, enabling type-safe development across the WalletConnect ecosystem

Agent Success

Agent success rate when using this tile

70%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.19x

Baseline

Agent success rate without this tile

59%

task.mdevals/scenario-7/

Secure Credential Manager

Build a secure credential manager that stores and retrieves sensitive authentication data.

Requirements

Create a credential manager that:

  1. Stores credentials securely using key-value storage
  2. Retrieves credentials by key
  3. Allows bulk retrieval of all stored credential keys
  4. Enables secure deletion of credentials

The manager should store credentials with the following structure:

  • key: A unique identifier (string)
  • value: The sensitive data to store (string)

Functionality

Store Credentials

The manager should accept a key and value, and store them securely. If a credential with the same key already exists, it should be updated.

Retrieve Credentials

The manager should retrieve a credential by its key. If the key doesn't exist, return undefined.

List All Credentials

The manager should be able to retrieve all stored credential keys (not the values for security).

Delete Credentials

The manager should support:

  • Deleting a specific credential by key
  • Clearing all stored credentials

Test Cases

  • Storing a credential with key "api-token" and value "secret123" should allow retrieval of "secret123" using the same key @test
  • Retrieving a non-existent credential key should return undefined @test
  • After deleting a credential, attempting to retrieve it should return undefined @test
  • Listing all credentials should return an array of all stored keys @test

Implementation

@generates

API

/**
 * Manages secure storage and retrieval of credentials
 */
export class CredentialManager {
  /**
   * Stores a credential securely
   * @param key - The unique identifier for the credential
   * @param value - The sensitive data to store
   */
  set(key: string, value: string): Promise<void>;

  /**
   * Retrieves a credential by key
   * @param key - The unique identifier for the credential
   * @returns The stored value or undefined if not found
   */
  get(key: string): Promise<string | undefined>;

  /**
   * Lists all stored credential keys
   * @returns Array of all credential keys
   */
  getAll(): Promise<string[]>;

  /**
   * Deletes a specific credential
   * @param key - The unique identifier for the credential to delete
   */
  delete(key: string): Promise<void>;

  /**
   * Clears all stored credentials
   */
  clear(): Promise<void>;
}

Dependencies { .dependencies }

@walletconnect/types { .dependency }

Provides secure keychain storage interfaces for managing sensitive data.

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
npmpkg:npm/@walletconnect/types@2.21.x
tile.json