@learncard/core 4.0.0 → 4.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/README.md +4 -4
- package/dist/core.cjs.development.js +17591 -17573
- package/dist/core.cjs.development.js.map +3 -3
- package/dist/core.cjs.production.min.js +30 -30
- package/dist/core.cjs.production.min.js.map +3 -3
- package/dist/core.d.ts +11 -1
- package/dist/core.esm.js +17591 -17573
- package/dist/core.esm.js.map +3 -3
- package/package.json +1 -1
package/dist/core.d.ts
CHANGED
@@ -4675,6 +4675,10 @@ export declare type VerifyExtension = {
|
|
4675
4675
|
verifyCredential: (credential: VC) => Promise<VerificationCheck>;
|
4676
4676
|
};
|
4677
4677
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
4678
|
+
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>> = {
|
4679
|
+
args: undefined extends Args ? Partial<Pick<LearnCardConfig, Config>> : Args & Partial<Pick<LearnCardConfig, Config>>;
|
4680
|
+
returnValue: ReturnValue;
|
4681
|
+
};
|
4678
4682
|
export declare type Plugin<Name extends string, PublicMethods extends Record<string, (...args: any[]) => any> = Record<never, never>> = {
|
4679
4683
|
name?: Name;
|
4680
4684
|
pluginMethods: {
|
@@ -4799,10 +4803,16 @@ export declare type LearnCardConfig = {
|
|
4799
4803
|
defaultContents: any[];
|
4800
4804
|
ethereumConfig: EthereumConfig;
|
4801
4805
|
};
|
4806
|
+
export declare type EmptyWallet = InitFunction<undefined, "didkit", EmptyLearnCard>;
|
4807
|
+
export declare type WalletFromKey = InitFunction<{
|
4808
|
+
seed: string;
|
4809
|
+
}, keyof LearnCardConfig, LearnCard>;
|
4802
4810
|
/** Generates an empty wallet with no key material */
|
4803
|
-
export declare const emptyWallet: ({ didkit
|
4811
|
+
export declare const emptyWallet: ({ didkit }?: EmptyWallet["args"]) => Promise<EmptyWallet["returnValue"]>;
|
4804
4812
|
/** Generates a LearnCard Wallet from a 64 character seed string */
|
4805
4813
|
export declare const walletFromKey: (key: string, { ceramicIdx, didkit, defaultContents, ethereumConfig, }?: Partial<LearnCardConfig>) => Promise<LearnCard>;
|
4814
|
+
export declare function initLearnCard(config?: EmptyWallet["args"]): Promise<EmptyWallet["returnValue"]>;
|
4815
|
+
export declare function initLearnCard(config: WalletFromKey["args"]): Promise<WalletFromKey["returnValue"]>;
|
4806
4816
|
export * from "@wallet/init";
|
4807
4817
|
export { Wallet, Plugin } from "types/wallet";
|
4808
4818
|
|