| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- import { Storage } from './storage';
- import { IWebClient } from './webclient';
- import { ContentItem } from './content-item';
- import { UploadItemParameters } from './upload-item-parameters';
- export declare class BankClient {
- private urlBase;
- private ipfsUrlBase;
- private storage;
- private webClient;
- static parseBankLink(bankLink: string): {
- host: string | undefined;
- address: string;
- topic: string;
- };
- private privateKey;
- private wsUrlBase;
- private bootstrapPromise;
- private bootstrapResult;
- constructor(urlBase: string, ipfsUrlBase: string, storage: Storage, webClient: IWebClient);
- getPub(): Promise<string>;
- bootstrap(): any;
- getNonce(): Promise<number>;
- getBalance(): Promise<number>;
- upload(params: UploadItemParameters): Promise<any>;
- uploadSlimJSON(item: any): Promise<any>;
- uploadSlimText(item: string): Promise<any>;
- appendBank(bankAddress: string, bankTopic: string, itemHash: string): Promise<void>;
- retrievePrivate(peerAddr: string, topic: string): Promise<string>;
- subscribePrivate(peerAddr: string, topic: string, connectCallback: () => void, messageCallback: (data: any) => void): Promise<void>;
- appendPrivate(peerAddr: string, topic: string, hash?: string, replaceHash?: string, deleteHash?: string): Promise<void>;
- getOrCreateContact(peerId: string, contactAddr: string): Promise<any>;
- getContactById(peerId: string, contactId: string): Promise<any>;
- updateContact(peerId: string, contactId: string, newProperties: any): Promise<any>;
- getContentItemByHash(hash: string): Promise<ContentItem>;
- private connectWebsocket;
- private getItemsForCommaList;
- private getPriv;
- private makePlaintextPayload;
- }
|