@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.21 kB
TypeScript
import { CustomHttpAgent } from '../agent/custom-http-agent';
import { HttpAgentProvider } from '../agent/http-agent-provider';
import type { SignerOptions } from '../types/signer-options';
export declare abstract class AgentApi {
#private;
private getAgent;
private createAgent;
/**
*Returns a default `HttpAgentProvider` instance for the given signer options.
*This agent does not overwrite any default features provided by agent-js.
*
* @param {SignerOptions} options - The signer configuration including identity and host.
* @returns {Promise<HttpAgentProvider>} - A promise that resolves to a default agent instance.
*/
protected getDefaultAgent(options: SignerOptions): Promise<HttpAgentProvider>;
/**
* Returns a `CustomHttpAgent` instance for the given signer options.
* This agent uses custom transforms that are notably used to handle nonce in calls.
*
* @param {SignerOptions} options - The signer configuration including identity and host.
* @returns {Promise<CustomHttpAgent>} - A promise that resolves to a custom agent instance.
*/
protected getCustomAgent(options: SignerOptions): Promise<CustomHttpAgent>;
}