Skip to content

Utilities to work with NEAR Protocol key pairs based on BIP39 seed phrases

Notifications You must be signed in to change notification settings

near/near-seed-phrase

Repository files navigation

NEAR Seed Phrase

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

Install

npm i near-seed-phrase

Usage

const { parseSeedPhrase, generateSeedPhrase } = require('near-seed-phrase');

// to create a seed phrase with its corresponding Keys
const {seedPhrase, publicKey, secretKey} = generateSeedPhrase()

// To recover keys from the seed phrase
const { publicKey, secretKey } = parseSeedPhrase(seedPhrase);