@dfinity/oisy-wallet-signer
Version:
A library designed to facilitate communication between a dApp and the OISY Wallet on the Internet Computer.
25 lines (24 loc) • 1.05 kB
TypeScript
import { HttpAgent, type HttpAgentOptions } from '@dfinity/agent';
/**
* HttpAgentProvider class provides access to the HttpAgent instance and
* allows initialization and retrieval of the agent.
*/
export declare class HttpAgentProvider {
protected _agent: HttpAgent;
protected constructor(agent: HttpAgent);
/**
* Creates an HttpAgentProvider with the provided options.
* Optionally, you can request fetching of the root key with `shouldFetchRootKey`.
*
* @param {HttpAgentOptions} options - The options to configure the HttpAgent.
* @param {boolean} [options.shouldFetchRootKey] - A flag indicating if the root key should be fetched.
* @returns {Promise<HttpAgentProvider>} A promise that resolves to a new instance of HttpAgentProvider.
*/
static create(options?: HttpAgentOptions & {
shouldFetchRootKey?: boolean;
}): Promise<HttpAgentProvider>;
/**
* We need to expose the agent to create the actor for requesting the consent message.
*/
get agent(): HttpAgent;
}