Providers for MPC Core Kit
Providers are basically pre-configured RPC clients for different blockchains. They are used to interact with the blockchain network. Web3Auth provides you with a few common providers for the most commonly asked chains. For MPC, you can only use the dedicated providers provided by Web3Auth.
Currently, Web3Auth supports the following MPC provider:
MPC Providers
Base Type Reference for Web3Auth Providers
For facilitating these providers, Web3Auth exposes a IProvider
which is a provider type helping
you make standardized RPC calls to a blockchain.
This provider contains two functions, send
and request
. You can find its type reference below:
export interface IProvider extends SafeEventEmitter {
sendAsync: <T, IProvider=> Promise<U>;
send: <T, U>(req: JRPCRequest<T>, callback: SendCallBack<U>) => void;
request: <T>(args: RequestArguments) => Promise<Maybe<T>>;
}
export interface JRPCRequest<T> extends JRPCBase {
method: string;
params?: T;
}
export interface JRPCBase {
jsonrpc?: JRPCVersion;
id?: JRPCId;
}
export declare type JRPCVersion = "2.0";
export declare type JRPCId = number | string | void;
export interface RequestArguments {
method: string;
params?: unknown[] | object;
}