-
Notifications
You must be signed in to change notification settings - Fork 294
feat: example script for on prem wallet creation #6229
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
Conversation
}); | ||
|
||
const coin = 'tbtc'; | ||
const passphrase = 'new on-prem wallet'; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 15 days ago
To fix the issue, the unused variable passphrase
should be removed from the code. This involves:
- Deleting the declaration of
passphrase
on line 19. - Ensuring that no other parts of the code depend on
passphrase
(which is already the case here).
This change will not affect the functionality of the code, as passphrase
is not used anywhere.
@@ -18,3 +18,2 @@ | ||
const coin = 'tbtc'; | ||
const passphrase = 'new on-prem wallet'; | ||
const enterprise = '66632c6b42b03d265a939048beaaee55'; |
} | ||
|
||
// TODO: delete this | ||
function encryptPrvKeysKMS({ userKey, backupKey, passphrase }) { |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 15 days ago
To fix the issue, we will remove the unused function encryptPrvKeysKMS
entirely from the code. This includes deleting the function definition and any associated comments. This change will not affect the functionality of the code, as the function is not being used anywhere.
-
Copy modified line R73
@@ -72,11 +72,3 @@ | ||
|
||
// TODO: delete this | ||
function encryptPrvKeysKMS({ userKey, backupKey, passphrase }) { | ||
// This function simulated the key encryption process with an external KMS service. | ||
// Since it's an example, we're gonna use the encrypt utility from the SDK. | ||
return { | ||
userPrv: bitgo.encrypt({ password: passphrase, input: userKey }), | ||
backupPrv: bitgo.encrypt({ password: passphrase, input: backupKey }), | ||
}; | ||
} | ||
// Removed unused function encryptPrvKeysKMS | ||
|
TICKET: WP-4630
Description: An example on how to create an on-prem wallet