Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

arweave-mnemonic-keys

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

arweave-mnemonic-keys

Utilities for generating Arweave Keys without keyfiles

  • 0.0.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Arweave Mnemonic Keys

This library allows Arweave wallets/keys to be generated/loaded from BIP39-compliant 12 word mnemonics. This is as an alternative to the current default Arweave dapp behavior of requiring a JSON keyfile to be provided to sign transactions and interact with Arweave dapps.

See ArMob 2.0 for an example use case

This package is also served through OpenBits (http://openbits.world)

Note: It takes anywhere from 30 seconds to 2 minutes to generate an RSA key using this library cuz well...Javascript can be slow.

🎉 Features

  • Generate BIP39 compliant 12 word mnemonics
  • Generate Arweave compliant wallets from 12 word mnemonics

⚙ Install

# npm
npm install arweave-mnemonic-keys

# openbits
openbits install arweave-mnemonic-keys

📖 Usage

Functions

Functions

generateMnemonic

generateMnemonic(): Promise‹any›

Defined in arweaveMnemonicKeys.ts:8

Generate a 12 word mnemonic for an Arweave key

Returns: Promise‹any›

  • a promise resolving to a 12 word mnemonic seed phrase

getKeyFromMnemonic

getKeyFromMnemonic(mnemonic: string): Promise‹any›

Defined in arweaveMnemonicKeys.ts:30

Generates a JWK object representation of an Arweave key

example Generate an Arweave key and get its public address let key = getKeyFromMnemonic('jewel cave spy act loyal solid night manual joy select mystery unhappy') arweave.wallets.jwkToAddress(key) //returns qe741op_rt-iwBazAqJipTc15X8INlDCoPz6S40RBdg

Parameters:

NameTypeDescription
mnemonicstringa 12 word mnemonic represented as a string

Returns: Promise‹any›

  • returns a Javascript object that conforms to the JWKInterface required by Arweave-js

Keywords

FAQs

Package last updated on 10 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc