xian-network / xian-js

Tools for interacting with the Xian blockchain using javascript / typescript
1 stars 1 forks source link

Kels7 wip make it work in the browser #2

Closed KELs7 closed 4 months ago

KELs7 commented 4 months ago

Pull Request Submission: Update ed25519-hd-key to ed25519-keygen

Issue Description

The npm package ed25519-hd-key currently cannot be run in the browser due to its dependency on create-hmac. This issue has been acknowledged and can be found in the ed25519-hd-key GitHub repository [1]. To address this limitation, the decision was made to replace ed25519-hd-key with the package ed25519-keygen [2].

Changes Made

To resolve the issue, the logic for ed25519-hd-key in the src/lib/wallet.ts file has been replaced with the logic for ed25519-keygen. This replacement ensures that the code can be executed in the browser without any dependency conflicts [2]. The changes can be found in the branch kels7-wip-make-it-work-in-the-browser)

Benefits of Using ed25519-keygen

By switching to ed25519-keygen, the following benefits are achieved:

Pull Request Details

The pull request includes the following changes: