@learncard/core 7.0.1 → 8.0.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 +54720 -50901
- package/dist/core.cjs.development.js.map +3 -3
- package/dist/core.cjs.production.min.js +197 -197
- package/dist/core.cjs.production.min.js.map +3 -3
- package/dist/core.d.ts +1009 -495
- package/dist/core.esm.js +53338 -49519
- package/dist/core.esm.js.map +3 -3
- package/dist/didkit/didkit_wasm.d.ts +4 -4
- package/dist/didkit/didkit_wasm.js +26 -26
- package/dist/didkit/didkit_wasm_bg.wasm +0 -0
- package/dist/didkit/didkit_wasm_bg.wasm.d.ts +4 -4
- package/dist/didkit_wasm.d.ts +4 -4
- package/dist/didkit_wasm.js +26 -26
- package/dist/didkit_wasm_bg.wasm +0 -0
- package/dist/didkit_wasm_bg.wasm.d.ts +4 -4
- package/package.json +3 -2
package/dist/core.d.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
/// <reference types="node" />
|
|
4
4
|
|
|
5
|
+
import { CeramicClient } from '@ceramicnetwork/http-client';
|
|
5
6
|
import { StreamID } from '@ceramicnetwork/streamid';
|
|
6
7
|
import { ModelAliases } from '@glazed/types';
|
|
7
8
|
|
|
@@ -4663,8 +4664,7 @@ declare const VerificationItemValidator: z.ZodObject<{
|
|
|
4663
4664
|
check: string;
|
|
4664
4665
|
}>;
|
|
4665
4666
|
export declare type VerificationItem = z.infer<typeof VerificationItemValidator>;
|
|
4666
|
-
|
|
4667
|
-
export declare type IDXCredential<Metadata extends Record<string, any> = Record<never, never>> = {
|
|
4667
|
+
export declare type CredentialRecord<Metadata extends Record<string, any> = Record<never, never>> = {
|
|
4668
4668
|
id: string;
|
|
4669
4669
|
uri: string;
|
|
4670
4670
|
[key: string]: any;
|
|
@@ -4689,6 +4689,177 @@ declare const JWKValidator: z.ZodObject<{
|
|
|
4689
4689
|
d: string;
|
|
4690
4690
|
}>;
|
|
4691
4691
|
export declare type JWK = z.infer<typeof JWKValidator>;
|
|
4692
|
+
export declare type InitFunction<Args extends Record<string, any> = Record<string, any>, Config extends keyof LearnCardConfig | undefined = keyof LearnCardConfig, ReturnValue extends LearnCard<any, any> = LearnCard<any, any>> = {
|
|
4693
|
+
args: Args & (undefined extends Config ? {} : Partial<Pick<LearnCardConfig, NonNullable<Config>>>);
|
|
4694
|
+
returnValue: ReturnValue;
|
|
4695
|
+
};
|
|
4696
|
+
export declare type GenericInitFunction<InitFunctions extends InitFunction<any, any, any>[]> = {
|
|
4697
|
+
args: InitFunctions[number]["args"];
|
|
4698
|
+
returnValue: Promise<InitFunctions[number]["returnValue"]>;
|
|
4699
|
+
};
|
|
4700
|
+
export declare type DiscriminatedUnionize<T extends object = {}, K extends string = "type"> = {
|
|
4701
|
+
[Key in keyof T]: {
|
|
4702
|
+
[Key2 in K]: Key;
|
|
4703
|
+
} & T[Key];
|
|
4704
|
+
}[keyof T];
|
|
4705
|
+
export declare type OmitNevers<T extends Record<string, any>> = Omit<T, {
|
|
4706
|
+
[Index in keyof T]: [
|
|
4707
|
+
T[Index]
|
|
4708
|
+
] extends [
|
|
4709
|
+
never
|
|
4710
|
+
] ? Index : never;
|
|
4711
|
+
}[keyof T]>;
|
|
4712
|
+
export declare type CacheStrategy = "cache-only" | "cache-first" | "skip-cache";
|
|
4713
|
+
export declare type PlaneOptions = {
|
|
4714
|
+
cache?: CacheStrategy;
|
|
4715
|
+
};
|
|
4716
|
+
export declare type ControlPlane = "read" | "store" | "index" | "cache" | "id";
|
|
4717
|
+
export declare type FilterForPlane<Plugins extends Plugin[], Plane extends ControlPlane> = {
|
|
4718
|
+
[Index in keyof Plugins]: undefined extends Plugins[Index][Plane] ? never : Plugins[Index]["name"];
|
|
4719
|
+
}[number];
|
|
4720
|
+
export declare type GetPlanesForPlugins<Plugins extends Plugin[]> = any[] extends Plugins ? never : {
|
|
4721
|
+
[Index in keyof Plugins]: {
|
|
4722
|
+
[Key in ControlPlane]: undefined extends Plugins[Index][Key] ? never : Key;
|
|
4723
|
+
}[ControlPlane];
|
|
4724
|
+
}[number];
|
|
4725
|
+
export declare type GetPlaneProviders<Plugins extends Plugin[], Plane extends ControlPlane> = any[] extends Plugins ? any : {
|
|
4726
|
+
[Index in keyof Plugins]: undefined extends Plugins[Index][Plane] ? never : OmitNevers<{
|
|
4727
|
+
[Name in Plugins[number]["name"]]: Name extends Plugins[Index]["name"] ? {
|
|
4728
|
+
name: Name;
|
|
4729
|
+
displayName?: string;
|
|
4730
|
+
description?: string;
|
|
4731
|
+
} : never;
|
|
4732
|
+
}>;
|
|
4733
|
+
}[number];
|
|
4734
|
+
export declare type ReadPlane = {
|
|
4735
|
+
get: (uri?: string, options?: PlaneOptions) => Promise<VC | undefined>;
|
|
4736
|
+
};
|
|
4737
|
+
export declare type PluginReadPlane = ReadPlane;
|
|
4738
|
+
export declare type LearnCardReadPlane<Plugins extends Plugin[]> = ReadPlane & {
|
|
4739
|
+
providers: GetPlaneProviders<Plugins, "read">;
|
|
4740
|
+
};
|
|
4741
|
+
export declare type StorePlane = {
|
|
4742
|
+
upload: (vc: VC, options?: PlaneOptions) => Promise<string>;
|
|
4743
|
+
uploadMany?: (vcs: VC[], options?: PlaneOptions) => Promise<string[]>;
|
|
4744
|
+
};
|
|
4745
|
+
export declare type PluginStorePlane = StorePlane;
|
|
4746
|
+
export declare type LearnCardStorePlane<Plugins extends Plugin[]> = Record<FilterForPlane<Plugins, "store">, StorePlane> & {
|
|
4747
|
+
providers: GetPlaneProviders<Plugins, "store">;
|
|
4748
|
+
};
|
|
4749
|
+
export declare type IndexPlane = {
|
|
4750
|
+
get: <Metadata extends Record<string, any> = Record<never, never>>(query?: Record<string, any>, options?: PlaneOptions) => Promise<CredentialRecord<Metadata>[]>;
|
|
4751
|
+
add: <Metadata extends Record<string, any> = Record<never, never>>(obj: CredentialRecord<Metadata>, options?: PlaneOptions) => Promise<boolean>;
|
|
4752
|
+
update: (id: string, updates: Record<string, any>, options?: PlaneOptions) => Promise<boolean>;
|
|
4753
|
+
remove: (id: string, options?: PlaneOptions) => Promise<boolean>;
|
|
4754
|
+
};
|
|
4755
|
+
export declare type PluginIndexPlane = IndexPlane;
|
|
4756
|
+
export declare type LearnCardIndexPlane<Plugins extends Plugin[]> = {
|
|
4757
|
+
all: Pick<IndexPlane, "get">;
|
|
4758
|
+
providers: GetPlaneProviders<Plugins, "index">;
|
|
4759
|
+
} & Record<FilterForPlane<Plugins, "index">, IndexPlane>;
|
|
4760
|
+
export declare type CachePlane = {
|
|
4761
|
+
getIndex: <Metadata extends Record<string, any> = Record<never, never>>(name: string, query: Record<string, any>) => Promise<CredentialRecord<Metadata>[] | undefined>;
|
|
4762
|
+
setIndex: <Metadata extends Record<string, any> = Record<never, never>>(name: string, query: Record<string, any>, value: CredentialRecord<Metadata>[]) => Promise<boolean>;
|
|
4763
|
+
flushIndex: () => Promise<boolean>;
|
|
4764
|
+
getVc: (uri: string) => Promise<VC | undefined>;
|
|
4765
|
+
setVc: (uri: string, value: VC | undefined) => Promise<boolean>;
|
|
4766
|
+
flushVc: () => Promise<boolean>;
|
|
4767
|
+
};
|
|
4768
|
+
export declare type PluginCachePlane = CachePlane;
|
|
4769
|
+
export declare type LearnCardCachePlane<Plugins extends Plugin[]> = CachePlane & {
|
|
4770
|
+
providers: GetPlaneProviders<Plugins, "cache">;
|
|
4771
|
+
};
|
|
4772
|
+
export declare type IdPlane = {
|
|
4773
|
+
did: (method?: string, options?: PlaneOptions) => string;
|
|
4774
|
+
keypair: (algorithm?: string, options?: PlaneOptions) => JWK;
|
|
4775
|
+
};
|
|
4776
|
+
export declare type PluginIdPlane = IdPlane;
|
|
4777
|
+
export declare type LearnCardIdPlane<Plugins extends Plugin[]> = IdPlane & {
|
|
4778
|
+
providers: GetPlaneProviders<Plugins, "id">;
|
|
4779
|
+
};
|
|
4780
|
+
/** @group Utility Types */
|
|
4781
|
+
export declare type Last<T extends any[]> = T extends [
|
|
4782
|
+
...any[],
|
|
4783
|
+
infer R
|
|
4784
|
+
] ? R : never;
|
|
4785
|
+
/** @group Utility Types */
|
|
4786
|
+
export declare type RemoveLast<T extends any[]> = T extends [
|
|
4787
|
+
...infer R,
|
|
4788
|
+
any
|
|
4789
|
+
] ? R : [
|
|
4790
|
+
];
|
|
4791
|
+
/** @group Utility Types */
|
|
4792
|
+
export declare type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
4793
|
+
/** @group Utility Types */
|
|
4794
|
+
export declare type MergeObjects<Objects extends Record<string, any>[]> = undefined extends Objects[2] ? Omit<Objects[0], keyof Objects[1]> & Objects[1] : Omit<MergeObjects<RemoveLast<Objects>>, keyof Last<Objects>> & Last<Objects>;
|
|
4795
|
+
export declare type GenerateLearnCard<NewControlPlanes extends ControlPlane = never, NewMethods extends Record<string, (...args: any[]) => any> = Record<never, never>, ControlPlanes extends ControlPlane = never, Methods extends Record<string, (...args: any[]) => any> = Record<never, never>> = LearnCard<any, [
|
|
4796
|
+
ControlPlanes
|
|
4797
|
+
] extends [
|
|
4798
|
+
1 & ControlPlanes
|
|
4799
|
+
] ? NewControlPlanes : [
|
|
4800
|
+
NewControlPlanes
|
|
4801
|
+
] extends [
|
|
4802
|
+
1 & NewControlPlanes
|
|
4803
|
+
] ? ControlPlanes : ControlPlanes | NewControlPlanes, NewMethods & Methods>;
|
|
4804
|
+
export declare type AddImplicitLearnCardArgument<Functions extends Record<string, (...args: any[]) => any> = Record<never, never>, ControlPlanes extends ControlPlane = never, Methods extends Record<string, (...args: any[]) => any> = Record<never, never>, DependentControlPlanes extends ControlPlane = never, DependentMethods extends Record<string, (...args: any[]) => any> = Record<never, never>> = {
|
|
4805
|
+
[Key in keyof Functions]: <T extends GenerateLearnCard<ControlPlanes, Methods, DependentControlPlanes, DependentMethods>>(learnCard: T, ...args: Parameters<Functions[Key]>) => ReturnType<Functions[Key]>;
|
|
4806
|
+
};
|
|
4807
|
+
/** @group Universal Wallets */
|
|
4808
|
+
export declare type GetPluginMethods<Plugins extends Plugin[]> = undefined extends Plugins[1] ? NonNullable<Plugins[0]["_methods"]> : UnionToIntersection<NonNullable<MergeObjects<{
|
|
4809
|
+
[Key in keyof Plugins]: NonNullable<Plugins[Key]["_methods"]>;
|
|
4810
|
+
}>>>;
|
|
4811
|
+
/** @group Universal Wallets */
|
|
4812
|
+
export declare type Plugin<Name extends string = string, ControlPlanes extends ControlPlane = any, Methods extends Record<string, (...args: any[]) => any> = Record<never, never>, DependentControlPlanes extends ControlPlane = never, DependentMethods extends Record<string, (...args: any[]) => any> = Record<never, never>> = {
|
|
4813
|
+
name: Name;
|
|
4814
|
+
displayName?: string;
|
|
4815
|
+
description?: string;
|
|
4816
|
+
methods: AddImplicitLearnCardArgument<Methods, ControlPlanes, Methods, DependentControlPlanes, DependentMethods>;
|
|
4817
|
+
_methods?: Methods;
|
|
4818
|
+
read?: {};
|
|
4819
|
+
store?: {};
|
|
4820
|
+
index?: {};
|
|
4821
|
+
cache?: {};
|
|
4822
|
+
id?: {};
|
|
4823
|
+
} & ([
|
|
4824
|
+
ControlPlanes
|
|
4825
|
+
] extends [
|
|
4826
|
+
1 & ControlPlanes
|
|
4827
|
+
] ? {} : ("read" extends ControlPlanes ? {
|
|
4828
|
+
read: AddImplicitLearnCardArgument<PluginReadPlane, ControlPlanes, Methods, DependentControlPlanes, DependentMethods>;
|
|
4829
|
+
} : {}) & ("store" extends ControlPlanes ? {
|
|
4830
|
+
store: AddImplicitLearnCardArgument<PluginStorePlane, ControlPlanes, Methods, DependentControlPlanes, DependentMethods>;
|
|
4831
|
+
} : {}) & ("index" extends ControlPlanes ? {
|
|
4832
|
+
index: AddImplicitLearnCardArgument<PluginIndexPlane, ControlPlanes, Methods, DependentControlPlanes, DependentMethods>;
|
|
4833
|
+
} : {}) & ("cache" extends ControlPlanes ? {
|
|
4834
|
+
cache: AddImplicitLearnCardArgument<PluginCachePlane, ControlPlanes, Methods, DependentControlPlanes, DependentMethods>;
|
|
4835
|
+
} : {}) & ("id" extends ControlPlanes ? {
|
|
4836
|
+
id: AddImplicitLearnCardArgument<PluginIdPlane, ControlPlanes, Methods, DependentControlPlanes, DependentMethods>;
|
|
4837
|
+
} : {}));
|
|
4838
|
+
/** @group Universal Wallets */
|
|
4839
|
+
export declare type LearnCard<Plugins extends Plugin[] = [
|
|
4840
|
+
], ControlPlanes extends ControlPlane = GetPlanesForPlugins<Plugins>, PluginMethods = GetPluginMethods<Plugins>> = {
|
|
4841
|
+
plugins: Plugins;
|
|
4842
|
+
invoke: PluginMethods;
|
|
4843
|
+
addPlugin: <NewPlugin extends Plugin>(plugin: NewPlugin) => Promise<LearnCard<[
|
|
4844
|
+
...Plugins,
|
|
4845
|
+
NewPlugin
|
|
4846
|
+
]>>;
|
|
4847
|
+
debug?: typeof console.log;
|
|
4848
|
+
} & ([
|
|
4849
|
+
ControlPlanes
|
|
4850
|
+
] extends [
|
|
4851
|
+
1 & ControlPlanes
|
|
4852
|
+
] ? {} : ("read" extends ControlPlanes ? {
|
|
4853
|
+
read: LearnCardReadPlane<Plugins>;
|
|
4854
|
+
} : {}) & ("store" extends ControlPlanes ? {
|
|
4855
|
+
store: LearnCardStorePlane<Plugins>;
|
|
4856
|
+
} : {}) & ("index" extends ControlPlanes ? {
|
|
4857
|
+
index: LearnCardIndexPlane<Plugins>;
|
|
4858
|
+
} : {}) & ("cache" extends ControlPlanes ? {
|
|
4859
|
+
cache: LearnCardCachePlane<Plugins>;
|
|
4860
|
+
} : {}) & ("id" extends ControlPlanes ? {
|
|
4861
|
+
id: LearnCardIdPlane<Plugins>;
|
|
4862
|
+
} : {}));
|
|
4692
4863
|
/** @group DIDKit Plugin */
|
|
4693
4864
|
export declare type DidMethod = "key" | "tz" | "ethr" | `pkh:${"tz" | "tezos" | "sol" | "solana" | "eth" | "celo" | "poly" | "btc" | "doge" | "eip155" | "bip122"}` | `pkh:eip155:${string}` | `pkh:bip122:${string}`;
|
|
4694
4865
|
/** @group DIDKit Plugin */
|
|
@@ -4721,47 +4892,89 @@ export declare type DidkitPluginMethods = {
|
|
|
4721
4892
|
contextLoader: (url: string) => Promise<Record<string, any>>;
|
|
4722
4893
|
resolveDid: (did: string, inputMetadata?: InputMetadata) => Promise<Record<string, any>>;
|
|
4723
4894
|
};
|
|
4895
|
+
/** @group DIDKit Plugin */
|
|
4896
|
+
export declare type DIDKitPlugin = Plugin<"DIDKit", any, DidkitPluginMethods>;
|
|
4724
4897
|
/** @group DidKey Plugin */
|
|
4725
4898
|
export declare type Algorithm = "ed25519" | "secp256k1";
|
|
4726
4899
|
/** @group DidKey Plugin */
|
|
4727
|
-
export declare type DependentMethods<
|
|
4900
|
+
export declare type DependentMethods<DidMethod extends string> = {
|
|
4728
4901
|
generateEd25519KeyFromBytes: (bytes: Uint8Array) => JWK;
|
|
4729
4902
|
generateSecp256k1KeyFromBytes: (bytes: Uint8Array) => JWK;
|
|
4730
|
-
keyToDid: (
|
|
4903
|
+
keyToDid: (method: DidMethod, keypair: JWK) => string;
|
|
4731
4904
|
};
|
|
4732
4905
|
/** @group DidKey Plugin */
|
|
4733
4906
|
export declare type DidKeyPluginMethods<DidMethod extends string> = {
|
|
4734
|
-
getSubjectDid: (
|
|
4735
|
-
getSubjectKeypair: (
|
|
4907
|
+
getSubjectDid: (method?: DidMethod) => string;
|
|
4908
|
+
getSubjectKeypair: (algorithm?: Algorithm) => JWK;
|
|
4736
4909
|
getKey: () => string;
|
|
4737
4910
|
};
|
|
4738
|
-
/** @group
|
|
4739
|
-
export declare type
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4911
|
+
/** @group DidKey Plugin */
|
|
4912
|
+
export declare type DidKeyPlugin<DidMethod extends string = string> = Plugin<"DID Key", "id", DidKeyPluginMethods<DidMethod>, any, DependentMethods<DidMethod>>;
|
|
4913
|
+
/** @group VC Plugin */
|
|
4914
|
+
export declare type VCPluginDependentMethods = {
|
|
4915
|
+
getSubjectDid: (type: "key") => string;
|
|
4916
|
+
getSubjectKeypair: () => JWK;
|
|
4917
|
+
keyToVerificationMethod: (type: string, keypair: JWK) => Promise<string>;
|
|
4918
|
+
issueCredential: (credential: UnsignedVC, options: ProofOptions, keypair: JWK) => Promise<VC>;
|
|
4919
|
+
verifyCredential: (credential: VC, options?: ProofOptions) => Promise<VerificationCheck>;
|
|
4920
|
+
issuePresentation: (presentation: UnsignedVP, options: ProofOptions, keypair: JWK) => Promise<VP>;
|
|
4921
|
+
verifyPresentation: (presentation: VP, options?: ProofOptions) => Promise<VerificationCheck>;
|
|
4747
4922
|
};
|
|
4748
|
-
/** @group
|
|
4749
|
-
export declare type
|
|
4750
|
-
|
|
4751
|
-
|
|
4923
|
+
/** @group VC Plugin */
|
|
4924
|
+
export declare type VCPluginMethods = {
|
|
4925
|
+
issueCredential: (credential: UnsignedVC, signingOptions?: Partial<ProofOptions>) => Promise<VC>;
|
|
4926
|
+
verifyCredential: (credential: VC, options?: Partial<ProofOptions>) => Promise<VerificationCheck>;
|
|
4927
|
+
issuePresentation: (credential: UnsignedVP, signingOptions?: Partial<ProofOptions>) => Promise<VP>;
|
|
4928
|
+
verifyPresentation: (presentation: VP, options?: Partial<ProofOptions>) => Promise<VerificationCheck>;
|
|
4929
|
+
getTestVc: (subject?: string) => UnsignedVC;
|
|
4930
|
+
getTestVp: (credential?: VC) => Promise<UnsignedVP>;
|
|
4752
4931
|
};
|
|
4753
|
-
/** @group
|
|
4754
|
-
export declare type
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
logoURI: string;
|
|
4761
|
-
extensions: any;
|
|
4932
|
+
/** @group VC Plugin */
|
|
4933
|
+
export declare type VCDependentLearnCard = LearnCard<any, "id", VCPluginDependentMethods>;
|
|
4934
|
+
/** @group VC Plugin */
|
|
4935
|
+
export declare type VCImplicitLearnCard = LearnCard<any, "id", VCPluginMethods & VCPluginDependentMethods>;
|
|
4936
|
+
/** @group VC Plugin */
|
|
4937
|
+
export declare type VerifyExtension = {
|
|
4938
|
+
verifyCredential: (credential: VC) => Promise<VerificationCheck>;
|
|
4762
4939
|
};
|
|
4763
|
-
/** @group
|
|
4764
|
-
export declare type
|
|
4940
|
+
/** @group VC Plugin */
|
|
4941
|
+
export declare type VCPlugin = Plugin<"VC", any, VCPluginMethods, "id", VCPluginDependentMethods>;
|
|
4942
|
+
/** @group VC Templates Plugin */
|
|
4943
|
+
export declare type VcTemplates = {
|
|
4944
|
+
basic: {
|
|
4945
|
+
did?: string;
|
|
4946
|
+
subject?: string;
|
|
4947
|
+
issuanceDate?: string;
|
|
4948
|
+
};
|
|
4949
|
+
achievement: {
|
|
4950
|
+
did?: string;
|
|
4951
|
+
subject?: string;
|
|
4952
|
+
name?: string;
|
|
4953
|
+
achievementName?: string;
|
|
4954
|
+
description?: string;
|
|
4955
|
+
criteriaNarrative?: string;
|
|
4956
|
+
issuanceDate?: string;
|
|
4957
|
+
};
|
|
4958
|
+
};
|
|
4959
|
+
/** @group VC Templates Plugin */
|
|
4960
|
+
export declare type NewCredentialFunction = (args?: DiscriminatedUnionize<VcTemplates>) => UnsignedVC;
|
|
4961
|
+
/** @group VC Templates Plugin */
|
|
4962
|
+
export declare type VCTemplatePluginDependentMethods = {
|
|
4963
|
+
getSubjectDid?: (type: "key") => string;
|
|
4964
|
+
};
|
|
4965
|
+
/** @group VC Templates Plugin */
|
|
4966
|
+
export declare type VCTemplatePluginMethods = {
|
|
4967
|
+
newCredential: NewCredentialFunction;
|
|
4968
|
+
newPresentation: (credential: VC, args?: {
|
|
4969
|
+
did?: string;
|
|
4970
|
+
}) => Promise<UnsignedVP>;
|
|
4971
|
+
};
|
|
4972
|
+
/** @group VC Templates Plugin */
|
|
4973
|
+
export declare type VCTemplatePlugin = Plugin<"VC Templates", any, VCTemplatePluginMethods, "id", VCTemplatePluginDependentMethods>;
|
|
4974
|
+
/**
|
|
4975
|
+
* @group Plugins
|
|
4976
|
+
*/
|
|
4977
|
+
export declare const getVCTemplatesPlugin: () => VCTemplatePlugin;
|
|
4765
4978
|
/** @group VC Resolution Plugin */
|
|
4766
4979
|
export declare type LC_URI<URI extends string = ""> = string | URI;
|
|
4767
4980
|
/** @group VC Resolution Plugin */
|
|
@@ -4772,71 +4985,58 @@ export declare type VCResolutionPluginMethods = {
|
|
|
4772
4985
|
export declare type ResolutionExtension<URI extends string> = {
|
|
4773
4986
|
resolveCredential: (uri?: LC_URI<URI>) => Promise<VC | undefined>;
|
|
4774
4987
|
};
|
|
4775
|
-
export declare type
|
|
4776
|
-
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
export declare
|
|
4780
|
-
|
|
4781
|
-
|
|
4782
|
-
] ? R : [
|
|
4783
|
-
];
|
|
4784
|
-
/** @group Utility Types */
|
|
4785
|
-
export declare type MergeObjects<Objects extends Record<string, any>[]> = undefined extends Objects[2] ? Omit<Objects[0], keyof Objects[1]> & Objects[1] : Omit<MergeObjects<RemoveLast<Objects>>, keyof Last<Objects>> & Last<Objects>;
|
|
4786
|
-
/** @group Universal Wallets */
|
|
4787
|
-
export declare type Plugin<Name extends string, PublicMethods extends Record<string, (...args: any[]) => any> = Record<never, never>, DependentMethods extends Record<string, (...args: any[]) => any> = Record<never, never>> = {
|
|
4788
|
-
name?: Name;
|
|
4789
|
-
pluginMethods: {
|
|
4790
|
-
[Key in keyof PublicMethods]: <T extends Wallet<any, PublicMethods & DependentMethods>>(wallet: T, ...args: Parameters<PublicMethods[Key]>) => ReturnType<PublicMethods[Key]>;
|
|
4791
|
-
};
|
|
4792
|
-
};
|
|
4793
|
-
/** @group Universal Wallets */
|
|
4794
|
-
export declare type PublicFieldsObj<PluginMethods extends Record<string, (...args: any[]) => any> = Record<never, never>> = {
|
|
4795
|
-
pluginMethods: PluginMethods;
|
|
4796
|
-
};
|
|
4797
|
-
/** @group Universal Wallets */
|
|
4798
|
-
export declare type Wallet<PluginNames extends string = "", PluginMethods extends Record<string, (...args: any[]) => any> = Record<never, never>> = PublicFieldsObj<PluginMethods> & {
|
|
4799
|
-
contents: any[];
|
|
4800
|
-
plugins: Plugin<PluginNames, Record<string, (...args: any[]) => any>>[];
|
|
4801
|
-
add: (content: any) => Promise<Wallet<PluginNames, PluginMethods>>;
|
|
4802
|
-
remove: (contentId: string) => Promise<Wallet<PluginNames, PluginMethods>>;
|
|
4803
|
-
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 : MergeObjects<[
|
|
4804
|
-
PluginMethods,
|
|
4805
|
-
Methods
|
|
4806
|
-
]>>>;
|
|
4807
|
-
};
|
|
4808
|
-
/** @group IDXPlugin */
|
|
4809
|
-
export declare type CeramicIDXArgs = {
|
|
4810
|
-
modelData: ModelAliases;
|
|
4811
|
-
credentialAlias: string;
|
|
4988
|
+
export declare type VCResolutionPluginType = Plugin<"VC Resolution", any, VCResolutionPluginMethods>;
|
|
4989
|
+
/**
|
|
4990
|
+
* @group Plugins
|
|
4991
|
+
*/
|
|
4992
|
+
export declare const VCResolutionPlugin: VCResolutionPluginType;
|
|
4993
|
+
/** @group CeramicPlugin */
|
|
4994
|
+
export declare type CeramicArgs = {
|
|
4812
4995
|
ceramicEndpoint: string;
|
|
4813
4996
|
defaultContentFamily: string;
|
|
4814
4997
|
};
|
|
4815
|
-
/** @group
|
|
4998
|
+
/** @group CeramicPlugin */
|
|
4816
4999
|
export declare type CeramicURI = `lc:ceramic:${string}`;
|
|
4817
|
-
/** @group
|
|
5000
|
+
/** @group CeramicPlugin */
|
|
4818
5001
|
export declare const CeramicURIValidator: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
4819
|
-
/** @group
|
|
4820
|
-
export declare type
|
|
4821
|
-
getCredentialsListFromIdx: <Metadata extends Record<string, any> = Record<never, never>>(alias?: string) => Promise<CredentialsList<Metadata>>;
|
|
5002
|
+
/** @group CeramicPlugin */
|
|
5003
|
+
export declare type CeramicPluginMethods<URI extends string = ""> = {
|
|
4822
5004
|
publishContentToCeramic: (cred: any) => Promise<CeramicURI>;
|
|
4823
5005
|
readContentFromCeramic: (streamId: string) => Promise<any>;
|
|
5006
|
+
getCeramicClient: () => CeramicClient;
|
|
5007
|
+
} & ResolutionExtension<URI | CeramicURI>;
|
|
5008
|
+
/** @group CeramicPlugin */
|
|
5009
|
+
export declare type CeramicPluginDependentMethods<URI extends string = ""> = {
|
|
5010
|
+
getKey: () => string;
|
|
5011
|
+
} & ResolutionExtension<URI>;
|
|
5012
|
+
/** @group CeramicPlugin */
|
|
5013
|
+
export declare type CeramicPlugin = Plugin<"Ceramic", "read" | "store", CeramicPluginMethods>;
|
|
5014
|
+
/** @group IDXPlugin */
|
|
5015
|
+
export declare type IDXArgs = {
|
|
5016
|
+
modelData: ModelAliases;
|
|
5017
|
+
credentialAlias: string;
|
|
5018
|
+
};
|
|
5019
|
+
/** @group IDXPlugin */
|
|
5020
|
+
export declare type IDXPluginMethods = {
|
|
5021
|
+
getCredentialsListFromIdx: <Metadata extends Record<string, any> = Record<never, never>>(alias?: string) => Promise<CredentialRecord<Metadata>[]>;
|
|
4824
5022
|
getVerifiableCredentialFromIdx: (id: string) => Promise<VC | undefined>;
|
|
4825
5023
|
getVerifiableCredentialsFromIdx: () => Promise<VC[]>;
|
|
4826
|
-
addVerifiableCredentialInIdx: <Metadata extends Record<string, any> = Record<never, never>>(cred:
|
|
5024
|
+
addVerifiableCredentialInIdx: <Metadata extends Record<string, any> = Record<never, never>>(cred: CredentialRecord<Metadata>) => Promise<string>;
|
|
4827
5025
|
removeVerifiableCredentialInIdx: (title: string) => Promise<StreamID>;
|
|
4828
|
-
}
|
|
5026
|
+
};
|
|
4829
5027
|
/** @group IDXPlugin */
|
|
4830
5028
|
export declare type IDXPluginDependentMethods<URI extends string = ""> = {
|
|
4831
|
-
|
|
5029
|
+
getCeramicClient: () => CeramicClient;
|
|
4832
5030
|
} & ResolutionExtension<URI>;
|
|
4833
5031
|
/** @group IDXPlugin */
|
|
4834
5032
|
export declare type CredentialsList<Metadata extends Record<string, any> = Record<never, never>> = {
|
|
4835
|
-
credentials: Array<
|
|
5033
|
+
credentials: Array<CredentialRecord<Metadata>>;
|
|
4836
5034
|
};
|
|
4837
5035
|
/** @group IDXPlugin */
|
|
4838
5036
|
export declare const CredentialsListValidator: z.ZodType<CredentialsList>;
|
|
4839
5037
|
/** @group IDXPlugin */
|
|
5038
|
+
export declare type IDXPlugin = Plugin<"IDX", "index", IDXPluginMethods, "read", IDXPluginDependentMethods>;
|
|
5039
|
+
/** @group IDXPlugin */
|
|
4840
5040
|
export declare type BackwardsCompatIDXCredential<Metadata extends Record<string, any> = Record<never, never>> = {
|
|
4841
5041
|
[key: string]: any;
|
|
4842
5042
|
id: string;
|
|
@@ -4847,35 +5047,45 @@ export declare type BackwardsCompatIDXCredential<Metadata extends Record<string,
|
|
|
4847
5047
|
export declare const BackwardsCompatIDXCredentialValidator: z.ZodType<BackwardsCompatIDXCredential>;
|
|
4848
5048
|
/** @group IDXPlugin */
|
|
4849
5049
|
export declare type BackwardsCompatCredentialsList<Metadata extends Record<string, any> = Record<never, never>> = {
|
|
4850
|
-
credentials: Array<
|
|
5050
|
+
credentials: Array<CredentialRecord<Metadata> | BackwardsCompatIDXCredential<Metadata>>;
|
|
4851
5051
|
};
|
|
4852
5052
|
/** @group IDXPlugin */
|
|
4853
5053
|
export declare const BackwardsCompatCredentialsListValidator: z.ZodType<BackwardsCompatCredentialsList>;
|
|
4854
|
-
/**
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
5054
|
+
/**
|
|
5055
|
+
* @group Plugins
|
|
5056
|
+
*/
|
|
5057
|
+
export declare const getVCPlugin: (learnCard: VCDependentLearnCard) => VCPlugin;
|
|
5058
|
+
export declare type ExpirationPlugin = Plugin<"Expiration", any, VerifyExtension>;
|
|
5059
|
+
/** @group Ethereum Plugin */
|
|
5060
|
+
export declare type EthereumPluginMethods = {
|
|
5061
|
+
getEthereumAddress: () => string;
|
|
5062
|
+
getBalance: (symbolOrAddress?: string) => Promise<string>;
|
|
5063
|
+
getBalanceForAddress: (walletAddress: string, symbolOrAddress?: string) => Promise<string>;
|
|
5064
|
+
transferTokens: (tokenSymbolOrAddress: string, amount: number, toAddress: string) => Promise<string>;
|
|
5065
|
+
getGasPrice: () => Promise<string>;
|
|
5066
|
+
getCurrentNetwork: () => providers.Networkish;
|
|
5067
|
+
changeNetwork: (network: providers.Networkish) => void;
|
|
5068
|
+
addInfuraProjectId: (infuraProjectIdToAdd: string) => void;
|
|
4863
5069
|
};
|
|
4864
|
-
/** @group
|
|
4865
|
-
export declare type
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
issuePresentation: (credential: UnsignedVP, signingOptions?: Partial<ProofOptions>) => Promise<VP>;
|
|
4869
|
-
verifyPresentation: (presentation: VP, options?: Partial<ProofOptions>) => Promise<VerificationCheck>;
|
|
4870
|
-
getTestVc: (subject?: string) => UnsignedVC;
|
|
4871
|
-
getTestVp: (credential?: VC) => Promise<UnsignedVP>;
|
|
5070
|
+
/** @group Ethereum Plugin */
|
|
5071
|
+
export declare type EthereumConfig = {
|
|
5072
|
+
infuraProjectId?: string;
|
|
5073
|
+
network?: providers.Networkish;
|
|
4872
5074
|
};
|
|
4873
|
-
/** @group
|
|
4874
|
-
export declare type
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
|
|
5075
|
+
/** @group Ethereum Plugin */
|
|
5076
|
+
export declare type Token = {
|
|
5077
|
+
chainId: number;
|
|
5078
|
+
address: string;
|
|
5079
|
+
name: string;
|
|
5080
|
+
symbol: string;
|
|
5081
|
+
decimals: number;
|
|
5082
|
+
logoURI: string;
|
|
5083
|
+
extensions: any;
|
|
4878
5084
|
};
|
|
5085
|
+
/** @group Ethereum Plugin */
|
|
5086
|
+
export declare type TokenList = Token[];
|
|
5087
|
+
/** @group Ethereum Plugin */
|
|
5088
|
+
export declare type EthereumPlugin = Plugin<"Ethereum", any, EthereumPluginMethods, "id">;
|
|
4879
5089
|
/** @group VPQR Plugin */
|
|
4880
5090
|
export declare type VpqrPluginMethods = {
|
|
4881
5091
|
vpFromQrCode: (text: string) => Promise<VP>;
|
|
@@ -4885,6 +5095,7 @@ export declare type VpqrPluginMethods = {
|
|
|
4885
5095
|
export declare type VpqrPluginDependentMethods = {
|
|
4886
5096
|
contextLoader: (url: string) => Promise<Record<string, any>>;
|
|
4887
5097
|
};
|
|
5098
|
+
export declare type VpqrPlugin = Plugin<"Vpqr", any, VpqrPluginMethods, any, VpqrPluginDependentMethods>;
|
|
4888
5099
|
/** @group CHAPI Plugin */
|
|
4889
5100
|
export declare type WebCredential = {
|
|
4890
5101
|
new (dataType: string, data: VP, options?: {
|
|
@@ -4968,49 +5179,12 @@ export declare type CHAPIPluginMethods = {
|
|
|
4968
5179
|
}>;
|
|
4969
5180
|
storePresentationViaChapi: (presentation: UnsignedVP | VP) => Promise<Credential | undefined>;
|
|
4970
5181
|
};
|
|
5182
|
+
/** @group CHAPI Plugin */
|
|
5183
|
+
export declare type CHAPIPlugin = Plugin<"CHAPI", any, CHAPIPluginMethods, any, CHAPIPluginDependentMethods>;
|
|
4971
5184
|
/**
|
|
4972
5185
|
* @group Plugins
|
|
4973
5186
|
*/
|
|
4974
|
-
export declare const getCHAPIPlugin: () => Promise<
|
|
4975
|
-
export declare type InitFunction<Args extends Record<string, any> = Record<string, any>, Config extends keyof LearnCardConfig = keyof LearnCardConfig, ReturnValue extends LearnCard<any, any> = LearnCard<any, any>> = {
|
|
4976
|
-
args: Args & Partial<Pick<LearnCardConfig, Config>>;
|
|
4977
|
-
returnValue: ReturnValue;
|
|
4978
|
-
};
|
|
4979
|
-
export declare type GenericInitFunction<InitFunctions extends InitFunction<any, any, any>[]> = {
|
|
4980
|
-
args: InitFunctions[number]["args"];
|
|
4981
|
-
returnValue: Promise<InitFunctions[number]["returnValue"]>;
|
|
4982
|
-
};
|
|
4983
|
-
export declare type DiscriminatedUnionize<T extends object = {}, K extends string = "type"> = {
|
|
4984
|
-
[Key in keyof T]: {
|
|
4985
|
-
[Key2 in K]: Key;
|
|
4986
|
-
} & T[Key];
|
|
4987
|
-
}[keyof T];
|
|
4988
|
-
/** @group VC Templates Plugin */
|
|
4989
|
-
export declare type VcTemplates = {
|
|
4990
|
-
basic: {
|
|
4991
|
-
did?: string;
|
|
4992
|
-
subject?: string;
|
|
4993
|
-
issuanceDate?: string;
|
|
4994
|
-
};
|
|
4995
|
-
achievement: {
|
|
4996
|
-
did?: string;
|
|
4997
|
-
subject?: string;
|
|
4998
|
-
name?: string;
|
|
4999
|
-
achievementName?: string;
|
|
5000
|
-
description?: string;
|
|
5001
|
-
criteriaNarrative?: string;
|
|
5002
|
-
issuanceDate?: string;
|
|
5003
|
-
};
|
|
5004
|
-
};
|
|
5005
|
-
/** @group VC Templates Plugin */
|
|
5006
|
-
export declare type NewCredentialFunction = (args?: DiscriminatedUnionize<VcTemplates>) => UnsignedVC;
|
|
5007
|
-
/** @group VC Templates Plugin */
|
|
5008
|
-
export declare type VCTemplatePluginMethods = {
|
|
5009
|
-
newCredential: NewCredentialFunction;
|
|
5010
|
-
newPresentation: (credential: VC, args?: {
|
|
5011
|
-
did?: string;
|
|
5012
|
-
}) => Promise<UnsignedVP>;
|
|
5013
|
-
};
|
|
5187
|
+
export declare const getCHAPIPlugin: () => Promise<CHAPIPlugin>;
|
|
5014
5188
|
/** @group VC-API Plugin */
|
|
5015
5189
|
export declare type APIOptions = {
|
|
5016
5190
|
created?: string;
|
|
@@ -5027,415 +5201,755 @@ export declare type VCAPIPluginMethods = {
|
|
|
5027
5201
|
getTestVc: (subject?: string) => UnsignedVC;
|
|
5028
5202
|
getTestVp: (credential?: VC) => Promise<UnsignedVP>;
|
|
5029
5203
|
};
|
|
5204
|
+
/** @group VC-API Plugin */
|
|
5205
|
+
export declare type VCAPIPlugin = Plugin<"VC API", "id", VCAPIPluginMethods>;
|
|
5030
5206
|
/**
|
|
5031
5207
|
*
|
|
5032
5208
|
* @group Plugins
|
|
5033
5209
|
*/
|
|
5034
|
-
export declare const getDidKitPlugin: (input?: InitInput | Promise<InitInput>) => Promise<
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
*/
|
|
5039
|
-
export declare const getDidKeyPlugin: <DidMethod extends string>(wallet: Wallet<string, DependentMethods<DidMethod>>, key: string) => Promise<Plugin<"DID Key", DidKeyPluginMethods<DidMethod>, Record<never, never>>>;
|
|
5040
|
-
/**
|
|
5041
|
-
* @group Plugins
|
|
5042
|
-
*/
|
|
5043
|
-
export declare const getVCPlugin: (wallet: Wallet<string, VCPluginDependentMethods>) => Plugin<"VC", VCPluginMethods, VCPluginDependentMethods>;
|
|
5044
|
-
/**
|
|
5045
|
-
* @group Plugins
|
|
5046
|
-
*/
|
|
5047
|
-
export declare const getIDXPlugin: <URI extends string = "">(wallet: Wallet<any, IDXPluginDependentMethods<URI>>, { modelData, credentialAlias, ceramicEndpoint, defaultContentFamily }: CeramicIDXArgs) => Promise<Plugin<"IDX", IDXPluginMethods<URI>, Record<never, never>>>;
|
|
5048
|
-
/**
|
|
5049
|
-
* @group Plugins
|
|
5050
|
-
*/
|
|
5051
|
-
export declare const ExpirationPlugin: (wallet: Wallet<any, VerifyExtension>) => Plugin<"Expiration", VerifyExtension>;
|
|
5052
|
-
/**
|
|
5053
|
-
* @group Plugins
|
|
5054
|
-
*/
|
|
5055
|
-
export declare const getEthereumPlugin: (initWallet: Wallet<string, {
|
|
5056
|
-
getSubjectDid: (type: DidMethod) => string;
|
|
5057
|
-
getSubjectKeypair: (type?: Algorithm) => JWK;
|
|
5058
|
-
}>, config: EthereumConfig) => Plugin<"Ethereum", EthereumPluginMethods>;
|
|
5059
|
-
/**
|
|
5060
|
-
* @group Plugins
|
|
5061
|
-
*/
|
|
5062
|
-
export declare const getVpqrPlugin: (wallet: Wallet<string, VpqrPluginDependentMethods>) => Plugin<"Vpqr", VpqrPluginMethods>;
|
|
5063
|
-
/**
|
|
5064
|
-
* Wallet holder's did
|
|
5065
|
-
*
|
|
5066
|
-
* @group LearnCard Methods
|
|
5067
|
-
*/
|
|
5068
|
-
export declare type Did = (type?: DidMethod) => string;
|
|
5069
|
-
/**
|
|
5070
|
-
* Wallet holder's ed25519 key pair
|
|
5071
|
-
*
|
|
5072
|
-
* @group LearnCard Methods
|
|
5073
|
-
*/
|
|
5074
|
-
export declare type Keypair = (type?: Algorithm) => {
|
|
5075
|
-
kty: string;
|
|
5076
|
-
crv: string;
|
|
5077
|
-
x: string;
|
|
5078
|
-
y?: string;
|
|
5079
|
-
d: string;
|
|
5210
|
+
export declare const getDidKitPlugin: (input?: InitInput | Promise<InitInput>) => Promise<DIDKitPlugin>;
|
|
5211
|
+
export declare type VerifyCredential = {
|
|
5212
|
+
(vc: VC, options?: Partial<ProofOptions>): Promise<VerificationCheck>;
|
|
5213
|
+
(vc: VC, options: Partial<ProofOptions>, prettify: true): Promise<VerificationItem[]>;
|
|
5080
5214
|
};
|
|
5081
|
-
/**
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
|
|
5085
|
-
*/
|
|
5086
|
-
export declare type
|
|
5087
|
-
/**
|
|
5088
|
-
* Wraps a VC in a simple Presentation
|
|
5089
|
-
*
|
|
5090
|
-
* @group LearnCard Methods
|
|
5091
|
-
*/
|
|
5092
|
-
export declare type NewPresentation = (credential: VC, args?: {
|
|
5093
|
-
did?: string;
|
|
5094
|
-
}) => Promise<UnsignedVP>;
|
|
5095
|
-
/**
|
|
5096
|
-
* Signs an unsigned Verifiable Credential, returning the signed VC
|
|
5097
|
-
*
|
|
5098
|
-
* @group LearnCard Methods
|
|
5099
|
-
*/
|
|
5100
|
-
export declare type IssueCredential = (credential: UnsignedVC, signingOptions?: Partial<ProofOptions>) => Promise<VC>;
|
|
5101
|
-
/**
|
|
5102
|
-
* Verifies a signed Verifiable Credential
|
|
5103
|
-
*
|
|
5104
|
-
* Empty error/warnings arrays means verification was successful
|
|
5105
|
-
*
|
|
5106
|
-
* @group LearnCard Methods
|
|
5107
|
-
*/
|
|
5108
|
-
export declare type VerifyCredential = (credential: VC, options?: Partial<ProofOptions>) => Promise<VerificationItem[]>;
|
|
5109
|
-
/**
|
|
5110
|
-
* Signs an unsigned Verifiable Presentation, returning the signed VP
|
|
5111
|
-
*
|
|
5112
|
-
* @group LearnCard Methods
|
|
5113
|
-
*/
|
|
5114
|
-
export declare type IssuePresentation = (presentation: UnsignedVP, signingOptions?: Partial<ProofOptions>) => Promise<VP>;
|
|
5115
|
-
/**
|
|
5116
|
-
* Verifies a signed Verifiable Presentation
|
|
5117
|
-
*
|
|
5118
|
-
* Empry error/warnings arrays means verification was successful
|
|
5119
|
-
*
|
|
5120
|
-
* @group LearnCard Methods
|
|
5121
|
-
*/
|
|
5122
|
-
export declare type VerifyPresentation = (presentation: VP, options?: Partial<ProofOptions>) => Promise<VerificationCheck>;
|
|
5123
|
-
/**
|
|
5124
|
-
* Returns the credential marked with `title` from IDX
|
|
5125
|
-
*
|
|
5126
|
-
* @group LearnCard Methods
|
|
5127
|
-
*/
|
|
5128
|
-
export declare type GetCredential = (title: string) => Promise<VC | undefined>;
|
|
5129
|
-
/**
|
|
5130
|
-
* Returns all credentials from IDX
|
|
5131
|
-
*
|
|
5132
|
-
* @group LearnCard Methods
|
|
5133
|
-
*/
|
|
5134
|
-
export declare type GetCredentials = () => Promise<VC[]>;
|
|
5135
|
-
/**
|
|
5136
|
-
* Returns all credentials from IDX
|
|
5137
|
-
*
|
|
5138
|
-
* @group LearnCard Methods
|
|
5139
|
-
*/
|
|
5140
|
-
export declare type GetCredentialsList = <Metadata extends Record<string, any> = Record<never, never>>() => Promise<IDXCredential<Metadata>[]>;
|
|
5141
|
-
/**
|
|
5142
|
-
* Publishes a credential to Ceramic, returning the credential's Ceramic URI
|
|
5143
|
-
*
|
|
5144
|
-
* This URI may then be shared/persisted/resolved to gain access to the credential
|
|
5145
|
-
*
|
|
5146
|
-
* Resolving a URI can be done by passing the URI to `resolveCredential`
|
|
5147
|
-
*
|
|
5148
|
-
* @group LearnCard Methods
|
|
5149
|
-
*/
|
|
5150
|
-
export declare type PublishCredential = (credential: VC) => Promise<CeramicURI>;
|
|
5151
|
-
/**
|
|
5152
|
-
* Adds a URI pointing to a credential (such as the one returned by `publishCredential`)
|
|
5153
|
-
* to IDX with a bespoke ID
|
|
5154
|
-
*
|
|
5155
|
-
* The credential may then be retrieved using `getCredential` and passing in that bespoke ID,
|
|
5156
|
-
* or by using `getCredentials`/`getCredentialsList` to get a list of all credentials that have been added to IDX
|
|
5157
|
-
*
|
|
5158
|
-
* @group LearnCard Methods
|
|
5159
|
-
*/
|
|
5160
|
-
export declare type AddCredential = <Metadata extends Record<string, any> = Record<never, never>>(credential: IDXCredential<Metadata>) => Promise<void>;
|
|
5161
|
-
/**
|
|
5162
|
-
* Removes a credential from IDX by passing in its bespoke ID
|
|
5163
|
-
*
|
|
5164
|
-
* @group LearnCard Methods
|
|
5165
|
-
*/
|
|
5166
|
-
export declare type RemoveCredential = (id: string) => Promise<void>;
|
|
5167
|
-
/**
|
|
5168
|
-
* Resolves a did to its did document
|
|
5169
|
-
*
|
|
5170
|
-
* @group LearnCard Methods
|
|
5171
|
-
*/
|
|
5172
|
-
export declare type ResolveDid = (did: string, inputMetadata?: InputMetadata) => Promise<Record<string, any>>;
|
|
5173
|
-
/**
|
|
5174
|
-
* Resolves a stream ID, returning its contents
|
|
5175
|
-
*
|
|
5176
|
-
* @group LearnCard Methods
|
|
5177
|
-
*/
|
|
5178
|
-
export declare type ReadFromCeramic = (streamId: string) => Promise<any>;
|
|
5179
|
-
/**
|
|
5180
|
-
* Resolves a LearnCard URI (e.g. lc:ceramic:1234561)
|
|
5181
|
-
*
|
|
5182
|
-
* This can be given the return value of `publishCredential` to gain access to the credential
|
|
5183
|
-
* that was published
|
|
5184
|
-
*
|
|
5185
|
-
* @group LearnCard Methods
|
|
5186
|
-
*/
|
|
5187
|
-
export declare type ResolveCredential = (URI?: string | "" | `lc:ceramic:${string}`) => Promise<VC | undefined>;
|
|
5188
|
-
/**
|
|
5189
|
-
* Returns an example credential, optionally allowing a subject's did to be passed in
|
|
5190
|
-
*
|
|
5191
|
-
* You can use this to test out implementations that use this library!
|
|
5192
|
-
*
|
|
5193
|
-
* @group LearnCard Methods
|
|
5194
|
-
*/
|
|
5195
|
-
export declare type GetTestVc = (subject?: string) => UnsignedVC;
|
|
5196
|
-
/**
|
|
5197
|
-
* Wraps a crednetial in an exmaple presentaion. If no credential is provided, a new one will be
|
|
5198
|
-
* generated using getTestVc
|
|
5199
|
-
*
|
|
5200
|
-
* You can use this to test out implementations that use this library!
|
|
5201
|
-
*
|
|
5202
|
-
* @group LearnCard Methods
|
|
5203
|
-
*/
|
|
5204
|
-
export declare type GetTestVp = (credential?: VC) => Promise<UnsignedVP>;
|
|
5205
|
-
/**
|
|
5206
|
-
* Returns Ethereum public address
|
|
5207
|
-
*
|
|
5208
|
-
* @group LearnCard Methods
|
|
5209
|
-
*/
|
|
5210
|
-
export declare type GetEthereumAddress = () => string;
|
|
5211
|
-
/**
|
|
5212
|
-
* Get the balance of an ERC20 token
|
|
5213
|
-
* Defaults to ETH if symbolOrAddress is not provided
|
|
5214
|
-
*
|
|
5215
|
-
* @group LearnCard Methods
|
|
5216
|
-
*/
|
|
5217
|
-
export declare type GetBalance = (symbolOrAddress?: string) => Promise<string>;
|
|
5218
|
-
/**
|
|
5219
|
-
* Get the balance of an ERC20 token for a given address
|
|
5220
|
-
* Defaults to ETH if symbolOrAddress is not provided
|
|
5221
|
-
*
|
|
5222
|
-
* @group LearnCard Methods
|
|
5223
|
-
*/
|
|
5224
|
-
export declare type GetBalanceForAddress = (walletAddress: string, symbolOrAddress?: string) => Promise<string>;
|
|
5225
|
-
/**
|
|
5226
|
-
* Transfer tokens to a given address
|
|
5227
|
-
*
|
|
5228
|
-
* @group LearnCard Methods
|
|
5229
|
-
*/
|
|
5230
|
-
export declare type TransferTokens = (tokenSymbolOrAddress: string, amount: number, toAddress: string) => Promise<string>;
|
|
5231
|
-
/**
|
|
5232
|
-
* Get your current Ethereum network
|
|
5233
|
-
*
|
|
5234
|
-
* @group LearnCard Methods
|
|
5235
|
-
*/
|
|
5236
|
-
export declare type GetCurrentNetwork = () => ethers.providers.Networkish;
|
|
5237
|
-
/**
|
|
5238
|
-
* Change your Ethereum network
|
|
5239
|
-
*
|
|
5240
|
-
* @group LearnCard Methods
|
|
5241
|
-
*/
|
|
5242
|
-
export declare type ChangeNetwork = (network: ethers.providers.Networkish) => void;
|
|
5243
|
-
/**
|
|
5244
|
-
* Add an infura project id to an existing wallet.
|
|
5245
|
-
* Really only useful for testing with the CLI right now...
|
|
5246
|
-
*
|
|
5247
|
-
* @group LearnCard Methods
|
|
5248
|
-
*/
|
|
5249
|
-
export declare type AddInfuraProjectId = (infuraProjectIdToAdd: string) => void;
|
|
5250
|
-
/**
|
|
5251
|
-
* Returns a Verifiable Presentation (VP) from a QR code base-64 image data string containing a VP compressed by CBOR-LD.
|
|
5252
|
-
*
|
|
5253
|
-
* @group LearnCard Methods
|
|
5254
|
-
*/
|
|
5255
|
-
export declare type VpFromQrCode = (text: string) => Promise<VP>;
|
|
5256
|
-
/**
|
|
5257
|
-
* Returns a QR-embeddable base-64 image data string from a Verifiable Presentation, compressed using CBOR-LD.
|
|
5258
|
-
*
|
|
5259
|
-
* @group LearnCard Methods
|
|
5260
|
-
*/
|
|
5261
|
-
export declare type VpToQrCode = (vp: VP) => Promise<string>;
|
|
5262
|
-
/**
|
|
5263
|
-
* Sets up CHAPI
|
|
5264
|
-
*
|
|
5265
|
-
* @group LearnCard Methods
|
|
5266
|
-
*/
|
|
5267
|
-
export declare type InstallChapiHandler = () => Promise<void>;
|
|
5268
|
-
/**
|
|
5269
|
-
* Activates CHAPI
|
|
5270
|
-
*
|
|
5271
|
-
* @group LearnCard Methods
|
|
5272
|
-
*/
|
|
5273
|
-
export declare type ActivateChapiHandler = (args: {
|
|
5274
|
-
mediatorOrigin?: string;
|
|
5275
|
-
get?: (event: CredentialRequestEvent) => Promise<HandlerResponse>;
|
|
5276
|
-
store?: (event: CredentialStoreEvent) => Promise<HandlerResponse>;
|
|
5277
|
-
}) => Promise<void>;
|
|
5278
|
-
/**
|
|
5279
|
-
* Receives a CHAPI Event
|
|
5280
|
-
*
|
|
5281
|
-
* @group LearnCard Methods
|
|
5282
|
-
*/
|
|
5283
|
-
export declare type ReceiveChapiEvent = () => Promise<CredentialRequestEvent | CredentialStoreEvent>;
|
|
5284
|
-
/**
|
|
5285
|
-
* Stores a VP via CHAPI
|
|
5286
|
-
*
|
|
5287
|
-
* @group LearnCard Methods
|
|
5288
|
-
*/
|
|
5289
|
-
export declare type StorePresentationViaChapi = (presentation: VP) => Promise<Credential | undefined>;
|
|
5290
|
-
/**
|
|
5291
|
-
* Stores a Credential via CHAPI using DIDAuth
|
|
5292
|
-
*
|
|
5293
|
-
* @group LearnCard Methods
|
|
5294
|
-
*/
|
|
5295
|
-
export declare type StoreCredentialViaChapiDidAuth = (credential: UnsignedVC) => Promise<{
|
|
5296
|
-
success: true;
|
|
5297
|
-
} | {
|
|
5298
|
-
success: false;
|
|
5299
|
-
reason: "did not auth" | "auth failed verification" | "did not store";
|
|
5300
|
-
}>;
|
|
5301
|
-
/**
|
|
5302
|
-
* @group LearnCard Methods
|
|
5303
|
-
*/
|
|
5304
|
-
export declare type AllLearnCardMethods = {
|
|
5305
|
-
did: Did;
|
|
5306
|
-
keypair: Keypair;
|
|
5307
|
-
newCredential: NewCredential;
|
|
5308
|
-
newPresentation: NewPresentation;
|
|
5309
|
-
issueCredential: IssueCredential;
|
|
5215
|
+
/** @group LearnCard Plugin */
|
|
5216
|
+
export declare type LearnCardPluginDependentMethods = {
|
|
5217
|
+
verifyCredential: (vc: VC, options?: Partial<ProofOptions>) => Promise<VerificationCheck>;
|
|
5218
|
+
};
|
|
5219
|
+
/** @group LearnCard Plugin */
|
|
5220
|
+
export declare type LearnCardPluginMethods = {
|
|
5310
5221
|
verifyCredential: VerifyCredential;
|
|
5311
|
-
issuePresentation: IssuePresentation;
|
|
5312
|
-
verifyPresentation: VerifyPresentation;
|
|
5313
|
-
getCredential: GetCredential;
|
|
5314
|
-
getCredentials: GetCredentials;
|
|
5315
|
-
getCredentialsList: GetCredentialsList;
|
|
5316
|
-
publishCredential: PublishCredential;
|
|
5317
|
-
addCredential: AddCredential;
|
|
5318
|
-
removeCredential: RemoveCredential;
|
|
5319
|
-
resolveDid: ResolveDid;
|
|
5320
|
-
readFromCeramic: ReadFromCeramic;
|
|
5321
|
-
resolveCredential: ResolveCredential;
|
|
5322
|
-
getTestVc: GetTestVc;
|
|
5323
|
-
getTestVp: GetTestVp;
|
|
5324
|
-
getEthereumAddress: GetEthereumAddress;
|
|
5325
|
-
getBalance: GetBalance;
|
|
5326
|
-
getBalanceForAddress: GetBalanceForAddress;
|
|
5327
|
-
transferTokens: TransferTokens;
|
|
5328
|
-
getCurrentNetwork: GetCurrentNetwork;
|
|
5329
|
-
changeNetwork: ChangeNetwork;
|
|
5330
|
-
addInfuraProjectId: AddInfuraProjectId;
|
|
5331
|
-
vpFromQrCode: VpFromQrCode;
|
|
5332
|
-
vpToQrCode: VpToQrCode;
|
|
5333
|
-
installChapiHandler: InstallChapiHandler;
|
|
5334
|
-
activateChapiHandler: ActivateChapiHandler;
|
|
5335
|
-
receiveChapiEvent: ReceiveChapiEvent;
|
|
5336
|
-
storePresentationViaChapi: StorePresentationViaChapi;
|
|
5337
|
-
storeCredentialViaChapiDidAuth: StoreCredentialViaChapiDidAuth;
|
|
5338
5222
|
};
|
|
5339
|
-
/** @group
|
|
5340
|
-
export declare type
|
|
5341
|
-
DidKeyPluginMethods<DidMethod>,
|
|
5342
|
-
VCPluginMethods,
|
|
5343
|
-
VCTemplatePluginMethods,
|
|
5344
|
-
VCResolutionPluginMethods,
|
|
5345
|
-
IDXPluginMethods,
|
|
5346
|
-
EthereumPluginMethods,
|
|
5347
|
-
VpqrPluginMethods,
|
|
5348
|
-
CHAPIPluginMethods
|
|
5349
|
-
]>>;
|
|
5350
|
-
/**
|
|
5351
|
-
* @group LearnCard
|
|
5352
|
-
*/
|
|
5353
|
-
export declare type LearnCard<Methods extends keyof AllLearnCardMethods = keyof AllLearnCardMethods, RawWallet extends Wallet<any, any> = LearnCardRawWallet> = {
|
|
5354
|
-
/** Raw IoE wallet instance. You shouldn't need to drop down to this level! */
|
|
5355
|
-
_wallet: RawWallet;
|
|
5356
|
-
} & Pick<AllLearnCardMethods, Methods>;
|
|
5357
|
-
/**
|
|
5358
|
-
* @group LearnCard
|
|
5359
|
-
*/
|
|
5360
|
-
export declare type EmptyLearnCard = LearnCard<"newCredential" | "newPresentation" | "verifyCredential" | "verifyPresentation" | "resolveDid" | "installChapiHandler" | "activateChapiHandler" | "receiveChapiEvent" | "storePresentationViaChapi" | "storeCredentialViaChapiDidAuth", Wallet<"DIDKit" | "Expiration" | "VC Templates" | "CHAPI", MergeObjects<[
|
|
5361
|
-
DidkitPluginMethods,
|
|
5362
|
-
VerifyExtension,
|
|
5363
|
-
VCTemplatePluginMethods,
|
|
5364
|
-
CHAPIPluginMethods
|
|
5365
|
-
]>>>;
|
|
5366
|
-
/**
|
|
5367
|
-
* @group LearnCard
|
|
5368
|
-
*/
|
|
5369
|
-
export declare type VCAPILearnCard = LearnCard<"did" | "newCredential" | "newPresentation" | "issueCredential" | "verifyCredential" | "issuePresentation" | "verifyPresentation" | "getTestVc" | "getTestVp" | "installChapiHandler" | "activateChapiHandler" | "receiveChapiEvent" | "storePresentationViaChapi" | "storeCredentialViaChapiDidAuth", Wallet<"VC API" | "Expiration" | "VC Templates" | "CHAPI", MergeObjects<[
|
|
5370
|
-
VCAPIPluginMethods,
|
|
5371
|
-
VerifyExtension,
|
|
5372
|
-
VCTemplatePluginMethods,
|
|
5373
|
-
CHAPIPluginMethods
|
|
5374
|
-
]>>>;
|
|
5223
|
+
/** @group LearnCard Plugin */
|
|
5224
|
+
export declare type LearnCardPlugin = Plugin<"LearnCard", any, LearnCardPluginMethods, any, LearnCardPluginDependentMethods>;
|
|
5375
5225
|
/** @group LearnCard */
|
|
5376
5226
|
export declare type LearnCardConfig = {
|
|
5377
|
-
ceramicIdx:
|
|
5227
|
+
ceramicIdx: CeramicArgs & IDXArgs;
|
|
5378
5228
|
didkit: InitInput | Promise<InitInput>;
|
|
5379
|
-
defaultContents: any[];
|
|
5380
5229
|
ethereumConfig: EthereumConfig;
|
|
5230
|
+
debug?: typeof console.log;
|
|
5381
5231
|
};
|
|
5382
5232
|
/** @group Init Functions */
|
|
5383
|
-
export declare type
|
|
5233
|
+
export declare type EmptyLearnCard = InitFunction<{}, "didkit" | "debug", LearnCard<[
|
|
5234
|
+
DIDKitPlugin,
|
|
5235
|
+
ExpirationPlugin,
|
|
5236
|
+
VCTemplatePlugin,
|
|
5237
|
+
CHAPIPlugin,
|
|
5238
|
+
LearnCardPlugin
|
|
5239
|
+
]>>;
|
|
5384
5240
|
/** @group Init Functions */
|
|
5385
|
-
export declare type
|
|
5241
|
+
export declare type LearnCardFromSeed = InitFunction<{
|
|
5386
5242
|
seed: string;
|
|
5387
|
-
}, keyof LearnCardConfig, LearnCard
|
|
5243
|
+
}, keyof LearnCardConfig, LearnCard<[
|
|
5244
|
+
DIDKitPlugin,
|
|
5245
|
+
DidKeyPlugin<DidMethod>,
|
|
5246
|
+
VCPlugin,
|
|
5247
|
+
VCTemplatePlugin,
|
|
5248
|
+
VCResolutionPluginType,
|
|
5249
|
+
CeramicPlugin,
|
|
5250
|
+
IDXPlugin,
|
|
5251
|
+
ExpirationPlugin,
|
|
5252
|
+
EthereumPlugin,
|
|
5253
|
+
VpqrPlugin,
|
|
5254
|
+
CHAPIPlugin,
|
|
5255
|
+
LearnCardPlugin
|
|
5256
|
+
]>>;
|
|
5388
5257
|
/** @group Init Functions */
|
|
5389
|
-
export declare type
|
|
5258
|
+
export declare type LearnCardFromVcApi = InitFunction<{
|
|
5390
5259
|
vcApi: true | string;
|
|
5391
5260
|
did?: string;
|
|
5392
|
-
}, "
|
|
5261
|
+
}, "debug", LearnCard<[
|
|
5262
|
+
VCAPIPlugin,
|
|
5263
|
+
ExpirationPlugin,
|
|
5264
|
+
VCTemplatePlugin,
|
|
5265
|
+
CHAPIPlugin,
|
|
5266
|
+
LearnCardPlugin
|
|
5267
|
+
]>>;
|
|
5268
|
+
/** @group Init Functions */
|
|
5269
|
+
export declare type CustomLearnCard = InitFunction<{
|
|
5270
|
+
custom: true;
|
|
5271
|
+
}, "debug", LearnCard<[
|
|
5272
|
+
]>>;
|
|
5393
5273
|
/** @group Init Functions */
|
|
5394
5274
|
export declare type InitLearnCard = GenericInitFunction<[
|
|
5395
|
-
|
|
5396
|
-
|
|
5397
|
-
|
|
5275
|
+
EmptyLearnCard,
|
|
5276
|
+
LearnCardFromSeed,
|
|
5277
|
+
LearnCardFromVcApi,
|
|
5278
|
+
CustomLearnCard
|
|
5398
5279
|
]>;
|
|
5280
|
+
/**
|
|
5281
|
+
* Generates a custom LearnCard with no plugins added
|
|
5282
|
+
*
|
|
5283
|
+
* @group Init Functions
|
|
5284
|
+
*/
|
|
5285
|
+
export declare const customLearnCard: ({ debug }?: Partial<CustomLearnCard["args"]>) => Promise<CustomLearnCard["returnValue"]>;
|
|
5399
5286
|
/**
|
|
5400
5287
|
* Generates an empty wallet with no key material
|
|
5401
5288
|
*
|
|
5402
5289
|
* @group Init Functions
|
|
5403
5290
|
*/
|
|
5404
|
-
export declare const
|
|
5291
|
+
export declare const emptyLearnCard: ({ didkit, debug }?: EmptyLearnCard["args"]) => Promise<EmptyLearnCard["returnValue"]>;
|
|
5405
5292
|
/**
|
|
5406
5293
|
* Generates a LearnCard Wallet from a 64 character seed string
|
|
5407
5294
|
*
|
|
5408
5295
|
* @group Init Functions
|
|
5409
5296
|
*/
|
|
5410
|
-
export declare const
|
|
5297
|
+
export declare const learnCardFromSeed: (seed: string, { ceramicIdx, didkit, ethereumConfig, debug, }?: Partial<LearnCardConfig>) => Promise<LearnCardFromSeed["returnValue"]>;
|
|
5411
5298
|
/**
|
|
5412
5299
|
* Generates a LearnCard Wallet from a 64 character seed string
|
|
5413
5300
|
*
|
|
5414
5301
|
* @group Init Functions
|
|
5415
5302
|
*/
|
|
5416
|
-
export declare const
|
|
5303
|
+
export declare const learnCardFromApiUrl: ({ url, did, debug, }: {
|
|
5304
|
+
url: string;
|
|
5305
|
+
did?: string | undefined;
|
|
5306
|
+
debug?: {
|
|
5307
|
+
(...data: any[]): void;
|
|
5308
|
+
(message?: any, ...optionalParams: any[]): void;
|
|
5309
|
+
} | undefined;
|
|
5310
|
+
}) => Promise<LearnCardFromVcApi["returnValue"]>;
|
|
5417
5311
|
/**
|
|
5418
5312
|
* Generates an Empty Wallet
|
|
5419
5313
|
*
|
|
5420
5314
|
* @group Init Functions
|
|
5421
5315
|
*/
|
|
5422
|
-
export declare function initLearnCard(config?:
|
|
5316
|
+
export declare function initLearnCard(config?: EmptyLearnCard["args"]): Promise<EmptyLearnCard["returnValue"]>;
|
|
5423
5317
|
/**
|
|
5424
5318
|
* Generates a full wallet from a 32 byte seed
|
|
5425
5319
|
*
|
|
5426
5320
|
* @group Init Functions
|
|
5427
5321
|
*/
|
|
5428
|
-
export declare function initLearnCard(config:
|
|
5322
|
+
export declare function initLearnCard(config: LearnCardFromSeed["args"]): Promise<LearnCardFromSeed["returnValue"]>;
|
|
5429
5323
|
/**
|
|
5430
5324
|
* Generates a wallet that can sign VCs/VPs from a VC API
|
|
5431
5325
|
*
|
|
5432
5326
|
* @group Init Functions
|
|
5433
5327
|
*/
|
|
5434
|
-
export declare function initLearnCard(config:
|
|
5328
|
+
export declare function initLearnCard(config: LearnCardFromVcApi["args"]): Promise<LearnCardFromVcApi["returnValue"]>;
|
|
5329
|
+
/**
|
|
5330
|
+
* Generates a custom wallet with no plugins added
|
|
5331
|
+
*
|
|
5332
|
+
* @group Init Functions
|
|
5333
|
+
*/
|
|
5334
|
+
export declare function initLearnCard(config: CustomLearnCard["args"]): Promise<CustomLearnCard["returnValue"]>;
|
|
5435
5335
|
/** @group Universal Wallets */
|
|
5436
|
-
export declare const
|
|
5336
|
+
export declare const generateLearnCard: <Plugins extends {
|
|
5337
|
+
name: string;
|
|
5338
|
+
displayName?: string | undefined;
|
|
5339
|
+
description?: string | undefined;
|
|
5340
|
+
methods: AddImplicitLearnCardArgument<Record<never, never>, any, Record<never, never>, never, Record<never, never>>;
|
|
5341
|
+
_methods?: Record<never, never> | undefined;
|
|
5342
|
+
read?: {} | undefined;
|
|
5343
|
+
store?: {} | undefined;
|
|
5344
|
+
index?: {} | undefined;
|
|
5345
|
+
cache?: {} | undefined;
|
|
5346
|
+
id?: {} | undefined;
|
|
5347
|
+
}[] = [
|
|
5348
|
+
], ControlPlanes extends GetPlanesForPlugins<Plugins> = GetPlanesForPlugins<Plugins>, PluginMethods extends GetPluginMethods<Plugins> = GetPluginMethods<Plugins>>(_learnCard?: Partial<LearnCard<Plugins, ControlPlanes, PluginMethods>>) => Promise<LearnCard<Plugins, ControlPlanes, PluginMethods>>;
|
|
5349
|
+
/**
|
|
5350
|
+
* @group Plugins
|
|
5351
|
+
*/
|
|
5352
|
+
export declare const getCeramicPlugin: <URI extends string = "">(learnCard: {
|
|
5353
|
+
plugins: any;
|
|
5354
|
+
invoke: CeramicPluginDependentMethods<URI>;
|
|
5355
|
+
addPlugin: <NewPlugin extends {
|
|
5356
|
+
name: string;
|
|
5357
|
+
displayName?: string | undefined;
|
|
5358
|
+
description?: string | undefined;
|
|
5359
|
+
methods: import("types/wallet").AddImplicitLearnCardArgument<Record<never, never>, any, Record<never, never>, never, Record<never, never>>;
|
|
5360
|
+
_methods?: Record<never, never> | undefined;
|
|
5361
|
+
read?: {} | undefined;
|
|
5362
|
+
store?: {} | undefined;
|
|
5363
|
+
index?: {} | undefined;
|
|
5364
|
+
cache?: {} | undefined;
|
|
5365
|
+
id?: {} | undefined;
|
|
5366
|
+
}>(plugin: NewPlugin) => Promise<{
|
|
5367
|
+
plugins: [
|
|
5368
|
+
...any[],
|
|
5369
|
+
NewPlugin
|
|
5370
|
+
];
|
|
5371
|
+
invoke: any;
|
|
5372
|
+
addPlugin: <NewPlugin_1 extends {
|
|
5373
|
+
name: string;
|
|
5374
|
+
displayName?: string | undefined;
|
|
5375
|
+
description?: string | undefined;
|
|
5376
|
+
methods: import("types/wallet").AddImplicitLearnCardArgument<Record<never, never>, any, Record<never, never>, never, Record<never, never>>;
|
|
5377
|
+
_methods?: Record<never, never> | undefined;
|
|
5378
|
+
read?: {} | undefined;
|
|
5379
|
+
store?: {} | undefined;
|
|
5380
|
+
index?: {} | undefined;
|
|
5381
|
+
cache?: {} | undefined;
|
|
5382
|
+
id?: {} | undefined;
|
|
5383
|
+
}>(plugin: NewPlugin_1) => Promise<{
|
|
5384
|
+
plugins: [
|
|
5385
|
+
...any[],
|
|
5386
|
+
NewPlugin,
|
|
5387
|
+
NewPlugin_1
|
|
5388
|
+
];
|
|
5389
|
+
invoke: any;
|
|
5390
|
+
addPlugin: <NewPlugin_2 extends {
|
|
5391
|
+
name: string;
|
|
5392
|
+
displayName?: string | undefined;
|
|
5393
|
+
description?: string | undefined;
|
|
5394
|
+
methods: import("types/wallet").AddImplicitLearnCardArgument<Record<never, never>, any, Record<never, never>, never, Record<never, never>>;
|
|
5395
|
+
_methods?: Record<never, never> | undefined;
|
|
5396
|
+
read?: {} | undefined;
|
|
5397
|
+
store?: {} | undefined;
|
|
5398
|
+
index?: {} | undefined;
|
|
5399
|
+
cache?: {} | undefined;
|
|
5400
|
+
id?: {} | undefined;
|
|
5401
|
+
}>(plugin: NewPlugin_2) => Promise<{
|
|
5402
|
+
plugins: [
|
|
5403
|
+
...any[],
|
|
5404
|
+
NewPlugin,
|
|
5405
|
+
NewPlugin_1,
|
|
5406
|
+
NewPlugin_2
|
|
5407
|
+
];
|
|
5408
|
+
invoke: any;
|
|
5409
|
+
addPlugin: <NewPlugin_3 extends {
|
|
5410
|
+
name: string;
|
|
5411
|
+
displayName?: string | undefined;
|
|
5412
|
+
description?: string | undefined;
|
|
5413
|
+
methods: import("types/wallet").AddImplicitLearnCardArgument<Record<never, never>, any, Record<never, never>, never, Record<never, never>>;
|
|
5414
|
+
_methods?: Record<never, never> | undefined;
|
|
5415
|
+
read?: {} | undefined;
|
|
5416
|
+
store?: {} | undefined;
|
|
5417
|
+
index?: {} | undefined;
|
|
5418
|
+
cache?: {} | undefined;
|
|
5419
|
+
id?: {} | undefined;
|
|
5420
|
+
}>(plugin: NewPlugin_3) => Promise<{
|
|
5421
|
+
plugins: [
|
|
5422
|
+
...any[],
|
|
5423
|
+
NewPlugin,
|
|
5424
|
+
NewPlugin_1,
|
|
5425
|
+
NewPlugin_2,
|
|
5426
|
+
NewPlugin_3
|
|
5427
|
+
];
|
|
5428
|
+
invoke: any;
|
|
5429
|
+
addPlugin: <NewPlugin_4 extends {
|
|
5430
|
+
name: string;
|
|
5431
|
+
displayName?: string | undefined;
|
|
5432
|
+
description?: string | undefined;
|
|
5433
|
+
methods: import("types/wallet").AddImplicitLearnCardArgument<Record<never, never>, any, Record<never, never>, never, Record<never, never>>;
|
|
5434
|
+
_methods?: Record<never, never> | undefined;
|
|
5435
|
+
read?: {} | undefined;
|
|
5436
|
+
store?: {} | undefined;
|
|
5437
|
+
index?: {} | undefined;
|
|
5438
|
+
cache?: {} | undefined;
|
|
5439
|
+
id?: {} | undefined;
|
|
5440
|
+
}>(plugin: NewPlugin_4) => Promise<{
|
|
5441
|
+
plugins: [
|
|
5442
|
+
...any[],
|
|
5443
|
+
NewPlugin,
|
|
5444
|
+
NewPlugin_1,
|
|
5445
|
+
NewPlugin_2,
|
|
5446
|
+
NewPlugin_3,
|
|
5447
|
+
NewPlugin_4
|
|
5448
|
+
];
|
|
5449
|
+
invoke: any;
|
|
5450
|
+
addPlugin: <NewPlugin_5 extends {
|
|
5451
|
+
name: string;
|
|
5452
|
+
displayName?: string | undefined;
|
|
5453
|
+
description?: string | undefined;
|
|
5454
|
+
methods: import("types/wallet").AddImplicitLearnCardArgument<Record<never, never>, any, Record<never, never>, never, Record<never, never>>;
|
|
5455
|
+
_methods?: Record<never, never> | undefined;
|
|
5456
|
+
read?: {} | undefined;
|
|
5457
|
+
store?: {} | undefined;
|
|
5458
|
+
index?: {} | undefined;
|
|
5459
|
+
cache?: {} | undefined;
|
|
5460
|
+
id?: {} | undefined;
|
|
5461
|
+
}>(plugin: NewPlugin_5) => Promise<{
|
|
5462
|
+
plugins: [
|
|
5463
|
+
...any[],
|
|
5464
|
+
NewPlugin,
|
|
5465
|
+
NewPlugin_1,
|
|
5466
|
+
NewPlugin_2,
|
|
5467
|
+
NewPlugin_3,
|
|
5468
|
+
NewPlugin_4,
|
|
5469
|
+
NewPlugin_5
|
|
5470
|
+
];
|
|
5471
|
+
invoke: any;
|
|
5472
|
+
addPlugin: <NewPlugin_6 extends {
|
|
5473
|
+
name: string;
|
|
5474
|
+
displayName?: string | undefined;
|
|
5475
|
+
description?: string | undefined;
|
|
5476
|
+
methods: import("types/wallet").AddImplicitLearnCardArgument<Record<never, never>, any, Record<never, never>, never, Record<never, never>>;
|
|
5477
|
+
_methods?: Record<never, never> | undefined;
|
|
5478
|
+
read?: {} | undefined;
|
|
5479
|
+
store?: {} | undefined;
|
|
5480
|
+
index?: {} | undefined;
|
|
5481
|
+
cache?: {} | undefined;
|
|
5482
|
+
id?: {} | undefined;
|
|
5483
|
+
}>(plugin: NewPlugin_6) => Promise<{
|
|
5484
|
+
plugins: [
|
|
5485
|
+
...any[],
|
|
5486
|
+
NewPlugin,
|
|
5487
|
+
NewPlugin_1,
|
|
5488
|
+
NewPlugin_2,
|
|
5489
|
+
NewPlugin_3,
|
|
5490
|
+
NewPlugin_4,
|
|
5491
|
+
NewPlugin_5,
|
|
5492
|
+
NewPlugin_6
|
|
5493
|
+
];
|
|
5494
|
+
invoke: any;
|
|
5495
|
+
addPlugin: <NewPlugin_7 extends {
|
|
5496
|
+
name: string;
|
|
5497
|
+
displayName?: string | undefined;
|
|
5498
|
+
description?: string | undefined;
|
|
5499
|
+
methods: import("types/wallet").AddImplicitLearnCardArgument<Record<never, never>, any, Record<never, never>, never, Record<never, never>>;
|
|
5500
|
+
_methods?: Record<never, never> | undefined;
|
|
5501
|
+
read?: {} | undefined;
|
|
5502
|
+
store?: {} | undefined;
|
|
5503
|
+
index?: {} | undefined;
|
|
5504
|
+
cache?: {} | undefined;
|
|
5505
|
+
id?: {} | undefined;
|
|
5506
|
+
}>(plugin: NewPlugin_7) => Promise<{
|
|
5507
|
+
plugins: [
|
|
5508
|
+
...any[],
|
|
5509
|
+
NewPlugin,
|
|
5510
|
+
NewPlugin_1,
|
|
5511
|
+
NewPlugin_2,
|
|
5512
|
+
NewPlugin_3,
|
|
5513
|
+
NewPlugin_4,
|
|
5514
|
+
NewPlugin_5,
|
|
5515
|
+
NewPlugin_6,
|
|
5516
|
+
NewPlugin_7
|
|
5517
|
+
];
|
|
5518
|
+
invoke: any;
|
|
5519
|
+
addPlugin: <NewPlugin_8 extends {
|
|
5520
|
+
name: string;
|
|
5521
|
+
displayName?: string | undefined;
|
|
5522
|
+
description?: string | undefined;
|
|
5523
|
+
methods: import("types/wallet").AddImplicitLearnCardArgument<Record<never, never>, any, Record<never, never>, never, Record<never, never>>;
|
|
5524
|
+
_methods?: Record<never, never> | undefined;
|
|
5525
|
+
read?: {} | undefined;
|
|
5526
|
+
store?: {} | undefined;
|
|
5527
|
+
index?: {} | undefined;
|
|
5528
|
+
cache?: {} | undefined;
|
|
5529
|
+
id?: {} | undefined;
|
|
5530
|
+
}>(plugin: NewPlugin_8) => Promise<{
|
|
5531
|
+
plugins: [
|
|
5532
|
+
...any[],
|
|
5533
|
+
NewPlugin,
|
|
5534
|
+
NewPlugin_1,
|
|
5535
|
+
NewPlugin_2,
|
|
5536
|
+
NewPlugin_3,
|
|
5537
|
+
NewPlugin_4,
|
|
5538
|
+
NewPlugin_5,
|
|
5539
|
+
NewPlugin_6,
|
|
5540
|
+
NewPlugin_7,
|
|
5541
|
+
NewPlugin_8
|
|
5542
|
+
];
|
|
5543
|
+
invoke: any;
|
|
5544
|
+
addPlugin: <NewPlugin_9 extends {
|
|
5545
|
+
name: string;
|
|
5546
|
+
displayName?: string | undefined;
|
|
5547
|
+
description?: string | undefined;
|
|
5548
|
+
methods: import("types/wallet").AddImplicitLearnCardArgument<Record<never, never>, any, Record<never, never>, never, Record<never, never>>;
|
|
5549
|
+
_methods?: Record<never, never> | undefined;
|
|
5550
|
+
read?: {} | undefined;
|
|
5551
|
+
store?: {} | undefined;
|
|
5552
|
+
index?: {} | undefined;
|
|
5553
|
+
cache?: {} | undefined;
|
|
5554
|
+
id?: {} | undefined;
|
|
5555
|
+
}>(plugin: NewPlugin_9) => Promise<{
|
|
5556
|
+
plugins: [
|
|
5557
|
+
...any[],
|
|
5558
|
+
NewPlugin,
|
|
5559
|
+
NewPlugin_1,
|
|
5560
|
+
NewPlugin_2,
|
|
5561
|
+
NewPlugin_3,
|
|
5562
|
+
NewPlugin_4,
|
|
5563
|
+
NewPlugin_5,
|
|
5564
|
+
NewPlugin_6,
|
|
5565
|
+
NewPlugin_7,
|
|
5566
|
+
NewPlugin_8,
|
|
5567
|
+
NewPlugin_9
|
|
5568
|
+
];
|
|
5569
|
+
invoke: any;
|
|
5570
|
+
addPlugin: <NewPlugin_10 extends {
|
|
5571
|
+
name: string;
|
|
5572
|
+
displayName?: string | undefined;
|
|
5573
|
+
description?: string | undefined;
|
|
5574
|
+
methods: import("types/wallet").AddImplicitLearnCardArgument<Record<never, never>, any, Record<never, never>, never, Record<never, never>>;
|
|
5575
|
+
_methods?: Record<never, never> | undefined;
|
|
5576
|
+
read?: {} | undefined;
|
|
5577
|
+
store?: {} | undefined;
|
|
5578
|
+
index?: {} | undefined;
|
|
5579
|
+
cache?: {} | undefined;
|
|
5580
|
+
id?: {} | undefined;
|
|
5581
|
+
}>(plugin: NewPlugin_10) => Promise<any>;
|
|
5582
|
+
debug?: {
|
|
5583
|
+
(...data: any[]): void;
|
|
5584
|
+
(message?: any, ...optionalParams: any[]): void;
|
|
5585
|
+
} | undefined;
|
|
5586
|
+
}>;
|
|
5587
|
+
debug?: {
|
|
5588
|
+
(...data: any[]): void;
|
|
5589
|
+
(message?: any, ...optionalParams: any[]): void;
|
|
5590
|
+
} | undefined;
|
|
5591
|
+
}>;
|
|
5592
|
+
debug?: {
|
|
5593
|
+
(...data: any[]): void;
|
|
5594
|
+
(message?: any, ...optionalParams: any[]): void;
|
|
5595
|
+
} | undefined;
|
|
5596
|
+
}>;
|
|
5597
|
+
debug?: {
|
|
5598
|
+
(...data: any[]): void;
|
|
5599
|
+
(message?: any, ...optionalParams: any[]): void;
|
|
5600
|
+
} | undefined;
|
|
5601
|
+
}>;
|
|
5602
|
+
debug?: {
|
|
5603
|
+
(...data: any[]): void;
|
|
5604
|
+
(message?: any, ...optionalParams: any[]): void;
|
|
5605
|
+
} | undefined;
|
|
5606
|
+
}>;
|
|
5607
|
+
debug?: {
|
|
5608
|
+
(...data: any[]): void;
|
|
5609
|
+
(message?: any, ...optionalParams: any[]): void;
|
|
5610
|
+
} | undefined;
|
|
5611
|
+
}>;
|
|
5612
|
+
debug?: {
|
|
5613
|
+
(...data: any[]): void;
|
|
5614
|
+
(message?: any, ...optionalParams: any[]): void;
|
|
5615
|
+
} | undefined;
|
|
5616
|
+
}>;
|
|
5617
|
+
debug?: {
|
|
5618
|
+
(...data: any[]): void;
|
|
5619
|
+
(message?: any, ...optionalParams: any[]): void;
|
|
5620
|
+
} | undefined;
|
|
5621
|
+
}>;
|
|
5622
|
+
debug?: {
|
|
5623
|
+
(...data: any[]): void;
|
|
5624
|
+
(message?: any, ...optionalParams: any[]): void;
|
|
5625
|
+
} | undefined;
|
|
5626
|
+
}>;
|
|
5627
|
+
debug?: {
|
|
5628
|
+
(...data: any[]): void;
|
|
5629
|
+
(message?: any, ...optionalParams: any[]): void;
|
|
5630
|
+
} | undefined;
|
|
5631
|
+
}>;
|
|
5632
|
+
debug?: {
|
|
5633
|
+
(...data: any[]): void;
|
|
5634
|
+
(message?: any, ...optionalParams: any[]): void;
|
|
5635
|
+
} | undefined;
|
|
5636
|
+
}, { ceramicEndpoint, defaultContentFamily }: CeramicArgs) => Promise<CeramicPlugin>;
|
|
5637
|
+
/**
|
|
5638
|
+
*
|
|
5639
|
+
* @group Plugins
|
|
5640
|
+
*/
|
|
5641
|
+
export declare const getDidKeyPlugin: <DidMethod extends string>(learnCard: {
|
|
5642
|
+
plugins: any;
|
|
5643
|
+
invoke: DependentMethods<DidMethod>;
|
|
5644
|
+
addPlugin: <NewPlugin extends {
|
|
5645
|
+
name: string;
|
|
5646
|
+
displayName?: string | undefined;
|
|
5647
|
+
description?: string | undefined;
|
|
5648
|
+
methods: import("types/wallet").AddImplicitLearnCardArgument<Record<never, never>, any, Record<never, never>, never, Record<never, never>>;
|
|
5649
|
+
_methods?: Record<never, never> | undefined;
|
|
5650
|
+
read?: {} | undefined;
|
|
5651
|
+
store?: {} | undefined;
|
|
5652
|
+
index?: {} | undefined;
|
|
5653
|
+
cache?: {} | undefined;
|
|
5654
|
+
id?: {} | undefined;
|
|
5655
|
+
}>(plugin: NewPlugin) => Promise<{
|
|
5656
|
+
plugins: [
|
|
5657
|
+
...any[],
|
|
5658
|
+
NewPlugin
|
|
5659
|
+
];
|
|
5660
|
+
invoke: any;
|
|
5661
|
+
addPlugin: <NewPlugin_1 extends {
|
|
5662
|
+
name: string;
|
|
5663
|
+
displayName?: string | undefined;
|
|
5664
|
+
description?: string | undefined;
|
|
5665
|
+
methods: import("types/wallet").AddImplicitLearnCardArgument<Record<never, never>, any, Record<never, never>, never, Record<never, never>>;
|
|
5666
|
+
_methods?: Record<never, never> | undefined;
|
|
5667
|
+
read?: {} | undefined;
|
|
5668
|
+
store?: {} | undefined;
|
|
5669
|
+
index?: {} | undefined;
|
|
5670
|
+
cache?: {} | undefined;
|
|
5671
|
+
id?: {} | undefined;
|
|
5672
|
+
}>(plugin: NewPlugin_1) => Promise<{
|
|
5673
|
+
plugins: [
|
|
5674
|
+
...any[],
|
|
5675
|
+
NewPlugin,
|
|
5676
|
+
NewPlugin_1
|
|
5677
|
+
];
|
|
5678
|
+
invoke: any;
|
|
5679
|
+
addPlugin: <NewPlugin_2 extends {
|
|
5680
|
+
name: string;
|
|
5681
|
+
displayName?: string | undefined;
|
|
5682
|
+
description?: string | undefined;
|
|
5683
|
+
methods: import("types/wallet").AddImplicitLearnCardArgument<Record<never, never>, any, Record<never, never>, never, Record<never, never>>;
|
|
5684
|
+
_methods?: Record<never, never> | undefined;
|
|
5685
|
+
read?: {} | undefined;
|
|
5686
|
+
store?: {} | undefined;
|
|
5687
|
+
index?: {} | undefined;
|
|
5688
|
+
cache?: {} | undefined;
|
|
5689
|
+
id?: {} | undefined;
|
|
5690
|
+
}>(plugin: NewPlugin_2) => Promise<{
|
|
5691
|
+
plugins: [
|
|
5692
|
+
...any[],
|
|
5693
|
+
NewPlugin,
|
|
5694
|
+
NewPlugin_1,
|
|
5695
|
+
NewPlugin_2
|
|
5696
|
+
];
|
|
5697
|
+
invoke: any;
|
|
5698
|
+
addPlugin: <NewPlugin_3 extends {
|
|
5699
|
+
name: string;
|
|
5700
|
+
displayName?: string | undefined;
|
|
5701
|
+
description?: string | undefined;
|
|
5702
|
+
methods: import("types/wallet").AddImplicitLearnCardArgument<Record<never, never>, any, Record<never, never>, never, Record<never, never>>;
|
|
5703
|
+
_methods?: Record<never, never> | undefined;
|
|
5704
|
+
read?: {} | undefined;
|
|
5705
|
+
store?: {} | undefined;
|
|
5706
|
+
index?: {} | undefined;
|
|
5707
|
+
cache?: {} | undefined;
|
|
5708
|
+
id?: {} | undefined;
|
|
5709
|
+
}>(plugin: NewPlugin_3) => Promise<{
|
|
5710
|
+
plugins: [
|
|
5711
|
+
...any[],
|
|
5712
|
+
NewPlugin,
|
|
5713
|
+
NewPlugin_1,
|
|
5714
|
+
NewPlugin_2,
|
|
5715
|
+
NewPlugin_3
|
|
5716
|
+
];
|
|
5717
|
+
invoke: any;
|
|
5718
|
+
addPlugin: <NewPlugin_4 extends {
|
|
5719
|
+
name: string;
|
|
5720
|
+
displayName?: string | undefined;
|
|
5721
|
+
description?: string | undefined;
|
|
5722
|
+
methods: import("types/wallet").AddImplicitLearnCardArgument<Record<never, never>, any, Record<never, never>, never, Record<never, never>>;
|
|
5723
|
+
_methods?: Record<never, never> | undefined;
|
|
5724
|
+
read?: {} | undefined;
|
|
5725
|
+
store?: {} | undefined;
|
|
5726
|
+
index?: {} | undefined;
|
|
5727
|
+
cache?: {} | undefined;
|
|
5728
|
+
id?: {} | undefined;
|
|
5729
|
+
}>(plugin: NewPlugin_4) => Promise<{
|
|
5730
|
+
plugins: [
|
|
5731
|
+
...any[],
|
|
5732
|
+
NewPlugin,
|
|
5733
|
+
NewPlugin_1,
|
|
5734
|
+
NewPlugin_2,
|
|
5735
|
+
NewPlugin_3,
|
|
5736
|
+
NewPlugin_4
|
|
5737
|
+
];
|
|
5738
|
+
invoke: any;
|
|
5739
|
+
addPlugin: <NewPlugin_5 extends {
|
|
5740
|
+
name: string;
|
|
5741
|
+
displayName?: string | undefined;
|
|
5742
|
+
description?: string | undefined;
|
|
5743
|
+
methods: import("types/wallet").AddImplicitLearnCardArgument<Record<never, never>, any, Record<never, never>, never, Record<never, never>>;
|
|
5744
|
+
_methods?: Record<never, never> | undefined;
|
|
5745
|
+
read?: {} | undefined;
|
|
5746
|
+
store?: {} | undefined;
|
|
5747
|
+
index?: {} | undefined;
|
|
5748
|
+
cache?: {} | undefined;
|
|
5749
|
+
id?: {} | undefined;
|
|
5750
|
+
}>(plugin: NewPlugin_5) => Promise<{
|
|
5751
|
+
plugins: [
|
|
5752
|
+
...any[],
|
|
5753
|
+
NewPlugin,
|
|
5754
|
+
NewPlugin_1,
|
|
5755
|
+
NewPlugin_2,
|
|
5756
|
+
NewPlugin_3,
|
|
5757
|
+
NewPlugin_4,
|
|
5758
|
+
NewPlugin_5
|
|
5759
|
+
];
|
|
5760
|
+
invoke: any;
|
|
5761
|
+
addPlugin: <NewPlugin_6 extends {
|
|
5762
|
+
name: string;
|
|
5763
|
+
displayName?: string | undefined;
|
|
5764
|
+
description?: string | undefined;
|
|
5765
|
+
methods: import("types/wallet").AddImplicitLearnCardArgument<Record<never, never>, any, Record<never, never>, never, Record<never, never>>;
|
|
5766
|
+
_methods?: Record<never, never> | undefined;
|
|
5767
|
+
read?: {} | undefined;
|
|
5768
|
+
store?: {} | undefined;
|
|
5769
|
+
index?: {} | undefined;
|
|
5770
|
+
cache?: {} | undefined;
|
|
5771
|
+
id?: {} | undefined;
|
|
5772
|
+
}>(plugin: NewPlugin_6) => Promise<{
|
|
5773
|
+
plugins: [
|
|
5774
|
+
...any[],
|
|
5775
|
+
NewPlugin,
|
|
5776
|
+
NewPlugin_1,
|
|
5777
|
+
NewPlugin_2,
|
|
5778
|
+
NewPlugin_3,
|
|
5779
|
+
NewPlugin_4,
|
|
5780
|
+
NewPlugin_5,
|
|
5781
|
+
NewPlugin_6
|
|
5782
|
+
];
|
|
5783
|
+
invoke: any;
|
|
5784
|
+
addPlugin: <NewPlugin_7 extends {
|
|
5785
|
+
name: string;
|
|
5786
|
+
displayName?: string | undefined;
|
|
5787
|
+
description?: string | undefined;
|
|
5788
|
+
methods: import("types/wallet").AddImplicitLearnCardArgument<Record<never, never>, any, Record<never, never>, never, Record<never, never>>;
|
|
5789
|
+
_methods?: Record<never, never> | undefined;
|
|
5790
|
+
read?: {} | undefined;
|
|
5791
|
+
store?: {} | undefined;
|
|
5792
|
+
index?: {} | undefined;
|
|
5793
|
+
cache?: {} | undefined;
|
|
5794
|
+
id?: {} | undefined;
|
|
5795
|
+
}>(plugin: NewPlugin_7) => Promise<{
|
|
5796
|
+
plugins: [
|
|
5797
|
+
...any[],
|
|
5798
|
+
NewPlugin,
|
|
5799
|
+
NewPlugin_1,
|
|
5800
|
+
NewPlugin_2,
|
|
5801
|
+
NewPlugin_3,
|
|
5802
|
+
NewPlugin_4,
|
|
5803
|
+
NewPlugin_5,
|
|
5804
|
+
NewPlugin_6,
|
|
5805
|
+
NewPlugin_7
|
|
5806
|
+
];
|
|
5807
|
+
invoke: any;
|
|
5808
|
+
addPlugin: <NewPlugin_8 extends {
|
|
5809
|
+
name: string;
|
|
5810
|
+
displayName?: string | undefined;
|
|
5811
|
+
description?: string | undefined;
|
|
5812
|
+
methods: import("types/wallet").AddImplicitLearnCardArgument<Record<never, never>, any, Record<never, never>, never, Record<never, never>>;
|
|
5813
|
+
_methods?: Record<never, never> | undefined;
|
|
5814
|
+
read?: {} | undefined;
|
|
5815
|
+
store?: {} | undefined;
|
|
5816
|
+
index?: {} | undefined;
|
|
5817
|
+
cache?: {} | undefined;
|
|
5818
|
+
id?: {} | undefined;
|
|
5819
|
+
}>(plugin: NewPlugin_8) => Promise<{
|
|
5820
|
+
plugins: [
|
|
5821
|
+
...any[],
|
|
5822
|
+
NewPlugin,
|
|
5823
|
+
NewPlugin_1,
|
|
5824
|
+
NewPlugin_2,
|
|
5825
|
+
NewPlugin_3,
|
|
5826
|
+
NewPlugin_4,
|
|
5827
|
+
NewPlugin_5,
|
|
5828
|
+
NewPlugin_6,
|
|
5829
|
+
NewPlugin_7,
|
|
5830
|
+
NewPlugin_8
|
|
5831
|
+
];
|
|
5832
|
+
invoke: any;
|
|
5833
|
+
addPlugin: <NewPlugin_9 extends {
|
|
5834
|
+
name: string;
|
|
5835
|
+
displayName?: string | undefined;
|
|
5836
|
+
description?: string | undefined;
|
|
5837
|
+
methods: import("types/wallet").AddImplicitLearnCardArgument<Record<never, never>, any, Record<never, never>, never, Record<never, never>>;
|
|
5838
|
+
_methods?: Record<never, never> | undefined;
|
|
5839
|
+
read?: {} | undefined;
|
|
5840
|
+
store?: {} | undefined;
|
|
5841
|
+
index?: {} | undefined;
|
|
5842
|
+
cache?: {} | undefined;
|
|
5843
|
+
id?: {} | undefined;
|
|
5844
|
+
}>(plugin: NewPlugin_9) => Promise<{
|
|
5845
|
+
plugins: [
|
|
5846
|
+
...any[],
|
|
5847
|
+
NewPlugin,
|
|
5848
|
+
NewPlugin_1,
|
|
5849
|
+
NewPlugin_2,
|
|
5850
|
+
NewPlugin_3,
|
|
5851
|
+
NewPlugin_4,
|
|
5852
|
+
NewPlugin_5,
|
|
5853
|
+
NewPlugin_6,
|
|
5854
|
+
NewPlugin_7,
|
|
5855
|
+
NewPlugin_8,
|
|
5856
|
+
NewPlugin_9
|
|
5857
|
+
];
|
|
5858
|
+
invoke: any;
|
|
5859
|
+
addPlugin: <NewPlugin_10 extends {
|
|
5860
|
+
name: string;
|
|
5861
|
+
displayName?: string | undefined;
|
|
5862
|
+
description?: string | undefined;
|
|
5863
|
+
methods: import("types/wallet").AddImplicitLearnCardArgument<Record<never, never>, any, Record<never, never>, never, Record<never, never>>;
|
|
5864
|
+
_methods?: Record<never, never> | undefined;
|
|
5865
|
+
read?: {} | undefined;
|
|
5866
|
+
store?: {} | undefined;
|
|
5867
|
+
index?: {} | undefined;
|
|
5868
|
+
cache?: {} | undefined;
|
|
5869
|
+
id?: {} | undefined;
|
|
5870
|
+
}>(plugin: NewPlugin_10) => Promise<any>;
|
|
5871
|
+
debug?: {
|
|
5872
|
+
(...data: any[]): void;
|
|
5873
|
+
(message?: any, ...optionalParams: any[]): void;
|
|
5874
|
+
} | undefined;
|
|
5875
|
+
}>;
|
|
5876
|
+
debug?: {
|
|
5877
|
+
(...data: any[]): void;
|
|
5878
|
+
(message?: any, ...optionalParams: any[]): void;
|
|
5879
|
+
} | undefined;
|
|
5880
|
+
}>;
|
|
5881
|
+
debug?: {
|
|
5882
|
+
(...data: any[]): void;
|
|
5883
|
+
(message?: any, ...optionalParams: any[]): void;
|
|
5884
|
+
} | undefined;
|
|
5885
|
+
}>;
|
|
5886
|
+
debug?: {
|
|
5887
|
+
(...data: any[]): void;
|
|
5888
|
+
(message?: any, ...optionalParams: any[]): void;
|
|
5889
|
+
} | undefined;
|
|
5890
|
+
}>;
|
|
5891
|
+
debug?: {
|
|
5892
|
+
(...data: any[]): void;
|
|
5893
|
+
(message?: any, ...optionalParams: any[]): void;
|
|
5894
|
+
} | undefined;
|
|
5895
|
+
}>;
|
|
5896
|
+
debug?: {
|
|
5897
|
+
(...data: any[]): void;
|
|
5898
|
+
(message?: any, ...optionalParams: any[]): void;
|
|
5899
|
+
} | undefined;
|
|
5900
|
+
}>;
|
|
5901
|
+
debug?: {
|
|
5902
|
+
(...data: any[]): void;
|
|
5903
|
+
(message?: any, ...optionalParams: any[]): void;
|
|
5904
|
+
} | undefined;
|
|
5905
|
+
}>;
|
|
5906
|
+
debug?: {
|
|
5907
|
+
(...data: any[]): void;
|
|
5908
|
+
(message?: any, ...optionalParams: any[]): void;
|
|
5909
|
+
} | undefined;
|
|
5910
|
+
}>;
|
|
5911
|
+
debug?: {
|
|
5912
|
+
(...data: any[]): void;
|
|
5913
|
+
(message?: any, ...optionalParams: any[]): void;
|
|
5914
|
+
} | undefined;
|
|
5915
|
+
}>;
|
|
5916
|
+
debug?: {
|
|
5917
|
+
(...data: any[]): void;
|
|
5918
|
+
(message?: any, ...optionalParams: any[]): void;
|
|
5919
|
+
} | undefined;
|
|
5920
|
+
}>;
|
|
5921
|
+
debug?: {
|
|
5922
|
+
(...data: any[]): void;
|
|
5923
|
+
(message?: any, ...optionalParams: any[]): void;
|
|
5924
|
+
} | undefined;
|
|
5925
|
+
}, key: string, defaultDidMethod: DidMethod) => Promise<DidKeyPlugin<DidMethod>>;
|
|
5926
|
+
/**
|
|
5927
|
+
* @group Plugins
|
|
5928
|
+
*/
|
|
5929
|
+
export declare const getEthereumPlugin: (initLearnCard: LearnCard<any, "id">, config: EthereumConfig) => EthereumPlugin;
|
|
5930
|
+
/**
|
|
5931
|
+
* @group Plugins
|
|
5932
|
+
*/
|
|
5933
|
+
export declare const expirationPlugin: (learnCard: LearnCard<any, any, VerifyExtension>) => ExpirationPlugin;
|
|
5934
|
+
/**
|
|
5935
|
+
* @group Plugins
|
|
5936
|
+
*/
|
|
5937
|
+
export declare const getIDXPlugin: <URI extends string = "">(learnCard: LearnCard<any, "read", IDXPluginDependentMethods<URI>>, { modelData, credentialAlias }: IDXArgs) => Promise<IDXPlugin>;
|
|
5938
|
+
export declare type TestCachePlugin = Plugin<"Test Cache", "cache">;
|
|
5939
|
+
export declare const getTestCache: () => TestCachePlugin;
|
|
5940
|
+
/**
|
|
5941
|
+
* @group Plugins
|
|
5942
|
+
*/
|
|
5943
|
+
export declare const getVCAPIPlugin: ({ url, did, }: {
|
|
5944
|
+
url: string;
|
|
5945
|
+
did?: string;
|
|
5946
|
+
}) => Promise<VCAPIPlugin>;
|
|
5947
|
+
/**
|
|
5948
|
+
* @group Plugins
|
|
5949
|
+
*/
|
|
5950
|
+
export declare const getVpqrPlugin: (learnCard: LearnCard<any, any, VpqrPluginDependentMethods>) => VpqrPlugin;
|
|
5437
5951
|
export * from "@wallet/init";
|
|
5438
|
-
export {
|
|
5952
|
+
export { LearnCard, Plugin } from "types/wallet";
|
|
5439
5953
|
export * from "types/LearnCard";
|
|
5440
5954
|
export * from "@wallet/base";
|
|
5441
5955
|
export * from "@wallet/plugins";
|