Skip to content

mybucks-online/core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@mybucks.online/core

This is a core part of mybucks.online crypto wallet, involving hash and private key generation, generate and parse transfer-link token.

mybucks.online

Mybucks.online is a password-only, self-custodial and browser-based cryptocurrency wallet built with Javascript. It generates a private key from your password and passcode using an industry-standard, verified one-way hash function. Your private key forms your account, allowing you to transfer, receive, and hold your crypto assets instantly.

As a hash function, the scrypt Key Derivation Function (KDF) increases the computational effort required to crack passwords, effectively delaying brute-force attacks and making them impractical.

It fully runs on your browser side without using any storage or invoking any 3rd-party APIs for key management. It instantly generates your private key from your password input, and whenever you close or refresh, there is no footprint. This absolutely protects your privacy.

Quick start

1. Install

npm install @mybucks.online/core

2. Generate hash, private-key and wallet address

import { 
  getEvmPrivateKey, 
  getEvmWalletAddress, 
  getTronWalletAddress,
  generateHash
} from "@mybucks.online/core";

const showProgress = (p) => {
  console.log(`progress: ${p * 100}%`);
};

const hash = await generateHash(password, passcode, showProgress);

const privateKey = getEvmPrivateKey(hash);
console.log("Private key: ", privateKey);

const address1 = getEvmWalletAddress(hash);
console.log("EVM Address: ", address1);

const address2 = getTronWalletAddress(hash);
console.log("TRON Address: ", address2);

3. Generate and parse (transfer-link's)token

import { generateToken } from "@mybucks.online/core";
const token = generateToken(password, passcode, network);

console.log("https://app.mybucks.online?wallet=" + token);
import { parseToken } from "@mybucks.online/core";
const [password, passcode, network] = parseToken(token);
console.log("Account credentials are: ", password, passcode);
console.log("Network: ", network);

Test

npm run test

Docs

Find the docs here.

Live example