@ar.io/sdk
Version:
[](https://codecov.io/gh/ar-io/ar-io-sdk)
52 lines (51 loc) • 1.86 kB
TypeScript
import { AoANTRegistryRead, AoANTRegistryWrite } from '../types/ant-registry.js';
import { AoMessageResult, ProcessConfiguration, WithSigner } from '../types/index.js';
import { AOProcess } from './index.js';
import { ILogger } from './logger.js';
type ANTRegistryProcessConfig = Required<ProcessConfiguration> & {
strict?: boolean;
hyperbeamUrl?: string;
logger?: ILogger;
};
type ANTRegistryNoSigner = ANTRegistryProcessConfig;
type ANTRegistryWithSigner = WithSigner<ANTRegistryProcessConfig>;
export declare class ANTRegistry {
static init(): AoANTRegistryRead;
static init(config: ANTRegistryNoSigner): AoANTRegistryRead;
static init(config: ANTRegistryWithSigner): AoANTRegistryWrite;
}
export declare class AoANTRegistryReadable implements AoANTRegistryRead {
protected process: AOProcess;
private hyperbeamUrl;
private checkHyperBeamPromise;
private logger;
constructor(config?: ANTRegistryProcessConfig & {
logger?: ILogger;
});
/**
* Check if the process is HyperBeam compatible. If so, we'll use the HyperBeam node to fetch the state.
*
* @returns {Promise<boolean>} True if the process is HyperBeam compatible, false otherwise.
*/
private checkHyperBeamCompatibility;
accessControlList({ address, }: {
address: string;
}): Promise<{
Owned: string[];
Controlled: string[];
}>;
getAntsForAddress({ address, }: {
address: string;
}): Promise<{
Owned: string[];
Controlled: string[];
}>;
}
export declare class AoANTRegistryWriteable extends AoANTRegistryReadable implements AoANTRegistryWrite {
private signer;
constructor({ signer, ...config }: WithSigner<ANTRegistryProcessConfig>);
register({ processId, }: {
processId: string;
}): Promise<AoMessageResult>;
}
export {};