Coder Social home page Coder Social logo

near-seed-phrase-py's Introduction

NEAR Seed Phrase

Python tool for creating and converting mnemonic-phrases, public key and private key for NEAR accounts.

๐Ÿšจ Status: BETA, contributions welcome!

Install

Poetry

poetry shell
poetry show -v # copy this virtualenv path and set it as your Python interpreter 
poetry add near-seed-phrase-py

Pip

pip install near-seed-phrase-py

Usage

from near_seed_phrase.main import generate_seed_phrase, parse_seed_phrase

# Generate a BIP39 seed phrase with its corresponding Keys

generate_seed_phrase()

Returns:

{
    seed_phrase: str # BIP39 seed phrase
    secret_key: str # ed25519 secret/private key, formatted for NEAR (e.g. "ed25519:[SECRET_KEY]")
    public_key: str # ed25519 public key, formatted for NEAR (e.g. "ed25519:[PUBLIC_KEY]")
    public_key_hex: str # lowercase hex representation of public_key that can be used as an implicit account ID; see https://docs.near.org/integrator/implicit-accounts
} 

# Recover keys from a BIP39 seed phrase (returns same response as generate_seed_phrase())

parse_seed_phrase(seed_phrase)

Test

python tests/main.test.py

near-seed-phrase-py's People

Contributors

lachlanglen avatar madgeniusblink avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.