@verana-labs/vs-agent-sdk 2.0.0-dev.11 → 2.0.0-dev.111
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -2
- package/build/adminApi/AdminApiError.d.ts +28 -0
- package/build/adminApi/AdminApiError.js +67 -0
- package/build/adminApi/AdminApiError.js.map +1 -0
- package/build/adminApi/didcommModules.d.ts +2 -0
- package/build/adminApi/didcommModules.js +8 -0
- package/build/adminApi/didcommModules.js.map +1 -0
- package/build/adminApi/index.d.ts +4 -0
- package/build/adminApi/index.js +21 -0
- package/build/adminApi/index.js.map +1 -0
- package/build/adminApi/moduleEndpoint.d.ts +7 -0
- package/build/adminApi/moduleEndpoint.js +21 -0
- package/build/adminApi/moduleEndpoint.js.map +1 -0
- package/build/adminApi/pagination/PageDto.d.ts +7 -0
- package/build/adminApi/pagination/PageDto.js +50 -0
- package/build/adminApi/pagination/PageDto.js.map +1 -0
- package/build/adminApi/pagination/PaginationQueryDto.d.ts +11 -0
- package/build/adminApi/pagination/PaginationQueryDto.js +46 -0
- package/build/adminApi/pagination/PaginationQueryDto.js.map +1 -0
- package/build/adminApi/pagination/cursor.d.ts +28 -0
- package/build/adminApi/pagination/cursor.js +64 -0
- package/build/adminApi/pagination/cursor.js.map +1 -0
- package/build/adminApi/pagination/index.d.ts +4 -0
- package/build/adminApi/pagination/index.js +21 -0
- package/build/adminApi/pagination/index.js.map +1 -0
- package/build/adminApi/pagination/paginate.d.ts +27 -0
- package/build/adminApi/pagination/paginate.js +77 -0
- package/build/adminApi/pagination/paginate.js.map +1 -0
- package/build/agent/VsAgent.d.ts +30 -34
- package/build/agent/VsAgent.js +176 -221
- package/build/agent/VsAgent.js.map +1 -1
- package/build/agent/createVsAgent.d.ts +9 -6
- package/build/agent/createVsAgent.js +5 -5
- package/build/agent/createVsAgent.js.map +1 -1
- package/build/blockchain/AnonCredsTrustService.d.ts +115 -0
- package/build/blockchain/AnonCredsTrustService.js +287 -0
- package/build/blockchain/AnonCredsTrustService.js.map +1 -0
- package/build/blockchain/AuthorizationService.d.ts +8 -6
- package/build/blockchain/AuthorizationService.js +30 -38
- package/build/blockchain/AuthorizationService.js.map +1 -1
- package/build/blockchain/IndexerWebSocketService.d.ts +7 -2
- package/build/blockchain/IndexerWebSocketService.js +67 -36
- package/build/blockchain/IndexerWebSocketService.js.map +1 -1
- package/build/blockchain/VeranaChainService.d.ts +38 -27
- package/build/blockchain/VeranaChainService.js +169 -177
- package/build/blockchain/VeranaChainService.js.map +1 -1
- package/build/blockchain/VeranaIndexerService.d.ts +14 -1
- package/build/blockchain/VeranaIndexerService.js +122 -8
- package/build/blockchain/VeranaIndexerService.js.map +1 -1
- package/build/blockchain/feePreflight.d.ts +32 -0
- package/build/blockchain/feePreflight.js +89 -0
- package/build/blockchain/feePreflight.js.map +1 -0
- package/build/blockchain/handlers/IndexerHandlerRegistry.d.ts +0 -1
- package/build/blockchain/handlers/IndexerHandlerRegistry.js.map +1 -1
- package/build/blockchain/handlers/authorizationHandlers.js +2 -2
- package/build/blockchain/handlers/authorizationHandlers.js.map +1 -1
- package/build/blockchain/handlers/defaultHandlers.js +7 -2
- package/build/blockchain/handlers/defaultHandlers.js.map +1 -1
- package/build/blockchain/handlers/index.d.ts +1 -0
- package/build/blockchain/handlers/index.js +1 -0
- package/build/blockchain/handlers/index.js.map +1 -1
- package/build/blockchain/handlers/selfIssuanceHandlers.d.ts +13 -0
- package/build/blockchain/handlers/selfIssuanceHandlers.js +76 -0
- package/build/blockchain/handlers/selfIssuanceHandlers.js.map +1 -0
- package/build/blockchain/handlers/stateMutations.d.ts +27 -4
- package/build/blockchain/handlers/stateMutations.js +331 -45
- package/build/blockchain/handlers/stateMutations.js.map +1 -1
- package/build/blockchain/index.d.ts +4 -0
- package/build/blockchain/index.js +4 -0
- package/build/blockchain/index.js.map +1 -1
- package/build/blockchain/indexerMappers.d.ts +3 -0
- package/build/blockchain/indexerMappers.js +53 -0
- package/build/blockchain/indexerMappers.js.map +1 -0
- package/build/blockchain/triggerResolver.d.ts +26 -0
- package/build/blockchain/triggerResolver.js +110 -0
- package/build/blockchain/triggerResolver.js.map +1 -0
- package/build/blockchain/types.d.ts +13 -70
- package/build/blockchain/types.js.map +1 -1
- package/build/bootstrap/EcsBootstrapService.d.ts +13 -4
- package/build/bootstrap/EcsBootstrapService.js +170 -124
- package/build/bootstrap/EcsBootstrapService.js.map +1 -1
- package/build/connections/InvitationRecord.d.ts +50 -0
- package/build/connections/InvitationRecord.js +60 -0
- package/build/connections/InvitationRecord.js.map +1 -0
- package/build/connections/ParentConnectionModule.d.ts +22 -0
- package/build/connections/ParentConnectionModule.js +91 -0
- package/build/connections/ParentConnectionModule.js.map +1 -0
- package/build/credentials/FullTailsFileService.d.ts +0 -1
- package/build/credentials/FullTailsFileService.js +0 -49
- package/build/credentials/FullTailsFileService.js.map +1 -1
- package/build/did/CachedDocumentLoader.d.ts +3 -0
- package/build/did/CachedDocumentLoader.js +9 -3
- package/build/did/CachedDocumentLoader.js.map +1 -1
- package/build/did/CachedWebDidResolver.d.ts +0 -4
- package/build/did/CachedWebDidResolver.js +1 -5
- package/build/did/CachedWebDidResolver.js.map +1 -1
- package/build/did/artifactServices.d.ts +12 -0
- package/build/did/artifactServices.js +48 -0
- package/build/did/artifactServices.js.map +1 -0
- package/build/did/legacyDidWeb.d.ts +6 -4
- package/build/did/legacyDidWeb.js +17 -14
- package/build/did/legacyDidWeb.js.map +1 -1
- package/build/did/publicDid.d.ts +4 -0
- package/build/did/publicDid.js +19 -0
- package/build/did/publicDid.js.map +1 -0
- package/build/did/reusedDidDocument.d.ts +37 -0
- package/build/did/reusedDidDocument.js +93 -0
- package/build/did/reusedDidDocument.js.map +1 -0
- package/build/events/BaseMessageEvents.d.ts +24 -0
- package/build/events/BaseMessageEvents.js +368 -14
- package/build/events/BaseMessageEvents.js.map +1 -1
- package/build/events/ConnectionEvents.js +149 -87
- package/build/events/ConnectionEvents.js.map +1 -1
- package/build/events/InvitationEvents.d.ts +6 -0
- package/build/events/InvitationEvents.js +57 -0
- package/build/events/InvitationEvents.js.map +1 -0
- package/build/events/VsAgentEvents.d.ts +40 -9
- package/build/events/VsAgentEvents.js +10 -1
- package/build/events/VsAgentEvents.js.map +1 -1
- package/build/events/VtFlowEvents.d.ts +1 -1
- package/build/events/VtFlowEvents.js +29 -17
- package/build/events/VtFlowEvents.js.map +1 -1
- package/build/events/index.d.ts +1 -0
- package/build/events/index.js +1 -0
- package/build/events/index.js.map +1 -1
- package/build/index.d.ts +9 -1
- package/build/index.js +20 -2
- package/build/index.js.map +1 -1
- package/build/plugins/setupBaseDidComm.js +20 -21
- package/build/plugins/setupBaseDidComm.js.map +1 -1
- package/build/transports/HttpInboundTransport.js +6 -1
- package/build/transports/HttpInboundTransport.js.map +1 -1
- package/build/transports/VsAgentWsInboundTransport.d.ts +1 -1
- package/build/transports/VsAgentWsInboundTransport.js +20 -14
- package/build/transports/VsAgentWsInboundTransport.js.map +1 -1
- package/build/types.d.ts +14 -13
- package/build/types.js +1 -2
- package/build/types.js.map +1 -1
- package/build/utils/agent.d.ts +42 -4
- package/build/utils/agent.js +126 -22
- package/build/utils/agent.js.map +1 -1
- package/build/utils/boundedFetch.d.ts +13 -0
- package/build/utils/boundedFetch.js +47 -0
- package/build/utils/boundedFetch.js.map +1 -0
- package/build/utils/didReadiness.js +5 -2
- package/build/utils/didReadiness.js.map +1 -1
- package/build/utils/ecsClaims.d.ts +46 -0
- package/build/utils/ecsClaims.js +115 -0
- package/build/utils/ecsClaims.js.map +1 -0
- package/build/utils/ecsService.d.ts +8 -0
- package/build/utils/ecsService.js +23 -0
- package/build/utils/ecsService.js.map +1 -0
- package/build/utils/index.d.ts +7 -0
- package/build/utils/index.js +7 -0
- package/build/utils/index.js.map +1 -1
- package/build/utils/publishedDidRecord.d.ts +15 -0
- package/build/utils/publishedDidRecord.js +83 -0
- package/build/utils/publishedDidRecord.js.map +1 -0
- package/build/utils/selfIssuedEcsCredential.d.ts +8 -0
- package/build/utils/selfIssuedEcsCredential.js +158 -0
- package/build/utils/selfIssuedEcsCredential.js.map +1 -0
- package/build/utils/setupSelfTr.d.ts +34 -74
- package/build/utils/setupSelfTr.js +79 -321
- package/build/utils/setupSelfTr.js.map +1 -1
- package/build/utils/trustCredentialStore.d.ts +87 -9
- package/build/utils/trustCredentialStore.js +343 -137
- package/build/utils/trustCredentialStore.js.map +1 -1
- package/build/utils/typeMetadata.d.ts +44 -0
- package/build/utils/typeMetadata.js +89 -0
- package/build/utils/typeMetadata.js.map +1 -0
- package/build/utils/util.d.ts +20 -0
- package/build/utils/util.js +29 -0
- package/build/utils/util.js.map +1 -1
- package/build/utils/vcdm2.d.ts +34 -0
- package/build/utils/vcdm2.js +60 -0
- package/build/utils/vcdm2.js.map +1 -0
- package/build/utils/vtjscResolver.d.ts +23 -0
- package/build/utils/vtjscResolver.js +53 -0
- package/build/utils/vtjscResolver.js.map +1 -0
- package/build/vtFlow/VtFlowOrchestrator.d.ts +108 -15
- package/build/vtFlow/VtFlowOrchestrator.js +692 -118
- package/build/vtFlow/VtFlowOrchestrator.js.map +1 -1
- package/build/vtFlow/assertVerifiableService.d.ts +31 -2
- package/build/vtFlow/assertVerifiableService.js +68 -10
- package/build/vtFlow/assertVerifiableService.js.map +1 -1
- package/build/vtFlow/ecsIssuanceExemption.d.ts +12 -0
- package/build/vtFlow/ecsIssuanceExemption.js +84 -0
- package/build/vtFlow/ecsIssuanceExemption.js.map +1 -0
- package/build/vtFlow/index.d.ts +1 -0
- package/build/vtFlow/index.js +1 -0
- package/build/vtFlow/index.js.map +1 -1
- package/package.json +27 -19
- package/build/did/migrateWebVhLog.d.ts +0 -34
- package/build/did/migrateWebVhLog.js +0 -230
- package/build/did/migrateWebVhLog.js.map +0 -1
- package/build/did/migrateWebVhVersionTime.d.ts +0 -9
- package/build/did/migrateWebVhVersionTime.js +0 -191
- package/build/did/migrateWebVhVersionTime.js.map +0 -1
package/build/agent/VsAgent.d.ts
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AnonCredsModule } from '@credo-ts/anoncreds';
|
|
2
|
+
import { AnonCredsDidCommCredentialFormatService, AnonCredsDidCommProofFormatService } from '@credo-ts/anoncreds/didcomm';
|
|
2
3
|
import { AskarModule, AskarModuleConfigStoreOptions } from '@credo-ts/askar';
|
|
3
4
|
import { Agent, AgentDependencies, DidsModule, InitConfig, W3cCredentialsModule } from '@credo-ts/core';
|
|
4
|
-
import { DidCommCredentialsModuleConfigOptions, DidCommCredentialV2Protocol,
|
|
5
|
+
import { DidCommCredentialsModuleConfigOptions, DidCommCredentialV2Protocol, DidCommDataIntegrityCredentialFormatService, DidCommFeatureQueryOptions, DidCommModule, DidCommModuleConfigOptions, DidCommProofsModuleConfigOptions, DidCommProofV2Protocol } from '@credo-ts/didcomm';
|
|
5
6
|
import { VtFlowModule } from '@verana-labs/credo-ts-didcomm-vt-flow';
|
|
7
|
+
import { AnonCredsTrustService } from '../blockchain/AnonCredsTrustService';
|
|
6
8
|
import { AuthorizationService } from '../blockchain/AuthorizationService';
|
|
7
9
|
import { VeranaChainService } from '../blockchain/VeranaChainService';
|
|
10
|
+
import { VeranaIndexerService } from '../blockchain/VeranaIndexerService';
|
|
11
|
+
import { ParentConnectionModule } from '../connections/ParentConnectionModule';
|
|
12
|
+
import { EcsClaims } from '../utils/ecsClaims';
|
|
8
13
|
type VsAgentDidCommModule = DidCommModule<DidCommModuleConfigOptions & {
|
|
9
14
|
credentials: DidCommCredentialsModuleConfigOptions<[
|
|
10
15
|
DidCommCredentialV2Protocol<[
|
|
11
|
-
LegacyIndyDidCommCredentialFormatService,
|
|
12
16
|
AnonCredsDidCommCredentialFormatService,
|
|
13
|
-
|
|
17
|
+
DidCommDataIntegrityCredentialFormatService
|
|
14
18
|
]>
|
|
15
19
|
]>;
|
|
16
|
-
proofs: DidCommProofsModuleConfigOptions<[
|
|
17
|
-
DidCommProofV2Protocol<[LegacyIndyDidCommProofFormatService, AnonCredsDidCommProofFormatService]>
|
|
18
|
-
]>;
|
|
20
|
+
proofs: DidCommProofsModuleConfigOptions<[DidCommProofV2Protocol<[AnonCredsDidCommProofFormatService]>]>;
|
|
19
21
|
}>;
|
|
20
22
|
export type BaseAgentModules = {
|
|
21
23
|
askar: AskarModule;
|
|
@@ -23,6 +25,7 @@ export type BaseAgentModules = {
|
|
|
23
25
|
dids: DidsModule;
|
|
24
26
|
w3cCredentials: W3cCredentialsModule;
|
|
25
27
|
didcomm: VsAgentDidCommModule;
|
|
28
|
+
parentConnection: ParentConnectionModule;
|
|
26
29
|
vtFlow: VtFlowModule;
|
|
27
30
|
};
|
|
28
31
|
interface AgentOptions<TModules extends BaseAgentModules> {
|
|
@@ -32,61 +35,54 @@ interface AgentOptions<TModules extends BaseAgentModules> {
|
|
|
32
35
|
}
|
|
33
36
|
export declare class VsAgent<TModules extends BaseAgentModules = BaseAgentModules> extends Agent<TModules> {
|
|
34
37
|
did?: string;
|
|
35
|
-
autoDiscloseUserProfile?: boolean;
|
|
36
38
|
publicApiBaseUrl: string;
|
|
37
39
|
adminApiServiceEndpoint?: string;
|
|
38
|
-
displayPictureUrl?: string;
|
|
39
|
-
label: string;
|
|
40
40
|
veranaChain?: VeranaChainService;
|
|
41
|
+
indexer: VeranaIndexerService;
|
|
42
|
+
trustedEcosystemDids?: string[];
|
|
43
|
+
ecsClaims?: EcsClaims;
|
|
41
44
|
authorizationService?: AuthorizationService;
|
|
42
45
|
discoveryOptions?: DidCommFeatureQueryOptions[];
|
|
46
|
+
readonly anonCredsTrust: AnonCredsTrustService;
|
|
43
47
|
constructor(options: AgentOptions<TModules> & {
|
|
44
48
|
did?: string;
|
|
45
|
-
autoDiscloseUserProfile?: boolean;
|
|
46
49
|
publicApiBaseUrl: string;
|
|
47
50
|
adminApiServiceEndpoint?: string;
|
|
48
|
-
displayPictureUrl?: string;
|
|
49
|
-
label: string;
|
|
50
51
|
veranaChain?: VeranaChainService;
|
|
52
|
+
indexer: VeranaIndexerService;
|
|
53
|
+
trustedEcosystemDids?: string[];
|
|
54
|
+
ecsClaims?: EcsClaims;
|
|
51
55
|
authorizationService?: AuthorizationService;
|
|
52
56
|
discoveryOptions?: DidCommFeatureQueryOptions[];
|
|
57
|
+
anonCredsTrust?: AnonCredsTrustService;
|
|
58
|
+
/** DEMO ONLY: see AnonCredsTrustServiceOptions.skipOwnAuthorization. */
|
|
59
|
+
skipOwnAuthorization?: boolean;
|
|
53
60
|
});
|
|
54
61
|
private get hasUserProfile();
|
|
62
|
+
/**
|
|
63
|
+
* [VSA-VT-LVP-5]: a `TriggerResolver` that the coalescing window still holds is the only signal of
|
|
64
|
+
* the publication change behind it, so the agent sends it before it stops.
|
|
65
|
+
*/
|
|
66
|
+
shutdown(): Promise<void>;
|
|
55
67
|
initialize(): Promise<void>;
|
|
68
|
+
private ensureSharedPublicDidInvitation;
|
|
56
69
|
private findCreatedDid;
|
|
57
70
|
private findEd25519VerificationMethodId;
|
|
58
71
|
private getDidCommServices;
|
|
59
|
-
private
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
* (e.g. `#z6Mk...`) while the DID document verification method uses a short fragment (e.g. `#BVhGnL79`).
|
|
63
|
-
* `getKmsKeyIdForVerifiacationMethod` matches by suffix (`vm.id.endsWith(relativeKeyId)`), so the
|
|
64
|
-
* mismatch leaves the update key unresolvable and every webvh update fails with
|
|
65
|
-
* "The key ID must be present before the log can be edited." The private key is present in the KMS;
|
|
66
|
-
* only the mapping label is wrong. Idempotent: a mapping that already correlates to a VM is left alone.
|
|
67
|
-
*/
|
|
68
|
-
private repairWebvhUpdateKeyMapping;
|
|
72
|
+
private replaceDerivedKeyAgreementKey;
|
|
73
|
+
private createKeyAgreementKey;
|
|
74
|
+
private addDidKey;
|
|
69
75
|
private createAndAddDidCommKeysAndServices;
|
|
70
|
-
private
|
|
71
|
-
/**
|
|
72
|
-
* Basic implicit webvh services, for the moment pointing to the service VP
|
|
73
|
-
* and public base URL
|
|
74
|
-
*/
|
|
75
|
-
private createAndAddWebVhImplicitServices;
|
|
76
|
-
private createAndAddAnonCredsServices;
|
|
76
|
+
private addLinkedVpContext;
|
|
77
77
|
private applyAdminApiService;
|
|
78
78
|
}
|
|
79
79
|
export interface VsAgentOptions {
|
|
80
80
|
config: InitConfig;
|
|
81
81
|
did?: string;
|
|
82
|
-
autoDiscloseUserProfile?: boolean;
|
|
83
82
|
dependencies: AgentDependencies;
|
|
84
83
|
publicApiBaseUrl: string;
|
|
85
84
|
adminApiServiceEndpoint?: string;
|
|
86
|
-
masterListCscaLocation?: string;
|
|
87
85
|
endpoints: string[];
|
|
88
86
|
walletConfig: AskarModuleConfigStoreOptions;
|
|
89
|
-
displayPictureUrl?: string;
|
|
90
|
-
label: string;
|
|
91
87
|
}
|
|
92
88
|
export {};
|