forked from bcgov/von-network
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathimport-wallet
51 lines (49 loc) · 1.98 KB
/
import-wallet
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# ===================================================================================
# Import Wallet
# -----------------------------------------------------------------------------------
# Imports a wallet from a file.
#
# Examples:
# ./manage \
# indy-cli import-wallet \
# walletName=lcrb_wallet \
# importPath=/tmp/lcrb_wallet_with_schemas_cred_defs_and_metadata.export
#
# ./manage \
# indy-cli import-wallet \
# walletName=lcrb_wallet \
# storageType=postgres_storage \
# storageConfig='{"url":"host.docker.internal:5444"}' \
# storageCredentials='{"account":"USER_ewnp","password":"DLKD0sd098hsd9jsdf","admin_account":"postgres","admin_password":"98s7df987w4hfn90wemofwf2j0"}' \
# importPath=/tmp/lcrb_wallet_with_schemas_cred_defs_and_metadata.export
#
# Params:
# walletName:
# - The name of the wallet to be imported.
# - Example; myorg_issuer
#
# storageType:
# - Optional - The wallet storage type. Defaults to 'default'.
# - Remote Wallet Example; postgres_storage
# - Local Wallet Example; default
#
# storageConfig:
# - Optional - The wallet storage configuration. Defaults to '{}'.
# - Remote Wallet Example; '{"url":"192.168.65.3:5435"}'
# - Local Wallet Example; '{}'
#
# storageCredentials:
# - Optional - The wallet storage credentials. Defaults to '{}'.
# - Remote Wallet Example; '{"account":"DB_USER","password":"DB_PASSWORD","admin_account":"postgres","admin_password":"mysecretpassword"}'
# - Local Wallet Example; '{}'
#
# importPath:
# - The path for the exported file.
# - Example; /tmp/myorg_issuer_only_did.export
# ===================================================================================
load-plugin library=libindystrgpostgres.so initializer=postgresstorage_init
wallet import ${walletName} key export_path=${importPath} export_key storage_type=${storageType} storage_config=${storageConfig} storage_credentials=${storageCredentials}
wallet open ${walletName} key storage_credentials=${storageCredentials}
did list
wallet close
exit