-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(node): add is-indy-installed command (#510)
- Loading branch information
1 parent
e5aedd0
commit e50b821
Showing
2 changed files
with
24 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env node | ||
/* eslint-disable no-console, @typescript-eslint/no-var-requires, no-undef */ | ||
|
||
const indy = require('indy-sdk') | ||
const { randomUUID } = require('node:crypto') | ||
|
||
const uuid = randomUUID() | ||
const id = `test-wallet-id-${uuid}` | ||
|
||
indy | ||
.createWallet({ id }, { key: id }) | ||
.then(() => indy.deleteWallet({ id }, { key: id })) | ||
.then(() => { | ||
console.log('Libindy was installed correctly') | ||
}) | ||
.catch((e) => { | ||
console.log('Libindy was installed correctly, but an error did occur') | ||
console.error(e) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters