Skip to content
This repository was archived by the owner on Aug 2, 2022. It is now read-only.
This repository was archived by the owner on Aug 2, 2022. It is now read-only.

generateKeyPair in Browsers Without Webpack #737

@bradlhart

Description

@bradlhart

Version of EOSJS
eosjs RC and edge

Describe the bug
To generate a public/private key pair, you need to specify that you are aware of the implications of generating a private key in an unsafe environment. Unfortunately, the only way to set that is with process.env which works for both nodejs and webpack projects but not browser alone. There needs to be an option for an alternative variable that can be set, such as window.EOSJS_KEYGEN_ALLOWED

To Reproduce
Steps to reproduce the behavior:

  1. Attempt to use eosjs-key-conversions.generateKeyPair in browser without webpack
  2. Receive error to set environment variable but no ability to set it in browser

Expected behavior
An additional alternative option to set the variable in the window or global objects for browsers

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions