@learncard/network-plugin 1.4.1 → 1.4.4
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/package.json +2 -2
- package/dist/index.d.ts +0 -3
- package/dist/index.js +0 -7
- package/dist/lcn-plugin.cjs.development.js +0 -101245
- package/dist/lcn-plugin.cjs.development.js.map +0 -7
- package/dist/lcn-plugin.cjs.production.min.js +0 -954
- package/dist/lcn-plugin.cjs.production.min.js.map +0 -7
- package/dist/lcn-plugin.esm.js +0 -101245
- package/dist/lcn-plugin.esm.js.map +0 -7
- package/dist/learnCard.d.ts +0 -9
- package/dist/plugin.d.ts +0 -11
- package/dist/test/index.test.d.ts +0 -1
- package/dist/test/mocks/sample-vcs.d.ts +0 -2
- package/dist/types.d.ts +0 -74
package/dist/learnCard.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { LearnCardFromSeed, AddPlugin, LearnCardPlugin } from '@learncard/core';
|
|
2
|
-
import { LearnCardNetworkPlugin, VerifyBoostPlugin } from './types';
|
|
3
|
-
export type BoostVerificationLearnCard = AddPlugin<LearnCardFromSeed['returnValue'], VerifyBoostPlugin>;
|
|
4
|
-
export type LCLearnCard = AddPlugin<BoostVerificationLearnCard, LearnCardPlugin>;
|
|
5
|
-
export type NetworkLearnCard = AddPlugin<LCLearnCard, LearnCardNetworkPlugin>;
|
|
6
|
-
export declare const initNetworkLearnCard: (_config: LearnCardFromSeed['args'] & {
|
|
7
|
-
network?: string;
|
|
8
|
-
trustedBoostRegistry?: string;
|
|
9
|
-
}) => Promise<NetworkLearnCard>;
|
package/dist/plugin.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { LearnCard, VerifyExtension } from '@learncard/core';
|
|
2
|
-
import { LearnCardNetworkPluginDependentMethods, LearnCardNetworkPlugin, VerifyBoostPlugin } from './types';
|
|
3
|
-
export * from './types';
|
|
4
|
-
/**
|
|
5
|
-
* @group Plugins
|
|
6
|
-
*/
|
|
7
|
-
export declare const getLearnCardNetworkPlugin: (learnCard: LearnCard<any, 'id', LearnCardNetworkPluginDependentMethods>, url: string) => Promise<LearnCardNetworkPlugin>;
|
|
8
|
-
/**
|
|
9
|
-
* @group Plugins
|
|
10
|
-
*/
|
|
11
|
-
export declare const getVerifyBoostPlugin: (learnCard: LearnCard<any, any, VerifyExtension>, trustedBoostRegistryUrl?: string) => Promise<VerifyBoostPlugin>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/types.d.ts
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import type { DID } from 'dids';
|
|
2
|
-
import { LCNProfile, UnsignedVC, VC, VP, SentCredentialInfo, JWE, Boost, BoostRecipientInfo, LCNSigningAuthorityForUserType, LCNBoostClaimLinkSigningAuthorityType, LCNBoostClaimLinkOptionsType } from '@learncard/types';
|
|
3
|
-
import { Plugin, ProofOptions, VerifyExtension } from '@learncard/core';
|
|
4
|
-
/** @group LearnCardNetwork Plugin */
|
|
5
|
-
export type LearnCardNetworkPluginDependentMethods = {
|
|
6
|
-
getDIDObject: () => DID;
|
|
7
|
-
getDidAuthVp: (options?: ProofOptions) => Promise<VP | string>;
|
|
8
|
-
issueCredential: (credential: UnsignedVC, signingOptions?: Partial<ProofOptions>) => Promise<VC>;
|
|
9
|
-
};
|
|
10
|
-
/** @group LearnCardNetwork Plugin */
|
|
11
|
-
export type LearnCardNetworkPluginMethods = {
|
|
12
|
-
createProfile: (profile: Omit<LCNProfile, 'did' | 'isServiceProfile'>) => Promise<string>;
|
|
13
|
-
createServiceProfile: (profile: Omit<LCNProfile, 'did' | 'isServiceProfile'>) => Promise<string>;
|
|
14
|
-
updateProfile: (profile: Partial<Omit<LCNProfile, 'did' | 'isServiceProfile'>>) => Promise<boolean>;
|
|
15
|
-
deleteProfile: () => Promise<boolean>;
|
|
16
|
-
getProfile: (profileId?: string) => Promise<LCNProfile | undefined>;
|
|
17
|
-
searchProfiles: (profileId?: string, options?: {
|
|
18
|
-
limit?: number;
|
|
19
|
-
includeSelf?: boolean;
|
|
20
|
-
includeConnectionStatus?: boolean;
|
|
21
|
-
}) => Promise<LCNProfile[]>;
|
|
22
|
-
connectWith: (profileId: string) => Promise<boolean>;
|
|
23
|
-
connectWithInvite: (profileId: string, challenge: string) => Promise<boolean>;
|
|
24
|
-
cancelConnectionRequest: (profileId: string) => Promise<boolean>;
|
|
25
|
-
disconnectWith: (profileId: string) => Promise<boolean>;
|
|
26
|
-
acceptConnectionRequest: (id: string) => Promise<boolean>;
|
|
27
|
-
getConnections: () => Promise<LCNProfile[]>;
|
|
28
|
-
getPendingConnections: () => Promise<LCNProfile[]>;
|
|
29
|
-
getConnectionRequests: () => Promise<LCNProfile[]>;
|
|
30
|
-
generateInvite: (challenge?: string) => Promise<{
|
|
31
|
-
profileId: string;
|
|
32
|
-
challenge: string;
|
|
33
|
-
}>;
|
|
34
|
-
sendCredential: (profileId: string, vc: UnsignedVC | VC, encrypt?: boolean) => Promise<string>;
|
|
35
|
-
acceptCredential: (uri: string) => Promise<boolean>;
|
|
36
|
-
getReceivedCredentials: (from?: string) => Promise<SentCredentialInfo[]>;
|
|
37
|
-
getSentCredentials: (to?: string) => Promise<SentCredentialInfo[]>;
|
|
38
|
-
getIncomingCredentials: (from?: string) => Promise<SentCredentialInfo[]>;
|
|
39
|
-
deleteCredential: (uri: string) => Promise<boolean>;
|
|
40
|
-
sendPresentation: (profileId: string, vp: VP, encrypt?: boolean) => Promise<string>;
|
|
41
|
-
acceptPresentation: (uri: string) => Promise<boolean>;
|
|
42
|
-
getReceivedPresentations: (from?: string) => Promise<SentCredentialInfo[]>;
|
|
43
|
-
getSentPresentations: (to?: string) => Promise<SentCredentialInfo[]>;
|
|
44
|
-
getIncomingPresentations: (from?: string) => Promise<SentCredentialInfo[]>;
|
|
45
|
-
deletePresentation: (uri: string) => Promise<boolean>;
|
|
46
|
-
createBoost: (credential: VC | UnsignedVC, metadata?: Partial<Omit<Boost, 'uri'>>) => Promise<string>;
|
|
47
|
-
getBoosts: () => Promise<{
|
|
48
|
-
name?: string;
|
|
49
|
-
uri: string;
|
|
50
|
-
}[]>;
|
|
51
|
-
getBoostRecipients: (uri: string, limit?: number, skip?: number) => Promise<BoostRecipientInfo[]>;
|
|
52
|
-
updateBoost: (uri: string, updates: Partial<Omit<Boost, 'uri'>>, credential: UnsignedVC | VC) => Promise<boolean>;
|
|
53
|
-
deleteBoost: (uri: string) => Promise<boolean>;
|
|
54
|
-
sendBoost: (profileId: string, boostUri: string, encrypt?: boolean) => Promise<string>;
|
|
55
|
-
registerSigningAuthority: (endpoint: string, name: string, did: string) => Promise<boolean>;
|
|
56
|
-
getRegisteredSigningAuthorities: (endpoint: string, name: string, did: string) => Promise<LCNSigningAuthorityForUserType[]>;
|
|
57
|
-
getRegisteredSigningAuthority: (endpoint: string, name: string) => Promise<LCNSigningAuthorityForUserType>;
|
|
58
|
-
generateClaimLink: (boostUri: string, claimLinkSA: LCNBoostClaimLinkSigningAuthorityType, options?: LCNBoostClaimLinkOptionsType, challenge?: string) => Promise<{
|
|
59
|
-
boostUri: string;
|
|
60
|
-
challenge: string;
|
|
61
|
-
}>;
|
|
62
|
-
claimBoostWithLink: (boostUri: string, challenge: string) => Promise<string>;
|
|
63
|
-
resolveFromLCN: (uri: string) => Promise<VC | UnsignedVC | VP | JWE>;
|
|
64
|
-
};
|
|
65
|
-
/** @group LearnCardNetwork Plugin */
|
|
66
|
-
export type LearnCardNetworkPlugin = Plugin<'LearnCard Network', 'id' | 'read' | 'store', LearnCardNetworkPluginMethods, 'id', LearnCardNetworkPluginDependentMethods>;
|
|
67
|
-
/** @group VerifyBoostPlugin Plugin */
|
|
68
|
-
export type VerifyBoostPlugin = Plugin<'VerifyBoost', any, VerifyExtension>;
|
|
69
|
-
/** @group VerifyBoostPlugin Plugin */
|
|
70
|
-
export type TrustedBoostRegistryEntry = {
|
|
71
|
-
id: string;
|
|
72
|
-
url: string;
|
|
73
|
-
did: string;
|
|
74
|
-
};
|