Skip to content

Commit

Permalink
remove unnecessary docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
rekmarks committed Aug 19, 2020
1 parent 9d794ce commit 71f7414
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,10 @@ export interface MetamaskInpageProviderOptions {

export class MetamaskInpageProvider extends EventEmitter {

/**
* @param connectionStream A Node.js duplex stream
* @param options An options bag
*/
constructor (connectionStream: Duplex, options?: MetamaskInpageProviderOptions);

isConnected (): boolean;

/**
* Submits an RPC request to MetaMask for the given method, with the given params.
* Resolves with the result of the method call, or rejects on error.
*/
request (args: RequestArguments): Promise<unknown>;

sendAsync (
Expand All @@ -61,37 +53,22 @@ export class MetamaskInpageProvider extends EventEmitter {
readonly chainId: string | undefined;
}

/**
* Initializes a MetamaskInpageProvider and (optionally) sets it on window.ethereum.
* @returns The initialized provider (whether set or not).
*/
export function initProvider (
opts: Pick<MetamaskInpageProviderOptions, 'maxEventListeners' | 'shouldSendMetadata'> & {

/** A Node.js duplex stream */
connectionStream: Duplex;

/** Whether the provider should be set as window.ethereum */
shouldSetOnWindow?: boolean;
}
): MetamaskInpageProvider;

/**
* Sets the given provider instance as window.ethereum and dispatches
* the 'ethereum#initialized' event on window.
*
* @param providerInstance - The provider instance.
*/
export function setGlobalProvider (providerInstance: MetamaskInpageProvider): void;

export interface RequestArguments {
method: string;
params?: unknown[];
}

/**
* The jsonrpc and id properties will be handled if not provided.
*/
export interface JsonRpcPayload {
method: string;
params?: unknown[];
Expand Down

0 comments on commit 71f7414

Please sign in to comment.