dotbit-sdk-allin
Version:
A complete .bit SDK and utilities in TypeScript
23 lines (22 loc) • 826 B
TypeScript
import { JSONRPC } from '../tools/JSON-RPC';
import { BitAccountInfo, BitAccountRecord, DasServerInfo, 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<string[]>;
}