Keyring Controller
All the wallet management & Chain Interactions executing on the client side is managed by this class.
Create an instance
const keyring = new KeyringController({
baseUrl: 'http://localhost:8000',
walletType: {
embedded: true, // for external wallet it should be false
supportAa: true, // false if dapp only wants EOA wallets
},
sentryDns, // string
environment, // ENV
sessionSignatures, //[OPTIONAL] SESSION SIG FROM litController.initSession
currentAccount, //[OPTIONAL] fetch PKPs FROM litController.fetchPKPs
customAuthMethod,
accessToken,
aa,
selectedWallet,
} as TriaArgs);
export type TriaArgs = {
baseUrl: string;
sentryDns?: string;
walletType?: WalletType;
selectedChainName?: ChainName;
environment?: ENV;
currentAccount?: IRelayPKP;
sessionSignatures?: string;
customAuthMethod?: LitCustomAuthMethod;
accessToken?: string;
aa?: AaDetails;
selectedWallet?: "EOA" | "AA";
};
export type ENV = 'testnet' | 'mainnet-staging' | 'mainnet';Recreating the keyring object would lead to the loss of critical in-memory data, consequently preventing the user from performing any transaction signing. Therefore, it is imperative to avoid the recreation of this object at all costs.
Functions
Reconstruction of Vault
Social Login [v2]
Create Account [v2]
Get Vault [v2]
Add Wallet
Export Mnemonic
Export Private Key
Update SubName
Remove Address
For Choose Asset or Assets display
filter - chainNames - makes sense only when sending to a subName i.e. only available on one chain
triaName- for fetching userDoc (vault with public keys) from db
Available now for -
Detect Logged in Account
Last updated