@learncard/core 5.0.0 → 5.1.0
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/dist/core.cjs.development.js +3415 -176
- package/dist/core.cjs.development.js.map +3 -3
- package/dist/core.cjs.production.min.js +165 -143
- package/dist/core.cjs.production.min.js.map +3 -3
- package/dist/core.d.ts +13 -1
- package/dist/core.esm.js +3415 -176
- package/dist/core.esm.js.map +3 -3
- package/package.json +4 -1
package/dist/core.d.ts
CHANGED
@@ -4678,6 +4678,10 @@ export declare type VCPluginMethods = DependentMethods & {
|
|
4678
4678
|
export declare type VerifyExtension = {
|
4679
4679
|
verifyCredential: (credential: VC) => Promise<VerificationCheck>;
|
4680
4680
|
};
|
4681
|
+
export declare type VpqrPluginMethods = {
|
4682
|
+
vpFromQrCode: (text: string) => Promise<VP>;
|
4683
|
+
vpToQrCode: (vp: VP) => Promise<string>;
|
4684
|
+
};
|
4681
4685
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
4682
4686
|
export declare type InitFunction<Args extends Record<string, any> | undefined = Record<string, any>, Config extends keyof LearnCardConfig = keyof LearnCardConfig, ReturnValue extends LearnCard<any, any> = LearnCard<any, any>> = {
|
4683
4687
|
args: undefined extends Args ? Partial<Pick<LearnCardConfig, Config>> : Args & Partial<Pick<LearnCardConfig, Config>>;
|
@@ -4699,7 +4703,7 @@ export declare type Wallet<PluginNames extends string = "", PluginMethods extend
|
|
4699
4703
|
remove: (contentId: string) => Promise<Wallet<PluginNames, PluginMethods>>;
|
4700
4704
|
addPlugin: <Name extends string, Methods extends Record<string, (...args: any[]) => any> = Record<never, never>>(plugin: Plugin<Name, Methods>) => Promise<Wallet<"" extends PluginNames ? Name : PluginNames | Name, Record<never, never> extends PluginMethods ? Methods : PluginMethods & Methods>>;
|
4701
4705
|
};
|
4702
|
-
export declare type LearnCardRawWallet = Wallet<"DIDKit" | "DID Key" | "VC" | "IDX" | "Expiration" | "Ethereum", DidKeyPluginMethods<DidMethod> & VCPluginMethods & IDXPluginMethods & EthereumPluginMethods>;
|
4706
|
+
export declare type LearnCardRawWallet = Wallet<"DIDKit" | "DID Key" | "VC" | "IDX" | "Expiration" | "Ethereum" | "Vpqr", DidKeyPluginMethods<DidMethod> & VCPluginMethods & IDXPluginMethods & EthereumPluginMethods & VpqrPluginMethods>;
|
4703
4707
|
export declare type AllLearnCardMethods = {
|
4704
4708
|
/** Wallet holder's did */
|
4705
4709
|
did: (type?: DidMethod) => string;
|
@@ -4808,6 +4812,14 @@ export declare type AllLearnCardMethods = {
|
|
4808
4812
|
* Really only useful for testing with the CLI right now...
|
4809
4813
|
*/
|
4810
4814
|
addInfuraProjectId: (infuraProjectIdToAdd: string) => void;
|
4815
|
+
/**
|
4816
|
+
* Returns a Verifiable Presentation (VP) from a QR code base-64 image data string containing a VP compressed by CBOR-LD.
|
4817
|
+
*/
|
4818
|
+
vpFromQrCode: (text: string) => Promise<VP>;
|
4819
|
+
/**
|
4820
|
+
* Returns a QR-embeddable base-64 image data string from a Verifiable Presentation, compressed using CBOR-LD.
|
4821
|
+
*/
|
4822
|
+
vpToQrCode: (vp: VP) => Promise<string>;
|
4811
4823
|
};
|
4812
4824
|
export declare type LearnCard<Methods extends keyof AllLearnCardMethods = keyof AllLearnCardMethods, RawWallet extends Wallet<any, any> = LearnCardRawWallet> = {
|
4813
4825
|
/** Raw IoE wallet instance. You shouldn't need to drop down to this level! */
|