@learncard/core 1.4.0 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/core.cjs.development.js +15793 -1651
- package/dist/core.cjs.development.js.map +3 -3
- package/dist/core.cjs.production.min.js +203 -201
- package/dist/core.cjs.production.min.js.map +3 -3
- package/dist/core.d.ts +25 -2
- package/dist/core.esm.js +15793 -1651
- package/dist/core.esm.js.map +3 -3
- package/package.json +2 -1
package/dist/core.d.ts
CHANGED
@@ -4614,6 +4614,16 @@ export declare type DidKeyPluginMethods<DidMethod extends string> = {
|
|
4614
4614
|
};
|
4615
4615
|
getKey: () => string;
|
4616
4616
|
};
|
4617
|
+
export declare type EthereumPluginMethods = {
|
4618
|
+
checkMyEth: () => Promise<string>;
|
4619
|
+
checkMyDai: () => Promise<string>;
|
4620
|
+
checkMyUsdc: () => Promise<string>;
|
4621
|
+
};
|
4622
|
+
export declare type EthereumConfig = {
|
4623
|
+
address: string;
|
4624
|
+
infuraProjectId?: string;
|
4625
|
+
network?: providers.Networkish;
|
4626
|
+
};
|
4617
4627
|
export declare type IDXPluginMethods = {
|
4618
4628
|
getCredentialsListFromIndex: (alias?: string) => Promise<CredentialsList>;
|
4619
4629
|
publishContentToCeramic: (cred: any) => Promise<string>;
|
@@ -4677,7 +4687,7 @@ export declare type UnlockedWallet<PluginNames extends string = "", PluginMethod
|
|
4677
4687
|
addPlugin: <Name extends string, Methods extends Record<string, (...args: any[]) => any> = Record<never, never>>(plugin: Plugin<Name, Methods>) => Promise<UnlockedWallet<"" extends PluginNames ? Name : PluginNames | Name, Record<never, never> extends PluginMethods ? Methods : PluginMethods & Methods>>;
|
4678
4688
|
};
|
4679
4689
|
export declare type Wallet<PluginNames extends string = "", PluginMethods extends Record<string, (...args: any[]) => any> = Record<never, never>> = LockedWallet<PluginNames, PluginMethods> | UnlockedWallet<PluginNames, PluginMethods>;
|
4680
|
-
export declare type LearnCardRawWallet = UnlockedWallet<"DIDKit" | "DID Key" | "VC" | "IDX" | "Expiration", DidKeyPluginMethods<DidMethod> & VCPluginMethods & IDXPluginMethods>;
|
4690
|
+
export declare type LearnCardRawWallet = UnlockedWallet<"DIDKit" | "DID Key" | "VC" | "IDX" | "Expiration" | "Ethereum", DidKeyPluginMethods<DidMethod> & VCPluginMethods & IDXPluginMethods & EthereumPluginMethods>;
|
4681
4691
|
export declare type LearnCardWallet = {
|
4682
4692
|
/** Raw IoE wallet instance. You shouldn't need to drop down to this level! */
|
4683
4693
|
_wallet: LearnCardRawWallet;
|
@@ -4740,6 +4750,18 @@ export declare type LearnCardWallet = {
|
|
4740
4750
|
* You can use this to test out implementations that use this library!
|
4741
4751
|
*/
|
4742
4752
|
getTestVc: (subject?: string) => UnsignedVC;
|
4753
|
+
/**
|
4754
|
+
* Returns your ETH balance
|
4755
|
+
*/
|
4756
|
+
checkMyEth: () => Promise<string>;
|
4757
|
+
/**
|
4758
|
+
* Returns your DAI balance
|
4759
|
+
*/
|
4760
|
+
checkMyDai: () => Promise<string>;
|
4761
|
+
/**
|
4762
|
+
* Returns your USDC balance
|
4763
|
+
*/
|
4764
|
+
checkMyUsdc: () => Promise<string>;
|
4743
4765
|
};
|
4744
4766
|
export declare type CeramicIDXArgs = {
|
4745
4767
|
modelData: ModelAliases;
|
@@ -4751,9 +4773,10 @@ export declare type LearnCardConfig = {
|
|
4751
4773
|
ceramicIdx: CeramicIDXArgs;
|
4752
4774
|
didkit: InitInput | Promise<InitInput>;
|
4753
4775
|
defaultContents: any[];
|
4776
|
+
ethereumConfig: EthereumConfig;
|
4754
4777
|
};
|
4755
4778
|
/** Generates a LearnCard Wallet from a 64 character seed string */
|
4756
|
-
export declare const walletFromKey: (key: string, { ceramicIdx, didkit, defaultContents, }?: Partial<LearnCardConfig>) => Promise<LearnCardWallet>;
|
4779
|
+
export declare const walletFromKey: (key: string, { ceramicIdx, didkit, defaultContents, ethereumConfig, }?: Partial<LearnCardConfig>) => Promise<LearnCardWallet>;
|
4757
4780
|
export { walletFromKey } from "@wallet/init";
|
4758
4781
|
export { Wallet, UnlockedWallet, LockedWallet, Plugin } from "types/wallet";
|
4759
4782
|
|