Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(jellyfish-api-core): add encryptWallet, walletPassphrase, walletPassphraseChange, walletLock RPC #1969

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

shancht
Copy link
Contributor

@shancht shancht commented Jan 13, 2023

What this PR does / why we need it:
/kind feature

Which issue(s) does this PR fixes?:
Fixes part of #48 by adding encryptWallet() & walletPassphrase().

encryptWallet() allows the encryption of wallet for the first time using a custom ‘passphrase’. Transactions and calls related to private keys will thereafter require a passphrase before execution.

walletPassphrase() stores the wallet decryption key in memory for ‘timeout’ seconds. Calling 'walletpassphrase' when wallet is unlocked will set a new unlock time that overrides the old setting.

Additional comments?:
Primary purpose is to add a layer of security towards the wallet in storing of private keys.

@codeclimate
Copy link

codeclimate bot commented Jan 13, 2023

Code Climate has analyzed commit a2c61fb and detected 1 issue on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 1

View more on Code Climate.

@netlify
Copy link

netlify bot commented Jan 13, 2023

Deploy Preview for jellyfishsdk ready!

Name Link
🔨 Latest commit a765dde
🔍 Latest deploy log https://app.netlify.com/sites/jellyfishsdk/deploys/63e579bb2ed3db00089061e6
😎 Deploy Preview https://deploy-preview-1969--jellyfishsdk.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@codecov
Copy link

codecov bot commented Jan 13, 2023

Codecov Report

Base: 90.74% // Head: 89.10% // Decreases project coverage by -1.64% ⚠️

Coverage data is based on head (a765dde) compared to base (3aeeb67).
Patch coverage: 75.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1969      +/-   ##
==========================================
- Coverage   90.74%   89.10%   -1.64%     
==========================================
  Files         367      363       -4     
  Lines       10771    11027     +256     
  Branches     1376     1439      +63     
==========================================
+ Hits         9774     9826      +52     
- Misses        952     1146     +194     
- Partials       45       55      +10     
Impacted Files Coverage Δ
packages/jellyfish-api-core/src/category/wallet.ts 87.62% <75.00%> (-12.38%) ⬇️
...hale-api/src/module.api/legacy.subgraph.service.ts 16.12% <0.00%> (-70.17%) ⬇️
apps/whale-api/src/module.api/stats.controller.ts 29.00% <0.00%> (-67.94%) ⬇️
apps/libs/caches/src/LegacyCache.ts 33.33% <0.00%> (-66.67%) ⬇️
...yfish-transaction/src/script/dftx/dftx_unmapped.ts 33.33% <0.00%> (-66.67%) ⬇️
apps/whale-api/src/module.api/legacy.controller.ts 36.84% <0.00%> (-63.16%) ⬇️
.../whale-api/src/module.api/poolpair.fees.service.ts 61.11% <0.00%> (-38.89%) ⬇️
...nsaction-builder/src/txn/txn_builder_governance.ts 41.37% <0.00%> (-37.94%) ⬇️
...core/src/saga/AddressParser/dftx/AccountToUtxos.ts 62.50% <0.00%> (-37.50%) ⬇️
packages/jellyfish-api-core/src/category/misc.ts 66.66% <0.00%> (-33.34%) ⬇️
... and 116 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@github-actions
Copy link

github-actions bot commented Feb 6, 2023

Docker build preview for jellyfish/apps is ready!

Built with commit 66b16a8

  • ghcr.io/jellyfishsdk/legacy-api:pr-1969
  • ghcr.io/jellyfishsdk/playground-api:pr-1969
  • ghcr.io/jellyfishsdk/status-api:pr-1969
  • ghcr.io/jellyfishsdk/whale-api:pr-1969

You can also get an immutable image with the commit hash

  • ghcr.io/jellyfishsdk/legacy-api:66b16a8571f43843f33b6332ab2c72e720b7acbc
  • ghcr.io/jellyfishsdk/playground-api:66b16a8571f43843f33b6332ab2c72e720b7acbc
  • ghcr.io/jellyfishsdk/status-api:66b16a8571f43843f33b6332ab2c72e720b7acbc
  • ghcr.io/jellyfishsdk/whale-api:66b16a8571f43843f33b6332ab2c72e720b7acbc

@shancht shancht changed the title feat(jellyfish-api-core): add encryptWallet & walletPassphrase RPC feat(jellyfish-api-core): add encryptWallet, walletPassphrase, walletPassphraseChange, walletLock RPC Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant