@golem-sdk/golem-js
Version:
NodeJS and WebBrowser SDK for building apps running on Golem Network
67 lines (66 loc) • 2.22 kB
TypeScript
import { PricingInfo, ProposalProperties } from "../proposal";
import type { MarketApi } from "ya-ts-client";
type ScannedOfferDTO = MarketApi.OfferDTO;
type PaymentPlatformAddressSet = {
/** The payment platform and address map */
[paymentPlatform: string]: string | undefined;
};
export declare class ScannedOffer {
private readonly model;
constructor(model: ScannedOfferDTO);
get properties(): ProposalProperties;
get constraints(): string;
get pricing(): PricingInfo;
get provider(): {
id: string;
name: string;
};
get transferProtocol(): ("http" | "https" | "gftp")[];
get cpuBrand(): string;
get cpuVendor(): string;
get cpuCapabilities(): string[];
get cpuCores(): number;
get cpuThreads(): number;
get gpuBrand(): string | undefined;
/** @deprecated Use {@link memoryGib} instead */
get memory(): number;
get memoryGib(): number;
/** @deprecated Use {@link storageGib} instead */
get storage(): number;
get storageGib(): number;
get publicNet(): boolean | undefined;
get runtimeCapabilities(): string[];
get runtimeName(): string;
get runtimeVersion(): string;
/**
* Get the ID of the offer published by the Provider
*
* Note:
* - this ID will change after the provider refreshes the offer (usually after 1h)
* - this ID will remain unchanged for the same published offer between different scans
*/
get offerId(): string;
/**
* The timestamp at which the offer was generated by the Provider
*/
get offerCreateAt(): string;
/**
* Lists down payment addresses on different payment platforms
*
* @example Example return value
* ```json
* {
* "erc20-polygon-glm": "0x8737beea5668595fda9d50e85cae9cad10b4c980",
* "erc20-holesky-tglm:" "0x8737beea5668595fda9d50e85cae9cad10b4c980",
* }
* ```
*/
get paymentPlatformAddresses(): PaymentPlatformAddressSet;
/**
* Cost estimation based on CPU/h, ENV/h and start prices
*
* @param rentHours Number of hours of rental to use for the estimation
*/
getEstimatedCost(rentHours?: number): number;
}
export {};