@cruxpay/js-sdk
Version:
CruxPay Javascript SDK
26 lines (25 loc) • 1.07 kB
TypeScript
import { IKeyManager } from "../../core/interfaces/key-manager";
import { StorageService } from "../../packages/storage";
export interface IHubConfig {
address: string;
server: string;
token: string;
url_prefix: any;
}
export interface IGaiaDetails {
gaiaReadUrl: string;
gaiaWriteUrl: string;
ownerAddress: string;
}
export declare class GaiaService {
static getGaiaReadUrl: (gaiaHub: string, cacheStorage?: StorageService | undefined) => Promise<string>;
static getContentFromGaiaHub: (readUrlPrefix: string, address: string, filename: string, cacheStorage?: StorageService | undefined) => Promise<any>;
private cacheStorage?;
private gaiaHub;
constructor(gaiaHub: string, cacheStorage?: StorageService);
getContentFromGaiaHub: (address: string, filename: string) => Promise<any>;
uploadContentToGaiaHub: (filename: string, content: any, keyManager: IKeyManager, type?: string) => Promise<string>;
private connectToGaiaHubAsync;
private makeV1GaiaAuthTokenAsync;
private generateContentTokenFileAsync;
}