Initial commit with translated description
This commit is contained in:
24
scripts/getIdentities.js
Normal file
24
scripts/getIdentities.js
Normal file
@@ -0,0 +1,24 @@
|
||||
const { getInitializedRuntime } = require("./shared/bootstrap");
|
||||
const { formatError, outputSuccess } = require("./shared/utils");
|
||||
|
||||
async function main() {
|
||||
try {
|
||||
const { didsStorage } = await getInitializedRuntime();
|
||||
|
||||
const identities = await didsStorage.list();
|
||||
|
||||
if (identities.length === 0) {
|
||||
console.error(
|
||||
"No identities found. Create one with createNewEthereumIdentity.js",
|
||||
);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
outputSuccess(identities);
|
||||
} catch (error) {
|
||||
console.error(formatError(error));
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
main();
|
||||
Reference in New Issue
Block a user