TrustID
TrustID copied to clipboard
[TrustID-sdk]UnlockAccount should determine the DID to use
Every call in the SDK requires a wallet.getDID("id") to specify the did of the wallet to use in the call. This is pretty messy. As DIDs must be unlocked before being used, I suggest that only a single DID should be unlocked at once in a wallet, and the unlocked account is the one always used in the calls. Thus, instead of having to get every time the DID we would do:
wal.unlockAccount(did)
wal.cal(...)
wal.lockAccount()