https://github.com/mybucks-online/core
Core part of mybucks.online crypto wallet, involving hashing and private key generation
https://github.com/mybucks-online/core
cryptowallet keccak256 key-generation npm-package password-hashing scrypt
Last synced: 7 months ago
JSON representation
Core part of mybucks.online crypto wallet, involving hashing and private key generation
- Host: GitHub
- URL: https://github.com/mybucks-online/core
- Owner: mybucks-online
- License: mit
- Created: 2025-01-11T12:47:54.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-02-20T16:42:13.000Z (8 months ago)
- Last Synced: 2025-02-20T16:48:55.821Z (8 months ago)
- Topics: cryptowallet, keccak256, key-generation, npm-package, password-hashing, scrypt
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/@mybucks.online/core
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @mybucks.online/core
This is a core part of [mybucks.online](https://mybucks.online) crypto wallet, involving hash and private key generation, generate and parse transfer-link token.
## mybucks.online
[Mybucks.online](https://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
```bash
npm install @mybucks.online/core
```### 2. Generate hash, private-key and wallet address
```javascript
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
```javascript
import { generateToken } from "@mybucks.online/core";
const token = generateToken(password, passcode, network);console.log("https://app.mybucks.online?wallet=" + token);
``````javascript
import { parseToken } from "@mybucks.online/core";
const [password, passcode, network] = parseToken(token);
console.log("Account credentials are: ", password, passcode);
console.log("Network: ", network);
```## Test
```bash
npm run test
```## Docs
Find the docs [here](https://docs.mybucks.online).
## Live example
- https://github.com/mybucks.online/app
- https://app.mybucks.online
password: **DemoAccount5&**
passcode: **112324**
- https://app.mybucks.online/?wallet=VWnsSGRGVtb0FjY291bnQ1JgIxMTIzMjQCb3B0aW1pc20=_wNovT
- https://app.mybucks.online/?wallet=1jpFD8RGVtb0FjY291bnQ1JgIxMTIzMjQCYmFzZQ==fhk-GL