dotbit
Version:
A complete .bit SDK and utilities in TypeScript
27 lines (26 loc) • 1.23 kB
TypeScript
import { JSONRPC } from '../tools/JSON-RPC';
import { BatchAccountInfo, BitAccountInfo, BitAccountListItem, BitAccountRecord, BitKeyInfo, DasServerInfo, DobInfo, DobListParams, KeyInfo } from './BitIndexer.type';
export interface AccountIndexerResult<T> {
errno: number;
errmsg: string;
data: T;
}
export declare class BitIndexer {
rpc: JSONRPC;
constructor({ uri }: {
uri: string;
});
request<T = any>(method: string, params?: any): Promise<T>;
serverInfo(): Promise<DasServerInfo>;
accountInfo(account: string): Promise<BitAccountInfo>;
accountInfoById(accountId: string): Promise<BitAccountInfo>;
accountRecords(account: string): Promise<BitAccountRecord[]>;
reverseRecord(keyInfo: KeyInfo): Promise<{
account: string;
}>;
accountList(keyInfo: KeyInfo, role?: 'manager' | 'owner'): Promise<BitAccountListItem[]>;
subAccountVerify(address: string, account: string, subAccount?: string, verifyType?: number): Promise<boolean>;
validDotbitAliasAddresses(account: string): Promise<BitKeyInfo[]>;
batchAccountInfo(accounts: string[]): Promise<BatchAccountInfo[]>;
dobList({ keyInfo, didType, page, size }: DobListParams): Promise<DobInfo[]>;
}