PHP WebShell
Текущая директория: /usr/lib/node_modules/bitgo/node_modules/@bitgo/sdk-coin-icp/dist/src/lib
Просмотр файла: icpAgent.d.ts
import BigNumber from 'bignumber.js';
export declare class IcpAgent {
private readonly host;
constructor(host: string);
/**
* Creates a new HTTP agent for communicating with the Internet Computer.
* @returns An instance of HttpAgent.
*/
private createAgent;
/**
* Retrieves an instance of the ledger canister agent.
*
* This method creates a new agent using `createAgent()`, initializes a replica interface
* with the agent (configured for local use), and returns an `AgentCanister` instance
* for the ledger canister identified by `LEDGER_CANISTER_ID`.
*
* @returns {AgentCanister} An agent interface for interacting with the ledger canister.
*/
private getLedger;
/**
* Fetches the account balance for a given principal ID.
* @param principalId - The principal ID of the account.
* @returns Promise resolving to the account balance as a string.
* @throws Error if the balance could not be fetched.
*/
getBalance(principalId: string): Promise<BigNumber>;
/**
* Fetches the transaction fee from the ledger.
* @returns Promise resolving to the transaction fee as a string.
* @throws Error if the fee could not be fetched.
*/
getFee(): Promise<BigNumber>;
}
//# sourceMappingURL=icpAgent.d.ts.mapВыполнить команду
Для локальной разработки. Не используйте в интернете!