Closed simonas-notcat closed 3 years ago
Current | Proposed |
---|---|
agent.keyManagerGetKeyManagementSystems | agent.getKeyManagementSystems |
agent.keyManagerCreateKey | agent.createKey |
agent.keyManagerGetKey | agent.getKey |
agent.keyManagerDeleteKey | agent.deleteKey |
agent.keyManagerImportKey | agent.importKey |
agent.keyManagerEncryptJWE | agent.encryptJWE |
agent.keyManagerDecryptJWE | agent.decryptJWE |
agent.keyManagerSignJWT | agent.signJWT |
agent.keyManagerSignEthTX | agent.signEthTX |
agent.identityManagerGetProviders | agent.getIdentifierProviders |
agent.identityManagerGetIdentities | agent.getIdentifiers |
agent.identityManagerGetIdentity | agent.getIdentifier |
agent.identityManagerCreateIdentity | agent.createIdentifier |
agent.identityManagerGetOrCreateIdentity | agent.getOrCreateIdentifier |
agent.identityManagerImportIdentity | agent.importIdentifier |
agent.identityManagerDeleteIdentity | agent.deleteIdentifier |
agent.identityManagerAddKey | agent.identifierAddKey |
agent.identityManagerRemoveKey | agent.identifierRemoveKey |
agent.identityManagerAddService | agent.identifierAddService |
agent.identityManagerRemoveService | agent.identifierRemoveService |
agent.resolveDid | agent.resolveIdentifier |
agent.dataStoreSaveMessage | agent.saveMessage |
agent.dataStoreSaveVerifiableCredential | agent.saveVerifiableCredential |
agent.dataStoreSaveVerifiablePresentation | agent.saveVerifiablePresentation |
agent.dataStoreGetMessage | agent.getMessage |
agent.dataStoreGetVerifiableCredential | agent.getVerifiableCredential |
agent.dataStoreSaveVerifiablePresentation | agent.saveVerifiablePresentation |
agent.dataStoreGetVerifiablePresentation | agent.getVerifiablePresentation |
agent.dataStoreORMGetIdentities | agent.getIdentifiers |
agent.dataStoreORMGetIdentitiesCount | agent.getIdentifiersCount |
agent.dataStoreORMGetMessages | agent.getMessages |
agent.dataStoreORMGetMessagesCount | agent.getMessagesCount |
agent.dataStoreORMGetVerifiableCredentialsByClaims | agent.getVerifiableCredentialsByClaims |
agent.dataStoreORMGetVerifiableCredentialsByClaimsCount | agent.getVerifiableCredentialsByClaimsCount |
agent.dataStoreORMGetVerifiableCredentials | agent.getVerifiableCredentials |
agent.dataStoreORMGetVerifiableCredentialsCount | agent.getVerifiableCredentialsCount |
agent.dataStoreORMGetVerifiablePresentations | agent.getVerifiablePresentations |
agent.dataStoreORMGetVerifiablePresentationsCount | agent.getVerifiablePresentationsCount |
agent.handleMessage | agent.handleMessage |
agent.sendMessageDIDCommAlpha1 | agent.sendMessageDIDCommAlpha1 |
agent.createVerifiablePresentation | agent.createVerifiablePresentation |
agent.createVerifiableCredential | agent.createVerifiableCredential |
agent.createSelectiveDisclosureRequest | agent.createSelectiveDisclosureRequest |
agent.getVerifiableCredentialsForSdr | agent.getVerifiableCredentialsForSdr |
agent.validatePresentationAgainstSdr | agent.validatePresentationAgainstSdr |
One general comment would be that I liked the prefix because it indicated the layering but if the layering is not so strict (i.e. no logical grouping) anymore, then I guess it makes sense to remove those prefixes.
@simonas-notcat a few questions:
I agree with @awoie but I think a regrouping of methods makes sense. Right now, namespacing is still required since we already have conflicts when simply removing the prefixes:
old | new |
---|---|
agent.identityManagerGetIdentities | agent.getIdentifiers |
agent.dataStoreORMGetIdentities | agent.getIdentifiers |
I think it's worth moving away from the current internal layer namespaces to a more logical layering. Some logical layers that I'm spotting are:
there are many moving parts here, let's revisit this after we've figured out how to work with LD-credentials, data storage and query and maybe some more didcomm requirements too
Current
Proposed