0.1.0 • Published 2 months ago

0xpay-cc-sdk v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

🌐 Features

  • Wallet Generation: Securely generate private keys and public addresses using a user's unique identifier and a developer-defined password.
  • Blockchain Support:
    • Ethereum, BSC, Polygon, Avalanche,Optimism, Arbitrum,HECO,Harmony,Fantom✅
    • Solana ✅
    • Tron ✅
    • Bitcoin ✅
  • Real-Time Monitoring: Coming Soon.

🛠 Getting Started

To begin using the SDK, follow these steps:

Installation: npm install 0xpay-cc-sdk

Generating key pair from identifier and a defined password

The core functionality of our SDK revolves around the generation of wallet keys for different blockchains. Here's a guide to getting started with each supported blockchain:

Ethereum

  • Function: generateEvmPrivateKeyForUserIdentity
  • Description: Dynamically generates an Ethereum key pair (private and public keys) using a user's identifier and a developer-defined password. This method allows developers to securely manage wallet access while providing the necessary wallet functionalities to users.
  • Parameters:
    • identifier (string): A unique identifier for the user, such as email or username.
    • password (string): A developer-defined password used in the key generation process.
    • iterations (number, optional): The number of iterations for the PBKDF2 key derivation function, defaults to 100,000.
    • keyLength (number, optional): The desired length of the derived key in bytes, defaults to 32.
  • Returns: An EthereumKeyPair object containing the Ethereum address, private key, and both compressed and uncompressed public keys.

Solana

  • Function: generateSolanaPrivateKeyForUserIdentity
  • Description: Generates a Solana key pair from a user's identifier and a password. It produces a private key which is then used to create a keypair, making the public key available to the user.
  • Parameters:
    • identifier (string): The user's unique identifier.
    • password (string): The password combined with the identifier to generate the key.
    • iterations (number, optional): Number of iterations for PBKDF2, optional.
    • keyLength (number, optional): Desired key length, optional.
  • Returns: A SolanaKeyPair object containing the private and public keys.

Tron

  • Function: generateTronPrivateKeyForUserIdentity
  • Description: Similar to the Ethereum and Solana functions, this function generates a Tron key pair using the user's identifier and a password. It is designed to secure wallet creation and management by providing only the public key to the user.
  • Parameters:
    • identifier (string): The user's unique identifier.
    • password (string): The password combined with the identifier to generate the key.
    • iterations (number, optional): Number of iterations for PBKDF2, optional.
    • keyLength (number, optional): Desired key length, optional.
  • Returns: A TronKeyPair object including the private key and public key (address).

Bitcoin

  • Function: generateBitcoinPrivateKeyForUserIdentity
  • Description: Generates a Bitcoin key pair from a user's identifier and a password. It produces a private key which is then used to create a keypair, making the public key available to the user.
  • Parameters:
    • identifier (string): The user's unique identifier.
    • password (string): The password combined with the identifier to generate the key.
    • iterations (number, optional): Number of iterations for PBKDF2, optional.
    • keyLength (number, optional): Desired key length, optional.
  • Returns: A BitcoinKeyPair object containing the private, private WIF and public keys.
0.1.0

2 months ago

0.0.9

2 months ago

0.0.8

2 months ago

0.0.7

2 months ago

0.0.5

2 months ago

0.0.4

2 months ago

0.0.6

2 months ago

0.0.3

2 months ago

0.0.2

2 months ago

0.0.1

2 months ago