UNPKG

@hashgraphonline/standards-sdk

Version:

The Hashgraph Online Standards SDK provides a complete implementation of the Hashgraph Consensus Standards (HCS), giving developers all the tools needed to build applications on Hedera.

49 lines 2.56 kB
import { Logger } from '../utils/logger'; import { RegistrationSearchResult, RegistrationResult, RegistrationSearchOptions } from './types'; export interface RegistrationStatusResponse { status: 'pending' | 'success' | 'failed'; error?: string; } export declare abstract class Registration { /** * Checks the status of a registration request. * * @param transactionId - The transaction ID of the registration. * @param network - The network to use for the registration. * @param baseUrl - The base URL of the guarded registry. * @param logger - The logger to use for logging. * @returns A promise that resolves to the registration status response. */ protected checkRegistrationStatus(transactionId: string, network: string, baseUrl: string, logger?: Logger): Promise<RegistrationStatusResponse>; /** * Waits for a registration to be confirmed. * * @param transactionId - The transaction ID of the registration. * @param network - The network to use for the registration. * @param baseUrl - The base URL of the guarded registry. * @param maxAttempts - The maximum number of attempts to check the registration status. * @param delayMs - The delay in milliseconds between attempts. * @param logger - The logger to use for logging. * @returns A promise that resolves to true if the registration is confirmed, false otherwise. */ waitForRegistrationConfirmation(transactionId: string, network: string, baseUrl: string, maxAttempts?: number, delayMs?: number, logger?: Logger): Promise<boolean>; /** * Executes a registration request for an agent. * * @param accountId - The account ID of the agent to register. * @param network - The network to use for the registration. * @param baseUrl - The base URL of the guarded registry. * @param logger - The logger to use for logging. * @returns A promise that resolves to the registration result. */ executeRegistration(accountId: string, network?: string, baseUrl?: string, logger?: Logger): Promise<RegistrationResult>; /** * Finds registrations based on the provided options. * * @param options - The options for searching registrations. * @param baseUrl - The base URL of the guarded registry. * @returns A promise that resolves to the registration search result. */ findRegistrations(options?: RegistrationSearchOptions, baseUrl?: string): Promise<RegistrationSearchResult>; } //# sourceMappingURL=registrations.d.ts.map